@bootkit/ng0 0.0.0-alpha.3 → 0.0.0-alpha.31
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/common/index.d.ts +271 -7
- package/components/accordion/index.d.ts +1 -1
- package/components/backdrop/index.d.ts +12 -0
- package/components/button/index.d.ts +48 -0
- package/components/card/index.d.ts +27 -0
- package/components/code/index.d.ts +35 -0
- package/components/confirmation/index.d.ts +66 -0
- package/components/dropdown/index.d.ts +140 -0
- package/components/form-field/index.d.ts +24 -41
- package/components/list/index.d.ts +259 -0
- package/components/modal/index.d.ts +22 -4
- package/components/nav/index.d.ts +23 -19
- package/components/pagination/index.d.ts +35 -9
- package/components/popover/index.d.ts +1 -1
- package/components/select/index.d.ts +159 -0
- package/components/sidenav/index.d.ts +59 -0
- package/components/stepper/index.d.ts +26 -0
- package/components/table/index.d.ts +273 -0
- package/components/toast/index.d.ts +1 -1
- package/components/tooltip/index.d.ts +1 -1
- package/components/vertical-menu/index.d.ts +61 -0
- package/data/index.d.ts +145 -45
- package/date/index.d.ts +34 -0
- package/fesm2022/bootkit-ng0-common.mjs +295 -12
- package/fesm2022/bootkit-ng0-common.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-accordion.mjs +13 -13
- package/fesm2022/bootkit-ng0-components-accordion.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-backdrop.mjs +46 -0
- package/fesm2022/bootkit-ng0-components-backdrop.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-button.mjs +119 -0
- package/fesm2022/bootkit-ng0-components-button.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-card.mjs +62 -0
- package/fesm2022/bootkit-ng0-components-card.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-code.mjs +70 -0
- package/fesm2022/bootkit-ng0-components-code.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-collapse.mjs +14 -14
- package/fesm2022/bootkit-ng0-components-collapse.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-confirmation.mjs +167 -0
- package/fesm2022/bootkit-ng0-components-confirmation.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-dropdown.mjs +302 -0
- package/fesm2022/bootkit-ng0-components-dropdown.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-form-field.mjs +61 -83
- package/fesm2022/bootkit-ng0-components-form-field.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-list.mjs +563 -0
- package/fesm2022/bootkit-ng0-components-list.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-modal.mjs +40 -23
- package/fesm2022/bootkit-ng0-components-modal.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-nav.mjs +58 -59
- package/fesm2022/bootkit-ng0-components-nav.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-offcanvas.mjs +9 -9
- package/fesm2022/bootkit-ng0-components-offcanvas.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-overlay.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-pagination.mjs +58 -23
- package/fesm2022/bootkit-ng0-components-pagination.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-popover.mjs +10 -10
- package/fesm2022/bootkit-ng0-components-popover.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-select.mjs +446 -0
- package/fesm2022/bootkit-ng0-components-select.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-sidenav.mjs +153 -0
- package/fesm2022/bootkit-ng0-components-sidenav.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-stepper.mjs +91 -0
- package/fesm2022/bootkit-ng0-components-stepper.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-table.mjs +461 -0
- package/fesm2022/bootkit-ng0-components-table.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-toast.mjs +7 -7
- package/fesm2022/bootkit-ng0-components-toast.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-tooltip.mjs +8 -8
- package/fesm2022/bootkit-ng0-components-tooltip.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-vertical-menu.mjs +161 -0
- package/fesm2022/bootkit-ng0-components-vertical-menu.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-data.mjs +180 -90
- package/fesm2022/bootkit-ng0-data.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-date.mjs +50 -0
- package/fesm2022/bootkit-ng0-date.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-file.mjs +50 -0
- package/fesm2022/bootkit-ng0-file.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-form.mjs +514 -0
- package/fesm2022/bootkit-ng0-form.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-http.mjs +224 -176
- package/fesm2022/bootkit-ng0-http.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-layouts-layout1.mjs +138 -0
- package/fesm2022/bootkit-ng0-layouts-layout1.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-localization-locales.mjs +101 -0
- package/fesm2022/bootkit-ng0-localization-locales.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-localization.mjs +347 -105
- package/fesm2022/bootkit-ng0-localization.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-platform-browser.mjs +51 -0
- package/fesm2022/bootkit-ng0-platform-browser.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-routing.mjs +80 -0
- package/fesm2022/bootkit-ng0-routing.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-script.mjs +59 -0
- package/fesm2022/bootkit-ng0-script.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-security.mjs +17 -15
- package/fesm2022/bootkit-ng0-security.mjs.map +1 -1
- package/file/index.d.ts +22 -0
- package/form/index.d.ts +127 -0
- package/http/index.d.ts +138 -37
- package/layouts/layout1/index.d.ts +92 -0
- package/localization/index.d.ts +180 -41
- package/localization/locales/index.d.ts +7 -0
- package/package.json +94 -14
- package/platform/browser/index.d.ts +22 -0
- package/routing/index.d.ts +124 -0
- package/script/index.d.ts +27 -0
- package/security/index.d.ts +3 -9
|
@@ -1,132 +1,110 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as i1 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { input,
|
|
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
|
-
import * as i1 from '@angular/forms';
|
|
7
6
|
import { FormControl, NgControl } from '@angular/forms';
|
|
8
|
-
import
|
|
7
|
+
import { LocalizationService } from '@bootkit/ng0/localization';
|
|
9
8
|
|
|
10
9
|
class FormFieldComponent {
|
|
11
|
-
|
|
12
|
-
_destroyRef;
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
_ngControlElement;
|
|
11
|
+
_destroyRef = inject(DestroyRef);
|
|
12
|
+
_renderer = inject(Renderer2);
|
|
13
|
+
_localizationService = inject(LocalizationService);
|
|
14
|
+
// private _form = inject(NgForm, { optional: true });
|
|
15
|
+
_ngControl;
|
|
16
|
+
_status = signal('', ...(ngDevMode ? [{ debugName: "_status" }] : []));
|
|
17
|
+
_hasRequiredControl = signal(false, ...(ngDevMode ? [{ debugName: "_hasRequiredControl" }] : []));
|
|
18
|
+
_errorText = signal(undefined, ...(ngDevMode ? [{ debugName: "_errorText" }] : []));
|
|
15
19
|
/**
|
|
16
20
|
* The label text for the form field.
|
|
17
21
|
*/
|
|
18
|
-
label = input();
|
|
22
|
+
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
19
23
|
/**
|
|
20
24
|
* The hint text to display below the form field.
|
|
21
|
-
* This is typically used to provide additional information or instructions to the user.
|
|
22
25
|
*/
|
|
23
|
-
hint = input();
|
|
26
|
+
hint = input(...(ngDevMode ? [undefined, { debugName: "hint" }] : []));
|
|
24
27
|
/**
|
|
25
28
|
* If true, the form-field will show validation errors.
|
|
26
|
-
* This is useful for displaying validation messages when the form control is invalid.
|
|
27
29
|
*/
|
|
28
|
-
showErrors = input(true);
|
|
30
|
+
showErrors = input(true, ...(ngDevMode ? [{ debugName: "showErrors", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
29
31
|
/**
|
|
30
|
-
* If
|
|
31
|
-
*
|
|
32
|
+
* If undefined, the indicator will be shown based on the control's required state.
|
|
33
|
+
* If true, the form-field will show a required indicator (*) next to the label (regardless of the control's required state).
|
|
34
|
+
* If false, the required indicator will not be shown (regardless of the control's required state).
|
|
32
35
|
*/
|
|
33
|
-
|
|
36
|
+
showRequired = input(undefined, ...(ngDevMode ? [{ debugName: "showRequired" }] : []));
|
|
34
37
|
/**
|
|
35
38
|
* If true, the form-field will show subscripts (e.g. hints, errors) for the field label.
|
|
36
|
-
* This is useful for displaying additional information or validation messages.
|
|
37
39
|
*/
|
|
38
|
-
showSubscripts = input(true);
|
|
40
|
+
showSubscripts = input(true, ...(ngDevMode ? [{ debugName: "showSubscripts", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
39
41
|
/**
|
|
40
42
|
* If true, the form-field will be rendered inside a ".input-group" element.
|
|
41
43
|
*/
|
|
42
|
-
inputGroup = input(true);
|
|
43
|
-
/**
|
|
44
|
-
* Returns the first localized error of the control
|
|
45
|
-
*/
|
|
46
|
-
get errorText() { return this._errorText; }
|
|
47
|
-
/** Reports whether the control is touched. */
|
|
48
|
-
get touched() { return this._ngControl?.touched; }
|
|
49
|
-
/** Reports whether the control is dirty. */
|
|
50
|
-
get dirty() { return this._ngControl?.dirty; }
|
|
51
|
-
/** Returns true if this form-field is required, otherwise returns false. */
|
|
52
|
-
get isRequired() { return this._isRequired; }
|
|
53
|
-
_onFocusOut() { this._validate(); }
|
|
54
|
-
_ngControl;
|
|
55
|
-
_ngControlElement;
|
|
56
|
-
_isRequired = false;
|
|
57
|
-
_locale;
|
|
58
|
-
_errorText;
|
|
59
|
-
constructor(_renderer, _destroyRef, _form, _ls) {
|
|
60
|
-
this._renderer = _renderer;
|
|
61
|
-
this._destroyRef = _destroyRef;
|
|
62
|
-
this._form = _form;
|
|
63
|
-
this._ls = _ls;
|
|
64
|
-
this._locale = this._ls.get();
|
|
65
|
-
this._ls.change.pipe(takeUntilDestroyed()).subscribe(e => this._locale = e.new);
|
|
66
|
-
}
|
|
67
|
-
ngOnInit() {
|
|
68
|
-
}
|
|
44
|
+
inputGroup = input(true, ...(ngDevMode ? [{ debugName: "inputGroup", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
69
45
|
ngAfterContentInit() {
|
|
70
|
-
this.
|
|
46
|
+
this._hasRequiredControl.set(this._isControlRequired());
|
|
71
47
|
if (this._ngControl) {
|
|
72
|
-
this.
|
|
73
|
-
|
|
48
|
+
this._status.set(this._ngControl.status);
|
|
49
|
+
this._ngControl.statusChanges?.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(change => {
|
|
50
|
+
this._status.set(change);
|
|
51
|
+
this._checkValidation();
|
|
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
|
+
}
|
|
74
57
|
});
|
|
75
58
|
}
|
|
76
59
|
}
|
|
77
|
-
|
|
78
|
-
if (!this._ngControl || !this.
|
|
60
|
+
_checkValidation() {
|
|
61
|
+
if (!this._ngControl || !this._ngControl.touched) {
|
|
79
62
|
return;
|
|
80
63
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
this._renderer.
|
|
89
|
-
this._renderer.removeClass(this._ngControlElement.nativeElement, invalid ? 'is-valid' : 'is-invalid');
|
|
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');
|
|
90
72
|
}
|
|
91
|
-
|
|
92
|
-
const validator = this._ngControl?.validator;
|
|
73
|
+
_isControlRequired() {
|
|
74
|
+
const validator = this._ngControl?.validator || this._ngControl?.control?.validator;
|
|
93
75
|
const errors = validator && validator(new FormControl(null));
|
|
94
76
|
return errors != null && errors['required'] === true;
|
|
95
77
|
}
|
|
96
|
-
|
|
78
|
+
_onFocusOut() {
|
|
79
|
+
this._checkValidation();
|
|
97
80
|
}
|
|
98
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
99
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
81
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
82
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", 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 });
|
|
100
83
|
}
|
|
101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
102
85
|
type: Component,
|
|
103
|
-
args: [{ selector: 'ng0-form-field, ng0-field', exportAs: 'ng0FormField', standalone: true, imports: [
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}],
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
86
|
+
args: [{ selector: 'ng0-form-field, ng0-field', exportAs: 'ng0FormField', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule], host: {
|
|
87
|
+
'[class.ng0-form-field-required]': '_hasRequiredControl()',
|
|
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"] }]
|
|
89
|
+
}], propDecorators: { _ngControlElement: [{
|
|
90
|
+
type: ContentChild,
|
|
91
|
+
args: [NgControl, { static: true, read: ElementRef }]
|
|
92
|
+
}], _ngControl: [{
|
|
93
|
+
type: ContentChild,
|
|
94
|
+
args: [NgControl]
|
|
111
95
|
}], _onFocusOut: [{
|
|
112
96
|
type: HostListener,
|
|
113
97
|
args: ['focusout']
|
|
114
|
-
}], _ngControl: [{
|
|
115
|
-
type: ContentChild,
|
|
116
|
-
args: [NgControl, { static: true }]
|
|
117
|
-
}], _ngControlElement: [{
|
|
118
|
-
type: ContentChild,
|
|
119
|
-
args: [NgControl, { static: true, read: ElementRef }]
|
|
120
98
|
}] } });
|
|
121
99
|
|
|
122
100
|
class FormFieldModule {
|
|
123
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
124
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.
|
|
101
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
102
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.1", ngImport: i0, type: FormFieldModule, imports: [CommonModule,
|
|
125
103
|
FormFieldComponent], exports: [FormFieldComponent] });
|
|
126
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.
|
|
104
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FormFieldModule, imports: [CommonModule,
|
|
127
105
|
FormFieldComponent] });
|
|
128
106
|
}
|
|
129
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FormFieldModule, decorators: [{
|
|
130
108
|
type: NgModule,
|
|
131
109
|
args: [{
|
|
132
110
|
imports: [
|
|
@@ -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 { DestroyRef, HostListener, input, signal } from '@angular/core';\r\nimport { Component, Input, ContentChild, AfterContentInit, Optional, HostBinding, OnInit, OnDestroy, ElementRef, Renderer2 } from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { FormControl, NgControl, NgForm } from '@angular/forms';\r\nimport { Locale, 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 standalone: true,\r\n imports: [\r\n CommonModule\r\n ],\r\n})\r\nexport class FormFieldComponent implements OnInit, AfterContentInit, OnDestroy {\r\n\r\n /**\r\n * The label text for the form field.\r\n */\r\n public label = input<string>();\r\n\r\n /**\r\n * The hint text to display below the form field.\r\n * This is typically used to provide additional information or instructions to the user.\r\n */\r\n public hint = input<string>();\r\n\r\n /**\r\n * If true, the form-field will show validation errors.\r\n * This is useful for displaying validation messages when the form control is invalid.\r\n */\r\n public showErrors = input(true);\r\n\r\n /**\r\n * If true, the form-field will show a red asterisk for required fields.\r\n * This is only a visual indicator and does not enforce validation.\r\n */\r\n public showRequiredIndicator = input(true);\r\n\r\n /**\r\n * If true, the form-field will show subscripts (e.g. hints, errors) for the field label.\r\n * This is useful for displaying additional information or validation messages.\r\n */\r\n public showSubscripts = input(true);\r\n\r\n /**\r\n * If true, the form-field will be rendered inside a \".input-group\" element.\r\n */\r\n public inputGroup = input(true);\r\n\r\n /**\r\n * Returns the first localized error of the control \r\n */\r\n public get errorText() { return this._errorText; }\r\n\r\n /** Reports whether the control is touched. */\r\n public get touched(): boolean | null | undefined { return this._ngControl?.touched; }\r\n\r\n /** Reports whether the control is dirty. */\r\n public get dirty(): boolean | null | undefined { return this._ngControl?.dirty; }\r\n\r\n /** Returns true if this form-field is required, otherwise returns false. */\r\n @HostBinding('class.required-form-field')\r\n public get isRequired(): boolean { return this._isRequired; }\r\n\r\n @HostListener('focusout')\r\n private _onFocusOut() { this._validate(); }\r\n\r\n @ContentChild(NgControl, { static: true })\r\n private _ngControl?: NgControl;\r\n\r\n @ContentChild(NgControl, { static: true, read: ElementRef })\r\n private _ngControlElement?: ElementRef;\r\n\r\n private _isRequired = false;\r\n private _locale?: Locale;\r\n private _errorText?: string;\r\n\r\n constructor(\r\n private _renderer: Renderer2,\r\n private _destroyRef: DestroyRef,\r\n @Optional() private _form: NgForm,\r\n private _ls: LocalizationService,\r\n ) {\r\n this._locale = this._ls.get();\r\n this._ls.change.pipe(takeUntilDestroyed()).subscribe(e => this._locale = e.new);\r\n }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n this._isRequired = this._isRequiredField();\r\n\r\n if (this._ngControl) {\r\n this._ngControl?.statusChanges?.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(change => {\r\n this._validate();\r\n });\r\n }\r\n }\r\n\r\n private _validate() {\r\n if (!this._ngControl || !this.dirty || !this.touched) {\r\n return;\r\n }\r\n\r\n const invalid = this._ngControl.status === 'INVALID';\r\n if (invalid) {\r\n this._errorText = this._locale?.translateFirstError(this._ngControl.errors, 'Invalid').text;\r\n } else {\r\n this._errorText = undefined;\r\n }\r\n this._renderer.addClass(this._ngControlElement!.nativeElement, invalid ? 'is-invalid' : 'is-valid');\r\n this._renderer.removeClass(this._ngControlElement!.nativeElement, invalid ? 'is-valid' : 'is-invalid');\r\n }\r\n\r\n private _isRequiredField(): boolean {\r\n const validator = this._ngControl?.validator;\r\n const errors = validator && validator(new FormControl(null));\r\n return errors != null && errors['required'] === true;\r\n }\r\n\r\n ngOnDestroy(): void {\r\n }\r\n}\r\n","@if(label()) {\r\n<label class=\"form-field-label\">\r\n {{label()}}\r\n <span *ngIf=\"isRequired && showRequiredIndicator()\" class=\"isc-form-field-required-marker\">*</span>\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=\"form-field-subscript-wrapper\">\r\n @if(showErrors() && errorText && (touched || dirty)) {\r\n <span class=\"form-field-error text-danger\">\r\n {{errorText}}\r\n </span>\r\n }@if(hint()) {\r\n <span class=\"form-field-hint\">\r\n {{hint()}}\r\n </span>\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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AAO,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,mBAA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