@acorex/components 20.7.32 → 20.7.34

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.
@@ -1,13 +1,19 @@
1
1
  import * as polytype from 'polytype';
2
- import * as i0 from '@angular/core';
2
+ import * as _angular_core from '@angular/core';
3
3
  import { TemplateRef, EventEmitter, AfterViewInit } from '@angular/core';
4
- import { MXBaseComponent, AXItemClickEvent, AXRangeChangedEvent, MXValueComponent, AXRange, MXInteractiveComponent, AXClickEvent, MXComponentOptionChanged } from '@acorex/cdk/common';
4
+ import { MXBaseComponent, AXItemClickEvent, AXRangeChangedEvent, MXValueComponent, AXRange, MXInteractiveComponent, AXValueChangedEvent, AXClickEvent, MXComponentOptionChanged } from '@acorex/cdk/common';
5
5
  import { AXCalendarService, AXDateTimeRange, AXDateTime } from '@acorex/core/date-time';
6
6
  import { AXLocaleService } from '@acorex/core/locale';
7
7
  import { AXTranslationService } from '@acorex/core/translation';
8
8
 
9
9
  type AXCalendarViewType = 'year' | 'month' | 'day';
10
10
  type AXCalendarViewDepth = AXCalendarViewType;
11
+ /**
12
+ * Controls how month and year are chosen in the day view header.
13
+ * - `classic`: tap year/month labels to open month/year picker panels.
14
+ * - `select`: month/year dropdowns with prev/next arrows on the edges.
15
+ */
16
+ type AXCalendarNavigationLookType = 'classic' | 'select';
11
17
  type AXCalendarDisabledDates = Date[] | ((date: Date) => boolean);
12
18
  type AXCalendarHolidayDates = Date[] | ((date: Date) => boolean);
13
19
  type AXCalendarCellCssClass = string | {
@@ -91,21 +97,25 @@ declare class MXCalendarBaseComponent extends MXBaseComponent {
91
97
  get holidayDates(): AXCalendarHolidayDates;
92
98
  set holidayDates(v: AXCalendarHolidayDates);
93
99
  render(): void;
94
- static ɵfac: i0.ɵɵFactoryDeclaration<MXCalendarBaseComponent, never>;
95
- static ɵprov: i0.ɵɵInjectableDeclaration<MXCalendarBaseComponent>;
100
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MXCalendarBaseComponent, never>;
101
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<MXCalendarBaseComponent>;
96
102
  }
97
103
  declare const CALENDAR_INPUTS: string[];
98
104
  declare const CALENDAR_OUTPUTS: string[];
99
105
 
100
106
  declare const AXCalendarRangeComponent_base: polytype.Polytype.ClusteredConstructor<[{
101
107
  new (): MXValueComponent<AXRange<Date>>;
102
- ɵfac: i0.ɵɵFactoryDeclaration<MXValueComponent<any>, never>;
103
- ɵprov: i0.ɵɵInjectableDeclaration<MXValueComponent<any>>;
108
+ ɵfac: _angular_core.ɵɵFactoryDeclaration<MXValueComponent<any>, never>;
109
+ ɵprov: _angular_core.ɵɵInjectableDeclaration<MXValueComponent<any>>;
104
110
  }, typeof MXInteractiveComponent, typeof MXCalendarBaseComponent]>;
105
111
  declare class AXCalendarRangeComponent extends AXCalendarRangeComponent_base implements AfterViewInit {
106
112
  private formatService;
107
113
  private unsubscriber;
108
- protected calendar: i0.WritableSignal<string>;
114
+ protected calendar: _angular_core.WritableSignal<string>;
115
+ /**
116
+ * Day view navigation style passed through to embedded calendars.
117
+ */
118
+ look: _angular_core.InputSignal<AXCalendarNavigationLookType>;
109
119
  /**
110
120
  * @ignore
111
121
  */
@@ -174,14 +184,14 @@ declare class AXCalendarRangeComponent extends AXCalendarRangeComponent_base imp
174
184
  * @ignore
175
185
  */
176
186
  private _syncNav2;
177
- static ɵfac: i0.ɵɵFactoryDeclaration<AXCalendarRangeComponent, never>;
178
- static ɵcmp: i0.ɵɵComponentDeclaration<AXCalendarRangeComponent, "ax-calendar-range", never, { "rtl": { "alias": "rtl"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "value": { "alias": "value"; "required": false; }; "name": { "alias": "name"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "depth": { "alias": "depth"; "required": false; }; "activeView": { "alias": "activeView"; "required": false; }; "minValue": { "alias": "minValue"; "required": false; }; "maxValue": { "alias": "maxValue"; "required": false; }; "disabledDates": { "alias": "disabledDates"; "required": false; }; "holidayDates": { "alias": "holidayDates"; "required": false; }; "type": { "alias": "type"; "required": false; }; "dayCellTemplate": { "alias": "dayCellTemplate"; "required": false; }; "monthCellTemplate": { "alias": "monthCellTemplate"; "required": false; }; "yearCellTemplate": { "alias": "yearCellTemplate"; "required": false; }; "cellClass": { "alias": "cellClass"; "required": false; }; "showNavigation": { "alias": "showNavigation"; "required": false; }; }, { "onOptionChanged": "onOptionChanged"; "valueChange": "valueChange"; "onValueChanged": "onValueChanged"; "onBlur": "onBlur"; "onFocus": "onFocus"; "depthChange": "depthChange"; "typeChange": "typeChange"; "activeViewChange": "activeViewChange"; "disabledDatesChange": "disabledDatesChange"; "holidayDatesChange": "holidayDatesChange"; "onNavigate": "onNavigate"; "onSlotClick": "onSlotClick"; }, never, ["*"], true, never>;
187
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCalendarRangeComponent, never>;
188
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXCalendarRangeComponent, "ax-calendar-range", never, { "rtl": { "alias": "rtl"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "value": { "alias": "value"; "required": false; }; "name": { "alias": "name"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "depth": { "alias": "depth"; "required": false; }; "activeView": { "alias": "activeView"; "required": false; }; "minValue": { "alias": "minValue"; "required": false; }; "maxValue": { "alias": "maxValue"; "required": false; }; "disabledDates": { "alias": "disabledDates"; "required": false; }; "holidayDates": { "alias": "holidayDates"; "required": false; }; "type": { "alias": "type"; "required": false; }; "dayCellTemplate": { "alias": "dayCellTemplate"; "required": false; }; "monthCellTemplate": { "alias": "monthCellTemplate"; "required": false; }; "yearCellTemplate": { "alias": "yearCellTemplate"; "required": false; }; "cellClass": { "alias": "cellClass"; "required": false; }; "showNavigation": { "alias": "showNavigation"; "required": false; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; }, { "onOptionChanged": "onOptionChanged"; "valueChange": "valueChange"; "onValueChanged": "onValueChanged"; "onBlur": "onBlur"; "onFocus": "onFocus"; "depthChange": "depthChange"; "typeChange": "typeChange"; "activeViewChange": "activeViewChange"; "disabledDatesChange": "disabledDatesChange"; "holidayDatesChange": "holidayDatesChange"; "onNavigate": "onNavigate"; "onSlotClick": "onSlotClick"; }, never, ["*"], true, never>;
179
189
  }
180
190
 
181
191
  declare const AXCalendarComponent_base: polytype.Polytype.ClusteredConstructor<[{
182
192
  new (): MXValueComponent<Date>;
183
- ɵfac: i0.ɵɵFactoryDeclaration<MXValueComponent<any>, never>;
184
- ɵprov: i0.ɵɵInjectableDeclaration<MXValueComponent<any>>;
193
+ ɵfac: _angular_core.ɵɵFactoryDeclaration<MXValueComponent<any>, never>;
194
+ ɵprov: _angular_core.ɵɵInjectableDeclaration<MXValueComponent<any>>;
185
195
  }, typeof MXInteractiveComponent, typeof MXCalendarBaseComponent]>;
186
196
  /**
187
197
  * A calendar component that provides a customizable calendar view with various options for selection, navigation, and styling.
@@ -190,9 +200,15 @@ declare const AXCalendarComponent_base: polytype.Polytype.ClusteredConstructor<[
190
200
  */
191
201
  declare class AXCalendarComponent extends AXCalendarComponent_base implements AfterViewInit {
192
202
  private formatService;
193
- weekend: i0.InputSignal<number[]>;
194
- weekdays: i0.InputSignal<number[]>;
195
- protected calendar: i0.WritableSignal<string>;
203
+ weekend: _angular_core.InputSignal<number[]>;
204
+ weekdays: _angular_core.InputSignal<number[]>;
205
+ /**
206
+ * Day view navigation style.
207
+ * - `classic`: tap year/month labels to open month/year picker panels.
208
+ * - `select`: month/year dropdowns with prev/next arrows on the edges.
209
+ */
210
+ look: _angular_core.InputSignal<AXCalendarNavigationLookType>;
211
+ protected calendar: _angular_core.WritableSignal<string>;
196
212
  get displayRange(): AXDateTimeRange | null;
197
213
  /**
198
214
  * @ignore
@@ -214,6 +230,28 @@ declare class AXCalendarComponent extends AXCalendarComponent_base implements Af
214
230
  * @ignore
215
231
  */
216
232
  protected views: AXCalendarView[];
233
+ /**
234
+ * @ignore
235
+ */
236
+ protected _monthOptions: {
237
+ id: number;
238
+ text: string;
239
+ }[];
240
+ /**
241
+ * @ignore
242
+ */
243
+ protected _yearOptions: {
244
+ id: number;
245
+ text: string;
246
+ }[];
247
+ /**
248
+ * @ignore
249
+ */
250
+ protected get _currentMonth(): number;
251
+ /**
252
+ * @ignore
253
+ */
254
+ protected get _currentYear(): number;
217
255
  /**
218
256
  * @ignore
219
257
  */
@@ -246,6 +284,22 @@ declare class AXCalendarComponent extends AXCalendarComponent_base implements Af
246
284
  * @ignore
247
285
  */
248
286
  render(): void;
287
+ /**
288
+ * @ignore
289
+ */
290
+ private _updateSelectOptions;
291
+ /**
292
+ * @ignore
293
+ */
294
+ protected _handleMonthSelectChanged(e: AXValueChangedEvent): void;
295
+ /**
296
+ * @ignore
297
+ */
298
+ protected _handleYearSelectChanged(e: AXValueChangedEvent): void;
299
+ /**
300
+ * @ignore
301
+ */
302
+ private _getSelectBoxValue;
249
303
  /**
250
304
  * @ignore
251
305
  */
@@ -371,15 +425,15 @@ declare class AXCalendarComponent extends AXCalendarComponent_base implements Af
371
425
  * @ignore
372
426
  */
373
427
  protected getMonthName(date: AXDateTime, style: 'short' | 'long'): string;
374
- static ɵfac: i0.ɵɵFactoryDeclaration<AXCalendarComponent, never>;
375
- static ɵcmp: i0.ɵɵComponentDeclaration<AXCalendarComponent, "ax-calendar", never, { "rtl": { "alias": "rtl"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "value": { "alias": "value"; "required": false; }; "name": { "alias": "name"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "depth": { "alias": "depth"; "required": false; }; "activeView": { "alias": "activeView"; "required": false; }; "minValue": { "alias": "minValue"; "required": false; }; "maxValue": { "alias": "maxValue"; "required": false; }; "disabledDates": { "alias": "disabledDates"; "required": false; }; "holidayDates": { "alias": "holidayDates"; "required": false; }; "type": { "alias": "type"; "required": false; }; "dayCellTemplate": { "alias": "dayCellTemplate"; "required": false; }; "monthCellTemplate": { "alias": "monthCellTemplate"; "required": false; }; "yearCellTemplate": { "alias": "yearCellTemplate"; "required": false; }; "cellClass": { "alias": "cellClass"; "required": false; }; "showNavigation": { "alias": "showNavigation"; "required": false; }; "count": { "alias": "count"; "required": false; }; "id": { "alias": "id"; "required": false; }; "weekend": { "alias": "weekend"; "required": false; "isSignal": true; }; "weekdays": { "alias": "weekdays"; "required": false; "isSignal": true; }; }, { "onOptionChanged": "onOptionChanged"; "valueChange": "valueChange"; "onValueChanged": "onValueChanged"; "minValueChange": "minValueChange"; "maxValueChange": "maxValueChange"; "onBlur": "onBlur"; "onFocus": "onFocus"; "depthChange": "depthChange"; "typeChange": "typeChange"; "activeViewChange": "activeViewChange"; "disabledDatesChange": "disabledDatesChange"; "holidayDatesChange": "holidayDatesChange"; "onNavigate": "onNavigate"; "onSlotClick": "onSlotClick"; "countChange": "countChange"; }, never, ["ax-header", "ax-footer"], true, never>;
428
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCalendarComponent, never>;
429
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXCalendarComponent, "ax-calendar", never, { "rtl": { "alias": "rtl"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "value": { "alias": "value"; "required": false; }; "name": { "alias": "name"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "depth": { "alias": "depth"; "required": false; }; "activeView": { "alias": "activeView"; "required": false; }; "minValue": { "alias": "minValue"; "required": false; }; "maxValue": { "alias": "maxValue"; "required": false; }; "disabledDates": { "alias": "disabledDates"; "required": false; }; "holidayDates": { "alias": "holidayDates"; "required": false; }; "type": { "alias": "type"; "required": false; }; "dayCellTemplate": { "alias": "dayCellTemplate"; "required": false; }; "monthCellTemplate": { "alias": "monthCellTemplate"; "required": false; }; "yearCellTemplate": { "alias": "yearCellTemplate"; "required": false; }; "cellClass": { "alias": "cellClass"; "required": false; }; "showNavigation": { "alias": "showNavigation"; "required": false; }; "count": { "alias": "count"; "required": false; }; "id": { "alias": "id"; "required": false; }; "weekend": { "alias": "weekend"; "required": false; "isSignal": true; }; "weekdays": { "alias": "weekdays"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; }, { "onOptionChanged": "onOptionChanged"; "valueChange": "valueChange"; "onValueChanged": "onValueChanged"; "minValueChange": "minValueChange"; "maxValueChange": "maxValueChange"; "onBlur": "onBlur"; "onFocus": "onFocus"; "depthChange": "depthChange"; "typeChange": "typeChange"; "activeViewChange": "activeViewChange"; "disabledDatesChange": "disabledDatesChange"; "holidayDatesChange": "holidayDatesChange"; "onNavigate": "onNavigate"; "onSlotClick": "onSlotClick"; "countChange": "countChange"; }, never, ["ax-header", "ax-footer"], true, never>;
376
430
  }
377
431
 
378
432
  declare class AXCalendarModule {
379
- static ɵfac: i0.ɵɵFactoryDeclaration<AXCalendarModule, never>;
380
- static ɵmod: i0.ɵɵNgModuleDeclaration<AXCalendarModule, never, [typeof AXCalendarComponent, typeof AXCalendarRangeComponent], [typeof AXCalendarComponent, typeof AXCalendarRangeComponent]>;
381
- static ɵinj: i0.ɵɵInjectorDeclaration<AXCalendarModule>;
433
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCalendarModule, never>;
434
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXCalendarModule, never, [typeof AXCalendarComponent, typeof AXCalendarRangeComponent], [typeof AXCalendarComponent, typeof AXCalendarRangeComponent]>;
435
+ static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXCalendarModule>;
382
436
  }
383
437
 
384
438
  export { AXCalendarComponent, AXCalendarModule, AXCalendarNavigateEvent, AXCalendarRangeComponent, AXCalendarSlotClick, CALENDAR_INPUTS, CALENDAR_OUTPUTS, MXCalendarBaseComponent };
385
- export type { AXCalendarCellCssClass, AXCalendarDisabledDates, AXCalendarHolidayDates, AXCalendarView, AXCalendarViewDepth, AXCalendarViewSlot, AXCalendarViewType, AXDateTimePickerType };
439
+ export type { AXCalendarCellCssClass, AXCalendarDisabledDates, AXCalendarHolidayDates, AXCalendarNavigationLookType, AXCalendarView, AXCalendarViewDepth, AXCalendarViewSlot, AXCalendarViewType, AXDateTimePickerType };
@@ -83,17 +83,16 @@ import {
83
83
  AXIndexedDBUserApi,
84
84
  AXIndexedDBConversationApi,
85
85
  AXIndexedDBMessageApi,
86
- AXConversationIndexedDbUploaderApi,
87
86
  AXIndexedDBRealtimeApi,
88
87
  } from '@acorex/components/conversation2';
89
88
 
90
89
  export const appConfig: ApplicationConfig = {
91
90
  providers: [
91
+ MyAppUploaderService,
92
92
  provideConversation({
93
93
  userApi: AXIndexedDBUserApi,
94
94
  conversationApi: AXIndexedDBConversationApi,
95
95
  messageApi: AXIndexedDBMessageApi,
96
- uploaderApi: AXConversationIndexedDbUploaderApi,
97
96
  realtimeApi: AXIndexedDBRealtimeApi, // optional
98
97
  config: {
99
98
  messagePageSize: 50,
@@ -188,11 +187,12 @@ provideConversation({
188
187
  userApi: AXIndexedDBUserApi,
189
188
  conversationApi: AXIndexedDBConversationApi,
190
189
  messageApi: AXIndexedDBMessageApi,
191
- uploaderApi: AXIndexedDBMediaUploaderApi,
192
190
  realtimeApi: AXIndexedDBRealtimeApi,
193
191
  });
194
192
  ```
195
193
 
194
+ Register a service that subscribes to `AXUploaderService.onUpload`, `onResolveUrl`, and `onDeleteMedia` (see showcase `AXShowcaseConversationIndexedDbUploaderService`).
195
+
196
196
  #### IndexedDB with AI API (AI-Powered Demo)
197
197
 
198
198
  ```typescript
@@ -209,7 +209,6 @@ provideConversation({
209
209
  userApi: AXIndexedDBUserApi,
210
210
  conversationApi: AXIndexedDBConversationApi,
211
211
  messageApi: AXIndexedDBMessageAIApi,
212
- uploaderApi: AXIndexedDBMediaUploaderApi,
213
212
  realtimeApi: AXIndexedDBRealtimeApi,
214
213
  });
215
214
  ```
@@ -226,10 +225,6 @@ interface AXConversationConfig {
226
225
  infiniteScrollThreshold?: number; // Default: 200px
227
226
  scrollThreshold?: number; // Default: 100px
228
227
 
229
- // File upload (fallback when action omits uploadConstraints fields)
230
- maxFileSize?: number; // Default: 10MB
231
- allowedFileTypes?: string[]; // Default: image/*, video/*, audio/*, pdf, doc
232
-
233
228
  // UI Behavior
234
229
  messageHighlightDuration?: number; // Default: 2000ms
235
230
  typingIndicatorTimeout?: number; // Default: 3000ms
@@ -433,8 +428,8 @@ Supported message types out of the box:
433
428
 
434
429
  **Issue**: File upload fails
435
430
 
436
- - Check `config.maxFileSize` / `config.allowedFileTypes` and per-action `uploadConstraints` (`allowedMimeTypes`, `minSize`, `maxSize`)
437
- - Verify `uploaderApi` is provided and implements `AXUploaderApi.upload()` with progress and `AbortSignal` support
431
+ - Check composer file-type catalogs and per-action `uploadConstraints` (`allowedMimeTypes`, `minSize`, `maxSize`)
432
+ - Register a handler service subscribed to `AXUploaderService.onUpload` (and resolve/delete events) with progress and `AbortSignal` support
438
433
 
439
434
  **Issue**: Styling issues
440
435