@rangertechnologies/ngnxt 2.0.31 → 2.0.32

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.
@@ -921,7 +921,7 @@ class CustomInputComponent {
921
921
  this.subscription = this.changeService.changeAnnounced$.subscribe((changeValue) => {
922
922
  if (changeValue != undefined) {
923
923
  console.log('inside subscription for the change');
924
- if (changeValue != undefined) {
924
+ if (changeValue != undefined && changeValue.fromQuestionId == dependencyObj.sourceQuestionId) {
925
925
  this.value = changeValue.valueObj[dependencyObj.valueField];
926
926
  }
927
927
  this.changeService.confirmChange(dependencyObj.sourceQuestionId);
@@ -3226,6 +3226,162 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
3226
3226
  type: Output
3227
3227
  }] } });
3228
3228
 
3229
+ class FileUploadComponent {
3230
+ selectedFileData = new EventEmitter();
3231
+ deletedFileData = new EventEmitter();
3232
+ allFiles;
3233
+ limitFileUploading;
3234
+ isDeleteFileButtonVisible;
3235
+ isShowNoFileIcon;
3236
+ selectedFileNameArray = [];
3237
+ copyOfInputAllFiles;
3238
+ copyOfFileUploadingLimit;
3239
+ constructor() { }
3240
+ ngOnInit() { }
3241
+ onFileUpload(event) {
3242
+ const fileUploaderElement = document.getElementById('fileUpload');
3243
+ fileUploaderElement.click();
3244
+ }
3245
+ ngOnChanges(simpleChanges) {
3246
+ console.log('simple changes', simpleChanges);
3247
+ this.copyOfInputAllFiles = simpleChanges.allFiles?.currentValue;
3248
+ if (simpleChanges.limitFileUploading) {
3249
+ this.copyOfFileUploadingLimit = simpleChanges.limitFileUploading?.currentValue;
3250
+ }
3251
+ }
3252
+ uploadMultipleFiles(event) {
3253
+ console.log('File uploader initiated');
3254
+ const inputFiles = this.copyOfInputAllFiles ? this.copyOfInputAllFiles : [];
3255
+ const selectedFileData = [];
3256
+ const uploadedFiles = event.target.files;
3257
+ if (uploadedFiles.length + inputFiles.length <= this.copyOfFileUploadingLimit) {
3258
+ for (const eachUploadedFile of uploadedFiles) {
3259
+ const reader = new FileReader();
3260
+ const file = eachUploadedFile;
3261
+ const format = file.name.split('.')[1];
3262
+ reader.readAsDataURL(file);
3263
+ reader.onload = () => {
3264
+ selectedFileData.push({
3265
+ doc: reader.result,
3266
+ name: file.name,
3267
+ type: file.type,
3268
+ format,
3269
+ id: null,
3270
+ });
3271
+ inputFiles.push({
3272
+ doc: reader.result,
3273
+ name: file.name,
3274
+ type: file.type,
3275
+ format,
3276
+ id: null,
3277
+ });
3278
+ };
3279
+ }
3280
+ }
3281
+ else {
3282
+ console.warn('You can upload max 5 files');
3283
+ //this.toastr.warning(TOASTER_MESSAGES.MAX_FIVE_FILES, TOASTER_MESSAGES.WARNING_TITLE);
3284
+ }
3285
+ event.target.value = '';
3286
+ this.copyOfInputAllFiles = inputFiles;
3287
+ console.log('uploadedFiles', inputFiles);
3288
+ this.selectedFileData.emit(inputFiles);
3289
+ }
3290
+ deleteFile(currentFileIndex) {
3291
+ const deletedFileName = this.selectedFileNameArray.splice(currentFileIndex, 1);
3292
+ const deletedFile = this.copyOfInputAllFiles.splice(currentFileIndex, 1);
3293
+ console.log('emit', deletedFile[0]);
3294
+ this.deletedFileData.emit(deletedFile[0]);
3295
+ }
3296
+ // viewFile(currentFile) {
3297
+ // // Display file here
3298
+ // if (currentFile && currentFile.doc) {
3299
+ // this.sharedService.viewFile(currentFile.doc.split('/').pop()).subscribe((apiResponse: any) => {
3300
+ // if (apiResponse && apiResponse.sas_url) {
3301
+ // window.open(apiResponse.sas_url, '_blank');
3302
+ // }
3303
+ // }, (apiError) => {
3304
+ // this.toastr.warning('Error while viewing file', 'Warning');
3305
+ // });
3306
+ // }
3307
+ // }
3308
+ getDocIcon(docName) {
3309
+ const ext = docName.split('.').pop(-1);
3310
+ return this.docIcon(ext);
3311
+ }
3312
+ docIcon(ext) {
3313
+ if (ext === 'pdf') {
3314
+ return 'assets/icons/document/img-file-PDF.png';
3315
+ }
3316
+ else if (ext === 'xlsx') {
3317
+ return 'assets/icons/document/img-file-XLSX.png';
3318
+ }
3319
+ else if (ext === 'docx') {
3320
+ return 'assets/icons/document/img-file-DOCX.png';
3321
+ }
3322
+ else if (ext === 'avi') {
3323
+ return 'assets/icons/document/img-file-AVI.png';
3324
+ }
3325
+ else if (ext === 'doc') {
3326
+ return 'assets/icons/document/img-file-DOC.png';
3327
+ }
3328
+ else if (ext === 'gif') {
3329
+ return 'assets/icons/document/img-file-GIF.png';
3330
+ }
3331
+ else if (ext === 'jpg') {
3332
+ return 'assets/icons/document/img-file-JPG.png';
3333
+ }
3334
+ else if (ext === 'mov') {
3335
+ return 'assets/icons/document/img-file-MOV.png';
3336
+ }
3337
+ else if (ext === 'mp3') {
3338
+ return 'assets/icons/document/img-file-MP3.png';
3339
+ }
3340
+ else if (ext === 'mp4') {
3341
+ return 'assets/icons/document/img-file-MP4.png';
3342
+ }
3343
+ else if (ext === 'mpeg') {
3344
+ return 'assets/icons/document/img-file-MPEG.png';
3345
+ }
3346
+ else if (ext === 'mpg') {
3347
+ return 'assets/icons/document/img-file-MPG.png';
3348
+ }
3349
+ else if (ext === 'png') {
3350
+ return 'assets/icons/document/img-file-PNG.png';
3351
+ }
3352
+ else if (ext === 'ppt') {
3353
+ return 'assets/icons/document/img-file-PPT.png';
3354
+ }
3355
+ else if (ext === 'txt') {
3356
+ return 'projects/nxt-app/src/assets/icons/document/img-file-TXT.png';
3357
+ }
3358
+ else if (ext === 'xls') {
3359
+ return 'assets/icons/document/img-file-XLS.png';
3360
+ }
3361
+ else {
3362
+ return 'assets/images/ic_document.svg';
3363
+ }
3364
+ }
3365
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: FileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3366
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: FileUploadComponent, selector: "app-file-upload", inputs: { allFiles: "allFiles", limitFileUploading: "limitFileUploading", isDeleteFileButtonVisible: "isDeleteFileButtonVisible", isShowNoFileIcon: "isShowNoFileIcon" }, outputs: { selectedFileData: "selectedFileData", deletedFileData: "deletedFileData" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"row\" style=\"margin: 0;\">\r\n <div class=\"col-md-12\" *ngIf=\"!isDeleteFileButtonVisible\" style=\"text-align: left;\">\r\n <label class=\"she-label\">Attachment</label>\r\n </div>\r\n <div class=\"col-lg-3 document-cnt m-t-10 m-b-10 hover-pointer\"\r\n *ngFor=\"let eachFile of copyOfInputAllFiles; let currentFileIndex = index\">\r\n <div class=\"row\"> <!-- (click)=\"viewFile(eachFile)\" -->\r\n <div class=\"col-lg-3 document_image\">\r\n <img [src]=\"getDocIcon(eachFile?.name)\" style=\"margin-right: 10px;height: 40px;\">\r\n </div>\r\n <div class=\"col-lg-9 document_name\">\r\n {{eachFile?.name}}\r\n </div>\r\n <div class=\"document_delete\" (click)=\"deleteFile(currentFileIndex);$event.stopPropagation()\" *ngIf=\"isDeleteFileButtonVisible\">\r\n <img src=\"assets/images/bin.svg\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-12 m-b-30 text-center\" *ngIf=\"copyOfInputAllFiles?.length === 0 && isShowNoFileIcon\">\r\n <img src=\"../../../assets/images/ic_no_attachments.svg\" style=\"height: 140px;\">\r\n </div>\r\n</div>\r\n\r\n<div class=\"col-lg-6\" style=\"padding:0;margin-top: 10px;\">\r\n <label class=\"custom-file\" *ngIf=\"isDeleteFileButtonVisible\">\r\n <button class=\"she-btn-primary-bordered\" style=\"width:275px;\" (click)=\"onFileUpload($event)\"\r\n [ngClass]=\"{ 'btn-disabled': copyOfInputAllFiles?.length >= copyOfFileUploadingLimit }\" [disabled]=\"copyOfInputAllFiles?.length >= copyOfFileUploadingLimit\"\r\n >Choose\r\n files</button>\r\n\r\n <input id='fileUpload' type=\"file\" id=\"fileUpload\" name=\"fileUpload\" multiple=\"multiple\" accept=\"*\" style=\"display:none;\"\r\n (change) = uploadMultipleFiles($event)\r\n />\r\n </label>\r\n <!-- <span class=\"error-msg\" *ngIf=\"(formControl?.documents?.touched || formControl?.documents?.dirty) &&\r\n formControl?.documents?.errors?.required\">\r\n {{LM_POLICY_VALIDATION_MESSAGE.REQUIRED}}\r\n </span> -->\r\n</div>\r\n", styles: [".nav.nav-tabs+.tab-content{background:transparent}.row_cnt_folder{background:#fff;padding:50px 30px}.row-recent-file{border-top:1px solid #EBEBEB;padding:20px 0;cursor:pointer}p{margin-bottom:0}.floating_button{position:fixed;right:20px;bottom:20px;z-index:10;cursor:pointer}.floating_button img{height:60px}.form-cnt{background:#ffffff;padding:40px;border:1px solid #e8e8e8;border-bottom-left-radius:5px;border-bottom-right-radius:5px}.section-header{padding:15px;background:#F8F8F8;color:#898989;border:1px solid #e8e8e8;border-top-left-radius:5px;border-top-right-radius:5px}.document-cnt{border:1px solid #48B7FF;border-radius:5px;margin-right:30px;margin-top:10px}.document_image{background:#48B7FF66;padding:10px}.document_name{padding:15px 5px;overflow:hidden}.document_delete{position:absolute;background:#C20808;display:block;height:30px;width:30px;border-radius:50px;bottom:32px;right:-15px;cursor:pointer}.document_delete img{position:relative;left:8px;top:3px}.btn-disabled{background:#e1e1e1;color:#fff;border:none;border-radius:5px;height:50px}.form-control[disabled]{border-radius:5px}.custom-file{color:#9a9a9a;font-size:14px;font-weight:400;display:inline-block;width:auto;margin-bottom:5px}.she-btn-primary-bordered{background:#ffffff;color:#48b7ff;border:1px solid #48B7FF;border-radius:5px;height:50px;outline:none!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3367
+ }
3368
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: FileUploadComponent, decorators: [{
3369
+ type: Component,
3370
+ args: [{ selector: 'app-file-upload', template: "<div class=\"row\" style=\"margin: 0;\">\r\n <div class=\"col-md-12\" *ngIf=\"!isDeleteFileButtonVisible\" style=\"text-align: left;\">\r\n <label class=\"she-label\">Attachment</label>\r\n </div>\r\n <div class=\"col-lg-3 document-cnt m-t-10 m-b-10 hover-pointer\"\r\n *ngFor=\"let eachFile of copyOfInputAllFiles; let currentFileIndex = index\">\r\n <div class=\"row\"> <!-- (click)=\"viewFile(eachFile)\" -->\r\n <div class=\"col-lg-3 document_image\">\r\n <img [src]=\"getDocIcon(eachFile?.name)\" style=\"margin-right: 10px;height: 40px;\">\r\n </div>\r\n <div class=\"col-lg-9 document_name\">\r\n {{eachFile?.name}}\r\n </div>\r\n <div class=\"document_delete\" (click)=\"deleteFile(currentFileIndex);$event.stopPropagation()\" *ngIf=\"isDeleteFileButtonVisible\">\r\n <img src=\"assets/images/bin.svg\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-12 m-b-30 text-center\" *ngIf=\"copyOfInputAllFiles?.length === 0 && isShowNoFileIcon\">\r\n <img src=\"../../../assets/images/ic_no_attachments.svg\" style=\"height: 140px;\">\r\n </div>\r\n</div>\r\n\r\n<div class=\"col-lg-6\" style=\"padding:0;margin-top: 10px;\">\r\n <label class=\"custom-file\" *ngIf=\"isDeleteFileButtonVisible\">\r\n <button class=\"she-btn-primary-bordered\" style=\"width:275px;\" (click)=\"onFileUpload($event)\"\r\n [ngClass]=\"{ 'btn-disabled': copyOfInputAllFiles?.length >= copyOfFileUploadingLimit }\" [disabled]=\"copyOfInputAllFiles?.length >= copyOfFileUploadingLimit\"\r\n >Choose\r\n files</button>\r\n\r\n <input id='fileUpload' type=\"file\" id=\"fileUpload\" name=\"fileUpload\" multiple=\"multiple\" accept=\"*\" style=\"display:none;\"\r\n (change) = uploadMultipleFiles($event)\r\n />\r\n </label>\r\n <!-- <span class=\"error-msg\" *ngIf=\"(formControl?.documents?.touched || formControl?.documents?.dirty) &&\r\n formControl?.documents?.errors?.required\">\r\n {{LM_POLICY_VALIDATION_MESSAGE.REQUIRED}}\r\n </span> -->\r\n</div>\r\n", styles: [".nav.nav-tabs+.tab-content{background:transparent}.row_cnt_folder{background:#fff;padding:50px 30px}.row-recent-file{border-top:1px solid #EBEBEB;padding:20px 0;cursor:pointer}p{margin-bottom:0}.floating_button{position:fixed;right:20px;bottom:20px;z-index:10;cursor:pointer}.floating_button img{height:60px}.form-cnt{background:#ffffff;padding:40px;border:1px solid #e8e8e8;border-bottom-left-radius:5px;border-bottom-right-radius:5px}.section-header{padding:15px;background:#F8F8F8;color:#898989;border:1px solid #e8e8e8;border-top-left-radius:5px;border-top-right-radius:5px}.document-cnt{border:1px solid #48B7FF;border-radius:5px;margin-right:30px;margin-top:10px}.document_image{background:#48B7FF66;padding:10px}.document_name{padding:15px 5px;overflow:hidden}.document_delete{position:absolute;background:#C20808;display:block;height:30px;width:30px;border-radius:50px;bottom:32px;right:-15px;cursor:pointer}.document_delete img{position:relative;left:8px;top:3px}.btn-disabled{background:#e1e1e1;color:#fff;border:none;border-radius:5px;height:50px}.form-control[disabled]{border-radius:5px}.custom-file{color:#9a9a9a;font-size:14px;font-weight:400;display:inline-block;width:auto;margin-bottom:5px}.she-btn-primary-bordered{background:#ffffff;color:#48b7ff;border:1px solid #48B7FF;border-radius:5px;height:50px;outline:none!important}\n"] }]
3371
+ }], ctorParameters: function () { return []; }, propDecorators: { selectedFileData: [{
3372
+ type: Output
3373
+ }], deletedFileData: [{
3374
+ type: Output
3375
+ }], allFiles: [{
3376
+ type: Input
3377
+ }], limitFileUploading: [{
3378
+ type: Input
3379
+ }], isDeleteFileButtonVisible: [{
3380
+ type: Input
3381
+ }], isShowNoFileIcon: [{
3382
+ type: Input
3383
+ }] } });
3384
+
3229
3385
  class QuestionbookComponent {
3230
3386
  sfService;
3231
3387
  dataService;
@@ -3234,6 +3390,7 @@ class QuestionbookComponent {
3234
3390
  questionItem;
3235
3391
  questions;
3236
3392
  subQuestions;
3393
+ selectedFileData = [];
3237
3394
  constructor(sfService, dataService, changeService) {
3238
3395
  this.sfService = sfService;
3239
3396
  this.dataService = dataService;
@@ -3264,12 +3421,19 @@ class QuestionbookComponent {
3264
3421
  this.changeService.announceChange(event);
3265
3422
  //ques.input = event; // here when using the ng-select got event as value
3266
3423
  }
3424
+ assignSelectedFileData(fileData) {
3425
+ console.log('fileDATA', fileData);
3426
+ this.selectedFileData = fileData;
3427
+ }
3428
+ deleteFile(fileData) {
3429
+ console.log('fileDATA', fileData);
3430
+ }
3267
3431
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: QuestionbookComponent, deps: [{ token: SalesforceService }, { token: DataService }, { token: ChangeService }], target: i0.ɵɵFactoryTarget.Component });
3268
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: QuestionbookComponent, selector: "lib-questionbook", inputs: { qbItem: "qbItem", questionItem: "questionItem", questions: "questions" }, ngImport: i0, template: "<div [class]=\"qbItem.isShengel__c ? 'form-group content-box' : 'form-group'\">\r\n <div class=\"form-row\">\r\n <div [class]=\"qbItem.isShengel__c ? '' : 'myt-align3'\"\r\n [class]=\"qbItem.isShengel__c ? 'col-lg-' + ques.Size__c + ' paddingnone' : 'col-md-' + ques.Size__c + ' paddingnone'\"\r\n *ngFor=\"let ques of questions;let i = index\" [id]=\"ques.Id\">\r\n <!-- Sub Question Label -->\r\n <div [ngClass]=\"{ down2: qbItem?.Progress_Bar__c }\">\r\n <span [class]=\"qbItem.isShengel__c ? 'dis-flex shengel-myt-font3 myt-font7' : 'dis-flex myt-font3 myt-font7' \">{{ ques?.Question__c }}</span>\r\n </div>\r\n\r\n <!-- DateTime -->\r\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\r\n <app-custom-date-picker [minDate]=\"ques.minDate\" [date]=\"ques.input\" (dateChange)=\"childEventCapture($event, ques)\">\r\n </app-custom-date-picker>\r\n </div>\r\n\r\n <!-- Text -->\r\n <div *ngIf=\"ques.Type__c === 'Text'\">\r\n <app-custom-input [fromShengel]=\"qbItem.isShengel__c\" [value]=\"ques.input\" [ngClassValue]=\"{\r\n 'dis-flex dt-line date-line bookText boxoutline myt-font1': qbItem.Progress_Bar__c,\r\n textBox: !qbItem.Progress_Bar__c\r\n }\" [question]=\"ques\" [idValue]=\"ques.Tracking_ID__c\" [focusEvent]=\"clearSQError(ques.Id)\"\r\n [error]=\"ques.error\" [placeholder]=\"ques.Question__c\" (inputValue)=\"childEventCapture($event, ques)\">\r\n </app-custom-input>\r\n </div>\r\n \r\n <!-- for pick location -->\r\n <div *ngIf=\"ques.Type__c === 'Location'\">\r\n <app-pick-location [address]=\"ques.input\" (locationSelected)=\"childEventCapture($event, ques)\">\r\n </app-pick-location>\r\n </div>\r\n\r\n <!-- for text area -->\r\n <div *ngIf=\"ques.Type__c === 'TextArea'\">\r\n <app-custom-text-area [value]=\"ques.input\" [rows]=\"3\" [error]=\"ques.error\" [placeholder]=\"ques.Question__c \"\r\n (textareaValueChange)=\"childEventCapture($event)\"></app-custom-text-area>\r\n </div>\r\n\r\n <!-- Email -->\r\n <div *ngIf=\"ques.Type__c === 'Email'\">\r\n <input type=\"email\" [(ngModel)]=\"ques.input\" [id]=\"ques.Id\" required=\"\" (focus)=\"clearSQError(ques.Id)\"\r\n style.border-color=\"{{ ques.error ? 'red' : '' }}\" placeholder=\"{{ ques.Question__c }}\" />\r\n </div>\r\n\r\n <!-- Table -->\r\n <div *ngIf=\"ques.Type__c === 'Table'\" class=\"\">\r\n <app-custom-table [question]=\"ques\" (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\r\n </app-custom-table>\r\n </div>\r\n\r\n <!-- Dropdown -->\r\n <div *ngIf=\"ques.Type__c === 'Dropdown'\" class=\"\">\r\n <app-custom-dropdown [fromShengel]=\"qbItem.isShengel__c\" [options]=\"ques.Question_Options__r.records\"\r\n [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Name\" [selectedValue]=\"ques.input\" [placeholder]=\"'---Select---'\"\r\n [errorMessage]=\"ques.Error_Message__c\" [error]=\"ques.error\"\r\n (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\r\n </app-custom-dropdown>\r\n <i class=\"fa fa-check \" aria-hidden=\"true\" *ngIf=\"ques?.input?.length > 0\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".form-group.content-box{background:#ffffff;padding:40px;border:1px solid #e8e8e8;border-bottom-left-radius:5px;border-bottom-right-radius:5px}.form-row{display:flex;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.col-lg-6{width:100%}.shengel-myt-font3{padding:5px 15px 5px 2px;color:#9a9a9a;font-size:14px;font-weight:400}.myt-font7{display:flex;justify-content:flex-start}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PickLocationComponent, selector: "app-pick-location", inputs: ["address"], outputs: ["locationSelected"] }, { kind: "component", type: CustomInputComponent, selector: "app-custom-input", inputs: ["value", "question", "disabled", "placeholder", "error", "fromShengel", "ngClassValue", "idValue", "focusEvent"], outputs: ["inputValue"] }, { kind: "component", type: CustomTextAreaComponent, selector: "app-custom-text-area", inputs: ["value", "placeholder", "rows", "error"], outputs: ["textareaValueChange"] }, { kind: "component", type: CustomTableComponent, selector: "app-custom-table", inputs: ["question"], outputs: ["valueChange"] }, { kind: "component", type: CustomDatePickerComponent, selector: "app-custom-date-picker", inputs: ["date", "minDate", "maxDate"], outputs: ["dateChange"] }, { kind: "component", type: CustomDropdownComponent, selector: "app-custom-dropdown", inputs: ["options", "placeholder", "apiMeta", "selectedValue", "progressBar", "id", "errorMessage", "error", "fromShengel"], outputs: ["valueChange"] }] });
3432
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: QuestionbookComponent, selector: "lib-questionbook", inputs: { qbItem: "qbItem", questionItem: "questionItem", questions: "questions" }, ngImport: i0, template: "<div [class]=\"qbItem.isShengel__c ? 'form-group content-box' : 'form-group'\">\r\n <div class=\"form-row\">\r\n <div [class]=\"qbItem.isShengel__c ? '' : 'myt-align3'\"\r\n [class]=\"qbItem.isShengel__c ? 'col-lg-' + ques.Size__c + ' paddingnone' : 'col-md-' + ques.Size__c + ' paddingnone'\"\r\n *ngFor=\"let ques of questions;let i = index\" [id]=\"ques.Id\">\r\n <!-- Sub Question Label -->\r\n <div [ngClass]=\"{ down2: qbItem?.Progress_Bar__c }\">\r\n <span [class]=\"qbItem.isShengel__c ? 'dis-flex shengel-myt-font3 myt-font7' : 'dis-flex myt-font3 myt-font7' \">{{ ques?.Question__c }}</span>\r\n </div>\r\n\r\n <!-- DateTime -->\r\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\r\n <app-custom-date-picker [minDate]=\"ques.minDate\" [date]=\"ques.input\" (dateChange)=\"childEventCapture($event, ques)\">\r\n </app-custom-date-picker>\r\n </div>\r\n\r\n <!-- Text -->\r\n <div *ngIf=\"ques.Type__c === 'Text'\">\r\n <app-custom-input [fromShengel]=\"qbItem.isShengel__c\" [value]=\"ques.input\" [ngClassValue]=\"{\r\n 'dis-flex dt-line date-line bookText boxoutline myt-font1': qbItem.Progress_Bar__c,\r\n textBox: !qbItem.Progress_Bar__c\r\n }\" [question]=\"ques\" [idValue]=\"ques.Tracking_ID__c\" [focusEvent]=\"clearSQError(ques.Id)\"\r\n [error]=\"ques.error\" [placeholder]=\"ques.Question__c\" (inputValue)=\"childEventCapture($event, ques)\">\r\n </app-custom-input>\r\n </div>\r\n \r\n <!-- for pick location -->\r\n <div *ngIf=\"ques.Type__c === 'Location'\">\r\n <app-pick-location [address]=\"ques.input\" (locationSelected)=\"childEventCapture($event, ques)\">\r\n </app-pick-location>\r\n </div>\r\n\r\n <!-- for text area -->\r\n <div *ngIf=\"ques.Type__c === 'TextArea'\">\r\n <app-custom-text-area [value]=\"ques.input\" [rows]=\"3\" [error]=\"ques.error\" [placeholder]=\"ques.Question__c \"\r\n (textareaValueChange)=\"childEventCapture($event)\"></app-custom-text-area>\r\n </div>\r\n\r\n <!-- Email -->\r\n <div *ngIf=\"ques.Type__c === 'Email'\">\r\n <input type=\"email\" [(ngModel)]=\"ques.input\" [id]=\"ques.Id\" required=\"\" (focus)=\"clearSQError(ques.Id)\"\r\n style.border-color=\"{{ ques.error ? 'red' : '' }}\" placeholder=\"{{ ques.Question__c }}\" />\r\n </div>\r\n\r\n <!-- Table -->\r\n <div *ngIf=\"ques.Type__c === 'Table'\" class=\"\">\r\n <app-custom-table [question]=\"ques\" (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\r\n </app-custom-table>\r\n </div>\r\n\r\n <!-- Dropdown -->\r\n <div *ngIf=\"ques.Type__c === 'Dropdown'\" class=\"\">\r\n <app-custom-dropdown [fromShengel]=\"qbItem.isShengel__c\" [options]=\"ques.Question_Options__r.records\"\r\n [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [selectedValue]=\"ques.input\" [placeholder]=\"'---Select---'\"\r\n [errorMessage]=\"ques.Error_Message__c\" [error]=\"ques.error\"\r\n (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\r\n </app-custom-dropdown>\r\n <i class=\"fa fa-check \" aria-hidden=\"true\" *ngIf=\"ques?.input?.length > 0\"></i>\r\n </div>\r\n\r\n <!-- file Upload -->\r\n <div *ngIf=\"ques.Type__c === 'File'\" class=\"\">\r\n <app-file-upload [limitFileUploading]=\"5\" [allFiles]=\"selectedFileData\"\r\n (selectedFileData)=\"assignSelectedFileData($event)\" (deletedFileData)=\"deleteFile($event)\"\r\n [isDeleteFileButtonVisible]=\"true\"></app-file-upload>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".form-group.content-box{background:#ffffff;padding:40px;border:1px solid #e8e8e8;border-bottom-left-radius:5px;border-bottom-right-radius:5px}.form-row{display:flex;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.col-lg-6{width:100%}.shengel-myt-font3{padding:5px 15px 5px 2px;color:#9a9a9a;font-size:14px;font-weight:400}.myt-font7{display:flex;justify-content:flex-start}@media (min-width: 1200px){.col-lg-6{width:50%!important}}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PickLocationComponent, selector: "app-pick-location", inputs: ["address"], outputs: ["locationSelected"] }, { kind: "component", type: CustomInputComponent, selector: "app-custom-input", inputs: ["value", "question", "disabled", "placeholder", "error", "fromShengel", "ngClassValue", "idValue", "focusEvent"], outputs: ["inputValue"] }, { kind: "component", type: CustomTextAreaComponent, selector: "app-custom-text-area", inputs: ["value", "placeholder", "rows", "error"], outputs: ["textareaValueChange"] }, { kind: "component", type: CustomTableComponent, selector: "app-custom-table", inputs: ["question"], outputs: ["valueChange"] }, { kind: "component", type: CustomDatePickerComponent, selector: "app-custom-date-picker", inputs: ["date", "minDate", "maxDate"], outputs: ["dateChange"] }, { kind: "component", type: CustomDropdownComponent, selector: "app-custom-dropdown", inputs: ["options", "placeholder", "apiMeta", "selectedValue", "progressBar", "id", "errorMessage", "error", "fromShengel"], outputs: ["valueChange"] }, { kind: "component", type: FileUploadComponent, selector: "app-file-upload", inputs: ["allFiles", "limitFileUploading", "isDeleteFileButtonVisible", "isShowNoFileIcon"], outputs: ["selectedFileData", "deletedFileData"] }] });
3269
3433
  }
3270
3434
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: QuestionbookComponent, decorators: [{
3271
3435
  type: Component,
3272
- args: [{ selector: 'lib-questionbook', template: "<div [class]=\"qbItem.isShengel__c ? 'form-group content-box' : 'form-group'\">\r\n <div class=\"form-row\">\r\n <div [class]=\"qbItem.isShengel__c ? '' : 'myt-align3'\"\r\n [class]=\"qbItem.isShengel__c ? 'col-lg-' + ques.Size__c + ' paddingnone' : 'col-md-' + ques.Size__c + ' paddingnone'\"\r\n *ngFor=\"let ques of questions;let i = index\" [id]=\"ques.Id\">\r\n <!-- Sub Question Label -->\r\n <div [ngClass]=\"{ down2: qbItem?.Progress_Bar__c }\">\r\n <span [class]=\"qbItem.isShengel__c ? 'dis-flex shengel-myt-font3 myt-font7' : 'dis-flex myt-font3 myt-font7' \">{{ ques?.Question__c }}</span>\r\n </div>\r\n\r\n <!-- DateTime -->\r\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\r\n <app-custom-date-picker [minDate]=\"ques.minDate\" [date]=\"ques.input\" (dateChange)=\"childEventCapture($event, ques)\">\r\n </app-custom-date-picker>\r\n </div>\r\n\r\n <!-- Text -->\r\n <div *ngIf=\"ques.Type__c === 'Text'\">\r\n <app-custom-input [fromShengel]=\"qbItem.isShengel__c\" [value]=\"ques.input\" [ngClassValue]=\"{\r\n 'dis-flex dt-line date-line bookText boxoutline myt-font1': qbItem.Progress_Bar__c,\r\n textBox: !qbItem.Progress_Bar__c\r\n }\" [question]=\"ques\" [idValue]=\"ques.Tracking_ID__c\" [focusEvent]=\"clearSQError(ques.Id)\"\r\n [error]=\"ques.error\" [placeholder]=\"ques.Question__c\" (inputValue)=\"childEventCapture($event, ques)\">\r\n </app-custom-input>\r\n </div>\r\n \r\n <!-- for pick location -->\r\n <div *ngIf=\"ques.Type__c === 'Location'\">\r\n <app-pick-location [address]=\"ques.input\" (locationSelected)=\"childEventCapture($event, ques)\">\r\n </app-pick-location>\r\n </div>\r\n\r\n <!-- for text area -->\r\n <div *ngIf=\"ques.Type__c === 'TextArea'\">\r\n <app-custom-text-area [value]=\"ques.input\" [rows]=\"3\" [error]=\"ques.error\" [placeholder]=\"ques.Question__c \"\r\n (textareaValueChange)=\"childEventCapture($event)\"></app-custom-text-area>\r\n </div>\r\n\r\n <!-- Email -->\r\n <div *ngIf=\"ques.Type__c === 'Email'\">\r\n <input type=\"email\" [(ngModel)]=\"ques.input\" [id]=\"ques.Id\" required=\"\" (focus)=\"clearSQError(ques.Id)\"\r\n style.border-color=\"{{ ques.error ? 'red' : '' }}\" placeholder=\"{{ ques.Question__c }}\" />\r\n </div>\r\n\r\n <!-- Table -->\r\n <div *ngIf=\"ques.Type__c === 'Table'\" class=\"\">\r\n <app-custom-table [question]=\"ques\" (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\r\n </app-custom-table>\r\n </div>\r\n\r\n <!-- Dropdown -->\r\n <div *ngIf=\"ques.Type__c === 'Dropdown'\" class=\"\">\r\n <app-custom-dropdown [fromShengel]=\"qbItem.isShengel__c\" [options]=\"ques.Question_Options__r.records\"\r\n [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Name\" [selectedValue]=\"ques.input\" [placeholder]=\"'---Select---'\"\r\n [errorMessage]=\"ques.Error_Message__c\" [error]=\"ques.error\"\r\n (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\r\n </app-custom-dropdown>\r\n <i class=\"fa fa-check \" aria-hidden=\"true\" *ngIf=\"ques?.input?.length > 0\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".form-group.content-box{background:#ffffff;padding:40px;border:1px solid #e8e8e8;border-bottom-left-radius:5px;border-bottom-right-radius:5px}.form-row{display:flex;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.col-lg-6{width:100%}.shengel-myt-font3{padding:5px 15px 5px 2px;color:#9a9a9a;font-size:14px;font-weight:400}.myt-font7{display:flex;justify-content:flex-start}\n"] }]
3436
+ args: [{ selector: 'lib-questionbook', template: "<div [class]=\"qbItem.isShengel__c ? 'form-group content-box' : 'form-group'\">\r\n <div class=\"form-row\">\r\n <div [class]=\"qbItem.isShengel__c ? '' : 'myt-align3'\"\r\n [class]=\"qbItem.isShengel__c ? 'col-lg-' + ques.Size__c + ' paddingnone' : 'col-md-' + ques.Size__c + ' paddingnone'\"\r\n *ngFor=\"let ques of questions;let i = index\" [id]=\"ques.Id\">\r\n <!-- Sub Question Label -->\r\n <div [ngClass]=\"{ down2: qbItem?.Progress_Bar__c }\">\r\n <span [class]=\"qbItem.isShengel__c ? 'dis-flex shengel-myt-font3 myt-font7' : 'dis-flex myt-font3 myt-font7' \">{{ ques?.Question__c }}</span>\r\n </div>\r\n\r\n <!-- DateTime -->\r\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\r\n <app-custom-date-picker [minDate]=\"ques.minDate\" [date]=\"ques.input\" (dateChange)=\"childEventCapture($event, ques)\">\r\n </app-custom-date-picker>\r\n </div>\r\n\r\n <!-- Text -->\r\n <div *ngIf=\"ques.Type__c === 'Text'\">\r\n <app-custom-input [fromShengel]=\"qbItem.isShengel__c\" [value]=\"ques.input\" [ngClassValue]=\"{\r\n 'dis-flex dt-line date-line bookText boxoutline myt-font1': qbItem.Progress_Bar__c,\r\n textBox: !qbItem.Progress_Bar__c\r\n }\" [question]=\"ques\" [idValue]=\"ques.Tracking_ID__c\" [focusEvent]=\"clearSQError(ques.Id)\"\r\n [error]=\"ques.error\" [placeholder]=\"ques.Question__c\" (inputValue)=\"childEventCapture($event, ques)\">\r\n </app-custom-input>\r\n </div>\r\n \r\n <!-- for pick location -->\r\n <div *ngIf=\"ques.Type__c === 'Location'\">\r\n <app-pick-location [address]=\"ques.input\" (locationSelected)=\"childEventCapture($event, ques)\">\r\n </app-pick-location>\r\n </div>\r\n\r\n <!-- for text area -->\r\n <div *ngIf=\"ques.Type__c === 'TextArea'\">\r\n <app-custom-text-area [value]=\"ques.input\" [rows]=\"3\" [error]=\"ques.error\" [placeholder]=\"ques.Question__c \"\r\n (textareaValueChange)=\"childEventCapture($event)\"></app-custom-text-area>\r\n </div>\r\n\r\n <!-- Email -->\r\n <div *ngIf=\"ques.Type__c === 'Email'\">\r\n <input type=\"email\" [(ngModel)]=\"ques.input\" [id]=\"ques.Id\" required=\"\" (focus)=\"clearSQError(ques.Id)\"\r\n style.border-color=\"{{ ques.error ? 'red' : '' }}\" placeholder=\"{{ ques.Question__c }}\" />\r\n </div>\r\n\r\n <!-- Table -->\r\n <div *ngIf=\"ques.Type__c === 'Table'\" class=\"\">\r\n <app-custom-table [question]=\"ques\" (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\r\n </app-custom-table>\r\n </div>\r\n\r\n <!-- Dropdown -->\r\n <div *ngIf=\"ques.Type__c === 'Dropdown'\" class=\"\">\r\n <app-custom-dropdown [fromShengel]=\"qbItem.isShengel__c\" [options]=\"ques.Question_Options__r.records\"\r\n [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [selectedValue]=\"ques.input\" [placeholder]=\"'---Select---'\"\r\n [errorMessage]=\"ques.Error_Message__c\" [error]=\"ques.error\"\r\n (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\r\n </app-custom-dropdown>\r\n <i class=\"fa fa-check \" aria-hidden=\"true\" *ngIf=\"ques?.input?.length > 0\"></i>\r\n </div>\r\n\r\n <!-- file Upload -->\r\n <div *ngIf=\"ques.Type__c === 'File'\" class=\"\">\r\n <app-file-upload [limitFileUploading]=\"5\" [allFiles]=\"selectedFileData\"\r\n (selectedFileData)=\"assignSelectedFileData($event)\" (deletedFileData)=\"deleteFile($event)\"\r\n [isDeleteFileButtonVisible]=\"true\"></app-file-upload>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".form-group.content-box{background:#ffffff;padding:40px;border:1px solid #e8e8e8;border-bottom-left-radius:5px;border-bottom-right-radius:5px}.form-row{display:flex;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.col-lg-6{width:100%}.shengel-myt-font3{padding:5px 15px 5px 2px;color:#9a9a9a;font-size:14px;font-weight:400}.myt-font7{display:flex;justify-content:flex-start}@media (min-width: 1200px){.col-lg-6{width:50%!important}}\n"] }]
3273
3437
  }], ctorParameters: function () { return [{ type: SalesforceService }, { type: DataService }, { type: ChangeService }]; }, propDecorators: { qbItem: [{
3274
3438
  type: Input
3275
3439
  }], questionItem: [{
@@ -3485,7 +3649,8 @@ class NxtAppModule {
3485
3649
  CustomDropdownComponent,
3486
3650
  BookletComponent,
3487
3651
  SearchBoxComponent,
3488
- QuestionbookComponent], imports: [CommonModule, FormsModule,
3652
+ QuestionbookComponent,
3653
+ FileUploadComponent], imports: [CommonModule, FormsModule,
3489
3654
  MyDatePickerModule,
3490
3655
  OwlDateTimeModule,
3491
3656
  OwlNativeDateTimeModule,
@@ -3603,7 +3768,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
3603
3768
  CustomDropdownComponent,
3604
3769
  BookletComponent,
3605
3770
  SearchBoxComponent,
3606
- QuestionbookComponent
3771
+ QuestionbookComponent,
3772
+ FileUploadComponent
3607
3773
  ],
3608
3774
  imports: [
3609
3775
  CommonModule, FormsModule,