cloud-ide-shared 1.0.72 → 1.0.73

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.
@@ -653,6 +653,63 @@ const FEE_PAYMENT_SERVICE_TOKEN = new InjectionToken('CideFeeFeePaymentService')
653
653
  */
654
654
  const EDUCATION_BOARD_SERVICE_TOKEN = new InjectionToken('EducationBoardService');
655
655
 
656
+ /**
657
+ * Injection token for FeeDetailsViewerComponent
658
+ * This allows the component to be provided without direct import dependency
659
+ *
660
+ * @example
661
+ * ```typescript
662
+ * // In app.config.ts
663
+ * import { FeeDetailsViewerComponent } from 'cloud-ide-fees';
664
+ * import { FEE_DETAILS_VIEWER_COMPONENT_TOKEN } from 'cloud-ide-shared';
665
+ *
666
+ * providers: [
667
+ * { provide: FEE_DETAILS_VIEWER_COMPONENT_TOKEN, useValue: FeeDetailsViewerComponent }
668
+ * ]
669
+ *
670
+ * // In component template
671
+ * <cide-shared-fee-details-viewer-wrapper
672
+ * [isOpen]="viewingFeeDetails() !== null"
673
+ * [feeData]="getFeeDataForViewer()"
674
+ * [assignmentDate]="getAssignmentDate()"
675
+ * [discount]="getFeeDiscountForViewer()"
676
+ * (closed)="closeFeeDetails()">
677
+ * </cide-shared-fee-details-viewer-wrapper>
678
+ * ```
679
+ */
680
+ const FEE_DETAILS_VIEWER_COMPONENT_TOKEN = new InjectionToken('FeeDetailsViewerComponent');
681
+
682
+ /**
683
+ * Injection token for ProgramSectionSelectorComponent
684
+ * This allows the component to be provided without direct import dependency
685
+ *
686
+ * @example
687
+ * ```typescript
688
+ * // In app.config.ts
689
+ * import { CideLytProgramSectionSelectorComponent } from 'cloud-ide-academics';
690
+ * import { PROGRAM_SECTION_SELECTOR_COMPONENT_TOKEN } from 'cloud-ide-shared';
691
+ *
692
+ * providers: [
693
+ * { provide: PROGRAM_SECTION_SELECTOR_COMPONENT_TOKEN, useValue: CideLytProgramSectionSelectorComponent }
694
+ * ]
695
+ *
696
+ * // In component template
697
+ * <cide-shared-program-section-selector-wrapper
698
+ * [formGroup]="form"
699
+ * [classProgramControlName]="'class_program_id'"
700
+ * [academicYearId]="academicYearId()"
701
+ * (valuesChange)="onValuesChange($event)">
702
+ * </cide-shared-program-section-selector-wrapper>
703
+ * ```
704
+ */
705
+ const PROGRAM_SECTION_SELECTOR_COMPONENT_TOKEN = new InjectionToken('ProgramSectionSelectorComponent');
706
+
707
+ /**
708
+ * Injection token for FeeApplicableFeesComponent
709
+ * This allows the component to be provided without direct import dependency
710
+ */
711
+ const FEE_APPLICABLE_FEES_COMPONENT_TOKEN = new InjectionToken('FeeApplicableFeesComponent');
712
+
656
713
  class CideSharedOrgStructureComponent {
657
714
  // Input parameters for configuration
658
715
  allowSwitching = input(true, ...(ngDevMode ? [{ debugName: "allowSwitching" }] : [])); // Allow entity switching (default: true)
@@ -1711,32 +1768,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
1711
1768
  ], template: "<div class=\"program-section-selector\" [ngClass]=\"gridCols()\">\r\n <!-- Class/Program Dropdown -->\r\n <cide-ele-select \r\n [label]=\"showLabels() ? 'Program/Class' : ''\" \r\n [formControl]=\"getClassProgramControl()\"\r\n [options]=\"classProgramOptions()\"\r\n [loading]=\"classProgramMastersLoading()\"\r\n [searchable]=\"true\"\r\n (searchChange)=\"onClassProgramSearch($event)\"\r\n placeholder=\"Search and select class/program\"\r\n [disabled]=\"disabled()\"\r\n size=\"sm\">\r\n </cide-ele-select>\r\n\r\n <!-- Branch/Specialization Dropdown (conditional) -->\r\n @if (showBranchDropdown()) {\r\n <cide-ele-select \r\n [label]=\"showLabels() ? 'Branch (Specialization)' : ''\" \r\n [formControl]=\"getBranchControl()\"\r\n [options]=\"classProgramBranches()\"\r\n [loading]=\"classProgramBranchesLoading()\"\r\n placeholder=\"Select branch\"\r\n [disabled]=\"disabled() || !formGroup().get(classProgramControlName())?.value\"\r\n size=\"sm\">\r\n </cide-ele-select>\r\n }\r\n\r\n <!-- Program Term Dropdown (conditional) -->\r\n @if (showTermDropdown()) {\r\n <cide-ele-select \r\n [label]=\"showLabels() ? 'Program Term' : ''\" \r\n [formControl]=\"getTermControl()\"\r\n [options]=\"classProgramTerms()\"\r\n [loading]=\"classProgramTermsLoading()\"\r\n placeholder=\"Select term/semester\"\r\n [disabled]=\"disabled() || !formGroup().get(classProgramControlName())?.value\"\r\n size=\"sm\"\r\n valueKey=\"_id\"\r\n labelKey=\"label\"\r\n [treeView]=\"{ enabled: true, primaryKey: '_id', foreignKey: 'acapt_parent_class_prog_term_acapt' }\">\r\n </cide-ele-select>\r\n }\r\n\r\n <!-- Section Dropdown (conditional) -->\r\n @if (hasSections()) {\r\n <cide-ele-select \r\n [label]=\"showLabels() ? 'Section' : ''\" \r\n [formControl]=\"getSectionControl()\"\r\n [options]=\"programTermSections()\"\r\n [loading]=\"programTermSectionsLoading()\"\r\n placeholder=\"Select section\"\r\n [disabled]=\"disabled() || !formGroup().get(termControlName())?.value\"\r\n size=\"sm\">\r\n </cide-ele-select>\r\n }\r\n</div>\r\n\r\n", styles: [".program-section-selector{display:grid;gap:1rem;width:100%;border:none;padding:0;margin:0;background:transparent}\n"] }]
1712
1769
  }], ctorParameters: () => [], propDecorators: { formGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "formGroup", required: true }] }], classProgramControlName: [{ type: i0.Input, args: [{ isSignal: true, alias: "classProgramControlName", required: false }] }], branchControlName: [{ type: i0.Input, args: [{ isSignal: true, alias: "branchControlName", required: false }] }], termControlName: [{ type: i0.Input, args: [{ isSignal: true, alias: "termControlName", required: false }] }], sectionControlName: [{ type: i0.Input, args: [{ isSignal: true, alias: "sectionControlName", required: false }] }], academicYearId: [{ type: i0.Input, args: [{ isSignal: true, alias: "academicYearId", required: false }] }], entityId: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityId", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], showLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabels", required: false }] }], gridCols: [{ type: i0.Input, args: [{ isSignal: true, alias: "gridCols", required: false }] }], showAllPrograms: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAllPrograms", required: false }] }], includeInactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "includeInactive", required: false }] }], valuesChange: [{ type: i0.Output, args: ["valuesChange"] }] } });
1713
1770
 
1714
- /**
1715
- * Injection token for FeeDetailsViewerComponent
1716
- * This allows the component to be provided without direct import dependency
1717
- *
1718
- * @example
1719
- * ```typescript
1720
- * // In app.config.ts
1721
- * import { FeeDetailsViewerComponent } from 'cloud-ide-fees';
1722
- * import { FEE_DETAILS_VIEWER_COMPONENT_TOKEN } from 'cloud-ide-shared';
1723
- *
1724
- * providers: [
1725
- * { provide: FEE_DETAILS_VIEWER_COMPONENT_TOKEN, useValue: FeeDetailsViewerComponent }
1726
- * ]
1727
- *
1728
- * // In component template
1729
- * <cide-shared-fee-details-viewer-wrapper
1730
- * [isOpen]="viewingFeeDetails() !== null"
1731
- * [feeData]="getFeeDataForViewer()"
1732
- * [assignmentDate]="getAssignmentDate()"
1733
- * [discount]="getFeeDiscountForViewer()"
1734
- * (closed)="closeFeeDetails()">
1735
- * </cide-shared-fee-details-viewer-wrapper>
1736
- * ```
1737
- */
1738
- const FEE_DETAILS_VIEWER_COMPONENT_TOKEN = new InjectionToken('FeeDetailsViewerComponent');
1739
-
1740
1771
  /**
1741
1772
  * Wrapper component that dynamically loads the FeeDetailsViewerComponent
1742
1773
  * This allows front-desk to use the component without directly importing cloud-ide-fees
@@ -1856,31 +1887,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
1856
1887
  type: Output
1857
1888
  }] } });
1858
1889
 
1859
- /**
1860
- * Injection token for ProgramSectionSelectorComponent
1861
- * This allows the component to be provided without direct import dependency
1862
- *
1863
- * @example
1864
- * ```typescript
1865
- * // In app.config.ts
1866
- * import { CideLytProgramSectionSelectorComponent } from 'cloud-ide-academics';
1867
- * import { PROGRAM_SECTION_SELECTOR_COMPONENT_TOKEN } from 'cloud-ide-shared';
1868
- *
1869
- * providers: [
1870
- * { provide: PROGRAM_SECTION_SELECTOR_COMPONENT_TOKEN, useValue: CideLytProgramSectionSelectorComponent }
1871
- * ]
1872
- *
1873
- * // In component template
1874
- * <cide-shared-program-section-selector-wrapper
1875
- * [formGroup]="form"
1876
- * [classProgramControlName]="'class_program_id'"
1877
- * [academicYearId]="academicYearId()"
1878
- * (valuesChange)="onValuesChange($event)">
1879
- * </cide-shared-program-section-selector-wrapper>
1880
- * ```
1881
- */
1882
- const PROGRAM_SECTION_SELECTOR_COMPONENT_TOKEN = new InjectionToken('ProgramSectionSelectorComponent');
1883
-
1884
1890
  /**
1885
1891
  * Wrapper component that dynamically loads the ProgramSectionSelectorComponent
1886
1892
  * This allows front-desk to use the component without directly importing cloud-ide-academics
@@ -2045,6 +2051,113 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
2045
2051
  type: Output
2046
2052
  }] } });
2047
2053
 
2054
+ /**
2055
+ * Wrapper component that dynamically loads the FeeApplicableFeesComponent
2056
+ * This allows front-desk to use the component without directly importing cloud-ide-fees
2057
+ */
2058
+ class FeeApplicableFeesWrapperComponent {
2059
+ viewContainerRef = inject(ViewContainerRef);
2060
+ destroyRef = inject(DestroyRef);
2061
+ componentToken = inject(FEE_APPLICABLE_FEES_COMPONENT_TOKEN, { optional: true });
2062
+ componentRef = null;
2063
+ // Inputs
2064
+ entityId = null;
2065
+ academicYearId = '';
2066
+ classProgramId = '';
2067
+ termId = '';
2068
+ branchId = null;
2069
+ sectionId = null;
2070
+ studentId = null;
2071
+ // Outputs
2072
+ feesCalculated = new EventEmitter();
2073
+ ngOnInit() {
2074
+ if (this.componentToken) {
2075
+ this.loadComponent();
2076
+ }
2077
+ }
2078
+ ngOnChanges(changes) {
2079
+ if (this.componentRef) {
2080
+ this.updateComponentInputs();
2081
+ }
2082
+ else if (this.componentToken) {
2083
+ this.loadComponent();
2084
+ }
2085
+ }
2086
+ ngOnDestroy() {
2087
+ this.destroyComponent();
2088
+ }
2089
+ loadComponent() {
2090
+ if (!this.componentToken) {
2091
+ console.warn('FEE_APPLICABLE_FEES_COMPONENT_TOKEN not provided.');
2092
+ return;
2093
+ }
2094
+ if (this.componentRef) {
2095
+ this.updateComponentInputs();
2096
+ return;
2097
+ }
2098
+ try {
2099
+ this.componentRef = this.viewContainerRef.createComponent(this.componentToken);
2100
+ this.updateComponentInputs();
2101
+ // Subscribe to outputs
2102
+ if (this.componentRef.instance.feesCalculated) {
2103
+ const output = this.componentRef.instance.feesCalculated;
2104
+ if (output && typeof output.subscribe === 'function') {
2105
+ output.subscribe((val) => this.feesCalculated.emit(val));
2106
+ }
2107
+ }
2108
+ }
2109
+ catch (error) {
2110
+ console.error('Error loading FeeApplicableFeesComponent:', error);
2111
+ }
2112
+ }
2113
+ updateComponentInputs() {
2114
+ if (!this.componentRef)
2115
+ return;
2116
+ // Use setInput for signal inputs
2117
+ this.componentRef.setInput('entityId', this.entityId);
2118
+ this.componentRef.setInput('academicYearId', this.academicYearId);
2119
+ this.componentRef.setInput('classProgramId', this.classProgramId);
2120
+ this.componentRef.setInput('termId', this.termId);
2121
+ this.componentRef.setInput('branchId', this.branchId);
2122
+ this.componentRef.setInput('sectionId', this.sectionId);
2123
+ this.componentRef.setInput('studentId', this.studentId);
2124
+ this.componentRef.changeDetectorRef.detectChanges();
2125
+ }
2126
+ destroyComponent() {
2127
+ if (this.componentRef) {
2128
+ this.componentRef.destroy();
2129
+ this.componentRef = null;
2130
+ this.viewContainerRef.clear();
2131
+ }
2132
+ }
2133
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FeeApplicableFeesWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2134
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: FeeApplicableFeesWrapperComponent, isStandalone: true, selector: "cide-shared-fee-applicable-fees-wrapper", inputs: { entityId: "entityId", academicYearId: "academicYearId", classProgramId: "classProgramId", termId: "termId", branchId: "branchId", sectionId: "sectionId", studentId: "studentId" }, outputs: { feesCalculated: "feesCalculated" }, usesOnChanges: true, ngImport: i0, template: `<!-- Component will be dynamically loaded here -->`, isInline: true });
2135
+ }
2136
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FeeApplicableFeesWrapperComponent, decorators: [{
2137
+ type: Component,
2138
+ args: [{
2139
+ selector: 'cide-shared-fee-applicable-fees-wrapper',
2140
+ standalone: true,
2141
+ template: `<!-- Component will be dynamically loaded here -->`
2142
+ }]
2143
+ }], propDecorators: { entityId: [{
2144
+ type: Input
2145
+ }], academicYearId: [{
2146
+ type: Input
2147
+ }], classProgramId: [{
2148
+ type: Input
2149
+ }], termId: [{
2150
+ type: Input
2151
+ }], branchId: [{
2152
+ type: Input
2153
+ }], sectionId: [{
2154
+ type: Input
2155
+ }], studentId: [{
2156
+ type: Input
2157
+ }], feesCalculated: [{
2158
+ type: Output
2159
+ }] } });
2160
+
2048
2161
  /*
2049
2162
  * Public API Surface of cloud-ide-shared
2050
2163
  */
@@ -2053,5 +2166,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
2053
2166
  * Generated bundle index. Do not edit.
2054
2167
  */
2055
2168
 
2056
- export { ACADEMIC_YEAR_SERVICE_TOKEN, APP_STATE_SERVICE_TOKEN, AUTH_SERVICE_TOKEN, CLASS_PROGRAM_MASTER_SERVICE_TOKEN, COUNTRY_SERVICE_TOKEN, CURRENCY_SERVICE_TOKEN, CideCoreGeneralMasterTypeService, CideSharedOrgStructureComponent, CideSharedProgramSectionSelectorComponent, CloudIdeShared, EDUCATION_BOARD_SERVICE_TOKEN, ENTITY_SERVICE_TOKEN, FEE_DETAILS_VIEWER_COMPONENT_TOKEN, FEE_PAYMENT_SERVICE_TOKEN, FEE_STRUCTURE_SERVICE_TOKEN, FINANCIAL_YEAR_SERVICE_TOKEN, FeeDetailsViewerWrapperComponent, GENERAL_MASTER_SERVICE_TOKEN, NATIONALITY_SERVICE_TOKEN, PIN_CODE_SERVICE_TOKEN, PROGRAM_SECTION_SELECTOR_COMPONENT_TOKEN, PROGRAM_TERM_SECTION_SERVICE_TOKEN, ProgramSectionSelectorWrapperComponent, SharedObjectIdService, USER_SERVICE_TOKEN, authGuard };
2169
+ export { ACADEMIC_YEAR_SERVICE_TOKEN, APP_STATE_SERVICE_TOKEN, AUTH_SERVICE_TOKEN, CLASS_PROGRAM_MASTER_SERVICE_TOKEN, COUNTRY_SERVICE_TOKEN, CURRENCY_SERVICE_TOKEN, CideCoreGeneralMasterTypeService, CideSharedOrgStructureComponent, CideSharedProgramSectionSelectorComponent, CloudIdeShared, EDUCATION_BOARD_SERVICE_TOKEN, ENTITY_SERVICE_TOKEN, FEE_APPLICABLE_FEES_COMPONENT_TOKEN, FEE_DETAILS_VIEWER_COMPONENT_TOKEN, FEE_PAYMENT_SERVICE_TOKEN, FEE_STRUCTURE_SERVICE_TOKEN, FINANCIAL_YEAR_SERVICE_TOKEN, FeeApplicableFeesWrapperComponent, FeeDetailsViewerWrapperComponent, GENERAL_MASTER_SERVICE_TOKEN, NATIONALITY_SERVICE_TOKEN, PIN_CODE_SERVICE_TOKEN, PROGRAM_SECTION_SELECTOR_COMPONENT_TOKEN, PROGRAM_TERM_SECTION_SERVICE_TOKEN, ProgramSectionSelectorWrapperComponent, SharedObjectIdService, USER_SERVICE_TOKEN, authGuard };
2057
2170
  //# sourceMappingURL=cloud-ide-shared.mjs.map