@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,237 @@
|
|
|
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 () {
|
|
225
|
+
return [{ type: SdsTimerModule, decorators: [{
|
|
226
|
+
type: Optional
|
|
227
|
+
}, {
|
|
228
|
+
type: SkipSelf
|
|
229
|
+
}] }];
|
|
230
|
+
} });
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Generated bundle index. Do not edit.
|
|
234
|
+
*/
|
|
235
|
+
|
|
236
|
+
export { SdsTimerModule, TimerService, timeToNextFifteenMinutesInterval, timeToNextFiveMinutesInterval, timeToNextHalfHour, timeToNextHour, timeToNextMinuteInterval, timeToNextSecondInterval, timeToNextTenMinutesInterval };
|
|
237
|
+
//# 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,CA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AAA,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;SACb,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;iBACF,CAAA;;wBASqD,cAAc,EAAA,UAAA,EAAA,CAAA;8BAAnD,QAAQ;;8BAAI,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"}
|
|
@@ -8,16 +8,18 @@ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
|
8
8
|
import * as i2 from 'devextreme-angular/ui/popover';
|
|
9
9
|
import { DxPopoverModule } from 'devextreme-angular/ui/popover';
|
|
10
10
|
|
|
11
|
-
// import { library } from '@fortawesome/fontawesome-svg-core';
|
|
12
|
-
// import { faCheck } from '@fortawesome/pro-solid-svg-icons';
|
|
13
11
|
class SdsColorPickerComponent {
|
|
14
12
|
constructor() {
|
|
15
13
|
this.colors = [];
|
|
16
14
|
this.disabled = false;
|
|
17
15
|
this.style = 'inline';
|
|
16
|
+
this.showCaret = true;
|
|
17
|
+
this.shape = 'circle';
|
|
18
18
|
this.showDropdown = false;
|
|
19
19
|
this.checkIcon = faCheck;
|
|
20
20
|
this.gridSize = 1;
|
|
21
|
+
this.circleRadius = '100%';
|
|
22
|
+
this.squareRadius = '10%';
|
|
21
23
|
this.selectedColorChange = new EventEmitter();
|
|
22
24
|
this.elementUUID = `sds-cp-${Math.ceil(Math.random() * 1000000)}`;
|
|
23
25
|
// library.add(faCheck);
|
|
@@ -39,31 +41,9 @@ class SdsColorPickerComponent {
|
|
|
39
41
|
onKeyDown($event) {
|
|
40
42
|
if ($event.key === 'ArrowUp' || $event.key === 'ArrowDown') {
|
|
41
43
|
$event.preventDefault();
|
|
42
|
-
// const modifier = $event.key === 'ArrowUp' ? -this.gridSize : this.gridSize;
|
|
43
|
-
// const color = this.selectedColor || this.defaultColor;
|
|
44
|
-
// if (color) {
|
|
45
|
-
// const colorIndex = this.colors.indexOf(color);
|
|
46
|
-
// let nextColorIndex = (colorIndex + modifier) % this.colors.length;
|
|
47
|
-
// if (nextColorIndex < 0) {
|
|
48
|
-
// nextColorIndex = this.colors.length + modifier;
|
|
49
|
-
// }
|
|
50
|
-
// this.selectedColor = this.colors[nextColorIndex];
|
|
51
|
-
// console.log(nextColorIndex);
|
|
52
|
-
// }
|
|
53
44
|
}
|
|
54
45
|
if ($event.key === 'ArrowLeft' || $event.key === 'ArrowRight') {
|
|
55
46
|
$event.preventDefault();
|
|
56
|
-
// const modifier = $event.key === 'ArrowLeft' ? -1 : 1;
|
|
57
|
-
// const color = this.selectedColor || this.defaultColor;
|
|
58
|
-
// if (color) {
|
|
59
|
-
// const colorIndex = this.colors.indexOf(color);
|
|
60
|
-
// let nextColorIndex = (colorIndex + modifier) % this.colors.length;
|
|
61
|
-
// if (nextColorIndex < 0) {
|
|
62
|
-
// nextColorIndex = this.colors.length + modifier;
|
|
63
|
-
// }
|
|
64
|
-
// this.selectedColor = this.colors[nextColorIndex];
|
|
65
|
-
// console.log(nextColorIndex);
|
|
66
|
-
// }
|
|
67
47
|
}
|
|
68
48
|
}
|
|
69
49
|
toggleDropdown() {
|
|
@@ -71,10 +51,10 @@ class SdsColorPickerComponent {
|
|
|
71
51
|
}
|
|
72
52
|
}
|
|
73
53
|
SdsColorPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsColorPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
74
|
-
SdsColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsColorPickerComponent, selector: "sds-color-picker", inputs: { colors: "colors", disabled: "disabled", selectedColor: "selectedColor", defaultColor: "defaultColor", style: "style" }, outputs: { selectedColorChange: "selectedColorChange" }, usesOnChanges: true, ngImport: i0, template: "<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n [style.border-color]=\"color\"\r\n class=\"color-tile\"\r\n [class.selected]=\"selectedColor === color\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"['fas', 'check']\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n\r\n<button\r\n *ngIf=\"style
|
|
54
|
+
SdsColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsColorPickerComponent, selector: "sds-color-picker", inputs: { colors: "colors", disabled: "disabled", selectedColor: "selectedColor", defaultColor: "defaultColor", style: "style", showCaret: "showCaret", shape: "shape" }, outputs: { selectedColorChange: "selectedColorChange" }, usesOnChanges: true, ngImport: i0, template: "<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n [style.--sds-cp-radius]=\"shape === 'square' ? squareRadius : circleRadius\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n [style.border-color]=\"color\"\r\n class=\"color-tile\"\r\n [class.selected]=\"selectedColor === color\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"['fas', 'check']\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n\r\n<button\r\n *ngIf=\"style === 'dropdown'\"\r\n [id]=\"elementUUID\"\r\n type=\"button\"\r\n class=\"btn d-flex align-items-center\"\r\n [class.dropdown-toggle]=\"showCaret\"\r\n [style.--sds-cp-radius]=\"shape === 'square' ? squareRadius : circleRadius\"\r\n aria-controls=\"dropdown-basic\"\r\n (click)=\"toggleDropdown()\"\r\n (keydown)=\"onKeyDown($event)\"\r\n>\r\n\r\n <div\r\n class=\"color-tile color-tile-dropdown\"\r\n [style.background-color]=\"selectedColor || defaultColor\"\r\n [class.undefined-color]=\"!(selectedColor || defaultColor)\"\r\n >\r\n </div>\r\n</button>\r\n\r\n<dx-popover\r\n target=\"#{{elementUUID}}\"\r\n position=\"bottom\"\r\n [(visible)]=\"showDropdown\"\r\n>\r\n <div\r\n class=\"color-tiles-container-square\"\r\n [ngStyle]=\"{ 'grid-template-columns': dropdownGridTemplateColumns}\"\r\n [style.--sds-cp-radius]=\"shape === 'square' ? squareRadius : circleRadius\"\r\n >\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile color-tile-popover\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color || !selectedColor && defaultColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n\r\n </div>\r\n </div>\r\n</dx-popover>", styles: [".color-tiles-container-inline{display:flex;gap:.5rem;color:#fff}.color-tiles-container-square{display:grid;grid-gap:1rem;gap:1rem;color:#fff}.color-tile{height:2rem;width:2rem;display:flex;align-items:center;justify-content:center;border-radius:var(--sds-cp-radius);cursor:pointer}.color-tile.color-tile-popover:hover{filter:brightness(90%)}.color-tile fa-icon{line-height:1rem}.color-tile.undefined-color{border-color:gray;border-style:solid;border-width:1px}.btn:focus-visible{outline:0;box-shadow:0 0 0 .2rem #3b8fc240}.btn:active{border-color:transparent}\n"], components: [{ type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { type: i2.DxPopoverComponent, selector: "dx-popover", inputs: ["animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "elementAttr", "height", "hideEvent", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showEvent", "showTitle", "target", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "onTitleRendered", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "elementAttrChange", "heightChange", "hideEventChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showEventChange", "showTitleChange", "targetChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
75
55
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsColorPickerComponent, decorators: [{
|
|
76
56
|
type: Component,
|
|
77
|
-
args: [{ selector: 'sds-color-picker', template: "<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n [style.border-color]=\"color\"\r\n class=\"color-tile\"\r\n [class.selected]=\"selectedColor === color\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"['fas', 'check']\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n\r\n<button\r\n *ngIf=\"style
|
|
57
|
+
args: [{ selector: 'sds-color-picker', template: "<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n [style.--sds-cp-radius]=\"shape === 'square' ? squareRadius : circleRadius\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n [style.border-color]=\"color\"\r\n class=\"color-tile\"\r\n [class.selected]=\"selectedColor === color\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"['fas', 'check']\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n\r\n<button\r\n *ngIf=\"style === 'dropdown'\"\r\n [id]=\"elementUUID\"\r\n type=\"button\"\r\n class=\"btn d-flex align-items-center\"\r\n [class.dropdown-toggle]=\"showCaret\"\r\n [style.--sds-cp-radius]=\"shape === 'square' ? squareRadius : circleRadius\"\r\n aria-controls=\"dropdown-basic\"\r\n (click)=\"toggleDropdown()\"\r\n (keydown)=\"onKeyDown($event)\"\r\n>\r\n\r\n <div\r\n class=\"color-tile color-tile-dropdown\"\r\n [style.background-color]=\"selectedColor || defaultColor\"\r\n [class.undefined-color]=\"!(selectedColor || defaultColor)\"\r\n >\r\n </div>\r\n</button>\r\n\r\n<dx-popover\r\n target=\"#{{elementUUID}}\"\r\n position=\"bottom\"\r\n [(visible)]=\"showDropdown\"\r\n>\r\n <div\r\n class=\"color-tiles-container-square\"\r\n [ngStyle]=\"{ 'grid-template-columns': dropdownGridTemplateColumns}\"\r\n [style.--sds-cp-radius]=\"shape === 'square' ? squareRadius : circleRadius\"\r\n >\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile color-tile-popover\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color || !selectedColor && defaultColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n\r\n </div>\r\n </div>\r\n</dx-popover>", styles: [".color-tiles-container-inline{display:flex;gap:.5rem;color:#fff}.color-tiles-container-square{display:grid;grid-gap:1rem;gap:1rem;color:#fff}.color-tile{height:2rem;width:2rem;display:flex;align-items:center;justify-content:center;border-radius:var(--sds-cp-radius);cursor:pointer}.color-tile.color-tile-popover:hover{filter:brightness(90%)}.color-tile fa-icon{line-height:1rem}.color-tile.undefined-color{border-color:gray;border-style:solid;border-width:1px}.btn:focus-visible{outline:0;box-shadow:0 0 0 .2rem #3b8fc240}.btn:active{border-color:transparent}\n"] }]
|
|
78
58
|
}], ctorParameters: function () { return []; }, propDecorators: { colors: [{
|
|
79
59
|
type: Input
|
|
80
60
|
}], disabled: [{
|
|
@@ -87,6 +67,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
87
67
|
type: Output
|
|
88
68
|
}], style: [{
|
|
89
69
|
type: Input
|
|
70
|
+
}], showCaret: [{
|
|
71
|
+
type: Input
|
|
72
|
+
}], shape: [{
|
|
73
|
+
type: Input
|
|
90
74
|
}] } });
|
|
91
75
|
|
|
92
76
|
const components = [SdsColorPickerComponent];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-color-picker.mjs","sources":["../../../projects/ngx-sds-components/src/lib/color-picker/color-picker.component.ts","../../../projects/ngx-sds-components/src/lib/color-picker/color-picker.component.html","../../../projects/ngx-sds-components/src/lib/color-picker/color-picker.module.ts","../../../projects/ngx-sds-components/src/lib/color-picker/spicainternational-ngx-sds-components-src-lib-color-picker.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';\r\nimport { faCheck } from '@fortawesome/pro-solid-svg-icons';\r\n// import { library } from '@fortawesome/fontawesome-svg-core';\r\n// import { faCheck } from '@fortawesome/pro-solid-svg-icons';\r\n\r\n@Component({\r\n selector: 'sds-color-picker',\r\n templateUrl: './color-picker.component.html',\r\n styleUrls: ['./color-picker.component.scss'],\r\n})\r\nexport class SdsColorPickerComponent implements OnInit, OnChanges {\r\n @Input() colors: Array<string> = [];\r\n @Input() disabled: boolean = false;\r\n @Input() selectedColor?: string;\r\n @Input() defaultColor?: string;\r\n @Output() selectedColorChange: EventEmitter<string>;\r\n @Input() style: 'inline' | 'plain' | 'input' = 'inline'\r\n\r\n // public checkIcon = faCheck;\r\n public dropdownGridTemplateColumns?: string;\r\n public showDropdown = false;\r\n public elementUUID; // = 'sds-cp-' + crypto.randomUUID();\r\n\r\n public checkIcon = faCheck;\r\n\r\n private gridSize = 1;\r\n\r\n constructor() {\r\n this.selectedColorChange = new EventEmitter<string>();\r\n this.elementUUID = `sds-cp-${Math.ceil(Math.random() * 1000000)}`; \r\n\r\n // library.add(faCheck);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['colors']) {\r\n this.gridSize = Math.ceil(Math.sqrt(this.colors.length));\r\n this.dropdownGridTemplateColumns = `repeat(${this.gridSize}, 1fr)`;\r\n }\r\n }\r\n\r\n ngOnInit(): void {}\r\n\r\n public selectColor(color: string): void {\r\n if (!this.disabled) {\r\n this.selectedColor = color;\r\n this.selectedColorChange.emit(color);\r\n this.showDropdown = false;\r\n }\r\n }\r\n\r\n public onKeyDown($event: KeyboardEvent) {\r\n\r\n if ($event.key === 'ArrowUp' || $event.key === 'ArrowDown') {\r\n $event.preventDefault();\r\n // const modifier = $event.key === 'ArrowUp' ? -this.gridSize : this.gridSize;\r\n // const color = this.selectedColor || this.defaultColor;\r\n // if (color) {\r\n // const colorIndex = this.colors.indexOf(color);\r\n // let nextColorIndex = (colorIndex + modifier) % this.colors.length;\r\n // if (nextColorIndex < 0) {\r\n // nextColorIndex = this.colors.length + modifier;\r\n // }\r\n // this.selectedColor = this.colors[nextColorIndex];\r\n\r\n // console.log(nextColorIndex);\r\n // } \r\n }\r\n\r\n if ($event.key === 'ArrowLeft' || $event.key === 'ArrowRight') {\r\n $event.preventDefault();\r\n // const modifier = $event.key === 'ArrowLeft' ? -1 : 1;\r\n // const color = this.selectedColor || this.defaultColor;\r\n // if (color) {\r\n // const colorIndex = this.colors.indexOf(color);\r\n // let nextColorIndex = (colorIndex + modifier) % this.colors.length;\r\n // if (nextColorIndex < 0) {\r\n // nextColorIndex = this.colors.length + modifier;\r\n // }\r\n // this.selectedColor = this.colors[nextColorIndex];\r\n\r\n // console.log(nextColorIndex);\r\n // } \r\n } \r\n }\r\n\r\n \r\n public toggleDropdown(){\r\n this.showDropdown = !this.showDropdown;\r\n\r\n }\r\n}\r\n","<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n [style.border-color]=\"color\"\r\n class=\"color-tile\"\r\n [class.selected]=\"selectedColor === color\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"['fas', 'check']\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n\r\n<button\r\n *ngIf=\"style !== 'inline'\"\r\n [id]=\"elementUUID\"\r\n type=\"button\"\r\n class=\"btn d-flex align-items-center\"\r\n \r\n [class.dropdown-toggle]=\"style === 'input'\"\r\n [class.border]=\"style === 'input'\"\r\n \r\n [class.p-1]=\"style == 'plain'\"\r\n [class.rounded-circle]=\"style == 'plain'\"\r\n \r\n aria-controls=\"dropdown-basic\"\r\n (click)=\"toggleDropdown()\"\r\n (keydown)=\"onKeyDown($event)\"\r\n>\r\n\r\n <div\r\n class=\"color-tile color-tile-dropdown\"\r\n [class.color-tile-dropdown]=\"style === 'input'\"\r\n [style.background-color]=\"selectedColor || defaultColor\"\r\n [class.undefined-color]=\"!(selectedColor || defaultColor)\"\r\n >\r\n </div>\r\n <div \r\n *ngIf=\"style === 'input'\"\r\n class=\"caret ms-1\">\r\n </div>\r\n</button>\r\n\r\n<dx-popover\r\n target=\"#{{elementUUID}}\"\r\n position=\"bottom\"\r\n [(visible)]=\"showDropdown\"\r\n>\r\n <div\r\n class=\"color-tiles-container-square\"\r\n [ngStyle]=\"{ 'grid-template-columns': dropdownGridTemplateColumns}\"\r\n >\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile color-tile-popover rounded-circle\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color || !selectedColor && defaultColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n\r\n </div>\r\n </div>\r\n</dx-popover>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdsColorPickerComponent } from './color-picker.component';\r\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\r\nimport { DxPopoverModule } from 'devextreme-angular/ui/popover';\r\n\r\n\r\nconst components = [SdsColorPickerComponent];\r\n@NgModule({\r\n declarations: [\r\n ...components\r\n ],\r\n imports: [\r\n CommonModule,\r\n FontAwesomeModule,\r\n DxPopoverModule,\r\n ],\r\n exports: [\r\n ...components\r\n ]\r\n})\r\nexport class SdsColorPickerModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAEA;AACA;MAOa,uBAAuB,CAAA;AAiBhC,IAAA,WAAA,GAAA;QAhBS,IAAM,CAAA,MAAA,GAAkB,EAAE,CAAC;QAC3B,IAAQ,CAAA,QAAA,GAAY,KAAK,CAAC;QAI1B,IAAK,CAAA,KAAA,GAAiC,QAAQ,CAAA;QAIhD,IAAY,CAAA,YAAA,GAAG,KAAK,CAAC;QAGrB,IAAS,CAAA,SAAA,GAAG,OAAO,CAAC;QAEnB,IAAQ,CAAA,QAAA,GAAG,CAAC,CAAC;AAGjB,QAAA,IAAI,CAAC,mBAAmB,GAAG,IAAI,YAAY,EAAU,CAAC;AACtD,QAAA,IAAI,CAAC,WAAW,GAAG,CAAU,OAAA,EAAA,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC;;KAGrE;AAED,IAAA,WAAW,CAAC,OAAsB,EAAA;AAC9B,QAAA,IAAI,OAAO,CAAC,QAAQ,CAAC,EAAE;AACnB,YAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;YACzD,IAAI,CAAC,2BAA2B,GAAG,CAAA,OAAA,EAAU,IAAI,CAAC,QAAQ,QAAQ,CAAC;AACtE,SAAA;KACJ;AAED,IAAA,QAAQ,MAAW;AAEZ,IAAA,WAAW,CAAC,KAAa,EAAA;AAC5B,QAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;AAChB,YAAA,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;AAC3B,YAAA,IAAI,CAAC,mBAAmB,CAAC,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GAAG,UAAU;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,iBAAiB;wBACjB,eAAe;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;AACL,wBAAA,GAAG,UAAU;AAChB,qBAAA;AACF,iBAAA,CAAA;;;ACpBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-color-picker.mjs","sources":["../../../projects/ngx-sds-components/src/lib/color-picker/color-picker.component.ts","../../../projects/ngx-sds-components/src/lib/color-picker/color-picker.component.html","../../../projects/ngx-sds-components/src/lib/color-picker/color-picker.module.ts","../../../projects/ngx-sds-components/src/lib/color-picker/spicainternational-ngx-sds-components-src-lib-color-picker.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';\r\nimport { faCheck } from '@fortawesome/pro-solid-svg-icons';\r\n\r\n@Component({\r\n selector: 'sds-color-picker',\r\n templateUrl: './color-picker.component.html',\r\n styleUrls: ['./color-picker.component.scss'],\r\n})\r\nexport class SdsColorPickerComponent implements OnInit, OnChanges {\r\n @Input() colors: Array<string> = [];\r\n @Input() disabled: boolean = false;\r\n @Input() selectedColor?: string;\r\n @Input() defaultColor?: string;\r\n @Output() selectedColorChange: EventEmitter<string>;\r\n @Input() style: 'inline' | 'dropdown' = 'inline'\r\n @Input() showCaret: boolean = true;\r\n @Input() shape: 'circle' | 'square' = 'circle';\r\n\r\n // public checkIcon = faCheck;\r\n public dropdownGridTemplateColumns?: string;\r\n public showDropdown = false;\r\n public elementUUID; // = 'sds-cp-' + crypto.randomUUID();\r\n\r\n public checkIcon = faCheck;\r\n\r\n private gridSize = 1;\r\n\r\n public circleRadius = '100%';\r\n public squareRadius = '10%';\r\n\r\n constructor() {\r\n this.selectedColorChange = new EventEmitter<string>();\r\n this.elementUUID = `sds-cp-${Math.ceil(Math.random() * 1000000)}`; \r\n\r\n // library.add(faCheck);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['colors']) {\r\n this.gridSize = Math.ceil(Math.sqrt(this.colors.length));\r\n this.dropdownGridTemplateColumns = `repeat(${this.gridSize}, 1fr)`;\r\n }\r\n }\r\n\r\n ngOnInit(): void {}\r\n\r\n public selectColor(color: string): void {\r\n if (!this.disabled) {\r\n this.selectedColor = color;\r\n this.selectedColorChange.emit(color);\r\n this.showDropdown = false;\r\n }\r\n }\r\n\r\n public onKeyDown($event: KeyboardEvent) {\r\n\r\n if ($event.key === 'ArrowUp' || $event.key === 'ArrowDown') {\r\n $event.preventDefault(); \r\n }\r\n\r\n if ($event.key === 'ArrowLeft' || $event.key === 'ArrowRight') {\r\n $event.preventDefault(); \r\n } \r\n }\r\n\r\n \r\n public toggleDropdown(){\r\n this.showDropdown = !this.showDropdown;\r\n\r\n }\r\n}\r\n","<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n [style.--sds-cp-radius]=\"shape === 'square' ? squareRadius : circleRadius\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n [style.border-color]=\"color\"\r\n class=\"color-tile\"\r\n [class.selected]=\"selectedColor === color\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"['fas', 'check']\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n\r\n<button\r\n *ngIf=\"style === 'dropdown'\"\r\n [id]=\"elementUUID\"\r\n type=\"button\"\r\n class=\"btn d-flex align-items-center\"\r\n [class.dropdown-toggle]=\"showCaret\"\r\n [style.--sds-cp-radius]=\"shape === 'square' ? squareRadius : circleRadius\"\r\n aria-controls=\"dropdown-basic\"\r\n (click)=\"toggleDropdown()\"\r\n (keydown)=\"onKeyDown($event)\"\r\n>\r\n\r\n <div\r\n class=\"color-tile color-tile-dropdown\"\r\n [style.background-color]=\"selectedColor || defaultColor\"\r\n [class.undefined-color]=\"!(selectedColor || defaultColor)\"\r\n >\r\n </div>\r\n</button>\r\n\r\n<dx-popover\r\n target=\"#{{elementUUID}}\"\r\n position=\"bottom\"\r\n [(visible)]=\"showDropdown\"\r\n>\r\n <div\r\n class=\"color-tiles-container-square\"\r\n [ngStyle]=\"{ 'grid-template-columns': dropdownGridTemplateColumns}\"\r\n [style.--sds-cp-radius]=\"shape === 'square' ? squareRadius : circleRadius\"\r\n >\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile color-tile-popover\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color || !selectedColor && defaultColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n\r\n </div>\r\n </div>\r\n</dx-popover>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdsColorPickerComponent } from './color-picker.component';\r\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\r\nimport { DxPopoverModule } from 'devextreme-angular/ui/popover';\r\n\r\n\r\nconst components = [SdsColorPickerComponent];\r\n@NgModule({\r\n declarations: [\r\n ...components\r\n ],\r\n imports: [\r\n CommonModule,\r\n FontAwesomeModule,\r\n DxPopoverModule,\r\n ],\r\n exports: [\r\n ...components\r\n ]\r\n})\r\nexport class SdsColorPickerModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAQa,uBAAuB,CAAA;AAsBhC,IAAA,WAAA,GAAA;QArBS,IAAM,CAAA,MAAA,GAAkB,EAAE,CAAC;QAC3B,IAAQ,CAAA,QAAA,GAAY,KAAK,CAAC;QAI1B,IAAK,CAAA,KAAA,GAA0B,QAAQ,CAAA;QACvC,IAAS,CAAA,SAAA,GAAY,IAAI,CAAC;QAC1B,IAAK,CAAA,KAAA,GAAwB,QAAQ,CAAC;QAIxC,IAAY,CAAA,YAAA,GAAG,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