ngx-beacon-notify 1.0.0 → 1.2.0

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 (71) hide show
  1. package/esm2022/lib/beacon/beacon.component.mjs +142 -0
  2. package/esm2022/lib/beacon-notify.module.mjs +58 -0
  3. package/esm2022/lib/beacon-notify.service.mjs +605 -0
  4. package/esm2022/lib/container/container.component.mjs +71 -0
  5. package/esm2022/lib/icons/beacon-icon-alert/beacon-icon-alert.component.mjs +11 -0
  6. package/esm2022/lib/icons/beacon-icon-error/beacon-icon-error.component.mjs +11 -0
  7. package/esm2022/lib/icons/beacon-icon-info/beacon-icon-info.component.mjs +11 -0
  8. package/esm2022/lib/icons/beacon-icon-success/beacon-icon-success.component.mjs +11 -0
  9. package/esm2022/lib/icons/beacon-icon-warning/beacon-icon-warning.component.mjs +11 -0
  10. package/esm2022/lib/index.mjs +3 -0
  11. package/esm2022/lib/pipes/beacon-type-resolve.pipe.mjs +39 -0
  12. package/esm2022/lib/types/constants/index.mjs +6 -0
  13. package/esm2022/lib/types/index.mjs +3 -0
  14. package/esm2022/lib/types/interfaces/index.mjs +2 -0
  15. package/esm2022/ngx-beacon-notify.mjs +5 -0
  16. package/esm2022/public-api.mjs +9 -0
  17. package/fesm2022/ngx-beacon-notify.mjs +941 -0
  18. package/fesm2022/ngx-beacon-notify.mjs.map +1 -0
  19. package/index.d.ts +5 -1
  20. package/lib/beacon/beacon.component.d.ts +22 -0
  21. package/lib/beacon-notify.module.d.ts +18 -0
  22. package/lib/beacon-notify.service.d.ts +103 -0
  23. package/lib/container/container.component.d.ts +18 -0
  24. package/lib/icons/beacon-icon-alert/beacon-icon-alert.component.d.ts +5 -0
  25. package/lib/icons/beacon-icon-error/beacon-icon-error.component.d.ts +5 -0
  26. package/lib/icons/beacon-icon-info/beacon-icon-info.component.d.ts +5 -0
  27. package/lib/icons/beacon-icon-success/beacon-icon-success.component.d.ts +5 -0
  28. package/lib/icons/beacon-icon-warning/beacon-icon-warning.component.d.ts +5 -0
  29. package/lib/index.d.ts +2 -0
  30. package/lib/pipes/beacon-type-resolve.pipe.d.ts +9 -0
  31. package/lib/types/constants/index.d.ts +6 -0
  32. package/lib/types/index.d.ts +2 -0
  33. package/lib/types/interfaces/index.d.ts +99 -0
  34. package/package.json +35 -6
  35. package/public-api.d.ts +8 -0
  36. package/beacon/beacon.component.css +0 -175
  37. package/beacon/beacon.component.html +0 -46
  38. package/beacon/beacon.component.spec.ts +0 -21
  39. package/beacon/beacon.component.ts +0 -142
  40. package/beacon-notify.module.ts +0 -43
  41. package/beacon-notify.service.ts +0 -634
  42. package/container/container.component.css +0 -10
  43. package/container/container.component.html +0 -3
  44. package/container/container.component.spec.ts +0 -21
  45. package/container/container.component.ts +0 -62
  46. package/icons/beacon-icon-alert/beacon-icon-alert.component.css +0 -6
  47. package/icons/beacon-icon-alert/beacon-icon-alert.component.html +0 -10
  48. package/icons/beacon-icon-alert/beacon-icon-alert.component.spec.ts +0 -21
  49. package/icons/beacon-icon-alert/beacon-icon-alert.component.ts +0 -10
  50. package/icons/beacon-icon-error/beacon-icon-error.component.css +0 -6
  51. package/icons/beacon-icon-error/beacon-icon-error.component.html +0 -13
  52. package/icons/beacon-icon-error/beacon-icon-error.component.spec.ts +0 -21
  53. package/icons/beacon-icon-error/beacon-icon-error.component.ts +0 -10
  54. package/icons/beacon-icon-info/beacon-icon-info.component.css +0 -6
  55. package/icons/beacon-icon-info/beacon-icon-info.component.html +0 -14
  56. package/icons/beacon-icon-info/beacon-icon-info.component.spec.ts +0 -21
  57. package/icons/beacon-icon-info/beacon-icon-info.component.ts +0 -10
  58. package/icons/beacon-icon-success/beacon-icon-success.component.css +0 -6
  59. package/icons/beacon-icon-success/beacon-icon-success.component.html +0 -13
  60. package/icons/beacon-icon-success/beacon-icon-success.component.spec.ts +0 -21
  61. package/icons/beacon-icon-success/beacon-icon-success.component.ts +0 -9
  62. package/icons/beacon-icon-warning/beacon-icon-warning.component.css +0 -6
  63. package/icons/beacon-icon-warning/beacon-icon-warning.component.html +0 -15
  64. package/icons/beacon-icon-warning/beacon-icon-warning.component.spec.ts +0 -21
  65. package/icons/beacon-icon-warning/beacon-icon-warning.component.ts +0 -10
  66. package/index.ts +0 -2
  67. package/pipes/beacon-type-resolve.pipe.spec.ts +0 -8
  68. package/pipes/beacon-type-resolve.pipe.ts +0 -33
  69. package/types/constants/index.ts +0 -8
  70. package/types/index.ts +0 -3
  71. package/types/interfaces/index.ts +0 -110
@@ -1,62 +0,0 @@
1
- import { Component, Input, ViewChild, ElementRef, AfterViewInit } from '@angular/core';
2
- import { BeaconNotifyService } from '../beacon-notify.service';
3
- import { IBeaconConfig, IBeaconEventMessage } from '../types';
4
-
5
- @Component({
6
- selector: 'ngx-beacon-notify',
7
- templateUrl: './container.component.html',
8
- styleUrls: ['./container.component.css']
9
- })
10
- export class BeaconNotifyContainerComponent implements AfterViewInit {
11
- @ViewChild('beaconContainer', { static: false }) set content(content: ElementRef) {
12
- content && this.resolveBeaconContainer(content)
13
- }
14
- beaconLibrary!: Array<IBeaconConfig>
15
-
16
- constructor(private beaconService: BeaconNotifyService){
17
- this.beaconLibrary = this.beaconService.beaconLibrary
18
- }
19
-
20
- ngOnInit(): void {
21
- // Listen for delete event
22
- this.beaconService.beaconEventTaskMaster.subscribe((message: IBeaconEventMessage) => {
23
- if (message.delete)
24
- this.beaconLibrary = this.beaconService.beaconLibrary = this.beaconService.beaconLibrary.filter(x => x.bid != message.id)
25
- })
26
- }
27
-
28
- ngAfterViewInit(): void {}
29
-
30
- // Resolve beacon container
31
- resolveBeaconContainer(content: ElementRef): void {
32
- this.beaconService.setBeaconContainer(content)
33
-
34
- // Resolve position
35
- const position = this.beaconService.getBeaconGlobalPositionConfig
36
- // Resolve ltr
37
- if (position?.leftRight) {
38
- if(position?.leftRight == 'left') {
39
- content.nativeElement.style.left = 0
40
- content.nativeElement.style.right = 'auto'
41
- } else {
42
- content.nativeElement.style.left = 'auto'
43
- content.nativeElement.style.right = 0
44
- }
45
- }
46
- // Resolve ttb
47
- if (position?.topBottom) {
48
- if(position?.topBottom == 'top') {
49
- content.nativeElement.style.top = 0
50
- content.nativeElement.style.bottom = 'auto'
51
- } else {
52
- content.nativeElement.style.top = 'auto'
53
- content.nativeElement.style.bottom = 0
54
- }
55
- }
56
- }
57
-
58
- // Track-by function
59
- trackBy(idx: number, item: { bid: string }): string {
60
- return item.bid;
61
- }
62
- }
@@ -1,6 +0,0 @@
1
- svg {
2
- width: 20px !important;
3
- height: 20px !important;
4
- margin-right: 7px !important;
5
- margin-top: -2px;
6
- }
@@ -1,10 +0,0 @@
1
- <svg fill="currentColor" viewBox="0 0 48 48" data-name="Layer 1" id="Layer_1" xmlns="http://www.w3.org/2000/svg">
2
- <g id="SVGRepo_bgCarrier" stroke-width="0"></g>
3
- <g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
4
- <g id="SVGRepo_iconCarrier">
5
- <title></title>
6
- <path
7
- d="M40.62,28.34l-.87-.7A2,2,0,0,1,39,26.08V18A15,15,0,0,0,26.91,3.29a3,3,0,0,0-5.81,0A15,15,0,0,0,9,18v8.08a2,2,0,0,1-.75,1.56l-.87.7a9,9,0,0,0-3.38,7V37a4,4,0,0,0,4,4h8.26a8,8,0,0,0,15.47,0H40a4,4,0,0,0,4-4V35.36A9,9,0,0,0,40.62,28.34ZM24,43a4,4,0,0,1-3.44-2h6.89A4,4,0,0,1,24,43Zm16-6H8V35.36a5,5,0,0,1,1.88-3.9l.87-.7A6,6,0,0,0,13,26.08V18a11,11,0,0,1,22,0v8.08a6,6,0,0,0,2.25,4.69l.87.7A5,5,0,0,1,40,35.36Z"
8
- ></path>
9
- </g>
10
- </svg>
@@ -1,21 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { BeaconIconAlertComponent } from './beacon-icon-alert.component';
4
-
5
- describe('BeaconIconAlertComponent', () => {
6
- let component: BeaconIconAlertComponent;
7
- let fixture: ComponentFixture<BeaconIconAlertComponent>;
8
-
9
- beforeEach(() => {
10
- TestBed.configureTestingModule({
11
- declarations: [BeaconIconAlertComponent]
12
- });
13
- fixture = TestBed.createComponent(BeaconIconAlertComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
- });
@@ -1,10 +0,0 @@
1
- import { Component } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'app-beacon-icon-alert',
5
- templateUrl: './beacon-icon-alert.component.html',
6
- styleUrls: ['./beacon-icon-alert.component.css']
7
- })
8
- export class BeaconIconAlertComponent {
9
-
10
- }
@@ -1,6 +0,0 @@
1
- svg {
2
- width: 22px !important;
3
- height: 22px !important;
4
- margin-right: 7px !important;
5
- margin-top: -2px;
6
- }
@@ -1,13 +0,0 @@
1
- <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g id="SVGRepo_bgCarrier" stroke-width="0"></g>
3
- <g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
4
- <g id="SVGRepo_iconCarrier">
5
- <path
6
- d="M11.3586 20.6831C11.5639 20.7901 11.6666 20.8436 11.809 20.8713C11.92 20.8929 12.08 20.8929 12.191 20.8713C12.3334 20.8436 12.4361 20.7901 12.6414 20.6831C14.54 19.6939 20 16.4612 20 12.0001V8.21772C20 7.4182 20 7.01845 19.8692 6.67482C19.7537 6.37126 19.566 6.10039 19.3223 5.88564C19.0465 5.64255 18.6722 5.50219 17.9236 5.22146L12.5618 3.21079C12.3539 3.13283 12.25 3.09385 12.143 3.07839C12.0482 3.06469 11.9518 3.06469 11.857 3.07839C11.75 3.09385 11.6461 3.13283 11.4382 3.21079L6.0764 5.22146C5.3278 5.50219 4.9535 5.64255 4.67766 5.88564C4.43398 6.10039 4.24627 6.37126 4.13076 6.67482C4 7.01845 4 7.4182 4 8.21772V12.0001C4 16.4612 9.45996 19.6939 11.3586 20.6831Z"
7
- stroke="currentColor"
8
- stroke-width="2"
9
- stroke-linecap="round"
10
- stroke-linejoin="round"
11
- ></path>
12
- </g>
13
- </svg>
@@ -1,21 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { BeaconIconErrorComponent } from './beacon-icon-error.component';
4
-
5
- describe('BeaconIconErrorComponent', () => {
6
- let component: BeaconIconErrorComponent;
7
- let fixture: ComponentFixture<BeaconIconErrorComponent>;
8
-
9
- beforeEach(() => {
10
- TestBed.configureTestingModule({
11
- declarations: [BeaconIconErrorComponent]
12
- });
13
- fixture = TestBed.createComponent(BeaconIconErrorComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
- });
@@ -1,10 +0,0 @@
1
- import { Component } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'app-beacon-icon-error',
5
- templateUrl: './beacon-icon-error.component.html',
6
- styleUrls: ['./beacon-icon-error.component.css']
7
- })
8
- export class BeaconIconErrorComponent {
9
-
10
- }
@@ -1,6 +0,0 @@
1
- svg {
2
- width: 22px !important;
3
- height: 22px !important;
4
- margin-right: 7px !important;
5
- margin-top: -2px;
6
- }
@@ -1,14 +0,0 @@
1
- <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g id="SVGRepo_bgCarrier" stroke-width="0"></g>
3
- <g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
4
- <g id="SVGRepo_iconCarrier">
5
- <path
6
- d="M10 22H14M5 9C5 5.13401 8.13401 2 12 2C15.866 2 19 5.13401 19 9C19 11.3787 17.8135 13.4694 16 14.7344L15.4582 17.3004C15.3097 18.2778 14.4695 19 13.4809 19H10.5191C9.53052 19 8.69027 18.2778 8.54177 17.3004L8 14.7453C6.18652 13.4804 5 11.3787 5 9Z"
7
- stroke="currentColor"
8
- stroke-width="2"
9
- stroke-linecap="round"
10
- stroke-linejoin="round"
11
- ></path>
12
- <path d="M8 15H16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
13
- </g>
14
- </svg>
@@ -1,21 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { BeaconIconInfoComponent } from './beacon-icon-info.component';
4
-
5
- describe('BeaconIconInfoComponent', () => {
6
- let component: BeaconIconInfoComponent;
7
- let fixture: ComponentFixture<BeaconIconInfoComponent>;
8
-
9
- beforeEach(() => {
10
- TestBed.configureTestingModule({
11
- declarations: [BeaconIconInfoComponent]
12
- });
13
- fixture = TestBed.createComponent(BeaconIconInfoComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
- });
@@ -1,10 +0,0 @@
1
- import { Component } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'app-beacon-icon-info',
5
- templateUrl: './beacon-icon-info.component.html',
6
- styleUrls: ['./beacon-icon-info.component.css']
7
- })
8
- export class BeaconIconInfoComponent {
9
-
10
- }
@@ -1,6 +0,0 @@
1
- svg {
2
- width: 22px !important;
3
- height: 22px !important;
4
- margin-right: 7px !important;
5
- margin-top: -2px;
6
- }
@@ -1,13 +0,0 @@
1
- <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g id="SVGRepo_bgCarrier" stroke-width="0"></g>
3
- <g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
4
- <g id="SVGRepo_iconCarrier">
5
- <path
6
- d="M8.5 12.5L10.0089 14.0089C10.3526 14.3526 10.5245 14.5245 10.7198 14.5822C10.8914 14.6328 11.0749 14.6245 11.2412 14.5585C11.4305 14.4834 11.5861 14.2967 11.8973 13.9232L16 9M16.3287 4.75855C17.0676 4.77963 17.8001 5.07212 18.364 5.636C18.9278 6.19989 19.2203 6.9324 19.2414 7.67121C19.2623 8.40232 19.2727 8.76787 19.2942 8.85296C19.3401 9.0351 19.2867 8.90625 19.383 9.06752C19.428 9.14286 19.6792 9.40876 20.1814 9.94045C20.6889 10.4778 21 11.2026 21 12C21 12.7974 20.6889 13.5222 20.1814 14.0595C19.6792 14.5912 19.428 14.8571 19.383 14.9325C19.2867 15.0937 19.3401 14.9649 19.2942 15.147C19.2727 15.2321 19.2623 15.5977 19.2414 16.3288C19.2203 17.0676 18.9278 17.8001 18.364 18.364C17.8001 18.9279 17.0676 19.2204 16.3287 19.2414C15.5976 19.2623 15.2321 19.2727 15.147 19.2942C14.9649 19.3401 15.0937 19.2868 14.9325 19.3831C14.8571 19.4281 14.5912 19.6792 14.0595 20.1814C13.5222 20.6889 12.7974 21 12 21C11.2026 21 10.4778 20.6889 9.94047 20.1814C9.40874 19.6792 9.14287 19.4281 9.06753 19.3831C8.90626 19.2868 9.0351 19.3401 8.85296 19.2942C8.76788 19.2727 8.40225 19.2623 7.67121 19.2414C6.93238 19.2204 6.19986 18.9279 5.63597 18.364C5.07207 17.8001 4.77959 17.0676 4.75852 16.3287C4.73766 15.5976 4.72724 15.2321 4.70578 15.147C4.65985 14.9649 4.71322 15.0937 4.61691 14.9324C4.57192 14.8571 4.32082 14.5912 3.81862 14.0595C3.31113 13.5222 3 12.7974 3 12C3 11.2026 3.31113 10.4778 3.81862 9.94048C4.32082 9.40876 4.57192 9.14289 4.61691 9.06755C4.71322 8.90628 4.65985 9.03512 4.70578 8.85299C4.72724 8.7679 4.73766 8.40235 4.75852 7.67126C4.77959 6.93243 5.07207 6.1999 5.63597 5.636C6.19986 5.07211 6.93238 4.77963 7.67121 4.75855C8.40232 4.73769 8.76788 4.72727 8.85296 4.70581C9.0351 4.65988 8.90626 4.71325 9.06753 4.61694C9.14287 4.57195 9.40876 4.32082 9.94047 3.81863C10.4778 3.31113 11.2026 3 12 3C12.7974 3 13.5222 3.31114 14.0595 3.81864C14.5913 4.32084 14.8571 4.57194 14.9325 4.61693C15.0937 4.71324 14.9649 4.65988 15.147 4.70581C15.2321 4.72726 15.5976 4.73769 16.3287 4.75855Z"
7
- stroke="currentColor"
8
- stroke-width="2"
9
- stroke-linecap="round"
10
- stroke-linejoin="round"
11
- ></path>
12
- </g>
13
- </svg>
@@ -1,21 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { BeaconIconSuccessComponent } from './beacon-icon-success.component';
4
-
5
- describe('BeaconIconSuccessComponent', () => {
6
- let component: BeaconIconSuccessComponent;
7
- let fixture: ComponentFixture<BeaconIconSuccessComponent>;
8
-
9
- beforeEach(() => {
10
- TestBed.configureTestingModule({
11
- declarations: [BeaconIconSuccessComponent]
12
- });
13
- fixture = TestBed.createComponent(BeaconIconSuccessComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
- });
@@ -1,9 +0,0 @@
1
- import { Component } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'app-beacon-icon-success',
5
- templateUrl: './beacon-icon-success.component.html',
6
- styleUrls: ['./beacon-icon-success.component.css']
7
- })
8
- export class BeaconIconSuccessComponent {
9
- }
@@ -1,6 +0,0 @@
1
- svg {
2
- width: 22px !important;
3
- height: 22px !important;
4
- margin-right: 7px !important;
5
- margin-top: -2px;
6
- }
@@ -1,15 +0,0 @@
1
- <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g id="SVGRepo_bgCarrier" stroke-width="0"></g>
3
- <g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
4
- <g id="SVGRepo_iconCarrier">
5
- <path d="M12 7.75V13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
6
- <path
7
- d="M21.08 8.58003V15.42C21.08 16.54 20.48 17.58 19.51 18.15L13.57 21.58C12.6 22.14 11.4 22.14 10.42 21.58L4.47998 18.15C3.50998 17.59 2.90997 16.55 2.90997 15.42V8.58003C2.90997 7.46003 3.50998 6.41999 4.47998 5.84999L10.42 2.42C11.39 1.86 12.59 1.86 13.57 2.42L19.51 5.84999C20.48 6.41999 21.08 7.45003 21.08 8.58003Z"
8
- stroke="currentColor"
9
- stroke-width="1.5"
10
- stroke-linecap="round"
11
- stroke-linejoin="round"
12
- ></path>
13
- <path d="M12 16.2V16.2999" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
14
- </g>
15
- </svg>
@@ -1,21 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { BeaconIconWarningComponent } from './beacon-icon-warning.component';
4
-
5
- describe('BeaconIconWarningComponent', () => {
6
- let component: BeaconIconWarningComponent;
7
- let fixture: ComponentFixture<BeaconIconWarningComponent>;
8
-
9
- beforeEach(() => {
10
- TestBed.configureTestingModule({
11
- declarations: [BeaconIconWarningComponent]
12
- });
13
- fixture = TestBed.createComponent(BeaconIconWarningComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
- });
@@ -1,10 +0,0 @@
1
- import { Component } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'app-beacon-icon-warning',
5
- templateUrl: './beacon-icon-warning.component.html',
6
- styleUrls: ['./beacon-icon-warning.component.css']
7
- })
8
- export class BeaconIconWarningComponent {
9
-
10
- }
package/index.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './beacon-notify.module'
2
- export * from './beacon-notify.service'
@@ -1,8 +0,0 @@
1
- import { BeaconTypeResolvePipe } from './beacon-type-resolve.pipe';
2
-
3
- describe('BeaconTypeResolvePipe', () => {
4
- it('create an instance', () => {
5
- const pipe = new BeaconTypeResolvePipe();
6
- expect(pipe).toBeTruthy();
7
- });
8
- });
@@ -1,33 +0,0 @@
1
- import { Pipe, PipeTransform } from '@angular/core';
2
- import { BeaconNotifyService } from '../';
3
-
4
- @Pipe({
5
- name: 'beaconTypeResolve'
6
- })
7
- export class BeaconTypeResolvePipe implements PipeTransform {
8
- constructor(private beaconService: BeaconNotifyService){}
9
-
10
- transform(value: string, ...args: string[]): boolean {
11
- let status: boolean = false
12
- switch (args[0]) {
13
- case 'alert':
14
- status = value == this.beaconService.getBeaconDefaultIconKeys[0]
15
- break
16
- case 'error':
17
- status = value == this.beaconService.getBeaconDefaultIconKeys[1]
18
- break
19
- case 'info':
20
- status = value == this.beaconService.getBeaconDefaultIconKeys[2]
21
- break
22
- case 'success':
23
- status = value == this.beaconService.getBeaconDefaultIconKeys[3]
24
- break
25
- case 'warning':
26
- status = value == this.beaconService.getBeaconDefaultIconKeys[4]
27
- break
28
- }
29
-
30
- return status
31
- }
32
-
33
- }
@@ -1,8 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import { IBeaconGlobalConfig } from '../interfaces';
3
-
4
- export const BEACON_GLOBAL_CONFIG = new InjectionToken<IBeaconGlobalConfig>('IBeaconGlobalConfig')
5
-
6
- export const BEACON_OVERLAY_COLOR = '#000000DD'
7
-
8
- export const BEACON_OVERLAY_ID = 'beacon-notify-focus-overlay_x'
package/types/index.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from './interfaces/'
2
- export * from './constants/'
3
-
@@ -1,110 +0,0 @@
1
- export interface IBeaconType {
2
- alert?: string
3
- error?: string
4
- info?: string
5
- success?: string
6
- warning?: string
7
- }
8
-
9
- export interface IBeaconIconConfig {
10
- icon?: string
11
- fontIcon?: true
12
- }
13
-
14
- export interface IBeaconTypeIcon {
15
- alert?: IBeaconIconConfig
16
- error?: IBeaconIconConfig
17
- info?: IBeaconIconConfig
18
- success?: IBeaconIconConfig
19
- warning?: IBeaconIconConfig
20
- }
21
-
22
- export interface IBeaconPositionConfig {
23
- leftRight?: 'left' | 'right'
24
- topBottom?: 'top' | 'bottom'
25
- }
26
-
27
- export interface IBeaconConfig {
28
- bid: string
29
- mid?: string
30
- type: string
31
- icon: string
32
- svgIcon?: any
33
- fontIcon?: true,
34
- title: string
35
- body: string
36
- bodyHtml: any
37
- signature?: string
38
- static?: true | number
39
- fixed?: true
40
- focus?: true
41
- shine?: true
42
- preventClickClose?: true
43
- blockOthers?: true
44
- duplicate?: true
45
- styleClass?: string
46
- replacementClass?: string
47
- animationClass?: string
48
- buttons?: IBeaconButtonType
49
- overlayColor?: string
50
- noHoverEffect?: true
51
- }
52
-
53
- export interface IBeaconInlineConfig {
54
- static?: true | number
55
- fixed?: true
56
- focus?: true
57
- shine?: true
58
- preventClickClose?: true
59
- blockOthers?: true
60
- duplicate?: true
61
- icon?: string
62
- fontIcon?: true
63
- styleClass?: string
64
- replacementClass?: string
65
- animationClass?: string
66
- overlayColor?: string
67
- noHoverEffect?: true
68
- }
69
-
70
- export interface IBeaconGlobalConfig {
71
- static?: true | number
72
- fixed?: true
73
- preventClickClose?: true
74
- blockOthers?: true
75
- overlayColor?: string
76
- duplicate?: true
77
- icon?: IBeaconTypeIcon
78
- styleClass?: IBeaconType
79
- replacementClass?: IBeaconType
80
- animationClass?: IBeaconType
81
- position?: IBeaconPositionConfig
82
- noHoverEffect?: true
83
- }
84
-
85
- export interface IBeaconEvent {
86
- on: boolean
87
- off: boolean
88
- }
89
-
90
- export interface IBeaconWatchedEvent extends IBeaconEvent {
91
- id: string | null
92
- type: string
93
- }
94
-
95
- export interface IBeaconEventMessage {
96
- [key: string]: string | boolean
97
- }
98
-
99
- export interface IBeaconButtonType {
100
- one?: IBeaconButtonConfig
101
- two?: IBeaconButtonConfig
102
- }
103
-
104
- export interface IBeaconButtonConfig {
105
- text: string
106
- canDismiss?: boolean | null
107
- callback?: any
108
- callbackArgs?: any[] | null
109
- position?: string
110
- }