@acorex/components 17.0.7 → 17.0.9
Sign up to get free protection for your applications and to get access to all the features.
- package/audio-wave/README.md +3 -0
- package/audio-wave/index.d.ts +3 -0
- package/audio-wave/lib/audio-wave.component.d.ts +51 -0
- package/audio-wave/lib/audio-wave.module.d.ts +10 -0
- package/audio-wave/lib/interfaces/audio-wave.interface.d.ts +15 -0
- package/chat/index.d.ts +1 -2
- package/chat/lib/chat-message/chat-message.component.d.ts +1 -1
- package/chat/lib/chat-messages/chat-message-text.component.d.ts +1 -1
- package/chat/lib/chat-messages/chat-messages-voice/chat-message-voice.component.d.ts +16 -0
- package/chat/lib/chat-view/chat-view.component.d.ts +2 -2
- package/chat/lib/chat.module.d.ts +13 -10
- package/chat/lib/chat.types.d.ts +6 -6
- package/data-pager/lib/data-pager.component.d.ts +1 -0
- package/data-table/lib/data-table/data-table.component.d.ts +24 -13
- package/esm2022/audio-wave/acorex-components-audio-wave.mjs +5 -0
- package/esm2022/audio-wave/index.mjs +4 -0
- package/esm2022/audio-wave/lib/audio-wave.component.mjs +199 -0
- package/esm2022/audio-wave/lib/audio-wave.module.mjs +20 -0
- package/esm2022/audio-wave/lib/interfaces/audio-wave.interface.mjs +2 -0
- package/esm2022/chat/index.mjs +2 -3
- package/esm2022/chat/lib/chat-message/chat-message.component.mjs +3 -3
- package/esm2022/chat/lib/chat-messages/chat-message-text.component.mjs +2 -2
- package/esm2022/chat/lib/chat-messages/chat-messages-voice/chat-message-voice.component.mjs +49 -0
- package/esm2022/chat/lib/chat-view/chat-view.component.mjs +2 -2
- package/esm2022/chat/lib/chat.module.mjs +18 -8
- package/esm2022/chat/lib/chat.types.mjs +1 -1
- package/esm2022/data-pager/lib/data-pager.component.mjs +19 -14
- package/esm2022/data-table/lib/data-table/data-table.component.mjs +83 -39
- package/esm2022/side-menu/lib/side-menu-item/side-menu-item.compoent.mjs +8 -8
- package/fesm2022/acorex-components-audio-wave.mjs +223 -0
- package/fesm2022/acorex-components-audio-wave.mjs.map +1 -0
- package/fesm2022/acorex-components-chat.mjs +65 -34
- package/fesm2022/acorex-components-chat.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +18 -13
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +82 -38
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-side-menu.mjs +7 -7
- package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
- package/package.json +7 -1
- package/side-menu/lib/side-menu-item/side-menu-item.compoent.d.ts +3 -4
- package/chat/lib/chat-messages/chat-message-audio.component.d.ts +0 -7
- package/chat/lib/chat-voice/chat-voice.component.d.ts +0 -6
- package/esm2022/chat/lib/chat-messages/chat-message-audio.component.mjs +0 -17
- package/esm2022/chat/lib/chat-voice/chat-voice.component.mjs +0 -12
@@ -1,6 +1,6 @@
|
|
1
1
|
import { AXClickEvent, MXColorComponent, MXInteractiveComponent } from '@acorex/components/common';
|
2
2
|
import { AUTO_STYLE, animate, state, style, transition, trigger } from '@angular/animations';
|
3
|
-
import { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, Input, Output, ViewEncapsulation, } from '@angular/core';
|
3
|
+
import { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, Input, Output, ViewEncapsulation, afterNextRender, signal, } from '@angular/core';
|
4
4
|
import { classes } from 'polytype';
|
5
5
|
import * as i0 from "@angular/core";
|
6
6
|
import * as i1 from "@acorex/components/common";
|
@@ -78,7 +78,10 @@ export class AXSideMenuItemComponent extends classes(MXInteractiveComponent, MXC
|
|
78
78
|
this.activeChange = new EventEmitter();
|
79
79
|
this._active = false;
|
80
80
|
this.onClick = new EventEmitter();
|
81
|
-
this.hasChild = false;
|
81
|
+
this.hasChild = signal(false);
|
82
|
+
afterNextRender(() => {
|
83
|
+
this.hasChild.set(this.elem.nativeElement.getElementsByTagName('ax-side-menu-item').length > 0);
|
84
|
+
});
|
82
85
|
}
|
83
86
|
_handleClickEvent(e) {
|
84
87
|
if (this.disabled || this.isLoading)
|
@@ -104,11 +107,8 @@ export class AXSideMenuItemComponent extends classes(MXInteractiveComponent, MXC
|
|
104
107
|
close() {
|
105
108
|
this.isCollapsed = false;
|
106
109
|
}
|
107
|
-
ngAfterContentInit() {
|
108
|
-
this.hasChild = this.elem.nativeElement.getElementsByTagName('ax-side-menu-item').length > 0;
|
109
|
-
}
|
110
110
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXSideMenuItemComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
111
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.2", type: AXSideMenuItemComponent, selector: "ax-side-menu-item", inputs: { disabled: "disabled", color: "color", isLoading: "isLoading", text: "text", isCollapsed: "isCollapsed", active: "active" }, outputs: { textChange: "textChange", isCollapsedChange: "isCollapsedChange", activeChange: "activeChange", onClick: "onClick" }, host: { attributes: { "ngSkipHydration": "true" } }, usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-title\"></ng-content>\n<div
|
111
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.2", type: AXSideMenuItemComponent, selector: "ax-side-menu-item", inputs: { disabled: "disabled", color: "color", isLoading: "isLoading", text: "text", isCollapsed: "isCollapsed", active: "active" }, outputs: { textChange: "textChange", isCollapsedChange: "isCollapsedChange", activeChange: "activeChange", onClick: "onClick" }, host: { attributes: { "ngSkipHydration": "true" } }, usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-title\"></ng-content>\n<div\n [axRipple]\n class=\"ax-side-item\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-active]=\"active\"\n (click)=\"_handleClickEvent($event)\"\n>\n <div class=\"ax-start-side\">\n <ng-content select=\"ax-prefix\"></ng-content>\n @if(text){\n <span>{{text}}</span>\n }\n {{hasChild()}}\n <ng-content></ng-content>\n </div>\n <div class=\"ax-end-side\">\n <ng-content select=\"ax-suffix\"></ng-content>\n @if(hasChild() && !isLoading){\n <span class=\"ax-icon ax-icon-chevron-right arrow-icon\" [class.arrow-icon-expand]=\"!isCollapsed\"></span>\n } @if(isLoading){\n <ax-loading></ax-loading>\n }\n </div>\n</div>\n\n<div class=\"ax-side-children\" [@collapse]=\"isCollapsed\">\n @if(isLoading){\n <p>{{'loading' | translate | async }}</p>\n } @else {\n <ng-content select=\"ax-side-menu-item, ng-container\"></ng-content>\n }\n</div>\n\n<ng-content select=\"ax-divider\"></ng-content>\n", dependencies: [{ kind: "directive", type: i1.AXRippleDirective, selector: "[axRipple]", inputs: ["axRipple", "axRippleColor"] }, { kind: "component", type: i2.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.AXTranslatorPipe, name: "translate" }], animations: [
|
112
112
|
trigger('collapse', [
|
113
113
|
state('false', style({ height: AUTO_STYLE, visibility: AUTO_STYLE })),
|
114
114
|
state('true', style({ height: '0', visibility: 'hidden' })),
|
@@ -126,7 +126,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
|
|
126
126
|
transition('false => true', animate(150 + 'ms ease-in')),
|
127
127
|
transition('true => false', animate(150 + 'ms ease-out')),
|
128
128
|
]),
|
129
|
-
], host: { ngSkipHydration: 'true' }, template: "<ng-content select=\"ax-title\"></ng-content>\n<div
|
129
|
+
], host: { ngSkipHydration: 'true' }, template: "<ng-content select=\"ax-title\"></ng-content>\n<div\n [axRipple]\n class=\"ax-side-item\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-active]=\"active\"\n (click)=\"_handleClickEvent($event)\"\n>\n <div class=\"ax-start-side\">\n <ng-content select=\"ax-prefix\"></ng-content>\n @if(text){\n <span>{{text}}</span>\n }\n {{hasChild()}}\n <ng-content></ng-content>\n </div>\n <div class=\"ax-end-side\">\n <ng-content select=\"ax-suffix\"></ng-content>\n @if(hasChild() && !isLoading){\n <span class=\"ax-icon ax-icon-chevron-right arrow-icon\" [class.arrow-icon-expand]=\"!isCollapsed\"></span>\n } @if(isLoading){\n <ax-loading></ax-loading>\n }\n </div>\n</div>\n\n<div class=\"ax-side-children\" [@collapse]=\"isCollapsed\">\n @if(isLoading){\n <p>{{'loading' | translate | async }}</p>\n } @else {\n <ng-content select=\"ax-side-menu-item, ng-container\"></ng-content>\n }\n</div>\n\n<ng-content select=\"ax-divider\"></ng-content>\n" }]
|
130
130
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { isLoading: [{
|
131
131
|
type: Input
|
132
132
|
}], textChange: [{
|
@@ -144,4 +144,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
|
|
144
144
|
}], onClick: [{
|
145
145
|
type: Output
|
146
146
|
}] } });
|
147
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2lkZS1tZW51LWl0ZW0uY29tcG9lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvc2lkZS1tZW51L3NyYy9saWIvc2lkZS1tZW51LWl0ZW0vc2lkZS1tZW51LWl0ZW0uY29tcG9lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvc2lkZS1tZW51L3NyYy9saWIvc2lkZS1tZW51LWl0ZW0vc2lkZS1tZW51LWl0ZW0uY29tcG9lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLGdCQUFnQixFQUFFLHNCQUFzQixFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDbkcsT0FBTyxFQUFFLFVBQVUsRUFBRSxPQUFPLEV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50PlxuICA8L2Rpdj5cbiAgPGRpdiBjbGFzcz1cImF4LWVuZC1zaWRlXCI+XG4gICAgPG5nLWNvbnRlbnQgc2VsZWN0PVwiYXgtc3VmZml4XCI+PC9uZy1jb250ZW50PlxuICAgIEBpZihoYXNDaGlsZCgpICYmICFpc0xvYWRpbmcpe1xuICAgIDxzcGFuIGNsYXNzPVwiYXgtaWNvbiBheC1pY29uLWNoZXZyb24tcmlnaHQgYXJyb3ctaWNvblwiIFtjbGFzcy5hcnJvdy1pY29uLWV4cGFuZF09XCIhaXNDb2xsYXBzZWRcIj48L3NwYW4+XG4gICAgfSBAaWYoaXNMb2FkaW5nKXtcbiAgICA8YXgtbG9hZGluZz48L2F4LWxvYWRpbmc+XG4gICAgfVxuICA8L2Rpdj5cbjwvZGl2PlxuXG48ZGl2IGNsYXNzPVwiYXgtc2lkZS1jaGlsZHJlblwiIFtAY29sbGFwc2VdPVwiaXNDb2xsYXBzZWRcIj5cbiAgQGlmKGlzTG9hZGluZyl7XG4gIDxwPnt7J2xvYWRpbmcnIHwgdHJhbnNsYXRlIHwgYXN5bmMgfX08L3A+XG4gIH0gQGVsc2Uge1xuICA8bmctY29udGVudCBzZWxlY3Q9XCJheC1zaWRlLW1lbnUtaXRlbSwgbmctY29udGFpbmVyXCI+PC9uZy1jb250ZW50PlxuICB9XG48L2Rpdj5cblxuPG5nLWNvbnRlbnQgc2VsZWN0PVwiYXgtZGl2aWRlclwiPjwvbmctY29udGVudD5cbiJdfQ==
|
@@ -0,0 +1,223 @@
|
|
1
|
+
import * as i0 from '@angular/core';
|
2
|
+
import { input, output, inject, NgZone, afterNextRender, Component, ViewEncapsulation, ViewChild, NgModule } from '@angular/core';
|
3
|
+
import WaveSurfer from 'wavesurfer.js';
|
4
|
+
import { AXButtonModule } from '@acorex/components/button';
|
5
|
+
import { AXDecoratorModule } from '@acorex/components/decorators';
|
6
|
+
import { CommonModule } from '@angular/common';
|
7
|
+
|
8
|
+
class AXAudioWaveComponent {
|
9
|
+
constructor() {
|
10
|
+
this.config = input();
|
11
|
+
this.onStatusChanged = output();
|
12
|
+
this.ngZone = inject(NgZone);
|
13
|
+
afterNextRender(() => {
|
14
|
+
const primary500 = getComputedStyle(document.body).getPropertyValue('--ax-color-primary-500');
|
15
|
+
const primary700 = getComputedStyle(document.body).getPropertyValue('--ax-color-primary-700');
|
16
|
+
this.audio = WaveSurfer.create({
|
17
|
+
container: this.div.nativeElement,
|
18
|
+
waveColor: this.config()?.waveColor || `rgba(${primary500})`,
|
19
|
+
progressColor: this.config()?.progressColor || `rgba(${primary700})`,
|
20
|
+
url: this.config()?.url || '',
|
21
|
+
barWidth: this.config()?.barWidth || 2,
|
22
|
+
barRadius: this.config()?.barRadius || 2,
|
23
|
+
barGap: this.config()?.barGap || 1,
|
24
|
+
height: this.config()?.height || 18,
|
25
|
+
});
|
26
|
+
this.audio.load(this.config()?.url);
|
27
|
+
this.bindEvents();
|
28
|
+
});
|
29
|
+
}
|
30
|
+
play() {
|
31
|
+
return this.audio.play();
|
32
|
+
}
|
33
|
+
pause() {
|
34
|
+
this.audio.pause();
|
35
|
+
}
|
36
|
+
getDuration() {
|
37
|
+
return this.audio?.getDuration();
|
38
|
+
}
|
39
|
+
getMediaElement() {
|
40
|
+
return this.audio?.getMediaElement();
|
41
|
+
}
|
42
|
+
bindEvents() {
|
43
|
+
this.handleLoad();
|
44
|
+
this.handleLoading();
|
45
|
+
this.handleDecode();
|
46
|
+
this.handleReady();
|
47
|
+
this.handleRedRawComplete();
|
48
|
+
this.handlePlay();
|
49
|
+
this.handlePause();
|
50
|
+
this.handleFinish();
|
51
|
+
this.handleTimeUpdate();
|
52
|
+
this.handleSeeking();
|
53
|
+
this.handleInteraction();
|
54
|
+
this.handleClick();
|
55
|
+
this.handleDrag();
|
56
|
+
this.handleScroll();
|
57
|
+
this.handleZoom();
|
58
|
+
this.handleDestroy();
|
59
|
+
}
|
60
|
+
/** When audio starts loading */
|
61
|
+
handleLoad() {
|
62
|
+
this.audio.on('load', (url) => {
|
63
|
+
this.ngZone.run(() => {
|
64
|
+
this.onStatusChanged.emit({ component: this, data: { url }, status: 'load', isUserInteraction: false });
|
65
|
+
});
|
66
|
+
});
|
67
|
+
}
|
68
|
+
/** During audio loading */
|
69
|
+
handleLoading() {
|
70
|
+
this.audio.on('loading', (percent) => {
|
71
|
+
this.ngZone.run(() => {
|
72
|
+
this.onStatusChanged.emit({ component: this, data: { percent }, status: 'loading', isUserInteraction: false });
|
73
|
+
});
|
74
|
+
});
|
75
|
+
}
|
76
|
+
/** When the audio has been decoded */
|
77
|
+
handleDecode() {
|
78
|
+
this.audio.on('decode', (duration) => {
|
79
|
+
this.ngZone.run(() => {
|
80
|
+
this.onStatusChanged.emit({ component: this, data: { duration }, status: 'decode', isUserInteraction: false });
|
81
|
+
});
|
82
|
+
});
|
83
|
+
}
|
84
|
+
/** When the audio is both decoded and can play */
|
85
|
+
handleReady() {
|
86
|
+
this.audio.on('ready', (duration) => {
|
87
|
+
this.ngZone.run(() => {
|
88
|
+
this.onStatusChanged.emit({ component: this, data: { duration }, status: 'ready', isUserInteraction: false });
|
89
|
+
});
|
90
|
+
});
|
91
|
+
}
|
92
|
+
/** When all audio channel chunks of the waveform have drawn */
|
93
|
+
handleRedRawComplete() {
|
94
|
+
this.audio.on('redrawcomplete', () => {
|
95
|
+
this.ngZone.run(() => {
|
96
|
+
this.onStatusChanged.emit({ component: this, data: null, status: 'redrawcomplete', isUserInteraction: false });
|
97
|
+
});
|
98
|
+
});
|
99
|
+
}
|
100
|
+
/** When the audio starts playing */
|
101
|
+
handlePlay() {
|
102
|
+
this.audio.on('play', () => {
|
103
|
+
this.ngZone.run(() => {
|
104
|
+
this.onStatusChanged.emit({ component: this, data: null, status: 'play', isUserInteraction: false });
|
105
|
+
});
|
106
|
+
});
|
107
|
+
}
|
108
|
+
/** When the audio pauses */
|
109
|
+
handlePause() {
|
110
|
+
this.audio.on('pause', () => {
|
111
|
+
this.ngZone.run(() => {
|
112
|
+
this.onStatusChanged.emit({ component: this, data: null, status: 'pause', isUserInteraction: false });
|
113
|
+
});
|
114
|
+
});
|
115
|
+
}
|
116
|
+
/** When the audio finishes playing */
|
117
|
+
handleFinish() {
|
118
|
+
this.audio.on('finish', () => {
|
119
|
+
this.ngZone.run(() => {
|
120
|
+
this.onStatusChanged.emit({ component: this, data: null, status: 'finish', isUserInteraction: false });
|
121
|
+
});
|
122
|
+
});
|
123
|
+
}
|
124
|
+
/** On audio position change, fires continuously during playback */
|
125
|
+
handleTimeUpdate() {
|
126
|
+
this.audio.on('timeupdate', (currentTime) => {
|
127
|
+
this.ngZone.run(() => {
|
128
|
+
this.onStatusChanged.emit({ component: this, data: { currentTime }, status: 'timeupdate', isUserInteraction: false });
|
129
|
+
});
|
130
|
+
});
|
131
|
+
}
|
132
|
+
/** When the user seeks to a new position */
|
133
|
+
handleSeeking() {
|
134
|
+
this.audio.on('seeking', (currentTime) => {
|
135
|
+
this.ngZone.run(() => {
|
136
|
+
this.onStatusChanged.emit({ component: this, data: { currentTime }, status: 'seeking', isUserInteraction: false });
|
137
|
+
});
|
138
|
+
});
|
139
|
+
}
|
140
|
+
/** When the user interacts with the waveform (i.g. clicks or drags on it) */
|
141
|
+
handleInteraction() {
|
142
|
+
this.audio.on('interaction', (newTime) => {
|
143
|
+
this.ngZone.run(() => {
|
144
|
+
this.onStatusChanged.emit({ component: this, data: { newTime }, status: 'interaction', isUserInteraction: false });
|
145
|
+
});
|
146
|
+
});
|
147
|
+
}
|
148
|
+
/** When the user clicks on the waveform */
|
149
|
+
handleClick() {
|
150
|
+
this.audio.on('click', (relativeX) => {
|
151
|
+
this.ngZone.run(() => {
|
152
|
+
this.onStatusChanged.emit({ component: this, data: { relativeX }, status: 'click', isUserInteraction: false });
|
153
|
+
});
|
154
|
+
});
|
155
|
+
}
|
156
|
+
/** When the user drags the cursor */
|
157
|
+
handleDrag() {
|
158
|
+
this.audio.on('drag', (relativeX) => {
|
159
|
+
this.ngZone.run(() => {
|
160
|
+
this.onStatusChanged.emit({ component: this, data: { relativeX }, status: 'drag', isUserInteraction: false });
|
161
|
+
});
|
162
|
+
});
|
163
|
+
}
|
164
|
+
/** When the waveform is scrolled (panned) */
|
165
|
+
handleScroll() {
|
166
|
+
this.audio.on('scroll', (visibleStartTime, visibleEndTime) => {
|
167
|
+
this.ngZone.run(() => {
|
168
|
+
this.onStatusChanged.emit({
|
169
|
+
component: this,
|
170
|
+
data: { visibleStartTime, visibleEndTime },
|
171
|
+
status: 'scroll',
|
172
|
+
isUserInteraction: false,
|
173
|
+
});
|
174
|
+
});
|
175
|
+
});
|
176
|
+
}
|
177
|
+
/** When the zoom level changes */
|
178
|
+
handleZoom() {
|
179
|
+
this.audio.on('zoom', (minPxPerSec) => {
|
180
|
+
this.ngZone.run(() => {
|
181
|
+
this.onStatusChanged.emit({ component: this, data: { minPxPerSec }, status: 'zoom', isUserInteraction: false });
|
182
|
+
});
|
183
|
+
});
|
184
|
+
}
|
185
|
+
/** Just before the waveform is destroyed so you can clean up your events */
|
186
|
+
handleDestroy() {
|
187
|
+
this.audio.on('destroy', () => {
|
188
|
+
this.ngZone.run(() => {
|
189
|
+
this.onStatusChanged.emit({ component: this, data: null, status: 'destroy', isUserInteraction: false });
|
190
|
+
});
|
191
|
+
});
|
192
|
+
}
|
193
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXAudioWaveComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
194
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.2", type: AXAudioWaveComponent, selector: "ax-audio-wave", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onStatusChanged: "onStatusChanged" }, viewQueries: [{ propertyName: "div", first: true, predicate: ["d"], descendants: true }], ngImport: i0, template: "<div class=\"ax-audio-wave\" #d></div>", styles: ["ax-audio-wave{display:block;width:100%;flex:1}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
195
|
+
}
|
196
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXAudioWaveComponent, decorators: [{
|
197
|
+
type: Component,
|
198
|
+
args: [{ selector: 'ax-audio-wave', encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-audio-wave\" #d></div>", styles: ["ax-audio-wave{display:block;width:100%;flex:1}\n"] }]
|
199
|
+
}], ctorParameters: () => [], propDecorators: { div: [{
|
200
|
+
type: ViewChild,
|
201
|
+
args: ['d']
|
202
|
+
}] } });
|
203
|
+
|
204
|
+
class AXAudioWaveModule {
|
205
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXAudioWaveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
206
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.2", ngImport: i0, type: AXAudioWaveModule, declarations: [AXAudioWaveComponent], imports: [CommonModule, AXButtonModule, AXDecoratorModule], exports: [AXAudioWaveComponent] }); }
|
207
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXAudioWaveModule, imports: [CommonModule, AXButtonModule, AXDecoratorModule] }); }
|
208
|
+
}
|
209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXAudioWaveModule, decorators: [{
|
210
|
+
type: NgModule,
|
211
|
+
args: [{
|
212
|
+
declarations: [AXAudioWaveComponent],
|
213
|
+
imports: [CommonModule, AXButtonModule, AXDecoratorModule],
|
214
|
+
exports: [AXAudioWaveComponent],
|
215
|
+
}]
|
216
|
+
}] });
|
217
|
+
|
218
|
+
/**
|
219
|
+
* Generated bundle index. Do not edit.
|
220
|
+
*/
|
221
|
+
|
222
|
+
export { AXAudioWaveComponent, AXAudioWaveModule };
|
223
|
+
//# sourceMappingURL=acorex-components-audio-wave.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-components-audio-wave.mjs","sources":["../../../../libs/components/audio-wave/src/lib/audio-wave.component.ts","../../../../libs/components/audio-wave/src/lib/audio-wave.component.html","../../../../libs/components/audio-wave/src/lib/audio-wave.module.ts","../../../../libs/components/audio-wave/src/acorex-components-audio-wave.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n InputSignal,\n NgZone,\n ViewChild,\n ViewEncapsulation,\n afterNextRender,\n inject,\n input,\n output,\n} from '@angular/core';\nimport WaveSurfer from 'wavesurfer.js';\nimport { AXAudioWaveChangeEvent, AXWaveConfig } from './interfaces/audio-wave.interface';\n\n@Component({\n selector: 'ax-audio-wave',\n templateUrl: './audio-wave.component.html',\n styleUrls: ['./audio-wave.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXAudioWaveComponent {\n @ViewChild('d') protected div: ElementRef<HTMLDivElement>;\n config: InputSignal<AXWaveConfig> = input<AXWaveConfig>();\n\n onStatusChanged = output<AXAudioWaveChangeEvent>();\n\n protected audio: WaveSurfer;\n private ngZone = inject(NgZone);\n\n constructor() {\n afterNextRender(() => {\n const primary500 = getComputedStyle(document.body).getPropertyValue('--ax-color-primary-500');\n const primary700 = getComputedStyle(document.body).getPropertyValue('--ax-color-primary-700');\n\n this.audio = WaveSurfer.create({\n container: this.div.nativeElement,\n waveColor: this.config()?.waveColor || `rgba(${primary500})`,\n progressColor: this.config()?.progressColor || `rgba(${primary700})`,\n url: this.config()?.url || '',\n barWidth: this.config()?.barWidth || 2,\n barRadius: this.config()?.barRadius || 2,\n barGap: this.config()?.barGap || 1,\n height: this.config()?.height || 18,\n });\n this.audio.load(this.config()?.url);\n this.bindEvents();\n });\n }\n\n play(): Promise<any> {\n return this.audio.play();\n }\n\n pause(): void {\n this.audio.pause();\n }\n\n getDuration() {\n return this.audio?.getDuration();\n }\n\n getMediaElement() {\n return this.audio?.getMediaElement();\n }\n\n protected bindEvents() {\n this.handleLoad();\n this.handleLoading();\n this.handleDecode();\n this.handleReady();\n this.handleRedRawComplete();\n this.handlePlay();\n this.handlePause();\n this.handleFinish();\n this.handleTimeUpdate();\n this.handleSeeking();\n this.handleInteraction();\n this.handleClick();\n this.handleDrag();\n this.handleScroll();\n this.handleZoom();\n this.handleDestroy();\n }\n /** When audio starts loading */\n protected handleLoad() {\n this.audio.on('load', (url) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({ component: this, data: { url }, status: 'load', isUserInteraction: false });\n });\n });\n }\n\n /** During audio loading */\n protected handleLoading() {\n this.audio.on('loading', (percent) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({ component: this, data: { percent }, status: 'loading', isUserInteraction: false });\n });\n });\n }\n\n /** When the audio has been decoded */\n protected handleDecode() {\n this.audio.on('decode', (duration) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({ component: this, data: { duration }, status: 'decode', isUserInteraction: false });\n });\n });\n }\n\n /** When the audio is both decoded and can play */\n protected handleReady() {\n this.audio.on('ready', (duration) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({ component: this, data: { duration }, status: 'ready', isUserInteraction: false });\n });\n });\n }\n\n /** When all audio channel chunks of the waveform have drawn */\n protected handleRedRawComplete() {\n this.audio.on('redrawcomplete', () => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({ component: this, data: null, status: 'redrawcomplete', isUserInteraction: false });\n });\n });\n }\n\n /** When the audio starts playing */\n protected handlePlay() {\n this.audio.on('play', () => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({ component: this, data: null, status: 'play', isUserInteraction: false });\n });\n });\n }\n\n /** When the audio pauses */\n protected handlePause() {\n this.audio.on('pause', () => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({ component: this, data: null, status: 'pause', isUserInteraction: false });\n });\n });\n }\n\n /** When the audio finishes playing */\n protected handleFinish() {\n this.audio.on('finish', () => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({ component: this, data: null, status: 'finish', isUserInteraction: false });\n });\n });\n }\n\n /** On audio position change, fires continuously during playback */\n protected handleTimeUpdate() {\n this.audio.on('timeupdate', (currentTime) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({ component: this, data: { currentTime }, status: 'timeupdate', isUserInteraction: false });\n });\n });\n }\n\n /** When the user seeks to a new position */\n protected handleSeeking() {\n this.audio.on('seeking', (currentTime) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({ component: this, data: { currentTime }, status: 'seeking', isUserInteraction: false });\n });\n });\n }\n\n /** When the user interacts with the waveform (i.g. clicks or drags on it) */\n protected handleInteraction() {\n this.audio.on('interaction', (newTime) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({ component: this, data: { newTime }, status: 'interaction', isUserInteraction: false });\n });\n });\n }\n\n /** When the user clicks on the waveform */\n protected handleClick() {\n this.audio.on('click', (relativeX) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({ component: this, data: { relativeX }, status: 'click', isUserInteraction: false });\n });\n });\n }\n\n /** When the user drags the cursor */\n protected handleDrag() {\n this.audio.on('drag', (relativeX) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({ component: this, data: { relativeX }, status: 'drag', isUserInteraction: false });\n });\n });\n }\n\n /** When the waveform is scrolled (panned) */\n protected handleScroll() {\n this.audio.on('scroll', (visibleStartTime, visibleEndTime) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { visibleStartTime, visibleEndTime },\n status: 'scroll',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** When the zoom level changes */\n protected handleZoom() {\n this.audio.on('zoom', (minPxPerSec) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({ component: this, data: { minPxPerSec }, status: 'zoom', isUserInteraction: false });\n });\n });\n }\n\n /** Just before the waveform is destroyed so you can clean up your events */\n protected handleDestroy() {\n this.audio.on('destroy', () => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({ component: this, data: null, status: 'destroy', isUserInteraction: false });\n });\n });\n }\n}\n","<div class=\"ax-audio-wave\" #d></div>","import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXAudioWaveComponent } from './audio-wave.component';\n\n@NgModule({\n declarations: [AXAudioWaveComponent],\n imports: [CommonModule, AXButtonModule, AXDecoratorModule],\n exports: [AXAudioWaveComponent],\n})\nexport class AXAudioWaveModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAqBa,oBAAoB,CAAA;AAS/B,IAAA,WAAA,GAAA;QAPA,IAAM,CAAA,MAAA,GAA8B,KAAK,EAAgB,CAAC;QAE1D,IAAe,CAAA,eAAA,GAAG,MAAM,EAA0B,CAAC;AAG3C,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QAG9B,eAAe,CAAC,MAAK;AACnB,YAAA,MAAM,UAAU,GAAG,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;AAC9F,YAAA,MAAM,UAAU,GAAG,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;AAE9F,YAAA,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC;AAC7B,gBAAA,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,aAAa;gBACjC,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,SAAS,IAAI,CAAQ,KAAA,EAAA,UAAU,CAAG,CAAA,CAAA;gBAC5D,aAAa,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,aAAa,IAAI,CAAQ,KAAA,EAAA,UAAU,CAAG,CAAA,CAAA;gBACpE,GAAG,EAAE,IAAI,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AAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,CAAC;AACpC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,iBAAiB,CAAC;oBAC1D,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAChC,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXInputBaseValueComponent, MXLookComponent, AXComponent, AXFocusableComponent, AXValuableComponent, MXBaseComponent, AXRippleDirective } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { signal, Injectable, EventEmitter, inject, forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, Input, Output, input, HostBinding, NgModule, Optional, Inject } from '@angular/core';
|
3
|
+
import { signal, Injectable, EventEmitter, inject, forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, Input, Output, input, HostBinding, afterNextRender, NgModule, Optional, Inject } from '@angular/core';
|
4
4
|
import * as i1 from '@angular/forms';
|
5
5
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
6
6
|
import { classes } from 'polytype';
|
@@ -16,6 +16,9 @@ import * as i6 from '@acorex/core/translation';
|
|
16
16
|
import { AXTranslationModule } from '@acorex/core/translation';
|
17
17
|
import * as i2$1 from '@acorex/core/format';
|
18
18
|
import { AXFormatModule } from '@acorex/core/format';
|
19
|
+
import * as i2$2 from '@acorex/components/audio-wave';
|
20
|
+
import { AXAudioWaveModule } from '@acorex/components/audio-wave';
|
21
|
+
import { AXCircularProgressModule } from '@acorex/components/circular-progress';
|
19
22
|
|
20
23
|
class AXRecordingService {
|
21
24
|
constructor() {
|
@@ -237,11 +240,11 @@ class AXChatMessageComponent extends MXBaseComponent {
|
|
237
240
|
return `${this.isOwn ? 'ax-state-own' : ''} ${!this.isOwn ? 'ax-state-other' : ''}`;
|
238
241
|
}
|
239
242
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatMessageComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
240
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.2", type: AXChatMessageComponent, selector: "ax-chat-message", inputs: { chatMessage: { classPropertyName: "chatMessage", publicName: "chatMessage", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.__hostClass" } }, usesInheritance: true, ngImport: i0, template: "
|
243
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.2", type: AXChatMessageComponent, selector: "ax-chat-message", inputs: { chatMessage: { classPropertyName: "chatMessage", publicName: "chatMessage", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.__hostClass" } }, usesInheritance: true, ngImport: i0, template: "<ng-container\n *ngComponentOutlet=\"registryService.resolve(chatMessage().type).component;inputs:{message:chatMessage()}\"></ng-container>\n<div class=\"ax-chat-message-status\">\n <div>\n <ng-content select=\"ax-prefix\"></ng-content>\n </div>\n <div>\n <span>{{ chatMessage().sendTime | format:'datetime':'HH:mm' | async }}</span>\n <span>\n @if(isOwn)\n {\n @if(chatMessage().deliverTime){\n <i class=\"ax-icon ax-icon-check\"></i>\n }\n @if(chatMessage().readTime){\n <i class=\"ax-icon ax-icon-dobble-check\"></i>\n }\n }\n </span>\n </div>\n</div>", styles: ["ax-chat-message{display:block;padding:.75rem;font-size:.875rem;line-height:1.25rem;border-radius:.75rem;border:1px solid;--ax-other-color: rgba(var(--ax-color-surface));--ax-other-color-fore: rgba(var(--ax-color-surface-fore));--ax-own-color: rgba(var(--ax-color-primary-100));--ax-own-color-fore: rgba(var(--ax-color-primary-fore-tint))}ax-chat-message.ax-state-own{border-end-end-radius:0!important;background-color:var(--ax-own-color);border-color:var(--ax-own-color);color:var(--ax-own-color-fore)}ax-chat-message.ax-state-own .ax-chat-message-status{color:var(--ax-own-color-fore)}ax-chat-message.ax-state-other{border-end-start-radius:0!important;background-color:var(--ax-other-color);border-color:var(--ax-other-color);border-color:rgba(var(--ax-color-border-default))}ax-chat-message.ax-state-other .ax-chat-message-status{color:var(--ax-own-color-fore)}ax-chat-message .ax-chat-message-status{display:flex;justify-content:space-between;align-items:center;font-size:.75rem}ax-chat-message .ax-chat-message-status>div{display:flex;gap:.125rem;align-items:center}.ax-dark ax-chat-message{--ax-reply-bk: rgba(var(--ax-color-primary-800));--ax-reply-color: rgba(var(--ax-color-primary-fore));--ax-reply-border-color: rgba(var(--ax-color-primary-fore));--ax-own-color: rgba(var(--ax-color-primary-700));--ax-own-color-fore: rgba(var(--ax-color-primary-fore))}\n"], dependencies: [{ kind: "directive", type: i1$1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.AXFormatPipe, name: "format" }], encapsulation: i0.ViewEncapsulation.None }); }
|
241
244
|
}
|
242
245
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatMessageComponent, decorators: [{
|
243
246
|
type: Component,
|
244
|
-
args: [{ selector: 'ax-chat-message', encapsulation: ViewEncapsulation.None, template: "
|
247
|
+
args: [{ selector: 'ax-chat-message', encapsulation: ViewEncapsulation.None, template: "<ng-container\n *ngComponentOutlet=\"registryService.resolve(chatMessage().type).component;inputs:{message:chatMessage()}\"></ng-container>\n<div class=\"ax-chat-message-status\">\n <div>\n <ng-content select=\"ax-prefix\"></ng-content>\n </div>\n <div>\n <span>{{ chatMessage().sendTime | format:'datetime':'HH:mm' | async }}</span>\n <span>\n @if(isOwn)\n {\n @if(chatMessage().deliverTime){\n <i class=\"ax-icon ax-icon-check\"></i>\n }\n @if(chatMessage().readTime){\n <i class=\"ax-icon ax-icon-dobble-check\"></i>\n }\n }\n </span>\n </div>\n</div>", styles: ["ax-chat-message{display:block;padding:.75rem;font-size:.875rem;line-height:1.25rem;border-radius:.75rem;border:1px solid;--ax-other-color: rgba(var(--ax-color-surface));--ax-other-color-fore: rgba(var(--ax-color-surface-fore));--ax-own-color: rgba(var(--ax-color-primary-100));--ax-own-color-fore: rgba(var(--ax-color-primary-fore-tint))}ax-chat-message.ax-state-own{border-end-end-radius:0!important;background-color:var(--ax-own-color);border-color:var(--ax-own-color);color:var(--ax-own-color-fore)}ax-chat-message.ax-state-own .ax-chat-message-status{color:var(--ax-own-color-fore)}ax-chat-message.ax-state-other{border-end-start-radius:0!important;background-color:var(--ax-other-color);border-color:var(--ax-other-color);border-color:rgba(var(--ax-color-border-default))}ax-chat-message.ax-state-other .ax-chat-message-status{color:var(--ax-own-color-fore)}ax-chat-message .ax-chat-message-status{display:flex;justify-content:space-between;align-items:center;font-size:.75rem}ax-chat-message .ax-chat-message-status>div{display:flex;gap:.125rem;align-items:center}.ax-dark ax-chat-message{--ax-reply-bk: rgba(var(--ax-color-primary-800));--ax-reply-color: rgba(var(--ax-color-primary-fore));--ax-reply-border-color: rgba(var(--ax-color-primary-fore));--ax-own-color: rgba(var(--ax-color-primary-700));--ax-own-color-fore: rgba(var(--ax-color-primary-fore))}\n"] }]
|
245
248
|
}], propDecorators: { __hostClass: [{
|
246
249
|
type: HostBinding,
|
247
250
|
args: ['class']
|
@@ -265,16 +268,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
|
|
265
268
|
type: Input
|
266
269
|
}] } });
|
267
270
|
|
268
|
-
class AXChatVoiceComponent {
|
269
|
-
constructor() { }
|
270
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatVoiceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
271
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.2", type: AXChatVoiceComponent, selector: "ax-chat-voice", ngImport: i0, template: "", styles: [""] }); }
|
272
|
-
}
|
273
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatVoiceComponent, decorators: [{
|
274
|
-
type: Component,
|
275
|
-
args: [{ selector: 'ax-chat-voice', template: "" }]
|
276
|
-
}], ctorParameters: () => [] });
|
277
|
-
|
278
271
|
class AXChatMessageBaseComponent {
|
279
272
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatMessageBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
280
273
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatMessageBaseComponent }); }
|
@@ -283,27 +276,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
|
|
283
276
|
type: Injectable
|
284
277
|
}] });
|
285
278
|
|
286
|
-
class AXChatAudioMessageComponent extends AXChatMessageBaseComponent {
|
287
|
-
ngOnInit() { }
|
288
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatAudioMessageComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
289
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.2", type: AXChatAudioMessageComponent, selector: "ng-component", inputs: { message: "message" }, usesInheritance: true, ngImport: i0, template: `This is an Audio Message`, isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
|
290
|
-
}
|
291
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatAudioMessageComponent, decorators: [{
|
292
|
-
type: Component,
|
293
|
-
args: [{
|
294
|
-
template: `This is an Audio Message`,
|
295
|
-
encapsulation: ViewEncapsulation.None,
|
296
|
-
inputs: ['message'],
|
297
|
-
}]
|
298
|
-
}] });
|
299
|
-
|
300
279
|
class AXChatTextMessageComponent extends AXChatMessageBaseComponent {
|
301
280
|
constructor() {
|
302
281
|
super(...arguments);
|
303
282
|
this._text = signal('');
|
304
283
|
}
|
305
284
|
ngOnInit() {
|
306
|
-
this._text.set(this.message?.content
|
285
|
+
this._text.set(this.message?.content);
|
307
286
|
}
|
308
287
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatTextMessageComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
309
288
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.2", type: AXChatTextMessageComponent, selector: "ng-component", inputs: { message: "message" }, usesInheritance: true, ngImport: i0, template: `<div [innerHtml]="_text()"></div>`, isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
|
@@ -317,11 +296,55 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
|
|
317
296
|
}]
|
318
297
|
}] });
|
319
298
|
|
299
|
+
class AXChatAudioMessageComponent extends AXChatMessageBaseComponent {
|
300
|
+
constructor() {
|
301
|
+
super();
|
302
|
+
this.config = { url: '' };
|
303
|
+
this.audioState = signal('paused');
|
304
|
+
this.audioProgress = signal(0);
|
305
|
+
afterNextRender(() => {
|
306
|
+
this.config.url = this.message?.content;
|
307
|
+
this.audioState.set('loading');
|
308
|
+
this.audio.onStatusChanged.subscribe((c) => {
|
309
|
+
if (c.status === 'loading') {
|
310
|
+
this.audioProgress.set(c.data.duration);
|
311
|
+
console.log(c.data.duration);
|
312
|
+
}
|
313
|
+
if (c.status === 'ready') {
|
314
|
+
this.audioState.set('ready');
|
315
|
+
}
|
316
|
+
});
|
317
|
+
});
|
318
|
+
}
|
319
|
+
handlePauseClick() {
|
320
|
+
this.audio.pause();
|
321
|
+
this.audioState.set('paused');
|
322
|
+
}
|
323
|
+
handlePlayClick() {
|
324
|
+
this.audio.play().then(() => {
|
325
|
+
this.audioState.set('playing');
|
326
|
+
});
|
327
|
+
}
|
328
|
+
handleOnStatusChanged(event) {
|
329
|
+
console.log(event);
|
330
|
+
}
|
331
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatAudioMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
332
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.2", type: AXChatAudioMessageComponent, selector: "ax-chat-message-audio", inputs: { message: "message" }, viewQueries: [{ propertyName: "audio", first: true, predicate: ["a"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-audio-controller\">\n\n\n @switch (audioState()) {\n @case ('playing') {\n <button (click)=\"handlePauseClick()\">\n <i class=\"fa-solid fa-pause\"></i>\n </button>\n }\n @case ('paused')\n {\n <button (click)=\"handlePlayClick()\">\n <i class=\"fa-solid fa-play\" style=\"margin-inline-start: 0.25rem;\"></i>\n </button>\n }\n @case ('loading') {\n <button (click)=\"handlePlayClick()\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n }\n }\n\n</div>\n<ax-audio-wave #a [config]=\"config\" (onStatusChanged)=\"handleOnStatusChanged($event)\"></ax-audio-wave>\n\n\n\n<ax-prefix>\n {{a.getDuration()}}\n</ax-prefix>", styles: ["ax-chat-message-audio{display:flex;align-items:center;justify-content:space-between;gap:.25rem}ax-chat-message-audio .ax-audio-controller button{width:2.5rem;height:2.5rem;background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore));border-radius:999rem;display:flex;align-items:center;justify-content:center}ax-chat-message-audio .ax-audio-controller button>i{width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;font-size:1.25rem}ax-chat-message-audio .ax-audio-wave{flex:1}\n"], dependencies: [{ kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title , ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "component", type: i2$2.AXAudioWaveComponent, selector: "ax-audio-wave", inputs: ["config"], outputs: ["onStatusChanged"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
333
|
+
}
|
334
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatAudioMessageComponent, decorators: [{
|
335
|
+
type: Component,
|
336
|
+
args: [{ selector: 'ax-chat-message-audio', encapsulation: ViewEncapsulation.None, inputs: ['message'], template: "<div class=\"ax-audio-controller\">\n\n\n @switch (audioState()) {\n @case ('playing') {\n <button (click)=\"handlePauseClick()\">\n <i class=\"fa-solid fa-pause\"></i>\n </button>\n }\n @case ('paused')\n {\n <button (click)=\"handlePlayClick()\">\n <i class=\"fa-solid fa-play\" style=\"margin-inline-start: 0.25rem;\"></i>\n </button>\n }\n @case ('loading') {\n <button (click)=\"handlePlayClick()\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n }\n }\n\n</div>\n<ax-audio-wave #a [config]=\"config\" (onStatusChanged)=\"handleOnStatusChanged($event)\"></ax-audio-wave>\n\n\n\n<ax-prefix>\n {{a.getDuration()}}\n</ax-prefix>", styles: ["ax-chat-message-audio{display:flex;align-items:center;justify-content:space-between;gap:.25rem}ax-chat-message-audio .ax-audio-controller button{width:2.5rem;height:2.5rem;background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore));border-radius:999rem;display:flex;align-items:center;justify-content:center}ax-chat-message-audio .ax-audio-controller button>i{width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;font-size:1.25rem}ax-chat-message-audio .ax-audio-wave{flex:1}\n"] }]
|
337
|
+
}], ctorParameters: () => [], propDecorators: { audio: [{
|
338
|
+
type: ViewChild,
|
339
|
+
args: ['a']
|
340
|
+
}] } });
|
341
|
+
|
320
342
|
const COMPONENT = [
|
321
343
|
AXChatViewComponent,
|
322
344
|
AXChatInputComponent,
|
323
345
|
AXChatMessageComponent,
|
324
|
-
|
346
|
+
AXChatTextMessageComponent,
|
347
|
+
AXChatAudioMessageComponent,
|
325
348
|
];
|
326
349
|
const MODULES = [
|
327
350
|
CommonModule,
|
@@ -333,6 +356,8 @@ const MODULES = [
|
|
333
356
|
AXTranslationModule,
|
334
357
|
AXDropdownModule,
|
335
358
|
AXFormatModule,
|
359
|
+
AXAudioWaveModule,
|
360
|
+
AXCircularProgressModule,
|
336
361
|
];
|
337
362
|
class AXChatModule {
|
338
363
|
static forRoot(config) {
|
@@ -389,7 +414,8 @@ class AXChatModule {
|
|
389
414
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.2", ngImport: i0, type: AXChatModule, declarations: [AXChatViewComponent,
|
390
415
|
AXChatInputComponent,
|
391
416
|
AXChatMessageComponent,
|
392
|
-
|
417
|
+
AXChatTextMessageComponent,
|
418
|
+
AXChatAudioMessageComponent], imports: [CommonModule,
|
393
419
|
FormsModule,
|
394
420
|
AsyncPipe,
|
395
421
|
AXRippleDirective,
|
@@ -397,17 +423,22 @@ class AXChatModule {
|
|
397
423
|
AXDecoratorModule,
|
398
424
|
AXTranslationModule,
|
399
425
|
AXDropdownModule,
|
400
|
-
AXFormatModule
|
426
|
+
AXFormatModule,
|
427
|
+
AXAudioWaveModule,
|
428
|
+
AXCircularProgressModule], exports: [AXChatViewComponent,
|
401
429
|
AXChatInputComponent,
|
402
430
|
AXChatMessageComponent,
|
403
|
-
|
431
|
+
AXChatTextMessageComponent,
|
432
|
+
AXChatAudioMessageComponent] }); }
|
404
433
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatModule, providers: [AXRecordingService], imports: [CommonModule,
|
405
434
|
FormsModule,
|
406
435
|
AXButtonModule,
|
407
436
|
AXDecoratorModule,
|
408
437
|
AXTranslationModule,
|
409
438
|
AXDropdownModule,
|
410
|
-
AXFormatModule
|
439
|
+
AXFormatModule,
|
440
|
+
AXAudioWaveModule,
|
441
|
+
AXCircularProgressModule] }); }
|
411
442
|
}
|
412
443
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatModule, decorators: [{
|
413
444
|
type: NgModule,
|
@@ -436,5 +467,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
|
|
436
467
|
* Generated bundle index. Do not edit.
|
437
468
|
*/
|
438
469
|
|
439
|
-
export { AXChatAudioMessageComponent, AXChatInputComponent, AXChatMessageBaseComponent, AXChatMessageComponent, AXChatMessageTypeRegistryService, AXChatModule, AXChatService, AXChatTextMessageComponent, AXChatViewComponent,
|
470
|
+
export { AXChatAudioMessageComponent, AXChatInputComponent, AXChatMessageBaseComponent, AXChatMessageComponent, AXChatMessageTypeRegistryService, AXChatModule, AXChatService, AXChatTextMessageComponent, AXChatViewComponent, AXRecordingService };
|
440
471
|
//# sourceMappingURL=acorex-components-chat.mjs.map
|