tin-spa 20.6.4 → 20.6.5

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.
@@ -15,7 +15,7 @@ import { mergeMap, filter, startWith, map, catchError, finalize as finalize$1, t
15
15
  import * as i2$1 from '@angular/material/snack-bar';
16
16
  import { MatSnackBarModule } from '@angular/material/snack-bar';
17
17
  import * as i1$2 from '@angular/router';
18
- import { Router, RouterModule, NavigationEnd } from '@angular/router';
18
+ import { NavigationEnd, Router, RouterModule } from '@angular/router';
19
19
  import * as i2$2 from '@abacritt/angularx-social-login';
20
20
  import { SocialLoginModule } from '@abacritt/angularx-social-login';
21
21
  import * as i1$1 from '@angular/common/http';
@@ -6604,6 +6604,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
6604
6604
  args: [{ providedIn: 'root' }]
6605
6605
  }], ctorParameters: () => [{ type: DataServiceLib }, { type: SignalRService }] });
6606
6606
 
6607
+ class AnalyticsService {
6608
+ constructor(router) {
6609
+ this.router = router;
6610
+ }
6611
+ // Initialize route tracking — call once from app root or module constructor
6612
+ init() {
6613
+ this.router.events.pipe(filter(event => event instanceof NavigationEnd)).subscribe((event) => {
6614
+ const url = event.urlAfterRedirects || event.url;
6615
+ // Strip hash prefix so GA sees clean paths (e.g. /home/invoices instead of #/home/invoices)
6616
+ const pagePath = url.replace(/^#/, '') || '/';
6617
+ this.sendPageView(pagePath);
6618
+ });
6619
+ }
6620
+ // Send page_view event to GA4
6621
+ sendPageView(pagePath) {
6622
+ if (typeof gtag === 'function') {
6623
+ gtag('event', 'page_view', {
6624
+ page_path: pagePath,
6625
+ page_location: window.location.origin + pagePath
6626
+ });
6627
+ }
6628
+ }
6629
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AnalyticsService, deps: [{ token: i1$2.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
6630
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AnalyticsService, providedIn: 'root' }); }
6631
+ }
6632
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AnalyticsService, decorators: [{
6633
+ type: Injectable,
6634
+ args: [{ providedIn: 'root' }]
6635
+ }], ctorParameters: () => [{ type: i1$2.Router }] });
6636
+
6607
6637
  // Functional guard for Angular 15+ (replaces deprecated class-based CanActivate)
6608
6638
  // Changed: Returns Promise<boolean> to properly await token refresh before allowing navigation
6609
6639
  const authGuard = async (route, state) => {
@@ -14043,7 +14073,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
14043
14073
  }] } });
14044
14074
 
14045
14075
  class TinSpaModule {
14046
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TinSpaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
14076
+ // Changed: Auto-initialize analytics route tracking when module loads
14077
+ constructor(analytics) {
14078
+ this.analytics = analytics;
14079
+ analytics.init();
14080
+ }
14081
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TinSpaModule, deps: [{ token: AnalyticsService }], target: i0.ɵɵFactoryTarget.NgModule }); }
14047
14082
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.14", ngImport: i0, type: TinSpaModule, declarations: [
14048
14083
  // Changed: Removed page components now declared in domain-specific modules (accounting, inventory, sales, purchasing, hr, payroll, manufacturing, loans, general, tenancy, workflow, overview)
14049
14084
  TinSpaComponent, TextComponent, TextMaskComponent, TextAreaComponent, TextSingleComponent, CheckComponent, DateComponent, DatetimeComponent, LabelComponent, SelectComponent,
@@ -14124,7 +14159,8 @@ class TinSpaModule {
14124
14159
  LoansService,
14125
14160
  TabService, // Changed: Added TabService to providers
14126
14161
  provideCharts(withDefaultRegisterables()), // Changed: Register Chart.js with all default chart types
14127
- SubscriptionService // Added: Subscription feature-checking service
14162
+ SubscriptionService, // Added: Subscription feature-checking service
14163
+ AnalyticsService // Changed: GA4 route tracking for SPA page views
14128
14164
  ], imports: [SpaMatModule,
14129
14165
  HttpClientModule,
14130
14166
  CurrencyInputModule,
@@ -14221,10 +14257,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
14221
14257
  LoansService,
14222
14258
  TabService, // Changed: Added TabService to providers
14223
14259
  provideCharts(withDefaultRegisterables()), // Changed: Register Chart.js with all default chart types
14224
- SubscriptionService // Added: Subscription feature-checking service
14260
+ SubscriptionService, // Added: Subscription feature-checking service
14261
+ AnalyticsService // Changed: GA4 route tracking for SPA page views
14225
14262
  ],
14226
14263
  }]
14227
- }] });
14264
+ }], ctorParameters: () => [{ type: AnalyticsService }] });
14228
14265
 
14229
14266
  class LoginComponent {
14230
14267
  constructor(httpService, storageService, router, messageService, dataService, authService, logService, route, notificationsService, signalRService, msalService, dialog) {
@@ -21938,5 +21975,5 @@ const ALSQUARE_SVG_WHITE = `<svg viewBox="0 0 80 80" fill="none" xmlns="http://w
21938
21975
  * Generated bundle index. Do not edit.
21939
21976
  */
21940
21977
 
21941
- export { ALSQUARE_SVG_DARK, ALSQUARE_SVG_WHITE, Account, AccountsComponent as AccountingAccountsComponent, AggregatesComponent as AccountingAggregatesComponent, AgingComponent as AccountingAgingComponent, CurrenciesComponent as AccountingCurrenciesComponent, AccountingDashboardComponent, InvoicesComponent as AccountingInvoicesComponent, AccountingModule, ReportsComponent as AccountingReportsComponent, AccountingService, StatementComponent as AccountingStatementComponent, TransactionTypesComponent as AccountingTransactionTypesComponent, TransactionsComponent as AccountingTransactionsComponent, Action, ActivityComponent, AdminModule, AgentComponent, AgentService, AlertComponent, AlertConfig, AlertMessage, ApiResponse, AppConfig, AppModelsComponent, AssetStatus, AssetsService, AttachComponent, AuthService, BillingPageComponent, BrandsComponent, CacheConfig, CapItem, CapsulesComponent, CategoriesComponent, ChangePasswordComponent, ChangeUserPassword, ChartConfig, ChartsComponent, CheckComponent, ChipsComponent, Constants, Core, CreateAccountComponent, CustomersComponent, DataServiceLib, DateComponent, DatetimeComponent, DepartmentsComponent, DetailsDialog, DetailsDialogConfig, DetailsDialogProcessor, DetailsSource, DialogService, EmailComponent, EmployeesComponent, ExportService, FeatureDirective, FilterComponent, FormComponent, FormConfig, GeneralModule, GeneralService, GradesComponent, GroupsComponent, HRModule, HtmlComponent, HttpService, IndexModule, InventoryDashboardComponent, InventoryModule, InventoryService, InvitationsTableComponent, InvoiceDashboardComponent, InvoiceItemType, InvoiceStatus, LabelComponent, ListDialogComponent, ListDialogConfig, LoaderComponent, LoaderService, LoanPaymentsComponent, LoanProductsComponent, LoansComponent, LoansModule, LoansService, LogLevel, LogService, LoginComponent, LogsComponent, ManufacturingModule, MembershipComponent, MessageService, MoneyComponent, MovementType, NavMenuComponent, NotesComponent, NotesConfig, NotificationsService, NumberComponent, OnboardingComponent, OptionComponent, OverviewDashboardComponent, OverviewModule, PageComponent, PageConfig, PayrollDashboardComponent, PayrollModule, PlansComponent, PositionsComponent, PreferencesComponent, PrivacyDialogComponent, Profile, ProfileComponent, PurchaseStatus, PurchasingDashboardComponent, PurchasingModule, PushNotificationService, ReceiptStatus, RecoverAccountComponent, Register, Role, RoleAccess, RolesComponent, SalesDashboardComponent, SalesModule, SearchComponent, SearchConfig, SecurityConfig, SelectBitwiseComponent, SelectComponent, SelectLiteComponent, SelectMultiComponent, SettingsComponent, SignupComponent, SignupData, SpaAdminModule, SpaHomeModule, SpaIndexModule, SpaLandingComponent, SpaMatModule, SpaUserModule, StatusesComponent, Step, StepConfig, StepsComponent, StorageService, SubCategoriesComponent, SubscriptionPageComponent, SubscriptionService, SuppliersComponent, TabService, TableComponent, TableConfig, TabsComponent, TasksComponent, TenancyModule, TenantsComponent, TermsDialogComponent, TextAreaComponent, TextComponent, TextMaskComponent, TextMultiComponent, TextSingleComponent, TileConfig, TilesComponent, TinSpaComponent, TinSpaModule, TinSpaService, TitleActionsComponent, TransactionTiming, UnitOfMeasure, UpdateService, User, UserModule, UsersComponent, ViewerComponent, WelcomeComponent, WorkflowModule, authGuard, dialogOptions, featureGuard, loginConfig, messageDialog, viewerDialog };
21978
+ export { ALSQUARE_SVG_DARK, ALSQUARE_SVG_WHITE, Account, AccountsComponent as AccountingAccountsComponent, AggregatesComponent as AccountingAggregatesComponent, AgingComponent as AccountingAgingComponent, CurrenciesComponent as AccountingCurrenciesComponent, AccountingDashboardComponent, InvoicesComponent as AccountingInvoicesComponent, AccountingModule, ReportsComponent as AccountingReportsComponent, AccountingService, StatementComponent as AccountingStatementComponent, TransactionTypesComponent as AccountingTransactionTypesComponent, TransactionsComponent as AccountingTransactionsComponent, Action, ActivityComponent, AdminModule, AgentComponent, AgentService, AlertComponent, AlertConfig, AlertMessage, AnalyticsService, ApiResponse, AppConfig, AppModelsComponent, AssetStatus, AssetsService, AttachComponent, AuthService, BillingPageComponent, BrandsComponent, CacheConfig, CapItem, CapsulesComponent, CategoriesComponent, ChangePasswordComponent, ChangeUserPassword, ChartConfig, ChartsComponent, CheckComponent, ChipsComponent, Constants, Core, CreateAccountComponent, CustomersComponent, DataServiceLib, DateComponent, DatetimeComponent, DepartmentsComponent, DetailsDialog, DetailsDialogConfig, DetailsDialogProcessor, DetailsSource, DialogService, EmailComponent, EmployeesComponent, ExportService, FeatureDirective, FilterComponent, FormComponent, FormConfig, GeneralModule, GeneralService, GradesComponent, GroupsComponent, HRModule, HtmlComponent, HttpService, IndexModule, InventoryDashboardComponent, InventoryModule, InventoryService, InvitationsTableComponent, InvoiceDashboardComponent, InvoiceItemType, InvoiceStatus, LabelComponent, ListDialogComponent, ListDialogConfig, LoaderComponent, LoaderService, LoanPaymentsComponent, LoanProductsComponent, LoansComponent, LoansModule, LoansService, LogLevel, LogService, LoginComponent, LogsComponent, ManufacturingModule, MembershipComponent, MessageService, MoneyComponent, MovementType, NavMenuComponent, NotesComponent, NotesConfig, NotificationsService, NumberComponent, OnboardingComponent, OptionComponent, OverviewDashboardComponent, OverviewModule, PageComponent, PageConfig, PayrollDashboardComponent, PayrollModule, PlansComponent, PositionsComponent, PreferencesComponent, PrivacyDialogComponent, Profile, ProfileComponent, PurchaseStatus, PurchasingDashboardComponent, PurchasingModule, PushNotificationService, ReceiptStatus, RecoverAccountComponent, Register, Role, RoleAccess, RolesComponent, SalesDashboardComponent, SalesModule, SearchComponent, SearchConfig, SecurityConfig, SelectBitwiseComponent, SelectComponent, SelectLiteComponent, SelectMultiComponent, SettingsComponent, SignupComponent, SignupData, SpaAdminModule, SpaHomeModule, SpaIndexModule, SpaLandingComponent, SpaMatModule, SpaUserModule, StatusesComponent, Step, StepConfig, StepsComponent, StorageService, SubCategoriesComponent, SubscriptionPageComponent, SubscriptionService, SuppliersComponent, TabService, TableComponent, TableConfig, TabsComponent, TasksComponent, TenancyModule, TenantsComponent, TermsDialogComponent, TextAreaComponent, TextComponent, TextMaskComponent, TextMultiComponent, TextSingleComponent, TileConfig, TilesComponent, TinSpaComponent, TinSpaModule, TinSpaService, TitleActionsComponent, TransactionTiming, UnitOfMeasure, UpdateService, User, UserModule, UsersComponent, ViewerComponent, WelcomeComponent, WorkflowModule, authGuard, dialogOptions, featureGuard, loginConfig, messageDialog, viewerDialog };
21942
21979
  //# sourceMappingURL=tin-spa.mjs.map