@acorex/components 21.0.1-next.2 → 21.0.1-next.20
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/accordion/index.d.ts +0 -1
- package/action-sheet/index.d.ts +91 -31
- package/button-group/index.d.ts +6 -4
- package/chips/index.d.ts +3 -8
- package/collapse/index.d.ts +4 -6
- package/command/index.d.ts +8 -1
- package/conversation2/README.md +71 -31
- package/conversation2/index.d.ts +36 -35
- package/data-table/index.d.ts +4 -253
- package/datetime-picker/index.d.ts +1 -1
- package/fesm2022/acorex-components-accordion.mjs +16 -21
- package/fesm2022/acorex-components-accordion.mjs.map +1 -1
- package/fesm2022/acorex-components-action-sheet.mjs +170 -52
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-alert.mjs +13 -13
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-aspect-ratio.mjs +3 -3
- package/fesm2022/acorex-components-aspect-ratio.mjs.map +1 -1
- package/fesm2022/acorex-components-audio-wave.mjs +11 -10
- package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
- package/fesm2022/acorex-components-autocomplete.mjs +7 -7
- package/fesm2022/acorex-components-autocomplete.mjs.map +1 -1
- package/fesm2022/acorex-components-avatar.mjs +12 -12
- package/fesm2022/acorex-components-avatar.mjs.map +1 -1
- package/fesm2022/acorex-components-badge.mjs +9 -9
- package/fesm2022/acorex-components-badge.mjs.map +1 -1
- package/fesm2022/acorex-components-bottom-navigation.mjs +11 -11
- package/fesm2022/acorex-components-bottom-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-breadcrumbs.mjs +11 -11
- package/fesm2022/acorex-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/acorex-components-button-group.mjs +23 -19
- package/fesm2022/acorex-components-button-group.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +18 -18
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs +17 -17
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-check-box.mjs +10 -10
- package/fesm2022/acorex-components-check-box.mjs.map +1 -1
- package/fesm2022/acorex-components-chips.mjs +12 -14
- package/fesm2022/acorex-components-chips.mjs.map +1 -1
- package/fesm2022/acorex-components-circular-progress.mjs +12 -10
- package/fesm2022/acorex-components-circular-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-code-editor.mjs +10 -10
- package/fesm2022/acorex-components-code-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-collapse.mjs +22 -19
- package/fesm2022/acorex-components-collapse.mjs.map +1 -1
- package/fesm2022/acorex-components-color-box.mjs +9 -9
- package/fesm2022/acorex-components-color-box.mjs.map +1 -1
- package/fesm2022/acorex-components-color-palette.mjs +30 -30
- package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2022/acorex-components-command.mjs +17 -11
- package/fesm2022/acorex-components-command.mjs.map +1 -1
- package/fesm2022/acorex-components-comment.mjs +32 -32
- package/fesm2022/acorex-components-comment.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +51 -51
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation2.mjs +309 -303
- package/fesm2022/acorex-components-conversation2.mjs.map +1 -1
- package/fesm2022/acorex-components-cron-job.mjs +46 -46
- package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
- package/fesm2022/acorex-components-data-list.mjs +3 -3
- package/fesm2022/acorex-components-data-list.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +33 -33
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +50 -486
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +9 -9
- package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-input.mjs +9 -9
- package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs +40 -38
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +43 -36
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +12 -12
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer-legacy.mjs +13 -13
- package/fesm2022/acorex-components-drawer-legacy.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +15 -16
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown-button.mjs +9 -9
- package/fesm2022/acorex-components-dropdown-button.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +24 -18
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-editor.mjs +11 -11
- package/fesm2022/acorex-components-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-file-explorer.mjs +25 -25
- package/fesm2022/acorex-components-file-explorer.mjs.map +1 -1
- package/fesm2022/acorex-components-flow-chart.mjs +16 -16
- package/fesm2022/acorex-components-flow-chart.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +32 -24
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-grid-layout-builder.mjs +12 -13
- package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-image-editor.mjs +44 -44
- package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-image.mjs +9 -9
- package/fesm2022/acorex-components-image.mjs.map +1 -1
- package/fesm2022/acorex-components-json-viewer.mjs +8 -8
- package/fesm2022/acorex-components-json-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-kanban.mjs +155 -13
- package/fesm2022/acorex-components-kanban.mjs.map +1 -1
- package/fesm2022/acorex-components-kbd.mjs +29 -11
- package/fesm2022/acorex-components-kbd.mjs.map +1 -1
- package/fesm2022/acorex-components-label.mjs +9 -9
- package/fesm2022/acorex-components-label.mjs.map +1 -1
- package/fesm2022/acorex-components-list.mjs +9 -9
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-loading-dialog.mjs +11 -11
- package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-loading.mjs +23 -23
- package/fesm2022/acorex-components-loading.mjs.map +1 -1
- package/fesm2022/acorex-components-map.mjs +14 -14
- package/fesm2022/acorex-components-map.mjs.map +1 -1
- package/fesm2022/acorex-components-media-viewer.mjs +72 -54
- package/fesm2022/acorex-components-media-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +21 -21
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/{acorex-components-modal-acorex-components-modal-Bmoz9DL5.mjs → acorex-components-modal-acorex-components-modal-BajlPo_n.mjs} +22 -22
- package/fesm2022/acorex-components-modal-acorex-components-modal-BajlPo_n.mjs.map +1 -0
- package/fesm2022/{acorex-components-modal-modal-content.component-CSJU1vRi.mjs → acorex-components-modal-modal-content.component-BVrBX4Qf.mjs} +9 -7
- package/fesm2022/acorex-components-modal-modal-content.component-BVrBX4Qf.mjs.map +1 -0
- package/fesm2022/acorex-components-modal.mjs +1 -1
- package/fesm2022/acorex-components-navbar.mjs +9 -9
- package/fesm2022/acorex-components-navbar.mjs.map +1 -1
- package/fesm2022/acorex-components-notification.mjs +28 -24
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box-legacy.mjs +9 -9
- package/fesm2022/acorex-components-number-box-legacy.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box.mjs +9 -9
- package/fesm2022/acorex-components-number-box.mjs.map +1 -1
- package/fesm2022/acorex-components-otp.mjs +9 -9
- package/fesm2022/acorex-components-otp.mjs.map +1 -1
- package/fesm2022/acorex-components-page.mjs +10 -10
- package/fesm2022/acorex-components-page.mjs.map +1 -1
- package/fesm2022/acorex-components-paint.mjs +34 -39
- package/fesm2022/acorex-components-paint.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +13 -13
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-pdf-reader.mjs +8 -8
- package/fesm2022/acorex-components-pdf-reader.mjs.map +1 -1
- package/fesm2022/acorex-components-phone-box.mjs +33 -40
- package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
- package/fesm2022/acorex-components-picker.mjs +19 -18
- package/fesm2022/acorex-components-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +27 -12
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +88 -101
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs +11 -9
- package/fesm2022/acorex-components-progress-bar.mjs.map +1 -1
- package/fesm2022/acorex-components-qrcode.mjs +9 -9
- package/fesm2022/acorex-components-qrcode.mjs.map +1 -1
- package/fesm2022/acorex-components-query-builder.mjs +8 -8
- package/fesm2022/acorex-components-query-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-radio.mjs +9 -9
- package/fesm2022/acorex-components-radio.mjs.map +1 -1
- package/fesm2022/acorex-components-rail-navigation.mjs +38 -36
- package/fesm2022/acorex-components-rail-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +10 -10
- package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-rate-picker.mjs +20 -35
- package/fesm2022/acorex-components-rate-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-rest-api-generator.mjs +22 -22
- package/fesm2022/acorex-components-rest-api-generator.mjs.map +1 -1
- package/fesm2022/acorex-components-result.mjs +8 -8
- package/fesm2022/acorex-components-result.mjs.map +1 -1
- package/fesm2022/acorex-components-routing-progress.mjs +8 -8
- package/fesm2022/acorex-components-routing-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-rrule.mjs +9 -9
- package/fesm2022/acorex-components-rrule.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler-picker.mjs +56 -56
- package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +1220 -161
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-scss.mjs +4 -4
- package/fesm2022/acorex-components-scss.mjs.map +1 -1
- package/fesm2022/acorex-components-search-box.mjs +16 -10
- package/fesm2022/acorex-components-search-box.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +11 -9
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list-2.mjs +11 -11
- package/fesm2022/acorex-components-selection-list-2.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +9 -9
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-side-menu.mjs +74 -25
- package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-skeleton.mjs +8 -8
- package/fesm2022/acorex-components-skeleton.mjs.map +1 -1
- package/fesm2022/acorex-components-slider.mjs +12 -12
- package/fesm2022/acorex-components-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-sliding-item.mjs +14 -14
- package/fesm2022/acorex-components-sliding-item.mjs.map +1 -1
- package/fesm2022/acorex-components-step-wizard.mjs +14 -14
- package/fesm2022/acorex-components-step-wizard.mjs.map +1 -1
- package/fesm2022/acorex-components-switch.mjs +14 -14
- package/fesm2022/acorex-components-switch.mjs.map +1 -1
- package/fesm2022/acorex-components-tabs.mjs +15 -15
- package/fesm2022/acorex-components-tabs.mjs.map +1 -1
- package/fesm2022/acorex-components-tag-box.mjs +9 -9
- package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
- package/fesm2022/acorex-components-tag.mjs +9 -9
- package/fesm2022/acorex-components-tag.mjs.map +1 -1
- package/fesm2022/acorex-components-text-area.mjs +9 -9
- package/fesm2022/acorex-components-text-area.mjs.map +1 -1
- package/fesm2022/acorex-components-text-box.mjs +12 -12
- package/fesm2022/acorex-components-text-box.mjs.map +1 -1
- package/fesm2022/acorex-components-time-duration.mjs +7 -7
- package/fesm2022/acorex-components-time-duration.mjs.map +1 -1
- package/fesm2022/acorex-components-time-line.mjs +12 -12
- package/fesm2022/acorex-components-time-line.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +12 -12
- package/fesm2022/acorex-components-toast.mjs.map +1 -1
- package/fesm2022/acorex-components-toolbar.mjs +8 -8
- package/fesm2022/acorex-components-toolbar.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +66 -65
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-components-tree-view-legacy.mjs +16 -12
- package/fesm2022/acorex-components-tree-view-legacy.mjs.map +1 -1
- package/fesm2022/acorex-components-tree-view.mjs +26 -11
- package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
- package/fesm2022/acorex-components-uploader.mjs +16 -16
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/fesm2022/acorex-components-video-player.mjs +8 -8
- package/fesm2022/acorex-components-video-player.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +42 -42
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/fesm2022/acorex-components.mjs.map +1 -1
- package/grid-layout-builder/index.d.ts +1 -2
- package/kanban/index.d.ts +61 -4
- package/kbd/index.d.ts +13 -7
- package/loading/index.d.ts +1 -1
- package/media-viewer/index.d.ts +2 -1
- package/package.json +7 -7
- package/paint/index.d.ts +1 -6
- package/phone-box/index.d.ts +1 -6
- package/popover/index.d.ts +6 -2
- package/popup/index.d.ts +37 -42
- package/rate-picker/index.d.ts +5 -15
- package/scheduler/index.d.ts +281 -27
- package/side-menu/index.d.ts +9 -2
- package/slider/index.d.ts +2 -2
- package/tooltip/index.d.ts +3 -7
- package/tree-view/index.d.ts +11 -0
- package/tree-view-legacy/index.d.ts +1 -0
- package/fesm2022/acorex-components-modal-acorex-components-modal-Bmoz9DL5.mjs.map +0 -1
- package/fesm2022/acorex-components-modal-modal-content.component-CSJU1vRi.mjs.map +0 -1
package/accordion/index.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ declare class AXAccordionGroupComponent {
|
|
|
10
10
|
activeIndex: _angular_core.ModelSignal<number | number[]>;
|
|
11
11
|
look: _angular_core.InputSignal<string>;
|
|
12
12
|
collapsedOnItemClick: _angular_core.InputSignal<boolean>;
|
|
13
|
-
private get __hostClass();
|
|
14
13
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXAccordionGroupComponent, never>;
|
|
15
14
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXAccordionGroupComponent, "ax-accordion-group", never, { "accordion": { "alias": "accordion"; "required": false; "isSignal": true; }; "activeIndex": { "alias": "activeIndex"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "collapsedOnItemClick": { "alias": "collapsedOnItemClick"; "required": false; "isSignal": true; }; }, { "activeIndex": "activeIndexChange"; }, ["content"], ["ax-accordion-item"], true, never>;
|
|
16
15
|
}
|
package/action-sheet/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef, Type, OnInit, AfterViewInit, OnDestroy } from '@angular/core';
|
|
1
3
|
import { AXStyleColorType, AXComponentCloseEvent, MXBaseComponent } from '@acorex/cdk/common';
|
|
2
4
|
import { AXOverlayRef } from '@acorex/cdk/overlay';
|
|
3
|
-
import
|
|
4
|
-
import { TemplateRef, Type, OnInit, OnDestroy, ComponentRef } from '@angular/core';
|
|
5
|
+
import { AXComponentInputs, AXComponentType } from '@acorex/core/components';
|
|
5
6
|
import * as rxjs from 'rxjs';
|
|
6
7
|
import { Subject } from 'rxjs';
|
|
7
8
|
|
|
@@ -27,13 +28,52 @@ interface AXActionSheetConfig {
|
|
|
27
28
|
subTitle?: string;
|
|
28
29
|
closeButton?: boolean;
|
|
29
30
|
header?: boolean;
|
|
31
|
+
/** @deprecated Use `inputs` instead to pass data to the action sheet content component. */
|
|
30
32
|
data?: unknown;
|
|
33
|
+
/** Input values to pass to the content component */
|
|
34
|
+
inputs?: unknown;
|
|
31
35
|
closeOnBackdropClick?: boolean;
|
|
32
36
|
items?: AXActionSheetItem[];
|
|
33
37
|
content?: AXActionSheetContentType;
|
|
34
38
|
draggable?: boolean;
|
|
35
39
|
dragUp?: boolean;
|
|
36
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Reference to an open action sheet, providing methods to interact with it.
|
|
43
|
+
*/
|
|
44
|
+
interface AXActionSheetRef<TResult = unknown> {
|
|
45
|
+
/** Closes the action sheet with optional result data */
|
|
46
|
+
close: (data?: TResult) => void;
|
|
47
|
+
/** Sets input values on the content component */
|
|
48
|
+
setInputs: (values: AXComponentInputs) => void;
|
|
49
|
+
/** Observable that emits when the action sheet is closed */
|
|
50
|
+
onClose: Subject<TResult>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Base class for components that are displayed inside an action sheet.
|
|
54
|
+
* Extend this class to get access to the action sheet reference and helper methods.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* @Component({...})
|
|
59
|
+
* export class MyActionSheetContent extends AXActionSheetComponentBase {
|
|
60
|
+
* save() {
|
|
61
|
+
* this.close({ saved: true });
|
|
62
|
+
* }
|
|
63
|
+
* }
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
declare abstract class AXActionSheetComponentBase {
|
|
67
|
+
/** Reference to the parent action sheet */
|
|
68
|
+
__actionSheet__: _angular_core.InputSignal<AXActionSheetRef<unknown>>;
|
|
69
|
+
/**
|
|
70
|
+
* Closes the action sheet with optional result data.
|
|
71
|
+
* @param data - Optional data to pass to the close handler
|
|
72
|
+
*/
|
|
73
|
+
close(data?: any): void;
|
|
74
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXActionSheetComponentBase, never>;
|
|
75
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXActionSheetComponentBase, never, never, { "__actionSheet__": { "alias": "__actionSheet__"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
76
|
+
}
|
|
37
77
|
interface AXActionSheetEvent {
|
|
38
78
|
overlayRef?: AXOverlayRef<unknown>;
|
|
39
79
|
nativeEvent?: Event;
|
|
@@ -56,13 +96,16 @@ interface AXActionSheetInternalRef {
|
|
|
56
96
|
*
|
|
57
97
|
* @category Components
|
|
58
98
|
*/
|
|
59
|
-
declare class AXActionSheetComponent extends MXBaseComponent implements OnInit, OnDestroy {
|
|
99
|
+
declare class AXActionSheetComponent extends MXBaseComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
60
100
|
/** Action sheet configuration data */
|
|
61
|
-
data:
|
|
101
|
+
data: _angular_core.InputSignal<AXActionSheetConfig>;
|
|
62
102
|
/** @internal Callback function to close the action sheet */
|
|
63
|
-
onClose:
|
|
103
|
+
onClose: _angular_core.InputSignal<(result?: AXComponentCloseEvent) => void>;
|
|
64
104
|
/** @internal Overlay reference for event tracking */
|
|
65
|
-
overlayRef:
|
|
105
|
+
overlayRef: _angular_core.InputSignal<AXOverlayRef<unknown>>;
|
|
106
|
+
/** @internal Reference to the action sheet for content components */
|
|
107
|
+
__actionSheetRef__: _angular_core.InputSignal<AXActionSheetRef<unknown>>;
|
|
108
|
+
private contentContainerRef;
|
|
66
109
|
private document;
|
|
67
110
|
private platformID;
|
|
68
111
|
private renderer;
|
|
@@ -82,28 +125,40 @@ declare class AXActionSheetComponent extends MXBaseComponent implements OnInit,
|
|
|
82
125
|
*/
|
|
83
126
|
private _componentRef;
|
|
84
127
|
/** Template content if data.content is a TemplateRef */
|
|
85
|
-
protected templateContent:
|
|
128
|
+
protected templateContent: _angular_core.Signal<TemplateRef<unknown>>;
|
|
86
129
|
/** Component content if data.content is a component Type */
|
|
87
|
-
protected componentContent:
|
|
130
|
+
protected componentContent: _angular_core.Signal<AXComponentType<unknown>>;
|
|
88
131
|
/** Template context for ngTemplateOutlet */
|
|
89
|
-
protected templateContext:
|
|
132
|
+
protected templateContext: _angular_core.Signal<{
|
|
90
133
|
$implicit: AXActionSheetConfig;
|
|
91
134
|
ref: AXActionSheetComponent;
|
|
92
135
|
}>;
|
|
136
|
+
/** Whether content has been rendered (for component content) */
|
|
137
|
+
protected isContentRendered: _angular_core.WritableSignal<boolean>;
|
|
93
138
|
/**
|
|
94
139
|
* @ignore
|
|
95
140
|
*/
|
|
96
141
|
ngOnInit(): void;
|
|
142
|
+
/**
|
|
143
|
+
* @ignore
|
|
144
|
+
*/
|
|
145
|
+
ngAfterViewInit(): void;
|
|
146
|
+
/**
|
|
147
|
+
* Renders the component content if provided.
|
|
148
|
+
* Uses ViewContainerRef to create the component and properly set inputs.
|
|
149
|
+
*/
|
|
150
|
+
private renderComponentContent;
|
|
151
|
+
/**
|
|
152
|
+
* Sets input values on the content component.
|
|
153
|
+
* @param values - Object containing input values to set
|
|
154
|
+
*/
|
|
155
|
+
setContentInputs(values: AXComponentInputs): void;
|
|
97
156
|
ngOnDestroy(): void;
|
|
98
157
|
protected handleMouseDown(e: MouseEvent): void;
|
|
99
158
|
protected handleTouchDown(e: TouchEvent): void;
|
|
100
159
|
private handleDown;
|
|
101
160
|
private snapToFinalPosition;
|
|
102
161
|
private heightCalculator;
|
|
103
|
-
/**
|
|
104
|
-
* Handles component attachment from ngComponentOutlet
|
|
105
|
-
*/
|
|
106
|
-
protected handleComponentCreated(componentRef: ComponentRef<unknown>): void;
|
|
107
162
|
/**
|
|
108
163
|
* Handles click events on action sheet items.
|
|
109
164
|
* This method is called when a user clicks on an action sheet item. It closes the action sheet
|
|
@@ -129,20 +184,24 @@ declare class AXActionSheetComponent extends MXBaseComponent implements OnInit,
|
|
|
129
184
|
* @ignore
|
|
130
185
|
*/
|
|
131
186
|
protected onKeydownHandler(): void;
|
|
132
|
-
static ɵfac:
|
|
133
|
-
static ɵcmp:
|
|
187
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXActionSheetComponent, never>;
|
|
188
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXActionSheetComponent, "ax-action-sheet", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "onClose": { "alias": "onClose"; "required": false; "isSignal": true; }; "overlayRef": { "alias": "overlayRef"; "required": false; "isSignal": true; }; "__actionSheetRef__": { "alias": "__actionSheetRef__"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
134
189
|
}
|
|
135
190
|
|
|
136
191
|
declare class AXActionSheetModule {
|
|
137
|
-
static ɵfac:
|
|
138
|
-
static ɵmod:
|
|
139
|
-
static ɵinj:
|
|
192
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXActionSheetModule, never>;
|
|
193
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXActionSheetModule, never, [typeof AXActionSheetComponent], [typeof AXActionSheetComponent]>;
|
|
194
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXActionSheetModule>;
|
|
140
195
|
}
|
|
141
196
|
|
|
142
|
-
|
|
143
|
-
|
|
197
|
+
/**
|
|
198
|
+
* @deprecated Use `AXActionSheetRef` instead
|
|
199
|
+
*/
|
|
200
|
+
interface AXActionSheetDialogRef<TResult = unknown> {
|
|
201
|
+
close: (e?: TResult) => void;
|
|
202
|
+
setInputs: (values: AXComponentInputs) => void;
|
|
144
203
|
closed: Subject<{
|
|
145
|
-
data?:
|
|
204
|
+
data?: TResult;
|
|
146
205
|
}>;
|
|
147
206
|
}
|
|
148
207
|
declare class AXActionSheetService {
|
|
@@ -160,23 +219,24 @@ declare class AXActionSheetService {
|
|
|
160
219
|
* @param isUserInteraction - Whether the action sheet is opened by user interaction (default: true).
|
|
161
220
|
* This affects how the action sheet handles accessibility and focus management.
|
|
162
221
|
* @returns A promise that resolves to a dialog reference containing methods to control the action sheet.
|
|
163
|
-
* The reference includes methods like close() and a closed observable for tracking dialog state.
|
|
222
|
+
* The reference includes methods like close(), setInputs() and a closed observable for tracking dialog state.
|
|
164
223
|
* @example
|
|
165
224
|
* ```typescript
|
|
166
225
|
* const dialogRef = await actionSheetService.open({
|
|
167
226
|
* title: 'Choose an option',
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
* { text: 'Option 2', value: 'opt2' }
|
|
171
|
-
* ]
|
|
227
|
+
* content: MyCustomComponent,
|
|
228
|
+
* inputs: { userId: 123, userName: 'John' }
|
|
172
229
|
* });
|
|
173
230
|
*
|
|
231
|
+
* // Update inputs dynamically
|
|
232
|
+
* dialogRef.setInputs({ userName: 'Jane' });
|
|
233
|
+
*
|
|
174
234
|
* dialogRef.closed.subscribe(result => {
|
|
175
235
|
* console.log('Action sheet closed with:', result.data);
|
|
176
236
|
* });
|
|
177
237
|
* ```
|
|
178
238
|
*/
|
|
179
|
-
open(config: AXActionSheetConfig, isUserInteraction?: boolean): Promise<
|
|
239
|
+
open<TResult = unknown>(config: AXActionSheetConfig, isUserInteraction?: boolean): Promise<AXActionSheetRef<TResult>>;
|
|
180
240
|
/**
|
|
181
241
|
* Sets the current state of action sheet events.
|
|
182
242
|
* This method is used internally to track action sheet lifecycle events such as open, close,
|
|
@@ -188,9 +248,9 @@ declare class AXActionSheetService {
|
|
|
188
248
|
* @returns void
|
|
189
249
|
*/
|
|
190
250
|
setActionSheetEventState(event: AXActionSheetEvent): void;
|
|
191
|
-
static ɵfac:
|
|
192
|
-
static ɵprov:
|
|
251
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXActionSheetService, never>;
|
|
252
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXActionSheetService>;
|
|
193
253
|
}
|
|
194
254
|
|
|
195
|
-
export { AXActionSheetComponent, AXActionSheetModule, AXActionSheetService };
|
|
196
|
-
export type { AXActionSheetConfig, AXActionSheetContentType, AXActionSheetDialogRef, AXActionSheetEvent, AXActionSheetInternalRef, AXActionSheetItem };
|
|
255
|
+
export { AXActionSheetComponent, AXActionSheetComponentBase, AXActionSheetModule, AXActionSheetService };
|
|
256
|
+
export type { AXActionSheetConfig, AXActionSheetContentType, AXActionSheetDialogRef, AXActionSheetEvent, AXActionSheetInternalRef, AXActionSheetItem, AXActionSheetRef };
|
package/button-group/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as polytype from 'polytype';
|
|
2
|
-
import { MXInteractiveComponent, MXColorLookComponent, AXClickEvent, AXSelectionMode, AXStyleColorType, MXColorComponent } from '@acorex/cdk/common';
|
|
3
1
|
import * as i0 from '@angular/core';
|
|
4
2
|
import { EventEmitter } from '@angular/core';
|
|
3
|
+
import * as polytype from 'polytype';
|
|
4
|
+
import { MXInteractiveComponent, MXColorLookComponent, AXClickEvent, AXSelectionMode, AXStyleColorType, MXColorComponent } from '@acorex/cdk/common';
|
|
5
5
|
|
|
6
6
|
declare const AXButtonGroupComponent_base: polytype.Polytype.ClusteredConstructor<[typeof MXInteractiveComponent, typeof MXColorLookComponent]>;
|
|
7
7
|
/**
|
|
@@ -12,6 +12,7 @@ declare const AXButtonGroupComponent_base: polytype.Polytype.ClusteredConstructo
|
|
|
12
12
|
declare class AXButtonGroupComponent extends AXButtonGroupComponent_base {
|
|
13
13
|
#private;
|
|
14
14
|
readonly fitParent: i0.InputSignal<boolean>;
|
|
15
|
+
readonly customClass: i0.InputSignal<string>;
|
|
15
16
|
/**
|
|
16
17
|
* Fires when any button in the group is clicked.
|
|
17
18
|
*
|
|
@@ -82,7 +83,7 @@ declare class AXButtonGroupComponent extends AXButtonGroupComponent_base {
|
|
|
82
83
|
*/
|
|
83
84
|
private __hostClick;
|
|
84
85
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXButtonGroupComponent, never>;
|
|
85
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AXButtonGroupComponent, "ax-button-group", never, { "disabled": { "alias": "disabled"; "required": false; }; "color": { "alias": "color"; "required": false; }; "look": { "alias": "look"; "required": false; }; "fitParent": { "alias": "fitParent"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; }; }, { "onBlur": "onBlur"; "onFocus": "onFocus"; "lookChange": "lookChange"; "colorChange": "colorChange"; "disabledChange": "disabledChange"; "onClick": "onClick"; "selectionChange": "selectionChange"; "selectedButtonChange": "selectedButtonChange"; }, ["_contentButtons"], ["ax-button-group-item"], true, never>;
|
|
86
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXButtonGroupComponent, "ax-button-group", never, { "disabled": { "alias": "disabled"; "required": false; }; "color": { "alias": "color"; "required": false; }; "look": { "alias": "look"; "required": false; }; "fitParent": { "alias": "fitParent"; "required": false; "isSignal": true; }; "customClass": { "alias": "class"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; }; }, { "onBlur": "onBlur"; "onFocus": "onFocus"; "lookChange": "lookChange"; "colorChange": "colorChange"; "disabledChange": "disabledChange"; "onClick": "onClick"; "selectionChange": "selectionChange"; "selectedButtonChange": "selectedButtonChange"; }, ["_contentButtons"], ["ax-button-group-item"], true, never>;
|
|
86
87
|
}
|
|
87
88
|
|
|
88
89
|
interface AXButtonItemListItem {
|
|
@@ -109,6 +110,7 @@ declare class AXButtonGroupItemComponent extends AXButtonGroupItemComponent_base
|
|
|
109
110
|
* @ignore
|
|
110
111
|
*/
|
|
111
112
|
private _selected;
|
|
113
|
+
readonly customClass: i0.ModelSignal<string>;
|
|
112
114
|
/**
|
|
113
115
|
* Indicates whether the button item is selected.
|
|
114
116
|
*
|
|
@@ -157,7 +159,7 @@ declare class AXButtonGroupItemComponent extends AXButtonGroupItemComponent_base
|
|
|
157
159
|
*/
|
|
158
160
|
tabindex: string;
|
|
159
161
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXButtonGroupItemComponent, never>;
|
|
160
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AXButtonGroupItemComponent, "ax-button-group-item", never, { "color": { "alias": "color"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "text": { "alias": "text"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "divided": { "alias": "divided"; "required": false; }; "data": { "alias": "data"; "required": false; }; "name": { "alias": "name"; "required": false; }; }, { "onClick": "onClick"; "onFocus": "onFocus"; "onBlur": "onBlur"; "disabledChange": "disabledChange"; }, never, ["*"], true, never>;
|
|
162
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXButtonGroupItemComponent, "ax-button-group-item", never, { "color": { "alias": "color"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "text": { "alias": "text"; "required": false; }; "customClass": { "alias": "class"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; }; "divided": { "alias": "divided"; "required": false; }; "data": { "alias": "data"; "required": false; }; "name": { "alias": "name"; "required": false; }; }, { "onClick": "onClick"; "onFocus": "onFocus"; "onBlur": "onBlur"; "disabledChange": "disabledChange"; "customClass": "classChange"; }, never, ["*"], true, never>;
|
|
161
163
|
}
|
|
162
164
|
|
|
163
165
|
declare class AXButtonGroupModule {
|
package/chips/index.d.ts
CHANGED
|
@@ -1,29 +1,25 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import * as i1 from '@acorex/cdk/common';
|
|
3
|
-
import {
|
|
3
|
+
import { MXColorLookComponent } from '@acorex/cdk/common';
|
|
4
4
|
|
|
5
|
-
type AXChipsLookType = Extract<AXStyleLookType, 'solid' | 'outline' | 'twotone'>;
|
|
6
|
-
type AXChipsSizeType = Exclude<AXStyleSizeType, 'ax-xs' | 'ax-xl'>;
|
|
7
5
|
/**
|
|
8
6
|
* A component for displaying and managing a set of chips.
|
|
9
7
|
*
|
|
10
8
|
* @category Components
|
|
11
9
|
*/
|
|
12
|
-
declare class AXChipsComponent extends
|
|
10
|
+
declare class AXChipsComponent extends MXColorLookComponent {
|
|
13
11
|
/**
|
|
14
12
|
* The text displayed on the chips.
|
|
15
13
|
*
|
|
16
14
|
* @defaultValue ''
|
|
17
15
|
*/
|
|
18
16
|
text: i0.ModelSignal<string>;
|
|
19
|
-
look: i0.ModelSignal<AXChipsLookType>;
|
|
20
|
-
size: i0.ModelSignal<AXChipsSizeType>;
|
|
21
17
|
/**
|
|
22
18
|
* @ignore
|
|
23
19
|
*/
|
|
24
20
|
private get __hostClass();
|
|
25
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXChipsComponent, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AXChipsComponent, "ax-chips", never, { "tabIndex": { "alias": "tabIndex"; "required": false; }; "color": { "alias": "color"; "required": false; }; "
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXChipsComponent, "ax-chips", never, { "tabIndex": { "alias": "tabIndex"; "required": false; }; "color": { "alias": "color"; "required": false; }; "look": { "alias": "look"; "required": false; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; }, { "text": "textChange"; }, never, ["ax-prefix", "ax-suffix"], true, [{ directive: typeof i1.AXRippleDirective; inputs: {}; outputs: {}; }]>;
|
|
27
23
|
}
|
|
28
24
|
|
|
29
25
|
declare class AXChipsModule {
|
|
@@ -33,4 +29,3 @@ declare class AXChipsModule {
|
|
|
33
29
|
}
|
|
34
30
|
|
|
35
31
|
export { AXChipsComponent, AXChipsModule };
|
|
36
|
-
export type { AXChipsLookType, AXChipsSizeType };
|
package/collapse/index.d.ts
CHANGED
|
@@ -5,9 +5,8 @@ import { AfterViewInit, OnDestroy, EventEmitter, TemplateRef } from '@angular/co
|
|
|
5
5
|
|
|
6
6
|
declare const AXCollapseGroupComponent_base: polytype.Polytype.ClusteredConstructor<[typeof MXBaseComponent, typeof MXLookComponent]>;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* @category Components
|
|
8
|
+
* @deprecated Use `accordion` instead.
|
|
9
|
+
* This component deprecated and no longer support.
|
|
11
10
|
*/
|
|
12
11
|
declare class AXCollapseGroupComponent extends AXCollapseGroupComponent_base implements AfterViewInit, OnDestroy {
|
|
13
12
|
/**
|
|
@@ -73,9 +72,8 @@ declare class AXCollapseClickEvent extends AXClickEvent {
|
|
|
73
72
|
}
|
|
74
73
|
declare const AXCollapseComponent_base: polytype.Polytype.ClusteredConstructor<[typeof MXInteractiveComponent, typeof MXLookComponent]>;
|
|
75
74
|
/**
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* @category Components
|
|
75
|
+
* @deprecated Use `accordion` instead.
|
|
76
|
+
* This component deprecated and no longer support.
|
|
79
77
|
*/
|
|
80
78
|
declare class AXCollapseComponent extends AXCollapseComponent_base {
|
|
81
79
|
private parent;
|
package/command/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as polytype from 'polytype';
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
|
+
import { TemplateRef } from '@angular/core';
|
|
3
4
|
import { AXEvent, MXInputBaseValueComponent, MXLookComponent, AXHtmlEvent, AXFocusEvent } from '@acorex/cdk/common';
|
|
4
5
|
import { AXListNavigationDirective, AXListNavigationItemDirective } from '@acorex/cdk/list-navigation';
|
|
5
6
|
import { AXSearchBoxComponent } from '@acorex/components/search-box';
|
|
@@ -38,6 +39,12 @@ declare class AXCommandComponent extends AXCommandComponent_base {
|
|
|
38
39
|
readonly onSearchBoxBlur: _angular_core.OutputEmitterRef<AXHtmlEvent<FocusEvent>>;
|
|
39
40
|
protected listNavigation: _angular_core.Signal<AXListNavigationDirective>;
|
|
40
41
|
private listNav;
|
|
42
|
+
/**
|
|
43
|
+
* The custom template used for rendering content.
|
|
44
|
+
*
|
|
45
|
+
* @param {TemplateRef<any>} customTemplate
|
|
46
|
+
*/
|
|
47
|
+
customTemplate: _angular_core.InputSignal<TemplateRef<any>>;
|
|
41
48
|
protected displayItems: _angular_core.Signal<CommandItem[]>;
|
|
42
49
|
protected focusHandler(e: AXFocusEvent): void;
|
|
43
50
|
protected blurHandler(e: AXFocusEvent): void;
|
|
@@ -48,7 +55,7 @@ declare class AXCommandComponent extends AXCommandComponent_base {
|
|
|
48
55
|
protected closeHandler(e: AXHtmlEvent<KeyboardEvent>): void;
|
|
49
56
|
protected activeHandler(l: AXListNavigationDirective, i: AXListNavigationItemDirective): void;
|
|
50
57
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommandComponent, never>;
|
|
51
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXCommandComponent, "ax-command", never, { "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "value": { "alias": "value"; "required": false; }; "state": { "alias": "state"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, { "onSubmit": "onSubmit"; "onEscape": "onEscape"; "onSearchBoxFocus": "onSearchBoxFocus"; "onSearchBoxBlur": "onSearchBoxBlur"; }, never, never, true, never>;
|
|
58
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXCommandComponent, "ax-command", never, { "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "value": { "alias": "value"; "required": false; }; "state": { "alias": "state"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "customTemplate": { "alias": "customTemplate"; "required": false; "isSignal": true; }; }, { "onSubmit": "onSubmit"; "onEscape": "onEscape"; "onSearchBoxFocus": "onSearchBoxFocus"; "onSearchBoxBlur": "onSearchBoxBlur"; }, never, never, true, never>;
|
|
52
59
|
}
|
|
53
60
|
|
|
54
61
|
declare class AXCommandModule {
|
package/conversation2/README.md
CHANGED
|
@@ -78,22 +78,32 @@ This package requires the following peer dependencies:
|
|
|
78
78
|
|
|
79
79
|
```typescript
|
|
80
80
|
import { ApplicationConfig } from '@angular/core';
|
|
81
|
-
import {
|
|
81
|
+
import {
|
|
82
|
+
provideConversation,
|
|
83
|
+
AXIndexedDBUserApi,
|
|
84
|
+
AXIndexedDBConversationApi,
|
|
85
|
+
AXIndexedDBMessageApi,
|
|
86
|
+
AXIndexedDBRealtimeApi,
|
|
87
|
+
} from '@acorex/components/conversation2';
|
|
82
88
|
|
|
83
89
|
export const appConfig: ApplicationConfig = {
|
|
84
90
|
providers: [
|
|
85
91
|
provideConversation({
|
|
86
|
-
|
|
92
|
+
userApi: AXIndexedDBUserApi,
|
|
93
|
+
conversationApi: AXIndexedDBConversationApi,
|
|
94
|
+
messageApi: AXIndexedDBMessageApi,
|
|
95
|
+
realtimeApi: AXIndexedDBRealtimeApi, // optional
|
|
87
96
|
config: {
|
|
88
|
-
|
|
89
|
-
|
|
97
|
+
messagePageSize: 50,
|
|
98
|
+
conversationPageSize: 30,
|
|
99
|
+
maxFileSize: 10 * 1024 * 1024,
|
|
90
100
|
allowedFileTypes: ['image/*', 'video/*', 'audio/*', 'application/pdf'],
|
|
91
101
|
},
|
|
92
102
|
registry: {
|
|
93
103
|
// Optional: Register custom message renderers, actions, etc.
|
|
94
|
-
}
|
|
95
|
-
})
|
|
96
|
-
]
|
|
104
|
+
},
|
|
105
|
+
}),
|
|
106
|
+
],
|
|
97
107
|
};
|
|
98
108
|
```
|
|
99
109
|
|
|
@@ -101,17 +111,26 @@ export const appConfig: ApplicationConfig = {
|
|
|
101
111
|
|
|
102
112
|
```typescript
|
|
103
113
|
import { NgModule } from '@angular/core';
|
|
104
|
-
import {
|
|
114
|
+
import {
|
|
115
|
+
AXConversation2Module,
|
|
116
|
+
AXIndexedDBUserApi,
|
|
117
|
+
AXIndexedDBConversationApi,
|
|
118
|
+
AXIndexedDBMessageApi,
|
|
119
|
+
AXIndexedDBRealtimeApi,
|
|
120
|
+
} from '@acorex/components/conversation2';
|
|
105
121
|
|
|
106
122
|
@NgModule({
|
|
107
123
|
imports: [
|
|
108
124
|
AXConversation2Module.forRoot({
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
125
|
+
userApi: AXIndexedDBUserApi,
|
|
126
|
+
conversationApi: AXIndexedDBConversationApi,
|
|
127
|
+
messageApi: AXIndexedDBMessageApi,
|
|
128
|
+
realtimeApi: AXIndexedDBRealtimeApi,
|
|
129
|
+
config: { /* ... */ },
|
|
130
|
+
}),
|
|
131
|
+
],
|
|
113
132
|
})
|
|
114
|
-
export class AppModule {
|
|
133
|
+
export class AppModule {}
|
|
115
134
|
```
|
|
116
135
|
|
|
117
136
|
### 3. Use in Template
|
|
@@ -155,20 +174,42 @@ export class MyConversationApi extends AXConversationApi {
|
|
|
155
174
|
#### IndexedDB API (Development/Demo)
|
|
156
175
|
|
|
157
176
|
```typescript
|
|
158
|
-
import {
|
|
177
|
+
import {
|
|
178
|
+
provideConversation,
|
|
179
|
+
AXIndexedDBUserApi,
|
|
180
|
+
AXIndexedDBConversationApi,
|
|
181
|
+
AXIndexedDBMessageApi,
|
|
182
|
+
AXIndexedDBRealtimeApi,
|
|
183
|
+
} from '@acorex/components/conversation2';
|
|
159
184
|
|
|
160
185
|
// Provides in-memory storage with sample data
|
|
161
186
|
// Perfect for development and demos
|
|
162
|
-
provideConversation({
|
|
187
|
+
provideConversation({
|
|
188
|
+
userApi: AXIndexedDBUserApi,
|
|
189
|
+
conversationApi: AXIndexedDBConversationApi,
|
|
190
|
+
messageApi: AXIndexedDBMessageApi,
|
|
191
|
+
realtimeApi: AXIndexedDBRealtimeApi,
|
|
192
|
+
});
|
|
163
193
|
```
|
|
164
194
|
|
|
165
195
|
#### IndexedDB with AI API (AI-Powered Demo)
|
|
166
196
|
|
|
167
197
|
```typescript
|
|
168
|
-
import {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
198
|
+
import {
|
|
199
|
+
provideConversation,
|
|
200
|
+
AXIndexedDBUserApi,
|
|
201
|
+
AXIndexedDBConversationApi,
|
|
202
|
+
AXIndexedDBMessageAIApi,
|
|
203
|
+
AXIndexedDBRealtimeApi,
|
|
204
|
+
} from '@acorex/components/conversation2';
|
|
205
|
+
|
|
206
|
+
// Includes AI-powered auto-responses via message API
|
|
207
|
+
provideConversation({
|
|
208
|
+
userApi: AXIndexedDBUserApi,
|
|
209
|
+
conversationApi: AXIndexedDBConversationApi,
|
|
210
|
+
messageApi: AXIndexedDBMessageAIApi,
|
|
211
|
+
realtimeApi: AXIndexedDBRealtimeApi,
|
|
212
|
+
});
|
|
172
213
|
```
|
|
173
214
|
|
|
174
215
|
## ⚙️ Configuration
|
|
@@ -178,23 +219,18 @@ provideConversation({ api: AXIndexedDBAIApi })
|
|
|
178
219
|
```typescript
|
|
179
220
|
interface AXConversationConfig {
|
|
180
221
|
// Pagination
|
|
181
|
-
|
|
222
|
+
messagePageSize?: number; // Default: 50
|
|
223
|
+
conversationPageSize?: number; // Default: 30
|
|
182
224
|
infiniteScrollThreshold?: number; // Default: 200px
|
|
183
225
|
scrollThreshold?: number; // Default: 100px
|
|
184
226
|
|
|
185
227
|
// File Upload
|
|
186
228
|
maxFileSize?: number; // Default: 10MB
|
|
187
|
-
allowedFileTypes?: string[]; // Default:
|
|
229
|
+
allowedFileTypes?: string[]; // Default: see defaults
|
|
188
230
|
|
|
189
231
|
// UI Behavior
|
|
190
232
|
messageHighlightDuration?: number; // Default: 2000ms
|
|
191
233
|
typingIndicatorTimeout?: number; // Default: 3000ms
|
|
192
|
-
|
|
193
|
-
// Features
|
|
194
|
-
enableReactions?: boolean; // Default: true
|
|
195
|
-
enableReplies?: boolean; // Default: true
|
|
196
|
-
enableEditing?: boolean; // Default: true
|
|
197
|
-
enableDeletion?: boolean; // Default: true
|
|
198
234
|
}
|
|
199
235
|
```
|
|
200
236
|
|
|
@@ -327,14 +363,18 @@ export class MyComponent {
|
|
|
327
363
|
```typescript
|
|
328
364
|
import { TestBed } from '@angular/core/testing';
|
|
329
365
|
import { provideConversation, AXConversationService } from '@acorex/components/conversation2';
|
|
330
|
-
import { MockConversationApi } from './mocks/mock-
|
|
366
|
+
import { MockUserApi, MockConversationApi, MockMessageApi } from './mocks/mock-apis';
|
|
331
367
|
|
|
332
368
|
describe('MyComponent', () => {
|
|
333
369
|
beforeEach(() => {
|
|
334
370
|
TestBed.configureTestingModule({
|
|
335
371
|
providers: [
|
|
336
|
-
provideConversation({
|
|
337
|
-
|
|
372
|
+
provideConversation({
|
|
373
|
+
userApi: MockUserApi,
|
|
374
|
+
conversationApi: MockConversationApi,
|
|
375
|
+
messageApi: MockMessageApi,
|
|
376
|
+
}),
|
|
377
|
+
],
|
|
338
378
|
});
|
|
339
379
|
});
|
|
340
380
|
|
|
@@ -343,7 +383,7 @@ describe('MyComponent', () => {
|
|
|
343
383
|
const message = await service.sendMessage({
|
|
344
384
|
conversationId: 'test',
|
|
345
385
|
type: 'text',
|
|
346
|
-
payload: { text: 'Test' }
|
|
386
|
+
payload: { text: 'Test' },
|
|
347
387
|
});
|
|
348
388
|
expect(message).toBeDefined();
|
|
349
389
|
});
|