@acorex/components 17.0.10 → 17.0.12
Sign up to get free protection for your applications and to get access to all the features.
- package/audio-wave/lib/audio-wave.component.d.ts +1 -0
- package/audio-wave/lib/audio-wave.module.d.ts +2 -1
- package/calendar/lib/calendar-range.component.d.ts +2 -0
- package/calendar/lib/calendar.class.d.ts +3 -2
- package/calendar/lib/calendar.component.d.ts +2 -1
- package/chat/lib/chat-message/chat-message.component.d.ts +5 -1
- package/chat/lib/chat-messages/chat-messages-voice/chat-message-voice.component.d.ts +5 -2
- package/chat/lib/chat.module.d.ts +3 -1
- package/common/lib/classes/events.class.d.ts +1 -1
- package/common/lib/components/base-component.class.d.ts +4 -4
- package/common/lib/components/input-base-value-component.class.d.ts +1 -0
- package/data-pager/lib/data-pager-next-buttons.components.d.ts +2 -0
- package/data-pager/lib/data-pager-prev-buttons.component.d.ts +2 -0
- package/data-table/lib/columns/data-table-column.d.ts +2 -3
- package/data-table/lib/columns/data-text-column.component.d.ts +8 -4
- package/data-table/lib/columns/row-command-column.component.d.ts +8 -4
- package/data-table/lib/columns/row-index-column.component.d.ts +4 -2
- package/data-table/lib/columns/row-select-column.component.d.ts +7 -2
- package/data-table/lib/data-table/data-table.component.d.ts +1 -0
- package/datetime-picker/lib/datetime-picker.component.d.ts +2 -0
- package/esm2022/audio-wave/lib/audio-wave.component.mjs +21 -17
- package/esm2022/audio-wave/lib/audio-wave.module.mjs +5 -4
- package/esm2022/calendar/lib/calendar-range.component.mjs +10 -8
- package/esm2022/calendar/lib/calendar.class.mjs +14 -27
- package/esm2022/calendar/lib/calendar.component.mjs +14 -2
- package/esm2022/chat/lib/chat-message/chat-message.component.mjs +24 -5
- package/esm2022/chat/lib/chat-messages/chat-messages-voice/chat-message-voice.component.mjs +25 -14
- package/esm2022/chat/lib/chat.module.mjs +10 -3
- package/esm2022/common/lib/classes/events.class.mjs +1 -1
- package/esm2022/common/lib/components/base-component.class.mjs +14 -26
- package/esm2022/common/lib/components/input-base-value-component.class.mjs +8 -1
- package/esm2022/data-pager/lib/data-pager-next-buttons.components.mjs +6 -2
- package/esm2022/data-pager/lib/data-pager-numeric-selector.component.mjs +13 -13
- package/esm2022/data-pager/lib/data-pager-prev-buttons.component.mjs +15 -47
- package/esm2022/data-pager/lib/data-pager.component.mjs +2 -2
- package/esm2022/data-table/lib/columns/data-table-column.mjs +2 -6
- package/esm2022/data-table/lib/columns/data-text-column.component.mjs +31 -25
- package/esm2022/data-table/lib/columns/row-command-column.component.mjs +97 -81
- package/esm2022/data-table/lib/columns/row-index-column.component.mjs +19 -11
- package/esm2022/data-table/lib/columns/row-select-column.component.mjs +61 -11
- package/esm2022/data-table/lib/data-table/data-table.component.mjs +5 -4
- package/esm2022/data-table/lib/infinite-scroll-data-table/infinite-scroll-data-table.component.mjs +3 -3
- package/esm2022/datetime-picker/lib/datetime-picker.component.mjs +21 -2
- package/esm2022/drawer/lib/drawer.component.mjs +2 -2
- package/esm2022/list/lib/list.component.mjs +13 -3
- package/esm2022/phone-box/lib/phone-box.component.mjs +29 -28
- package/esm2022/select-box/lib/select-box.component.mjs +29 -9
- package/esm2022/text-box/lib/mask-options.directive.mjs +16 -4
- package/esm2022/text-box/lib/text-box.component.mjs +8 -1
- package/fesm2022/acorex-components-audio-wave.mjs +24 -19
- package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs +31 -31
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-chat.mjs +55 -21
- package/fesm2022/acorex-components-chat.mjs.map +1 -1
- package/fesm2022/acorex-components-common.mjs +21 -25
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +31 -59
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +210 -133
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs +20 -1
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +2 -2
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-list.mjs +13 -3
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-phone-box.mjs +29 -29
- package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +28 -8
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-text-box.mjs +22 -3
- package/fesm2022/acorex-components-text-box.mjs.map +1 -1
- package/list/lib/list.component.d.ts +3 -2
- package/package.json +1 -1
- package/phone-box/lib/phone-box.component.d.ts +4 -2
- package/select-box/lib/select-box.component.d.ts +5 -4
- package/text-box/lib/mask-options.directive.d.ts +6 -2
- package/text-box/lib/text-box.component.d.ts +1 -0
@@ -10,15 +10,19 @@ import * as i3 from '@acorex/components/decorators';
|
|
10
10
|
import { AXDecoratorModule } from '@acorex/components/decorators';
|
11
11
|
import * as i4 from '@acorex/components/dropdown';
|
12
12
|
import { AXDropdownModule } from '@acorex/components/dropdown';
|
13
|
-
import * as
|
13
|
+
import * as i5 from '@angular/common';
|
14
14
|
import { CommonModule, AsyncPipe } from '@angular/common';
|
15
15
|
import * as i6 from '@acorex/core/translation';
|
16
16
|
import { AXTranslationModule } from '@acorex/core/translation';
|
17
|
-
import
|
17
|
+
import { isBrowser } from '@acorex/core/platform';
|
18
|
+
import * as i1$1 from '@angular/cdk/portal';
|
19
|
+
import { ComponentPortal, CdkPortalOutlet } from '@angular/cdk/portal';
|
20
|
+
import * as i3$1 from '@acorex/core/format';
|
18
21
|
import { AXFormatModule } from '@acorex/core/format';
|
19
|
-
import * as i2$
|
22
|
+
import * as i2$1 from '@acorex/components/audio-wave';
|
20
23
|
import { AXAudioWaveModule } from '@acorex/components/audio-wave';
|
21
24
|
import { AXCircularProgressModule } from '@acorex/components/circular-progress';
|
25
|
+
import { AXDateTimeModule } from '@acorex/core/date-time';
|
22
26
|
|
23
27
|
class AXRecordingService {
|
24
28
|
constructor() {
|
@@ -174,7 +178,7 @@ class AXChatInputComponent extends classes((MXInputBaseValueComponent), MXLookCo
|
|
174
178
|
useExisting: forwardRef(() => AXChatInputComponent),
|
175
179
|
multi: true,
|
176
180
|
},
|
177
|
-
], viewQueries: [{ propertyName: "inputFile", first: true, predicate: ["inputFile"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<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>\u26A0\uFE0F</div>\n <div>\u27A1\uFE0F</div>\n <div>\uD83D\uDD03</div>\n <div>\uD83D\uDD37</div>\n <div>\uD83E\uDD1A</div>\n <div>\uD83D\uDE02</div>\n <div>\uD83D\uDE0A</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>", styles: [".ax-dark .ax-chat-input:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-primary-200));border-color:rgba(var(--ax-color-primary-200))}.ax-chat-input{border:1px solid;border-color:rgba(var(--ax-color-border-default));display:flex;align-items:flex-end;border-radius:var(--ax-rounded-border-default);position:relative;resize:vertical;height:auto;padding:.5rem;font-size:.875rem}.ax-chat-input.ax-state-recording{align-items:center;display:grid;grid-template-columns:repeat(3,1fr)}.ax-chat-input.ax-state-recording .ax-chat-input-start-side{justify-content:flex-start}.ax-chat-input.ax-state-recording .ax-chat-input-end-side{justify-content:flex-end}.ax-chat-input:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-primary-500));border-color:rgba(var(--ax-color-primary-500))}.ax-chat-input>textarea{font-size:.875rem;background-color:transparent;max-height:10rem;min-height:1.5rem;line-height:2rem;flex:1 1 auto;height:auto;resize:none}.ax-chat-input>textarea:focus,.ax-chat-input>textarea:focus-visible{outline:unset}.ax-chat-input .ax-chat-input-start-side,.ax-chat-input .ax-chat-input-end-side{display:flex;align-items:center;justify-content:center}.ax-chat-input .ax-chat-input-start-side{padding-inline-end:.75rem}.ax-chat-input .ax-chat-input-main-side{flex:1 1 auto;display:flex;align-items:center;justify-content:center}.ax-chat-input .ax-chat-input-end-side{padding-inline-start:.75rem;gap:.5rem}.ax-chat-input .ax-record-dot{display:inline-flex;width:.5rem;height:.5rem;background-color:rgba(var(--ax-color-danger-500));border-radius:999rem;margin-inline-end:.5rem}.ax-chat-input .ax-blob{animation:pulse .75s infinite}@keyframes pulse{0%{transform:scale(1);box-shadow:0 0 rgba(var(--ax-color-danger-500),.7)}70%{transform:scale(1);box-shadow:0 0 0 10px rgba(var(--ax-color-danger-500),0)}to{transform:scale(1);box-shadow:0 0 rgba(var(--ax-color-danger-500),0)}}.ax-chat-input .ax-attach-input{opacity:0;width:0;height:0;position:absolute}.ax-emoji-container{padding:.75rem;gap:.5rem;display:grid;grid-template-columns:repeat(7,1fr)}.ax-emoji-container>div{padding:.25rem;cursor:pointer;border-radius:var(--ax-rounded-border-default)}.ax-emoji-container>div:hover{background-color:rgba(var(--ax-color-on-surface))}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange"] }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "pipe", type:
|
181
|
+
], viewQueries: [{ propertyName: "inputFile", first: true, predicate: ["inputFile"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<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>\u26A0\uFE0F</div>\n <div>\u27A1\uFE0F</div>\n <div>\uD83D\uDD03</div>\n <div>\uD83D\uDD37</div>\n <div>\uD83E\uDD1A</div>\n <div>\uD83D\uDE02</div>\n <div>\uD83D\uDE0A</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>", styles: [".ax-dark .ax-chat-input:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-primary-200));border-color:rgba(var(--ax-color-primary-200))}.ax-chat-input{border:1px solid;border-color:rgba(var(--ax-color-border-default));display:flex;align-items:flex-end;border-radius:var(--ax-rounded-border-default);position:relative;resize:vertical;height:auto;padding:.5rem;font-size:.875rem}.ax-chat-input.ax-state-recording{align-items:center;display:grid;grid-template-columns:repeat(3,1fr)}.ax-chat-input.ax-state-recording .ax-chat-input-start-side{justify-content:flex-start}.ax-chat-input.ax-state-recording .ax-chat-input-end-side{justify-content:flex-end}.ax-chat-input:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-primary-500));border-color:rgba(var(--ax-color-primary-500))}.ax-chat-input>textarea{font-size:.875rem;background-color:transparent;max-height:10rem;min-height:1.5rem;line-height:2rem;flex:1 1 auto;height:auto;resize:none}.ax-chat-input>textarea:focus,.ax-chat-input>textarea:focus-visible{outline:unset}.ax-chat-input .ax-chat-input-start-side,.ax-chat-input .ax-chat-input-end-side{display:flex;align-items:center;justify-content:center}.ax-chat-input .ax-chat-input-start-side{padding-inline-end:.75rem}.ax-chat-input .ax-chat-input-main-side{flex:1 1 auto;display:flex;align-items:center;justify-content:center}.ax-chat-input .ax-chat-input-end-side{padding-inline-start:.75rem;gap:.5rem}.ax-chat-input .ax-record-dot{display:inline-flex;width:.5rem;height:.5rem;background-color:rgba(var(--ax-color-danger-500));border-radius:999rem;margin-inline-end:.5rem}.ax-chat-input .ax-blob{animation:pulse .75s infinite}@keyframes pulse{0%{transform:scale(1);box-shadow:0 0 rgba(var(--ax-color-danger-500),.7)}70%{transform:scale(1);box-shadow:0 0 0 10px rgba(var(--ax-color-danger-500),0)}to{transform:scale(1);box-shadow:0 0 rgba(var(--ax-color-danger-500),0)}}.ax-chat-input .ax-attach-input{opacity:0;width:0;height:0;position:absolute}.ax-emoji-container{padding:.75rem;gap:.5rem;display:grid;grid-template-columns:repeat(7,1fr)}.ax-emoji-container>div{padding:.25rem;cursor:pointer;border-radius:var(--ax-rounded-border-default)}.ax-emoji-container>div:hover{background-color:rgba(var(--ax-color-on-surface))}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange"] }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
178
182
|
}
|
179
183
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatInputComponent, decorators: [{
|
180
184
|
type: Component,
|
@@ -239,12 +243,28 @@ class AXChatMessageComponent extends MXBaseComponent {
|
|
239
243
|
get __hostClass() {
|
240
244
|
return `${this.isOwn ? 'ax-state-own' : ''} ${!this.isOwn ? 'ax-state-other' : ''}`;
|
241
245
|
}
|
246
|
+
ngOnInit() {
|
247
|
+
this._portal = new ComponentPortal(this.registryService.resolve(this.chatMessage().type).component);
|
248
|
+
}
|
249
|
+
_handleAttched(ref) {
|
250
|
+
ref = ref;
|
251
|
+
if (ref.instance && isBrowser()) {
|
252
|
+
Object.assign(ref.instance, { message: this.chatMessage() });
|
253
|
+
this.cdr.markForCheck();
|
254
|
+
const prefix = this.getHostElement().querySelector('ax-prefix');
|
255
|
+
const container = this.getHostElement().querySelector('.ax-message-prefix');
|
256
|
+
if (prefix && container) {
|
257
|
+
prefix.style.display = 'flex';
|
258
|
+
container.append(prefix);
|
259
|
+
}
|
260
|
+
}
|
261
|
+
}
|
242
262
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatMessageComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
243
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.2", type: AXChatMessageComponent, selector: "ax-chat-message", inputs: { chatMessage: { classPropertyName: "chatMessage", publicName: "chatMessage", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.__hostClass" } }, usesInheritance: true, ngImport: i0, template: "<ng-
|
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 }); }
|
244
264
|
}
|
245
265
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatMessageComponent, decorators: [{
|
246
266
|
type: Component,
|
247
|
-
args: [{ selector: 'ax-chat-message', encapsulation: ViewEncapsulation.None, template: "<ng-
|
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"] }]
|
248
268
|
}], propDecorators: { __hostClass: [{
|
249
269
|
type: HostBinding,
|
250
270
|
args: ['class']
|
@@ -302,18 +322,12 @@ class AXChatAudioMessageComponent extends AXChatMessageBaseComponent {
|
|
302
322
|
this.config = { url: '' };
|
303
323
|
this.audioState = signal('paused');
|
304
324
|
this.audioProgress = signal(0);
|
325
|
+
this.timeLeft = signal(0);
|
326
|
+
this.currentTime = signal(0);
|
327
|
+
this.duration = signal(0);
|
305
328
|
afterNextRender(() => {
|
306
329
|
this.config.url = this.message?.content;
|
307
330
|
this.audioState.set('loading');
|
308
|
-
this.audio.onStatusChanged.subscribe((c) => {
|
309
|
-
if (c.status === 'loading') {
|
310
|
-
this.audioProgress.set(c.data.duration);
|
311
|
-
console.log(c.data.duration);
|
312
|
-
}
|
313
|
-
if (c.status === 'ready') {
|
314
|
-
this.audioState.set('ready');
|
315
|
-
}
|
316
|
-
});
|
317
331
|
});
|
318
332
|
}
|
319
333
|
handlePauseClick() {
|
@@ -325,15 +339,30 @@ class AXChatAudioMessageComponent extends AXChatMessageBaseComponent {
|
|
325
339
|
this.audioState.set('playing');
|
326
340
|
});
|
327
341
|
}
|
328
|
-
handleOnStatusChanged(
|
329
|
-
console.log(
|
342
|
+
handleOnStatusChanged(e) {
|
343
|
+
console.log(e.status, e.data);
|
344
|
+
if (e.status === 'loading') {
|
345
|
+
this.audioProgress.set(e.data.percent);
|
346
|
+
this.duration.set(Math.ceil(e.data.duration * 1000));
|
347
|
+
}
|
348
|
+
if (e.status === 'ready') {
|
349
|
+
this.audioState.set('ready');
|
350
|
+
this.duration.set(Math.ceil(e.data.duration * 1000));
|
351
|
+
}
|
352
|
+
if (e.status === 'finish') {
|
353
|
+
this.audioState.set('paused');
|
354
|
+
}
|
355
|
+
if (e.status === 'timeupdate') {
|
356
|
+
this.timeLeft.set(this.duration() - e.data.currentTime * 1000);
|
357
|
+
this.currentTime.set(e.data.currentTime * 1000);
|
358
|
+
}
|
330
359
|
}
|
331
360
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatAudioMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
332
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.2", type: AXChatAudioMessageComponent, selector: "ax-chat-message-audio", inputs: { message: "message" }, viewQueries: [{ propertyName: "audio", first: true, predicate: ["a"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-audio-controller\">\n\n\n @switch (audioState()) {\n @case ('playing') {\n <button (click)=\"handlePauseClick()\">\n <i class=\"fa-solid fa-pause\"></i>\n </button>\n }\n @case ('paused')\n {\n <button (click)=\"handlePlayClick()\">\n <i class=\"fa-solid fa-play\" style=\"margin-inline-start: 0.25rem;\"></i>\n </button>\n }\n @case ('loading') {\n <button (click)=\"handlePlayClick()\">\n <i class=\"fa-solid fa-
|
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 }); }
|
333
362
|
}
|
334
363
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatAudioMessageComponent, decorators: [{
|
335
364
|
type: Component,
|
336
|
-
args: [{ selector: 'ax-chat-message-audio', encapsulation: ViewEncapsulation.None, inputs: ['message'], template: "<div class=\"ax-audio-controller\">\n\n\n @switch (audioState()) {\n @case ('playing') {\n <button (click)=\"handlePauseClick()\">\n <i class=\"fa-solid fa-pause\"></i>\n </button>\n }\n @case ('paused')\n {\n <button (click)=\"handlePlayClick()\">\n <i class=\"fa-solid fa-play\" style=\"margin-inline-start: 0.25rem;\"></i>\n </button>\n }\n @case ('loading') {\n <button (click)=\"handlePlayClick()\">\n <i class=\"fa-solid fa-
|
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"] }]
|
337
366
|
}], ctorParameters: () => [], propDecorators: { audio: [{
|
338
367
|
type: ViewChild,
|
339
368
|
args: ['a']
|
@@ -358,6 +387,8 @@ const MODULES = [
|
|
358
387
|
AXFormatModule,
|
359
388
|
AXAudioWaveModule,
|
360
389
|
AXCircularProgressModule,
|
390
|
+
AXDateTimeModule,
|
391
|
+
CdkPortalOutlet,
|
361
392
|
];
|
362
393
|
class AXChatModule {
|
363
394
|
static forRoot(config) {
|
@@ -425,7 +456,9 @@ class AXChatModule {
|
|
425
456
|
AXDropdownModule,
|
426
457
|
AXFormatModule,
|
427
458
|
AXAudioWaveModule,
|
428
|
-
AXCircularProgressModule
|
459
|
+
AXCircularProgressModule,
|
460
|
+
AXDateTimeModule,
|
461
|
+
CdkPortalOutlet], exports: [AXChatViewComponent,
|
429
462
|
AXChatInputComponent,
|
430
463
|
AXChatMessageComponent,
|
431
464
|
AXChatTextMessageComponent,
|
@@ -438,7 +471,8 @@ class AXChatModule {
|
|
438
471
|
AXDropdownModule,
|
439
472
|
AXFormatModule,
|
440
473
|
AXAudioWaveModule,
|
441
|
-
AXCircularProgressModule
|
474
|
+
AXCircularProgressModule,
|
475
|
+
AXDateTimeModule] }); }
|
442
476
|
}
|
443
477
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXChatModule, decorators: [{
|
444
478
|
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 { Component, 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 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","<ng-container\n *ngComponentOutlet=\"registryService.resolve(chatMessage().type).component;inputs:{message:chatMessage()}\"></ng-container>\n<div class=\"ax-chat-message-status\">\n <div>\n <ng-content select=\"ax-prefix\"></ng-content>\n </div>\n <div>\n <span>{{ chatMessage().sendTime | format:'datetime':'HH:mm' | async }}</span>\n <span>\n @if(isOwn)\n {\n @if(chatMessage().deliverTime){\n <i class=\"ax-icon ax-icon-check\"></i>\n }\n @if(chatMessage().readTime){\n <i class=\"ax-icon ax-icon-dobble-check\"></i>\n }\n }\n </span>\n </div>\n</div>","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 audioProgress = signal(0);\n\n constructor() {\n super();\n afterNextRender(() => {\n this.config.url = this.message?.content;\n this.audioState.set('loading');\n this.audio.onStatusChanged.subscribe((c) => {\n if (c.status === 'loading') {\n this.audioProgress.set(c.data.duration);\n console.log(c.data.duration);\n }\n if (c.status === 'ready') {\n this.audioState.set('ready');\n }\n });\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(event: AXAudioWaveChangeEvent) {\n console.log(event);\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 <i class=\"fa-solid fa-xmark\"></i>\n </button>\n }\n }\n\n</div>\n<ax-audio-wave #a [config]=\"config\" (onStatusChanged)=\"handleOnStatusChanged($event)\"></ax-audio-wave>\n\n\n\n<ax-prefix>\n {{a.getDuration()}}\n</ax-prefix>","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 { AXFormatModule } from '@acorex/core/format';\nimport { AXTranslationModule } from '@acorex/core/translation';\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];\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":["i5","i1","i2","i1.AXChatMessageComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;MAGa,kBAAkB,CAAA;AAD/B,IAAA,WAAA,GAAA;QAEE,IAAU,CAAA,UAAA,GAAU,EAAE,CAAC;QAEvB,IAAmB,CAAA,mBA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,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 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,EAA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AAqB,CAAA;;;MCpG1C,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;;;;"}
|
@@ -7,10 +7,10 @@ import { DOCUMENT } from '@angular/common';
|
|
7
7
|
import * as i1 from '@angular/platform-browser';
|
8
8
|
import { Observable } from 'rxjs/internal/Observable';
|
9
9
|
import { map, pairwise, filter as filter$1, startWith, exhaustMap } from 'rxjs/operators';
|
10
|
-
import { isBrowser } from '@acorex/core/platform';
|
11
10
|
import { classes } from 'polytype';
|
12
11
|
import { AXHtmlUtil } from '@acorex/core/utils';
|
13
12
|
import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
13
|
+
import { isBrowser } from '@acorex/core/platform';
|
14
14
|
import { AXValidationService } from '@acorex/core/validation';
|
15
15
|
import * as i1$1 from '@angular/forms';
|
16
16
|
|
@@ -876,14 +876,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
|
|
876
876
|
}] });
|
877
877
|
|
878
878
|
class MXBaseComponent {
|
879
|
-
constructor() {
|
880
|
-
this._cdr = inject(ChangeDetectorRef);
|
881
|
-
this._elementRef = inject(ElementRef);
|
882
|
-
this._viewRef = inject(ViewContainerRef);
|
883
|
-
this._domService = inject(AXDomService);
|
884
|
-
this._id = this._domService.generateElementId();
|
885
|
-
this.onOptionChanged = new EventEmitter();
|
886
|
-
}
|
887
879
|
get id() {
|
888
880
|
return this._id;
|
889
881
|
}
|
@@ -903,10 +895,20 @@ class MXBaseComponent {
|
|
903
895
|
return option?.value;
|
904
896
|
}
|
905
897
|
internalOptionChanged(option) { }
|
906
|
-
|
898
|
+
/**
|
899
|
+
*
|
900
|
+
*/
|
901
|
+
constructor() {
|
902
|
+
this._cdr = inject(ChangeDetectorRef);
|
903
|
+
this._elementRef = inject(ElementRef);
|
904
|
+
this._viewRef = inject(ViewContainerRef);
|
905
|
+
this._domService = inject(AXDomService);
|
906
|
+
this._id = this._domService.generateElementId();
|
907
|
+
this.onOptionChanged = new EventEmitter();
|
907
908
|
this.getHostElement().__axContext__ = this;
|
908
|
-
this._detectLayout();
|
909
909
|
}
|
910
|
+
// TODO: remove this
|
911
|
+
ngOnInit() { }
|
910
912
|
setOption(option) {
|
911
913
|
const oldValue = this[option.name];
|
912
914
|
let newValue = this.internalOptionChanging({
|
@@ -932,25 +934,12 @@ class MXBaseComponent {
|
|
932
934
|
if (option.afterCallback)
|
933
935
|
option.afterCallback(oldValue, newValue);
|
934
936
|
}
|
935
|
-
_detectLayout() {
|
936
|
-
if (isBrowser()) {
|
937
|
-
this.rtl =
|
938
|
-
this.getHostElement().classList.contains('ax-rtl') ||
|
939
|
-
window.getComputedStyle(this.getHostElement(), null).getPropertyValue('direction') === 'rtl';
|
940
|
-
}
|
941
|
-
}
|
942
|
-
get rtl() {
|
943
|
-
return this._rtl;
|
944
|
-
}
|
945
|
-
set rtl(value) {
|
946
|
-
this.setOption({ name: 'rtl', value });
|
947
|
-
}
|
948
937
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: MXBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
949
938
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: MXBaseComponent }); }
|
950
939
|
}
|
951
940
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: MXBaseComponent, decorators: [{
|
952
941
|
type: Injectable
|
953
|
-
}] });
|
942
|
+
}], ctorParameters: () => [] });
|
954
943
|
|
955
944
|
class MXColorComponent extends MXBaseComponent {
|
956
945
|
constructor() {
|
@@ -1425,6 +1414,13 @@ class MXInputBaseValueComponent extends MXValueComponent {
|
|
1425
1414
|
nativeEvent: e,
|
1426
1415
|
});
|
1427
1416
|
}
|
1417
|
+
focus() {
|
1418
|
+
const input = this.getHostElement().querySelector('input');
|
1419
|
+
if (input)
|
1420
|
+
input.focus();
|
1421
|
+
else
|
1422
|
+
super.focus();
|
1423
|
+
}
|
1428
1424
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: MXInputBaseValueComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
1429
1425
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: MXInputBaseValueComponent }); }
|
1430
1426
|
}
|