@spicainternational/ngx-sds-components 5.13.0 → 5.20.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.
- package/esm2020/public-api.mjs +5 -1
- package/esm2020/src/lib/color-picker/color-picker.component.mjs +11 -27
- package/esm2020/src/lib/date-picker/date-picker.component.mjs +5 -5
- package/esm2020/src/lib/date-picker/date-picker.model.mjs +1 -1
- package/esm2020/src/lib/ellipsis/directives/ellipsis.directive.mjs +51 -0
- package/esm2020/src/lib/ellipsis/ellipsis.module.mjs +26 -0
- package/esm2020/src/lib/ellipsis/public-api.mjs +3 -0
- package/esm2020/src/lib/ellipsis/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs +5 -0
- package/esm2020/src/lib/expansion-panel/expansion-panel.component.mjs +7 -3
- package/esm2020/src/lib/intersection/directives/index.mjs +2 -0
- package/esm2020/src/lib/intersection/directives/intersection.directive.mjs +51 -0
- package/esm2020/src/lib/intersection/intersection.module.mjs +22 -0
- package/esm2020/src/lib/intersection/public-api.mjs +4 -0
- package/esm2020/src/lib/intersection/services/index.mjs +2 -0
- package/esm2020/src/lib/intersection/services/intersection.service.mjs +54 -0
- package/esm2020/src/lib/intersection/spicainternational-ngx-sds-components-src-lib-intersection.mjs +5 -0
- package/esm2020/src/lib/keyboard-shortcut/directives/index.mjs +2 -0
- package/esm2020/src/lib/keyboard-shortcut/directives/keyboard-shortcut.directive.mjs +56 -0
- package/esm2020/src/lib/keyboard-shortcut/keyboard-shortcut.module.mjs +26 -0
- package/esm2020/src/lib/keyboard-shortcut/public-api.mjs +3 -0
- package/esm2020/src/lib/keyboard-shortcut/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs +5 -0
- package/esm2020/src/lib/modal/modal.component.mjs +3 -3
- package/esm2020/src/lib/timer/public-api.mjs +4 -0
- package/esm2020/src/lib/timer/services/index.mjs +2 -0
- package/esm2020/src/lib/timer/services/timer.service.mjs +99 -0
- package/esm2020/src/lib/timer/spicainternational-ngx-sds-components-src-lib-timer.mjs +5 -0
- package/esm2020/src/lib/timer/timer.module.mjs +36 -0
- package/esm2020/src/lib/timer/utils/index.mjs +2 -0
- package/esm2020/src/lib/timer/utils/timer.utils.mjs +97 -0
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-color-picker.mjs +10 -26
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-color-picker.mjs.map +1 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-date-picker.mjs +4 -4
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-date-picker.mjs.map +1 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs +82 -0
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs.map +1 -0
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs +6 -2
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs.map +1 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-intersection.mjs +129 -0
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-intersection.mjs.map +1 -0
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs +87 -0
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs.map +1 -0
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-modal.mjs +2 -2
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-modal.mjs.map +1 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-timer.mjs +237 -0
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-timer.mjs.map +1 -0
- package/fesm2015/spicainternational-ngx-sds-components.mjs +4 -0
- package/fesm2015/spicainternational-ngx-sds-components.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-color-picker.mjs +10 -26
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-color-picker.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-date-picker.mjs +4 -4
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-date-picker.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs +81 -0
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs.map +1 -0
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs +6 -2
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-intersection.mjs +126 -0
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-intersection.mjs.map +1 -0
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs +85 -0
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs.map +1 -0
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-modal.mjs +2 -2
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-modal.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-timer.mjs +235 -0
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-timer.mjs.map +1 -0
- package/fesm2020/spicainternational-ngx-sds-components.mjs +4 -0
- package/fesm2020/spicainternational-ngx-sds-components.mjs.map +1 -1
- package/package.json +33 -1
- package/public-api.d.ts +4 -0
- package/src/lib/color-picker/color-picker.component.d.ts +6 -2
- package/src/lib/date-picker/date-picker.component.d.ts +1 -1
- package/src/lib/date-picker/date-picker.model.d.ts +1 -0
- package/src/lib/ellipsis/directives/ellipsis.directive.d.ts +13 -0
- package/src/lib/ellipsis/ellipsis.module.d.ts +8 -0
- package/src/lib/ellipsis/package.json +10 -0
- package/src/lib/ellipsis/public-api.d.ts +2 -0
- package/src/lib/ellipsis/spicainternational-ngx-sds-components-src-lib-ellipsis.d.ts +5 -0
- package/src/lib/expansion-panel/expansion-panel.component.d.ts +3 -1
- package/src/lib/intersection/directives/index.d.ts +1 -0
- package/src/lib/intersection/directives/intersection.directive.d.ts +24 -0
- package/src/lib/intersection/intersection.module.d.ts +8 -0
- package/src/lib/intersection/package.json +10 -0
- package/src/lib/intersection/public-api.d.ts +3 -0
- package/src/lib/intersection/services/index.d.ts +1 -0
- package/src/lib/intersection/services/intersection.service.d.ts +19 -0
- package/src/lib/intersection/spicainternational-ngx-sds-components-src-lib-intersection.d.ts +5 -0
- package/src/lib/keyboard-shortcut/directives/index.d.ts +1 -0
- package/src/lib/keyboard-shortcut/directives/keyboard-shortcut.directive.d.ts +22 -0
- package/src/lib/keyboard-shortcut/keyboard-shortcut.module.d.ts +8 -0
- package/src/lib/keyboard-shortcut/package.json +10 -0
- package/src/lib/keyboard-shortcut/public-api.d.ts +2 -0
- package/src/lib/keyboard-shortcut/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.d.ts +5 -0
- package/src/lib/timer/package.json +10 -0
- package/src/lib/timer/public-api.d.ts +3 -0
- package/src/lib/timer/services/index.d.ts +1 -0
- package/src/lib/timer/services/timer.service.d.ts +78 -0
- package/src/lib/timer/spicainternational-ngx-sds-components-src-lib-timer.d.ts +5 -0
- package/src/lib/timer/timer.module.d.ts +10 -0
- package/src/lib/timer/utils/index.d.ts +1 -0
- package/src/lib/timer/utils/timer.utils.d.ts +61 -0
|
@@ -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,KAAI;AACvD,IAAA,MAAM,gBAAgB,GAAG,gBAAgB,GAAG,IAAI,CAAC;AAEjD,IAAA,MAAM,iCAAiC,GAAG,gBAAgB,GAAG,IAAI,CAAC;AAElE,IAAA,MAAM,4BAA4B,GAAG,IAAI,GAAG,iCAAiC,CAAC;AAC9E,IAAA,OAAO,4BAA4B,CAAC;AACtC,EAAE;AAEF;;;;;;AAMG;AACQ,MAAA,kBAAkB,GAAG,CAAC,gBAAwB,KAAI;AAC3D,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AA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,kBAQ2B,cAAc,EAAA,QAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AARvD,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAHvB,YAAY,CAAA,EAAA,CAAA,CAAA;AAGH,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAJhB,OAAA,EAAA,CAAA;YACP,YAAY;AACb,SAAA,CAAA,EAAA,CAAA,CAAA;2FAEU,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA,CAAA;0DASqD,cAAc,EAAA,UAAA,EAAA,CAAA;0BAAnD,QAAQ;;0BAAI,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":"
|
|
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.
|
|
3
|
+
"version": "5.20.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",
|
package/public-api.d.ts
CHANGED
|
@@ -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,4 +22,5 @@ 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';
|
|
@@ -6,12 +6,16 @@ export declare class SdsColorPickerComponent implements OnInit, OnChanges {
|
|
|
6
6
|
selectedColor?: string;
|
|
7
7
|
defaultColor?: string;
|
|
8
8
|
selectedColorChange: EventEmitter<string>;
|
|
9
|
-
style: 'inline' | '
|
|
9
|
+
style: 'inline' | 'dropdown';
|
|
10
|
+
showCaret: boolean;
|
|
11
|
+
shape: 'circle' | 'square';
|
|
10
12
|
dropdownGridTemplateColumns?: string;
|
|
11
13
|
showDropdown: boolean;
|
|
12
14
|
elementUUID: string;
|
|
13
15
|
checkIcon: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
14
16
|
private gridSize;
|
|
17
|
+
circleRadius: string;
|
|
18
|
+
squareRadius: string;
|
|
15
19
|
constructor();
|
|
16
20
|
ngOnChanges(changes: SimpleChanges): void;
|
|
17
21
|
ngOnInit(): void;
|
|
@@ -19,5 +23,5 @@ export declare class SdsColorPickerComponent implements OnInit, OnChanges {
|
|
|
19
23
|
onKeyDown($event: KeyboardEvent): void;
|
|
20
24
|
toggleDropdown(): void;
|
|
21
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdsColorPickerComponent, never>;
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdsColorPickerComponent, "sds-color-picker", never, { "colors": "colors"; "disabled": "disabled"; "selectedColor": "selectedColor"; "defaultColor": "defaultColor"; "style": "style"; }, { "selectedColorChange": "selectedColorChange"; }, never, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdsColorPickerComponent, "sds-color-picker", never, { "colors": "colors"; "disabled": "disabled"; "selectedColor": "selectedColor"; "defaultColor": "defaultColor"; "style": "style"; "showCaret": "showCaret"; "shape": "shape"; }, { "selectedColorChange": "selectedColorChange"; }, never, never>;
|
|
23
27
|
}
|
|
@@ -108,5 +108,5 @@ export declare class SdsDatePickerComponent implements OnInit, OnChanges {
|
|
|
108
108
|
private formatDate;
|
|
109
109
|
private generateDateRanges;
|
|
110
110
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdsDatePickerComponent, never>;
|
|
111
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdsDatePickerComponent, "sds-date-picker", never, { "selectionKind": "selectionKind"; "dateRangeDefinitions": "dateRangeDefinitions"; "selectedDate": "selectedDate"; "selectedDateStart": "selectedDateStart"; "selectedDateEnd": "selectedDateEnd"; "minDate": "minDate"; "maxDate": "maxDate"; "locales": "locales"; "disabled": "disabled"; "validationError": "validationError"; "isValid": "isValid"; "disabledDates": "disabledDates"; "applyText": "applyText"; "cancelText": "cancelText"; "translations": "translations"; "firstDayOfWeek": "firstDayOfWeek"; "dateRangeDefinitionsWidth": "dateRangeDefinitionsWidth"; "showPreviousAndNextButtons": "showPreviousAndNextButtons"; "width": "width"; "dropdownWrapperClass": "dropdownWrapperClass"; "dropdownWrapperId": "dropdownWrapperId"; "getPreviousDateCallback": "getPreviousDateCallback"; "getNextDateCallback": "getNextDateCallback"; "getPreviousRangeCallback": "getPreviousRangeCallback"; "getNextRangeCallback": "getNextRangeCallback"; "useCustomDisplayContent": "useCustomDisplayContent"; }, { "selectedDateChange": "selectedDateChange"; "selectedDateStartChange": "selectedDateStartChange"; "selectedDateEndChange": "selectedDateEndChange"; "periodChange": "periodChange"; }, ["displayContent"], ["display"]>;
|
|
111
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdsDatePickerComponent, "sds-date-picker", never, { "selectionKind": "selectionKind"; "dateRangeDefinitions": "dateRangeDefinitions"; "selectedDate": "selectedDate"; "selectedDateStart": "selectedDateStart"; "selectedDateEnd": "selectedDateEnd"; "minDate": "minDate"; "maxDate": "maxDate"; "locales": "locales"; "disabled": "disabled"; "validationError": "validationError"; "isValid": "isValid"; "disabledDates": "disabledDates"; "applyText": "applyText"; "cancelText": "cancelText"; "translations": "translations"; "firstDayOfWeek": "firstDayOfWeek"; "dateRangeDefinitionsWidth": "dateRangeDefinitionsWidth"; "showPreviousAndNextButtons": "showPreviousAndNextButtons"; "width": "width"; "dropdownWrapperClass": "dropdownWrapperClass"; "dropdownWrapperId": "dropdownWrapperId"; "getPreviousDateCallback": "getPreviousDateCallback"; "getNextDateCallback": "getNextDateCallback"; "getPreviousRangeCallback": "getPreviousRangeCallback"; "getNextRangeCallback": "getNextRangeCallback"; "useCustomDisplayContent": "useCustomDisplayContent"; }, { "selectedDateChange": "selectedDateChange"; "selectedDateStartChange": "selectedDateStartChange"; "selectedDateEndChange": "selectedDateEndChange"; "periodChange": "periodChange"; }, ["displayContent"], ["display", "display"]>;
|
|
112
112
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, Renderer2 } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SdsEllipsisDirective implements AfterViewInit {
|
|
4
|
+
private elementRef;
|
|
5
|
+
private renderer;
|
|
6
|
+
tooltipText?: string;
|
|
7
|
+
private element?;
|
|
8
|
+
constructor(elementRef: ElementRef, renderer: Renderer2);
|
|
9
|
+
ngAfterViewInit(): void;
|
|
10
|
+
enter(): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdsEllipsisDirective, never>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SdsEllipsisDirective, "[sdsEllipsis]", never, { "tooltipText": "tooltipText"; }, {}, never>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./directives/ellipsis.directive";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
export declare class SdsEllipsisModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdsEllipsisModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SdsEllipsisModule, [typeof i1.SdsEllipsisDirective], [typeof i2.CommonModule], [typeof i1.SdsEllipsisDirective]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SdsEllipsisModule>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"module": "../../../fesm2015/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs",
|
|
3
|
+
"es2020": "../../../fesm2020/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs",
|
|
4
|
+
"esm2020": "../../../esm2020/src/lib/ellipsis/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs",
|
|
5
|
+
"fesm2020": "../../../fesm2020/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs",
|
|
6
|
+
"fesm2015": "../../../fesm2015/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs",
|
|
7
|
+
"typings": "spicainternational-ngx-sds-components-src-lib-ellipsis.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"name": "@spicainternational/ngx-sds-components/src/lib/ellipsis"
|
|
10
|
+
}
|
|
@@ -31,9 +31,11 @@ export declare class SdsExpansionPanelComponent {
|
|
|
31
31
|
descriptionText?: string;
|
|
32
32
|
isOpen: boolean;
|
|
33
33
|
isOpenChange: EventEmitter<boolean>;
|
|
34
|
+
expandPanelText?: string;
|
|
35
|
+
collapsePanelText?: string;
|
|
34
36
|
caretIcon: IconDefinition;
|
|
35
37
|
onToggleIsOpenClick(event: MouseEvent): void;
|
|
36
38
|
openPanel(): void;
|
|
37
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdsExpansionPanelComponent, never>;
|
|
38
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdsExpansionPanelComponent, "sds-expansion-panel", never, { "headerText": "headerText"; "hideHeader": "hideHeader"; "headerId": "headerId"; "animateCaret": "animateCaret"; "showBackground": "showBackground"; "caretPlacement": "caretPlacement"; "descriptionText": "descriptionText"; "isOpen": "isOpen"; }, { "isOpenChange": "isOpenChange"; }, never, ["[contentOnClosed]", "*"]>;
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdsExpansionPanelComponent, "sds-expansion-panel", never, { "headerText": "headerText"; "hideHeader": "hideHeader"; "headerId": "headerId"; "animateCaret": "animateCaret"; "showBackground": "showBackground"; "caretPlacement": "caretPlacement"; "descriptionText": "descriptionText"; "isOpen": "isOpen"; "expandPanelText": "expandPanelText"; "collapsePanelText": "collapsePanelText"; }, { "isOpenChange": "isOpenChange"; }, never, ["[contentOnClosed]", "*"]>;
|
|
39
41
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './intersection.directive';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { IntersectionService } from '../services';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class IntersectionDirective implements OnInit, OnDestroy, AfterViewInit {
|
|
5
|
+
private readonly _element;
|
|
6
|
+
private readonly _intersectionService;
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
get intersectionOptions(): IntersectionObserverInit | undefined;
|
|
11
|
+
set intersectionOptions(value: IntersectionObserverInit | undefined);
|
|
12
|
+
/**
|
|
13
|
+
* Emits current visibility status
|
|
14
|
+
*/
|
|
15
|
+
elementInSight: EventEmitter<boolean>;
|
|
16
|
+
private _intersectionOptions;
|
|
17
|
+
private _subscriptions;
|
|
18
|
+
constructor(_element: ElementRef, _intersectionService: IntersectionService);
|
|
19
|
+
ngOnInit(): void;
|
|
20
|
+
ngOnDestroy(): void;
|
|
21
|
+
ngAfterViewInit(): void;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IntersectionDirective, never>;
|
|
23
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<IntersectionDirective, "[sdsIntersection]", never, { "intersectionOptions": "intersectionOptions"; }, { "elementInSight": "elementInSight"; }, never>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./directives/intersection.directive";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
export declare class SdsIntersectionModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdsIntersectionModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SdsIntersectionModule, [typeof i1.IntersectionDirective], [typeof i2.CommonModule], [typeof i1.IntersectionDirective]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SdsIntersectionModule>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"module": "../../../fesm2015/spicainternational-ngx-sds-components-src-lib-intersection.mjs",
|
|
3
|
+
"es2020": "../../../fesm2020/spicainternational-ngx-sds-components-src-lib-intersection.mjs",
|
|
4
|
+
"esm2020": "../../../esm2020/src/lib/intersection/spicainternational-ngx-sds-components-src-lib-intersection.mjs",
|
|
5
|
+
"fesm2020": "../../../fesm2020/spicainternational-ngx-sds-components-src-lib-intersection.mjs",
|
|
6
|
+
"fesm2015": "../../../fesm2015/spicainternational-ngx-sds-components-src-lib-intersection.mjs",
|
|
7
|
+
"typings": "spicainternational-ngx-sds-components-src-lib-intersection.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"name": "@spicainternational/ngx-sds-components/src/lib/intersection"
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './intersection.service';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class IntersectionService {
|
|
5
|
+
private _documentVisible$;
|
|
6
|
+
constructor(document: any);
|
|
7
|
+
/**
|
|
8
|
+
* @description
|
|
9
|
+
* Method responsible for determining if element is visible
|
|
10
|
+
* on screen or not. Please
|
|
11
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API for options meaning
|
|
12
|
+
* @param { ElementRef } element
|
|
13
|
+
* @param { IntersectionObserverInit } options
|
|
14
|
+
* @returns { Observable<boolean> }
|
|
15
|
+
*/
|
|
16
|
+
elementInSight$(element: ElementRef, options?: IntersectionObserverInit): Observable<boolean>;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IntersectionService, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<IntersectionService>;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './keyboard-shortcut.directive';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class KeyboardShortcutDirective implements OnInit, OnDestroy {
|
|
4
|
+
private readonly _document;
|
|
5
|
+
/**
|
|
6
|
+
* OUTPUTS
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Emitted when user presses Escape
|
|
10
|
+
*/
|
|
11
|
+
closeShortcut: EventEmitter<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Emitted when user presses ctrl+Enter or cmd+Enter
|
|
14
|
+
*/
|
|
15
|
+
saveRecordShortcut: EventEmitter<void>;
|
|
16
|
+
private _subscriptions;
|
|
17
|
+
constructor(_document: any);
|
|
18
|
+
ngOnInit(): void;
|
|
19
|
+
ngOnDestroy(): void;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KeyboardShortcutDirective, never>;
|
|
21
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<KeyboardShortcutDirective, "[sdsKeyboardShortcut]", never, {}, { "closeShortcut": "closeShortcut"; "saveRecordShortcut": "saveRecordShortcut"; }, never>;
|
|
22
|
+
}
|