@js-smart/ng-kit 20.6.1 → 20.6.2-beta.1

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 (79) hide show
  1. package/eslint.config.js +18 -0
  2. package/karma.conf.js +35 -0
  3. package/ng-package.json +11 -0
  4. package/package.json +2 -13
  5. package/src/assets/app-buttons.css +33 -0
  6. package/src/assets/app-mat-snack-bar.css +89 -0
  7. package/src/assets/app-variables.css +10 -0
  8. package/src/assets/general.scss +77 -0
  9. package/src/assets/styles.scss +5 -0
  10. package/src/lib/components/alert/alert.component.html +12 -0
  11. package/src/lib/components/alert/alert.component.scss +5 -0
  12. package/src/lib/components/alert/alert.component.ts +105 -0
  13. package/src/lib/components/autocomplete/autocomplete.component.html +42 -0
  14. package/src/lib/components/autocomplete/autocomplete.component.ts +207 -0
  15. package/src/lib/components/buttons/base-button/base-button.component.html +0 -0
  16. package/src/lib/components/buttons/base-button/base-button.component.ts +86 -0
  17. package/src/lib/components/buttons/base-button/base-button.directive.ts +87 -0
  18. package/src/lib/components/buttons/bs-link-button/bs-link-button.component.ts +37 -0
  19. package/src/lib/components/buttons/bs-link-button/bs-link-button.directive.ts +28 -0
  20. package/src/lib/components/buttons/close-button/close-button.directive.ts +12 -0
  21. package/src/lib/components/buttons/delete-button/delete-button.component.ts +42 -0
  22. package/src/lib/components/buttons/delete-button/delete-button.directive.ts +15 -0
  23. package/src/lib/components/buttons/edit-bs-button/edit-bs-button.component.ts +39 -0
  24. package/src/lib/components/buttons/edit-bs-button/edit-bs-button.directive.ts +37 -0
  25. package/src/lib/components/buttons/edit-button/edit-button.component.ts +37 -0
  26. package/src/lib/components/buttons/edit-button/edit-button.directive.ts +15 -0
  27. package/src/lib/components/buttons/edit-svg-icon-button/edit-svg-icon-button.component.ts +37 -0
  28. package/src/lib/components/buttons/edit-svg-icon-button/edit-svg-icon-button.directive.ts +39 -0
  29. package/src/lib/components/buttons/excel-export-button/excel-export-button.component.ts +23 -0
  30. package/src/lib/components/buttons/excel-export-button/excel-export-button.directive.ts +23 -0
  31. package/src/lib/components/buttons/manage-button/manage-button.component.ts +35 -0
  32. package/src/lib/components/buttons/manage-button/manage-button.directive.ts +15 -0
  33. package/src/lib/components/buttons/pdf-export-button/pdf-export-button.component.ts +20 -0
  34. package/src/lib/components/buttons/pdf-export-button/pdf-export-button.directive.ts +22 -0
  35. package/src/lib/components/buttons/primary-button/primary-button.component.ts +43 -0
  36. package/src/lib/components/buttons/primary-button/primary-button.directive.ts +16 -0
  37. package/src/lib/components/buttons/save-primary-button/save-primary-button.component.ts +43 -0
  38. package/src/lib/components/buttons/save-primary-button/save-primary-button.directive.ts +16 -0
  39. package/src/lib/components/buttons/search-button/search-button.component.ts +41 -0
  40. package/src/lib/components/buttons/success-button/success-button.component.ts +41 -0
  41. package/src/lib/components/buttons/success-button/success-button.directive.ts +15 -0
  42. package/src/lib/components/buttons/view-button/view-button.component.ts +32 -0
  43. package/src/lib/components/buttons/view-button/view-button.directive.ts +14 -0
  44. package/src/lib/components/buttons/view-primary-button/view-primary-button.component.ts +37 -0
  45. package/src/lib/components/buttons/view-primary-button/view-primary-button.directive.ts +15 -0
  46. package/src/lib/components/confirm-dialog/confirm-dialog.component.ts +56 -0
  47. package/src/lib/components/ngx-spinner/ngx-spinner.component.css +169 -0
  48. package/src/lib/components/ngx-spinner/ngx-spinner.component.html +24 -0
  49. package/src/lib/components/ngx-spinner/ngx-spinner.component.spec.ts +186 -0
  50. package/src/lib/components/ngx-spinner/ngx-spinner.component.ts +199 -0
  51. package/src/lib/components/ngx-spinner/ngx-spinner.enum.ts +45 -0
  52. package/src/lib/components/ngx-spinner/ngx-spinner.service.ts +66 -0
  53. package/src/lib/components/ngx-spinner/safe-html.pipe.ts +17 -0
  54. package/src/lib/components/snack-bar/error-snack-bar/error-snack-bar.component.ts +36 -0
  55. package/src/lib/components/snack-bar/success-snack-bar/success-snack-bar.component.ts +35 -0
  56. package/src/lib/components/spinner/spinner.component.html +11 -0
  57. package/src/lib/components/spinner/spinner.component.scss +18 -0
  58. package/src/lib/components/spinner/spinner.component.ts +31 -0
  59. package/src/lib/directives/ngx-print/ngx-print.directive.ts +281 -0
  60. package/src/lib/directives/ngx-print/print-options.ts +16 -0
  61. package/src/lib/directives/prevent-multiple-clicks/prevent-multiple-clicks.directive.spec.ts +99 -0
  62. package/src/lib/directives/prevent-multiple-clicks/prevent-multiple-clicks.directive.ts +36 -0
  63. package/src/lib/services/mat-snack-bar.service.ts +102 -0
  64. package/src/lib/store/entity-store.spec.ts +128 -0
  65. package/src/lib/store/entity-store.ts +88 -0
  66. package/src/lib/store/store.spec.ts +47 -0
  67. package/src/lib/store/store.ts +44 -0
  68. package/src/lib/svg-icons/edit-solid-svg/edit-solid-svg.component.ts +20 -0
  69. package/src/lib/types/id-type.ts +3 -0
  70. package/src/lib/types/progress-state.ts +7 -0
  71. package/src/lib/util/progress-util.ts +84 -0
  72. package/src/public-api.ts +64 -0
  73. package/test.ts +11 -0
  74. package/tsconfig.lib.json +12 -0
  75. package/tsconfig.lib.prod.json +10 -0
  76. package/tsconfig.spec.json +10 -0
  77. package/fesm2022/js-smart-ng-kit.mjs +0 -2443
  78. package/fesm2022/js-smart-ng-kit.mjs.map +0 -1
  79. package/index.d.ts +0 -1100
@@ -0,0 +1,43 @@
1
+ import { Component, input } from '@angular/core';
2
+ import { MatButton } from '@angular/material/button';
3
+ import { MatIcon } from '@angular/material/icon';
4
+ import { BaseButtonComponent } from '../base-button/base-button.component';
5
+
6
+ @Component({
7
+ selector: 'primary-button',
8
+ imports: [MatButton, MatIcon],
9
+ template: `
10
+ <button
11
+ mat-raised-button
12
+ class="btn {{ classes() }}"
13
+ (click)="onClick.emit($event)"
14
+ (focus)="onFocus.emit($event)"
15
+ (blur)="onBlur.emit($event)"
16
+ (keydown)="onKeyDown.emit($event)"
17
+ (keyup)="onKeyUp.emit($event)"
18
+ [disabled]="disabled() || loading()"
19
+ [type]="type()"
20
+ [style]="style()"
21
+ [attr.data-cy]="'primary-button'">
22
+ @if (loading()) {
23
+ <span aria-hidden="true" class="spinner-border spinner-border-sm" role="status"></span>
24
+ }
25
+ @if (!loading() && showIcon()) {
26
+ <mat-icon>{{ icon() }}</mat-icon>
27
+ }
28
+ {{ loading() ? loadingLabel() : label() }}
29
+ </button>
30
+ `,
31
+ styleUrls: ['../../../../assets/app-buttons.css'],
32
+ })
33
+ export class PrimaryButtonComponent extends BaseButtonComponent {
34
+ override loadingLabel = input('Saving...');
35
+ override label = input('Save');
36
+ override icon = input('save');
37
+ override showIcon = input(false);
38
+ override classes = input('btn-primary primary-button');
39
+
40
+ constructor() {
41
+ super();
42
+ }
43
+ }
@@ -0,0 +1,16 @@
1
+ import { Directive, input } from '@angular/core';
2
+ import { BaseButtonDirective } from '../base-button/base-button.directive';
3
+
4
+ @Directive({
5
+ selector: '[primaryButton]',
6
+ })
7
+ export class PrimaryButtonDirective extends BaseButtonDirective {
8
+ override icon = input<string>('save');
9
+ override loadingLabel = input<string>('Saving...');
10
+
11
+ constructor() {
12
+ super();
13
+ this.elementRef.nativeElement.classList.add('btn-primary');
14
+ this.elementRef.nativeElement.classList.add('primary-button');
15
+ }
16
+ }
@@ -0,0 +1,43 @@
1
+ import { Component, input } from '@angular/core';
2
+ import { BaseButtonComponent } from '../base-button/base-button.component';
3
+
4
+ import { MatIcon } from '@angular/material/icon';
5
+ import { MatButton } from '@angular/material/button';
6
+
7
+ @Component({
8
+ selector: 'save-primary-button',
9
+ imports: [MatButton, MatIcon],
10
+ template: `
11
+ <button
12
+ mat-raised-button
13
+ class="btn {{ classes() }}"
14
+ (click)="onClick.emit($event)"
15
+ (focus)="onFocus.emit($event)"
16
+ (blur)="onBlur.emit($event)"
17
+ (keydown)="onKeyDown.emit($event)"
18
+ (keyup)="onKeyUp.emit($event)"
19
+ [disabled]="disabled() || loading()"
20
+ [type]="type()"
21
+ [style]="style()"
22
+ [attr.data-cy]="'save-primary-button'">
23
+ @if (loading()) {
24
+ <span aria-hidden="true" class="spinner-border spinner-border-sm" role="status"></span>
25
+ }
26
+ @if (!loading()) {
27
+ <mat-icon>{{ icon() }}</mat-icon>
28
+ }
29
+ {{ loading() ? loadingLabel() : label() }}
30
+ </button>
31
+ `,
32
+ styleUrls: ['../../../../assets/app-buttons.css'],
33
+ })
34
+ export class SavePrimaryButtonComponent extends BaseButtonComponent {
35
+ override loadingLabel = input('Saving...');
36
+ override label = input('Save');
37
+ override icon = input('save');
38
+ override classes = input('btn-primary primary-button');
39
+
40
+ constructor() {
41
+ super();
42
+ }
43
+ }
@@ -0,0 +1,16 @@
1
+ import { Directive, input } from '@angular/core';
2
+ import { BaseButtonDirective } from '../base-button/base-button.directive';
3
+
4
+ @Directive({
5
+ selector: '[savePrimaryButton]',
6
+ })
7
+ export class SavePrimaryButtonDirective extends BaseButtonDirective {
8
+ override icon = input<string>('save');
9
+ override loadingLabel = input<string>('Saving...');
10
+
11
+ constructor() {
12
+ super();
13
+ this.elementRef.nativeElement.classList.add('btn-primary');
14
+ this.elementRef.nativeElement.classList.add('primary-button');
15
+ }
16
+ }
@@ -0,0 +1,41 @@
1
+ import { Component, input } from '@angular/core';
2
+
3
+ import { MatIconModule } from '@angular/material/icon';
4
+ import { MatButtonModule } from '@angular/material/button';
5
+ import { BaseButtonComponent } from '../base-button/base-button.component';
6
+
7
+ @Component({
8
+ selector: 'search-button',
9
+ imports: [MatButtonModule, MatIconModule],
10
+ template: `
11
+ <button
12
+ class="btn btn-primary primary-button {{ loading() || disabled() ? 'disabled' : '' }}"
13
+ (click)="onClick.emit($event)"
14
+ (focus)="onFocus.emit($event)"
15
+ (blur)="onBlur.emit($event)"
16
+ (keydown)="onKeyDown.emit($event)"
17
+ (keyup)="onKeyUp.emit($event)"
18
+ mat-raised-button
19
+ type="{{ type() }}"
20
+ data-cy="primary-button">
21
+ @if (loading()) {
22
+ <span aria-hidden="true" class="spinner-border spinner-border-sm" role="status"></span>
23
+ }
24
+ @if (!loading()) {
25
+ <mat-icon>{{ icon() }}</mat-icon>
26
+ }
27
+ {{ loading() ? loadingLabel() : label() }}
28
+ </button>
29
+ `,
30
+ styleUrls: ['../../../../assets/app-buttons.css'],
31
+ })
32
+ export class SearchButtonComponent extends BaseButtonComponent {
33
+ override loadingLabel = input('Searching...');
34
+ override label = input('Search');
35
+ override icon = input('search');
36
+ override classes = input('btn-primary primary-button');
37
+
38
+ constructor() {
39
+ super();
40
+ }
41
+ }
@@ -0,0 +1,41 @@
1
+ import { Component, input } from '@angular/core';
2
+ import { BaseButtonComponent } from '../base-button/base-button.component';
3
+ import { MatButton } from '@angular/material/button';
4
+ import { MatIcon } from '@angular/material/icon';
5
+
6
+ @Component({
7
+ selector: 'success-button',
8
+ imports: [MatButton, MatIcon],
9
+ template: `
10
+ <button
11
+ mat-raised-button
12
+ class="btn {{ classes() }}"
13
+ (click)="onClick.emit($event)"
14
+ (keydown)="onKeyDown.emit($event)"
15
+ (keyup)="onKeyUp.emit($event)"
16
+ (focus)="onFocus.emit($event)"
17
+ (blur)="onBlur.emit($event)"
18
+ [disabled]="disabled() || loading()"
19
+ [type]="type()"
20
+ [style]="style()"
21
+ [attr.data-cy]="'success-button'">
22
+ @if (loading()) {
23
+ <span aria-hidden="true" class="spinner-border spinner-border-sm" role="status"></span>
24
+ }
25
+ @if (!loading()) {
26
+ <mat-icon>{{ icon() }}</mat-icon>
27
+ }
28
+ {{ loading() ? loadingLabel() : label() }}
29
+ </button>
30
+ `,
31
+ })
32
+ export class SuccessButtonComponent extends BaseButtonComponent {
33
+ override loadingLabel = input('Updating...');
34
+ override label = input('Update');
35
+ override icon = input('save');
36
+ override classes = input('success-button');
37
+
38
+ constructor() {
39
+ super();
40
+ }
41
+ }
@@ -0,0 +1,15 @@
1
+ import { Directive, input } from '@angular/core';
2
+ import { BaseButtonDirective } from '../base-button/base-button.directive';
3
+
4
+ @Directive({
5
+ selector: '[successButton]',
6
+ })
7
+ export class SuccessButtonDirective extends BaseButtonDirective {
8
+ override icon = input<string>('save');
9
+ override loadingLabel = input<string>('Updating...');
10
+
11
+ constructor() {
12
+ super();
13
+ this.elementRef.nativeElement.classList.add('success-button');
14
+ }
15
+ }
@@ -0,0 +1,32 @@
1
+ import { Component, input } from '@angular/core';
2
+ import { MatIcon } from '@angular/material/icon';
3
+ import { MatButton } from '@angular/material/button';
4
+ import { BaseButtonComponent } from '../base-button/base-button.component';
5
+
6
+ @Component({
7
+ selector: 'view-button',
8
+ imports: [MatButton, MatIcon],
9
+ template: `
10
+ <button
11
+ color="primary"
12
+ (click)="onClick.emit($event)"
13
+ (focus)="onFocus.emit($event)"
14
+ (blur)="onBlur.emit($event)"
15
+ (keydown)="onKeyDown.emit($event)"
16
+ (keyup)="onKeyUp.emit($event)"
17
+ [disabled]="disabled()"
18
+ mat-button>
19
+ <mat-icon>{{ icon() }}</mat-icon>
20
+ {{ label() }}
21
+ </button>
22
+ `,
23
+ styleUrls: ['../../../../assets/app-buttons.css'],
24
+ })
25
+ export class ViewButtonComponent extends BaseButtonComponent {
26
+ override label = input('View');
27
+ override icon = input('visibility');
28
+
29
+ constructor() {
30
+ super();
31
+ }
32
+ }
@@ -0,0 +1,14 @@
1
+ import { Directive, input } from '@angular/core';
2
+ import { BaseButtonDirective } from '../base-button/base-button.directive';
3
+
4
+ @Directive({
5
+ selector: '[viewButton]',
6
+ })
7
+ export class ViewButtonDirective extends BaseButtonDirective {
8
+ override icon = input<string>('visibility');
9
+ override loadingLabel = input<string>('Loading...');
10
+
11
+ constructor() {
12
+ super();
13
+ }
14
+ }
@@ -0,0 +1,37 @@
1
+ import { Component, input } from '@angular/core';
2
+
3
+ import { MatButton } from '@angular/material/button';
4
+ import { MatIcon } from '@angular/material/icon';
5
+ import { BaseButtonComponent } from '../base-button/base-button.component';
6
+
7
+ @Component({
8
+ selector: 'view-primary-button',
9
+ imports: [MatButton, MatIcon],
10
+ template: `
11
+ <button
12
+ mat-raised-button
13
+ class="btn {{ classes() }}"
14
+ (click)="onClick.emit($event)"
15
+ (focus)="onFocus.emit($event)"
16
+ (blur)="onBlur.emit($event)"
17
+ (keydown)="onKeyDown.emit($event)"
18
+ (keyup)="onKeyUp.emit($event)"
19
+ [disabled]="disabled()"
20
+ [type]="type()"
21
+ [style]="style()"
22
+ [attr.data-cy]="'view-button'">
23
+ <mat-icon>{{ icon() }}</mat-icon>
24
+ {{ label() }}
25
+ </button>
26
+ `,
27
+ styleUrls: ['../../../../assets/app-buttons.css'],
28
+ })
29
+ export class ViewPrimaryButtonComponent extends BaseButtonComponent {
30
+ override label = input('View');
31
+ override icon = input('visibility');
32
+ override classes = input('btn-primary primary-button');
33
+
34
+ constructor() {
35
+ super();
36
+ }
37
+ }
@@ -0,0 +1,15 @@
1
+ import { Directive, input } from '@angular/core';
2
+ import { BaseButtonDirective } from '../base-button/base-button.directive';
3
+
4
+ @Directive({
5
+ selector: '[viewPrimaryButton]',
6
+ })
7
+ export class ViewPrimaryButtonDirective extends BaseButtonDirective {
8
+ override icon = input<string>('visibility');
9
+
10
+ constructor() {
11
+ super();
12
+ this.elementRef.nativeElement.classList.add('btn-primary');
13
+ this.elementRef.nativeElement.classList.add('primary-button');
14
+ }
15
+ }
@@ -0,0 +1,56 @@
1
+ import { Component, Inject } from '@angular/core';
2
+ import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
3
+ import { MatButtonModule } from '@angular/material/button';
4
+ import { MatDividerModule } from '@angular/material/divider';
5
+
6
+ @Component({
7
+ selector: 'app-confirm-dialog',
8
+ imports: [MatButtonModule, MatDividerModule, MatDialogModule],
9
+ template: `
10
+ <div class="mat-dialog-title" style="text-align: center">
11
+ <h3 class="m-3 mat-headline-5 ">{{ title }}</h3>
12
+ </div>
13
+
14
+ <mat-divider></mat-divider>
15
+ <div mat-dialog-content style="margin: 20px">
16
+ <p>{{ message }}</p>
17
+ </div>
18
+
19
+ <div align="end" class="modal-footer" mat-dialog-actions>
20
+ <button (click)="onDismiss()" mat-raised-button>No</button>
21
+ <button (click)="onConfirm()" class="primary-button" mat-raised-button>Yes</button>
22
+ </div>
23
+ `,
24
+ styles: [],
25
+ })
26
+ export class ConfirmDialogComponent {
27
+ title: string;
28
+ message: string;
29
+
30
+ constructor(
31
+ @Inject(MAT_DIALOG_DATA) public data: ConfirmDialogData,
32
+ public dialogRef: MatDialogRef<ConfirmDialogComponent>,
33
+ ) {
34
+ // Update view with given values
35
+ this.title = data.title;
36
+ this.message = data.message;
37
+ }
38
+
39
+ onDismiss() {
40
+ // Close the dialog, return true
41
+ this.dialogRef.close(false);
42
+ }
43
+
44
+ onConfirm() {
45
+ // Close the dialog, return true
46
+ this.dialogRef.close(true);
47
+ }
48
+ }
49
+
50
+ /**
51
+ * Class to represent confirm dialog model.
52
+ */
53
+ export interface ConfirmDialogData {
54
+ title: string;
55
+ message: string;
56
+ }
@@ -0,0 +1,169 @@
1
+ /*!
2
+ * Load Awesome v1.1.0 (http://github.danielcardoso.net/load-awesome/)
3
+ * Copyright 2015 Daniel Cardoso <@DanielCardoso>
4
+ * Licensed under MIT
5
+ */
6
+ .la-ball-clip-rotate,
7
+ .la-ball-clip-rotate > div {
8
+ position: relative;
9
+ -webkit-box-sizing: border-box;
10
+ -moz-box-sizing: border-box;
11
+ box-sizing: border-box;
12
+ }
13
+
14
+ .la-ball-clip-rotate {
15
+ display: block;
16
+ font-size: 0;
17
+ color: #fff;
18
+ }
19
+
20
+ .la-ball-clip-rotate.la-dark {
21
+ color: #333;
22
+ }
23
+
24
+ .la-ball-clip-rotate > div {
25
+ display: inline-block;
26
+ float: none;
27
+ background-color: currentColor;
28
+ border: 0 solid currentColor;
29
+ }
30
+
31
+ .la-ball-clip-rotate {
32
+ width: 32px;
33
+ height: 32px;
34
+ }
35
+
36
+ .la-ball-clip-rotate > div {
37
+ width: 32px;
38
+ height: 32px;
39
+ background: transparent;
40
+ border-width: 2px;
41
+ border-bottom-color: transparent;
42
+ border-radius: 100%;
43
+ -webkit-animation: ball-clip-rotate 0.75s linear infinite;
44
+ -moz-animation: ball-clip-rotate 0.75s linear infinite;
45
+ -o-animation: ball-clip-rotate 0.75s linear infinite;
46
+ animation: ball-clip-rotate 0.75s linear infinite;
47
+ }
48
+
49
+ .la-ball-clip-rotate.la-sm {
50
+ width: 16px;
51
+ height: 16px;
52
+ }
53
+
54
+ .la-ball-clip-rotate.la-sm > div {
55
+ width: 16px;
56
+ height: 16px;
57
+ border-width: 1px;
58
+ }
59
+
60
+ .la-ball-clip-rotate.la-2x {
61
+ width: 64px;
62
+ height: 64px;
63
+ }
64
+
65
+ .la-ball-clip-rotate.la-2x > div {
66
+ width: 64px;
67
+ height: 64px;
68
+ border-width: 4px;
69
+ }
70
+
71
+ .la-ball-clip-rotate.la-3x {
72
+ width: 96px;
73
+ height: 96px;
74
+ }
75
+
76
+ .la-ball-clip-rotate.la-3x > div {
77
+ width: 96px;
78
+ height: 96px;
79
+ border-width: 6px;
80
+ }
81
+
82
+ @-webkit-keyframes ball-clip-rotate {
83
+ 0% {
84
+ -webkit-transform: rotate(0deg);
85
+ transform: rotate(0deg);
86
+ }
87
+ 50% {
88
+ -webkit-transform: rotate(180deg);
89
+ transform: rotate(180deg);
90
+ }
91
+ 100% {
92
+ -webkit-transform: rotate(360deg);
93
+ transform: rotate(360deg);
94
+ }
95
+ }
96
+
97
+ @-moz-keyframes ball-clip-rotate {
98
+ 0% {
99
+ -moz-transform: rotate(0deg);
100
+ transform: rotate(0deg);
101
+ }
102
+ 50% {
103
+ -moz-transform: rotate(180deg);
104
+ transform: rotate(180deg);
105
+ }
106
+ 100% {
107
+ -moz-transform: rotate(360deg);
108
+ transform: rotate(360deg);
109
+ }
110
+ }
111
+
112
+ @-o-keyframes ball-clip-rotate {
113
+ 0% {
114
+ -o-transform: rotate(0deg);
115
+ transform: rotate(0deg);
116
+ }
117
+ 50% {
118
+ -o-transform: rotate(180deg);
119
+ transform: rotate(180deg);
120
+ }
121
+ 100% {
122
+ -o-transform: rotate(360deg);
123
+ transform: rotate(360deg);
124
+ }
125
+ }
126
+
127
+ @keyframes ball-clip-rotate {
128
+ 0% {
129
+ -webkit-transform: rotate(0deg);
130
+ -moz-transform: rotate(0deg);
131
+ -o-transform: rotate(0deg);
132
+ transform: rotate(0deg);
133
+ }
134
+ 50% {
135
+ -webkit-transform: rotate(180deg);
136
+ -moz-transform: rotate(180deg);
137
+ -o-transform: rotate(180deg);
138
+ transform: rotate(180deg);
139
+ }
140
+ 100% {
141
+ -webkit-transform: rotate(360deg);
142
+ -moz-transform: rotate(360deg);
143
+ -o-transform: rotate(360deg);
144
+ transform: rotate(360deg);
145
+ }
146
+ }
147
+
148
+ .ngx-spinner-overlay {
149
+ position: fixed;
150
+ top: 0;
151
+ left: 0;
152
+ width: 100%;
153
+ height: 100%;
154
+ }
155
+
156
+ .ngx-spinner-overlay > div:not(.loading-text) {
157
+ top: 50%;
158
+ left: 50%;
159
+ margin: 0;
160
+ position: absolute;
161
+ transform: translate(-50%, -50%);
162
+ }
163
+
164
+ .loading-text {
165
+ position: absolute;
166
+ top: 60%;
167
+ left: 50%;
168
+ transform: translate(-50%, -60%);
169
+ }
@@ -0,0 +1,24 @@
1
+ @if (spinner.show) {
2
+ <div
3
+ #overlay
4
+ [@.disabled]="disableAnimation()"
5
+ [@fadeIn]="'in'"
6
+ [style.background-color]="spinner.bdColor"
7
+ [style.position]="spinner.fullScreen ? 'fixed' : 'absolute'"
8
+ [style.z-index]="spinner.zIndex"
9
+ class="ngx-spinner-overlay">
10
+ @if (spinner.show) {
11
+ <div [class]="spinner.class" [style.color]="spinner.color">
12
+ @for (index of spinner.divArray; track index) {
13
+ <div></div>
14
+ }
15
+ </div>
16
+ }
17
+ @if (template()) {
18
+ <div [innerHTML]="template() | safeHtml"></div>
19
+ }
20
+ <div [style.z-index]="spinner.zIndex" class="loading-text">
21
+ <ng-content></ng-content>
22
+ </div>
23
+ </div>
24
+ }