@klippa/ngx-enhancy-forms 18.26.10 → 18.26.11
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.
|
@@ -13,6 +13,7 @@ export class FileInputComponent extends MultipleValueAccessorBase {
|
|
|
13
13
|
this.clearable = false;
|
|
14
14
|
this.onlyShowUploadButton = false;
|
|
15
15
|
this.useFullParentSize = false;
|
|
16
|
+
this.fullyCustom = false;
|
|
16
17
|
}
|
|
17
18
|
onChange(files) {
|
|
18
19
|
const result = [];
|
|
@@ -51,11 +52,11 @@ export class FileInputComponent extends MultipleValueAccessorBase {
|
|
|
51
52
|
this.nativeInputRef.nativeElement.click();
|
|
52
53
|
}
|
|
53
54
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: FileInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
54
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: FileInputComponent, selector: "klp-form-file-input", inputs: { isLoading: "isLoading", clearable: "clearable", onlyShowUploadButton: "onlyShowUploadButton", useFullParentSize: "useFullParentSize", buttonText: "buttonText" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: FileInputComponent, multi: true }], viewQueries: [{ propertyName: "nativeInputRef", first: true, predicate: ["nativeInputRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"componentContainer\" [ngClass]=\"{fullParentSize: useFullParentSize, showErrors: isInErrorState()}\">\n\t<div class=\"buttonContainer\">\n\t\t<input\n\t\t\ttype=\"file\"\n\t\t\t#nativeInputRef\n\t\t\t(change)=\"onChange($event.target.files)\"\n\t\t\t[multiple]=\"multiple\"\n\t\t\t[disabled]=\"disabled\"\n\t\t>\n\t\t<klp-form-button
|
|
55
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: FileInputComponent, selector: "klp-form-file-input", inputs: { isLoading: "isLoading", clearable: "clearable", onlyShowUploadButton: "onlyShowUploadButton", useFullParentSize: "useFullParentSize", buttonText: "buttonText", fullyCustom: "fullyCustom" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: FileInputComponent, multi: true }], viewQueries: [{ propertyName: "nativeInputRef", first: true, predicate: ["nativeInputRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"fullyCustom\" *ngIf=\"fullyCustom\">\n\t<input\n\t\ttype=\"file\"\n\t\t#nativeInputRef\n\t\t(change)=\"onChange($event.target.files)\"\n\t\t[multiple]=\"multiple\"\n\t\t[disabled]=\"disabled\"\n\t/>\n\t<div (click)=\"uploadFileClicked()\">\n\t\t<ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n\t</div>\n</div>\n\n<div class=\"componentContainer\" [ngClass]=\"{fullParentSize: useFullParentSize, showErrors: isInErrorState()}\"\n\t\t *ngIf=\"!fullyCustom\">\n\t<div class=\"buttonContainer\">\n\t\t<input\n\t\t\ttype=\"file\"\n\t\t\t#nativeInputRef\n\t\t\t(change)=\"onChange($event.target.files)\"\n\t\t\t[multiple]=\"multiple\"\n\t\t\t[disabled]=\"disabled\"\n\t\t>\n\t\t<klp-form-button\n\t\t\tclass=\"uploadButton\"\n\t\t\t[isLoading]=\"isLoading\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t(click)=\"uploadFileClicked()\"\n\t\t>\n\t\t\t<div class=\"innerButton\">\n\t\t\t\t<span *ngIf=\"buttonText\">{{ buttonText }}</span>\n\t\t\t\t<div *ngIf=\"!buttonText\">\n\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"tail\">\n\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"getTailTpl()\"></ng-container>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</klp-form-button>\n\t</div>\n\t<div class=\"fileName\" *ngIf=\"!onlyShowUploadButton\">\n\t\t{{ getFileNames() }}\n\t</div>\n\t<klp-form-button class=\"clearButton\" variant=\"white\" *ngIf=\"shouldShowClearButton()\" (click)=\"resetToNull()\">X\n\t</klp-form-button>\n</div>\n\n<ng-template #contentTpl>\n\t<ng-content></ng-content>\n</ng-template>\n", styles: [":host{display:block}:host input:disabled{cursor:not-allowed}.componentContainer{display:flex;align-items:center}.componentContainer.showErrors ::ng-deep button{border-color:#ff8000}.componentContainer.fullParentSize{height:100%;justify-content:center;position:relative}.componentContainer:not(.fullParentSize) .buttonContainer{position:relative}.componentContainer .buttonContainer{flex:0 0 auto}.innerButton{display:flex;align-items:center}.tail{margin-left:.4rem}input{position:absolute;cursor:pointer;opacity:0;inset:0}.fileName{flex:1 1 0px;margin-left:.625rem;color:#515365;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.clearButton{flex:0 0 auto}.fullyCustom input{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.ButtonComponent, selector: "klp-form-button", inputs: ["variant", "size", "fullWidth", "hasBorder", "disabled", "isLoading", "type", "clickCallback"] }] }); }
|
|
55
56
|
}
|
|
56
57
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: FileInputComponent, decorators: [{
|
|
57
58
|
type: Component,
|
|
58
|
-
args: [{ selector: 'klp-form-file-input', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: FileInputComponent, multi: true }], template: "<div class=\"componentContainer\" [ngClass]=\"{fullParentSize: useFullParentSize, showErrors: isInErrorState()}\">\n\t<div class=\"buttonContainer\">\n\t\t<input\n\t\t\ttype=\"file\"\n\t\t\t#nativeInputRef\n\t\t\t(change)=\"onChange($event.target.files)\"\n\t\t\t[multiple]=\"multiple\"\n\t\t\t[disabled]=\"disabled\"\n\t\t>\n\t\t<klp-form-button
|
|
59
|
+
args: [{ selector: 'klp-form-file-input', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: FileInputComponent, multi: true }], template: "<div class=\"fullyCustom\" *ngIf=\"fullyCustom\">\n\t<input\n\t\ttype=\"file\"\n\t\t#nativeInputRef\n\t\t(change)=\"onChange($event.target.files)\"\n\t\t[multiple]=\"multiple\"\n\t\t[disabled]=\"disabled\"\n\t/>\n\t<div (click)=\"uploadFileClicked()\">\n\t\t<ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n\t</div>\n</div>\n\n<div class=\"componentContainer\" [ngClass]=\"{fullParentSize: useFullParentSize, showErrors: isInErrorState()}\"\n\t\t *ngIf=\"!fullyCustom\">\n\t<div class=\"buttonContainer\">\n\t\t<input\n\t\t\ttype=\"file\"\n\t\t\t#nativeInputRef\n\t\t\t(change)=\"onChange($event.target.files)\"\n\t\t\t[multiple]=\"multiple\"\n\t\t\t[disabled]=\"disabled\"\n\t\t>\n\t\t<klp-form-button\n\t\t\tclass=\"uploadButton\"\n\t\t\t[isLoading]=\"isLoading\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t(click)=\"uploadFileClicked()\"\n\t\t>\n\t\t\t<div class=\"innerButton\">\n\t\t\t\t<span *ngIf=\"buttonText\">{{ buttonText }}</span>\n\t\t\t\t<div *ngIf=\"!buttonText\">\n\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"tail\">\n\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"getTailTpl()\"></ng-container>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</klp-form-button>\n\t</div>\n\t<div class=\"fileName\" *ngIf=\"!onlyShowUploadButton\">\n\t\t{{ getFileNames() }}\n\t</div>\n\t<klp-form-button class=\"clearButton\" variant=\"white\" *ngIf=\"shouldShowClearButton()\" (click)=\"resetToNull()\">X\n\t</klp-form-button>\n</div>\n\n<ng-template #contentTpl>\n\t<ng-content></ng-content>\n</ng-template>\n", styles: [":host{display:block}:host input:disabled{cursor:not-allowed}.componentContainer{display:flex;align-items:center}.componentContainer.showErrors ::ng-deep button{border-color:#ff8000}.componentContainer.fullParentSize{height:100%;justify-content:center;position:relative}.componentContainer:not(.fullParentSize) .buttonContainer{position:relative}.componentContainer .buttonContainer{flex:0 0 auto}.innerButton{display:flex;align-items:center}.tail{margin-left:.4rem}input{position:absolute;cursor:pointer;opacity:0;inset:0}.fileName{flex:1 1 0px;margin-left:.625rem;color:#515365;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.clearButton{flex:0 0 auto}.fullyCustom input{display:none}\n"] }]
|
|
59
60
|
}], propDecorators: { isLoading: [{
|
|
60
61
|
type: Input
|
|
61
62
|
}], clearable: [{
|
|
@@ -66,8 +67,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
66
67
|
type: Input
|
|
67
68
|
}], buttonText: [{
|
|
68
69
|
type: Input
|
|
70
|
+
}], fullyCustom: [{
|
|
71
|
+
type: Input
|
|
69
72
|
}], nativeInputRef: [{
|
|
70
73
|
type: ViewChild,
|
|
71
74
|
args: ['nativeInputRef']
|
|
72
75
|
}] } });
|
|
73
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
76
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsZS1pbnB1dC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9rbGlwcGEvbmd4LWVuaGFuY3ktZm9ybXMvc3JjL2xpYi9lbGVtZW50cy9maWxlLWlucHV0L2ZpbGUtaW5wdXQuY29tcG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lxuXHQ8bmctY29udGVudD48L25nLWNvbnRlbnQ+XG48L25nLXRlbXBsYXRlPlxuIl19
|
|
@@ -2553,6 +2553,7 @@ class FileInputComponent extends MultipleValueAccessorBase {
|
|
|
2553
2553
|
this.clearable = false;
|
|
2554
2554
|
this.onlyShowUploadButton = false;
|
|
2555
2555
|
this.useFullParentSize = false;
|
|
2556
|
+
this.fullyCustom = false;
|
|
2556
2557
|
}
|
|
2557
2558
|
onChange(files) {
|
|
2558
2559
|
const result = [];
|
|
@@ -2591,11 +2592,11 @@ class FileInputComponent extends MultipleValueAccessorBase {
|
|
|
2591
2592
|
this.nativeInputRef.nativeElement.click();
|
|
2592
2593
|
}
|
|
2593
2594
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: FileInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2594
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: FileInputComponent, selector: "klp-form-file-input", inputs: { isLoading: "isLoading", clearable: "clearable", onlyShowUploadButton: "onlyShowUploadButton", useFullParentSize: "useFullParentSize", buttonText: "buttonText" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: FileInputComponent, multi: true }], viewQueries: [{ propertyName: "nativeInputRef", first: true, predicate: ["nativeInputRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"componentContainer\" [ngClass]=\"{fullParentSize: useFullParentSize, showErrors: isInErrorState()}\">\n\t<div class=\"buttonContainer\">\n\t\t<input\n\t\t\ttype=\"file\"\n\t\t\t#nativeInputRef\n\t\t\t(change)=\"onChange($event.target.files)\"\n\t\t\t[multiple]=\"multiple\"\n\t\t\t[disabled]=\"disabled\"\n\t\t>\n\t\t<klp-form-button
|
|
2595
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: FileInputComponent, selector: "klp-form-file-input", inputs: { isLoading: "isLoading", clearable: "clearable", onlyShowUploadButton: "onlyShowUploadButton", useFullParentSize: "useFullParentSize", buttonText: "buttonText", fullyCustom: "fullyCustom" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: FileInputComponent, multi: true }], viewQueries: [{ propertyName: "nativeInputRef", first: true, predicate: ["nativeInputRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"fullyCustom\" *ngIf=\"fullyCustom\">\n\t<input\n\t\ttype=\"file\"\n\t\t#nativeInputRef\n\t\t(change)=\"onChange($event.target.files)\"\n\t\t[multiple]=\"multiple\"\n\t\t[disabled]=\"disabled\"\n\t/>\n\t<div (click)=\"uploadFileClicked()\">\n\t\t<ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n\t</div>\n</div>\n\n<div class=\"componentContainer\" [ngClass]=\"{fullParentSize: useFullParentSize, showErrors: isInErrorState()}\"\n\t\t *ngIf=\"!fullyCustom\">\n\t<div class=\"buttonContainer\">\n\t\t<input\n\t\t\ttype=\"file\"\n\t\t\t#nativeInputRef\n\t\t\t(change)=\"onChange($event.target.files)\"\n\t\t\t[multiple]=\"multiple\"\n\t\t\t[disabled]=\"disabled\"\n\t\t>\n\t\t<klp-form-button\n\t\t\tclass=\"uploadButton\"\n\t\t\t[isLoading]=\"isLoading\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t(click)=\"uploadFileClicked()\"\n\t\t>\n\t\t\t<div class=\"innerButton\">\n\t\t\t\t<span *ngIf=\"buttonText\">{{ buttonText }}</span>\n\t\t\t\t<div *ngIf=\"!buttonText\">\n\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"tail\">\n\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"getTailTpl()\"></ng-container>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</klp-form-button>\n\t</div>\n\t<div class=\"fileName\" *ngIf=\"!onlyShowUploadButton\">\n\t\t{{ getFileNames() }}\n\t</div>\n\t<klp-form-button class=\"clearButton\" variant=\"white\" *ngIf=\"shouldShowClearButton()\" (click)=\"resetToNull()\">X\n\t</klp-form-button>\n</div>\n\n<ng-template #contentTpl>\n\t<ng-content></ng-content>\n</ng-template>\n", styles: [":host{display:block}:host input:disabled{cursor:not-allowed}.componentContainer{display:flex;align-items:center}.componentContainer.showErrors ::ng-deep button{border-color:#ff8000}.componentContainer.fullParentSize{height:100%;justify-content:center;position:relative}.componentContainer:not(.fullParentSize) .buttonContainer{position:relative}.componentContainer .buttonContainer{flex:0 0 auto}.innerButton{display:flex;align-items:center}.tail{margin-left:.4rem}input{position:absolute;cursor:pointer;opacity:0;inset:0}.fileName{flex:1 1 0px;margin-left:.625rem;color:#515365;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.clearButton{flex:0 0 auto}.fullyCustom input{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "klp-form-button", inputs: ["variant", "size", "fullWidth", "hasBorder", "disabled", "isLoading", "type", "clickCallback"] }] }); }
|
|
2595
2596
|
}
|
|
2596
2597
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: FileInputComponent, decorators: [{
|
|
2597
2598
|
type: Component,
|
|
2598
|
-
args: [{ selector: 'klp-form-file-input', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: FileInputComponent, multi: true }], template: "<div class=\"componentContainer\" [ngClass]=\"{fullParentSize: useFullParentSize, showErrors: isInErrorState()}\">\n\t<div class=\"buttonContainer\">\n\t\t<input\n\t\t\ttype=\"file\"\n\t\t\t#nativeInputRef\n\t\t\t(change)=\"onChange($event.target.files)\"\n\t\t\t[multiple]=\"multiple\"\n\t\t\t[disabled]=\"disabled\"\n\t\t>\n\t\t<klp-form-button
|
|
2599
|
+
args: [{ selector: 'klp-form-file-input', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: FileInputComponent, multi: true }], template: "<div class=\"fullyCustom\" *ngIf=\"fullyCustom\">\n\t<input\n\t\ttype=\"file\"\n\t\t#nativeInputRef\n\t\t(change)=\"onChange($event.target.files)\"\n\t\t[multiple]=\"multiple\"\n\t\t[disabled]=\"disabled\"\n\t/>\n\t<div (click)=\"uploadFileClicked()\">\n\t\t<ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n\t</div>\n</div>\n\n<div class=\"componentContainer\" [ngClass]=\"{fullParentSize: useFullParentSize, showErrors: isInErrorState()}\"\n\t\t *ngIf=\"!fullyCustom\">\n\t<div class=\"buttonContainer\">\n\t\t<input\n\t\t\ttype=\"file\"\n\t\t\t#nativeInputRef\n\t\t\t(change)=\"onChange($event.target.files)\"\n\t\t\t[multiple]=\"multiple\"\n\t\t\t[disabled]=\"disabled\"\n\t\t>\n\t\t<klp-form-button\n\t\t\tclass=\"uploadButton\"\n\t\t\t[isLoading]=\"isLoading\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t(click)=\"uploadFileClicked()\"\n\t\t>\n\t\t\t<div class=\"innerButton\">\n\t\t\t\t<span *ngIf=\"buttonText\">{{ buttonText }}</span>\n\t\t\t\t<div *ngIf=\"!buttonText\">\n\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"tail\">\n\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"getTailTpl()\"></ng-container>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</klp-form-button>\n\t</div>\n\t<div class=\"fileName\" *ngIf=\"!onlyShowUploadButton\">\n\t\t{{ getFileNames() }}\n\t</div>\n\t<klp-form-button class=\"clearButton\" variant=\"white\" *ngIf=\"shouldShowClearButton()\" (click)=\"resetToNull()\">X\n\t</klp-form-button>\n</div>\n\n<ng-template #contentTpl>\n\t<ng-content></ng-content>\n</ng-template>\n", styles: [":host{display:block}:host input:disabled{cursor:not-allowed}.componentContainer{display:flex;align-items:center}.componentContainer.showErrors ::ng-deep button{border-color:#ff8000}.componentContainer.fullParentSize{height:100%;justify-content:center;position:relative}.componentContainer:not(.fullParentSize) .buttonContainer{position:relative}.componentContainer .buttonContainer{flex:0 0 auto}.innerButton{display:flex;align-items:center}.tail{margin-left:.4rem}input{position:absolute;cursor:pointer;opacity:0;inset:0}.fileName{flex:1 1 0px;margin-left:.625rem;color:#515365;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.clearButton{flex:0 0 auto}.fullyCustom input{display:none}\n"] }]
|
|
2599
2600
|
}], propDecorators: { isLoading: [{
|
|
2600
2601
|
type: Input
|
|
2601
2602
|
}], clearable: [{
|
|
@@ -2606,6 +2607,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
2606
2607
|
type: Input
|
|
2607
2608
|
}], buttonText: [{
|
|
2608
2609
|
type: Input
|
|
2610
|
+
}], fullyCustom: [{
|
|
2611
|
+
type: Input
|
|
2609
2612
|
}], nativeInputRef: [{
|
|
2610
2613
|
type: ViewChild,
|
|
2611
2614
|
args: ['nativeInputRef']
|