@shival99/z-ui 1.3.37 → 1.3.38
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/fesm2022/shival99-z-ui-components-z-chat-ai.mjs +236 -0
- package/fesm2022/shival99-z-ui-components-z-chat-ai.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-steps.mjs +57 -2
- package/fesm2022/shival99-z-ui-components-z-steps.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-tags.mjs +6 -5
- package/fesm2022/shival99-z-ui-components-z-tags.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-i18n.mjs +18 -0
- package/fesm2022/shival99-z-ui-i18n.mjs.map +1 -1
- package/package.json +5 -1
- package/types/shival99-z-ui-components-z-chat-ai.d.ts +120 -0
- package/types/shival99-z-ui-components-z-steps.d.ts +3 -1
- package/types/shival99-z-ui-components-z-tags.d.ts +2 -1
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ElementRef } from '@angular/core';
|
|
3
|
+
import { ClassValue } from 'clsx';
|
|
4
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
6
|
+
|
|
7
|
+
type ZChatAiPosition = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
8
|
+
type ZChatAiMessageType = 'user' | 'bot' | 'system';
|
|
9
|
+
type ZChatAiSuggestionColor = 'default' | 'blue' | 'green' | 'purple' | 'orange' | 'pink' | 'cyan' | 'yellow';
|
|
10
|
+
interface ZChatAiAttachment {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
size: number;
|
|
14
|
+
type: string;
|
|
15
|
+
url?: string;
|
|
16
|
+
progress?: number;
|
|
17
|
+
status?: 'uploading' | 'uploaded' | 'error';
|
|
18
|
+
}
|
|
19
|
+
interface ZChatAiMessage {
|
|
20
|
+
id: string;
|
|
21
|
+
type: ZChatAiMessageType;
|
|
22
|
+
content: string;
|
|
23
|
+
timestamp: Date;
|
|
24
|
+
attachments?: ZChatAiAttachment[];
|
|
25
|
+
isTyping?: boolean;
|
|
26
|
+
}
|
|
27
|
+
interface ZChatAiSuggestion {
|
|
28
|
+
id: string;
|
|
29
|
+
label: string;
|
|
30
|
+
value: string;
|
|
31
|
+
color?: ZChatAiSuggestionColor;
|
|
32
|
+
icon?: string;
|
|
33
|
+
}
|
|
34
|
+
interface ZChatAiConfig {
|
|
35
|
+
title?: string;
|
|
36
|
+
subtitle?: string;
|
|
37
|
+
placeholder?: string;
|
|
38
|
+
welcomeMessage?: string;
|
|
39
|
+
avatarUrl?: string;
|
|
40
|
+
botName?: string;
|
|
41
|
+
maxFileSize?: number;
|
|
42
|
+
allowedFileTypes?: string[];
|
|
43
|
+
maxFiles?: number;
|
|
44
|
+
}
|
|
45
|
+
interface ZChatAiSendEvent {
|
|
46
|
+
message: string;
|
|
47
|
+
attachments: ZChatAiAttachment[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
declare class ZChatAiComponent {
|
|
51
|
+
readonly class: _angular_core.InputSignal<ClassValue>;
|
|
52
|
+
readonly zPosition: _angular_core.InputSignal<ZChatAiPosition>;
|
|
53
|
+
readonly zPulse: _angular_core.InputSignal<boolean>;
|
|
54
|
+
readonly zMessages: _angular_core.InputSignal<ZChatAiMessage[]>;
|
|
55
|
+
readonly zSuggestions: _angular_core.InputSignal<ZChatAiSuggestion[]>;
|
|
56
|
+
readonly zConfig: _angular_core.InputSignal<ZChatAiConfig>;
|
|
57
|
+
readonly zTyping: _angular_core.InputSignal<boolean>;
|
|
58
|
+
readonly zOpen: _angular_core.ModelSignal<boolean>;
|
|
59
|
+
readonly zOnSend: _angular_core.OutputEmitterRef<ZChatAiSendEvent>;
|
|
60
|
+
readonly zOnSuggestionClick: _angular_core.OutputEmitterRef<ZChatAiSuggestion>;
|
|
61
|
+
readonly zOnAttachmentRemove: _angular_core.OutputEmitterRef<ZChatAiAttachment>;
|
|
62
|
+
protected readonly inputValue: _angular_core.WritableSignal<string>;
|
|
63
|
+
protected readonly attachments: _angular_core.WritableSignal<ZChatAiAttachment[]>;
|
|
64
|
+
protected readonly fileInputRef: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
65
|
+
protected readonly messagesContainerRef: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
66
|
+
protected readonly buttonWrapperClasses: _angular_core.Signal<string>;
|
|
67
|
+
protected readonly buttonClasses: _angular_core.Signal<string>;
|
|
68
|
+
protected readonly containerClasses: _angular_core.Signal<string>;
|
|
69
|
+
protected readonly inputClasses: _angular_core.Signal<string>;
|
|
70
|
+
protected readonly config: _angular_core.Signal<{
|
|
71
|
+
title: string;
|
|
72
|
+
subtitle: string;
|
|
73
|
+
placeholder: string;
|
|
74
|
+
welcomeMessage: string | undefined;
|
|
75
|
+
avatarUrl: string | undefined;
|
|
76
|
+
botName: string;
|
|
77
|
+
maxFileSize: number;
|
|
78
|
+
allowedFileTypes: string[];
|
|
79
|
+
maxFiles: number;
|
|
80
|
+
}>;
|
|
81
|
+
protected toggleOpen(): void;
|
|
82
|
+
protected close(): void;
|
|
83
|
+
protected getMessageClasses(type: ZChatAiMessage['type']): string;
|
|
84
|
+
protected getSuggestionClasses(color: ZChatAiSuggestion['color']): string;
|
|
85
|
+
protected sendMessage(): void;
|
|
86
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
87
|
+
protected onSuggestionClick(suggestion: ZChatAiSuggestion): void;
|
|
88
|
+
protected openFileDialog(): void;
|
|
89
|
+
protected onFileSelect(event: Event): void;
|
|
90
|
+
protected removeAttachment(attachment: ZChatAiAttachment): void;
|
|
91
|
+
protected formatFileSize(bytes: number): string;
|
|
92
|
+
protected scrollToBottom(): void;
|
|
93
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZChatAiComponent, never>;
|
|
94
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZChatAiComponent, "z-chat-ai", ["zChatAi"], { "class": { "alias": "class"; "required": false; "isSignal": true; }; "zPosition": { "alias": "zPosition"; "required": false; "isSignal": true; }; "zPulse": { "alias": "zPulse"; "required": false; "isSignal": true; }; "zMessages": { "alias": "zMessages"; "required": false; "isSignal": true; }; "zSuggestions": { "alias": "zSuggestions"; "required": false; "isSignal": true; }; "zConfig": { "alias": "zConfig"; "required": false; "isSignal": true; }; "zTyping": { "alias": "zTyping"; "required": false; "isSignal": true; }; "zOpen": { "alias": "zOpen"; "required": false; "isSignal": true; }; }, { "zOpen": "zOpenChange"; "zOnSend": "zOnSend"; "zOnSuggestionClick": "zOnSuggestionClick"; "zOnAttachmentRemove": "zOnAttachmentRemove"; }, never, never, true, never>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
declare const zChatAiButtonWrapperVariants: (props?: ({
|
|
98
|
+
zPosition?: "bottom-right" | "bottom-left" | "top-right" | "top-left" | null | undefined;
|
|
99
|
+
zPulse?: boolean | null | undefined;
|
|
100
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
101
|
+
type ZChatAiButtonWrapperVariants = VariantProps<typeof zChatAiButtonWrapperVariants>;
|
|
102
|
+
declare const zChatAiButtonVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
103
|
+
type ZChatAiButtonVariants = VariantProps<typeof zChatAiButtonVariants>;
|
|
104
|
+
declare const zChatAiContainerVariants: (props?: ({
|
|
105
|
+
zPosition?: "bottom-right" | "bottom-left" | "top-right" | "top-left" | null | undefined;
|
|
106
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
107
|
+
type ZChatAiContainerVariants = VariantProps<typeof zChatAiContainerVariants>;
|
|
108
|
+
declare const zChatAiMessageVariants: (props?: ({
|
|
109
|
+
zType?: "user" | "bot" | "system" | null | undefined;
|
|
110
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
111
|
+
type ZChatAiMessageVariants = VariantProps<typeof zChatAiMessageVariants>;
|
|
112
|
+
declare const zChatAiSuggestionVariants: (props?: ({
|
|
113
|
+
zColor?: "default" | "blue" | "green" | "purple" | "orange" | "pink" | "cyan" | "yellow" | null | undefined;
|
|
114
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
115
|
+
type ZChatAiSuggestionVariants = VariantProps<typeof zChatAiSuggestionVariants>;
|
|
116
|
+
declare const zChatAiInputVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
117
|
+
type ZChatAiInputVariants = VariantProps<typeof zChatAiInputVariants>;
|
|
118
|
+
|
|
119
|
+
export { ZChatAiComponent, zChatAiButtonVariants, zChatAiButtonWrapperVariants, zChatAiContainerVariants, zChatAiInputVariants, zChatAiMessageVariants, zChatAiSuggestionVariants };
|
|
120
|
+
export type { ZChatAiAttachment, ZChatAiButtonVariants, ZChatAiButtonWrapperVariants, ZChatAiConfig, ZChatAiContainerVariants, ZChatAiInputVariants, ZChatAiMessage, ZChatAiMessageType, ZChatAiMessageVariants, ZChatAiPosition, ZChatAiSendEvent, ZChatAiSuggestion, ZChatAiSuggestionColor, ZChatAiSuggestionVariants };
|
|
@@ -6,7 +6,7 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
7
7
|
|
|
8
8
|
type ZStepsOrientation = 'vertical' | 'horizontal';
|
|
9
|
-
type ZStepsType = 'default' | 'inline' | 'arrow';
|
|
9
|
+
type ZStepsType = 'default' | 'inline' | 'arrow' | 'dot';
|
|
10
10
|
type ZStepsSize = 'sm' | 'default' | 'lg';
|
|
11
11
|
type ZStepsStatus = 'pending' | 'current' | 'completed' | 'error';
|
|
12
12
|
interface ZStepItem {
|
|
@@ -58,6 +58,8 @@ declare class ZStepsComponent implements AfterViewInit {
|
|
|
58
58
|
protected readonly getConnectorClassesByIndex: _angular_core.Signal<string[]>;
|
|
59
59
|
protected readonly stepStatuses: _angular_core.Signal<ZStepsStatus[]>;
|
|
60
60
|
protected readonly getArrowClassesByIndex: _angular_core.Signal<string[]>;
|
|
61
|
+
protected readonly getDotClassesByIndex: _angular_core.Signal<string[]>;
|
|
62
|
+
protected readonly getDotLineClassesByIndex: _angular_core.Signal<string[]>;
|
|
61
63
|
protected readonly defaultIconSize: _angular_core.Signal<NonNullable<"10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "32" | "33" | "34" | "35" | "36" | "37" | "38" | "39" | "40" | null | undefined>>;
|
|
62
64
|
protected readonly getIconSizeByIndex: _angular_core.Signal<NonNullable<"10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "32" | "33" | "34" | "35" | "36" | "37" | "38" | "39" | "40" | null | undefined>[]>;
|
|
63
65
|
protected readonly iconWidth: _angular_core.Signal<24 | 40 | 32>;
|
|
@@ -32,6 +32,7 @@ declare class ZTagsComponent implements AfterViewInit {
|
|
|
32
32
|
readonly zAddText: _angular_core.InputSignal<string>;
|
|
33
33
|
readonly zAddPlaceholder: _angular_core.InputSignal<string>;
|
|
34
34
|
readonly zRandomColor: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
|
|
35
|
+
readonly zTagClass: _angular_core.InputSignal<ClassValue>;
|
|
35
36
|
readonly zTagClose: _angular_core.OutputEmitterRef<ZTagItem>;
|
|
36
37
|
readonly zTagAdd: _angular_core.OutputEmitterRef<string>;
|
|
37
38
|
protected readonly isAdding: _angular_core.WritableSignal<boolean>;
|
|
@@ -58,7 +59,7 @@ declare class ZTagsComponent implements AfterViewInit {
|
|
|
58
59
|
protected onAddCancel(): void;
|
|
59
60
|
protected onAddBlur(): void;
|
|
60
61
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZTagsComponent, never>;
|
|
61
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZTagsComponent, "z-tags", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; "zTags": { "alias": "zTags"; "required": false; "isSignal": true; }; "zSize": { "alias": "zSize"; "required": false; "isSignal": true; }; "zColor": { "alias": "zColor"; "required": false; "isSignal": true; }; "zClosable": { "alias": "zClosable"; "required": false; "isSignal": true; }; "zDisabled": { "alias": "zDisabled"; "required": false; "isSignal": true; }; "zAddable": { "alias": "zAddable"; "required": false; "isSignal": true; }; "zAddText": { "alias": "zAddText"; "required": false; "isSignal": true; }; "zAddPlaceholder": { "alias": "zAddPlaceholder"; "required": false; "isSignal": true; }; "zRandomColor": { "alias": "zRandomColor"; "required": false; "isSignal": true; }; }, { "zTagClose": "zTagClose"; "zTagAdd": "zTagAdd"; }, never, never, true, never>;
|
|
62
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZTagsComponent, "z-tags", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; "zTags": { "alias": "zTags"; "required": false; "isSignal": true; }; "zSize": { "alias": "zSize"; "required": false; "isSignal": true; }; "zColor": { "alias": "zColor"; "required": false; "isSignal": true; }; "zClosable": { "alias": "zClosable"; "required": false; "isSignal": true; }; "zDisabled": { "alias": "zDisabled"; "required": false; "isSignal": true; }; "zAddable": { "alias": "zAddable"; "required": false; "isSignal": true; }; "zAddText": { "alias": "zAddText"; "required": false; "isSignal": true; }; "zAddPlaceholder": { "alias": "zAddPlaceholder"; "required": false; "isSignal": true; }; "zRandomColor": { "alias": "zRandomColor"; "required": false; "isSignal": true; }; "zTagClass": { "alias": "zTagClass"; "required": false; "isSignal": true; }; }, { "zTagClose": "zTagClose"; "zTagAdd": "zTagAdd"; }, never, never, true, never>;
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
declare const zTagsContainerVariants: (props?: ({
|