barsa-calendar 2.3.42 → 2.3.44

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,9 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Pipe, EventEmitter, HostListener, HostBinding, Output, Input, ChangeDetectionStrategy, Component, inject, ViewChild, ChangeDetectorRef, ComponentFactoryResolver, NO_ERRORS_SCHEMA, NgModule } from '@angular/core';
2
+ import { inject, Injectable, Pipe, EventEmitter, HostListener, HostBinding, Output, Input, ChangeDetectionStrategy, Component, ViewChild, ChangeDetectorRef, ComponentFactoryResolver, NO_ERRORS_SCHEMA, NgModule } from '@angular/core';
3
3
  import { takeUntil, distinctUntilChanged, map, switchMap } from 'rxjs/operators';
4
4
  import * as i2$1 from 'barsa-novin-ray-core';
5
- import { BaseComponent, getDateService, getUniqueId, PreventDefaulEvent, PortalService, DateService, BbbTranslatePipe, BarsaApi, ReportViewBaseComponent, LogService, BaseModule, DynamicComponentService, BarsaNovinRayCoreModule } from 'barsa-novin-ray-core';
6
- import { BehaviorSubject, combineLatest, of } from 'rxjs';
5
+ import { LogService, getDateService, getUniqueId, BaseComponent, PreventDefaulEvent, PortalService, BarsaApi, DateService, BbbTranslatePipe, ReportViewBaseComponent, BaseModule, DynamicComponentService, BarsaNovinRayCoreModule } from 'barsa-novin-ray-core';
6
+ import { Subject, BehaviorSubject, combineLatest, of } from 'rxjs';
7
7
  import moment from 'moment/moment';
8
8
  import * as i1 from '@angular/common';
9
9
  import { CommonModule, TitleCasePipe } from '@angular/common';
@@ -48,14 +48,19 @@ class CalendarMonthInfo {
48
48
  }
49
49
  }
50
50
 
51
- class CalendarService extends BaseComponent {
51
+ class CalendarService {
52
52
  constructor() {
53
- super(...arguments);
53
+ this._onDestroy$ = new Subject();
54
54
  this._calendarsSource = new BehaviorSubject([]);
55
55
  this._modeSource = new BehaviorSubject('month');
56
56
  this._currentMonthIndexSource = new BehaviorSubject(-1);
57
57
  this._weekModeDaysSource = new BehaviorSubject([]);
58
58
  this._daysSource = new BehaviorSubject([]);
59
+ this._log = inject(LogService);
60
+ }
61
+ ngOnDestroy() {
62
+ this._onDestroy$.next();
63
+ this._onDestroy$.complete();
59
64
  }
60
65
  get todayMonthInfo() {
61
66
  return this._todayMonthInfo;
@@ -658,7 +663,7 @@ class CalendarService extends BaseComponent {
658
663
  };
659
664
  return { day, isInMonth };
660
665
  }
661
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CalendarService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
666
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CalendarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
662
667
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CalendarService }); }
663
668
  }
664
669
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CalendarService, decorators: [{
@@ -1362,6 +1367,7 @@ class CalendarSelectionDaysComponent extends BaseComponent {
1362
1367
  return 480;
1363
1368
  }
1364
1369
  }));
1370
+ this._calendarService.setCulture(BarsaApi.LoginFormData.Culture);
1365
1371
  this.weekDaysMin = this._calendarService.weekDaysMin();
1366
1372
  this._calendarService.setMode('month');
1367
1373
  this.weekDays = this._calendarService.weekDays();
@@ -2566,6 +2572,7 @@ class CalendarContainerComponent extends ReportViewBaseComponent {
2566
2572
  }
2567
2573
  this.userCalendars = this.contextSetting.View.UserCalendars;
2568
2574
  super.ngOnInit();
2575
+ this._calendarService.setCulture(BarsaApi.LoginFormData.Culture);
2569
2576
  this.prepare();
2570
2577
  this._setWidthAndHeight();
2571
2578
  this.prepareMoDataList(this.moDataList);
@@ -2766,7 +2773,9 @@ const components = [
2766
2773
  EventButtonComponent,
2767
2774
  DayEventListComponent,
2768
2775
  EventButtonEndArrowComponent,
2769
- EventButtonStartArrowComponent
2776
+ EventButtonStartArrowComponent,
2777
+ DateTimePickerComponent,
2778
+ CalendarSelectionDaysComponent
2770
2779
  ];
2771
2780
  const pipes = [DaysInWeekPipe, EventDatePipe, EventTimePipe, FromToTimePipe, EqualDatePipe];
2772
2781
  class BarsaCalendarModule extends BaseModule {
@@ -2793,7 +2802,9 @@ class BarsaCalendarModule extends BaseModule {
2793
2802
  EventButtonComponent,
2794
2803
  DayEventListComponent,
2795
2804
  EventButtonEndArrowComponent,
2796
- EventButtonStartArrowComponent, DaysInWeekPipe, EventDatePipe, EventTimePipe, FromToTimePipe, EqualDatePipe, DateTimePickerComponent, CalendarSelectionDaysComponent], imports: [CommonModule,
2805
+ EventButtonStartArrowComponent,
2806
+ DateTimePickerComponent,
2807
+ CalendarSelectionDaysComponent, DaysInWeekPipe, EventDatePipe, EventTimePipe, FromToTimePipe, EqualDatePipe], imports: [CommonModule,
2797
2808
  FormsModule,
2798
2809
  BarsaNovinRayCoreModule,
2799
2810
  FundamentalNgxCoreModule,
@@ -2812,7 +2823,9 @@ class BarsaCalendarModule extends BaseModule {
2812
2823
  EventButtonComponent,
2813
2824
  DayEventListComponent,
2814
2825
  EventButtonEndArrowComponent,
2815
- EventButtonStartArrowComponent, DateTimePickerComponent, CalendarSelectionDaysComponent] }); }
2826
+ EventButtonStartArrowComponent,
2827
+ DateTimePickerComponent,
2828
+ CalendarSelectionDaysComponent] }); }
2816
2829
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: BarsaCalendarModule, providers: [TitleCasePipe, CalendarService, ...pipes], imports: [CommonModule,
2817
2830
  FormsModule,
2818
2831
  BarsaNovinRayCoreModule,
@@ -2834,9 +2847,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
2834
2847
  CardModule,
2835
2848
  QuickViewModule
2836
2849
  ],
2837
- declarations: [...components, ...pipes, DateTimePickerComponent, CalendarSelectionDaysComponent],
2850
+ declarations: [...components, ...pipes],
2838
2851
  providers: [TitleCasePipe, CalendarService, ...pipes],
2839
- exports: [...components, DateTimePickerComponent, CalendarSelectionDaysComponent]
2852
+ exports: [...components]
2840
2853
  }]
2841
2854
  }], ctorParameters: () => [] });
2842
2855