@acpaas-ui/ngx-forms 4.6.1 → 4.7.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.
@@ -389,6 +389,7 @@
389
389
  this.mask = null;
390
390
  this.clearInvalid = false;
391
391
  this.showAllByDefault = false;
392
+ this.autoComplete = 'off';
392
393
  // Eventemitter for searchvalue (parent object should update the results with this param)
393
394
  this.search = new core.EventEmitter();
394
395
  this.select = new core.EventEmitter();
@@ -752,7 +753,7 @@
752
753
  AutoCompleteComponent.decorators = [
753
754
  { type: core.Component, args: [{
754
755
  selector: 'aui-auto-complete',
755
- 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=\"off\"\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=\"off\"\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",
756
+ 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",
756
757
  providers: [
757
758
  {
758
759
  provide: forms.NG_VALUE_ACCESSOR,
@@ -785,6 +786,7 @@
785
786
  loadingText: [{ type: core.Input }],
786
787
  noResultsText: [{ type: core.Input }],
787
788
  showAllByDefault: [{ type: core.Input }],
789
+ autoComplete: [{ type: core.Input }],
788
790
  label: [{ type: core.Input }],
789
791
  value: [{ type: core.Input }],
790
792
  search: [{ type: core.Output }],
@@ -821,6 +823,8 @@
821
823
  /** @type {?} */
822
824
  AutoCompleteComponent.prototype.showAllByDefault;
823
825
  /** @type {?} */
826
+ AutoCompleteComponent.prototype.autoComplete;
827
+ /** @type {?} */
824
828
  AutoCompleteComponent.prototype.label;
825
829
  /** @type {?} */
826
830
  AutoCompleteComponent.prototype.value;
@@ -2843,8 +2847,10 @@
2843
2847
  var UploadComponent = /** @class */ (function () {
2844
2848
  function UploadComponent() {
2845
2849
  this.id = '';
2850
+ this.accept = [];
2846
2851
  this.ariaLabelRemove = 'Verwijder';
2847
2852
  this.disabled = false;
2853
+ this.multiple = true;
2848
2854
  this.options = UPLOAD_OPTIONS_DEFAULT;
2849
2855
  this.selectUploadedFiles = new core.EventEmitter();
2850
2856
  this.uploadedFiles = [];
@@ -2900,14 +2906,16 @@
2900
2906
  UploadComponent.decorators = [
2901
2907
  { type: core.Component, args: [{
2902
2908
  selector: 'aui-upload',
2903
- 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",
2909
+ 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",
2904
2910
  styles: [".m-upload__button>.m-upload__input{display:none}"]
2905
2911
  }] }
2906
2912
  ];
2907
2913
  UploadComponent.propDecorators = {
2908
2914
  id: [{ type: core.Input }],
2915
+ accept: [{ type: core.Input }],
2909
2916
  ariaLabelRemove: [{ type: core.Input }],
2910
2917
  disabled: [{ type: core.Input }],
2918
+ multiple: [{ type: core.Input }],
2911
2919
  options: [{ type: core.Input }],
2912
2920
  selectUploadedFiles: [{ type: core.Output }]
2913
2921
  };
@@ -2917,10 +2925,14 @@
2917
2925
  /** @type {?} */
2918
2926
  UploadComponent.prototype.id;
2919
2927
  /** @type {?} */
2928
+ UploadComponent.prototype.accept;
2929
+ /** @type {?} */
2920
2930
  UploadComponent.prototype.ariaLabelRemove;
2921
2931
  /** @type {?} */
2922
2932
  UploadComponent.prototype.disabled;
2923
2933
  /** @type {?} */
2934
+ UploadComponent.prototype.multiple;
2935
+ /** @type {?} */
2924
2936
  UploadComponent.prototype.options;
2925
2937
  /** @type {?} */
2926
2938
  UploadComponent.prototype.selectUploadedFiles;
@@ -3098,11 +3110,13 @@
3098
3110
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3099
3111
  */
3100
3112
  var UploadZoneComponent = /** @class */ (function () {
3101
- function UploadZoneComponent() {
3113
+ function UploadZoneComponent(renderer) {
3114
+ this.renderer = renderer;
3102
3115
  this.disabled = false;
3103
3116
  this.multiple = true;
3104
3117
  this.id = '';
3105
3118
  this.ariaId = '';
3119
+ this.accept = [];
3106
3120
  this.uploadedFiles = new core.EventEmitter();
3107
3121
  this.queuedFiles = new core.EventEmitter();
3108
3122
  this.invalidFiles = new core.EventEmitter();
@@ -3168,6 +3182,36 @@
3168
3182
  var files = this.fileListToArray(this.fileInput.nativeElement.files);
3169
3183
  this.handleFiles(files);
3170
3184
  };
3185
+ /**
3186
+ * @param {?} event
3187
+ * @return {?}
3188
+ */
3189
+ UploadZoneComponent.prototype.onFileClick = /**
3190
+ * @param {?} event
3191
+ * @return {?}
3192
+ */
3193
+ function (event) {
3194
+ // When removing a file make sure you can add it again later
3195
+ // See: https://stackoverflow.com/questions/59870335/ng2-file-upload-not-allowing-me-to-add-same-doc-after-ive-removed-it-from-que
3196
+ event.target.value = '';
3197
+ };
3198
+ /**
3199
+ * @return {?}
3200
+ */
3201
+ UploadZoneComponent.prototype.ngAfterViewInit = /**
3202
+ * @return {?}
3203
+ */
3204
+ function () {
3205
+ if (this.multiple !== false) {
3206
+ this.renderer.setProperty(this.fileInput.nativeElement, 'multiple', 'multiple');
3207
+ }
3208
+ if (this.accept) {
3209
+ this.renderer.setProperty(this.fileInput.nativeElement, 'accept', this.accept.join());
3210
+ }
3211
+ if (this.disabled) {
3212
+ this.renderer.setProperty(this.fileInput.nativeElement, 'disabled', 'disabled');
3213
+ }
3214
+ };
3171
3215
  /**
3172
3216
  * @protected
3173
3217
  * @param {?} files
@@ -3254,9 +3298,13 @@
3254
3298
  UploadZoneComponent.decorators = [
3255
3299
  { type: core.Component, args: [{
3256
3300
  selector: 'aui-upload-zone',
3257
- 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 #fileInput (change)=\"updateFiles()\" *ngIf=\"multiple\" [attr.aria-labelledby]=\"ariaId\" [disabled]=\"disabled\" [id]=\"id\"\n class=\"m-upload__input\" multiple type=\"file\">\n <input #fileInput (change)=\"updateFiles()\" *ngIf=\"!multiple\" [attr.aria-labelledby]=\"ariaId\" [disabled]=\"disabled\"\n [id]=\"id\" class=\"m-upload__input\" type=\"file\">\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 #fileInput (change)=\"updateFiles()\" [attr.aria-labelledby]=\"ariaId\" [disabled]=\"disabled\" [id]=\"id\"\n class=\"m-upload__input\" multiple=\"multiple\" type=\"file\">\n</button>\n"
3301
+ 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"
3258
3302
  }] }
3259
3303
  ];
3304
+ /** @nocollapse */
3305
+ UploadZoneComponent.ctorParameters = function () { return [
3306
+ { type: core.Renderer2 }
3307
+ ]; };
3260
3308
  UploadZoneComponent.propDecorators = {
3261
3309
  fileInput: [{ type: core.ViewChild, args: ['fileInput', { static: false },] }],
3262
3310
  uploader: [{ type: core.Input }],
@@ -3264,6 +3312,7 @@
3264
3312
  multiple: [{ type: core.Input }],
3265
3313
  id: [{ type: core.Input }],
3266
3314
  ariaId: [{ type: core.Input }],
3315
+ accept: [{ type: core.Input }],
3267
3316
  uploadedFiles: [{ type: core.Output }],
3268
3317
  queuedFiles: [{ type: core.Output }],
3269
3318
  invalidFiles: [{ type: core.Output }],
@@ -3287,6 +3336,8 @@
3287
3336
  /** @type {?} */
3288
3337
  UploadZoneComponent.prototype.ariaId;
3289
3338
  /** @type {?} */
3339
+ UploadZoneComponent.prototype.accept;
3340
+ /** @type {?} */
3290
3341
  UploadZoneComponent.prototype.uploadedFiles;
3291
3342
  /** @type {?} */
3292
3343
  UploadZoneComponent.prototype.queuedFiles;
@@ -3300,6 +3351,11 @@
3300
3351
  UploadZoneComponent.prototype.uploadProgress;
3301
3352
  /** @type {?} */
3302
3353
  UploadZoneComponent.prototype.uploadingFiles;
3354
+ /**
3355
+ * @type {?}
3356
+ * @private
3357
+ */
3358
+ UploadZoneComponent.prototype.renderer;
3303
3359
  }
3304
3360
 
3305
3361
  /**