@rangertechnologies/ngnxt 2.1.48 → 2.1.50
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/esm2022/lib/components/custom-calendar/custom-calendar.component.mjs +114 -26
- package/esm2022/lib/components/custom-model/custom-model.component.mjs +3 -3
- package/esm2022/lib/components/custom-time/custom-time.component.mjs +3 -2
- package/esm2022/lib/directives/componenthost/componenthost.directive.mjs +19 -0
- package/esm2022/lib/nxt-app.module.mjs +4 -1
- package/esm2022/lib/pages/booklet/booklet.component.mjs +82 -4
- package/esm2022/lib/pages/questionbook/questionbook.component.mjs +120 -86
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/rangertechnologies-ngnxt.mjs +324 -110
- package/fesm2022/rangertechnologies-ngnxt.mjs.map +1 -1
- package/lib/components/custom-calendar/custom-calendar.component.d.ts +11 -3
- package/lib/directives/componenthost/componenthost.directive.d.ts +8 -0
- package/lib/nxt-app.module.d.ts +9 -8
- package/lib/pages/booklet/booklet.component.d.ts +5 -1
- package/lib/pages/questionbook/questionbook.component.d.ts +12 -4
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/rangertechnologies-ngnxt-2.1.50.tgz +0 -0
- package/rangertechnologies-ngnxt-2.1.48.tgz +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Component, Optional, InjectionToken, EventEmitter, Inject, Output, Pipe, ViewChild, Input, ViewEncapsulation, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
2
|
+
import { Injectable, Component, Optional, InjectionToken, EventEmitter, Inject, Output, Pipe, ViewChild, Input, ViewEncapsulation, Directive, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
3
3
|
import * as moment from 'moment';
|
|
4
4
|
import { Subject, BehaviorSubject } from 'rxjs';
|
|
5
5
|
import * as i1 from '@angular/router';
|
|
@@ -23,9 +23,9 @@ import * as i4$1 from 'ng-pick-datetime';
|
|
|
23
23
|
import { OwlDateTimeModule, OwlNativeDateTimeModule } from 'ng-pick-datetime';
|
|
24
24
|
import * as i6 from '@ng-select/ng-select';
|
|
25
25
|
import { NgSelectModule } from '@ng-select/ng-select';
|
|
26
|
-
import * as
|
|
26
|
+
import * as i9$1 from '@angular/material/tooltip';
|
|
27
27
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
28
|
-
import * as
|
|
28
|
+
import * as i10 from '@angular/cdk/bidi';
|
|
29
29
|
|
|
30
30
|
class NxtAppService {
|
|
31
31
|
constructor() { }
|
|
@@ -4254,6 +4254,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
4254
4254
|
}]
|
|
4255
4255
|
}], ctorParameters: function () { return []; } });
|
|
4256
4256
|
|
|
4257
|
+
// VD 06-09-24 directive file to call component dynamically
|
|
4258
|
+
class ComponenthostDirective {
|
|
4259
|
+
viewContainerRef;
|
|
4260
|
+
constructor(viewContainerRef) {
|
|
4261
|
+
this.viewContainerRef = viewContainerRef;
|
|
4262
|
+
}
|
|
4263
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ComponenthostDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4264
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: ComponenthostDirective, isStandalone: true, selector: "[dynamicComponentHost]", ngImport: i0 });
|
|
4265
|
+
}
|
|
4266
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ComponenthostDirective, decorators: [{
|
|
4267
|
+
type: Directive,
|
|
4268
|
+
args: [{
|
|
4269
|
+
selector: '[dynamicComponentHost]',
|
|
4270
|
+
standalone: true
|
|
4271
|
+
}]
|
|
4272
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; } });
|
|
4273
|
+
|
|
4257
4274
|
class CustomModelComponent {
|
|
4258
4275
|
constructor() { }
|
|
4259
4276
|
modalTitle;
|
|
@@ -4278,11 +4295,11 @@ class CustomModelComponent {
|
|
|
4278
4295
|
this.saveButtonEmit.emit();
|
|
4279
4296
|
}
|
|
4280
4297
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomModelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4281
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: CustomModelComponent, selector: "app-custom-model", inputs: { modalTitle: "modalTitle", isModalOpen: "isModalOpen", modalSize: "modalSize", saveButtonValue: "saveButtonValue", modalFooter: "modalFooter" }, outputs: { saveButtonEmit: "saveButtonEmit", cancelButtonEmit: "cancelButtonEmit" }, ngImport: i0, template: "<div *ngIf=\"isModalOpen\" class=\"modal\" [ngClass]=\"modalSize\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <span class=\"close\" (click)=\"onCancel()\">×</span>\n <h2>{{ modalTitle }}</h2>\n </div>\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n <div class=\"modal-footer\" *ngIf=\"modalFooter\">\n <button (click)=\"
|
|
4298
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: CustomModelComponent, selector: "app-custom-model", inputs: { modalTitle: "modalTitle", isModalOpen: "isModalOpen", modalSize: "modalSize", saveButtonValue: "saveButtonValue", modalFooter: "modalFooter" }, outputs: { saveButtonEmit: "saveButtonEmit", cancelButtonEmit: "cancelButtonEmit" }, ngImport: i0, template: "<div *ngIf=\"isModalOpen\" class=\"modal\" [ngClass]=\"modalSize\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <span class=\"close\" (click)=\"onCancel()\">×</span>\n <h2>{{ modalTitle }}</h2>\n </div>\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n <!-- /* VD 06Sep24 styling changes */-->\n <div class=\"modal-footer\" *ngIf=\"modalFooter\">\n <button (click)=\"onCancel()\">Cancel</button>\n <button (click)=\"onSave()\">{{ saveButtonValue }}</button>\n </div>\n </div>\n</div>\n ", styles: [".modal{display:block;position:fixed;z-index:1;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#0006}.modal-content{background-color:#fefefe;margin:5% auto;padding:20px;border:1px solid #888;width:70%;max-width:90%;max-height:80vh;overflow-y:auto}.modal-header,.modal-footer{padding:10px;text-align:center;display:block}.modal-body{max-height:60vh;overflow-y:auto}.close{color:#aaa;float:right;font-size:28px;font-weight:700}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer}.modal-footer button{padding:10px 20px;margin:5px;font-size:16px;border:1px solid #ccc;border-radius:4px;cursor:pointer;background-color:#f5f5f5;color:#333}.modal-footer button:hover{background-color:#e0e0e0;border-color:#bbb}@media (max-width: 768px){.modal-content{width:90%;margin:10% auto}}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
4282
4299
|
}
|
|
4283
4300
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomModelComponent, decorators: [{
|
|
4284
4301
|
type: Component,
|
|
4285
|
-
args: [{ selector: 'app-custom-model', template: "<div *ngIf=\"isModalOpen\" class=\"modal\" [ngClass]=\"modalSize\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <span class=\"close\" (click)=\"onCancel()\">×</span>\n <h2>{{ modalTitle }}</h2>\n </div>\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n <div class=\"modal-footer\" *ngIf=\"modalFooter\">\n <button (click)=\"
|
|
4302
|
+
args: [{ selector: 'app-custom-model', template: "<div *ngIf=\"isModalOpen\" class=\"modal\" [ngClass]=\"modalSize\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <span class=\"close\" (click)=\"onCancel()\">×</span>\n <h2>{{ modalTitle }}</h2>\n </div>\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n <!-- /* VD 06Sep24 styling changes */-->\n <div class=\"modal-footer\" *ngIf=\"modalFooter\">\n <button (click)=\"onCancel()\">Cancel</button>\n <button (click)=\"onSave()\">{{ saveButtonValue }}</button>\n </div>\n </div>\n</div>\n ", styles: [".modal{display:block;position:fixed;z-index:1;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#0006}.modal-content{background-color:#fefefe;margin:5% auto;padding:20px;border:1px solid #888;width:70%;max-width:90%;max-height:80vh;overflow-y:auto}.modal-header,.modal-footer{padding:10px;text-align:center;display:block}.modal-body{max-height:60vh;overflow-y:auto}.close{color:#aaa;float:right;font-size:28px;font-weight:700}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer}.modal-footer button{padding:10px 20px;margin:5px;font-size:16px;border:1px solid #ccc;border-radius:4px;cursor:pointer;background-color:#f5f5f5;color:#333}.modal-footer button:hover{background-color:#e0e0e0;border-color:#bbb}@media (max-width: 768px){.modal-content{width:90%;margin:10% auto}}\n"] }]
|
|
4286
4303
|
}], ctorParameters: function () { return []; }, propDecorators: { modalTitle: [{
|
|
4287
4304
|
type: Input
|
|
4288
4305
|
}], isModalOpen: [{
|
|
@@ -4301,8 +4318,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
4301
4318
|
|
|
4302
4319
|
class CustomCalendarComponent {
|
|
4303
4320
|
eventSelected = new EventEmitter();
|
|
4321
|
+
// VD 06Sep24 calendar changes
|
|
4322
|
+
dateSelected = new EventEmitter();
|
|
4304
4323
|
allEvents = [];
|
|
4305
4324
|
question;
|
|
4325
|
+
dynamicHost;
|
|
4306
4326
|
entries = [];
|
|
4307
4327
|
referenceQuestions = [];
|
|
4308
4328
|
qbRefrenceBook;
|
|
@@ -4321,6 +4341,8 @@ class CustomCalendarComponent {
|
|
|
4321
4341
|
saveButtonValue = 'Save';
|
|
4322
4342
|
modalFooter = true;
|
|
4323
4343
|
editingEventId;
|
|
4344
|
+
editingEntryGroup;
|
|
4345
|
+
showAppoinmentSection = true;
|
|
4324
4346
|
ngOnInit() {
|
|
4325
4347
|
if (this.question?.input) {
|
|
4326
4348
|
this.allEvents = this.question.input;
|
|
@@ -4347,6 +4369,15 @@ class CustomCalendarComponent {
|
|
|
4347
4369
|
console.log(this.entries);
|
|
4348
4370
|
console.log(this.referenceQuestions);
|
|
4349
4371
|
}
|
|
4372
|
+
// VD 06-09-24 to call the quetionbook component
|
|
4373
|
+
openQuestionBookModal() {
|
|
4374
|
+
const viewContainerRef = this.dynamicHost.viewContainerRef;
|
|
4375
|
+
viewContainerRef.clear();
|
|
4376
|
+
const componentRef = viewContainerRef.createComponent(QuestionbookComponent);
|
|
4377
|
+
componentRef.instance.qbItem = this.qbRefrenceBook;
|
|
4378
|
+
componentRef.instance.questions = this.referenceQuestions;
|
|
4379
|
+
componentRef.instance.handleQuestion.subscribe((event) => this.handleQuestionEvent(event));
|
|
4380
|
+
}
|
|
4350
4381
|
generateCalendar() {
|
|
4351
4382
|
const year = this.currentDate.getFullYear();
|
|
4352
4383
|
const month = this.currentDate.getMonth();
|
|
@@ -4376,9 +4407,17 @@ class CustomCalendarComponent {
|
|
|
4376
4407
|
day.events = this.allEvents.filter(event => event.date.toDateString() === day.date.toDateString());
|
|
4377
4408
|
});
|
|
4378
4409
|
this.eventSelected.emit(this.allEvents);
|
|
4410
|
+
// VD 06Sep24 calendar changes
|
|
4411
|
+
let calendar = {};
|
|
4412
|
+
calendar['year'] = year;
|
|
4413
|
+
calendar['month'] = month + 1;
|
|
4414
|
+
console.log(calendar);
|
|
4415
|
+
this.dateSelected.emit(calendar);
|
|
4379
4416
|
}
|
|
4380
4417
|
selectDay(day) {
|
|
4381
4418
|
console.log(day);
|
|
4419
|
+
// VD 06Sep24 calendar changes
|
|
4420
|
+
this.showAppoinmentSection = true;
|
|
4382
4421
|
this.selectedDay = day;
|
|
4383
4422
|
// this.eventSelected.emit(day?.events);
|
|
4384
4423
|
const previouslySelectedDay = this.calendarDays.find(d => d.isSelected);
|
|
@@ -4389,11 +4428,14 @@ class CustomCalendarComponent {
|
|
|
4389
4428
|
day.isSelected = true;
|
|
4390
4429
|
}
|
|
4391
4430
|
previousMonth() {
|
|
4431
|
+
this.showAppoinmentSection = false;
|
|
4392
4432
|
this.currentDate.setMonth(this.currentDate.getMonth() - 1);
|
|
4393
4433
|
this.currentDate = new Date(this.currentDate); // Ensure the date object is updated
|
|
4394
4434
|
this.generateCalendar();
|
|
4395
4435
|
}
|
|
4396
4436
|
nextMonth() {
|
|
4437
|
+
// VD 06Sep24 calendar changes
|
|
4438
|
+
this.showAppoinmentSection = false;
|
|
4397
4439
|
this.currentDate.setMonth(this.currentDate.getMonth() + 1);
|
|
4398
4440
|
this.currentDate = new Date(this.currentDate); // Ensure the date object is updated
|
|
4399
4441
|
this.generateCalendar();
|
|
@@ -4403,47 +4445,94 @@ class CustomCalendarComponent {
|
|
|
4403
4445
|
this.calendarQuestion = this.referenceQuestions.map(q => ({ ...q, input: '' }));
|
|
4404
4446
|
this.referenceQuestions.forEach(ques => {
|
|
4405
4447
|
// clear the input
|
|
4406
|
-
if (ques.
|
|
4448
|
+
if (ques.Type__c == 'Dropdown') {
|
|
4449
|
+
delete ques.input;
|
|
4450
|
+
delete ques.selectedValue;
|
|
4451
|
+
// VD 06Sep24 calendar changes
|
|
4452
|
+
}
|
|
4453
|
+
else {
|
|
4407
4454
|
delete ques.input;
|
|
4408
4455
|
}
|
|
4409
4456
|
});
|
|
4410
4457
|
console.log(' console.log(this.referenceQuestions);');
|
|
4411
4458
|
console.log(this.referenceQuestions);
|
|
4412
4459
|
this.editingEventId = null;
|
|
4460
|
+
// Dynamically load the QuestionBookComponent
|
|
4461
|
+
this.openQuestionBookModal();
|
|
4413
4462
|
}
|
|
4414
|
-
|
|
4463
|
+
// VD 06Sep24 calendar changes
|
|
4464
|
+
editEvent(event, entryGroup) {
|
|
4415
4465
|
this.isModalOpen = true;
|
|
4416
|
-
|
|
4417
|
-
this.
|
|
4466
|
+
this.referenceQuestions = Object.values(entryGroup);
|
|
4467
|
+
this.calendarQuestion = [...this.referenceQuestions]; // Make a copy of the current entries to edit
|
|
4418
4468
|
this.editingEventId = event.id;
|
|
4419
|
-
this.
|
|
4469
|
+
this.editingEntryGroup = entryGroup; // Store the entry group being edited
|
|
4470
|
+
this.generateCalendar(); // Regenerate the calendar to reflect changes
|
|
4420
4471
|
}
|
|
4421
|
-
deleteEvent(
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4472
|
+
deleteEvent(eventId, entryGroup) {
|
|
4473
|
+
const event = this.allEvents.find(e => e.id === eventId);
|
|
4474
|
+
if (event) {
|
|
4475
|
+
// Find the index of the entryGroup to delete
|
|
4476
|
+
const entryIndex = event.entries.indexOf(entryGroup);
|
|
4477
|
+
if (entryIndex > -1) {
|
|
4478
|
+
event.entries.splice(entryIndex, 1); // Remove the specific entry
|
|
4479
|
+
}
|
|
4480
|
+
// If the event has no more entries, remove the event entirely
|
|
4481
|
+
if (event.entries.length === 0) {
|
|
4482
|
+
const eventIndex = this.allEvents.indexOf(event);
|
|
4483
|
+
if (eventIndex > -1) {
|
|
4484
|
+
this.allEvents.splice(eventIndex, 1); // Remove the entire event
|
|
4485
|
+
}
|
|
4486
|
+
}
|
|
4487
|
+
}
|
|
4488
|
+
this.generateCalendar(); // Regenerate the calendar to reflect the changes
|
|
4425
4489
|
}
|
|
4426
4490
|
closeModal() {
|
|
4427
4491
|
this.isModalOpen = false;
|
|
4428
4492
|
}
|
|
4493
|
+
// VD 06Sep24 calendar changes
|
|
4429
4494
|
addEvent(day, entryQues) {
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
};
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4495
|
+
// Transform new entries into the desired format
|
|
4496
|
+
const newEntries = entryQues.reduce((acc, q) => {
|
|
4497
|
+
acc[q.Id] = { ...q };
|
|
4498
|
+
return acc;
|
|
4499
|
+
}, {});
|
|
4500
|
+
// Find an existing event for the given date
|
|
4501
|
+
const existingEvent = day.events.find(event => event.date === day.date);
|
|
4502
|
+
if (existingEvent) {
|
|
4503
|
+
// Merge new entries into the existing event's entries array
|
|
4504
|
+
// Check if the entries array already contains an object with the same ID
|
|
4505
|
+
const existingEntries = existingEvent.entries.map(entry => ({ ...entry }));
|
|
4506
|
+
// Append new entries to the existing entries
|
|
4507
|
+
existingEntries.push(newEntries);
|
|
4508
|
+
existingEvent.entries = existingEntries;
|
|
4509
|
+
}
|
|
4510
|
+
else {
|
|
4511
|
+
// Create a new event if it doesn't exist for the given date
|
|
4512
|
+
const newEvent = {
|
|
4513
|
+
id: this.generateId(),
|
|
4514
|
+
date: day.date,
|
|
4515
|
+
entries: [newEntries] // Wrap the new entries in an array
|
|
4516
|
+
};
|
|
4517
|
+
day.events.push(newEvent);
|
|
4518
|
+
this.allEvents.push(newEvent);
|
|
4519
|
+
}
|
|
4440
4520
|
this.generateCalendar();
|
|
4521
|
+
console.log('allEvents', this.allEvents);
|
|
4441
4522
|
}
|
|
4523
|
+
// VD 06Sep24 calendar changes
|
|
4442
4524
|
onSave() {
|
|
4443
4525
|
if (this.editingEventId !== null) {
|
|
4444
4526
|
const event = this.allEvents.find(e => e.id === this.editingEventId);
|
|
4445
|
-
if (event) {
|
|
4446
|
-
|
|
4527
|
+
if (event && this.editingEntryGroup) {
|
|
4528
|
+
// Update the specific entry group within the event
|
|
4529
|
+
const entryIndex = event.entries.findIndex(entryGroup => entryGroup === this.editingEntryGroup);
|
|
4530
|
+
if (entryIndex > -1) {
|
|
4531
|
+
event.entries[entryIndex] = this.calendarQuestion.reduce((acc, q) => {
|
|
4532
|
+
acc[q.Id] = { ...q };
|
|
4533
|
+
return acc;
|
|
4534
|
+
}, {});
|
|
4535
|
+
}
|
|
4447
4536
|
}
|
|
4448
4537
|
}
|
|
4449
4538
|
else {
|
|
@@ -4472,21 +4561,34 @@ class CustomCalendarComponent {
|
|
|
4472
4561
|
console.log('calender question');
|
|
4473
4562
|
console.log(this.calendarQuestion);
|
|
4474
4563
|
}
|
|
4564
|
+
// VD 06Sep24 calendar changes
|
|
4475
4565
|
generateId() {
|
|
4476
4566
|
return '_' + Math.random().toString(36).substr(2, 9);
|
|
4477
4567
|
}
|
|
4568
|
+
getEntryKeys(entryGroup) {
|
|
4569
|
+
return Object.keys(entryGroup);
|
|
4570
|
+
}
|
|
4571
|
+
removeCharacters(questionText) {
|
|
4572
|
+
let updatedText = questionText?.replace(/<[^>]*>/g, '');
|
|
4573
|
+
return updatedText;
|
|
4574
|
+
}
|
|
4478
4575
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomCalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4479
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: CustomCalendarComponent, selector: "app-custom-calendar", inputs: { allEvents: "allEvents", question: "question" }, outputs: { eventSelected: "eventSelected" }, ngImport: i0, template: "<div class=\"align-calendar\">\n <div class=\"calendar-container\">\n
|
|
4576
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: CustomCalendarComponent, selector: "app-custom-calendar", inputs: { allEvents: "allEvents", question: "question" }, outputs: { eventSelected: "eventSelected", dateSelected: "dateSelected" }, viewQueries: [{ propertyName: "dynamicHost", first: true, predicate: ComponenthostDirective, descendants: true, static: true }], ngImport: i0, template: "<div class=\"align-calendar\">\n <div class=\"calendar-container\">\n <div class=\"calendar-header\">\n <button (click)=\"previousMonth()\"><< Previous >></button>\n <h3>{{ currentDate | date: 'MMMM yyyy' }}</h3>\n <button (click)=\"nextMonth()\"><< Next >></button>\n </div>\n <div class=\"calendar-grid\">\n <div class=\"day-of-week\" *ngFor=\"let day of daysOfWeek\">{{ day }}</div>\n\n <div\n class=\"calendar-day\"\n *ngFor=\"let day of calendarDays\"\n [class.not-current-month]=\"!day.isCurrentMonth\"\n [class.past]=\"day.isPast\"\n [class.today]=\"day.isToday\"\n [class.future]=\"day.isFuture\"\n [class.selected]=\"day.isSelected\"\n (click)=\"selectDay(day)\"\n >\n <div class=\"day-number\">{{ day.date.getDate() }}\n <span *ngIf=\"day.events.length > 0\" class=\"entry-indicator\" [class.select]=\"day.isSelected\"></span>\n </div>\n <!-- <div *ngFor=\"let event of day.events\" >\n <div *ngFor=\"let entryGroup of event.entries\" class=\"event\">\n <div *ngFor=\"let key of getEntryKeys(entryGroup)\">\n <div *ngIf=\"entryGroup[key].Type__c == 'Time'\">\n {{ entryGroup[key].input?.value | date: 'shortTime' }}\n </div>\n <div *ngIf=\"entryGroup[key].Type__c != 'Time'\">\n {{ entryGroup[key].input }}\n </div>\n </div>\n </div>\n </div> -->\n </div>\n </div>\n </div>\n <div class=\"appoinappointment\">\n <div class=\"appointments-container\">\n <h4>Add Appointment</h4>\n <button *ngIf=\"selectedDay\" (click)=\"addAppointment()\">Add</button>\n </div>\n <!--VD 06Sep24 calendar updates--> \n <div *ngIf=\"showAppoinmentSection && selectedDay?.events.length > 0\" class=\"appointments-container\">\n <h4>Appointments</h4>\n <div *ngFor=\"let event of selectedDay?.events\">\n <div class=\"event\" *ngFor=\"let entryGroup of event.entries\">\n <div class=\"event-info\">\n <div *ngFor=\"let key of getEntryKeys(entryGroup)\" class=\"entry-row\">\n <div *ngIf=\"entryGroup[key].Question_Text__c\" class=\"entry-text\">\n {{removeCharacters(entryGroup[key].Question_Text__c)}}:\n </div>\n <div class=\"entry-value\">\n <span *ngIf=\"entryGroup[key].Type__c != 'Time' && entryGroup[key].Type__c != 'Link'\">{{ entryGroup[key].input }}</span>\n <span *ngIf=\"entryGroup[key].Type__c == 'Time'\">{{ entryGroup[key].input | date: 'shortTime' }}</span>\n <span *ngIf=\"entryGroup[key].Type__c == 'Link'\">\n <a href=\"{{entryGroup[key].input}}\">{{removeCharacters(entryGroup[key].Question_Text__c)}}</a>\n </span>\n </div>\n </div>\n <div class=\"event-actions\">\n <button (click)=\"editEvent(event,entryGroup)\">Edit</button>\n <button (click)=\"deleteEvent(event.id,entryGroup)\">Delete</button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<app-custom-model\n [modalTitle]=\"modalTitle\"\n [isModalOpen]=\"isModalOpen\"\n [modalSize]=\"modalSize\"\n [saveButtonValue]=\"saveButtonValue\"\n [modalFooter]=\"modalFooter\"\n (saveButtonEmit)=\"onSave()\"\n (cancelButtonEmit)=\"onCancel()\"\n>\n<!-- VD 06-09-24 used directive file to call the questionbook beacasue to avoid cirecular issue-->\n<!-- <lib-questionbook [qbItem]=\"qbRefrenceBook\" [questions]=\"referenceQuestions\" (handleQuestion)=\"handleQuestionEvent($event)\"></lib-questionbook> -->\n<ng-template dynamicComponentHost ></ng-template>\n</app-custom-model>\n\n\n \n \n ", styles: [".calendar-container{flex:1}.appoinappointment{flex:1;margin-left:10px}.calendar-header{display:flex;justify-content:space-between;align-items:center}.selected{box-shadow:0 0 5px #00000080;background-color:green!important;color:#fff!important}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}.day-of-week{text-align:center;font-weight:700;padding:5px;background-color:#f0f0f0;border:1px solid #ccc}.calendar-day{border:1px solid #ccc;padding:5px;display:flex;flex-direction:column;align-items:flex-start;background-color:#fff;position:relative;cursor:pointer}.calendar-day.not-current-month{background-color:#f0f0f0}.calendar-day.past{color:#aaa}.calendar-day.today{background-color:#e6ffe6;font-weight:700}.calendar-day.future{color:#000}.day-number{font-size:1.2em;margin-bottom:5px}.event{background-color:#d1e7dd;border-left:4px solid #0f5132;margin:5px 0;padding:2px 5px;border-radius:3px}.event-title{font-weight:700}.event-time{font-size:.8em}input[type=text],input[type=time]{width:100%;margin-top:5px;box-sizing:border-box}button{margin-top:5px;align-self:stretch;margin-left:0!important}.calendar-header button{margin-top:5px;align-self:stretch;margin-left:0!important;border:none;background:none}.align-calendar{display:flex;width:100%}.form-group.content-box{padding-bottom:0!important}.entry-indicator{position:absolute;top:5px;right:5px;width:10px;height:10px;background-color:#0f5132;border-radius:50%}.select{background-color:#fff}.entry-row{display:flex;align-items:center;margin-bottom:5px}.entry-text{font-weight:700;margin-right:10px;white-space:nowrap}.entry-value{flex:1;word-break:break-word}.entry-value a{color:#4caf50}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: ComponenthostDirective, selector: "[dynamicComponentHost]" }, { kind: "component", type: CustomModelComponent, selector: "app-custom-model", inputs: ["modalTitle", "isModalOpen", "modalSize", "saveButtonValue", "modalFooter"], outputs: ["saveButtonEmit", "cancelButtonEmit"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }] });
|
|
4480
4577
|
}
|
|
4481
4578
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomCalendarComponent, decorators: [{
|
|
4482
4579
|
type: Component,
|
|
4483
|
-
args: [{ selector: 'app-custom-calendar', template: "<div class=\"align-calendar\">\n <div class=\"calendar-container\">\n
|
|
4580
|
+
args: [{ selector: 'app-custom-calendar', template: "<div class=\"align-calendar\">\n <div class=\"calendar-container\">\n <div class=\"calendar-header\">\n <button (click)=\"previousMonth()\"><< Previous >></button>\n <h3>{{ currentDate | date: 'MMMM yyyy' }}</h3>\n <button (click)=\"nextMonth()\"><< Next >></button>\n </div>\n <div class=\"calendar-grid\">\n <div class=\"day-of-week\" *ngFor=\"let day of daysOfWeek\">{{ day }}</div>\n\n <div\n class=\"calendar-day\"\n *ngFor=\"let day of calendarDays\"\n [class.not-current-month]=\"!day.isCurrentMonth\"\n [class.past]=\"day.isPast\"\n [class.today]=\"day.isToday\"\n [class.future]=\"day.isFuture\"\n [class.selected]=\"day.isSelected\"\n (click)=\"selectDay(day)\"\n >\n <div class=\"day-number\">{{ day.date.getDate() }}\n <span *ngIf=\"day.events.length > 0\" class=\"entry-indicator\" [class.select]=\"day.isSelected\"></span>\n </div>\n <!-- <div *ngFor=\"let event of day.events\" >\n <div *ngFor=\"let entryGroup of event.entries\" class=\"event\">\n <div *ngFor=\"let key of getEntryKeys(entryGroup)\">\n <div *ngIf=\"entryGroup[key].Type__c == 'Time'\">\n {{ entryGroup[key].input?.value | date: 'shortTime' }}\n </div>\n <div *ngIf=\"entryGroup[key].Type__c != 'Time'\">\n {{ entryGroup[key].input }}\n </div>\n </div>\n </div>\n </div> -->\n </div>\n </div>\n </div>\n <div class=\"appoinappointment\">\n <div class=\"appointments-container\">\n <h4>Add Appointment</h4>\n <button *ngIf=\"selectedDay\" (click)=\"addAppointment()\">Add</button>\n </div>\n <!--VD 06Sep24 calendar updates--> \n <div *ngIf=\"showAppoinmentSection && selectedDay?.events.length > 0\" class=\"appointments-container\">\n <h4>Appointments</h4>\n <div *ngFor=\"let event of selectedDay?.events\">\n <div class=\"event\" *ngFor=\"let entryGroup of event.entries\">\n <div class=\"event-info\">\n <div *ngFor=\"let key of getEntryKeys(entryGroup)\" class=\"entry-row\">\n <div *ngIf=\"entryGroup[key].Question_Text__c\" class=\"entry-text\">\n {{removeCharacters(entryGroup[key].Question_Text__c)}}:\n </div>\n <div class=\"entry-value\">\n <span *ngIf=\"entryGroup[key].Type__c != 'Time' && entryGroup[key].Type__c != 'Link'\">{{ entryGroup[key].input }}</span>\n <span *ngIf=\"entryGroup[key].Type__c == 'Time'\">{{ entryGroup[key].input | date: 'shortTime' }}</span>\n <span *ngIf=\"entryGroup[key].Type__c == 'Link'\">\n <a href=\"{{entryGroup[key].input}}\">{{removeCharacters(entryGroup[key].Question_Text__c)}}</a>\n </span>\n </div>\n </div>\n <div class=\"event-actions\">\n <button (click)=\"editEvent(event,entryGroup)\">Edit</button>\n <button (click)=\"deleteEvent(event.id,entryGroup)\">Delete</button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<app-custom-model\n [modalTitle]=\"modalTitle\"\n [isModalOpen]=\"isModalOpen\"\n [modalSize]=\"modalSize\"\n [saveButtonValue]=\"saveButtonValue\"\n [modalFooter]=\"modalFooter\"\n (saveButtonEmit)=\"onSave()\"\n (cancelButtonEmit)=\"onCancel()\"\n>\n<!-- VD 06-09-24 used directive file to call the questionbook beacasue to avoid cirecular issue-->\n<!-- <lib-questionbook [qbItem]=\"qbRefrenceBook\" [questions]=\"referenceQuestions\" (handleQuestion)=\"handleQuestionEvent($event)\"></lib-questionbook> -->\n<ng-template dynamicComponentHost ></ng-template>\n</app-custom-model>\n\n\n \n \n ", styles: [".calendar-container{flex:1}.appoinappointment{flex:1;margin-left:10px}.calendar-header{display:flex;justify-content:space-between;align-items:center}.selected{box-shadow:0 0 5px #00000080;background-color:green!important;color:#fff!important}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}.day-of-week{text-align:center;font-weight:700;padding:5px;background-color:#f0f0f0;border:1px solid #ccc}.calendar-day{border:1px solid #ccc;padding:5px;display:flex;flex-direction:column;align-items:flex-start;background-color:#fff;position:relative;cursor:pointer}.calendar-day.not-current-month{background-color:#f0f0f0}.calendar-day.past{color:#aaa}.calendar-day.today{background-color:#e6ffe6;font-weight:700}.calendar-day.future{color:#000}.day-number{font-size:1.2em;margin-bottom:5px}.event{background-color:#d1e7dd;border-left:4px solid #0f5132;margin:5px 0;padding:2px 5px;border-radius:3px}.event-title{font-weight:700}.event-time{font-size:.8em}input[type=text],input[type=time]{width:100%;margin-top:5px;box-sizing:border-box}button{margin-top:5px;align-self:stretch;margin-left:0!important}.calendar-header button{margin-top:5px;align-self:stretch;margin-left:0!important;border:none;background:none}.align-calendar{display:flex;width:100%}.form-group.content-box{padding-bottom:0!important}.entry-indicator{position:absolute;top:5px;right:5px;width:10px;height:10px;background-color:#0f5132;border-radius:50%}.select{background-color:#fff}.entry-row{display:flex;align-items:center;margin-bottom:5px}.entry-text{font-weight:700;margin-right:10px;white-space:nowrap}.entry-value{flex:1;word-break:break-word}.entry-value a{color:#4caf50}\n"] }]
|
|
4484
4581
|
}], propDecorators: { eventSelected: [{
|
|
4485
4582
|
type: Output
|
|
4583
|
+
}], dateSelected: [{
|
|
4584
|
+
type: Output
|
|
4486
4585
|
}], allEvents: [{
|
|
4487
4586
|
type: Input
|
|
4488
4587
|
}], question: [{
|
|
4489
4588
|
type: Input
|
|
4589
|
+
}], dynamicHost: [{
|
|
4590
|
+
type: ViewChild,
|
|
4591
|
+
args: [ComponenthostDirective, { static: true }]
|
|
4490
4592
|
}] } });
|
|
4491
4593
|
|
|
4492
4594
|
class SearchBoxComponent {
|
|
@@ -5056,8 +5158,9 @@ class CustomTimeComponent {
|
|
|
5056
5158
|
}
|
|
5057
5159
|
}
|
|
5058
5160
|
}
|
|
5161
|
+
// VD 06Sep24 emit exact time object
|
|
5059
5162
|
onTimeChange(event) {
|
|
5060
|
-
this.timeChange.emit(event);
|
|
5163
|
+
this.timeChange.emit(event?.value);
|
|
5061
5164
|
}
|
|
5062
5165
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomTimeComponent, deps: [{ token: I18nService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5063
5166
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: CustomTimeComponent, selector: "app-custom-time", inputs: { time: "time", readOnly: "readOnly", error: "error", errorMessage: "errorMessage" }, outputs: { timeChange: "timeChange" }, usesOnChanges: true, ngImport: i0, template: "<!-- time component -->\n<!-- // VD 12Jun24 - readonly change-->\n<!-- VD 01Aug24 - validation change-->\n <p>\n <input\n [class]=\"error ? 'invalid' : ''\"\n [(ngModel)]=\"timeSelected\"\n [owlDateTimeTrigger]=\"dt2\"\n [owlDateTime]=\"dt2\"\n placeholder=\"HH:MM\"\n [readOnly]=\"readOnly\" \n style=\"width: 100%; height: 35px; border: none; box-shadow: none; border-bottom: 1px solid #ccc;\"\n (dateTimeChange)=\"onTimeChange($event)\"\n >\n <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\n </p>\n <span *ngIf=\"error\" class=\"error-msg\">{{errorMessage}}</span>", styles: [".invalid{border-color:red!important}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4$1.OwlDateTimeTriggerDirective, selector: "[owlDateTimeTrigger]", inputs: ["disabled", "owlDateTimeTrigger"] }, { kind: "directive", type: i4$1.OwlDateTimeInputDirective, selector: "input[owlDateTime]", inputs: ["rangeSeparator", "owlDateTime", "owlDateTimeFilter", "min", "max", "selectMode", "value", "values", "_disabled"], outputs: ["dateTimeChange", "dateTimeInput"], exportAs: ["owlDateTimeInput"] }, { kind: "component", type: i4$1.OwlDateTimeComponent, selector: "owl-date-time", inputs: ["startAt", "pickerType", "pickerMode", "disabled", "opened", "backdropClass", "panelClass", "scrollStrategy"], outputs: ["afterPickerClosed", "afterPickerOpen", "yearSelected", "monthSelected"], exportAs: ["owlDateTime"] }] });
|
|
@@ -5258,6 +5361,7 @@ class QuestionbookComponent {
|
|
|
5258
5361
|
changeService;
|
|
5259
5362
|
storageService;
|
|
5260
5363
|
i18nService;
|
|
5364
|
+
cdr;
|
|
5261
5365
|
document;
|
|
5262
5366
|
qbItem;
|
|
5263
5367
|
questionItem;
|
|
@@ -5269,8 +5373,10 @@ class QuestionbookComponent {
|
|
|
5269
5373
|
handleDropDown = new EventEmitter();
|
|
5270
5374
|
handleQuestion = new EventEmitter(); // VD 19Jul01 - get updated question
|
|
5271
5375
|
dropDownData;
|
|
5376
|
+
dynamicHost;
|
|
5272
5377
|
subQuestions;
|
|
5273
5378
|
selectedFileData = [];
|
|
5379
|
+
loadComponent$ = new BehaviorSubject(false);
|
|
5274
5380
|
// HA 28DEC23 Added styling and logics to load the book type questions
|
|
5275
5381
|
qbRef;
|
|
5276
5382
|
// HA 19DEC23 Declaration for Salesforce Styling
|
|
@@ -5279,13 +5385,16 @@ class QuestionbookComponent {
|
|
|
5279
5385
|
bookStyle;
|
|
5280
5386
|
subscription;
|
|
5281
5387
|
hadleDropDownDependent = new EventEmitter();
|
|
5388
|
+
// VD 06Sep24 calendar changes
|
|
5389
|
+
handleCalendarDate = new EventEmitter();
|
|
5282
5390
|
bookQuestionsMap = new Map();
|
|
5283
|
-
constructor(sfService, dataService, changeService, storageService, i18nService, document) {
|
|
5391
|
+
constructor(sfService, dataService, changeService, storageService, i18nService, cdr, document) {
|
|
5284
5392
|
this.sfService = sfService;
|
|
5285
5393
|
this.dataService = dataService;
|
|
5286
5394
|
this.changeService = changeService;
|
|
5287
5395
|
this.storageService = storageService;
|
|
5288
5396
|
this.i18nService = i18nService;
|
|
5397
|
+
this.cdr = cdr;
|
|
5289
5398
|
this.document = document;
|
|
5290
5399
|
}
|
|
5291
5400
|
ngOnInit() {
|
|
@@ -5339,41 +5448,41 @@ class QuestionbookComponent {
|
|
|
5339
5448
|
qb['questionbook'].Style__c = this.qbItem.Style__c;
|
|
5340
5449
|
}
|
|
5341
5450
|
// Book type question styling
|
|
5342
|
-
qb['questionbook'].Style__c.labelClass = qb['questionbook'].Style__c
|
|
5343
|
-
qb['questionbook'].Style__c.labelStyle = qb['questionbook'].Style__c
|
|
5344
|
-
qb['questionbook'].Style__c.labelValueStyle = qb['questionbook'].
|
|
5345
|
-
qb['questionbook'].Style__c.inputClass = qb['questionbook'].Style__c
|
|
5346
|
-
qb['questionbook'].Style__c.inputStyle = qb['questionbook'].Style__c
|
|
5347
|
-
qb['questionbook'].Style__c.bookStyle = qb['questionbook'].Style__c
|
|
5348
|
-
qb['questionbook'].Style__c.showLabel = qb['questionbook'].Style__c
|
|
5349
|
-
qb['questionbook'].Style__c.questionStyle = qb['questionbook'].Style__c
|
|
5350
|
-
qb['langDirection'] = qb['questionbook'].Style__c.direction ? qb['questionbook'].Style__c
|
|
5451
|
+
qb['questionbook'].Style__c.labelClass = qb['questionbook'].Style__c?.labelClass ? qb['questionbook'].Style__c?.labelClass : "";
|
|
5452
|
+
qb['questionbook'].Style__c.labelStyle = qb['questionbook'].Style__c?.labelStyle ? qb['questionbook'].Style__c?.labelStyle : "";
|
|
5453
|
+
qb['questionbook'].Style__c.labelValueStyle = qb['questionbook'].Style__?.labelValueStyle ? qb['questionbook'].Style__c.labelValueStyle : "";
|
|
5454
|
+
qb['questionbook'].Style__c.inputClass = qb['questionbook'].Style__c?.inputClass ? qb['questionbook'].Style__c?.inputClass : "";
|
|
5455
|
+
qb['questionbook'].Style__c.inputStyle = qb['questionbook'].Style__c?.inputStyle ? qb['questionbook'].Style__c?.inputStyle : "";
|
|
5456
|
+
qb['questionbook'].Style__c.bookStyle = qb['questionbook'].Style__c?.bookStyle ? qb['questionbook'].Style__c?.bookStyle : "";
|
|
5457
|
+
qb['questionbook'].Style__c.showLabel = qb['questionbook'].Style__c?.showLabel ? qb['questionbook'].Style__c?.showLabel : true;
|
|
5458
|
+
qb['questionbook'].Style__c.questionStyle = qb['questionbook'].Style__c?.questionStyle ? qb['questionbook'].Style__c?.questionStyle : "";
|
|
5459
|
+
qb['langDirection'] = qb['questionbook'].Style__c.direction ? qb['questionbook'].Style__c?.direction : this.langDirection;
|
|
5351
5460
|
// Loop for each question in the book
|
|
5352
5461
|
qb['questionbook'].Questions__r.records.forEach(questionFromBook => {
|
|
5353
5462
|
questionFromBook.Style__c = questionFromBook.Style__c ? questionFromBook.Style__c : qb['questionbook'].Style__c;
|
|
5354
|
-
questionFromBook.Style__c.labelClass = questionFromBook.Style__c
|
|
5355
|
-
questionFromBook.Style__c.labelStyle = questionFromBook.Style__c
|
|
5356
|
-
questionFromBook.Style__c.labelValueStyle = questionFromBook.Style__c
|
|
5357
|
-
questionFromBook.Style__c.inputClass = questionFromBook.Style__c
|
|
5358
|
-
questionFromBook.Style__c.inputStyle = questionFromBook.Style__c
|
|
5359
|
-
questionFromBook.Style__c.bookStyle = questionFromBook.Style__c
|
|
5360
|
-
questionFromBook.Style__c.showLabel = questionFromBook.Style__c
|
|
5361
|
-
questionFromBook.Style__c.questionStyle = questionFromBook.Style__c
|
|
5362
|
-
questionFromBook['langDirection'] = questionFromBook.Style__c
|
|
5463
|
+
questionFromBook.Style__c.labelClass = questionFromBook.Style__c?.labelClass ? questionFromBook.Style__c?.labelClass : "";
|
|
5464
|
+
questionFromBook.Style__c.labelStyle = questionFromBook.Style__c?.labelStyle ? questionFromBook.Style__c?.labelStyle : "";
|
|
5465
|
+
questionFromBook.Style__c.labelValueStyle = questionFromBook.Style__c?.labelValueStyle ? questionFromBook.Style__c?.labelValueStyle : "";
|
|
5466
|
+
questionFromBook.Style__c.inputClass = questionFromBook.Style__c?.inputClass ? questionFromBook.Style__c?.inputClass : "";
|
|
5467
|
+
questionFromBook.Style__c.inputStyle = questionFromBook.Style__c?.inputStyle ? questionFromBook.Style__c?.inputStyle : "";
|
|
5468
|
+
questionFromBook.Style__c.bookStyle = questionFromBook.Style__c?.bookStyle ? questionFromBook.Style__c?.bookStyle : "";
|
|
5469
|
+
questionFromBook.Style__c.showLabel = questionFromBook.Style__c?.showLabel ? questionFromBook.Style__c?.showLabel : true;
|
|
5470
|
+
questionFromBook.Style__c.questionStyle = questionFromBook.Style__c?.questionStyle ? questionFromBook.Style__c?.questionStyle : "";
|
|
5471
|
+
questionFromBook['langDirection'] = questionFromBook.Style__c?.direction ? questionFromBook.Style__c?.direction : this.langDirection;
|
|
5363
5472
|
});
|
|
5364
5473
|
element['qbItem'] = qb['questionbook'];
|
|
5365
5474
|
}
|
|
5366
5475
|
}
|
|
5367
5476
|
element.Style__c = element.Style__c ? typeof element.Style__c === 'string' ? JSON.parse('' + element?.Style__c) : element?.Style__c : this.qbItem?.Style__c;
|
|
5368
|
-
element.Style__c.labelClass = element.Style__c
|
|
5369
|
-
element.Style__c.labelStyle = element.Style__c
|
|
5370
|
-
element.Style__c.labelValueStyle = element.Style__c
|
|
5371
|
-
element.Style__c.inputClass = element.Style__c
|
|
5372
|
-
element.Style__c.inputStyle = element.Style__c.inputStyle ? element.Style__c
|
|
5373
|
-
element.Style__c.bookStyle = element.Style__c
|
|
5374
|
-
element.Style__c.showLabel = element.Style__c
|
|
5375
|
-
element.Style__c.questionStyle = element.Style__c
|
|
5376
|
-
element['langDirection'] = element.Style__c
|
|
5477
|
+
element.Style__c.labelClass = element.Style__c?.labelClass ? element.Style__c?.labelClass : "";
|
|
5478
|
+
element.Style__c.labelStyle = element.Style__c?.labelStyle ? element.Style__c?.labelStyle : "";
|
|
5479
|
+
element.Style__c.labelValueStyle = element.Style__c?.labelValueStyle ? element.Style__c.labelValueStyle : "";
|
|
5480
|
+
element.Style__c.inputClass = element.Style__c?.inputClass ? element.Style__c?.inputClass : "";
|
|
5481
|
+
element.Style__c.inputStyle = element.Style__c.inputStyle ? element.Style__c?.inputStyle : "";
|
|
5482
|
+
element.Style__c.bookStyle = element.Style__c?.bookStyle ? element.Style__c?.bookStyle : "";
|
|
5483
|
+
element.Style__c.showLabel = element.Style__c?.showLabel ? element.Style__c?.showLabel : true;
|
|
5484
|
+
element.Style__c.questionStyle = element.Style__c?.questionStyle ? element.Style__c?.questionStyle : "";
|
|
5485
|
+
element['langDirection'] = element.Style__c?.direction ? element.Style__c?.direction : this.langDirection;
|
|
5377
5486
|
//VD 02Aug24 dependent field show/hide changes
|
|
5378
5487
|
if (element.Reference_Field__c) {
|
|
5379
5488
|
element.dependentRef = element.Reference_Field__c;
|
|
@@ -5414,6 +5523,10 @@ class QuestionbookComponent {
|
|
|
5414
5523
|
});
|
|
5415
5524
|
this.storageService.update(element);
|
|
5416
5525
|
}
|
|
5526
|
+
// VD 06-09-24 to call the calendar component
|
|
5527
|
+
if (element.Type__c === 'Calendar') {
|
|
5528
|
+
this.openCalendarComponent(element);
|
|
5529
|
+
}
|
|
5417
5530
|
});
|
|
5418
5531
|
this.subQuestions = [];
|
|
5419
5532
|
this.setSubQuestions(this.questions);
|
|
@@ -5469,55 +5582,51 @@ class QuestionbookComponent {
|
|
|
5469
5582
|
// console.log('inside QuestionbookComponent childEventCapture');
|
|
5470
5583
|
console.log(event);
|
|
5471
5584
|
this.changeService.announceChange(event);
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5585
|
+
if (ques) {
|
|
5586
|
+
if (ques.Type__c == 'Dropdown' || ques.Type__c == 'Radio') {
|
|
5587
|
+
// HA 19JAN24 Correction of dropdown values
|
|
5588
|
+
ques.selectedObj = event.valueObj ? event.valueObj : null;
|
|
5589
|
+
ques.input = event.selectedObj ? event.selectedObj : event.valueObj;
|
|
5590
|
+
ques.selectedValue = event.valueObj ? event.valueObj : null;
|
|
5591
|
+
// emit the dropdown data to parent
|
|
5592
|
+
dropdownData['event'] = event.valueObj;
|
|
5593
|
+
dropdownData['ques'] = ques;
|
|
5594
|
+
if (dropdownData['event']) {
|
|
5595
|
+
this.handleDropDown.emit(dropdownData);
|
|
5596
|
+
} // VD 21DEC23 - dependent field change
|
|
5597
|
+
}
|
|
5598
|
+
else if (ques.Type__c == 'Location') {
|
|
5599
|
+
ques.input = event.valueObj;
|
|
5600
|
+
ques.selectedValue = event.valueObj.address;
|
|
5601
|
+
}
|
|
5602
|
+
else if (ques.Type__c == 'File') {
|
|
5603
|
+
ques.input = this.selectedFileData = event;
|
|
5604
|
+
}
|
|
5605
|
+
else if (ques.Type__c == 'Date' || ques.Type__c == 'DateTime') { // HA 24JAN24 Converting Date and DateTime to UTC
|
|
5606
|
+
if (event.value) {
|
|
5607
|
+
let d = new Date(event.value);
|
|
5608
|
+
let utcString = d.toISOString();
|
|
5609
|
+
ques.input = utcString;
|
|
5610
|
+
}
|
|
5611
|
+
else {
|
|
5612
|
+
ques.input = '';
|
|
5613
|
+
}
|
|
5614
|
+
}
|
|
5615
|
+
else if (ques.Type__c == 'List') {
|
|
5616
|
+
// VD 20Aug24 handling the list type handle multiple object values
|
|
5617
|
+
ques.input = this.dataService.getValue(event.valueObj, event.field);
|
|
5497
5618
|
}
|
|
5498
5619
|
else {
|
|
5499
|
-
ques.input =
|
|
5620
|
+
ques.input = event;
|
|
5500
5621
|
}
|
|
5622
|
+
// validating error message
|
|
5623
|
+
const hasError = ques.Error_Message__c && ((ques.Type__c === 'File' && ques.input.length == 0) || (ques.Type__c != 'File' && !ques.input));
|
|
5624
|
+
ques.error = hasError ? new ErrorWrapper() : null;
|
|
5625
|
+
// Once the right value is stored in ques.input store the ques (with input) in storageService
|
|
5626
|
+
this.storageService.update(ques);
|
|
5627
|
+
// VD 19Jul01 - get updated question
|
|
5628
|
+
this.handleQuestion.emit(ques);
|
|
5501
5629
|
}
|
|
5502
|
-
else if (ques.Type__c == 'List') {
|
|
5503
|
-
// VD 20Aug24 handling the list type handle multiple object values
|
|
5504
|
-
ques.input = this.dataService.getValue(event.valueObj, event.field);
|
|
5505
|
-
}
|
|
5506
|
-
else {
|
|
5507
|
-
ques.input = event;
|
|
5508
|
-
}
|
|
5509
|
-
// validating error message
|
|
5510
|
-
const hasError = ques.Error_Message__c && ((ques.Type__c === 'File' && ques.input.length == 0) || (ques.Type__c != 'File' && !ques.input));
|
|
5511
|
-
ques.error = hasError ? new ErrorWrapper() : null;
|
|
5512
|
-
// if(ques.Is_Optional__c && !ques.input){
|
|
5513
|
-
// ques.error = new ErrorWrapper
|
|
5514
|
-
// }else{
|
|
5515
|
-
// ques.error = null;
|
|
5516
|
-
// }
|
|
5517
|
-
// Once the right value is stored in ques.input store the ques (with input) in storageService
|
|
5518
|
-
this.storageService.update(ques);
|
|
5519
|
-
// VD 19Jul01 - get updated question
|
|
5520
|
-
this.handleQuestion.emit(ques);
|
|
5521
5630
|
}
|
|
5522
5631
|
deleteFile(fileData) {
|
|
5523
5632
|
console.log('fileDATA', fileData);
|
|
@@ -5525,13 +5634,33 @@ class QuestionbookComponent {
|
|
|
5525
5634
|
getDropDown(event) {
|
|
5526
5635
|
this.hadleDropDownDependent.emit(event);
|
|
5527
5636
|
}
|
|
5528
|
-
|
|
5529
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: QuestionbookComponent, selector: "lib-questionbook", inputs: { qbItem: "qbItem", questionItem: "questionItem", translatedQuestions: "translatedQuestions", questions: "questions", errorFieldId: "errorFieldId", labelValue: "labelValue", token: "token", dropDownData: "dropDownData" }, outputs: { handleDropDown: "handleDropDown", handleQuestion: "handleQuestion", hadleDropDownDependent: "hadleDropDownDependent" }, ngImport: i0, template: "<!-- HA 20DEC23 Book Style from salesforce -->\n<!-- HA 28DEC23 Removed IsShengel(removal of shengel values applies for this reason) and direct styling of books to avoid styling issues-->\n<!-- HA 18JAN24 Added class for styling -->\n<div [style]=\"bookStyle\" class=\"content-box form-group\">\n <div class=\"form-row\">\n <!-- HA 20DEC23 Directive and Question Style from salesforce -->\n <div\n [class]=\"'col-lg-' + ques.Size__c + ' paddingnone'\"\n *ngFor=\"let ques of questions;let i = index\" [id]=\"ques.Id\" [dir]=\"ques.langDirection\" [style]=\"ques?.Style__c?.questionStyle\">\n <!-- Sub Question Label -->\n <!-- HA 20DEC23 Label Style from salesforce -->\n <!-- VD 09May24 is hide field change-->\n <div *ngIf=\"!ques.Is_Hide__c\">\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\n\n </div>\n <!-- VD 20JUN24 - help text changes-->\n <!-- VD 01Aug24 - validation change-->\n <!-- // VD 02Aug24 - label value style-->\n <div [ngClass]=\"{ down2: qbItem?.Progress_Bar__c }\" *ngIf=\"ques.Style__c.showLabel\" [style]=\"ques.Style__c.labelStyle\">\n <span [class]=\"'dis-flex shengel-myt-font3 myt-font7 '\" [style]=\"ques.Style__c.labelValueStyle\">{{ ques?.Question_Text__c }} \n <div *ngIf=\"ques.Is_Optional__c\" style=\"color: red;\">*</div>\n <div *ngIf=\"ques.Question_Text__c && ques?.Help_Text__c\" class=\"icon\" [matTooltip]=\"ques?.Help_Text__c\">i</div></span>\n </div>\n <!-- // VD 12Jun24 - readonly change-->\n <!-- DateTime -->\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\n <app-custom-date-picker [minDate]=\"ques.minDate\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" [date]=\"ques.input\" (dateChange)=\"childEventCapture($event, ques)\">\n </app-custom-date-picker>\n </div>\n\n <!-- Date-->\n <div *ngIf=\"ques.Type__c === 'Date'\">\n <app-custom-date [date]=\"ques.input\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" (dateChange)=\"childEventCapture($event, ques)\">\n </app-custom-date>\n </div>\n\n <!-- Time-->\n <div *ngIf=\"ques.Type__c === 'Time'\">\n <app-custom-time [time]=\"ques.input\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" (timeChange)=\"childEventCapture($event, ques)\">\n </app-custom-time>\n </div>\n <!-- calendar -->\n <div *ngIf=\"ques.Type__c === 'Calendar'\">\n <app-custom-calendar [question]=\"ques\" (eventSelected)=\"childEventCapture($event, ques)\"></app-custom-calendar>\n </div>\n\n <!-- Text -->\n <div *ngIf=\"ques.Type__c === 'Text'\">\n <app-custom-input [value]=\"ques.input\" [ngClassValue]=\"{\n 'dis-flex dt-line date-line bookText boxoutline myt-font1': qbItem.Progress_Bar__c,\n textBox: !qbItem.Progress_Bar__c\n }\" [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [idValue]=\"ques.Tracking_ID__c\" [focusEvent]=\"clearSQError(ques.Id)\"\n [error]=\"ques.error\" [placeholder]=\"ques.Question__c\" (inputValue)=\"childEventCapture($event, ques)\">\n </app-custom-input>\n </div>\n \n <!-- for pick location -->\n <!-- VD 21DEC23 - dependent field change -->\n <div *ngIf=\"ques.Type__c === 'Location'\">\n <!-- HA10012024 Added Api key as input -->\n <app-pick-location [apiKey]=\"qbItem['Api_Key__c']\" [address]=\"ques.selectedValue\" [question]=\"ques\" (locationSelected)=\"childEventCapture($event, ques)\">\n </app-pick-location>\n </div>\n\n <!-- for text area -->\n <div *ngIf=\"ques.Type__c === 'TextArea'\">\n <app-custom-text-area [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [value]=\"ques.input\" [rows]=\"3\" [error]=\"ques.error\" [placeholder]=\"ques.Question__c \"\n (textareaValueChange)=\"childEventCapture($event, ques)\"></app-custom-text-area>\n </div>\n\n <!-- Email -->\n <div *ngIf=\"ques.Type__c === 'Email'\">\n <input type=\"email\" readOnly=\"ques.Read_Only__c\" [(ngModel)]=\"ques.input\" [id]=\"ques.Id\" required=\"\" (focus)=\"clearSQError(ques.Id)\"\n style.border-color=\"{{ ques.error ? 'red' : '' }}\" placeholder=\"{{ ques.Question__c }}\" />\n </div>\n\n <!-- Table -->\n <div *ngIf=\"ques.Type__c === 'Table'\" class=\"\">\n <app-custom-table [question]=\"ques\" [apiMeta]=\"ques.Sub_Text__c\" (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-table>\n </div>\n\n <!-- Table Appendix -->\n <div *ngIf=\"ques.Type__c === 'TableAppendix'\" class=\"\">\n <app-table-appendix [question]=\"ques\" (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-table-appendix>\n </div>\n <!-- list -->\n <!-- VD 20Aug24 used correct attribute -->\n <div *ngIf=\"ques.Type__c === 'List'\" class=\"\">\n <lib-search-box [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [placeHolderText]=\"ques.Question__c\" [filterName]=\"ques.input\" (searchValueChange)=\"childEventCapture($event, ques)\">\n </lib-search-box>\n </div>\n\n <!-- Dropdown -->\n <!-- HA 09FEB24 Added condition of sqOption to the dropdown -->\n <div *ngIf=\"ques.Type__c === 'Dropdown' && ques?.Question_Options__r?.records\" class=\"\">\n <!-- HA 20DEC23 For Translation --> <!-- VD 19JAN24 - getting token as input -->\n <app-custom-dropdown [options]=\"ques.Question_Options__r.records\" [token]=\"token\"\n [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [selectedValue]=\"ques.selectedValue\" placeholder=\"---{{'select' | i18n:i18nService.currentLanguage}}---\"\n [errorMessage]=\"ques.Error_Message__c\" [error]=\"ques.error\"\n [referenceField]=\"ques.Reference_Field__c\"\n [readOnly]=\"ques.Read_Only__c\"\n (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-dropdown>\n <i class=\"fa fa-check \" aria-hidden=\"true\" *ngIf=\"ques?.input?.length > 0\"></i>\n </div>\n <!-- // VD 02Aug24 custom-radio component -->\n <div *ngIf=\"ques.Type__c === 'Radio' && ques?.Question_Options__r?.records\" class=\"\">\n <app-custom-radio [options]=\"ques.Question_Options__r.records\" [token]=\"token\"\n [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [selectedValue]=\"ques.selectedValue\"\n [errorMessage]=\"ques.Error_Message__c\" [error]=\"ques.error\"\n [referenceField]=\"ques.Reference_Field__c\"\n [readOnly]=\"ques.Read_Only__c\"\n (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-radio>\n </div>\n\n <!-- Attachment / Files -->\n <div *ngIf=\"ques.Type__c === 'File'\" class=\"\">\n <app-file-upload [limitFileUploading]=\"5\" [error]=\"ques.error\" [question]=\"ques\" [allFiles]=\"ques.input\" [tableFile]=\"false\"\n (selectedFileData)=\"childEventCapture($event, ques)\" (deletedFileData)=\"deleteFile($event)\"\n [isDeleteFileButtonVisible]=\"true\"></app-file-upload>\n </div>\n <div *ngIf=\"ques.Type__c === 'PopUpMessage'\" class=\"\">\n <app-dependent-table [alertMessage]=\"ques.Error_Message__c\">\n </app-dependent-table>\n </div>\n <div *ngIf=\"ques.Type__c === 'Label'\" class=\"\">\n <app-custom-label [labelStyle]=\"ques.Title__c\" [labelValue]=\"ques.Question__c\">\n </app-custom-label>\n </div>\n <!-- // VD 02Aug24 image component -->\n <div *ngIf=\"ques.Type__c === 'Image'\" class=\"\">\n <app-custom-image [question]=\"ques\">\n </app-custom-image>\n </div>\n <!-- 08NOV23 - button type question added -->\n <!-- Button -->\n <div *ngIf=\"ques.Type__c === 'Button'\" class=\"\">\n <app-custom-button [height]=\"'50px'\" \n [width]=\"'150px'\" \n [buttonText]=\"ques?.Question__c\"\n [value]=\"ques?.Question__c\"\n (buttonValue)=\"childEventCapture($event, ques)\"\n >\n </app-custom-button>\n </div>\n <!-- HA 20DEC23 This is to load book type questions-->\n <div *ngIf=\"ques.Type__c === 'Book'\">\n <!-- HA 09FEB24 Added ternary operator -->\n <lib-questionbook [qbItem]=\"ques.qbItem\" [labelValue]=\"labelValue\" [questions]=\"ques.qbItem?.Questions__r?.records\" (handleDropDown)=\"getDropDown($event)\"></lib-questionbook>\n </div>\n </div>\n </div>\n </div>", styles: [".col-lg-6{width:100%}.myt-font7{display:flex;justify-content:flex-start;align-items:center}.icon{display:inline-block;width:15px;height:15px;border-radius:50%;background-color:#08010177;color:#fff;text-align:center;line-height:16px;font-size:11px;font-family:Arial,sans-serif;font-weight:700;margin-left:5px}@media (min-width: 1200px){.col-lg-6{width:50%!important}.form-row{display:flex;flex-wrap:wrap}}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i9$1.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "component", type: PickLocationComponent, selector: "app-pick-location", inputs: ["address", "question", "apiKey"], outputs: ["locationSelected"] }, { kind: "component", type: CustomInputComponent, selector: "app-custom-input", inputs: ["value", "question", "disabled", "placeholder", "error", "fromShengel", "readOnly", "ngClassValue", "idValue", "focusEvent"], outputs: ["inputValue"] }, { kind: "component", type: CustomTextAreaComponent, selector: "app-custom-text-area", inputs: ["value", "placeholder", "rows", "error", "question", "readOnly"], outputs: ["textareaValueChange"] }, { kind: "component", type: CustomTableComponent, selector: "app-custom-table", inputs: ["question", "apiMeta"], outputs: ["valueChange"] }, { kind: "component", type: CustomCalendarComponent, selector: "app-custom-calendar", inputs: ["allEvents", "question"], outputs: ["eventSelected"] }, { kind: "component", type: CustomDatePickerComponent, selector: "app-custom-date-picker", inputs: ["date", "minDate", "maxDate", "error", "errorMessage", "readOnly"], outputs: ["dateChange"] }, { kind: "component", type: CustomDropdownComponent, selector: "app-custom-dropdown", inputs: ["options", "placeholder", "apiMeta", "selectedValue", "progressBar", "id", "readOnly", "errorMessage", "error", "fromShengel", "referenceField", "token"], outputs: ["valueChange"] }, { kind: "component", type: SearchBoxComponent, selector: "lib-search-box", inputs: ["placeHolderText", "question", "apiMeta", "id", "readOnly", "filterName"], outputs: ["searchValueChange"] }, { kind: "component", type: QuestionbookComponent, selector: "lib-questionbook", inputs: ["qbItem", "questionItem", "translatedQuestions", "questions", "errorFieldId", "labelValue", "token", "dropDownData"], outputs: ["handleDropDown", "handleQuestion", "hadleDropDownDependent"] }, { kind: "component", type: FileUploadComponent, selector: "app-file-upload", inputs: ["allFiles", "limitFileUploading", "isDeleteFileButtonVisible", "isShowNoFileIcon", "tableFile", "question", "error"], outputs: ["selectedFileData", "deletedFileData"] }, { kind: "component", type: DependentTableComponent, selector: "app-dependent-table", inputs: ["alertMessage"] }, { kind: "component", type: CustomLabelComponent, selector: "app-custom-label", inputs: ["labelValue", "labelStyle"] }, { kind: "component", type: TableAppendixComponent, selector: "app-table-appendix", inputs: ["question"], outputs: ["valueChange"] }, { kind: "component", type: CustomDateComponent, selector: "app-custom-date", inputs: ["date", "readOnly", "error", "errorMessage"], outputs: ["dateChange"] }, { kind: "component", type: CustomTimeComponent, selector: "app-custom-time", inputs: ["time", "readOnly", "error", "errorMessage"], outputs: ["timeChange"] }, { kind: "component", type: CustomButtonComponent, selector: "app-custom-button", inputs: ["height", "width", "textColor", "buttonText", "value", "backgroundColor"], outputs: ["buttonValue"] }, { kind: "component", type: CustomImageComponent, selector: "app-custom-image", inputs: ["alt", "src", "imageStyle", "question"] }, { kind: "component", type: CustomRadioComponent, selector: "app-custom-radio", inputs: ["options", "apiMeta", "selectedValue", "progressBar", "id", "readOnly", "errorMessage", "error", "fromShengel", "referenceField", "token"], outputs: ["valueChange"] }, { kind: "pipe", type: I18nPipe, name: "i18n" }] });
|
|
5637
|
+
// VD 06Sep24 calendar changes
|
|
5638
|
+
getCurrentCalendar(event) {
|
|
5639
|
+
this.handleCalendarDate.emit(event);
|
|
5640
|
+
}
|
|
5641
|
+
// VD 06Sep24 remove the special charecters and tags
|
|
5642
|
+
// from the questionText
|
|
5643
|
+
removeCharacters(questionText) {
|
|
5644
|
+
let updatedText = questionText?.replace(/<[^>]*>/g, '');
|
|
5645
|
+
return updatedText;
|
|
5646
|
+
}
|
|
5647
|
+
openCalendarComponent(ques) {
|
|
5648
|
+
const viewContainerRef = this.dynamicHost.viewContainerRef;
|
|
5649
|
+
if (viewContainerRef) {
|
|
5650
|
+
viewContainerRef.clear();
|
|
5651
|
+
const componentRef = viewContainerRef.createComponent(CustomCalendarComponent);
|
|
5652
|
+
componentRef.instance.question = ques;
|
|
5653
|
+
componentRef.instance.eventSelected.subscribe((event) => this.childEventCapture(event));
|
|
5654
|
+
componentRef.instance.dateSelected.subscribe((event) => this.getCurrentCalendar(event));
|
|
5655
|
+
}
|
|
5656
|
+
}
|
|
5657
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: QuestionbookComponent, deps: [{ token: SalesforceService }, { token: DataService }, { token: ChangeService }, { token: StorageService }, { token: I18nService }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
|
|
5658
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: QuestionbookComponent, selector: "lib-questionbook", inputs: { qbItem: "qbItem", questionItem: "questionItem", translatedQuestions: "translatedQuestions", questions: "questions", errorFieldId: "errorFieldId", labelValue: "labelValue", token: "token", dropDownData: "dropDownData" }, outputs: { handleDropDown: "handleDropDown", handleQuestion: "handleQuestion", hadleDropDownDependent: "hadleDropDownDependent", handleCalendarDate: "handleCalendarDate" }, viewQueries: [{ propertyName: "dynamicHost", first: true, predicate: ComponenthostDirective, descendants: true, static: true }], ngImport: i0, template: "<!-- HA 20DEC23 Book Style from salesforce -->\n<!-- HA 28DEC23 Removed IsShengel(removal of shengel values applies for this reason) and direct styling of books to avoid styling issues-->\n<!-- HA 18JAN24 Added class for styling -->\n<div [style]=\"bookStyle\" class=\"content-box form-group\">\n <div class=\"form-row\">\n <!-- HA 20DEC23 Directive and Question Style from salesforce -->\n <div\n [class]=\"'col-lg-' + ques.Size__c + ' paddingnone'\"\n *ngFor=\"let ques of questions;let i = index\" [id]=\"ques.Id\" [dir]=\"ques.langDirection\" [style]=\"ques?.Style__c?.questionStyle\">\n <!-- Sub Question Label -->\n <!-- HA 20DEC23 Label Style from salesforce -->\n <!-- VD 09May24 is hide field change-->\n <div *ngIf=\"!ques.Is_Hide__c\">\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\n\n </div>\n <!-- VD 20JUN24 - help text changes-->\n <!-- VD 01Aug24 - validation change-->\n <!-- // VD 02Aug24 - label value style-->\n <div [ngClass]=\"{ down2: qbItem?.Progress_Bar__c }\" *ngIf=\"ques.Style__c?.showLabel ? ques.Style__c?.showLabel : true\" [style]=\"ques.Style__c?.labelStyle\">\n <span [class]=\"'dis-flex shengel-myt-font3 myt-font7 '\" [style]=\"ques.Style__c?.labelValueStyle\">{{ removeCharacters(ques?.Question_Text__c) }} \n <div *ngIf=\"ques.Is_Optional__c\" style=\"color: red;\">*</div>\n <div *ngIf=\"ques.Question_Text__c && ques?.Help_Text__c\" class=\"icon\" [matTooltip]=\"ques?.Help_Text__c\">i</div></span>\n </div>\n <!-- // VD 12Jun24 - readonly change-->\n <!-- DateTime -->\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\n <app-custom-date-picker [minDate]=\"ques.minDate\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" [date]=\"ques.input\" (dateChange)=\"childEventCapture($event, ques)\">\n </app-custom-date-picker>\n </div>\n\n <!-- Date-->\n <div *ngIf=\"ques.Type__c === 'Date'\">\n <app-custom-date [date]=\"ques.input\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" (dateChange)=\"childEventCapture($event, ques)\">\n </app-custom-date>\n </div>\n\n <!-- Time-->\n <div *ngIf=\"ques.Type__c === 'Time'\">\n <app-custom-time [time]=\"ques.input\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" (timeChange)=\"childEventCapture($event, ques)\">\n </app-custom-time>\n </div>\n <!-- calendar -->\n <div *ngIf=\"ques.Type__c === 'Calendar'\">\n <!-- <app-custom-calendar [question]=\"ques\" (eventSelected)=\"childEventCapture($event, ques)\" (dateSelected)=\"getCurrentCalendar($event)\"></app-custom-calendar> -->\n </div>\n <!-- Text -->\n <div *ngIf=\"ques.Type__c === 'Text' || ques.Type__c === 'Link'\" >\n <app-custom-input [value]=\"ques.input\" [ngClassValue]=\"{\n 'dis-flex dt-line date-line bookText boxoutline myt-font1': qbItem.Progress_Bar__c,\n textBox: !qbItem.Progress_Bar__c\n }\" [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [idValue]=\"ques.Tracking_ID__c\" [focusEvent]=\"clearSQError(ques.Id)\"\n [error]=\"ques.error\" [placeholder]=\"ques.Question__c\" (inputValue)=\"childEventCapture($event, ques)\">\n </app-custom-input>\n </div>\n \n <!-- for pick location -->\n <!-- VD 21DEC23 - dependent field change -->\n <div *ngIf=\"ques.Type__c === 'Location'\">\n <!-- HA10012024 Added Api key as input -->\n <app-pick-location [apiKey]=\"qbItem['Api_Key__c']\" [address]=\"ques.selectedValue\" [question]=\"ques\" (locationSelected)=\"childEventCapture($event, ques)\">\n </app-pick-location>\n </div>\n\n <!-- for text area -->\n <div *ngIf=\"ques.Type__c === 'TextArea'\">\n <app-custom-text-area [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [value]=\"ques.input\" [rows]=\"3\" [error]=\"ques.error\" [placeholder]=\"ques.Question__c \"\n (textareaValueChange)=\"childEventCapture($event, ques)\"></app-custom-text-area>\n </div>\n\n <!-- Email -->\n <div *ngIf=\"ques.Type__c === 'Email'\">\n <input type=\"email\" readOnly=\"ques.Read_Only__c\" [(ngModel)]=\"ques.input\" [id]=\"ques.Id\" required=\"\" (focus)=\"clearSQError(ques.Id)\"\n style.border-color=\"{{ ques.error ? 'red' : '' }}\" placeholder=\"{{ ques.Question__c }}\" />\n </div>\n\n <!-- Table -->\n <div *ngIf=\"ques.Type__c === 'Table'\" class=\"\">\n <app-custom-table [question]=\"ques\" [apiMeta]=\"ques.Sub_Text__c\" (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-table>\n </div>\n\n <!-- Table Appendix -->\n <div *ngIf=\"ques.Type__c === 'TableAppendix'\" class=\"\">\n <app-table-appendix [question]=\"ques\" (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-table-appendix>\n </div>\n <!-- list -->\n <!-- VD 20Aug24 used correct attribute -->\n <div *ngIf=\"ques.Type__c === 'List'\" class=\"\">\n <lib-search-box [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [placeHolderText]=\"ques.Question__c\" [filterName]=\"ques.input\" (searchValueChange)=\"childEventCapture($event, ques)\">\n </lib-search-box>\n </div>\n\n <!-- Dropdown -->\n <!-- HA 09FEB24 Added condition of sqOption to the dropdown -->\n <div *ngIf=\"ques.Type__c === 'Dropdown' && ques?.Question_Options__r?.records\" class=\"\">\n <!-- HA 20DEC23 For Translation --> <!-- VD 19JAN24 - getting token as input -->\n <app-custom-dropdown [options]=\"ques.Question_Options__r.records\" [token]=\"token\"\n [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [selectedValue]=\"ques.selectedValue\" placeholder=\"---{{'select' | i18n:i18nService.currentLanguage}}---\"\n [errorMessage]=\"ques.Error_Message__c\" [error]=\"ques.error\"\n [referenceField]=\"ques.Reference_Field__c\"\n [readOnly]=\"ques.Read_Only__c\"\n (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-dropdown>\n <i class=\"fa fa-check \" aria-hidden=\"true\" *ngIf=\"ques?.input?.length > 0\"></i>\n </div>\n <!-- // VD 02Aug24 custom-radio component -->\n <div *ngIf=\"ques.Type__c === 'Radio' && ques?.Question_Options__r?.records\" class=\"\">\n <app-custom-radio [options]=\"ques.Question_Options__r.records\" [token]=\"token\"\n [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [selectedValue]=\"ques.selectedValue\"\n [errorMessage]=\"ques.Error_Message__c\" [error]=\"ques.error\"\n [referenceField]=\"ques.Reference_Field__c\"\n [readOnly]=\"ques.Read_Only__c\"\n (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-radio>\n </div>\n\n <!-- Attachment / Files -->\n <div *ngIf=\"ques.Type__c === 'File'\" class=\"\">\n <app-file-upload [limitFileUploading]=\"5\" [error]=\"ques.error\" [question]=\"ques\" [allFiles]=\"ques.input\" [tableFile]=\"false\"\n (selectedFileData)=\"childEventCapture($event, ques)\" (deletedFileData)=\"deleteFile($event)\"\n [isDeleteFileButtonVisible]=\"true\"></app-file-upload>\n </div>\n <div *ngIf=\"ques.Type__c === 'PopUpMessage'\" class=\"\">\n <app-dependent-table [alertMessage]=\"ques.Error_Message__c\">\n </app-dependent-table>\n </div>\n <div *ngIf=\"ques.Type__c === 'Label'\" class=\"\">\n <app-custom-label [labelStyle]=\"ques.Title__c\" [labelValue]=\"ques.Question__c\">\n </app-custom-label>\n </div>\n <!-- // VD 02Aug24 image component -->\n <div *ngIf=\"ques.Type__c === 'Image'\" class=\"\">\n <app-custom-image [question]=\"ques\">\n </app-custom-image>\n </div>\n <!-- 08NOV23 - button type question added -->\n <!-- Button -->\n <div *ngIf=\"ques.Type__c === 'Button'\" class=\"\">\n <app-custom-button [height]=\"'50px'\" \n [width]=\"'150px'\" \n [buttonText]=\"ques?.Question__c\"\n [value]=\"ques?.Question__c\"\n (buttonValue)=\"childEventCapture($event, ques)\"\n >\n </app-custom-button>\n </div>\n <!-- HA 20DEC23 This is to load book type questions-->\n <div *ngIf=\"ques.Type__c === 'Book'\">\n <!-- HA 09FEB24 Added ternary operator -->\n <lib-questionbook [qbItem]=\"ques.qbItem\" [labelValue]=\"labelValue\" [questions]=\"ques.qbItem?.Questions__r?.records\" (handleDropDown)=\"getDropDown($event)\"></lib-questionbook>\n </div>\n </div>\n </div>\n </div>\n\n <!-- 06-09-24 for calendar type-->\n<ng-template dynamicComponentHost></ng-template>", styles: [".col-lg-6{width:100%}.myt-font7{display:flex;justify-content:flex-start;align-items:center}.icon{display:inline-block;width:15px;height:15px;border-radius:50%;background-color:#08010177;color:#fff;text-align:center;line-height:16px;font-size:11px;font-family:Arial,sans-serif;font-weight:700;margin-left:5px}@media (min-width: 1200px){.col-lg-6{width:50%!important}.form-row{display:flex;flex-wrap:wrap}}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ComponenthostDirective, selector: "[dynamicComponentHost]" }, { kind: "directive", type: i9$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i10.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "component", type: PickLocationComponent, selector: "app-pick-location", inputs: ["address", "question", "apiKey"], outputs: ["locationSelected"] }, { kind: "component", type: CustomInputComponent, selector: "app-custom-input", inputs: ["value", "question", "disabled", "placeholder", "error", "fromShengel", "readOnly", "ngClassValue", "idValue", "focusEvent"], outputs: ["inputValue"] }, { kind: "component", type: CustomTextAreaComponent, selector: "app-custom-text-area", inputs: ["value", "placeholder", "rows", "error", "question", "readOnly"], outputs: ["textareaValueChange"] }, { kind: "component", type: CustomTableComponent, selector: "app-custom-table", inputs: ["question", "apiMeta"], outputs: ["valueChange"] }, { kind: "component", type: CustomDatePickerComponent, selector: "app-custom-date-picker", inputs: ["date", "minDate", "maxDate", "error", "errorMessage", "readOnly"], outputs: ["dateChange"] }, { kind: "component", type: CustomDropdownComponent, selector: "app-custom-dropdown", inputs: ["options", "placeholder", "apiMeta", "selectedValue", "progressBar", "id", "readOnly", "errorMessage", "error", "fromShengel", "referenceField", "token"], outputs: ["valueChange"] }, { kind: "component", type: SearchBoxComponent, selector: "lib-search-box", inputs: ["placeHolderText", "question", "apiMeta", "id", "readOnly", "filterName"], outputs: ["searchValueChange"] }, { kind: "component", type: QuestionbookComponent, selector: "lib-questionbook", inputs: ["qbItem", "questionItem", "translatedQuestions", "questions", "errorFieldId", "labelValue", "token", "dropDownData"], outputs: ["handleDropDown", "handleQuestion", "hadleDropDownDependent", "handleCalendarDate"] }, { kind: "component", type: FileUploadComponent, selector: "app-file-upload", inputs: ["allFiles", "limitFileUploading", "isDeleteFileButtonVisible", "isShowNoFileIcon", "tableFile", "question", "error"], outputs: ["selectedFileData", "deletedFileData"] }, { kind: "component", type: DependentTableComponent, selector: "app-dependent-table", inputs: ["alertMessage"] }, { kind: "component", type: CustomLabelComponent, selector: "app-custom-label", inputs: ["labelValue", "labelStyle"] }, { kind: "component", type: TableAppendixComponent, selector: "app-table-appendix", inputs: ["question"], outputs: ["valueChange"] }, { kind: "component", type: CustomDateComponent, selector: "app-custom-date", inputs: ["date", "readOnly", "error", "errorMessage"], outputs: ["dateChange"] }, { kind: "component", type: CustomTimeComponent, selector: "app-custom-time", inputs: ["time", "readOnly", "error", "errorMessage"], outputs: ["timeChange"] }, { kind: "component", type: CustomButtonComponent, selector: "app-custom-button", inputs: ["height", "width", "textColor", "buttonText", "value", "backgroundColor"], outputs: ["buttonValue"] }, { kind: "component", type: CustomImageComponent, selector: "app-custom-image", inputs: ["alt", "src", "imageStyle", "question"] }, { kind: "component", type: CustomRadioComponent, selector: "app-custom-radio", inputs: ["options", "apiMeta", "selectedValue", "progressBar", "id", "readOnly", "errorMessage", "error", "fromShengel", "referenceField", "token"], outputs: ["valueChange"] }, { kind: "pipe", type: I18nPipe, name: "i18n" }] });
|
|
5530
5659
|
}
|
|
5531
5660
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: QuestionbookComponent, decorators: [{
|
|
5532
5661
|
type: Component,
|
|
5533
|
-
args: [{ selector: 'lib-questionbook', template: "<!-- HA 20DEC23 Book Style from salesforce -->\n<!-- HA 28DEC23 Removed IsShengel(removal of shengel values applies for this reason) and direct styling of books to avoid styling issues-->\n<!-- HA 18JAN24 Added class for styling -->\n<div [style]=\"bookStyle\" class=\"content-box form-group\">\n <div class=\"form-row\">\n <!-- HA 20DEC23 Directive and Question Style from salesforce -->\n <div\n [class]=\"'col-lg-' + ques.Size__c + ' paddingnone'\"\n *ngFor=\"let ques of questions;let i = index\" [id]=\"ques.Id\" [dir]=\"ques.langDirection\" [style]=\"ques?.Style__c?.questionStyle\">\n <!-- Sub Question Label -->\n <!-- HA 20DEC23 Label Style from salesforce -->\n <!-- VD 09May24 is hide field change-->\n <div *ngIf=\"!ques.Is_Hide__c\">\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\n\n </div>\n <!-- VD 20JUN24 - help text changes-->\n <!-- VD 01Aug24 - validation change-->\n <!-- // VD 02Aug24 - label value style-->\n <div [ngClass]=\"{ down2: qbItem?.Progress_Bar__c }\" *ngIf=\"ques.Style__c.showLabel\" [style]=\"ques.Style__c.labelStyle\">\n <span [class]=\"'dis-flex shengel-myt-font3 myt-font7 '\" [style]=\"ques.Style__c.labelValueStyle\">{{ ques?.Question_Text__c }} \n <div *ngIf=\"ques.Is_Optional__c\" style=\"color: red;\">*</div>\n <div *ngIf=\"ques.Question_Text__c && ques?.Help_Text__c\" class=\"icon\" [matTooltip]=\"ques?.Help_Text__c\">i</div></span>\n </div>\n <!-- // VD 12Jun24 - readonly change-->\n <!-- DateTime -->\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\n <app-custom-date-picker [minDate]=\"ques.minDate\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" [date]=\"ques.input\" (dateChange)=\"childEventCapture($event, ques)\">\n </app-custom-date-picker>\n </div>\n\n <!-- Date-->\n <div *ngIf=\"ques.Type__c === 'Date'\">\n <app-custom-date [date]=\"ques.input\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" (dateChange)=\"childEventCapture($event, ques)\">\n </app-custom-date>\n </div>\n\n <!-- Time-->\n <div *ngIf=\"ques.Type__c === 'Time'\">\n <app-custom-time [time]=\"ques.input\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" (timeChange)=\"childEventCapture($event, ques)\">\n </app-custom-time>\n </div>\n <!-- calendar -->\n <div *ngIf=\"ques.Type__c === 'Calendar'\">\n <app-custom-calendar [question]=\"ques\" (eventSelected)=\"childEventCapture($event, ques)\"></app-custom-calendar>\n </div>\n\n <!-- Text -->\n <div *ngIf=\"ques.Type__c === 'Text'\">\n <app-custom-input [value]=\"ques.input\" [ngClassValue]=\"{\n 'dis-flex dt-line date-line bookText boxoutline myt-font1': qbItem.Progress_Bar__c,\n textBox: !qbItem.Progress_Bar__c\n }\" [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [idValue]=\"ques.Tracking_ID__c\" [focusEvent]=\"clearSQError(ques.Id)\"\n [error]=\"ques.error\" [placeholder]=\"ques.Question__c\" (inputValue)=\"childEventCapture($event, ques)\">\n </app-custom-input>\n </div>\n \n <!-- for pick location -->\n <!-- VD 21DEC23 - dependent field change -->\n <div *ngIf=\"ques.Type__c === 'Location'\">\n <!-- HA10012024 Added Api key as input -->\n <app-pick-location [apiKey]=\"qbItem['Api_Key__c']\" [address]=\"ques.selectedValue\" [question]=\"ques\" (locationSelected)=\"childEventCapture($event, ques)\">\n </app-pick-location>\n </div>\n\n <!-- for text area -->\n <div *ngIf=\"ques.Type__c === 'TextArea'\">\n <app-custom-text-area [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [value]=\"ques.input\" [rows]=\"3\" [error]=\"ques.error\" [placeholder]=\"ques.Question__c \"\n (textareaValueChange)=\"childEventCapture($event, ques)\"></app-custom-text-area>\n </div>\n\n <!-- Email -->\n <div *ngIf=\"ques.Type__c === 'Email'\">\n <input type=\"email\" readOnly=\"ques.Read_Only__c\" [(ngModel)]=\"ques.input\" [id]=\"ques.Id\" required=\"\" (focus)=\"clearSQError(ques.Id)\"\n style.border-color=\"{{ ques.error ? 'red' : '' }}\" placeholder=\"{{ ques.Question__c }}\" />\n </div>\n\n <!-- Table -->\n <div *ngIf=\"ques.Type__c === 'Table'\" class=\"\">\n <app-custom-table [question]=\"ques\" [apiMeta]=\"ques.Sub_Text__c\" (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-table>\n </div>\n\n <!-- Table Appendix -->\n <div *ngIf=\"ques.Type__c === 'TableAppendix'\" class=\"\">\n <app-table-appendix [question]=\"ques\" (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-table-appendix>\n </div>\n <!-- list -->\n <!-- VD 20Aug24 used correct attribute -->\n <div *ngIf=\"ques.Type__c === 'List'\" class=\"\">\n <lib-search-box [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [placeHolderText]=\"ques.Question__c\" [filterName]=\"ques.input\" (searchValueChange)=\"childEventCapture($event, ques)\">\n </lib-search-box>\n </div>\n\n <!-- Dropdown -->\n <!-- HA 09FEB24 Added condition of sqOption to the dropdown -->\n <div *ngIf=\"ques.Type__c === 'Dropdown' && ques?.Question_Options__r?.records\" class=\"\">\n <!-- HA 20DEC23 For Translation --> <!-- VD 19JAN24 - getting token as input -->\n <app-custom-dropdown [options]=\"ques.Question_Options__r.records\" [token]=\"token\"\n [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [selectedValue]=\"ques.selectedValue\" placeholder=\"---{{'select' | i18n:i18nService.currentLanguage}}---\"\n [errorMessage]=\"ques.Error_Message__c\" [error]=\"ques.error\"\n [referenceField]=\"ques.Reference_Field__c\"\n [readOnly]=\"ques.Read_Only__c\"\n (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-dropdown>\n <i class=\"fa fa-check \" aria-hidden=\"true\" *ngIf=\"ques?.input?.length > 0\"></i>\n </div>\n <!-- // VD 02Aug24 custom-radio component -->\n <div *ngIf=\"ques.Type__c === 'Radio' && ques?.Question_Options__r?.records\" class=\"\">\n <app-custom-radio [options]=\"ques.Question_Options__r.records\" [token]=\"token\"\n [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [selectedValue]=\"ques.selectedValue\"\n [errorMessage]=\"ques.Error_Message__c\" [error]=\"ques.error\"\n [referenceField]=\"ques.Reference_Field__c\"\n [readOnly]=\"ques.Read_Only__c\"\n (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-radio>\n </div>\n\n <!-- Attachment / Files -->\n <div *ngIf=\"ques.Type__c === 'File'\" class=\"\">\n <app-file-upload [limitFileUploading]=\"5\" [error]=\"ques.error\" [question]=\"ques\" [allFiles]=\"ques.input\" [tableFile]=\"false\"\n (selectedFileData)=\"childEventCapture($event, ques)\" (deletedFileData)=\"deleteFile($event)\"\n [isDeleteFileButtonVisible]=\"true\"></app-file-upload>\n </div>\n <div *ngIf=\"ques.Type__c === 'PopUpMessage'\" class=\"\">\n <app-dependent-table [alertMessage]=\"ques.Error_Message__c\">\n </app-dependent-table>\n </div>\n <div *ngIf=\"ques.Type__c === 'Label'\" class=\"\">\n <app-custom-label [labelStyle]=\"ques.Title__c\" [labelValue]=\"ques.Question__c\">\n </app-custom-label>\n </div>\n <!-- // VD 02Aug24 image component -->\n <div *ngIf=\"ques.Type__c === 'Image'\" class=\"\">\n <app-custom-image [question]=\"ques\">\n </app-custom-image>\n </div>\n <!-- 08NOV23 - button type question added -->\n <!-- Button -->\n <div *ngIf=\"ques.Type__c === 'Button'\" class=\"\">\n <app-custom-button [height]=\"'50px'\" \n [width]=\"'150px'\" \n [buttonText]=\"ques?.Question__c\"\n [value]=\"ques?.Question__c\"\n (buttonValue)=\"childEventCapture($event, ques)\"\n >\n </app-custom-button>\n </div>\n <!-- HA 20DEC23 This is to load book type questions-->\n <div *ngIf=\"ques.Type__c === 'Book'\">\n <!-- HA 09FEB24 Added ternary operator -->\n <lib-questionbook [qbItem]=\"ques.qbItem\" [labelValue]=\"labelValue\" [questions]=\"ques.qbItem?.Questions__r?.records\" (handleDropDown)=\"getDropDown($event)\"></lib-questionbook>\n </div>\n </div>\n </div>\n </div>", styles: [".col-lg-6{width:100%}.myt-font7{display:flex;justify-content:flex-start;align-items:center}.icon{display:inline-block;width:15px;height:15px;border-radius:50%;background-color:#08010177;color:#fff;text-align:center;line-height:16px;font-size:11px;font-family:Arial,sans-serif;font-weight:700;margin-left:5px}@media (min-width: 1200px){.col-lg-6{width:50%!important}.form-row{display:flex;flex-wrap:wrap}}\n"] }]
|
|
5534
|
-
}], ctorParameters: function () { return [{ type: SalesforceService }, { type: DataService }, { type: ChangeService }, { type: StorageService }, { type: I18nService }, { type: Document, decorators: [{
|
|
5662
|
+
args: [{ selector: 'lib-questionbook', template: "<!-- HA 20DEC23 Book Style from salesforce -->\n<!-- HA 28DEC23 Removed IsShengel(removal of shengel values applies for this reason) and direct styling of books to avoid styling issues-->\n<!-- HA 18JAN24 Added class for styling -->\n<div [style]=\"bookStyle\" class=\"content-box form-group\">\n <div class=\"form-row\">\n <!-- HA 20DEC23 Directive and Question Style from salesforce -->\n <div\n [class]=\"'col-lg-' + ques.Size__c + ' paddingnone'\"\n *ngFor=\"let ques of questions;let i = index\" [id]=\"ques.Id\" [dir]=\"ques.langDirection\" [style]=\"ques?.Style__c?.questionStyle\">\n <!-- Sub Question Label -->\n <!-- HA 20DEC23 Label Style from salesforce -->\n <!-- VD 09May24 is hide field change-->\n <div *ngIf=\"!ques.Is_Hide__c\">\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\n\n </div>\n <!-- VD 20JUN24 - help text changes-->\n <!-- VD 01Aug24 - validation change-->\n <!-- // VD 02Aug24 - label value style-->\n <div [ngClass]=\"{ down2: qbItem?.Progress_Bar__c }\" *ngIf=\"ques.Style__c?.showLabel ? ques.Style__c?.showLabel : true\" [style]=\"ques.Style__c?.labelStyle\">\n <span [class]=\"'dis-flex shengel-myt-font3 myt-font7 '\" [style]=\"ques.Style__c?.labelValueStyle\">{{ removeCharacters(ques?.Question_Text__c) }} \n <div *ngIf=\"ques.Is_Optional__c\" style=\"color: red;\">*</div>\n <div *ngIf=\"ques.Question_Text__c && ques?.Help_Text__c\" class=\"icon\" [matTooltip]=\"ques?.Help_Text__c\">i</div></span>\n </div>\n <!-- // VD 12Jun24 - readonly change-->\n <!-- DateTime -->\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\n <app-custom-date-picker [minDate]=\"ques.minDate\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" [date]=\"ques.input\" (dateChange)=\"childEventCapture($event, ques)\">\n </app-custom-date-picker>\n </div>\n\n <!-- Date-->\n <div *ngIf=\"ques.Type__c === 'Date'\">\n <app-custom-date [date]=\"ques.input\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" (dateChange)=\"childEventCapture($event, ques)\">\n </app-custom-date>\n </div>\n\n <!-- Time-->\n <div *ngIf=\"ques.Type__c === 'Time'\">\n <app-custom-time [time]=\"ques.input\" [error]=\"ques.error\" [errorMessage]=\"ques.Error_Message__c\" [readOnly]=\"ques.Read_Only__c\" (timeChange)=\"childEventCapture($event, ques)\">\n </app-custom-time>\n </div>\n <!-- calendar -->\n <div *ngIf=\"ques.Type__c === 'Calendar'\">\n <!-- <app-custom-calendar [question]=\"ques\" (eventSelected)=\"childEventCapture($event, ques)\" (dateSelected)=\"getCurrentCalendar($event)\"></app-custom-calendar> -->\n </div>\n <!-- Text -->\n <div *ngIf=\"ques.Type__c === 'Text' || ques.Type__c === 'Link'\" >\n <app-custom-input [value]=\"ques.input\" [ngClassValue]=\"{\n 'dis-flex dt-line date-line bookText boxoutline myt-font1': qbItem.Progress_Bar__c,\n textBox: !qbItem.Progress_Bar__c\n }\" [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [idValue]=\"ques.Tracking_ID__c\" [focusEvent]=\"clearSQError(ques.Id)\"\n [error]=\"ques.error\" [placeholder]=\"ques.Question__c\" (inputValue)=\"childEventCapture($event, ques)\">\n </app-custom-input>\n </div>\n \n <!-- for pick location -->\n <!-- VD 21DEC23 - dependent field change -->\n <div *ngIf=\"ques.Type__c === 'Location'\">\n <!-- HA10012024 Added Api key as input -->\n <app-pick-location [apiKey]=\"qbItem['Api_Key__c']\" [address]=\"ques.selectedValue\" [question]=\"ques\" (locationSelected)=\"childEventCapture($event, ques)\">\n </app-pick-location>\n </div>\n\n <!-- for text area -->\n <div *ngIf=\"ques.Type__c === 'TextArea'\">\n <app-custom-text-area [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [value]=\"ques.input\" [rows]=\"3\" [error]=\"ques.error\" [placeholder]=\"ques.Question__c \"\n (textareaValueChange)=\"childEventCapture($event, ques)\"></app-custom-text-area>\n </div>\n\n <!-- Email -->\n <div *ngIf=\"ques.Type__c === 'Email'\">\n <input type=\"email\" readOnly=\"ques.Read_Only__c\" [(ngModel)]=\"ques.input\" [id]=\"ques.Id\" required=\"\" (focus)=\"clearSQError(ques.Id)\"\n style.border-color=\"{{ ques.error ? 'red' : '' }}\" placeholder=\"{{ ques.Question__c }}\" />\n </div>\n\n <!-- Table -->\n <div *ngIf=\"ques.Type__c === 'Table'\" class=\"\">\n <app-custom-table [question]=\"ques\" [apiMeta]=\"ques.Sub_Text__c\" (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-table>\n </div>\n\n <!-- Table Appendix -->\n <div *ngIf=\"ques.Type__c === 'TableAppendix'\" class=\"\">\n <app-table-appendix [question]=\"ques\" (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-table-appendix>\n </div>\n <!-- list -->\n <!-- VD 20Aug24 used correct attribute -->\n <div *ngIf=\"ques.Type__c === 'List'\" class=\"\">\n <lib-search-box [question]=\"ques\" [readOnly]=\"ques.Read_Only__c\" [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [placeHolderText]=\"ques.Question__c\" [filterName]=\"ques.input\" (searchValueChange)=\"childEventCapture($event, ques)\">\n </lib-search-box>\n </div>\n\n <!-- Dropdown -->\n <!-- HA 09FEB24 Added condition of sqOption to the dropdown -->\n <div *ngIf=\"ques.Type__c === 'Dropdown' && ques?.Question_Options__r?.records\" class=\"\">\n <!-- HA 20DEC23 For Translation --> <!-- VD 19JAN24 - getting token as input -->\n <app-custom-dropdown [options]=\"ques.Question_Options__r.records\" [token]=\"token\"\n [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [selectedValue]=\"ques.selectedValue\" placeholder=\"---{{'select' | i18n:i18nService.currentLanguage}}---\"\n [errorMessage]=\"ques.Error_Message__c\" [error]=\"ques.error\"\n [referenceField]=\"ques.Reference_Field__c\"\n [readOnly]=\"ques.Read_Only__c\"\n (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-dropdown>\n <i class=\"fa fa-check \" aria-hidden=\"true\" *ngIf=\"ques?.input?.length > 0\"></i>\n </div>\n <!-- // VD 02Aug24 custom-radio component -->\n <div *ngIf=\"ques.Type__c === 'Radio' && ques?.Question_Options__r?.records\" class=\"\">\n <app-custom-radio [options]=\"ques.Question_Options__r.records\" [token]=\"token\"\n [apiMeta]=\"ques.Sub_Text__c\" [id]=\"ques.Id\" [selectedValue]=\"ques.selectedValue\"\n [errorMessage]=\"ques.Error_Message__c\" [error]=\"ques.error\"\n [referenceField]=\"ques.Reference_Field__c\"\n [readOnly]=\"ques.Read_Only__c\"\n (valueChange)=\"childEventCapture($event, ques); clearSQError(ques.Id)\">\n </app-custom-radio>\n </div>\n\n <!-- Attachment / Files -->\n <div *ngIf=\"ques.Type__c === 'File'\" class=\"\">\n <app-file-upload [limitFileUploading]=\"5\" [error]=\"ques.error\" [question]=\"ques\" [allFiles]=\"ques.input\" [tableFile]=\"false\"\n (selectedFileData)=\"childEventCapture($event, ques)\" (deletedFileData)=\"deleteFile($event)\"\n [isDeleteFileButtonVisible]=\"true\"></app-file-upload>\n </div>\n <div *ngIf=\"ques.Type__c === 'PopUpMessage'\" class=\"\">\n <app-dependent-table [alertMessage]=\"ques.Error_Message__c\">\n </app-dependent-table>\n </div>\n <div *ngIf=\"ques.Type__c === 'Label'\" class=\"\">\n <app-custom-label [labelStyle]=\"ques.Title__c\" [labelValue]=\"ques.Question__c\">\n </app-custom-label>\n </div>\n <!-- // VD 02Aug24 image component -->\n <div *ngIf=\"ques.Type__c === 'Image'\" class=\"\">\n <app-custom-image [question]=\"ques\">\n </app-custom-image>\n </div>\n <!-- 08NOV23 - button type question added -->\n <!-- Button -->\n <div *ngIf=\"ques.Type__c === 'Button'\" class=\"\">\n <app-custom-button [height]=\"'50px'\" \n [width]=\"'150px'\" \n [buttonText]=\"ques?.Question__c\"\n [value]=\"ques?.Question__c\"\n (buttonValue)=\"childEventCapture($event, ques)\"\n >\n </app-custom-button>\n </div>\n <!-- HA 20DEC23 This is to load book type questions-->\n <div *ngIf=\"ques.Type__c === 'Book'\">\n <!-- HA 09FEB24 Added ternary operator -->\n <lib-questionbook [qbItem]=\"ques.qbItem\" [labelValue]=\"labelValue\" [questions]=\"ques.qbItem?.Questions__r?.records\" (handleDropDown)=\"getDropDown($event)\"></lib-questionbook>\n </div>\n </div>\n </div>\n </div>\n\n <!-- 06-09-24 for calendar type-->\n<ng-template dynamicComponentHost></ng-template>", styles: [".col-lg-6{width:100%}.myt-font7{display:flex;justify-content:flex-start;align-items:center}.icon{display:inline-block;width:15px;height:15px;border-radius:50%;background-color:#08010177;color:#fff;text-align:center;line-height:16px;font-size:11px;font-family:Arial,sans-serif;font-weight:700;margin-left:5px}@media (min-width: 1200px){.col-lg-6{width:50%!important}.form-row{display:flex;flex-wrap:wrap}}\n"] }]
|
|
5663
|
+
}], ctorParameters: function () { return [{ type: SalesforceService }, { type: DataService }, { type: ChangeService }, { type: StorageService }, { type: I18nService }, { type: i0.ChangeDetectorRef }, { type: Document, decorators: [{
|
|
5535
5664
|
type: Inject,
|
|
5536
5665
|
args: [DOCUMENT]
|
|
5537
5666
|
}] }]; }, propDecorators: { qbItem: [{
|
|
@@ -5554,8 +5683,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
5554
5683
|
type: Output
|
|
5555
5684
|
}], dropDownData: [{
|
|
5556
5685
|
type: Input
|
|
5686
|
+
}], dynamicHost: [{
|
|
5687
|
+
type: ViewChild,
|
|
5688
|
+
args: [ComponenthostDirective, { static: true }]
|
|
5557
5689
|
}], hadleDropDownDependent: [{
|
|
5558
5690
|
type: Output
|
|
5691
|
+
}], handleCalendarDate: [{
|
|
5692
|
+
type: Output
|
|
5559
5693
|
}] } });
|
|
5560
5694
|
|
|
5561
5695
|
class BookletComponent {
|
|
@@ -5578,6 +5712,8 @@ class BookletComponent {
|
|
|
5578
5712
|
handleBookletActionEvent = new EventEmitter();
|
|
5579
5713
|
handlePage = new EventEmitter();
|
|
5580
5714
|
hadleDropDownDependent = new EventEmitter();
|
|
5715
|
+
// VD 06Sep24 calendar changes
|
|
5716
|
+
handleCalendarDate = new EventEmitter();
|
|
5581
5717
|
nxtBooklet;
|
|
5582
5718
|
booklet = [];
|
|
5583
5719
|
abItem = {};
|
|
@@ -5592,6 +5728,7 @@ class BookletComponent {
|
|
|
5592
5728
|
langDirection = 'ltr'; // HA 28DEC23 making ltr as default direction
|
|
5593
5729
|
answerList = []; // HA 11-JAN-24 Answerlist to store the minimal value
|
|
5594
5730
|
dataBind = {}; // HA 18-JAN-24 To insert the endpoint value to the question
|
|
5731
|
+
allEvents = []; // VD 06Sep24 calendar changes
|
|
5595
5732
|
constructor(sfService, dataService, storageService, route, sanitizer, changeService, el, i18nService) {
|
|
5596
5733
|
this.sfService = sfService;
|
|
5597
5734
|
this.dataService = dataService;
|
|
@@ -5849,11 +5986,13 @@ class BookletComponent {
|
|
|
5849
5986
|
});
|
|
5850
5987
|
}
|
|
5851
5988
|
// HA 11-JAN-24 handleQues to load question
|
|
5989
|
+
// VD 06Sep24 calendar changes
|
|
5852
5990
|
handleQues(ques) {
|
|
5853
5991
|
// HA 19-JAN-24 If condition is for bind-in, correction
|
|
5854
5992
|
// HA 09FEB24 Adding condition to avoid undefined error
|
|
5855
5993
|
if (this.dataBind && Object.keys(this.dataBind).length > 0) {
|
|
5856
|
-
for (let [key,
|
|
5994
|
+
for (let [key, val] of Object.entries(this.dataBind)) {
|
|
5995
|
+
let value = val;
|
|
5857
5996
|
if (ques.Reference_Field__c === key) {
|
|
5858
5997
|
if (ques.Type__c === 'Dropdown' || ques.Type__c === 'Radio') {
|
|
5859
5998
|
this.sqOptions.forEach(element => {
|
|
@@ -5873,6 +6012,46 @@ class BookletComponent {
|
|
|
5873
6012
|
ques.input = value;
|
|
5874
6013
|
ques.selectedValue = value['address'] ? value['address'] : value;
|
|
5875
6014
|
}
|
|
6015
|
+
// VD 06Sep24 calendar changes for data bindIn
|
|
6016
|
+
else if (ques.Type__c === 'Calendar') {
|
|
6017
|
+
let entries = JSON.parse(ques['Fields_Meta__c']);
|
|
6018
|
+
if (entries) {
|
|
6019
|
+
let referenceQuestions = [];
|
|
6020
|
+
if (entries.length > 0) {
|
|
6021
|
+
entries.forEach(element => {
|
|
6022
|
+
if (element.questionReference) {
|
|
6023
|
+
let qReference = JSON.parse(element.questionReference);
|
|
6024
|
+
referenceQuestions.push(qReference?.question);
|
|
6025
|
+
}
|
|
6026
|
+
});
|
|
6027
|
+
}
|
|
6028
|
+
if (referenceQuestions.length > 0) {
|
|
6029
|
+
value?.forEach(calendarArray => {
|
|
6030
|
+
let date = new Date(calendarArray.date);
|
|
6031
|
+
calendarArray.entries.forEach(inputEntry => {
|
|
6032
|
+
for (let [k, v] of Object.entries(inputEntry)) {
|
|
6033
|
+
referenceQuestions.forEach(field => {
|
|
6034
|
+
if (field.Reference_Field__c == k) {
|
|
6035
|
+
if (field.Type__c === 'Date' || field.Type__c == 'DateTime' || field.Type__c == 'Time') {
|
|
6036
|
+
field.input = new Date(v.toString());
|
|
6037
|
+
}
|
|
6038
|
+
if (field.Type__c === 'Dropdown' || field.Type__c === 'Radio') {
|
|
6039
|
+
field.selectedValue = v;
|
|
6040
|
+
field.input = v;
|
|
6041
|
+
}
|
|
6042
|
+
else {
|
|
6043
|
+
field.input = v;
|
|
6044
|
+
}
|
|
6045
|
+
}
|
|
6046
|
+
});
|
|
6047
|
+
}
|
|
6048
|
+
});
|
|
6049
|
+
this.addEvent(date, referenceQuestions);
|
|
6050
|
+
});
|
|
6051
|
+
}
|
|
6052
|
+
}
|
|
6053
|
+
ques.input = this.allEvents.length > 0 ? this.allEvents : '';
|
|
6054
|
+
}
|
|
5876
6055
|
else {
|
|
5877
6056
|
ques.input = value;
|
|
5878
6057
|
}
|
|
@@ -5895,6 +6074,33 @@ class BookletComponent {
|
|
|
5895
6074
|
this.answerList.push(question);
|
|
5896
6075
|
}
|
|
5897
6076
|
}
|
|
6077
|
+
// VD 06Sep24 calendar changes for data bindIn
|
|
6078
|
+
addEvent(day, entryQues) {
|
|
6079
|
+
// Transform new entries into the desired format
|
|
6080
|
+
const newEntries = entryQues.reduce((acc, q) => {
|
|
6081
|
+
acc[q.Id] = { ...q };
|
|
6082
|
+
return acc;
|
|
6083
|
+
}, {});
|
|
6084
|
+
// Find if an event already exists for the given date
|
|
6085
|
+
const existingEvent = this.allEvents.find(event => event.date.toDateString() === day.toDateString());
|
|
6086
|
+
if (existingEvent) {
|
|
6087
|
+
// If the event exists, push the new entries to the existing entries
|
|
6088
|
+
const existingEntries = existingEvent.entries.map(entry => ({ ...entry }));
|
|
6089
|
+
existingEntries.push(newEntries);
|
|
6090
|
+
existingEvent.entries = existingEntries;
|
|
6091
|
+
}
|
|
6092
|
+
else {
|
|
6093
|
+
// Create a new event if it doesn't exist for the given date
|
|
6094
|
+
const newEvent = {
|
|
6095
|
+
id: '',
|
|
6096
|
+
date: day,
|
|
6097
|
+
entries: [newEntries] // Wrap the new entries in an array
|
|
6098
|
+
};
|
|
6099
|
+
this.allEvents.push(newEvent);
|
|
6100
|
+
}
|
|
6101
|
+
console.log('all events booklet');
|
|
6102
|
+
console.log(this.allEvents);
|
|
6103
|
+
}
|
|
5898
6104
|
readQuestions(qbId) {
|
|
5899
6105
|
// console.log('inside BookletComponent.readQuestions ' + qbId);
|
|
5900
6106
|
// console.log(this.bookQuestionsMap.size);
|
|
@@ -5947,12 +6153,16 @@ class BookletComponent {
|
|
|
5947
6153
|
getDropDown(event) {
|
|
5948
6154
|
this.hadleDropDownDependent.emit(event);
|
|
5949
6155
|
}
|
|
6156
|
+
// VD 06Sep24 calendar changes
|
|
6157
|
+
getCalendarDate(event) {
|
|
6158
|
+
this.handleCalendarDate.emit(event);
|
|
6159
|
+
}
|
|
5950
6160
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: BookletComponent, deps: [{ token: SalesforceService }, { token: DataService }, { token: StorageService }, { token: i1.ActivatedRoute }, { token: i6$1.DomSanitizer }, { token: ChangeService }, { token: i0.ElementRef }, { token: I18nService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5951
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: BookletComponent, selector: "lib-booklet", inputs: { bookletId: "bookletId", serv: "serv", tkn: "tkn", bookletJSON: "bookletJSON", dropdownDependentData: "dropdownDependentData", labelValue: "labelValue", token: "token", languageCode: "languageCode", fieldRestrictions: "fieldRestrictions", dataBind: "dataBind" }, outputs: { handleBookletActionEvent: "handleBookletActionEvent", handlePage: "handlePage", hadleDropDownDependent: "hadleDropDownDependent" }, usesOnChanges: true, ngImport: i0, template: "<ngx-spinner size=\"medium\" [name]=\"spinnerName\" [type]=\"spinnerType\"></ngx-spinner>\n<!-- Booklet Handling-->\n<!-- HA 19DEC23 For Direction -->\n<div *ngFor=\"let qb of booklet\" [ngClass]=\"langDirection\">\n <!-- MR Commented below code to ensure single JSON for UNCONDITIONAL Booklets -->\n <!-- <lib-questionnaire [serv]=\"serv\" [qbId]=\"qb.Id\" [tkn]=\"tkn\"></lib-questionnaire> -->\n <!-- HA 28DEC23 Below If logic is to load from booklet -->\n <div *ngIf=\"qb.Questions__r?.records; else elseBlock\">\n <div *ngFor=\"let ques of qb.Questions__r.records\" class=\"questiondiv1\">\n <div>\n <!-- HA 17JAN24 - Is title is enabled so that based on the boolean div will be visible -->\n <div *ngIf=\"ques.Is_Title__c\" [class]=\"qb.isShengel__c ? 'header-style' : 'question-f-size additional'\">\n <!-- VD 08NOV23 - showing lable when its available-->\n <div [innerHTML]=\"getText(ques?.Question_Text__c)\" *ngIf=\"ques?.Question_Text__c\" > \n {{ ques?.Question_Text__c }}\n </div>\n </div> <!-- VD 19JAN24 - getting token as input --> <!--VD 11Jun24 - translation changes-->\n <lib-questionbook [qbItem]=\"qb\" [token]=\"token\" [labelValue]=\"labelValue\" [questionItem]=\"ques\" [translatedQuestions]=\"readTransQuestions(qb.Id)\" [questions]=\"readQuestions(qb.Id)\" (handleDropDown)=\"getDropDown($event)\"></lib-questionbook>\n </div>\n </div>\n </div>\n <!-- HA 28DEC23 Below else logic is to load from books or questions -->\n <ng-template #elseBlock>\n <div class=\"questiondiv1\">\n <div>\n <div *ngIf=\"!qb.Is_Title__c\" [class]=\"qb.isShengel__c ? 'header-style' : 'question-f-size additional'\">\n <!-- VD 08NOV23 - showing lable when its available-->\n <div [innerHTML]=\"getText(qb?.Question_Text__c)\" *ngIf=\"qb?.Question_Text__c\" > \n {{ qb?.Question_Text__c }}\n {{ qb?.Title__c }}\n </div>\n </div> <!-- VD 19JAN24 - getting token as input --> <!-- // VD 11Jun24 - translation changes-->\n <lib-questionbook [qbItem]=\"qb\" [token]=\"token\" [labelValue]=\"labelValue\" [questionItem]=\"qb\" [translatedQuestions]=\"readTransQuestions(qb.Id)\" [questions]=\"readQuestions(qb.Id)\" (handleDropDown)=\"getDropDown($event)\"></lib-questionbook>\n </div>\n </div>\n </ng-template>\n</div>\n\n<!-- Group Actions -->\n<!-- HA 19DEC23 For Direction -->\n<div class=\"align-submit-row\" *ngIf=\"abItem?.Status__c != 'Completed'\" [ngClass]=\"langDirection\">\n <div *ngFor=\"let action of actions; let i = index\">\n <!-- // HA 22JAN24 Commonise the button style in fusion -->\n <button (click)=\"handleBookletActionClick(action)\" ngClass=\"btn btn-primary fc-button nxtButton\">\n {{ action.name }}\n </button>\n </div>\n</div>\n", styles: [".align-submit-row{display:flex}.header-style{padding:15px;background:#F8F8F8;color:#898989;border:1px solid #e8e8e8;border-top-left-radius:5px;border-top-right-radius:5px;margin-left:0;justify-content:left;font-size:15px}.rtl{flex-direction:row-reverse}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.NgxSpinnerComponent, selector: "ngx-spinner", inputs: ["disableAnimation", "bdColor", "zIndex", "color", "type", "size", "fullScreen", "name", "template", "showSpinner"] }, { kind: "component", type: QuestionbookComponent, selector: "lib-questionbook", inputs: ["qbItem", "questionItem", "translatedQuestions", "questions", "errorFieldId", "labelValue", "token", "dropDownData"], outputs: ["handleDropDown", "handleQuestion", "hadleDropDownDependent"] }] });
|
|
6161
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: BookletComponent, selector: "lib-booklet", inputs: { bookletId: "bookletId", serv: "serv", tkn: "tkn", bookletJSON: "bookletJSON", dropdownDependentData: "dropdownDependentData", labelValue: "labelValue", token: "token", languageCode: "languageCode", fieldRestrictions: "fieldRestrictions", dataBind: "dataBind" }, outputs: { handleBookletActionEvent: "handleBookletActionEvent", handlePage: "handlePage", hadleDropDownDependent: "hadleDropDownDependent", handleCalendarDate: "handleCalendarDate" }, usesOnChanges: true, ngImport: i0, template: "<ngx-spinner size=\"medium\" [name]=\"spinnerName\" [type]=\"spinnerType\"></ngx-spinner>\n<!-- Booklet Handling-->\n<!-- HA 19DEC23 For Direction -->\n<div *ngFor=\"let qb of booklet\" [ngClass]=\"langDirection\">\n <!-- MR Commented below code to ensure single JSON for UNCONDITIONAL Booklets -->\n <!-- <lib-questionnaire [serv]=\"serv\" [qbId]=\"qb.Id\" [tkn]=\"tkn\"></lib-questionnaire> -->\n <!-- HA 28DEC23 Below If logic is to load from booklet -->\n <div *ngIf=\"qb.Questions__r?.records; else elseBlock\">\n <div *ngFor=\"let ques of qb.Questions__r.records\" class=\"questiondiv1\">\n <div>\n <!-- HA 17JAN24 - Is title is enabled so that based on the boolean div will be visible -->\n <div *ngIf=\"ques.Is_Title__c\" [class]=\"qb.isShengel__c ? 'header-style' : 'question-f-size additional'\">\n <!-- VD 08NOV23 - showing lable when its available-->\n <div [innerHTML]=\"getText(ques?.Question_Text__c)\" *ngIf=\"ques?.Question_Text__c\" > \n {{ ques?.Question_Text__c }}\n </div>\n </div> <!-- VD 19JAN24 - getting token as input --> <!--VD 11Jun24 - translation changes-->\n <!--VD 06Sep24 calendar changes--> \n <lib-questionbook [qbItem]=\"qb\" [token]=\"token\" \n [labelValue]=\"labelValue\" \n [questionItem]=\"ques\" \n [translatedQuestions]=\"readTransQuestions(qb.Id)\" \n [questions]=\"readQuestions(qb.Id)\" \n (handleDropDown)=\"getDropDown($event)\"\n (handleCalendarDate)=\"getCalendarDate($event)\"\n ></lib-questionbook>\n </div>\n </div>\n </div>\n <!-- HA 28DEC23 Below else logic is to load from books or questions -->\n <ng-template #elseBlock>\n <div class=\"questiondiv1\">\n <div>\n <div *ngIf=\"!qb.Is_Title__c\" [class]=\"qb.isShengel__c ? 'header-style' : 'question-f-size additional'\">\n <!-- VD 08NOV23 - showing lable when its available-->\n <div [innerHTML]=\"getText(qb?.Question_Text__c)\" *ngIf=\"qb?.Question_Text__c\" > \n {{ qb?.Question_Text__c }}\n {{ qb?.Title__c }}\n </div>\n </div> <!-- VD 19JAN24 - getting token as input --> <!-- // VD 11Jun24 - translation changes-->\n <lib-questionbook [qbItem]=\"qb\" [token]=\"token\" [labelValue]=\"labelValue\" [questionItem]=\"qb\" [translatedQuestions]=\"readTransQuestions(qb.Id)\" [questions]=\"readQuestions(qb.Id)\" (handleDropDown)=\"getDropDown($event)\"></lib-questionbook>\n </div>\n </div>\n </ng-template>\n</div>\n\n<!-- Group Actions -->\n<!-- HA 19DEC23 For Direction -->\n<div class=\"align-submit-row\" *ngIf=\"abItem?.Status__c != 'Completed'\" [ngClass]=\"langDirection\">\n <div *ngFor=\"let action of actions; let i = index\">\n <!-- // HA 22JAN24 Commonise the button style in fusion -->\n <button (click)=\"handleBookletActionClick(action)\" ngClass=\"btn btn-primary fc-button nxtButton\">\n {{ action.name }}\n </button>\n </div>\n</div>\n", styles: [".align-submit-row{display:flex}.header-style{padding:15px;background:#F8F8F8;color:#898989;border:1px solid #e8e8e8;border-top-left-radius:5px;border-top-right-radius:5px;margin-left:0;justify-content:left;font-size:15px}.rtl{flex-direction:row-reverse}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.NgxSpinnerComponent, selector: "ngx-spinner", inputs: ["disableAnimation", "bdColor", "zIndex", "color", "type", "size", "fullScreen", "name", "template", "showSpinner"] }, { kind: "component", type: QuestionbookComponent, selector: "lib-questionbook", inputs: ["qbItem", "questionItem", "translatedQuestions", "questions", "errorFieldId", "labelValue", "token", "dropDownData"], outputs: ["handleDropDown", "handleQuestion", "hadleDropDownDependent", "handleCalendarDate"] }] });
|
|
5952
6162
|
}
|
|
5953
6163
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: BookletComponent, decorators: [{
|
|
5954
6164
|
type: Component,
|
|
5955
|
-
args: [{ selector: 'lib-booklet', template: "<ngx-spinner size=\"medium\" [name]=\"spinnerName\" [type]=\"spinnerType\"></ngx-spinner>\n<!-- Booklet Handling-->\n<!-- HA 19DEC23 For Direction -->\n<div *ngFor=\"let qb of booklet\" [ngClass]=\"langDirection\">\n <!-- MR Commented below code to ensure single JSON for UNCONDITIONAL Booklets -->\n <!-- <lib-questionnaire [serv]=\"serv\" [qbId]=\"qb.Id\" [tkn]=\"tkn\"></lib-questionnaire> -->\n <!-- HA 28DEC23 Below If logic is to load from booklet -->\n <div *ngIf=\"qb.Questions__r?.records; else elseBlock\">\n <div *ngFor=\"let ques of qb.Questions__r.records\" class=\"questiondiv1\">\n <div>\n <!-- HA 17JAN24 - Is title is enabled so that based on the boolean div will be visible -->\n <div *ngIf=\"ques.Is_Title__c\" [class]=\"qb.isShengel__c ? 'header-style' : 'question-f-size additional'\">\n <!-- VD 08NOV23 - showing lable when its available-->\n <div [innerHTML]=\"getText(ques?.Question_Text__c)\" *ngIf=\"ques?.Question_Text__c\" > \n {{ ques?.Question_Text__c }}\n </div>\n </div> <!-- VD 19JAN24 - getting token as input --> <!--VD 11Jun24 - translation changes-->\n <lib-questionbook [qbItem]=\"qb\" [token]=\"token\" [labelValue]=\"labelValue\" [questionItem]=\"ques\" [translatedQuestions]=\"readTransQuestions(qb.Id)\" [questions]=\"readQuestions(qb.Id)\" (handleDropDown)=\"getDropDown($event)\"></lib-questionbook>\n </div>\n </div>\n </div>\n <!-- HA 28DEC23 Below else logic is to load from books or questions -->\n <ng-template #elseBlock>\n <div class=\"questiondiv1\">\n <div>\n <div *ngIf=\"!qb.Is_Title__c\" [class]=\"qb.isShengel__c ? 'header-style' : 'question-f-size additional'\">\n <!-- VD 08NOV23 - showing lable when its available-->\n <div [innerHTML]=\"getText(qb?.Question_Text__c)\" *ngIf=\"qb?.Question_Text__c\" > \n {{ qb?.Question_Text__c }}\n {{ qb?.Title__c }}\n </div>\n </div> <!-- VD 19JAN24 - getting token as input --> <!-- // VD 11Jun24 - translation changes-->\n <lib-questionbook [qbItem]=\"qb\" [token]=\"token\" [labelValue]=\"labelValue\" [questionItem]=\"qb\" [translatedQuestions]=\"readTransQuestions(qb.Id)\" [questions]=\"readQuestions(qb.Id)\" (handleDropDown)=\"getDropDown($event)\"></lib-questionbook>\n </div>\n </div>\n </ng-template>\n</div>\n\n<!-- Group Actions -->\n<!-- HA 19DEC23 For Direction -->\n<div class=\"align-submit-row\" *ngIf=\"abItem?.Status__c != 'Completed'\" [ngClass]=\"langDirection\">\n <div *ngFor=\"let action of actions; let i = index\">\n <!-- // HA 22JAN24 Commonise the button style in fusion -->\n <button (click)=\"handleBookletActionClick(action)\" ngClass=\"btn btn-primary fc-button nxtButton\">\n {{ action.name }}\n </button>\n </div>\n</div>\n", styles: [".align-submit-row{display:flex}.header-style{padding:15px;background:#F8F8F8;color:#898989;border:1px solid #e8e8e8;border-top-left-radius:5px;border-top-right-radius:5px;margin-left:0;justify-content:left;font-size:15px}.rtl{flex-direction:row-reverse}\n"] }]
|
|
6165
|
+
args: [{ selector: 'lib-booklet', template: "<ngx-spinner size=\"medium\" [name]=\"spinnerName\" [type]=\"spinnerType\"></ngx-spinner>\n<!-- Booklet Handling-->\n<!-- HA 19DEC23 For Direction -->\n<div *ngFor=\"let qb of booklet\" [ngClass]=\"langDirection\">\n <!-- MR Commented below code to ensure single JSON for UNCONDITIONAL Booklets -->\n <!-- <lib-questionnaire [serv]=\"serv\" [qbId]=\"qb.Id\" [tkn]=\"tkn\"></lib-questionnaire> -->\n <!-- HA 28DEC23 Below If logic is to load from booklet -->\n <div *ngIf=\"qb.Questions__r?.records; else elseBlock\">\n <div *ngFor=\"let ques of qb.Questions__r.records\" class=\"questiondiv1\">\n <div>\n <!-- HA 17JAN24 - Is title is enabled so that based on the boolean div will be visible -->\n <div *ngIf=\"ques.Is_Title__c\" [class]=\"qb.isShengel__c ? 'header-style' : 'question-f-size additional'\">\n <!-- VD 08NOV23 - showing lable when its available-->\n <div [innerHTML]=\"getText(ques?.Question_Text__c)\" *ngIf=\"ques?.Question_Text__c\" > \n {{ ques?.Question_Text__c }}\n </div>\n </div> <!-- VD 19JAN24 - getting token as input --> <!--VD 11Jun24 - translation changes-->\n <!--VD 06Sep24 calendar changes--> \n <lib-questionbook [qbItem]=\"qb\" [token]=\"token\" \n [labelValue]=\"labelValue\" \n [questionItem]=\"ques\" \n [translatedQuestions]=\"readTransQuestions(qb.Id)\" \n [questions]=\"readQuestions(qb.Id)\" \n (handleDropDown)=\"getDropDown($event)\"\n (handleCalendarDate)=\"getCalendarDate($event)\"\n ></lib-questionbook>\n </div>\n </div>\n </div>\n <!-- HA 28DEC23 Below else logic is to load from books or questions -->\n <ng-template #elseBlock>\n <div class=\"questiondiv1\">\n <div>\n <div *ngIf=\"!qb.Is_Title__c\" [class]=\"qb.isShengel__c ? 'header-style' : 'question-f-size additional'\">\n <!-- VD 08NOV23 - showing lable when its available-->\n <div [innerHTML]=\"getText(qb?.Question_Text__c)\" *ngIf=\"qb?.Question_Text__c\" > \n {{ qb?.Question_Text__c }}\n {{ qb?.Title__c }}\n </div>\n </div> <!-- VD 19JAN24 - getting token as input --> <!-- // VD 11Jun24 - translation changes-->\n <lib-questionbook [qbItem]=\"qb\" [token]=\"token\" [labelValue]=\"labelValue\" [questionItem]=\"qb\" [translatedQuestions]=\"readTransQuestions(qb.Id)\" [questions]=\"readQuestions(qb.Id)\" (handleDropDown)=\"getDropDown($event)\"></lib-questionbook>\n </div>\n </div>\n </ng-template>\n</div>\n\n<!-- Group Actions -->\n<!-- HA 19DEC23 For Direction -->\n<div class=\"align-submit-row\" *ngIf=\"abItem?.Status__c != 'Completed'\" [ngClass]=\"langDirection\">\n <div *ngFor=\"let action of actions; let i = index\">\n <!-- // HA 22JAN24 Commonise the button style in fusion -->\n <button (click)=\"handleBookletActionClick(action)\" ngClass=\"btn btn-primary fc-button nxtButton\">\n {{ action.name }}\n </button>\n </div>\n</div>\n", styles: [".align-submit-row{display:flex}.header-style{padding:15px;background:#F8F8F8;color:#898989;border:1px solid #e8e8e8;border-top-left-radius:5px;border-top-right-radius:5px;margin-left:0;justify-content:left;font-size:15px}.rtl{flex-direction:row-reverse}\n"] }]
|
|
5956
6166
|
}], ctorParameters: function () { return [{ type: SalesforceService }, { type: DataService }, { type: StorageService }, { type: i1.ActivatedRoute }, { type: i6$1.DomSanitizer }, { type: ChangeService }, { type: i0.ElementRef }, { type: I18nService }]; }, propDecorators: { bookletId: [{
|
|
5957
6167
|
type: Input
|
|
5958
6168
|
}], serv: [{
|
|
@@ -5977,6 +6187,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
5977
6187
|
type: Output
|
|
5978
6188
|
}], hadleDropDownDependent: [{
|
|
5979
6189
|
type: Output
|
|
6190
|
+
}], handleCalendarDate: [{
|
|
6191
|
+
type: Output
|
|
5980
6192
|
}], dataBind: [{
|
|
5981
6193
|
type: Input
|
|
5982
6194
|
}] } });
|
|
@@ -6326,6 +6538,7 @@ class NxtAppModule {
|
|
|
6326
6538
|
MyDatePickerModule,
|
|
6327
6539
|
OwlDateTimeModule,
|
|
6328
6540
|
OwlNativeDateTimeModule,
|
|
6541
|
+
ComponenthostDirective,
|
|
6329
6542
|
GetValuePipe,
|
|
6330
6543
|
// VD 23JAN24 removed HttpClientModule
|
|
6331
6544
|
NgSelectModule,
|
|
@@ -6473,6 +6686,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
6473
6686
|
MyDatePickerModule,
|
|
6474
6687
|
OwlDateTimeModule,
|
|
6475
6688
|
OwlNativeDateTimeModule,
|
|
6689
|
+
ComponenthostDirective,
|
|
6476
6690
|
GetValuePipe,
|
|
6477
6691
|
// VD 23JAN24 removed HttpClientModule
|
|
6478
6692
|
NgSelectModule,
|
|
@@ -6589,5 +6803,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
6589
6803
|
* Generated bundle index. Do not edit.
|
|
6590
6804
|
*/
|
|
6591
6805
|
|
|
6592
|
-
export { BookletComponent, I18nComponent, I18nPipe, NxtAppComponent, NxtAppModule, NxtAppService, QuestionnaireComponent, SalesforceService, SummaryPageComponent };
|
|
6806
|
+
export { BookletComponent, I18nComponent, I18nPipe, NxtAppComponent, NxtAppModule, NxtAppService, QuestionbookComponent, QuestionnaireComponent, SalesforceService, SummaryPageComponent };
|
|
6593
6807
|
//# sourceMappingURL=rangertechnologies-ngnxt.mjs.map
|