@acorex/components 17.0.13 → 17.0.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. package/audio-wave/lib/audio-wave.component.d.ts +7 -2
  2. package/audio-wave/lib/audio-wave.module.d.ts +2 -1
  3. package/audio-wave/lib/interfaces/audio-wave.interface.d.ts +2 -1
  4. package/chat/lib/chat-messages/chat-messages-voice/chat-message-voice.component.d.ts +7 -1
  5. package/chat/lib/chat.module.d.ts +2 -1
  6. package/common/lib/components/base-component.class.d.ts +0 -4
  7. package/esm2022/audio-wave/lib/audio-wave.component.mjs +53 -27
  8. package/esm2022/audio-wave/lib/audio-wave.module.mjs +5 -4
  9. package/esm2022/audio-wave/lib/interfaces/audio-wave.interface.mjs +1 -1
  10. package/esm2022/button/lib/button.component.mjs +3 -3
  11. package/esm2022/chat/lib/chat-message/chat-message.component.mjs +12 -6
  12. package/esm2022/chat/lib/chat-messages/chat-messages-voice/chat-message-voice.component.mjs +46 -9
  13. package/esm2022/chat/lib/chat.module.mjs +7 -3
  14. package/esm2022/color-palette/lib/color-palette-picker.component.mjs +8 -12
  15. package/esm2022/common/lib/components/base-component.class.mjs +11 -14
  16. package/esm2022/data-table/lib/columns/row-command-column.component.mjs +5 -5
  17. package/esm2022/dialog/lib/dialog.service.mjs +2 -2
  18. package/esm2022/list/lib/list.component.mjs +3 -3
  19. package/esm2022/select-box/lib/select-box.component.mjs +3 -3
  20. package/esm2022/side-menu/lib/side-menu.component.mjs +2 -2
  21. package/fesm2022/acorex-components-audio-wave.mjs +57 -30
  22. package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
  23. package/fesm2022/acorex-components-button.mjs +2 -2
  24. package/fesm2022/acorex-components-button.mjs.map +1 -1
  25. package/fesm2022/acorex-components-chat.mjs +60 -13
  26. package/fesm2022/acorex-components-chat.mjs.map +1 -1
  27. package/fesm2022/acorex-components-color-palette.mjs +4 -8
  28. package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
  29. package/fesm2022/acorex-components-common.mjs +10 -13
  30. package/fesm2022/acorex-components-common.mjs.map +1 -1
  31. package/fesm2022/acorex-components-data-table.mjs +5 -5
  32. package/fesm2022/acorex-components-data-table.mjs.map +1 -1
  33. package/fesm2022/acorex-components-dialog.mjs +1 -1
  34. package/fesm2022/acorex-components-dialog.mjs.map +1 -1
  35. package/fesm2022/acorex-components-list.mjs +2 -2
  36. package/fesm2022/acorex-components-list.mjs.map +1 -1
  37. package/fesm2022/acorex-components-select-box.mjs +2 -2
  38. package/fesm2022/acorex-components-select-box.mjs.map +1 -1
  39. package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
  40. package/package.json +7 -7
@@ -22,6 +22,8 @@ import { AXFormatModule } from '@acorex/core/format';
22
22
  import * as i2$1 from '@acorex/components/audio-wave';
23
23
  import { AXAudioWaveModule } from '@acorex/components/audio-wave';
24
24
  import { AXCircularProgressModule } from '@acorex/components/circular-progress';
25
+ import * as i3$2 from '@acorex/components/loading';
26
+ import { AXLoadingModule } from '@acorex/components/loading';
25
27
  import { AXDateTimeModule } from '@acorex/core/date-time';
26
28
 
27
29
  class AXRecordingService {
@@ -252,19 +254,25 @@ class AXChatMessageComponent extends MXBaseComponent {
252
254
  Object.assign(ref.instance, { message: this.chatMessage() });
253
255
  this.cdr.markForCheck();
254
256
  const prefix = this.getHostElement().querySelector('ax-prefix');
255
- const container = this.getHostElement().querySelector('.ax-message-prefix');
256
- if (prefix && container) {
257
+ const suffix = this.getHostElement().querySelector('ax-suffix');
258
+ const prefixContainer = this.getHostElement().querySelector('.ax-message-prefix');
259
+ const suffixContainer = this.getHostElement().querySelector('.ax-message-suffix');
260
+ if (prefix && prefixContainer) {
257
261
  prefix.style.display = 'flex';
258
- container.append(prefix);
262
+ prefixContainer.append(prefix);
263
+ }
264
+ if (suffix && suffixContainer) {
265
+ suffix.style.display = 'flex';
266
+ suffixContainer.append(suffix);
259
267
  }
260
268
  }
261
269
  }
262
270
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatMessageComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
263
- 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 <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-chat-message ax-prefix{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))}\n"], dependencies: [{ kind: "directive", type: i1$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.AXFormatPipe, name: "format" }], encapsulation: i0.ViewEncapsulation.None }); }
271
+ 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$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.AXFormatPipe, name: "format" }], encapsulation: i0.ViewEncapsulation.None }); }
264
272
  }
265
273
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatMessageComponent, decorators: [{
266
274
  type: Component,
267
- 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 <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-chat-message ax-prefix{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))}\n"] }]
275
+ 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"] }]
268
276
  }], propDecorators: { __hostClass: [{
269
277
  type: HostBinding,
270
278
  args: ['class']
@@ -321,26 +329,37 @@ class AXChatAudioMessageComponent extends AXChatMessageBaseComponent {
321
329
  super();
322
330
  this.config = { url: '' };
323
331
  this.audioState = signal('paused');
332
+ this.selectedRate = signal(1);
333
+ this.selectedRateIndex = signal(1);
324
334
  this.audioProgress = signal(0);
325
335
  this.timeLeft = signal(0);
326
336
  this.currentTime = signal(0);
327
337
  this.duration = signal(0);
328
338
  afterNextRender(() => {
329
339
  this.config.url = this.message?.content;
330
- this.audioState.set('loading');
340
+ this.config.audioRate = 0.25;
341
+ if (this.message.fromId) {
342
+ const neutral300 = getComputedStyle(document.body).getPropertyValue('--ax-color-neutral-200');
343
+ const neutral500 = getComputedStyle(document.body).getPropertyValue('--ax-color-neutral-500');
344
+ this.config.waveColor = `rgba(${neutral300})`;
345
+ this.config.progressColor = `rgba(${neutral500})`;
346
+ }
347
+ this.handleLoadingProgress();
331
348
  });
332
349
  }
333
350
  handlePauseClick() {
334
- this.audio.pause();
351
+ this.audio?.pause();
335
352
  this.audioState.set('paused');
336
353
  }
337
354
  handlePlayClick() {
338
- this.audio.play().then(() => {
355
+ this.audio?.play()?.then(() => {
339
356
  this.audioState.set('playing');
340
357
  });
341
358
  }
342
359
  handleOnStatusChanged(e) {
343
- console.log(e.status, e.data);
360
+ if (e.status === 'load' || e.status === 'loading') {
361
+ this.audioState.set('loading');
362
+ }
344
363
  if (e.status === 'loading') {
345
364
  this.audioProgress.set(e.data.percent);
346
365
  this.duration.set(Math.ceil(e.data.duration * 1000));
@@ -356,13 +375,38 @@ class AXChatAudioMessageComponent extends AXChatMessageBaseComponent {
356
375
  this.timeLeft.set(this.duration() - e.data.currentTime * 1000);
357
376
  this.currentTime.set(e.data.currentTime * 1000);
358
377
  }
378
+ if (e.status === 'error') {
379
+ this.audioState.set('error');
380
+ }
381
+ }
382
+ handleLoadingProgress() {
383
+ // this.audioLoaderProgress?.nativeElement.style.cssText = `--ax-audio-progress: ${this.audioProgress()}`;
384
+ }
385
+ handleCancelLoading() {
386
+ //
387
+ }
388
+ handleReloadClick() {
389
+ //
390
+ this.audioState.set('loading');
391
+ this.audio.load();
392
+ }
393
+ handleRateClick() {
394
+ const rates = [0.5, 1, 2, 4];
395
+ if (this.selectedRateIndex() == rates.length - 1) {
396
+ this.selectedRateIndex.set(0);
397
+ }
398
+ else {
399
+ this.selectedRateIndex.set(this.selectedRateIndex() + 1);
400
+ }
401
+ this.selectedRate.set(rates[this.selectedRateIndex()]);
402
+ this.audio.setRate(this.selectedRate());
359
403
  }
360
404
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatAudioMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
361
- 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 <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 40 40\" class=\"loader\">\n <circle class=\"progress\" fill=\"none\" stroke-linecap=\"round\" cx=\"20\" cy=\"20\" r=\"15.915494309\" />\n </svg>\n </button> -->\n }\n @default {\n <button (click)=\"handlePlayClick()\">\n <i class=\"fa-solid fa-play\" style=\"margin-inline-start: 0.25rem;\"></i>\n </button>\n }\n }\n\n</div>\n<ax-audio-wave #a [config]=\"config\" (onStatusChanged)=\"handleOnStatusChanged($event)\"></ax-audio-wave>\n\n<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</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$1.AXAudioWaveComponent, selector: "ax-audio-wave", inputs: ["config"], outputs: ["onStatusChanged"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.AXFormatPipe, name: "format" }], encapsulation: i0.ViewEncapsulation.None }); }
405
+ 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: 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$1.AXAudioWaveComponent, selector: "ax-audio-wave", inputs: ["config"], outputs: ["onStatusChanged"] }, { kind: "component", type: i3$2.AXLoadingSpinnerComponent, selector: "ax-loading-spinner", inputs: ["color", "size", "stroke"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.AXFormatPipe, name: "format" }], encapsulation: i0.ViewEncapsulation.None }); }
362
406
  }
363
407
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatAudioMessageComponent, decorators: [{
364
408
  type: Component,
365
- 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 <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 40 40\" class=\"loader\">\n <circle class=\"progress\" fill=\"none\" stroke-linecap=\"round\" cx=\"20\" cy=\"20\" r=\"15.915494309\" />\n </svg>\n </button> -->\n }\n @default {\n <button (click)=\"handlePlayClick()\">\n <i class=\"fa-solid fa-play\" style=\"margin-inline-start: 0.25rem;\"></i>\n </button>\n }\n }\n\n</div>\n<ax-audio-wave #a [config]=\"config\" (onStatusChanged)=\"handleOnStatusChanged($event)\"></ax-audio-wave>\n\n<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</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"] }]
409
+ 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"] }]
366
410
  }], ctorParameters: () => [], propDecorators: { audio: [{
367
411
  type: ViewChild,
368
412
  args: ['a']
@@ -389,6 +433,7 @@ const MODULES = [
389
433
  AXCircularProgressModule,
390
434
  AXDateTimeModule,
391
435
  CdkPortalOutlet,
436
+ AXLoadingModule,
392
437
  ];
393
438
  class AXChatModule {
394
439
  static forRoot(config) {
@@ -458,7 +503,8 @@ class AXChatModule {
458
503
  AXAudioWaveModule,
459
504
  AXCircularProgressModule,
460
505
  AXDateTimeModule,
461
- CdkPortalOutlet], exports: [AXChatViewComponent,
506
+ CdkPortalOutlet,
507
+ AXLoadingModule], exports: [AXChatViewComponent,
462
508
  AXChatInputComponent,
463
509
  AXChatMessageComponent,
464
510
  AXChatTextMessageComponent,
@@ -472,7 +518,8 @@ class AXChatModule {
472
518
  AXFormatModule,
473
519
  AXAudioWaveModule,
474
520
  AXCircularProgressModule,
475
- AXDateTimeModule] }); }
521
+ AXDateTimeModule,
522
+ AXLoadingModule] }); }
476
523
  }
477
524
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatModule, decorators: [{
478
525
  type: NgModule,
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-chat.mjs","sources":["../../../../libs/components/chat/src/lib/services/recording.service.ts","../../../../libs/components/chat/src/lib/chat-input/chat-input.component.ts","../../../../libs/components/chat/src/lib/chat-input/chat-input.component.html","../../../../libs/components/chat/src/lib/services/chat-message-type-registry.service.ts","../../../../libs/components/chat/src/lib/chat-message/chat-message.component.ts","../../../../libs/components/chat/src/lib/chat-message/chat-message.component.html","../../../../libs/components/chat/src/lib/chat-view/chat-view.component.ts","../../../../libs/components/chat/src/lib/chat-view/chat-view.component.html","../../../../libs/components/chat/src/lib/chat.types.ts","../../../../libs/components/chat/src/lib/chat-messages/chat-message-text.component.ts","../../../../libs/components/chat/src/lib/chat-messages/chat-messages-voice/chat-message-voice.component.ts","../../../../libs/components/chat/src/lib/chat-messages/chat-messages-voice/chat-message-voice.component.html","../../../../libs/components/chat/src/lib/chat.module.ts","../../../../libs/components/chat/src/lib/services/chat.service.ts","../../../../libs/components/chat/src/acorex-components-chat.ts"],"sourcesContent":["import { Injectable, WritableSignal, signal } from '@angular/core';\n\n@Injectable()\nexport class AXRecordingService {\n audioBlobs: any[] = [];\n mediaRecorder: MediaRecorder | null;\n streamBeingCaptured: any = null;\n\n timer: WritableSignal<string> = signal('00:0');\n\n protected time = {\n seconds: 0,\n minutes: 0,\n hours: 0,\n };\n\n protected timerInterval;\n\n startRecording() {\n if (!(navigator.mediaDevices && navigator.mediaDevices.getUserMedia)) {\n return Promise.reject(\n new Error(\n 'mediaDevices API or getUserMedia method is not supported in this browser.'\n )\n );\n } else {\n return navigator.mediaDevices\n .getUserMedia({ audio: true })\n .then((stream) => {\n this.streamBeingCaptured = stream;\n this.mediaRecorder = new MediaRecorder(stream);\n this.audioBlobs = [];\n this.mediaRecorder.addEventListener('dataavailable', (event) => {\n this.audioBlobs.push(event.data);\n });\n this.mediaRecorder.start();\n this.timerInterval = setInterval(() => {\n this.calculateTime();\n }, 1000);\n });\n }\n }\n\n stopRecording() {\n return new Promise((resolve) => {\n const mimeType = this.mediaRecorder?.mimeType;\n this.mediaRecorder?.addEventListener('stop', () => {\n const audioBlob = new Blob(this.audioBlobs, { type: mimeType });\n resolve(audioBlob);\n });\n this.mediaRecorder?.stop();\n this.streamBeingCaptured.getTracks().forEach((track) => track.stop());\n this.mediaRecorder = null;\n this.streamBeingCaptured = null;\n this.resetTimer();\n });\n }\n\n calculateTime() {\n this.time.seconds++;\n if (this.time.seconds >= 60) {\n this.time.seconds = 0;\n this.time.minutes++;\n if (this.time.minutes >= 60) {\n this.time.minutes = 0;\n this.time.hours++;\n }\n }\n\n const formattedTime =\n (this.time.hours > 0 ? this.time.hours + ':' : '') +\n (this.time.minutes < 10 ? '0' + this.time.minutes : this.time.minutes) +\n ':' +\n (this.time.seconds < 10 ? '0' + this.time.seconds : this.time.seconds);\n\n this.timer.set(formattedTime);\n }\n\n resetTimer() {\n clearInterval(this.timerInterval);\n this.time.seconds = 0;\n this.time.minutes = 0;\n this.time.hours = 0;\n this.timer.set('00:0');\n }\n}\n","import {\n AXClickEvent,\n AXComponent,\n AXFocusableComponent,\n AXValuableComponent,\n MXInputBaseValueComponent,\n MXLookComponent,\n} from '@acorex/components/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n ViewEncapsulation,\n WritableSignal,\n forwardRef,\n inject,\n signal,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { classes } from 'polytype';\nimport { AXInputFileChange } from '../classes/events.interface';\nimport { AXRecordingService } from '../services/recording.service';\n\n@Component({\n selector: 'ax-chat-input',\n templateUrl: './chat-input.component.html',\n styleUrls: ['./chat-input.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXChatInputComponent },\n { provide: AXFocusableComponent, useExisting: AXChatInputComponent },\n { provide: AXValuableComponent, useExisting: AXChatInputComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXChatInputComponent),\n multi: true,\n },\n ],\n})\nexport class AXChatInputComponent extends classes(\n MXInputBaseValueComponent<string>,\n MXLookComponent\n) {\n @ViewChild('inputFile') inputFile: ElementRef<HTMLInputElement>;\n @Input()\n maxLength: number;\n\n @Input() hasAttachment = true;\n\n @Input() haVoice = true;\n\n @Input() acceptFileType: string = '*';\n\n @Output()\n onSendClick: EventEmitter<AXClickEvent> = new EventEmitter<AXClickEvent>();\n\n @Output()\n onStartRecording: EventEmitter<AXClickEvent> =\n new EventEmitter<AXClickEvent>();\n\n @Output()\n onStopRecording: EventEmitter<AXClickEvent> =\n new EventEmitter<AXClickEvent>();\n\n @Output()\n onFileChange: EventEmitter<AXInputFileChange> =\n new EventEmitter<AXInputFileChange>();\n\n recording: WritableSignal<boolean> = signal(false);\n\n recordingService: AXRecordingService = inject(AXRecordingService);\n\n protected _updateOn: 'change' | 'blur' | 'submit' = 'change';\n\n protected _handleModelChange(value: string) {\n this.commitValue(value, true);\n }\n protected recordedAudio: unknown | null = null;\n\n handleRecordClick() {\n this.recordedAudio = null;\n this.recording.set(true);\n this.recordingService\n ?.startRecording()\n .then(() => {\n this.onStartRecording.emit({\n component: this,\n data: { recording: true },\n isUserInteraction: true,\n });\n })\n .catch((e) => {\n console.error(e);\n });\n }\n\n handleStopClick() {\n this.recordingService.stopRecording().then((c) => {\n this.recording.set(false);\n this.recordedAudio = c;\n this.onStopRecording.emit({\n component: this,\n data: { value: this.recordedAudio },\n });\n });\n }\n handleAttachClick() {\n this.inputFile.nativeElement.click();\n }\n\n handleChangeFile(event: Event) {\n this.onFileChange.emit({\n component: this,\n data: { value: (event.target as HTMLInputElement).files },\n });\n }\n\n handleSendClick() {\n this.onSendClick.emit({\n component: this,\n data: { value: this.value },\n isUserInteraction: true,\n });\n }\n\n handleSendVoiceClick() {\n this.handleStopClick();\n this.onSendClick.emit({\n component: this,\n data: { value: this.value },\n isUserInteraction: true,\n });\n }\n}\n","<div class=\"ax-chat-input\" [class.ax-state-recording]=\"recording()\">\n @if (recording()) {\n <div class=\"ax-chat-input-start-side\">\n <span class=\"ax-record-dot\"></span>\n <span>{{ recordingService.timer() }}</span>\n </div>\n <div class=\"ax-chat-input-main-side\">\n <ax-button class=\"ax-sm\" look=\"blank\" color=\"primary\" [text]=\"'cancel' | translate | async\"\n (onClick)=\"handleStopClick()\"></ax-button>\n </div>\n <div class=\"ax-chat-input-end-side\">\n <ax-button look=\"solid\" color=\"danger\" class=\"ax-blob ax-sm\" (onClick)=\"handleSendVoiceClick()\">\n <ax-icon>\n <i class=\"ax-icon ax-icon-send\"></i>\n </ax-icon>\n </ax-button>\n </div>\n } @else {\n <div class=\"ax-chat-input-start-side\">\n <ax-button look=\"blank\" class=\"ax-sm\">\n <ax-icon>\n <i class=\"ax-icon ax-icon-emoji\"></i>\n </ax-icon>\n <ax-dropdown-panel>\n <ng-container>\n <div class=\"ax-emoji-container\">\n <div>⚠️</div>\n <div>➡️</div>\n <div>🔃</div>\n <div>🔷</div>\n <div>🤚</div>\n <div>😂</div>\n <div>😊</div>\n </div>\n </ng-container>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n <textarea class=\"ax-chat-input-main-side\"\n oninput='this.style.height = \"\";this.style.height = this.scrollHeight + \"px\"' type=\"text\" rows=\"1\" [id]=\"id\"\n [name]=\"name\" [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\" [disabled]=\"disabled\"\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [ngModel]=\"value\" (ngModelChange)=\"_handleModelChange($event)\"\n [ngModelOptions]=\"{ updateOn: _updateOn }\" (keydown)=\"emitOnKeydownEvent($event)\" (keyup)=\"emitOnKeyupEvent($event)\"\n (keypress)=\"emitOnKeypressEvent($event)\" (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"></textarea>\n <div class=\"ax-chat-input-end-side\">\n @if (!value) {\n <ax-button look=\"blank\" class=\"ax-sm\" (onClick)=\"handleAttachClick()\">\n <ax-icon>\n <i class=\"ax-icon ax-icon-attach\"></i>\n </ax-icon>\n </ax-button>\n <ax-button look=\"blank\" class=\"ax-sm\" (onClick)=\"handleRecordClick()\">\n <ax-icon>\n <i class=\"ax-icon ax-icon-mic\"></i>\n </ax-icon>\n </ax-button>\n <input #inputFile [accept]=\"acceptFileType\" type=\"file\" class=\"ax-attach-input\" (change)=\"handleChangeFile($event)\">\n }\n\n @if (value) {\n <ax-button look=\"solid\" color=\"primary\" class=\"ax-sm\" (onClick)=\"handleSendClick()\">\n <ax-icon>\n <i class=\"ax-icon ax-icon-send\"></i>\n </ax-icon>\n </ax-button>\n }\n </div>\n }\n</div>","import { Injectable } from '@angular/core';\nimport { AXChatMessageType } from '../chat.types';\n\n@Injectable({ providedIn: 'root' })\nexport class AXChatMessageTypeRegistryService {\n private plugins: Map<string, AXChatMessageType> = new Map<\n string,\n AXChatMessageType\n >();\n\n register(...plugins: AXChatMessageType[]) {\n plugins.forEach((p) => this.plugins.set(p.name, p));\n }\n\n public resolve(name: string): AXChatMessageType | undefined {\n return this.plugins.get(name);\n }\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport { isBrowser } from '@acorex/core/platform';\nimport { CdkPortalOutletAttachedRef, ComponentPortal } from '@angular/cdk/portal';\nimport { Component, ComponentRef, HostBinding, ViewEncapsulation, inject, input } from '@angular/core';\nimport { AXChatMessage } from '../chat.types';\nimport { AXChatMessageTypeRegistryService } from '../services/chat-message-type-registry.service';\n\n@Component({\n selector: 'ax-chat-message',\n templateUrl: './chat-message.component.html',\n styleUrls: ['./chat-message.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXChatMessageComponent extends MXBaseComponent {\n chatMessage = input<AXChatMessage<any>>();\n\n protected _portal: ComponentPortal<any> | null;\n\n protected get isOwn(): boolean {\n return !this.chatMessage().fromId;\n }\n\n protected registryService = inject(AXChatMessageTypeRegistryService);\n\n @HostBinding('class')\n get __hostClass(): string {\n return `${this.isOwn ? 'ax-state-own' : ''} ${!this.isOwn ? 'ax-state-other' : ''}`;\n }\n\n protected override ngOnInit(): void {\n this._portal = new ComponentPortal(this.registryService.resolve(this.chatMessage().type).component);\n }\n\n protected _handleAttched(ref: CdkPortalOutletAttachedRef) {\n ref = ref as ComponentRef<unknown>;\n if (ref.instance && isBrowser()) {\n Object.assign(ref.instance, { message: this.chatMessage() });\n this.cdr.markForCheck();\n const prefix = this.getHostElement().querySelector('ax-prefix') as HTMLDivElement;\n const container = this.getHostElement().querySelector('.ax-message-prefix');\n if (prefix && container) {\n prefix.style.display = 'flex';\n container.append(prefix);\n }\n }\n }\n}\n","<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 <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>","import { MXBaseComponent } from '@acorex/components/common';\nimport { ChangeDetectionStrategy, Component, Input, ViewEncapsulation, WritableSignal, signal } from '@angular/core';\nimport { AXChatMessage } from '../chat.types';\n\n@Component({\n selector: 'ax-chat-view',\n templateUrl: './chat-view.component.html',\n styleUrls: ['./chat-view.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXChatViewComponent extends MXBaseComponent {\n @Input()\n public set chats(items: AXChatMessage<any>[]) {\n this._chats.set(items);\n }\n\n protected _chats: WritableSignal<AXChatMessage<any>[]> = signal([]);\n}\n","@for (item of _chats(); track $index) {\n<ax-chat-message [chatMessage]=\"item\"></ax-chat-message>\n}","import { Injectable, Type } from '@angular/core';\n\nexport interface AXChatMessageType {\n name: string;\n component: Type<any>;\n}\n\nexport interface AXChatMessage<T> {\n id: string;\n type: string;\n sendTime: Date;\n deliverTime?: Date;\n readTime?: Date;\n replyTo?: string;\n content: T;\n fromId?: string;\n}\n\n@Injectable()\nexport class AXChatMessageBaseComponent<T> {\n message: AXChatMessage<T>;\n}\n","import { Component, ViewEncapsulation, signal } from '@angular/core';\nimport { AXChatMessageBaseComponent } from '../chat.types';\n\n@Component({\n template: `<div [innerHtml]=\"_text()\"></div>`,\n encapsulation: ViewEncapsulation.None,\n inputs: ['message'],\n})\nexport class AXChatTextMessageComponent extends AXChatMessageBaseComponent<string> {\n protected _text = signal('');\n\n ngOnInit(): void {\n this._text.set(this.message?.content);\n }\n}\n","import { AXAudioWaveChangeEvent, AXAudioWaveComponent, AXWaveConfig } from '@acorex/components/audio-wave';\nimport { Component, ViewChild, ViewEncapsulation, WritableSignal, afterNextRender, signal } from '@angular/core';\nimport { AXChatMessageBaseComponent } from '../../chat.types';\n\n@Component({\n selector: 'ax-chat-message-audio',\n templateUrl: './chat-message-voice.component.html',\n styleUrl: `./chat-message-voice.component.scss`,\n encapsulation: ViewEncapsulation.None,\n inputs: ['message'],\n})\nexport class AXChatAudioMessageComponent extends AXChatMessageBaseComponent<string> {\n @ViewChild('a') audio: AXAudioWaveComponent;\n\n config: AXWaveConfig = { url: '' };\n\n audioState: WritableSignal<'playing' | 'paused' | 'loading' | 'ready'> = signal('paused');\n\n protected audioProgress = signal(0);\n protected timeLeft = signal(0);\n protected currentTime = signal(0);\n protected duration = signal(0);\n\n constructor() {\n super();\n afterNextRender(() => {\n this.config.url = this.message?.content;\n this.audioState.set('loading');\n });\n }\n\n handlePauseClick() {\n this.audio.pause();\n this.audioState.set('paused');\n }\n\n handlePlayClick() {\n this.audio.play().then(() => {\n this.audioState.set('playing');\n });\n }\n\n handleOnStatusChanged(e: AXAudioWaveChangeEvent) {\n console.log(e.status, e.data);\n if (e.status === 'loading') {\n this.audioProgress.set(e.data.percent);\n this.duration.set(Math.ceil(e.data.duration * 1000));\n }\n if (e.status === 'ready') {\n this.audioState.set('ready');\n this.duration.set(Math.ceil(e.data.duration * 1000));\n }\n if (e.status === 'finish') {\n this.audioState.set('paused');\n }\n if (e.status === 'timeupdate') {\n this.timeLeft.set(this.duration() - e.data.currentTime * 1000);\n this.currentTime.set(e.data.currentTime * 1000);\n }\n }\n}\n","<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 <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 40 40\" class=\"loader\">\n <circle class=\"progress\" fill=\"none\" stroke-linecap=\"round\" cx=\"20\" cy=\"20\" r=\"15.915494309\" />\n </svg>\n </button> -->\n }\n @default {\n <button (click)=\"handlePlayClick()\">\n <i class=\"fa-solid fa-play\" style=\"margin-inline-start: 0.25rem;\"></i>\n </button>\n }\n }\n\n</div>\n<ax-audio-wave #a [config]=\"config\" (onStatusChanged)=\"handleOnStatusChanged($event)\"></ax-audio-wave>\n\n<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</ax-prefix>","import { AXAudioWaveModule } from '@acorex/components/audio-wave';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXCircularProgressModule } from '@acorex/components/circular-progress';\nimport { AXRippleDirective } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDropdownModule } from '@acorex/components/dropdown';\nimport { AXDateTimeModule } from '@acorex/core/date-time';\nimport { AXFormatModule } from '@acorex/core/format';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CdkPortalOutlet } from '@angular/cdk/portal';\nimport { AsyncPipe, CommonModule } from '@angular/common';\nimport { Inject, ModuleWithProviders, NgModule, Optional } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXChatInputComponent } from './chat-input/chat-input.component';\nimport { AXChatMessageComponent } from './chat-message/chat-message.component';\nimport { AXChatTextMessageComponent } from './chat-messages/chat-message-text.component';\nimport { AXChatAudioMessageComponent } from './chat-messages/chat-messages-voice/chat-message-voice.component';\nimport { AXChatViewComponent } from './chat-view/chat-view.component';\nimport { AXChatMessageType } from './chat.types';\nimport { AXChatMessageTypeRegistryService } from './services/chat-message-type-registry.service';\nimport { AXRecordingService } from './services/recording.service';\n\nexport interface AXChatModuleConfig {\n types: AXChatMessageType[];\n}\n\nconst COMPONENT = [\n AXChatViewComponent,\n AXChatInputComponent,\n AXChatMessageComponent,\n AXChatTextMessageComponent,\n AXChatAudioMessageComponent,\n];\nconst MODULES = [\n CommonModule,\n FormsModule,\n AsyncPipe,\n AXRippleDirective,\n AXButtonModule,\n AXDecoratorModule,\n AXTranslationModule,\n AXDropdownModule,\n AXFormatModule,\n AXAudioWaveModule,\n AXCircularProgressModule,\n AXDateTimeModule,\n CdkPortalOutlet,\n];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXRecordingService],\n})\nexport class AXChatModule {\n static forRoot(config?: AXChatModuleConfig): ModuleWithProviders<AXChatModule> {\n return {\n ngModule: AXChatModule,\n providers: [\n {\n provide: 'AXChatModuleFactory',\n useFactory: (registry: AXChatMessageTypeRegistryService) => () => {\n if (config?.types?.length) {\n registry.register(...config.types);\n }\n registry.register({\n name: 'text',\n component: AXChatTextMessageComponent,\n });\n registry.register({\n name: 'audio',\n component: AXChatAudioMessageComponent,\n });\n },\n deps: [AXChatMessageTypeRegistryService],\n multi: true,\n },\n ],\n };\n }\n\n static forChild(config?: AXChatModuleConfig): ModuleWithProviders<AXChatModule> {\n return {\n ngModule: AXChatModule,\n providers: [\n {\n provide: 'AXPWorkflowModuleFactory',\n useFactory: (registry: AXChatMessageTypeRegistryService) => () => {\n if (config?.types?.length) {\n registry.register(...config.types);\n }\n },\n deps: [AXChatMessageTypeRegistryService],\n multi: true,\n },\n ],\n };\n }\n\n /**\n * @ignore\n */\n constructor(@Optional() @Inject('AXChatModuleFactory') instances: any[]) {\n instances?.forEach((f) => {\n f();\n });\n }\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class AXChatService {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i3","i1.AXChatMessageComponent","i4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;MAGa,kBAAkB,CAAA;AAD/B,IAAA,WAAA,GAAA;QAEE,IAAU,CAAA,UAAA,GAAU,EAAE,CAAC;QAEvB,IAAmB,CAAA,mBAAA,GAAQ,IAAI,CAAC;AAEhC,QAAA,IAAA,CAAA,KAAK,GAA2B,MAAM,CAAC,MAAM,CAAC,CAAC;AAErC,QAAA,IAAA,CAAA,IAAI,GAAG;AACf,YAAA,OAAO,EAAE,CAAC;AACV,YAAA,OAAO,EAAE,CAAC;AACV,YAAA,KAAK,EAAE,CAAC;SACT,CAAC;AAuEH,KAAA;IAnEC,cAAc,GAAA;AACZ,QAAA,IAAI,EAAE,SAAS,CAAC,YAAY,IAAI,SAAS,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE;YACpE,OAAO,OAAO,CAAC,MAAM,CACnB,IAAI,KAAK,CACP,2EAA2E,CAC5E,CACF,CAAC;SACH;aAAM;YACL,OAAO,SAAS,CAAC,YAAY;AAC1B,iBAAA,YAAY,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;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C,aAAa,CAAA;8GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;kHAAb,aAAa,EAAA,CAAA,CAAA,EAAA;;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB,UAAU;;;ACFX;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-chat.mjs","sources":["../../../../libs/components/chat/src/lib/services/recording.service.ts","../../../../libs/components/chat/src/lib/chat-input/chat-input.component.ts","../../../../libs/components/chat/src/lib/chat-input/chat-input.component.html","../../../../libs/components/chat/src/lib/services/chat-message-type-registry.service.ts","../../../../libs/components/chat/src/lib/chat-message/chat-message.component.ts","../../../../libs/components/chat/src/lib/chat-message/chat-message.component.html","../../../../libs/components/chat/src/lib/chat-view/chat-view.component.ts","../../../../libs/components/chat/src/lib/chat-view/chat-view.component.html","../../../../libs/components/chat/src/lib/chat.types.ts","../../../../libs/components/chat/src/lib/chat-messages/chat-message-text.component.ts","../../../../libs/components/chat/src/lib/chat-messages/chat-messages-voice/chat-message-voice.component.ts","../../../../libs/components/chat/src/lib/chat-messages/chat-messages-voice/chat-message-voice.component.html","../../../../libs/components/chat/src/lib/chat.module.ts","../../../../libs/components/chat/src/lib/services/chat.service.ts","../../../../libs/components/chat/src/acorex-components-chat.ts"],"sourcesContent":["import { Injectable, WritableSignal, signal } from '@angular/core';\n\n@Injectable()\nexport class AXRecordingService {\n audioBlobs: any[] = [];\n mediaRecorder: MediaRecorder | null;\n streamBeingCaptured: any = null;\n\n timer: WritableSignal<string> = signal('00:0');\n\n protected time = {\n seconds: 0,\n minutes: 0,\n hours: 0,\n };\n\n protected timerInterval;\n\n startRecording() {\n if (!(navigator.mediaDevices && navigator.mediaDevices.getUserMedia)) {\n return Promise.reject(\n new Error(\n 'mediaDevices API or getUserMedia method is not supported in this browser.'\n )\n );\n } else {\n return navigator.mediaDevices\n .getUserMedia({ audio: true })\n .then((stream) => {\n this.streamBeingCaptured = stream;\n this.mediaRecorder = new MediaRecorder(stream);\n this.audioBlobs = [];\n this.mediaRecorder.addEventListener('dataavailable', (event) => {\n this.audioBlobs.push(event.data);\n });\n this.mediaRecorder.start();\n this.timerInterval = setInterval(() => {\n this.calculateTime();\n }, 1000);\n });\n }\n }\n\n stopRecording() {\n return new Promise((resolve) => {\n const mimeType = this.mediaRecorder?.mimeType;\n this.mediaRecorder?.addEventListener('stop', () => {\n const audioBlob = new Blob(this.audioBlobs, { type: mimeType });\n resolve(audioBlob);\n });\n this.mediaRecorder?.stop();\n this.streamBeingCaptured.getTracks().forEach((track) => track.stop());\n this.mediaRecorder = null;\n this.streamBeingCaptured = null;\n this.resetTimer();\n });\n }\n\n calculateTime() {\n this.time.seconds++;\n if (this.time.seconds >= 60) {\n this.time.seconds = 0;\n this.time.minutes++;\n if (this.time.minutes >= 60) {\n this.time.minutes = 0;\n this.time.hours++;\n }\n }\n\n const formattedTime =\n (this.time.hours > 0 ? this.time.hours + ':' : '') +\n (this.time.minutes < 10 ? '0' + this.time.minutes : this.time.minutes) +\n ':' +\n (this.time.seconds < 10 ? '0' + this.time.seconds : this.time.seconds);\n\n this.timer.set(formattedTime);\n }\n\n resetTimer() {\n clearInterval(this.timerInterval);\n this.time.seconds = 0;\n this.time.minutes = 0;\n this.time.hours = 0;\n this.timer.set('00:0');\n }\n}\n","import {\n AXClickEvent,\n AXComponent,\n AXFocusableComponent,\n AXValuableComponent,\n MXInputBaseValueComponent,\n MXLookComponent,\n} from '@acorex/components/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n ViewEncapsulation,\n WritableSignal,\n forwardRef,\n inject,\n signal,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { classes } from 'polytype';\nimport { AXInputFileChange } from '../classes/events.interface';\nimport { AXRecordingService } from '../services/recording.service';\n\n@Component({\n selector: 'ax-chat-input',\n templateUrl: './chat-input.component.html',\n styleUrls: ['./chat-input.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXChatInputComponent },\n { provide: AXFocusableComponent, useExisting: AXChatInputComponent },\n { provide: AXValuableComponent, useExisting: AXChatInputComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXChatInputComponent),\n multi: true,\n },\n ],\n})\nexport class AXChatInputComponent extends classes(\n MXInputBaseValueComponent<string>,\n MXLookComponent\n) {\n @ViewChild('inputFile') inputFile: ElementRef<HTMLInputElement>;\n @Input()\n maxLength: number;\n\n @Input() hasAttachment = true;\n\n @Input() haVoice = true;\n\n @Input() acceptFileType: string = '*';\n\n @Output()\n onSendClick: EventEmitter<AXClickEvent> = new EventEmitter<AXClickEvent>();\n\n @Output()\n onStartRecording: EventEmitter<AXClickEvent> =\n new EventEmitter<AXClickEvent>();\n\n @Output()\n onStopRecording: EventEmitter<AXClickEvent> =\n new EventEmitter<AXClickEvent>();\n\n @Output()\n onFileChange: EventEmitter<AXInputFileChange> =\n new EventEmitter<AXInputFileChange>();\n\n recording: WritableSignal<boolean> = signal(false);\n\n recordingService: AXRecordingService = inject(AXRecordingService);\n\n protected _updateOn: 'change' | 'blur' | 'submit' = 'change';\n\n protected _handleModelChange(value: string) {\n this.commitValue(value, true);\n }\n protected recordedAudio: unknown | null = null;\n\n handleRecordClick() {\n this.recordedAudio = null;\n this.recording.set(true);\n this.recordingService\n ?.startRecording()\n .then(() => {\n this.onStartRecording.emit({\n component: this,\n data: { recording: true },\n isUserInteraction: true,\n });\n })\n .catch((e) => {\n console.error(e);\n });\n }\n\n handleStopClick() {\n this.recordingService.stopRecording().then((c) => {\n this.recording.set(false);\n this.recordedAudio = c;\n this.onStopRecording.emit({\n component: this,\n data: { value: this.recordedAudio },\n });\n });\n }\n handleAttachClick() {\n this.inputFile.nativeElement.click();\n }\n\n handleChangeFile(event: Event) {\n this.onFileChange.emit({\n component: this,\n data: { value: (event.target as HTMLInputElement).files },\n });\n }\n\n handleSendClick() {\n this.onSendClick.emit({\n component: this,\n data: { value: this.value },\n isUserInteraction: true,\n });\n }\n\n handleSendVoiceClick() {\n this.handleStopClick();\n this.onSendClick.emit({\n component: this,\n data: { value: this.value },\n isUserInteraction: true,\n });\n }\n}\n","<div class=\"ax-chat-input\" [class.ax-state-recording]=\"recording()\">\n @if (recording()) {\n <div class=\"ax-chat-input-start-side\">\n <span class=\"ax-record-dot\"></span>\n <span>{{ recordingService.timer() }}</span>\n </div>\n <div class=\"ax-chat-input-main-side\">\n <ax-button class=\"ax-sm\" look=\"blank\" color=\"primary\" [text]=\"'cancel' | translate | async\"\n (onClick)=\"handleStopClick()\"></ax-button>\n </div>\n <div class=\"ax-chat-input-end-side\">\n <ax-button look=\"solid\" color=\"danger\" class=\"ax-blob ax-sm\" (onClick)=\"handleSendVoiceClick()\">\n <ax-icon>\n <i class=\"ax-icon ax-icon-send\"></i>\n </ax-icon>\n </ax-button>\n </div>\n } @else {\n <div class=\"ax-chat-input-start-side\">\n <ax-button look=\"blank\" class=\"ax-sm\">\n <ax-icon>\n <i class=\"ax-icon ax-icon-emoji\"></i>\n </ax-icon>\n <ax-dropdown-panel>\n <ng-container>\n <div class=\"ax-emoji-container\">\n <div>⚠️</div>\n <div>➡️</div>\n <div>🔃</div>\n <div>🔷</div>\n <div>🤚</div>\n <div>😂</div>\n <div>😊</div>\n </div>\n </ng-container>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n <textarea class=\"ax-chat-input-main-side\"\n oninput='this.style.height = \"\";this.style.height = this.scrollHeight + \"px\"' type=\"text\" rows=\"1\" [id]=\"id\"\n [name]=\"name\" [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\" [disabled]=\"disabled\"\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [ngModel]=\"value\" (ngModelChange)=\"_handleModelChange($event)\"\n [ngModelOptions]=\"{ updateOn: _updateOn }\" (keydown)=\"emitOnKeydownEvent($event)\" (keyup)=\"emitOnKeyupEvent($event)\"\n (keypress)=\"emitOnKeypressEvent($event)\" (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"></textarea>\n <div class=\"ax-chat-input-end-side\">\n @if (!value) {\n <ax-button look=\"blank\" class=\"ax-sm\" (onClick)=\"handleAttachClick()\">\n <ax-icon>\n <i class=\"ax-icon ax-icon-attach\"></i>\n </ax-icon>\n </ax-button>\n <ax-button look=\"blank\" class=\"ax-sm\" (onClick)=\"handleRecordClick()\">\n <ax-icon>\n <i class=\"ax-icon ax-icon-mic\"></i>\n </ax-icon>\n </ax-button>\n <input #inputFile [accept]=\"acceptFileType\" type=\"file\" class=\"ax-attach-input\" (change)=\"handleChangeFile($event)\">\n }\n\n @if (value) {\n <ax-button look=\"solid\" color=\"primary\" class=\"ax-sm\" (onClick)=\"handleSendClick()\">\n <ax-icon>\n <i class=\"ax-icon ax-icon-send\"></i>\n </ax-icon>\n </ax-button>\n }\n </div>\n }\n</div>","import { Injectable } from '@angular/core';\nimport { AXChatMessageType } from '../chat.types';\n\n@Injectable({ providedIn: 'root' })\nexport class AXChatMessageTypeRegistryService {\n private plugins: Map<string, AXChatMessageType> = new Map<\n string,\n AXChatMessageType\n >();\n\n register(...plugins: AXChatMessageType[]) {\n plugins.forEach((p) => this.plugins.set(p.name, p));\n }\n\n public resolve(name: string): AXChatMessageType | undefined {\n return this.plugins.get(name);\n }\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport { isBrowser } from '@acorex/core/platform';\nimport { CdkPortalOutletAttachedRef, ComponentPortal } from '@angular/cdk/portal';\nimport { Component, ComponentRef, HostBinding, ViewEncapsulation, inject, input } from '@angular/core';\nimport { AXChatMessage } from '../chat.types';\nimport { AXChatMessageTypeRegistryService } from '../services/chat-message-type-registry.service';\n\n@Component({\n selector: 'ax-chat-message',\n templateUrl: './chat-message.component.html',\n styleUrls: ['./chat-message.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXChatMessageComponent extends MXBaseComponent {\n chatMessage = input<AXChatMessage<any>>();\n\n protected _portal: ComponentPortal<any> | null;\n\n protected get isOwn(): boolean {\n return !this.chatMessage().fromId;\n }\n\n protected registryService = inject(AXChatMessageTypeRegistryService);\n\n @HostBinding('class')\n get __hostClass(): string {\n return `${this.isOwn ? 'ax-state-own' : ''} ${!this.isOwn ? 'ax-state-other' : ''}`;\n }\n\n protected override ngOnInit(): void {\n this._portal = new ComponentPortal(this.registryService.resolve(this.chatMessage().type).component);\n }\n\n protected _handleAttched(ref: CdkPortalOutletAttachedRef) {\n ref = ref as ComponentRef<unknown>;\n if (ref.instance && isBrowser()) {\n Object.assign(ref.instance, { message: this.chatMessage() });\n this.cdr.markForCheck();\n const prefix = this.getHostElement().querySelector('ax-prefix') as HTMLDivElement;\n const suffix = this.getHostElement().querySelector('ax-suffix') as HTMLDivElement;\n const prefixContainer = this.getHostElement().querySelector('.ax-message-prefix');\n const suffixContainer = this.getHostElement().querySelector('.ax-message-suffix');\n if (prefix && prefixContainer) {\n prefix.style.display = 'flex';\n prefixContainer.append(prefix);\n }\n if (suffix && suffixContainer) {\n suffix.style.display = 'flex';\n suffixContainer.append(suffix);\n }\n }\n }\n}\n","<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>","import { MXBaseComponent } from '@acorex/components/common';\nimport { ChangeDetectionStrategy, Component, Input, ViewEncapsulation, WritableSignal, signal } from '@angular/core';\nimport { AXChatMessage } from '../chat.types';\n\n@Component({\n selector: 'ax-chat-view',\n templateUrl: './chat-view.component.html',\n styleUrls: ['./chat-view.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXChatViewComponent extends MXBaseComponent {\n @Input()\n public set chats(items: AXChatMessage<any>[]) {\n this._chats.set(items);\n }\n\n protected _chats: WritableSignal<AXChatMessage<any>[]> = signal([]);\n}\n","@for (item of _chats(); track $index) {\n<ax-chat-message [chatMessage]=\"item\"></ax-chat-message>\n}","import { Injectable, Type } from '@angular/core';\n\nexport interface AXChatMessageType {\n name: string;\n component: Type<any>;\n}\n\nexport interface AXChatMessage<T> {\n id: string;\n type: string;\n sendTime: Date;\n deliverTime?: Date;\n readTime?: Date;\n replyTo?: string;\n content: T;\n fromId?: string;\n}\n\n@Injectable()\nexport class AXChatMessageBaseComponent<T> {\n message: AXChatMessage<T>;\n}\n","import { Component, ViewEncapsulation, signal } from '@angular/core';\nimport { AXChatMessageBaseComponent } from '../chat.types';\n\n@Component({\n template: `<div [innerHtml]=\"_text()\"></div>`,\n encapsulation: ViewEncapsulation.None,\n inputs: ['message'],\n})\nexport class AXChatTextMessageComponent extends AXChatMessageBaseComponent<string> {\n protected _text = signal('');\n\n ngOnInit(): void {\n this._text.set(this.message?.content);\n }\n}\n","import { AXAudioWaveChangeEvent, AXAudioWaveComponent, AXWaveConfig } from '@acorex/components/audio-wave';\nimport { Component, ViewChild, ViewEncapsulation, WritableSignal, afterNextRender, signal } from '@angular/core';\nimport { AXChatMessageBaseComponent } from '../../chat.types';\n\n@Component({\n selector: 'ax-chat-message-audio',\n templateUrl: './chat-message-voice.component.html',\n styleUrl: `./chat-message-voice.component.scss`,\n encapsulation: ViewEncapsulation.None,\n inputs: ['message'],\n})\nexport class AXChatAudioMessageComponent extends AXChatMessageBaseComponent<string> {\n @ViewChild('a') audio: AXAudioWaveComponent;\n\n config: AXWaveConfig = { url: '' };\n\n audioState: WritableSignal<'playing' | 'paused' | 'loading' | 'ready' | 'error'> = signal('paused');\n selectedRate = signal(1);\n selectedRateIndex = signal(1);\n\n protected audioProgress = signal(0);\n protected timeLeft = signal(0);\n protected currentTime = signal(0);\n protected duration = signal(0);\n\n constructor() {\n super();\n afterNextRender(() => {\n this.config.url = this.message?.content;\n this.config.audioRate = 0.25;\n if (this.message.fromId) {\n const neutral300 = getComputedStyle(document.body).getPropertyValue('--ax-color-neutral-200');\n const neutral500 = getComputedStyle(document.body).getPropertyValue('--ax-color-neutral-500');\n\n this.config.waveColor = `rgba(${neutral300})`;\n this.config.progressColor = `rgba(${neutral500})`;\n }\n this.handleLoadingProgress();\n });\n }\n\n handlePauseClick() {\n this.audio?.pause();\n this.audioState.set('paused');\n }\n\n handlePlayClick() {\n this.audio?.play()?.then(() => {\n this.audioState.set('playing');\n });\n }\n\n handleOnStatusChanged(e: AXAudioWaveChangeEvent) {\n if (e.status === 'load' || e.status === 'loading') {\n this.audioState.set('loading');\n }\n if (e.status === 'loading') {\n this.audioProgress.set(e.data.percent);\n this.duration.set(Math.ceil(e.data.duration * 1000));\n }\n if (e.status === 'ready') {\n this.audioState.set('ready');\n this.duration.set(Math.ceil(e.data.duration * 1000));\n }\n if (e.status === 'finish') {\n this.audioState.set('paused');\n }\n if (e.status === 'timeupdate') {\n this.timeLeft.set(this.duration() - e.data.currentTime * 1000);\n this.currentTime.set(e.data.currentTime * 1000);\n }\n if (e.status === 'error') {\n this.audioState.set('error');\n }\n }\n\n handleLoadingProgress() {\n // this.audioLoaderProgress?.nativeElement.style.cssText = `--ax-audio-progress: ${this.audioProgress()}`;\n }\n\n handleCancelLoading() {\n //\n }\n\n handleReloadClick() {\n //\n this.audioState.set('loading');\n this.audio.load();\n }\n\n handleRateClick() {\n const rates = [0.5, 1, 2, 4];\n if (this.selectedRateIndex() == rates.length - 1) {\n this.selectedRateIndex.set(0);\n } else {\n this.selectedRateIndex.set(this.selectedRateIndex() + 1);\n }\n this.selectedRate.set(rates[this.selectedRateIndex()]);\n this.audio.setRate(this.selectedRate());\n }\n}\n","<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>","import { AXAudioWaveModule } from '@acorex/components/audio-wave';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXCircularProgressModule } from '@acorex/components/circular-progress';\nimport { AXRippleDirective } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDropdownModule } from '@acorex/components/dropdown';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXDateTimeModule } from '@acorex/core/date-time';\nimport { AXFormatModule } from '@acorex/core/format';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CdkPortalOutlet } from '@angular/cdk/portal';\nimport { AsyncPipe, CommonModule } from '@angular/common';\nimport { Inject, ModuleWithProviders, NgModule, Optional } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXChatInputComponent } from './chat-input/chat-input.component';\nimport { AXChatMessageComponent } from './chat-message/chat-message.component';\nimport { AXChatTextMessageComponent } from './chat-messages/chat-message-text.component';\nimport { AXChatAudioMessageComponent } from './chat-messages/chat-messages-voice/chat-message-voice.component';\nimport { AXChatViewComponent } from './chat-view/chat-view.component';\nimport { AXChatMessageType } from './chat.types';\nimport { AXChatMessageTypeRegistryService } from './services/chat-message-type-registry.service';\nimport { AXRecordingService } from './services/recording.service';\n\nexport interface AXChatModuleConfig {\n types: AXChatMessageType[];\n}\n\nconst COMPONENT = [\n AXChatViewComponent,\n AXChatInputComponent,\n AXChatMessageComponent,\n AXChatTextMessageComponent,\n AXChatAudioMessageComponent,\n];\nconst MODULES = [\n CommonModule,\n FormsModule,\n AsyncPipe,\n AXRippleDirective,\n AXButtonModule,\n AXDecoratorModule,\n AXTranslationModule,\n AXDropdownModule,\n AXFormatModule,\n AXAudioWaveModule,\n AXCircularProgressModule,\n AXDateTimeModule,\n CdkPortalOutlet,\n AXLoadingModule,\n];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXRecordingService],\n})\nexport class AXChatModule {\n static forRoot(config?: AXChatModuleConfig): ModuleWithProviders<AXChatModule> {\n return {\n ngModule: AXChatModule,\n providers: [\n {\n provide: 'AXChatModuleFactory',\n useFactory: (registry: AXChatMessageTypeRegistryService) => () => {\n if (config?.types?.length) {\n registry.register(...config.types);\n }\n registry.register({\n name: 'text',\n component: AXChatTextMessageComponent,\n });\n registry.register({\n name: 'audio',\n component: AXChatAudioMessageComponent,\n });\n },\n deps: [AXChatMessageTypeRegistryService],\n multi: true,\n },\n ],\n };\n }\n\n static forChild(config?: AXChatModuleConfig): ModuleWithProviders<AXChatModule> {\n return {\n ngModule: AXChatModule,\n providers: [\n {\n provide: 'AXPWorkflowModuleFactory',\n useFactory: (registry: AXChatMessageTypeRegistryService) => () => {\n if (config?.types?.length) {\n registry.register(...config.types);\n }\n },\n deps: [AXChatMessageTypeRegistryService],\n multi: true,\n },\n ],\n };\n }\n\n /**\n * @ignore\n */\n constructor(@Optional() @Inject('AXChatModuleFactory') instances: any[]) {\n instances?.forEach((f) => {\n f();\n });\n }\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class AXChatService {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i3","i1.AXChatMessageComponent","i4","i5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;MAGa,kBAAkB,CAAA;AAD/B,IAAA,WAAA,GAAA;QAEE,IAAU,CAAA,UAAA,GAAU,EAAE,CAAC;QAEvB,IAAmB,CAAA,mBAAA,GAAQ,IAAI,CAAC;AAEhC,QAAA,IAAA,CAAA,KAAK,GAA2B,MAAM,CAAC,MAAM,CAAC,CAAC;AAErC,QAAA,IAAA,CAAA,IAAI,GAAG;AACf,YAAA,OAAO,EAAE,CAAC;AACV,YAAA,OAAO,EAAE,CAAC;AACV,YAAA,KAAK,EAAE,CAAC;SACT,CAAC;AAuEH,KAAA;IAnEC,cAAc,GAAA;AACZ,QAAA,IAAI,EAAE,SAAS,CAAC,YAAY,IAAI,SAAS,C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,EAAA,CAAA,CAAA,EAAA;;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB,UAAU;;;ACFX;;AAEG;;;;"}
@@ -398,14 +398,10 @@ class AXColorPalettePickerComponent extends MXBaseComponent {
398
398
  this._gradients = AXColorUtil.gradient(this._gradientColors);
399
399
  this._colors = this._gradients.rgb(100);
400
400
  this.dragPosition = { x: 0, y: 0 };
401
- _parent.onValueChanged
402
- .pipe(_unsubscriber.takeUntilDestroy)
403
- .subscribe((e) => {
401
+ _parent.onValueChanged.pipe(_unsubscriber.takeUntilDestroy).subscribe((e) => {
404
402
  this._handleParentColorChanged();
405
403
  });
406
- _parent.onOptionChanged
407
- .pipe(_unsubscriber.takeUntilDestroy)
408
- .subscribe((e) => {
404
+ _parent.onOptionChanged.pipe(_unsubscriber.takeUntilDestroy).subscribe((e) => {
409
405
  this.cdr.markForCheck();
410
406
  });
411
407
  }
@@ -498,9 +494,9 @@ class AXColorPalettePickerComponent extends MXBaseComponent {
498
494
  const surface = this.getHostElement().querySelector('.ax-color-box-overlay');
499
495
  if (!surface)
500
496
  return;
501
- const sb = surface.getBoundingClientRect();
497
+ const sb = surface?.getBoundingClientRect();
502
498
  const pointer = this.getHostElement().querySelector('.ax-color-box-pointer');
503
- const pb = pointer.getBoundingClientRect();
499
+ const pb = pointer?.getBoundingClientRect();
504
500
  const w = pb.width / 2;
505
501
  const width = sb.width; //+ pb.width
506
502
  const height = sb.height; // + pb.width