@spicainternational/ngx-sds-components 5.13.0 → 5.14.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 (86) hide show
  1. package/esm2020/public-api.mjs +5 -1
  2. package/esm2020/src/lib/color-picker/color-picker.component.mjs +11 -27
  3. package/esm2020/src/lib/date-picker/date-picker.component.mjs +3 -3
  4. package/esm2020/src/lib/date-picker/date-picker.model.mjs +1 -1
  5. package/esm2020/src/lib/ellipsis/directives/ellipsis.directive.mjs +51 -0
  6. package/esm2020/src/lib/ellipsis/ellipsis.module.mjs +26 -0
  7. package/esm2020/src/lib/ellipsis/public-api.mjs +3 -0
  8. package/esm2020/src/lib/ellipsis/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs +5 -0
  9. package/esm2020/src/lib/intersection/directives/index.mjs +2 -0
  10. package/esm2020/src/lib/intersection/directives/intersection.directive.mjs +51 -0
  11. package/esm2020/src/lib/intersection/intersection.module.mjs +22 -0
  12. package/esm2020/src/lib/intersection/public-api.mjs +4 -0
  13. package/esm2020/src/lib/intersection/services/index.mjs +2 -0
  14. package/esm2020/src/lib/intersection/services/intersection.service.mjs +54 -0
  15. package/esm2020/src/lib/intersection/spicainternational-ngx-sds-components-src-lib-intersection.mjs +5 -0
  16. package/esm2020/src/lib/keyboard-shortcut/directives/index.mjs +2 -0
  17. package/esm2020/src/lib/keyboard-shortcut/directives/keyboard-shortcut.directive.mjs +56 -0
  18. package/esm2020/src/lib/keyboard-shortcut/keyboard-shortcut.module.mjs +26 -0
  19. package/esm2020/src/lib/keyboard-shortcut/public-api.mjs +3 -0
  20. package/esm2020/src/lib/keyboard-shortcut/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs +5 -0
  21. package/esm2020/src/lib/timer/public-api.mjs +4 -0
  22. package/esm2020/src/lib/timer/services/index.mjs +2 -0
  23. package/esm2020/src/lib/timer/services/timer.service.mjs +99 -0
  24. package/esm2020/src/lib/timer/spicainternational-ngx-sds-components-src-lib-timer.mjs +5 -0
  25. package/esm2020/src/lib/timer/timer.module.mjs +36 -0
  26. package/esm2020/src/lib/timer/utils/index.mjs +2 -0
  27. package/esm2020/src/lib/timer/utils/timer.utils.mjs +97 -0
  28. package/fesm2015/spicainternational-ngx-sds-components-src-lib-color-picker.mjs +10 -26
  29. package/fesm2015/spicainternational-ngx-sds-components-src-lib-color-picker.mjs.map +1 -1
  30. package/fesm2015/spicainternational-ngx-sds-components-src-lib-date-picker.mjs +2 -2
  31. package/fesm2015/spicainternational-ngx-sds-components-src-lib-date-picker.mjs.map +1 -1
  32. package/fesm2015/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs +82 -0
  33. package/fesm2015/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs.map +1 -0
  34. package/fesm2015/spicainternational-ngx-sds-components-src-lib-intersection.mjs +129 -0
  35. package/fesm2015/spicainternational-ngx-sds-components-src-lib-intersection.mjs.map +1 -0
  36. package/fesm2015/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs +87 -0
  37. package/fesm2015/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs.map +1 -0
  38. package/fesm2015/spicainternational-ngx-sds-components-src-lib-timer.mjs +237 -0
  39. package/fesm2015/spicainternational-ngx-sds-components-src-lib-timer.mjs.map +1 -0
  40. package/fesm2015/spicainternational-ngx-sds-components.mjs +4 -0
  41. package/fesm2015/spicainternational-ngx-sds-components.mjs.map +1 -1
  42. package/fesm2020/spicainternational-ngx-sds-components-src-lib-color-picker.mjs +10 -26
  43. package/fesm2020/spicainternational-ngx-sds-components-src-lib-color-picker.mjs.map +1 -1
  44. package/fesm2020/spicainternational-ngx-sds-components-src-lib-date-picker.mjs +2 -2
  45. package/fesm2020/spicainternational-ngx-sds-components-src-lib-date-picker.mjs.map +1 -1
  46. package/fesm2020/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs +81 -0
  47. package/fesm2020/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs.map +1 -0
  48. package/fesm2020/spicainternational-ngx-sds-components-src-lib-intersection.mjs +126 -0
  49. package/fesm2020/spicainternational-ngx-sds-components-src-lib-intersection.mjs.map +1 -0
  50. package/fesm2020/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs +85 -0
  51. package/fesm2020/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs.map +1 -0
  52. package/fesm2020/spicainternational-ngx-sds-components-src-lib-timer.mjs +235 -0
  53. package/fesm2020/spicainternational-ngx-sds-components-src-lib-timer.mjs.map +1 -0
  54. package/fesm2020/spicainternational-ngx-sds-components.mjs +4 -0
  55. package/fesm2020/spicainternational-ngx-sds-components.mjs.map +1 -1
  56. package/package.json +33 -1
  57. package/public-api.d.ts +4 -0
  58. package/src/lib/color-picker/color-picker.component.d.ts +6 -2
  59. package/src/lib/date-picker/date-picker.model.d.ts +1 -0
  60. package/src/lib/ellipsis/directives/ellipsis.directive.d.ts +13 -0
  61. package/src/lib/ellipsis/ellipsis.module.d.ts +8 -0
  62. package/src/lib/ellipsis/package.json +10 -0
  63. package/src/lib/ellipsis/public-api.d.ts +2 -0
  64. package/src/lib/ellipsis/spicainternational-ngx-sds-components-src-lib-ellipsis.d.ts +5 -0
  65. package/src/lib/intersection/directives/index.d.ts +1 -0
  66. package/src/lib/intersection/directives/intersection.directive.d.ts +24 -0
  67. package/src/lib/intersection/intersection.module.d.ts +8 -0
  68. package/src/lib/intersection/package.json +10 -0
  69. package/src/lib/intersection/public-api.d.ts +3 -0
  70. package/src/lib/intersection/services/index.d.ts +1 -0
  71. package/src/lib/intersection/services/intersection.service.d.ts +19 -0
  72. package/src/lib/intersection/spicainternational-ngx-sds-components-src-lib-intersection.d.ts +5 -0
  73. package/src/lib/keyboard-shortcut/directives/index.d.ts +1 -0
  74. package/src/lib/keyboard-shortcut/directives/keyboard-shortcut.directive.d.ts +22 -0
  75. package/src/lib/keyboard-shortcut/keyboard-shortcut.module.d.ts +8 -0
  76. package/src/lib/keyboard-shortcut/package.json +10 -0
  77. package/src/lib/keyboard-shortcut/public-api.d.ts +2 -0
  78. package/src/lib/keyboard-shortcut/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.d.ts +5 -0
  79. package/src/lib/timer/package.json +10 -0
  80. package/src/lib/timer/public-api.d.ts +3 -0
  81. package/src/lib/timer/services/index.d.ts +1 -0
  82. package/src/lib/timer/services/timer.service.d.ts +78 -0
  83. package/src/lib/timer/spicainternational-ngx-sds-components-src-lib-timer.d.ts +5 -0
  84. package/src/lib/timer/timer.module.d.ts +10 -0
  85. package/src/lib/timer/utils/index.d.ts +1 -0
  86. package/src/lib/timer/utils/timer.utils.d.ts +61 -0
@@ -0,0 +1,126 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Inject, EventEmitter, Directive, Input, Output, NgModule } from '@angular/core';
3
+ import { DOCUMENT, CommonModule } from '@angular/common';
4
+ import { concat, defer, of, fromEvent, Observable, combineLatest } from 'rxjs';
5
+ import { map, mergeMap, distinctUntilChanged } from 'rxjs/operators';
6
+
7
+ class IntersectionService {
8
+ constructor(document) {
9
+ this._documentVisible$ = concat(defer(() => of(!document.hidden)), fromEvent(document, 'visibilitychange').pipe(map(e => !document.hidden)));
10
+ }
11
+ /**
12
+ * @description
13
+ * Method responsible for determining if element is visible
14
+ * on screen or not. Please
15
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API for options meaning
16
+ * @param { ElementRef } element
17
+ * @param { IntersectionObserverInit } options
18
+ * @returns { Observable<boolean> }
19
+ */
20
+ elementInSight$(element, options) {
21
+ const intersectionOptions = {
22
+ root: options?.root ?? null,
23
+ rootMargin: options?.rootMargin ?? '0px 0px 0px 0px',
24
+ threshold: options?.threshold ?? 0.5
25
+ };
26
+ const elementVisible$ = new Observable((observer) => {
27
+ const intersectionObserver = new IntersectionObserver(entries => {
28
+ observer.next(entries);
29
+ }, intersectionOptions);
30
+ intersectionObserver.observe(element.nativeElement);
31
+ return () => {
32
+ intersectionObserver.disconnect();
33
+ };
34
+ }).pipe(mergeMap((entries) => entries), map((entry) => entry.isIntersecting), distinctUntilChanged());
35
+ const elementInSight$ = combineLatest([
36
+ this._documentVisible$,
37
+ elementVisible$
38
+ ]).pipe(map(stream => {
39
+ const pageVisible = stream[0];
40
+ const elementVisible = stream[1];
41
+ const isVisible = pageVisible && elementVisible;
42
+ return isVisible;
43
+ }), distinctUntilChanged());
44
+ return elementInSight$;
45
+ }
46
+ }
47
+ IntersectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: IntersectionService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
48
+ IntersectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: IntersectionService });
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: IntersectionService, decorators: [{
50
+ type: Injectable
51
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
52
+ type: Inject,
53
+ args: [DOCUMENT]
54
+ }] }]; } });
55
+
56
+ class IntersectionDirective {
57
+ constructor(_element, _intersectionService) {
58
+ this._element = _element;
59
+ this._intersectionService = _intersectionService;
60
+ /**
61
+ * Emits current visibility status
62
+ */
63
+ this.elementInSight = new EventEmitter();
64
+ this._subscriptions = [];
65
+ }
66
+ /**
67
+ *
68
+ */
69
+ get intersectionOptions() {
70
+ return this._intersectionOptions;
71
+ }
72
+ set intersectionOptions(value) {
73
+ this._intersectionOptions = value;
74
+ }
75
+ ngOnInit() {
76
+ }
77
+ ngOnDestroy() {
78
+ this._subscriptions.forEach(subscription => subscription.unsubscribe());
79
+ }
80
+ ngAfterViewInit() {
81
+ const intersetionSubscription = this._intersectionService
82
+ .elementInSight$(this._element, this.intersectionOptions)
83
+ .subscribe(visibilityFlag => {
84
+ this.elementInSight.emit(visibilityFlag);
85
+ });
86
+ this._subscriptions.push(intersetionSubscription);
87
+ }
88
+ }
89
+ IntersectionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: IntersectionDirective, deps: [{ token: i0.ElementRef }, { token: IntersectionService }], target: i0.ɵɵFactoryTarget.Directive });
90
+ IntersectionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.1", type: IntersectionDirective, selector: "[sdsIntersection]", inputs: { intersectionOptions: "intersectionOptions" }, outputs: { elementInSight: "elementInSight" }, providers: [IntersectionService], ngImport: i0 });
91
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: IntersectionDirective, decorators: [{
92
+ type: Directive,
93
+ args: [{
94
+ selector: '[sdsIntersection]',
95
+ providers: [IntersectionService]
96
+ }]
97
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: IntersectionService }]; }, propDecorators: { intersectionOptions: [{
98
+ type: Input
99
+ }], elementInSight: [{
100
+ type: Output
101
+ }] } });
102
+
103
+ class SdsIntersectionModule {
104
+ }
105
+ SdsIntersectionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsIntersectionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
106
+ SdsIntersectionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsIntersectionModule, declarations: [IntersectionDirective], imports: [CommonModule], exports: [IntersectionDirective] });
107
+ SdsIntersectionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsIntersectionModule, imports: [[
108
+ CommonModule
109
+ ]] });
110
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsIntersectionModule, decorators: [{
111
+ type: NgModule,
112
+ args: [{
113
+ declarations: [IntersectionDirective],
114
+ exports: [IntersectionDirective],
115
+ imports: [
116
+ CommonModule
117
+ ]
118
+ }]
119
+ }] });
120
+
121
+ /**
122
+ * Generated bundle index. Do not edit.
123
+ */
124
+
125
+ export { IntersectionDirective, IntersectionService, SdsIntersectionModule };
126
+ //# sourceMappingURL=spicainternational-ngx-sds-components-src-lib-intersection.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spicainternational-ngx-sds-components-src-lib-intersection.mjs","sources":["../../../projects/ngx-sds-components/src/lib/intersection/services/intersection.service.ts","../../../projects/ngx-sds-components/src/lib/intersection/directives/intersection.directive.ts","../../../projects/ngx-sds-components/src/lib/intersection/intersection.module.ts","../../../projects/ngx-sds-components/src/lib/intersection/spicainternational-ngx-sds-components-src-lib-intersection.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\r\nimport { ElementRef, Inject, Injectable } from '@angular/core';\r\nimport { Observable, Subscriber, combineLatest, concat, defer, fromEvent, of } from 'rxjs';\r\nimport { map, mergeMap, distinctUntilChanged } from 'rxjs/operators';\r\n\r\n@Injectable()\r\nexport class IntersectionService {\r\n private _documentVisible$: Observable<boolean>;\r\n\r\n constructor(@Inject(DOCUMENT) document: any) {\r\n this._documentVisible$ = concat(\r\n defer(() => of(!document.hidden)),\r\n fromEvent(document, 'visibilitychange').pipe(map(e => !document.hidden))\r\n );\r\n }\r\n\r\n /**\r\n * @description\r\n * Method responsible for determining if element is visible\r\n * on screen or not. Please\r\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API for options meaning\r\n * @param { ElementRef } element\r\n * @param { IntersectionObserverInit } options\r\n * @returns { Observable<boolean> }\r\n */\r\n elementInSight$(\r\n element: ElementRef,\r\n options?: IntersectionObserverInit\r\n ): Observable<boolean> {\r\n const intersectionOptions: IntersectionObserverInit = {\r\n root: options?.root ?? null,\r\n rootMargin: options?.rootMargin ?? '0px 0px 0px 0px',\r\n threshold: options?.threshold ?? 0.5\r\n };\r\n\r\n const elementVisible$ = new Observable(\r\n (observer: Subscriber<IntersectionObserverEntry[]>) => {\r\n const intersectionObserver = new IntersectionObserver(entries => {\r\n observer.next(entries);\r\n }, intersectionOptions);\r\n\r\n intersectionObserver.observe(element.nativeElement);\r\n\r\n return () => {\r\n intersectionObserver.disconnect();\r\n };\r\n }\r\n ).pipe(\r\n mergeMap((entries: IntersectionObserverEntry[]) => entries),\r\n map((entry: IntersectionObserverEntry) => entry.isIntersecting),\r\n distinctUntilChanged()\r\n );\r\n\r\n const elementInSight$ = combineLatest([\r\n this._documentVisible$,\r\n elementVisible$\r\n ]).pipe(\r\n map(stream => {\r\n const pageVisible: boolean = stream[0];\r\n const elementVisible: boolean = stream[1];\r\n\r\n const isVisible = pageVisible && elementVisible;\r\n\r\n return isVisible;\r\n }),\r\n distinctUntilChanged()\r\n );\r\n\r\n return elementInSight$;\r\n }\r\n}\r\n","import { AfterViewInit, Directive, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { IntersectionService } from '../services';\r\n\r\n@Directive({\r\n selector: '[sdsIntersection]',\r\n providers: [IntersectionService]\r\n})\r\nexport class IntersectionDirective implements OnInit, OnDestroy, AfterViewInit {\r\n /**\r\n *\r\n */\r\n @Input()\r\n get intersectionOptions(): IntersectionObserverInit | undefined {\r\n return this._intersectionOptions;\r\n }\r\n set intersectionOptions(value: IntersectionObserverInit | undefined) {\r\n this._intersectionOptions = value;\r\n }\r\n\r\n /**\r\n * Emits current visibility status\r\n */\r\n @Output() elementInSight: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n\r\n private _intersectionOptions: IntersectionObserverInit | undefined;\r\n private _subscriptions: Subscription[] = [];\r\n\r\n constructor(\r\n private readonly _element: ElementRef,\r\n private readonly _intersectionService: IntersectionService\r\n ) {}\r\n\r\n ngOnInit(): void {\r\n\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscriptions.forEach(subscription => subscription.unsubscribe());\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n const intersetionSubscription = this._intersectionService\r\n .elementInSight$(this._element, this.intersectionOptions)\r\n .subscribe(visibilityFlag => {\r\n this.elementInSight.emit(visibilityFlag);\r\n });\r\n\r\n this._subscriptions.push(intersetionSubscription);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { IntersectionDirective } from './directives';\r\n\r\n@NgModule({\r\n declarations: [IntersectionDirective],\r\n exports: [IntersectionDirective],\r\n imports: [\r\n CommonModule\r\n ]\r\n})\r\nexport class SdsIntersectionModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.IntersectionService"],"mappings":";;;;;;MAMa,mBAAmB,CAAA;AAG5B,IAAA,WAAA,CAA8B,QAAa,EAAA;AACzC,QAAA,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAC7B,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EACjC,SAAS,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CACzE,CAAC;KACH;AAED;;;;;;;;AAQG;IACH,eAAe,CACb,OAAmB,EACnB,OAAkC,EAAA;AAElC,QAAA,MAAM,mBAAmB,GAA6B;AACpD,YAAA,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,IAAI;AAC3B,YAAA,UAAU,EAAE,OAAO,EAAE,UAAU,IAAI,iBAAiB;AACpD,YAAA,SAAS,EAAE,OAAO,EAAE,SAAS,IAAI,GAAG;SACrC,CAAC;QAEF,MAAM,eAAe,GAAG,IAAI,UAAU,CACpC,CAAC,QAAiD,KAAI;AACpD,YAAA,MAAM,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,OAAO,IAAG;AAC9D,gBAAA,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;aACxB,EAAE,mBAAmB,C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
+ import { EventEmitter, Directive, Inject, Output, NgModule } from '@angular/core';
3
+ import { DOCUMENT, CommonModule } from '@angular/common';
4
+ import { fromEvent } from 'rxjs';
5
+ import { groupBy, mergeAll } from 'rxjs/operators';
6
+
7
+ class KeyboardShortcutDirective {
8
+ constructor(_document) {
9
+ this._document = _document;
10
+ /**
11
+ * OUTPUTS
12
+ */
13
+ /**
14
+ * Emitted when user presses Escape
15
+ */
16
+ this.closeShortcut = new EventEmitter();
17
+ /**
18
+ * Emitted when user presses ctrl+Enter or cmd+Enter
19
+ */
20
+ this.saveRecordShortcut = new EventEmitter();
21
+ this._subscriptions = [];
22
+ }
23
+ ngOnInit() {
24
+ const keyboardEventsSubscription = fromEvent(this._document, 'keydown')
25
+ .pipe(groupBy(e => e.code), mergeAll())
26
+ .subscribe(keyboardEvent => {
27
+ // Define shortcut(s) logic here.
28
+ if (keyboardEvent.code === 'Escape') {
29
+ this.closeShortcut.emit();
30
+ }
31
+ if (keyboardEvent.code === 'Enter' && keyboardEvent.ctrlKey) {
32
+ // Ctrl+Enter was pressed (Cmd+Enter on Apple HW)
33
+ this.saveRecordShortcut.emit();
34
+ }
35
+ });
36
+ this._subscriptions.push(keyboardEventsSubscription);
37
+ }
38
+ ngOnDestroy() {
39
+ this._subscriptions.forEach(subscription => subscription.unsubscribe());
40
+ }
41
+ }
42
+ KeyboardShortcutDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: KeyboardShortcutDirective, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
43
+ KeyboardShortcutDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.1", type: KeyboardShortcutDirective, selector: "[sdsKeyboardShortcut]", outputs: { closeShortcut: "closeShortcut", saveRecordShortcut: "saveRecordShortcut" }, ngImport: i0 });
44
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: KeyboardShortcutDirective, decorators: [{
45
+ type: Directive,
46
+ args: [{
47
+ selector: '[sdsKeyboardShortcut]'
48
+ }]
49
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
50
+ type: Inject,
51
+ args: [DOCUMENT]
52
+ }] }]; }, propDecorators: { closeShortcut: [{
53
+ type: Output
54
+ }], saveRecordShortcut: [{
55
+ type: Output
56
+ }] } });
57
+
58
+ class SdsKeyboardShortcutModule {
59
+ }
60
+ SdsKeyboardShortcutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsKeyboardShortcutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
61
+ SdsKeyboardShortcutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsKeyboardShortcutModule, declarations: [KeyboardShortcutDirective], imports: [CommonModule], exports: [KeyboardShortcutDirective] });
62
+ SdsKeyboardShortcutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsKeyboardShortcutModule, imports: [[
63
+ CommonModule
64
+ ]] });
65
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsKeyboardShortcutModule, decorators: [{
66
+ type: NgModule,
67
+ args: [{
68
+ declarations: [
69
+ KeyboardShortcutDirective
70
+ ],
71
+ exports: [
72
+ KeyboardShortcutDirective
73
+ ],
74
+ imports: [
75
+ CommonModule
76
+ ]
77
+ }]
78
+ }] });
79
+
80
+ /**
81
+ * Generated bundle index. Do not edit.
82
+ */
83
+
84
+ export { KeyboardShortcutDirective, SdsKeyboardShortcutModule };
85
+ //# sourceMappingURL=spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs","sources":["../../../projects/ngx-sds-components/src/lib/keyboard-shortcut/directives/keyboard-shortcut.directive.ts","../../../projects/ngx-sds-components/src/lib/keyboard-shortcut/keyboard-shortcut.module.ts","../../../projects/ngx-sds-components/src/lib/keyboard-shortcut/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\r\nimport { Directive, EventEmitter, Inject, OnDestroy, OnInit, Output } from '@angular/core';\r\nimport { Subscription, fromEvent } from 'rxjs';\r\nimport { groupBy, mergeAll } from 'rxjs/operators';\r\n\r\n@Directive({\r\n selector: '[sdsKeyboardShortcut]'\r\n})\r\nexport class KeyboardShortcutDirective implements OnInit, OnDestroy {\r\n/**\r\n * OUTPUTS\r\n */\r\n /**\r\n * Emitted when user presses Escape\r\n */\r\n @Output() closeShortcut: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n /**\r\n * Emitted when user presses ctrl+Enter or cmd+Enter\r\n */\r\n @Output() saveRecordShortcut: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n private _subscriptions: Subscription[] = [];\r\n constructor(@Inject(DOCUMENT) private readonly _document: any) {}\r\n\r\n ngOnInit(): void {\r\n const keyboardEventsSubscription = fromEvent<KeyboardEvent>(\r\n this._document,\r\n 'keydown'\r\n )\r\n .pipe(\r\n groupBy(e => e.code),\r\n mergeAll()\r\n )\r\n .subscribe(keyboardEvent => {\r\n // Define shortcut(s) logic here.\r\n\r\n if (keyboardEvent.code === 'Escape') {\r\n this.closeShortcut.emit();\r\n }\r\n\r\n if (keyboardEvent.code === 'Enter' && keyboardEvent.ctrlKey) {\r\n // Ctrl+Enter was pressed (Cmd+Enter on Apple HW)\r\n this.saveRecordShortcut.emit();\r\n }\r\n });\r\n\r\n this._subscriptions.push(keyboardEventsSubscription);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscriptions.forEach(subscription => subscription.unsubscribe());\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { KeyboardShortcutDirective } from './directives';\r\n\r\n@NgModule({\r\n declarations: [\r\n KeyboardShortcutDirective\r\n ],\r\n exports: [\r\n KeyboardShortcutDirective\r\n ],\r\n imports: [\r\n CommonModule\r\n ]\r\n})\r\nexport class SdsKeyboardShortcutModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAQa,yBAAyB,CAAA;AAepC,IAAA,WAAA,CAA+C,SAAc,EAAA;QAAd,IAAS,CAAA,SAAA,GAAT,SAAS,CAAK;AAd/D;;AAEK;AACH;;AAEG;AACO,QAAA,IAAA,CAAA,aAAa,GAAuB,IAAI,YAAY,EAAQ,CAAC;AAEvE;;AAEG;AACO,QAAA,IAAA,CAAA,kBAAkB,GAAuB,IAAI,YAAY,EAAQ,CAAC;QAEpE,IAAc,CAAA,cAAA,GAAmB,EAAE,CAAC;KACqB;IAEjE,QAAQ,GAAA;QACN,MAAM,0BAA0B,GAAG,SAAS,CAC1C,IAAI,CAAC,SAAS,EACd,SAAS,CACV;AACE,aAAA,IAAI,CACH,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EACpB,QAAQ,EAAE,CACX;aACA,SAAS,CAAC,aAAa,IAAG;;AAGzB,YAAA,IAAI,aAAa,CAAC,IAAI,KAAK,QAAQ,EAAE;AACnC,gBAAA,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;AAC3B,aAAA;YAED,IAAI,aAAa,CAAC,IAAI,KAAK,OAAO,IAAI,aAAa,CAAC,OAAO,EAAE;;AAE3D,gBAAA,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;AAChC,aAAA;AACH,SAAC,CAAC,CAAC;AAEL,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;KACtD;IAED,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,YAAY,IAAI,YAAY,CAAC,WAAW,EAAE,CAAC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EAJ3B,OAAA,EAAA,CAAA;YACP,YAAY;AACb,SAAA,CAAA,EAAA,CAAA,CAAA;2FAEU,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAXrC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,yBAAyB;AAC1B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,yBAAyB;AAC1B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA,CAAA;;;ACdD;;AAEG;;;;"}
@@ -0,0 +1,235 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, NgModule, Optional, SkipSelf } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
+ import { BehaviorSubject, interval } from 'rxjs';
5
+ import { skip, debounceTime } from 'rxjs/operators';
6
+
7
+ /**
8
+ * @public @function timeToNextFifteenMinutesInterval
9
+ * @description
10
+ * Function responsible for calc of time until next fifteen minutes interval. By fifteen minutes interval
11
+ * we mean (e.g. 08:15, 08:30, 08:45,...)
12
+ * @param { number } currentTimestampMs
13
+ * @returns { number }
14
+ */
15
+ const timeToNextFifteenMinutesInterval = (currentTimestamp) => {
16
+ const timestampSeconds = currentTimestamp / 1000;
17
+ const numberOfSecondsIntoTheCurrentInterval = timestampSeconds % 900;
18
+ const numberOfSecondsToTheNextInterval = 900 - numberOfSecondsIntoTheCurrentInterval;
19
+ return numberOfSecondsToTheNextInterval;
20
+ };
21
+ /**
22
+ * @public @function timeToNextFiveMinutesInterval
23
+ * @description
24
+ * Function responsible for calc of time until next five minutes interval. By five minutes interval
25
+ * we mean (e.g. 08:05, 08:10, 08:15,...)
26
+ * @param { number } currentTimestampMs
27
+ * @returns { number }
28
+ */
29
+ const timeToNextFiveMinutesInterval = (currentTimestamp) => {
30
+ const timestampSeconds = currentTimestamp / 1000;
31
+ const numberOfSecondsIntoTheCurrentInterval = timestampSeconds % 300;
32
+ const numberOfSecondsToTheNextInterval = 300 - numberOfSecondsIntoTheCurrentInterval;
33
+ return numberOfSecondsToTheNextInterval;
34
+ };
35
+ /**
36
+ * @public @function timeToNextHour
37
+ * @description
38
+ * Function responsible for calc of time until next hour
39
+ * @param { number } currentTimestampMs
40
+ * @returns { number }
41
+ */
42
+ const timeToNextHour = (currentTimestamp) => {
43
+ const timestampSeconds = currentTimestamp / 1000;
44
+ const numberOfSecondsIntoTheCurrentHour = timestampSeconds % 3600;
45
+ const numberOfSecondsToTheNextHour = 3600 - numberOfSecondsIntoTheCurrentHour;
46
+ return numberOfSecondsToTheNextHour;
47
+ };
48
+ /**
49
+ * @public @function timeToNextHalfHour
50
+ * @description
51
+ * Function responsible for calc of time until half hour
52
+ * @param { number } currentTimestampMs
53
+ * @returns { number }
54
+ */
55
+ const timeToNextHalfHour = (currentTimestamp) => {
56
+ const timestampSeconds = currentTimestamp / 1000;
57
+ const numberOfSecondsIntoTheCurrentHalfHour = timestampSeconds % 1800;
58
+ const numberOfSecondsToTheNextHalfHour = 1800 - numberOfSecondsIntoTheCurrentHalfHour;
59
+ return numberOfSecondsToTheNextHalfHour;
60
+ };
61
+ /**
62
+ * @public @function timeToNextMinuteInterval
63
+ * @description
64
+ * Function responsible for calc of time until next minute interval. By minute interval
65
+ * we mean (e.g. 08:00, 08:01, 08:02,...)
66
+ * @param { number } currentTimestampMs
67
+ * @returns { number }
68
+ */
69
+ const timeToNextMinuteInterval = (currentTimestamp) => {
70
+ const timestampSeconds = currentTimestamp / 1000;
71
+ const numberOfSecondsIntoTheCurrentInterval = timestampSeconds % 60;
72
+ const numberOfSecondsToTheNextInterval = 60 - numberOfSecondsIntoTheCurrentInterval;
73
+ return numberOfSecondsToTheNextInterval;
74
+ };
75
+ /**
76
+ * @public @function timeToNextSecondInterval
77
+ * @description
78
+ * Function responsible for calc of time until next second interval. By second interval
79
+ * we mean (e.g. 08:00:01, 08:00:01, 08:00:02,...)
80
+ * @param { number } currentTimestampMs
81
+ * @returns { number }
82
+ */
83
+ const timeToNextSecondInterval = (currentTimestamp) => {
84
+ const timestampSeconds = currentTimestamp;
85
+ const numberOfMilisecSecondsIntoTheCurrentInterval = timestampSeconds % 999;
86
+ const numberOfMilisecondsSecondsToTheNextInterval = 999 - numberOfMilisecSecondsIntoTheCurrentInterval;
87
+ return numberOfMilisecondsSecondsToTheNextInterval;
88
+ };
89
+ /**
90
+ * @public @function timeToNextTenMinutesInterval
91
+ * @description
92
+ * Function responsible for calc of time until next ten minutes interval. By ten minutes interval
93
+ * we mean (e.g. 08:10, 08:20, 08:30,...)
94
+ * @param { number } currentTimestampMs
95
+ * @returns { number }
96
+ */
97
+ const timeToNextTenMinutesInterval = (currentTimestamp) => {
98
+ const timestampSeconds = currentTimestamp / 1000;
99
+ const numberOfSecondsIntoTheCurrentInterval = timestampSeconds % 600;
100
+ const numberOfSecondsToTheNextInterval = 600 - numberOfSecondsIntoTheCurrentInterval;
101
+ return numberOfSecondsToTheNextInterval;
102
+ };
103
+
104
+ class TimerService {
105
+ constructor() {
106
+ /**
107
+ * @description
108
+ * Source for fifteen minute interval
109
+ */
110
+ this._fifteenMinutesInterval = new BehaviorSubject(undefined);
111
+ /**
112
+ * @description
113
+ * Source for five minute interval
114
+ */
115
+ this._fiveMinutesInterval = new BehaviorSubject(undefined);
116
+ /**
117
+ * @description
118
+ * Source for half hour interval
119
+ */
120
+ this._fullHourInterval = new BehaviorSubject(undefined);
121
+ /**
122
+ * @description
123
+ * Source for half hour interval
124
+ */
125
+ this._halfHourInterval = new BehaviorSubject(undefined);
126
+ /**
127
+ * @description
128
+ * Source for minute interval
129
+ */
130
+ this._minuteInterval = new BehaviorSubject(undefined);
131
+ /**
132
+ * @description
133
+ * Source for secong interval
134
+ */
135
+ this._secondsInterval = new BehaviorSubject(undefined);
136
+ /**
137
+ * @description
138
+ * Source for ten minutes interval
139
+ */
140
+ this._tenMinutesInterval = new BehaviorSubject(undefined);
141
+ this._subscriptions = [];
142
+ this.fifteenMinutesInterval$ = this._fifteenMinutesInterval.asObservable().pipe(skip(1));
143
+ this.fiveMinutesInterval$ = this._fiveMinutesInterval.asObservable().pipe(skip(1));
144
+ this.fullHourInterval$ = this._fullHourInterval.asObservable().pipe(skip(1));
145
+ this.halfHourInterval$ = this._halfHourInterval.asObservable().pipe(skip(1));
146
+ this.minuteInterval$ = this._minuteInterval.asObservable().pipe().pipe(skip(1));
147
+ this.secondsInterval$ = this._secondsInterval.asObservable().pipe(skip(1));
148
+ this.tenMinutesInterval$ = this._tenMinutesInterval.asObservable().pipe(skip(1));
149
+ const timeOffsetToFullSecond = timeToNextSecondInterval(new Date().getTime());
150
+ // This observable will invoke each second while app is running
151
+ const ticksSubscription = interval(1000).pipe(debounceTime(timeOffsetToFullSecond)).subscribe(intervalTick => {
152
+ const now = new Date().getTime();
153
+ const timeRemainingToNextMinuteInterval = timeToNextMinuteInterval(now);
154
+ const timeRemaingingToNextFiveMinutesInterval = timeToNextFiveMinutesInterval(now);
155
+ const timeRemainingToNextTenMinutesInterval = timeToNextTenMinutesInterval(now);
156
+ const timeRemainingToNextFifteenMinutesInterval = timeToNextFifteenMinutesInterval(now);
157
+ const timeRemainingToNextFullHour = timeToNextHour(now);
158
+ const timeRemainingToNextHalfHour = timeToNextHalfHour(now);
159
+ this._secondsInterval.next();
160
+ // Check if its minute tick
161
+ if (timeRemainingToNextMinuteInterval > 59) {
162
+ this._minuteInterval.next();
163
+ }
164
+ // Check if its five minute interval tick
165
+ if (timeRemaingingToNextFiveMinutesInterval > 299) {
166
+ this._fiveMinutesInterval.next();
167
+ }
168
+ // Check if its ten minute interval
169
+ if (timeRemainingToNextTenMinutesInterval > 599) {
170
+ this._tenMinutesInterval.next();
171
+ }
172
+ // Check if its fifteen minute interval
173
+ if (timeRemainingToNextFifteenMinutesInterval > 899) {
174
+ this._fifteenMinutesInterval.next();
175
+ }
176
+ // Check if its half hour tick
177
+ if (timeRemainingToNextHalfHour > 1799) {
178
+ this._halfHourInterval.next();
179
+ }
180
+ // Check if its full hour tick
181
+ if (timeRemainingToNextFullHour > 3599) {
182
+ this._fullHourInterval.next();
183
+ }
184
+ // Define any additional intervals that might be needed
185
+ });
186
+ this._subscriptions.push(ticksSubscription);
187
+ }
188
+ }
189
+ TimerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: TimerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
190
+ TimerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: TimerService, providedIn: 'root' });
191
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: TimerService, decorators: [{
192
+ type: Injectable,
193
+ args: [{
194
+ providedIn: 'root'
195
+ }]
196
+ }], ctorParameters: function () { return []; } });
197
+
198
+ class SdsTimerModule {
199
+ constructor(parentModule) {
200
+ if (parentModule) {
201
+ throw new Error('TimerModule is already loaded. Import it in the AppModule only');
202
+ }
203
+ }
204
+ static forRoot() {
205
+ return {
206
+ ngModule: SdsTimerModule,
207
+ providers: [TimerService]
208
+ };
209
+ }
210
+ }
211
+ SdsTimerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsTimerModule, deps: [{ token: SdsTimerModule, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule });
212
+ SdsTimerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsTimerModule, imports: [CommonModule] });
213
+ SdsTimerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsTimerModule, imports: [[
214
+ CommonModule
215
+ ]] });
216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsTimerModule, decorators: [{
217
+ type: NgModule,
218
+ args: [{
219
+ declarations: [],
220
+ imports: [
221
+ CommonModule
222
+ ]
223
+ }]
224
+ }], ctorParameters: function () { return [{ type: SdsTimerModule, decorators: [{
225
+ type: Optional
226
+ }, {
227
+ type: SkipSelf
228
+ }] }]; } });
229
+
230
+ /**
231
+ * Generated bundle index. Do not edit.
232
+ */
233
+
234
+ export { SdsTimerModule, TimerService, timeToNextFifteenMinutesInterval, timeToNextFiveMinutesInterval, timeToNextHalfHour, timeToNextHour, timeToNextMinuteInterval, timeToNextSecondInterval, timeToNextTenMinutesInterval };
235
+ //# sourceMappingURL=spicainternational-ngx-sds-components-src-lib-timer.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spicainternational-ngx-sds-components-src-lib-timer.mjs","sources":["../../../projects/ngx-sds-components/src/lib/timer/utils/timer.utils.ts","../../../projects/ngx-sds-components/src/lib/timer/services/timer.service.ts","../../../projects/ngx-sds-components/src/lib/timer/timer.module.ts","../../../projects/ngx-sds-components/src/lib/timer/spicainternational-ngx-sds-components-src-lib-timer.ts"],"sourcesContent":["/**\r\n * @public @function timeToNextFifteenMinutesInterval\r\n * @description\r\n * Function responsible for calc of time until next fifteen minutes interval. By fifteen minutes interval\r\n * we mean (e.g. 08:15, 08:30, 08:45,...)\r\n * @param { number } currentTimestampMs\r\n * @returns { number }\r\n */\r\nexport const timeToNextFifteenMinutesInterval = (currentTimestamp: number) => {\r\n const timestampSeconds = currentTimestamp / 1000;\r\n\r\n const numberOfSecondsIntoTheCurrentInterval = timestampSeconds % 900;\r\n\r\n const numberOfSecondsToTheNextInterval = 900 - numberOfSecondsIntoTheCurrentInterval;\r\n return numberOfSecondsToTheNextInterval;\r\n}\r\n\r\n/**\r\n * @public @function timeToNextFiveMinutesInterval\r\n * @description\r\n * Function responsible for calc of time until next five minutes interval. By five minutes interval\r\n * we mean (e.g. 08:05, 08:10, 08:15,...)\r\n * @param { number } currentTimestampMs\r\n * @returns { number }\r\n */\r\nexport const timeToNextFiveMinutesInterval = (currentTimestamp: number) => {\r\n const timestampSeconds = currentTimestamp / 1000;\r\n\r\n const numberOfSecondsIntoTheCurrentInterval = timestampSeconds % 300;\r\n\r\n const numberOfSecondsToTheNextInterval = 300 - numberOfSecondsIntoTheCurrentInterval;\r\n return numberOfSecondsToTheNextInterval;\r\n}\r\n\r\n/**\r\n * @public @function timeToNextHour\r\n * @description\r\n * Function responsible for calc of time until next hour\r\n * @param { number } currentTimestampMs\r\n * @returns { number }\r\n */\r\nexport const timeToNextHour = (currentTimestamp: number) => {\r\n const timestampSeconds = currentTimestamp / 1000;\r\n\r\n const numberOfSecondsIntoTheCurrentHour = timestampSeconds % 3600;\r\n\r\n const numberOfSecondsToTheNextHour = 3600 - numberOfSecondsIntoTheCurrentHour;\r\n return numberOfSecondsToTheNextHour;\r\n };\r\n\r\n /**\r\n * @public @function timeToNextHalfHour\r\n * @description\r\n * Function responsible for calc of time until half hour\r\n * @param { number } currentTimestampMs\r\n * @returns { number }\r\n */\r\nexport const timeToNextHalfHour = (currentTimestamp: number) => {\r\n const timestampSeconds = currentTimestamp / 1000;\r\n\r\n const numberOfSecondsIntoTheCurrentHalfHour = timestampSeconds % 1800;\r\n\r\n const numberOfSecondsToTheNextHalfHour = 1800 - numberOfSecondsIntoTheCurrentHalfHour;\r\n return numberOfSecondsToTheNextHalfHour;\r\n };\r\n\r\n/**\r\n * @public @function timeToNextMinuteInterval\r\n * @description\r\n * Function responsible for calc of time until next minute interval. By minute interval\r\n * we mean (e.g. 08:00, 08:01, 08:02,...)\r\n * @param { number } currentTimestampMs\r\n * @returns { number }\r\n */\r\nexport const timeToNextMinuteInterval = (currentTimestamp: number) => {\r\n const timestampSeconds = currentTimestamp / 1000;\r\n\r\n const numberOfSecondsIntoTheCurrentInterval = timestampSeconds % 60;\r\n\r\n const numberOfSecondsToTheNextInterval = 60 - numberOfSecondsIntoTheCurrentInterval;\r\n return numberOfSecondsToTheNextInterval;\r\n}\r\n\r\n/**\r\n * @public @function timeToNextSecondInterval\r\n * @description\r\n * Function responsible for calc of time until next second interval. By second interval\r\n * we mean (e.g. 08:00:01, 08:00:01, 08:00:02,...)\r\n * @param { number } currentTimestampMs\r\n * @returns { number }\r\n */\r\nexport const timeToNextSecondInterval = (currentTimestamp: number) => {\r\n const timestampSeconds = currentTimestamp;\r\n\r\n const numberOfMilisecSecondsIntoTheCurrentInterval = timestampSeconds % 999;\r\n\r\n const numberOfMilisecondsSecondsToTheNextInterval = 999 - numberOfMilisecSecondsIntoTheCurrentInterval;\r\n return numberOfMilisecondsSecondsToTheNextInterval;\r\n}\r\n\r\n/**\r\n * @public @function timeToNextTenMinutesInterval\r\n * @description\r\n * Function responsible for calc of time until next ten minutes interval. By ten minutes interval\r\n * we mean (e.g. 08:10, 08:20, 08:30,...)\r\n * @param { number } currentTimestampMs\r\n * @returns { number }\r\n */\r\nexport const timeToNextTenMinutesInterval = (currentTimestamp: number) => {\r\n const timestampSeconds = currentTimestamp / 1000;\r\n\r\n const numberOfSecondsIntoTheCurrentInterval = timestampSeconds % 600;\r\n\r\n const numberOfSecondsToTheNextInterval = 600 - numberOfSecondsIntoTheCurrentInterval;\r\n return numberOfSecondsToTheNextInterval;\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { BehaviorSubject, Observable, Subscription, interval } from 'rxjs';\r\nimport { timeToNextFifteenMinutesInterval, timeToNextFiveMinutesInterval, timeToNextHalfHour, timeToNextHour, timeToNextMinuteInterval, timeToNextSecondInterval, timeToNextTenMinutesInterval } from '../utils';\r\nimport { debounceTime, skip } from 'rxjs/operators';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class TimerService {\r\n /**\r\n * @description\r\n * Timer emitted every 15 minutes (e.g. 08:00, 08:15, 08:30, etc.)\r\n */\r\n public fifteenMinutesInterval$: Observable<void>;\r\n\r\n /**\r\n * @description\r\n * Timer emitted every 5 minutes (e.g. 08:00, 08:05, 08:10, etc.)\r\n */\r\n public fiveMinutesInterval$: Observable<void>;\r\n\r\n /**\r\n * @description\r\n * Timer that invokes each full hour\r\n */\r\n public fullHourInterval$: Observable<void>;\r\n\r\n /**\r\n * @description\r\n * Timer emitted every 30 minutes at full and half hour (e.g. at 10:00, 10:30, 11:00, etc.)\r\n */\r\n public halfHourInterval$: Observable<void>;\r\n\r\n /**\r\n * @description\r\n * Timer emitted every minute (e.g. 08:00, 08:01, 08:02, etc.)\r\n */\r\n public minuteInterval$: Observable<void>;\r\n\r\n /**\r\n * @description\r\n * Timer emitted every second\r\n */\r\n public secondsInterval$: Observable<void>;\r\n\r\n /**\r\n * @description\r\n * Timer emitted every 10 minutes (e.g. 08:00, 08:10, 08:20, etc.)\r\n */\r\n public tenMinutesInterval$: Observable<void>;\r\n\r\n /**\r\n * @description\r\n * Source for fifteen minute interval\r\n */\r\n private _fifteenMinutesInterval: BehaviorSubject<void> = new BehaviorSubject<void>(undefined)\r\n\r\n /**\r\n * @description\r\n * Source for five minute interval\r\n */\r\n private _fiveMinutesInterval: BehaviorSubject<void> = new BehaviorSubject<void>(undefined)\r\n\r\n /**\r\n * @description\r\n * Source for half hour interval\r\n */\r\n private _fullHourInterval: BehaviorSubject<void> = new BehaviorSubject<void>(\r\n undefined\r\n );\r\n\r\n /**\r\n * @description\r\n * Source for half hour interval\r\n */\r\n private _halfHourInterval: BehaviorSubject<void> = new BehaviorSubject<void>(\r\n undefined\r\n );\r\n\r\n /**\r\n * @description\r\n * Source for minute interval\r\n */\r\n private _minuteInterval: BehaviorSubject<void> = new BehaviorSubject<void>(undefined)\r\n\r\n /**\r\n * @description\r\n * Source for secong interval\r\n */\r\n private _secondsInterval: BehaviorSubject<void> = new BehaviorSubject<void>(undefined);\r\n\r\n /**\r\n * @description\r\n * Source for ten minutes interval\r\n */\r\n private _tenMinutesInterval: BehaviorSubject<void> = new BehaviorSubject<void>(undefined)\r\n\r\n private _subscriptions: Subscription[] = [];\r\n\r\nconstructor() {\r\n this.fifteenMinutesInterval$ = this._fifteenMinutesInterval.asObservable().pipe(skip(1));\r\n this.fiveMinutesInterval$ = this._fiveMinutesInterval.asObservable().pipe(skip(1));\r\n this.fullHourInterval$ = this._fullHourInterval.asObservable().pipe(skip(1));\r\n this.halfHourInterval$ = this._halfHourInterval.asObservable().pipe(skip(1));\r\n this.minuteInterval$ = this._minuteInterval.asObservable().pipe().pipe(skip(1));\r\n this.secondsInterval$ = this._secondsInterval.asObservable().pipe(skip(1));\r\n this.tenMinutesInterval$ = this._tenMinutesInterval.asObservable().pipe(skip(1));\r\n\r\n const timeOffsetToFullSecond = timeToNextSecondInterval(new Date().getTime())\r\n\r\n // This observable will invoke each second while app is running\r\n const ticksSubscription: Subscription = interval(1000).pipe(debounceTime(timeOffsetToFullSecond)).subscribe(\r\n intervalTick => {\r\n const now = new Date().getTime();\r\n\r\n const timeRemainingToNextMinuteInterval = timeToNextMinuteInterval(now);\r\n\r\n const timeRemaingingToNextFiveMinutesInterval = timeToNextFiveMinutesInterval(now);\r\n\r\n const timeRemainingToNextTenMinutesInterval = timeToNextTenMinutesInterval(now);\r\n\r\n const timeRemainingToNextFifteenMinutesInterval = timeToNextFifteenMinutesInterval(now);\r\n\r\n const timeRemainingToNextFullHour = timeToNextHour(\r\n now\r\n );\r\n\r\n const timeRemainingToNextHalfHour = timeToNextHalfHour(\r\n now\r\n );\r\n\r\n this._secondsInterval.next();\r\n\r\n // Check if its minute tick\r\n if (timeRemainingToNextMinuteInterval > 59) {\r\n this._minuteInterval.next();\r\n }\r\n\r\n // Check if its five minute interval tick\r\n if (timeRemaingingToNextFiveMinutesInterval > 299) {\r\n this._fiveMinutesInterval.next();\r\n }\r\n\r\n // Check if its ten minute interval\r\n if (timeRemainingToNextTenMinutesInterval > 599) {\r\n this._tenMinutesInterval.next();\r\n }\r\n\r\n // Check if its fifteen minute interval\r\n if (timeRemainingToNextFifteenMinutesInterval > 899) {\r\n this._fifteenMinutesInterval.next();\r\n }\r\n\r\n // Check if its half hour tick\r\n if (timeRemainingToNextHalfHour > 1799) {\r\n this._halfHourInterval.next();\r\n }\r\n\r\n // Check if its full hour tick\r\n if (timeRemainingToNextFullHour > 3599) {\r\n this._fullHourInterval.next();\r\n }\r\n\r\n // Define any additional intervals that might be needed\r\n }\r\n );\r\n\r\n this._subscriptions.push(ticksSubscription);\r\n}\r\n}\r\n","import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { TimerService } from './services';\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule\r\n ]\r\n})\r\nexport class SdsTimerModule {\r\n static forRoot(): ModuleWithProviders<SdsTimerModule> {\r\n return {\r\n ngModule: SdsTimerModule,\r\n providers: [TimerService]\r\n }\r\n }\r\n\r\n constructor(@Optional() @SkipSelf() parentModule: SdsTimerModule) {\r\n if (parentModule) {\r\n throw new Error(\r\n 'TimerModule is already loaded. Import it in the AppModule only'\r\n );\r\n }\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;;AAOG;AACU,MAAA,gCAAgC,GAAG,CAAC,gBAAwB,KAAI;AACzE,IAAA,MAAM,gBAAgB,GAAG,gBAAgB,GAAG,IAAI,CAAC;AAEjD,IAAA,MAAM,qCAAqC,GAAG,gBAAgB,GAAG,GAAG,CAAC;AAErE,IAAA,MAAM,gCAAgC,GAAG,GAAG,GAAG,qCAAqC,CAAC;AACrF,IAAA,OAAO,gCAAgC,CAAC;AAC5C,EAAC;AAED;;;;;;;AAOG;AACU,MAAA,6BAA6B,GAAG,CAAC,gBAAwB,KAAI;AACtE,IAAA,MAAM,gBAAgB,GAAG,gBAAgB,GAAG,IAAI,CAAC;AAEjD,IAAA,MAAM,qCAAqC,GAAG,gBAAgB,GAAG,GAAG,CAAC;AAErE,IAAA,MAAM,gCAAgC,GAAG,GAAG,GAAG,qCAAqC,CAAC;AACrF,IAAA,OAAO,gCAAgC,CAAC;AAC5C,EAAC;AAED;;;;;;AAMG;AACU,MAAA,cAAc,GAAG,CAAC,gBAAwB,KA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BAAI,QAAQ;;;AClBrC;;AAEG;;;;"}
@@ -3,12 +3,15 @@ export * from '@spicainternational/ngx-sds-components/src/lib/avatar';
3
3
  export * from '@spicainternational/ngx-sds-components/src/lib/badge';
4
4
  export * from '@spicainternational/ngx-sds-components/src/lib/callout';
5
5
  export * from '@spicainternational/ngx-sds-components/src/lib/color-picker';
6
+ export * from '@spicainternational/ngx-sds-components/src/lib/ellipsis';
6
7
  export * from '@spicainternational/ngx-sds-components/src/lib/expansion-panel';
7
8
  export * from '@spicainternational/ngx-sds-components/src/lib/date-picker';
8
9
  export * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';
9
10
  export * from '@spicainternational/ngx-sds-components/src/lib/duration-pipe';
10
11
  export * from '@spicainternational/ngx-sds-components/src/lib/duration-box';
11
12
  export * from '@spicainternational/ngx-sds-components/src/lib/highlight-text';
13
+ export * from '@spicainternational/ngx-sds-components/src/lib/intersection';
14
+ export * from '@spicainternational/ngx-sds-components/src/lib/keyboard-shortcut';
12
15
  export * from '@spicainternational/ngx-sds-components/src/lib/layout';
13
16
  export * from '@spicainternational/ngx-sds-components/src/lib/message';
14
17
  export * from '@spicainternational/ngx-sds-components/src/lib/modal';
@@ -19,6 +22,7 @@ export * from '@spicainternational/ngx-sds-components/src/lib/quick-info';
19
22
  export * from '@spicainternational/ngx-sds-components/src/lib/segmented-control';
20
23
  export * from '@spicainternational/ngx-sds-components/src/lib/side-bar';
21
24
  export * from '@spicainternational/ngx-sds-components/src/lib/static-value';
25
+ export * from '@spicainternational/ngx-sds-components/src/lib/timer';
22
26
  export * from '@spicainternational/ngx-sds-components/src/lib/tooltip';
23
27
 
24
28
  /*
@@ -1 +1 @@
1
- {"version":3,"file":"spicainternational-ngx-sds-components.mjs","sources":["../../../projects/ngx-sds-components/src/public-api.ts","../../../projects/ngx-sds-components/src/spicainternational-ngx-sds-components.ts"],"sourcesContent":["/*\r\n * Public API Surface of ngx-sds-components\r\n */\r\n\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/app-switcher';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/avatar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/badge';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/callout';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/color-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/expansion-panel';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/duration-pipe';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/duration-box';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/highlight-text';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/layout';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/message';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/modal';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/navigation';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/page-header';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/pane';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/quick-info';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/segmented-control';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/side-bar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/static-value';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/tooltip';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEG;;ACFH;;AAEG"}
1
+ {"version":3,"file":"spicainternational-ngx-sds-components.mjs","sources":["../../../projects/ngx-sds-components/src/public-api.ts","../../../projects/ngx-sds-components/src/spicainternational-ngx-sds-components.ts"],"sourcesContent":["/*\r\n * Public API Surface of ngx-sds-components\r\n */\r\n\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/app-switcher';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/avatar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/badge';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/callout';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/color-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/ellipsis';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/expansion-panel';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/duration-pipe';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/duration-box';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/highlight-text';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/intersection';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/keyboard-shortcut';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/layout';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/message';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/modal';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/navigation';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/page-header';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/pane';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/quick-info';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/segmented-control';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/side-bar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/static-value';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/timer';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/tooltip';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEG;;ACFH;;AAEG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spicainternational/ngx-sds-components",
3
- "version": "5.13.0",
3
+ "version": "5.14.0",
4
4
  "description": "Spica design system angular components.",
5
5
  "peerDependencies": {
6
6
  "@angular/common": ">=13.3.0",
@@ -110,6 +110,14 @@
110
110
  "node": "./fesm2015/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs",
111
111
  "default": "./fesm2020/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs"
112
112
  },
113
+ "./src/lib/ellipsis": {
114
+ "types": "./src/lib/ellipsis/spicainternational-ngx-sds-components-src-lib-ellipsis.d.ts",
115
+ "esm2020": "./esm2020/src/lib/ellipsis/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs",
116
+ "es2020": "./fesm2020/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs",
117
+ "es2015": "./fesm2015/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs",
118
+ "node": "./fesm2015/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs",
119
+ "default": "./fesm2020/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs"
120
+ },
113
121
  "./src/lib/expansion-panel": {
114
122
  "types": "./src/lib/expansion-panel/spicainternational-ngx-sds-components-src-lib-expansion-panel.d.ts",
115
123
  "esm2020": "./esm2020/src/lib/expansion-panel/spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs",
@@ -126,6 +134,22 @@
126
134
  "node": "./fesm2015/spicainternational-ngx-sds-components-src-lib-highlight-text.mjs",
127
135
  "default": "./fesm2020/spicainternational-ngx-sds-components-src-lib-highlight-text.mjs"
128
136
  },
137
+ "./src/lib/intersection": {
138
+ "types": "./src/lib/intersection/spicainternational-ngx-sds-components-src-lib-intersection.d.ts",
139
+ "esm2020": "./esm2020/src/lib/intersection/spicainternational-ngx-sds-components-src-lib-intersection.mjs",
140
+ "es2020": "./fesm2020/spicainternational-ngx-sds-components-src-lib-intersection.mjs",
141
+ "es2015": "./fesm2015/spicainternational-ngx-sds-components-src-lib-intersection.mjs",
142
+ "node": "./fesm2015/spicainternational-ngx-sds-components-src-lib-intersection.mjs",
143
+ "default": "./fesm2020/spicainternational-ngx-sds-components-src-lib-intersection.mjs"
144
+ },
145
+ "./src/lib/keyboard-shortcut": {
146
+ "types": "./src/lib/keyboard-shortcut/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.d.ts",
147
+ "esm2020": "./esm2020/src/lib/keyboard-shortcut/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs",
148
+ "es2020": "./fesm2020/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs",
149
+ "es2015": "./fesm2015/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs",
150
+ "node": "./fesm2015/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs",
151
+ "default": "./fesm2020/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs"
152
+ },
129
153
  "./src/lib/layout": {
130
154
  "types": "./src/lib/layout/spicainternational-ngx-sds-components-src-lib-layout.d.ts",
131
155
  "esm2020": "./esm2020/src/lib/layout/spicainternational-ngx-sds-components-src-lib-layout.mjs",
@@ -206,6 +230,14 @@
206
230
  "node": "./fesm2015/spicainternational-ngx-sds-components-src-lib-static-value.mjs",
207
231
  "default": "./fesm2020/spicainternational-ngx-sds-components-src-lib-static-value.mjs"
208
232
  },
233
+ "./src/lib/timer": {
234
+ "types": "./src/lib/timer/spicainternational-ngx-sds-components-src-lib-timer.d.ts",
235
+ "esm2020": "./esm2020/src/lib/timer/spicainternational-ngx-sds-components-src-lib-timer.mjs",
236
+ "es2020": "./fesm2020/spicainternational-ngx-sds-components-src-lib-timer.mjs",
237
+ "es2015": "./fesm2015/spicainternational-ngx-sds-components-src-lib-timer.mjs",
238
+ "node": "./fesm2015/spicainternational-ngx-sds-components-src-lib-timer.mjs",
239
+ "default": "./fesm2020/spicainternational-ngx-sds-components-src-lib-timer.mjs"
240
+ },
209
241
  "./src/lib/tooltip": {
210
242
  "types": "./src/lib/tooltip/spicainternational-ngx-sds-components-src-lib-tooltip.d.ts",
211
243
  "esm2020": "./esm2020/src/lib/tooltip/spicainternational-ngx-sds-components-src-lib-tooltip.mjs",