cloud-ide-fees 0.0.18 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/cloud-ide-fees.mjs +12 -3
- package/fesm2022/cloud-ide-fees.mjs.map +1 -1
- package/index.d.ts +5 -3
- package/package.json +1 -1
|
@@ -8,12 +8,12 @@ import { CommonModule, DatePipe } from '@angular/common';
|
|
|
8
8
|
import * as i1$1 from '@angular/forms';
|
|
9
9
|
import { FormsModule, FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms';
|
|
10
10
|
import { Router, ActivatedRoute } from '@angular/router';
|
|
11
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
11
|
+
import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
|
|
12
12
|
import { ConfirmationService, NotificationService, CideIconComponent, CideEleButtonComponent, CideEleDataGridComponent, CideEleDropdownComponent, CideInputComponent, CideTextareaComponent, CideEleTabComponent, CideSelectComponent, CurrencyPipe } from 'cloud-ide-element';
|
|
13
13
|
import { AppStateHelperService, CideLytSharedWrapperComponent, AppStateService } from 'cloud-ide-layout';
|
|
14
14
|
import { ENTITY_SERVICE_TOKEN, ACADEMIC_YEAR_SERVICE_TOKEN, CLASS_PROGRAM_MASTER_SERVICE_TOKEN, PROGRAM_TERM_SECTION_SERVICE_TOKEN, ProgramSectionSelectorWrapperComponent } from 'cloud-ide-shared';
|
|
15
15
|
import { CideCoreGeneralMasterService } from 'cloud-ide-core';
|
|
16
|
-
import { forkJoin } from 'rxjs';
|
|
16
|
+
import { forkJoin, startWith } from 'rxjs';
|
|
17
17
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
18
18
|
|
|
19
19
|
class CloudIdeFees {
|
|
@@ -5583,7 +5583,15 @@ class TemplateDesignerComponent extends CideLytSharedWrapperComponent {
|
|
|
5583
5583
|
return category.tags.filter(tag => tag.code.toLowerCase().includes(query) ||
|
|
5584
5584
|
tag.description.toLowerCase().includes(query));
|
|
5585
5585
|
}, ...(ngDevMode ? [{ debugName: "filteredTags" }] : []));
|
|
5586
|
+
// Reactive signal for template HTML - tracks form control changes
|
|
5587
|
+
templateHtmlSignal = toSignal(this.templateForm.get('template_html').valueChanges.pipe(startWith(this.templateForm.get('template_html')?.value || '')), { initialValue: this.templateForm.get('template_html')?.value || '' });
|
|
5588
|
+
// Reactive signal for preview type - tracks preview type changes
|
|
5589
|
+
previewTypeSignal = toSignal(this.templateForm.get('preview_type').valueChanges.pipe(startWith(this.templateForm.get('preview_type')?.value || 'STUDENT')), { initialValue: this.templateForm.get('preview_type')?.value || 'STUDENT' });
|
|
5586
5590
|
previewHtml = computed(() => {
|
|
5591
|
+
// Access both signals to make computed reactive to both changes
|
|
5592
|
+
const templateHtml = this.templateHtmlSignal(); // Read to track dependency
|
|
5593
|
+
const previewType = this.previewTypeSignal(); // Read to track dependency
|
|
5594
|
+
// Use the reactive signal instead of reading directly from form
|
|
5587
5595
|
const htmlContent = this.getPreviewWithSampleData();
|
|
5588
5596
|
return this.sanitizer.bypassSecurityTrustHtml(htmlContent);
|
|
5589
5597
|
}, ...(ngDevMode ? [{ debugName: "previewHtml" }] : []));
|
|
@@ -5641,7 +5649,8 @@ class TemplateDesignerComponent extends CideLytSharedWrapperComponent {
|
|
|
5641
5649
|
}, 0);
|
|
5642
5650
|
}
|
|
5643
5651
|
getPreviewWithSampleData() {
|
|
5644
|
-
|
|
5652
|
+
// Use the reactive signal to ensure preview updates when template changes
|
|
5653
|
+
let html = this.templateHtmlSignal() || '';
|
|
5645
5654
|
// Sample fee payment items data
|
|
5646
5655
|
const sampleFeeItems = [
|
|
5647
5656
|
{
|