mmhglobal-dynamicform 1.1.37 → 1.1.38

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/README.md CHANGED
@@ -3,6 +3,10 @@
3
3
  This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.13.
4
4
 
5
5
  ## Changelog
6
+ `1.38`<br/>
7
+ [zupload] default file size restriction.<br/>
8
+ [zupload] added clearFiles function.<br/>
9
+
6
10
  `1.37`<br/>
7
11
  [tooltipsinfo] support for setTooltipsDisplayText, setTooltipsInfoIcon.
8
12
 
@@ -10745,6 +10745,8 @@
10745
10745
  this.showFileList = true;
10746
10746
  this.fileList = [];
10747
10747
  this.restrictions = {
10748
+ minFileSize: 1,
10749
+ maxFileSize: 4194304,
10748
10750
  allowedExtensions: [
10749
10751
  "jpg",
10750
10752
  "jpeg",
@@ -11031,12 +11033,16 @@
11031
11033
  }
11032
11034
  }
11033
11035
  };
11036
+ ZuploadComponent.prototype.clearFiles = function () {
11037
+ this.uploadComponent.clearFiles();
11038
+ this.group['zupload_' + this.data.Value] = this.fileList;
11039
+ };
11034
11040
  return ZuploadComponent;
11035
11041
  }());
11036
11042
  ZuploadComponent.decorators = [
11037
11043
  { type: i0.Component, args: [{
11038
11044
  selector: "app-zupload",
11039
- template: "<ion-item [formGroup]=\"form\" *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)\" [ngClass]=\"getIon_InvalidClass(form, data)\" style=\"margin-left: -15px;\">\r\n <ion-label [attr.for]=\"data.Value\" *ngIf=\"data.ShowLabel === undefined || data.ShowLabel\" position=\"stacked\" style=\"margin-bottom: 10px;\">\r\n {{data.Label}} <ion-text *ngIf=\"(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)\" color=\"danger\">*</ion-text>\r\n </ion-label>\r\n <div class=\"ion-row\" style=\"justify-content: space-between; width: 100%\">\r\n <span style=\"flex: 1;\">\r\n <kendo-upload *ngIf=\"!data.SelectFileOnly\"\r\n [autoUpload]=\"isAutoUpload\"\r\n [saveUrl]=\"uploadSaveUrl\"\r\n [removeUrl]=\"uploadRemoveUrl\"\r\n [restrictions]=\"restrictions\"\r\n [formControlName]=\"data.Value\"\r\n [multiple]=\"isMultiple\"\r\n [chunkable]=\"chunkSettings\"\r\n [showFileList]=\"showFileList\"\r\n (select)=\"selectEventHandler($event)\"\r\n (remove)=\"onRemove($event)\"\r\n (success)=\"onSuccess($event)\"\r\n (upload)=\"uploadEventHandler($event)\">\r\n </kendo-upload>\r\n\r\n <kendo-fileselect *ngIf=\"data.SelectFileOnly\"\r\n (select)=\"selectEventHandler($event)\"\r\n (remove)=\"onRemove($event)\"\r\n (valueChange)=\"onChange($event)\"\r\n [restrictions]=\"restrictions\" >\r\n </kendo-fileselect>\r\n </span>\r\n </div>\r\n</ion-item>\r\n<br />\r\n<!--<div class=\"wrap\" *ngIf=\"data.EnableCompression\">\r\n <ion-label>Enable Compression: </ion-label>\r\n <ion-checkbox style=\"margin: -5px 0;\" color=\"primary\" (ionChange)=\"toogleEnableCompression($event)\"></ion-checkbox>\r\n</div>-->\r\n<ion-label *ngIf=\"imagePreviews.length\" position=\"stacked\">\r\n Image Preview:\r\n</ion-label>\r\n<div *ngIf=\"imagePreviews.length\" >\r\n <img *ngFor=\"let image of imagePreviews\"\r\n [src]=\"image.src\"\r\n alt=\"image preview\"\r\n height=\"100\"\r\n style=\"margin: 5px; border: 1px solid gray;\"/>\r\n</div>\r\n",
11045
+ template: "<ion-item [formGroup]=\"form\" *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)\" [ngClass]=\"getIon_InvalidClass(form, data)\" style=\"margin-left: -15px;\">\r\n <ion-label [attr.for]=\"data.Value\" *ngIf=\"data.ShowLabel === undefined || data.ShowLabel\" position=\"stacked\" style=\"margin-bottom: 10px;\">\r\n {{data.Label}} <ion-text *ngIf=\"(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)\" color=\"danger\">*</ion-text>\r\n </ion-label>\r\n <div class=\"ion-row\" style=\"justify-content: space-between; width: 100%\">\r\n <span style=\"flex: 1;\">\r\n <kendo-upload #uploadComponent\r\n *ngIf=\"!data.SelectFileOnly\"\r\n [id]=\"data.Value\"\r\n [autoUpload]=\"isAutoUpload\"\r\n [saveUrl]=\"uploadSaveUrl\"\r\n [removeUrl]=\"uploadRemoveUrl\"\r\n [restrictions]=\"restrictions\"\r\n [formControlName]=\"data.Value\"\r\n [multiple]=\"isMultiple\"\r\n [chunkable]=\"chunkSettings\"\r\n [showFileList]=\"showFileList\"\r\n (select)=\"selectEventHandler($event)\"\r\n (remove)=\"onRemove($event)\" \r\n (success)=\"onSuccess($event)\"\r\n (upload)=\"uploadEventHandler($event)\">\r\n </kendo-upload>\r\n\r\n <kendo-fileselect #uploadComponent\r\n *ngIf=\"data.SelectFileOnly\"\r\n [id]=\"data.Value\"\r\n (select)=\"selectEventHandler($event)\"\r\n (remove)=\"onRemove($event)\" \r\n (valueChange)=\"onChange($event)\"\r\n [restrictions]=\"restrictions\" >\r\n </kendo-fileselect>\r\n </span>\r\n </div>\r\n</ion-item>\r\n<br />\r\n<!--<div class=\"wrap\" *ngIf=\"data.EnableCompression\">\r\n <ion-label>Enable Compression: </ion-label>\r\n <ion-checkbox style=\"margin: -5px 0;\" color=\"primary\" (ionChange)=\"toogleEnableCompression($event)\"></ion-checkbox>\r\n</div>-->\r\n<ion-label *ngIf=\"imagePreviews.length\" position=\"stacked\">\r\n Image Preview:\r\n</ion-label>\r\n<div *ngIf=\"imagePreviews.length\" >\r\n <img *ngFor=\"let image of imagePreviews\"\r\n [src]=\"image.src\"\r\n alt=\"image preview\"\r\n height=\"100\"\r\n style=\"margin: 5px; border: 1px solid gray;\"/>\r\n</div>\r\n",
11040
11046
  styles: [""]
11041
11047
  },] }
11042
11048
  ];
@@ -11049,7 +11055,8 @@
11049
11055
  ZuploadComponent.propDecorators = {
11050
11056
  data: [{ type: i0.Input }],
11051
11057
  group: [{ type: i0.Input }],
11052
- form: [{ type: i0.Input }]
11058
+ form: [{ type: i0.Input }],
11059
+ uploadComponent: [{ type: i0.ViewChild, args: ["uploadComponent",] }]
11053
11060
  };
11054
11061
 
11055
11062
  /********** Angular **********/