@acorex/components 21.0.3-next.38 → 21.0.3-next.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{conversation2 → conversation}/README.md +23 -23
- package/fesm2022/acorex-components-button.mjs +4 -4
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs +13711 -0
- package/fesm2022/acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-audio-attachment.component-CLvS3W8F.mjs +119 -0
- package/fesm2022/acorex-components-conversation-audio-attachment.component-CLvS3W8F.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-audio-composer.payload-BHQJNyXz.mjs +59 -0
- package/fesm2022/acorex-components-conversation-audio-composer.payload-BHQJNyXz.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-audio-picker.component-BD_fN2Ip.mjs +432 -0
- package/fesm2022/acorex-components-conversation-audio-picker.component-BD_fN2Ip.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-audio-renderer.component-CcxVVprx.mjs +177 -0
- package/fesm2022/acorex-components-conversation-audio-renderer.component-CcxVVprx.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-audio.payload-Bag4aTut.mjs +54 -0
- package/fesm2022/acorex-components-conversation-audio.payload-Bag4aTut.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-C28hl7iD.mjs +101 -0
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-C28hl7iD.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-conversation-audio.file-type-CfGSVnMA.mjs +100 -0
- package/fesm2022/acorex-components-conversation-conversation-audio.file-type-CfGSVnMA.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-conversation-file.file-type-DB-2xhaC.mjs +121 -0
- package/fesm2022/acorex-components-conversation-conversation-file.file-type-DB-2xhaC.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-conversation-image.file-type-C02OzZZB.mjs +84 -0
- package/fesm2022/acorex-components-conversation-conversation-image.file-type-C02OzZZB.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-conversation-info-media-view.component-Mhk7JE6K.mjs +238 -0
- package/fesm2022/acorex-components-conversation-conversation-info-media-view.component-Mhk7JE6K.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-conversation-info-panel.component-CNaM5ajR.mjs +1080 -0
- package/fesm2022/acorex-components-conversation-conversation-info-panel.component-CNaM5ajR.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-conversation-video.file-type-Pescv4Vu.mjs +102 -0
- package/fesm2022/acorex-components-conversation-conversation-video.file-type-Pescv4Vu.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-conversation-voice.file-type-DDd47o4r.mjs +90 -0
- package/fesm2022/acorex-components-conversation-conversation-voice.file-type-DDd47o4r.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-emoji-categories-C7Gm95V0.mjs +1840 -0
- package/fesm2022/acorex-components-conversation-emoji-categories-C7Gm95V0.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-fallback-renderer.component-CYh_6O6j.mjs +44 -0
- package/fesm2022/acorex-components-conversation-fallback-renderer.component-CYh_6O6j.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-file-composer.payload-Dy7aG-EH.mjs +64 -0
- package/fesm2022/acorex-components-conversation-file-composer.payload-Dy7aG-EH.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-file-picker.component-DCVgl33l.mjs +468 -0
- package/fesm2022/acorex-components-conversation-file-picker.component-DCVgl33l.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-file-renderer.component-DgCi06Mg.mjs +125 -0
- package/fesm2022/acorex-components-conversation-file-renderer.component-DgCi06Mg.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-file.payload-DyFxTQYn.mjs +50 -0
- package/fesm2022/acorex-components-conversation-file.payload-DyFxTQYn.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-format-media-DUD4vA6F.mjs +21 -0
- package/fesm2022/acorex-components-conversation-format-media-DUD4vA6F.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-image-attachment.component-CLMGxXPl.mjs +77 -0
- package/fesm2022/acorex-components-conversation-image-attachment.component-CLMGxXPl.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-image-picker.component-CS343UDa.mjs +407 -0
- package/fesm2022/acorex-components-conversation-image-picker.component-CS343UDa.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-image-renderer.component-Cy0TA6cL.mjs +83 -0
- package/fesm2022/acorex-components-conversation-image-renderer.component-Cy0TA6cL.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-index-3V2b14I0.mjs +184 -0
- package/fesm2022/acorex-components-conversation-index-3V2b14I0.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-index-MCvfr9Zd.mjs +266 -0
- package/fesm2022/acorex-components-conversation-index-MCvfr9Zd.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-location-picker.component-DcNQzuoU.mjs +149 -0
- package/fesm2022/acorex-components-conversation-location-picker.component-DcNQzuoU.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-location-renderer.component-Cw2PB0LM.mjs +118 -0
- package/fesm2022/acorex-components-conversation-location-renderer.component-Cw2PB0LM.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-media-formatters-DV3wEEno.mjs +17 -0
- package/fesm2022/acorex-components-conversation-media-formatters-DV3wEEno.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-media-playback-info-bar-banner.component-DbWUl6M2.mjs +140 -0
- package/fesm2022/acorex-components-conversation-media-playback-info-bar-banner.component-DbWUl6M2.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-message-renderer-copy-host.component-oXTr_Lfq.mjs +33 -0
- package/fesm2022/acorex-components-conversation-message-renderer-copy-host.component-oXTr_Lfq.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-message-renderer-state.component-Dp-JdHWr.mjs +172 -0
- package/fesm2022/acorex-components-conversation-message-renderer-state.component-Dp-JdHWr.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-Du8Lj9Sp.mjs +224 -0
- package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-Du8Lj9Sp.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-pagination-demo-data-oIT_YJmN.mjs +81 -0
- package/fesm2022/acorex-components-conversation-pagination-demo-data-oIT_YJmN.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-picker-header.component-BneIFjXq.mjs +91 -0
- package/fesm2022/acorex-components-conversation-picker-header.component-BneIFjXq.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-picker-toolbar.component-BthRvEeE.mjs +537 -0
- package/fesm2022/acorex-components-conversation-picker-toolbar.component-BthRvEeE.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-picker-upload-C-PlKPaU.mjs +163 -0
- package/fesm2022/acorex-components-conversation-picker-upload-C-PlKPaU.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-playback-banner-sync-D8FFKde6.mjs +68 -0
- package/fesm2022/acorex-components-conversation-playback-banner-sync-D8FFKde6.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-renderer-shared.styles-Digah3Zn.mjs +95 -0
- package/fesm2022/acorex-components-conversation-renderer-shared.styles-Digah3Zn.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-search.component-B-nc6xiA.mjs +187 -0
- package/fesm2022/acorex-components-conversation-search.component-B-nc6xiA.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-send-message-media-BRklgfV7.mjs +170 -0
- package/fesm2022/acorex-components-conversation-send-message-media-BRklgfV7.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-shared-storage.seed-J9PA4l3c.mjs +750 -0
- package/fesm2022/acorex-components-conversation-shared-storage.seed-J9PA4l3c.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-sticker-renderer.component-BmBwy7Ig.mjs +103 -0
- package/fesm2022/acorex-components-conversation-sticker-renderer.component-BmBwy7Ig.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-system-renderer.component-uie3tm5N.mjs +55 -0
- package/fesm2022/acorex-components-conversation-system-renderer.component-uie3tm5N.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-text-renderer.component-DNAquHYK.mjs +109 -0
- package/fesm2022/acorex-components-conversation-text-renderer.component-DNAquHYK.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-video-attachment.component-CGaUhnSb.mjs +105 -0
- package/fesm2022/acorex-components-conversation-video-attachment.component-CGaUhnSb.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-video-composer.payload-DMqRkafr.mjs +62 -0
- package/fesm2022/acorex-components-conversation-video-composer.payload-DMqRkafr.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-video-picker.component-DPwSBnoH.mjs +446 -0
- package/fesm2022/acorex-components-conversation-video-picker.component-DPwSBnoH.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-video-renderer.component-DKa9mUe2.mjs +181 -0
- package/fesm2022/acorex-components-conversation-video-renderer.component-DKa9mUe2.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-video.payload-C8QaqxuX.mjs +54 -0
- package/fesm2022/acorex-components-conversation-video.payload-C8QaqxuX.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-voice-composer.payload-DLVow7ex.mjs +17 -0
- package/fesm2022/acorex-components-conversation-voice-composer.payload-DLVow7ex.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-voice-recorder.component-D_rdANZN.mjs +344 -0
- package/fesm2022/acorex-components-conversation-voice-recorder.component-D_rdANZN.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-voice-renderer.component-BY5FJcT8.mjs +270 -0
- package/fesm2022/acorex-components-conversation-voice-renderer.component-BY5FJcT8.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation.mjs +2 -0
- package/fesm2022/acorex-components-conversation.mjs.map +1 -0
- package/fesm2022/acorex-components-kbd.mjs +2 -2
- package/fesm2022/acorex-components-kbd.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler-picker.mjs +22 -14
- package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-tree-view.mjs +2 -2
- package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
- package/package.json +6 -6
- package/types/{acorex-components-conversation2.d.ts → acorex-components-conversation.d.ts} +1127 -1928
- package/types/acorex-components-scheduler-picker.d.ts +2 -0
- package/fesm2022/acorex-components-conversation2.mjs +0 -22347
- package/fesm2022/acorex-components-conversation2.mjs.map +0 -1
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { isPlatformBrowser, CommonModule } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { inject, PLATFORM_ID, DestroyRef, viewChild, signal, input, computed, effect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
+
import { l as copyWithFileTypeFallback, m as AXConversationInfoBarService, x as createResolvedMediaUrlSignal, y as pickDisplayMediaUrl } from './acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs';
|
|
5
|
+
import { AXFileTypeRegistryService } from '@acorex/core/file';
|
|
6
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
|
7
|
+
import { A as AXConversationMessageRendererCopyHostComponent, m as mediaCopyText } from './acorex-components-conversation-message-renderer-copy-host.component-oXTr_Lfq.mjs';
|
|
8
|
+
import { f as formatMediaDuration } from './acorex-components-conversation-format-media-DUD4vA6F.mjs';
|
|
9
|
+
import { A as AXConversationMessageRendererStateComponent } from './acorex-components-conversation-message-renderer-state.component-Dp-JdHWr.mjs';
|
|
10
|
+
import { b as bindMediaRendererContentState, r as reportMediaLoadError, s as syncPlaybackInfoBarBanner } from './acorex-components-conversation-playback-banner-sync-D8FFKde6.mjs';
|
|
11
|
+
|
|
12
|
+
/** Decorative bars when payload has no waveform (deterministic, no random). */
|
|
13
|
+
const AX_CONVERSATION_FALLBACK_WAVEFORM = [
|
|
14
|
+
38, 58, 44, 72, 48, 64, 40, 68, 52, 60, 42, 56, 46, 70, 50, 62, 36, 54, 48, 66,
|
|
15
|
+
];
|
|
16
|
+
class AXConversationVoiceRendererComponent extends AXConversationMessageRendererCopyHostComponent {
|
|
17
|
+
copy() {
|
|
18
|
+
return copyWithFileTypeFallback(this.message(), this.fileTypes, () => {
|
|
19
|
+
const url = this.voiceUrl()?.trim();
|
|
20
|
+
return mediaCopyText(undefined, 'Voice message', 'voice messages', 1, [url]);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
constructor() {
|
|
24
|
+
super();
|
|
25
|
+
this.fileTypes = inject(AXFileTypeRegistryService);
|
|
26
|
+
this.translation = inject(AXTranslationService);
|
|
27
|
+
this.platformId = inject(PLATFORM_ID);
|
|
28
|
+
this.destroyRef = inject(DestroyRef);
|
|
29
|
+
this.infoBarService = inject(AXConversationInfoBarService, { optional: true });
|
|
30
|
+
this.audioElementRef = viewChild('audioElement', ...(ngDevMode ? [{ debugName: "audioElementRef" }] : /* istanbul ignore next */ []));
|
|
31
|
+
this._contentState = signal('ready', ...(ngDevMode ? [{ debugName: "_contentState" }] : /* istanbul ignore next */ []));
|
|
32
|
+
this.message = input.required(...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
|
|
33
|
+
this.rendererState = computed(() => ({
|
|
34
|
+
deliveryStatus: this.message().status,
|
|
35
|
+
contentState: this._contentState(),
|
|
36
|
+
}), ...(ngDevMode ? [{ debugName: "rendererState" }] : /* istanbul ignore next */ []));
|
|
37
|
+
this.isPlaying = signal(false, ...(ngDevMode ? [{ debugName: "isPlaying" }] : /* istanbul ignore next */ []));
|
|
38
|
+
this.currentTime = signal(0, ...(ngDevMode ? [{ debugName: "currentTime" }] : /* istanbul ignore next */ []));
|
|
39
|
+
this.duration = signal(0, ...(ngDevMode ? [{ debugName: "duration" }] : /* istanbul ignore next */ []));
|
|
40
|
+
this.playbackSpeed = signal(1.0, ...(ngDevMode ? [{ debugName: "playbackSpeed" }] : /* istanbul ignore next */ []));
|
|
41
|
+
this.speeds = [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2];
|
|
42
|
+
this.payload = computed(() => this.message().payload, ...(ngDevMode ? [{ debugName: "payload" }] : /* istanbul ignore next */ []));
|
|
43
|
+
this.mediaReference = computed(() => ({
|
|
44
|
+
url: this.payload().url,
|
|
45
|
+
mediaId: this.payload().mediaId,
|
|
46
|
+
mimeType: this.payload().mimeType,
|
|
47
|
+
size: this.payload().size,
|
|
48
|
+
}), ...(ngDevMode ? [{ debugName: "mediaReference" }] : /* istanbul ignore next */ []));
|
|
49
|
+
this.resolvedUrl = createResolvedMediaUrlSignal(this.mediaReference);
|
|
50
|
+
this.voiceUrl = computed(() => pickDisplayMediaUrl(this.resolvedUrl(), this.payload().url), ...(ngDevMode ? [{ debugName: "voiceUrl" }] : /* istanbul ignore next */ []));
|
|
51
|
+
this.waveformBars = computed(() => {
|
|
52
|
+
const w = this.payload().waveform;
|
|
53
|
+
return w?.length ? w : [...AX_CONVERSATION_FALLBACK_WAVEFORM];
|
|
54
|
+
}, ...(ngDevMode ? [{ debugName: "waveformBars" }] : /* istanbul ignore next */ []));
|
|
55
|
+
this.activeBarIndex = computed(() => {
|
|
56
|
+
const dur = this.duration();
|
|
57
|
+
const n = this.waveformBars().length;
|
|
58
|
+
return dur > 0 ? Math.floor((this.currentTime() / dur) * n) : 0;
|
|
59
|
+
}, ...(ngDevMode ? [{ debugName: "activeBarIndex" }] : /* istanbul ignore next */ []));
|
|
60
|
+
this.timeLabel = computed(() => formatMediaDuration(this.isPlaying() ? this.currentTime() : this.duration()), ...(ngDevMode ? [{ debugName: "timeLabel" }] : /* istanbul ignore next */ []));
|
|
61
|
+
this.voiceLoadErrorLabel = computed(() => this.translation.translateSync('@acorex:chat.renderer-state.could-not-load-voice'), ...(ngDevMode ? [{ debugName: "voiceLoadErrorLabel" }] : /* istanbul ignore next */ []));
|
|
62
|
+
bindMediaRendererContentState(this.message, this._contentState, () => this.voiceUrl());
|
|
63
|
+
effect((onCleanup) => {
|
|
64
|
+
const audioEl = this.audioElementRef()?.nativeElement;
|
|
65
|
+
if (!audioEl || !isPlatformBrowser(this.platformId)) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const onMeta = () => {
|
|
69
|
+
this.duration.set(audioEl.duration);
|
|
70
|
+
};
|
|
71
|
+
audioEl.addEventListener('loadedmetadata', onMeta);
|
|
72
|
+
onCleanup(() => audioEl.removeEventListener('loadedmetadata', onMeta));
|
|
73
|
+
});
|
|
74
|
+
this.destroyRef.onDestroy(() => {
|
|
75
|
+
const messageId = this.message()?.id;
|
|
76
|
+
if (!messageId || !this.infoBarService) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
this.infoBarService.hideMessageBanner(messageId);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
togglePlay() {
|
|
83
|
+
if (!isPlatformBrowser(this.platformId)) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const audioEl = this.audioElementRef()?.nativeElement;
|
|
87
|
+
if (!audioEl) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
if (this.isPlaying()) {
|
|
91
|
+
audioEl.pause();
|
|
92
|
+
this.isPlaying.set(false);
|
|
93
|
+
this.syncInfoBarBanner();
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
void audioEl.play();
|
|
97
|
+
this.isPlaying.set(true);
|
|
98
|
+
this.syncInfoBarBanner(true);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
cyclePlaybackSpeed() {
|
|
102
|
+
const current = this.playbackSpeed();
|
|
103
|
+
const i = this.speeds.findIndex((s) => s === current);
|
|
104
|
+
const nextIndex = (i < 0 ? 2 : i + 1) % this.speeds.length;
|
|
105
|
+
const next = this.speeds[nextIndex] ?? 1;
|
|
106
|
+
this.playbackSpeed.set(next);
|
|
107
|
+
const audioEl = this.audioElementRef()?.nativeElement;
|
|
108
|
+
if (audioEl) {
|
|
109
|
+
audioEl.playbackRate = next;
|
|
110
|
+
this.syncInfoBarBanner();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
onTimeUpdate() {
|
|
114
|
+
const audioEl = this.audioElementRef()?.nativeElement;
|
|
115
|
+
if (audioEl) {
|
|
116
|
+
this.currentTime.set(audioEl.currentTime);
|
|
117
|
+
this.syncInfoBarBanner();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
onEnded() {
|
|
121
|
+
this.isPlaying.set(false);
|
|
122
|
+
this.currentTime.set(0);
|
|
123
|
+
this.syncInfoBarBanner();
|
|
124
|
+
}
|
|
125
|
+
onError() {
|
|
126
|
+
if (!reportMediaLoadError(this.message(), this._contentState)) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
this.isPlaying.set(false);
|
|
130
|
+
this.infoBarService?.hideMessageBanner(this.message().id);
|
|
131
|
+
}
|
|
132
|
+
pausePlayback() {
|
|
133
|
+
const audioEl = this.audioElementRef()?.nativeElement;
|
|
134
|
+
if (!audioEl) {
|
|
135
|
+
this.isPlaying.set(false);
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
audioEl.pause();
|
|
139
|
+
this.isPlaying.set(false);
|
|
140
|
+
}
|
|
141
|
+
syncInfoBarBanner(forceOpen = false) {
|
|
142
|
+
if (!this.infoBarService) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
const message = this.message();
|
|
146
|
+
const payload = this.payload();
|
|
147
|
+
syncPlaybackInfoBarBanner(this.infoBarService, message, {
|
|
148
|
+
title: 'Voice message',
|
|
149
|
+
currentTime: this.currentTime(),
|
|
150
|
+
duration: this.duration() || payload.duration || 0,
|
|
151
|
+
isPlaying: this.isPlaying(),
|
|
152
|
+
onTogglePlay: () => this.togglePlay(),
|
|
153
|
+
onClose: () => this.pausePlayback(),
|
|
154
|
+
playbackSpeed: this.playbackSpeed(),
|
|
155
|
+
onCycleSpeed: () => this.cyclePlaybackSpeed(),
|
|
156
|
+
showSpeedControl: true,
|
|
157
|
+
}, { forceOpen });
|
|
158
|
+
}
|
|
159
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationVoiceRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
160
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXConversationVoiceRendererComponent, isStandalone: true, selector: "ax-conversation-voice-renderer", inputs: { message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "audioElementRef", first: true, predicate: ["audioElement"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
161
|
+
<div class="ax-conversation-voice">
|
|
162
|
+
<div class="ax-conversation-voice__bar">
|
|
163
|
+
<button
|
|
164
|
+
type="button"
|
|
165
|
+
class="ax-conversation-voice__fab"
|
|
166
|
+
(click)="togglePlay()"
|
|
167
|
+
[attr.aria-label]="isPlaying() ? 'Pause' : 'Play voice message'"
|
|
168
|
+
>
|
|
169
|
+
<i class="fa-solid" [class.fa-pause]="isPlaying()" [class.fa-play]="!isPlaying()"></i>
|
|
170
|
+
</button>
|
|
171
|
+
<div class="ax-conversation-voice__wave" aria-hidden="true">
|
|
172
|
+
<div class="ax-conversation-voice__cols">
|
|
173
|
+
@for (bar of waveformBars(); track $index) {
|
|
174
|
+
<div
|
|
175
|
+
class="ax-conversation-voice__col"
|
|
176
|
+
[style.height.%]="bar"
|
|
177
|
+
[class.ax-conversation-voice__col--on]="$index < activeBarIndex()"
|
|
178
|
+
></div>
|
|
179
|
+
}
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
<div class="ax-conversation-voice__side">
|
|
183
|
+
<button
|
|
184
|
+
type="button"
|
|
185
|
+
class="ax-conversation-voice__speed"
|
|
186
|
+
(click)="cyclePlaybackSpeed()"
|
|
187
|
+
[attr.aria-label]="'Playback speed: ' + playbackSpeed() + 'x'"
|
|
188
|
+
>
|
|
189
|
+
{{ playbackSpeed() }}x
|
|
190
|
+
</button>
|
|
191
|
+
<span class="ax-conversation-voice__time">{{ timeLabel() }}</span>
|
|
192
|
+
</div>
|
|
193
|
+
</div>
|
|
194
|
+
<audio
|
|
195
|
+
#audioElement
|
|
196
|
+
class="ax-conversation-voice__el"
|
|
197
|
+
[src]="voiceUrl() || null"
|
|
198
|
+
(error)="onError()"
|
|
199
|
+
(timeupdate)="onTimeUpdate()"
|
|
200
|
+
(ended)="onEnded()"
|
|
201
|
+
></audio>
|
|
202
|
+
<ax-conversation-message-renderer-state
|
|
203
|
+
[rendererState]="rendererState()"
|
|
204
|
+
[message]="message()"
|
|
205
|
+
[contentErrorLabel]="voiceLoadErrorLabel()"
|
|
206
|
+
contentErrorStyle="inline"
|
|
207
|
+
contentErrorIconClass="fa-light fa-microphone"
|
|
208
|
+
placement="below"
|
|
209
|
+
/>
|
|
210
|
+
</div>
|
|
211
|
+
`, isInline: true, styles: [":host{display:block;max-width:100%}.ax-conversation-voice{width:100%;max-width:min(100%,17rem)}.ax-conversation-voice__bar{display:flex;align-items:center;gap:.5rem;padding:.375rem .5rem;border-radius:999px;background:rgb(var(--ax-sys-color-light-surface));border:1px solid rgb(var(--ax-sys-color-border-light-surface))}.ax-conversation-voice__fab{flex-shrink:0;width:2.25rem;height:2.25rem;touch-action:manipulation;display:flex;align-items:center;justify-content:center;padding-inline-start:.12rem;border:none;border-radius:50%;background:rgb(var(--ax-sys-color-primary-500));color:rgb(var(--ax-sys-color-on-primary-surface));font-size:.75rem;cursor:pointer;transition:background .15s ease}@media(hover:hover){.ax-conversation-voice__fab:hover{background:rgb(var(--ax-sys-color-primary-600))}}.ax-conversation-voice__fab:focus-visible{outline:2px solid rgb(var(--ax-sys-color-primary-500));outline-offset:2px}.ax-conversation-voice__wave{flex:1;min-width:0}.ax-conversation-voice__cols{display:flex;align-items:center;gap:2px;height:1.75rem}.ax-conversation-voice__col{flex:1;min-width:2px;max-height:100%;align-self:center;border-radius:2px;background:rgb(var(--ax-sys-color-border-light-surface));transition:background .12s ease}.ax-conversation-voice__col--on{background:rgb(var(--ax-sys-color-primary-500))}.ax-conversation-voice__side{display:flex;flex-direction:column;align-items:center;gap:.125rem;flex-shrink:0}.ax-conversation-voice__speed{min-width:2.5rem;height:1.25rem;padding:0 .25rem;border:1px solid rgb(var(--ax-sys-color-primary-500));border-radius:999px;background:transparent;color:rgb(var(--ax-sys-color-primary-600));font-size:.6875rem;font-weight:600;cursor:pointer;transition:background .15s ease}.ax-conversation-voice__speed:hover{background:rgb(var(--ax-sys-color-primary-lightest-surface))}.ax-conversation-voice__time{font-size:.625rem;font-variant-numeric:tabular-nums;opacity:.72;color:rgb(var(--ax-sys-color-primary-600))}.ax-conversation-voice__el{display:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXConversationMessageRendererStateComponent, selector: "ax-conversation-message-renderer-state", inputs: ["rendererState", "message", "contentErrorLabel", "deliveryFailedLabel", "showContentErrorChrome", "contentErrorStyle", "contentErrorIconClass", "placement", "contentRetryEnabled"], outputs: ["contentRetry"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
212
|
+
}
|
|
213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationVoiceRendererComponent, decorators: [{
|
|
214
|
+
type: Component,
|
|
215
|
+
args: [{ selector: 'ax-conversation-voice-renderer', imports: [CommonModule, AXConversationMessageRendererStateComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
216
|
+
<div class="ax-conversation-voice">
|
|
217
|
+
<div class="ax-conversation-voice__bar">
|
|
218
|
+
<button
|
|
219
|
+
type="button"
|
|
220
|
+
class="ax-conversation-voice__fab"
|
|
221
|
+
(click)="togglePlay()"
|
|
222
|
+
[attr.aria-label]="isPlaying() ? 'Pause' : 'Play voice message'"
|
|
223
|
+
>
|
|
224
|
+
<i class="fa-solid" [class.fa-pause]="isPlaying()" [class.fa-play]="!isPlaying()"></i>
|
|
225
|
+
</button>
|
|
226
|
+
<div class="ax-conversation-voice__wave" aria-hidden="true">
|
|
227
|
+
<div class="ax-conversation-voice__cols">
|
|
228
|
+
@for (bar of waveformBars(); track $index) {
|
|
229
|
+
<div
|
|
230
|
+
class="ax-conversation-voice__col"
|
|
231
|
+
[style.height.%]="bar"
|
|
232
|
+
[class.ax-conversation-voice__col--on]="$index < activeBarIndex()"
|
|
233
|
+
></div>
|
|
234
|
+
}
|
|
235
|
+
</div>
|
|
236
|
+
</div>
|
|
237
|
+
<div class="ax-conversation-voice__side">
|
|
238
|
+
<button
|
|
239
|
+
type="button"
|
|
240
|
+
class="ax-conversation-voice__speed"
|
|
241
|
+
(click)="cyclePlaybackSpeed()"
|
|
242
|
+
[attr.aria-label]="'Playback speed: ' + playbackSpeed() + 'x'"
|
|
243
|
+
>
|
|
244
|
+
{{ playbackSpeed() }}x
|
|
245
|
+
</button>
|
|
246
|
+
<span class="ax-conversation-voice__time">{{ timeLabel() }}</span>
|
|
247
|
+
</div>
|
|
248
|
+
</div>
|
|
249
|
+
<audio
|
|
250
|
+
#audioElement
|
|
251
|
+
class="ax-conversation-voice__el"
|
|
252
|
+
[src]="voiceUrl() || null"
|
|
253
|
+
(error)="onError()"
|
|
254
|
+
(timeupdate)="onTimeUpdate()"
|
|
255
|
+
(ended)="onEnded()"
|
|
256
|
+
></audio>
|
|
257
|
+
<ax-conversation-message-renderer-state
|
|
258
|
+
[rendererState]="rendererState()"
|
|
259
|
+
[message]="message()"
|
|
260
|
+
[contentErrorLabel]="voiceLoadErrorLabel()"
|
|
261
|
+
contentErrorStyle="inline"
|
|
262
|
+
contentErrorIconClass="fa-light fa-microphone"
|
|
263
|
+
placement="below"
|
|
264
|
+
/>
|
|
265
|
+
</div>
|
|
266
|
+
`, styles: [":host{display:block;max-width:100%}.ax-conversation-voice{width:100%;max-width:min(100%,17rem)}.ax-conversation-voice__bar{display:flex;align-items:center;gap:.5rem;padding:.375rem .5rem;border-radius:999px;background:rgb(var(--ax-sys-color-light-surface));border:1px solid rgb(var(--ax-sys-color-border-light-surface))}.ax-conversation-voice__fab{flex-shrink:0;width:2.25rem;height:2.25rem;touch-action:manipulation;display:flex;align-items:center;justify-content:center;padding-inline-start:.12rem;border:none;border-radius:50%;background:rgb(var(--ax-sys-color-primary-500));color:rgb(var(--ax-sys-color-on-primary-surface));font-size:.75rem;cursor:pointer;transition:background .15s ease}@media(hover:hover){.ax-conversation-voice__fab:hover{background:rgb(var(--ax-sys-color-primary-600))}}.ax-conversation-voice__fab:focus-visible{outline:2px solid rgb(var(--ax-sys-color-primary-500));outline-offset:2px}.ax-conversation-voice__wave{flex:1;min-width:0}.ax-conversation-voice__cols{display:flex;align-items:center;gap:2px;height:1.75rem}.ax-conversation-voice__col{flex:1;min-width:2px;max-height:100%;align-self:center;border-radius:2px;background:rgb(var(--ax-sys-color-border-light-surface));transition:background .12s ease}.ax-conversation-voice__col--on{background:rgb(var(--ax-sys-color-primary-500))}.ax-conversation-voice__side{display:flex;flex-direction:column;align-items:center;gap:.125rem;flex-shrink:0}.ax-conversation-voice__speed{min-width:2.5rem;height:1.25rem;padding:0 .25rem;border:1px solid rgb(var(--ax-sys-color-primary-500));border-radius:999px;background:transparent;color:rgb(var(--ax-sys-color-primary-600));font-size:.6875rem;font-weight:600;cursor:pointer;transition:background .15s ease}.ax-conversation-voice__speed:hover{background:rgb(var(--ax-sys-color-primary-lightest-surface))}.ax-conversation-voice__time{font-size:.625rem;font-variant-numeric:tabular-nums;opacity:.72;color:rgb(var(--ax-sys-color-primary-600))}.ax-conversation-voice__el{display:none}\n"] }]
|
|
267
|
+
}], ctorParameters: () => [], propDecorators: { audioElementRef: [{ type: i0.ViewChild, args: ['audioElement', { isSignal: true }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: true }] }] } });
|
|
268
|
+
|
|
269
|
+
export { AXConversationVoiceRendererComponent };
|
|
270
|
+
//# sourceMappingURL=acorex-components-conversation-voice-renderer.component-BY5FJcT8.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-components-conversation-voice-renderer.component-BY5FJcT8.mjs","sources":["../../../../packages/components/conversation/src/lib/plugins/message-list/components/voice-renderer/voice-renderer.component.ts"],"sourcesContent":["import { CommonModule, isPlatformBrowser } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n PLATFORM_ID,\n computed,\n effect,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { AXConversationInfoBarService } from '../../../../components';\nimport type { AXConversationMessage, AXConversationVoicePayload } from '../../../../models';\nimport type { AXConversationMessageRendererContentState } from '../../../../registries/message-renderer.registry';\nimport { AXFileTypeRegistryService } from '@acorex/core/file';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXConversationMessageRendererCopyHostComponent, mediaCopyText } from '../shared/message-renderer-copy-host.component';\nimport { copyWithFileTypeFallback } from '../../../../utils/file-type-message.resolve';\nimport { pickDisplayMediaUrl } from '../../../composer/components/shared/persisted-media-url';\nimport { formatMediaDuration } from '../shared/format-media';\nimport { createResolvedMediaUrlSignal } from '../shared/media-url-resolve';\nimport { AXConversationMessageRendererStateComponent } from '../shared/message-renderer-state.component';\nimport { bindMediaRendererContentState, reportMediaLoadError } from '../shared/media-renderer-content-state';\nimport { syncPlaybackInfoBarBanner } from '../shared/playback-banner-sync';\n\n/** Decorative bars when payload has no waveform (deterministic, no random). */\nconst AX_CONVERSATION_FALLBACK_WAVEFORM: readonly number[] = [\n 38, 58, 44, 72, 48, 64, 40, 68, 52, 60, 42, 56, 46, 70, 50, 62, 36, 54, 48, 66,\n];\n\n@Component({\n selector: 'ax-conversation-voice-renderer',\n imports: [CommonModule, AXConversationMessageRendererStateComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"ax-conversation-voice\">\n <div class=\"ax-conversation-voice__bar\">\n <button\n type=\"button\"\n class=\"ax-conversation-voice__fab\"\n (click)=\"togglePlay()\"\n [attr.aria-label]=\"isPlaying() ? 'Pause' : 'Play voice message'\"\n >\n <i class=\"fa-solid\" [class.fa-pause]=\"isPlaying()\" [class.fa-play]=\"!isPlaying()\"></i>\n </button>\n <div class=\"ax-conversation-voice__wave\" aria-hidden=\"true\">\n <div class=\"ax-conversation-voice__cols\">\n @for (bar of waveformBars(); track $index) {\n <div\n class=\"ax-conversation-voice__col\"\n [style.height.%]=\"bar\"\n [class.ax-conversation-voice__col--on]=\"$index < activeBarIndex()\"\n ></div>\n }\n </div>\n </div>\n <div class=\"ax-conversation-voice__side\">\n <button\n type=\"button\"\n class=\"ax-conversation-voice__speed\"\n (click)=\"cyclePlaybackSpeed()\"\n [attr.aria-label]=\"'Playback speed: ' + playbackSpeed() + 'x'\"\n >\n {{ playbackSpeed() }}x\n </button>\n <span class=\"ax-conversation-voice__time\">{{ timeLabel() }}</span>\n </div>\n </div>\n <audio\n #audioElement\n class=\"ax-conversation-voice__el\"\n [src]=\"voiceUrl() || null\"\n (error)=\"onError()\"\n (timeupdate)=\"onTimeUpdate()\"\n (ended)=\"onEnded()\"\n ></audio>\n <ax-conversation-message-renderer-state\n [rendererState]=\"rendererState()\"\n [message]=\"message()\"\n [contentErrorLabel]=\"voiceLoadErrorLabel()\"\n contentErrorStyle=\"inline\"\n contentErrorIconClass=\"fa-light fa-microphone\"\n placement=\"below\"\n />\n </div>\n `,\n styles: [\n `\n :host {\n display: block;\n max-width: 100%;\n }\n\n .ax-conversation-voice {\n width: 100%;\n max-width: min(100%, 17rem);\n }\n\n .ax-conversation-voice__bar {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.375rem 0.5rem;\n border-radius: 999px;\n background: rgb(var(--ax-sys-color-light-surface));\n border: 1px solid rgb(var(--ax-sys-color-border-light-surface));\n }\n\n .ax-conversation-voice__fab {\n flex-shrink: 0;\n width: 2.25rem;\n height: 2.25rem;\n touch-action: manipulation;\n display: flex;\n align-items: center;\n justify-content: center;\n padding-inline-start: 0.12rem;\n border: none;\n border-radius: 50%;\n background: rgb(var(--ax-sys-color-primary-500));\n color: rgb(var(--ax-sys-color-on-primary-surface));\n font-size: 0.75rem;\n cursor: pointer;\n transition: background 0.15s ease;\n }\n\n @media (hover: hover) {\n .ax-conversation-voice__fab:hover {\n background: rgb(var(--ax-sys-color-primary-600));\n }\n }\n\n .ax-conversation-voice__fab:focus-visible {\n outline: 2px solid rgb(var(--ax-sys-color-primary-500));\n outline-offset: 2px;\n }\n\n .ax-conversation-voice__wave {\n flex: 1;\n min-width: 0;\n }\n\n .ax-conversation-voice__cols {\n display: flex;\n align-items: center;\n gap: 2px;\n height: 1.75rem;\n }\n\n .ax-conversation-voice__col {\n flex: 1;\n min-width: 2px;\n max-height: 100%;\n align-self: center;\n border-radius: 2px;\n background: rgb(var(--ax-sys-color-border-light-surface));\n transition: background 0.12s ease;\n }\n\n .ax-conversation-voice__col--on {\n background: rgb(var(--ax-sys-color-primary-500));\n }\n\n .ax-conversation-voice__side {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 0.125rem;\n flex-shrink: 0;\n }\n\n .ax-conversation-voice__speed {\n min-width: 2.5rem;\n height: 1.25rem;\n padding: 0 0.25rem;\n border: 1px solid rgb(var(--ax-sys-color-primary-500));\n border-radius: 999px;\n background: transparent;\n color: rgb(var(--ax-sys-color-primary-600));\n font-size: 0.6875rem;\n font-weight: 600;\n cursor: pointer;\n transition: background 0.15s ease;\n }\n\n .ax-conversation-voice__speed:hover {\n background: rgb(var(--ax-sys-color-primary-lightest-surface));\n }\n\n .ax-conversation-voice__time {\n font-size: 0.625rem;\n font-variant-numeric: tabular-nums;\n opacity: 0.72;\n color: rgb(var(--ax-sys-color-primary-600));\n }\n\n .ax-conversation-voice__el {\n display: none;\n }\n `,\n ],\n})\nexport class AXConversationVoiceRendererComponent extends AXConversationMessageRendererCopyHostComponent {\n private readonly fileTypes = inject(AXFileTypeRegistryService);\n private readonly translation = inject(AXTranslationService);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly destroyRef = inject(DestroyRef);\n private readonly infoBarService = inject(AXConversationInfoBarService, { optional: true });\n private readonly audioElementRef = viewChild<ElementRef<HTMLAudioElement>>('audioElement');\n\n private readonly _contentState = signal<AXConversationMessageRendererContentState>('ready');\n\n readonly message = input.required<AXConversationMessage>();\n readonly rendererState = computed(() => ({\n deliveryStatus: this.message().status,\n contentState: this._contentState(),\n }));\n\n readonly isPlaying = signal(false);\n readonly currentTime = signal(0);\n readonly duration = signal(0);\n readonly playbackSpeed = signal(1.0);\n\n private readonly speeds = [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2] as const;\n\n readonly payload = computed(() => this.message().payload as AXConversationVoicePayload);\n private readonly mediaReference = computed(() => ({\n url: this.payload().url,\n mediaId: this.payload().mediaId,\n mimeType: this.payload().mimeType,\n size: this.payload().size,\n }));\n private readonly resolvedUrl = createResolvedMediaUrlSignal(this.mediaReference);\n readonly voiceUrl = computed(() => pickDisplayMediaUrl(this.resolvedUrl(), this.payload().url));\n\n readonly waveformBars = computed(() => {\n const w = this.payload().waveform;\n return w?.length ? w : [...AX_CONVERSATION_FALLBACK_WAVEFORM];\n });\n\n readonly activeBarIndex = computed(() => {\n const dur = this.duration();\n const n = this.waveformBars().length;\n return dur > 0 ? Math.floor((this.currentTime() / dur) * n) : 0;\n });\n\n readonly timeLabel = computed(() => formatMediaDuration(this.isPlaying() ? this.currentTime() : this.duration()));\n\n readonly voiceLoadErrorLabel = computed(() =>\n this.translation.translateSync('@acorex:chat.renderer-state.could-not-load-voice'),\n );\n\n copy(): Promise<string> {\n return copyWithFileTypeFallback(this.message(), this.fileTypes, () => {\n const url = this.voiceUrl()?.trim();\n return mediaCopyText(undefined, 'Voice message', 'voice messages', 1, [url]);\n });\n }\n\n constructor() {\n super();\n bindMediaRendererContentState(this.message, this._contentState, () => this.voiceUrl());\n\n effect((onCleanup) => {\n const audioEl = this.audioElementRef()?.nativeElement;\n if (!audioEl || !isPlatformBrowser(this.platformId)) {\n return;\n }\n const onMeta = (): void => {\n this.duration.set(audioEl.duration);\n };\n audioEl.addEventListener('loadedmetadata', onMeta);\n onCleanup(() => audioEl.removeEventListener('loadedmetadata', onMeta));\n });\n\n this.destroyRef.onDestroy(() => {\n const messageId = this.message()?.id;\n if (!messageId || !this.infoBarService) {\n return;\n }\n this.infoBarService.hideMessageBanner(messageId);\n });\n }\n\n togglePlay(): void {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n const audioEl = this.audioElementRef()?.nativeElement;\n if (!audioEl) {\n return;\n }\n if (this.isPlaying()) {\n audioEl.pause();\n this.isPlaying.set(false);\n this.syncInfoBarBanner();\n } else {\n void audioEl.play();\n this.isPlaying.set(true);\n this.syncInfoBarBanner(true);\n }\n }\n\n cyclePlaybackSpeed(): void {\n const current = this.playbackSpeed();\n const i = this.speeds.findIndex((s) => s === current);\n const nextIndex = (i < 0 ? 2 : i + 1) % this.speeds.length;\n const next = this.speeds[nextIndex] ?? 1;\n this.playbackSpeed.set(next);\n const audioEl = this.audioElementRef()?.nativeElement;\n if (audioEl) {\n audioEl.playbackRate = next;\n this.syncInfoBarBanner();\n }\n }\n\n onTimeUpdate(): void {\n const audioEl = this.audioElementRef()?.nativeElement;\n if (audioEl) {\n this.currentTime.set(audioEl.currentTime);\n this.syncInfoBarBanner();\n }\n }\n\n onEnded(): void {\n this.isPlaying.set(false);\n this.currentTime.set(0);\n this.syncInfoBarBanner();\n }\n\n onError(): void {\n if (!reportMediaLoadError(this.message(), this._contentState)) {\n return;\n }\n this.isPlaying.set(false);\n this.infoBarService?.hideMessageBanner(this.message().id);\n }\n\n private pausePlayback(): void {\n const audioEl = this.audioElementRef()?.nativeElement;\n if (!audioEl) {\n this.isPlaying.set(false);\n return;\n }\n audioEl.pause();\n this.isPlaying.set(false);\n }\n\n private syncInfoBarBanner(forceOpen = false): void {\n if (!this.infoBarService) {\n return;\n }\n const message = this.message();\n const payload = this.payload();\n\n syncPlaybackInfoBarBanner(\n this.infoBarService,\n message,\n {\n title: 'Voice message',\n currentTime: this.currentTime(),\n duration: this.duration() || payload.duration || 0,\n isPlaying: this.isPlaying(),\n onTogglePlay: () => this.togglePlay(),\n onClose: () => this.pausePlayback(),\n playbackSpeed: this.playbackSpeed(),\n onCycleSpeed: () => this.cyclePlaybackSpeed(),\n showSpeedControl: true,\n },\n { forceOpen },\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;AA4BA;AACA,MAAM,iCAAiC,GAAsB;AAC3D,IAAA,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;CAC/E;AA8KK,MAAO,oCAAqC,SAAQ,8CAA8C,CAAA;IAkDtG,IAAI,GAAA;AACF,QAAA,OAAO,wBAAwB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE,MAAK;YACnE,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE;AACnC,YAAA,OAAO,aAAa,CAAC,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAC9E,QAAA,CAAC,CAAC;IACJ;AAEA,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AAzDQ,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,yBAAyB,CAAC;AAC7C,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAC1C,QAAA,I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AA,mBAAA,EAAA,uBAAA,EAAA,WAAA,EAAA,qBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FA0KxD,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBA5KhD,SAAS;+BACE,gCAAgC,EAAA,OAAA,EACjC,CAAC,YAAY,EAAE,2CAA2C,CAAC,EAAA,eAAA,EACnD,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,g9DAAA,CAAA,EAAA;uGA2H0E,cAAc,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { D as AXConversationAiResponderService, E as AXConversationApi, F as AXConversationBaseRegistry, G as AXConversationComposerActionRegistry, H as AXConversationComposerComponent, I as AXConversationComposerPopupComponent, o as AXConversationComposerService, J as AXConversationComposerTabRegistry, K as AXConversationContainerComponent, L as AXConversationContainerDirective, M as AXConversationDateUtilsService, N as AXConversationErrorHandlerService, O as AXConversationForwardMessageDialogComponent, P as AXConversationIndexedDbConversationApi, Q as AXConversationIndexedDbMessageAiApi, R as AXConversationIndexedDbMessageApi, S as AXConversationIndexedDbRealtimeApi, T as AXConversationIndexedDbStorage, U as AXConversationIndexedDbStores, V as AXConversationIndexedDbUserApi, W as AXConversationInfiniteScrollDirective, X as AXConversationInfoBarActionRegistry, Y as AXConversationInfoBarComponent, m as AXConversationInfoBarService, Z as AXConversationItemActionRegistry, _ as AXConversationMessageActionRegistry, $ as AXConversationMessageApi, a0 as AXConversationMessageListComponent, a1 as AXConversationMessageListNoActiveDefaultComponent, z as AXConversationMessageListService, a2 as AXConversationMessageRendererRegistry, e as AXConversationMessageUtilsService, a3 as AXConversationModule, a4 as AXConversationNewDialogComponent, a5 as AXConversationRealtimeApi, a6 as AXConversationRegistryService, A as AXConversationService, a7 as AXConversationSharedStorage, a8 as AXConversationSidebarComponent, a9 as AXConversationSidebarService, aa as AXConversationTabRegistry, ab as AXConversationUserApi, ac as AX_ALL_CONVERSATION_COMPOSER_TABS, ad as AX_ALL_CONVERSATION_MEDIA_PICKERS, ae as AX_CONVERSATION_AI_API_KEY, p as AX_CONVERSATION_AUDIO_CATALOG, af as AX_CONVERSATION_AUDIO_RENDERER, ag as AX_CONVERSATION_COMPOSER_AUDIO_ACTION, ah as AX_CONVERSATION_COMPOSER_EMOJI_ACTION, ai as AX_CONVERSATION_COMPOSER_EMOJI_TAB, aj as AX_CONVERSATION_COMPOSER_FILE_ACTION, ak as AX_CONVERSATION_COMPOSER_IMAGE_ACTION, al as AX_CONVERSATION_COMPOSER_LOCATION_ACTION, am as AX_CONVERSATION_COMPOSER_STICKER_TAB, an as AX_CONVERSATION_COMPOSER_VIDEO_ACTION, ao as AX_CONVERSATION_COMPOSER_VOICE_RECORDING_ACTION, ap as AX_CONVERSATION_CONFIG, aq as AX_CONVERSATION_CONNECTION_ERRORS, ar as AX_CONVERSATION_CONVERSATION_AVATAR_COMPONENT, as as AX_CONVERSATION_CURSOR_PREFIX, at as AX_CONVERSATION_DEFAULT_COMPOSER_ACTIONS, au as AX_CONVERSATION_DEFAULT_COMPOSER_TABS, av as AX_CONVERSATION_DEFAULT_CONVERSATION_ITEM_ACTIONS, aw as AX_CONVERSATION_DEFAULT_CONVERSATION_TABS, ax as AX_CONVERSATION_DEFAULT_INFO_BAR_ACTIONS, ay as AX_CONVERSATION_DEFAULT_MESSAGE_ACTIONS, az as AX_CONVERSATION_DEFAULT_MESSAGE_RENDERERS, aA as AX_CONVERSATION_ERRORS, aB as AX_CONVERSATION_ERROR_HANDLER_CONFIG, aC as AX_CONVERSATION_ERROR_MESSAGES, aD as AX_CONVERSATION_FALLBACK_RENDERER, q as AX_CONVERSATION_FILE_CATALOG, aE as AX_CONVERSATION_FILE_ERRORS, aF as AX_CONVERSATION_FILE_RENDERER, aG as AX_CONVERSATION_FILE_TYPES_READY, t as AX_CONVERSATION_IMAGE_CATALOG, aH as AX_CONVERSATION_IMAGE_RENDERER, aI as AX_CONVERSATION_INFO_BAR_ARCHIVE_ACTION, aJ as AX_CONVERSATION_INFO_BAR_BLOCK_ACTION, aK as AX_CONVERSATION_INFO_BAR_DELETE_ACTION, aL as AX_CONVERSATION_INFO_BAR_DIVIDER, aM as AX_CONVERSATION_INFO_BAR_MUTE_ACTION, aN as AX_CONVERSATION_INFO_BAR_SEARCH_ACTION, aO as AX_CONVERSATION_ITEM_BLOCK_ACTION, aP as AX_CONVERSATION_ITEM_DELETE_ACTION, aQ as AX_CONVERSATION_ITEM_DIVIDER, aR as AX_CONVERSATION_ITEM_MARK_READ_ACTION, aS as AX_CONVERSATION_ITEM_MUTE_ACTION, aT as AX_CONVERSATION_ITEM_PIN_ACTION, aU as AX_CONVERSATION_LOCATION_ERRORS, aV as AX_CONVERSATION_LOCATION_RENDERER, aW as AX_CONVERSATION_MESSAGE_CURSOR_PREFIX, aX as AX_CONVERSATION_MESSAGE_DELETE_ACTION, aY as AX_CONVERSATION_MESSAGE_EDIT_ACTION, aZ as AX_CONVERSATION_MESSAGE_ERRORS, a_ as AX_CONVERSATION_MESSAGE_FORWARD_ACTION, a$ as AX_CONVERSATION_MESSAGE_REPLY_ACTION, B as AX_CONVERSATION_MESSAGE_TYPE_FILE_TYPE, b0 as AX_CONVERSATION_REGISTRY_CONFIG, b1 as AX_CONVERSATION_STICKER_RENDERER, b2 as AX_CONVERSATION_SYSTEM_RENDERER, b3 as AX_CONVERSATION_TAB_ALL, b4 as AX_CONVERSATION_TAB_ARCHIVED, b5 as AX_CONVERSATION_TAB_BOT, b6 as AX_CONVERSATION_TAB_CHANNELS, b7 as AX_CONVERSATION_TAB_GROUPS, b8 as AX_CONVERSATION_TAB_PRIVATE, b9 as AX_CONVERSATION_TAB_UNREAD, ba as AX_CONVERSATION_TEXT_RENDERER, bb as AX_CONVERSATION_URL_ERRORS, bc as AX_CONVERSATION_USER_AVATAR_COMPONENT, bd as AX_CONVERSATION_USER_ERRORS, u as AX_CONVERSATION_VIDEO_CATALOG, be as AX_CONVERSATION_VIDEO_RENDERER, v as AX_CONVERSATION_VOICE_CATALOG, bf as AX_CONVERSATION_VOICE_RENDERER, bg as AX_DEFAULT_CONVERSATION_CONFIG, bh as applyConversationFilters, i as axConversationIndexedDbStorage, k as axConversationSharedStorage, l as copyWithFileTypeFallback, x as createResolvedMediaUrlSignal, bi as encodeConversationCursor, bj as encodeMessageCursor, bk as formatErrorMessage, bl as getConversationLastActivity, bm as getConversationMessagesNewestFirst, bn as getErrorMessage, bo as getSortedConversationsForInbox, bp as inferFileExtensionHintFromMessage, bq as isComposerTabEnabled, br as isGenericPrivateConversationTitle, bs as isMediaPickerEnabled, bt as mergeWithDefaults, bu as normalizeAllConversationMessageIndexes, n as normalizeImagePayload, bv as normalizeMessagePayload, bw as normalizeMessagePayloadAsync, bx as openWithFileType, by as paginateChatNewestFirst, bz as paginateChatOldestFirst, bA as parseChatCursor, y as pickDisplayMediaUrl, bB as provideConversation, bC as provideConversationComposerFileTypes, bD as provideConversationFileCatalog, j as registerChatMessage, bE as resolveConversationAvatarDisplay, bF as resolveConversationComposerTabs, bG as resolveConversationForViewer, bH as resolveConversationMediaPickers, C as resolveConversationMessageFileType, bI as resolveConversationTitleForViewer, d as resolveImageDisplayUrl, b as resolveParticipantProfile, bJ as resolvePrivatePeerParticipant, a as resolvePrivatePeerUserId, bK as resolveUserAvatarDisplay, bL as sanitizeInput, bM as shouldUseUserAvatarForConversation, bN as sortConversationMessageIds, w as toMediaItemUploaderReference, bO as unregisterChatMessage, bP as validateConversationId, bQ as validateEmail, bR as validateLatitude, bS as validateLongitude, bT as validateMessagePayload, bU as validateMessageText, bV as validateMessageType, bW as validateUrl, bX as validateUserId, bY as validateUserIds } from './acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs';
|
|
2
|
+
//# sourceMappingURL=acorex-components-conversation.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-components-conversation.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -43,11 +43,11 @@ class AXKBDComponent extends NXComponent {
|
|
|
43
43
|
}
|
|
44
44
|
#eff;
|
|
45
45
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXKBDComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
46
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: AXKBDComponent, isStandalone: true, selector: "ax-kbd", inputs: { look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: AXComponent, useExisting: AXKBDComponent }], queries: [{ propertyName: "kbdItem", predicate: AXKBDItemComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-kbd-item\"></ng-content>\n", styles: ["@layer properties;ax-kbd{display:flex;gap:calc(var(--spacing, .25rem) * 4);--tw-leading: var(--leading-normal, 1.5);line-height:var(--leading-normal, 1.5);-webkit-user-select:none;user-select:none}ax-kbd ax-kbd-item{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 1);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}ax-kbd ax-kbd-item .ax-kbd-text{--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400)}ax-kbd ax-kbd-item .ax-kbd-inner-text{display:flex;height:100%;align-items:center;gap:calc(var(--spacing, .25rem) * 1)}ax-kbd ax-kbd-item .ax-kbd-separator{display:inline-flex;align-items:center;align-self:center;font-size:11px;--tw-leading: 1;line-height:1;--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400);opacity:75%}ax-kbd ax-kbd-item kbd{display:flex;height:calc(var(--spacing, .25rem) * 5);min-width:calc(var(--spacing, .25rem) * 5);align-items:center;justify-content:center;border-radius:6px;padding-inline:calc(var(--spacing, .25rem) * 1);--tw-font-weight: var(--ax-sys-font-family);font-weight:var(--ax-sys-font-family)}ax-kbd ax-kbd-item kbd.ax-fill{border-style:var(--tw-border-style);border-width:1px;border-color:transparent;background-color:rgba(var(--ax-comp-kbd-item-bg-color,var(--ax-sys-color-surface)));color:rgba(var(--ax-sys-color-on-lightest-surface),.74)}ax-kbd ax-kbd-item kbd.ax-solid{border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-comp-kbd-item-border-color,var(--ax-sys-color-dark-surface)));background-color:rgba(var(--ax-comp-kbd-item-bg-color,var(--ax-sys-color-lightest-surface)));color:rgba(var(--ax-sys-color-on-lightest-surface),.74);--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}ax-kbd ax-kbd-item kbd.ax-blank{border-style:var(--tw-border-style);border-width:1px;border-color:transparent;background-color:transparent;color:rgba(var(--ax-sys-color-on-lightest-surface),.74)}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading: initial;--tw-font-weight: initial;--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
46
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: AXKBDComponent, isStandalone: true, selector: "ax-kbd", inputs: { look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: AXComponent, useExisting: AXKBDComponent }], queries: [{ propertyName: "kbdItem", predicate: AXKBDItemComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-kbd-item\"></ng-content>\n", styles: ["@layer properties;ax-kbd{display:flex;gap:calc(var(--spacing, .25rem) * 4);--tw-leading: var(--leading-normal, 1.5);line-height:var(--leading-normal, 1.5);-webkit-user-select:none;user-select:none}ax-kbd ax-kbd-item{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 1);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}ax-kbd ax-kbd-item .ax-kbd-text{font-size:var(--text-lg, 1.125rem);line-height:var(--tw-leading, var(--text-lg--line-height, calc(1.75 / 1.125)));--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400)}ax-kbd ax-kbd-item .ax-kbd-inner-text{display:flex;height:100%;align-items:center;gap:calc(var(--spacing, .25rem) * 1)}ax-kbd ax-kbd-item .ax-kbd-separator{display:inline-flex;align-items:center;align-self:center;font-size:11px;--tw-leading: 1;line-height:1;--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400);opacity:75%}ax-kbd ax-kbd-item kbd{display:flex;height:calc(var(--spacing, .25rem) * 5);min-width:calc(var(--spacing, .25rem) * 5);align-items:center;justify-content:center;border-radius:6px;padding-inline:calc(var(--spacing, .25rem) * 1);--tw-font-weight: var(--ax-sys-font-family);font-weight:var(--ax-sys-font-family)}ax-kbd ax-kbd-item kbd.ax-fill{border-style:var(--tw-border-style);border-width:1px;border-color:transparent;background-color:rgba(var(--ax-comp-kbd-item-bg-color,var(--ax-sys-color-surface)));color:rgba(var(--ax-sys-color-on-lightest-surface),.74)}ax-kbd ax-kbd-item kbd.ax-solid{border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-comp-kbd-item-border-color,var(--ax-sys-color-dark-surface)));background-color:rgba(var(--ax-comp-kbd-item-bg-color,var(--ax-sys-color-lightest-surface)));color:rgba(var(--ax-sys-color-on-lightest-surface),.74);--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}ax-kbd ax-kbd-item kbd.ax-blank{border-style:var(--tw-border-style);border-width:1px;border-color:transparent;background-color:transparent;color:rgba(var(--ax-sys-color-on-lightest-surface),.74)}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading: initial;--tw-font-weight: initial;--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
47
47
|
}
|
|
48
48
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXKBDComponent, decorators: [{
|
|
49
49
|
type: Component,
|
|
50
|
-
args: [{ selector: 'ax-kbd', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXKBDComponent }], template: "<ng-content select=\"ax-kbd-item\"></ng-content>\n", styles: ["@layer properties;ax-kbd{display:flex;gap:calc(var(--spacing, .25rem) * 4);--tw-leading: var(--leading-normal, 1.5);line-height:var(--leading-normal, 1.5);-webkit-user-select:none;user-select:none}ax-kbd ax-kbd-item{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 1);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}ax-kbd ax-kbd-item .ax-kbd-text{--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400)}ax-kbd ax-kbd-item .ax-kbd-inner-text{display:flex;height:100%;align-items:center;gap:calc(var(--spacing, .25rem) * 1)}ax-kbd ax-kbd-item .ax-kbd-separator{display:inline-flex;align-items:center;align-self:center;font-size:11px;--tw-leading: 1;line-height:1;--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400);opacity:75%}ax-kbd ax-kbd-item kbd{display:flex;height:calc(var(--spacing, .25rem) * 5);min-width:calc(var(--spacing, .25rem) * 5);align-items:center;justify-content:center;border-radius:6px;padding-inline:calc(var(--spacing, .25rem) * 1);--tw-font-weight: var(--ax-sys-font-family);font-weight:var(--ax-sys-font-family)}ax-kbd ax-kbd-item kbd.ax-fill{border-style:var(--tw-border-style);border-width:1px;border-color:transparent;background-color:rgba(var(--ax-comp-kbd-item-bg-color,var(--ax-sys-color-surface)));color:rgba(var(--ax-sys-color-on-lightest-surface),.74)}ax-kbd ax-kbd-item kbd.ax-solid{border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-comp-kbd-item-border-color,var(--ax-sys-color-dark-surface)));background-color:rgba(var(--ax-comp-kbd-item-bg-color,var(--ax-sys-color-lightest-surface)));color:rgba(var(--ax-sys-color-on-lightest-surface),.74);--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}ax-kbd ax-kbd-item kbd.ax-blank{border-style:var(--tw-border-style);border-width:1px;border-color:transparent;background-color:transparent;color:rgba(var(--ax-sys-color-on-lightest-surface),.74)}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading: initial;--tw-font-weight: initial;--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
|
|
50
|
+
args: [{ selector: 'ax-kbd', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXKBDComponent }], template: "<ng-content select=\"ax-kbd-item\"></ng-content>\n", styles: ["@layer properties;ax-kbd{display:flex;gap:calc(var(--spacing, .25rem) * 4);--tw-leading: var(--leading-normal, 1.5);line-height:var(--leading-normal, 1.5);-webkit-user-select:none;user-select:none}ax-kbd ax-kbd-item{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 1);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}ax-kbd ax-kbd-item .ax-kbd-text{font-size:var(--text-lg, 1.125rem);line-height:var(--tw-leading, var(--text-lg--line-height, calc(1.75 / 1.125)));--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400)}ax-kbd ax-kbd-item .ax-kbd-inner-text{display:flex;height:100%;align-items:center;gap:calc(var(--spacing, .25rem) * 1)}ax-kbd ax-kbd-item .ax-kbd-separator{display:inline-flex;align-items:center;align-self:center;font-size:11px;--tw-leading: 1;line-height:1;--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400);opacity:75%}ax-kbd ax-kbd-item kbd{display:flex;height:calc(var(--spacing, .25rem) * 5);min-width:calc(var(--spacing, .25rem) * 5);align-items:center;justify-content:center;border-radius:6px;padding-inline:calc(var(--spacing, .25rem) * 1);--tw-font-weight: var(--ax-sys-font-family);font-weight:var(--ax-sys-font-family)}ax-kbd ax-kbd-item kbd.ax-fill{border-style:var(--tw-border-style);border-width:1px;border-color:transparent;background-color:rgba(var(--ax-comp-kbd-item-bg-color,var(--ax-sys-color-surface)));color:rgba(var(--ax-sys-color-on-lightest-surface),.74)}ax-kbd ax-kbd-item kbd.ax-solid{border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-comp-kbd-item-border-color,var(--ax-sys-color-dark-surface)));background-color:rgba(var(--ax-comp-kbd-item-bg-color,var(--ax-sys-color-lightest-surface)));color:rgba(var(--ax-sys-color-on-lightest-surface),.74);--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}ax-kbd ax-kbd-item kbd.ax-blank{border-style:var(--tw-border-style);border-width:1px;border-color:transparent;background-color:transparent;color:rgba(var(--ax-sys-color-on-lightest-surface),.74)}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading: initial;--tw-font-weight: initial;--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
|
|
51
51
|
}], propDecorators: { kbdItem: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => AXKBDItemComponent), { ...{ descendants: true }, isSignal: true }] }], look: [{ type: i0.Input, args: [{ isSignal: true, alias: "look", required: false }] }] } });
|
|
52
52
|
|
|
53
53
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-kbd.mjs","sources":["../../../../packages/components/kbd/src/lib/kbd-item/kbd-item.component.ts","../../../../packages/components/kbd/src/lib/kbd-item/kbd-item.component.html","../../../../packages/components/kbd/src/lib/kbd.component.ts","../../../../packages/components/kbd/src/lib/kbd.component.html","../../../../packages/components/kbd/src/acorex-components-kbd.ts"],"sourcesContent":["import { AXComponent, NXComponent } from '@acorex/cdk/common';\nimport { ChangeDetectionStrategy, Component, computed, input, model, signal, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'ax-kbd-item',\n templateUrl: './kbd-item.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: AXComponent, useExisting: AXKBDItemComponent }],\n})\nexport class AXKBDItemComponent extends NXComponent {\n keys = input<string[] | string>();\n\n modifierKeys = signal(['ctrl', 'shift', 'alt', 'meta', 'esc', 'del', 'delete', 'win']);\n\n join = input<'split' | 'joined'>('joined');\n\n look = model<'fill' | 'solid' | 'blank'>('solid');\n\n lookClass = computed(() => `ax-${this.look()} ax-default`);\n\n /**\n * Capitalizes the first letter of the provided text.\n *\n * @param text Input text to transform\n * @returns The text with its first character uppercased\n */\n protected capitalizeFirstLetter(text: string) {\n return text.charAt(0).toUpperCase() + text.slice(1);\n }\n}\n","@let localKeys = keys();\n\n@if (typeof localKeys === 'string') {\n <kbd [class]=\"lookClass()\">\n @if (modifierKeys().includes(localKeys.toLocaleLowerCase())) {\n <span class=\"ax-kbd-text\"> {{ capitalizeFirstLetter(localKeys) }}</span>\n } @else {\n <span class=\"ax-kbd-text\"> {{ localKeys.toLocaleUpperCase() }}</span>\n }\n </kbd>\n} @else {\n @if (join() === 'split') {\n @for (key of localKeys; track $index) {\n <kbd [class]=\"lookClass()\">\n @if (modifierKeys().includes(key.toLocaleLowerCase())) {\n <span class=\"ax-kbd-text\"> {{ capitalizeFirstLetter(key) }}</span>\n } @else {\n <span class=\"ax-kbd-text\"> {{ key.toLocaleUpperCase() }}</span>\n }\n </kbd>\n @if (!$last) {\n <span class=\"ax-kbd-separator\">+</span>\n }\n }\n } @else {\n <kbd [class]=\"lookClass()\">\n <div class=\"ax-kbd-inner-text\">\n @for (key of localKeys; track $index) {\n @if (modifierKeys().includes(key.toLocaleLowerCase())) {\n <span class=\"ax-kbd-text\"> {{ capitalizeFirstLetter(key) }}</span>\n } @else {\n <span class=\"ax-kbd-text\"> {{ key.toLocaleUpperCase() }}</span>\n }\n @if (!$last) {\n <span class=\"ax-kbd-separator\">+</span>\n }\n }\n </div>\n </kbd>\n }\n}\n","import { AXComponent, NXComponent } from '@acorex/cdk/common';\nimport { ChangeDetectionStrategy, Component, contentChildren, effect, input, ViewEncapsulation } from '@angular/core';\nimport { AXKBDItemComponent } from './kbd-item/kbd-item.component';\n\n@Component({\n selector: 'ax-kbd',\n templateUrl: './kbd.component.html',\n styleUrls: ['./kbd.component.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: AXComponent, useExisting: AXKBDComponent }],\n})\nexport class AXKBDComponent extends NXComponent {\n private kbdItem = contentChildren(AXKBDItemComponent, { descendants: true });\n\n look = input<'fill' | 'solid' | 'blank'>(null);\n\n #eff = effect(() => {\n if (!this.look()) return;\n this.kbdItem().forEach((kbd) => {\n kbd.look.set(this.look());\n });\n });\n}\n","<ng-content select=\"ax-kbd-item\"></ng-content>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAUM,MAAO,kBAAmB,SAAQ,WAAW,CAAA;AAPnD,IAAA,WAAA,GAAA;;QAQE,IAAA,CAAA,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAqB;QAEjC,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,cAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAC;AAEtF,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAqB,QAAQ,2EAAC;AAE1C,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAA6B,OAAO,2EAAC;AAEjD,QAAA,IAAA,CAAA,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAA,GAAA,EAAM,IAAI,CAAC,IAAI,EAAE,CAAA,WAAA,CAAa,gFAAC;AAW3D,IAAA;AATC;;;;;AAKG;AACO,IAAA,qBAAqB,CAAC,IAAY,EAAA;AAC1C,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACrD;8GAnBW,kBAAkB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAlB,I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":["../../../../packages/components/kbd/src/lib/kbd-item/kbd-item.component.ts","../../../../packages/components/kbd/src/lib/kbd-item/kbd-item.component.html","../../../../packages/components/kbd/src/lib/kbd.component.ts","../../../../packages/components/kbd/src/lib/kbd.component.html","../../../../packages/components/kbd/src/acorex-components-kbd.ts"],"sourcesContent":["import { AXComponent, NXComponent } from '@acorex/cdk/common';\nimport { ChangeDetectionStrategy, Component, computed, input, model, signal, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'ax-kbd-item',\n templateUrl: './kbd-item.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: AXComponent, useExisting: AXKBDItemComponent }],\n})\nexport class AXKBDItemComponent extends NXComponent {\n keys = input<string[] | string>();\n\n modifierKeys = signal(['ctrl', 'shift', 'alt', 'meta', 'esc', 'del', 'delete', 'win']);\n\n join = input<'split' | 'joined'>('joined');\n\n look = model<'fill' | 'solid' | 'blank'>('solid');\n\n lookClass = computed(() => `ax-${this.look()} ax-default`);\n\n /**\n * Capitalizes the first letter of the provided text.\n *\n * @param text Input text to transform\n * @returns The text with its first character uppercased\n */\n protected capitalizeFirstLetter(text: string) {\n return text.charAt(0).toUpperCase() + text.slice(1);\n }\n}\n","@let localKeys = keys();\n\n@if (typeof localKeys === 'string') {\n <kbd [class]=\"lookClass()\">\n @if (modifierKeys().includes(localKeys.toLocaleLowerCase())) {\n <span class=\"ax-kbd-text\"> {{ capitalizeFirstLetter(localKeys) }}</span>\n } @else {\n <span class=\"ax-kbd-text\"> {{ localKeys.toLocaleUpperCase() }}</span>\n }\n </kbd>\n} @else {\n @if (join() === 'split') {\n @for (key of localKeys; track $index) {\n <kbd [class]=\"lookClass()\">\n @if (modifierKeys().includes(key.toLocaleLowerCase())) {\n <span class=\"ax-kbd-text\"> {{ capitalizeFirstLetter(key) }}</span>\n } @else {\n <span class=\"ax-kbd-text\"> {{ key.toLocaleUpperCase() }}</span>\n }\n </kbd>\n @if (!$last) {\n <span class=\"ax-kbd-separator\">+</span>\n }\n }\n } @else {\n <kbd [class]=\"lookClass()\">\n <div class=\"ax-kbd-inner-text\">\n @for (key of localKeys; track $index) {\n @if (modifierKeys().includes(key.toLocaleLowerCase())) {\n <span class=\"ax-kbd-text\"> {{ capitalizeFirstLetter(key) }}</span>\n } @else {\n <span class=\"ax-kbd-text\"> {{ key.toLocaleUpperCase() }}</span>\n }\n @if (!$last) {\n <span class=\"ax-kbd-separator\">+</span>\n }\n }\n </div>\n </kbd>\n }\n}\n","import { AXComponent, NXComponent } from '@acorex/cdk/common';\nimport { ChangeDetectionStrategy, Component, contentChildren, effect, input, ViewEncapsulation } from '@angular/core';\nimport { AXKBDItemComponent } from './kbd-item/kbd-item.component';\n\n@Component({\n selector: 'ax-kbd',\n templateUrl: './kbd.component.html',\n styleUrls: ['./kbd.component.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: AXComponent, useExisting: AXKBDComponent }],\n})\nexport class AXKBDComponent extends NXComponent {\n private kbdItem = contentChildren(AXKBDItemComponent, { descendants: true });\n\n look = input<'fill' | 'solid' | 'blank'>(null);\n\n #eff = effect(() => {\n if (!this.look()) return;\n this.kbdItem().forEach((kbd) => {\n kbd.look.set(this.look());\n });\n });\n}\n","<ng-content select=\"ax-kbd-item\"></ng-content>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAUM,MAAO,kBAAmB,SAAQ,WAAW,CAAA;AAPnD,IAAA,WAAA,GAAA;;QAQE,IAAA,CAAA,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAqB;QAEjC,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAA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,CAAA,MAAA,kBAAkB,CAAA,EAAA,EAAA,GAAE,EAAE,WAAW,EAAE,IAAI,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,IAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,MAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEb7E;;AAEG;;;;"}
|
|
@@ -826,8 +826,8 @@ class AXSchedulerPickerService {
|
|
|
826
826
|
* Uses lazy-loaded cron-parser library
|
|
827
827
|
*/
|
|
828
828
|
async toCronExpression(pattern) {
|
|
829
|
-
// Lazy load cron-parser if needed for validation
|
|
830
|
-
const {
|
|
829
|
+
// Lazy load cron-parser if needed for validation (v5+: CronExpressionParser.parse)
|
|
830
|
+
const { CronExpressionParser } = await import('cron-parser');
|
|
831
831
|
// Build cron expression based on pattern
|
|
832
832
|
const parts = ['*', '*', '*', '*', '*'];
|
|
833
833
|
switch (pattern.mode) {
|
|
@@ -867,7 +867,7 @@ class AXSchedulerPickerService {
|
|
|
867
867
|
const cronExpr = parts.join(' ');
|
|
868
868
|
// Validate the cron expression
|
|
869
869
|
try {
|
|
870
|
-
|
|
870
|
+
CronExpressionParser.parse(cronExpr);
|
|
871
871
|
return cronExpr;
|
|
872
872
|
}
|
|
873
873
|
catch {
|
|
@@ -881,15 +881,15 @@ class AXSchedulerPickerService {
|
|
|
881
881
|
*/
|
|
882
882
|
async fromCronExpression(cron) {
|
|
883
883
|
try {
|
|
884
|
-
const {
|
|
885
|
-
const parsed =
|
|
886
|
-
const fields = parsed
|
|
887
|
-
// Analyze cron fields to determine mode
|
|
888
|
-
const minutePattern = this.analyzeCronField(fields.minute);
|
|
889
|
-
const hourPattern = this.analyzeCronField(fields.hour);
|
|
890
|
-
const dayPattern = this.analyzeCronField(fields.dayOfMonth);
|
|
891
|
-
const monthPattern = this.analyzeCronField(fields.month);
|
|
892
|
-
const weekdayPattern = this.analyzeCronField(fields.dayOfWeek);
|
|
884
|
+
const { CronExpressionParser } = await import('cron-parser');
|
|
885
|
+
const parsed = CronExpressionParser.parse(cron);
|
|
886
|
+
const { fields } = parsed;
|
|
887
|
+
// Analyze cron fields to determine mode (v5 fields expose `.values`)
|
|
888
|
+
const minutePattern = this.analyzeCronField(this.cronFieldNumericValues(fields.minute.values));
|
|
889
|
+
const hourPattern = this.analyzeCronField(this.cronFieldNumericValues(fields.hour.values));
|
|
890
|
+
const dayPattern = this.analyzeCronField(this.cronFieldNumericValues(fields.dayOfMonth.values));
|
|
891
|
+
const monthPattern = this.analyzeCronField(this.cronFieldNumericValues(fields.month.values));
|
|
892
|
+
const weekdayPattern = this.analyzeCronField(this.cronFieldNumericValues(fields.dayOfWeek.values));
|
|
893
893
|
// Determine mode based on which fields have intervals/values
|
|
894
894
|
let mode = 'daily';
|
|
895
895
|
let interval = 1;
|
|
@@ -948,6 +948,10 @@ class AXSchedulerPickerService {
|
|
|
948
948
|
return null;
|
|
949
949
|
}
|
|
950
950
|
}
|
|
951
|
+
/** cron-parser v5 field values may include special chars (L, W, …); keep numbers only. */
|
|
952
|
+
cronFieldNumericValues(values) {
|
|
953
|
+
return values.filter((value) => typeof value === 'number');
|
|
954
|
+
}
|
|
951
955
|
/**
|
|
952
956
|
* Analyze a cron field to extract interval and values
|
|
953
957
|
*/
|
|
@@ -1056,7 +1060,9 @@ class AXSchedulerPickerService {
|
|
|
1056
1060
|
else if (pattern.recurrence.byDay && pattern.recurrence.byDay.length > 0) {
|
|
1057
1061
|
// e.g., "on day 15" or "on days 1, 15, 30"
|
|
1058
1062
|
const dayList = pattern.recurrence.byDay.join(', ');
|
|
1059
|
-
const onDayKey = pattern.recurrence.byDay.length > 1
|
|
1063
|
+
const onDayKey = pattern.recurrence.byDay.length > 1
|
|
1064
|
+
? '@acorex:schedulerPicker.naturalLanguage.onDaysPlural'
|
|
1065
|
+
: '@acorex:schedulerPicker.naturalLanguage.onDay';
|
|
1060
1066
|
const onDay = await this.translationService.translateAsync(onDayKey);
|
|
1061
1067
|
parts.push(`${onDay} ${dayList}`);
|
|
1062
1068
|
}
|
|
@@ -1081,7 +1087,9 @@ class AXSchedulerPickerService {
|
|
|
1081
1087
|
else if (pattern.recurrence.byDay && pattern.recurrence.byDay.length > 0) {
|
|
1082
1088
|
// e.g., "on day 15" or "on days 1, 15, 30"
|
|
1083
1089
|
const dayList = pattern.recurrence.byDay.join(', ');
|
|
1084
|
-
const onDayKey = pattern.recurrence.byDay.length > 1
|
|
1090
|
+
const onDayKey = pattern.recurrence.byDay.length > 1
|
|
1091
|
+
? '@acorex:schedulerPicker.naturalLanguage.onDaysPlural'
|
|
1092
|
+
: '@acorex:schedulerPicker.naturalLanguage.onDay';
|
|
1085
1093
|
const onDay = await this.translationService.translateAsync(onDayKey);
|
|
1086
1094
|
yearlyParts.push(`${onDay} ${dayList}`);
|
|
1087
1095
|
}
|