@acorex/components 22.0.0-next.7 → 22.0.0-next.9

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.
@@ -3,30 +3,27 @@ import { MXInputBaseValueComponent, AXClickEvent } from '@acorex/cdk/common';
3
3
  import { AXDateTimePickerType } from '@acorex/components/calendar';
4
4
 
5
5
  /**
6
- * A component for date and time input with various custom features.
6
+ * A component for date and time input with segment-based typing, keyboard navigation,
7
+ * and calendar-aware formatting (gregorian and solar-hijri).
7
8
  *
8
9
  * @category Components
9
10
  */
10
11
  declare class AXDateTimeInputComponent extends MXInputBaseValueComponent<Date> {
11
12
  #private;
12
13
  private platformService;
13
- private formatService;
14
14
  private localeService;
15
15
  private calendarService;
16
- /**
17
- * @ignore
18
- */
16
+ /** @ignore */
19
17
  private readonly _editingParts;
20
- /**
21
- * @ignore
22
- */
18
+ /** @ignore */
23
19
  protected _editingText: _angular_core.WritableSignal<string>;
20
+ /** @ignore */
21
+ private _inputChars;
22
+ /** @ignore */
23
+ private _activePart;
24
24
  /**
25
- * @ignore
26
- */
27
- protected _inputChars: string[];
28
- /**
29
- * Indicates whether typing is allowed in the input field.
25
+ * When true, the user can type digits and navigate segments with the keyboard.
26
+ * When false, keyboard input is blocked (used by datetime-box picker mode).
30
27
  * @defaultValue false
31
28
  */
32
29
  allowTyping: _angular_core.InputSignal<boolean>;
@@ -34,94 +31,81 @@ declare class AXDateTimeInputComponent extends MXInputBaseValueComponent<Date> {
34
31
  * @description The calendar type to use for the datetime input.
35
32
  */
36
33
  calendar: _angular_core.InputSignal<string>;
37
- protected readonly _calendarSystem: _angular_core.Signal<string>;
38
- private _activePart;
39
- private _editingDate;
40
- /**
41
- * @ignore
42
- */
43
- private input;
44
34
  minValue: _angular_core.InputSignal<Date>;
45
35
  maxValue: _angular_core.InputSignal<Date>;
46
36
  /**
47
- * Emitted when a click event occurs on the datetime box.
37
+ * Emitted when a click event occurs on the datetime input.
48
38
  * @event
49
39
  */
50
40
  onClick: _angular_core.OutputEmitterRef<AXClickEvent>;
51
41
  picker: _angular_core.InputSignal<AXDateTimePickerType>;
52
- protected readonly _resolvedFormat: _angular_core.Signal<string>;
53
42
  /**
54
43
  * @deprecated use locale & mode instead
55
44
  */
56
45
  format: _angular_core.InputSignal<string>;
57
- private _detectParts;
46
+ protected readonly _calendarSystem: _angular_core.Signal<string>;
47
+ protected readonly _resolvedFormat: _angular_core.Signal<string>;
48
+ /** @ignore */
49
+ private _editingDate;
50
+ /** @ignore */
51
+ private inputRef;
52
+ /** @ignore */
53
+ private get inputElement();
58
54
  /**
59
55
  * @description check if page is in rtl or ltr
60
56
  */
61
57
  protected isRtl: _angular_core.WritableSignal<boolean>;
62
- /**
63
- * @description listen to direction change to react to it.
64
- */
58
+ /** @ignore */
65
59
  protected ngOnInit(): void;
66
60
  /**
67
- * @ignore
61
+ * Formats a part using the calendar already attached to the AXDateTime.
62
+ * @ignore
68
63
  */
64
+ private _formatPart;
65
+ /** @ignore */
66
+ private _detectParts;
67
+ /** @ignore */
69
68
  private _getOrderedParts;
70
- /**
71
- * @ignore
72
- */
69
+ /** @ignore */
73
70
  private _clearInputBuffer;
74
- /**
75
- * @ignore
76
- */
71
+ /** @ignore */
77
72
  private _updateText;
78
- /**
79
- * Sets the internal date value, adjusting it based on editing parts.
80
- * @param value - The date to set. Returns `undefined` if no value is provided.
81
- * @ignore
82
- */
83
73
  /**
84
74
  * Handles changes to the internal date value, updating editing parts and text representation.
85
- *
86
- * @param value - The new date value. If not provided, resets editing parts.
87
75
  * @ignore
88
76
  */
89
77
  internalValueChanged(value?: Date): void;
90
78
  /**
91
- * @ignore
92
- */
93
- _handleOnKeydownEvent(e: KeyboardEvent): void;
94
- /**
95
- * @ignore
96
- */
97
- _handleKeyUpEvent(): void;
98
- /**
99
- * @ignore
79
+ * Normalizes Persian (U+06F0-U+06F9) and Arabic-Indic (U+0660-U+0669) digits to ASCII.
80
+ * @ignore
100
81
  */
82
+ private _normalizeDigit;
83
+ /** @ignore */
84
+ protected _handleOnKeydownEvent(e: KeyboardEvent): void;
85
+ /** @ignore */
86
+ private _handleDigitInput;
87
+ /** @ignore */
88
+ private _applyEditingDate;
89
+ /** @ignore */
90
+ protected _handleKeyUpEvent(): void;
91
+ /** @ignore */
101
92
  protected _handleFocusEvent(e: FocusEvent): void;
102
- /**
103
- * @ignore
104
- */
93
+ /** @ignore */
105
94
  protected _handleBlurEvent(e: FocusEvent): void;
106
- /**
107
- * @ignore
108
- */
95
+ /** @ignore */
96
+ private _clampToRange;
97
+ /** @ignore */
109
98
  protected _handleOnInputClickEvent(e: MouseEvent): void;
110
- /**
111
- * @ignore
112
- */
113
- private _detectPartAtPosition;
114
- /**
115
- * @ignore
116
- */
99
+ /** @ignore */
100
+ private _selectFirstPart;
101
+ /** @ignore */
102
+ private _ensureEditableText;
103
+ /** @ignore */
117
104
  private _highlightActivePart;
118
- /**
119
- * @ignore
120
- */
105
+ /** @ignore */
121
106
  private _detectValueChanges;
122
- private get __hostName();
123
107
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDateTimeInputComponent, never>;
124
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXDateTimeInputComponent, "ax-datetime-input", 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; }; "allowTyping": { "alias": "allowTyping"; "required": false; "isSignal": true; }; "calendar": { "alias": "calendar"; "required": false; "isSignal": true; }; "minValue": { "alias": "minValue"; "required": false; "isSignal": true; }; "maxValue": { "alias": "maxValue"; "required": false; "isSignal": true; }; "picker": { "alias": "picker"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "stateChange": "stateChange"; "onValueChanged": "onValueChanged"; "onBlur": "onBlur"; "onFocus": "onFocus"; "readonlyChange": "readonlyChange"; "disabledChange": "disabledChange"; "onClick": "onClick"; }, never, ["ax-validation-rule"], true, never>;
108
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXDateTimeInputComponent, "ax-datetime-input", 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; }; "allowTyping": { "alias": "allowTyping"; "required": false; "isSignal": true; }; "calendar": { "alias": "calendar"; "required": false; "isSignal": true; }; "minValue": { "alias": "minValue"; "required": false; "isSignal": true; }; "maxValue": { "alias": "maxValue"; "required": false; "isSignal": true; }; "picker": { "alias": "picker"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "stateChange": "stateChange"; "onValueChanged": "onValueChanged"; "onBlur": "onBlur"; "onFocus": "onFocus"; "readonlyChange": "readonlyChange"; "disabledChange": "disabledChange"; "onKeyDown": "onKeyDown"; "onKeyUp": "onKeyUp"; "onKeyPress": "onKeyPress"; "onClick": "onClick"; }, never, ["ax-validation-rule"], true, never>;
125
109
  }
126
110
 
127
111
  declare class AXDateTimeInputModule {
@@ -1,8 +1,7 @@
1
- import { AXComponentContent, AXComponentInputs } from '@acorex/core/components';
2
1
  import * as _angular_core from '@angular/core';
3
2
  import { OnDestroy, TemplateRef, Type, Provider } from '@angular/core';
3
+ import { AXComponentContent, AXComponentInputs } from '@acorex/core/components';
4
4
  import { Subject } from 'rxjs';
5
- import * as dist_packages_core_types_acorex_core_components from 'dist/packages/core/types/acorex-core-components';
6
5
  import { AXStyleColorType, AXComponentClosedPromise } from '@acorex/cdk/common';
7
6
  import * as _acorex_core_file from '@acorex/core/file';
8
7
  import { AXFileTypeExtensionHint, AXFileType, AXFileTypeViewComponent } from '@acorex/core/file';
@@ -27,18 +26,6 @@ interface AXFileViewerViewPayload {
27
26
  index: number;
28
27
  active: boolean;
29
28
  }
30
- /** Component or template rendered in the file-viewer header center slot. */
31
- type AXFileViewerHeaderContent = AXComponentContent;
32
- /** Inputs passed to {@link AXFileViewerHeaderContent} when it is a component. */
33
- type AXFileViewerHeaderContentInputs = AXComponentInputs;
34
- /** Placeholder component or template shown in the center when {@link AXFileViewerHeaderContent} is omitted. */
35
- type AXFileViewerHeaderPlaceholderContent = AXComponentContent;
36
- /** Inputs passed to the header placeholder when it is a component. */
37
- type AXFileViewerHeaderPlaceholderInputs = AXComponentInputs;
38
- /** Component or template rendered instead of the built-in fallback viewer for `file` type items. */
39
- type AXFileViewerFallbackContent = AXComponentContent;
40
- /** Inputs passed to {@link AXFileViewerFallbackContent} when it is a component. */
41
- type AXFileViewerFallbackContentInputs = AXComponentInputs;
42
29
 
43
30
  /** Carousel state shared between container, slides and thumbnails. Provided per-container. */
44
31
  declare class AXFileViewerService {
@@ -66,22 +53,10 @@ declare class AXFileViewerContainerComponent implements OnDestroy {
66
53
  readonly fullscreen: _angular_core.InputSignal<boolean>;
67
54
  /** When true, opens in a gallery overlay and closes when fullscreen exits. */
68
55
  readonly galleryMode: _angular_core.InputSignal<boolean>;
69
- /** Component or template rendered in the header center slot. */
70
- readonly headerContent: _angular_core.InputSignal<AXFileViewerHeaderContent>;
71
- /** Inputs for {@link headerContent} when it is a component. */
72
- readonly headerContentInputs: _angular_core.InputSignal<dist_packages_core_types_acorex_core_components.AXComponentInputs>;
73
- /** Context data exposed as `$implicit` to header templates. */
74
- readonly headerContentData: _angular_core.InputSignal<unknown>;
75
- /** Custom placeholder when {@link headerContent} is omitted. */
76
- readonly headerContentPlaceholder: _angular_core.InputSignal<AXFileViewerHeaderPlaceholderContent>;
77
- /** Inputs for {@link headerContentPlaceholder} when it is a component. */
78
- readonly headerContentPlaceholderInputs: _angular_core.InputSignal<dist_packages_core_types_acorex_core_components.AXComponentInputs>;
79
- /** Component or template replacing the built-in fallback viewer for `file` type items. */
80
- readonly fallbackContent: _angular_core.InputSignal<AXFileViewerFallbackContent>;
81
- /** Inputs for {@link fallbackContent} when it is a component. */
82
- readonly fallbackContentInputs: _angular_core.InputSignal<dist_packages_core_types_acorex_core_components.AXComponentInputs>;
83
- /** Context data exposed as `$implicit` to fallback templates. */
84
- readonly fallbackContentData: _angular_core.InputSignal<unknown>;
56
+ readonly headerContent: _angular_core.InputSignal<AXComponentContent>;
57
+ readonly headerContentInputs: _angular_core.InputSignal<AXComponentInputs>;
58
+ readonly fallbackContent: _angular_core.InputSignal<AXComponentContent>;
59
+ readonly fallbackContentInputs: _angular_core.InputSignal<AXComponentInputs>;
85
60
  /** External loading flag — show overlay while parent data is being fetched. */
86
61
  readonly loading: _angular_core.InputSignal<boolean>;
87
62
  readonly fullscreenClosed: _angular_core.OutputEmitterRef<void>;
@@ -104,11 +79,8 @@ declare class AXFileViewerContainerComponent implements OnDestroy {
104
79
  readonly slideCounter: _angular_core.Signal<string>;
105
80
  readonly headerTemplateContent: _angular_core.Signal<TemplateRef<any>>;
106
81
  readonly headerComponentContent: _angular_core.Signal<Type<unknown>>;
107
- readonly headerPlaceholderTemplateContent: _angular_core.Signal<TemplateRef<any>>;
108
- readonly headerPlaceholderComponentContent: _angular_core.Signal<Type<unknown>>;
109
82
  readonly hasHeaderCenterContent: _angular_core.Signal<boolean>;
110
83
  readonly headerContentContext: _angular_core.Signal<{
111
- $implicit: unknown;
112
84
  item: AXFileViewerItem;
113
85
  items: AXFileViewerItem[];
114
86
  selectedIndex: number;
@@ -132,7 +104,7 @@ declare class AXFileViewerContainerComponent implements OnDestroy {
132
104
  downloadCurrent(): Promise<void>;
133
105
  ngOnDestroy(): void;
134
106
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXFileViewerContainerComponent, never>;
135
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXFileViewerContainerComponent, "ax-file-viewer-container", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "startIndex": { "alias": "startIndex"; "required": false; "isSignal": true; }; "thumbnail": { "alias": "thumbnail"; "required": false; "isSignal": true; }; "pagination": { "alias": "pagination"; "required": false; "isSignal": true; }; "download": { "alias": "download"; "required": false; "isSignal": true; }; "fullscreen": { "alias": "fullscreen"; "required": false; "isSignal": true; }; "galleryMode": { "alias": "galleryMode"; "required": false; "isSignal": true; }; "headerContent": { "alias": "headerContent"; "required": false; "isSignal": true; }; "headerContentInputs": { "alias": "headerContentInputs"; "required": false; "isSignal": true; }; "headerContentData": { "alias": "headerContentData"; "required": false; "isSignal": true; }; "headerContentPlaceholder": { "alias": "headerContentPlaceholder"; "required": false; "isSignal": true; }; "headerContentPlaceholderInputs": { "alias": "headerContentPlaceholderInputs"; "required": false; "isSignal": true; }; "fallbackContent": { "alias": "fallbackContent"; "required": false; "isSignal": true; }; "fallbackContentInputs": { "alias": "fallbackContentInputs"; "required": false; "isSignal": true; }; "fallbackContentData": { "alias": "fallbackContentData"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, { "fullscreenClosed": "fullscreenClosed"; }, never, never, true, never>;
107
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXFileViewerContainerComponent, "ax-file-viewer-container", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "startIndex": { "alias": "startIndex"; "required": false; "isSignal": true; }; "thumbnail": { "alias": "thumbnail"; "required": false; "isSignal": true; }; "pagination": { "alias": "pagination"; "required": false; "isSignal": true; }; "download": { "alias": "download"; "required": false; "isSignal": true; }; "fullscreen": { "alias": "fullscreen"; "required": false; "isSignal": true; }; "galleryMode": { "alias": "galleryMode"; "required": false; "isSignal": true; }; "headerContent": { "alias": "headerContent"; "required": false; "isSignal": true; }; "headerContentInputs": { "alias": "headerContentInputs"; "required": false; "isSignal": true; }; "fallbackContent": { "alias": "fallbackContent"; "required": false; "isSignal": true; }; "fallbackContentInputs": { "alias": "fallbackContentInputs"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, { "fullscreenClosed": "fullscreenClosed"; }, never, never, true, never>;
136
108
  }
137
109
 
138
110
  interface AXFileViewerGalleryConfig {
@@ -142,14 +114,10 @@ interface AXFileViewerGalleryConfig {
142
114
  download?: boolean;
143
115
  loading?: boolean;
144
116
  panelClass?: string[];
145
- headerContent?: AXFileViewerHeaderContent | null;
146
- headerContentInputs?: AXFileViewerHeaderContentInputs;
147
- headerContentData?: unknown;
148
- headerContentPlaceholder?: AXFileViewerHeaderPlaceholderContent | null;
149
- headerContentPlaceholderInputs?: AXFileViewerHeaderPlaceholderInputs;
150
- fallbackContent?: AXFileViewerFallbackContent | null;
151
- fallbackContentInputs?: AXFileViewerFallbackContentInputs;
152
- fallbackContentData?: unknown;
117
+ headerContent?: AXComponentContent | null;
118
+ headerContentInputs?: AXComponentInputs | null;
119
+ fallbackContent?: AXComponentContent | null;
120
+ fallbackContentInputs?: AXComponentInputs | null;
153
121
  }
154
122
  interface AXFileViewerGalleryRef<TResult = any> {
155
123
  close: (data?: TResult) => void;
@@ -196,7 +164,7 @@ declare function provideFileViewer(): Provider[];
196
164
 
197
165
  declare function createFileViewerFileTypes(): AXFileType[];
198
166
 
199
- /** Optional center header slot component for use with {@link headerContentPlaceholder}. */
167
+ /** Optional center header slot component for use with {@link headerContent}. */
200
168
  declare class AXFileViewerHeaderPlaceholderComponent {
201
169
  readonly slideCounter: _angular_core.InputSignal<string>;
202
170
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXFileViewerHeaderPlaceholderComponent, never>;
@@ -206,12 +174,8 @@ declare class AXFileViewerHeaderPlaceholderComponent {
206
174
  declare class AXFileViewerSlideComponent {
207
175
  readonly item: _angular_core.InputSignal<AXFileViewerItem>;
208
176
  readonly index: _angular_core.InputSignal<number>;
209
- /** Component or template replacing the built-in fallback viewer for `file` type items. */
210
- readonly fallbackContent: _angular_core.InputSignal<AXFileViewerFallbackContent>;
211
- /** Inputs for {@link fallbackContent} when it is a component. */
212
- readonly fallbackContentInputs: _angular_core.InputSignal<dist_packages_core_types_acorex_core_components.AXComponentInputs>;
213
- /** Context data exposed as `$implicit` to fallback templates. */
214
- readonly fallbackContentData: _angular_core.InputSignal<unknown>;
177
+ readonly fallbackContent: _angular_core.InputSignal<AXComponentContent>;
178
+ readonly fallbackContentInputs: _angular_core.InputSignal<AXComponentInputs>;
215
179
  private readonly service;
216
180
  readonly fileTypeName: _angular_core.Signal<string>;
217
181
  readonly extensionHint: _angular_core.Signal<_acorex_core_file.AXFileTypeExtensionHint>;
@@ -220,7 +184,6 @@ declare class AXFileViewerSlideComponent {
220
184
  readonly fallbackComponentContent: _angular_core.Signal<Type<unknown>>;
221
185
  readonly useCustomFallback: _angular_core.Signal<boolean>;
222
186
  readonly fallbackContentContext: _angular_core.Signal<{
223
- $implicit: unknown;
224
187
  payload: AXFileViewerViewPayload;
225
188
  item: AXFileViewerItem;
226
189
  index: number;
@@ -230,7 +193,7 @@ declare class AXFileViewerSlideComponent {
230
193
  payload: AXFileViewerViewPayload;
231
194
  }>;
232
195
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXFileViewerSlideComponent, never>;
233
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXFileViewerSlideComponent, "ax-file-viewer-slide", never, { "item": { "alias": "item"; "required": true; "isSignal": true; }; "index": { "alias": "index"; "required": true; "isSignal": true; }; "fallbackContent": { "alias": "fallbackContent"; "required": false; "isSignal": true; }; "fallbackContentInputs": { "alias": "fallbackContentInputs"; "required": false; "isSignal": true; }; "fallbackContentData": { "alias": "fallbackContentData"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
196
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXFileViewerSlideComponent, "ax-file-viewer-slide", never, { "item": { "alias": "item"; "required": true; "isSignal": true; }; "index": { "alias": "index"; "required": true; "isSignal": true; }; "fallbackContent": { "alias": "fallbackContent"; "required": false; "isSignal": true; }; "fallbackContentInputs": { "alias": "fallbackContentInputs"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
234
197
  }
235
198
 
236
199
  declare class AXFileViewerThumbPreviewComponent {
@@ -306,4 +269,4 @@ declare class AXFileViewerFileFallbackComponent implements AXFileTypeViewCompone
306
269
  }
307
270
 
308
271
  export { AXFileViewerAudioComponent, AXFileViewerContainerComponent, AXFileViewerFileFallbackComponent, AXFileViewerGalleryService, AXFileViewerHeaderPlaceholderComponent, AXFileViewerImageComponent, AXFileViewerPdfComponent, AXFileViewerService, AXFileViewerSlideComponent, AXFileViewerThumbPreviewComponent, AXFileViewerThumbnailsComponent, AXFileViewerVideoComponent, buildFileViewerExtensionHint, createFileViewerFileTypes, provideFileViewer, resolveFileViewerFileType };
309
- export type { AXFileViewerFallbackContent, AXFileViewerFallbackContentInputs, AXFileViewerGalleryConfig, AXFileViewerGalleryRef, AXFileViewerHeaderContent, AXFileViewerHeaderContentInputs, AXFileViewerHeaderPlaceholderContent, AXFileViewerHeaderPlaceholderInputs, AXFileViewerItem, AXFileViewerViewPayload };
272
+ export type { AXFileViewerGalleryConfig, AXFileViewerGalleryRef, AXFileViewerItem, AXFileViewerViewPayload };
@@ -1,3 +0,0 @@
1
- # @acorex/components/datetime-text-box
2
-
3
- Secondary entry point of `@acorex/components`. It can be used by importing from `@acorex/components/datetime-text-box`.