@bizy/core 20.4.4 → 20.5.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/fesm2022/bizy-core.mjs +547 -153
- package/fesm2022/bizy-core.mjs.map +1 -1
- package/index.d.ts +88 -28
- package/package.json +1 -1
- package/styles/variables.css +5 -2
package/fesm2022/bizy-core.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ChangeDetectorRef, ElementRef, EventEmitter, Output, Input, ChangeDetectionStrategy, Component, NgModule,
|
|
2
|
+
import { inject, ChangeDetectorRef, ElementRef, EventEmitter, Output, Input, ChangeDetectionStrategy, Component, NgModule, Renderer2, DOCUMENT as DOCUMENT$1, Injectable, Inject, Directive, ViewChild, ContentChildren, ContentChild, Pipe, ViewContainerRef, TemplateRef, RendererFactory2, HostListener, Host } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule, registerLocaleData, DatePipe
|
|
5
|
-
import { Subject, Subscription,
|
|
6
|
-
import { debounceTime, distinctUntilChanged, takeUntil, map, filter as filter$1
|
|
4
|
+
import { CommonModule, DOCUMENT, registerLocaleData, DatePipe } from '@angular/common';
|
|
5
|
+
import { BehaviorSubject, Subject, Subscription, filter, take as take$1, skip, auditTime, throttleTime, debounceTime as debounceTime$1, interval, fromEvent, merge } from 'rxjs';
|
|
6
|
+
import { skipWhile, take, debounceTime, distinctUntilChanged, takeUntil, map, filter as filter$1 } from 'rxjs/operators';
|
|
7
7
|
import html2canvas from 'html2canvas';
|
|
8
8
|
import * as i2 from 'angular-calendar';
|
|
9
9
|
import { CalendarNativeDateFormatter, CalendarModule, CalendarUtils, CalendarA11y, CalendarEventTitleFormatter, DateAdapter, CalendarDateFormatter } from 'angular-calendar';
|
|
@@ -99,6 +99,10 @@ var MIME_TYPE;
|
|
|
99
99
|
MIME_TYPE["MPEG"] = "audio/mpeg";
|
|
100
100
|
MIME_TYPE["WAV"] = "audio/wav";
|
|
101
101
|
})(MIME_TYPE || (MIME_TYPE = {}));
|
|
102
|
+
var MODE;
|
|
103
|
+
(function (MODE) {
|
|
104
|
+
MODE["NORMAL"] = "NORMAL";
|
|
105
|
+
})(MODE || (MODE = {}));
|
|
102
106
|
|
|
103
107
|
class BizyButtonComponent {
|
|
104
108
|
#elementRef = inject(ElementRef);
|
|
@@ -152,98 +156,460 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImpor
|
|
|
152
156
|
class BizyAudioPlayerComponent {
|
|
153
157
|
#document = inject(DOCUMENT);
|
|
154
158
|
#renderer = inject(Renderer2);
|
|
159
|
+
#ref = inject(ChangeDetectorRef);
|
|
155
160
|
#elementRef = inject(ElementRef);
|
|
156
161
|
id = `bizy-audio-player-${Math.random()}`;
|
|
157
|
-
|
|
162
|
+
enableLogs = false;
|
|
158
163
|
audioPlayerError = 'Error';
|
|
159
164
|
showDownload = true;
|
|
160
165
|
autoplay = false;
|
|
161
166
|
disabled = false;
|
|
162
167
|
downloadURL;
|
|
163
168
|
downloadFileName = 'bizy_audio';
|
|
169
|
+
onTrackPlayerRate = new EventEmitter();
|
|
164
170
|
onDownload = new EventEmitter();
|
|
171
|
+
canPlay = new EventEmitter();
|
|
172
|
+
onPause = new EventEmitter();
|
|
173
|
+
onEnded = new EventEmitter();
|
|
174
|
+
onStalled = new EventEmitter();
|
|
175
|
+
onAbort = new EventEmitter();
|
|
176
|
+
onError = new EventEmitter();
|
|
177
|
+
onEmptied = new EventEmitter();
|
|
165
178
|
canPlayThrough = new EventEmitter();
|
|
166
|
-
|
|
179
|
+
durationChange = new EventEmitter();
|
|
180
|
+
onLoadedData = new EventEmitter();
|
|
181
|
+
onLoadedMetadata = new EventEmitter();
|
|
182
|
+
onLoadStart = new EventEmitter();
|
|
183
|
+
onPlay = new EventEmitter();
|
|
184
|
+
onPlaying = new EventEmitter();
|
|
185
|
+
onProgress = new EventEmitter();
|
|
186
|
+
onRateChange = new EventEmitter();
|
|
187
|
+
onSeeked = new EventEmitter();
|
|
188
|
+
onSeeking = new EventEmitter();
|
|
189
|
+
onSuspend = new EventEmitter();
|
|
190
|
+
onTimeUpdate = new EventEmitter();
|
|
191
|
+
onVolumeChange = new EventEmitter();
|
|
192
|
+
onWaiting = new EventEmitter();
|
|
193
|
+
#abortAbortController = new AbortController();
|
|
194
|
+
#canPlayAbortController = new AbortController();
|
|
195
|
+
#canPlayThroughAbortController = new AbortController();
|
|
196
|
+
#pauseAbortController = new AbortController();
|
|
197
|
+
#endedAbortController = new AbortController();
|
|
198
|
+
#emptiedAbortController = new AbortController();
|
|
199
|
+
#errorAbortController = new AbortController();
|
|
200
|
+
#stalledAbortController = new AbortController();
|
|
201
|
+
#durationChangeAbortController = new AbortController();
|
|
202
|
+
#loadedDataAbortController = new AbortController();
|
|
203
|
+
#loadedMetadataAbortController = new AbortController();
|
|
204
|
+
#loadStartAbortController = new AbortController();
|
|
205
|
+
#playAbortController = new AbortController();
|
|
206
|
+
#playingAbortController = new AbortController();
|
|
207
|
+
#progressAbortController = new AbortController();
|
|
208
|
+
#rateChangeAbortController = new AbortController();
|
|
209
|
+
#seekedAbortController = new AbortController();
|
|
210
|
+
#seekingAbortController = new AbortController();
|
|
211
|
+
#suspendAbortController = new AbortController();
|
|
212
|
+
#timeUpdateAbortController = new AbortController();
|
|
213
|
+
#volumeChangeAbortController = new AbortController();
|
|
214
|
+
#waitingAbortController = new AbortController();
|
|
215
|
+
#afterViewInit = new BehaviorSubject(false);
|
|
216
|
+
MIME_TYPE = MIME_TYPE;
|
|
217
|
+
MODE = MODE;
|
|
218
|
+
BACKWARD_SECONDS = -15;
|
|
219
|
+
FORWARD_SECONDS = 15;
|
|
220
|
+
_duration = 0;
|
|
221
|
+
_currentTime = 0;
|
|
222
|
+
_paused = true;
|
|
223
|
+
#normalRef;
|
|
224
|
+
_mode = MODE.NORMAL;
|
|
225
|
+
_audioURL = null;
|
|
226
|
+
_playbackRate = 1;
|
|
227
|
+
_loading = false;
|
|
228
|
+
#trackPlaybackRate$ = new Subject();
|
|
229
|
+
#subscription = new Subscription();
|
|
230
|
+
get duration() {
|
|
231
|
+
return this._duration;
|
|
232
|
+
}
|
|
233
|
+
get currentTime() {
|
|
234
|
+
return this._currentTime;
|
|
235
|
+
}
|
|
236
|
+
get paused() {
|
|
237
|
+
return this._paused;
|
|
238
|
+
}
|
|
167
239
|
set audioURL(audioURL) {
|
|
168
240
|
if (!audioURL) {
|
|
241
|
+
this.#removeListeners();
|
|
242
|
+
this._currentTime = 0;
|
|
243
|
+
this._duration = 0;
|
|
244
|
+
this._paused = true;
|
|
245
|
+
this.#normalRef = null;
|
|
246
|
+
this.#ref.detectChanges();
|
|
169
247
|
return;
|
|
170
248
|
}
|
|
171
|
-
this._ready = false;
|
|
172
249
|
this._audioURL = audioURL;
|
|
173
|
-
if (
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
250
|
+
if (this._mode === MODE.NORMAL) {
|
|
251
|
+
this.#onNormal();
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
set mode(mode) {
|
|
255
|
+
if (!mode) {
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
this._mode = mode;
|
|
259
|
+
this.#ref.detectChanges();
|
|
260
|
+
if (this._audioURL) {
|
|
261
|
+
if (this._mode === MODE.NORMAL) {
|
|
262
|
+
this.#onNormal();
|
|
186
263
|
}
|
|
187
264
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
265
|
+
}
|
|
266
|
+
ngAfterViewInit() {
|
|
267
|
+
this.#afterViewInit.next(true);
|
|
268
|
+
}
|
|
269
|
+
getNativeElement = () => this.#elementRef?.nativeElement;
|
|
270
|
+
#onNormal() {
|
|
271
|
+
this.#removeListeners();
|
|
272
|
+
this.#subscription = new Subscription();
|
|
273
|
+
this.#subscription.add(this.#afterViewInit.pipe(skipWhile(val => !val), take(1)).subscribe(() => {
|
|
274
|
+
this.#normalRef = this.#document.getElementById(this.id);
|
|
275
|
+
if (!this.#normalRef) {
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
this.#addEventListeners(this.#normalRef);
|
|
279
|
+
this.#normalRef.load();
|
|
192
280
|
if (this.autoplay) {
|
|
193
|
-
this
|
|
281
|
+
this.play();
|
|
194
282
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
if (this.#audioRef) {
|
|
200
|
-
this.#audioRef.load();
|
|
201
|
-
this._trackPlayerRate();
|
|
202
|
-
if (this.autoplay) {
|
|
203
|
-
this.#audioRef.play();
|
|
204
|
-
}
|
|
205
|
-
clearInterval(interval);
|
|
206
|
-
}
|
|
207
|
-
}, 300);
|
|
208
|
-
}
|
|
283
|
+
this.#trackPlayerRate();
|
|
284
|
+
this.#normalRef.playbackRate = this._playbackRate;
|
|
285
|
+
this.#ref.detectChanges();
|
|
286
|
+
}));
|
|
209
287
|
}
|
|
210
|
-
|
|
211
|
-
_ready = false;
|
|
212
|
-
#audioRef;
|
|
213
|
-
_playbackRate = 1;
|
|
214
|
-
#trackPlaybackRate$ = new Subject();
|
|
215
|
-
#subscription = new Subscription();
|
|
216
|
-
_trackPlayerRate() {
|
|
288
|
+
#trackPlayerRate() {
|
|
217
289
|
this.#subscription.add(this.#trackPlaybackRate$.pipe(debounceTime(500), distinctUntilChanged()).subscribe(value => {
|
|
218
290
|
this.onTrackPlayerRate.emit(value);
|
|
219
291
|
}));
|
|
220
292
|
}
|
|
221
|
-
|
|
222
|
-
if (!
|
|
293
|
+
#addEventListeners = (audio) => {
|
|
294
|
+
if (!audio) {
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
this.#abortAbortController = new AbortController();
|
|
298
|
+
this.#canPlayAbortController = new AbortController();
|
|
299
|
+
this.#canPlayThroughAbortController = new AbortController();
|
|
300
|
+
this.#durationChangeAbortController = new AbortController();
|
|
301
|
+
this.#emptiedAbortController = new AbortController();
|
|
302
|
+
this.#endedAbortController = new AbortController();
|
|
303
|
+
this.#errorAbortController = new AbortController();
|
|
304
|
+
this.#loadedDataAbortController = new AbortController();
|
|
305
|
+
this.#loadedMetadataAbortController = new AbortController();
|
|
306
|
+
this.#loadStartAbortController = new AbortController();
|
|
307
|
+
this.#pauseAbortController = new AbortController();
|
|
308
|
+
this.#playAbortController = new AbortController();
|
|
309
|
+
this.#playingAbortController = new AbortController();
|
|
310
|
+
this.#progressAbortController = new AbortController();
|
|
311
|
+
this.#rateChangeAbortController = new AbortController();
|
|
312
|
+
this.#seekedAbortController = new AbortController();
|
|
313
|
+
this.#seekingAbortController = new AbortController();
|
|
314
|
+
this.#stalledAbortController = new AbortController();
|
|
315
|
+
this.#suspendAbortController = new AbortController();
|
|
316
|
+
this.#timeUpdateAbortController = new AbortController();
|
|
317
|
+
this.#volumeChangeAbortController = new AbortController();
|
|
318
|
+
this.#waitingAbortController = new AbortController();
|
|
319
|
+
audio.addEventListener('abort', (event) => {
|
|
320
|
+
if (this.enableLogs) {
|
|
321
|
+
console.debug('bizy audio player - abort', event);
|
|
322
|
+
}
|
|
323
|
+
this.onAbort.emit(event);
|
|
324
|
+
}, {
|
|
325
|
+
signal: this.#abortAbortController.signal
|
|
326
|
+
});
|
|
327
|
+
audio.addEventListener('canplay', (event) => {
|
|
328
|
+
if (this.enableLogs) {
|
|
329
|
+
console.debug('bizy audio player - canplay', event);
|
|
330
|
+
}
|
|
331
|
+
this.canPlay.emit(event);
|
|
332
|
+
}, {
|
|
333
|
+
once: true,
|
|
334
|
+
signal: this.#canPlayAbortController.signal
|
|
335
|
+
});
|
|
336
|
+
audio.addEventListener('canplaythrough', (event) => {
|
|
337
|
+
if (this.enableLogs) {
|
|
338
|
+
console.debug('bizy audio player - canplaythrough', event);
|
|
339
|
+
}
|
|
340
|
+
this.canPlayThrough.emit(event);
|
|
341
|
+
}, {
|
|
342
|
+
signal: this.#canPlayThroughAbortController.signal
|
|
343
|
+
});
|
|
344
|
+
audio.addEventListener('durationchange', (event) => {
|
|
345
|
+
if (this.enableLogs) {
|
|
346
|
+
console.debug('bizy audio player - durationchange', event);
|
|
347
|
+
}
|
|
348
|
+
this.durationChange.emit(event);
|
|
349
|
+
}, {
|
|
350
|
+
signal: this.#durationChangeAbortController.signal
|
|
351
|
+
});
|
|
352
|
+
audio.addEventListener('emptied', (event) => {
|
|
353
|
+
if (this.enableLogs) {
|
|
354
|
+
console.debug('bizy audio player - emptied', event);
|
|
355
|
+
}
|
|
356
|
+
this.onEmptied.emit(event);
|
|
357
|
+
}, {
|
|
358
|
+
signal: this.#emptiedAbortController.signal
|
|
359
|
+
});
|
|
360
|
+
audio.addEventListener('ended', (event) => {
|
|
361
|
+
if (this.enableLogs) {
|
|
362
|
+
console.debug('bizy audio player - ended', event);
|
|
363
|
+
}
|
|
364
|
+
this._paused = true;
|
|
365
|
+
this.#ref.detectChanges();
|
|
366
|
+
this.onEnded.emit(event);
|
|
367
|
+
}, {
|
|
368
|
+
signal: this.#endedAbortController.signal
|
|
369
|
+
});
|
|
370
|
+
audio.addEventListener('error', (event) => {
|
|
371
|
+
if (this.enableLogs) {
|
|
372
|
+
console.debug('bizy audio player - error', event);
|
|
373
|
+
}
|
|
374
|
+
this.onError.emit(event);
|
|
375
|
+
}, {
|
|
376
|
+
signal: this.#errorAbortController.signal
|
|
377
|
+
});
|
|
378
|
+
audio.addEventListener('loadeddata', (event) => {
|
|
379
|
+
if (this.enableLogs) {
|
|
380
|
+
console.debug('bizy audio player - loadeddata', event);
|
|
381
|
+
}
|
|
382
|
+
const audio = this.#normalRef;
|
|
383
|
+
this._duration = audio.duration;
|
|
384
|
+
this.onLoadedData.emit(event);
|
|
385
|
+
}, {
|
|
386
|
+
signal: this.#loadedDataAbortController.signal
|
|
387
|
+
});
|
|
388
|
+
audio.addEventListener('loadedmetadata', (event) => {
|
|
389
|
+
if (this.enableLogs) {
|
|
390
|
+
console.debug('bizy audio player - loadedmetadata', event);
|
|
391
|
+
}
|
|
392
|
+
this.onLoadedMetadata.emit(event);
|
|
393
|
+
}, {
|
|
394
|
+
signal: this.#loadedMetadataAbortController.signal
|
|
395
|
+
});
|
|
396
|
+
audio.addEventListener('loadstart', (event) => {
|
|
397
|
+
if (this.enableLogs) {
|
|
398
|
+
console.debug('bizy audio player - loadstart', event);
|
|
399
|
+
}
|
|
400
|
+
this.onLoadStart.emit(event);
|
|
401
|
+
}, {
|
|
402
|
+
signal: this.#loadStartAbortController.signal
|
|
403
|
+
});
|
|
404
|
+
audio.addEventListener('pause', (event) => {
|
|
405
|
+
if (this.enableLogs) {
|
|
406
|
+
console.debug('bizy audio player - pause', event);
|
|
407
|
+
}
|
|
408
|
+
this._paused = true;
|
|
409
|
+
this.#ref.detectChanges();
|
|
410
|
+
this.onPause.emit(event);
|
|
411
|
+
}, {
|
|
412
|
+
signal: this.#pauseAbortController.signal
|
|
413
|
+
});
|
|
414
|
+
audio.addEventListener('play', (event) => {
|
|
415
|
+
if (this.enableLogs) {
|
|
416
|
+
console.debug('bizy audio player - play', event);
|
|
417
|
+
}
|
|
418
|
+
this._paused = false;
|
|
419
|
+
this.#ref.detectChanges();
|
|
420
|
+
this.onPlay.emit(event);
|
|
421
|
+
}, {
|
|
422
|
+
signal: this.#playAbortController.signal
|
|
423
|
+
});
|
|
424
|
+
audio.addEventListener('playing', (event) => {
|
|
425
|
+
if (this.enableLogs) {
|
|
426
|
+
console.debug('bizy audio player - playing', event);
|
|
427
|
+
}
|
|
428
|
+
this._paused = false;
|
|
429
|
+
this.#ref.detectChanges();
|
|
430
|
+
this.onPlaying.emit(event);
|
|
431
|
+
}, {
|
|
432
|
+
signal: this.#playingAbortController.signal
|
|
433
|
+
});
|
|
434
|
+
audio.addEventListener('progress', (event) => {
|
|
435
|
+
if (this.enableLogs) {
|
|
436
|
+
console.debug('bizy audio player - progress', event);
|
|
437
|
+
}
|
|
438
|
+
this.onProgress.emit(event);
|
|
439
|
+
}, {
|
|
440
|
+
signal: this.#progressAbortController.signal
|
|
441
|
+
});
|
|
442
|
+
audio.addEventListener('ratechange', (event) => {
|
|
443
|
+
if (this.enableLogs) {
|
|
444
|
+
console.debug('bizy audio player - ratechange', event);
|
|
445
|
+
}
|
|
446
|
+
this.onRateChange.emit(event);
|
|
447
|
+
}, {
|
|
448
|
+
signal: this.#rateChangeAbortController.signal
|
|
449
|
+
});
|
|
450
|
+
audio.addEventListener('seeked', (event) => {
|
|
451
|
+
if (this.enableLogs) {
|
|
452
|
+
console.debug('bizy audio player - seeked', event);
|
|
453
|
+
}
|
|
454
|
+
this.onSeeked.emit(event);
|
|
455
|
+
}, {
|
|
456
|
+
signal: this.#seekedAbortController.signal
|
|
457
|
+
});
|
|
458
|
+
audio.addEventListener('seeking', (event) => {
|
|
459
|
+
if (this.enableLogs) {
|
|
460
|
+
console.debug('bizy audio player - seeking', event);
|
|
461
|
+
}
|
|
462
|
+
this.onSeeking.emit(event);
|
|
463
|
+
}, {
|
|
464
|
+
signal: this.#seekingAbortController.signal
|
|
465
|
+
});
|
|
466
|
+
audio.addEventListener('stalled', (event) => {
|
|
467
|
+
if (this.enableLogs) {
|
|
468
|
+
console.debug('bizy audio player - stalled', event);
|
|
469
|
+
}
|
|
470
|
+
this.onStalled.emit(event);
|
|
471
|
+
}, {
|
|
472
|
+
signal: this.#stalledAbortController.signal
|
|
473
|
+
});
|
|
474
|
+
audio.addEventListener('suspend', (event) => {
|
|
475
|
+
if (this.enableLogs) {
|
|
476
|
+
console.debug('bizy audio player - suspend', event);
|
|
477
|
+
}
|
|
478
|
+
this.onSuspend.emit(event);
|
|
479
|
+
}, {
|
|
480
|
+
signal: this.#suspendAbortController.signal
|
|
481
|
+
});
|
|
482
|
+
audio.addEventListener('timeupdate', (event) => {
|
|
483
|
+
if (this.enableLogs) {
|
|
484
|
+
console.debug('bizy audio player - timeupdate', event);
|
|
485
|
+
}
|
|
486
|
+
this._currentTime = audio.currentTime;
|
|
487
|
+
this.onTimeUpdate.emit(event);
|
|
488
|
+
}, {
|
|
489
|
+
signal: this.#timeUpdateAbortController.signal
|
|
490
|
+
});
|
|
491
|
+
audio.addEventListener('volumechange', (event) => {
|
|
492
|
+
if (this.enableLogs) {
|
|
493
|
+
console.debug('bizy audio player - volumechange', event);
|
|
494
|
+
}
|
|
495
|
+
this.onVolumeChange.emit(event);
|
|
496
|
+
}, {
|
|
497
|
+
signal: this.#volumeChangeAbortController.signal
|
|
498
|
+
});
|
|
499
|
+
audio.addEventListener('waiting', (event) => {
|
|
500
|
+
if (this.enableLogs) {
|
|
501
|
+
console.debug('bizy audio player - waiting', event);
|
|
502
|
+
}
|
|
503
|
+
this.onWaiting.emit(event);
|
|
504
|
+
}, {
|
|
505
|
+
signal: this.#waitingAbortController.signal
|
|
506
|
+
});
|
|
507
|
+
};
|
|
508
|
+
#removeListeners = () => {
|
|
509
|
+
this.#subscription.unsubscribe();
|
|
510
|
+
this.#abortAbortController.abort();
|
|
511
|
+
this.#canPlayAbortController.abort();
|
|
512
|
+
this.#canPlayThroughAbortController.abort();
|
|
513
|
+
this.#durationChangeAbortController.abort();
|
|
514
|
+
this.#emptiedAbortController.abort();
|
|
515
|
+
this.#endedAbortController.abort();
|
|
516
|
+
this.#errorAbortController.abort();
|
|
517
|
+
this.#loadedDataAbortController.abort();
|
|
518
|
+
this.#loadedMetadataAbortController.abort();
|
|
519
|
+
this.#loadStartAbortController.abort();
|
|
520
|
+
this.#pauseAbortController.abort();
|
|
521
|
+
this.#playAbortController.abort();
|
|
522
|
+
this.#playingAbortController.abort();
|
|
523
|
+
this.#progressAbortController.abort();
|
|
524
|
+
this.#rateChangeAbortController.abort();
|
|
525
|
+
this.#seekedAbortController.abort();
|
|
526
|
+
this.#seekingAbortController.abort();
|
|
527
|
+
this.#stalledAbortController.abort();
|
|
528
|
+
this.#suspendAbortController.abort();
|
|
529
|
+
this.#timeUpdateAbortController.abort();
|
|
530
|
+
this.#volumeChangeAbortController.abort();
|
|
531
|
+
this.#waitingAbortController.abort();
|
|
532
|
+
};
|
|
533
|
+
async play() {
|
|
534
|
+
try {
|
|
535
|
+
if (this.disabled || !this._audioURL || !this._paused) {
|
|
536
|
+
return Promise.resolve();
|
|
537
|
+
}
|
|
538
|
+
this._paused = false;
|
|
539
|
+
this.#ref.detectChanges();
|
|
540
|
+
const audio = this.#normalRef;
|
|
541
|
+
if (!audio) {
|
|
542
|
+
this._paused = true;
|
|
543
|
+
this.#ref.detectChanges();
|
|
544
|
+
return Promise.resolve();
|
|
545
|
+
}
|
|
546
|
+
await audio.play();
|
|
547
|
+
}
|
|
548
|
+
catch (error) {
|
|
549
|
+
this._paused = true;
|
|
550
|
+
return Promise.reject();
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
async pause() {
|
|
554
|
+
try {
|
|
555
|
+
if (this.disabled || !this._audioURL || this._paused) {
|
|
556
|
+
return Promise.resolve();
|
|
557
|
+
}
|
|
558
|
+
this._paused = true;
|
|
559
|
+
this.#ref.detectChanges();
|
|
560
|
+
const audio = this.#normalRef;
|
|
561
|
+
if (!audio) {
|
|
562
|
+
this._paused = false;
|
|
563
|
+
this.#ref.detectChanges();
|
|
564
|
+
return Promise.resolve();
|
|
565
|
+
}
|
|
566
|
+
await audio.pause();
|
|
567
|
+
}
|
|
568
|
+
catch (error) {
|
|
569
|
+
this._paused = false;
|
|
570
|
+
return Promise.reject();
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
async stop() {
|
|
574
|
+
if (this.disabled || !this._audioURL) {
|
|
575
|
+
return Promise.resolve();
|
|
576
|
+
}
|
|
577
|
+
await this.pause();
|
|
578
|
+
this.seekTo(0);
|
|
579
|
+
}
|
|
580
|
+
seekTo(seconds) {
|
|
581
|
+
if (this.disabled || this._loading) {
|
|
223
582
|
return;
|
|
224
583
|
}
|
|
225
|
-
|
|
226
|
-
|
|
584
|
+
const audio = this.#normalRef;
|
|
585
|
+
if (audio.duration && seconds <= audio.duration) {
|
|
586
|
+
audio.currentTime = seconds;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
_onTrackPlayerRate() {
|
|
590
|
+
if (this.disabled || this._loading) {
|
|
591
|
+
return;
|
|
227
592
|
}
|
|
228
|
-
|
|
229
|
-
|
|
593
|
+
const audio = this.#normalRef;
|
|
594
|
+
if (audio) {
|
|
595
|
+
switch (audio.playbackRate) {
|
|
230
596
|
case 1:
|
|
231
|
-
|
|
597
|
+
audio.playbackRate = 1.5;
|
|
232
598
|
this._playbackRate = 1.5;
|
|
233
599
|
this.#trackPlaybackRate$.next('1.5');
|
|
234
600
|
break;
|
|
235
601
|
case 1.5:
|
|
236
|
-
|
|
602
|
+
audio.playbackRate = 2;
|
|
237
603
|
this._playbackRate = 2;
|
|
238
604
|
this.#trackPlaybackRate$.next('2');
|
|
239
605
|
break;
|
|
240
606
|
case 2:
|
|
241
|
-
|
|
607
|
+
audio.playbackRate = 1;
|
|
242
608
|
this._playbackRate = 1;
|
|
243
609
|
this.#trackPlaybackRate$.next('1');
|
|
244
610
|
break;
|
|
245
611
|
default:
|
|
246
|
-
|
|
612
|
+
audio.playbackRate = 1;
|
|
247
613
|
this._playbackRate = 1;
|
|
248
614
|
this.#trackPlaybackRate$.next('1');
|
|
249
615
|
}
|
|
@@ -261,19 +627,19 @@ class BizyAudioPlayerComponent {
|
|
|
261
627
|
this.#renderer.removeChild(this.#document.body, downloadButton);
|
|
262
628
|
this.onDownload.emit();
|
|
263
629
|
}
|
|
264
|
-
getNativeElement = () => this.#elementRef?.nativeElement;
|
|
265
630
|
ngOnDestroy() {
|
|
266
631
|
this.#subscription.unsubscribe();
|
|
632
|
+
this.#removeListeners();
|
|
267
633
|
}
|
|
268
634
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyAudioPlayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
269
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.5", type: BizyAudioPlayerComponent, isStandalone: true, selector: "bizy-audio-player", inputs: { id: "id",
|
|
635
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.5", type: BizyAudioPlayerComponent, isStandalone: true, selector: "bizy-audio-player", inputs: { id: "id", enableLogs: "enableLogs", audioPlayerError: "audioPlayerError", showDownload: "showDownload", autoplay: "autoplay", disabled: "disabled", downloadURL: "downloadURL", downloadFileName: "downloadFileName", audioURL: "audioURL", mode: "mode" }, outputs: { onTrackPlayerRate: "onTrackPlayerRate", onDownload: "onDownload", canPlay: "canPlay", onPause: "onPause", onEnded: "onEnded", onStalled: "onStalled", onAbort: "onAbort", onError: "onError", onEmptied: "onEmptied", canPlayThrough: "canPlayThrough", durationChange: "durationChange", onLoadedData: "onLoadedData", onLoadedMetadata: "onLoadedMetadata", onLoadStart: "onLoadStart", onPlay: "onPlay", onPlaying: "onPlaying", onProgress: "onProgress", onRateChange: "onRateChange", onSeeked: "onSeeked", onSeeking: "onSeeking", onSuspend: "onSuspend", onTimeUpdate: "onTimeUpdate", onVolumeChange: "onVolumeChange", onWaiting: "onWaiting" }, ngImport: i0, template: "<audio\n class=\"bizy-audio-player__normal animated fade-in\"\n [ngClass]=\"{'bizy-audio-player--disabled': disabled || !_audioURL, 'animated fade-in': !disabled }\"\n [id]=\"id\"\n *ngIf=\"_mode === MODE.NORMAL\"\n controls\n controlslist=\"nodownload noplaybackrate\">\n <source [src]=\"_audioURL\" [type]=\"MIME_TYPE.WAV\">\n <source [src]=\"_audioURL\" [type]=\"MIME_TYPE.OGG\">\n <source [src]=\"_audioURL\" [type]=\"MIME_TYPE.MPEG\">\n {{audioPlayerError}}\n</audio>\n\n<bizy-button class=\"bizy-audio-player__rate-button\" (onSelect)=\"_onTrackPlayerRate()\" [disabled]=\"disabled || !_audioURL || _loading\">\n <h6>{{_playbackRate}}x</h6>\n</bizy-button>\n\n<bizy-button class=\"bizy-audio-player__download-button\" *ngIf=\"showDownload\" (onSelect)=\"_onDownload()\" [disabled]=\"disabled || !_audioURL\">\n <svg \n class=\"bizy-audio-player__button__icon\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"/><polyline points=\"7 10 12 15 17 10\"/><line x1=\"12\" x2=\"12\" y1=\"15\" y2=\"3\"/>\n </svg>\n</bizy-button>\n", styles: [":host{font-size:1rem;max-width:var(--bizy-audio-player-max-width);flex:1;display:flex;justify-content:flex-end;align-items:center;column-gap:1rem}.bizy-audio-player__normal{flex:1;width:100%;overflow:hidden;min-width:var(--bizy-audio-player-min-width)}.bizy-audio-player--disabled{opacity:.5;pointer-events:none;cursor:not-allowed!important}.bizy-audio-player__rate-button{--bizy-button-min-width: 2rem;--bizy-button-background-color: var(--bizy-audio-player-rate-button-background-color);--bizy-button-color: var(--bizy-audio-player-rate-button-color)}.bizy-audio-player__download-button{--bizy-button-background-color: var(--bizy-audio-player-download-button-background-color);--bizy-button-color: var(--bizy-audio-player-download-button-color)}.bizy-audio-player__button__icon{height:1rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: BizyButtonModule }, { kind: "component", type: BizyButtonComponent, selector: "bizy-button", inputs: ["id", "disabled", "type", "customClass"], outputs: ["onSelect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
270
636
|
}
|
|
271
637
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyAudioPlayerComponent, decorators: [{
|
|
272
638
|
type: Component,
|
|
273
|
-
args: [{ selector: 'bizy-audio-player', imports: [CommonModule, BizyButtonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<audio\n class=\"bizy-audio-
|
|
639
|
+
args: [{ selector: 'bizy-audio-player', imports: [CommonModule, BizyButtonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<audio\n class=\"bizy-audio-player__normal animated fade-in\"\n [ngClass]=\"{'bizy-audio-player--disabled': disabled || !_audioURL, 'animated fade-in': !disabled }\"\n [id]=\"id\"\n *ngIf=\"_mode === MODE.NORMAL\"\n controls\n controlslist=\"nodownload noplaybackrate\">\n <source [src]=\"_audioURL\" [type]=\"MIME_TYPE.WAV\">\n <source [src]=\"_audioURL\" [type]=\"MIME_TYPE.OGG\">\n <source [src]=\"_audioURL\" [type]=\"MIME_TYPE.MPEG\">\n {{audioPlayerError}}\n</audio>\n\n<bizy-button class=\"bizy-audio-player__rate-button\" (onSelect)=\"_onTrackPlayerRate()\" [disabled]=\"disabled || !_audioURL || _loading\">\n <h6>{{_playbackRate}}x</h6>\n</bizy-button>\n\n<bizy-button class=\"bizy-audio-player__download-button\" *ngIf=\"showDownload\" (onSelect)=\"_onDownload()\" [disabled]=\"disabled || !_audioURL\">\n <svg \n class=\"bizy-audio-player__button__icon\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"/><polyline points=\"7 10 12 15 17 10\"/><line x1=\"12\" x2=\"12\" y1=\"15\" y2=\"3\"/>\n </svg>\n</bizy-button>\n", styles: [":host{font-size:1rem;max-width:var(--bizy-audio-player-max-width);flex:1;display:flex;justify-content:flex-end;align-items:center;column-gap:1rem}.bizy-audio-player__normal{flex:1;width:100%;overflow:hidden;min-width:var(--bizy-audio-player-min-width)}.bizy-audio-player--disabled{opacity:.5;pointer-events:none;cursor:not-allowed!important}.bizy-audio-player__rate-button{--bizy-button-min-width: 2rem;--bizy-button-background-color: var(--bizy-audio-player-rate-button-background-color);--bizy-button-color: var(--bizy-audio-player-rate-button-color)}.bizy-audio-player__download-button{--bizy-button-background-color: var(--bizy-audio-player-download-button-background-color);--bizy-button-color: var(--bizy-audio-player-download-button-color)}.bizy-audio-player__button__icon{height:1rem}\n"] }]
|
|
274
640
|
}], propDecorators: { id: [{
|
|
275
641
|
type: Input
|
|
276
|
-
}],
|
|
642
|
+
}], enableLogs: [{
|
|
277
643
|
type: Input
|
|
278
644
|
}], audioPlayerError: [{
|
|
279
645
|
type: Input
|
|
@@ -287,14 +653,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImpor
|
|
|
287
653
|
type: Input
|
|
288
654
|
}], downloadFileName: [{
|
|
289
655
|
type: Input
|
|
656
|
+
}], onTrackPlayerRate: [{
|
|
657
|
+
type: Output
|
|
290
658
|
}], onDownload: [{
|
|
291
659
|
type: Output
|
|
660
|
+
}], canPlay: [{
|
|
661
|
+
type: Output
|
|
662
|
+
}], onPause: [{
|
|
663
|
+
type: Output
|
|
664
|
+
}], onEnded: [{
|
|
665
|
+
type: Output
|
|
666
|
+
}], onStalled: [{
|
|
667
|
+
type: Output
|
|
668
|
+
}], onAbort: [{
|
|
669
|
+
type: Output
|
|
670
|
+
}], onError: [{
|
|
671
|
+
type: Output
|
|
672
|
+
}], onEmptied: [{
|
|
673
|
+
type: Output
|
|
292
674
|
}], canPlayThrough: [{
|
|
293
675
|
type: Output
|
|
294
|
-
}],
|
|
676
|
+
}], durationChange: [{
|
|
677
|
+
type: Output
|
|
678
|
+
}], onLoadedData: [{
|
|
679
|
+
type: Output
|
|
680
|
+
}], onLoadedMetadata: [{
|
|
681
|
+
type: Output
|
|
682
|
+
}], onLoadStart: [{
|
|
683
|
+
type: Output
|
|
684
|
+
}], onPlay: [{
|
|
685
|
+
type: Output
|
|
686
|
+
}], onPlaying: [{
|
|
687
|
+
type: Output
|
|
688
|
+
}], onProgress: [{
|
|
689
|
+
type: Output
|
|
690
|
+
}], onRateChange: [{
|
|
691
|
+
type: Output
|
|
692
|
+
}], onSeeked: [{
|
|
693
|
+
type: Output
|
|
694
|
+
}], onSeeking: [{
|
|
695
|
+
type: Output
|
|
696
|
+
}], onSuspend: [{
|
|
697
|
+
type: Output
|
|
698
|
+
}], onTimeUpdate: [{
|
|
699
|
+
type: Output
|
|
700
|
+
}], onVolumeChange: [{
|
|
701
|
+
type: Output
|
|
702
|
+
}], onWaiting: [{
|
|
295
703
|
type: Output
|
|
296
704
|
}], audioURL: [{
|
|
297
705
|
type: Input
|
|
706
|
+
}], mode: [{
|
|
707
|
+
type: Input
|
|
298
708
|
}] } });
|
|
299
709
|
|
|
300
710
|
const COMPONENTS$u = [
|
|
@@ -318,16 +728,14 @@ const GRID_BOTTOM = 30;
|
|
|
318
728
|
const DEFAULT_CHART_SIZE$2 = '300px';
|
|
319
729
|
class BizyBarLineChartComponent {
|
|
320
730
|
#elementRef = inject(ElementRef);
|
|
321
|
-
#document = inject(DOCUMENT);
|
|
731
|
+
#document = inject(DOCUMENT$1);
|
|
322
732
|
#ref = inject(ChangeDetectorRef);
|
|
323
733
|
#renderer = inject(Renderer2);
|
|
324
734
|
resizeRef = null;
|
|
325
|
-
tooltip =
|
|
735
|
+
tooltip = null;
|
|
326
736
|
download = null;
|
|
327
737
|
axisPointer = 'line';
|
|
328
|
-
|
|
329
|
-
onTooltipFormatter;
|
|
330
|
-
onXAxisLabelFormatter;
|
|
738
|
+
xAxis = null;
|
|
331
739
|
onDownload = new EventEmitter();
|
|
332
740
|
onSelect = new EventEmitter();
|
|
333
741
|
#echarts = null;
|
|
@@ -362,7 +770,7 @@ class BizyBarLineChartComponent {
|
|
|
362
770
|
this.#leftYAxis = 0;
|
|
363
771
|
this.#chartStacks = [];
|
|
364
772
|
this.#chartNames = [];
|
|
365
|
-
this.#subscription.add(this.#afterViewInit.pipe(filter(value => value === true), take(1)).subscribe(() => {
|
|
773
|
+
this.#subscription.add(this.#afterViewInit.pipe(filter(value => value === true), take$1(1)).subscribe(() => {
|
|
366
774
|
this.#createChartContainer();
|
|
367
775
|
if (!this.#chartContainer) {
|
|
368
776
|
return;
|
|
@@ -499,13 +907,13 @@ class BizyBarLineChartComponent {
|
|
|
499
907
|
}
|
|
500
908
|
});
|
|
501
909
|
const tooltip = {
|
|
502
|
-
show: this.tooltip,
|
|
910
|
+
show: this.tooltip?.show,
|
|
503
911
|
trigger: 'axis',
|
|
504
912
|
appendToBody: true,
|
|
505
913
|
axisPointer: {
|
|
506
914
|
type: this.axisPointer
|
|
507
915
|
},
|
|
508
|
-
formatter: this.
|
|
916
|
+
formatter: this.tooltip?.formatter
|
|
509
917
|
};
|
|
510
918
|
const grid = {
|
|
511
919
|
left: this.#leftYAxis > 2 ? (this.#leftYAxis - 2) * Y_AXIS_OFFSET : 10,
|
|
@@ -519,9 +927,9 @@ class BizyBarLineChartComponent {
|
|
|
519
927
|
axisTick: {
|
|
520
928
|
alignWithLabel: true
|
|
521
929
|
},
|
|
522
|
-
data: this.
|
|
930
|
+
data: this.xAxis?.labels,
|
|
523
931
|
axisLabel: {
|
|
524
|
-
formatter: this.
|
|
932
|
+
formatter: this.xAxis.formatter,
|
|
525
933
|
}
|
|
526
934
|
}
|
|
527
935
|
];
|
|
@@ -539,7 +947,7 @@ class BizyBarLineChartComponent {
|
|
|
539
947
|
show: true,
|
|
540
948
|
feature: {
|
|
541
949
|
mySaveAsImage: {
|
|
542
|
-
show:
|
|
950
|
+
show: this.download?.show,
|
|
543
951
|
icon: 'path://M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 242.7-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7 288 32zM64 352c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-101.5 0-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352 64 352zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z',
|
|
544
952
|
title: downloadTitle,
|
|
545
953
|
onclick: () => {
|
|
@@ -670,7 +1078,7 @@ class BizyBarLineChartComponent {
|
|
|
670
1078
|
}
|
|
671
1079
|
}
|
|
672
1080
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyBarLineChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
673
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.5", type: BizyBarLineChartComponent, isStandalone: true, selector: "bizy-bar-line-chart", inputs: { resizeRef: "resizeRef", tooltip: "tooltip", download: "download", axisPointer: "axisPointer",
|
|
1081
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.5", type: BizyBarLineChartComponent, isStandalone: true, selector: "bizy-bar-line-chart", inputs: { resizeRef: "resizeRef", tooltip: "tooltip", download: "download", axisPointer: "axisPointer", xAxis: "xAxis", data: "data" }, outputs: { onDownload: "onDownload", onSelect: "onSelect" }, ngImport: i0, template: '', isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
674
1082
|
}
|
|
675
1083
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyBarLineChartComponent, decorators: [{
|
|
676
1084
|
type: Component,
|
|
@@ -688,11 +1096,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImpor
|
|
|
688
1096
|
type: Input
|
|
689
1097
|
}], axisPointer: [{
|
|
690
1098
|
type: Input
|
|
691
|
-
}],
|
|
692
|
-
type: Input
|
|
693
|
-
}], onTooltipFormatter: [{
|
|
694
|
-
type: Input
|
|
695
|
-
}], onXAxisLabelFormatter: [{
|
|
1099
|
+
}], xAxis: [{
|
|
696
1100
|
type: Input
|
|
697
1101
|
}], onDownload: [{
|
|
698
1102
|
type: Output
|
|
@@ -1087,11 +1491,11 @@ class BizyCardComponent {
|
|
|
1087
1491
|
}
|
|
1088
1492
|
getNativeElement = () => this.#elementRef?.nativeElement;
|
|
1089
1493
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1090
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.5", type: BizyCardComponent, isStandalone: true, selector: "bizy-card", inputs: { id: "id", disabled: "disabled", selected: "selected", customClass: "customClass" }, outputs: { onSelect: "onSelect" }, ngImport: i0, template: "<button \n type=\"button\"\n (click)=\"_onSelect($event)\"\n (keyup.enter)=\"_onSelect($event)\"\n class=\"bizy-card {{customClass}}\"\n [ngClass]=\"{'bizy-card--disabled': disabled}\">\n\n <span class=\"bizy-card__header\">\n\n <span class=\"bizy-card__header__start bizy-card__slot\">\n <ng-content select=\"[slot=header-start]\"></ng-content>\n </span>\n\n <span class=\"bizy-card__header__end bizy-card__slot\">\n <ng-content select=\"[slot=header-end]\"></ng-content>\n </span>\n\n </span>\n\n <span class=\"bizy-card__content\">\n\n <ng-content></ng-content>\n\n </span>\n\n <span class=\"bizy-card__footer\">\n\n <span class=\"bizy-card__footer__start bizy-card__slot\">\n <ng-content select=\"[slot=footer-start]\"></ng-content>\n </span>\n\n <span class=\"bizy-card__footer__end bizy-card__slot\">\n <ng-content select=\"[slot=footer-end]\"></ng-content>\n </span>\n\n </span>\n\n</button>", styles: [":host{font-size:1rem;height:var(--bizy-card-height);min-height:var(--bizy-card-min-height);max-height:var(--bizy-card-max-height);width:var(--bizy-card-width);min-width:var(--bizy-card-min-width);max-width:var(--bizy-card-max-width)}.bizy-card{height:100%;width:100%;cursor:var(--bizy-card-cursor);border-top:var(--bizy-card-border-top, var(--bizy-card-border, none));border-right:var(--bizy-card-border-right, var(--bizy-card-border, none));border-bottom:var(--bizy-card-border-bottom, var(--bizy-card-border, none));border-left:var(--bizy-card-border-left, var(--bizy-card-border, none));border-radius:var(--bizy-card-border-radius);overflow:hidden;padding:var(--bizy-card-padding);display:flex;flex-direction:column;justify-content:space-between;row-gap
|
|
1494
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.5", type: BizyCardComponent, isStandalone: true, selector: "bizy-card", inputs: { id: "id", disabled: "disabled", selected: "selected", customClass: "customClass" }, outputs: { onSelect: "onSelect" }, ngImport: i0, template: "<button \n type=\"button\"\n (click)=\"_onSelect($event)\"\n (keyup.enter)=\"_onSelect($event)\"\n class=\"bizy-card {{customClass}}\"\n [ngClass]=\"{'bizy-card--disabled': disabled}\">\n\n <span class=\"bizy-card__header\">\n\n <span class=\"bizy-card__header__start bizy-card__slot\">\n <ng-content select=\"[slot=header-start]\"></ng-content>\n </span>\n\n <span class=\"bizy-card__header__end bizy-card__slot\">\n <ng-content select=\"[slot=header-end]\"></ng-content>\n </span>\n\n </span>\n\n <span class=\"bizy-card__content\">\n\n <ng-content></ng-content>\n\n </span>\n\n <span class=\"bizy-card__footer\">\n\n <span class=\"bizy-card__footer__start bizy-card__slot\">\n <ng-content select=\"[slot=footer-start]\"></ng-content>\n </span>\n\n <span class=\"bizy-card__footer__end bizy-card__slot\">\n <ng-content select=\"[slot=footer-end]\"></ng-content>\n </span>\n\n </span>\n\n</button>", styles: [":host{font-size:1rem;height:var(--bizy-card-height);min-height:var(--bizy-card-min-height);max-height:var(--bizy-card-max-height);width:var(--bizy-card-width);min-width:var(--bizy-card-min-width);max-width:var(--bizy-card-max-width)}.bizy-card{height:100%;width:100%;cursor:var(--bizy-card-cursor);border-top:var(--bizy-card-border-top, var(--bizy-card-border, none));border-right:var(--bizy-card-border-right, var(--bizy-card-border, none));border-bottom:var(--bizy-card-border-bottom, var(--bizy-card-border, none));border-left:var(--bizy-card-border-left, var(--bizy-card-border, none));border-radius:var(--bizy-card-border-radius);overflow:hidden;padding:var(--bizy-card-padding);display:flex;flex-direction:column;justify-content:space-between;row-gap:var(--bizy-card-row-gap);background-color:var(--bizy-card-background-color);transition:transform .25s ease-in-out;box-shadow:var(--bizy-card-box-shadow)}.bizy-card:hover{transform:translateY(-1px);box-shadow:var(--bizy-card-hover-box-shadow)}.bizy-card:has(>.bizy-card__content:empty)>.bizy-card__content{display:none}.bizy-card:has(>.bizy-card__content:empty)>.bizy-card__header:not(:empty){height:100%!important}.bizy-card:has(>.bizy-card__content:empty)>.bizy-card__footer:not(:empty){height:100%!important}.bizy-card--disabled{pointer-events:none;opacity:.5;cursor:not-allowed!important}.bizy-card__content:not(:empty){display:flex;align-items:center;column-gap:.5rem;height:100%;width:100%;background-color:var(--bizy-card-content-background-color)}.bizy-card__header:has(>.bizy-card__header__start:empty):has(>.bizy-card__header__end:empty){display:none}.bizy-card__header:not(:empty){width:100%;height:fit-content;display:grid;grid-template-columns:auto auto;align-items:center;column-gap:.5rem;background-color:var(--bizy-card-header-background-color)}.bizy-card__header__start{justify-content:flex-start}.bizy-card__header__end{justify-content:flex-end}.bizy-card__slot{width:100%;display:flex;align-items:center;column-gap:.5rem;height:100%;overflow:hidden}.bizy-card__footer:has(>.bizy-card__footer__start:empty):has(>.bizy-card__footer__end:empty){display:none}.bizy-card__footer:not(:empty){width:100%;height:fit-content;display:grid;grid-template-columns:auto auto;align-items:center;column-gap:.5rem;background-color:var(--bizy-card-footer-background-color)}.bizy-card__footer__start{justify-content:flex-start}.bizy-card__footer__end{justify-content:flex-end}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1091
1495
|
}
|
|
1092
1496
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyCardComponent, decorators: [{
|
|
1093
1497
|
type: Component,
|
|
1094
|
-
args: [{ selector: 'bizy-card', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button \n type=\"button\"\n (click)=\"_onSelect($event)\"\n (keyup.enter)=\"_onSelect($event)\"\n class=\"bizy-card {{customClass}}\"\n [ngClass]=\"{'bizy-card--disabled': disabled}\">\n\n <span class=\"bizy-card__header\">\n\n <span class=\"bizy-card__header__start bizy-card__slot\">\n <ng-content select=\"[slot=header-start]\"></ng-content>\n </span>\n\n <span class=\"bizy-card__header__end bizy-card__slot\">\n <ng-content select=\"[slot=header-end]\"></ng-content>\n </span>\n\n </span>\n\n <span class=\"bizy-card__content\">\n\n <ng-content></ng-content>\n\n </span>\n\n <span class=\"bizy-card__footer\">\n\n <span class=\"bizy-card__footer__start bizy-card__slot\">\n <ng-content select=\"[slot=footer-start]\"></ng-content>\n </span>\n\n <span class=\"bizy-card__footer__end bizy-card__slot\">\n <ng-content select=\"[slot=footer-end]\"></ng-content>\n </span>\n\n </span>\n\n</button>", styles: [":host{font-size:1rem;height:var(--bizy-card-height);min-height:var(--bizy-card-min-height);max-height:var(--bizy-card-max-height);width:var(--bizy-card-width);min-width:var(--bizy-card-min-width);max-width:var(--bizy-card-max-width)}.bizy-card{height:100%;width:100%;cursor:var(--bizy-card-cursor);border-top:var(--bizy-card-border-top, var(--bizy-card-border, none));border-right:var(--bizy-card-border-right, var(--bizy-card-border, none));border-bottom:var(--bizy-card-border-bottom, var(--bizy-card-border, none));border-left:var(--bizy-card-border-left, var(--bizy-card-border, none));border-radius:var(--bizy-card-border-radius);overflow:hidden;padding:var(--bizy-card-padding);display:flex;flex-direction:column;justify-content:space-between;row-gap
|
|
1498
|
+
args: [{ selector: 'bizy-card', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button \n type=\"button\"\n (click)=\"_onSelect($event)\"\n (keyup.enter)=\"_onSelect($event)\"\n class=\"bizy-card {{customClass}}\"\n [ngClass]=\"{'bizy-card--disabled': disabled}\">\n\n <span class=\"bizy-card__header\">\n\n <span class=\"bizy-card__header__start bizy-card__slot\">\n <ng-content select=\"[slot=header-start]\"></ng-content>\n </span>\n\n <span class=\"bizy-card__header__end bizy-card__slot\">\n <ng-content select=\"[slot=header-end]\"></ng-content>\n </span>\n\n </span>\n\n <span class=\"bizy-card__content\">\n\n <ng-content></ng-content>\n\n </span>\n\n <span class=\"bizy-card__footer\">\n\n <span class=\"bizy-card__footer__start bizy-card__slot\">\n <ng-content select=\"[slot=footer-start]\"></ng-content>\n </span>\n\n <span class=\"bizy-card__footer__end bizy-card__slot\">\n <ng-content select=\"[slot=footer-end]\"></ng-content>\n </span>\n\n </span>\n\n</button>", styles: [":host{font-size:1rem;height:var(--bizy-card-height);min-height:var(--bizy-card-min-height);max-height:var(--bizy-card-max-height);width:var(--bizy-card-width);min-width:var(--bizy-card-min-width);max-width:var(--bizy-card-max-width)}.bizy-card{height:100%;width:100%;cursor:var(--bizy-card-cursor);border-top:var(--bizy-card-border-top, var(--bizy-card-border, none));border-right:var(--bizy-card-border-right, var(--bizy-card-border, none));border-bottom:var(--bizy-card-border-bottom, var(--bizy-card-border, none));border-left:var(--bizy-card-border-left, var(--bizy-card-border, none));border-radius:var(--bizy-card-border-radius);overflow:hidden;padding:var(--bizy-card-padding);display:flex;flex-direction:column;justify-content:space-between;row-gap:var(--bizy-card-row-gap);background-color:var(--bizy-card-background-color);transition:transform .25s ease-in-out;box-shadow:var(--bizy-card-box-shadow)}.bizy-card:hover{transform:translateY(-1px);box-shadow:var(--bizy-card-hover-box-shadow)}.bizy-card:has(>.bizy-card__content:empty)>.bizy-card__content{display:none}.bizy-card:has(>.bizy-card__content:empty)>.bizy-card__header:not(:empty){height:100%!important}.bizy-card:has(>.bizy-card__content:empty)>.bizy-card__footer:not(:empty){height:100%!important}.bizy-card--disabled{pointer-events:none;opacity:.5;cursor:not-allowed!important}.bizy-card__content:not(:empty){display:flex;align-items:center;column-gap:.5rem;height:100%;width:100%;background-color:var(--bizy-card-content-background-color)}.bizy-card__header:has(>.bizy-card__header__start:empty):has(>.bizy-card__header__end:empty){display:none}.bizy-card__header:not(:empty){width:100%;height:fit-content;display:grid;grid-template-columns:auto auto;align-items:center;column-gap:.5rem;background-color:var(--bizy-card-header-background-color)}.bizy-card__header__start{justify-content:flex-start}.bizy-card__header__end{justify-content:flex-end}.bizy-card__slot{width:100%;display:flex;align-items:center;column-gap:.5rem;height:100%;overflow:hidden}.bizy-card__footer:has(>.bizy-card__footer__start:empty):has(>.bizy-card__footer__end:empty){display:none}.bizy-card__footer:not(:empty){width:100%;height:fit-content;display:grid;grid-template-columns:auto auto;align-items:center;column-gap:.5rem;background-color:var(--bizy-card-footer-background-color)}.bizy-card__footer__start{justify-content:flex-start}.bizy-card__footer__end{justify-content:flex-end}\n"] }]
|
|
1095
1499
|
}], propDecorators: { id: [{
|
|
1096
1500
|
type: Input
|
|
1097
1501
|
}], disabled: [{
|
|
@@ -1737,7 +2141,7 @@ const EN = {
|
|
|
1737
2141
|
};
|
|
1738
2142
|
class BizyFileUploaderService {
|
|
1739
2143
|
#renderer = inject(Renderer2);
|
|
1740
|
-
#document = inject(DOCUMENT);
|
|
2144
|
+
#document = inject(DOCUMENT$1);
|
|
1741
2145
|
#fileLoaded = new Subject();
|
|
1742
2146
|
#fileRemoved = new Subject();
|
|
1743
2147
|
#upload = new Subject();
|
|
@@ -2316,7 +2720,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImpor
|
|
|
2316
2720
|
|
|
2317
2721
|
class BizyFilterSectionComponent {
|
|
2318
2722
|
#elementRef = inject(ElementRef);
|
|
2319
|
-
#document = inject(DOCUMENT);
|
|
2723
|
+
#document = inject(DOCUMENT$1);
|
|
2320
2724
|
#ref = inject(ChangeDetectorRef);
|
|
2321
2725
|
checkboxOptions;
|
|
2322
2726
|
rangeOption;
|
|
@@ -2449,7 +2853,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImpor
|
|
|
2449
2853
|
|
|
2450
2854
|
class BizyFilterComponent {
|
|
2451
2855
|
#elementRef = inject(ElementRef);
|
|
2452
|
-
#document = inject(DOCUMENT);
|
|
2856
|
+
#document = inject(DOCUMENT$1);
|
|
2453
2857
|
#ref = inject(ChangeDetectorRef);
|
|
2454
2858
|
sections;
|
|
2455
2859
|
id = `bizy-filter-${Math.random()}`;
|
|
@@ -3016,7 +3420,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImpor
|
|
|
3016
3420
|
class BizyGridComponent {
|
|
3017
3421
|
#elementRef = inject(ElementRef);
|
|
3018
3422
|
#ref = inject(ChangeDetectorRef);
|
|
3019
|
-
#document = inject(DOCUMENT);
|
|
3423
|
+
#document = inject(DOCUMENT$1);
|
|
3020
3424
|
#renderer = inject(Renderer2);
|
|
3021
3425
|
virtualScroll;
|
|
3022
3426
|
content;
|
|
@@ -3171,18 +3575,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImpor
|
|
|
3171
3575
|
const DEFAULT_CHART_SIZE$1 = '300px';
|
|
3172
3576
|
class BizyHeatMapChartComponent {
|
|
3173
3577
|
#elementRef = inject(ElementRef);
|
|
3174
|
-
#document = inject(DOCUMENT
|
|
3578
|
+
#document = inject(DOCUMENT);
|
|
3175
3579
|
#ref = inject(ChangeDetectorRef);
|
|
3176
3580
|
#renderer = inject(Renderer2);
|
|
3177
3581
|
resizeRef = null;
|
|
3178
|
-
tooltip =
|
|
3179
|
-
ranges = [];
|
|
3582
|
+
tooltip = null;
|
|
3180
3583
|
download = null;
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
onXAxisLabelFormatter;
|
|
3185
|
-
onYAxisLabelFormatter;
|
|
3584
|
+
ranges = [];
|
|
3585
|
+
xAxis = null;
|
|
3586
|
+
yAxis = null;
|
|
3186
3587
|
onDownload = new EventEmitter();
|
|
3187
3588
|
onSelect = new EventEmitter();
|
|
3188
3589
|
#echarts = null;
|
|
@@ -3209,7 +3610,7 @@ class BizyHeatMapChartComponent {
|
|
|
3209
3610
|
}
|
|
3210
3611
|
async #setChartData(data) {
|
|
3211
3612
|
this.#data = data;
|
|
3212
|
-
this.#subscription.add(this.#afterViewInit.pipe(filter(value => value === true), take(1)).subscribe(() => {
|
|
3613
|
+
this.#subscription.add(this.#afterViewInit.pipe(filter(value => value === true), take$1(1)).subscribe(() => {
|
|
3213
3614
|
this.#createChartContainer();
|
|
3214
3615
|
if (!this.#chartContainer) {
|
|
3215
3616
|
return;
|
|
@@ -3222,7 +3623,7 @@ class BizyHeatMapChartComponent {
|
|
|
3222
3623
|
show: this.tooltip,
|
|
3223
3624
|
trigger: 'item',
|
|
3224
3625
|
appendToBody: true,
|
|
3225
|
-
formatter: this.
|
|
3626
|
+
formatter: this.tooltip?.formatter
|
|
3226
3627
|
};
|
|
3227
3628
|
const xAxis = [
|
|
3228
3629
|
{
|
|
@@ -3231,21 +3632,21 @@ class BizyHeatMapChartComponent {
|
|
|
3231
3632
|
show: true
|
|
3232
3633
|
},
|
|
3233
3634
|
position: 'top',
|
|
3234
|
-
data: this.
|
|
3635
|
+
data: this.xAxis?.labels,
|
|
3235
3636
|
axisLabel: {
|
|
3236
|
-
formatter: this.
|
|
3637
|
+
formatter: this.xAxis?.formatter,
|
|
3237
3638
|
}
|
|
3238
3639
|
}
|
|
3239
3640
|
];
|
|
3240
3641
|
const yAxis = [
|
|
3241
3642
|
{
|
|
3242
3643
|
type: 'category',
|
|
3243
|
-
data: this.
|
|
3644
|
+
data: this.yAxis?.labels,
|
|
3244
3645
|
splitArea: {
|
|
3245
3646
|
show: true
|
|
3246
3647
|
},
|
|
3247
3648
|
axisLabel: {
|
|
3248
|
-
formatter: this.
|
|
3649
|
+
formatter: this.yAxis?.formatter,
|
|
3249
3650
|
}
|
|
3250
3651
|
}
|
|
3251
3652
|
];
|
|
@@ -3268,7 +3669,7 @@ class BizyHeatMapChartComponent {
|
|
|
3268
3669
|
show: true,
|
|
3269
3670
|
feature: {
|
|
3270
3671
|
mySaveAsImage: {
|
|
3271
|
-
show:
|
|
3672
|
+
show: this.download?.show,
|
|
3272
3673
|
icon: 'path://M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 242.7-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7 288 32zM64 352c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-101.5 0-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352 64 352zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z',
|
|
3273
3674
|
title: downloadTitle,
|
|
3274
3675
|
onclick: () => {
|
|
@@ -3374,7 +3775,7 @@ class BizyHeatMapChartComponent {
|
|
|
3374
3775
|
}
|
|
3375
3776
|
}
|
|
3376
3777
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyHeatMapChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3377
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.5", type: BizyHeatMapChartComponent, isStandalone: true, selector: "bizy-heat-map-chart", inputs: { resizeRef: "resizeRef", tooltip: "tooltip",
|
|
3778
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.5", type: BizyHeatMapChartComponent, isStandalone: true, selector: "bizy-heat-map-chart", inputs: { resizeRef: "resizeRef", tooltip: "tooltip", download: "download", ranges: "ranges", xAxis: "xAxis", yAxis: "yAxis", data: "data" }, outputs: { onDownload: "onDownload", onSelect: "onSelect" }, ngImport: i0, template: '', isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3378
3779
|
}
|
|
3379
3780
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyHeatMapChartComponent, decorators: [{
|
|
3380
3781
|
type: Component,
|
|
@@ -3388,19 +3789,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImpor
|
|
|
3388
3789
|
type: Input
|
|
3389
3790
|
}], tooltip: [{
|
|
3390
3791
|
type: Input
|
|
3391
|
-
}], ranges: [{
|
|
3392
|
-
type: Input
|
|
3393
3792
|
}], download: [{
|
|
3394
3793
|
type: Input
|
|
3395
|
-
}],
|
|
3396
|
-
type: Input
|
|
3397
|
-
}], yAxisLabels: [{
|
|
3398
|
-
type: Input
|
|
3399
|
-
}], onTooltipFormatter: [{
|
|
3794
|
+
}], ranges: [{
|
|
3400
3795
|
type: Input
|
|
3401
|
-
}],
|
|
3796
|
+
}], xAxis: [{
|
|
3402
3797
|
type: Input
|
|
3403
|
-
}],
|
|
3798
|
+
}], yAxis: [{
|
|
3404
3799
|
type: Input
|
|
3405
3800
|
}], onDownload: [{
|
|
3406
3801
|
type: Output
|
|
@@ -3646,17 +4041,16 @@ const EMPTY_CHART = [0];
|
|
|
3646
4041
|
const DEFAULT_CHART_SIZE = '300px';
|
|
3647
4042
|
class BizyPieChartComponent {
|
|
3648
4043
|
#elementRef = inject(ElementRef);
|
|
3649
|
-
#document = inject(DOCUMENT);
|
|
4044
|
+
#document = inject(DOCUMENT$1);
|
|
3650
4045
|
#ref = inject(ChangeDetectorRef);
|
|
3651
4046
|
#renderer = inject(Renderer2);
|
|
3652
4047
|
resizeRef = null;
|
|
3653
|
-
tooltip = true;
|
|
3654
4048
|
centerLabel = null;
|
|
3655
4049
|
type = 'pie';
|
|
3656
4050
|
legend = null;
|
|
3657
4051
|
download = null;
|
|
3658
|
-
|
|
3659
|
-
|
|
4052
|
+
label = null;
|
|
4053
|
+
tooltip = null;
|
|
3660
4054
|
onSelect = new EventEmitter();
|
|
3661
4055
|
onDownload = new EventEmitter();
|
|
3662
4056
|
#echarts = null;
|
|
@@ -3683,7 +4077,7 @@ class BizyPieChartComponent {
|
|
|
3683
4077
|
}
|
|
3684
4078
|
}
|
|
3685
4079
|
async #setChartData(data) {
|
|
3686
|
-
this.#subscription.add(this.#afterViewInit.pipe(filter(value => value === true), take(1)).subscribe(() => {
|
|
4080
|
+
this.#subscription.add(this.#afterViewInit.pipe(filter(value => value === true), take$1(1)).subscribe(() => {
|
|
3687
4081
|
this.#createChartContainer();
|
|
3688
4082
|
if (!this.#chartContainer) {
|
|
3689
4083
|
return;
|
|
@@ -3708,35 +4102,37 @@ class BizyPieChartComponent {
|
|
|
3708
4102
|
else {
|
|
3709
4103
|
this.#data = EMPTY_CHART;
|
|
3710
4104
|
}
|
|
3711
|
-
const itemStyle = this.type === '
|
|
3712
|
-
emphasis: {
|
|
3713
|
-
label: {
|
|
3714
|
-
show: true
|
|
3715
|
-
}
|
|
3716
|
-
},
|
|
3717
|
-
normal: {
|
|
3718
|
-
label: {
|
|
3719
|
-
position: 'outer',
|
|
3720
|
-
formatter: this.onLabelFormatter
|
|
3721
|
-
},
|
|
3722
|
-
labelLine: {
|
|
3723
|
-
show: true
|
|
3724
|
-
}
|
|
3725
|
-
}
|
|
3726
|
-
} :
|
|
4105
|
+
const itemStyle = this.type === 'donut' ?
|
|
3727
4106
|
{
|
|
3728
4107
|
borderRadius: 10,
|
|
3729
4108
|
borderColor: '#fff',
|
|
3730
4109
|
borderWidth: 2
|
|
3731
|
-
};
|
|
3732
|
-
const label = this.
|
|
4110
|
+
} : {};
|
|
4111
|
+
const label = this.label ?
|
|
4112
|
+
{
|
|
4113
|
+
show: this.label.show ?? true,
|
|
4114
|
+
overflow: this.label.overflow ?? 'break',
|
|
4115
|
+
formatter: this.label?.formatter
|
|
4116
|
+
} :
|
|
4117
|
+
this.type === 'pie' ?
|
|
4118
|
+
{
|
|
4119
|
+
show: true
|
|
4120
|
+
} :
|
|
4121
|
+
{
|
|
4122
|
+
show: false,
|
|
4123
|
+
position: 'center'
|
|
4124
|
+
};
|
|
4125
|
+
const labelLine = {
|
|
4126
|
+
show: this.label?.line ?? true
|
|
4127
|
+
};
|
|
3733
4128
|
const series = [{
|
|
3734
4129
|
type: 'pie',
|
|
3735
4130
|
radius: this.type === 'pie' ? '50%' : ['50%', '70%'],
|
|
3736
4131
|
center: ['50%', '50%'],
|
|
3737
4132
|
data: this.#data,
|
|
3738
4133
|
itemStyle,
|
|
3739
|
-
label
|
|
4134
|
+
label,
|
|
4135
|
+
labelLine
|
|
3740
4136
|
}];
|
|
3741
4137
|
const textColor = this.#getClosestCssVariable(this.#elementRef.nativeElement, '--bizy-pie-chart-tooltip-color');
|
|
3742
4138
|
const textBackgroundColor = this.#getClosestCssVariable(this.#elementRef.nativeElement, '--bizy-pie-chart-tooltip-background-color');
|
|
@@ -3747,7 +4143,7 @@ class BizyPieChartComponent {
|
|
|
3747
4143
|
show: true,
|
|
3748
4144
|
feature: {
|
|
3749
4145
|
mySaveAsImage: {
|
|
3750
|
-
show:
|
|
4146
|
+
show: this.download?.show,
|
|
3751
4147
|
icon: 'path://M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 242.7-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7 288 32zM64 352c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-101.5 0-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352 64 352zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z',
|
|
3752
4148
|
title: downloadTitle,
|
|
3753
4149
|
onclick: () => {
|
|
@@ -3776,10 +4172,10 @@ class BizyPieChartComponent {
|
|
|
3776
4172
|
}
|
|
3777
4173
|
};
|
|
3778
4174
|
const tooltip = {
|
|
3779
|
-
show: this.tooltip,
|
|
4175
|
+
show: this.tooltip?.show,
|
|
3780
4176
|
trigger: 'item',
|
|
3781
4177
|
appendToBody: true,
|
|
3782
|
-
formatter: this.
|
|
4178
|
+
formatter: this.tooltip?.formatter
|
|
3783
4179
|
};
|
|
3784
4180
|
let legend = {};
|
|
3785
4181
|
if (this.legend) {
|
|
@@ -3891,7 +4287,7 @@ class BizyPieChartComponent {
|
|
|
3891
4287
|
}
|
|
3892
4288
|
}
|
|
3893
4289
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyPieChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3894
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.5", type: BizyPieChartComponent, isStandalone: true, selector: "bizy-pie-chart", inputs: { resizeRef: "resizeRef",
|
|
4290
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.5", type: BizyPieChartComponent, isStandalone: true, selector: "bizy-pie-chart", inputs: { resizeRef: "resizeRef", centerLabel: "centerLabel", type: "type", legend: "legend", download: "download", label: "label", tooltip: "tooltip", data: "data" }, outputs: { onSelect: "onSelect", onDownload: "onDownload" }, ngImport: i0, template: '', isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3895
4291
|
}
|
|
3896
4292
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyPieChartComponent, decorators: [{
|
|
3897
4293
|
type: Component,
|
|
@@ -3903,8 +4299,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImpor
|
|
|
3903
4299
|
}]
|
|
3904
4300
|
}], propDecorators: { resizeRef: [{
|
|
3905
4301
|
type: Input
|
|
3906
|
-
}], tooltip: [{
|
|
3907
|
-
type: Input
|
|
3908
4302
|
}], centerLabel: [{
|
|
3909
4303
|
type: Input
|
|
3910
4304
|
}], type: [{
|
|
@@ -3913,9 +4307,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImpor
|
|
|
3913
4307
|
type: Input
|
|
3914
4308
|
}], download: [{
|
|
3915
4309
|
type: Input
|
|
3916
|
-
}],
|
|
4310
|
+
}], label: [{
|
|
3917
4311
|
type: Input
|
|
3918
|
-
}],
|
|
4312
|
+
}], tooltip: [{
|
|
3919
4313
|
type: Input
|
|
3920
4314
|
}], onSelect: [{
|
|
3921
4315
|
type: Output
|
|
@@ -4129,7 +4523,7 @@ class BizyKeyboardService {
|
|
|
4129
4523
|
isControlHolding() {
|
|
4130
4524
|
return this.#controlHolding.value;
|
|
4131
4525
|
}
|
|
4132
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyKeyboardService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4526
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyKeyboardService, deps: [{ token: DOCUMENT$1 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4133
4527
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyKeyboardService, providedIn: 'root' });
|
|
4134
4528
|
}
|
|
4135
4529
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyKeyboardService, decorators: [{
|
|
@@ -4139,7 +4533,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImpor
|
|
|
4139
4533
|
}]
|
|
4140
4534
|
}], ctorParameters: () => [{ type: Document, decorators: [{
|
|
4141
4535
|
type: Inject,
|
|
4142
|
-
args: [DOCUMENT]
|
|
4536
|
+
args: [DOCUMENT$1]
|
|
4143
4537
|
}] }] });
|
|
4144
4538
|
|
|
4145
4539
|
class BizyExportToCSVService {
|
|
@@ -4218,7 +4612,7 @@ class BizyExportToCSVService {
|
|
|
4218
4612
|
downloadButton.click();
|
|
4219
4613
|
this.#renderer.removeChild(this.document.body, downloadButton);
|
|
4220
4614
|
}
|
|
4221
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyExportToCSVService, deps: [{ token: DOCUMENT }, { token: RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4615
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyExportToCSVService, deps: [{ token: DOCUMENT$1 }, { token: RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4222
4616
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyExportToCSVService, providedIn: 'root' });
|
|
4223
4617
|
}
|
|
4224
4618
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyExportToCSVService, decorators: [{
|
|
@@ -4228,7 +4622,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImpor
|
|
|
4228
4622
|
}]
|
|
4229
4623
|
}], ctorParameters: () => [{ type: Document, decorators: [{
|
|
4230
4624
|
type: Inject,
|
|
4231
|
-
args: [DOCUMENT]
|
|
4625
|
+
args: [DOCUMENT$1]
|
|
4232
4626
|
}] }, { type: i0.RendererFactory2, decorators: [{
|
|
4233
4627
|
type: Inject,
|
|
4234
4628
|
args: [RendererFactory2]
|
|
@@ -5189,7 +5583,7 @@ class BizyPopupService {
|
|
|
5189
5583
|
panelClass: Array.isArray(data.customClass) ? data.customClass : this.#validator.isString(data.customClass) ? [data.customClass] : []
|
|
5190
5584
|
}));
|
|
5191
5585
|
BizyPopupService.dialogs.add(dialogRef);
|
|
5192
|
-
dialogRef.closed.pipe(take(1)).subscribe(response => {
|
|
5586
|
+
dialogRef.closed.pipe(take$1(1)).subscribe(response => {
|
|
5193
5587
|
BizyPopupService.dialogs.delete(dialogRef);
|
|
5194
5588
|
if (callback) {
|
|
5195
5589
|
callback(response);
|
|
@@ -6339,7 +6733,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImpor
|
|
|
6339
6733
|
// https://github.com/angular/components/issues/15277
|
|
6340
6734
|
class BizyTableScrollingComponent {
|
|
6341
6735
|
#elementRef = inject(ElementRef);
|
|
6342
|
-
#document = inject(DOCUMENT);
|
|
6736
|
+
#document = inject(DOCUMENT$1);
|
|
6343
6737
|
#ref = inject(ChangeDetectorRef);
|
|
6344
6738
|
viewport;
|
|
6345
6739
|
content;
|
|
@@ -6355,7 +6749,7 @@ class BizyTableScrollingComponent {
|
|
|
6355
6749
|
return;
|
|
6356
6750
|
}
|
|
6357
6751
|
let itemSize = 30;
|
|
6358
|
-
const rowHeight = this.#getClosestCssVariable(this.#elementRef.nativeElement, '--
|
|
6752
|
+
const rowHeight = this.#getClosestCssVariable(this.#elementRef.nativeElement, '--bizy-table-row-height');
|
|
6359
6753
|
const fontSize = getComputedStyle(this.#document.documentElement).getPropertyValue('font-size');
|
|
6360
6754
|
const gap = Number(fontSize.split('px')[0]) * 0.1;
|
|
6361
6755
|
if (rowHeight && rowHeight.includes('rem')) {
|
|
@@ -6411,7 +6805,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImpor
|
|
|
6411
6805
|
|
|
6412
6806
|
class BizyTableComponent {
|
|
6413
6807
|
#elementRef = inject(ElementRef);
|
|
6414
|
-
#document = inject(DOCUMENT);
|
|
6808
|
+
#document = inject(DOCUMENT$1);
|
|
6415
6809
|
#ref = inject(ChangeDetectorRef);
|
|
6416
6810
|
#renderer = inject(Renderer2);
|
|
6417
6811
|
viewport;
|
|
@@ -6940,7 +7334,7 @@ var TOAST;
|
|
|
6940
7334
|
TOAST["DANGER"] = "danger";
|
|
6941
7335
|
})(TOAST || (TOAST = {}));
|
|
6942
7336
|
class BizyToastService {
|
|
6943
|
-
#document = inject(DOCUMENT);
|
|
7337
|
+
#document = inject(DOCUMENT$1);
|
|
6944
7338
|
#dialog = inject(Dialog);
|
|
6945
7339
|
static toasts = [];
|
|
6946
7340
|
duration = 3000;
|
|
@@ -8186,7 +8580,7 @@ class BizyTooltipDirective {
|
|
|
8186
8580
|
tooltipLongPressDuration = 500; // Milliseconds
|
|
8187
8581
|
#elementRef = inject(ElementRef);
|
|
8188
8582
|
#renderer = inject(Renderer2);
|
|
8189
|
-
#document = inject(DOCUMENT);
|
|
8583
|
+
#document = inject(DOCUMENT$1);
|
|
8190
8584
|
#tooltip;
|
|
8191
8585
|
#hiding;
|
|
8192
8586
|
#longPressTimeout = null;
|
|
@@ -8433,7 +8827,7 @@ class BizyAutoFocusDirective {
|
|
|
8433
8827
|
this.elementRef.nativeElement.focus();
|
|
8434
8828
|
this.ref.detectChanges();
|
|
8435
8829
|
}, 300);
|
|
8436
|
-
fromEvent(this.elementRef.nativeElement, 'focus').pipe(take
|
|
8830
|
+
fromEvent(this.elementRef.nativeElement, 'focus').pipe(take(1)).subscribe(() => {
|
|
8437
8831
|
clearInterval(interval);
|
|
8438
8832
|
});
|
|
8439
8833
|
}
|
|
@@ -8506,5 +8900,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImpor
|
|
|
8506
8900
|
* Generated bundle index. Do not edit.
|
|
8507
8901
|
*/
|
|
8508
8902
|
|
|
8509
|
-
export { BIZY_ANIMATION, BIZY_CALENDAR_DAY, BIZY_CALENDAR_EVENT_ACTION, BIZY_CALENDAR_LANGUAGE, BIZY_CALENDAR_MODE, BIZY_FORMAT_SECONDS_FORMAT, BIZY_FORMAT_SECONDS_LANGUAGE, BIZY_SKELETON_SHAPE, BIZY_TAG_TYPE, BizyAccordionComponent, BizyAccordionModule, BizyAnimationService, BizyAudioPlayerComponent, BizyAudioPlayerModule, BizyAutoFocusDirective, BizyAveragePipe, BizyBarLineChartComponent, BizyBarLineChartModule, BizyBreadcrumbComponent, BizyBreadcrumbModule, BizyButtonComponent, BizyButtonModule, BizyCacheService, BizyCalendarComponent, BizyCalendarModule, BizyCardComponent, BizyCardModule, BizyCheckboxComponent, BizyCheckboxModule, BizyContentComponent, BizyContentModule, BizyCopyToClipboardDirective, BizyCopyToClipboardService, BizyCurrencyFormatDirective, BizyDatePickerComponent, BizyDatePickerModule, BizyDeviceService, BizyDirectivesModule, BizyEnumToArrayPipe, BizyExportToCSVService, BizyExtractNumbersPipe, BizyFileUploaderComponent, BizyFileUploaderModule, BizyFileUploaderService, BizyFilterComponent, BizyFilterContentComponent, BizyFilterModule, BizyFilterPipe, BizyFilterSectionCheckboxOptionComponent, BizyFilterSectionComponent, BizyFilterSectionRangeOptionComponent, BizyFilterSectionSearchOptionComponent, BizyFilterSectionsComponent, BizyFormComponent, BizyFormModule, BizyFormatSecondsPipe, BizyFormatSecondsService, BizyFullScreenPopupWrapperComponent, BizyGridComponent, BizyGridForDirective, BizyGridModule, BizyGridRowComponent, BizyHeatMapChartComponent, BizyHeatMapChartModule, BizyInputComponent, BizyInputModule, BizyInputOptionComponent, BizyKeyboardService, BizyListComponent, BizyListModule, BizyLoadingDirective, BizyLogService, BizyLongPressDirective, BizyMenuComponent, BizyMenuModule, BizyMenuOptionComponent, BizyMenuTitleComponent, BizyOnlyNumbersDirective, BizyOnlyPhoneDigitsDirective, BizyOrderByPipe, BizyPieChartComponent, BizyPieChartModule, BizyPipesModule, BizyPopupModule, BizyPopupService, BizyPopupWrapperComponent, BizyProgressBarComponent, BizyProgressBarModule, BizyRadioComponent, BizyRadioModule, BizyRangeFilterPipe, BizyReducePipe, BizyReloadDirective, BizyRepeatPipe, BizyRouterService, BizySafePipe, BizySearchPipe, BizySectionCenterComponent, BizySectionComponent, BizySectionEndComponent, BizySectionModule, BizySectionStartComponent, BizySelectComponent, BizySelectModule, BizySelectOptionComponent, BizyServicesModule, BizySetToArrayPipe, BizySidebarComponent, BizySidebarFloatingOptionComponent, BizySidebarFloatingOptionTitleComponent, BizySidebarModule, BizySidebarOptionComponent, BizySkeletonComponent, BizySkeletonModule, BizySliderComponent, BizySliderModule, BizyStorageService, BizyTabComponent, BizyTableColumnArrowsComponent, BizyTableColumnComponent, BizyTableColumnFixedDirective, BizyTableComponent, BizyTableFooterComponent, BizyTableHeaderComponent, BizyTableModule, BizyTableRowComponent, BizyTableRowExpandContentComponent, BizyTableScrollingComponent, BizyTableScrollingDirective, BizyTabsComponent, BizyTabsModule, BizyTagComponent, BizyTagModule, BizyTextEllipsisDirective, BizyTimelineComponent, BizyTimelineEventComponent, BizyTimelineModule, BizyToastModule, BizyToastService, BizyToastWrapperComponent, BizyToggleComponent, BizyToggleModule, BizyToolbarComponent, BizyToolbarModule, BizyTooltipDirective, BizyTrackByIdDirective, BizyTranslateModule, BizyTranslatePipe, BizyTranslateService, BizyValidatorService, BizyViewportService, LANGUAGE, LOADING_TYPE, MIME_TYPE };
|
|
8903
|
+
export { BIZY_ANIMATION, BIZY_CALENDAR_DAY, BIZY_CALENDAR_EVENT_ACTION, BIZY_CALENDAR_LANGUAGE, BIZY_CALENDAR_MODE, BIZY_FORMAT_SECONDS_FORMAT, BIZY_FORMAT_SECONDS_LANGUAGE, BIZY_SKELETON_SHAPE, BIZY_TAG_TYPE, BizyAccordionComponent, BizyAccordionModule, BizyAnimationService, BizyAudioPlayerComponent, BizyAudioPlayerModule, BizyAutoFocusDirective, BizyAveragePipe, BizyBarLineChartComponent, BizyBarLineChartModule, BizyBreadcrumbComponent, BizyBreadcrumbModule, BizyButtonComponent, BizyButtonModule, BizyCacheService, BizyCalendarComponent, BizyCalendarModule, BizyCardComponent, BizyCardModule, BizyCheckboxComponent, BizyCheckboxModule, BizyContentComponent, BizyContentModule, BizyCopyToClipboardDirective, BizyCopyToClipboardService, BizyCurrencyFormatDirective, BizyDatePickerComponent, BizyDatePickerModule, BizyDeviceService, BizyDirectivesModule, BizyEnumToArrayPipe, BizyExportToCSVService, BizyExtractNumbersPipe, BizyFileUploaderComponent, BizyFileUploaderModule, BizyFileUploaderService, BizyFilterComponent, BizyFilterContentComponent, BizyFilterModule, BizyFilterPipe, BizyFilterSectionCheckboxOptionComponent, BizyFilterSectionComponent, BizyFilterSectionRangeOptionComponent, BizyFilterSectionSearchOptionComponent, BizyFilterSectionsComponent, BizyFormComponent, BizyFormModule, BizyFormatSecondsPipe, BizyFormatSecondsService, BizyFullScreenPopupWrapperComponent, BizyGridComponent, BizyGridForDirective, BizyGridModule, BizyGridRowComponent, BizyHeatMapChartComponent, BizyHeatMapChartModule, BizyInputComponent, BizyInputModule, BizyInputOptionComponent, BizyKeyboardService, BizyListComponent, BizyListModule, BizyLoadingDirective, BizyLogService, BizyLongPressDirective, BizyMenuComponent, BizyMenuModule, BizyMenuOptionComponent, BizyMenuTitleComponent, BizyOnlyNumbersDirective, BizyOnlyPhoneDigitsDirective, BizyOrderByPipe, BizyPieChartComponent, BizyPieChartModule, BizyPipesModule, BizyPopupModule, BizyPopupService, BizyPopupWrapperComponent, BizyProgressBarComponent, BizyProgressBarModule, BizyRadioComponent, BizyRadioModule, BizyRangeFilterPipe, BizyReducePipe, BizyReloadDirective, BizyRepeatPipe, BizyRouterService, BizySafePipe, BizySearchPipe, BizySectionCenterComponent, BizySectionComponent, BizySectionEndComponent, BizySectionModule, BizySectionStartComponent, BizySelectComponent, BizySelectModule, BizySelectOptionComponent, BizyServicesModule, BizySetToArrayPipe, BizySidebarComponent, BizySidebarFloatingOptionComponent, BizySidebarFloatingOptionTitleComponent, BizySidebarModule, BizySidebarOptionComponent, BizySkeletonComponent, BizySkeletonModule, BizySliderComponent, BizySliderModule, BizyStorageService, BizyTabComponent, BizyTableColumnArrowsComponent, BizyTableColumnComponent, BizyTableColumnFixedDirective, BizyTableComponent, BizyTableFooterComponent, BizyTableHeaderComponent, BizyTableModule, BizyTableRowComponent, BizyTableRowExpandContentComponent, BizyTableScrollingComponent, BizyTableScrollingDirective, BizyTabsComponent, BizyTabsModule, BizyTagComponent, BizyTagModule, BizyTextEllipsisDirective, BizyTimelineComponent, BizyTimelineEventComponent, BizyTimelineModule, BizyToastModule, BizyToastService, BizyToastWrapperComponent, BizyToggleComponent, BizyToggleModule, BizyToolbarComponent, BizyToolbarModule, BizyTooltipDirective, BizyTrackByIdDirective, BizyTranslateModule, BizyTranslatePipe, BizyTranslateService, BizyValidatorService, BizyViewportService, LANGUAGE, LOADING_TYPE, MIME_TYPE, MODE };
|
|
8510
8904
|
//# sourceMappingURL=bizy-core.mjs.map
|