ngx-histaff-alpha 3.3.0 → 3.3.2

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.
Files changed (24) hide show
  1. package/esm2022/lib/app/directives/hot-keys.directive.mjs +34 -0
  2. package/esm2022/lib/app/enum/EnumSignalRType.mjs +2 -1
  3. package/esm2022/lib/app/libraries/core-active-user-count/core-active-user-count.component.mjs +40 -0
  4. package/esm2022/lib/app/libraries/core-active-user-count/newly-created-token.service.mjs +17 -0
  5. package/esm2022/lib/app/libraries/core-helper/core-helper.component.mjs +6 -17
  6. package/esm2022/lib/app/libraries/core-shift-sticker/core-shift-sticker.component.mjs +7 -3
  7. package/esm2022/lib/app/services/app-initialization.service.mjs +4 -1
  8. package/esm2022/lib/app/services/application-help.service.mjs +2 -2
  9. package/esm2022/lib/app/services/socket.service.mjs +9 -4
  10. package/esm2022/public-api.mjs +4 -2
  11. package/fesm2022/ngx-histaff-alpha.mjs +114 -65
  12. package/fesm2022/ngx-histaff-alpha.mjs.map +1 -1
  13. package/lib/app/directives/hot-keys.directive.d.ts +10 -0
  14. package/lib/app/enum/EnumSignalRType.d.ts +2 -1
  15. package/lib/app/libraries/core-active-user-count/core-active-user-count.component.d.ts +14 -0
  16. package/lib/app/libraries/core-active-user-count/newly-created-token.service.d.ts +8 -0
  17. package/lib/app/libraries/core-helper/core-helper.component.d.ts +1 -2
  18. package/lib/app/libraries/core-shift-sticker/core-shift-sticker.component.d.ts +4 -0
  19. package/lib/app/services/application-help.service.d.ts +1 -1
  20. package/lib/app/services/socket.service.d.ts +3 -1
  21. package/package.json +1 -1
  22. package/public-api.d.ts +3 -1
  23. package/esm2022/lib/app/directives/prevent-f1.directive.mjs +0 -33
  24. package/lib/app/directives/prevent-f1.directive.d.ts +0 -9
@@ -0,0 +1,10 @@
1
+ import { ApplicationHelpService } from '../services/application-help.service';
2
+ import * as i0 from "@angular/core";
3
+ export declare class HotKeysDirective {
4
+ private applicationHelpService;
5
+ hotKeys: string[];
6
+ constructor(applicationHelpService: ApplicationHelpService);
7
+ handleKeyboardEvent(event: KeyboardEvent): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<HotKeysDirective, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HotKeysDirective, "[hotKeys]", never, { "hotKeys": { "alias": "hotKeys"; "required": true; }; }, {}, never, never, true, never>;
10
+ }
@@ -3,5 +3,6 @@ export declare enum EnumSignalRType {
3
3
  ENTITY_CHANGED = "ENTITY_CHANGED",
4
4
  ACTIVITY = "ACTIVITY",
5
5
  ACTIVITY_HISTORY_RESET = "ACTIVITY_HISTORY_RESET",
6
- TASK_PROGRESS = "TASK_PROGRESS"
6
+ TASK_PROGRESS = "TASK_PROGRESS",
7
+ NEWLY_CREATED_TOKEN_CONTEXT = "NEWLY_CREATED_TOKEN_CONTEXT"
7
8
  }
@@ -0,0 +1,14 @@
1
+ import { AfterViewInit } from '@angular/core';
2
+ import { BaseComponent } from '../base-component/base/base.component';
3
+ import { AppService } from '../../services/app.service';
4
+ import { NewlyCreatedTokenService } from './newly-created-token.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class CoreActiveUserCountComponent extends BaseComponent implements AfterViewInit {
7
+ appService: AppService;
8
+ newTokenUsers: string[];
9
+ newTokenCount: number;
10
+ newlyCreatedTokenService: NewlyCreatedTokenService;
11
+ ngAfterViewInit(): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<CoreActiveUserCountComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<CoreActiveUserCountComponent, "core-active-user-count", never, {}, {}, never, never, true, never>;
14
+ }
@@ -0,0 +1,8 @@
1
+ import { BehaviorSubject } from 'rxjs';
2
+ import * as i0 from "@angular/core";
3
+ export declare class NewlyCreatedTokenService {
4
+ newTokenUsers$: BehaviorSubject<string[]>;
5
+ constructor();
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<NewlyCreatedTokenService, never>;
7
+ static ɵprov: i0.ɵɵInjectableDeclaration<NewlyCreatedTokenService>;
8
+ }
@@ -1,13 +1,12 @@
1
1
  import { AfterViewInit, ElementRef, OnDestroy, Renderer2 } from '@angular/core';
2
2
  import { ApplicationHelpService } from '../../services/application-help.service';
3
- import { IAtShift } from '../../interfaces/time-management/IAtShift';
4
3
  import * as i0 from "@angular/core";
5
4
  export declare class CoreHelperComponent implements AfterViewInit, OnDestroy {
6
5
  private ahs;
7
6
  private renderer;
8
7
  container: ElementRef<any>;
9
8
  listenerFn: () => void;
10
- shift: IAtShift;
9
+ activeUserCount: number;
11
10
  constructor(ahs: ApplicationHelpService, renderer: Renderer2);
12
11
  ngAfterViewInit(): void;
13
12
  ngOnDestroy(): void;
@@ -16,6 +16,10 @@ export declare class CoreShiftStickerComponent extends BaseComponent implements
16
16
  isHolidayCal: boolean | undefined;
17
17
  isHaveSal: boolean | undefined;
18
18
  isInsArising: boolean | undefined;
19
+ relativelyIsMorning: boolean | undefined;
20
+ relativelyIsAfternoon: boolean | undefined;
21
+ relativelyIsEverning: boolean | undefined;
22
+ relativelyIsNight: boolean | undefined;
19
23
  ngOnInit(): void;
20
24
  static ɵfac: i0.ɵɵFactoryDeclaration<CoreShiftStickerComponent, never>;
21
25
  static ɵcmp: i0.ɵɵComponentDeclaration<CoreShiftStickerComponent, "core-shift-sticker", never, { "shift": { "alias": "shift"; "required": true; }; "width": { "alias": "width"; "required": false; }; }, {}, never, never, true, never>;
@@ -1,7 +1,7 @@
1
1
  import { BehaviorSubject } from 'rxjs';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class ApplicationHelpService {
4
- open$: BehaviorSubject<boolean>;
4
+ activeKey$: BehaviorSubject<string | undefined>;
5
5
  zIndex$: BehaviorSubject<number>;
6
6
  constructor();
7
7
  static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationHelpService, never>;
@@ -6,6 +6,7 @@ import { AlertService } from '../libraries/alert/alert.service';
6
6
  import { LongTaskService } from '../libraries/services/long-task.service';
7
7
  import { Router } from '@angular/router';
8
8
  import { AppService } from './app.service';
9
+ import { NewlyCreatedTokenService } from '../libraries/core-active-user-count/newly-created-token.service';
9
10
  import * as i0 from "@angular/core";
10
11
  export declare class SocketService {
11
12
  private authService;
@@ -16,7 +17,8 @@ export declare class SocketService {
16
17
  private router;
17
18
  private longTaskService;
18
19
  private appService;
19
- constructor(authService: AuthService, userActivityService: UserActivityService, hubConnectionService: HubConnectionService, appConfigService: AppConfigService, alertService: AlertService, router: Router, longTaskService: LongTaskService, appService: AppService);
20
+ private newlyCreatedTokenService;
21
+ constructor(authService: AuthService, userActivityService: UserActivityService, hubConnectionService: HubConnectionService, appConfigService: AppConfigService, alertService: AlertService, router: Router, longTaskService: LongTaskService, appService: AppService, newlyCreatedTokenService: NewlyCreatedTokenService);
20
22
  createHubConnection(): void;
21
23
  static ɵfac: i0.ɵɵFactoryDeclaration<SocketService, never>;
22
24
  static ɵprov: i0.ɵɵInjectableDeclaration<SocketService>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-histaff-alpha",
3
- "version": "3.3.0",
3
+ "version": "3.3.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.0.0",
6
6
  "@angular/core": "^17.0.0"
package/public-api.d.ts CHANGED
@@ -136,6 +136,8 @@ export * from './lib/app/libraries/button-group/core-button/ICoreButton';
136
136
  export * from './lib/app/libraries/button-group/core-button/core-button.component';
137
137
  export * from './lib/app/libraries/core-accordion/core-accordion/core-accordion.component';
138
138
  export * from './lib/app/libraries/core-accordion/core-accordion/core-accordion.service';
139
+ export * from './lib/app/libraries/core-active-user-count/core-active-user-count.component';
140
+ export * from './lib/app/libraries/core-active-user-count/newly-created-token.service';
139
141
  export * from './lib/app/libraries/core-api-progress/core-api-progress/core-api-progress.component';
140
142
  export * from './lib/app/libraries/core-attachment/core-attachment/core-attachment.component';
141
143
  export * from './lib/app/libraries/core-button-group/core-button-group/core-button-group.component';
@@ -279,6 +281,6 @@ export * from './lib/app/libraries/staffprofile/staffprofile.component';
279
281
  export * from './lib/app/libraries/threedots/threedots.component';
280
282
  export * from './lib/app/libraries/tooltip/tooltip.component';
281
283
  export * from './lib/app/libraries/tooltip/tooltip.directive';
282
- export * from './lib/app/directives/prevent-f1.directive';
284
+ export * from './lib/app/directives/hot-keys.directive';
283
285
  export * from './lib/app/libraries/user-activity/user-activity.component';
284
286
  export * from './lib/app/libraries/wage/wage.component';
@@ -1,33 +0,0 @@
1
- import { Directive, HostListener } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "../services/application-help.service";
4
- export class PreventF1Directive {
5
- constructor(applicationHelpService) {
6
- this.applicationHelpService = applicationHelpService;
7
- }
8
- handleKeyboardEvent(event) {
9
- if (event.key === 'F1') {
10
- event.preventDefault();
11
- // Add your custom handling logic here
12
- this.applicationHelpService.open$.next(true);
13
- }
14
- if (event.key === 'Escape' && !!this.applicationHelpService.open$.value) {
15
- event.preventDefault();
16
- // Add your custom handling logic here
17
- this.applicationHelpService.open$.next(false);
18
- }
19
- }
20
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: PreventF1Directive, deps: [{ token: i1.ApplicationHelpService }], target: i0.ɵɵFactoryTarget.Directive }); }
21
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.3", type: PreventF1Directive, isStandalone: true, selector: "[appPreventF1]", host: { listeners: { "document:keydown": "handleKeyboardEvent($event)" } }, ngImport: i0 }); }
22
- }
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: PreventF1Directive, decorators: [{
24
- type: Directive,
25
- args: [{
26
- selector: '[appPreventF1]',
27
- standalone: true
28
- }]
29
- }], ctorParameters: () => [{ type: i1.ApplicationHelpService }], propDecorators: { handleKeyboardEvent: [{
30
- type: HostListener,
31
- args: ['document:keydown', ['$event']]
32
- }] } });
33
- //# sourceMappingURL=data:application/json;base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XJ2aWNlLm9wZW4kLnZhbHVlKSB7XHJcbiAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgIC8vIEFkZCB5b3VyIGN1c3RvbSBoYW5kbGluZyBsb2dpYyBoZXJlXHJcbiAgICAgIHRoaXMuYXBwbGljYXRpb25IZWxwU2VydmljZS5vcGVuJC5uZXh0KGZhbHNlKTtcclxuICAgIH1cclxuICB9XHJcbn1cclxuIl19
@@ -1,9 +0,0 @@
1
- import { ApplicationHelpService } from '../services/application-help.service';
2
- import * as i0 from "@angular/core";
3
- export declare class PreventF1Directive {
4
- private applicationHelpService;
5
- constructor(applicationHelpService: ApplicationHelpService);
6
- handleKeyboardEvent(event: KeyboardEvent): void;
7
- static ɵfac: i0.ɵɵFactoryDeclaration<PreventF1Directive, never>;
8
- static ɵdir: i0.ɵɵDirectiveDeclaration<PreventF1Directive, "[appPreventF1]", never, {}, {}, never, never, true, never>;
9
- }