@klippa/ngx-enhancy-forms 11.5.0 → 11.5.2
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/form/form-caption/form-caption.component.mjs +1 -6
- package/esm2020/lib/form/form.component.mjs +2 -2
- package/fesm2015/klippa-ngx-enhancy-forms.mjs +2 -6
- package/fesm2015/klippa-ngx-enhancy-forms.mjs.map +1 -1
- package/fesm2020/klippa-ngx-enhancy-forms.mjs +2 -6
- package/fesm2020/klippa-ngx-enhancy-forms.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Component, Host, Optional, ViewChild } from '@angular/core';
|
|
2
|
-
import { isNullOrUndefined } from "../../util/values";
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
3
|
import * as i1 from "../form-element/form-element.component";
|
|
5
4
|
export class FormCaptionComponent {
|
|
@@ -12,11 +11,7 @@ export class FormCaptionComponent {
|
|
|
12
11
|
// <some-input />
|
|
13
12
|
// That would fail, because the logic of the form error is run first, and at that moment, the `some-input` isnt registered yet
|
|
14
13
|
setTimeout(() => {
|
|
15
|
-
const attachedControl = this.parent.getAttachedControl();
|
|
16
14
|
this.parent.registerCaption(this.contentRef);
|
|
17
|
-
if (isNullOrUndefined(attachedControl)) {
|
|
18
|
-
throw new Error('You added a Form Caption component without an attached Form Control');
|
|
19
|
-
}
|
|
20
15
|
});
|
|
21
16
|
}
|
|
22
17
|
}
|
|
@@ -33,4 +28,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
33
28
|
type: ViewChild,
|
|
34
29
|
args: ['contentRef']
|
|
35
30
|
}] } });
|
|
36
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
31
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1jYXB0aW9uLmNvbXBvbmVudC5qcyIsInNv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gYW5kIGF0IHRoYXQgbW9tZW50LCB0aGUgYHNvbWUtaW5wdXRgIGlzbnQgcmVnaXN0ZXJlZCB5ZXRcblx0XHRzZXRUaW1lb3V0KCgpID0+IHtcblx0XHRcdHRoaXMucGFyZW50LnJlZ2lzdGVyQ2FwdGlvbih0aGlzLmNvbnRlbnRSZWYpO1xuXHRcdH0pO1xuXHR9XG59XG4iLCI8bmctdGVtcGxhdGUgI2NvbnRlbnRSZWY+XG5cdDxuZy1jb250ZW50PjwvbmctY29udGVudD5cbjwvbmctdGVtcGxhdGU+XG4iXX0=
|
|
@@ -167,10 +167,10 @@ export class FormComponent {
|
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
FormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FormComponent, deps: [{ token: FormComponent, optional: true, skipSelf: true }, { token: SubFormDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
170
|
-
FormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: FormComponent, selector: "klp-form", inputs: { readOnly: "readOnly", showErrorMessages: "showErrorMessages", errorMessageLocation: "errorMessageLocation", formGroup: "formGroup", patchValueInterceptor: "patchValueInterceptor" }, usesOnChanges: true, ngImport: i0, template: "<form>\n\t<ng-content></ng-content>\n</form>\n\n\n", styles: [":host{display:block}:host.row{display:flex}\n"], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
|
|
170
|
+
FormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: FormComponent, selector: "klp-form", inputs: { readOnly: "readOnly", showErrorMessages: "showErrorMessages", errorMessageLocation: "errorMessageLocation", formGroup: "formGroup", patchValueInterceptor: "patchValueInterceptor" }, usesOnChanges: true, ngImport: i0, template: "<form>\n\t<ng-content></ng-content>\n</form>\n\n\n", styles: [":host{display:block}:host.row{display:flex}:host form{height:inherit}\n"], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
|
|
171
171
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FormComponent, decorators: [{
|
|
172
172
|
type: Component,
|
|
173
|
-
args: [{ selector: 'klp-form', template: "<form>\n\t<ng-content></ng-content>\n</form>\n\n\n", styles: [":host{display:block}:host.row{display:flex}\n"] }]
|
|
173
|
+
args: [{ selector: 'klp-form', template: "<form>\n\t<ng-content></ng-content>\n</form>\n\n\n", styles: [":host{display:block}:host.row{display:flex}:host form{height:inherit}\n"] }]
|
|
174
174
|
}], ctorParameters: function () { return [{ type: FormComponent, decorators: [{
|
|
175
175
|
type: SkipSelf
|
|
176
176
|
}, {
|
|
@@ -253,10 +253,10 @@ class FormComponent {
|
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
FormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FormComponent, deps: [{ token: FormComponent, optional: true, skipSelf: true }, { token: SubFormDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
256
|
-
FormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: FormComponent, selector: "klp-form", inputs: { readOnly: "readOnly", showErrorMessages: "showErrorMessages", errorMessageLocation: "errorMessageLocation", formGroup: "formGroup", patchValueInterceptor: "patchValueInterceptor" }, usesOnChanges: true, ngImport: i0, template: "<form>\n\t<ng-content></ng-content>\n</form>\n\n\n", styles: [":host{display:block}:host.row{display:flex}\n"], dependencies: [{ kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
|
|
256
|
+
FormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: FormComponent, selector: "klp-form", inputs: { readOnly: "readOnly", showErrorMessages: "showErrorMessages", errorMessageLocation: "errorMessageLocation", formGroup: "formGroup", patchValueInterceptor: "patchValueInterceptor" }, usesOnChanges: true, ngImport: i0, template: "<form>\n\t<ng-content></ng-content>\n</form>\n\n\n", styles: [":host{display:block}:host.row{display:flex}:host form{height:inherit}\n"], dependencies: [{ kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
|
|
257
257
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FormComponent, decorators: [{
|
|
258
258
|
type: Component,
|
|
259
|
-
args: [{ selector: 'klp-form', template: "<form>\n\t<ng-content></ng-content>\n</form>\n\n\n", styles: [":host{display:block}:host.row{display:flex}\n"] }]
|
|
259
|
+
args: [{ selector: 'klp-form', template: "<form>\n\t<ng-content></ng-content>\n</form>\n\n\n", styles: [":host{display:block}:host.row{display:flex}:host form{height:inherit}\n"] }]
|
|
260
260
|
}], ctorParameters: function () {
|
|
261
261
|
return [{ type: FormComponent, decorators: [{
|
|
262
262
|
type: SkipSelf
|
|
@@ -953,11 +953,7 @@ class FormCaptionComponent {
|
|
|
953
953
|
// <some-input />
|
|
954
954
|
// That would fail, because the logic of the form error is run first, and at that moment, the `some-input` isnt registered yet
|
|
955
955
|
setTimeout(() => {
|
|
956
|
-
const attachedControl = this.parent.getAttachedControl();
|
|
957
956
|
this.parent.registerCaption(this.contentRef);
|
|
958
|
-
if (isNullOrUndefined(attachedControl)) {
|
|
959
|
-
throw new Error('You added a Form Caption component without an attached Form Control');
|
|
960
|
-
}
|
|
961
957
|
});
|
|
962
958
|
}
|
|
963
959
|
}
|