@pongrass/utils 1.1.6-v20 → 1.1.8-v20

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.
@@ -1,14 +1,14 @@
1
1
  import * as i0 from '@angular/core';
2
- import { signal, Injectable, Component, ViewChild, inject, EventEmitter, Input, Output, ElementRef, HostListener, Directive, Renderer2, forwardRef, NgModule, effect, input, output } from '@angular/core';
2
+ import { signal, Injectable, Component, ViewChild, inject, EventEmitter, Input, Output, ElementRef, HostListener, Directive, Renderer2, forwardRef, NgModule, effect, input, output, ChangeDetectorRef, NgZone, untracked, ViewContainerRef, ApplicationRef, EnvironmentInjector, Injector, createComponent } from '@angular/core';
3
3
  import * as i2 from '@angular/common';
4
4
  import { CommonModule, NgClass } from '@angular/common';
5
5
  import * as i3 from '@angular/forms';
6
6
  import { FormsModule, NgControl, NG_VALUE_ACCESSOR, FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
7
- import * as i4 from '@coreui/angular-pro';
8
- import { FormModule, ButtonModule, MultiSelectModule, MultiSelectComponent, InputGroupComponent, DatePickerModule, ModalModule, TooltipModule, AutocompleteModule, FormCheckInputDirective, TimePickerModule, OffcanvasModule, SpinnerModule, FormPasswordDirective, AlertModule } from '@coreui/angular-pro';
7
+ import * as i1 from '@coreui/angular-pro';
8
+ import { FormModule, ButtonModule, CalendarModule, MultiSelectModule, BadgeModule, MultiSelectComponent, InputGroupComponent, DatePickerModule, ModalModule, TooltipModule, AutocompleteModule, FormCheckInputDirective, TimePickerModule, OffcanvasModule, SpinnerModule, FormPasswordDirective, AlertModule } from '@coreui/angular-pro';
9
9
  import { HttpClient, HttpHeaders } from '@angular/common/http';
10
10
  import { BehaviorSubject, map, lastValueFrom, Subject } from 'rxjs';
11
- import * as i5 from '@coreui/icons-angular';
11
+ import * as i1$1 from '@coreui/icons-angular';
12
12
  import { IconModule } from '@coreui/icons-angular';
13
13
  import * as i8 from 'ngx-bootstrap/datepicker';
14
14
  import { BsDatepickerModule } from 'ngx-bootstrap/datepicker';
@@ -16,7 +16,7 @@ import Swal from 'sweetalert2';
16
16
  import { Tooltip } from '@coreui/coreui-pro';
17
17
  import { ToastrService } from 'ngx-toastr';
18
18
  import { auditTime, takeUntil } from 'rxjs/operators';
19
- import * as i1 from '@ag-grid-community/angular';
19
+ import * as i1$2 from '@ag-grid-community/angular';
20
20
  import { AgGridModule } from '@ag-grid-community/angular';
21
21
  import { ClientSideRowModelModule } from '@ag-grid-community/client-side-row-model';
22
22
  import { ModuleRegistry, _EditCoreModule } from '@ag-grid-community/core';
@@ -120,9 +120,36 @@ class CustomSelectFilterComponent {
120
120
  getUniqueValues() {
121
121
  const values = new Set();
122
122
  this.params.api.forEachNode(node => {
123
- values.add(node.data[this.params.colDef.field]);
123
+ const value = node.data[this.params.colDef.field];
124
+ const formattedValue = this.getFormattedValue(node, value);
125
+ values.add(formattedValue);
124
126
  });
125
- return Array.from(values).sort();
127
+ return Array.from(values).sort((a, b) => {
128
+ if (a === 'BLANK')
129
+ return -1;
130
+ if (b === 'BLANK')
131
+ return 1;
132
+ return a.toLowerCase().localeCompare(b.toLowerCase());
133
+ });
134
+ }
135
+ getFormattedValue(node, value) {
136
+ const formatter = this.params.colDef.valueFormatter;
137
+ let formattedValue = value;
138
+ if (formatter && typeof formatter === 'function') {
139
+ formattedValue = formatter({
140
+ value,
141
+ data: node.data,
142
+ node,
143
+ colDef: this.params.colDef,
144
+ column: this.params.column,
145
+ api: this.params.api,
146
+ context: this.params.context
147
+ });
148
+ }
149
+ if (formattedValue === null || formattedValue === undefined || formattedValue === '') {
150
+ return 'BLANK';
151
+ }
152
+ return String(formattedValue);
126
153
  }
127
154
  isValueSelected(value) {
128
155
  return this.selectedValues.has(value);
@@ -168,7 +195,8 @@ class CustomSelectFilterComponent {
168
195
  }
169
196
  doesFilterPass(params) {
170
197
  const value = params.data[this.params.colDef.field];
171
- return this.selectedValues.has(value);
198
+ const formattedValue = this.getFormattedValue(params.node, value);
199
+ return this.selectedValues.has(formattedValue);
172
200
  }
173
201
  isFilterActive() {
174
202
  return this.selectedValues.size !== this.uniqueValues.length;
@@ -185,6 +213,13 @@ class CustomSelectFilterComponent {
185
213
  }
186
214
  this.filteredValues = [...this.uniqueValues];
187
215
  }
216
+ onReset() {
217
+ this.searchText = '';
218
+ this.selectedValues = new Set(this.uniqueValues);
219
+ this.filteredValues = [...this.uniqueValues];
220
+ this.isIndeterminate = false;
221
+ this.params.filterChangedCallback();
222
+ }
188
223
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CustomSelectFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
189
224
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: CustomSelectFilterComponent, isStandalone: true, selector: "prg-ws-custom-set-filter", viewQueries: [{ propertyName: "searchInputRef", first: true, predicate: ["searchInput"], descendants: true }], ngImport: i0, template: `
190
225
  <div class="select-filter-container">
@@ -210,12 +245,15 @@ class CustomSelectFilterComponent {
210
245
  </label>
211
246
  }
212
247
  </div>
248
+ <div class="filter-actions">
249
+ <button cButton color="primary" size="sm" variant="outline" (click)="onReset()">Reset</button>
250
+ </div>
213
251
  </div>
214
- `, isInline: true, styles: [".select-filter-container{padding:10px}.select-filter-container label{display:flex;gap:5px}.search-box{width:100%;margin-bottom:5px;padding:4px}.checkbox-list{max-height:200px;overflow-y:auto}.checkbox-item{padding:4px 6px;cursor:pointer;border-radius:4px}.checkbox-item:hover{background-color:#f0f0f0}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { 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: "ngmodule", type: FormModule }, { kind: "directive", type: i4.FormCheckInputDirective, selector: "input[cFormCheckInput]", inputs: ["type", "indeterminate", "valid"] }, { kind: "directive", type: i4.FormControlDirective, selector: "input[cFormControl], textarea[cFormControl]", inputs: ["sizing", "valid", "type", "plaintext"] }] });
252
+ `, isInline: true, styles: [".select-filter-container{padding:10px}.select-filter-container label{display:flex;gap:5px}.search-box{width:100%;margin-bottom:5px;padding:4px}.checkbox-list{max-height:200px;overflow-y:auto}.checkbox-item{padding:4px 6px;cursor:pointer;border-radius:4px}.checkbox-item:hover{background-color:#f0f0f0}.filter-actions{display:flex;justify-content:flex-end;margin-top:8px;border-top:1px solid #e0e0e0;padding-top:8px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { 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: "ngmodule", type: FormModule }, { kind: "directive", type: i1.FormCheckInputDirective, selector: "input[cFormCheckInput]", inputs: ["type", "indeterminate", "valid"] }, { kind: "directive", type: i1.FormControlDirective, selector: "input[cFormControl], textarea[cFormControl]", inputs: ["sizing", "valid", "type", "plaintext"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1.ButtonDirective, selector: "[cButton]", inputs: ["active", "color", "disabled", "shape", "size", "tabindex", "type", "variant"], exportAs: ["cButton"] }] });
215
253
  }
216
254
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CustomSelectFilterComponent, decorators: [{
217
255
  type: Component,
218
- args: [{ selector: 'prg-ws-custom-set-filter', standalone: true, imports: [FormsModule, FormModule], template: `
256
+ args: [{ selector: 'prg-ws-custom-set-filter', standalone: true, imports: [FormsModule, FormModule, ButtonModule], template: `
219
257
  <div class="select-filter-container">
220
258
  <input type="text" #searchInput cFormControl [(ngModel)]="searchText" (input)="onSearchChange()" placeholder="Search..." class="search-box" />
221
259
  @if (filteredValues.length > 0) {
@@ -239,13 +277,382 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
239
277
  </label>
240
278
  }
241
279
  </div>
280
+ <div class="filter-actions">
281
+ <button cButton color="primary" size="sm" variant="outline" (click)="onReset()">Reset</button>
282
+ </div>
242
283
  </div>
243
- `, styles: [".select-filter-container{padding:10px}.select-filter-container label{display:flex;gap:5px}.search-box{width:100%;margin-bottom:5px;padding:4px}.checkbox-list{max-height:200px;overflow-y:auto}.checkbox-item{padding:4px 6px;cursor:pointer;border-radius:4px}.checkbox-item:hover{background-color:#f0f0f0}\n"] }]
284
+ `, styles: [".select-filter-container{padding:10px}.select-filter-container label{display:flex;gap:5px}.search-box{width:100%;margin-bottom:5px;padding:4px}.checkbox-list{max-height:200px;overflow-y:auto}.checkbox-item{padding:4px 6px;cursor:pointer;border-radius:4px}.checkbox-item:hover{background-color:#f0f0f0}.filter-actions{display:flex;justify-content:flex-end;margin-top:8px;border-top:1px solid #e0e0e0;padding-top:8px}\n"] }]
244
285
  }], propDecorators: { searchInputRef: [{
245
286
  type: ViewChild,
246
287
  args: ['searchInput']
247
288
  }] } });
248
289
 
290
+ class AgDateRangeFilterComponent {
291
+ cdr;
292
+ params;
293
+ startDate = null;
294
+ endDate = null;
295
+ viewDate = new Date();
296
+ selectedPresetLabel = null;
297
+ presets = [
298
+ {
299
+ label: 'Today',
300
+ isSelected: false,
301
+ calculate: () => {
302
+ const now = new Date();
303
+ now.setHours(0, 0, 0, 0);
304
+ return { start: now, end: now };
305
+ }
306
+ },
307
+ {
308
+ label: 'Yesterday',
309
+ isSelected: false,
310
+ calculate: () => {
311
+ const today = new Date();
312
+ today.setHours(0, 0, 0, 0);
313
+ const yesterday = new Date(today);
314
+ yesterday.setDate(today.getDate() - 1);
315
+ return { start: yesterday, end: yesterday };
316
+ }
317
+ },
318
+ {
319
+ label: 'This Week',
320
+ isSelected: false,
321
+ calculate: () => {
322
+ const today = new Date();
323
+ today.setHours(0, 0, 0, 0);
324
+ const day = today.getDay() || 7;
325
+ const start = new Date(today);
326
+ if (day !== 1)
327
+ start.setDate(today.getDate() - (day - 1));
328
+ const end = new Date(start);
329
+ end.setDate(start.getDate() + 6);
330
+ return { start, end };
331
+ }
332
+ },
333
+ {
334
+ label: 'This Month',
335
+ isSelected: false,
336
+ calculate: () => {
337
+ const today = new Date();
338
+ today.setHours(0, 0, 0, 0);
339
+ const start = new Date(today.getFullYear(), today.getMonth(), 1);
340
+ const end = new Date(today.getFullYear(), today.getMonth() + 1, 0);
341
+ return { start, end };
342
+ }
343
+ },
344
+ {
345
+ label: 'This Quarter',
346
+ isSelected: false,
347
+ calculate: () => {
348
+ const today = new Date();
349
+ today.setHours(0, 0, 0, 0);
350
+ const currQuarter = Math.floor(today.getMonth() / 3);
351
+ const start = new Date(today.getFullYear(), currQuarter * 3, 1);
352
+ const end = new Date(today.getFullYear(), start.getMonth() + 3, 0);
353
+ return { start, end };
354
+ }
355
+ },
356
+ {
357
+ label: 'Last Week',
358
+ isSelected: false,
359
+ calculate: () => {
360
+ const today = new Date();
361
+ today.setHours(0, 0, 0, 0);
362
+ const start = new Date(today);
363
+ const day = start.getDay() || 7;
364
+ start.setDate(today.getDate() - day - 6);
365
+ const end = new Date(start);
366
+ end.setDate(start.getDate() + 6);
367
+ return { start, end };
368
+ }
369
+ },
370
+ {
371
+ label: 'Last Month',
372
+ isSelected: false,
373
+ calculate: () => {
374
+ const today = new Date();
375
+ today.setHours(0, 0, 0, 0);
376
+ const start = new Date(today.getFullYear(), today.getMonth() - 1, 1);
377
+ const end = new Date(today.getFullYear(), today.getMonth(), 0);
378
+ return { start, end };
379
+ }
380
+ },
381
+ {
382
+ label: 'Last Quarter',
383
+ isSelected: false,
384
+ calculate: () => {
385
+ const today = new Date();
386
+ today.setHours(0, 0, 0, 0);
387
+ const lastQuarter = Math.floor(today.getMonth() / 3) - 1;
388
+ const start = new Date(today.getFullYear(), lastQuarter * 3, 1);
389
+ const end = new Date(today.getFullYear(), start.getMonth() + 3, 0);
390
+ return { start, end };
391
+ }
392
+ },
393
+ {
394
+ label: 'Past 7 days',
395
+ isSelected: false,
396
+ calculate: () => this.calculatePastDays(7)
397
+ },
398
+ {
399
+ label: 'Past 30 days',
400
+ isSelected: false,
401
+ calculate: () => this.calculatePastDays(30)
402
+ },
403
+ {
404
+ label: 'Past 90 days',
405
+ isSelected: false,
406
+ calculate: () => this.calculatePastDays(90)
407
+ },
408
+ {
409
+ label: 'Past 180 days',
410
+ isSelected: false,
411
+ calculate: () => this.calculatePastDays(180)
412
+ },
413
+ {
414
+ label: 'Past 365 days',
415
+ isSelected: false,
416
+ calculate: () => this.calculatePastDays(365)
417
+ }
418
+ ];
419
+ constructor(cdr) {
420
+ this.cdr = cdr;
421
+ }
422
+ agInit(params) {
423
+ this.params = params;
424
+ }
425
+ ngAfterViewInit() {
426
+ // Attempt to match preset after view initialization
427
+ if (this.startDate && this.endDate) {
428
+ this.matchAndSelectPreset();
429
+ this.cdr.detectChanges();
430
+ }
431
+ }
432
+ onStartDateChange(date) {
433
+ this.startDate = date;
434
+ this.selectedPresetLabel = null;
435
+ this.clearPresetSelection();
436
+ // Check if both dates are now set and try to match a preset
437
+ if (this.startDate && this.endDate) {
438
+ this.matchAndSelectPreset();
439
+ }
440
+ this.params.filterChangedCallback();
441
+ }
442
+ onEndDateChange(date) {
443
+ this.endDate = date;
444
+ this.selectedPresetLabel = null;
445
+ this.clearPresetSelection();
446
+ // Check if both dates are now set and try to match a preset
447
+ if (this.startDate && this.endDate) {
448
+ this.matchAndSelectPreset();
449
+ }
450
+ this.params.filterChangedCallback();
451
+ }
452
+ clearPresetSelection() {
453
+ this.presets.forEach(p => p.isSelected = false);
454
+ }
455
+ calculatePastDays(days) {
456
+ const today = new Date();
457
+ today.setHours(0, 0, 0, 0);
458
+ const start = new Date(today);
459
+ start.setDate(today.getDate() - days);
460
+ return { start, end: today };
461
+ }
462
+ normalizeDate(date) {
463
+ return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`;
464
+ }
465
+ areDatesEqual(date1, date2) {
466
+ if (!date1 && !date2)
467
+ return true;
468
+ if (!date1 || !date2)
469
+ return false;
470
+ return this.normalizeDate(date1) === this.normalizeDate(date2);
471
+ }
472
+ matchAndSelectPreset() {
473
+ if (!this.startDate || !this.endDate) {
474
+ this.clearPresetSelection();
475
+ this.selectedPresetLabel = null;
476
+ return;
477
+ }
478
+ for (const preset of this.presets) {
479
+ if (preset.calculate) {
480
+ try {
481
+ const { start, end } = preset.calculate();
482
+ if (this.areDatesEqual(this.startDate, start) &&
483
+ this.areDatesEqual(this.endDate, end)) {
484
+ this.clearPresetSelection();
485
+ preset.isSelected = true;
486
+ this.selectedPresetLabel = preset.label;
487
+ console.log('Matched preset:', preset.label);
488
+ return;
489
+ }
490
+ }
491
+ catch (error) {
492
+ console.error('Error calculating preset:', preset.label, error);
493
+ }
494
+ }
495
+ }
496
+ this.clearPresetSelection();
497
+ this.selectedPresetLabel = null;
498
+ }
499
+ onPresetClick(preset) {
500
+ if (preset.calculate) {
501
+ const { start, end } = preset.calculate();
502
+ this.clearPresetSelection();
503
+ preset.isSelected = true;
504
+ this.selectedPresetLabel = preset.label;
505
+ this.startDate = start;
506
+ this.endDate = end;
507
+ this.viewDate = new Date(start);
508
+ this.cdr.detectChanges();
509
+ setTimeout(() => {
510
+ this.params.filterChangedCallback();
511
+ }, 0);
512
+ }
513
+ }
514
+ isFilterActive() {
515
+ return !!this.startDate || !!this.endDate;
516
+ }
517
+ doesFilterPass(params) {
518
+ const field = this.params.colDef.field;
519
+ if (!field)
520
+ return false;
521
+ const value = params.data[field];
522
+ if (!value)
523
+ return false;
524
+ const rowDate = new Date(value);
525
+ const rowTime = new Date(rowDate.getFullYear(), rowDate.getMonth(), rowDate.getDate()).getTime();
526
+ let startLimit = -Infinity;
527
+ if (this.startDate) {
528
+ startLimit = new Date(this.startDate.getFullYear(), this.startDate.getMonth(), this.startDate.getDate()).getTime();
529
+ }
530
+ let endLimit = Infinity;
531
+ if (this.endDate) {
532
+ endLimit = new Date(this.endDate.getFullYear(), this.endDate.getMonth(), this.endDate.getDate()).getTime();
533
+ }
534
+ return rowTime >= startLimit && rowTime <= endLimit;
535
+ }
536
+ getModel() {
537
+ return {
538
+ startDate: this.startDate,
539
+ endDate: this.endDate,
540
+ selectedPreset: this.selectedPresetLabel
541
+ };
542
+ }
543
+ setModel(model) {
544
+ console.log('setModel called with:', model);
545
+ if (model) {
546
+ // Parse dates from model
547
+ this.startDate = model.startDate ? new Date(model.startDate) : null;
548
+ this.endDate = model.endDate ? new Date(model.endDate) : null;
549
+ this.selectedPresetLabel = model.selectedPreset || null;
550
+ // Set view date
551
+ if (this.startDate) {
552
+ this.viewDate = new Date(this.startDate);
553
+ }
554
+ else {
555
+ this.viewDate = new Date();
556
+ }
557
+ // Clear all selections first
558
+ this.clearPresetSelection();
559
+ // If we have a saved preset label, try to select it directly
560
+ if (this.selectedPresetLabel) {
561
+ const preset = this.presets.find(p => p.label === this.selectedPresetLabel);
562
+ if (preset) {
563
+ preset.isSelected = true;
564
+ console.log('Restored preset selection:', this.selectedPresetLabel);
565
+ }
566
+ }
567
+ else if (this.startDate && this.endDate) {
568
+ // Otherwise try to match dates to a preset
569
+ this.matchAndSelectPreset();
570
+ }
571
+ }
572
+ else {
573
+ this.startDate = null;
574
+ this.endDate = null;
575
+ this.selectedPresetLabel = null;
576
+ this.clearPresetSelection();
577
+ this.viewDate = new Date();
578
+ }
579
+ this.cdr.detectChanges();
580
+ }
581
+ onReset() {
582
+ this.startDate = null;
583
+ this.endDate = null;
584
+ this.selectedPresetLabel = null;
585
+ this.clearPresetSelection();
586
+ this.viewDate = new Date();
587
+ this.cdr.detectChanges();
588
+ this.params.filterChangedCallback();
589
+ }
590
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AgDateRangeFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
591
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: AgDateRangeFilterComponent, isStandalone: true, selector: "prg-ws-ag-date-range-filter", ngImport: i0, template: `
592
+ <div class="date-range-filter-container">
593
+ <div class="filter-body">
594
+ <div class="calendar-wrapper">
595
+ <c-calendar
596
+ [range]="true"
597
+ [calendars]="2"
598
+ [startDate]="startDate"
599
+ [endDate]="endDate"
600
+ [calendarDate]="viewDate"
601
+ (startDateChange)="onStartDateChange($event)"
602
+ (endDateChange)="onEndDateChange($event)"
603
+ locale="en-US">
604
+ </c-calendar>
605
+ </div>
606
+ <div class="presets-list">
607
+ @for (preset of presets; track preset.label) {
608
+ <div class="preset-item"
609
+ [class.active]="preset.isSelected"
610
+ (click)="onPresetClick(preset)">
611
+ {{ preset.label }}
612
+ </div>
613
+ }
614
+ </div>
615
+ </div>
616
+ <div class="filter-actions d-flex justify-content-end mt-2 pt-2 border-top">
617
+ <button cButton color="primary" size="sm" variant="outline" (click)="onReset()">Reset</button>
618
+ </div>
619
+ </div>
620
+ `, isInline: true, styles: [".date-range-filter-container{padding:10px;min-width:600px}.filter-body{display:flex;gap:10px}.calendar-wrapper{flex:1;border:1px solid #e0e0e0;border-radius:4px}.presets-list{width:150px;border-left:1px solid #e0e0e0;padding-left:10px;display:flex;flex-direction:column;gap:4px}.preset-item{padding:6px 10px;cursor:pointer;border-radius:4px;font-size:.9em;transition:background-color .2s,color .2s}.preset-item:hover{background-color:#f0f0f0}.preset-item.active{background-color:var(--cui-primary, #321fdb);color:#fff}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: FormModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1.ButtonDirective, selector: "[cButton]", inputs: ["active", "color", "disabled", "shape", "size", "tabindex", "type", "variant"], exportAs: ["cButton"] }, { kind: "ngmodule", type: CalendarModule }, { kind: "component", type: i1.CalendarComponent, selector: "c-calendar", inputs: ["calendarDate", "calendars", "dayFormat", "disabledDates", "startDate", "endDate", "firstDayOfWeek", "locale", "maxDate", "minDate", "navigation", "navYearFirst", "range", "view", "weekdayFormat", "dateFilter", "selectAdjacentDays", "showAdjacentDays", "selectionType", "showWeekNumber", "weekNumbersLabel", "ariaNextMonthLabel", "ariaNextYearLabel", "ariaPrevMonthLabel", "ariaPrevYearLabel"], outputs: ["calendarDateChange", "endDateChange", "startDateChange", "viewChange", "calendarCellHover"], exportAs: ["cCalendar"] }] });
621
+ }
622
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AgDateRangeFilterComponent, decorators: [{
623
+ type: Component,
624
+ args: [{ selector: 'prg-ws-ag-date-range-filter', standalone: true, imports: [CommonModule, FormsModule, FormModule, ButtonModule, CalendarModule], template: `
625
+ <div class="date-range-filter-container">
626
+ <div class="filter-body">
627
+ <div class="calendar-wrapper">
628
+ <c-calendar
629
+ [range]="true"
630
+ [calendars]="2"
631
+ [startDate]="startDate"
632
+ [endDate]="endDate"
633
+ [calendarDate]="viewDate"
634
+ (startDateChange)="onStartDateChange($event)"
635
+ (endDateChange)="onEndDateChange($event)"
636
+ locale="en-US">
637
+ </c-calendar>
638
+ </div>
639
+ <div class="presets-list">
640
+ @for (preset of presets; track preset.label) {
641
+ <div class="preset-item"
642
+ [class.active]="preset.isSelected"
643
+ (click)="onPresetClick(preset)">
644
+ {{ preset.label }}
645
+ </div>
646
+ }
647
+ </div>
648
+ </div>
649
+ <div class="filter-actions d-flex justify-content-end mt-2 pt-2 border-top">
650
+ <button cButton color="primary" size="sm" variant="outline" (click)="onReset()">Reset</button>
651
+ </div>
652
+ </div>
653
+ `, styles: [".date-range-filter-container{padding:10px;min-width:600px}.filter-body{display:flex;gap:10px}.calendar-wrapper{flex:1;border:1px solid #e0e0e0;border-radius:4px}.presets-list{width:150px;border-left:1px solid #e0e0e0;padding-left:10px;display:flex;flex-direction:column;gap:4px}.preset-item{padding:6px 10px;cursor:pointer;border-radius:4px;font-size:.9em;transition:background-color .2s,color .2s}.preset-item:hover{background-color:#f0f0f0}.preset-item.active{background-color:var(--cui-primary, #321fdb);color:#fff}\n"] }]
654
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
655
+
249
656
  class CheckboxCellRendererComponent {
250
657
  value;
251
658
  params;
@@ -277,7 +684,7 @@ class CheckboxCellRendererComponent {
277
684
  [checked]="value"
278
685
  (change)="onChangeCheckBox($event)"
279
686
  [disabled]="ischeckboxDisabled" />
280
- </div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormModule }, { kind: "directive", type: i4.FormCheckInputDirective, selector: "input[cFormCheckInput]", inputs: ["type", "indeterminate", "valid"] }] });
687
+ </div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormModule }, { kind: "directive", type: i1.FormCheckInputDirective, selector: "input[cFormCheckInput]", inputs: ["type", "indeterminate", "valid"] }] });
281
688
  }
282
689
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CheckboxCellRendererComponent, decorators: [{
283
690
  type: Component,
@@ -317,7 +724,7 @@ class CommentsButtonCellRendererComponent {
317
724
  Comments
318
725
  </button>
319
726
  </div>
320
- `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[cButton]", inputs: ["active", "color", "disabled", "shape", "size", "tabindex", "type", "variant"], exportAs: ["cButton"] }] });
727
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1.ButtonDirective, selector: "[cButton]", inputs: ["active", "color", "disabled", "shape", "size", "tabindex", "type", "variant"], exportAs: ["cButton"] }] });
321
728
  }
322
729
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CommentsButtonCellRendererComponent, decorators: [{
323
730
  type: Component,
@@ -607,7 +1014,7 @@ class EditionListGroupedComponent {
607
1014
  });
608
1015
  }
609
1016
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: EditionListGroupedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
610
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: EditionListGroupedComponent, isStandalone: true, selector: "prg-ws-edition-list-grouped", inputs: { label: "label", multiple: "multiple", hasFormError: "hasFormError" }, outputs: { selectedEditionsChange: "selectedEditionsChange" }, ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-12\">\n @if (label) {\n <label for=\"sel-group-edition\">{{ label }}</label>\n }\n <c-multi-select\n [cleaner]=\"true\"\n [selectionType]=\"multiple ? 'counter' : 'text'\"\n [multiple]=\"multiple\"\n clearSearchOnSelect\n [ngClass]=\"{ 'form-invalid': hasFormError }\"\n placeholder=\"All Editions\"\n visibleItems=\"8\"\n (valueChange)=\"onEditionSelection($event)\"\n (visibleChange)=\"onVisibleChange($event)\">\n @for (option of editionPublicationList; track $index + '_' + option.region) {\n <c-multi-select-optgroup>\n <c-multi-select-optgroup-label (click)=\"onSelectEditionGroup(option.region, $index)\" class=\"region-selector cursor-pointer\">{{\n option?.region\n }}</c-multi-select-optgroup-label>\n @for (item of option.values; track item?.description) {\n <c-multi-select-option [value]=\"item\" [selected]=\"item.selected\">{{ '[' + item?.edname + ']' }} {{ item?.description }}</c-multi-select-option>\n }\n </c-multi-select-optgroup>\n }\n </c-multi-select>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i4.MultiSelectComponent, selector: "c-multi-select", inputs: ["allowCreateOptions", "cleaner", "clearSearchOnSelect", "disabled", "loading", "multiple", "options", "optionsMaxHeight", "optionsStyle", "placeholder", "resetSelectionOnOptionsChange", "search", "searchNoResultsLabel", "searchValue", "selectAll", "selectAllLabel", "selectionType", "selectionTypeCounterText", "selectionTypeCounterTextPluralMap", "size", "value", "valid", "virtualScroller", "visibleItems", "itemSize", "itemMinWidth", "visible", "popperOptions"], outputs: ["searchValueChange", "valueChange", "visibleChange"], exportAs: ["cMultiSelect"] }, { kind: "component", type: i4.MultiSelectOptionComponent, selector: "c-multi-select-option", inputs: ["optionsStyle", "label", "text", "visible", "disabled", "selected", "value", "active", "role"], outputs: ["selectedChange", "focusChange"], exportAs: ["cMultiSelectOption"] }, { kind: "component", type: i4.MultiSelectOptgroupComponent, selector: "c-multi-select-optgroup", inputs: ["label", "disabled"] }, { kind: "component", type: i4.MultiSelectOptgroupLabelComponent, selector: "c-multi-select-optgroup-label" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1017
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: EditionListGroupedComponent, isStandalone: true, selector: "prg-ws-edition-list-grouped", inputs: { label: "label", multiple: "multiple", hasFormError: "hasFormError" }, outputs: { selectedEditionsChange: "selectedEditionsChange" }, ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-12\">\n @if (label) {\n <label for=\"sel-group-edition\">{{ label }}</label>\n }\n <c-multi-select\n [cleaner]=\"true\"\n [selectionType]=\"multiple ? 'counter' : 'text'\"\n [multiple]=\"multiple\"\n clearSearchOnSelect\n [ngClass]=\"{ 'form-invalid': hasFormError }\"\n placeholder=\"All Editions\"\n visibleItems=\"8\"\n (valueChange)=\"onEditionSelection($event)\"\n (visibleChange)=\"onVisibleChange($event)\">\n @for (option of editionPublicationList; track $index + '_' + option.region) {\n <c-multi-select-optgroup>\n <c-multi-select-optgroup-label (click)=\"onSelectEditionGroup(option.region, $index)\" class=\"region-selector cursor-pointer\">{{\n option?.region\n }}</c-multi-select-optgroup-label>\n @for (item of option.values; track item?.description) {\n <c-multi-select-option [value]=\"item\" [selected]=\"item.selected\">{{ '[' + item?.edname + ']' }} {{ item?.description }}</c-multi-select-option>\n }\n </c-multi-select-optgroup>\n }\n </c-multi-select>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i1.MultiSelectComponent, selector: "c-multi-select", inputs: ["allowCreateOptions", "cleaner", "clearSearchOnSelect", "disabled", "loading", "multiple", "options", "optionsMaxHeight", "optionsStyle", "placeholder", "resetSelectionOnOptionsChange", "search", "searchNoResultsLabel", "searchValue", "selectAll", "selectAllLabel", "selectionType", "selectionTypeCounterText", "selectionTypeCounterTextPluralMap", "size", "value", "valid", "virtualScroller", "visibleItems", "itemSize", "itemMinWidth", "visible", "popperOptions"], outputs: ["searchValueChange", "valueChange", "visibleChange"], exportAs: ["cMultiSelect"] }, { kind: "component", type: i1.MultiSelectOptionComponent, selector: "c-multi-select-option", inputs: ["optionsStyle", "label", "text", "visible", "disabled", "selected", "value", "active", "role"], outputs: ["selectedChange", "focusChange"], exportAs: ["cMultiSelectOption"] }, { kind: "component", type: i1.MultiSelectOptgroupComponent, selector: "c-multi-select-optgroup", inputs: ["label", "disabled"] }, { kind: "component", type: i1.MultiSelectOptgroupLabelComponent, selector: "c-multi-select-optgroup-label" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
611
1018
  }
612
1019
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: EditionListGroupedComponent, decorators: [{
613
1020
  type: Component,
@@ -680,7 +1087,7 @@ class PageStatusCellRendererComponent {
680
1087
  return selectedStatus && selectedStatus.html_color ? selectedStatus.html_color : '#C5B4E3';
681
1088
  }
682
1089
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: PageStatusCellRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
683
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: PageStatusCellRendererComponent, isStandalone: true, selector: "prg-ws-page-status-cell-renderer", ngImport: i0, template: "<div class=\"wrapper-production-status-select\">\n <select\n class=\"status-dropdown\"\n aria-label=\"status-dropdown\"\n cSelect\n sizing=\"sm\"\n (click)=\"$event.stopPropagation()\"\n [ngModel]=\"pageStatus!.page_status_name\"\n (ngModelChange)=\"updatePageStatus($event)\"\n [ngStyle]=\"{ '--select-background': getStatusColor() }\">\n @for (status of pageStatusList; track $index) {\n <option [value]=\"status.page_status_name\">\n {{ status.page_status_name }}\n </option>\n }\n </select>\n</div>\n", styles: [".status-dropdown:not(.options){background-color:var(--select-background)}.status-dropdown option{background-color:#fff;color:#000}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { 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: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormModule }, { kind: "directive", type: i4.FormSelectDirective, selector: "select[cSelect]", inputs: ["sizing", "valid"] }] });
1090
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: PageStatusCellRendererComponent, isStandalone: true, selector: "prg-ws-page-status-cell-renderer", ngImport: i0, template: "<div class=\"wrapper-production-status-select\">\n <select\n class=\"status-dropdown\"\n aria-label=\"status-dropdown\"\n cSelect\n sizing=\"sm\"\n (click)=\"$event.stopPropagation()\"\n [ngModel]=\"pageStatus!.page_status_name\"\n (ngModelChange)=\"updatePageStatus($event)\"\n [ngStyle]=\"{ '--select-background': getStatusColor() }\">\n @for (status of pageStatusList; track $index) {\n <option [value]=\"status.page_status_name\">\n {{ status.page_status_name }}\n </option>\n }\n </select>\n</div>\n", styles: [".status-dropdown:not(.options){background-color:var(--select-background)}.status-dropdown option{background-color:#fff;color:#000}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { 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: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormModule }, { kind: "directive", type: i1.FormSelectDirective, selector: "select[cSelect]", inputs: ["sizing", "valid"] }] });
684
1091
  }
685
1092
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: PageStatusCellRendererComponent, decorators: [{
686
1093
  type: Component,
@@ -712,22 +1119,262 @@ class StatusSelectCellRendererComponent {
712
1119
  return selectedStatus && selectedStatus.html_color ? selectedStatus.html_color : '#C5B4E3';
713
1120
  }
714
1121
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: StatusSelectCellRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
715
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: StatusSelectCellRendererComponent, isStandalone: true, selector: "prg-ws-status-select-cell-renderer", ngImport: i0, template: "<div class=\"wrapper-production-status-select\">\n <select\n class=\"status-dropdown\"\n aria-label=\"status-dropdown\"\n cSelect\n sizing=\"sm\"\n (click)=\"$event.stopPropagation()\"\n [ngModel]=\"this.fileStatus!.it_prodstatusid\"\n (ngModelChange)=\"updatePageStatus($event)\"\n [ngStyle]=\"{ '--select-background': getStatusColor() }\">\n @for (status of prodStatusList; track $index) {\n <option [value]=\"status.statusid\">\n {{ status.statusdesc }}\n </option>\n }\n </select>\n</div>\n", styles: [".status-dropdown:not(.options){background-color:var(--select-background)}.status-dropdown option{background-color:#fff;color:#000}\n"], dependencies: [{ kind: "ngmodule", type: FormModule }, { kind: "directive", type: i4.FormSelectDirective, selector: "select[cSelect]", inputs: ["sizing", "valid"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { 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"] }] });
1122
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: StatusSelectCellRendererComponent, isStandalone: true, selector: "prg-ws-status-select-cell-renderer", ngImport: i0, template: "<div class=\"wrapper-production-status-select\">\n <select\n class=\"status-dropdown\"\n aria-label=\"status-dropdown\"\n cSelect\n sizing=\"sm\"\n (click)=\"$event.stopPropagation()\"\n [ngModel]=\"this.fileStatus!.it_prodstatusid\"\n (ngModelChange)=\"updatePageStatus($event)\"\n [ngStyle]=\"{ '--select-background': getStatusColor() }\">\n @for (status of prodStatusList; track $index) {\n <option [value]=\"status.statusid\">\n {{ status.statusdesc }}\n </option>\n }\n </select>\n</div>\n", styles: [".status-dropdown:not(.options){background-color:var(--select-background)}.status-dropdown option{background-color:#fff;color:#000}\n"], dependencies: [{ kind: "ngmodule", type: FormModule }, { kind: "directive", type: i1.FormSelectDirective, selector: "select[cSelect]", inputs: ["sizing", "valid"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { 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"] }] });
716
1123
  }
717
1124
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: StatusSelectCellRendererComponent, decorators: [{
718
1125
  type: Component,
719
1126
  args: [{ standalone: true, imports: [FormModule, CommonModule, FormsModule], selector: 'prg-ws-status-select-cell-renderer', template: "<div class=\"wrapper-production-status-select\">\n <select\n class=\"status-dropdown\"\n aria-label=\"status-dropdown\"\n cSelect\n sizing=\"sm\"\n (click)=\"$event.stopPropagation()\"\n [ngModel]=\"this.fileStatus!.it_prodstatusid\"\n (ngModelChange)=\"updatePageStatus($event)\"\n [ngStyle]=\"{ '--select-background': getStatusColor() }\">\n @for (status of prodStatusList; track $index) {\n <option [value]=\"status.statusid\">\n {{ status.statusdesc }}\n </option>\n }\n </select>\n</div>\n", styles: [".status-dropdown:not(.options){background-color:var(--select-background)}.status-dropdown option{background-color:#fff;color:#000}\n"] }]
720
1127
  }] });
721
1128
 
1129
+ class BadgeCellRendererComponent {
1130
+ displayValue = '';
1131
+ badgeColor = 'secondary';
1132
+ textColor = 'black';
1133
+ customStyles = {};
1134
+ agInit(params) {
1135
+ this.updateValue(params);
1136
+ }
1137
+ refresh(params) {
1138
+ this.updateValue(params);
1139
+ return true;
1140
+ }
1141
+ updateValue(params) {
1142
+ // Determine the value to display
1143
+ this.displayValue = params.valueFormatted || params.value;
1144
+ const rendererParams = params.colDef?.cellRendererParams;
1145
+ // reset defaults
1146
+ this.badgeColor = 'secondary';
1147
+ this.textColor = 'black';
1148
+ this.customStyles = {};
1149
+ if (rendererParams) {
1150
+ if (rendererParams.textColor) {
1151
+ this.textColor = rendererParams.textColor;
1152
+ }
1153
+ // 1. Check for static color
1154
+ if (rendererParams.color) {
1155
+ this.applyColor(rendererParams.color);
1156
+ }
1157
+ // 2. Check for dynamic color map
1158
+ if (rendererParams.colorMap) {
1159
+ // value could be anything, assume string key
1160
+ const key = params.value;
1161
+ if (rendererParams.colorMap[key]) {
1162
+ this.applyColor(rendererParams.colorMap[key]);
1163
+ }
1164
+ }
1165
+ // 3. Check if color depends on another field in the row
1166
+ if (rendererParams.colorField && params.data) {
1167
+ const colorValue = params.data[rendererParams.colorField];
1168
+ if (colorValue) {
1169
+ this.applyColor(colorValue);
1170
+ }
1171
+ }
1172
+ }
1173
+ }
1174
+ applyColor(color) {
1175
+ if (!color)
1176
+ return;
1177
+ const themeColors = ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark'];
1178
+ if (themeColors.includes(color.toLowerCase())) {
1179
+ this.badgeColor = color;
1180
+ delete this.customStyles['background-color'];
1181
+ }
1182
+ else {
1183
+ // Assume it's a custom CSS color (hex, rgb, named color, etc.)
1184
+ this.badgeColor = ''; // Remove utility class color
1185
+ this.customStyles['background-color'] = color;
1186
+ }
1187
+ }
1188
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: BadgeCellRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1189
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: BadgeCellRendererComponent, isStandalone: true, selector: "prg-ws-badge-cell-renderer", ngImport: i0, template: `
1190
+ @if (displayValue) {
1191
+ <c-badge
1192
+ [color]="badgeColor"
1193
+ [ngStyle]="customStyles"
1194
+ [textColor]="textColor"
1195
+ class="text-wrap"
1196
+ >
1197
+ {{ displayValue }}
1198
+ </c-badge>
1199
+ }
1200
+ `, isInline: true, styles: ["c-badge{font-size:.875rem;font-weight:500}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: BadgeModule }, { kind: "component", type: i1.BadgeComponent, selector: "c-badge", inputs: ["color", "position", "shape", "size", "textColor", "textBgColor"] }] });
1201
+ }
1202
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: BadgeCellRendererComponent, decorators: [{
1203
+ type: Component,
1204
+ args: [{ selector: 'prg-ws-badge-cell-renderer', standalone: true, imports: [CommonModule, BadgeModule], template: `
1205
+ @if (displayValue) {
1206
+ <c-badge
1207
+ [color]="badgeColor"
1208
+ [ngStyle]="customStyles"
1209
+ [textColor]="textColor"
1210
+ class="text-wrap"
1211
+ >
1212
+ {{ displayValue }}
1213
+ </c-badge>
1214
+ }
1215
+ `, styles: ["c-badge{font-size:.875rem;font-weight:500}\n"] }]
1216
+ }] });
1217
+
1218
+ class IconTextCellRendererComponent {
1219
+ displayValue = '';
1220
+ iconName = '';
1221
+ iconPosition = 'start';
1222
+ isRed = false;
1223
+ agInit(params) {
1224
+ this.updateValue(params);
1225
+ }
1226
+ refresh(params) {
1227
+ this.updateValue(params);
1228
+ return true;
1229
+ }
1230
+ updateValue(params) {
1231
+ this.displayValue = params.valueFormatted || params.value;
1232
+ const rendererParams = params.colDef?.cellRendererParams;
1233
+ if (rendererParams) {
1234
+ // Icon Logic
1235
+ if (typeof rendererParams.iconName === 'function') {
1236
+ this.iconName = rendererParams.iconName(params);
1237
+ }
1238
+ else {
1239
+ this.iconName = rendererParams.iconName || '';
1240
+ }
1241
+ this.iconPosition = rendererParams.iconPosition || 'start';
1242
+ // Red Condition Logic
1243
+ if (rendererParams.isRedCondition && typeof rendererParams.isRedCondition === 'function') {
1244
+ this.isRed = rendererParams.isRedCondition(params);
1245
+ }
1246
+ else {
1247
+ this.isRed = false;
1248
+ }
1249
+ }
1250
+ }
1251
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: IconTextCellRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1252
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: IconTextCellRendererComponent, isStandalone: true, selector: "prg-ws-icon-text-cell-renderer", ngImport: i0, template: `
1253
+ <div class="d-flex align-items-center" [style.color]="isRed ? 'red' : 'inherit'">
1254
+ @if (iconName && iconPosition === 'start') {
1255
+ <c-icon [name]="iconName" [size]="'sm'" class="me-2"></c-icon>
1256
+ }
1257
+
1258
+ <span class="text-truncate">{{ displayValue }}</span>
1259
+
1260
+ @if (iconName && iconPosition === 'end') {
1261
+ <c-icon [name]="iconName" [size]="'sm'" class="ms-2"></c-icon>
1262
+ }
1263
+ </div>
1264
+ `, isInline: true, styles: [":host{display:block;width:100%;overflow:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: IconModule }, { kind: "component", type: i1$1.IconComponent, selector: "c-icon", inputs: ["content", "attributes", "customClasses", "size", "title", "use", "height", "width", "name", "viewBox"], exportAs: ["cIconComponent"] }] });
1265
+ }
1266
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: IconTextCellRendererComponent, decorators: [{
1267
+ type: Component,
1268
+ args: [{ selector: 'prg-ws-icon-text-cell-renderer', standalone: true, imports: [CommonModule, IconModule], template: `
1269
+ <div class="d-flex align-items-center" [style.color]="isRed ? 'red' : 'inherit'">
1270
+ @if (iconName && iconPosition === 'start') {
1271
+ <c-icon [name]="iconName" [size]="'sm'" class="me-2"></c-icon>
1272
+ }
1273
+
1274
+ <span class="text-truncate">{{ displayValue }}</span>
1275
+
1276
+ @if (iconName && iconPosition === 'end') {
1277
+ <c-icon [name]="iconName" [size]="'sm'" class="ms-2"></c-icon>
1278
+ }
1279
+ </div>
1280
+ `, styles: [":host{display:block;width:100%;overflow:hidden}\n"] }]
1281
+ }] });
1282
+
1283
+ class HyperlinkCellRendererComponent {
1284
+ displayValue = '';
1285
+ href = '';
1286
+ target = '_blank';
1287
+ isLink = false;
1288
+ agInit(params) {
1289
+ this.updateValue(params);
1290
+ }
1291
+ refresh(params) {
1292
+ this.updateValue(params);
1293
+ return true;
1294
+ }
1295
+ updateValue(params) {
1296
+ this.displayValue = params.valueFormatted || params.value;
1297
+ const value = params.value;
1298
+ if (!value) {
1299
+ this.isLink = false;
1300
+ return;
1301
+ }
1302
+ const rendererParams = params.colDef?.cellRendererParams || {};
1303
+ const type = rendererParams.type || 'auto'; // 'link', 'email', 'auto'
1304
+ if (type === 'email') {
1305
+ this.setAsEmail(value);
1306
+ }
1307
+ else if (type === 'link') {
1308
+ this.setAsLink(value, rendererParams.target);
1309
+ }
1310
+ else {
1311
+ // Auto detection
1312
+ if (typeof value === 'string' && value.includes('@') && !value.includes(' ')) { // Simple email check
1313
+ this.setAsEmail(value);
1314
+ }
1315
+ else if (typeof value === 'string' && (value.startsWith('http') || value.startsWith('www.'))) {
1316
+ this.setAsLink(value, rendererParams.target);
1317
+ }
1318
+ else {
1319
+ this.isLink = false;
1320
+ }
1321
+ }
1322
+ }
1323
+ setAsEmail(value) {
1324
+ this.isLink = true;
1325
+ this.href = `mailto:${value}`;
1326
+ this.target = '_self';
1327
+ }
1328
+ setAsLink(value, targetParam) {
1329
+ this.isLink = true;
1330
+ let url = value;
1331
+ // If it starts with www. but no protocol, add https://
1332
+ if (url.startsWith('www.')) {
1333
+ url = `https://${url}`;
1334
+ }
1335
+ else if (!url.startsWith('http') && !url.startsWith('//')) {
1336
+ // If forced as link but no protocol, keep as is or assume https?
1337
+ // Usually browsers handle "google.com" as relative if in href, so prepending https is safer for external links.
1338
+ // However, if it's a relative link intended, we shouldn't touch it.
1339
+ // Given "display link or email", it's likely external or at least absolute.
1340
+ // But to be safe, if strictly 'link' type and no protocol, I might leave it or prepend.
1341
+ // Let's prepend https:// if it looks like a domain (contains dot).
1342
+ if (url.includes('.')) {
1343
+ url = `https://${url}`;
1344
+ }
1345
+ }
1346
+ this.href = url;
1347
+ this.target = targetParam || '_blank';
1348
+ }
1349
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: HyperlinkCellRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1350
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: HyperlinkCellRendererComponent, isStandalone: true, selector: "prg-ws-hyperlink-cell-renderer", ngImport: i0, template: `
1351
+ @if (isLink) {
1352
+ <a [href]="href" [target]="target" (click)="$event.stopPropagation()">{{ displayValue }}</a>
1353
+ } @else {
1354
+ <span>{{ displayValue }}</span>
1355
+ }
1356
+ `, isInline: true, styles: [":host{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}a{text-decoration:underline;cursor:pointer}a:hover{text-decoration:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
1357
+ }
1358
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: HyperlinkCellRendererComponent, decorators: [{
1359
+ type: Component,
1360
+ args: [{ selector: 'prg-ws-hyperlink-cell-renderer', standalone: true, imports: [CommonModule], template: `
1361
+ @if (isLink) {
1362
+ <a [href]="href" [target]="target" (click)="$event.stopPropagation()">{{ displayValue }}</a>
1363
+ } @else {
1364
+ <span>{{ displayValue }}</span>
1365
+ }
1366
+ `, styles: [":host{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}a{text-decoration:underline;cursor:pointer}a:hover{text-decoration:none}\n"] }]
1367
+ }] });
1368
+
722
1369
  var FormFieldType;
723
1370
  (function (FormFieldType) {
724
1371
  FormFieldType["Text"] = "text";
725
1372
  FormFieldType["Email"] = "email";
726
1373
  FormFieldType["Number"] = "number";
727
1374
  FormFieldType["Select"] = "select";
728
- FormFieldType["Autosuggest"] = "autosuggest";
729
1375
  FormFieldType["Textarea"] = "textarea";
730
1376
  FormFieldType["Date"] = "date";
1377
+ FormFieldType["NewDate"] = "new-date";
731
1378
  FormFieldType["Datetime"] = "datetime";
732
1379
  FormFieldType["Switch"] = "switch";
733
1380
  FormFieldType["Checkbox"] = "checkbox";
@@ -1045,6 +1692,7 @@ class DecimalInputDirective {
1045
1692
  control = inject(NgControl);
1046
1693
  sub;
1047
1694
  wsDecimalInput = 4;
1695
+ wsAcceptStringInput = true;
1048
1696
  specialKeys = ['Backspace', 'Tab', 'End', 'Home', 'ArrowLeft', 'ArrowRight', 'Delete'];
1049
1697
  ngOnInit() {
1050
1698
  // Only format when value comes from patchValue / setValue (not typing)
@@ -1087,7 +1735,12 @@ class DecimalInputDirective {
1087
1735
  if (decimalPart.length > this.wsDecimalInput) {
1088
1736
  formatted = integerPart + '.' + decimalPart.slice(0, this.wsDecimalInput);
1089
1737
  }
1090
- this.control.control?.setValue(formatted, { emitEvent: false });
1738
+ if (this.wsAcceptStringInput) {
1739
+ this.control.control?.setValue(formatted, { emitEvent: false });
1740
+ }
1741
+ else {
1742
+ this.control.control?.setValue(Number(formatted), { emitEvent: false });
1743
+ }
1091
1744
  this.el.nativeElement.value = formatted;
1092
1745
  }
1093
1746
  isValidInput(value) {
@@ -1098,7 +1751,7 @@ class DecimalInputDirective {
1098
1751
  return currentValue.slice(0, cursorPos) + key + currentValue.slice(cursorPos);
1099
1752
  }
1100
1753
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: DecimalInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1101
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: DecimalInputDirective, isStandalone: true, selector: "[wsDecimalInput]", inputs: { wsDecimalInput: "wsDecimalInput" }, host: { listeners: { "keydown": "onKeyDown($event)", "blur": "onBlur()" } }, ngImport: i0 });
1754
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: DecimalInputDirective, isStandalone: true, selector: "[wsDecimalInput]", inputs: { wsDecimalInput: "wsDecimalInput", wsAcceptStringInput: "wsAcceptStringInput" }, host: { listeners: { "keydown": "onKeyDown($event)", "blur": "onBlur()" } }, ngImport: i0 });
1102
1755
  }
1103
1756
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: DecimalInputDirective, decorators: [{
1104
1757
  type: Directive,
@@ -1108,6 +1761,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
1108
1761
  }]
1109
1762
  }], propDecorators: { wsDecimalInput: [{
1110
1763
  type: Input
1764
+ }], wsAcceptStringInput: [{
1765
+ type: Input
1111
1766
  }], onKeyDown: [{
1112
1767
  type: HostListener,
1113
1768
  args: ['keydown', ['$event']]
@@ -1400,7 +2055,7 @@ class DateTimePickerComponent {
1400
2055
  useExisting: forwardRef(() => DateTimePickerComponent),
1401
2056
  multi: true
1402
2057
  }
1403
- ], ngImport: i0, template: "<div class=\"row g-3 align-items-end\">\r\n <div class=\"col-12 col-md-6\">\r\n <c-date-picker\r\n [date]=\"date\"\r\n [disabled]=\"disabled\"\r\n (valueChange)=\"onDateChange($event)\"\r\n inputReadOnly=\"true\"\r\n [showAdjacentDays]=\"false\"\r\n [value]=\"date\"\r\n [calendarDate]=\"date\"\r\n locale=\"en-US\">\r\n </c-date-picker>\r\n </div>\r\n\r\n <div class=\"col-12 col-md-6\">\r\n <select cSelect class=\"form-select\" [value]=\"timeValue\" [disabled]=\"disabled\" (change)=\"onTimeChange($any($event.target).value)\">\r\n @if (!date) {\r\n <option value=\"\">Select time</option>\r\n }\r\n @for (time of timeDropdwons; track time.value) {\r\n <option [value]=\"time.value\">\r\n {{ time.label }}\r\n </option>\r\n }\r\n </select>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4.FormSelectDirective, selector: "select[cSelect]", inputs: ["sizing", "valid"] }, { kind: "component", type: i4.DatePickerComponent, selector: "c-date-picker", inputs: ["calendars", "placeholder", "date"], outputs: ["dateChange"], exportAs: ["cDatePicker"] }] });
2058
+ ], ngImport: i0, template: "<div class=\"row g-3 align-items-end\">\r\n <div class=\"col-12 col-md-6\">\r\n <c-date-picker\r\n [date]=\"date\"\r\n [disabled]=\"disabled\"\r\n (valueChange)=\"onDateChange($event)\"\r\n inputReadOnly=\"true\"\r\n [showAdjacentDays]=\"false\"\r\n [value]=\"date\"\r\n [calendarDate]=\"date\"\r\n locale=\"en-US\">\r\n </c-date-picker>\r\n </div>\r\n\r\n <div class=\"col-12 col-md-6\">\r\n <select cSelect class=\"form-select\" [value]=\"timeValue\" [disabled]=\"disabled\" (change)=\"onTimeChange($any($event.target).value)\">\r\n @if (!date) {\r\n <option value=\"\">Select time</option>\r\n }\r\n @for (time of timeDropdwons; track time.value) {\r\n <option [value]=\"time.value\">\r\n {{ time.label }}\r\n </option>\r\n }\r\n </select>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.FormSelectDirective, selector: "select[cSelect]", inputs: ["sizing", "valid"] }, { kind: "component", type: i1.DatePickerComponent, selector: "c-date-picker", inputs: ["calendars", "placeholder", "date"], outputs: ["dateChange"], exportAs: ["cDatePicker"] }] });
1404
2059
  }
1405
2060
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: DateTimePickerComponent, decorators: [{
1406
2061
  type: Component,
@@ -1436,6 +2091,7 @@ class MultiFormComponent {
1436
2091
  };
1437
2092
  colorCodes$ = ColorsCodes;
1438
2093
  FormFieldType = FormFieldType;
2094
+ today = new Date();
1439
2095
  constructor() {
1440
2096
  this.multiForm = this.formBuilder.group({});
1441
2097
  this.isFormSubmitted = false;
@@ -1490,6 +2146,12 @@ class MultiFormComponent {
1490
2146
  disabled: field.validations?.readonly || false
1491
2147
  }, validators));
1492
2148
  }
2149
+ else if (field.type === FormFieldType.Float) {
2150
+ this.multiForm.addControl(field.controlName, this.formBuilder.control({
2151
+ value: field?.value !== '' ? this.updateFloatValue(field.value) : '',
2152
+ disabled: field.validations?.readonly || false
2153
+ }, validators));
2154
+ }
1493
2155
  else {
1494
2156
  this.multiForm.addControl(field.controlName, this.formBuilder.control({ value: field?.value || '', disabled: field.validations?.readonly || false }, validators));
1495
2157
  }
@@ -1517,9 +2179,12 @@ class MultiFormComponent {
1517
2179
  if (field.type === FormFieldType.Checkbox) {
1518
2180
  initialValue = this.getTruthyOrFalsy(field.value) || false;
1519
2181
  }
1520
- else if (field.type === FormFieldType.Date) {
2182
+ else if (field.type === FormFieldType.Date || field.type === FormFieldType.NewDate) {
1521
2183
  initialValue = field?.value ? new Date(field.value) : this.setDefaultAdvanceDate(new Date(), field?.validations?.defaultAdvance || '');
1522
2184
  }
2185
+ else if (field.type === FormFieldType.Float) {
2186
+ initialValue = field?.value ? this.updateFloatValue(field.value) : '';
2187
+ }
1523
2188
  else {
1524
2189
  initialValue = field.value || '';
1525
2190
  }
@@ -1532,9 +2197,12 @@ class MultiFormComponent {
1532
2197
  if (field.type === FormFieldType.Checkbox) {
1533
2198
  control.setValue(this.getTruthyOrFalsy(field.value) || false, { emitEvent: false });
1534
2199
  }
1535
- else if (field.type === FormFieldType.Date) {
2200
+ else if (field.type === FormFieldType.Date || field.type === FormFieldType.NewDate) {
1536
2201
  control.setValue(field?.value ? new Date(field.value) : '', { emitEvent: false });
1537
2202
  }
2203
+ else if (field.type === FormFieldType.Float) {
2204
+ control.setValue(field?.value ? this.updateFloatValue(field.value) : '', { emitEvent: false });
2205
+ }
1538
2206
  else {
1539
2207
  control.setValue(field.value || '', { emitEvent: false });
1540
2208
  }
@@ -1621,6 +2289,16 @@ class MultiFormComponent {
1621
2289
  }
1622
2290
  }
1623
2291
  }
2292
+ // public onDateChange(event: any, controlName: string): void {
2293
+ // const control = this.multiForm.get(controlName);
2294
+ // if (control && event && event.toString() !== control.value?.toString()) {
2295
+ // // Use setTimeout to avoid NG0600 signal error if this is called during a signal update cycle
2296
+ // setTimeout(() => {
2297
+ // control.setValue(event);
2298
+ // this.onDateValueChange(event, controlName);
2299
+ // });
2300
+ // }
2301
+ // }
1624
2302
  onEditionChange(event) {
1625
2303
  const controlNameWithAt = '@edname';
1626
2304
  const controlNameWithoutAt = 'edname';
@@ -1635,10 +2313,9 @@ class MultiFormComponent {
1635
2313
  }
1636
2314
  }
1637
2315
  handleSearch(field, keyword) {
1638
- let param = { keyword, userid: 'luke' };
1639
2316
  const fieldConfig = field.config;
1640
- this.jsonrpcService.postJsonRpcRequest(fieldConfig.method, param).subscribe((response) => {
1641
- response.result = response.result || [];
2317
+ this.jsonrpcService.postJsonRpcRequest(fieldConfig.method, { keyword }).subscribe((response) => {
2318
+ field.options = response?.result || [];
1642
2319
  });
1643
2320
  }
1644
2321
  setDefaultAdvanceDate(currentDate, defaultAdvance) {
@@ -1692,12 +2369,34 @@ class MultiFormComponent {
1692
2369
  }
1693
2370
  return null;
1694
2371
  }
2372
+ /**
2373
+ * Set precision for float type
2374
+ * @param value
2375
+ * @returns
2376
+ */
2377
+ updateFloatValue(value) {
2378
+ if (value == null || value === '') {
2379
+ return null;
2380
+ }
2381
+ const precision = this.configurationService?.allConfigValues()?.formConfig?.formValidations?.defaultDecimalPrecision ?? 2;
2382
+ if (typeof value === 'number') {
2383
+ return Number.isFinite(value) ? value.toFixed(precision) : null;
2384
+ }
2385
+ if (typeof value === 'string') {
2386
+ const trimmed = value.trim();
2387
+ if (trimmed === '')
2388
+ return null;
2389
+ const num = parseFloat(trimmed);
2390
+ return Number.isFinite(num) ? num.toFixed(precision) : null;
2391
+ }
2392
+ return null;
2393
+ }
1695
2394
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MultiFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1696
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: MultiFormComponent, isStandalone: false, selector: "prg-ws-multi-form", inputs: { config: "config", showUnsavedFlags: "showUnsavedFlags", currentTableGridsSelectedIndex: "currentTableGridsSelectedIndex", formId: "formId" }, outputs: { fieldAction: "fieldAction", formSavedUnsavedListen: "formSavedUnsavedListen", selectionChangeEvent: "selectionChangeEvent" }, usesOnChanges: true, ngImport: i0, template: "<form [formGroup]=\"multiForm\" cForm class=\"multiform-wrapper\" wsCircularFocus>\r\n @for (row of config?.rows; track $index; let isLast = $last) {\r\n <div class=\"row gx-3 multiform-inner\" [id]=\"formId\" [ngClass]=\"config?.rows?.length > 1 && !isLast ? 'border-bottom mb-3' : ''\">\r\n @for (field of row; track $index) {\r\n @if (field?.type !== FormFieldType.Separator && field?.type !== FormFieldType.FormHeader) {\r\n <div class=\"mb-3\" [class]=\"'field-' + field.type\" [ngClass]=\"field.colspan ? 'col-md-' + field.colspan : 'col'\" [attr.data-id]=\"field.controlName\">\r\n @if (multiForm.controls[field.controlName]) {\r\n <!-- Label -->\r\n @if (field.label && field.type !== FormFieldType.Checkbox) {\r\n <label\r\n [wsShowTooltipIfTruncated]=\"field.label\"\r\n cLabel\r\n class=\"mb-1 label-multiform single-line-label\"\r\n [for]=\"field.controlName\"\r\n [ngClass]=\"{ 'text-danger': isFormSubmitted && multiForm.controls[field.controlName]?.errors }\"\r\n [ngStyle]=\"field.styles?.label\"\r\n >{{ field.label }}\r\n @if (field?.validations?.required || false) {\r\n <strong class=\"text-danger\">*</strong>\r\n }\r\n </label>\r\n }\r\n\r\n <!-- Text, Email, Number Inputs -->\r\n @if (\r\n field.type === FormFieldType.Text ||\r\n field.type === FormFieldType.Email ||\r\n field.type === FormFieldType.Number ||\r\n field.type === FormFieldType.Password ||\r\n field.type === FormFieldType.Url ||\r\n field.type === FormFieldType.Tel\r\n ) {\r\n <div class=\"position-relative w-100\">\r\n <input\r\n [type]=\"field.type\"\r\n cFormControl\r\n [formControlName]=\"field.controlName\"\r\n [id]=\"field.controlName\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [ngClass]=\"{\r\n 'form-invalid border-danger border border-2':\r\n (multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors,\r\n 'no-label-margin': !field.label\r\n }\"\r\n [min]=\"field.validations?.min\"\r\n [max]=\"field.validations?.max\"\r\n [ngStyle]=\"field.styles?.field\" />\r\n\r\n @if (field.actionButton) {\r\n <button\r\n type=\"button\"\r\n [cTooltip]=\"field.actionButton?.tooltip\"\r\n tooltipPlacement=\"top\"\r\n cButton\r\n color=\"primary\"\r\n variant=\"outline\"\r\n aria-label=\"action\"\r\n class=\"d-flex position-absolute top-50 end-0 translate-middle-y me-2 btn p-0 border-0 bg-transparent\"\r\n (click)=\"onClickFieldAction($event, field)\">\r\n <svg cIcon class=\"text-primary\" [name]=\"field.actionButton.icon\" size=\"xl\"></svg>\r\n </button>\r\n }\r\n @if (multiForm.controls[field.controlName]?.touched || isFormSubmitted) {\r\n @if (multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['pattern']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is invalid</small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['minlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Minimum length {{ field?.validations?.minLength }} characters is required\r\n </small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['maxlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Maximum length {{ field?.validations?.maxLength }} characters is allowed\r\n </small>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Select Inputs -->\r\n @else if (field.type === FormFieldType.Select || field.type === inputType?.colorSelect) {\r\n <ng-container>\r\n <c-multi-select\r\n [multiple]=\"field?.multiple || false\"\r\n [allowCreateOptions]=\"field?.allowCreateOptions || false\"\r\n [search]=\"field?.allowCreateOptions || field?.allowSearch || false\"\r\n [clearSearchOnSelect]=\"true\"\r\n [selectionType]=\"field?.selectionType || 'tags'\"\r\n [cleaner]=\"field?.allowCleaner === false ? false : true\"\r\n [formControlName]=\"field.controlName\"\r\n [placeholder]=\"field.placeholder || 'Select'\"\r\n [wsMultiSelectStyler]=\"field.type === inputType?.colorSelect\"\r\n [options]=\"colorCodes$\"\r\n [optionsMaxHeight]=\"400\"\r\n [ngClass]=\"{\r\n 'form-invalid': (multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors\r\n }\"\r\n (valueChange)=\"onValueChange($event, field.controlName)\"\r\n [ngStyle]=\"field.styles?.field\">\r\n @if (field.type === inputType?.colorSelect) {\r\n @for (option of colorCodes$; track $index) {\r\n <c-multi-select-option [value]=\"option?.label\">\r\n <label class=\"d-flex gap-2\">\r\n <span class=\"color-box\" [style.background-color]=\"option?.value\"></span>\r\n {{ option.label }}\r\n </label>\r\n </c-multi-select-option>\r\n }\r\n } @else {\r\n @for (option of field.options; track $index) {\r\n <c-multi-select-option [value]=\"option?.value\">\r\n {{ option.label }}\r\n </c-multi-select-option>\r\n }\r\n }\r\n </c-multi-select>\r\n @if ((multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n }\r\n }\r\n </ng-container>\r\n }\r\n\r\n <!-- Autosuggest Inputs -->\r\n @else if (field.type === FormFieldType.Autosuggest) {\r\n <ng-container>\r\n <input\r\n cAutocomplete\r\n [options]=\"field.options\"\r\n [searchNoResultsLabel]=\"'No results found'\"\r\n cleaner\r\n highlightOptionsOnSearch\r\n indicator\r\n [formControlName]=\"field.controlName\"\r\n [placeholder]=\"field.placeholder || 'Type and search...'\"\r\n (inputChange)=\"handleSearch(field, $event)\"\r\n [search]=\"{ external: true, global: true }\" />\r\n </ng-container>\r\n }\r\n\r\n <!-- Date input -->\r\n @else if (field.type === FormFieldType.Date) {\r\n <ng-container>\r\n <input\r\n type=\"text\"\r\n [placeholder]=\"field?.label || 'Select Date'\"\r\n class=\"form-control\"\r\n [ngClass]=\"{\r\n 'form-invalid': (multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors\r\n }\"\r\n (bsValueChange)=\"onDateValueChange($event, field.controlName)\"\r\n [formControlName]=\"field.controlName\"\r\n [dateInputFormat]=\"configurationService?.allConfigValues()?.defaultDateFormat || 'MM/DD/YYYY'\"\r\n [bsConfig]=\"{\r\n containerClass: 'pongrass-red-datepicker',\r\n showWeekNumbers: false,\r\n adaptivePosition: true,\r\n useUtc: false\r\n }\"\r\n bsDatepicker\r\n [ngStyle]=\"field.styles?.field\" />\r\n @if ((multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n }\r\n }\r\n </ng-container>\r\n }\r\n\r\n <!-- Date input -->\r\n @else if (field.type === FormFieldType.Datetime) {\r\n <app-date-time-picker [formControlName]=\"field.controlName\"></app-date-time-picker>\r\n }\r\n\r\n <!-- Textarea -->\r\n @else if (field.type === FormFieldType.Textarea) {\r\n <ng-container>\r\n <textarea\r\n cFormControl\r\n [id]=\"field.controlName\"\r\n [rows]=\"field?.textareaRows || 4\"\r\n [columns]=\"field?.textareaColumns || 4\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [ngClass]=\"{\r\n 'form-invalid border-danger border border-2':\r\n (multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors\r\n }\"\r\n [formControlName]=\"field.controlName\"\r\n [ngStyle]=\"field.styles?.field\"></textarea>\r\n @if ((multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['minlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Minimum length {{ field?.validations?.minLength }} characters is required\r\n </small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['maxlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Maximum length {{ field?.validations?.maxLength }} characters is allowed\r\n </small>\r\n }\r\n }\r\n </ng-container>\r\n }\r\n <!-- Checkbox -->\r\n @else if (field.type === FormFieldType.Checkbox) {\r\n <div class=\"no-label-margin\">\r\n <input cFormCheckInput [id]=\"field.controlName\" type=\"checkbox\" [formControlName]=\"field.controlName\" [ngStyle]=\"field.styles?.field\" />\r\n <label cFormCheckLabel [for]=\"field.controlName\" class=\"ms-2\" [ngStyle]=\"field.styles?.label\">{{ field.label }}</label>\r\n </div>\r\n\r\n } @else if (field.type === FormFieldType.Switch) {\r\n <c-form-check sizing=\"lg\" [switch]=\"true\">\r\n <input cFormCheckInput [id]=\"field.controlName\" type=\"checkbox\" [formControlName]=\"field.controlName\" [ngStyle]=\"field.styles?.field\" />\r\n <label cFormCheckLabel [for]=\"field.controlName\" class=\"ms-2\" [ngStyle]=\"field.styles?.label\">{{ field.info }}</label>\r\n </c-form-check>\r\n }\r\n <!-- Decimal input -->\r\n @else if (field.type === FormFieldType.Float) {\r\n <ng-container>\r\n <input\r\n cFormControl\r\n [id]=\"field.controlName\"\r\n type=\"number\"\r\n class=\"me-2\"\r\n [formControlName]=\"field.controlName\"\r\n [wsDecimalInput]=\"field.validations?.precision || 2\"\r\n [ngClass]=\"{\r\n 'form-invalid border-danger border border-2':\r\n (multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors\r\n }\"\r\n [min]=\"field.validations?.min\"\r\n [max]=\"field.validations?.max\"\r\n [ngStyle]=\"field.styles?.field\" />\r\n @if ((multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['pattern']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is invalid</small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['minlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Minimum length {{ field?.validations?.minLength }} characters is required\r\n </small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['maxlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Maximum length {{ field?.validations?.maxLength }} characters is allowed\r\n </small>\r\n }\r\n }\r\n </ng-container>\r\n } @else if (field.type === FormFieldType.Edition) {\r\n <ng-container>\r\n <prg-ws-edition-list-grouped\r\n (selectedEditionsChange)=\"onEditionChange($event)\"\r\n [multiple]=\"field?.multiple === false ? false : true\"\r\n [hasFormError]=\"isFormSubmitted && multiForm.controls[field.controlName]?.errors\">\r\n </prg-ws-edition-list-grouped>\r\n @if ((multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n }\r\n }\r\n </ng-container>\r\n } @else if (field.type === FormFieldType.Timepicker) {\r\n <c-time-picker [formControlName]=\"field.controlName\" seconds />\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n @if (field?.type === FormFieldType.Separator) {\r\n <div [class]=\"'field-' + field.type\" [ngClass]=\"field.colspan ? 'col-md-' + field.colspan : 'col'\"></div>\r\n }\r\n @if (field?.type === FormFieldType.FormHeader) {\r\n <div [class]=\"'fs-6 fw-bold my-2 field-' + field.type\" [ngClass]=\"field.colspan ? 'col-md-' + field.colspan : 'col'\">{{ field?.label }}</div>\r\n }\r\n }\r\n </div>\r\n }\r\n</form>\r\n", styles: [".no-label-margin{margin-top:1.6rem}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.h-135{height:135px}.single-line-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;display:block}.label-multiform{font-size:16px;font-weight:400}.field-checkbox{display:flex;align-items:center}::ng-deep [data-coreui-theme=dark] .bs-datepicker{background:#212631;box-shadow:0 0 10px #323a49}::ng-deep [data-coreui-theme=dark] .bs-datepicker .bs-datepicker-body{border:1px solid #323a49}::ng-deep .pongrass-red-datepicker .bs-datepicker-head{background-color:#ff4d5c}::ng-deep .pongrass-red-datepicker .bs-datepicker-body table td span.selected,::ng-deep .pongrass-red-datepicker .theme-red .bs-datepicker-body table td.selected span,::ng-deep .pongrass-red-datepicker .theme-red .bs-datepicker-body table td span[class*=select-]:after,::ng-deep .pongrass-red-datepicker .theme-red .bs-datepicker-body table td[class*=select-] span:after{background-color:#ff4d5c}::ng-deep .pongrass-red-datepicker .bs-datepicker-body table td.week span{color:#ff4d5c}\n"], dependencies: [{ kind: "directive", type: CircularFocusDirective, selector: "[wsCircularFocus]", inputs: ["formId", "formGroup"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i3.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.MultiSelectComponent, selector: "c-multi-select", inputs: ["allowCreateOptions", "cleaner", "clearSearchOnSelect", "disabled", "loading", "multiple", "options", "optionsMaxHeight", "optionsStyle", "placeholder", "resetSelectionOnOptionsChange", "search", "searchNoResultsLabel", "searchValue", "selectAll", "selectAllLabel", "selectionType", "selectionTypeCounterText", "selectionTypeCounterTextPluralMap", "size", "value", "valid", "virtualScroller", "visibleItems", "itemSize", "itemMinWidth", "visible", "popperOptions"], outputs: ["searchValueChange", "valueChange", "visibleChange"], exportAs: ["cMultiSelect"] }, { kind: "component", type: i4.MultiSelectOptionComponent, selector: "c-multi-select-option", inputs: ["optionsStyle", "label", "text", "visible", "disabled", "selected", "value", "active", "role"], outputs: ["selectedChange", "focusChange"], exportAs: ["cMultiSelectOption"] }, { kind: "directive", type: i4.FormDirective, selector: "form[cForm]", inputs: ["validated"] }, { kind: "component", type: i4.FormCheckComponent, selector: "c-form-check", inputs: ["inline", "reverse", "sizing", "switch"], exportAs: ["cFormCheck"] }, { kind: "directive", type: i4.FormCheckLabelDirective, selector: "label[cFormCheckLabel]" }, { kind: "directive", type: i4.FormCheckInputDirective, selector: "input[cFormCheckInput]", inputs: ["type", "indeterminate", "valid"] }, { kind: "directive", type: i4.FormControlDirective, selector: "input[cFormControl], textarea[cFormControl]", inputs: ["sizing", "valid", "type", "plaintext"] }, { kind: "directive", type: i4.FormLabelDirective, selector: "[cLabel]", inputs: ["cLabel", "sizing"] }, { kind: "directive", type: i5.IconDirective, selector: "svg[cIcon]", inputs: ["cIcon", "customClasses", "size", "title", "height", "width", "name", "viewBox", "xmlns", "pointer-events", "role"], exportAs: ["cIcon"] }, { kind: "directive", type: DecimalInputDirective, selector: "[wsDecimalInput]", inputs: ["wsDecimalInput"] }, { kind: "directive", type: ShowTooltipIfTruncatedDirective, selector: "[wsShowTooltipIfTruncated]", inputs: ["wsShowTooltipIfTruncated"] }, { kind: "directive", type: i4.TooltipDirective, selector: "[cTooltip]", inputs: ["cTooltip", "cTooltipOptions", "cTooltipPlacement", "cTooltipRef", "cTooltipTrigger", "cTooltipVisible"], outputs: ["cTooltipVisibleChange"], exportAs: ["cTooltip"] }, { kind: "directive", type: i4.ButtonDirective, selector: "[cButton]", inputs: ["active", "color", "disabled", "shape", "size", "tabindex", "type", "variant"], exportAs: ["cButton"] }, { kind: "directive", type: i8.BsDatepickerDirective, selector: "[bsDatepicker]", inputs: ["placement", "triggers", "outsideClick", "container", "outsideEsc", "isDisabled", "minDate", "maxDate", "ignoreMinMaxErrors", "minMode", "daysDisabled", "datesDisabled", "datesEnabled", "dateCustomClasses", "dateTooltipTexts", "isOpen", "bsValue", "bsConfig"], outputs: ["onShown", "onHidden", "bsValueChange"], exportAs: ["bsDatepicker"] }, { kind: "directive", type: i8.BsDatepickerInputDirective, selector: "input[bsDatepicker]" }, { kind: "directive", type: i4.AutocompleteDirective, selector: "input[cAutocomplete]", inputs: ["popperOptionsInput", "allowOnlyDefinedOptions", "cleaner", "clearSearchOnSelect", "delay", "disabled", "highlightOptionsOnSearch", "id", "indicator", "itemSize", "loading", "options", "optionsMaxHeight", "optionTemplate", "optionGroupTemplate", "placeholder", "readOnly", "resetSelectionOnOptionsChange", "search", "searchNoResultsLabel", "showHints", "sizing", "valid", "value", "virtualScroller", "visible", "visibleItems"], outputs: ["inputChange", "optionChange", "valueChange", "visibleChange"], exportAs: ["cAutocomplete"] }, { kind: "component", type: EditionListGroupedComponent, selector: "prg-ws-edition-list-grouped", inputs: ["label", "multiple", "hasFormError"], outputs: ["selectedEditionsChange"] }, { kind: "directive", type: MultiSelectStylerDirective, selector: "[wsMultiSelectStyler]", inputs: ["wsMultiSelectStyler", "options"] }, { kind: "component", type: i4.TimePickerComponent, selector: "c-time-picker", inputs: ["cleaner", "dateTimeFormatOptions", "disabled", "filterHours", "filterMinutes", "filterSeconds", "indicator", "inputReadOnly", "locale", "placeholder", "seconds", "size", "time", "variant", "valid", "visible"], outputs: ["timeChange"], exportAs: ["cTimePicker"] }, { kind: "component", type: DateTimePickerComponent, selector: "app-date-time-picker" }] });
2395
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: MultiFormComponent, isStandalone: false, selector: "prg-ws-multi-form", inputs: { config: "config", showUnsavedFlags: "showUnsavedFlags", currentTableGridsSelectedIndex: "currentTableGridsSelectedIndex", formId: "formId" }, outputs: { fieldAction: "fieldAction", formSavedUnsavedListen: "formSavedUnsavedListen", selectionChangeEvent: "selectionChangeEvent" }, usesOnChanges: true, ngImport: i0, template: "<form [formGroup]=\"multiForm\" cForm class=\"multiform-wrapper\" wsCircularFocus>\r\n @for (row of config?.rows; track $index; let isLast = $last) {\r\n <div class=\"row gx-3 multiform-inner\" [id]=\"formId\" [ngClass]=\"config?.rows?.length > 1 && !isLast ? 'border-bottom mb-3' : ''\">\r\n @for (field of row; track $index) {\r\n @if (field?.type !== FormFieldType.Separator && field?.type !== FormFieldType.FormHeader) {\r\n <div class=\"mb-3\" [class]=\"'field-' + field.type\" [ngClass]=\"field.colspan ? 'col-md-' + field.colspan : 'col'\" [attr.data-id]=\"field.controlName\">\r\n @if (multiForm.controls[field.controlName]) {\r\n <!-- Label -->\r\n @if (field.label && field.type !== FormFieldType.Checkbox) {\r\n <label\r\n [wsShowTooltipIfTruncated]=\"field.label\"\r\n cLabel\r\n class=\"mb-1 label-multiform single-line-label\"\r\n [for]=\"field.controlName\"\r\n [ngClass]=\"{ 'text-danger': isFormSubmitted && multiForm.controls[field.controlName]?.errors }\"\r\n [ngStyle]=\"field.styles?.label\"\r\n >{{ field.label }}\r\n @if (field?.validations?.required || false) {\r\n <strong class=\"text-danger\">*</strong>\r\n }\r\n </label>\r\n }\r\n\r\n <!-- Text, Email, Number Inputs -->\r\n @if (\r\n field.type === FormFieldType.Text ||\r\n field.type === FormFieldType.Email ||\r\n field.type === FormFieldType.Number ||\r\n field.type === FormFieldType.Password ||\r\n field.type === FormFieldType.Url ||\r\n field.type === FormFieldType.Tel\r\n ) {\r\n <div class=\"position-relative w-100\">\r\n <input\r\n [type]=\"field.type\"\r\n cFormControl\r\n [formControlName]=\"field.controlName\"\r\n [id]=\"field.controlName\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [ngClass]=\"{\r\n 'form-invalid border-danger border border-2':\r\n (multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors,\r\n 'no-label-margin': !field.label\r\n }\"\r\n [min]=\"field.validations?.min\"\r\n [max]=\"field.validations?.max\"\r\n [ngStyle]=\"field.styles?.field\" />\r\n\r\n @if (field.actionButton) {\r\n <button\r\n type=\"button\"\r\n [cTooltip]=\"field.actionButton?.tooltip\"\r\n tooltipPlacement=\"top\"\r\n cButton\r\n color=\"primary\"\r\n variant=\"outline\"\r\n aria-label=\"action\"\r\n class=\"d-flex position-absolute top-50 end-0 translate-middle-y me-2 btn p-0 border-0 bg-transparent\"\r\n (click)=\"onClickFieldAction($event, field)\">\r\n <svg cIcon class=\"text-primary\" [name]=\"field.actionButton.icon\" size=\"xl\"></svg>\r\n </button>\r\n }\r\n @if (multiForm.controls[field.controlName]?.touched || isFormSubmitted) {\r\n @if (multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['pattern']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is invalid</small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['minlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Minimum length {{ field?.validations?.minLength }} characters is required\r\n </small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['maxlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Maximum length {{ field?.validations?.maxLength }} characters is allowed\r\n </small>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Select Inputs -->\r\n @else if (field.type === FormFieldType.Select || field.type === inputType?.colorSelect) {\r\n <ng-container>\r\n <c-multi-select\r\n [multiple]=\"field?.multiple || false\"\r\n [allowCreateOptions]=\"field?.allowCreateOptions || false\"\r\n [search]=\"field?.allowCreateOptions || field?.allowSearch || field?.search || false\"\r\n [searchNoResultsLabel]=\"field?.searchNoResultsLabel || 'No results found'\"\r\n [clearSearchOnSelect]=\"true\"\r\n [selectionType]=\"field?.selectionType || 'tags'\"\r\n [cleaner]=\"field?.allowCleaner === false ? false : true\"\r\n [formControlName]=\"field.controlName\"\r\n [placeholder]=\"field.placeholder || 'Select'\"\r\n [wsMultiSelectStyler]=\"field.type === inputType?.colorSelect\"\r\n [options]=\"colorCodes$\"\r\n [optionsMaxHeight]=\"400\"\r\n [ngClass]=\"{\r\n 'form-invalid': (multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors\r\n }\"\r\n (searchValueChange)=\"handleSearch(field, $event)\"\r\n (valueChange)=\"onValueChange($event, field.controlName)\"\r\n [ngStyle]=\"field.styles?.field\">\r\n @if (field.type === inputType?.colorSelect) {\r\n @for (option of colorCodes$; track $index) {\r\n <c-multi-select-option [value]=\"option?.label\">\r\n <label class=\"d-flex gap-2\">\r\n <span class=\"color-box\" [style.background-color]=\"option?.value\"></span>\r\n {{ option.label }}\r\n </label>\r\n </c-multi-select-option>\r\n }\r\n } @else {\r\n @for (option of field.options; track $index) {\r\n <c-multi-select-option [value]=\"option?.value\">\r\n {{ option.label }}\r\n </c-multi-select-option>\r\n }\r\n }\r\n </c-multi-select>\r\n @if ((multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n }\r\n }\r\n </ng-container>\r\n }\r\n\r\n <!-- Date input -->\r\n @else if (field.type === FormFieldType.Date) {\r\n <ng-container>\r\n <input\r\n type=\"text\"\r\n [placeholder]=\"field?.label || 'Select Date'\"\r\n class=\"form-control\"\r\n [ngClass]=\"{\r\n 'form-invalid': (multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors\r\n }\"\r\n (bsValueChange)=\"onDateValueChange($event, field.controlName)\"\r\n [formControlName]=\"field.controlName\"\r\n [dateInputFormat]=\"configurationService?.allConfigValues()?.defaultDateFormat || 'MM/DD/YYYY'\"\r\n [bsConfig]=\"{\r\n containerClass: 'pongrass-red-datepicker',\r\n showWeekNumbers: false,\r\n adaptivePosition: true,\r\n useUtc: false\r\n }\"\r\n bsDatepicker\r\n [ngStyle]=\"field.styles?.field\" />\r\n @if ((multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n }\r\n }\r\n </ng-container>\r\n }\r\n\r\n @else if (field.type === FormFieldType.NewDate) {\r\n <ng-container>\r\n <c-date-picker\r\n [formControlName]=\"field.controlName\"\r\n [calendarDate]=\"multiForm.controls[field.controlName]?.value\"\r\n inputReadOnly=\"true\"\r\n [showAdjacentDays]=\"false\"\r\n locale=\"en-US\">\r\n </c-date-picker>\r\n </ng-container>\r\n }\r\n\r\n <!-- Date Time input -->\r\n @else if (field.type === FormFieldType.Datetime) {\r\n <app-date-time-picker [formControlName]=\"field.controlName\"></app-date-time-picker>\r\n }\r\n\r\n <!-- Textarea -->\r\n @else if (field.type === FormFieldType.Textarea) {\r\n <ng-container>\r\n <textarea\r\n cFormControl\r\n [id]=\"field.controlName\"\r\n [rows]=\"field?.textareaRows || 4\"\r\n [columns]=\"field?.textareaColumns || 4\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [ngClass]=\"{\r\n 'form-invalid border-danger border border-2':\r\n (multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors\r\n }\"\r\n [formControlName]=\"field.controlName\"\r\n [ngStyle]=\"field.styles?.field\"></textarea>\r\n @if ((multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['minlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Minimum length {{ field?.validations?.minLength }} characters is required\r\n </small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['maxlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Maximum length {{ field?.validations?.maxLength }} characters is allowed\r\n </small>\r\n }\r\n }\r\n </ng-container>\r\n }\r\n <!-- Checkbox -->\r\n @else if (field.type === FormFieldType.Checkbox) {\r\n <div class=\"no-label-margin\">\r\n <input cFormCheckInput [id]=\"field.controlName\" type=\"checkbox\" [formControlName]=\"field.controlName\" [ngStyle]=\"field.styles?.field\" />\r\n <label cFormCheckLabel [for]=\"field.controlName\" class=\"ms-2\" [ngStyle]=\"field.styles?.label\">{{ field.label }}</label>\r\n </div>\r\n }\r\n\r\n @else if (field.type === FormFieldType.Switch) {\r\n <c-form-check sizing=\"lg\" [switch]=\"true\">\r\n <input cFormCheckInput [id]=\"field.controlName\" type=\"checkbox\" [formControlName]=\"field.controlName\" [ngStyle]=\"field.styles?.field\" />\r\n <label cFormCheckLabel [for]=\"field.controlName\" class=\"ms-2\" [ngStyle]=\"field.styles?.label\">{{ field.info }}</label>\r\n </c-form-check>\r\n }\r\n <!-- Decimal input -->\r\n @else if (field.type === FormFieldType.Float) {\r\n <ng-container>\r\n <input\r\n cFormControl\r\n [id]=\"field.controlName\"\r\n type=\"number\"\r\n class=\"me-2\"\r\n [formControlName]=\"field.controlName\"\r\n [wsDecimalInput]=\"field.validations?.precision || configurationService?.allConfigValues()?.formConfig?.formValidations?.defaultDecimalPrecision || 2\"\r\n [wsAcceptStringInput]=\"false\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [ngClass]=\"{\r\n 'form-invalid border-danger border border-2':\r\n (multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors\r\n }\"\r\n [min]=\"field.validations?.min\"\r\n [max]=\"field.validations?.max\"\r\n [ngStyle]=\"field.styles?.field\" />\r\n @if ((multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['pattern']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is invalid</small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['minlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Minimum length {{ field?.validations?.minLength }} characters is required\r\n </small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['maxlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Maximum length {{ field?.validations?.maxLength }} characters is allowed\r\n </small>\r\n }\r\n }\r\n </ng-container>\r\n } @else if (field.type === FormFieldType.Edition) {\r\n <ng-container>\r\n <prg-ws-edition-list-grouped\r\n (selectedEditionsChange)=\"onEditionChange($event)\"\r\n [multiple]=\"field?.multiple === false ? false : true\"\r\n [hasFormError]=\"isFormSubmitted && multiForm.controls[field.controlName]?.errors\">\r\n </prg-ws-edition-list-grouped>\r\n @if ((multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n }\r\n }\r\n </ng-container>\r\n } @else if (field.type === FormFieldType.Timepicker) {\r\n <c-time-picker [formControlName]=\"field.controlName\" seconds />\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n @if (field?.type === FormFieldType.Separator) {\r\n <div [class]=\"'field-' + field.type\" [ngClass]=\"field.colspan ? 'col-md-' + field.colspan : 'col'\"></div>\r\n }\r\n @if (field?.type === FormFieldType.FormHeader) {\r\n <div [class]=\"'fs-6 fw-bold my-2 field-' + field.type\" [ngClass]=\"field.colspan ? 'col-md-' + field.colspan : 'col'\">{{ field?.label }}</div>\r\n }\r\n }\r\n </div>\r\n }\r\n</form>\r\n", styles: [".no-label-margin{margin-top:1.6rem}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.h-135{height:135px}.single-line-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;display:block}.label-multiform{font-size:16px;font-weight:400}.field-checkbox{display:flex;align-items:center}::ng-deep [data-coreui-theme=dark] .bs-datepicker{background:#212631;box-shadow:0 0 10px #323a49}::ng-deep [data-coreui-theme=dark] .bs-datepicker .bs-datepicker-body{border:1px solid #323a49}::ng-deep .pongrass-red-datepicker .bs-datepicker-head{background-color:#ff4d5c}::ng-deep .pongrass-red-datepicker .bs-datepicker-body table td span.selected,::ng-deep .pongrass-red-datepicker .theme-red .bs-datepicker-body table td.selected span,::ng-deep .pongrass-red-datepicker .theme-red .bs-datepicker-body table td span[class*=select-]:after,::ng-deep .pongrass-red-datepicker .theme-red .bs-datepicker-body table td[class*=select-] span:after{background-color:#ff4d5c}::ng-deep .pongrass-red-datepicker .bs-datepicker-body table td.week span{color:#ff4d5c}\n"], dependencies: [{ kind: "directive", type: CircularFocusDirective, selector: "[wsCircularFocus]", inputs: ["formId", "formGroup"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i3.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i1.MultiSelectComponent, selector: "c-multi-select", inputs: ["allowCreateOptions", "cleaner", "clearSearchOnSelect", "disabled", "loading", "multiple", "options", "optionsMaxHeight", "optionsStyle", "placeholder", "resetSelectionOnOptionsChange", "search", "searchNoResultsLabel", "searchValue", "selectAll", "selectAllLabel", "selectionType", "selectionTypeCounterText", "selectionTypeCounterTextPluralMap", "size", "value", "valid", "virtualScroller", "visibleItems", "itemSize", "itemMinWidth", "visible", "popperOptions"], outputs: ["searchValueChange", "valueChange", "visibleChange"], exportAs: ["cMultiSelect"] }, { kind: "component", type: i1.MultiSelectOptionComponent, selector: "c-multi-select-option", inputs: ["optionsStyle", "label", "text", "visible", "disabled", "selected", "value", "active", "role"], outputs: ["selectedChange", "focusChange"], exportAs: ["cMultiSelectOption"] }, { kind: "directive", type: i1.FormDirective, selector: "form[cForm]", inputs: ["validated"] }, { kind: "component", type: i1.FormCheckComponent, selector: "c-form-check", inputs: ["inline", "reverse", "sizing", "switch"], exportAs: ["cFormCheck"] }, { kind: "directive", type: i1.FormCheckLabelDirective, selector: "label[cFormCheckLabel]" }, { kind: "directive", type: i1.FormCheckInputDirective, selector: "input[cFormCheckInput]", inputs: ["type", "indeterminate", "valid"] }, { kind: "directive", type: i1.FormControlDirective, selector: "input[cFormControl], textarea[cFormControl]", inputs: ["sizing", "valid", "type", "plaintext"] }, { kind: "directive", type: i1.FormLabelDirective, selector: "[cLabel]", inputs: ["cLabel", "sizing"] }, { kind: "directive", type: i1$1.IconDirective, selector: "svg[cIcon]", inputs: ["cIcon", "customClasses", "size", "title", "height", "width", "name", "viewBox", "xmlns", "pointer-events", "role"], exportAs: ["cIcon"] }, { kind: "component", type: i1.DatePickerComponent, selector: "c-date-picker", inputs: ["calendars", "placeholder", "date"], outputs: ["dateChange"], exportAs: ["cDatePicker"] }, { kind: "directive", type: DecimalInputDirective, selector: "[wsDecimalInput]", inputs: ["wsDecimalInput", "wsAcceptStringInput"] }, { kind: "directive", type: ShowTooltipIfTruncatedDirective, selector: "[wsShowTooltipIfTruncated]", inputs: ["wsShowTooltipIfTruncated"] }, { kind: "directive", type: i1.TooltipDirective, selector: "[cTooltip]", inputs: ["cTooltip", "cTooltipOptions", "cTooltipPlacement", "cTooltipRef", "cTooltipTrigger", "cTooltipVisible"], outputs: ["cTooltipVisibleChange"], exportAs: ["cTooltip"] }, { kind: "directive", type: i1.ButtonDirective, selector: "[cButton]", inputs: ["active", "color", "disabled", "shape", "size", "tabindex", "type", "variant"], exportAs: ["cButton"] }, { kind: "directive", type: i8.BsDatepickerDirective, selector: "[bsDatepicker]", inputs: ["placement", "triggers", "outsideClick", "container", "outsideEsc", "isDisabled", "minDate", "maxDate", "ignoreMinMaxErrors", "minMode", "daysDisabled", "datesDisabled", "datesEnabled", "dateCustomClasses", "dateTooltipTexts", "isOpen", "bsValue", "bsConfig"], outputs: ["onShown", "onHidden", "bsValueChange"], exportAs: ["bsDatepicker"] }, { kind: "directive", type: i8.BsDatepickerInputDirective, selector: "input[bsDatepicker]" }, { kind: "component", type: EditionListGroupedComponent, selector: "prg-ws-edition-list-grouped", inputs: ["label", "multiple", "hasFormError"], outputs: ["selectedEditionsChange"] }, { kind: "directive", type: MultiSelectStylerDirective, selector: "[wsMultiSelectStyler]", inputs: ["wsMultiSelectStyler", "options"] }, { kind: "component", type: i1.TimePickerComponent, selector: "c-time-picker", inputs: ["cleaner", "dateTimeFormatOptions", "disabled", "filterHours", "filterMinutes", "filterSeconds", "indicator", "inputReadOnly", "locale", "placeholder", "seconds", "size", "time", "variant", "valid", "visible"], outputs: ["timeChange"], exportAs: ["cTimePicker"] }, { kind: "component", type: DateTimePickerComponent, selector: "app-date-time-picker" }] });
1697
2396
  }
1698
2397
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: MultiFormComponent, decorators: [{
1699
2398
  type: Component,
1700
- args: [{ selector: 'prg-ws-multi-form', standalone: false, template: "<form [formGroup]=\"multiForm\" cForm class=\"multiform-wrapper\" wsCircularFocus>\r\n @for (row of config?.rows; track $index; let isLast = $last) {\r\n <div class=\"row gx-3 multiform-inner\" [id]=\"formId\" [ngClass]=\"config?.rows?.length > 1 && !isLast ? 'border-bottom mb-3' : ''\">\r\n @for (field of row; track $index) {\r\n @if (field?.type !== FormFieldType.Separator && field?.type !== FormFieldType.FormHeader) {\r\n <div class=\"mb-3\" [class]=\"'field-' + field.type\" [ngClass]=\"field.colspan ? 'col-md-' + field.colspan : 'col'\" [attr.data-id]=\"field.controlName\">\r\n @if (multiForm.controls[field.controlName]) {\r\n <!-- Label -->\r\n @if (field.label && field.type !== FormFieldType.Checkbox) {\r\n <label\r\n [wsShowTooltipIfTruncated]=\"field.label\"\r\n cLabel\r\n class=\"mb-1 label-multiform single-line-label\"\r\n [for]=\"field.controlName\"\r\n [ngClass]=\"{ 'text-danger': isFormSubmitted && multiForm.controls[field.controlName]?.errors }\"\r\n [ngStyle]=\"field.styles?.label\"\r\n >{{ field.label }}\r\n @if (field?.validations?.required || false) {\r\n <strong class=\"text-danger\">*</strong>\r\n }\r\n </label>\r\n }\r\n\r\n <!-- Text, Email, Number Inputs -->\r\n @if (\r\n field.type === FormFieldType.Text ||\r\n field.type === FormFieldType.Email ||\r\n field.type === FormFieldType.Number ||\r\n field.type === FormFieldType.Password ||\r\n field.type === FormFieldType.Url ||\r\n field.type === FormFieldType.Tel\r\n ) {\r\n <div class=\"position-relative w-100\">\r\n <input\r\n [type]=\"field.type\"\r\n cFormControl\r\n [formControlName]=\"field.controlName\"\r\n [id]=\"field.controlName\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [ngClass]=\"{\r\n 'form-invalid border-danger border border-2':\r\n (multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors,\r\n 'no-label-margin': !field.label\r\n }\"\r\n [min]=\"field.validations?.min\"\r\n [max]=\"field.validations?.max\"\r\n [ngStyle]=\"field.styles?.field\" />\r\n\r\n @if (field.actionButton) {\r\n <button\r\n type=\"button\"\r\n [cTooltip]=\"field.actionButton?.tooltip\"\r\n tooltipPlacement=\"top\"\r\n cButton\r\n color=\"primary\"\r\n variant=\"outline\"\r\n aria-label=\"action\"\r\n class=\"d-flex position-absolute top-50 end-0 translate-middle-y me-2 btn p-0 border-0 bg-transparent\"\r\n (click)=\"onClickFieldAction($event, field)\">\r\n <svg cIcon class=\"text-primary\" [name]=\"field.actionButton.icon\" size=\"xl\"></svg>\r\n </button>\r\n }\r\n @if (multiForm.controls[field.controlName]?.touched || isFormSubmitted) {\r\n @if (multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['pattern']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is invalid</small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['minlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Minimum length {{ field?.validations?.minLength }} characters is required\r\n </small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['maxlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Maximum length {{ field?.validations?.maxLength }} characters is allowed\r\n </small>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Select Inputs -->\r\n @else if (field.type === FormFieldType.Select || field.type === inputType?.colorSelect) {\r\n <ng-container>\r\n <c-multi-select\r\n [multiple]=\"field?.multiple || false\"\r\n [allowCreateOptions]=\"field?.allowCreateOptions || false\"\r\n [search]=\"field?.allowCreateOptions || field?.allowSearch || false\"\r\n [clearSearchOnSelect]=\"true\"\r\n [selectionType]=\"field?.selectionType || 'tags'\"\r\n [cleaner]=\"field?.allowCleaner === false ? false : true\"\r\n [formControlName]=\"field.controlName\"\r\n [placeholder]=\"field.placeholder || 'Select'\"\r\n [wsMultiSelectStyler]=\"field.type === inputType?.colorSelect\"\r\n [options]=\"colorCodes$\"\r\n [optionsMaxHeight]=\"400\"\r\n [ngClass]=\"{\r\n 'form-invalid': (multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors\r\n }\"\r\n (valueChange)=\"onValueChange($event, field.controlName)\"\r\n [ngStyle]=\"field.styles?.field\">\r\n @if (field.type === inputType?.colorSelect) {\r\n @for (option of colorCodes$; track $index) {\r\n <c-multi-select-option [value]=\"option?.label\">\r\n <label class=\"d-flex gap-2\">\r\n <span class=\"color-box\" [style.background-color]=\"option?.value\"></span>\r\n {{ option.label }}\r\n </label>\r\n </c-multi-select-option>\r\n }\r\n } @else {\r\n @for (option of field.options; track $index) {\r\n <c-multi-select-option [value]=\"option?.value\">\r\n {{ option.label }}\r\n </c-multi-select-option>\r\n }\r\n }\r\n </c-multi-select>\r\n @if ((multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n }\r\n }\r\n </ng-container>\r\n }\r\n\r\n <!-- Autosuggest Inputs -->\r\n @else if (field.type === FormFieldType.Autosuggest) {\r\n <ng-container>\r\n <input\r\n cAutocomplete\r\n [options]=\"field.options\"\r\n [searchNoResultsLabel]=\"'No results found'\"\r\n cleaner\r\n highlightOptionsOnSearch\r\n indicator\r\n [formControlName]=\"field.controlName\"\r\n [placeholder]=\"field.placeholder || 'Type and search...'\"\r\n (inputChange)=\"handleSearch(field, $event)\"\r\n [search]=\"{ external: true, global: true }\" />\r\n </ng-container>\r\n }\r\n\r\n <!-- Date input -->\r\n @else if (field.type === FormFieldType.Date) {\r\n <ng-container>\r\n <input\r\n type=\"text\"\r\n [placeholder]=\"field?.label || 'Select Date'\"\r\n class=\"form-control\"\r\n [ngClass]=\"{\r\n 'form-invalid': (multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors\r\n }\"\r\n (bsValueChange)=\"onDateValueChange($event, field.controlName)\"\r\n [formControlName]=\"field.controlName\"\r\n [dateInputFormat]=\"configurationService?.allConfigValues()?.defaultDateFormat || 'MM/DD/YYYY'\"\r\n [bsConfig]=\"{\r\n containerClass: 'pongrass-red-datepicker',\r\n showWeekNumbers: false,\r\n adaptivePosition: true,\r\n useUtc: false\r\n }\"\r\n bsDatepicker\r\n [ngStyle]=\"field.styles?.field\" />\r\n @if ((multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n }\r\n }\r\n </ng-container>\r\n }\r\n\r\n <!-- Date input -->\r\n @else if (field.type === FormFieldType.Datetime) {\r\n <app-date-time-picker [formControlName]=\"field.controlName\"></app-date-time-picker>\r\n }\r\n\r\n <!-- Textarea -->\r\n @else if (field.type === FormFieldType.Textarea) {\r\n <ng-container>\r\n <textarea\r\n cFormControl\r\n [id]=\"field.controlName\"\r\n [rows]=\"field?.textareaRows || 4\"\r\n [columns]=\"field?.textareaColumns || 4\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [ngClass]=\"{\r\n 'form-invalid border-danger border border-2':\r\n (multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors\r\n }\"\r\n [formControlName]=\"field.controlName\"\r\n [ngStyle]=\"field.styles?.field\"></textarea>\r\n @if ((multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['minlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Minimum length {{ field?.validations?.minLength }} characters is required\r\n </small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['maxlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Maximum length {{ field?.validations?.maxLength }} characters is allowed\r\n </small>\r\n }\r\n }\r\n </ng-container>\r\n }\r\n <!-- Checkbox -->\r\n @else if (field.type === FormFieldType.Checkbox) {\r\n <div class=\"no-label-margin\">\r\n <input cFormCheckInput [id]=\"field.controlName\" type=\"checkbox\" [formControlName]=\"field.controlName\" [ngStyle]=\"field.styles?.field\" />\r\n <label cFormCheckLabel [for]=\"field.controlName\" class=\"ms-2\" [ngStyle]=\"field.styles?.label\">{{ field.label }}</label>\r\n </div>\r\n\r\n } @else if (field.type === FormFieldType.Switch) {\r\n <c-form-check sizing=\"lg\" [switch]=\"true\">\r\n <input cFormCheckInput [id]=\"field.controlName\" type=\"checkbox\" [formControlName]=\"field.controlName\" [ngStyle]=\"field.styles?.field\" />\r\n <label cFormCheckLabel [for]=\"field.controlName\" class=\"ms-2\" [ngStyle]=\"field.styles?.label\">{{ field.info }}</label>\r\n </c-form-check>\r\n }\r\n <!-- Decimal input -->\r\n @else if (field.type === FormFieldType.Float) {\r\n <ng-container>\r\n <input\r\n cFormControl\r\n [id]=\"field.controlName\"\r\n type=\"number\"\r\n class=\"me-2\"\r\n [formControlName]=\"field.controlName\"\r\n [wsDecimalInput]=\"field.validations?.precision || 2\"\r\n [ngClass]=\"{\r\n 'form-invalid border-danger border border-2':\r\n (multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors\r\n }\"\r\n [min]=\"field.validations?.min\"\r\n [max]=\"field.validations?.max\"\r\n [ngStyle]=\"field.styles?.field\" />\r\n @if ((multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['pattern']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is invalid</small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['minlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Minimum length {{ field?.validations?.minLength }} characters is required\r\n </small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['maxlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Maximum length {{ field?.validations?.maxLength }} characters is allowed\r\n </small>\r\n }\r\n }\r\n </ng-container>\r\n } @else if (field.type === FormFieldType.Edition) {\r\n <ng-container>\r\n <prg-ws-edition-list-grouped\r\n (selectedEditionsChange)=\"onEditionChange($event)\"\r\n [multiple]=\"field?.multiple === false ? false : true\"\r\n [hasFormError]=\"isFormSubmitted && multiForm.controls[field.controlName]?.errors\">\r\n </prg-ws-edition-list-grouped>\r\n @if ((multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n }\r\n }\r\n </ng-container>\r\n } @else if (field.type === FormFieldType.Timepicker) {\r\n <c-time-picker [formControlName]=\"field.controlName\" seconds />\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n @if (field?.type === FormFieldType.Separator) {\r\n <div [class]=\"'field-' + field.type\" [ngClass]=\"field.colspan ? 'col-md-' + field.colspan : 'col'\"></div>\r\n }\r\n @if (field?.type === FormFieldType.FormHeader) {\r\n <div [class]=\"'fs-6 fw-bold my-2 field-' + field.type\" [ngClass]=\"field.colspan ? 'col-md-' + field.colspan : 'col'\">{{ field?.label }}</div>\r\n }\r\n }\r\n </div>\r\n }\r\n</form>\r\n", styles: [".no-label-margin{margin-top:1.6rem}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.h-135{height:135px}.single-line-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;display:block}.label-multiform{font-size:16px;font-weight:400}.field-checkbox{display:flex;align-items:center}::ng-deep [data-coreui-theme=dark] .bs-datepicker{background:#212631;box-shadow:0 0 10px #323a49}::ng-deep [data-coreui-theme=dark] .bs-datepicker .bs-datepicker-body{border:1px solid #323a49}::ng-deep .pongrass-red-datepicker .bs-datepicker-head{background-color:#ff4d5c}::ng-deep .pongrass-red-datepicker .bs-datepicker-body table td span.selected,::ng-deep .pongrass-red-datepicker .theme-red .bs-datepicker-body table td.selected span,::ng-deep .pongrass-red-datepicker .theme-red .bs-datepicker-body table td span[class*=select-]:after,::ng-deep .pongrass-red-datepicker .theme-red .bs-datepicker-body table td[class*=select-] span:after{background-color:#ff4d5c}::ng-deep .pongrass-red-datepicker .bs-datepicker-body table td.week span{color:#ff4d5c}\n"] }]
2399
+ args: [{ selector: 'prg-ws-multi-form', standalone: false, template: "<form [formGroup]=\"multiForm\" cForm class=\"multiform-wrapper\" wsCircularFocus>\r\n @for (row of config?.rows; track $index; let isLast = $last) {\r\n <div class=\"row gx-3 multiform-inner\" [id]=\"formId\" [ngClass]=\"config?.rows?.length > 1 && !isLast ? 'border-bottom mb-3' : ''\">\r\n @for (field of row; track $index) {\r\n @if (field?.type !== FormFieldType.Separator && field?.type !== FormFieldType.FormHeader) {\r\n <div class=\"mb-3\" [class]=\"'field-' + field.type\" [ngClass]=\"field.colspan ? 'col-md-' + field.colspan : 'col'\" [attr.data-id]=\"field.controlName\">\r\n @if (multiForm.controls[field.controlName]) {\r\n <!-- Label -->\r\n @if (field.label && field.type !== FormFieldType.Checkbox) {\r\n <label\r\n [wsShowTooltipIfTruncated]=\"field.label\"\r\n cLabel\r\n class=\"mb-1 label-multiform single-line-label\"\r\n [for]=\"field.controlName\"\r\n [ngClass]=\"{ 'text-danger': isFormSubmitted && multiForm.controls[field.controlName]?.errors }\"\r\n [ngStyle]=\"field.styles?.label\"\r\n >{{ field.label }}\r\n @if (field?.validations?.required || false) {\r\n <strong class=\"text-danger\">*</strong>\r\n }\r\n </label>\r\n }\r\n\r\n <!-- Text, Email, Number Inputs -->\r\n @if (\r\n field.type === FormFieldType.Text ||\r\n field.type === FormFieldType.Email ||\r\n field.type === FormFieldType.Number ||\r\n field.type === FormFieldType.Password ||\r\n field.type === FormFieldType.Url ||\r\n field.type === FormFieldType.Tel\r\n ) {\r\n <div class=\"position-relative w-100\">\r\n <input\r\n [type]=\"field.type\"\r\n cFormControl\r\n [formControlName]=\"field.controlName\"\r\n [id]=\"field.controlName\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [ngClass]=\"{\r\n 'form-invalid border-danger border border-2':\r\n (multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors,\r\n 'no-label-margin': !field.label\r\n }\"\r\n [min]=\"field.validations?.min\"\r\n [max]=\"field.validations?.max\"\r\n [ngStyle]=\"field.styles?.field\" />\r\n\r\n @if (field.actionButton) {\r\n <button\r\n type=\"button\"\r\n [cTooltip]=\"field.actionButton?.tooltip\"\r\n tooltipPlacement=\"top\"\r\n cButton\r\n color=\"primary\"\r\n variant=\"outline\"\r\n aria-label=\"action\"\r\n class=\"d-flex position-absolute top-50 end-0 translate-middle-y me-2 btn p-0 border-0 bg-transparent\"\r\n (click)=\"onClickFieldAction($event, field)\">\r\n <svg cIcon class=\"text-primary\" [name]=\"field.actionButton.icon\" size=\"xl\"></svg>\r\n </button>\r\n }\r\n @if (multiForm.controls[field.controlName]?.touched || isFormSubmitted) {\r\n @if (multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['pattern']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is invalid</small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['minlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Minimum length {{ field?.validations?.minLength }} characters is required\r\n </small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['maxlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Maximum length {{ field?.validations?.maxLength }} characters is allowed\r\n </small>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Select Inputs -->\r\n @else if (field.type === FormFieldType.Select || field.type === inputType?.colorSelect) {\r\n <ng-container>\r\n <c-multi-select\r\n [multiple]=\"field?.multiple || false\"\r\n [allowCreateOptions]=\"field?.allowCreateOptions || false\"\r\n [search]=\"field?.allowCreateOptions || field?.allowSearch || field?.search || false\"\r\n [searchNoResultsLabel]=\"field?.searchNoResultsLabel || 'No results found'\"\r\n [clearSearchOnSelect]=\"true\"\r\n [selectionType]=\"field?.selectionType || 'tags'\"\r\n [cleaner]=\"field?.allowCleaner === false ? false : true\"\r\n [formControlName]=\"field.controlName\"\r\n [placeholder]=\"field.placeholder || 'Select'\"\r\n [wsMultiSelectStyler]=\"field.type === inputType?.colorSelect\"\r\n [options]=\"colorCodes$\"\r\n [optionsMaxHeight]=\"400\"\r\n [ngClass]=\"{\r\n 'form-invalid': (multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors\r\n }\"\r\n (searchValueChange)=\"handleSearch(field, $event)\"\r\n (valueChange)=\"onValueChange($event, field.controlName)\"\r\n [ngStyle]=\"field.styles?.field\">\r\n @if (field.type === inputType?.colorSelect) {\r\n @for (option of colorCodes$; track $index) {\r\n <c-multi-select-option [value]=\"option?.label\">\r\n <label class=\"d-flex gap-2\">\r\n <span class=\"color-box\" [style.background-color]=\"option?.value\"></span>\r\n {{ option.label }}\r\n </label>\r\n </c-multi-select-option>\r\n }\r\n } @else {\r\n @for (option of field.options; track $index) {\r\n <c-multi-select-option [value]=\"option?.value\">\r\n {{ option.label }}\r\n </c-multi-select-option>\r\n }\r\n }\r\n </c-multi-select>\r\n @if ((multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n }\r\n }\r\n </ng-container>\r\n }\r\n\r\n <!-- Date input -->\r\n @else if (field.type === FormFieldType.Date) {\r\n <ng-container>\r\n <input\r\n type=\"text\"\r\n [placeholder]=\"field?.label || 'Select Date'\"\r\n class=\"form-control\"\r\n [ngClass]=\"{\r\n 'form-invalid': (multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors\r\n }\"\r\n (bsValueChange)=\"onDateValueChange($event, field.controlName)\"\r\n [formControlName]=\"field.controlName\"\r\n [dateInputFormat]=\"configurationService?.allConfigValues()?.defaultDateFormat || 'MM/DD/YYYY'\"\r\n [bsConfig]=\"{\r\n containerClass: 'pongrass-red-datepicker',\r\n showWeekNumbers: false,\r\n adaptivePosition: true,\r\n useUtc: false\r\n }\"\r\n bsDatepicker\r\n [ngStyle]=\"field.styles?.field\" />\r\n @if ((multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n }\r\n }\r\n </ng-container>\r\n }\r\n\r\n @else if (field.type === FormFieldType.NewDate) {\r\n <ng-container>\r\n <c-date-picker\r\n [formControlName]=\"field.controlName\"\r\n [calendarDate]=\"multiForm.controls[field.controlName]?.value\"\r\n inputReadOnly=\"true\"\r\n [showAdjacentDays]=\"false\"\r\n locale=\"en-US\">\r\n </c-date-picker>\r\n </ng-container>\r\n }\r\n\r\n <!-- Date Time input -->\r\n @else if (field.type === FormFieldType.Datetime) {\r\n <app-date-time-picker [formControlName]=\"field.controlName\"></app-date-time-picker>\r\n }\r\n\r\n <!-- Textarea -->\r\n @else if (field.type === FormFieldType.Textarea) {\r\n <ng-container>\r\n <textarea\r\n cFormControl\r\n [id]=\"field.controlName\"\r\n [rows]=\"field?.textareaRows || 4\"\r\n [columns]=\"field?.textareaColumns || 4\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [ngClass]=\"{\r\n 'form-invalid border-danger border border-2':\r\n (multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors\r\n }\"\r\n [formControlName]=\"field.controlName\"\r\n [ngStyle]=\"field.styles?.field\"></textarea>\r\n @if ((multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['minlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Minimum length {{ field?.validations?.minLength }} characters is required\r\n </small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['maxlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Maximum length {{ field?.validations?.maxLength }} characters is allowed\r\n </small>\r\n }\r\n }\r\n </ng-container>\r\n }\r\n <!-- Checkbox -->\r\n @else if (field.type === FormFieldType.Checkbox) {\r\n <div class=\"no-label-margin\">\r\n <input cFormCheckInput [id]=\"field.controlName\" type=\"checkbox\" [formControlName]=\"field.controlName\" [ngStyle]=\"field.styles?.field\" />\r\n <label cFormCheckLabel [for]=\"field.controlName\" class=\"ms-2\" [ngStyle]=\"field.styles?.label\">{{ field.label }}</label>\r\n </div>\r\n }\r\n\r\n @else if (field.type === FormFieldType.Switch) {\r\n <c-form-check sizing=\"lg\" [switch]=\"true\">\r\n <input cFormCheckInput [id]=\"field.controlName\" type=\"checkbox\" [formControlName]=\"field.controlName\" [ngStyle]=\"field.styles?.field\" />\r\n <label cFormCheckLabel [for]=\"field.controlName\" class=\"ms-2\" [ngStyle]=\"field.styles?.label\">{{ field.info }}</label>\r\n </c-form-check>\r\n }\r\n <!-- Decimal input -->\r\n @else if (field.type === FormFieldType.Float) {\r\n <ng-container>\r\n <input\r\n cFormControl\r\n [id]=\"field.controlName\"\r\n type=\"number\"\r\n class=\"me-2\"\r\n [formControlName]=\"field.controlName\"\r\n [wsDecimalInput]=\"field.validations?.precision || configurationService?.allConfigValues()?.formConfig?.formValidations?.defaultDecimalPrecision || 2\"\r\n [wsAcceptStringInput]=\"false\"\r\n [placeholder]=\"field.placeholder || ''\"\r\n [ngClass]=\"{\r\n 'form-invalid border-danger border border-2':\r\n (multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors\r\n }\"\r\n [min]=\"field.validations?.min\"\r\n [max]=\"field.validations?.max\"\r\n [ngStyle]=\"field.styles?.field\" />\r\n @if ((multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['pattern']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is invalid</small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['minlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Minimum length {{ field?.validations?.minLength }} characters is required\r\n </small>\r\n } @else if (multiForm.controls[field.controlName]?.errors?.['maxlength']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">\r\n Maximum length {{ field?.validations?.maxLength }} characters is allowed\r\n </small>\r\n }\r\n }\r\n </ng-container>\r\n } @else if (field.type === FormFieldType.Edition) {\r\n <ng-container>\r\n <prg-ws-edition-list-grouped\r\n (selectedEditionsChange)=\"onEditionChange($event)\"\r\n [multiple]=\"field?.multiple === false ? false : true\"\r\n [hasFormError]=\"isFormSubmitted && multiForm.controls[field.controlName]?.errors\">\r\n </prg-ws-edition-list-grouped>\r\n @if ((multiForm.controls[field.controlName]?.touched || isFormSubmitted) && multiForm.controls[field.controlName]?.errors) {\r\n @if (multiForm.controls[field.controlName]?.errors?.['required']) {\r\n <small class=\"text-danger fst-italic form-invalid-label\">{{ field?.label }} is required</small>\r\n }\r\n }\r\n </ng-container>\r\n } @else if (field.type === FormFieldType.Timepicker) {\r\n <c-time-picker [formControlName]=\"field.controlName\" seconds />\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n @if (field?.type === FormFieldType.Separator) {\r\n <div [class]=\"'field-' + field.type\" [ngClass]=\"field.colspan ? 'col-md-' + field.colspan : 'col'\"></div>\r\n }\r\n @if (field?.type === FormFieldType.FormHeader) {\r\n <div [class]=\"'fs-6 fw-bold my-2 field-' + field.type\" [ngClass]=\"field.colspan ? 'col-md-' + field.colspan : 'col'\">{{ field?.label }}</div>\r\n }\r\n }\r\n </div>\r\n }\r\n</form>\r\n", styles: [".no-label-margin{margin-top:1.6rem}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.h-135{height:135px}.single-line-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;display:block}.label-multiform{font-size:16px;font-weight:400}.field-checkbox{display:flex;align-items:center}::ng-deep [data-coreui-theme=dark] .bs-datepicker{background:#212631;box-shadow:0 0 10px #323a49}::ng-deep [data-coreui-theme=dark] .bs-datepicker .bs-datepicker-body{border:1px solid #323a49}::ng-deep .pongrass-red-datepicker .bs-datepicker-head{background-color:#ff4d5c}::ng-deep .pongrass-red-datepicker .bs-datepicker-body table td span.selected,::ng-deep .pongrass-red-datepicker .theme-red .bs-datepicker-body table td.selected span,::ng-deep .pongrass-red-datepicker .theme-red .bs-datepicker-body table td span[class*=select-]:after,::ng-deep .pongrass-red-datepicker .theme-red .bs-datepicker-body table td[class*=select-] span:after{background-color:#ff4d5c}::ng-deep .pongrass-red-datepicker .bs-datepicker-body table td.week span{color:#ff4d5c}\n"] }]
1701
2400
  }], ctorParameters: () => [], propDecorators: { config: [{
1702
2401
  type: Input
1703
2402
  }], showUnsavedFlags: [{
@@ -1827,7 +2526,7 @@ class GenericFilterModelComponent {
1827
2526
  this.configurationService.openFilterModal.set(false);
1828
2527
  }
1829
2528
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: GenericFilterModelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1830
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: GenericFilterModelComponent, isStandalone: true, selector: "prg-ws-generic-filter-model", inputs: { filterFormConfiguration: "filterFormConfiguration", tableName: "tableName" }, outputs: { sendFilteredData: "sendFilteredData" }, viewQueries: [{ propertyName: "filterFormComponent", first: true, predicate: ["filterFormComponent"], descendants: true }], ngImport: i0, template: "<!-- Filter Modal -->\n<c-modal id=\"generic-filter-modal\" [visible]=\"isFilterModalActive\" (visibleChange)=\"handleFilterModal($event)\" size=\"md\" alignment=\"center\" scrollable>\n <c-modal-header>\n <h5 cModalTitle>Advanced Search</h5>\n <!-- <button (click)=\"commonService.openFilterModal.set(false)\" cButtonClose></button> -->\n </c-modal-header>\n <c-modal-body>\n @if (filterFormConfiguration) {\n <app-multi-form [config]=\"filterFormConfiguration\" #filterFormComponent></app-multi-form>\n }\n </c-modal-body>\n <c-modal-footer>\n <button (click)=\"close()\" cButton color=\"secondary\">Close</button>\n <button (click)=\"resetFilter()\" cButton color=\"primary\">Reset</button>\n <button cButton color=\"primary\" (click)=\"onFilter()\">Search</button>\n </c-modal-footer>\n</c-modal>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MultiFormModule }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i4.ModalBodyComponent, selector: "c-modal-body" }, { kind: "component", type: i4.ModalComponent, selector: "c-modal", inputs: ["alignment", "backdrop", "fullscreen", "keyboard", "id", "size", "transition", "role", "ariaModal", "scrollable", "visible"], outputs: ["visibleChange"], exportAs: ["cModal"] }, { kind: "component", type: i4.ModalFooterComponent, selector: "c-modal-footer" }, { kind: "component", type: i4.ModalHeaderComponent, selector: "c-modal-header" }, { kind: "directive", type: i4.ModalTitleDirective, selector: "[cModalTitle]" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[cButton]", inputs: ["active", "color", "disabled", "shape", "size", "tabindex", "type", "variant"], exportAs: ["cButton"] }] });
2529
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: GenericFilterModelComponent, isStandalone: true, selector: "prg-ws-generic-filter-model", inputs: { filterFormConfiguration: "filterFormConfiguration", tableName: "tableName" }, outputs: { sendFilteredData: "sendFilteredData" }, viewQueries: [{ propertyName: "filterFormComponent", first: true, predicate: ["filterFormComponent"], descendants: true }], ngImport: i0, template: "<!-- Filter Modal -->\n<c-modal id=\"generic-filter-modal\" [visible]=\"isFilterModalActive\" (visibleChange)=\"handleFilterModal($event)\" size=\"md\" alignment=\"center\" scrollable>\n <c-modal-header>\n <h5 cModalTitle>Advanced Search</h5>\n <!-- <button (click)=\"commonService.openFilterModal.set(false)\" cButtonClose></button> -->\n </c-modal-header>\n <c-modal-body>\n @if (filterFormConfiguration) {\n <app-multi-form [config]=\"filterFormConfiguration\" #filterFormComponent></app-multi-form>\n }\n </c-modal-body>\n <c-modal-footer>\n <button (click)=\"close()\" cButton color=\"secondary\">Close</button>\n <button (click)=\"resetFilter()\" cButton color=\"primary\">Reset</button>\n <button cButton color=\"primary\" (click)=\"onFilter()\">Search</button>\n </c-modal-footer>\n</c-modal>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MultiFormModule }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i1.ModalBodyComponent, selector: "c-modal-body" }, { kind: "component", type: i1.ModalComponent, selector: "c-modal", inputs: ["alignment", "backdrop", "fullscreen", "keyboard", "id", "size", "transition", "role", "ariaModal", "scrollable", "visible"], outputs: ["visibleChange"], exportAs: ["cModal"] }, { kind: "component", type: i1.ModalFooterComponent, selector: "c-modal-footer" }, { kind: "component", type: i1.ModalHeaderComponent, selector: "c-modal-header" }, { kind: "directive", type: i1.ModalTitleDirective, selector: "[cModalTitle]" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1.ButtonDirective, selector: "[cButton]", inputs: ["active", "color", "disabled", "shape", "size", "tabindex", "type", "variant"], exportAs: ["cButton"] }] });
1831
2530
  }
1832
2531
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: GenericFilterModelComponent, decorators: [{
1833
2532
  type: Component,
@@ -1849,6 +2548,7 @@ var FilterType;
1849
2548
  FilterType["TEXT"] = "TEXT_FILTER";
1850
2549
  FilterType["NUMBER"] = "NUMBER_FILTER";
1851
2550
  FilterType["DATE"] = "DATE_FILTER";
2551
+ FilterType["DATE_RANGE"] = "DATE_RANGE_FILTER";
1852
2552
  })(FilterType || (FilterType = {}));
1853
2553
  // Built-in AG Grid filters
1854
2554
  const AgGridFilters = {
@@ -1858,7 +2558,8 @@ const AgGridFilters = {
1858
2558
  };
1859
2559
  // Custom filters that can be used in the table grid
1860
2560
  const TABLE_GRID_FILTER_COMPONENTS = {
1861
- [FilterType.SELECT]: CustomSelectFilterComponent
2561
+ [FilterType.SELECT]: CustomSelectFilterComponent,
2562
+ [FilterType.DATE_RANGE]: AgDateRangeFilterComponent,
1862
2563
  // Add others as needed
1863
2564
  };
1864
2565
 
@@ -1889,7 +2590,7 @@ class TableGridComponent {
1889
2590
  subscribeUntil$ = new Subject();
1890
2591
  autoSizeStrategy = {
1891
2592
  type: 'fitCellContents',
1892
- defaultMinWidth: 100
2593
+ defaultMinWidth: this.configurationService.allConfigValues()?.tableGridConfig?.defaultMinWidth || 100
1893
2594
  };
1894
2595
  /**
1895
2596
  * Resize all columns to fit the grid width while maintaining their minimum widths.
@@ -2000,7 +2701,7 @@ class TableGridComponent {
2000
2701
  const initialState = this.tableGridState.map(item => ({
2001
2702
  colId: item.key,
2002
2703
  hide: item.visible === null || item.visible === undefined ? false : !item.visible,
2003
- width: item.width,
2704
+ width: item.width || this.configurationService.allConfigValues()?.tableGridConfig?.defaultMinWidth || 100,
2004
2705
  sort: item.sort || null
2005
2706
  }));
2006
2707
  this.gridAPI.api.applyColumnState({
@@ -2014,7 +2715,7 @@ class TableGridComponent {
2014
2715
  this.tableGridState.push({
2015
2716
  key: columnState.colId,
2016
2717
  visible: columnState.hide ? !columnState.hide : true,
2017
- width: columnState.width,
2718
+ width: columnState.width || this.configurationService.allConfigValues()?.tableGridConfig?.defaultMinWidth || 100,
2018
2719
  sort: columnState.sort
2019
2720
  });
2020
2721
  });
@@ -2149,7 +2850,7 @@ class TableGridComponent {
2149
2850
  }
2150
2851
  this.tableConfiguration.initialState.forEach((col) => {
2151
2852
  col.visible = col.visible === null || col.visible === undefined ? true : col.visible;
2152
- col.width = 200;
2853
+ col.width = col.width || this.configurationService.allConfigValues()?.tableGridConfig?.defaultMinWidth || 100;
2153
2854
  col.sort = null;
2154
2855
  this.tableGridState.push(col);
2155
2856
  this.columnsListselectionForm.controls[col.key].setValue(true);
@@ -2159,7 +2860,7 @@ class TableGridComponent {
2159
2860
  state: this.tableGridState.map(item => ({
2160
2861
  colId: item.key,
2161
2862
  hide: item.visible === null || item.visible === undefined ? false : !item.visible,
2162
- width: 200,
2863
+ width: item.width || this.configurationService.allConfigValues()?.tableGridConfig?.defaultMinWidth || 100,
2163
2864
  sort: item.sort || null,
2164
2865
  flex: 1
2165
2866
  })),
@@ -2225,7 +2926,7 @@ class TableGridComponent {
2225
2926
  const columnState = this.tableGridState.map(item => ({
2226
2927
  colId: item.key,
2227
2928
  hide: true,
2228
- width: 200,
2929
+ width: this.configurationService.allConfigValues()?.tableGridConfig?.defaultMinWidth || 100,
2229
2930
  sort: item.sort || null,
2230
2931
  flex: 1
2231
2932
  }));
@@ -2263,7 +2964,7 @@ class TableGridComponent {
2263
2964
  this.subscribeUntil$.complete();
2264
2965
  }
2265
2966
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TableGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2266
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: TableGridComponent, isStandalone: false, selector: "prg-ws-table-grid", inputs: { tableConfiguration: "tableConfiguration", columnToolVisible: "columnToolVisible", initialPageNumber: "initialPageNumber" }, outputs: { tableGridReady: "tableGridReady", tableRowSelection: "tableRowSelection", tableRowSelectionChanged: "tableRowSelectionChanged", tableRowClicked: "tableRowClicked", columnStateEvent: "columnStateEvent", pageChange: "pageChange", filterChanged: "filterChanged", cellValueChanged: "cellValueChanged" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"row\">\r\n <div class=\"col-12 d-md-flex\">\r\n <div class=\"table-list-wrapper flex-fill\">\r\n <!-- style=\"width: 100%; height: 567px\" -->\r\n <ag-grid-angular\r\n style=\"width: 100%\"\r\n [rowData]=\"tableConfiguration.rows\"\r\n [columnDefs]=\"tableConfiguration.columnDefs\"\r\n [defaultColDef]=\"tableConfiguration.defaultColDef\"\r\n [rowSelection]=\"tableConfiguration.rowSelectionOption\"\r\n [pagination]=\"tableConfiguration.pagination.enabled\"\r\n [paginationPageSize]=\"tableConfiguration.pagination.paginationPageSize\"\r\n [paginationPageSizeSelector]=\"tableConfiguration.pagination.paginationPageSizeSelector\"\r\n [class]=\"[tableConfiguration.tableClasses, tableConfiguration.tableTheme]\"\r\n [selectionColumnDef]=\"tableConfiguration.selectionColumnDef\"\r\n (gridReady)=\"onGridReady($event)\"\r\n (rowSelected)=\"onRowSelected($event)\"\r\n (rowClicked)=\"onRowClicked($event)\"\r\n (columnResized)=\"onColumnResized($event)\"\r\n (columnMoved)=\"onColumnMoved($event)\"\r\n (sortChanged)=\"onSortChanged($event)\"\r\n (paginationChanged)=\"onPaginationChanged($event)\"\r\n (firstDataRendered)=\"onFirstDataRendered($event)\"\r\n (filterChanged)=\"onFilterChanged($event)\"\r\n (cellValueChanged)=\"onCellValueChanged($event)\"\r\n (selectionChanged)=\"onRowSelectionChanged($event)\" \r\n [masterDetail]=\"tableConfiguration.masterDetail\"\r\n [detailCellRendererParams]=\"tableConfiguration.detailCellRendererParams\"\r\n [detailCellRenderer]=\"tableConfiguration.detailCellRenderer\"\r\n [enableCellTextSelection]=\"true\"\r\n [gridOptions]=\"gridOptions\"\r\n [ensureDomOrder]=\"true\"\r\n [tooltipShowDelay]=\"tableConfiguration.tooltipShowDelay\" />\r\n </div>\r\n\r\n @if (columnToolVisible && columnsListselectionForm) {\r\n <div class=\"columns-list ms-3 p-3 d-md-flex flex-column h-100 d-none border border-1 rounded hide columns-tool\" [id]=\"tableConfiguration.tablename\">\r\n <div class=\"d-flex justify-content-between align-items-center mb-3 gap-2 columns-heading\">\r\n <span\r\n class=\"cursor-pointer text-primary\"\r\n tooltipPlacement=\"top\"\r\n cTooltip=\"Column Preference\"\r\n [cOffcanvasToggle]=\"tableConfiguration.tablename + 'config-columns'\">\r\n <svg cIcon name=\"cilColumns\" size=\"xl\"></svg>\r\n </span>\r\n\r\n <span class=\"cursor-pointer text-primary\" tooltipPlacement=\"top\" cTooltip=\"Auto Resize Columns\" (click)=\"autoSizeAll()\">\r\n <svg cIcon name=\"cilResizeWidth\" size=\"xl\"></svg>\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <c-offcanvas placement=\"end\" [id]=\"tableConfiguration.tablename + 'config-columns'\" width=\"550\">\r\n <c-offcanvas-header>\r\n <h5 cOffcanvasTitle>Table Column Preference</h5>\r\n <button\r\n cButtonClose\r\n size=\"sm\"\r\n class=\"text-reset ms-auto\"\r\n [cOffcanvasToggle]=\"tableConfiguration.tablename + 'config-columns'\"\r\n aria-label=\"Close\"></button>\r\n </c-offcanvas-header>\r\n <c-offcanvas-body>\r\n <div class=\"columns-wrapper mb-2\" [formGroup]=\"columnsListselectionForm\">\r\n @for (item of this.tableGridState; track $index) {\r\n <div class=\"checkbox-item px-1\">\r\n <c-form-check>\r\n <input\r\n (change)=\"getCheckboxStatus($event, item.key)\"\r\n [checked]=\"columnsListselectionForm.get(item.key)?.value\"\r\n cFormCheckInput\r\n [id]=\"'cb_' + item.key\"\r\n type=\"checkbox\"\r\n [formControl]=\"columnsListselectionForm.controls[item.key]\" />\r\n <label class=\"truncate-preference-label\" cFormCheckLabel [for]=\"'cb_' + item.key\" [title]=\"item?.headerName || item?.label\">\r\n {{ item?.headerName || item?.label }}</label\r\n >\r\n </c-form-check>\r\n </div>\r\n }\r\n </div>\r\n <div class=\"align d-flex gap-3 justify-content-end\">\r\n <button\r\n cButton\r\n [disabled]=\"tableConfiguration.tablePreference.disableRemovecolumn\"\r\n color=\"primary\"\r\n class=\"px-2 mt-auto\"\r\n variant=\"outline\"\r\n (click)=\"resetTablePreferenceV2()\">\r\n Clear\r\n </button>\r\n <button\r\n cButton\r\n [disabled]=\"tableConfiguration.tablePreference.disableResetPreference\"\r\n color=\"primary\"\r\n class=\"px-2 mt-auto\"\r\n variant=\"outline\"\r\n (click)=\"resetTablePreference()\">\r\n Reset\r\n </button>\r\n <button\r\n cButton\r\n [disabled]=\"tableConfiguration.tablePreference.disableUpdatePreference\"\r\n color=\"primary\"\r\n class=\"px-2 mt-auto\"\r\n variant=\"outline\"\r\n (click)=\"updatetablePreference()\">\r\n Update\r\n </button>\r\n </div>\r\n </c-offcanvas-body>\r\n </c-offcanvas>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".offcanvas.offcanvas-end{--cui-offcanvas-width: 350px}.border{--cui-border-color: color-mix(in srgb, transparent, #181d1f 15%)}.columns-list{width:210px;transition:width .2s ease-in,padding .2s ease-in;overflow:hidden;display:flex;flex-direction:column;max-height:calc(100vh - 210px)}.default-ag-layout{height:calc(100vh - 210px)}.small-table-container{max-height:calc(100vh - 210px)}.columns-wrapper{flex-grow:1;overflow-y:auto;overflow-x:hidden;transition:opacity .2s ease-in,height .2s ease-in;opacity:1;height:calc(92vh - 93px);overflow:auto}.columns-tool.hide{width:32px;transition:width .2s ease-in,padding .2s ease-in}.columns-tool.hide button,.columns-tool.hide .columns-wrapper{opacity:0;height:0;pointer-events:none}.columns-tool.hide .columns-heading{flex-direction:column}.columns-tool.hide .columns-heading p{margin:50px 0 0;writing-mode:vertical-rl;text-orientation:mixed;letter-spacing:4px;font-size:.8rem;transition:margin .2s ease-in,font-size .2s ease-in}.columns-tool button{transform:scale(1);opacity:1;transition:opacity .2s ease-in,transform .1s ease-in;will-change:opacity,transform;height:40px}.columns-tool.hide button{opacity:0;transform:scale(.95)}.columns-heading{display:flex;justify-content:space-between;align-items:center;transition:flex-direction .2s ease-in}.columns-heading p{margin:0;font-size:1rem;text-align:center;letter-spacing:normal}.truncate-preference-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "component", type: i1.AgGridAngular, selector: "ag-grid-angular", inputs: ["gridOptions", "modules", "statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "columnMenu", "suppressMenuHide", "enableBrowserTooltips", "tooltipTrigger", "tooltipShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "tooltipShowMode", "tooltipInteraction", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "suppressCutToClipboard", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "dataTypeDefinitions", "maintainColumnOrder", "enableStrictPivotColumnOrder", "suppressFieldDotNotation", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressMoveWhenColumnDragging", "suppressDragLeaveHidesColumns", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "autoSizeStrategy", "components", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterNavigatesVertically", "enterNavigatesVerticallyAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "quickFilterText", "cacheQuickFilter", "includeHiddenColumnsInQuickFilter", "quickFilterParser", "quickFilterMatcher", "applyQuickFilterBeforePivotOrAgg", "excludeChildrenWhenTreeDataFiltering", "enableAdvancedFilter", "advancedFilterModel", "includeHiddenColumnsInAdvancedFilter", "advancedFilterParent", "advancedFilterBuilderParams", "suppressAdvancedFilterEval", "suppressSetFilterByDefault", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "chartToolPanelsDef", "chartMenuItems", "loadingCellRenderer", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "dragAndDropImageComponent", "dragAndDropImageComponentParams", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressTouch", "suppressFocusAfterRefresh", "suppressAsyncEvents", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "loading", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "pagination", "paginationPageSize", "paginationPageSizeSelector", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "pivotMode", "pivotPanelShow", "pivotMaxGeneratedColumns", "pivotDefaultExpanded", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "suppressAggFuncInHeader", "alwaysAggregateAtRootLevel", "aggregateOnlyChangedColumns", "suppressAggFilteredOnly", "removePivotHeaderRowWhenSingleValueColumn", "animateRows", "enableCellChangeFlash", "cellFlashDuration", "cellFlashDelay", "cellFadeDuration", "cellFadeDelay", "allowShowChangeAfterFilter", "domLayout", "ensureDomOrder", "enableRtl", "suppressColumnVirtualisation", "suppressMaxRenderedRowRestriction", "suppressRowVirtualisation", "rowDragManaged", "suppressRowDrag", "suppressMoveWhenRowDragging", "rowDragEntireRow", "rowDragMultiRow", "rowDragText", "fullWidthCellRenderer", "fullWidthCellRendererParams", "embedFullWidthRows", "suppressGroupMaintainValueType", "groupDisplayType", "groupDefaultExpanded", "autoGroupColumnDef", "groupMaintainOrder", "groupSelectsChildren", "groupLockGroupColumns", "groupAggFiltering", "groupIncludeFooter", "groupIncludeTotalFooter", "groupTotalRow", "grandTotalRow", "suppressStickyTotalRow", "groupSuppressBlankHeader", "groupSelectsFiltered", "showOpenedGroup", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "groupHideOpenParents", "groupAllowUnbalanced", "rowGroupPanelShow", "groupRowRenderer", "groupRowRendererParams", "suppressMakeColumnVisibleAfterUnGroup", "treeData", "rowGroupPanelSuppressSort", "suppressGroupRowsSticky", "pinnedTopRowData", "pinnedBottomRowData", "rowModelType", "rowData", "asyncTransactionWaitMillis", "suppressModelUpdateAfterUpdateTransaction", "datasource", "cacheOverflowSize", "infiniteInitialRowCount", "serverSideInitialRowCount", "suppressServerSideInfiniteScroll", "suppressServerSideFullWidthLoadingRow", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortAllLevels", "serverSideEnableClientSideSort", "serverSideOnlyRefreshFilteredGroups", "serverSideSortOnServer", "serverSideFilterOnServer", "serverSidePivotResultFieldSeparator", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "cellSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellFocus", "suppressHeaderFocus", "selectionColumnDef", "suppressMultiRangeSelection", "enableCellTextSelection", "enableRangeSelection", "enableRangeHandle", "enableFillHandle", "fillHandleDirection", "suppressClearOnFillReduction", "sortingOrder", "accentedSort", "unSortIcon", "suppressMultiSort", "alwaysMultiSort", "multiSortKey", "suppressMaintainUnsortedOrder", "icons", "rowHeight", "rowStyle", "rowClass", "rowClassRules", "suppressRowHoverHighlight", "suppressRowTransform", "columnHoverHighlight", "gridId", "deltaSort", "treeDataDisplayType", "enableGroupEdit", "initialState", "theme", "loadThemeGoogleFonts", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processUnpinnedColumns", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "focusGridInnerElement", "navigateToNextHeader", "tabToNextHeader", "navigateToNextCell", "tabToNextCell", "getLocaleText", "getDocument", "paginationNumberFormatter", "getGroupRowAgg", "isGroupOpenByDefault", "initialGroupOrderComparator", "processPivotResultColDef", "processPivotResultColGroupDef", "getDataPath", "getChildCount", "getServerSideGroupLevelParams", "isServerSideGroupOpenByDefault", "isApplyServerSideTransaction", "isServerSideGroup", "getServerSideGroupKey", "getBusinessKeyForNode", "getRowId", "resetRowDataOnUpdate", "processRowPostCreate", "isRowSelectable", "isRowMaster", "fillOperation", "postSortRows", "getRowStyle", "getRowClass", "getRowHeight", "isFullWidthRow"], outputs: ["toolPanelVisibleChanged", "toolPanelSizeChanged", "columnMenuVisibleChanged", "contextMenuVisibleChanged", "cutStart", "cutEnd", "pasteStart", "pasteEnd", "columnVisible", "columnPinned", "columnResized", "columnMoved", "columnValueChanged", "columnPivotModeChanged", "columnPivotChanged", "columnGroupOpened", "newColumnsLoaded", "gridColumnsChanged", "displayedColumnsChanged", "virtualColumnsChanged", "columnEverythingChanged", "columnHeaderMouseOver", "columnHeaderMouseLeave", "columnHeaderClicked", "columnHeaderContextMenu", "componentStateChanged", "cellValueChanged", "cellEditRequest", "rowValueChanged", "cellEditingStarted", "cellEditingStopped", "rowEditingStarted", "rowEditingStopped", "undoStarted", "undoEnded", "redoStarted", "redoEnded", "cellSelectionDeleteStart", "cellSelectionDeleteEnd", "rangeDeleteStart", "rangeDeleteEnd", "fillStart", "fillEnd", "filterOpened", "filterChanged", "filterModified", "advancedFilterBuilderVisibleChanged", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "gridReady", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "dragCancelled", "stateUpdated", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "rowDragCancel", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pivotMaxColumnsExceeded", "pinnedRowDataChanged", "rowDataUpdated", "asyncTransactionsFlushed", "storeRefreshed", "headerFocused", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "cellSelectionChanged", "tooltipShow", "tooltipHide", "sortChanged"] }, { kind: "component", type: i4.FormCheckComponent, selector: "c-form-check", inputs: ["inline", "reverse", "sizing", "switch"], exportAs: ["cFormCheck"] }, { kind: "directive", type: i4.FormCheckLabelDirective, selector: "label[cFormCheckLabel]" }, { kind: "directive", type: i4.FormCheckInputDirective, selector: "input[cFormCheckInput]", inputs: ["type", "indeterminate", "valid"] }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.ButtonDirective, selector: "[cButton]", inputs: ["active", "color", "disabled", "shape", "size", "tabindex", "type", "variant"], exportAs: ["cButton"] }, { kind: "directive", type: i4.ButtonCloseDirective, selector: "[cButtonClose]", inputs: ["white"] }, { kind: "component", type: i4.OffcanvasBodyComponent, selector: "c-offcanvas-body" }, { kind: "component", type: i4.OffcanvasComponent, selector: "c-offcanvas", inputs: ["backdrop", "keyboard", "placement", "responsive", "id", "role", "ariaModal", "scroll", "visible"], outputs: ["visibleChange"], exportAs: ["cOffcanvas"] }, { kind: "component", type: i4.OffcanvasHeaderComponent, selector: "c-offcanvas-header" }, { kind: "directive", type: i4.OffcanvasTitleDirective, selector: "[cOffcanvasTitle]" }, { kind: "directive", type: i4.OffcanvasToggleDirective, selector: "[cOffcanvasToggle]", inputs: ["cOffcanvasToggle"] }, { kind: "directive", type: i4.TooltipDirective, selector: "[cTooltip]", inputs: ["cTooltip", "cTooltipOptions", "cTooltipPlacement", "cTooltipRef", "cTooltipTrigger", "cTooltipVisible"], outputs: ["cTooltipVisibleChange"], exportAs: ["cTooltip"] }, { kind: "directive", type: i5.IconDirective, selector: "svg[cIcon]", inputs: ["cIcon", "customClasses", "size", "title", "height", "width", "name", "viewBox", "xmlns", "pointer-events", "role"], exportAs: ["cIcon"] }] });
2967
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: TableGridComponent, isStandalone: false, selector: "prg-ws-table-grid", inputs: { tableConfiguration: "tableConfiguration", columnToolVisible: "columnToolVisible", initialPageNumber: "initialPageNumber" }, outputs: { tableGridReady: "tableGridReady", tableRowSelection: "tableRowSelection", tableRowSelectionChanged: "tableRowSelectionChanged", tableRowClicked: "tableRowClicked", columnStateEvent: "columnStateEvent", pageChange: "pageChange", filterChanged: "filterChanged", cellValueChanged: "cellValueChanged" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"row\">\r\n <div class=\"col-12 d-md-flex\">\r\n <div class=\"table-list-wrapper flex-fill\">\r\n <!-- style=\"width: 100%; height: 567px\" -->\r\n <ag-grid-angular\r\n style=\"width: 100%\"\r\n [rowData]=\"tableConfiguration.rows\"\r\n [columnDefs]=\"tableConfiguration.columnDefs\"\r\n [defaultColDef]=\"tableConfiguration.defaultColDef\"\r\n [rowSelection]=\"tableConfiguration.rowSelectionOption\"\r\n [pagination]=\"tableConfiguration.pagination.enabled\"\r\n [paginationPageSize]=\"tableConfiguration.pagination.paginationPageSize\"\r\n [paginationPageSizeSelector]=\"tableConfiguration.pagination.paginationPageSizeSelector\"\r\n [class]=\"[tableConfiguration.tableClasses, tableConfiguration.tableTheme]\"\r\n [selectionColumnDef]=\"tableConfiguration.selectionColumnDef\"\r\n (gridReady)=\"onGridReady($event)\"\r\n (rowSelected)=\"onRowSelected($event)\"\r\n (rowClicked)=\"onRowClicked($event)\"\r\n (columnResized)=\"onColumnResized($event)\"\r\n (columnMoved)=\"onColumnMoved($event)\"\r\n (sortChanged)=\"onSortChanged($event)\"\r\n (paginationChanged)=\"onPaginationChanged($event)\"\r\n (firstDataRendered)=\"onFirstDataRendered($event)\"\r\n (filterChanged)=\"onFilterChanged($event)\"\r\n (cellValueChanged)=\"onCellValueChanged($event)\"\r\n (selectionChanged)=\"onRowSelectionChanged($event)\" \r\n [masterDetail]=\"tableConfiguration.masterDetail\"\r\n [detailCellRendererParams]=\"tableConfiguration.detailCellRendererParams\"\r\n [detailCellRenderer]=\"tableConfiguration.detailCellRenderer\"\r\n [enableCellTextSelection]=\"true\"\r\n [gridOptions]=\"gridOptions\"\r\n [ensureDomOrder]=\"true\"\r\n [tooltipShowDelay]=\"tableConfiguration.tooltipShowDelay\" />\r\n </div>\r\n\r\n @if (columnToolVisible && columnsListselectionForm) {\r\n <div class=\"columns-list ms-3 p-3 d-md-flex flex-column h-100 d-none border border-1 rounded hide columns-tool\" [id]=\"tableConfiguration.tablename\">\r\n <div class=\"d-flex justify-content-between align-items-center mb-3 gap-2 columns-heading\">\r\n <span\r\n class=\"cursor-pointer text-primary\"\r\n tooltipPlacement=\"top\"\r\n cTooltip=\"Column Preference\"\r\n [cOffcanvasToggle]=\"tableConfiguration.tablename + 'config-columns'\">\r\n <svg cIcon name=\"cilColumns\" size=\"xl\"></svg>\r\n </span>\r\n\r\n <span class=\"cursor-pointer text-primary\" tooltipPlacement=\"top\" cTooltip=\"Auto Resize Columns\" (click)=\"autoSizeAll()\">\r\n <svg cIcon name=\"cilResizeWidth\" size=\"xl\"></svg>\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <c-offcanvas placement=\"end\" [id]=\"tableConfiguration.tablename + 'config-columns'\" width=\"550\">\r\n <c-offcanvas-header>\r\n <h5 cOffcanvasTitle>Table Column Preference</h5>\r\n <button\r\n cButtonClose\r\n size=\"sm\"\r\n class=\"text-reset ms-auto\"\r\n [cOffcanvasToggle]=\"tableConfiguration.tablename + 'config-columns'\"\r\n aria-label=\"Close\"></button>\r\n </c-offcanvas-header>\r\n <c-offcanvas-body>\r\n <div class=\"columns-wrapper mb-2\" [formGroup]=\"columnsListselectionForm\">\r\n @for (item of this.tableGridState; track $index) {\r\n <div class=\"checkbox-item px-1\">\r\n <c-form-check>\r\n <input\r\n (change)=\"getCheckboxStatus($event, item.key)\"\r\n [checked]=\"columnsListselectionForm.get(item.key)?.value\"\r\n cFormCheckInput\r\n [id]=\"'cb_' + item.key\"\r\n type=\"checkbox\"\r\n [formControl]=\"columnsListselectionForm.controls[item.key]\" />\r\n <label class=\"truncate-preference-label\" cFormCheckLabel [for]=\"'cb_' + item.key\" [title]=\"item?.headerName || item?.label\">\r\n {{ item?.headerName || item?.label }}</label\r\n >\r\n </c-form-check>\r\n </div>\r\n }\r\n </div>\r\n <div class=\"align d-flex gap-3 justify-content-end\">\r\n <button\r\n cButton\r\n [disabled]=\"tableConfiguration.tablePreference.disableRemovecolumn\"\r\n color=\"primary\"\r\n class=\"px-2 mt-auto\"\r\n variant=\"outline\"\r\n (click)=\"resetTablePreferenceV2()\">\r\n Clear\r\n </button>\r\n <button\r\n cButton\r\n [disabled]=\"tableConfiguration.tablePreference.disableResetPreference\"\r\n color=\"primary\"\r\n class=\"px-2 mt-auto\"\r\n variant=\"outline\"\r\n (click)=\"resetTablePreference()\">\r\n Reset\r\n </button>\r\n <button\r\n cButton\r\n [disabled]=\"tableConfiguration.tablePreference.disableUpdatePreference\"\r\n color=\"primary\"\r\n class=\"px-2 mt-auto\"\r\n variant=\"outline\"\r\n (click)=\"updatetablePreference()\">\r\n Update\r\n </button>\r\n </div>\r\n </c-offcanvas-body>\r\n </c-offcanvas>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".offcanvas.offcanvas-end{--cui-offcanvas-width: 350px}.border{--cui-border-color: color-mix(in srgb, transparent, #181d1f 15%)}.columns-list{width:210px;transition:width .2s ease-in,padding .2s ease-in;overflow:hidden;display:flex;flex-direction:column;max-height:calc(100vh - 210px)}.default-ag-layout{height:calc(100vh - 210px)}.small-table-container{max-height:calc(100vh - 210px)}.columns-wrapper{flex-grow:1;overflow-y:auto;overflow-x:hidden;transition:opacity .2s ease-in,height .2s ease-in;opacity:1;height:calc(92vh - 93px);overflow:auto}.columns-tool.hide{width:32px;transition:width .2s ease-in,padding .2s ease-in}.columns-tool.hide button,.columns-tool.hide .columns-wrapper{opacity:0;height:0;pointer-events:none}.columns-tool.hide .columns-heading{flex-direction:column}.columns-tool.hide .columns-heading p{margin:50px 0 0;writing-mode:vertical-rl;text-orientation:mixed;letter-spacing:4px;font-size:.8rem;transition:margin .2s ease-in,font-size .2s ease-in}.columns-tool button{transform:scale(1);opacity:1;transition:opacity .2s ease-in,transform .1s ease-in;will-change:opacity,transform;height:40px}.columns-tool.hide button{opacity:0;transform:scale(.95)}.columns-heading{display:flex;justify-content:space-between;align-items:center;transition:flex-direction .2s ease-in}.columns-heading p{margin:0;font-size:1rem;text-align:center;letter-spacing:normal}.truncate-preference-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "component", type: i1$2.AgGridAngular, selector: "ag-grid-angular", inputs: ["gridOptions", "modules", "statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "columnMenu", "suppressMenuHide", "enableBrowserTooltips", "tooltipTrigger", "tooltipShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "tooltipShowMode", "tooltipInteraction", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "suppressCutToClipboard", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "dataTypeDefinitions", "maintainColumnOrder", "enableStrictPivotColumnOrder", "suppressFieldDotNotation", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressMoveWhenColumnDragging", "suppressDragLeaveHidesColumns", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "autoSizeStrategy", "components", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterNavigatesVertically", "enterNavigatesVerticallyAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "quickFilterText", "cacheQuickFilter", "includeHiddenColumnsInQuickFilter", "quickFilterParser", "quickFilterMatcher", "applyQuickFilterBeforePivotOrAgg", "excludeChildrenWhenTreeDataFiltering", "enableAdvancedFilter", "advancedFilterModel", "includeHiddenColumnsInAdvancedFilter", "advancedFilterParent", "advancedFilterBuilderParams", "suppressAdvancedFilterEval", "suppressSetFilterByDefault", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "chartToolPanelsDef", "chartMenuItems", "loadingCellRenderer", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "dragAndDropImageComponent", "dragAndDropImageComponentParams", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressTouch", "suppressFocusAfterRefresh", "suppressAsyncEvents", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "loading", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "pagination", "paginationPageSize", "paginationPageSizeSelector", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "pivotMode", "pivotPanelShow", "pivotMaxGeneratedColumns", "pivotDefaultExpanded", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "suppressAggFuncInHeader", "alwaysAggregateAtRootLevel", "aggregateOnlyChangedColumns", "suppressAggFilteredOnly", "removePivotHeaderRowWhenSingleValueColumn", "animateRows", "enableCellChangeFlash", "cellFlashDuration", "cellFlashDelay", "cellFadeDuration", "cellFadeDelay", "allowShowChangeAfterFilter", "domLayout", "ensureDomOrder", "enableRtl", "suppressColumnVirtualisation", "suppressMaxRenderedRowRestriction", "suppressRowVirtualisation", "rowDragManaged", "suppressRowDrag", "suppressMoveWhenRowDragging", "rowDragEntireRow", "rowDragMultiRow", "rowDragText", "fullWidthCellRenderer", "fullWidthCellRendererParams", "embedFullWidthRows", "suppressGroupMaintainValueType", "groupDisplayType", "groupDefaultExpanded", "autoGroupColumnDef", "groupMaintainOrder", "groupSelectsChildren", "groupLockGroupColumns", "groupAggFiltering", "groupIncludeFooter", "groupIncludeTotalFooter", "groupTotalRow", "grandTotalRow", "suppressStickyTotalRow", "groupSuppressBlankHeader", "groupSelectsFiltered", "showOpenedGroup", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "groupHideOpenParents", "groupAllowUnbalanced", "rowGroupPanelShow", "groupRowRenderer", "groupRowRendererParams", "suppressMakeColumnVisibleAfterUnGroup", "treeData", "rowGroupPanelSuppressSort", "suppressGroupRowsSticky", "pinnedTopRowData", "pinnedBottomRowData", "rowModelType", "rowData", "asyncTransactionWaitMillis", "suppressModelUpdateAfterUpdateTransaction", "datasource", "cacheOverflowSize", "infiniteInitialRowCount", "serverSideInitialRowCount", "suppressServerSideInfiniteScroll", "suppressServerSideFullWidthLoadingRow", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortAllLevels", "serverSideEnableClientSideSort", "serverSideOnlyRefreshFilteredGroups", "serverSideSortOnServer", "serverSideFilterOnServer", "serverSidePivotResultFieldSeparator", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "cellSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellFocus", "suppressHeaderFocus", "selectionColumnDef", "suppressMultiRangeSelection", "enableCellTextSelection", "enableRangeSelection", "enableRangeHandle", "enableFillHandle", "fillHandleDirection", "suppressClearOnFillReduction", "sortingOrder", "accentedSort", "unSortIcon", "suppressMultiSort", "alwaysMultiSort", "multiSortKey", "suppressMaintainUnsortedOrder", "icons", "rowHeight", "rowStyle", "rowClass", "rowClassRules", "suppressRowHoverHighlight", "suppressRowTransform", "columnHoverHighlight", "gridId", "deltaSort", "treeDataDisplayType", "enableGroupEdit", "initialState", "theme", "loadThemeGoogleFonts", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processUnpinnedColumns", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "focusGridInnerElement", "navigateToNextHeader", "tabToNextHeader", "navigateToNextCell", "tabToNextCell", "getLocaleText", "getDocument", "paginationNumberFormatter", "getGroupRowAgg", "isGroupOpenByDefault", "initialGroupOrderComparator", "processPivotResultColDef", "processPivotResultColGroupDef", "getDataPath", "getChildCount", "getServerSideGroupLevelParams", "isServerSideGroupOpenByDefault", "isApplyServerSideTransaction", "isServerSideGroup", "getServerSideGroupKey", "getBusinessKeyForNode", "getRowId", "resetRowDataOnUpdate", "processRowPostCreate", "isRowSelectable", "isRowMaster", "fillOperation", "postSortRows", "getRowStyle", "getRowClass", "getRowHeight", "isFullWidthRow"], outputs: ["toolPanelVisibleChanged", "toolPanelSizeChanged", "columnMenuVisibleChanged", "contextMenuVisibleChanged", "cutStart", "cutEnd", "pasteStart", "pasteEnd", "columnVisible", "columnPinned", "columnResized", "columnMoved", "columnValueChanged", "columnPivotModeChanged", "columnPivotChanged", "columnGroupOpened", "newColumnsLoaded", "gridColumnsChanged", "displayedColumnsChanged", "virtualColumnsChanged", "columnEverythingChanged", "columnHeaderMouseOver", "columnHeaderMouseLeave", "columnHeaderClicked", "columnHeaderContextMenu", "componentStateChanged", "cellValueChanged", "cellEditRequest", "rowValueChanged", "cellEditingStarted", "cellEditingStopped", "rowEditingStarted", "rowEditingStopped", "undoStarted", "undoEnded", "redoStarted", "redoEnded", "cellSelectionDeleteStart", "cellSelectionDeleteEnd", "rangeDeleteStart", "rangeDeleteEnd", "fillStart", "fillEnd", "filterOpened", "filterChanged", "filterModified", "advancedFilterBuilderVisibleChanged", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "gridReady", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "dragCancelled", "stateUpdated", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "rowDragCancel", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pivotMaxColumnsExceeded", "pinnedRowDataChanged", "rowDataUpdated", "asyncTransactionsFlushed", "storeRefreshed", "headerFocused", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "cellSelectionChanged", "tooltipShow", "tooltipHide", "sortChanged"] }, { kind: "component", type: i1.FormCheckComponent, selector: "c-form-check", inputs: ["inline", "reverse", "sizing", "switch"], exportAs: ["cFormCheck"] }, { kind: "directive", type: i1.FormCheckLabelDirective, selector: "label[cFormCheckLabel]" }, { kind: "directive", type: i1.FormCheckInputDirective, selector: "input[cFormCheckInput]", inputs: ["type", "indeterminate", "valid"] }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.ButtonDirective, selector: "[cButton]", inputs: ["active", "color", "disabled", "shape", "size", "tabindex", "type", "variant"], exportAs: ["cButton"] }, { kind: "directive", type: i1.ButtonCloseDirective, selector: "[cButtonClose]", inputs: ["white"] }, { kind: "component", type: i1.OffcanvasBodyComponent, selector: "c-offcanvas-body" }, { kind: "component", type: i1.OffcanvasComponent, selector: "c-offcanvas", inputs: ["backdrop", "keyboard", "placement", "responsive", "id", "role", "ariaModal", "scroll", "visible"], outputs: ["visibleChange"], exportAs: ["cOffcanvas"] }, { kind: "component", type: i1.OffcanvasHeaderComponent, selector: "c-offcanvas-header" }, { kind: "directive", type: i1.OffcanvasTitleDirective, selector: "[cOffcanvasTitle]" }, { kind: "directive", type: i1.OffcanvasToggleDirective, selector: "[cOffcanvasToggle]", inputs: ["cOffcanvasToggle"] }, { kind: "directive", type: i1.TooltipDirective, selector: "[cTooltip]", inputs: ["cTooltip", "cTooltipOptions", "cTooltipPlacement", "cTooltipRef", "cTooltipTrigger", "cTooltipVisible"], outputs: ["cTooltipVisibleChange"], exportAs: ["cTooltip"] }, { kind: "directive", type: i1$1.IconDirective, selector: "svg[cIcon]", inputs: ["cIcon", "customClasses", "size", "title", "height", "width", "name", "viewBox", "xmlns", "pointer-events", "role"], exportAs: ["cIcon"] }] });
2267
2968
  }
2268
2969
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TableGridComponent, decorators: [{
2269
2970
  type: Component,
@@ -2729,7 +3430,7 @@ class LoginComponent {
2729
3430
  // }
2730
3431
  }
2731
3432
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: LoginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2732
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: LoginComponent, isStandalone: false, selector: "prg-ws-login", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, showInactivityLogoutMessage: { classPropertyName: "showInactivityLogoutMessage", publicName: "showInactivityLogoutMessage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { action: "action" }, ngImport: i0, template: "<div\r\n class=\"container-fluid login-wrapper\"\r\n wsBackgroundImage\r\n [random]=\"config()?.backgroundDirective?.random\"\r\n [backgroundImage]=\"config()?.backgroundDirective?.backgroundImages\">\r\n <div class=\"row align-items-center justify-content-center vh-100\">\r\n <div class=\"col-xxl-3 col-xl-4 col-lg-6 col-12 login-fields glass-card\">\r\n <div class=\"logo-wrapper max-w-300 text-center mt-4 mx-5\">\r\n <img [src]=\"config()?.logoUrl\" alt=\"pongrass-logo\" class=\"img-fluid max-w-320\" />\r\n <p class=\"fs-19 login-card-title mb-4 \">{{ config()?.title }}</p>\r\n </div>\r\n <div class=\"mb-4 d-flex align-items-center justify-content-center flex-column\">\r\n @if (showInactivityLogoutMessage()) {\r\n <c-alert ngClass=\"mb-4\" color=\"danger\" class=\"text-center\">You have been logged out due to inactivity!</c-alert>\r\n }\r\n <form cForm [formGroup]=\"loginForm\" class=\"needs-validation max-w-300\" [validated]=\"isFormSubmitted()\" noValidate (ngSubmit)=\"onSubmit()\">\r\n <div class=\"mb-4\">\r\n <c-input-group class=\"mb-3\">\r\n <span cInputGroupText id=\"group-username-login\" class=\"transparent-input\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\" style=\"width: 15px\">\r\n <path\r\n d=\"M224 248a120 120 0 1 0 0-240 120 120 0 1 0 0 240zm-29.7 56C95.8 304 16 383.8 16 482.3 16 498.7 29.3 512 45.7 512l356.6 0c16.4 0 29.7-13.3 29.7-29.7 0-98.5-79.8-178.3-178.3-178.3l-59.4 0z\" />\r\n </svg>\r\n </span>\r\n\r\n <input\r\n cFormControl\r\n id=\"txt-auth-username\"\r\n type=\"text\"\r\n sizing=\"lg\"\r\n formControlName=\"uid\"\r\n required\r\n autocomplete=\"username\"\r\n class=\"transparent-input text-white\"\r\n [placeholder]=\"config()?.usernamePlaceholder\" />\r\n <c-form-feedback [valid]=\"false\">User Name is required.</c-form-feedback>\r\n </c-input-group>\r\n </div>\r\n <div class=\"mb-4\">\r\n <c-input-group class=\"mb-3\">\r\n <span cInputGroupText id=\"group-password-login\" class=\"transparent-input\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\" style=\"width: 15px\">\r\n <path\r\n d=\"M128 96l0 64 128 0 0-64c0-35.3-28.7-64-64-64s-64 28.7-64 64zM64 160l0-64C64 25.3 121.3-32 192-32S320 25.3 320 96l0 64c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64z\" />\r\n </svg>\r\n </span>\r\n <input \r\n cFormControl\r\n id=\"txt-auth-password\"\r\n type=\"password\"\r\n sizing=\"lg\"\r\n formControlName=\"pwd\"\r\n required\r\n autocomplete=\"current-password\"\r\n class=\"transparent-input text-white\"\r\n [placeholder]=\"config()?.passwordPlaceholder\" />\r\n\r\n <c-form-feedback [valid]=\"false\">Password is required.</c-form-feedback>\r\n </c-input-group>\r\n </div>\r\n\r\n <div class=\"submit-form mt-4\">\r\n <button type=\"submit\" cButton color=\"dark\" size=\"lg\" class=\"w-100 btn text-white fw-semibold\">\r\n {{ config()?.submitButtonText }}\r\n </button>\r\n </div>\r\n @if (config()?.version) {\r\n @if (config()?.version?.currentVersion) {\r\n <div class=\"mt-4 text-center pt-8\">{{ 'v' + config()?.version?.currentVersion || '' }}</div>\r\n }\r\n @if (config()?.version?.copyrightYear) {\r\n <div class=\"mt-2 text-center copyright-text pt-8\">\r\n {{ '&copy;' + config()?.version?.copyrightYear + ' ' + config()?.version?.brandName }}\r\n </div>\r\n }\r\n } @else {\r\n @if (configService.allConfigValues()?.project?.currentVersion) {\r\n <div class=\"mt-4 text-center pt-8\">{{ 'v' + configService.allConfigValues()?.project?.currentVersion || '' }}</div>\r\n }\r\n @if (configService.allConfigValues()?.project?.copyrightYear) {\r\n <div class=\"mt-2 text-center copyright-text pt-8\">\r\n {{ '&copy;' + configService.allConfigValues()?.project?.copyrightYear + ' ' + configService.allConfigValues()?.project?.brandName }}\r\n </div>\r\n }\r\n }\r\n </form>\r\n\r\n @if (contactSupportValue) {\r\n <div class=\"mt-4 fs-5\">\r\n Don't have an account?\r\n <span class=\"cursor-pointer\">\r\n <a [href]=\"contactSupportValue\" class=\"text-decoration-none primary-text\" id=\"contact-us\">Contact Support</a>\r\n </span>\r\n </div>\r\n }\r\n\r\n <!-- <div class=\"mt-4 fs-5 text-center\">\r\n <span class=\"cursor-pointer\">\r\n <a [href]=\"forgetPasswordValue\" class=\"text-decoration-none primary-text\" id=\"forget-password\">Forget Password?</a>\r\n <a class=\"text-decoration-none text-white\" id=\"forget-password\" (click)=\"goToForgetPassword()\">Forget Password?</a>\r\n </span>\r\n </div> -->\r\n\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: ["#txt-auth-password,#txt-auth-username{border-bottom-right-radius:4px;border-top-right-radius:4px}.max-w-300{width:300px}.pt-8{font-size:10.66px}.login-card-title{color:#fff;font-size:24px}.form-invalid .form-multi-select-input-group,.form-invalid .date-picker-input-group{border:2px solid #e55353}.glass-card{color:#fff;background:#32241980;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);border-radius:var(--cui-border-radius-lg);position:relative;overflow:hidden;max-width:400px;display:flex;align-items:center;flex-direction:column}.glass-card:before{content:\"\";position:absolute;top:0;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent,rgba(255,255,255,.8),transparent)}.glass-card:after{content:\"\";position:absolute;top:0;left:0;width:1px;height:100%;background:linear-gradient(180deg,rgba(255,255,255,.8),transparent,rgba(255,255,255,.3))}.transparent-input{background-color:transparent;border:1px solid #8a9db2;outline:none}.transparent-input:focus{background-color:transparent}.transparent-input::placeholder{color:#8a9db2;font-size:16px}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active,input:-internal-autofill-selected{-webkit-box-shadow:0 0 0 1000px transparent inset!important;box-shadow:0 0 0 1000px transparent inset!important;background-color:transparent!important;background-image:none!important;-webkit-text-fill-color:#fff!important;transition:background-color 5000s ease-in-out 0s!important}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: BackgroundImageDirective, selector: "[wsBackgroundImage]", inputs: ["random", "backgroundImage"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { 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.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i4.FormDirective, selector: "form[cForm]", inputs: ["validated"] }, { kind: "directive", type: i4.FormControlDirective, selector: "input[cFormControl], textarea[cFormControl]", inputs: ["sizing", "valid", "type", "plaintext"] }, { kind: "component", type: i4.FormFeedbackComponent, selector: "c-form-feedback", inputs: ["tooltip", "valid"] }, { kind: "component", type: i4.InputGroupComponent, selector: "c-input-group", inputs: ["sizing"] }, { kind: "directive", type: i4.InputGroupTextDirective, selector: "[cInputGroupText]" }, { kind: "directive", type: i4.ButtonDirective, selector: "[cButton]", inputs: ["active", "color", "disabled", "shape", "size", "tabindex", "type", "variant"], exportAs: ["cButton"] }, { kind: "component", type: i4.AlertComponent, selector: "c-alert", inputs: ["color", "role", "variant", "dismissible", "fade", "visible"], outputs: ["visibleChange"], exportAs: ["cAlert"] }] });
3433
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: LoginComponent, isStandalone: false, selector: "prg-ws-login", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, showInactivityLogoutMessage: { classPropertyName: "showInactivityLogoutMessage", publicName: "showInactivityLogoutMessage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { action: "action" }, ngImport: i0, template: "<div\r\n class=\"container-fluid login-wrapper\"\r\n wsBackgroundImage\r\n [random]=\"config()?.backgroundDirective?.random\"\r\n [backgroundImage]=\"config()?.backgroundDirective?.backgroundImages\">\r\n <div class=\"row align-items-center justify-content-center vh-100\">\r\n <div class=\"col-xxl-3 col-xl-4 col-lg-6 col-12 login-fields glass-card\">\r\n <div class=\"logo-wrapper max-w-300 text-center mt-4 mx-5\">\r\n <img [src]=\"config()?.logoUrl\" alt=\"pongrass-logo\" class=\"img-fluid max-w-320\" />\r\n <p class=\"fs-19 login-card-title mb-4 \">{{ config()?.title }}</p>\r\n </div>\r\n <div class=\"mb-4 d-flex align-items-center justify-content-center flex-column\">\r\n @if (showInactivityLogoutMessage()) {\r\n <c-alert ngClass=\"mb-4\" color=\"danger\" class=\"text-center\">You have been logged out due to inactivity!</c-alert>\r\n }\r\n <form cForm [formGroup]=\"loginForm\" class=\"needs-validation max-w-300\" [validated]=\"isFormSubmitted()\" noValidate (ngSubmit)=\"onSubmit()\">\r\n <div class=\"mb-4\">\r\n <c-input-group class=\"mb-3\">\r\n <span cInputGroupText id=\"group-username-login\" class=\"transparent-input\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\" style=\"width: 15px\">\r\n <path\r\n d=\"M224 248a120 120 0 1 0 0-240 120 120 0 1 0 0 240zm-29.7 56C95.8 304 16 383.8 16 482.3 16 498.7 29.3 512 45.7 512l356.6 0c16.4 0 29.7-13.3 29.7-29.7 0-98.5-79.8-178.3-178.3-178.3l-59.4 0z\" />\r\n </svg>\r\n </span>\r\n\r\n <input\r\n cFormControl\r\n id=\"txt-auth-username\"\r\n type=\"text\"\r\n sizing=\"lg\"\r\n formControlName=\"uid\"\r\n required\r\n autocomplete=\"username\"\r\n class=\"transparent-input text-white\"\r\n [placeholder]=\"config()?.usernamePlaceholder\" />\r\n <c-form-feedback [valid]=\"false\">User Name is required.</c-form-feedback>\r\n </c-input-group>\r\n </div>\r\n <div class=\"mb-4\">\r\n <c-input-group class=\"mb-3\">\r\n <span cInputGroupText id=\"group-password-login\" class=\"transparent-input\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\" style=\"width: 15px\">\r\n <path\r\n d=\"M128 96l0 64 128 0 0-64c0-35.3-28.7-64-64-64s-64 28.7-64 64zM64 160l0-64C64 25.3 121.3-32 192-32S320 25.3 320 96l0 64c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64z\" />\r\n </svg>\r\n </span>\r\n <input \r\n cFormControl\r\n id=\"txt-auth-password\"\r\n type=\"password\"\r\n sizing=\"lg\"\r\n formControlName=\"pwd\"\r\n required\r\n autocomplete=\"current-password\"\r\n class=\"transparent-input text-white\"\r\n [placeholder]=\"config()?.passwordPlaceholder\" />\r\n\r\n <c-form-feedback [valid]=\"false\">Password is required.</c-form-feedback>\r\n </c-input-group>\r\n </div>\r\n\r\n <div class=\"submit-form mt-4\">\r\n <button type=\"submit\" cButton color=\"dark\" size=\"lg\" class=\"w-100 btn text-white fw-semibold\">\r\n {{ config()?.submitButtonText }}\r\n </button>\r\n </div>\r\n @if (config()?.version) {\r\n @if (config()?.version?.currentVersion) {\r\n <div class=\"mt-4 text-center pt-8\">{{ 'v' + config()?.version?.currentVersion || '' }}</div>\r\n }\r\n @if (config()?.version?.copyrightYear) {\r\n <div class=\"mt-2 text-center copyright-text pt-8\">\r\n {{ '&copy;' + config()?.version?.copyrightYear + ' ' + config()?.version?.brandName }}\r\n </div>\r\n }\r\n } @else {\r\n @if (configService.allConfigValues()?.project?.currentVersion) {\r\n <div class=\"mt-4 text-center pt-8\">{{ 'v' + configService.allConfigValues()?.project?.currentVersion || '' }}</div>\r\n }\r\n @if (configService.allConfigValues()?.project?.copyrightYear) {\r\n <div class=\"mt-2 text-center copyright-text pt-8\">\r\n {{ '&copy;' + configService.allConfigValues()?.project?.copyrightYear + ' ' + configService.allConfigValues()?.project?.brandName }}\r\n </div>\r\n }\r\n }\r\n </form>\r\n\r\n @if (contactSupportValue) {\r\n <div class=\"mt-4 fs-5\">\r\n Don't have an account?\r\n <span class=\"cursor-pointer\">\r\n <a [href]=\"contactSupportValue\" class=\"text-decoration-none primary-text\" id=\"contact-us\">Contact Support</a>\r\n </span>\r\n </div>\r\n }\r\n\r\n <!-- <div class=\"mt-4 fs-5 text-center\">\r\n <span class=\"cursor-pointer\">\r\n <a [href]=\"forgetPasswordValue\" class=\"text-decoration-none primary-text\" id=\"forget-password\">Forget Password?</a>\r\n <a class=\"text-decoration-none text-white\" id=\"forget-password\" (click)=\"goToForgetPassword()\">Forget Password?</a>\r\n </span>\r\n </div> -->\r\n\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: ["#txt-auth-password,#txt-auth-username{border-bottom-right-radius:4px;border-top-right-radius:4px}.max-w-300{width:300px}.pt-8{font-size:10.66px}.login-card-title{color:#fff;font-size:24px}.form-invalid .form-multi-select-input-group,.form-invalid .date-picker-input-group{border:2px solid #e55353}.glass-card{color:#fff;background:#32241980;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);border-radius:var(--cui-border-radius-lg);position:relative;overflow:hidden;max-width:400px;display:flex;align-items:center;flex-direction:column}.glass-card:before{content:\"\";position:absolute;top:0;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent,rgba(255,255,255,.8),transparent)}.glass-card:after{content:\"\";position:absolute;top:0;left:0;width:1px;height:100%;background:linear-gradient(180deg,rgba(255,255,255,.8),transparent,rgba(255,255,255,.3))}.transparent-input{background-color:transparent;border:1px solid #8a9db2;outline:none}.transparent-input:focus{background-color:transparent}.transparent-input::placeholder{color:#8a9db2;font-size:16px}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active,input:-internal-autofill-selected{-webkit-box-shadow:0 0 0 1000px transparent inset!important;box-shadow:0 0 0 1000px transparent inset!important;background-color:transparent!important;background-image:none!important;-webkit-text-fill-color:#fff!important;transition:background-color 5000s ease-in-out 0s!important}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: BackgroundImageDirective, selector: "[wsBackgroundImage]", inputs: ["random", "backgroundImage"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { 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.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormDirective, selector: "form[cForm]", inputs: ["validated"] }, { kind: "directive", type: i1.FormControlDirective, selector: "input[cFormControl], textarea[cFormControl]", inputs: ["sizing", "valid", "type", "plaintext"] }, { kind: "component", type: i1.FormFeedbackComponent, selector: "c-form-feedback", inputs: ["tooltip", "valid"] }, { kind: "component", type: i1.InputGroupComponent, selector: "c-input-group", inputs: ["sizing"] }, { kind: "directive", type: i1.InputGroupTextDirective, selector: "[cInputGroupText]" }, { kind: "directive", type: i1.ButtonDirective, selector: "[cButton]", inputs: ["active", "color", "disabled", "shape", "size", "tabindex", "type", "variant"], exportAs: ["cButton"] }, { kind: "component", type: i1.AlertComponent, selector: "c-alert", inputs: ["color", "role", "variant", "dismissible", "fade", "visible"], outputs: ["visibleChange"], exportAs: ["cAlert"] }] });
2733
3434
  }
2734
3435
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: LoginComponent, decorators: [{
2735
3436
  type: Component,
@@ -2777,6 +3478,493 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
2777
3478
  }]
2778
3479
  }] });
2779
3480
 
3481
+ class DialogRef {
3482
+ closeFn;
3483
+ _result = new Subject();
3484
+ /** Observable that emits when any button is clicked in the wrapper */
3485
+ buttonClick$ = new Subject();
3486
+ /** Observable that emits when the dialog is closed */
3487
+ afterClosed() {
3488
+ return this._result.asObservable();
3489
+ }
3490
+ constructor(closeFn) {
3491
+ this.closeFn = closeFn;
3492
+ }
3493
+ setCloseFn(fn) {
3494
+ this.closeFn = fn;
3495
+ }
3496
+ close(result) {
3497
+ if (this.closeFn) {
3498
+ this.closeFn(result);
3499
+ }
3500
+ if (!this._result.closed) {
3501
+ this._result.next(result);
3502
+ this._result.complete();
3503
+ }
3504
+ }
3505
+ }
3506
+
3507
+ class DynamicModalWrapperComponent {
3508
+ title = '';
3509
+ message = '';
3510
+ size = 'lg';
3511
+ buttons = [];
3512
+ scrollable = true;
3513
+ alignment = 'top';
3514
+ childInjector;
3515
+ backdropIndex = 1;
3516
+ customClose = false;
3517
+ _result;
3518
+ // New Signal-based inputs for child component
3519
+ _childComponentType = signal(null, ...(ngDevMode ? [{ debugName: "_childComponentType" }] : []));
3520
+ set childComponentType(value) {
3521
+ this._childComponentType.set(value);
3522
+ }
3523
+ _childComponentData = signal(null, ...(ngDevMode ? [{ debugName: "_childComponentData" }] : []));
3524
+ set childComponentData(value) {
3525
+ this._childComponentData.set(value);
3526
+ }
3527
+ contentHost;
3528
+ modalElement;
3529
+ visibleSignal = signal(false, ...(ngDevMode ? [{ debugName: "visibleSignal" }] : []));
3530
+ componentRef;
3531
+ closeCallback = () => { };
3532
+ cdr = inject(ChangeDetectorRef);
3533
+ zone = inject(NgZone);
3534
+ dialogRef = inject(DialogRef, { optional: true });
3535
+ isDestroyed = false;
3536
+ isViewInit = false;
3537
+ constructor() {
3538
+ // React to child component type changes
3539
+ effect(() => {
3540
+ const type = this._childComponentType();
3541
+ if (type && this.isViewInit) {
3542
+ untracked(() => this.loadComponent());
3543
+ }
3544
+ });
3545
+ // React to data changes
3546
+ effect(() => {
3547
+ const data = this._childComponentData();
3548
+ if (data && this.componentRef && this.isViewInit) {
3549
+ untracked(() => this.applyData(data));
3550
+ }
3551
+ });
3552
+ }
3553
+ ngAfterViewInit() {
3554
+ this.isViewInit = true;
3555
+ // Load component immediately once view is ready
3556
+ this.loadComponent();
3557
+ // Small delay before showing modal to avoid CD/Signal race conditions
3558
+ this.zone.run(() => {
3559
+ setTimeout(() => {
3560
+ if (!this.isDestroyed) {
3561
+ this.visibleSignal.set(true);
3562
+ this.cdr.detectChanges();
3563
+ // Add backdrop class after modal is visible
3564
+ this.addBackdropClass();
3565
+ }
3566
+ }, 50);
3567
+ });
3568
+ }
3569
+ ngOnDestroy() {
3570
+ this.isDestroyed = true;
3571
+ if (this.componentRef) {
3572
+ this.componentRef.destroy();
3573
+ }
3574
+ }
3575
+ loadComponent() {
3576
+ if (!this._childComponentType() || !this.contentHost)
3577
+ return;
3578
+ this.contentHost.clear();
3579
+ this.componentRef = this.contentHost.createComponent(this._childComponentType(), {
3580
+ injector: this.childInjector || this.contentHost.injector
3581
+ });
3582
+ const data = this._childComponentData();
3583
+ if (data) {
3584
+ this.applyData(data);
3585
+ }
3586
+ this.cdr.detectChanges();
3587
+ }
3588
+ applyData(data) {
3589
+ if (!this.componentRef)
3590
+ return;
3591
+ if (this.componentRef.instance.setData) {
3592
+ this.componentRef.instance.setData(data);
3593
+ }
3594
+ else {
3595
+ Object.assign(this.componentRef.instance, data);
3596
+ }
3597
+ this.cdr.detectChanges();
3598
+ }
3599
+ onButtonClick(btn) {
3600
+ // Notify the child component that a button was clicked
3601
+ if (this.dialogRef) {
3602
+ this.dialogRef.buttonClick$.next(btn);
3603
+ }
3604
+ if (btn.type === 'close') {
3605
+ if (!this.customClose) {
3606
+ this.close();
3607
+ }
3608
+ }
3609
+ if (btn.onClick) {
3610
+ btn.onClick(this.componentRef?.instance);
3611
+ }
3612
+ }
3613
+ topClose() {
3614
+ this.dialogRef?.buttonClick$.next({
3615
+ type: 'close',
3616
+ label: 'T-Close',
3617
+ });
3618
+ if (!this.customClose) {
3619
+ this.close();
3620
+ }
3621
+ }
3622
+ close(result) {
3623
+ this._result = result;
3624
+ this.visibleSignal.set(false);
3625
+ this.cdr.detectChanges();
3626
+ }
3627
+ onVisibleChange(event) {
3628
+ if (this.visibleSignal() === event)
3629
+ return;
3630
+ this.visibleSignal.set(event);
3631
+ if (!event) {
3632
+ // Cleanup delay to prevent view[EFFECTS] error
3633
+ this.zone.runOutsideAngular(() => {
3634
+ setTimeout(() => {
3635
+ this.zone.run(() => {
3636
+ if (!this.isDestroyed) {
3637
+ this.closeCallback(this._result);
3638
+ }
3639
+ });
3640
+ }, 400);
3641
+ });
3642
+ }
3643
+ }
3644
+ addBackdropClass() {
3645
+ // Wait a bit for the backdrop to be rendered by CoreUI
3646
+ this.zone.runOutsideAngular(() => {
3647
+ setTimeout(() => {
3648
+ // Set modal z-index
3649
+ if (this.modalElement) {
3650
+ const modalEl = this.modalElement.nativeElement;
3651
+ const baseModalZIndex = 1055;
3652
+ const modalZIndex = baseModalZIndex + ((this.backdropIndex - 1) * 10);
3653
+ modalEl.style.setProperty('--cui-modal-zindex', modalZIndex.toString());
3654
+ }
3655
+ // Find all backdrops
3656
+ const backdrops = document.querySelectorAll('.modal-backdrop.show');
3657
+ if (backdrops.length > 0) {
3658
+ // Get the most recently added backdrop (last one)
3659
+ const latestBackdrop = backdrops[backdrops.length - 1];
3660
+ // Set the backdrop z-index dynamically
3661
+ const baseBackdropZIndex = 1050;
3662
+ const backdropZIndex = baseBackdropZIndex + ((this.backdropIndex - 1) * 10);
3663
+ latestBackdrop.style.zIndex = backdropZIndex.toString();
3664
+ }
3665
+ }, 100);
3666
+ });
3667
+ }
3668
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: DynamicModalWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3669
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: DynamicModalWrapperComponent, isStandalone: true, selector: "prg-ws-dynamic-modal-wrapper", inputs: { title: "title", message: "message", size: "size", buttons: "buttons", scrollable: "scrollable", alignment: "alignment", childInjector: "childInjector", backdropIndex: "backdropIndex", customClose: "customClose", childComponentType: "childComponentType", childComponentData: "childComponentData" }, viewQueries: [{ propertyName: "contentHost", first: true, predicate: ["contentHost"], descendants: true, read: ViewContainerRef }, { propertyName: "modalElement", first: true, predicate: ["modalElement"], descendants: true, read: ElementRef }], ngImport: i0, template: `
3670
+ <c-modal
3671
+ #modalElement
3672
+ [visible]="visibleSignal()"
3673
+ [size]="size"
3674
+ [alignment]="alignment"
3675
+ [scrollable]="scrollable"
3676
+ backdrop="static"
3677
+ (visibleChange)="onVisibleChange($event)"
3678
+ >
3679
+ <c-modal-header>
3680
+ <h5 cModalTitle>{{ title }}</h5>
3681
+ <button (click)="topClose()" cButtonClose></button>
3682
+ </c-modal-header>
3683
+ <c-modal-body>
3684
+ @if (message) {
3685
+ <div [innerHTML]="message" class="mb-3"></div>
3686
+ }
3687
+ <ng-template #contentHost></ng-template>
3688
+ </c-modal-body>
3689
+ @if (buttons?.length) {
3690
+ <c-modal-footer>
3691
+ @for (btn of buttons; track btn) {
3692
+ <button
3693
+ cButton
3694
+ [color]="btn.color || 'primary'"
3695
+ [variant]="btn.variant"
3696
+ [className]="btn.class || ''"
3697
+ (click)="onButtonClick(btn)"
3698
+ >
3699
+ {{ btn.label }}
3700
+ </button>
3701
+ }
3702
+ </c-modal-footer>
3703
+ }
3704
+ </c-modal>
3705
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i1.ModalBodyComponent, selector: "c-modal-body" }, { kind: "component", type: i1.ModalComponent, selector: "c-modal", inputs: ["alignment", "backdrop", "fullscreen", "keyboard", "id", "size", "transition", "role", "ariaModal", "scrollable", "visible"], outputs: ["visibleChange"], exportAs: ["cModal"] }, { kind: "component", type: i1.ModalFooterComponent, selector: "c-modal-footer" }, { kind: "component", type: i1.ModalHeaderComponent, selector: "c-modal-header" }, { kind: "directive", type: i1.ModalTitleDirective, selector: "[cModalTitle]" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1.ButtonDirective, selector: "[cButton]", inputs: ["active", "color", "disabled", "shape", "size", "tabindex", "type", "variant"], exportAs: ["cButton"] }, { kind: "directive", type: i1.ButtonCloseDirective, selector: "[cButtonClose]", inputs: ["white"] }] });
3706
+ }
3707
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: DynamicModalWrapperComponent, decorators: [{
3708
+ type: Component,
3709
+ args: [{
3710
+ selector: 'prg-ws-dynamic-modal-wrapper',
3711
+ standalone: true,
3712
+ imports: [CommonModule, ModalModule, ButtonModule],
3713
+ template: `
3714
+ <c-modal
3715
+ #modalElement
3716
+ [visible]="visibleSignal()"
3717
+ [size]="size"
3718
+ [alignment]="alignment"
3719
+ [scrollable]="scrollable"
3720
+ backdrop="static"
3721
+ (visibleChange)="onVisibleChange($event)"
3722
+ >
3723
+ <c-modal-header>
3724
+ <h5 cModalTitle>{{ title }}</h5>
3725
+ <button (click)="topClose()" cButtonClose></button>
3726
+ </c-modal-header>
3727
+ <c-modal-body>
3728
+ @if (message) {
3729
+ <div [innerHTML]="message" class="mb-3"></div>
3730
+ }
3731
+ <ng-template #contentHost></ng-template>
3732
+ </c-modal-body>
3733
+ @if (buttons?.length) {
3734
+ <c-modal-footer>
3735
+ @for (btn of buttons; track btn) {
3736
+ <button
3737
+ cButton
3738
+ [color]="btn.color || 'primary'"
3739
+ [variant]="btn.variant"
3740
+ [className]="btn.class || ''"
3741
+ (click)="onButtonClick(btn)"
3742
+ >
3743
+ {{ btn.label }}
3744
+ </button>
3745
+ }
3746
+ </c-modal-footer>
3747
+ }
3748
+ </c-modal>
3749
+ `
3750
+ }]
3751
+ }], ctorParameters: () => [], propDecorators: { title: [{
3752
+ type: Input
3753
+ }], message: [{
3754
+ type: Input
3755
+ }], size: [{
3756
+ type: Input
3757
+ }], buttons: [{
3758
+ type: Input
3759
+ }], scrollable: [{
3760
+ type: Input
3761
+ }], alignment: [{
3762
+ type: Input
3763
+ }], childInjector: [{
3764
+ type: Input
3765
+ }], backdropIndex: [{
3766
+ type: Input
3767
+ }], customClose: [{
3768
+ type: Input
3769
+ }], childComponentType: [{
3770
+ type: Input
3771
+ }], childComponentData: [{
3772
+ type: Input
3773
+ }], contentHost: [{
3774
+ type: ViewChild,
3775
+ args: ['contentHost', { read: ViewContainerRef }]
3776
+ }], modalElement: [{
3777
+ type: ViewChild,
3778
+ args: ['modalElement', { read: ElementRef }]
3779
+ }] } });
3780
+
3781
+ class PgDialogService {
3782
+ appRef = inject(ApplicationRef);
3783
+ injector = inject(EnvironmentInjector);
3784
+ viewContainerRef;
3785
+ openDialogs = new Set();
3786
+ registerViewContainerRef(vcr) {
3787
+ this.viewContainerRef = vcr;
3788
+ }
3789
+ add(config) {
3790
+ const subject = new Subject();
3791
+ const component = config.component || null;
3792
+ const dialogRef = this.open(component, config);
3793
+ // Inject result handling into buttons if they don't have onClick
3794
+ if (config.buttons) {
3795
+ config.buttons.forEach(btn => {
3796
+ const originalOnClick = btn.onClick;
3797
+ btn.onClick = (context) => {
3798
+ if (originalOnClick) {
3799
+ originalOnClick(context);
3800
+ }
3801
+ subject.next(btn.label); // Or we could pass btn itself
3802
+ if (btn.type !== 'submit') {
3803
+ dialogRef.close(btn.label);
3804
+ }
3805
+ };
3806
+ });
3807
+ }
3808
+ // Subscribe to afterClosed to finish the subject
3809
+ dialogRef.afterClosed().subscribe(result => {
3810
+ if (!subject.closed) {
3811
+ subject.next(result || 'close');
3812
+ subject.complete();
3813
+ }
3814
+ });
3815
+ return subject.asObservable();
3816
+ }
3817
+ alert(message, title = 'Alert') {
3818
+ const subject = new Subject();
3819
+ this.add({
3820
+ title,
3821
+ message,
3822
+ size: 'md',
3823
+ alignment: 'center',
3824
+ buttons: [
3825
+ {
3826
+ label: 'OK',
3827
+ color: 'primary',
3828
+ onClick: () => {
3829
+ subject.next();
3830
+ subject.complete();
3831
+ }
3832
+ }
3833
+ ]
3834
+ });
3835
+ return subject.asObservable();
3836
+ }
3837
+ confirm(message, title = 'Confirm') {
3838
+ const subject = new Subject();
3839
+ this.add({
3840
+ title,
3841
+ message,
3842
+ alignment: 'center',
3843
+ size: 'md',
3844
+ buttons: [
3845
+ {
3846
+ label: 'Cancel',
3847
+ variant: 'outline',
3848
+ color: 'secondary',
3849
+ onClick: () => {
3850
+ subject.next(false);
3851
+ subject.complete();
3852
+ }
3853
+ },
3854
+ {
3855
+ label: 'Confirm',
3856
+ color: 'primary',
3857
+ onClick: () => {
3858
+ subject.next(true);
3859
+ subject.complete();
3860
+ }
3861
+ }
3862
+ ]
3863
+ });
3864
+ return subject.asObservable();
3865
+ }
3866
+ open(component, config = {}) {
3867
+ if (!this.viewContainerRef) {
3868
+ console.error('PgDialogService: ViewContainerRef not registered. Please register it in AppComponent.');
3869
+ // Fallback (might fail with EFFECTS error but better than crashing immediately)
3870
+ return this.openManual(component, config);
3871
+ }
3872
+ const dialogRef = new DialogRef();
3873
+ const childInjector = Injector.create({
3874
+ providers: [{
3875
+ provide: DialogRef,
3876
+ useValue: dialogRef
3877
+ }],
3878
+ parent: this.injector
3879
+ });
3880
+ // Create the wrapper component using VCR
3881
+ const wrapperRef = this.viewContainerRef.createComponent(DynamicModalWrapperComponent, {
3882
+ injector: childInjector // Give the wrapper access to DialogRef too
3883
+ });
3884
+ // Now initialize the DialogRef with the actual wrapper instance
3885
+ dialogRef.setCloseFn((res) => wrapperRef.instance.close(res));
3886
+ wrapperRef.instance.childInjector = childInjector;
3887
+ this.configureWrapper(wrapperRef, component, config);
3888
+ // Handle close cleanup
3889
+ wrapperRef.instance.closeCallback = () => {
3890
+ this.removeDialog(dialogRef);
3891
+ wrapperRef.destroy();
3892
+ };
3893
+ this.openDialogs.add(dialogRef);
3894
+ return dialogRef;
3895
+ }
3896
+ // Fallback implementation (old manual way)
3897
+ openManual(component, config = {}) {
3898
+ const wrapperRef = createComponent(DynamicModalWrapperComponent, {
3899
+ environmentInjector: this.injector
3900
+ });
3901
+ const dialogRef = new DialogRef();
3902
+ const childInjector = Injector.create({
3903
+ providers: [{
3904
+ provide: DialogRef,
3905
+ useValue: dialogRef
3906
+ }],
3907
+ parent: this.injector
3908
+ });
3909
+ wrapperRef.instance.childInjector = childInjector;
3910
+ dialogRef.setCloseFn((res) => wrapperRef.instance.close(res));
3911
+ this.configureWrapper(wrapperRef, component, config);
3912
+ // Attach to the view
3913
+ this.appRef.attachView(wrapperRef.hostView);
3914
+ const domElem = wrapperRef.hostView.rootNodes[0];
3915
+ document.body.appendChild(domElem);
3916
+ // Trigger change detection to ensure inputs are applied
3917
+ wrapperRef.changeDetectorRef.detectChanges();
3918
+ // Handle close cleanup
3919
+ wrapperRef.instance.closeCallback = (result) => {
3920
+ this.removeDialog(dialogRef);
3921
+ this.appRef.detachView(wrapperRef.hostView);
3922
+ wrapperRef.destroy();
3923
+ domElem.remove();
3924
+ };
3925
+ this.openDialogs.add(dialogRef);
3926
+ return dialogRef;
3927
+ }
3928
+ configureWrapper(wrapperRef, component, config) {
3929
+ wrapperRef.instance.title = config.title || '';
3930
+ wrapperRef.instance.message = config.message || '';
3931
+ wrapperRef.instance.size = config.size || 'lg';
3932
+ wrapperRef.instance.childComponentType = component;
3933
+ wrapperRef.instance.childComponentData = config.data;
3934
+ // Set backdrop index based on current dialog count (1-based index)
3935
+ wrapperRef.instance.backdropIndex = this.openDialogs.size + 1;
3936
+ if (config.buttons) {
3937
+ wrapperRef.instance.buttons = config.buttons;
3938
+ }
3939
+ if (config.scrollable !== undefined) {
3940
+ wrapperRef.instance.scrollable = config.scrollable;
3941
+ }
3942
+ if (config.alignment) {
3943
+ wrapperRef.instance.alignment = config.alignment;
3944
+ }
3945
+ if (config.customClose) {
3946
+ wrapperRef.instance.customClose = config.customClose;
3947
+ }
3948
+ }
3949
+ removeDialog(dialogRef) {
3950
+ this.openDialogs.delete(dialogRef);
3951
+ }
3952
+ closeAll() {
3953
+ // Clone to array to safely iterate as items might be deleted during iteration
3954
+ const dialogs = Array.from(this.openDialogs);
3955
+ dialogs.forEach(dialog => dialog.close());
3956
+ this.openDialogs.clear();
3957
+ }
3958
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: PgDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3959
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: PgDialogService, providedIn: 'root' });
3960
+ }
3961
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: PgDialogService, decorators: [{
3962
+ type: Injectable,
3963
+ args: [{
3964
+ providedIn: 'root'
3965
+ }]
3966
+ }] });
3967
+
2780
3968
  /*
2781
3969
  * Public API Surface of utils
2782
3970
  */
@@ -2785,5 +3973,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
2785
3973
  * Generated bundle index. Do not edit.
2786
3974
  */
2787
3975
 
2788
- export { BackgroundImageDirective, CheckboxCellRendererComponent, CircularFocusDirective, ColorCellRendererComponent, CommentsButtonCellRendererComponent, ConfigurationServiceLib, CustomSelectFilterComponent, DateTimePickerComponent, DecimalInputDirective, EditionListGroupedComponent, ExcelType, ExportToExcelNames, FormFieldType, GenericFilterModelComponent, ILOGIN_ACTION, ITableGridConfiguration, ITableGridPagination, IndustryUpdateListboxCellRendererComponent, JsonrpcServiceLib, LoginComponent, LoginModule, MultiFormComponent, MultiFormModule, MultiSelectStylerDirective, PageStatusCellRendererComponent, ShowTooltipIfTruncatedDirective, StatusSelectCellRendererComponent, TableGridComponent, TableGridModule, UtilsService, convertDateShort, convertIsoToFormat, convertToISOnString, generateTimeOptions, getTimeValueFromDateTime, regionalDateFormat };
3976
+ export { AgDateRangeFilterComponent, BackgroundImageDirective, BadgeCellRendererComponent, CheckboxCellRendererComponent, CircularFocusDirective, ColorCellRendererComponent, CommentsButtonCellRendererComponent, ConfigurationServiceLib, CustomSelectFilterComponent, DateTimePickerComponent, DecimalInputDirective, DialogRef, DynamicModalWrapperComponent, EditionListGroupedComponent, ExcelType, ExportToExcelNames, FormFieldType, GenericFilterModelComponent, HyperlinkCellRendererComponent, ILOGIN_ACTION, ITableGridConfiguration, ITableGridPagination, IconTextCellRendererComponent, IndustryUpdateListboxCellRendererComponent, JsonrpcServiceLib, LoginComponent, LoginModule, MultiFormComponent, MultiFormModule, MultiSelectStylerDirective, PageStatusCellRendererComponent, PgDialogService, ShowTooltipIfTruncatedDirective, StatusSelectCellRendererComponent, TableGridComponent, TableGridModule, UtilsService, convertDateShort, convertIsoToFormat, convertToISOnString, generateTimeOptions, getTimeValueFromDateTime, regionalDateFormat };
2789
3977
  //# sourceMappingURL=pongrass-utils.mjs.map