@shival99/z-ui 2.1.30 → 2.1.32

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shival99/z-ui",
3
- "version": "2.1.30",
3
+ "version": "2.1.32",
4
4
  "description": "Z-UI: Modern Angular UI Component Library - A comprehensive, high-performance design system built with Angular 21, featuring 40+ customizable components with dark mode, accessibility, and enterprise-ready features.",
5
5
  "keywords": [
6
6
  "angular",
@@ -119,7 +119,9 @@ declare class ZAutocompleteComponent<T = unknown> implements OnInit, ControlValu
119
119
  readonly zVirtualScroll: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
120
120
  readonly zDynamicSize: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
121
121
  readonly zOptionHeight: _angular_core.InputSignal<number>;
122
- readonly zHeightExpand: _angular_core.InputSignal<number>;
122
+ readonly zDropdownMaxHeight: _angular_core.InputSignal<number | null>;
123
+ /** @deprecated Dùng zDropdownMaxHeight để đồng nhất với z-select. */
124
+ readonly zHeightExpand: _angular_core.InputSignal<number | null>;
123
125
  readonly zMaxVisible: _angular_core.InputSignal<number | null>;
124
126
  readonly zResetOnSelect: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
125
127
  readonly zEmptyText: _angular_core.InputSignal<string>;
@@ -271,7 +273,7 @@ declare class ZAutocompleteComponent<T = unknown> implements OnInit, ControlValu
271
273
  private _emitControl;
272
274
  private _getOptionKey;
273
275
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZAutocompleteComponent<any>, never>;
274
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZAutocompleteComponent<any>, "z-autocomplete", ["zAutocomplete"], { "class": { "alias": "class"; "required": false; "isSignal": true; }; "zOptions": { "alias": "zOptions"; "required": false; "isSignal": true; }; "zConfig": { "alias": "zConfig"; "required": false; "isSignal": true; }; "zSize": { "alias": "zSize"; "required": false; "isSignal": true; }; "zType": { "alias": "zType"; "required": false; "isSignal": true; }; "zLabel": { "alias": "zLabel"; "required": false; "isSignal": true; }; "zLabelClass": { "alias": "zLabelClass"; "required": false; "isSignal": true; }; "zPlaceholder": { "alias": "zPlaceholder"; "required": false; "isSignal": true; }; "zDisabled": { "alias": "zDisabled"; "required": false; "isSignal": true; }; "zReadonly": { "alias": "zReadonly"; "required": false; "isSignal": true; }; "zLoading": { "alias": "zLoading"; "required": false; "isSignal": true; }; "zLoadingOutline": { "alias": "zLoadingOutline"; "required": false; "isSignal": true; }; "zRequired": { "alias": "zRequired"; "required": false; "isSignal": true; }; "zPrefix": { "alias": "zPrefix"; "required": false; "isSignal": true; }; "zSuffix": { "alias": "zSuffix"; "required": false; "isSignal": true; }; "zAllowClear": { "alias": "zAllowClear"; "required": false; "isSignal": true; }; "zVirtualScroll": { "alias": "zVirtualScroll"; "required": false; "isSignal": true; }; "zDynamicSize": { "alias": "zDynamicSize"; "required": false; "isSignal": true; }; "zOptionHeight": { "alias": "zOptionHeight"; "required": false; "isSignal": true; }; "zHeightExpand": { "alias": "zHeightExpand"; "required": false; "isSignal": true; }; "zMaxVisible": { "alias": "zMaxVisible"; "required": false; "isSignal": true; }; "zResetOnSelect": { "alias": "zResetOnSelect"; "required": false; "isSignal": true; }; "zEmptyText": { "alias": "zEmptyText"; "required": false; "isSignal": true; }; "zEmptyIcon": { "alias": "zEmptyIcon"; "required": false; "isSignal": true; }; "zNoDataText": { "alias": "zNoDataText"; "required": false; "isSignal": true; }; "zNoDataIcon": { "alias": "zNoDataIcon"; "required": false; "isSignal": true; }; "zAllowCustomValue": { "alias": "zAllowCustomValue"; "required": false; "isSignal": true; }; "zDebounceTime": { "alias": "zDebounceTime"; "required": false; "isSignal": true; }; "zLoadingMore": { "alias": "zLoadingMore"; "required": false; "isSignal": true; }; "zEnableLoadMore": { "alias": "zEnableLoadMore"; "required": false; "isSignal": true; }; "zScrollDistance": { "alias": "zScrollDistance"; "required": false; "isSignal": true; }; "zKey": { "alias": "zKey"; "required": false; "isSignal": true; }; "zOptionTemplate": { "alias": "zOptionTemplate"; "required": false; "isSignal": true; }; }, { "zOnSearch": "zOnSearch"; "zOnLoadMore": "zOnLoadMore"; "zOnSelect": "zOnSelect"; "zOnEnter": "zOnEnter"; "zOnCommit": "zOnCommit"; "zValueChange": "zValueChange"; "zOnBlur": "zOnBlur"; "zOnFocus": "zOnFocus"; "zControl": "zControl"; "zEvent": "zEvent"; }, ["customOptionDirective"], never, true, never>;
276
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZAutocompleteComponent<any>, "z-autocomplete", ["zAutocomplete"], { "class": { "alias": "class"; "required": false; "isSignal": true; }; "zOptions": { "alias": "zOptions"; "required": false; "isSignal": true; }; "zConfig": { "alias": "zConfig"; "required": false; "isSignal": true; }; "zSize": { "alias": "zSize"; "required": false; "isSignal": true; }; "zType": { "alias": "zType"; "required": false; "isSignal": true; }; "zLabel": { "alias": "zLabel"; "required": false; "isSignal": true; }; "zLabelClass": { "alias": "zLabelClass"; "required": false; "isSignal": true; }; "zPlaceholder": { "alias": "zPlaceholder"; "required": false; "isSignal": true; }; "zDisabled": { "alias": "zDisabled"; "required": false; "isSignal": true; }; "zReadonly": { "alias": "zReadonly"; "required": false; "isSignal": true; }; "zLoading": { "alias": "zLoading"; "required": false; "isSignal": true; }; "zLoadingOutline": { "alias": "zLoadingOutline"; "required": false; "isSignal": true; }; "zRequired": { "alias": "zRequired"; "required": false; "isSignal": true; }; "zPrefix": { "alias": "zPrefix"; "required": false; "isSignal": true; }; "zSuffix": { "alias": "zSuffix"; "required": false; "isSignal": true; }; "zAllowClear": { "alias": "zAllowClear"; "required": false; "isSignal": true; }; "zVirtualScroll": { "alias": "zVirtualScroll"; "required": false; "isSignal": true; }; "zDynamicSize": { "alias": "zDynamicSize"; "required": false; "isSignal": true; }; "zOptionHeight": { "alias": "zOptionHeight"; "required": false; "isSignal": true; }; "zDropdownMaxHeight": { "alias": "zDropdownMaxHeight"; "required": false; "isSignal": true; }; "zHeightExpand": { "alias": "zHeightExpand"; "required": false; "isSignal": true; }; "zMaxVisible": { "alias": "zMaxVisible"; "required": false; "isSignal": true; }; "zResetOnSelect": { "alias": "zResetOnSelect"; "required": false; "isSignal": true; }; "zEmptyText": { "alias": "zEmptyText"; "required": false; "isSignal": true; }; "zEmptyIcon": { "alias": "zEmptyIcon"; "required": false; "isSignal": true; }; "zNoDataText": { "alias": "zNoDataText"; "required": false; "isSignal": true; }; "zNoDataIcon": { "alias": "zNoDataIcon"; "required": false; "isSignal": true; }; "zAllowCustomValue": { "alias": "zAllowCustomValue"; "required": false; "isSignal": true; }; "zDebounceTime": { "alias": "zDebounceTime"; "required": false; "isSignal": true; }; "zLoadingMore": { "alias": "zLoadingMore"; "required": false; "isSignal": true; }; "zEnableLoadMore": { "alias": "zEnableLoadMore"; "required": false; "isSignal": true; }; "zScrollDistance": { "alias": "zScrollDistance"; "required": false; "isSignal": true; }; "zKey": { "alias": "zKey"; "required": false; "isSignal": true; }; "zOptionTemplate": { "alias": "zOptionTemplate"; "required": false; "isSignal": true; }; }, { "zOnSearch": "zOnSearch"; "zOnLoadMore": "zOnLoadMore"; "zOnSelect": "zOnSelect"; "zOnEnter": "zOnEnter"; "zOnCommit": "zOnCommit"; "zValueChange": "zValueChange"; "zOnBlur": "zOnBlur"; "zOnFocus": "zOnFocus"; "zControl": "zControl"; "zEvent": "zEvent"; }, ["customOptionDirective"], never, true, never>;
275
277
  }
276
278
 
277
279
  declare const zAutocompleteInputVariants: (props?: ({
@@ -1,12 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Signal, InjectionToken } from '@angular/core';
2
+ import { Type, TemplateRef, ViewContainerRef, EventEmitter, ComponentRef, Signal, InjectionToken } from '@angular/core';
3
+ import { PositionStrategy, ScrollStrategy, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';
3
4
  import { ZFormatNumExcelOptions } from '@shival99/z-ui/utils';
4
5
  import { HttpHeaders, HttpContext, HttpParams, HttpClient } from '@angular/common/http';
5
6
  import { Router } from '@angular/router';
6
7
  import * as rxjs from 'rxjs';
7
8
  import { Observable } from 'rxjs';
8
9
  import { TranslationObject, TranslateService } from '@ngx-translate/core';
9
- import { OverlayRef } from '@angular/cdk/overlay';
10
10
 
11
11
  interface ZCacheEntry<T = unknown> {
12
12
  data: T;
@@ -43,6 +43,107 @@ declare class ZCacheService {
43
43
  static ɵprov: i0.ɵɵInjectableDeclaration<ZCacheService>;
44
44
  }
45
45
 
46
+ /** Content accepted by the dynamic overlay service. */
47
+ type ZDynamicContent<T> = Type<T> | TemplateRef<T>;
48
+ /** Template context supplied to a dynamic template. */
49
+ interface ZDynamicTemplateContext<TData, TResult> {
50
+ /** Dynamic ref exposed as the implicit template value. */
51
+ $implicit: ZDynamicRef<unknown, TResult>;
52
+ /** Dynamic ref used to close or update the overlay from the template. */
53
+ dynamicRef: ZDynamicRef<unknown, TResult>;
54
+ /** Data passed to `open`. */
55
+ data: TData | undefined;
56
+ }
57
+ /** Options for opening a free-form CDK dynamic overlay. */
58
+ interface ZDynamicOptions<TData = unknown> {
59
+ /** Data injected into a component or exposed in a template context. */
60
+ data?: TData;
61
+ /** View container used as the logical parent of the attached portal. */
62
+ viewContainerRef?: ViewContainerRef;
63
+ /** Whether the overlay renders a backdrop. Defaults to `true`. */
64
+ hasBackdrop?: boolean;
65
+ /** CSS class or classes applied to the backdrop. */
66
+ backdropClass?: string | string[];
67
+ /** CSS class or classes applied to the overlay pane. */
68
+ panelClass?: string | string[];
69
+ /** Custom position strategy. Defaults to a global overlay strategy. */
70
+ positionStrategy?: PositionStrategy;
71
+ /** Custom scroll strategy. Defaults to the CDK block strategy. */
72
+ scrollStrategy?: ScrollStrategy;
73
+ /** Close when the backdrop is clicked. Defaults to `true`. */
74
+ closeOnBackdropClick?: boolean;
75
+ /** Close when Escape is pressed. Defaults to `true`. */
76
+ closeOnEscape?: boolean;
77
+ /** Initial pane width passed to CDK. */
78
+ width?: OverlayConfig['width'];
79
+ /** Initial pane height passed to CDK. */
80
+ height?: OverlayConfig['height'];
81
+ /** Minimum pane width passed to CDK. */
82
+ minWidth?: OverlayConfig['minWidth'];
83
+ /** Maximum pane width passed to CDK. */
84
+ maxWidth?: OverlayConfig['maxWidth'];
85
+ /** Minimum pane height passed to CDK. */
86
+ minHeight?: OverlayConfig['minHeight'];
87
+ /** Maximum pane height passed to CDK. */
88
+ maxHeight?: OverlayConfig['maxHeight'];
89
+ }
90
+ /** Result type emitted when a dynamic overlay closes. */
91
+ type ZDynamicResult<TResult> = TResult | undefined;
92
+
93
+ /**
94
+ * Controls one free-form dynamic overlay instance.
95
+ *
96
+ * @template T Component instance type, when the overlay contains a component.
97
+ * @template TResult Value emitted after the overlay closes.
98
+ */
99
+ declare class ZDynamicRef<T = unknown, TResult = unknown> {
100
+ private readonly _overlayRef;
101
+ private readonly _platformId;
102
+ private readonly _destroy$;
103
+ private _isClosing;
104
+ private _componentRef;
105
+ /** Component instance attached to the overlay, or `null` for template content. */
106
+ componentInstance: T | null;
107
+ /** Emits the close result once, then completes. */
108
+ readonly afterClose: EventEmitter<ZDynamicResult<TResult>>;
109
+ constructor(_overlayRef: OverlayRef | undefined, _platformId: object);
110
+ private _closeOnBackdropClick;
111
+ private _closeOnEscape;
112
+ /** Configures close triggers for the instance. */
113
+ setCloseBehavior(closeOnBackdropClick: boolean, closeOnEscape: boolean): void;
114
+ /** Returns whether this ref has already been closed. */
115
+ isClosed(): boolean;
116
+ /** Closes the overlay and emits the optional result exactly once. */
117
+ close(result?: TResult): void;
118
+ /** Updates the overlay position using its configured strategy. */
119
+ updatePosition(): void;
120
+ /** Updates the overlay pane dimensions. */
121
+ updateSize(width?: string, height?: string): void;
122
+ /** @internal Used by the service after attaching a component portal. */
123
+ attachComponentRef(componentRef: ComponentRef<T>): void;
124
+ }
125
+
126
+ /**
127
+ * Opens components and templates in a bare CDK overlay.
128
+ *
129
+ * @description The service supplies overlay lifecycle and positioning only. The
130
+ * mounted content owns its complete layout, including close controls and styling.
131
+ */
132
+ declare class ZDynamicService {
133
+ private readonly _overlay;
134
+ private readonly _injector;
135
+ private readonly _platformId;
136
+ private readonly _zIndexService;
137
+ /** Alias for `open`, matching the create-style API used by modal and drawer services. */
138
+ create<T, TData = unknown, TResult = unknown>(content: ZDynamicContent<T>, options?: ZDynamicOptions<TData>): ZDynamicRef<T, TResult>;
139
+ /** Opens a component or template in a free-form CDK overlay. */
140
+ open<T, TData = unknown, TResult = unknown>(content: ZDynamicContent<T>, options?: ZDynamicOptions<TData>): ZDynamicRef<T, TResult>;
141
+ private _createOverlay;
142
+ private _isTemplate;
143
+ static ɵfac: i0.ɵɵFactoryDeclaration<ZDynamicService, never>;
144
+ static ɵprov: i0.ɵɵInjectableDeclaration<ZDynamicService>;
145
+ }
146
+
46
147
  type ZExcelAlign = 'left' | 'center' | 'right';
47
148
  interface ZExcelTableColumnConfig<T = unknown> {
48
149
  id: string;
@@ -589,6 +690,9 @@ declare function zBuildScopedCacheKey(baseKey: string): string;
589
690
  declare function zBuildScopedDbName(baseDbName: string): string;
590
691
  declare function zStripScopedCacheKey(key: string): string;
591
692
 
693
+ /** Injection token for data passed to a dynamic component or template. */
694
+ declare const Z_DYNAMIC_DATA: InjectionToken<unknown>;
695
+
592
696
  declare const Z_EXCEL_COLORS: {
593
697
  readonly 'green-50': "FFF0FDF4";
594
698
  readonly 'green-100': "FFDCFCE7";
@@ -667,5 +771,5 @@ interface ZTranslateI18nConfig {
667
771
  }
668
772
  declare const Z_LANG_CACHE_KEY = "Z_LANGUAGE";
669
773
 
670
- export { ZCacheService, ZExcelService, ZHttpAbstractService, ZIndexDbService, ZOverlayContainerService, ZOverlayZIndexService, ZSubjectService, ZThemeService, ZTranslateService, Z_DEFAULT_THEME, Z_EXCEL_BORDER_THIN, Z_EXCEL_CHAR_WIDTH_MAP, Z_EXCEL_COLORS, Z_EXCEL_DEFAULT_CONFIG, Z_EXCEL_FONT_MULTIPLIERS, Z_EXCEL_WIDTH_LIMITS, Z_HTTP_DEFAULT_CONFIG, Z_INDEXDB_BATCH_SIZE, Z_INDEXDB_DEFAULT_CONFIG, Z_INDEXDB_MAX_VERSION, Z_LANG_CACHE_KEY, Z_LANG_TO_LOCALE, Z_THEME_CONFIG, Z_THEME_CSS_MAP, Z_THEME_PREFERENCES_CACHE_KEY, zBuildScopedCacheKey, zBuildScopedDbName, zStripScopedCacheKey };
671
- export type { ZCacheConfig, ZCacheEntry, ZExcelAlign, ZExcelCell, ZExcelCellContext, ZExcelColumnConfig, ZExcelConfig, ZExcelDefaultConfig, ZExcelExportOptions, ZExcelExportResult, ZExcelFontConfig, ZExcelFromTableConfig, ZExcelHeaderColors, ZExcelHeaderContext, ZExcelSheetSource, ZExcelTableColumnConfig, ZExcelTableHeaderConfig, ZExcelToastHandler, ZHttpBaseOptions, ZHttpCacheEntry, ZHttpConfig, ZHttpContentType, ZHttpError, ZHttpNetworkCheck, ZHttpOptions, ZHttpParamsType, ZIndexDbConfig, ZIndexDbGetOptions, ZIndexDbSetOptions, ZIndexDbStoreConfig, ZTableToExcelColumn, ZThemeConfig, ZThemeName, ZThemePreferences, ZTranslateConfig, ZTranslateI18nConfig };
774
+ export { ZCacheService, ZDynamicRef, ZDynamicService, ZExcelService, ZHttpAbstractService, ZIndexDbService, ZOverlayContainerService, ZOverlayZIndexService, ZSubjectService, ZThemeService, ZTranslateService, Z_DEFAULT_THEME, Z_DYNAMIC_DATA, Z_EXCEL_BORDER_THIN, Z_EXCEL_CHAR_WIDTH_MAP, Z_EXCEL_COLORS, Z_EXCEL_DEFAULT_CONFIG, Z_EXCEL_FONT_MULTIPLIERS, Z_EXCEL_WIDTH_LIMITS, Z_HTTP_DEFAULT_CONFIG, Z_INDEXDB_BATCH_SIZE, Z_INDEXDB_DEFAULT_CONFIG, Z_INDEXDB_MAX_VERSION, Z_LANG_CACHE_KEY, Z_LANG_TO_LOCALE, Z_THEME_CONFIG, Z_THEME_CSS_MAP, Z_THEME_PREFERENCES_CACHE_KEY, zBuildScopedCacheKey, zBuildScopedDbName, zStripScopedCacheKey };
775
+ export type { ZCacheConfig, ZCacheEntry, ZDynamicContent, ZDynamicOptions, ZDynamicResult, ZDynamicTemplateContext, ZExcelAlign, ZExcelCell, ZExcelCellContext, ZExcelColumnConfig, ZExcelConfig, ZExcelDefaultConfig, ZExcelExportOptions, ZExcelExportResult, ZExcelFontConfig, ZExcelFromTableConfig, ZExcelHeaderColors, ZExcelHeaderContext, ZExcelSheetSource, ZExcelTableColumnConfig, ZExcelTableHeaderConfig, ZExcelToastHandler, ZHttpBaseOptions, ZHttpCacheEntry, ZHttpConfig, ZHttpContentType, ZHttpError, ZHttpNetworkCheck, ZHttpOptions, ZHttpParamsType, ZIndexDbConfig, ZIndexDbGetOptions, ZIndexDbSetOptions, ZIndexDbStoreConfig, ZTableToExcelColumn, ZThemeConfig, ZThemeName, ZThemePreferences, ZTranslateConfig, ZTranslateI18nConfig };