@acpaas-ui/ngx-forms 4.4.0 → 4.6.3
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/acpaas-ui-ngx-forms.metadata.json +1 -1
- package/bundles/acpaas-ui-ngx-forms.umd.js +91 -18
- package/bundles/acpaas-ui-ngx-forms.umd.js.map +1 -1
- package/bundles/acpaas-ui-ngx-forms.umd.min.js +1 -1
- package/bundles/acpaas-ui-ngx-forms.umd.min.js.map +1 -1
- package/esm2015/lib/datepicker/components/datepicker/datepicker.component.js +16 -5
- package/esm2015/lib/upload/components/upload/upload.component.js +10 -2
- package/esm2015/lib/upload/components/upload-zone/upload-zone.component.js +44 -4
- package/esm5/lib/datepicker/components/datepicker/datepicker.component.js +21 -5
- package/esm5/lib/upload/components/upload/upload.component.js +10 -2
- package/esm5/lib/upload/components/upload-zone/upload-zone.component.js +48 -4
- package/fesm2015/acpaas-ui-ngx-forms.js +66 -7
- package/fesm2015/acpaas-ui-ngx-forms.js.map +1 -1
- package/fesm5/acpaas-ui-ngx-forms.js +75 -7
- package/fesm5/acpaas-ui-ngx-forms.js.map +1 -1
- package/lib/datepicker/components/datepicker/datepicker.component.d.ts +2 -1
- package/lib/upload/components/upload/upload.component.d.ts +2 -0
- package/lib/upload/components/upload-zone/upload-zone.component.d.ts +7 -2
- package/package.json +6 -6
|
@@ -811,11 +811,11 @@ var DatepickerComponent = /** @class */ (function () {
|
|
|
811
811
|
* @return {?}
|
|
812
812
|
*/
|
|
813
813
|
function (value) {
|
|
814
|
+
this.selectedDate = typeof value === 'string'
|
|
815
|
+
? this.isISODateFormat(value) ? new Date(value) : DateHelper.parseDate(value, 'DD/MM/YYYY', true)
|
|
816
|
+
: value;
|
|
814
817
|
/** @type {?} */
|
|
815
|
-
var
|
|
816
|
-
/** @type {?} */
|
|
817
|
-
var dateString = date ? this.formatDate(date) : '';
|
|
818
|
-
this.selectedDate = date;
|
|
818
|
+
var dateString = this.selectedDate ? this.formatDate(this.selectedDate) : '';
|
|
819
819
|
this.formControl.setValue(dateString);
|
|
820
820
|
};
|
|
821
821
|
/**
|
|
@@ -933,6 +933,22 @@ var DatepickerComponent = /** @class */ (function () {
|
|
|
933
933
|
this.blur.emit(e);
|
|
934
934
|
this.onTouched(e);
|
|
935
935
|
};
|
|
936
|
+
/**
|
|
937
|
+
* @private
|
|
938
|
+
* @param {?} value
|
|
939
|
+
* @return {?}
|
|
940
|
+
*/
|
|
941
|
+
DatepickerComponent.prototype.isISODateFormat = /**
|
|
942
|
+
* @private
|
|
943
|
+
* @param {?} value
|
|
944
|
+
* @return {?}
|
|
945
|
+
*/
|
|
946
|
+
function (value) {
|
|
947
|
+
if (typeof value !== 'string') {
|
|
948
|
+
return false;
|
|
949
|
+
}
|
|
950
|
+
return value.match(/\d{4}-\d{2}-\d{2}T.*/);
|
|
951
|
+
};
|
|
936
952
|
DatepickerComponent.decorators = [
|
|
937
953
|
{ type: Component, args: [{
|
|
938
954
|
selector: 'aui-datepicker',
|
|
@@ -2616,8 +2632,10 @@ if (false) {
|
|
|
2616
2632
|
var UploadComponent = /** @class */ (function () {
|
|
2617
2633
|
function UploadComponent() {
|
|
2618
2634
|
this.id = '';
|
|
2635
|
+
this.accept = [];
|
|
2619
2636
|
this.ariaLabelRemove = 'Verwijder';
|
|
2620
2637
|
this.disabled = false;
|
|
2638
|
+
this.multiple = true;
|
|
2621
2639
|
this.options = UPLOAD_OPTIONS_DEFAULT;
|
|
2622
2640
|
this.selectUploadedFiles = new EventEmitter();
|
|
2623
2641
|
this.uploadedFiles = [];
|
|
@@ -2673,14 +2691,16 @@ var UploadComponent = /** @class */ (function () {
|
|
|
2673
2691
|
UploadComponent.decorators = [
|
|
2674
2692
|
{ type: Component, args: [{
|
|
2675
2693
|
selector: 'aui-upload',
|
|
2676
|
-
template: "<div class=\"m-upload aui-upload\">\n <aui-upload-zone (invalidFiles)=\"onInvalidFiles($event)\" (queuedFiles)=\"onQueuedFiles($event)\" (uploadedFiles)=\"onUploadedFiles($event)\" [ariaId]=\"ariaId\"\n [disabled]=\"disabled\" [id]=\"id\"\n [uploader]=\"uploader\">\n <div class=\"m-upload__message\">\n <ng-content select=\".m-upload__message\"></ng-content>\n </div>\n <div class=\"m-upload__description\">\n <ng-content select=\".m-upload__description\"></ng-content>\n </div>\n <div class=\"m-upload__button\">\n <ng-content select=\".m-upload__button\"></ng-content>\n </div>\n </aui-upload-zone>\n <aui-validation-list [ariaLabelRemove]=\"ariaLabelRemove\" [invalidFiles]=\"invalidFiles\"></aui-validation-list>\n <aui-upload-queue (uploadedFiles)=\"onUploadedFiles($event)\" *ngIf=\"!options?.autoUpload\" [ariaLabelRemove]=\"ariaLabelRemove\"\n [files]=\"queuedFiles\" [uploader]=\"uploader\"></aui-upload-queue>\n</div>\n",
|
|
2694
|
+
template: "<div class=\"m-upload aui-upload\">\n <aui-upload-zone (invalidFiles)=\"onInvalidFiles($event)\" (queuedFiles)=\"onQueuedFiles($event)\" (uploadedFiles)=\"onUploadedFiles($event)\" [ariaId]=\"ariaId\"\n [disabled]=\"disabled\" [id]=\"id\" [accept]=\"accept\" [multiple]=\"multiple\"\n [uploader]=\"uploader\">\n <div class=\"m-upload__message\">\n <ng-content select=\".m-upload__message\"></ng-content>\n </div>\n <div class=\"m-upload__description\">\n <ng-content select=\".m-upload__description\"></ng-content>\n </div>\n <div class=\"m-upload__button\">\n <ng-content select=\".m-upload__button\"></ng-content>\n </div>\n </aui-upload-zone>\n <aui-validation-list [ariaLabelRemove]=\"ariaLabelRemove\" [invalidFiles]=\"invalidFiles\"></aui-validation-list>\n <aui-upload-queue (uploadedFiles)=\"onUploadedFiles($event)\" *ngIf=\"!options?.autoUpload\" [ariaLabelRemove]=\"ariaLabelRemove\"\n [files]=\"queuedFiles\" [uploader]=\"uploader\"></aui-upload-queue>\n</div>\n",
|
|
2677
2695
|
styles: [".m-upload__button>.m-upload__input{display:none}"]
|
|
2678
2696
|
}] }
|
|
2679
2697
|
];
|
|
2680
2698
|
UploadComponent.propDecorators = {
|
|
2681
2699
|
id: [{ type: Input }],
|
|
2700
|
+
accept: [{ type: Input }],
|
|
2682
2701
|
ariaLabelRemove: [{ type: Input }],
|
|
2683
2702
|
disabled: [{ type: Input }],
|
|
2703
|
+
multiple: [{ type: Input }],
|
|
2684
2704
|
options: [{ type: Input }],
|
|
2685
2705
|
selectUploadedFiles: [{ type: Output }]
|
|
2686
2706
|
};
|
|
@@ -2690,10 +2710,14 @@ if (false) {
|
|
|
2690
2710
|
/** @type {?} */
|
|
2691
2711
|
UploadComponent.prototype.id;
|
|
2692
2712
|
/** @type {?} */
|
|
2713
|
+
UploadComponent.prototype.accept;
|
|
2714
|
+
/** @type {?} */
|
|
2693
2715
|
UploadComponent.prototype.ariaLabelRemove;
|
|
2694
2716
|
/** @type {?} */
|
|
2695
2717
|
UploadComponent.prototype.disabled;
|
|
2696
2718
|
/** @type {?} */
|
|
2719
|
+
UploadComponent.prototype.multiple;
|
|
2720
|
+
/** @type {?} */
|
|
2697
2721
|
UploadComponent.prototype.options;
|
|
2698
2722
|
/** @type {?} */
|
|
2699
2723
|
UploadComponent.prototype.selectUploadedFiles;
|
|
@@ -2871,11 +2895,13 @@ if (false) {
|
|
|
2871
2895
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2872
2896
|
*/
|
|
2873
2897
|
var UploadZoneComponent = /** @class */ (function () {
|
|
2874
|
-
function UploadZoneComponent() {
|
|
2898
|
+
function UploadZoneComponent(renderer) {
|
|
2899
|
+
this.renderer = renderer;
|
|
2875
2900
|
this.disabled = false;
|
|
2876
2901
|
this.multiple = true;
|
|
2877
2902
|
this.id = '';
|
|
2878
2903
|
this.ariaId = '';
|
|
2904
|
+
this.accept = [];
|
|
2879
2905
|
this.uploadedFiles = new EventEmitter();
|
|
2880
2906
|
this.queuedFiles = new EventEmitter();
|
|
2881
2907
|
this.invalidFiles = new EventEmitter();
|
|
@@ -2941,6 +2967,36 @@ var UploadZoneComponent = /** @class */ (function () {
|
|
|
2941
2967
|
var files = this.fileListToArray(this.fileInput.nativeElement.files);
|
|
2942
2968
|
this.handleFiles(files);
|
|
2943
2969
|
};
|
|
2970
|
+
/**
|
|
2971
|
+
* @param {?} event
|
|
2972
|
+
* @return {?}
|
|
2973
|
+
*/
|
|
2974
|
+
UploadZoneComponent.prototype.onFileClick = /**
|
|
2975
|
+
* @param {?} event
|
|
2976
|
+
* @return {?}
|
|
2977
|
+
*/
|
|
2978
|
+
function (event) {
|
|
2979
|
+
// When removing a file make sure you can add it again later
|
|
2980
|
+
// See: https://stackoverflow.com/questions/59870335/ng2-file-upload-not-allowing-me-to-add-same-doc-after-ive-removed-it-from-que
|
|
2981
|
+
event.target.value = '';
|
|
2982
|
+
};
|
|
2983
|
+
/**
|
|
2984
|
+
* @return {?}
|
|
2985
|
+
*/
|
|
2986
|
+
UploadZoneComponent.prototype.ngAfterViewInit = /**
|
|
2987
|
+
* @return {?}
|
|
2988
|
+
*/
|
|
2989
|
+
function () {
|
|
2990
|
+
if (this.multiple !== false) {
|
|
2991
|
+
this.renderer.setProperty(this.fileInput.nativeElement, 'multiple', 'multiple');
|
|
2992
|
+
}
|
|
2993
|
+
if (this.accept) {
|
|
2994
|
+
this.renderer.setProperty(this.fileInput.nativeElement, 'accept', this.accept.join());
|
|
2995
|
+
}
|
|
2996
|
+
if (this.disabled) {
|
|
2997
|
+
this.renderer.setProperty(this.fileInput.nativeElement, 'disabled', 'disabled');
|
|
2998
|
+
}
|
|
2999
|
+
};
|
|
2944
3000
|
/**
|
|
2945
3001
|
* @protected
|
|
2946
3002
|
* @param {?} files
|
|
@@ -3027,9 +3083,13 @@ var UploadZoneComponent = /** @class */ (function () {
|
|
|
3027
3083
|
UploadZoneComponent.decorators = [
|
|
3028
3084
|
{ type: Component, args: [{
|
|
3029
3085
|
selector: 'aui-upload-zone',
|
|
3030
|
-
template: "<div *ngIf=\"uploader.options.type === 'drop'\" [class.is-disabled]=\"disabled\" class=\"m-upload\">\n <div class=\"m-upload__inner\">\n <div class=\"m-upload__dropzone\">\n <input
|
|
3086
|
+
template: "<div *ngIf=\"uploader.options.type === 'drop'\" [class.is-disabled]=\"disabled\" class=\"m-upload\">\n <div class=\"m-upload__inner\">\n <div class=\"m-upload__dropzone\">\n\n <input\n #fileInput\n type=\"file\"\n class=\"m-upload__input\"\n [id]=\"id\"\n [attr.aria-labelledby]=\"ariaId\"\n (change)=\"updateFiles()\"\n (click)=\"onFileClick($event)\">\n\n <div *ngIf=\"!uploadProgress || uploadProgress === 0\" class=\"m-upload__content\">\n <p [id]=\"ariaId\" class=\"m-upload__message\">\n <ng-content select=\".m-upload__message\"></ng-content>\n </p>\n </div>\n\n <ng-container *ngIf=\"uploadProgress > 0\">\n <p class=\"m-upload__uploads u-text-bold u-margin-bottom-xs\">\n <ng-container *ngFor=\"let file of uploadingFiles; let last = last\">\n {{ file.name }}\n <ng-container *ngIf=\"!last\">,</ng-container>\n </ng-container>\n </p>\n <aui-progress-bar [value]=\"uploadProgress\" max=\"100\"></aui-progress-bar>\n </ng-container>\n </div>\n </div>\n\n <small class=\"m-upload__description\">\n <ng-content select=\".m-upload__description\"></ng-content>\n </small>\n</div>\n\n<button (click)=\"triggerFile()\" *ngIf=\"uploader.options.type === 'button'\" [disabled]=\"disabled\" class=\"a-button m-upload__button\"\n type=\"button\">\n <span [id]=\"ariaId\"><ng-content select=\".m-upload__button\"></ng-content></span>\n <input\n #fileInput\n type=\"file\"\n class=\"m-upload__input\"\n [id]=\"id\"\n [attr.aria-labelledby]=\"ariaId\"\n (change)=\"updateFiles()\"\n (click)=\"onFileClick($event)\">\n</button>\n"
|
|
3031
3087
|
}] }
|
|
3032
3088
|
];
|
|
3089
|
+
/** @nocollapse */
|
|
3090
|
+
UploadZoneComponent.ctorParameters = function () { return [
|
|
3091
|
+
{ type: Renderer2 }
|
|
3092
|
+
]; };
|
|
3033
3093
|
UploadZoneComponent.propDecorators = {
|
|
3034
3094
|
fileInput: [{ type: ViewChild, args: ['fileInput', { static: false },] }],
|
|
3035
3095
|
uploader: [{ type: Input }],
|
|
@@ -3037,6 +3097,7 @@ var UploadZoneComponent = /** @class */ (function () {
|
|
|
3037
3097
|
multiple: [{ type: Input }],
|
|
3038
3098
|
id: [{ type: Input }],
|
|
3039
3099
|
ariaId: [{ type: Input }],
|
|
3100
|
+
accept: [{ type: Input }],
|
|
3040
3101
|
uploadedFiles: [{ type: Output }],
|
|
3041
3102
|
queuedFiles: [{ type: Output }],
|
|
3042
3103
|
invalidFiles: [{ type: Output }],
|
|
@@ -3060,6 +3121,8 @@ if (false) {
|
|
|
3060
3121
|
/** @type {?} */
|
|
3061
3122
|
UploadZoneComponent.prototype.ariaId;
|
|
3062
3123
|
/** @type {?} */
|
|
3124
|
+
UploadZoneComponent.prototype.accept;
|
|
3125
|
+
/** @type {?} */
|
|
3063
3126
|
UploadZoneComponent.prototype.uploadedFiles;
|
|
3064
3127
|
/** @type {?} */
|
|
3065
3128
|
UploadZoneComponent.prototype.queuedFiles;
|
|
@@ -3073,6 +3136,11 @@ if (false) {
|
|
|
3073
3136
|
UploadZoneComponent.prototype.uploadProgress;
|
|
3074
3137
|
/** @type {?} */
|
|
3075
3138
|
UploadZoneComponent.prototype.uploadingFiles;
|
|
3139
|
+
/**
|
|
3140
|
+
* @type {?}
|
|
3141
|
+
* @private
|
|
3142
|
+
*/
|
|
3143
|
+
UploadZoneComponent.prototype.renderer;
|
|
3076
3144
|
}
|
|
3077
3145
|
|
|
3078
3146
|
/**
|