@acorex/components 22.1.0-next.30 → 22.1.0-next.32
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/emoji/README.md +3 -0
- package/emojipicker/README.md +3 -0
- package/fesm2022/acorex-components-accordion.mjs +13 -13
- package/fesm2022/acorex-components-accordion.mjs.map +1 -1
- package/fesm2022/acorex-components-action-sheet.mjs +13 -13
- package/fesm2022/acorex-components-alert.mjs +7 -7
- package/fesm2022/acorex-components-aspect-ratio.mjs +3 -3
- package/fesm2022/acorex-components-audio-wave.mjs +295 -271
- package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
- package/fesm2022/acorex-components-autocomplete.mjs +7 -7
- package/fesm2022/acorex-components-avatar.mjs +10 -10
- package/fesm2022/acorex-components-badge.mjs +7 -7
- package/fesm2022/acorex-components-bottom-navigation.mjs +10 -10
- package/fesm2022/acorex-components-breadcrumbs.mjs +10 -10
- package/fesm2022/acorex-components-bubble.mjs +71 -0
- package/fesm2022/acorex-components-bubble.mjs.map +1 -0
- package/fesm2022/acorex-components-button-group.mjs +22 -15
- package/fesm2022/acorex-components-button-group.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +14 -14
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs +332 -130
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-check-box.mjs +7 -7
- package/fesm2022/acorex-components-chips.mjs +7 -7
- package/fesm2022/acorex-components-circular-progress.mjs +7 -7
- package/fesm2022/acorex-components-code-editor.mjs +44 -19
- package/fesm2022/acorex-components-code-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-color-box.mjs +7 -7
- package/fesm2022/acorex-components-color-palette.mjs +28 -28
- package/fesm2022/acorex-components-combo-box.mjs +244 -54
- package/fesm2022/acorex-components-combo-box.mjs.map +1 -1
- package/fesm2022/acorex-components-command.mjs +7 -7
- package/fesm2022/acorex-components-comment.mjs +28 -28
- package/fesm2022/acorex-components-conversation-acorex-components-conversation-BBWe3tfe.mjs +19099 -0
- package/fesm2022/acorex-components-conversation-acorex-components-conversation-BBWe3tfe.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-F5fLD_SK.mjs +50 -0
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-F5fLD_SK.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-image-picker-editor-dialog.component-Bk3ixvt2.mjs +87 -0
- package/fesm2022/acorex-components-conversation-image-picker-editor-dialog.component-Bk3ixvt2.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-picker-rename-file-dialog.component-OAHRGH_G.mjs +65 -0
- package/fesm2022/acorex-components-conversation-picker-rename-file-dialog.component-OAHRGH_G.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation.mjs +1 -15470
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-cron-job.mjs +47 -47
- package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
- package/fesm2022/acorex-components-data-list.mjs +3 -3
- package/fesm2022/acorex-components-data-pager.mjs +35 -35
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +734 -165
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +7 -7
- package/fesm2022/acorex-components-datetime-input.mjs +7 -7
- package/fesm2022/acorex-components-datetime-picker.mjs +8 -8
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +60 -30
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +11 -11
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +10 -10
- package/fesm2022/acorex-components-dropdown-button.mjs +8 -8
- package/fesm2022/acorex-components-dropdown-button.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +14 -14
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-editor.mjs +15 -14
- package/fesm2022/acorex-components-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-emoji.mjs +74 -0
- package/fesm2022/acorex-components-emoji.mjs.map +1 -0
- package/fesm2022/acorex-components-emojipicker.mjs +425 -0
- package/fesm2022/acorex-components-emojipicker.mjs.map +1 -0
- package/fesm2022/acorex-components-fab.mjs +6 -6
- package/fesm2022/acorex-components-fab.mjs.map +1 -1
- package/fesm2022/acorex-components-file-viewer.mjs +372 -122
- package/fesm2022/acorex-components-file-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +17 -17
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-grid-layout-builder.mjs +10 -10
- package/fesm2022/acorex-components-highlight.mjs +80 -0
- package/fesm2022/acorex-components-highlight.mjs.map +1 -0
- package/fesm2022/acorex-components-image-editor.mjs +780 -451
- package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-image.mjs +7 -7
- package/fesm2022/acorex-components-inline-reaction.mjs +111 -0
- package/fesm2022/acorex-components-inline-reaction.mjs.map +1 -0
- package/fesm2022/acorex-components-json-viewer.mjs +7 -7
- package/fesm2022/acorex-components-kanban.mjs +3 -3
- package/fesm2022/acorex-components-kanban.mjs.map +1 -1
- package/fesm2022/acorex-components-kbd.mjs +6 -6
- package/fesm2022/acorex-components-label.mjs +7 -7
- package/fesm2022/acorex-components-list.mjs +28 -9
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-loading-dialog.mjs +10 -10
- package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-loading.mjs +16 -16
- package/fesm2022/acorex-components-lookup.mjs +764 -156
- package/fesm2022/acorex-components-lookup.mjs.map +1 -1
- package/fesm2022/acorex-components-map.mjs +20 -13
- package/fesm2022/acorex-components-map.mjs.map +1 -1
- package/fesm2022/acorex-components-media-viewer.mjs +215 -218
- package/fesm2022/acorex-components-media-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +146 -45
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-message-status.mjs +71 -0
- package/fesm2022/acorex-components-message-status.mjs.map +1 -0
- package/fesm2022/acorex-components-message-time.mjs +36 -0
- package/fesm2022/acorex-components-message-time.mjs.map +1 -0
- package/fesm2022/acorex-components-message.mjs +120 -0
- package/fesm2022/acorex-components-message.mjs.map +1 -0
- package/fesm2022/acorex-components-navbar.mjs +7 -7
- package/fesm2022/acorex-components-notification.mjs +11 -11
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box.mjs +7 -7
- package/fesm2022/acorex-components-otp.mjs +7 -7
- package/fesm2022/acorex-components-page.mjs +10 -10
- package/fesm2022/acorex-components-paint.mjs +25 -25
- package/fesm2022/acorex-components-paint.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +10 -10
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-pdf-reader.mjs +7 -7
- package/fesm2022/acorex-components-phone-box.mjs +7 -7
- package/fesm2022/acorex-components-picker.mjs +13 -13
- package/fesm2022/acorex-components-popover.mjs +33 -15
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +67 -56
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs +7 -7
- package/fesm2022/acorex-components-qrcode.mjs +7 -7
- package/fesm2022/acorex-components-radio.mjs +7 -7
- package/fesm2022/acorex-components-rail-navigation.mjs +14 -14
- package/fesm2022/acorex-components-rail-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +9 -9
- package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-rate-picker.mjs +7 -7
- package/fesm2022/acorex-components-reaction.mjs +144 -0
- package/fesm2022/acorex-components-reaction.mjs.map +1 -0
- package/fesm2022/acorex-components-rest-api-generator.mjs +22 -22
- package/fesm2022/acorex-components-rest-api-generator.mjs.map +1 -1
- package/fesm2022/acorex-components-result.mjs +7 -7
- package/fesm2022/acorex-components-routing-progress.mjs +7 -7
- package/fesm2022/acorex-components-rrule.mjs +9 -9
- package/fesm2022/acorex-components-rrule.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler-picker.mjs +56 -56
- package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +34 -34
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-search-box.mjs +7 -7
- package/fesm2022/acorex-components-select-box.mjs +7 -7
- package/fesm2022/acorex-components-selection-list.mjs +7 -8
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-side-menu.mjs +55 -42
- package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-sidebar.mjs +28 -28
- package/fesm2022/acorex-components-skeleton.mjs +7 -7
- package/fesm2022/acorex-components-slider.mjs +7 -7
- package/fesm2022/acorex-components-sliding-item.mjs +13 -13
- package/fesm2022/acorex-components-step-wizard.mjs +16 -18
- package/fesm2022/acorex-components-step-wizard.mjs.map +1 -1
- package/fesm2022/acorex-components-switch.mjs +10 -10
- package/fesm2022/acorex-components-tabs.mjs +529 -78
- package/fesm2022/acorex-components-tabs.mjs.map +1 -1
- package/fesm2022/acorex-components-tag-box.mjs +7 -7
- package/fesm2022/acorex-components-tag.mjs +7 -7
- package/fesm2022/acorex-components-text-area.mjs +7 -7
- package/fesm2022/acorex-components-text-box.mjs +7 -7
- package/fesm2022/acorex-components-time-duration.mjs +7 -7
- package/fesm2022/acorex-components-time-line.mjs +10 -10
- package/fesm2022/acorex-components-toast.mjs +10 -10
- package/fesm2022/acorex-components-toolbar.mjs +7 -7
- package/fesm2022/acorex-components-tooltip.mjs +10 -10
- package/fesm2022/acorex-components-tree-view.mjs +58 -15
- package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
- package/fesm2022/acorex-components-uploader.mjs +13 -13
- package/fesm2022/acorex-components-video-player.mjs +7 -7
- package/fesm2022/acorex-components-wysiwyg.mjs +109 -39
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/highlight/README.md +13 -0
- package/inline-reaction/README.md +3 -0
- package/lookup/README.md +1 -1
- package/message/README.md +3 -0
- package/message-status/README.md +3 -0
- package/message-time/README.md +3 -0
- package/package.json +42 -12
- package/reaction/README.md +3 -0
- package/types/acorex-components-action-sheet.d.ts +1 -1
- package/types/acorex-components-audio-wave.d.ts +132 -73
- package/types/acorex-components-bubble.d.ts +31 -0
- package/types/acorex-components-button-group.d.ts +4 -0
- package/types/acorex-components-button.d.ts +1 -1
- package/types/acorex-components-calendar.d.ts +43 -12
- package/types/acorex-components-check-box.d.ts +1 -1
- package/types/acorex-components-code-editor.d.ts +4 -1
- package/types/acorex-components-color-box.d.ts +1 -1
- package/types/acorex-components-color-palette.d.ts +2 -2
- package/types/acorex-components-combo-box.d.ts +34 -4
- package/types/acorex-components-command.d.ts +1 -1
- package/types/acorex-components-conversation.d.ts +1771 -1342
- package/types/acorex-components-cron-job.d.ts +6 -6
- package/types/acorex-components-data-pager.d.ts +2 -2
- package/types/acorex-components-data-table.d.ts +194 -21
- package/types/acorex-components-datetime-box.d.ts +1 -1
- package/types/acorex-components-datetime-picker.d.ts +1 -1
- package/types/acorex-components-decorators.d.ts +13 -1
- package/types/acorex-components-dialog.d.ts +1 -1
- package/types/acorex-components-dropdown.d.ts +1 -1
- package/types/acorex-components-editor.d.ts +1 -1
- package/types/acorex-components-emoji.d.ts +42 -0
- package/types/acorex-components-emojipicker.d.ts +146 -0
- package/types/acorex-components-file-viewer.d.ts +50 -6
- package/types/acorex-components-highlight.d.ts +31 -0
- package/types/acorex-components-image-editor.d.ts +72 -50
- package/types/acorex-components-inline-reaction.d.ts +52 -0
- package/types/acorex-components-list.d.ts +12 -0
- package/types/acorex-components-loading-dialog.d.ts +1 -1
- package/types/acorex-components-loading.d.ts +1 -1
- package/types/acorex-components-lookup.d.ts +213 -82
- package/types/acorex-components-map.d.ts +7 -2
- package/types/acorex-components-media-viewer.d.ts +4 -3
- package/types/acorex-components-menu.d.ts +17 -5
- package/types/acorex-components-message-status.d.ts +23 -0
- package/types/acorex-components-message-time.d.ts +19 -0
- package/types/acorex-components-message.d.ts +59 -0
- package/types/acorex-components-notification.d.ts +1 -1
- package/types/acorex-components-number-box.d.ts +1 -1
- package/types/acorex-components-otp.d.ts +1 -1
- package/types/acorex-components-page.d.ts +2 -2
- package/types/acorex-components-paint.d.ts +2 -2
- package/types/acorex-components-password-box.d.ts +1 -1
- package/types/acorex-components-phone-box.d.ts +1 -1
- package/types/acorex-components-popover.d.ts +10 -4
- package/types/acorex-components-popup.d.ts +20 -10
- package/types/acorex-components-rail-navigation.d.ts +1 -1
- package/types/acorex-components-range-slider.d.ts +1 -1
- package/types/acorex-components-reaction.d.ts +85 -0
- package/types/acorex-components-rest-api-generator.d.ts +1 -1
- package/types/acorex-components-rrule.d.ts +1 -1
- package/types/acorex-components-scheduler-picker.d.ts +1 -1
- package/types/acorex-components-scheduler.d.ts +1 -1
- package/types/acorex-components-search-box.d.ts +1 -1
- package/types/acorex-components-selection-list.d.ts +1 -1
- package/types/acorex-components-side-menu.d.ts +6 -8
- package/types/acorex-components-slider.d.ts +1 -1
- package/types/acorex-components-step-wizard.d.ts +4 -4
- package/types/acorex-components-switch.d.ts +1 -1
- package/types/acorex-components-tabs.d.ts +150 -19
- package/types/acorex-components-tag-box.d.ts +2 -2
- package/types/acorex-components-text-area.d.ts +1 -1
- package/types/acorex-components-text-box.d.ts +1 -1
- package/types/acorex-components-time-duration.d.ts +1 -1
- package/types/acorex-components-toast.d.ts +1 -1
- package/types/acorex-components-tree-view.d.ts +32 -3
- package/types/acorex-components-wysiwyg.d.ts +15 -2
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-DCcRJYfF.mjs +0 -50
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-DCcRJYfF.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-DnSW908R.mjs +0 -210
- package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-DnSW908R.mjs.map +0 -1
- package/fesm2022/acorex-components-flow-chart.mjs +0 -735
- package/fesm2022/acorex-components-flow-chart.mjs.map +0 -1
- package/fesm2022/acorex-components-query-builder.mjs +0 -267
- package/fesm2022/acorex-components-query-builder.mjs.map +0 -1
- package/flow-chart/README.md +0 -3
- package/query-builder/README.md +0 -3
- package/types/acorex-components-flow-chart.d.ts +0 -187
- package/types/acorex-components-query-builder.d.ts +0 -52
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { AXComponent } from '@acorex/cdk/common';
|
|
2
|
-
import { AXSkeletonComponent
|
|
3
|
-
import { AXTranslatorPipe
|
|
4
|
-
import { isPlatformBrowser,
|
|
2
|
+
import { AXSkeletonComponent } from '@acorex/components/skeleton';
|
|
3
|
+
import { AXTranslatorPipe } from '@acorex/core/translation';
|
|
4
|
+
import { isPlatformBrowser, AsyncPipe } from '@angular/common';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { input, output, signal, inject, NgZone, PLATFORM_ID,
|
|
6
|
+
import { viewChild, input, output, signal, computed, inject, NgZone, PLATFORM_ID, DestroyRef, afterRenderEffect, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
|
7
7
|
import WaveSurfer from 'wavesurfer.js';
|
|
8
|
-
import { AXButtonModule } from '@acorex/components/button';
|
|
9
|
-
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
10
8
|
|
|
9
|
+
const DEFAULT_BAR_WIDTH = 2;
|
|
10
|
+
const DEFAULT_BAR_GAP = 2;
|
|
11
|
+
const DEFAULT_BAR_RADIUS = 2;
|
|
12
|
+
const DEFAULT_HEIGHT = 36;
|
|
13
|
+
const FALLBACK_RGB = '128, 128, 128';
|
|
11
14
|
/**
|
|
12
15
|
* Displays and interacts with audio waveform visualization.
|
|
13
16
|
*
|
|
@@ -15,9 +18,14 @@ import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
|
15
18
|
*/
|
|
16
19
|
class AXAudioWaveComponent {
|
|
17
20
|
/**
|
|
18
|
-
*
|
|
21
|
+
* @ignore
|
|
19
22
|
*/
|
|
20
23
|
constructor() {
|
|
24
|
+
/**
|
|
25
|
+
* @ignore
|
|
26
|
+
*/
|
|
27
|
+
this.wave = viewChild('wave', /* @ts-ignore */
|
|
28
|
+
...(ngDevMode ? [{ debugName: "wave" }] : /* istanbul ignore next */ []));
|
|
21
29
|
/**
|
|
22
30
|
* Configuration settings for the audio wave.
|
|
23
31
|
*/
|
|
@@ -29,58 +37,89 @@ class AXAudioWaveComponent {
|
|
|
29
37
|
* @event
|
|
30
38
|
*/
|
|
31
39
|
this.onStatusChanged = output();
|
|
32
|
-
|
|
40
|
+
/**
|
|
41
|
+
* @ignore
|
|
42
|
+
*/
|
|
43
|
+
this.audioState = signal('loading', /* @ts-ignore */
|
|
33
44
|
...(ngDevMode ? [{ debugName: "audioState" }] : /* istanbul ignore next */ []));
|
|
45
|
+
/**
|
|
46
|
+
* @ignore
|
|
47
|
+
*/
|
|
34
48
|
this.errorMessage = signal('', /* @ts-ignore */
|
|
35
49
|
...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
36
50
|
/**
|
|
37
|
-
*
|
|
51
|
+
* @ignore
|
|
52
|
+
*/
|
|
53
|
+
this.isWaveVisible = computed(() => {
|
|
54
|
+
const state = this.audioState();
|
|
55
|
+
return state === 'ready' || state === 'playing' || state === 'paused';
|
|
56
|
+
}, /* @ts-ignore */
|
|
57
|
+
...(ngDevMode ? [{ debugName: "isWaveVisible" }] : /* istanbul ignore next */ []));
|
|
58
|
+
/**
|
|
59
|
+
* @ignore
|
|
60
|
+
*/
|
|
61
|
+
this.loadedUrl = '';
|
|
62
|
+
/**
|
|
63
|
+
* @ignore
|
|
64
|
+
*/
|
|
65
|
+
this.lastVisualKey = '';
|
|
66
|
+
/**
|
|
67
|
+
* @ignore
|
|
68
|
+
*/
|
|
69
|
+
this.isDestroyed = false;
|
|
70
|
+
/**
|
|
71
|
+
* @ignore
|
|
38
72
|
*/
|
|
39
73
|
this.ngZone = inject(NgZone);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
height: this.config()?.height || 36,
|
|
54
|
-
});
|
|
74
|
+
/**
|
|
75
|
+
* @ignore
|
|
76
|
+
*/
|
|
77
|
+
this.platformId = inject(PLATFORM_ID);
|
|
78
|
+
/**
|
|
79
|
+
* @ignore
|
|
80
|
+
*/
|
|
81
|
+
this.destroyRef = inject(DestroyRef);
|
|
82
|
+
afterRenderEffect(() => {
|
|
83
|
+
const container = this.wave()?.nativeElement;
|
|
84
|
+
const config = this.config();
|
|
85
|
+
if (this.isDestroyed || !isPlatformBrowser(this.platformId) || !container) {
|
|
86
|
+
return;
|
|
55
87
|
}
|
|
56
|
-
this.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
this.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
this.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
});
|
|
67
|
-
this.bindEvents();
|
|
88
|
+
if (!this.audio) {
|
|
89
|
+
this.createWaveSurfer(container, config);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
this.syncFromConfig(config);
|
|
93
|
+
});
|
|
94
|
+
this.destroyRef.onDestroy(() => {
|
|
95
|
+
this.isDestroyed = true;
|
|
96
|
+
this.audio?.destroy();
|
|
97
|
+
this.audio = undefined;
|
|
68
98
|
});
|
|
69
99
|
}
|
|
70
100
|
/**
|
|
71
101
|
* Loads the audio from the specified URL.
|
|
72
102
|
*
|
|
73
103
|
* @param url - The URL of the audio to load. Defaults to the URL from the config.
|
|
104
|
+
* @returns A promise that resolves when loading starts, or immediately when unavailable.
|
|
74
105
|
*/
|
|
75
|
-
load(url = this.config()
|
|
76
|
-
|
|
106
|
+
load(url = this.config()?.url) {
|
|
107
|
+
const nextUrl = url?.trim();
|
|
108
|
+
if (!this.audio || !nextUrl) {
|
|
109
|
+
return Promise.resolve();
|
|
110
|
+
}
|
|
111
|
+
this.loadedUrl = nextUrl;
|
|
112
|
+
this.audioState.set('loading');
|
|
113
|
+
this.errorMessage.set('');
|
|
114
|
+
return this.swallowAbort(this.audio.load(nextUrl));
|
|
77
115
|
}
|
|
78
116
|
/**
|
|
79
117
|
* Plays the audio.
|
|
80
118
|
*
|
|
119
|
+
* @returns A promise that resolves when playback starts.
|
|
81
120
|
*/
|
|
82
121
|
play() {
|
|
83
|
-
return this.audio?.play();
|
|
122
|
+
return this.swallowAbort(this.audio?.play());
|
|
84
123
|
}
|
|
85
124
|
/**
|
|
86
125
|
* Pauses the audio.
|
|
@@ -89,296 +128,281 @@ class AXAudioWaveComponent {
|
|
|
89
128
|
this.audio?.pause();
|
|
90
129
|
}
|
|
91
130
|
/**
|
|
92
|
-
* Retrieves the duration of the audio.
|
|
131
|
+
* Retrieves the duration of the audio in seconds.
|
|
93
132
|
*
|
|
133
|
+
* @returns The audio duration, or `0` when unavailable.
|
|
94
134
|
*/
|
|
95
135
|
getDuration() {
|
|
96
136
|
return this.audio?.getDuration() ?? 0;
|
|
97
137
|
}
|
|
98
138
|
/**
|
|
99
|
-
* Retrieves the media element
|
|
139
|
+
* Retrieves the underlying HTML media element.
|
|
100
140
|
*
|
|
141
|
+
* @returns The media element used by WaveSurfer, or `undefined` when unavailable.
|
|
101
142
|
*/
|
|
102
143
|
getMediaElement() {
|
|
103
144
|
return this.audio?.getMediaElement();
|
|
104
145
|
}
|
|
146
|
+
/**
|
|
147
|
+
* Retrieves the current playback position in seconds.
|
|
148
|
+
*
|
|
149
|
+
* @returns The current time, or `0` when unavailable.
|
|
150
|
+
*/
|
|
151
|
+
getCurrentTime() {
|
|
152
|
+
return this.audio?.getCurrentTime() ?? this.getMediaElement()?.currentTime ?? 0;
|
|
153
|
+
}
|
|
105
154
|
/**
|
|
106
155
|
* Sets the playback rate of the audio.
|
|
107
156
|
*
|
|
108
157
|
* @param rate - The playback rate to set.
|
|
109
158
|
*/
|
|
110
159
|
setRate(rate) {
|
|
111
|
-
this.audio
|
|
160
|
+
this.audio?.setPlaybackRate(rate);
|
|
112
161
|
}
|
|
113
162
|
/**
|
|
114
|
-
*
|
|
163
|
+
* Mutes or unmutes the audio.
|
|
164
|
+
*
|
|
165
|
+
* @param muted - Whether the audio should be muted.
|
|
115
166
|
*/
|
|
116
|
-
|
|
117
|
-
this.
|
|
118
|
-
this.handleLoading();
|
|
119
|
-
this.handleDecode();
|
|
120
|
-
this.handleReady();
|
|
121
|
-
this.handleRedRawComplete();
|
|
122
|
-
this.handlePlay();
|
|
123
|
-
this.handlePause();
|
|
124
|
-
this.handleFinish();
|
|
125
|
-
this.handleTimeUpdate();
|
|
126
|
-
this.handleSeeking();
|
|
127
|
-
this.handleInteraction();
|
|
128
|
-
this.handleClick();
|
|
129
|
-
this.handleDrag();
|
|
130
|
-
this.handleScroll();
|
|
131
|
-
this.handleZoom();
|
|
132
|
-
this.handleDestroy();
|
|
133
|
-
this.handleError();
|
|
167
|
+
setMuted(muted) {
|
|
168
|
+
this.audio?.setMuted(muted);
|
|
134
169
|
}
|
|
135
|
-
/**
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
status: 'load',
|
|
143
|
-
isUserInteraction: false,
|
|
144
|
-
});
|
|
145
|
-
});
|
|
146
|
-
});
|
|
170
|
+
/**
|
|
171
|
+
* Indicates whether the audio is currently muted.
|
|
172
|
+
*
|
|
173
|
+
* @returns True when muted; otherwise false.
|
|
174
|
+
*/
|
|
175
|
+
isMuted() {
|
|
176
|
+
return this.audio?.getMuted() ?? false;
|
|
147
177
|
}
|
|
148
|
-
/**
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
});
|
|
158
|
-
});
|
|
178
|
+
/**
|
|
179
|
+
* @ignore
|
|
180
|
+
*/
|
|
181
|
+
createWaveSurfer(container, config) {
|
|
182
|
+
const visualOptions = this.resolveVisualOptions(config);
|
|
183
|
+
this.lastVisualKey = JSON.stringify(visualOptions);
|
|
184
|
+
this.audio = WaveSurfer.create({
|
|
185
|
+
container,
|
|
186
|
+
...visualOptions,
|
|
159
187
|
});
|
|
188
|
+
this.bindEvents();
|
|
189
|
+
this.applyUrlAndRate(config);
|
|
160
190
|
}
|
|
161
|
-
/**
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
191
|
+
/**
|
|
192
|
+
* @ignore
|
|
193
|
+
*/
|
|
194
|
+
syncFromConfig(config) {
|
|
195
|
+
if (!this.audio) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
const visualOptions = this.resolveVisualOptions(config);
|
|
199
|
+
const visualKey = JSON.stringify(visualOptions);
|
|
200
|
+
if (visualKey !== this.lastVisualKey) {
|
|
201
|
+
this.lastVisualKey = visualKey;
|
|
202
|
+
this.audio.setOptions(visualOptions);
|
|
203
|
+
}
|
|
204
|
+
this.applyUrlAndRate(config);
|
|
173
205
|
}
|
|
174
|
-
/**
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
206
|
+
/**
|
|
207
|
+
* @ignore
|
|
208
|
+
*/
|
|
209
|
+
applyUrlAndRate(config) {
|
|
210
|
+
const url = config?.url?.trim() ?? '';
|
|
211
|
+
if (url && url !== this.loadedUrl) {
|
|
212
|
+
this.loadedUrl = url;
|
|
213
|
+
void this.swallowAbort(this.audio?.load(url));
|
|
214
|
+
}
|
|
215
|
+
else if (!url) {
|
|
216
|
+
queueMicrotask(() => {
|
|
217
|
+
if (!this.isDestroyed && !this.loadedUrl && this.audioState() === 'loading') {
|
|
218
|
+
this.audioState.set('paused');
|
|
219
|
+
}
|
|
184
220
|
});
|
|
185
|
-
}
|
|
221
|
+
}
|
|
222
|
+
if (config?.audioRate != null) {
|
|
223
|
+
this.audio?.setPlaybackRate(config.audioRate);
|
|
224
|
+
}
|
|
186
225
|
}
|
|
187
|
-
/**
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
226
|
+
/**
|
|
227
|
+
* @ignore
|
|
228
|
+
*/
|
|
229
|
+
resolveVisualOptions(config) {
|
|
230
|
+
const primary200 = this.readCssRgbVar('--ax-sys-color-primary-200');
|
|
231
|
+
const primary700 = this.readCssRgbVar('--ax-sys-color-primary-700');
|
|
232
|
+
return {
|
|
233
|
+
waveColor: config?.waveColor ?? `rgba(${primary200})`,
|
|
234
|
+
progressColor: config?.progressColor ?? `rgba(${primary700})`,
|
|
235
|
+
barWidth: config?.barWidth ?? DEFAULT_BAR_WIDTH,
|
|
236
|
+
barGap: config?.barGap ?? DEFAULT_BAR_GAP,
|
|
237
|
+
barRadius: config?.barRadius ?? DEFAULT_BAR_RADIUS,
|
|
238
|
+
height: config?.height ?? DEFAULT_HEIGHT,
|
|
239
|
+
};
|
|
199
240
|
}
|
|
200
|
-
/**
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
}
|
|
241
|
+
/**
|
|
242
|
+
* @ignore
|
|
243
|
+
*/
|
|
244
|
+
readCssRgbVar(name) {
|
|
245
|
+
if (!isPlatformBrowser(this.platformId)) {
|
|
246
|
+
return FALLBACK_RGB;
|
|
247
|
+
}
|
|
248
|
+
return getComputedStyle(document.documentElement).getPropertyValue(name).trim() || FALLBACK_RGB;
|
|
207
249
|
}
|
|
208
|
-
/**
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
250
|
+
/**
|
|
251
|
+
* @ignore
|
|
252
|
+
*/
|
|
253
|
+
bindEvents() {
|
|
254
|
+
if (!this.audio) {
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
this.audio.on('load', (url) => {
|
|
258
|
+
this.emitStatus('load', { url }, false);
|
|
214
259
|
});
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
this.onStatusChanged.emit({
|
|
221
|
-
component: this,
|
|
222
|
-
data: null,
|
|
223
|
-
status: 'finish',
|
|
224
|
-
isUserInteraction: false,
|
|
225
|
-
});
|
|
260
|
+
this.audio.on('loading', (percent) => {
|
|
261
|
+
this.runInZone(() => {
|
|
262
|
+
this.errorMessage.set('');
|
|
263
|
+
this.audioState.set('loading');
|
|
264
|
+
this.emitStatus('loading', { percent }, false, false);
|
|
226
265
|
});
|
|
227
266
|
});
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
handleTimeUpdate() {
|
|
231
|
-
this.audio?.on('timeupdate', (currentTime) => {
|
|
232
|
-
this.ngZone.run(() => {
|
|
233
|
-
this.onStatusChanged.emit({
|
|
234
|
-
component: this,
|
|
235
|
-
data: { currentTime: currentTime },
|
|
236
|
-
status: 'timeupdate',
|
|
237
|
-
isUserInteraction: false,
|
|
238
|
-
});
|
|
239
|
-
});
|
|
267
|
+
this.audio.on('decode', (duration) => {
|
|
268
|
+
this.emitStatus('decode', { duration }, false);
|
|
240
269
|
});
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
this.
|
|
247
|
-
component: this,
|
|
248
|
-
data: { currentTime: currentTime },
|
|
249
|
-
status: 'seeking',
|
|
250
|
-
isUserInteraction: false,
|
|
251
|
-
});
|
|
270
|
+
this.audio.on('ready', (duration) => {
|
|
271
|
+
this.runInZone(() => {
|
|
272
|
+
if (this.audioState() !== 'playing') {
|
|
273
|
+
this.audioState.set('ready');
|
|
274
|
+
}
|
|
275
|
+
this.emitStatus('ready', { duration }, false, false);
|
|
252
276
|
});
|
|
253
277
|
});
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
handleInteraction() {
|
|
257
|
-
this.audio?.on('interaction', (newTime) => {
|
|
258
|
-
this.ngZone.run(() => {
|
|
259
|
-
this.onStatusChanged.emit({
|
|
260
|
-
component: this,
|
|
261
|
-
data: { newTime: newTime },
|
|
262
|
-
status: 'interaction',
|
|
263
|
-
isUserInteraction: false,
|
|
264
|
-
});
|
|
265
|
-
});
|
|
278
|
+
this.audio.on('redrawcomplete', () => {
|
|
279
|
+
this.emitStatus('redrawcomplete', null, false);
|
|
266
280
|
});
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
this.ngZone.run(() => {
|
|
272
|
-
this.onStatusChanged.emit({
|
|
273
|
-
component: this,
|
|
274
|
-
data: { relativeX: relativeX },
|
|
275
|
-
status: 'click',
|
|
276
|
-
isUserInteraction: false,
|
|
277
|
-
});
|
|
281
|
+
this.audio.on('play', () => {
|
|
282
|
+
this.runInZone(() => {
|
|
283
|
+
this.audioState.set('playing');
|
|
284
|
+
this.emitStatus('play', null, false, false);
|
|
278
285
|
});
|
|
279
286
|
});
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
this.
|
|
286
|
-
component: this,
|
|
287
|
-
data: { relativeX: relativeX },
|
|
288
|
-
status: 'drag',
|
|
289
|
-
isUserInteraction: false,
|
|
290
|
-
});
|
|
287
|
+
this.audio.on('pause', () => {
|
|
288
|
+
this.runInZone(() => {
|
|
289
|
+
if (this.audioState() !== 'error') {
|
|
290
|
+
this.audioState.set('paused');
|
|
291
|
+
}
|
|
292
|
+
this.emitStatus('pause', null, false, false);
|
|
291
293
|
});
|
|
292
294
|
});
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
this.ngZone.run(() => {
|
|
298
|
-
this.onStatusChanged.emit({
|
|
299
|
-
component: this,
|
|
300
|
-
data: { visibleStartTime, visibleEndTime },
|
|
301
|
-
status: 'scroll',
|
|
302
|
-
isUserInteraction: false,
|
|
303
|
-
});
|
|
295
|
+
this.audio.on('finish', () => {
|
|
296
|
+
this.runInZone(() => {
|
|
297
|
+
this.audioState.set('paused');
|
|
298
|
+
this.emitStatus('finish', null, false, false);
|
|
304
299
|
});
|
|
305
300
|
});
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
this.audio
|
|
310
|
-
this.
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
301
|
+
this.audio.on('timeupdate', (currentTime) => {
|
|
302
|
+
this.emitStatus('timeupdate', { currentTime }, false);
|
|
303
|
+
});
|
|
304
|
+
this.audio.on('seeking', (currentTime) => {
|
|
305
|
+
this.emitStatus('seeking', { currentTime }, true);
|
|
306
|
+
});
|
|
307
|
+
this.audio.on('interaction', (newTime) => {
|
|
308
|
+
this.emitStatus('interaction', { newTime }, true);
|
|
309
|
+
});
|
|
310
|
+
this.audio.on('click', (relativeX, relativeY) => {
|
|
311
|
+
this.emitStatus('click', { relativeX, relativeY }, true);
|
|
312
|
+
});
|
|
313
|
+
this.audio.on('drag', (relativeX) => {
|
|
314
|
+
this.emitStatus('drag', { relativeX }, true);
|
|
315
|
+
});
|
|
316
|
+
this.audio.on('scroll', (visibleStartTime, visibleEndTime) => {
|
|
317
|
+
this.emitStatus('scroll', { visibleStartTime, visibleEndTime }, true);
|
|
318
|
+
});
|
|
319
|
+
this.audio.on('zoom', (minPxPerSec) => {
|
|
320
|
+
this.emitStatus('zoom', { minPxPerSec }, false);
|
|
321
|
+
});
|
|
322
|
+
this.audio.on('destroy', () => {
|
|
323
|
+
this.emitStatus('destroy', null, false);
|
|
324
|
+
});
|
|
325
|
+
this.audio.on('error', (error) => {
|
|
326
|
+
if (this.isAbortError(error)) {
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
this.runInZone(() => {
|
|
330
|
+
const message = error?.message ?? '';
|
|
331
|
+
this.errorMessage.set(message);
|
|
332
|
+
this.audioState.set('error');
|
|
333
|
+
this.emitStatus('error', { message }, false, false);
|
|
317
334
|
});
|
|
318
335
|
});
|
|
319
336
|
}
|
|
320
|
-
/**
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
});
|
|
330
|
-
});
|
|
337
|
+
/**
|
|
338
|
+
* @ignore
|
|
339
|
+
*/
|
|
340
|
+
swallowAbort(promise) {
|
|
341
|
+
return Promise.resolve(promise).then(() => undefined, (error) => {
|
|
342
|
+
if (this.isAbortError(error)) {
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
throw error;
|
|
331
346
|
});
|
|
332
347
|
}
|
|
333
|
-
/**
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
348
|
+
/**
|
|
349
|
+
* @ignore
|
|
350
|
+
*/
|
|
351
|
+
isAbortError(error) {
|
|
352
|
+
return ((typeof DOMException !== 'undefined' && error instanceof DOMException && error.name === 'AbortError') ||
|
|
353
|
+
(error instanceof Error && (error.name === 'AbortError' || /aborted/i.test(error.message))));
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* @ignore
|
|
357
|
+
*/
|
|
358
|
+
emitStatus(status, data, isUserInteraction, wrapInZone = true) {
|
|
359
|
+
if (this.isDestroyed) {
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
const emit = () => {
|
|
363
|
+
this.onStatusChanged.emit({
|
|
364
|
+
component: this,
|
|
365
|
+
data,
|
|
366
|
+
status,
|
|
367
|
+
isUserInteraction,
|
|
338
368
|
});
|
|
339
|
-
}
|
|
369
|
+
};
|
|
370
|
+
if (wrapInZone) {
|
|
371
|
+
this.runInZone(emit);
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
emit();
|
|
340
375
|
}
|
|
341
|
-
|
|
342
|
-
|
|
376
|
+
/**
|
|
377
|
+
* @ignore
|
|
378
|
+
*/
|
|
379
|
+
runInZone(fn) {
|
|
380
|
+
if (this.isDestroyed) {
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
this.ngZone.run(fn);
|
|
343
384
|
}
|
|
344
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
345
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.
|
|
385
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXAudioWaveComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
386
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AXAudioWaveComponent, isStandalone: true, selector: "ax-audio-wave", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onStatusChanged: "onStatusChanged" }, host: { properties: { "attr.aria-busy": "audioState() === \"loading\" || null", "attr.aria-invalid": "audioState() === \"error\" || null" } }, providers: [{ provide: AXComponent, useExisting: AXAudioWaveComponent }], viewQueries: [{ propertyName: "wave", first: true, predicate: ["wave"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"ax-audio-wave-host\" [class.ax-audio-wave-host--loading]=\"audioState() === 'loading'\">\n <div class=\"ax-audio-wave\" #wave [class.ax-audio-wave--hidden]=\"!isWaveVisible()\"></div>\n\n @switch (audioState()) {\n @case ('loading') {\n <ax-skeleton class=\"ax-audio-wave-skeleton\"></ax-skeleton>\n }\n @case ('error') {\n <div class=\"ax-wave-message\">\n {{ '@acorex:error.message' | translate: { params: { message: errorMessage() } } | async }}\n </div>\n }\n }\n</div>\n", styles: ["@layer properties;@layer components{ax-audio-wave{display:block;width:100%;flex:1}ax-audio-wave .ax-audio-wave-host{position:relative;display:block;width:100%}ax-audio-wave .ax-audio-wave-host--loading{min-height:1.25rem}ax-audio-wave .ax-audio-wave{width:100%}ax-audio-wave .ax-audio-wave--hidden{visibility:hidden}ax-audio-wave .ax-audio-wave-skeleton.ax-skeleton{position:absolute;inset-inline:calc(var(--spacing, .25rem) * 0);top:50%;height:calc(var(--spacing, .25rem) * 5);width:100%;--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y);border-radius:calc(infinity * 1px)}ax-audio-wave .ax-wave-message{position:absolute;inset-inline:calc(var(--spacing, .25rem) * 0);top:50%;--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y);padding-inline-start:calc(var(--spacing, .25rem) * 2)}}@property --tw-translate-x{syntax: \"*\"; inherits: false; initial-value: 0;}@property --tw-translate-y{syntax: \"*\"; inherits: false; initial-value: 0;}@property --tw-translate-z{syntax: \"*\"; inherits: false; initial-value: 0;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x: 0;--tw-translate-y: 0;--tw-translate-z: 0}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
346
387
|
}
|
|
347
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
388
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXAudioWaveComponent, decorators: [{
|
|
348
389
|
type: Component,
|
|
349
|
-
args: [{ selector: 'ax-audio-wave', encapsulation: ViewEncapsulation.None, imports: [
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
390
|
+
args: [{ selector: 'ax-audio-wave', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AsyncPipe, AXTranslatorPipe, AXSkeletonComponent], providers: [{ provide: AXComponent, useExisting: AXAudioWaveComponent }], host: {
|
|
391
|
+
'[attr.aria-busy]': 'audioState() === "loading" || null',
|
|
392
|
+
'[attr.aria-invalid]': 'audioState() === "error" || null',
|
|
393
|
+
}, template: "<div class=\"ax-audio-wave-host\" [class.ax-audio-wave-host--loading]=\"audioState() === 'loading'\">\n <div class=\"ax-audio-wave\" #wave [class.ax-audio-wave--hidden]=\"!isWaveVisible()\"></div>\n\n @switch (audioState()) {\n @case ('loading') {\n <ax-skeleton class=\"ax-audio-wave-skeleton\"></ax-skeleton>\n }\n @case ('error') {\n <div class=\"ax-wave-message\">\n {{ '@acorex:error.message' | translate: { params: { message: errorMessage() } } | async }}\n </div>\n }\n }\n</div>\n", styles: ["@layer properties;@layer components{ax-audio-wave{display:block;width:100%;flex:1}ax-audio-wave .ax-audio-wave-host{position:relative;display:block;width:100%}ax-audio-wave .ax-audio-wave-host--loading{min-height:1.25rem}ax-audio-wave .ax-audio-wave{width:100%}ax-audio-wave .ax-audio-wave--hidden{visibility:hidden}ax-audio-wave .ax-audio-wave-skeleton.ax-skeleton{position:absolute;inset-inline:calc(var(--spacing, .25rem) * 0);top:50%;height:calc(var(--spacing, .25rem) * 5);width:100%;--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y);border-radius:calc(infinity * 1px)}ax-audio-wave .ax-wave-message{position:absolute;inset-inline:calc(var(--spacing, .25rem) * 0);top:50%;--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y);padding-inline-start:calc(var(--spacing, .25rem) * 2)}}@property --tw-translate-x{syntax: \"*\"; inherits: false; initial-value: 0;}@property --tw-translate-y{syntax: \"*\"; inherits: false; initial-value: 0;}@property --tw-translate-z{syntax: \"*\"; inherits: false; initial-value: 0;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x: 0;--tw-translate-y: 0;--tw-translate-z: 0}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
|
|
394
|
+
}], ctorParameters: () => [], propDecorators: { wave: [{ type: i0.ViewChild, args: ['wave', { isSignal: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], onStatusChanged: [{ type: i0.Output, args: ["onStatusChanged"] }] } });
|
|
354
395
|
|
|
355
396
|
class AXAudioWaveModule {
|
|
356
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
357
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.
|
|
358
|
-
|
|
359
|
-
AXDecoratorModule,
|
|
360
|
-
AXSkeletonModule,
|
|
361
|
-
AXTranslationModule,
|
|
362
|
-
AXAudioWaveComponent], exports: [AXAudioWaveComponent] }); }
|
|
363
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXAudioWaveModule, imports: [CommonModule,
|
|
364
|
-
AXButtonModule,
|
|
365
|
-
AXDecoratorModule,
|
|
366
|
-
AXSkeletonModule,
|
|
367
|
-
AXTranslationModule,
|
|
368
|
-
AXAudioWaveComponent] }); }
|
|
397
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXAudioWaveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
398
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.6", ngImport: i0, type: AXAudioWaveModule, imports: [AXAudioWaveComponent], exports: [AXAudioWaveComponent] }); }
|
|
399
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXAudioWaveModule, imports: [AXAudioWaveComponent] }); }
|
|
369
400
|
}
|
|
370
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
401
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXAudioWaveModule, decorators: [{
|
|
371
402
|
type: NgModule,
|
|
372
403
|
args: [{
|
|
373
404
|
exports: [AXAudioWaveComponent],
|
|
374
|
-
imports: [
|
|
375
|
-
CommonModule,
|
|
376
|
-
AXButtonModule,
|
|
377
|
-
AXDecoratorModule,
|
|
378
|
-
AXSkeletonModule,
|
|
379
|
-
AXTranslationModule,
|
|
380
|
-
AXAudioWaveComponent,
|
|
381
|
-
],
|
|
405
|
+
imports: [AXAudioWaveComponent],
|
|
382
406
|
}]
|
|
383
407
|
}] });
|
|
384
408
|
|