@shival99/z-ui 1.0.1 → 1.0.3
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/README.md +50 -77
- package/assets/css/animations.css +207 -0
- package/assets/css/base.css +76 -0
- package/assets/css/tailwind.css +53 -0
- package/assets/css/themes/gray.css +73 -0
- package/assets/css/themes/green.css +75 -0
- package/assets/css/themes/hospital.css +79 -0
- package/assets/css/themes/neutral.css +73 -0
- package/assets/css/themes/orange.css +73 -0
- package/assets/css/themes/slate.css +73 -0
- package/assets/css/themes/stone.css +73 -0
- package/assets/css/themes/violet.css +73 -0
- package/assets/css/themes/zinc.css +73 -0
- package/assets/images/avatar.svg +6 -0
- package/assets/images/logo.svg +6 -0
- package/fesm2022/shival99-z-ui-components-z-accordion.mjs +148 -0
- package/fesm2022/shival99-z-ui-components-z-accordion.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-breadcrumb.mjs +74 -0
- package/fesm2022/shival99-z-ui-components-z-breadcrumb.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-button.mjs +155 -0
- package/fesm2022/shival99-z-ui-components-z-button.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs +2335 -0
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-checkbox.mjs +240 -0
- package/fesm2022/shival99-z-ui-components-z-checkbox.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-code.mjs +139 -0
- package/fesm2022/shival99-z-ui-components-z-code.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-drawer.mjs +664 -0
- package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs +55 -0
- package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-editor.mjs +411 -0
- package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-filter.mjs +794 -0
- package/fesm2022/shival99-z-ui-components-z-filter.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-icon.mjs +451 -0
- package/fesm2022/shival99-z-ui-components-z-icon.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-input.mjs +804 -0
- package/fesm2022/shival99-z-ui-components-z-input.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-loading.mjs +105 -0
- package/fesm2022/shival99-z-ui-components-z-loading.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-menu.mjs +351 -0
- package/fesm2022/shival99-z-ui-components-z-menu.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-modal.mjs +722 -0
- package/fesm2022/shival99-z-ui-components-z-modal.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs +131 -0
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-popover.mjs +917 -0
- package/fesm2022/shival99-z-ui-components-z-popover.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-radio.mjs +154 -0
- package/fesm2022/shival99-z-ui-components-z-radio.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-select.mjs +998 -0
- package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-skeleton.mjs +139 -0
- package/fesm2022/shival99-z-ui-components-z-skeleton.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-switch.mjs +127 -0
- package/fesm2022/shival99-z-ui-components-z-switch.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-table.mjs +2628 -0
- package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs +259 -0
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-timeline.mjs +335 -0
- package/fesm2022/shival99-z-ui-components-z-timeline.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-toast.mjs +93 -0
- package/fesm2022/shival99-z-ui-components-z-toast.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-tooltip.mjs +660 -0
- package/fesm2022/shival99-z-ui-components-z-tooltip.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-upload.mjs +504 -0
- package/fesm2022/shival99-z-ui-components-z-upload.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-i18n.mjs +258 -0
- package/fesm2022/shival99-z-ui-i18n.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-pipes.mjs +116 -0
- package/fesm2022/shival99-z-ui-pipes.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-providers.mjs +203 -0
- package/fesm2022/shival99-z-ui-providers.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-services.mjs +919 -0
- package/fesm2022/shival99-z-ui-services.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-utils.mjs +591 -0
- package/fesm2022/shival99-z-ui-utils.mjs.map +1 -0
- package/fesm2022/z-ui.mjs +3 -19924
- package/fesm2022/z-ui.mjs.map +1 -1
- package/package.json +132 -4
- package/types/shival99-z-ui-components-z-accordion.d.ts +55 -0
- package/types/shival99-z-ui-components-z-breadcrumb.d.ts +36 -0
- package/types/shival99-z-ui-components-z-button.d.ts +41 -0
- package/types/shival99-z-ui-components-z-calendar.d.ts +300 -0
- package/types/shival99-z-ui-components-z-checkbox.d.ts +84 -0
- package/types/shival99-z-ui-components-z-code.d.ts +35 -0
- package/types/shival99-z-ui-components-z-drawer.d.ts +232 -0
- package/types/shival99-z-ui-components-z-dropdown-menu.d.ts +50 -0
- package/types/shival99-z-ui-components-z-editor.d.ts +115 -0
- package/types/shival99-z-ui-components-z-filter.d.ts +268 -0
- package/types/shival99-z-ui-components-z-icon.d.ts +291 -0
- package/types/shival99-z-ui-components-z-input.d.ts +188 -0
- package/types/shival99-z-ui-components-z-loading.d.ts +46 -0
- package/types/shival99-z-ui-components-z-menu.d.ts +116 -0
- package/types/shival99-z-ui-components-z-modal.d.ts +270 -0
- package/types/shival99-z-ui-components-z-pagination.d.ts +52 -0
- package/types/shival99-z-ui-components-z-popover.d.ts +134 -0
- package/types/shival99-z-ui-components-z-radio.d.ts +63 -0
- package/types/shival99-z-ui-components-z-select.d.ts +268 -0
- package/types/shival99-z-ui-components-z-skeleton.d.ts +55 -0
- package/types/shival99-z-ui-components-z-switch.d.ts +48 -0
- package/types/shival99-z-ui-components-z-table.d.ts +482 -0
- package/types/shival99-z-ui-components-z-tabs.d.ts +75 -0
- package/types/shival99-z-ui-components-z-timeline.d.ts +98 -0
- package/types/shival99-z-ui-components-z-toast.d.ts +61 -0
- package/types/shival99-z-ui-components-z-tooltip.d.ts +85 -0
- package/types/shival99-z-ui-components-z-upload.d.ts +136 -0
- package/types/shival99-z-ui-i18n.d.ts +50 -0
- package/types/shival99-z-ui-pipes.d.ts +36 -0
- package/types/shival99-z-ui-providers.d.ts +132 -0
- package/types/shival99-z-ui-services.d.ts +364 -0
- package/types/shival99-z-ui-utils.d.ts +145 -0
- package/types/z-ui.d.ts +3 -4977
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef, Type, WritableSignal, EventEmitter, ViewContainerRef, InjectionToken, OnDestroy, AfterViewChecked, ComponentRef, EmbeddedViewRef } from '@angular/core';
|
|
3
|
+
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
|
|
4
|
+
import { ClassValue } from 'clsx';
|
|
5
|
+
import { NgScrollbar } from 'ngx-scrollbar';
|
|
6
|
+
import { ComponentType, OverlayRef } from '@angular/cdk/overlay';
|
|
7
|
+
import { ZIcon } from '@shival99/z-ui/components/z-icon';
|
|
8
|
+
import { Observable } from 'rxjs';
|
|
9
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
10
|
+
|
|
11
|
+
declare class ZDrawerContentDirective {
|
|
12
|
+
readonly templateRef: TemplateRef<any>;
|
|
13
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZDrawerContentDirective, never>;
|
|
14
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ZDrawerContentDirective, "[z-drawer-content], [zDrawerContent]", never, {}, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare class ZDrawerFooterDirective {
|
|
18
|
+
readonly templateRef: TemplateRef<any>;
|
|
19
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZDrawerFooterDirective, never>;
|
|
20
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ZDrawerFooterDirective, "[z-drawer-footer], [zDrawerFooter]", never, {}, {}, never, never, true, never>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare class ZDrawerHeaderDirective {
|
|
24
|
+
readonly templateRef: TemplateRef<any>;
|
|
25
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZDrawerHeaderDirective, never>;
|
|
26
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ZDrawerHeaderDirective, "[z-drawer-header], [zDrawerHeader]", never, {}, {}, never, never, true, never>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
type ZDrawerContentType<T> = ComponentType<T> | TemplateRef<T> | string;
|
|
30
|
+
type ZDrawerPlacement = 'left' | 'right' | 'top' | 'bottom';
|
|
31
|
+
declare const Z_DRAWER_DATA: InjectionToken<any>;
|
|
32
|
+
type ZDrawerOnClickCallBack<T> = (instance: T, drawerRef?: unknown) => false | void | object;
|
|
33
|
+
/**
|
|
34
|
+
* Configuration options for z-drawer component.
|
|
35
|
+
*
|
|
36
|
+
* @template T - The type of the content component
|
|
37
|
+
* @template U - The type of the data passed to the drawer
|
|
38
|
+
*/
|
|
39
|
+
declare class ZDrawerOptions<T, U> {
|
|
40
|
+
/** Icon for the cancel button */
|
|
41
|
+
zCancelIcon?: ZIcon;
|
|
42
|
+
/** Text for the cancel button. Set to null to hide the button */
|
|
43
|
+
zCancelText?: string | null;
|
|
44
|
+
/** Whether the drawer is closable (shows close button) */
|
|
45
|
+
zClosable?: boolean;
|
|
46
|
+
/** Drawer content - can be a component, template, or string */
|
|
47
|
+
zContent?: string | TemplateRef<T> | Type<T>;
|
|
48
|
+
/** Custom CSS classes for the drawer */
|
|
49
|
+
class?: ClassValue;
|
|
50
|
+
/** Data to be passed to the content component via Z_DRAWER_DATA token */
|
|
51
|
+
zData?: U;
|
|
52
|
+
/**
|
|
53
|
+
* Observable for deferred data loading before showing drawer content.
|
|
54
|
+
* Drawer will show a loading spinner until the Observable completes.
|
|
55
|
+
* The resolved data will be available via Z_DRAWER_DATA.
|
|
56
|
+
*/
|
|
57
|
+
zDefer?: Observable<U>;
|
|
58
|
+
/** Description text shown below the title */
|
|
59
|
+
zDescription?: string;
|
|
60
|
+
/** Whether to hide the default footer */
|
|
61
|
+
zHideFooter?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* WritableSignal to control loading state of the OK button.
|
|
64
|
+
* Use this when submitting forms or calling APIs.
|
|
65
|
+
*/
|
|
66
|
+
readonly zLoading?: WritableSignal<boolean>;
|
|
67
|
+
/** Whether clicking mask closes the drawer */
|
|
68
|
+
zMaskClosable?: boolean;
|
|
69
|
+
/** Whether OK button has destructive (red) style */
|
|
70
|
+
zOkDestructive?: boolean;
|
|
71
|
+
/** Whether OK button is disabled */
|
|
72
|
+
zOkDisabled?: boolean;
|
|
73
|
+
/** Overlay style: 'dark' (black overlay) or 'blur' (backdrop blur) */
|
|
74
|
+
zOverlay?: 'dark' | 'blur';
|
|
75
|
+
/** Icon for the OK button */
|
|
76
|
+
zOkIcon?: ZIcon;
|
|
77
|
+
/** Text for the OK button. Set to null to hide the button */
|
|
78
|
+
zOkText?: string | null;
|
|
79
|
+
/** Callback or EventEmitter when cancel is clicked */
|
|
80
|
+
zOnCancel?: EventEmitter<T> | ZDrawerOnClickCallBack<T>;
|
|
81
|
+
/** Callback or EventEmitter when OK is clicked */
|
|
82
|
+
zOnOk?: EventEmitter<T> | ZDrawerOnClickCallBack<T>;
|
|
83
|
+
/** Drawer title - supports string, HTML string, or TemplateRef */
|
|
84
|
+
zTitle?: string | TemplateRef<T>;
|
|
85
|
+
/** ViewContainerRef for the drawer portal */
|
|
86
|
+
zViewContainerRef?: ViewContainerRef;
|
|
87
|
+
/** Drawer width for left/right placement (e.g., '400px', '80%') */
|
|
88
|
+
zWidth?: string;
|
|
89
|
+
/** Drawer height for top/bottom placement (e.g., '400px', '50%') */
|
|
90
|
+
zHeight?: string;
|
|
91
|
+
/** Placement of the drawer: 'left', 'right', 'top', 'bottom' */
|
|
92
|
+
zPlacement?: ZDrawerPlacement;
|
|
93
|
+
/** Force shadow on header/footer regardless of scroll state */
|
|
94
|
+
zShadow?: boolean;
|
|
95
|
+
/** Shape of the drawer: 'rounded' (with border-radius) or 'square' (no border-radius) */
|
|
96
|
+
zShape?: 'rounded' | 'square';
|
|
97
|
+
/** WritableSignal to control content loading state (shows skeleton when true) */
|
|
98
|
+
readonly zContentLoading?: WritableSignal<boolean>;
|
|
99
|
+
/** Number of skeleton rows to show when content is loading (default: 5 for left/right, 3 for top/bottom) */
|
|
100
|
+
zSkeletonRows?: number;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
declare class ZDrawerRef<T = any, R = any, U = any> {
|
|
104
|
+
private readonly _overlayRef;
|
|
105
|
+
private readonly _config;
|
|
106
|
+
private readonly _containerInstance;
|
|
107
|
+
private readonly _platformId;
|
|
108
|
+
private readonly _destroy$;
|
|
109
|
+
private _isClosing;
|
|
110
|
+
private _result?;
|
|
111
|
+
componentInstance: T | null;
|
|
112
|
+
readonly loading: _angular_core.WritableSignal<boolean>;
|
|
113
|
+
constructor(_overlayRef: OverlayRef, _config: ZDrawerOptions<T, U>, _containerInstance: ZDrawerComponent<T, U>, _platformId: object);
|
|
114
|
+
setLoading(value: boolean): void;
|
|
115
|
+
close(result?: R): void;
|
|
116
|
+
private _trigger;
|
|
117
|
+
private _getContentComponent;
|
|
118
|
+
private _closeWithResult;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
type ZDrawerShape = 'rounded' | 'square';
|
|
122
|
+
declare const zDrawerVariants: (props?: ({
|
|
123
|
+
placement?: "left" | "right" | "top" | "bottom" | null | undefined;
|
|
124
|
+
shape?: "rounded" | "square" | null | undefined;
|
|
125
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
126
|
+
|
|
127
|
+
declare class ZDrawerComponent<T, U> extends BasePortalOutlet implements OnDestroy, AfterViewChecked {
|
|
128
|
+
zOnOk: _angular_core.OutputEmitterRef<void>;
|
|
129
|
+
zOnCancel: _angular_core.OutputEmitterRef<void>;
|
|
130
|
+
readonly class: _angular_core.InputSignal<ClassValue>;
|
|
131
|
+
readonly zVisible: _angular_core.ModelSignal<boolean>;
|
|
132
|
+
readonly zTitle: _angular_core.InputSignal<string | TemplateRef<unknown> | undefined>;
|
|
133
|
+
readonly zDescription: _angular_core.InputSignal<string | TemplateRef<unknown> | undefined>;
|
|
134
|
+
readonly zWidth: _angular_core.InputSignal<string>;
|
|
135
|
+
readonly zHeight: _angular_core.InputSignal<string>;
|
|
136
|
+
readonly zPlacement: _angular_core.InputSignal<ZDrawerPlacement>;
|
|
137
|
+
readonly zClosable: _angular_core.InputSignal<boolean>;
|
|
138
|
+
readonly zMaskClosable: _angular_core.InputSignal<boolean>;
|
|
139
|
+
readonly zHideFooter: _angular_core.InputSignal<boolean>;
|
|
140
|
+
readonly zOkText: _angular_core.InputSignal<string | null>;
|
|
141
|
+
readonly zCancelText: _angular_core.InputSignal<string | null>;
|
|
142
|
+
readonly zOkDestructive: _angular_core.InputSignal<boolean>;
|
|
143
|
+
readonly zOkDisabled: _angular_core.InputSignal<boolean>;
|
|
144
|
+
readonly zLoading: _angular_core.InputSignal<boolean>;
|
|
145
|
+
readonly zOverlay: _angular_core.InputSignal<"dark" | "blur">;
|
|
146
|
+
readonly zShadow: _angular_core.InputSignal<boolean>;
|
|
147
|
+
readonly zShape: _angular_core.InputSignal<ZDrawerShape>;
|
|
148
|
+
readonly zContentLoading: _angular_core.InputSignal<boolean>;
|
|
149
|
+
readonly zSkeletonRows: _angular_core.InputSignal<number | null>;
|
|
150
|
+
protected readonly customHeader: _angular_core.Signal<ZDrawerHeaderDirective | undefined>;
|
|
151
|
+
protected readonly customContent: _angular_core.Signal<ZDrawerContentDirective | undefined>;
|
|
152
|
+
protected readonly customFooter: _angular_core.Signal<ZDrawerFooterDirective | undefined>;
|
|
153
|
+
drawerRef?: ZDrawerRef<T>;
|
|
154
|
+
readonly portalOutlet: _angular_core.Signal<CdkPortalOutlet | undefined>;
|
|
155
|
+
protected readonly dummyTemplateRef: _angular_core.Signal<TemplateRef<unknown> | undefined>;
|
|
156
|
+
protected readonly mainContentRef: _angular_core.Signal<NgScrollbar | undefined>;
|
|
157
|
+
protected readonly config: ZDrawerOptions<T, U>;
|
|
158
|
+
private readonly _platformId;
|
|
159
|
+
private readonly _host;
|
|
160
|
+
private readonly _overlay;
|
|
161
|
+
private readonly _viewContainerRef;
|
|
162
|
+
private readonly _cdr;
|
|
163
|
+
private _templateOverlayRef;
|
|
164
|
+
private _originalParent;
|
|
165
|
+
private _originalNextSibling;
|
|
166
|
+
private _backdropSubscription;
|
|
167
|
+
protected readonly isLeaving: _angular_core.WritableSignal<boolean>;
|
|
168
|
+
protected readonly hasScrollableContent: _angular_core.WritableSignal<boolean>;
|
|
169
|
+
protected readonly isScrolledFromTop: _angular_core.WritableSignal<boolean>;
|
|
170
|
+
protected readonly isScrolledToBottom: _angular_core.WritableSignal<boolean>;
|
|
171
|
+
protected readonly isServiceMode: _angular_core.Signal<boolean>;
|
|
172
|
+
protected readonly isTemplateMode: _angular_core.Signal<boolean>;
|
|
173
|
+
protected readonly shouldRenderContent: _angular_core.Signal<boolean>;
|
|
174
|
+
protected readonly isStringContent: _angular_core.Signal<boolean>;
|
|
175
|
+
protected readonly shouldShowShadow: _angular_core.Signal<boolean>;
|
|
176
|
+
private _lastScrollHeight;
|
|
177
|
+
ngAfterViewChecked(): void;
|
|
178
|
+
private _checkScrollState;
|
|
179
|
+
onContentScroll(event: Event): void;
|
|
180
|
+
protected readonly effectiveTitle: _angular_core.Signal<string | TemplateRef<unknown> | undefined>;
|
|
181
|
+
protected readonly effectiveDescription: _angular_core.Signal<string | TemplateRef<unknown> | undefined>;
|
|
182
|
+
protected readonly effectiveClosable: _angular_core.Signal<boolean>;
|
|
183
|
+
protected readonly effectiveHideFooter: _angular_core.Signal<boolean | undefined>;
|
|
184
|
+
protected readonly effectiveOkText: _angular_core.Signal<string | null | undefined>;
|
|
185
|
+
protected readonly effectiveCancelText: _angular_core.Signal<string | null | undefined>;
|
|
186
|
+
protected readonly effectiveOkDestructive: _angular_core.Signal<boolean | undefined>;
|
|
187
|
+
protected readonly effectiveOkDisabled: _angular_core.Signal<boolean | undefined>;
|
|
188
|
+
protected readonly effectiveLoading: _angular_core.Signal<boolean>;
|
|
189
|
+
protected readonly effectiveContentLoading: _angular_core.Signal<boolean>;
|
|
190
|
+
protected readonly effectiveSkeletonRows: _angular_core.Signal<number>;
|
|
191
|
+
protected readonly effectivePlacement: _angular_core.Signal<ZDrawerPlacement>;
|
|
192
|
+
protected readonly effectiveShadow: _angular_core.Signal<boolean>;
|
|
193
|
+
protected readonly effectiveShape: _angular_core.Signal<ZDrawerShape>;
|
|
194
|
+
protected readonly effectiveWidth: _angular_core.Signal<string | null>;
|
|
195
|
+
protected readonly effectiveHeight: _angular_core.Signal<string | null>;
|
|
196
|
+
protected readonly isDeferLoading: _angular_core.Signal<boolean>;
|
|
197
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
198
|
+
protected readonly hostClasses: _angular_core.Signal<string>;
|
|
199
|
+
constructor();
|
|
200
|
+
ngOnDestroy(): void;
|
|
201
|
+
getNativeElement(): HTMLElement;
|
|
202
|
+
attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
|
|
203
|
+
attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;
|
|
204
|
+
onOkClick(): void;
|
|
205
|
+
onCloseClick(): void;
|
|
206
|
+
onBackdropClick(): void;
|
|
207
|
+
open(): void;
|
|
208
|
+
close(): void;
|
|
209
|
+
private _createOverlay;
|
|
210
|
+
private _openTemplateOverlay;
|
|
211
|
+
private _closeWithAnimation;
|
|
212
|
+
private _disposeTemplateOverlay;
|
|
213
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZDrawerComponent<any, any>, never>;
|
|
214
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZDrawerComponent<any, any>, "z-drawer", ["zDrawer"], { "class": { "alias": "class"; "required": false; "isSignal": true; }; "zVisible": { "alias": "zVisible"; "required": false; "isSignal": true; }; "zTitle": { "alias": "zTitle"; "required": false; "isSignal": true; }; "zDescription": { "alias": "zDescription"; "required": false; "isSignal": true; }; "zWidth": { "alias": "zWidth"; "required": false; "isSignal": true; }; "zHeight": { "alias": "zHeight"; "required": false; "isSignal": true; }; "zPlacement": { "alias": "zPlacement"; "required": false; "isSignal": true; }; "zClosable": { "alias": "zClosable"; "required": false; "isSignal": true; }; "zMaskClosable": { "alias": "zMaskClosable"; "required": false; "isSignal": true; }; "zHideFooter": { "alias": "zHideFooter"; "required": false; "isSignal": true; }; "zOkText": { "alias": "zOkText"; "required": false; "isSignal": true; }; "zCancelText": { "alias": "zCancelText"; "required": false; "isSignal": true; }; "zOkDestructive": { "alias": "zOkDestructive"; "required": false; "isSignal": true; }; "zOkDisabled": { "alias": "zOkDisabled"; "required": false; "isSignal": true; }; "zLoading": { "alias": "zLoading"; "required": false; "isSignal": true; }; "zOverlay": { "alias": "zOverlay"; "required": false; "isSignal": true; }; "zShadow": { "alias": "zShadow"; "required": false; "isSignal": true; }; "zShape": { "alias": "zShape"; "required": false; "isSignal": true; }; "zContentLoading": { "alias": "zContentLoading"; "required": false; "isSignal": true; }; "zSkeletonRows": { "alias": "zSkeletonRows"; "required": false; "isSignal": true; }; }, { "zOnOk": "zOnOk"; "zOnCancel": "zOnCancel"; "zVisible": "zVisibleChange"; }, ["customHeader", "customContent", "customFooter"], ["*"], true, never>;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
declare class ZDrawerService {
|
|
218
|
+
private readonly _overlay;
|
|
219
|
+
private readonly _injector;
|
|
220
|
+
private readonly _platformId;
|
|
221
|
+
create<T, U>(config: ZDrawerOptions<T, U>): ZDrawerRef<T>;
|
|
222
|
+
private _open;
|
|
223
|
+
private _createOverlay;
|
|
224
|
+
private _attachDrawerContainer;
|
|
225
|
+
private _attachDrawerContent;
|
|
226
|
+
private _createInjector;
|
|
227
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZDrawerService, never>;
|
|
228
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ZDrawerService>;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export { ZDrawerComponent, ZDrawerContentDirective, ZDrawerFooterDirective, ZDrawerHeaderDirective, ZDrawerOptions, ZDrawerRef, ZDrawerService, Z_DRAWER_DATA, zDrawerVariants };
|
|
232
|
+
export type { ZDrawerContentType, ZDrawerPlacement };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import { ZPopoverPosition } from '@shival99/z-ui/components/z-popover';
|
|
4
|
+
import { ZIcon } from '@shival99/z-ui/components/z-icon';
|
|
5
|
+
|
|
6
|
+
interface ZDropdownMenuItem {
|
|
7
|
+
label: string;
|
|
8
|
+
icon?: ZIcon;
|
|
9
|
+
shortcut?: string;
|
|
10
|
+
class?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
hidden?: boolean;
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
divide?: 'before' | 'after';
|
|
15
|
+
submenu?: ZDropdownMenuItem[];
|
|
16
|
+
submenuPosition?: ZPopoverPosition;
|
|
17
|
+
subMinWidth?: number;
|
|
18
|
+
subMaxWidth?: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare class ZDropdownMenuComponent {
|
|
22
|
+
readonly zItems: _angular_core.InputSignal<ZDropdownMenuItem[]>;
|
|
23
|
+
readonly zLabel: _angular_core.InputSignal<string | undefined>;
|
|
24
|
+
readonly zIcon: _angular_core.InputSignal<"lucideLayers2" | "lucideStore" | "lucideChartBarStacked" | "lucideBookCheck" | "lucideAlarmClock" | "lucideClipboardPlus" | "lucideSave" | "lucideSaveAll" | "lucideFlag" | "lucideFlagTriangleRight" | "lucideMessageSquareDot" | "lucideCheckCheck" | "lucideTriangleAlert" | "lucideMessageSquareWarning" | "lucideCheck" | "lucidePencil" | "lucideMail" | "lucideLayoutGrid" | "lucideArrowLeft" | "lucideArrowRight" | "lucideMenu" | "lucideLock" | "lucideLogOut" | "lucideUser" | "lucideSettings" | "lucidePill" | "lucideCalendarFold" | "lucideSettings2" | "lucideChevronLeft" | "lucideChevronRight" | "lucideChevronDown" | "lucidePlus" | "lucideSearch" | "lucideUsers" | "lucideEye" | "lucideEyeOff" | "lucideEllipsis" | "lucidePanelLeftClose" | "lucidePanelLeftOpen" | "lucideLayoutDashboard" | "lucideChartColumn" | "lucideUsersRound" | "lucideLogs" | "lucideChevronUp" | "lucideTrendingUp" | "lucidePackage" | "lucideShoppingCart" | "lucideUserCheck" | "lucideActivity" | "lucideZap" | "lucideMousePointer" | "lucideInfo" | "lucideLayers" | "lucideBriefcase" | "lucideTarget" | "lucideWorkflow" | "lucideWarehouse" | "lucideLoaderCircle" | "lucideChevronsLeft" | "lucideChevronsRight" | "lucideBellRing" | "lucideSlidersHorizontal" | "lucideTrash2" | "lucideFileDown" | "lucideFunnel" | "lucideAlignJustify" | "lucideX" | "lucideFiles" | "lucideCrown" | "lucideBadgeInfo" | "lucideMinus" | "lucideBox" | "lucideCog" | "lucideBellMinus" | "lucidePackageOpen" | "lucideInbox" | "lucideClock" | "lucideBookOpen" | "lucideCalendar" | "lucideCalculator" | "lucideClipboardList" | "lucideDatabase" | "lucideDollarSign" | "lucideFileText" | "lucideGraduationCap" | "lucideHeart" | "lucideHospital" | "lucideMapPin" | "lucideMonitor" | "lucidePhone" | "lucideShield" | "lucideStar" | "lucideStethoscope" | "lucideTimer" | "lucideTrendingDown" | "lucideUserPlus" | "lucideVideo" | "lucideWallet" | "lucideWrench" | "lucideBuilding2" | "lucideCar" | "lucideCreditCard" | "lucideFileSpreadsheet" | "lucideGlobe" | "lucideHeadphones" | "lucideKey" | "lucideLightbulb" | "lucideMailCheck" | "lucideNetwork" | "lucidePalette" | "lucidePhoneCall" | "lucidePrinter" | "lucideRadio" | "lucideServer" | "lucideSmartphone" | "lucideTablet" | "lucideTerminal" | "lucideTruck" | "lucideWifi" | "lucideRefreshCcw" | "lucideLockKeyhole" | "lucideArrowDown" | "lucideArrowUp" | "lucideUserLock" | "lucideCircleCheck" | "lucideHouse" | "lucideChartBar" | "lucideChartPie" | "lucideChartLine" | "lucideCalendarRange" | "lucideCalendar1" | "lucideCalendarCheck" | "lucideNotepadText" | "lucideFileUp" | "lucideTableOfContents" | "lucideBot" | "lucideSend" | "lucidePause" | "lucidePaperclip" | "saxPauseBold" | "lucideCopy" | "lucideUserRoundPen" | "lucideFilePenLine" | "lucideArrowDownUp" | "lucideCircleX" | "lucideCheckLine" | "lucideBadgeCheck" | "lucideShieldCheck" | "lucideCircleCheckBig" | "lucideBadgeX" | "lucideLockKeyholeOpen" | "lucideFileSymlink" | "lucideWifiZero" | "lucideCloudCheck" | "lucideMailPlus" | "lucideHardDriveDownload" | "saxCloudChangeBold" | "saxRefreshBold" | "lucideBarcode" | "lucideCode" | "lucideScanQrCode" | "lucideQrCode" | "lucideScanLine" | "lucideListPlus" | "lucideFilePlus" | "lucideFilePlus2" | "lucideBookUp2" | "lucideFileClock" | "lucideRefreshCwOff" | "lucideListChecks" | "lucideFastForward" | "lucideBrushCleaning" | "lucideChartColumnIncreasing" | "lucideBell" | "lucideCheckCircle2" | "lucideAlertCircle" | "lucideXCircle" | "lucideLink" | "lucideDatabaseBackup" | "lucideFileCheck" | "lucideListChevronsDownUp" | "lucideListChevronsUpDown" | "lucideSun" | "lucideMoon" | "lucideLoader" | "lucideAlertOctagon" | "lucideMessageCircle" | "lucideCircleAlert" | "lucideMessageCircleQuestion" | "lucideComponent" | "lucidePanelRightOpen" | "lucideLoader2" | "lucideGithub" | "lucideLifeBuoy" | "lucideCloud" | "lucideBarChart" | "lucideHome" | "lucideFolderOpen" | "lucideSquarePen" | "lucideLayoutTemplate" | "lucideFileOutput" | "lucideCircleHelp" | "lucideGripHorizontal" | "lucideImage" | "lucideList" | "lucideHash" | "lucideMegaphone" | "lucidePenTool" | "lucideSquare" | "lucideRocket" | "lucideBarChart3" | "lucideUsers2" | "lucideGrid3x3" | "lucideFolderTree" | "lucideCheckCircle" | "lucideSliders" | "lucideFileEdit" | "lucideNavigation" | "lucideListFilter" | "lucideTextCursor" | "lucidePieChart" | "lucideUserSearch" | "lucideFolders" | "lucideSparkles" | "lucideSquareCheck" | "lucideCircleDot" | "lucideToggleLeft" | "lucideUpload" | "lucideUploadCloud" | "lucideDownload" | "lucideFile" | "lucideMusic" | "lucideFileCode" | "lucideFileJson" | "lucideFileArchive" | "lucideTable2" | "lucideGripVertical" | "lucidePin" | "lucideSearchX" | "lucideMoreVertical" | "lucideGitBranch" | "lucideAlertTriangle" | "lucideFilter" | "lucideFunnelX" | "lucideBan" | "lucideBuilding" | "lucideType">;
|
|
25
|
+
readonly zButtonType: _angular_core.InputSignal<"primary" | "secondary" | "outline" | "ghost">;
|
|
26
|
+
readonly zPosition: _angular_core.InputSignal<ZPopoverPosition>;
|
|
27
|
+
readonly zOffset: _angular_core.InputSignal<number>;
|
|
28
|
+
readonly zMinWidth: _angular_core.InputSignal<number>;
|
|
29
|
+
readonly zMaxWidth: _angular_core.InputSignal<number>;
|
|
30
|
+
readonly zDisabled: _angular_core.InputSignal<boolean>;
|
|
31
|
+
readonly triggerTemplate: _angular_core.Signal<TemplateRef<unknown> | undefined>;
|
|
32
|
+
readonly zOnItemClick: _angular_core.OutputEmitterRef<ZDropdownMenuItem>;
|
|
33
|
+
protected readonly popoverControl: _angular_core.WritableSignal<{
|
|
34
|
+
close: () => void;
|
|
35
|
+
closeImmediate: () => void;
|
|
36
|
+
} | null>;
|
|
37
|
+
protected onItemClick(item: ZDropdownMenuItem): void;
|
|
38
|
+
protected onControl(control: {
|
|
39
|
+
close: () => void;
|
|
40
|
+
closeImmediate: () => void;
|
|
41
|
+
}): void;
|
|
42
|
+
protected shouldShowDividerBefore(item: ZDropdownMenuItem, index: number): boolean;
|
|
43
|
+
protected shouldShowDividerAfter(item: ZDropdownMenuItem, index: number): boolean;
|
|
44
|
+
protected getVisibleItems(): ZDropdownMenuItem[];
|
|
45
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZDropdownMenuComponent, never>;
|
|
46
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZDropdownMenuComponent, "z-dropdown-menu", never, { "zItems": { "alias": "zItems"; "required": true; "isSignal": true; }; "zLabel": { "alias": "zLabel"; "required": false; "isSignal": true; }; "zIcon": { "alias": "zIcon"; "required": false; "isSignal": true; }; "zButtonType": { "alias": "zButtonType"; "required": false; "isSignal": true; }; "zPosition": { "alias": "zPosition"; "required": false; "isSignal": true; }; "zOffset": { "alias": "zOffset"; "required": false; "isSignal": true; }; "zMinWidth": { "alias": "zMinWidth"; "required": false; "isSignal": true; }; "zMaxWidth": { "alias": "zMaxWidth"; "required": false; "isSignal": true; }; "zDisabled": { "alias": "zDisabled"; "required": false; "isSignal": true; }; }, { "zOnItemClick": "zOnItemClick"; }, ["triggerTemplate"], never, true, never>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { ZDropdownMenuComponent };
|
|
50
|
+
export type { ZDropdownMenuItem };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Signal, OnInit } from '@angular/core';
|
|
3
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
4
|
+
import { ClassValue } from 'clsx';
|
|
5
|
+
import { QuillModules, ContentChange } from 'ngx-quill';
|
|
6
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
7
|
+
import { VariantProps } from 'class-variance-authority';
|
|
8
|
+
|
|
9
|
+
type ZEditorSize = 'sm' | 'default' | 'lg';
|
|
10
|
+
interface ZEditorControl {
|
|
11
|
+
focus: () => void;
|
|
12
|
+
blur: () => void;
|
|
13
|
+
clear: () => void;
|
|
14
|
+
setContent: (content: string) => void;
|
|
15
|
+
getContent: () => string;
|
|
16
|
+
getText: () => string;
|
|
17
|
+
getLength: () => number;
|
|
18
|
+
validate: () => void;
|
|
19
|
+
reset: () => void;
|
|
20
|
+
markAsTouched: () => void;
|
|
21
|
+
markAsUntouched: () => void;
|
|
22
|
+
markAsDirty: () => void;
|
|
23
|
+
markAsPristine: () => void;
|
|
24
|
+
setValue: (content: string) => void;
|
|
25
|
+
hasError: Signal<boolean>;
|
|
26
|
+
value: Signal<string>;
|
|
27
|
+
errorMessage: Signal<string>;
|
|
28
|
+
}
|
|
29
|
+
interface ZEditorValidator {
|
|
30
|
+
error: string;
|
|
31
|
+
message: string;
|
|
32
|
+
pattern?: RegExp;
|
|
33
|
+
minLength?: number;
|
|
34
|
+
maxLength?: number;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare class ZEditorComponent implements OnInit, ControlValueAccessor {
|
|
38
|
+
readonly class: _angular_core.InputSignal<ClassValue>;
|
|
39
|
+
readonly zSize: _angular_core.InputSignal<ZEditorSize>;
|
|
40
|
+
readonly zLabel: _angular_core.InputSignal<string>;
|
|
41
|
+
readonly zLabelClass: _angular_core.InputSignal<string>;
|
|
42
|
+
readonly zPlaceholder: _angular_core.InputSignal<string>;
|
|
43
|
+
readonly zRequired: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
|
|
44
|
+
readonly zDisabled: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
|
|
45
|
+
readonly zReadonly: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
|
|
46
|
+
readonly zModules: _angular_core.InputSignal<QuillModules | null>;
|
|
47
|
+
readonly zFormats: _angular_core.InputSignal<string[] | null>;
|
|
48
|
+
readonly zBounds: _angular_core.InputSignal<string | HTMLElement>;
|
|
49
|
+
readonly zTheme: _angular_core.InputSignal<"snow" | "bubble">;
|
|
50
|
+
readonly zValidators: _angular_core.InputSignal<ZEditorValidator[]>;
|
|
51
|
+
readonly zOnChange: _angular_core.OutputEmitterRef<string>;
|
|
52
|
+
readonly zOnFocus: _angular_core.OutputEmitterRef<void>;
|
|
53
|
+
readonly zOnBlur: _angular_core.OutputEmitterRef<void>;
|
|
54
|
+
readonly zControl: _angular_core.OutputEmitterRef<ZEditorControl>;
|
|
55
|
+
protected readonly editorId: string;
|
|
56
|
+
private readonly _value;
|
|
57
|
+
private readonly _touched;
|
|
58
|
+
private readonly _disabled;
|
|
59
|
+
private readonly _dirty;
|
|
60
|
+
private readonly _formControl;
|
|
61
|
+
private readonly _formStateVersion;
|
|
62
|
+
private readonly _isNgModel;
|
|
63
|
+
private readonly _injector;
|
|
64
|
+
private readonly _destroyRef;
|
|
65
|
+
private _onChange;
|
|
66
|
+
private _onTouched;
|
|
67
|
+
private _ngControl;
|
|
68
|
+
private _editorInstance;
|
|
69
|
+
protected readonly isDisabled: _angular_core.Signal<boolean>;
|
|
70
|
+
protected readonly internalValue: _angular_core.Signal<string>;
|
|
71
|
+
protected readonly effectiveModules: _angular_core.Signal<QuillModules>;
|
|
72
|
+
private readonly _shouldShowValidation;
|
|
73
|
+
private _getValidationErrors;
|
|
74
|
+
protected readonly hasError: _angular_core.Signal<boolean>;
|
|
75
|
+
protected readonly showError: _angular_core.Signal<boolean>;
|
|
76
|
+
protected readonly errorMessage: _angular_core.Signal<string>;
|
|
77
|
+
protected readonly currentStatus: _angular_core.Signal<"default" | "disabled" | "readonly" | "error">;
|
|
78
|
+
protected readonly wrapperClasses: _angular_core.Signal<string>;
|
|
79
|
+
protected readonly labelClasses: _angular_core.Signal<string>;
|
|
80
|
+
protected readonly editorClasses: _angular_core.Signal<string>;
|
|
81
|
+
ngOnInit(): void;
|
|
82
|
+
writeValue(value: string): void;
|
|
83
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
84
|
+
registerOnTouched(fn: () => void): void;
|
|
85
|
+
setDisabledState(isDisabled: boolean): void;
|
|
86
|
+
protected onContentChange(event: ContentChange): void;
|
|
87
|
+
protected onFocus(): void;
|
|
88
|
+
protected onBlur(): void;
|
|
89
|
+
focus(): void;
|
|
90
|
+
blur(): void;
|
|
91
|
+
clear(): void;
|
|
92
|
+
setContent(content: string): void;
|
|
93
|
+
getContent(): string;
|
|
94
|
+
getText(): string;
|
|
95
|
+
getLength(): number;
|
|
96
|
+
markAsTouched(): void;
|
|
97
|
+
markAsDirty(): void;
|
|
98
|
+
markAsPristine(): void;
|
|
99
|
+
markAsUntouched(): void;
|
|
100
|
+
setValue(content: string): void;
|
|
101
|
+
validate(): void;
|
|
102
|
+
reset(): void;
|
|
103
|
+
private _emitControl;
|
|
104
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZEditorComponent, never>;
|
|
105
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZEditorComponent, "z-editor", ["zEditor"], { "class": { "alias": "class"; "required": false; "isSignal": true; }; "zSize": { "alias": "zSize"; "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; }; "zRequired": { "alias": "zRequired"; "required": false; "isSignal": true; }; "zDisabled": { "alias": "zDisabled"; "required": false; "isSignal": true; }; "zReadonly": { "alias": "zReadonly"; "required": false; "isSignal": true; }; "zModules": { "alias": "zModules"; "required": false; "isSignal": true; }; "zFormats": { "alias": "zFormats"; "required": false; "isSignal": true; }; "zBounds": { "alias": "zBounds"; "required": false; "isSignal": true; }; "zTheme": { "alias": "zTheme"; "required": false; "isSignal": true; }; "zValidators": { "alias": "zValidators"; "required": false; "isSignal": true; }; }, { "zOnChange": "zOnChange"; "zOnFocus": "zOnFocus"; "zOnBlur": "zOnBlur"; "zControl": "zControl"; }, never, never, true, never>;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
declare const zEditorVariants: (props?: ({
|
|
109
|
+
zSize?: "sm" | "default" | "lg" | null | undefined;
|
|
110
|
+
zStatus?: "default" | "error" | "disabled" | "readonly" | null | undefined;
|
|
111
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
112
|
+
type ZEditorVariants = VariantProps<typeof zEditorVariants>;
|
|
113
|
+
|
|
114
|
+
export { ZEditorComponent, zEditorVariants };
|
|
115
|
+
export type { ZEditorControl, ZEditorSize, ZEditorValidator, ZEditorVariants };
|