@acorex/components 20.8.33 → 20.9.1
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/badge/index.d.ts +2 -4
- package/{conversation2 → conversation}/README.md +23 -23
- package/{conversation2 → conversation}/index.d.ts +1848 -1469
- package/fesm2022/acorex-components-badge.mjs +17 -12
- package/fesm2022/acorex-components-badge.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-CYutyq7i.mjs +101 -0
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-CYutyq7i.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-open-composer-picker-for-files-BLInQalk.mjs +223 -0
- package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-BLInQalk.mjs.map +1 -0
- package/fesm2022/{acorex-components-conversation2.mjs → acorex-components-conversation.mjs} +20329 -20223
- package/fesm2022/acorex-components-conversation.mjs.map +1 -0
- package/fesm2022/acorex-components-file-viewer.mjs +736 -0
- package/fesm2022/acorex-components-file-viewer.mjs.map +1 -0
- package/fesm2022/acorex-components-scheduler-picker.mjs +22 -14
- package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -1
- package/file-viewer/index.d.ts +178 -0
- package/package.json +30 -25
- package/scheduler-picker/index.d.ts +2 -0
- package/fesm2022/acorex-components-conversation2.mjs.map +0 -1
package/badge/index.d.ts
CHANGED
|
@@ -8,10 +8,8 @@ declare class AXBadgeComponent extends MXColorLookComponent {
|
|
|
8
8
|
* @defaultValue ''
|
|
9
9
|
*/
|
|
10
10
|
text: i0.InputSignal<string>;
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
*/
|
|
14
|
-
private get __hostClass();
|
|
11
|
+
/** @ignore */
|
|
12
|
+
get hostClass(): string;
|
|
15
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXBadgeComponent, never>;
|
|
16
14
|
static ɵcmp: i0.ɵɵComponentDeclaration<AXBadgeComponent, "ax-badge", never, { "color": { "alias": "color"; "required": false; }; "look": { "alias": "look"; "required": false; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; }, {}, never, ["ax-prefix", "ax-suffix"], true, never>;
|
|
17
15
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @acorex/components/
|
|
1
|
+
# @acorex/components/conversation
|
|
2
2
|
|
|
3
3
|
A modern, fully-featured conversation/chat component for Angular 18+. Built with signals, standalone components, and extensibility in mind.
|
|
4
4
|
|
|
@@ -19,7 +19,7 @@ A modern, fully-featured conversation/chat component for Angular 18+. Built with
|
|
|
19
19
|
## 📦 Installation
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
npm install @acorex/components/
|
|
22
|
+
npm install @acorex/components/conversation
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
## 🔧 Peer Dependencies
|
|
@@ -70,7 +70,7 @@ This package requires the following peer dependencies:
|
|
|
70
70
|
|
|
71
71
|
## 🎯 Quick Start
|
|
72
72
|
|
|
73
|
-
> **New to
|
|
73
|
+
> **New to conversation?** Check out our [5-Minute Quick Start Guide](./docs/QUICK-START.md) for the fastest way to get started!
|
|
74
74
|
|
|
75
75
|
### Detailed Setup
|
|
76
76
|
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
AXIndexedDBConversationApi,
|
|
85
85
|
AXIndexedDBMessageApi,
|
|
86
86
|
AXIndexedDBRealtimeApi,
|
|
87
|
-
} from '@acorex/components/
|
|
87
|
+
} from '@acorex/components/conversation';
|
|
88
88
|
|
|
89
89
|
export const appConfig: ApplicationConfig = {
|
|
90
90
|
providers: [
|
|
@@ -111,16 +111,16 @@ export const appConfig: ApplicationConfig = {
|
|
|
111
111
|
```typescript
|
|
112
112
|
import { NgModule } from '@angular/core';
|
|
113
113
|
import {
|
|
114
|
-
|
|
114
|
+
AXConversationModule,
|
|
115
115
|
AXIndexedDBUserApi,
|
|
116
116
|
AXIndexedDBConversationApi,
|
|
117
117
|
AXIndexedDBMessageApi,
|
|
118
118
|
AXIndexedDBRealtimeApi,
|
|
119
|
-
} from '@acorex/components/
|
|
119
|
+
} from '@acorex/components/conversation';
|
|
120
120
|
|
|
121
121
|
@NgModule({
|
|
122
122
|
imports: [
|
|
123
|
-
|
|
123
|
+
AXConversationModule.forRoot({
|
|
124
124
|
userApi: AXIndexedDBUserApi,
|
|
125
125
|
conversationApi: AXIndexedDBConversationApi,
|
|
126
126
|
messageApi: AXIndexedDBMessageApi,
|
|
@@ -145,7 +145,7 @@ You must provide an API implementation that extends `AXConversationApi`:
|
|
|
145
145
|
```typescript
|
|
146
146
|
import { Injectable } from '@angular/core';
|
|
147
147
|
import { HttpClient } from '@angular/common/http';
|
|
148
|
-
import { AXConversationApi,
|
|
148
|
+
import { AXConversationApi, AXConversationPagination, AXConversationPaginatedResult } from '@acorex/components/conversation';
|
|
149
149
|
|
|
150
150
|
@Injectable()
|
|
151
151
|
export class MyConversationApi extends AXConversationApi {
|
|
@@ -157,7 +157,7 @@ export class MyConversationApi extends AXConversationApi {
|
|
|
157
157
|
// Initialize WebSocket connection
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
async fetchConversations(pagination:
|
|
160
|
+
async fetchConversations(pagination: AXConversationPagination): Promise<AXConversationPaginatedResult<AXConversation>> {
|
|
161
161
|
const response = await this.http.get('/api/conversations', {
|
|
162
162
|
params: { page: pagination.page, pageSize: pagination.pageSize }
|
|
163
163
|
}).toPromise();
|
|
@@ -179,7 +179,7 @@ import {
|
|
|
179
179
|
AXIndexedDBConversationApi,
|
|
180
180
|
AXIndexedDBMessageApi,
|
|
181
181
|
AXIndexedDBRealtimeApi,
|
|
182
|
-
} from '@acorex/components/
|
|
182
|
+
} from '@acorex/components/conversation';
|
|
183
183
|
|
|
184
184
|
// Provides in-memory storage with sample data
|
|
185
185
|
// Perfect for development and demos
|
|
@@ -202,7 +202,7 @@ import {
|
|
|
202
202
|
AXIndexedDBConversationApi,
|
|
203
203
|
AXIndexedDBMessageAIApi,
|
|
204
204
|
AXIndexedDBRealtimeApi,
|
|
205
|
-
} from '@acorex/components/
|
|
205
|
+
} from '@acorex/components/conversation';
|
|
206
206
|
|
|
207
207
|
// Includes AI-powered auto-responses via message API
|
|
208
208
|
provideConversation({
|
|
@@ -234,13 +234,13 @@ interface AXConversationConfig {
|
|
|
234
234
|
### Registry Configuration
|
|
235
235
|
|
|
236
236
|
```typescript
|
|
237
|
-
interface
|
|
238
|
-
messageRenderers?:
|
|
239
|
-
messageActions?:
|
|
240
|
-
composerActions?:
|
|
241
|
-
composerTabs?:
|
|
237
|
+
interface AXConversationRegistryConfiguration {
|
|
238
|
+
messageRenderers?: AXConversationMessageRenderer[];
|
|
239
|
+
messageActions?: AXConversationMessageAction[];
|
|
240
|
+
composerActions?: AXConversationComposerAction[];
|
|
241
|
+
composerTabs?: AXConversationComposerTab[];
|
|
242
242
|
conversationTabs?: AXConversationTab[];
|
|
243
|
-
infoBarActions?:
|
|
243
|
+
infoBarActions?: AXConversationInfoBarAction[];
|
|
244
244
|
conversationItemActions?: AXConversationItemAction[];
|
|
245
245
|
}
|
|
246
246
|
```
|
|
@@ -251,17 +251,17 @@ interface AXRegistryConfiguration {
|
|
|
251
251
|
|
|
252
252
|
```typescript
|
|
253
253
|
import { Component, input } from '@angular/core';
|
|
254
|
-
import {
|
|
254
|
+
import { AXConversationMessageRenderer } from '@acorex/components/conversation';
|
|
255
255
|
|
|
256
256
|
@Component({
|
|
257
257
|
selector: 'my-custom-renderer',
|
|
258
258
|
template: `<div>{{ message().payload.customData }}</div>`
|
|
259
259
|
})
|
|
260
260
|
export class MyCustomRendererComponent {
|
|
261
|
-
message = input.required<
|
|
261
|
+
message = input.required<AXConversationMessage>();
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
const myRenderer:
|
|
264
|
+
const myRenderer: AXConversationMessageRenderer = {
|
|
265
265
|
type: 'custom',
|
|
266
266
|
component: MyCustomRendererComponent,
|
|
267
267
|
priority: 100
|
|
@@ -279,7 +279,7 @@ provideConversation({
|
|
|
279
279
|
### Custom Message Action
|
|
280
280
|
|
|
281
281
|
```typescript
|
|
282
|
-
const forwardAction:
|
|
282
|
+
const forwardAction: AXConversationMessageAction = {
|
|
283
283
|
id: 'forward',
|
|
284
284
|
label: 'Forward',
|
|
285
285
|
icon: 'forward',
|
|
@@ -333,7 +333,7 @@ Main service for conversation operations:
|
|
|
333
333
|
|
|
334
334
|
```typescript
|
|
335
335
|
import { inject } from '@angular/core';
|
|
336
|
-
import { AXConversationService } from '@acorex/components/
|
|
336
|
+
import { AXConversationService } from '@acorex/components/conversation';
|
|
337
337
|
|
|
338
338
|
export class MyComponent {
|
|
339
339
|
private conversationService = inject(AXConversationService);
|
|
@@ -359,7 +359,7 @@ export class MyComponent {
|
|
|
359
359
|
|
|
360
360
|
```typescript
|
|
361
361
|
import { TestBed } from '@angular/core/testing';
|
|
362
|
-
import { provideConversation, AXConversationService } from '@acorex/components/
|
|
362
|
+
import { provideConversation, AXConversationService } from '@acorex/components/conversation';
|
|
363
363
|
import { MockUserApi, MockConversationApi, MockMessageApi } from './mocks/mock-apis';
|
|
364
364
|
|
|
365
365
|
describe('MyComponent', () => {
|