@acpaas-ui/ngx-forms 5.0.1 → 5.2.0
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 +68 -12
- 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/auto-complete/components/auto-complete/auto-complete.component.js +6 -2
- package/esm2015/lib/upload/components/upload/upload.component.js +10 -2
- package/esm2015/lib/upload/components/upload-zone/upload-zone.component.js +52 -12
- package/esm5/lib/auto-complete/components/auto-complete/auto-complete.component.js +6 -2
- package/esm5/lib/upload/components/upload/upload.component.js +10 -2
- package/esm5/lib/upload/components/upload-zone/upload-zone.component.js +56 -12
- package/fesm2015/acpaas-ui-ngx-forms.js +64 -12
- package/fesm2015/acpaas-ui-ngx-forms.js.map +1 -1
- package/fesm5/acpaas-ui-ngx-forms.js +68 -12
- package/fesm5/acpaas-ui-ngx-forms.js.map +1 -1
- package/lib/auto-complete/components/auto-complete/auto-complete.component.d.ts +1 -0
- package/lib/upload/components/upload/upload.component.d.ts +2 -0
- package/lib/upload/components/upload-zone/upload-zone.component.d.ts +9 -4
- package/package.json +3 -3
|
@@ -179,6 +179,7 @@ var AutoCompleteComponent = /** @class */ (function () {
|
|
|
179
179
|
this.mask = null;
|
|
180
180
|
this.clearInvalid = false;
|
|
181
181
|
this.showAllByDefault = false;
|
|
182
|
+
this.autoComplete = 'off';
|
|
182
183
|
// Eventemitter for searchvalue (parent object should update the results with this param)
|
|
183
184
|
this.search = new EventEmitter();
|
|
184
185
|
this.select = new EventEmitter();
|
|
@@ -542,7 +543,7 @@ var AutoCompleteComponent = /** @class */ (function () {
|
|
|
542
543
|
AutoCompleteComponent.decorators = [
|
|
543
544
|
{ type: Component, args: [{
|
|
544
545
|
selector: 'aui-auto-complete',
|
|
545
|
-
template: "<div (closed)=\"onFlyoutClosed()\" [toggleClick]=\"false\" aria-haspopup=\"listbox\"\n auiFlyout class=\"m-flyout--scrollable m-flyout--full o-auto-complete\">\n <input (focus)=\"onFocus()\"\n (keyArrowDown)=\"onKeyArrowDown()\"\n (keyArrowUp)=\"onKeyArrowUp()\"\n (keyEnter)=\"onKeyEnter($event)\"\n (keyEscape)=\"onKeyEscape()\"\n [(ngModel)]=\"query\"\n (ngModelChange)=\"doSearch()\"\n *ngIf=\"!mask\"\n [disabled]=\"isDisabled ? true : null\"\n [id]=\"id\"\n [placeholder]=\"placeholder\"\n aria-autocomplete=\"list\"\n auiFlyoutAction\n auiSelectableActions\n autocomplete=\"
|
|
546
|
+
template: "<div (closed)=\"onFlyoutClosed()\" [toggleClick]=\"false\" aria-haspopup=\"listbox\"\n auiFlyout class=\"m-flyout--scrollable m-flyout--full o-auto-complete\">\n <input (focus)=\"onFocus()\"\n (keyArrowDown)=\"onKeyArrowDown()\"\n (keyArrowUp)=\"onKeyArrowUp()\"\n (keyEnter)=\"onKeyEnter($event)\"\n (keyEscape)=\"onKeyEscape()\"\n [(ngModel)]=\"query\"\n (ngModelChange)=\"doSearch()\"\n *ngIf=\"!mask\"\n [disabled]=\"isDisabled ? true : null\"\n [id]=\"id\"\n [placeholder]=\"placeholder\"\n aria-autocomplete=\"list\"\n auiFlyoutAction\n auiSelectableActions\n [autocomplete]=\"autoComplete\"\n type=\"text\"\n />\n <input (focus)=\"onFocus()\"\n (keyArrowDown)=\"onKeyArrowDown()\"\n (keyArrowUp)=\"onKeyArrowUp()\"\n (keyEnter)=\"onKeyEnter($event)\"\n (keyEscape)=\"onKeyEscape()\"\n [(ngModel)]=\"query\"\n (ngModelChange)=\"doSearch()\"\n *ngIf=\"mask\"\n [auiMask]=\"mask\"\n [disabled]=\"isDisabled ? true : null\"\n [id]=\"id\"\n [placeholder]=\"placeholder\"\n aria-autocomplete=\"list\"\n auiFlyoutAction\n auiSelectableActions\n [autocomplete]=\"autoComplete\"\n type=\"text\"\n />\n\n <div *ngIf=\"!isDisabled\" auiFlyoutZone>\n\t\t<span *ngIf=\"focused && loadingText && searching\" class=\"o-auto-complete__info u-text-light u-margin-xs\">\n\t\t\t<span class=\"a-spinner a-spinner--inline a-spinner--sm u-margin-right-xs\"></span>\n {{ loadingText }}\n\t\t</span>\n <span *ngIf=\"focused && searchIncentiveText && !searching && !query && !results.length\"\n class=\"o-auto-complete__info u-text-light u-margin-xs\">{{ searchIncentiveText }}</span>\n <span *ngIf=\"focused && noResultsText && !searching && query && !results.length\"\n class=\"o-auto-complete__info u-text-light u-margin-xs\">{{ noResultsText }}</span>\n\n <aui-selectable-list (selected)=\"onSelect($event)\" *ngIf=\"results.length > 0 && !(focused && loadingText && searching)\" [index]=\"index\" [itemTemplate]=\"template\"\n [items]=\"results\" [label]=\"label\"\n [search]=\"query\"></aui-selectable-list>\n </div>\n</div>\n",
|
|
546
547
|
providers: [
|
|
547
548
|
{
|
|
548
549
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -575,6 +576,7 @@ var AutoCompleteComponent = /** @class */ (function () {
|
|
|
575
576
|
loadingText: [{ type: Input }],
|
|
576
577
|
noResultsText: [{ type: Input }],
|
|
577
578
|
showAllByDefault: [{ type: Input }],
|
|
579
|
+
autoComplete: [{ type: Input }],
|
|
578
580
|
label: [{ type: Input }],
|
|
579
581
|
value: [{ type: Input }],
|
|
580
582
|
search: [{ type: Output }],
|
|
@@ -611,6 +613,8 @@ if (false) {
|
|
|
611
613
|
/** @type {?} */
|
|
612
614
|
AutoCompleteComponent.prototype.showAllByDefault;
|
|
613
615
|
/** @type {?} */
|
|
616
|
+
AutoCompleteComponent.prototype.autoComplete;
|
|
617
|
+
/** @type {?} */
|
|
614
618
|
AutoCompleteComponent.prototype.label;
|
|
615
619
|
/** @type {?} */
|
|
616
620
|
AutoCompleteComponent.prototype.value;
|
|
@@ -2636,8 +2640,10 @@ if (false) {
|
|
|
2636
2640
|
var UploadComponent = /** @class */ (function () {
|
|
2637
2641
|
function UploadComponent() {
|
|
2638
2642
|
this.id = '';
|
|
2643
|
+
this.accept = [];
|
|
2639
2644
|
this.ariaLabelRemove = 'Verwijder';
|
|
2640
2645
|
this.disabled = false;
|
|
2646
|
+
this.multiple = true;
|
|
2641
2647
|
this.options = UPLOAD_OPTIONS_DEFAULT;
|
|
2642
2648
|
this.selectUploadedFiles = new EventEmitter();
|
|
2643
2649
|
this.uploadedFiles = [];
|
|
@@ -2693,14 +2699,16 @@ var UploadComponent = /** @class */ (function () {
|
|
|
2693
2699
|
UploadComponent.decorators = [
|
|
2694
2700
|
{ type: Component, args: [{
|
|
2695
2701
|
selector: 'aui-upload',
|
|
2696
|
-
template: "<div class=\"m-upload aui-upload\">\n <aui-upload-zone
|
|
2702
|
+
template: "<div class=\"m-upload aui-upload\">\n <aui-upload-zone\n [id]=\"id\"\n [accept]=\"accept\"\n [ariaId]=\"ariaId\"\n [disabled]=\"disabled\"\n [multiple]=\"multiple\"\n [uploader]=\"uploader\"\n (invalidFiles)=\"onInvalidFiles($event)\"\n (queuedFiles)=\"onQueuedFiles($event)\"\n (uploadedFiles)=\"onUploadedFiles($event)\">\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",
|
|
2697
2703
|
styles: [".m-upload__button>.m-upload__input{display:none}"]
|
|
2698
2704
|
}] }
|
|
2699
2705
|
];
|
|
2700
2706
|
UploadComponent.propDecorators = {
|
|
2701
2707
|
id: [{ type: Input }],
|
|
2708
|
+
accept: [{ type: Input }],
|
|
2702
2709
|
ariaLabelRemove: [{ type: Input }],
|
|
2703
2710
|
disabled: [{ type: Input }],
|
|
2711
|
+
multiple: [{ type: Input }],
|
|
2704
2712
|
options: [{ type: Input }],
|
|
2705
2713
|
selectUploadedFiles: [{ type: Output }]
|
|
2706
2714
|
};
|
|
@@ -2710,10 +2718,14 @@ if (false) {
|
|
|
2710
2718
|
/** @type {?} */
|
|
2711
2719
|
UploadComponent.prototype.id;
|
|
2712
2720
|
/** @type {?} */
|
|
2721
|
+
UploadComponent.prototype.accept;
|
|
2722
|
+
/** @type {?} */
|
|
2713
2723
|
UploadComponent.prototype.ariaLabelRemove;
|
|
2714
2724
|
/** @type {?} */
|
|
2715
2725
|
UploadComponent.prototype.disabled;
|
|
2716
2726
|
/** @type {?} */
|
|
2727
|
+
UploadComponent.prototype.multiple;
|
|
2728
|
+
/** @type {?} */
|
|
2717
2729
|
UploadComponent.prototype.options;
|
|
2718
2730
|
/** @type {?} */
|
|
2719
2731
|
UploadComponent.prototype.selectUploadedFiles;
|
|
@@ -2891,11 +2903,13 @@ if (false) {
|
|
|
2891
2903
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2892
2904
|
*/
|
|
2893
2905
|
var UploadZoneComponent = /** @class */ (function () {
|
|
2894
|
-
function UploadZoneComponent() {
|
|
2895
|
-
this.
|
|
2896
|
-
this.multiple = true;
|
|
2906
|
+
function UploadZoneComponent(renderer) {
|
|
2907
|
+
this.renderer = renderer;
|
|
2897
2908
|
this.id = '';
|
|
2909
|
+
this.accept = [];
|
|
2898
2910
|
this.ariaId = '';
|
|
2911
|
+
this.disabled = false;
|
|
2912
|
+
this.multiple = true;
|
|
2899
2913
|
this.uploadedFiles = new EventEmitter();
|
|
2900
2914
|
this.queuedFiles = new EventEmitter();
|
|
2901
2915
|
this.invalidFiles = new EventEmitter();
|
|
@@ -2961,6 +2975,36 @@ var UploadZoneComponent = /** @class */ (function () {
|
|
|
2961
2975
|
var files = this.fileListToArray(this.fileInput.nativeElement.files);
|
|
2962
2976
|
this.handleFiles(files);
|
|
2963
2977
|
};
|
|
2978
|
+
/**
|
|
2979
|
+
* @param {?} event
|
|
2980
|
+
* @return {?}
|
|
2981
|
+
*/
|
|
2982
|
+
UploadZoneComponent.prototype.onFileClick = /**
|
|
2983
|
+
* @param {?} event
|
|
2984
|
+
* @return {?}
|
|
2985
|
+
*/
|
|
2986
|
+
function (event) {
|
|
2987
|
+
// When removing a file make sure you can add it again later
|
|
2988
|
+
// See: https://stackoverflow.com/questions/59870335/ng2-file-upload-not-allowing-me-to-add-same-doc-after-ive-removed-it-from-que
|
|
2989
|
+
event.target.value = '';
|
|
2990
|
+
};
|
|
2991
|
+
/**
|
|
2992
|
+
* @return {?}
|
|
2993
|
+
*/
|
|
2994
|
+
UploadZoneComponent.prototype.ngAfterViewInit = /**
|
|
2995
|
+
* @return {?}
|
|
2996
|
+
*/
|
|
2997
|
+
function () {
|
|
2998
|
+
if (this.multiple !== false) {
|
|
2999
|
+
this.renderer.setProperty(this.fileInput.nativeElement, 'multiple', 'multiple');
|
|
3000
|
+
}
|
|
3001
|
+
if (this.accept) {
|
|
3002
|
+
this.renderer.setProperty(this.fileInput.nativeElement, 'accept', this.accept.join());
|
|
3003
|
+
}
|
|
3004
|
+
if (this.disabled) {
|
|
3005
|
+
this.renderer.setProperty(this.fileInput.nativeElement, 'disabled', 'disabled');
|
|
3006
|
+
}
|
|
3007
|
+
};
|
|
2964
3008
|
/**
|
|
2965
3009
|
* @protected
|
|
2966
3010
|
* @param {?} files
|
|
@@ -3047,16 +3091,21 @@ var UploadZoneComponent = /** @class */ (function () {
|
|
|
3047
3091
|
UploadZoneComponent.decorators = [
|
|
3048
3092
|
{ type: Component, args: [{
|
|
3049
3093
|
selector: 'aui-upload-zone',
|
|
3050
|
-
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
|
|
3094
|
+
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\n #fileInput\n type=\"file\"\n class=\"m-upload__input\"\n [id]=\"id\"\n [attr.aria-labelledby]=\"ariaId\"\n (click)=\"onFileClick($event)\"\n (change)=\"updateFiles()\">\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 (click)=\"onFileClick($event)\"\n (change)=\"updateFiles()\">\n</button>\n"
|
|
3051
3095
|
}] }
|
|
3052
3096
|
];
|
|
3097
|
+
/** @nocollapse */
|
|
3098
|
+
UploadZoneComponent.ctorParameters = function () { return [
|
|
3099
|
+
{ type: Renderer2 }
|
|
3100
|
+
]; };
|
|
3053
3101
|
UploadZoneComponent.propDecorators = {
|
|
3054
3102
|
fileInput: [{ type: ViewChild, args: ['fileInput', { static: false },] }],
|
|
3055
3103
|
uploader: [{ type: Input }],
|
|
3056
|
-
disabled: [{ type: Input }],
|
|
3057
|
-
multiple: [{ type: Input }],
|
|
3058
3104
|
id: [{ type: Input }],
|
|
3105
|
+
accept: [{ type: Input }],
|
|
3059
3106
|
ariaId: [{ type: Input }],
|
|
3107
|
+
disabled: [{ type: Input }],
|
|
3108
|
+
multiple: [{ type: Input }],
|
|
3060
3109
|
uploadedFiles: [{ type: Output }],
|
|
3061
3110
|
queuedFiles: [{ type: Output }],
|
|
3062
3111
|
invalidFiles: [{ type: Output }],
|
|
@@ -3072,14 +3121,16 @@ if (false) {
|
|
|
3072
3121
|
/** @type {?} */
|
|
3073
3122
|
UploadZoneComponent.prototype.uploader;
|
|
3074
3123
|
/** @type {?} */
|
|
3075
|
-
UploadZoneComponent.prototype.disabled;
|
|
3076
|
-
/** @type {?} */
|
|
3077
|
-
UploadZoneComponent.prototype.multiple;
|
|
3078
|
-
/** @type {?} */
|
|
3079
3124
|
UploadZoneComponent.prototype.id;
|
|
3080
3125
|
/** @type {?} */
|
|
3126
|
+
UploadZoneComponent.prototype.accept;
|
|
3127
|
+
/** @type {?} */
|
|
3081
3128
|
UploadZoneComponent.prototype.ariaId;
|
|
3082
3129
|
/** @type {?} */
|
|
3130
|
+
UploadZoneComponent.prototype.disabled;
|
|
3131
|
+
/** @type {?} */
|
|
3132
|
+
UploadZoneComponent.prototype.multiple;
|
|
3133
|
+
/** @type {?} */
|
|
3083
3134
|
UploadZoneComponent.prototype.uploadedFiles;
|
|
3084
3135
|
/** @type {?} */
|
|
3085
3136
|
UploadZoneComponent.prototype.queuedFiles;
|
|
@@ -3093,6 +3144,11 @@ if (false) {
|
|
|
3093
3144
|
UploadZoneComponent.prototype.uploadProgress;
|
|
3094
3145
|
/** @type {?} */
|
|
3095
3146
|
UploadZoneComponent.prototype.uploadingFiles;
|
|
3147
|
+
/**
|
|
3148
|
+
* @type {?}
|
|
3149
|
+
* @private
|
|
3150
|
+
*/
|
|
3151
|
+
UploadZoneComponent.prototype.renderer;
|
|
3096
3152
|
}
|
|
3097
3153
|
|
|
3098
3154
|
/**
|