@acorex/components 17.0.15 → 17.0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. package/calendar/lib/calendar.module.d.ts +2 -1
  2. package/conversation/index.d.ts +12 -0
  3. package/conversation/lib/conversation-input/conversation-input.component.d.ts +35 -0
  4. package/conversation/lib/conversation-message/conversation-message.component.d.ts +20 -0
  5. package/conversation/lib/conversation-messages/conversation-message-text.component.d.ts +9 -0
  6. package/{chat/lib/chat-messages/chat-messages-voice/chat-message-voice.component.d.ts → conversation/lib/conversation-messages/conversation-messages-voice/conversation-message-voice.component.d.ts} +6 -4
  7. package/conversation/lib/conversation-view/conversation-view.component.d.ts +13 -0
  8. package/conversation/lib/conversation.module.d.ts +37 -0
  9. package/conversation/lib/conversation.types.d.ts +23 -0
  10. package/conversation/lib/services/conversation-message-type-registry.service.d.ts +9 -0
  11. package/conversation/lib/services/conversation.service.d.ts +5 -0
  12. package/esm2022/audio-wave/lib/audio-wave.component.mjs +4 -4
  13. package/esm2022/calendar/lib/calendar.component.mjs +5 -4
  14. package/esm2022/calendar/lib/calendar.module.mjs +5 -4
  15. package/esm2022/conversation/acorex-components-conversation.mjs +5 -0
  16. package/esm2022/conversation/index.mjs +14 -0
  17. package/esm2022/conversation/lib/classes/events.interface.mjs +2 -0
  18. package/esm2022/conversation/lib/conversation-input/conversation-input.component.mjs +117 -0
  19. package/esm2022/conversation/lib/conversation-input/conversation-input.interface.mjs +2 -0
  20. package/esm2022/conversation/lib/conversation-message/conversation-message.component.mjs +70 -0
  21. package/esm2022/conversation/lib/conversation-messages/conversation-message-text.component.mjs +23 -0
  22. package/esm2022/conversation/lib/conversation-messages/conversation-messages-voice/conversation-message-voice.component.mjs +112 -0
  23. package/esm2022/conversation/lib/conversation-view/conversation-view.component.mjs +31 -0
  24. package/esm2022/conversation/lib/conversation.module.mjs +154 -0
  25. package/esm2022/conversation/lib/conversation.types.mjs +10 -0
  26. package/esm2022/conversation/lib/services/conversation-message-type-registry.service.mjs +20 -0
  27. package/esm2022/conversation/lib/services/conversation.service.mjs +10 -0
  28. package/esm2022/conversation/lib/services/recording.service.mjs +78 -0
  29. package/fesm2022/acorex-components-audio-wave.mjs +3 -3
  30. package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
  31. package/fesm2022/acorex-components-calendar.mjs +7 -5
  32. package/fesm2022/acorex-components-calendar.mjs.map +1 -1
  33. package/fesm2022/acorex-components-conversation.mjs +589 -0
  34. package/fesm2022/acorex-components-conversation.mjs.map +1 -0
  35. package/package.json +13 -13
  36. package/chat/index.d.ts +0 -12
  37. package/chat/lib/chat-input/chat-input.component.d.ts +0 -35
  38. package/chat/lib/chat-message/chat-message.component.d.ts +0 -16
  39. package/chat/lib/chat-messages/chat-message-text.component.d.ts +0 -8
  40. package/chat/lib/chat-view/chat-view.component.d.ts +0 -10
  41. package/chat/lib/chat.module.d.ts +0 -35
  42. package/chat/lib/chat.types.d.ts +0 -21
  43. package/chat/lib/services/chat-message-type-registry.service.d.ts +0 -9
  44. package/chat/lib/services/chat.service.d.ts +0 -5
  45. package/esm2022/chat/acorex-components-chat.mjs +0 -5
  46. package/esm2022/chat/index.mjs +0 -14
  47. package/esm2022/chat/lib/chat-input/chat-input.component.mjs +0 -125
  48. package/esm2022/chat/lib/chat-input/chat-input.interface.mjs +0 -2
  49. package/esm2022/chat/lib/chat-message/chat-message.component.mjs +0 -54
  50. package/esm2022/chat/lib/chat-messages/chat-message-text.component.mjs +0 -23
  51. package/esm2022/chat/lib/chat-messages/chat-messages-voice/chat-message-voice.component.mjs +0 -97
  52. package/esm2022/chat/lib/chat-view/chat-view.component.mjs +0 -22
  53. package/esm2022/chat/lib/chat.module.mjs +0 -146
  54. package/esm2022/chat/lib/chat.types.mjs +0 -10
  55. package/esm2022/chat/lib/classes/events.interface.mjs +0 -2
  56. package/esm2022/chat/lib/services/chat-message-type-registry.service.mjs +0 -20
  57. package/esm2022/chat/lib/services/chat.service.mjs +0 -10
  58. package/esm2022/chat/lib/services/recording.service.mjs +0 -78
  59. package/fesm2022/acorex-components-chat.mjs +0 -552
  60. package/fesm2022/acorex-components-chat.mjs.map +0 -1
  61. /package/{chat → conversation}/README.md +0 -0
  62. /package/{chat → conversation}/lib/classes/events.interface.d.ts +0 -0
  63. /package/{chat/lib/chat-input/chat-input.interface.d.ts → conversation/lib/conversation-input/conversation-input.interface.d.ts} +0 -0
  64. /package/{chat → conversation}/lib/services/recording.service.d.ts +0 -0
@@ -1,54 +0,0 @@
1
- import { MXBaseComponent } from '@acorex/components/common';
2
- import { isBrowser } from '@acorex/core/platform';
3
- import { ComponentPortal } from '@angular/cdk/portal';
4
- import { Component, HostBinding, ViewEncapsulation, inject, input } from '@angular/core';
5
- import { AXChatMessageTypeRegistryService } from '../services/chat-message-type-registry.service';
6
- import * as i0 from "@angular/core";
7
- import * as i1 from "@angular/cdk/portal";
8
- import * as i2 from "@angular/common";
9
- import * as i3 from "@acorex/core/format";
10
- export class AXChatMessageComponent extends MXBaseComponent {
11
- constructor() {
12
- super(...arguments);
13
- this.chatMessage = input();
14
- this.registryService = inject(AXChatMessageTypeRegistryService);
15
- }
16
- get isOwn() {
17
- return !this.chatMessage().fromId;
18
- }
19
- get __hostClass() {
20
- return `${this.isOwn ? 'ax-state-own' : ''} ${!this.isOwn ? 'ax-state-other' : ''}`;
21
- }
22
- ngOnInit() {
23
- this._portal = new ComponentPortal(this.registryService.resolve(this.chatMessage().type).component);
24
- }
25
- _handleAttched(ref) {
26
- ref = ref;
27
- if (ref.instance && isBrowser()) {
28
- Object.assign(ref.instance, { message: this.chatMessage() });
29
- this.cdr.markForCheck();
30
- const prefix = this.getHostElement().querySelector('ax-prefix');
31
- const suffix = this.getHostElement().querySelector('ax-suffix');
32
- const prefixContainer = this.getHostElement().querySelector('.ax-message-prefix');
33
- const suffixContainer = this.getHostElement().querySelector('.ax-message-suffix');
34
- if (prefix && prefixContainer) {
35
- prefix.style.display = 'flex';
36
- prefixContainer.append(prefix);
37
- }
38
- if (suffix && suffixContainer) {
39
- suffix.style.display = 'flex';
40
- suffixContainer.append(suffix);
41
- }
42
- }
43
- }
44
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatMessageComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
45
- 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-template [cdkPortalOutlet]=\"_portal\" (attached)=\"_handleAttched($event)\"></ng-template>\n\n<div class=\"ax-chat-message-status\">\n <div class=\"ax-message-prefix\">\n </div>\n <div>\n <div class=\"ax-message-suffix\"></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 ax-message-status\"></i>\n }\n @if(chatMessage().readTime){\n <i class=\"ax-icon ax-icon-dobble-check ax-message-status\"></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-message-status-color: rgba(var(--ax-color-primary-700))}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-chat-message .ax-chat-message-status .ax-message-status{color:var(--ax-message-status-color)}ax-chat-message ax-prefix,ax-chat-message ax-suffix{display:none}.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));--ax-message-status-color: rgba(var(--ax-color-primary-100))}\n"], dependencies: [{ kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.AXFormatPipe, name: "format" }], encapsulation: i0.ViewEncapsulation.None }); }
46
- }
47
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatMessageComponent, decorators: [{
48
- type: Component,
49
- args: [{ selector: 'ax-chat-message', encapsulation: ViewEncapsulation.None, template: "<ng-template [cdkPortalOutlet]=\"_portal\" (attached)=\"_handleAttched($event)\"></ng-template>\n\n<div class=\"ax-chat-message-status\">\n <div class=\"ax-message-prefix\">\n </div>\n <div>\n <div class=\"ax-message-suffix\"></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 ax-message-status\"></i>\n }\n @if(chatMessage().readTime){\n <i class=\"ax-icon ax-icon-dobble-check ax-message-status\"></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-message-status-color: rgba(var(--ax-color-primary-700))}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-chat-message .ax-chat-message-status .ax-message-status{color:var(--ax-message-status-color)}ax-chat-message ax-prefix,ax-chat-message ax-suffix{display:none}.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));--ax-message-status-color: rgba(var(--ax-color-primary-100))}\n"] }]
50
- }], propDecorators: { __hostClass: [{
51
- type: HostBinding,
52
- args: ['class']
53
- }] } });
54
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhdC1tZXNzYWdlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9jaGF0L3NyYy9saWIvY2hhdC1tZXNzYWdlL2NoYXQtbWVzc2FnZS5jb21wb25lbnQudHMiLCIuLi8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RhaW5lci5hcHBlbmQoc3VmZml4KTtcbiAgICAgIH1cbiAgICB9XG4gIH1cbn1cbiIsIjxuZy10ZW1wbGF0ZSBbY2RrUG9ydGFsT3V0bGV0XT1cIl9wb3J0YWxcIiAoYXR0YWNoZWQpPVwiX2hhbmRsZUF0dGNoZWQoJGV2ZW50KVwiPjwvbmctdGVtcGxhdGU+XG5cbjxkaXYgY2xhc3M9XCJheC1jaGF0LW1lc3NhZ2Utc3RhdHVzXCI+XG4gICAgPGRpdiBjbGFzcz1cImF4LW1lc3NhZ2UtcHJlZml4XCI+XG4gICAgPC9kaXY+XG4gICAgPGRpdj5cbiAgICAgICAgPGRpdiBjbGFzcz1cImF4LW1lc3NhZ2Utc3VmZml4XCI+PC9kaXY+XG4gICAgICAgIDxzcGFuPnt7IGNoYXRNZXNzYWdlKCkuc2VuZFRpbWUgfCBmb3JtYXQ6J2RhdGV0aW1lJzonSEg6bW0nIHwgYXN5bmMgfX08L3NwYW4+XG4gICAgICAgIDxzcGFuPlxuICAgICAgICAgICAgQGlmKGlzT3duKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgQGlmKGNoYXRNZXNzYWdlKCkuZGVsaXZlclRpbWUpe1xuICAgICAgICAgICAgPGkgY2xhc3M9XCJheC1pY29uIGF4LWljb24tY2hlY2sgYXgtbWVzc2FnZS1zdGF0dXNcIj48L2k+XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBAaWYoY2hhdE1lc3NhZ2UoKS5yZWFkVGltZSl7XG4gICAgICAgICAgICA8aSBjbGFzcz1cImF4LWljb24gYXgtaWNvbi1kb2JibGUtY2hlY2sgYXgtbWVzc2FnZS1zdGF0dXNcIj48L2k+XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIDwvc3Bhbj5cbiAgICA8L2Rpdj5cbjwvZGl2PiJdfQ==
@@ -1,23 +0,0 @@
1
- import { Component, ViewEncapsulation, signal } from '@angular/core';
2
- import { AXChatMessageBaseComponent } from '../chat.types';
3
- import * as i0 from "@angular/core";
4
- export class AXChatTextMessageComponent extends AXChatMessageBaseComponent {
5
- constructor() {
6
- super(...arguments);
7
- this._text = signal('');
8
- }
9
- ngOnInit() {
10
- this._text.set(this.message?.content);
11
- }
12
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatTextMessageComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
13
- 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 }); }
14
- }
15
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatTextMessageComponent, decorators: [{
16
- type: Component,
17
- args: [{
18
- template: `<div [innerHtml]="_text()"></div>`,
19
- encapsulation: ViewEncapsulation.None,
20
- inputs: ['message'],
21
- }]
22
- }] });
23
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhdC1tZXNzYWdlLXRleHQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL2NoYXQvc3JjL2xpYi9jaGF0LW1lc3NhZ2VzL2NoYXQtbWVzc2FnZS10ZXh0LmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNyRSxPQUFPLEVBQUUsMEJBQTBCLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBTzNELE1BQU0sT0FBTywwQkFBMkIsU0FBUSwwQkFBa0M7S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dfQ==
@@ -1,97 +0,0 @@
1
- import { AXAudioWaveComponent } from '@acorex/components/audio-wave';
2
- import { Component, ViewChild, ViewEncapsulation, afterNextRender, signal } from '@angular/core';
3
- import { AXChatMessageBaseComponent } from '../../chat.types';
4
- import * as i0 from "@angular/core";
5
- import * as i1 from "@acorex/components/decorators";
6
- import * as i2 from "@acorex/components/audio-wave";
7
- import * as i3 from "@acorex/components/loading";
8
- import * as i4 from "@angular/common";
9
- import * as i5 from "@acorex/core/format";
10
- export class AXChatAudioMessageComponent extends AXChatMessageBaseComponent {
11
- constructor() {
12
- super();
13
- this.config = { url: '' };
14
- this.audioState = signal('paused');
15
- this.selectedRate = signal(1);
16
- this.selectedRateIndex = signal(1);
17
- this.audioProgress = signal(0);
18
- this.timeLeft = signal(0);
19
- this.currentTime = signal(0);
20
- this.duration = signal(0);
21
- afterNextRender(() => {
22
- this.config.url = this.message?.content;
23
- this.config.audioRate = 0.25;
24
- if (this.message.fromId) {
25
- const neutral300 = getComputedStyle(document.body).getPropertyValue('--ax-color-neutral-200');
26
- const neutral500 = getComputedStyle(document.body).getPropertyValue('--ax-color-neutral-500');
27
- this.config.waveColor = `rgba(${neutral300})`;
28
- this.config.progressColor = `rgba(${neutral500})`;
29
- }
30
- this.handleLoadingProgress();
31
- });
32
- }
33
- handlePauseClick() {
34
- this.audio?.pause();
35
- this.audioState.set('paused');
36
- }
37
- handlePlayClick() {
38
- this.audio?.play()?.then(() => {
39
- this.audioState.set('playing');
40
- });
41
- }
42
- handleOnStatusChanged(e) {
43
- if (e.status === 'load' || e.status === 'loading') {
44
- this.audioState.set('loading');
45
- }
46
- if (e.status === 'loading') {
47
- this.audioProgress.set(e.data.percent);
48
- this.duration.set(Math.ceil(e.data.duration * 1000));
49
- }
50
- if (e.status === 'ready') {
51
- this.audioState.set('ready');
52
- this.duration.set(Math.ceil(e.data.duration * 1000));
53
- }
54
- if (e.status === 'finish') {
55
- this.audioState.set('paused');
56
- }
57
- if (e.status === 'timeupdate') {
58
- this.timeLeft.set(this.duration() - e.data.currentTime * 1000);
59
- this.currentTime.set(e.data.currentTime * 1000);
60
- }
61
- if (e.status === 'error') {
62
- this.audioState.set('error');
63
- }
64
- }
65
- handleLoadingProgress() {
66
- // this.audioLoaderProgress?.nativeElement.style.cssText = `--ax-audio-progress: ${this.audioProgress()}`;
67
- }
68
- handleCancelLoading() {
69
- //
70
- }
71
- handleReloadClick() {
72
- //
73
- this.audioState.set('loading');
74
- this.audio.load();
75
- }
76
- handleRateClick() {
77
- const rates = [0.5, 1, 2, 4];
78
- if (this.selectedRateIndex() == rates.length - 1) {
79
- this.selectedRateIndex.set(0);
80
- }
81
- else {
82
- this.selectedRateIndex.set(this.selectedRateIndex() + 1);
83
- }
84
- this.selectedRate.set(rates[this.selectedRateIndex()]);
85
- this.audio.setRate(this.selectedRate());
86
- }
87
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatAudioMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
88
- 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: "<ax-prefix>\n @switch (audioState()) {\n @case ('paused')\n {\n {{currentTime() | format:'time-duration' | async}}\n }\n @case ('playing')\n {\n {{currentTime() | format:'time-duration' | async}}\n }\n @default {\n {{duration() | format:'time-duration' | async}}\n }\n }\n <button class=\"ax-audio-speed\" (click)=\"handleRateClick()\"></button>\n\n</ax-prefix>\n<div class=\"ax-audio-controller\">\n\n @switch (audioState()) {\n @case ('playing') {\n <button (click)=\"handlePauseClick()\">\n <i class=\"ax-icon ax-icon-pause\"></i>\n </button>\n }\n\n @case ('ready') {\n <button (click)=\"handlePlayClick()\">\n <i class=\"ax-icon ax-icon-play\" style=\"margin-inline-start: 0.25rem;\"></i>\n </button>\n }\n\n @case ('paused')\n {\n <button (click)=\"handlePlayClick()\">\n <i class=\"ax-icon ax-icon-play\" style=\"margin-inline-start: 0.25rem;\"></i>\n </button>\n }\n\n @case ('error')\n {\n <button class=\"ax-state-error\" (click)=\"handleReloadClick()\">\n <i class=\"ax-icon ax-icon-reload\"></i>\n </button>\n }\n\n @default {\n <!-- <button (click)=\"handleCancelLoading()\" class=\"ax-audio-loader\" [style.--ax-audio-progress]=\"audioProgress()\"\n [style.--ax-animation-duration]=\"audioProgress()*10+'ms'\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 40 40\">\n <circle fill=\"none\" stroke-linecap=\"round\" cx=\"20\" cy=\"20\" r=\"15.915494309\" />\n </svg>\n </button> -->\n <button (click)=\"handleCancelLoading()\">\n <ax-loading-spinner [size]=\"24\" [stroke]=\"2\" color=\"white\"></ax-loading-spinner>\n </button>\n }\n }\n\n</div>\n<ax-audio-wave #a [config]=\"config\" (onStatusChanged)=\"handleOnStatusChanged($event)\"></ax-audio-wave>\n<ax-suffix>\n <div class=\"ax-audio-rate-button\" [class.ax-state-isOwn]=\"!message?.fromId\" (click)=\"handleRateClick()\">\n {{selectedRate()}}X</div>\n</ax-suffix>", 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 ax-loading-spinner{display:flex}ax-chat-message-audio .ax-audio-controller button.ax-state-error{background-color:rgba(var(--ax-color-danger-500));color:rgba(var(--ax-color-danger-fore))}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;font-weight:700}ax-chat-message-audio .ax-audio-controller button.ax-audio-loader{--ax-audio-progress: 100}ax-chat-message-audio .ax-audio-controller button.ax-audio-loader svg circle{stroke:#fff;stroke-width:.125rem;stroke-dasharray:var(--ax-audio-progress);stroke-dashoffset:0;animation:loader normal;animation-duration:var(--ax-animation-duration);transform-origin:center;transform:rotate(-90deg)}@keyframes loader{0%{stroke-dashoffset:var(--ax-audio-progress);transform:rotate(-90deg)}to{stroke-dashoffset:0;transform:rotate(450deg)}}ax-chat-message-audio .ax-audio-wave{flex:1}.ax-audio-rate-button{background-color:rgba(var(--ax-color-neutral-200));color:rgba(var(--ax-color-neutral-fore-tint));border-radius:.5rem;padding:0 .5rem;font-weight:700;margin-inline-end:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.ax-audio-rate-button.ax-state-isOwn{background-color:rgba(var(--ax-color-primary-200));color:rgba(var(--ax-color-primary-fore-tint))}\n"], dependencies: [{ kind: "component", type: i1.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.AXAudioWaveComponent, selector: "ax-audio-wave", inputs: ["config"], outputs: ["onStatusChanged"] }, { kind: "component", type: i3.AXLoadingSpinnerComponent, selector: "ax-loading-spinner", inputs: ["color", "size", "stroke"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXFormatPipe, name: "format" }], encapsulation: i0.ViewEncapsulation.None }); }
89
- }
90
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatAudioMessageComponent, decorators: [{
91
- type: Component,
92
- args: [{ selector: 'ax-chat-message-audio', encapsulation: ViewEncapsulation.None, inputs: ['message'], template: "<ax-prefix>\n @switch (audioState()) {\n @case ('paused')\n {\n {{currentTime() | format:'time-duration' | async}}\n }\n @case ('playing')\n {\n {{currentTime() | format:'time-duration' | async}}\n }\n @default {\n {{duration() | format:'time-duration' | async}}\n }\n }\n <button class=\"ax-audio-speed\" (click)=\"handleRateClick()\"></button>\n\n</ax-prefix>\n<div class=\"ax-audio-controller\">\n\n @switch (audioState()) {\n @case ('playing') {\n <button (click)=\"handlePauseClick()\">\n <i class=\"ax-icon ax-icon-pause\"></i>\n </button>\n }\n\n @case ('ready') {\n <button (click)=\"handlePlayClick()\">\n <i class=\"ax-icon ax-icon-play\" style=\"margin-inline-start: 0.25rem;\"></i>\n </button>\n }\n\n @case ('paused')\n {\n <button (click)=\"handlePlayClick()\">\n <i class=\"ax-icon ax-icon-play\" style=\"margin-inline-start: 0.25rem;\"></i>\n </button>\n }\n\n @case ('error')\n {\n <button class=\"ax-state-error\" (click)=\"handleReloadClick()\">\n <i class=\"ax-icon ax-icon-reload\"></i>\n </button>\n }\n\n @default {\n <!-- <button (click)=\"handleCancelLoading()\" class=\"ax-audio-loader\" [style.--ax-audio-progress]=\"audioProgress()\"\n [style.--ax-animation-duration]=\"audioProgress()*10+'ms'\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 40 40\">\n <circle fill=\"none\" stroke-linecap=\"round\" cx=\"20\" cy=\"20\" r=\"15.915494309\" />\n </svg>\n </button> -->\n <button (click)=\"handleCancelLoading()\">\n <ax-loading-spinner [size]=\"24\" [stroke]=\"2\" color=\"white\"></ax-loading-spinner>\n </button>\n }\n }\n\n</div>\n<ax-audio-wave #a [config]=\"config\" (onStatusChanged)=\"handleOnStatusChanged($event)\"></ax-audio-wave>\n<ax-suffix>\n <div class=\"ax-audio-rate-button\" [class.ax-state-isOwn]=\"!message?.fromId\" (click)=\"handleRateClick()\">\n {{selectedRate()}}X</div>\n</ax-suffix>", 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 ax-loading-spinner{display:flex}ax-chat-message-audio .ax-audio-controller button.ax-state-error{background-color:rgba(var(--ax-color-danger-500));color:rgba(var(--ax-color-danger-fore))}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;font-weight:700}ax-chat-message-audio .ax-audio-controller button.ax-audio-loader{--ax-audio-progress: 100}ax-chat-message-audio .ax-audio-controller button.ax-audio-loader svg circle{stroke:#fff;stroke-width:.125rem;stroke-dasharray:var(--ax-audio-progress);stroke-dashoffset:0;animation:loader normal;animation-duration:var(--ax-animation-duration);transform-origin:center;transform:rotate(-90deg)}@keyframes loader{0%{stroke-dashoffset:var(--ax-audio-progress);transform:rotate(-90deg)}to{stroke-dashoffset:0;transform:rotate(450deg)}}ax-chat-message-audio .ax-audio-wave{flex:1}.ax-audio-rate-button{background-color:rgba(var(--ax-color-neutral-200));color:rgba(var(--ax-color-neutral-fore-tint));border-radius:.5rem;padding:0 .5rem;font-weight:700;margin-inline-end:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.ax-audio-rate-button.ax-state-isOwn{background-color:rgba(var(--ax-color-primary-200));color:rgba(var(--ax-color-primary-fore-tint))}\n"] }]
93
- }], ctorParameters: () => [], propDecorators: { audio: [{
94
- type: ViewChild,
95
- args: ['a']
96
- }] } });
97
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhdC1tZXNzYWdlLXZvaWNlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9jaGF0L3NyYy9saWIvY2hhdC1tZXNzYWdlcy9jaGF0LW1lc3NhZ2VzLXZvaWNlL2NoYXQtbWVzc2FnZS12b2ljZS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvY2hhdC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ZnXCIgdmlld0JveD1cIjAgMCA0MCA0MFwiPlxuICAgICAgPGNpcmNsZSBmaWxsPVwibm9uZVwiIHN0cm9rZS1saW5lY2FwPVwicm91bmRcIiBjeD1cIjIwXCIgY3k9XCIyMFwiIHI9XCIxNS45MTU0OTQzMDlcIiAvPlxuICAgIDwvc3ZnPlxuICA8L2J1dHRvbj4gLS0+XG4gIDxidXR0b24gKGNsaWNrKT1cImhhbmRsZUNhbmNlbExvYWRpbmcoKVwiPlxuICAgIDxheC1sb2FkaW5nLXNwaW5uZXIgW3NpemVdPVwiMjRcIiBbc3Ryb2tlXT1cIjJcIiBjb2xvcj1cIndoaXRlXCI+PC9heC1sb2FkaW5nLXNwaW5uZXI+XG4gIDwvYnV0dG9uPlxuICB9XG4gIH1cblxuPC9kaXY+XG48YXgtYXVkaW8td2F2ZSAjYSBbY29uZmlnXT1cImNvbmZpZ1wiIChvblN0YXR1c0NoYW5nZWQpPVwiaGFuZGxlT25TdGF0dXNDaGFuZ2VkKCRldmVudClcIj48L2F4LWF1ZGlvLXdhdmU+XG48YXgtc3VmZml4PlxuICA8ZGl2IGNsYXNzPVwiYXgtYXVkaW8tcmF0ZS1idXR0b25cIiBbY2xhc3MuYXgtc3RhdGUtaXNPd25dPVwiIW1lc3NhZ2U/LmZyb21JZFwiIChjbGljayk9XCJoYW5kbGVSYXRlQ2xpY2soKVwiPlxuICAgIHt7c2VsZWN0ZWRSYXRlKCl9fVg8L2Rpdj5cbjwvYXgtc3VmZml4PiJdfQ==
@@ -1,22 +0,0 @@
1
- import { MXBaseComponent } from '@acorex/components/common';
2
- import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation, signal } from '@angular/core';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "../chat-message/chat-message.component";
5
- export class AXChatViewComponent extends MXBaseComponent {
6
- constructor() {
7
- super(...arguments);
8
- this._chats = signal([]);
9
- }
10
- set chats(items) {
11
- this._chats.set(items);
12
- }
13
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
14
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.2", type: AXChatViewComponent, selector: "ax-chat-view", inputs: { chats: "chats" }, usesInheritance: true, ngImport: i0, template: "@for (item of _chats(); track $index) {\n<ax-chat-message [chatMessage]=\"item\"></ax-chat-message>\n}", styles: ["ax-chat-view{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;overflow-y:auto;overflow-x:hidden}\n"], dependencies: [{ kind: "component", type: i1.AXChatMessageComponent, selector: "ax-chat-message", inputs: ["chatMessage"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
15
- }
16
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatViewComponent, decorators: [{
17
- type: Component,
18
- args: [{ selector: 'ax-chat-view', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "@for (item of _chats(); track $index) {\n<ax-chat-message [chatMessage]=\"item\"></ax-chat-message>\n}", styles: ["ax-chat-view{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;overflow-y:auto;overflow-x:hidden}\n"] }]
19
- }], propDecorators: { chats: [{
20
- type: Input
21
- }] } });
22
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhdC12aWV3LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9jaGF0L3NyYy9saWIvY2hhdC12aWV3L2NoYXQtdmlldy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvY2hhdC9zcmMvbGliL2NoYXQtdmlldy9jaG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ICB0ZW1wbGF0ZVVybDogJy4vY2hhdC12aWV3LmNvbXBvbmVudC5odG1sJyxcbiAgc3R5bGVVcmxzOiBbJy4vY2hhdC12aWV3LmNvbXBvbmVudC5zY3NzJ10sXG4gIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLFxuICBlbmNhcHN1bGF0aW9uOiBWaWV3RW5jYXBzdWxhdGlvbi5Ob25lLFxufSlcbmV4cG9ydCBjbGFzcyBBWENoYXRWaWV3Q29tcG9uZW50IGV4dGVuZHMgTVhCYXNlQ29tcG9uZW50IHtcbiAgQElucHV0KClcbiAgcHVibGljIHNldCBjaGF0cyhpdGVtczogQVhDaGF0TWVzc2FnZTxhbnk+W10pIHtcbiAgICB0aGlzLl9jaGF0cy5zZXQoaXRlbXMpO1xuICB9XG5cbiAgcHJvdGVjdGVkIF9jaGF0czogV3JpdGFibGVTaWduYWw8QVhDaGF0TWVzc2FnZTxhbnk+W10+ID0gc2lnbmFsKFtdKTtcbn1cbiIsIkBmb3IgKGl0ZW0gb2YgX2NoYXRzKCk7IHRyYWNrICRpbmRleCkge1xuPGF4LWNoYXQtbWVzc2FnZSBbY2hhdE1lc3NhZ2VdPVwiaXRlbVwiPjwvYXgtY2hhdC1tZXNzYWdlPlxufSJdfQ==
@@ -1,146 +0,0 @@
1
- import { AXAudioWaveModule } from '@acorex/components/audio-wave';
2
- import { AXButtonModule } from '@acorex/components/button';
3
- import { AXCircularProgressModule } from '@acorex/components/circular-progress';
4
- import { AXRippleDirective } from '@acorex/components/common';
5
- import { AXDecoratorModule } from '@acorex/components/decorators';
6
- import { AXDropdownModule } from '@acorex/components/dropdown';
7
- import { AXLoadingModule } from '@acorex/components/loading';
8
- import { AXDateTimeModule } from '@acorex/core/date-time';
9
- import { AXFormatModule } from '@acorex/core/format';
10
- import { AXTranslationModule } from '@acorex/core/translation';
11
- import { CdkPortalOutlet } from '@angular/cdk/portal';
12
- import { AsyncPipe, CommonModule } from '@angular/common';
13
- import { Inject, NgModule, Optional } from '@angular/core';
14
- import { FormsModule } from '@angular/forms';
15
- import { AXChatInputComponent } from './chat-input/chat-input.component';
16
- import { AXChatMessageComponent } from './chat-message/chat-message.component';
17
- import { AXChatTextMessageComponent } from './chat-messages/chat-message-text.component';
18
- import { AXChatAudioMessageComponent } from './chat-messages/chat-messages-voice/chat-message-voice.component';
19
- import { AXChatViewComponent } from './chat-view/chat-view.component';
20
- import { AXChatMessageTypeRegistryService } from './services/chat-message-type-registry.service';
21
- import { AXRecordingService } from './services/recording.service';
22
- import * as i0 from "@angular/core";
23
- const COMPONENT = [
24
- AXChatViewComponent,
25
- AXChatInputComponent,
26
- AXChatMessageComponent,
27
- AXChatTextMessageComponent,
28
- AXChatAudioMessageComponent,
29
- ];
30
- const MODULES = [
31
- CommonModule,
32
- FormsModule,
33
- AsyncPipe,
34
- AXRippleDirective,
35
- AXButtonModule,
36
- AXDecoratorModule,
37
- AXTranslationModule,
38
- AXDropdownModule,
39
- AXFormatModule,
40
- AXAudioWaveModule,
41
- AXCircularProgressModule,
42
- AXDateTimeModule,
43
- CdkPortalOutlet,
44
- AXLoadingModule,
45
- ];
46
- export class AXChatModule {
47
- static forRoot(config) {
48
- return {
49
- ngModule: AXChatModule,
50
- providers: [
51
- {
52
- provide: 'AXChatModuleFactory',
53
- useFactory: (registry) => () => {
54
- if (config?.types?.length) {
55
- registry.register(...config.types);
56
- }
57
- registry.register({
58
- name: 'text',
59
- component: AXChatTextMessageComponent,
60
- });
61
- registry.register({
62
- name: 'audio',
63
- component: AXChatAudioMessageComponent,
64
- });
65
- },
66
- deps: [AXChatMessageTypeRegistryService],
67
- multi: true,
68
- },
69
- ],
70
- };
71
- }
72
- static forChild(config) {
73
- return {
74
- ngModule: AXChatModule,
75
- providers: [
76
- {
77
- provide: 'AXPWorkflowModuleFactory',
78
- useFactory: (registry) => () => {
79
- if (config?.types?.length) {
80
- registry.register(...config.types);
81
- }
82
- },
83
- deps: [AXChatMessageTypeRegistryService],
84
- multi: true,
85
- },
86
- ],
87
- };
88
- }
89
- /**
90
- * @ignore
91
- */
92
- constructor(instances) {
93
- instances?.forEach((f) => {
94
- f();
95
- });
96
- }
97
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatModule, deps: [{ token: 'AXChatModuleFactory', optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
98
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.2", ngImport: i0, type: AXChatModule, declarations: [AXChatViewComponent,
99
- AXChatInputComponent,
100
- AXChatMessageComponent,
101
- AXChatTextMessageComponent,
102
- AXChatAudioMessageComponent], imports: [CommonModule,
103
- FormsModule,
104
- AsyncPipe,
105
- AXRippleDirective,
106
- AXButtonModule,
107
- AXDecoratorModule,
108
- AXTranslationModule,
109
- AXDropdownModule,
110
- AXFormatModule,
111
- AXAudioWaveModule,
112
- AXCircularProgressModule,
113
- AXDateTimeModule,
114
- CdkPortalOutlet,
115
- AXLoadingModule], exports: [AXChatViewComponent,
116
- AXChatInputComponent,
117
- AXChatMessageComponent,
118
- AXChatTextMessageComponent,
119
- AXChatAudioMessageComponent] }); }
120
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatModule, providers: [AXRecordingService], imports: [CommonModule,
121
- FormsModule,
122
- AXButtonModule,
123
- AXDecoratorModule,
124
- AXTranslationModule,
125
- AXDropdownModule,
126
- AXFormatModule,
127
- AXAudioWaveModule,
128
- AXCircularProgressModule,
129
- AXDateTimeModule,
130
- AXLoadingModule] }); }
131
- }
132
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatModule, decorators: [{
133
- type: NgModule,
134
- args: [{
135
- declarations: [...COMPONENT],
136
- imports: [...MODULES],
137
- exports: [...COMPONENT],
138
- providers: [AXRecordingService],
139
- }]
140
- }], ctorParameters: () => [{ type: undefined, decorators: [{
141
- type: Optional
142
- }, {
143
- type: Inject,
144
- args: ['AXChatModuleFactory']
145
- }] }] });
146
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhdC5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvY2hhdC9zcmMvbGliL2NoYXQubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBQ2xFLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUMzRCxPQUFPLEVBQUUsd0JBQXdCLEVBQUUsTUFBTSxzQ0FBc0MsQ0FBQztBQUNoRixPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUM5RCxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUNsRSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUMvRCxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFDN0QsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFDMUQsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQ3JELE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQy9ELE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUN0RCxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQz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SxcbiAgICB9O1xuICB9XG5cbiAgc3RhdGljIGZvckNoaWxkKGNvbmZpZz86IEFYQ2hhdE1vZHVsZUNvbmZpZyk6IE1vZHVsZVdpdGhQcm92aWRlcnM8QVhDaGF0TW9kdWxlPiB7XG4gICAgcmV0dXJuIHtcbiAgICAgIG5nTW9kdWxlOiBBWENoYXRNb2R1bGUsXG4gICAgICBwcm92aWRlcnM6IFtcbiAgICAgICAge1xuICAgICAgICAgIHByb3ZpZGU6ICdBWFBXb3JrZmxvd01vZHVsZUZhY3RvcnknLFxuICAgICAgICAgIHVzZUZhY3Rvcnk6IChyZWdpc3RyeTogQVhDaGF0TWVzc2FnZVR5cGVSZWdpc3RyeVNlcnZpY2UpID0+ICgpID0+IHtcbiAgICAgICAgICAgIGlmIChjb25maWc/LnR5cGVzPy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgcmVnaXN0cnkucmVnaXN0ZXIoLi4uY29uZmlnLnR5cGVzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9LFxuICAgICAgICAgIGRlcHM6IFtBWENoYXRNZXNzYWdlVHlwZVJlZ2lzdHJ5U2VydmljZV0sXG4gICAgICAgICAgbXVsdGk6IHRydWUsXG4gICAgICAgIH0sXG4gICAgICBdLFxuICAgIH07XG4gIH1cblxuICAvKipcbiAgICogQGlnbm9yZVxuICAgKi9cbiAgY29uc3RydWN0b3IoQE9wdGlvbmFsKCkgQEluamVjdCgnQVhDaGF0TW9kdWxlRmFjdG9yeScpIGluc3RhbmNlczogYW55W10pIHtcbiAgICBpbnN0YW5jZXM/LmZvckVhY2goKGYpID0+IHtcbiAgICAgIGYoKTtcbiAgICB9KTtcbiAgfVxufVxuIl19
@@ -1,10 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export class AXChatMessageBaseComponent {
4
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatMessageBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatMessageBaseComponent }); }
6
- }
7
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatMessageBaseComponent, decorators: [{
8
- type: Injectable
9
- }] });
10
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhdC50eXBlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9jaGF0L3NyYy9saWIvY2hhdC50eXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFRLE1BQU0sZUFBZSxDQUFDOztBQW1CakQsTUFBTSxPQUFPLDBCQUEwQjs4R0FBMUIsMEJBQTBCO2tIQUExQiwwQkFBMEI7OzJGQUExQiwwQkFBMEI7a0JBRHRDLFVBQVUiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3RhYmxlLCBUeXBlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbmV4cG9ydCBpbnRlcmZhY2UgQVhDaGF0TWVzc2FnZVR5cGUge1xuICBuYW1lOiBzdHJpbmc7XG4gIGNvbXBvbmVudDogVHlwZTxhbnk+O1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIEFYQ2hhdE1lc3NhZ2U8VD4ge1xuICBpZDogc3RyaW5nO1xuICB0eXBlOiBzdHJpbmc7XG4gIHNlbmRUaW1lOiBEYXRlO1xuICBkZWxpdmVyVGltZT86IERhdGU7XG4gIHJlYWRUaW1lPzogRGF0ZTtcbiAgcmVwbHlUbz86IHN0cmluZztcbiAgY29udGVudDogVDtcbiAgZnJvbUlkPzogc3RyaW5nO1xufVxuXG5ASW5qZWN0YWJsZSgpXG5leHBvcnQgY2xhc3MgQVhDaGF0TWVzc2FnZUJhc2VDb21wb25lbnQ8VD4ge1xuICBtZXNzYWdlOiBBWENoYXRNZXNzYWdlPFQ+O1xufVxuIl19
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnRzLmludGVyZmFjZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9jaGF0L3NyYy9saWIvY2xhc3Nlcy9ldmVudHMuaW50ZXJmYWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBBWEh0bWxFdmVudCB9IGZyb20gJ0BhY29yZXgvY29tcG9uZW50cy9jb21tb24nO1xuXG5leHBvcnQgaW50ZXJmYWNlIEFYSW5wdXRGaWxlQ2hhbmdlIGV4dGVuZHMgQVhIdG1sRXZlbnQ8TW91c2VFdmVudD4ge1xuICBkYXRhPzogYW55O1xufVxuIl19
@@ -1,20 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export class AXChatMessageTypeRegistryService {
4
- constructor() {
5
- this.plugins = new Map();
6
- }
7
- register(...plugins) {
8
- plugins.forEach((p) => this.plugins.set(p.name, p));
9
- }
10
- resolve(name) {
11
- return this.plugins.get(name);
12
- }
13
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatMessageTypeRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
14
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatMessageTypeRegistryService, providedIn: 'root' }); }
15
- }
16
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatMessageTypeRegistryService, decorators: [{
17
- type: Injectable,
18
- args: [{ providedIn: 'root' }]
19
- }] });
20
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhdC1tZXNzYWdlLXR5cGUtcmVnaXN0cnkuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9jaGF0L3NyYy9saWIvc2VydmljZXMvY2hhdC1tZXNzYWdlLXR5cGUtcmVnaXN0cnkuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQUkzQyxNQUFNLE9BQU8sZ0NBQWdDO0lBRDdDO1FBRVUsWUFBTyxHQUFtQyxJQUFJLEdBQUcsRUFHdEQsQ0FBQztLQVNMO0lBUEMsUUFBUSxDQUFDLEdBQUcsT0FBNEI7UUFDdEMsT0FBTyxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsRUFBRSxFQUFFLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLElBQUksRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDO0lBQ3RELENBQUM7SUFFTSxPQUFPLENBQUMsSUFBWTtRQUN6QixPQUFPLElBQUksQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQ2hDLENBQUM7OEdBWlUsZ0NBQWdDO2tIQUFoQyxnQ0FBZ0MsY0FEbkIsTUFBTTs7MkZBQ25CLGdDQUFnQztrQkFENUMsVUFBVTttQkFBQyxFQUFFLFVBQVUsRUFBRSxNQUFNLEVBQUUiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3RhYmxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBBWENoYXRNZXNzYWdlVHlwZSB9IGZyb20gJy4uL2NoYXQudHlwZXMnO1xuXG5ASW5qZWN0YWJsZSh7IHByb3ZpZGVkSW46ICdyb290JyB9KVxuZXhwb3J0IGNsYXNzIEFYQ2hhdE1lc3NhZ2VUeXBlUmVnaXN0cnlTZXJ2aWNlIHtcbiAgcHJpdmF0ZSBwbHVnaW5zOiBNYXA8c3RyaW5nLCBBWENoYXRNZXNzYWdlVHlwZT4gPSBuZXcgTWFwPFxuICAgIHN0cmluZyxcbiAgICBBWENoYXRNZXNzYWdlVHlwZVxuICA+KCk7XG5cbiAgcmVnaXN0ZXIoLi4ucGx1Z2luczogQVhDaGF0TWVzc2FnZVR5cGVbXSkge1xuICAgIHBsdWdpbnMuZm9yRWFjaCgocCkgPT4gdGhpcy5wbHVnaW5zLnNldChwLm5hbWUsIHApKTtcbiAgfVxuXG4gIHB1YmxpYyByZXNvbHZlKG5hbWU6IHN0cmluZyk6IEFYQ2hhdE1lc3NhZ2VUeXBlIHwgdW5kZWZpbmVkIHtcbiAgICByZXR1cm4gdGhpcy5wbHVnaW5zLmdldChuYW1lKTtcbiAgfVxufVxuIl19
@@ -1,10 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export class AXChatService {
4
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatService }); }
6
- }
7
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatService, decorators: [{
8
- type: Injectable
9
- }] });
10
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhdC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL2NoYXQvc3JjL2xpYi9zZXJ2aWNlcy9jaGF0LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFHM0MsTUFBTSxPQUFPLGFBQWE7OEdBQWIsYUFBYTtrSEFBYixhQUFhOzsyRkFBYixhQUFhO2tCQUR6QixVQUFVIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSW5qZWN0YWJsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5ASW5qZWN0YWJsZSgpXG5leHBvcnQgY2xhc3MgQVhDaGF0U2VydmljZSB7fVxuIl19
@@ -1,78 +0,0 @@
1
- import { Injectable, signal } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export class AXRecordingService {
4
- constructor() {
5
- this.audioBlobs = [];
6
- this.streamBeingCaptured = null;
7
- this.timer = signal('00:0');
8
- this.time = {
9
- seconds: 0,
10
- minutes: 0,
11
- hours: 0,
12
- };
13
- }
14
- startRecording() {
15
- if (!(navigator.mediaDevices && navigator.mediaDevices.getUserMedia)) {
16
- return Promise.reject(new Error('mediaDevices API or getUserMedia method is not supported in this browser.'));
17
- }
18
- else {
19
- return navigator.mediaDevices
20
- .getUserMedia({ audio: true })
21
- .then((stream) => {
22
- this.streamBeingCaptured = stream;
23
- this.mediaRecorder = new MediaRecorder(stream);
24
- this.audioBlobs = [];
25
- this.mediaRecorder.addEventListener('dataavailable', (event) => {
26
- this.audioBlobs.push(event.data);
27
- });
28
- this.mediaRecorder.start();
29
- this.timerInterval = setInterval(() => {
30
- this.calculateTime();
31
- }, 1000);
32
- });
33
- }
34
- }
35
- stopRecording() {
36
- return new Promise((resolve) => {
37
- const mimeType = this.mediaRecorder?.mimeType;
38
- this.mediaRecorder?.addEventListener('stop', () => {
39
- const audioBlob = new Blob(this.audioBlobs, { type: mimeType });
40
- resolve(audioBlob);
41
- });
42
- this.mediaRecorder?.stop();
43
- this.streamBeingCaptured.getTracks().forEach((track) => track.stop());
44
- this.mediaRecorder = null;
45
- this.streamBeingCaptured = null;
46
- this.resetTimer();
47
- });
48
- }
49
- calculateTime() {
50
- this.time.seconds++;
51
- if (this.time.seconds >= 60) {
52
- this.time.seconds = 0;
53
- this.time.minutes++;
54
- if (this.time.minutes >= 60) {
55
- this.time.minutes = 0;
56
- this.time.hours++;
57
- }
58
- }
59
- const formattedTime = (this.time.hours > 0 ? this.time.hours + ':' : '') +
60
- (this.time.minutes < 10 ? '0' + this.time.minutes : this.time.minutes) +
61
- ':' +
62
- (this.time.seconds < 10 ? '0' + this.time.seconds : this.time.seconds);
63
- this.timer.set(formattedTime);
64
- }
65
- resetTimer() {
66
- clearInterval(this.timerInterval);
67
- this.time.seconds = 0;
68
- this.time.minutes = 0;
69
- this.time.hours = 0;
70
- this.timer.set('00:0');
71
- }
72
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXRecordingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
73
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXRecordingService }); }
74
- }
75
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXRecordingService, decorators: [{
76
- type: Injectable
77
- }] });
78
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVjb3JkaW5nLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvY2hhdC9zcmMvbGliL3NlcnZpY2VzL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y50aW1lLmhvdXJzKys7XG4gICAgICB9XG4gICAgfVxuXG4gICAgY29uc3QgZm9ybWF0dGVkVGltZSA9XG4gICAgICAodGhpcy50aW1lLmhvdXJzID4gMCA/IHRoaXMudGltZS5ob3VycyArICc6JyA6ICcnKSArXG4gICAgICAodGhpcy50aW1lLm1pbnV0ZXMgPCAxMCA/ICcwJyArIHRoaXMudGltZS5taW51dGVzIDogdGhpcy50aW1lLm1pbnV0ZXMpICtcbiAgICAgICc6JyArXG4gICAgICAodGhpcy50aW1lLnNlY29uZHMgPCAxMCA/ICcwJyArIHRoaXMudGltZS5zZWNvbmRzIDogdGhpcy50aW1lLnNlY29uZHMpO1xuXG4gICAgdGhpcy50aW1lci5zZXQoZm9ybWF0dGVkVGltZSk7XG4gIH1cblxuICByZXNldFRpbWVyKCkge1xuICAgIGNsZWFySW50ZXJ2YWwodGhpcy50aW1lckludGVydmFsKTtcbiAgICB0aGlzLnRpbWUuc2Vjb25kcyA9IDA7XG4gICAgdGhpcy50aW1lLm1pbnV0ZXMgPSAwO1xuICAgIHRoaXMudGltZS5ob3VycyA9IDA7XG4gICAgdGhpcy50aW1lci5zZXQoJzAwOjAnKTtcbiAgfVxufVxuIl19