@ng-nest/ui 20.2.4 → 20.2.5
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/bubble/index.d.ts +20 -2
- package/checkbox/index.d.ts +1 -1
- package/core/index.d.ts +3 -0
- package/fesm2022/ng-nest-ui-attachments.mjs +0 -1
- package/fesm2022/ng-nest-ui-attachments.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-bubble.mjs +101 -18
- package/fesm2022/ng-nest-ui-bubble.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-ripple.mjs +8 -4
- package/fesm2022/ng-nest-ui-ripple.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-select.mjs +8 -10
- package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-textarea.mjs +25 -7
- package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
- package/package.json +74 -74
- package/radio/index.d.ts +1 -1
- package/textarea/index.d.ts +34 -5
package/bubble/index.d.ts
CHANGED
|
@@ -19,6 +19,16 @@ declare class XBubbleProperty extends XBubbleProperty_base {
|
|
|
19
19
|
* @en_US Bubble content
|
|
20
20
|
*/
|
|
21
21
|
readonly content: _angular_core.InputSignal<XTemplate | undefined>;
|
|
22
|
+
/**
|
|
23
|
+
* @zh_CN 推理内容
|
|
24
|
+
* @en_US reasoning content
|
|
25
|
+
*/
|
|
26
|
+
readonly reasoningContent: _angular_core.InputSignal<XTemplate | undefined>;
|
|
27
|
+
/**
|
|
28
|
+
* @zh_CN 推理标题
|
|
29
|
+
* @en_US reasoning title
|
|
30
|
+
*/
|
|
31
|
+
readonly reasoningTitle: _angular_core.InputSignal<XTemplate>;
|
|
22
32
|
/**
|
|
23
33
|
* @zh_CN 头像
|
|
24
34
|
* @en_US Avatar
|
|
@@ -90,7 +100,7 @@ declare class XBubbleProperty extends XBubbleProperty_base {
|
|
|
90
100
|
*/
|
|
91
101
|
readonly typingEnd: _angular_core.OutputEmitterRef<void>;
|
|
92
102
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<XBubbleProperty, never>;
|
|
93
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<XBubbleProperty, "x-bubble-property", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "avatar": { "alias": "avatar"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "header": { "alias": "header"; "required": false; "isSignal": true; }; "footer": { "alias": "footer"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "typing": { "alias": "typing"; "required": false; "isSignal": true; }; "speed": { "alias": "speed"; "required": false; "isSignal": true; }; "renderer": { "alias": "renderer"; "required": false; "isSignal": true; }; "showCursor": { "alias": "showCursor"; "required": false; "isSignal": true; }; }, { "typingStart": "typingStart"; "typingOuput": "typingOuput"; "typingEnd": "typingEnd"; }, never, never, true, never>;
|
|
103
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<XBubbleProperty, "x-bubble-property", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "reasoningContent": { "alias": "reasoningContent"; "required": false; "isSignal": true; }; "reasoningTitle": { "alias": "reasoningTitle"; "required": false; "isSignal": true; }; "avatar": { "alias": "avatar"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "header": { "alias": "header"; "required": false; "isSignal": true; }; "footer": { "alias": "footer"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "typing": { "alias": "typing"; "required": false; "isSignal": true; }; "speed": { "alias": "speed"; "required": false; "isSignal": true; }; "renderer": { "alias": "renderer"; "required": false; "isSignal": true; }; "showCursor": { "alias": "showCursor"; "required": false; "isSignal": true; }; }, { "typingStart": "typingStart"; "typingOuput": "typingOuput"; "typingEnd": "typingEnd"; }, never, never, true, never>;
|
|
94
104
|
}
|
|
95
105
|
/**
|
|
96
106
|
* @zh_CN 头像配置,继承了组件 Avatar 相关属性
|
|
@@ -149,7 +159,7 @@ declare class XBubbleComponent extends XBubbleProperty {
|
|
|
149
159
|
renderer2: Renderer2;
|
|
150
160
|
cdr: ChangeDetectorRef;
|
|
151
161
|
private bubbles;
|
|
152
|
-
|
|
162
|
+
wrapperRef: _angular_core.Signal<ElementRef<HTMLElement> | undefined>;
|
|
153
163
|
classMap: _angular_core.Signal<{
|
|
154
164
|
[x: string]: boolean;
|
|
155
165
|
"x-bubble-cursor": boolean;
|
|
@@ -159,16 +169,24 @@ declare class XBubbleComponent extends XBubbleProperty {
|
|
|
159
169
|
typedContentObserver: rxjs.Observable<string>;
|
|
160
170
|
pendingContent: _angular_core.WritableSignal<string>;
|
|
161
171
|
pendingContentObserver: rxjs.Observable<string>;
|
|
172
|
+
reasoningTypedContent: _angular_core.WritableSignal<string>;
|
|
173
|
+
reasoningTypedContentObserver: rxjs.Observable<string>;
|
|
174
|
+
reasoningPendingContent: _angular_core.WritableSignal<string>;
|
|
175
|
+
reasoningRenderedContent: _angular_core.WritableSignal<SafeHtml>;
|
|
176
|
+
reasoningToggle: _angular_core.WritableSignal<boolean>;
|
|
162
177
|
private typingInterval;
|
|
163
178
|
renderedContent: _angular_core.WritableSignal<SafeHtml>;
|
|
164
179
|
sizeSignal: _angular_core.Signal<_ng_nest_ui_core.XSize>;
|
|
165
180
|
variantSignal: _angular_core.Signal<XBubbleVariant>;
|
|
166
181
|
isTemplate: _angular_core.Signal<boolean>;
|
|
167
182
|
isString: _angular_core.Signal<boolean>;
|
|
183
|
+
isReasoningTemplate: _angular_core.Signal<boolean>;
|
|
184
|
+
isReasoningString: _angular_core.Signal<boolean>;
|
|
168
185
|
constructor();
|
|
169
186
|
ngOnChanges(changes: SimpleChanges): void;
|
|
170
187
|
private startTyping;
|
|
171
188
|
private stopTyping;
|
|
189
|
+
onReasoningToggle(): void;
|
|
172
190
|
ngOnDestroy(): void;
|
|
173
191
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<XBubbleComponent, never>;
|
|
174
192
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<XBubbleComponent, "x-bubble", never, {}, {}, never, never, true, never>;
|
package/checkbox/index.d.ts
CHANGED
|
@@ -333,7 +333,7 @@ declare class XCheckboxComponent extends XCheckboxProperty implements OnChanges,
|
|
|
333
333
|
labelMapSignal: _angular_core.Signal<{
|
|
334
334
|
[x: string]: boolean;
|
|
335
335
|
}>;
|
|
336
|
-
checkboxType: _angular_core.Signal<"
|
|
336
|
+
checkboxType: _angular_core.Signal<"button" | "icon" | "tag" | "initial">;
|
|
337
337
|
constructor();
|
|
338
338
|
ngOnChanges(changes: SimpleChanges): void;
|
|
339
339
|
ngOnDestroy(): void;
|
package/core/index.d.ts
CHANGED
|
@@ -1299,6 +1299,7 @@ interface XButtonsConfig {
|
|
|
1299
1299
|
round?: boolean;
|
|
1300
1300
|
}
|
|
1301
1301
|
interface XBubbleConfig {
|
|
1302
|
+
reasoningTitle?: XTemplate;
|
|
1302
1303
|
variant?: 'outlined' | 'filled' | 'shadow' | 'borderless';
|
|
1303
1304
|
size?: XSize;
|
|
1304
1305
|
}
|
|
@@ -1779,6 +1780,8 @@ interface XTreeConfig {
|
|
|
1779
1780
|
includeChildren?: boolean;
|
|
1780
1781
|
}
|
|
1781
1782
|
interface XTextareaConfig {
|
|
1783
|
+
floatLabel?: XFloatLabel;
|
|
1784
|
+
floatFixed?: boolean;
|
|
1782
1785
|
variant?: XVariant;
|
|
1783
1786
|
clearable?: boolean;
|
|
1784
1787
|
iconLayout?: XPositionLeftRight;
|
|
@@ -283,7 +283,6 @@ class XFileCardComponent extends XFileCardProperty {
|
|
|
283
283
|
return index > -1 ? name.substring(index + 1).toLowerCase() : '';
|
|
284
284
|
}, ...(ngDevMode ? [{ debugName: "nameSubfix" }] : []));
|
|
285
285
|
this.defaultIcon = computed(() => {
|
|
286
|
-
console.log(this.nameSubfix());
|
|
287
286
|
if (Object.keys(defaultIcon).includes(this.nameSubfix())) {
|
|
288
287
|
return defaultIcon[this.nameSubfix()];
|
|
289
288
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-nest-ui-attachments.mjs","sources":["../../../../lib/ng-nest/ui/attachments/attachments.property.ts","../../../../lib/ng-nest/ui/attachments/attachments.component.ts","../../../../lib/ng-nest/ui/attachments/attachments.component.html","../../../../lib/ng-nest/ui/attachments/file-card.component.ts","../../../../lib/ng-nest/ui/attachments/file-card.component.html","../../../../lib/ng-nest/ui/attachments/attachments.module.ts","../../../../lib/ng-nest/ui/attachments/ng-nest-ui-attachments.ts"],"sourcesContent":["import { Component, ElementRef, input, output } from '@angular/core';\r\nimport { XBoolean, XNumber, XPropertyFunction, XTemplate, XToBoolean, XToNumber } from '@ng-nest/ui/core';\r\nimport { XUploadMultipleModel, XUploadNode, XUploadType } from '@ng-nest/ui/upload';\r\nimport { XFormControlFunction } from '@ng-nest/ui/base-form';\r\n\r\n/**\r\n * Attachments\r\n * @selector x-attachments\r\n * @decorator component\r\n */\r\nexport const XAttachmentsPrefix = 'x-attachments';\r\nconst X_ATTACHMENTS_CONFIG_NAME = 'attachments';\r\n\r\n/**\r\n * Attachments Property\r\n */\r\n@Component({ selector: `${XAttachmentsPrefix}-property`, template: '' })\r\nexport class XAttachmentsProperty extends XFormControlFunction(X_ATTACHMENTS_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 请求地址\r\n * @en_US Request address\r\n */\r\n readonly action = input<string>();\r\n /**\r\n * @zh_CN 可拖拽上传的区域\r\n * @en_US Drag and drop upload area\r\n */\r\n readonly dropContainer = input<ElementRef | HTMLElement>();\r\n /**\r\n * @zh_CN 可拖拽上传的区域的图标\r\n * @en_US Drag and drop upload area icon\r\n */\r\n readonly dropIcon = input<XTemplate>();\r\n /**\r\n * @zh_CN 可拖拽上传的区域的标题\r\n * @en_US Drag and drop upload area title\r\n */\r\n readonly dropTitle = input<XTemplate>();\r\n /**\r\n * @zh_CN 可拖拽上传的区域的描述\r\n * @en_US Drag and drop upload area description\r\n */\r\n readonly dropDescription = input<XTemplate>();\r\n /**\r\n * @zh_CN 直接显示可拖拽上传的区域\r\n * @en_US Show the drag and drop upload area directly\r\n */\r\n readonly showDrop = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 上传文件类型,与原生的 input file 组件一致\r\n * @en_US Upload file type, consistent with native input file component\r\n */\r\n readonly accept = input<string>();\r\n /**\r\n * @zh_CN 文件显示类型\r\n * @en_US File display type\r\n */\r\n readonly type = input<XUploadType>('list');\r\n /**\r\n * @zh_CN 图片类型下面加载失败显示\r\n * @en_US Photo type below loading failed display\r\n */\r\n readonly imgFallback = input<string>();\r\n /**\r\n * @zh_CN 图片剪裁\r\n * @en_US Picture cropping\r\n */\r\n readonly imgCut = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 多文件上传\r\n * @en_US Multiple file upload\r\n */\r\n readonly multiple = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 点击下载\r\n * @en_US click download\r\n */\r\n readonly download = input<boolean, XBoolean>(this.config?.download ?? true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 多次上传的模式,cover 覆盖现有, add 继续添加\r\n * @en_US For many upload mode, 'cover' covers the existing, 'add' continue to add\r\n */\r\n readonly multipleModel = input<XUploadMultipleModel>(this.config?.multipleModel ?? 'cover');\r\n /**\r\n * @zh_CN 文件列表自定义显示模板\r\n * @en_US File list custom display template\r\n */\r\n readonly filesTpl = input<XTemplate>();\r\n /**\r\n * @zh_CN 限制单次上传文件个数,只有开启多文件上传 multiple 时生效,默认不做限制\r\n * @en_US Limit the number of files uploaded files. Do not restrict the default\r\n */\r\n readonly maxLimit = input<number, XNumber>(-1, { transform: XToNumber });\r\n /**\r\n * @zh_CN 设置上传的请求头部\r\n * @en_US Set the upload request header\r\n */\r\n readonly headers = input<{ [key: string]: any }>();\r\n /**\r\n * @zh_CN 删除按钮的事件\r\n * @en_US Delete button event\r\n */\r\n readonly removeClick = output<{ file: XUploadNode; index: number }>();\r\n /**\r\n * @zh_CN 开始上传事件\r\n * @en_US Start upload event\r\n */\r\n readonly uploadReady = output<XUploadNode>();\r\n /**\r\n * @zh_CN 正在上传事件\r\n * @en_US Start upload event\r\n */\r\n readonly uploading = output<XUploadNode>();\r\n /**\r\n * @zh_CN 上传成功事件\r\n * @en_US Start upload event\r\n */\r\n readonly uploadSuccess = output<XUploadNode>();\r\n /**\r\n * @zh_CN 上传失败事件\r\n * @en_US Start upload event\r\n */\r\n readonly uploadError = output<XUploadNode>();\r\n}\r\n\r\n/**\r\n * FileCard\r\n * @selector x-file-card\r\n * @decorator component\r\n */\r\nexport const XFileCardPrefix = 'x-file-card';\r\nexport const X_FILE_CARD_CONFIG_NAME = 'fileCard';\r\n\r\n/**\r\n * FileCard Property\r\n */\r\n@Component({ selector: `${XFileCardPrefix}-property`, template: '' })\r\nexport class XFileCardProperty extends XPropertyFunction(X_FILE_CARD_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 图标\r\n * @en_US Icon\r\n */\r\n readonly icon = input<XTemplate>();\r\n /**\r\n * @zh_CN 图标颜色\r\n * @en_US Icon color\r\n */\r\n readonly iconColor = input<string>();\r\n /**\r\n * @zh_CN 文件名\r\n * @en_US File name\r\n */\r\n readonly name = input<XTemplate>();\r\n /**\r\n * @zh_CN 文件大小\r\n * @en_US File size\r\n */\r\n readonly size = input<number, XNumber>(0, { transform: XToNumber });\r\n /**\r\n * @zh_CN 文件描述\r\n * @en_US File description\r\n */\r\n readonly description = input<XTemplate>();\r\n /**\r\n * @zh_CN 文件类型\r\n * @en_US File type\r\n */\r\n readonly type = input<XFileCard>('file');\r\n /**\r\n * @zh_CN 文件/图片链接地址\r\n * @en_US File/image url\r\n */\r\n readonly url = input<string>();\r\n /**\r\n * @zh_CN 形态变体\r\n * @en_US Bubble variant\r\n */\r\n readonly variant = input<XFileCardVariant>(this.config?.variant ?? 'outlined');\r\n}\r\n\r\n/**\r\n * @zh_CN 文件卡片类型\r\n * @en_US File card type\r\n */\r\nexport type XFileCard = 'file' | 'img';\r\n\r\n/**\r\n * @zh_CN 形态变体\r\n * @en_US Bubble variant\r\n */\r\nexport type XFileCardVariant = 'outlined' | 'filled' | 'shadow' | 'borderless';\r\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\r\nimport { XAttachmentsProperty } from './attachments.property';\r\nimport { XUploadComponent } from '@ng-nest/ui/upload';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\n\r\n@Component({\r\n selector: 'x-attachments',\r\n templateUrl: './attachments.component.html',\r\n styleUrls: ['./attachments.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [FormsModule, XUploadComponent],\r\n providers: [XValueAccessor(XAttachmentsComponent)]\r\n})\r\nexport class XAttachmentsComponent extends XAttachmentsProperty {\r\n valueChange(value: any) {\r\n this.onChange && this.onChange(value);\r\n }\r\n}\r\n","<div class=\"x-attachments\">\r\n <x-upload\r\n [(ngModel)]=\"value\"\r\n (ngModelChange)=\"valueChange($event)\"\r\n [action]=\"action()\"\r\n [dropContainer]=\"dropContainer()\"\r\n [dropIcon]=\"dropIcon()\"\r\n [dropTitle]=\"dropTitle()\"\r\n [dropDescription]=\"dropDescription()\"\r\n [showDrop]=\"showDrop()\"\r\n [text]=\"textTpl\"\r\n [accept]=\"accept()\"\r\n [type]=\"type()\"\r\n [imgFallback]=\"imgFallback()\"\r\n [imgCut]=\"imgCut()\"\r\n [multiple]=\"multiple()\"\r\n [download]=\"download()\"\r\n [multipleModel]=\"multipleModel()\"\r\n [filesTpl]=\"filesTpl() ?? innerfilesTpl\"\r\n [maxLimit]=\"maxLimit()\"\r\n [headers]=\"headers()\"\r\n (removeClick)=\"removeClick.emit($event)\"\r\n (uploadReady)=\"uploadReady.emit($event)\"\r\n (uploading)=\"uploading.emit($event)\"\r\n (uploadSuccess)=\"uploadSuccess.emit($event)\"\r\n (uploadError)=\"uploadError.emit($event)\"\r\n ></x-upload>\r\n <ng-template #textTpl>\r\n <ng-content></ng-content>\r\n </ng-template>\r\n <ng-template #innerfilesTpl></ng-template>\r\n</div>\r\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed } from '@angular/core';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\nimport { XFileCardPrefix, XFileCardProperty } from './attachments.property';\r\nimport { XFileSize, XIsEmpty, XIsString } from '@ng-nest/ui/core';\r\nimport { NgClass } from '@angular/common';\r\nimport { XImageComponent } from '@ng-nest/ui/image';\r\n\r\nconst defaultIcon: { [key: string]: string } = {\r\n xlsx: 'adf-file-excel',\r\n xls: 'adf-file-excel',\r\n docx: 'adf-file-word',\r\n doc: 'adf-file-word',\r\n ppt: 'adf-file-ppt',\r\n pptx: 'adf-file-ppt',\r\n pdf: 'adf-file-pdf',\r\n zip: 'adf-file-zip',\r\n rar: 'adf-file-zip',\r\n '7z': 'adf-file-zip',\r\n png: 'adf-file-image',\r\n jpg: 'adf-file-image',\r\n jpeg: 'adf-file-image',\r\n gif: 'adf-file-image',\r\n bmp: 'adf-file-image',\r\n md: 'adf-file-markdown',\r\n txt: 'adf-file-text',\r\n mp4: 'adf-video-camera',\r\n avi: 'adf-video-camera',\r\n mkv: 'adf-video-camera',\r\n mov: 'adf-video-camera',\r\n mp3: 'adf-audio',\r\n wav: 'adf-audio',\r\n flac: 'adf-audio',\r\n default: 'adf-file'\r\n};\r\n\r\nconst defaultIconColors: { [key: string]: string } = {\r\n 'adf-file-excel': '#217346',\r\n 'adf-file-word': '#2b579a',\r\n 'adf-file-ppt': '#d24726',\r\n 'adf-file-pdf': '#dc3545',\r\n 'adf-file-zip': '#6c757d',\r\n 'adf-file-image': '#ffc107',\r\n 'adf-file-markdown': '#000000',\r\n 'adf-file-text': '#6c757d',\r\n 'adf-video-camera': '#ff6b6b',\r\n 'adf-audio': '#007bff',\r\n 'adf-file': '#6c757d'\r\n};\r\n\r\n@Component({\r\n selector: 'x-file-card',\r\n templateUrl: './file-card.component.html',\r\n styleUrl: './file-card.component.scss',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [XOutletDirective, XImageComponent, XIconComponent, NgClass]\r\n})\r\nexport class XFileCardComponent extends XFileCardProperty {\r\n iconString = computed(() => {\r\n if (XIsString(this.icon())) {\r\n return this.icon() as string;\r\n } else {\r\n return '';\r\n }\r\n });\r\n descriptionString = computed(() => {\r\n if (XIsString(this.description())) {\r\n return this.description() as string;\r\n } else {\r\n return '';\r\n }\r\n });\r\n sizeTransform = computed(() => {\r\n if (this.size() && this.size() !== 0) {\r\n return XFileSize(this.size(), { precision: 0 });\r\n } else {\r\n return '';\r\n }\r\n });\r\n nameSubfix = computed(() => {\r\n const name = this.name() as string;\r\n const index = name.lastIndexOf('.');\r\n return index > -1 ? name.substring(index + 1).toLowerCase() : '';\r\n });\r\n defaultIcon = computed(() => {\r\n console.log(this.nameSubfix());\r\n if (Object.keys(defaultIcon).includes(this.nameSubfix())) {\r\n return defaultIcon[this.nameSubfix()];\r\n } else {\r\n return defaultIcon['default'];\r\n }\r\n });\r\n defaultColor = computed(() => {\r\n return defaultIconColors[this.defaultIcon()];\r\n });\r\n classMap = computed(() => ({\r\n [`${XFileCardPrefix}-${this.variant()}`]: !XIsEmpty(this.variant())\r\n }));\r\n isImage = computed(() => {\r\n const imageExtensions = ['png', 'jpg', 'jpeg', 'gif', 'bmp'];\r\n return imageExtensions.includes(this.nameSubfix().toLowerCase());\r\n });\r\n}\r\n","<div class=\"x-file-card\" [ngClass]=\"classMap()\" [class.x-file-card-image]=\"isImage() && !!url()\">\r\n @if (isImage() && !!url()) {\r\n <x-image width=\"100px\" height=\"100px\" [src]=\"url()\" [alt]=\"descriptionString()\"></x-image>\r\n } @else {\r\n @if (icon()) {\r\n <div class=\"x-file-card-icon\">\r\n <ng-container *xOutlet=\"icon()\">\r\n <x-icon [type]=\"iconString()\" [style.color]=\"iconColor()\"></x-icon>\r\n </ng-container>\r\n </div>\r\n } @else {\r\n <div class=\"x-file-card-icon\">\r\n <x-icon [type]=\"defaultIcon()\" [style.color]=\"iconColor() ?? defaultColor()\"></x-icon>\r\n </div>\r\n }\r\n <div class=\"x-file-card-content\">\r\n @if (name()) {\r\n <div class=\"x-file-card-name\">\r\n <ng-container *xOutlet=\"name()\">{{ name() }}</ng-container>\r\n </div>\r\n }\r\n @if (size()) {\r\n <div class=\"x-file-card-size\">\r\n {{ sizeTransform() }}\r\n </div>\r\n }\r\n @if (description()) {\r\n <div class=\"x-file-card-description\">\r\n <ng-container *xOutlet=\"description()\">{{ description() }}</ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XAttachmentsComponent } from './attachments.component';\r\nimport { XFileCardComponent } from './file-card.component';\r\n\r\n@NgModule({\r\n exports: [XAttachmentsComponent, XFileCardComponent],\r\n imports: [XAttachmentsComponent, XFileCardComponent]\r\n})\r\nexport class XAttachmentsModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAKA;;;;AAIG;AACI,MAAM,kBAAkB,GAAG;AAClC,MAAM,yBAAyB,GAAG,aAAa;AAE/C;;AAEG;MAEU,oBAAqB,SAAQ,oBAAoB,CAAC,yBAAyB,CAAC,CAAA;AADzF,IAAA,WAAA,GAAA;;AAEE;;;AAGG;QACM,IAAA,CAAA,MAAM,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,QAAA,EAAA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,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAFnB,qBAAqB,EAAE,kBAAkB,CAAA,EAAA,OAAA,EAAA,CADzC,qBAAqB,EAAE,kBAAkB,CAAA,EAAA,CAAA,CAAA;kIAGxC,kBAAkB,EAAA,OAAA,EAAA,CAFnB,qBAAqB,EAAE,kBAAkB,CAAA,EAAA,CAAA,CAAA;;2FAExC,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,qBAAqB,EAAE,kBAAkB,CAAC;AACpD,oBAAA,OAAO,EAAE,CAAC,qBAAqB,EAAE,kBAAkB;AACpD,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-nest-ui-attachments.mjs","sources":["../../../../lib/ng-nest/ui/attachments/attachments.property.ts","../../../../lib/ng-nest/ui/attachments/attachments.component.ts","../../../../lib/ng-nest/ui/attachments/attachments.component.html","../../../../lib/ng-nest/ui/attachments/file-card.component.ts","../../../../lib/ng-nest/ui/attachments/file-card.component.html","../../../../lib/ng-nest/ui/attachments/attachments.module.ts","../../../../lib/ng-nest/ui/attachments/ng-nest-ui-attachments.ts"],"sourcesContent":["import { Component, ElementRef, input, output } from '@angular/core';\r\nimport { XBoolean, XNumber, XPropertyFunction, XTemplate, XToBoolean, XToNumber } from '@ng-nest/ui/core';\r\nimport { XUploadMultipleModel, XUploadNode, XUploadType } from '@ng-nest/ui/upload';\r\nimport { XFormControlFunction } from '@ng-nest/ui/base-form';\r\n\r\n/**\r\n * Attachments\r\n * @selector x-attachments\r\n * @decorator component\r\n */\r\nexport const XAttachmentsPrefix = 'x-attachments';\r\nconst X_ATTACHMENTS_CONFIG_NAME = 'attachments';\r\n\r\n/**\r\n * Attachments Property\r\n */\r\n@Component({ selector: `${XAttachmentsPrefix}-property`, template: '' })\r\nexport class XAttachmentsProperty extends XFormControlFunction(X_ATTACHMENTS_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 请求地址\r\n * @en_US Request address\r\n */\r\n readonly action = input<string>();\r\n /**\r\n * @zh_CN 可拖拽上传的区域\r\n * @en_US Drag and drop upload area\r\n */\r\n readonly dropContainer = input<ElementRef | HTMLElement>();\r\n /**\r\n * @zh_CN 可拖拽上传的区域的图标\r\n * @en_US Drag and drop upload area icon\r\n */\r\n readonly dropIcon = input<XTemplate>();\r\n /**\r\n * @zh_CN 可拖拽上传的区域的标题\r\n * @en_US Drag and drop upload area title\r\n */\r\n readonly dropTitle = input<XTemplate>();\r\n /**\r\n * @zh_CN 可拖拽上传的区域的描述\r\n * @en_US Drag and drop upload area description\r\n */\r\n readonly dropDescription = input<XTemplate>();\r\n /**\r\n * @zh_CN 直接显示可拖拽上传的区域\r\n * @en_US Show the drag and drop upload area directly\r\n */\r\n readonly showDrop = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 上传文件类型,与原生的 input file 组件一致\r\n * @en_US Upload file type, consistent with native input file component\r\n */\r\n readonly accept = input<string>();\r\n /**\r\n * @zh_CN 文件显示类型\r\n * @en_US File display type\r\n */\r\n readonly type = input<XUploadType>('list');\r\n /**\r\n * @zh_CN 图片类型下面加载失败显示\r\n * @en_US Photo type below loading failed display\r\n */\r\n readonly imgFallback = input<string>();\r\n /**\r\n * @zh_CN 图片剪裁\r\n * @en_US Picture cropping\r\n */\r\n readonly imgCut = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 多文件上传\r\n * @en_US Multiple file upload\r\n */\r\n readonly multiple = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 点击下载\r\n * @en_US click download\r\n */\r\n readonly download = input<boolean, XBoolean>(this.config?.download ?? true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 多次上传的模式,cover 覆盖现有, add 继续添加\r\n * @en_US For many upload mode, 'cover' covers the existing, 'add' continue to add\r\n */\r\n readonly multipleModel = input<XUploadMultipleModel>(this.config?.multipleModel ?? 'cover');\r\n /**\r\n * @zh_CN 文件列表自定义显示模板\r\n * @en_US File list custom display template\r\n */\r\n readonly filesTpl = input<XTemplate>();\r\n /**\r\n * @zh_CN 限制单次上传文件个数,只有开启多文件上传 multiple 时生效,默认不做限制\r\n * @en_US Limit the number of files uploaded files. Do not restrict the default\r\n */\r\n readonly maxLimit = input<number, XNumber>(-1, { transform: XToNumber });\r\n /**\r\n * @zh_CN 设置上传的请求头部\r\n * @en_US Set the upload request header\r\n */\r\n readonly headers = input<{ [key: string]: any }>();\r\n /**\r\n * @zh_CN 删除按钮的事件\r\n * @en_US Delete button event\r\n */\r\n readonly removeClick = output<{ file: XUploadNode; index: number }>();\r\n /**\r\n * @zh_CN 开始上传事件\r\n * @en_US Start upload event\r\n */\r\n readonly uploadReady = output<XUploadNode>();\r\n /**\r\n * @zh_CN 正在上传事件\r\n * @en_US Start upload event\r\n */\r\n readonly uploading = output<XUploadNode>();\r\n /**\r\n * @zh_CN 上传成功事件\r\n * @en_US Start upload event\r\n */\r\n readonly uploadSuccess = output<XUploadNode>();\r\n /**\r\n * @zh_CN 上传失败事件\r\n * @en_US Start upload event\r\n */\r\n readonly uploadError = output<XUploadNode>();\r\n}\r\n\r\n/**\r\n * FileCard\r\n * @selector x-file-card\r\n * @decorator component\r\n */\r\nexport const XFileCardPrefix = 'x-file-card';\r\nexport const X_FILE_CARD_CONFIG_NAME = 'fileCard';\r\n\r\n/**\r\n * FileCard Property\r\n */\r\n@Component({ selector: `${XFileCardPrefix}-property`, template: '' })\r\nexport class XFileCardProperty extends XPropertyFunction(X_FILE_CARD_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 图标\r\n * @en_US Icon\r\n */\r\n readonly icon = input<XTemplate>();\r\n /**\r\n * @zh_CN 图标颜色\r\n * @en_US Icon color\r\n */\r\n readonly iconColor = input<string>();\r\n /**\r\n * @zh_CN 文件名\r\n * @en_US File name\r\n */\r\n readonly name = input<XTemplate>();\r\n /**\r\n * @zh_CN 文件大小\r\n * @en_US File size\r\n */\r\n readonly size = input<number, XNumber>(0, { transform: XToNumber });\r\n /**\r\n * @zh_CN 文件描述\r\n * @en_US File description\r\n */\r\n readonly description = input<XTemplate>();\r\n /**\r\n * @zh_CN 文件类型\r\n * @en_US File type\r\n */\r\n readonly type = input<XFileCard>('file');\r\n /**\r\n * @zh_CN 文件/图片链接地址\r\n * @en_US File/image url\r\n */\r\n readonly url = input<string>();\r\n /**\r\n * @zh_CN 形态变体\r\n * @en_US Bubble variant\r\n */\r\n readonly variant = input<XFileCardVariant>(this.config?.variant ?? 'outlined');\r\n}\r\n\r\n/**\r\n * @zh_CN 文件卡片类型\r\n * @en_US File card type\r\n */\r\nexport type XFileCard = 'file' | 'img';\r\n\r\n/**\r\n * @zh_CN 形态变体\r\n * @en_US Bubble variant\r\n */\r\nexport type XFileCardVariant = 'outlined' | 'filled' | 'shadow' | 'borderless';\r\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\r\nimport { XAttachmentsProperty } from './attachments.property';\r\nimport { XUploadComponent } from '@ng-nest/ui/upload';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\n\r\n@Component({\r\n selector: 'x-attachments',\r\n templateUrl: './attachments.component.html',\r\n styleUrls: ['./attachments.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [FormsModule, XUploadComponent],\r\n providers: [XValueAccessor(XAttachmentsComponent)]\r\n})\r\nexport class XAttachmentsComponent extends XAttachmentsProperty {\r\n valueChange(value: any) {\r\n this.onChange && this.onChange(value);\r\n }\r\n}\r\n","<div class=\"x-attachments\">\r\n <x-upload\r\n [(ngModel)]=\"value\"\r\n (ngModelChange)=\"valueChange($event)\"\r\n [action]=\"action()\"\r\n [dropContainer]=\"dropContainer()\"\r\n [dropIcon]=\"dropIcon()\"\r\n [dropTitle]=\"dropTitle()\"\r\n [dropDescription]=\"dropDescription()\"\r\n [showDrop]=\"showDrop()\"\r\n [text]=\"textTpl\"\r\n [accept]=\"accept()\"\r\n [type]=\"type()\"\r\n [imgFallback]=\"imgFallback()\"\r\n [imgCut]=\"imgCut()\"\r\n [multiple]=\"multiple()\"\r\n [download]=\"download()\"\r\n [multipleModel]=\"multipleModel()\"\r\n [filesTpl]=\"filesTpl() ?? innerfilesTpl\"\r\n [maxLimit]=\"maxLimit()\"\r\n [headers]=\"headers()\"\r\n (removeClick)=\"removeClick.emit($event)\"\r\n (uploadReady)=\"uploadReady.emit($event)\"\r\n (uploading)=\"uploading.emit($event)\"\r\n (uploadSuccess)=\"uploadSuccess.emit($event)\"\r\n (uploadError)=\"uploadError.emit($event)\"\r\n ></x-upload>\r\n <ng-template #textTpl>\r\n <ng-content></ng-content>\r\n </ng-template>\r\n <ng-template #innerfilesTpl></ng-template>\r\n</div>\r\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed } from '@angular/core';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\nimport { XFileCardPrefix, XFileCardProperty } from './attachments.property';\r\nimport { XFileSize, XIsEmpty, XIsString } from '@ng-nest/ui/core';\r\nimport { NgClass } from '@angular/common';\r\nimport { XImageComponent } from '@ng-nest/ui/image';\r\n\r\nconst defaultIcon: { [key: string]: string } = {\r\n xlsx: 'adf-file-excel',\r\n xls: 'adf-file-excel',\r\n docx: 'adf-file-word',\r\n doc: 'adf-file-word',\r\n ppt: 'adf-file-ppt',\r\n pptx: 'adf-file-ppt',\r\n pdf: 'adf-file-pdf',\r\n zip: 'adf-file-zip',\r\n rar: 'adf-file-zip',\r\n '7z': 'adf-file-zip',\r\n png: 'adf-file-image',\r\n jpg: 'adf-file-image',\r\n jpeg: 'adf-file-image',\r\n gif: 'adf-file-image',\r\n bmp: 'adf-file-image',\r\n md: 'adf-file-markdown',\r\n txt: 'adf-file-text',\r\n mp4: 'adf-video-camera',\r\n avi: 'adf-video-camera',\r\n mkv: 'adf-video-camera',\r\n mov: 'adf-video-camera',\r\n mp3: 'adf-audio',\r\n wav: 'adf-audio',\r\n flac: 'adf-audio',\r\n default: 'adf-file'\r\n};\r\n\r\nconst defaultIconColors: { [key: string]: string } = {\r\n 'adf-file-excel': '#217346',\r\n 'adf-file-word': '#2b579a',\r\n 'adf-file-ppt': '#d24726',\r\n 'adf-file-pdf': '#dc3545',\r\n 'adf-file-zip': '#6c757d',\r\n 'adf-file-image': '#ffc107',\r\n 'adf-file-markdown': '#000000',\r\n 'adf-file-text': '#6c757d',\r\n 'adf-video-camera': '#ff6b6b',\r\n 'adf-audio': '#007bff',\r\n 'adf-file': '#6c757d'\r\n};\r\n\r\n@Component({\r\n selector: 'x-file-card',\r\n templateUrl: './file-card.component.html',\r\n styleUrl: './file-card.component.scss',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [XOutletDirective, XImageComponent, XIconComponent, NgClass]\r\n})\r\nexport class XFileCardComponent extends XFileCardProperty {\r\n iconString = computed(() => {\r\n if (XIsString(this.icon())) {\r\n return this.icon() as string;\r\n } else {\r\n return '';\r\n }\r\n });\r\n descriptionString = computed(() => {\r\n if (XIsString(this.description())) {\r\n return this.description() as string;\r\n } else {\r\n return '';\r\n }\r\n });\r\n sizeTransform = computed(() => {\r\n if (this.size() && this.size() !== 0) {\r\n return XFileSize(this.size(), { precision: 0 });\r\n } else {\r\n return '';\r\n }\r\n });\r\n nameSubfix = computed(() => {\r\n const name = this.name() as string;\r\n const index = name.lastIndexOf('.');\r\n return index > -1 ? name.substring(index + 1).toLowerCase() : '';\r\n });\r\n defaultIcon = computed(() => {\r\n if (Object.keys(defaultIcon).includes(this.nameSubfix())) {\r\n return defaultIcon[this.nameSubfix()];\r\n } else {\r\n return defaultIcon['default'];\r\n }\r\n });\r\n defaultColor = computed(() => {\r\n return defaultIconColors[this.defaultIcon()];\r\n });\r\n classMap = computed(() => ({\r\n [`${XFileCardPrefix}-${this.variant()}`]: !XIsEmpty(this.variant())\r\n }));\r\n isImage = computed(() => {\r\n const imageExtensions = ['png', 'jpg', 'jpeg', 'gif', 'bmp'];\r\n return imageExtensions.includes(this.nameSubfix().toLowerCase());\r\n });\r\n}\r\n","<div class=\"x-file-card\" [ngClass]=\"classMap()\" [class.x-file-card-image]=\"isImage() && !!url()\">\r\n @if (isImage() && !!url()) {\r\n <x-image width=\"100px\" height=\"100px\" [src]=\"url()\" [alt]=\"descriptionString()\"></x-image>\r\n } @else {\r\n @if (icon()) {\r\n <div class=\"x-file-card-icon\">\r\n <ng-container *xOutlet=\"icon()\">\r\n <x-icon [type]=\"iconString()\" [style.color]=\"iconColor()\"></x-icon>\r\n </ng-container>\r\n </div>\r\n } @else {\r\n <div class=\"x-file-card-icon\">\r\n <x-icon [type]=\"defaultIcon()\" [style.color]=\"iconColor() ?? defaultColor()\"></x-icon>\r\n </div>\r\n }\r\n <div class=\"x-file-card-content\">\r\n @if (name()) {\r\n <div class=\"x-file-card-name\">\r\n <ng-container *xOutlet=\"name()\">{{ name() }}</ng-container>\r\n </div>\r\n }\r\n @if (size()) {\r\n <div class=\"x-file-card-size\">\r\n {{ sizeTransform() }}\r\n </div>\r\n }\r\n @if (description()) {\r\n <div class=\"x-file-card-description\">\r\n <ng-container *xOutlet=\"description()\">{{ description() }}</ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XAttachmentsComponent } from './attachments.component';\r\nimport { XFileCardComponent } from './file-card.component';\r\n\r\n@NgModule({\r\n exports: [XAttachmentsComponent, XFileCardComponent],\r\n imports: [XAttachmentsComponent, XFileCardComponent]\r\n})\r\nexport class XAttachmentsModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;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AAA,CAAA,srBAAA,CAAA,EAAA;;;MEhD1D,kBAAkB,CAAA;iIAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAlB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAFnB,qBAAqB,EAAE,kBAAkB,CAAA,EAAA,OAAA,EAAA,CADzC,qBAAqB,EAAE,kBAAkB,CAAA,EAAA,CAAA,CAAA;kIAGxC,kBAAkB,EAAA,OAAA,EAAA,CAFnB,qBAAqB,EAAE,kBAAkB,CAAA,EAAA,CAAA,CAAA;;2FAExC,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,qBAAqB,EAAE,kBAAkB,CAAC;AACpD,oBAAA,OAAO,EAAE,CAAC,qBAAqB,EAAE,kBAAkB;AACpD,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -8,6 +8,7 @@ import { XLoadingComponent } from '@ng-nest/ui/loading';
|
|
|
8
8
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
9
9
|
import { Subject, fromEvent, takeUntil, isObservable } from 'rxjs';
|
|
10
10
|
import { toObservable } from '@angular/core/rxjs-interop';
|
|
11
|
+
import { XIconComponent } from '@ng-nest/ui/icon';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Bubble
|
|
@@ -27,6 +28,16 @@ class XBubbleProperty extends XPropertyFunction(X_BUBBLE_CONFIG_NAME) {
|
|
|
27
28
|
* @en_US Bubble content
|
|
28
29
|
*/
|
|
29
30
|
this.content = input(...(ngDevMode ? [undefined, { debugName: "content" }] : []));
|
|
31
|
+
/**
|
|
32
|
+
* @zh_CN 推理内容
|
|
33
|
+
* @en_US reasoning content
|
|
34
|
+
*/
|
|
35
|
+
this.reasoningContent = input(...(ngDevMode ? [undefined, { debugName: "reasoningContent" }] : []));
|
|
36
|
+
/**
|
|
37
|
+
* @zh_CN 推理标题
|
|
38
|
+
* @en_US reasoning title
|
|
39
|
+
*/
|
|
40
|
+
this.reasoningTitle = input(this.config?.reasoningTitle ?? '深度思考', ...(ngDevMode ? [{ debugName: "reasoningTitle" }] : []));
|
|
30
41
|
/**
|
|
31
42
|
* @zh_CN 头像
|
|
32
43
|
* @en_US Avatar
|
|
@@ -99,12 +110,12 @@ class XBubbleProperty extends XPropertyFunction(X_BUBBLE_CONFIG_NAME) {
|
|
|
99
110
|
this.typingEnd = output();
|
|
100
111
|
}
|
|
101
112
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XBubbleProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
102
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.5", type: XBubbleProperty, isStandalone: true, selector: "x-bubble-property", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, avatar: { classPropertyName: "avatar", publicName: "avatar", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, footer: { classPropertyName: "footer", publicName: "footer", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, typing: { classPropertyName: "typing", publicName: "typing", isSignal: true, isRequired: false, transformFunction: null }, speed: { classPropertyName: "speed", publicName: "speed", isSignal: true, isRequired: false, transformFunction: null }, renderer: { classPropertyName: "renderer", publicName: "renderer", isSignal: true, isRequired: false, transformFunction: null }, showCursor: { classPropertyName: "showCursor", publicName: "showCursor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { typingStart: "typingStart", typingOuput: "typingOuput", typingEnd: "typingEnd" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
113
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.5", type: XBubbleProperty, isStandalone: true, selector: "x-bubble-property", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, reasoningContent: { classPropertyName: "reasoningContent", publicName: "reasoningContent", isSignal: true, isRequired: false, transformFunction: null }, reasoningTitle: { classPropertyName: "reasoningTitle", publicName: "reasoningTitle", isSignal: true, isRequired: false, transformFunction: null }, avatar: { classPropertyName: "avatar", publicName: "avatar", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, footer: { classPropertyName: "footer", publicName: "footer", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, typing: { classPropertyName: "typing", publicName: "typing", isSignal: true, isRequired: false, transformFunction: null }, speed: { classPropertyName: "speed", publicName: "speed", isSignal: true, isRequired: false, transformFunction: null }, renderer: { classPropertyName: "renderer", publicName: "renderer", isSignal: true, isRequired: false, transformFunction: null }, showCursor: { classPropertyName: "showCursor", publicName: "showCursor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { typingStart: "typingStart", typingOuput: "typingOuput", typingEnd: "typingEnd" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
103
114
|
}
|
|
104
115
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XBubbleProperty, decorators: [{
|
|
105
116
|
type: Component,
|
|
106
117
|
args: [{ selector: `${XBubblePrefix}-property`, template: '' }]
|
|
107
|
-
}], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], avatar: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatar", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], footer: [{ type: i0.Input, args: [{ isSignal: true, alias: "footer", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], typing: [{ type: i0.Input, args: [{ isSignal: true, alias: "typing", required: false }] }], speed: [{ type: i0.Input, args: [{ isSignal: true, alias: "speed", required: false }] }], renderer: [{ type: i0.Input, args: [{ isSignal: true, alias: "renderer", required: false }] }], showCursor: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCursor", required: false }] }], typingStart: [{ type: i0.Output, args: ["typingStart"] }], typingOuput: [{ type: i0.Output, args: ["typingOuput"] }], typingEnd: [{ type: i0.Output, args: ["typingEnd"] }] } });
|
|
118
|
+
}], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], reasoningContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "reasoningContent", required: false }] }], reasoningTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "reasoningTitle", required: false }] }], avatar: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatar", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], footer: [{ type: i0.Input, args: [{ isSignal: true, alias: "footer", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], typing: [{ type: i0.Input, args: [{ isSignal: true, alias: "typing", required: false }] }], speed: [{ type: i0.Input, args: [{ isSignal: true, alias: "speed", required: false }] }], renderer: [{ type: i0.Input, args: [{ isSignal: true, alias: "renderer", required: false }] }], showCursor: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCursor", required: false }] }], typingStart: [{ type: i0.Output, args: ["typingStart"] }], typingOuput: [{ type: i0.Output, args: ["typingOuput"] }], typingEnd: [{ type: i0.Output, args: ["typingEnd"] }] } });
|
|
108
119
|
/**
|
|
109
120
|
* Bubbles
|
|
110
121
|
* @selector x-bubbles
|
|
@@ -164,7 +175,9 @@ class XBubblesComponent extends XBubblesProperty {
|
|
|
164
175
|
if (bubbles.length <= 0)
|
|
165
176
|
return;
|
|
166
177
|
const lastBubble = bubbles[bubbles.length - 1];
|
|
167
|
-
if (lastBubble &&
|
|
178
|
+
if (lastBubble &&
|
|
179
|
+
lastBubble.typing() &&
|
|
180
|
+
(lastBubble.pendingContent().length > 0 || lastBubble.reasoningPendingContent().length > 0)) {
|
|
168
181
|
if (!this.typingObserver) {
|
|
169
182
|
this.startTypingObserver(lastBubble);
|
|
170
183
|
}
|
|
@@ -223,7 +236,7 @@ class XBubblesComponent extends XBubblesProperty {
|
|
|
223
236
|
this.contentMutationObserver.observe(this.elementRef.nativeElement, { childList: true });
|
|
224
237
|
}
|
|
225
238
|
startTypingObserver(bubble) {
|
|
226
|
-
const bubbleContent = bubble.
|
|
239
|
+
const bubbleContent = bubble.wrapperRef()?.nativeElement;
|
|
227
240
|
if (bubbleContent) {
|
|
228
241
|
this.typingObserver = new MutationObserver(() => {
|
|
229
242
|
if (this.isFollowing) {
|
|
@@ -270,18 +283,23 @@ class XBubbleComponent extends XBubbleProperty {
|
|
|
270
283
|
this.renderer2 = inject(Renderer2);
|
|
271
284
|
this.cdr = inject(ChangeDetectorRef);
|
|
272
285
|
this.bubbles = inject(XBubblesComponent, { optional: true, host: true });
|
|
273
|
-
this.
|
|
286
|
+
this.wrapperRef = viewChild('wrapperRef', ...(ngDevMode ? [{ debugName: "wrapperRef" }] : []));
|
|
274
287
|
this.classMap = computed(() => ({
|
|
275
288
|
[`${XBubblePrefix}-${this.variantSignal()}`]: !XIsEmpty(this.variantSignal()),
|
|
276
289
|
[`${XBubblePrefix}-${this.placement()}`]: !XIsEmpty(this.placement()),
|
|
277
290
|
[`${XBubblePrefix}-cursor`]: this.showCursor() && this.typing(),
|
|
278
|
-
[`${XBubblePrefix}-typing`]: this.typing() && this.pendingContent().length > 0,
|
|
291
|
+
[`${XBubblePrefix}-typing`]: this.typing() && (this.pendingContent().length > 0 || this.reasoningPendingContent().length > 0),
|
|
279
292
|
[`x-${this.sizeSignal()}`]: !XIsEmpty(this.sizeSignal())
|
|
280
293
|
}), ...(ngDevMode ? [{ debugName: "classMap" }] : []));
|
|
281
294
|
this.typedContent = signal('', ...(ngDevMode ? [{ debugName: "typedContent" }] : []));
|
|
282
295
|
this.typedContentObserver = toObservable(this.typedContent);
|
|
283
296
|
this.pendingContent = signal('', ...(ngDevMode ? [{ debugName: "pendingContent" }] : []));
|
|
284
297
|
this.pendingContentObserver = toObservable(this.pendingContent);
|
|
298
|
+
this.reasoningTypedContent = signal('', ...(ngDevMode ? [{ debugName: "reasoningTypedContent" }] : []));
|
|
299
|
+
this.reasoningTypedContentObserver = toObservable(this.reasoningTypedContent);
|
|
300
|
+
this.reasoningPendingContent = signal('', ...(ngDevMode ? [{ debugName: "reasoningPendingContent" }] : []));
|
|
301
|
+
this.reasoningRenderedContent = signal('', ...(ngDevMode ? [{ debugName: "reasoningRenderedContent" }] : []));
|
|
302
|
+
this.reasoningToggle = signal(true, ...(ngDevMode ? [{ debugName: "reasoningToggle" }] : []));
|
|
285
303
|
this.typingInterval = null;
|
|
286
304
|
this.renderedContent = signal('', ...(ngDevMode ? [{ debugName: "renderedContent" }] : []));
|
|
287
305
|
this.sizeSignal = computed(() => {
|
|
@@ -296,11 +314,41 @@ class XBubbleComponent extends XBubbleProperty {
|
|
|
296
314
|
this.isString = computed(() => {
|
|
297
315
|
return XIsString(this.content());
|
|
298
316
|
}, ...(ngDevMode ? [{ debugName: "isString" }] : []));
|
|
317
|
+
this.isReasoningTemplate = computed(() => {
|
|
318
|
+
return XIsTemplateRef(this.reasoningContent());
|
|
319
|
+
}, ...(ngDevMode ? [{ debugName: "isReasoningTemplate" }] : []));
|
|
320
|
+
this.isReasoningString = computed(() => {
|
|
321
|
+
return XIsString(this.reasoningContent());
|
|
322
|
+
}, ...(ngDevMode ? [{ debugName: "isReasoningString" }] : []));
|
|
299
323
|
effect(() => {
|
|
300
324
|
if (this.isString() && !this.typing()) {
|
|
301
325
|
this.stopTyping();
|
|
302
|
-
|
|
303
|
-
|
|
326
|
+
if (this.reasoningPendingContent().length === 0) {
|
|
327
|
+
this.typedContent.set(this.typedContent() + this.pendingContent());
|
|
328
|
+
this.pendingContent.set('');
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
this.reasoningTypedContentObserver.subscribe(() => {
|
|
333
|
+
const finalReasoningContent = this.typing()
|
|
334
|
+
? this.reasoningTypedContent()
|
|
335
|
+
: this.reasoningContent() || '';
|
|
336
|
+
const setValue = (value) => {
|
|
337
|
+
this.reasoningRenderedContent.set(this.sanitizer.bypassSecurityTrustHtml(value));
|
|
338
|
+
};
|
|
339
|
+
if (this.renderer()) {
|
|
340
|
+
const rendered = this.renderer()(finalReasoningContent);
|
|
341
|
+
if (isObservable(rendered)) {
|
|
342
|
+
rendered.subscribe((value) => {
|
|
343
|
+
setValue(value);
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
else {
|
|
347
|
+
setValue(rendered);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
else {
|
|
351
|
+
setValue(finalReasoningContent);
|
|
304
352
|
}
|
|
305
353
|
});
|
|
306
354
|
this.typedContentObserver.subscribe(() => {
|
|
@@ -325,23 +373,49 @@ class XBubbleComponent extends XBubbleProperty {
|
|
|
325
373
|
});
|
|
326
374
|
}
|
|
327
375
|
ngOnChanges(changes) {
|
|
328
|
-
const { content } = changes;
|
|
376
|
+
const { content, reasoningContent } = changes;
|
|
377
|
+
if (reasoningContent && this.isReasoningString()) {
|
|
378
|
+
const newReasoningContent = reasoningContent.currentValue || '';
|
|
379
|
+
const currentTypedReasoningContent = this.reasoningTypedContent();
|
|
380
|
+
if (!this.typing()) {
|
|
381
|
+
this.reasoningTypedContent.set(newReasoningContent);
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
if (newReasoningContent.startsWith(currentTypedReasoningContent)) {
|
|
385
|
+
this.reasoningPendingContent.set(newReasoningContent.substring(currentTypedReasoningContent.length));
|
|
386
|
+
if (this.reasoningPendingContent().length > 0 && !this.typingInterval) {
|
|
387
|
+
this.startTyping();
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
else {
|
|
391
|
+
this.stopTyping();
|
|
392
|
+
this.reasoningTypedContent.set('');
|
|
393
|
+
this.reasoningPendingContent.set(newReasoningContent);
|
|
394
|
+
this.startTyping();
|
|
395
|
+
}
|
|
396
|
+
}
|
|
329
397
|
if (content && this.isString()) {
|
|
330
|
-
const newFullContent =
|
|
398
|
+
const newFullContent = content.currentValue || '';
|
|
331
399
|
const currentTypedContent = this.typedContent();
|
|
332
400
|
if (!this.typing()) {
|
|
333
|
-
this.
|
|
401
|
+
if (this.reasoningPendingContent().length === 0) {
|
|
402
|
+
this.typedContent.set(newFullContent);
|
|
403
|
+
}
|
|
334
404
|
return;
|
|
335
405
|
}
|
|
336
406
|
if (newFullContent.startsWith(currentTypedContent)) {
|
|
337
407
|
this.pendingContent.set(newFullContent.substring(currentTypedContent.length));
|
|
338
|
-
this.
|
|
408
|
+
if (this.reasoningPendingContent().length === 0 && this.pendingContent().length > 0 && !this.typingInterval) {
|
|
409
|
+
this.startTyping();
|
|
410
|
+
}
|
|
339
411
|
}
|
|
340
412
|
else {
|
|
341
413
|
this.stopTyping();
|
|
342
414
|
this.typedContent.set('');
|
|
343
415
|
this.pendingContent.set(newFullContent);
|
|
344
|
-
this.
|
|
416
|
+
if (this.reasoningPendingContent().length === 0 && this.pendingContent().length > 0) {
|
|
417
|
+
this.startTyping();
|
|
418
|
+
}
|
|
345
419
|
}
|
|
346
420
|
}
|
|
347
421
|
}
|
|
@@ -349,12 +423,18 @@ class XBubbleComponent extends XBubbleProperty {
|
|
|
349
423
|
if (this.typingInterval) {
|
|
350
424
|
return;
|
|
351
425
|
}
|
|
352
|
-
if (this.pendingContent().length === 0) {
|
|
426
|
+
if (this.reasoningPendingContent().length === 0 && this.pendingContent().length === 0) {
|
|
353
427
|
return;
|
|
354
428
|
}
|
|
355
429
|
this.typingStart.emit();
|
|
356
430
|
this.typingInterval = setInterval(() => {
|
|
357
|
-
if (this.
|
|
431
|
+
if (this.reasoningPendingContent().length > 0) {
|
|
432
|
+
const nextChar = this.reasoningPendingContent().charAt(0);
|
|
433
|
+
this.reasoningTypedContent.update((current) => current + nextChar);
|
|
434
|
+
this.reasoningPendingContent.update((current) => current.substring(1));
|
|
435
|
+
this.typingOuput.emit(nextChar);
|
|
436
|
+
}
|
|
437
|
+
else if (this.pendingContent().length > 0) {
|
|
358
438
|
const nextChar = this.pendingContent().charAt(0);
|
|
359
439
|
this.typedContent.update((current) => current + nextChar);
|
|
360
440
|
this.pendingContent.update((current) => current.substring(1));
|
|
@@ -372,16 +452,19 @@ class XBubbleComponent extends XBubbleProperty {
|
|
|
372
452
|
this.typingInterval = null;
|
|
373
453
|
}
|
|
374
454
|
}
|
|
455
|
+
onReasoningToggle() {
|
|
456
|
+
this.reasoningToggle.update((x) => !x);
|
|
457
|
+
}
|
|
375
458
|
ngOnDestroy() {
|
|
376
459
|
this.stopTyping();
|
|
377
460
|
}
|
|
378
461
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XBubbleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
379
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.5", type: XBubbleComponent, isStandalone: true, selector: "x-bubble", viewQueries: [{ propertyName: "
|
|
462
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.5", type: XBubbleComponent, isStandalone: true, selector: "x-bubble", viewQueries: [{ propertyName: "wrapperRef", first: true, predicate: ["wrapperRef"], descendants: true, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"x-bubble\" [ngClass]=\"classMap()\">\r\n @if (!!avatar()) {\r\n <div class=\"x-bubble-avatar\" [class.x-bubble-avatar-hidden]=\"avatar()?.hidden\">\r\n <x-avatar\r\n [icon]=\"avatar()?.icon!\"\r\n [label]=\"avatar()?.label!\"\r\n [src]=\"avatar()?.src!\"\r\n [size]=\"avatar()?.size ?? size()\"\r\n [gap]=\"avatar()?.gap ?? '0.25rem'\"\r\n [fit]=\"avatar()?.fit ?? 'cover'\"\r\n [backgroundColor]=\"avatar()?.backgroundColor ?? '#999999'\"\r\n [color]=\"avatar()?.color ?? '#FFFFFF'\"\r\n [shape]=\"avatar()?.shape ?? 'circle'\"\r\n ></x-avatar>\r\n </div>\r\n }\r\n <div #wrapperRef class=\"x-bubble-wrapper\">\r\n @if (loading()) {\r\n <div class=\"x-bubble-content\" [x-loading]=\"true\" [size]=\"'small'\" inline></div>\r\n } @else {\r\n @if (header()) {\r\n <div class=\"x-bubble-header\">\r\n <ng-container *xOutlet=\"header()\">{{ header() }}</ng-container>\r\n </div>\r\n }\r\n\r\n @if (isReasoningString()) {\r\n <div class=\"x-bubble-reasoning\">\r\n <ng-container *xOutlet=\"reasoningHeaderTpl\"></ng-container>\r\n @if (reasoningToggle()) {\r\n <div class=\"x-bubble-reasoning-content\" #reasoningContentRef [innerHTML]=\"reasoningRenderedContent()\"></div>\r\n }\r\n </div>\r\n } @else if (isReasoningTemplate()) {\r\n <div class=\"x-bubble-reasoning\">\r\n <ng-container *xOutlet=\"reasoningHeaderTpl\"></ng-container>\r\n @if (reasoningToggle()) {\r\n <div class=\"x-bubble-reasoning-content\" #reasoningContentRef>\r\n <ng-container *xOutlet=\"reasoningContent()\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <ng-template #reasoningHeaderTpl>\r\n <div class=\"x-bubble-reasoning-header\" (click)=\"onReasoningToggle()\">\r\n <x-icon\r\n class=\"x-bubble-reasoning-toggle\"\r\n [type]=\"reasoningToggle() ? 'fto-chevron-down' : 'fto-chevron-right'\"\r\n ></x-icon>\r\n <span>{{ reasoningTitle() }}</span>\r\n </div>\r\n </ng-template>\r\n\r\n @if (isString()) {\r\n <div class=\"x-bubble-content\" #contentRef [innerHTML]=\"renderedContent()\"></div>\r\n } @else if (isTemplate()) {\r\n <div class=\"x-bubble-content\" #contentRef>\r\n <ng-container *xOutlet=\"content()\"></ng-container>\r\n </div>\r\n }\r\n\r\n @if (footer()) {\r\n <div class=\"x-bubble-footer\">\r\n <ng-container *xOutlet=\"footer()\">{{ footer() }}</ng-container>\r\n </div>\r\n }\r\n }\r\n </div>\r\n</div>\r\n", styles: [".x-bubble{margin:0;padding:0}.x-bubble{display:flex}.x-bubble-wrapper{flex:auto;display:flex;flex-direction:column;align-items:flex-start;min-width:0;max-width:100%}.x-bubble-reasoning{background-color:var(--x-background-a100);color:var(--x-text-400);position:relative;box-sizing:border-box;min-width:0;max-width:100%;font-size:var(--x-font-size-small);border-radius:var(--x-border-radius);word-break:break-word;margin-bottom:1rem}.x-bubble-reasoning-header{padding:.5rem 1rem .5rem .45rem;display:flex;align-items:center;gap:.5rem;cursor:pointer}.x-bubble-reasoning-toggle{font-size:var(--x-font-size-large)}.x-bubble-reasoning-content{position:relative;padding:0rem 1rem 0rem 2rem;margin-bottom:1rem}.x-bubble-reasoning-content:before{position:absolute;top:0;left:1rem;content:\" \";height:100%;border-left:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-bubble-content{position:relative;box-sizing:border-box;min-width:0;max-width:100%;color:var(--x-text);font-size:var(--x-font-size);border-radius:var(--x-border-radius);word-break:break-word}.x-bubble-outlined .x-bubble-content{border:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-bubble-filled .x-bubble-content{background-color:var(--x-background-a200)}.x-bubble-shadow .x-bubble-content{box-shadow:var(--x-box-shadow)}.x-bubble-end{flex-direction:row-reverse}.x-bubble-end .x-bubble-wrapper{align-items:flex-end}.x-bubble-header{margin-bottom:.25rem}.x-bubble-footer{margin-top:.5rem}.x-bubble-cursor.x-bubble-typing .x-bubble-content:after{content:\"\";display:inline-block;width:.0625rem;height:1.1em;margin-left:.0625rem;background-color:currentColor;vertical-align:middle;animation:x-bubble-blink 1s infinite}.x-bubble-cursor:not(.x-bubble-typing) .x-bubble-content:after{display:none}.x-bubble-avatar-hidden{visibility:hidden}@keyframes x-bubble-blink{0%{opacity:1}50%{opacity:0}to{opacity:1}}.x-bubble.x-big{column-gap:var(--x-padding-big)}.x-bubble.x-big .x-bubble-content{padding:calc(var(--x-padding-big) - .25rem) var(--x-padding-big);line-height:calc(var(--x-height-big) - 1rem);min-height:calc(var(--x-padding-big) * 2 + var(--x-height-big) - 1.5rem)}.x-bubble.x-large{column-gap:var(--x-padding-large)}.x-bubble.x-large .x-bubble-content{padding:calc(var(--x-padding-large) - .25rem) var(--x-padding-large);line-height:calc(var(--x-height-large) - 1rem);min-height:calc(var(--x-padding-large) * 2 + var(--x-height-large) - 1.5rem)}.x-bubble.x-medium{column-gap:var(--x-padding-medium)}.x-bubble.x-medium .x-bubble-content{padding:calc(var(--x-padding-medium) - .25rem) var(--x-padding-medium);line-height:calc(var(--x-height-medium) - 1rem);min-height:calc(var(--x-padding-medium) * 2 + var(--x-height-medium) - 1.5rem)}.x-bubble.x-small{column-gap:var(--x-padding-small)}.x-bubble.x-small .x-bubble-content{padding:calc(var(--x-padding-small) - .25rem) var(--x-padding-small);line-height:calc(var(--x-height-small) - 1rem);min-height:calc(var(--x-padding-small) * 2 + var(--x-height-small) - 1.5rem)}.x-bubble.x-mini{column-gap:var(--x-padding-mini)}.x-bubble.x-mini .x-bubble-content{padding:calc(var(--x-padding-mini) - .25rem) var(--x-padding-mini);line-height:calc(var(--x-height-mini) - 1rem);min-height:calc(var(--x-padding-mini) * 2 + var(--x-height-mini) - 1.5rem)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { kind: "component", type: XAvatarComponent, selector: "x-avatar" }, { kind: "component", type: XIconComponent, selector: "x-icon" }, { kind: "component", type: XLoadingComponent, selector: "x-loading, [x-loading]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
380
463
|
}
|
|
381
464
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XBubbleComponent, decorators: [{
|
|
382
465
|
type: Component,
|
|
383
|
-
args: [{ selector: 'x-bubble', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgClass, XOutletDirective, XAvatarComponent, XLoadingComponent], template: "<div class=\"x-bubble\" [ngClass]=\"classMap()\">\r\n @if (!!avatar()) {\r\n <div class=\"x-bubble-avatar\" [class.x-bubble-avatar-hidden]=\"avatar()?.hidden\">\r\n <x-avatar\r\n [icon]=\"avatar()?.icon!\"\r\n [label]=\"avatar()?.label!\"\r\n [src]=\"avatar()?.src!\"\r\n [size]=\"avatar()?.size ?? size()\"\r\n [gap]=\"avatar()?.gap ?? '0.25rem'\"\r\n [fit]=\"avatar()?.fit ?? 'cover'\"\r\n [backgroundColor]=\"avatar()?.backgroundColor ?? '#999999'\"\r\n [color]=\"avatar()?.color ?? '#FFFFFF'\"\r\n [shape]=\"avatar()?.shape ?? 'circle'\"\r\n ></x-avatar>\r\n </div>\r\n }\r\n <div class=\"x-bubble-wrapper\">\r\n @if (loading()) {\r\n <div class=\"x-bubble-content\" [x-loading]=\"true\" [size]=\"'small'\" inline></div>\r\n } @else {\r\n @if (header()) {\r\n <div class=\"x-bubble-header\">\r\n <ng-container *xOutlet=\"header()\">{{ header() }}</ng-container>\r\n </div>\r\n }\r\n @if (isString()) {\r\n <div class=\"x-bubble-content\" #contentRef [innerHTML]=\"renderedContent()\"></div>\r\n } @else if (isTemplate()) {\r\n <div class=\"x-bubble-content\" #contentRef>\r\n <ng-container *xOutlet=\"content()\"></ng-container>\r\n </div>\r\n }\r\n @if (footer()) {\r\n <div class=\"x-bubble-footer\">\r\n <ng-container *xOutlet=\"footer()\">{{ footer() }}</ng-container>\r\n </div>\r\n }\r\n }\r\n </div>\r\n</div>\r\n", styles: [".x-bubble{margin:0;padding:0}.x-bubble{display:flex}.x-bubble-wrapper{flex:auto;display:flex;flex-direction:column;align-items:flex-start;min-width:0;max-width:100%}.x-bubble-content{position:relative;box-sizing:border-box;min-width:0;max-width:100%;color:var(--x-text);font-size:var(--x-font-size);border-radius:var(--x-border-radius);word-break:break-word}.x-bubble-outlined .x-bubble-content{border:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-bubble-filled .x-bubble-content{background-color:var(--x-background-a200)}.x-bubble-shadow .x-bubble-content{box-shadow:var(--x-box-shadow)}.x-bubble-end{flex-direction:row-reverse}.x-bubble-end .x-bubble-wrapper{align-items:flex-end}.x-bubble-header{margin-bottom:.25rem}.x-bubble-footer{margin-top:.5rem}.x-bubble-cursor.x-bubble-typing .x-bubble-content:after{content:\"\";display:inline-block;width:.0625rem;height:1.1em;margin-left:.0625rem;background-color:currentColor;vertical-align:middle;animation:x-bubble-blink 1s infinite}.x-bubble-cursor:not(.x-bubble-typing) .x-bubble-content:after{display:none}.x-bubble-avatar-hidden{visibility:hidden}@keyframes x-bubble-blink{0%{opacity:1}50%{opacity:0}to{opacity:1}}.x-bubble.x-big{column-gap:var(--x-padding-big)}.x-bubble.x-big .x-bubble-content{padding:calc(var(--x-padding-big) - .25rem) var(--x-padding-big);line-height:calc(var(--x-height-big) - 1rem);min-height:calc(var(--x-padding-big) * 2 + var(--x-height-big) - 1.5rem)}.x-bubble.x-large{column-gap:var(--x-padding-large)}.x-bubble.x-large .x-bubble-content{padding:calc(var(--x-padding-large) - .25rem) var(--x-padding-large);line-height:calc(var(--x-height-large) - 1rem);min-height:calc(var(--x-padding-large) * 2 + var(--x-height-large) - 1.5rem)}.x-bubble.x-medium{column-gap:var(--x-padding-medium)}.x-bubble.x-medium .x-bubble-content{padding:calc(var(--x-padding-medium) - .25rem) var(--x-padding-medium);line-height:calc(var(--x-height-medium) - 1rem);min-height:calc(var(--x-padding-medium) * 2 + var(--x-height-medium) - 1.5rem)}.x-bubble.x-small{column-gap:var(--x-padding-small)}.x-bubble.x-small .x-bubble-content{padding:calc(var(--x-padding-small) - .25rem) var(--x-padding-small);line-height:calc(var(--x-height-small) - 1rem);min-height:calc(var(--x-padding-small) * 2 + var(--x-height-small) - 1.5rem)}.x-bubble.x-mini{column-gap:var(--x-padding-mini)}.x-bubble.x-mini .x-bubble-content{padding:calc(var(--x-padding-mini) - .25rem) var(--x-padding-mini);line-height:calc(var(--x-height-mini) - 1rem);min-height:calc(var(--x-padding-mini) * 2 + var(--x-height-mini) - 1.5rem)}\n"] }]
|
|
384
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
466
|
+
args: [{ selector: 'x-bubble', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgClass, XOutletDirective, XAvatarComponent, XIconComponent, XLoadingComponent], template: "<div class=\"x-bubble\" [ngClass]=\"classMap()\">\r\n @if (!!avatar()) {\r\n <div class=\"x-bubble-avatar\" [class.x-bubble-avatar-hidden]=\"avatar()?.hidden\">\r\n <x-avatar\r\n [icon]=\"avatar()?.icon!\"\r\n [label]=\"avatar()?.label!\"\r\n [src]=\"avatar()?.src!\"\r\n [size]=\"avatar()?.size ?? size()\"\r\n [gap]=\"avatar()?.gap ?? '0.25rem'\"\r\n [fit]=\"avatar()?.fit ?? 'cover'\"\r\n [backgroundColor]=\"avatar()?.backgroundColor ?? '#999999'\"\r\n [color]=\"avatar()?.color ?? '#FFFFFF'\"\r\n [shape]=\"avatar()?.shape ?? 'circle'\"\r\n ></x-avatar>\r\n </div>\r\n }\r\n <div #wrapperRef class=\"x-bubble-wrapper\">\r\n @if (loading()) {\r\n <div class=\"x-bubble-content\" [x-loading]=\"true\" [size]=\"'small'\" inline></div>\r\n } @else {\r\n @if (header()) {\r\n <div class=\"x-bubble-header\">\r\n <ng-container *xOutlet=\"header()\">{{ header() }}</ng-container>\r\n </div>\r\n }\r\n\r\n @if (isReasoningString()) {\r\n <div class=\"x-bubble-reasoning\">\r\n <ng-container *xOutlet=\"reasoningHeaderTpl\"></ng-container>\r\n @if (reasoningToggle()) {\r\n <div class=\"x-bubble-reasoning-content\" #reasoningContentRef [innerHTML]=\"reasoningRenderedContent()\"></div>\r\n }\r\n </div>\r\n } @else if (isReasoningTemplate()) {\r\n <div class=\"x-bubble-reasoning\">\r\n <ng-container *xOutlet=\"reasoningHeaderTpl\"></ng-container>\r\n @if (reasoningToggle()) {\r\n <div class=\"x-bubble-reasoning-content\" #reasoningContentRef>\r\n <ng-container *xOutlet=\"reasoningContent()\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <ng-template #reasoningHeaderTpl>\r\n <div class=\"x-bubble-reasoning-header\" (click)=\"onReasoningToggle()\">\r\n <x-icon\r\n class=\"x-bubble-reasoning-toggle\"\r\n [type]=\"reasoningToggle() ? 'fto-chevron-down' : 'fto-chevron-right'\"\r\n ></x-icon>\r\n <span>{{ reasoningTitle() }}</span>\r\n </div>\r\n </ng-template>\r\n\r\n @if (isString()) {\r\n <div class=\"x-bubble-content\" #contentRef [innerHTML]=\"renderedContent()\"></div>\r\n } @else if (isTemplate()) {\r\n <div class=\"x-bubble-content\" #contentRef>\r\n <ng-container *xOutlet=\"content()\"></ng-container>\r\n </div>\r\n }\r\n\r\n @if (footer()) {\r\n <div class=\"x-bubble-footer\">\r\n <ng-container *xOutlet=\"footer()\">{{ footer() }}</ng-container>\r\n </div>\r\n }\r\n }\r\n </div>\r\n</div>\r\n", styles: [".x-bubble{margin:0;padding:0}.x-bubble{display:flex}.x-bubble-wrapper{flex:auto;display:flex;flex-direction:column;align-items:flex-start;min-width:0;max-width:100%}.x-bubble-reasoning{background-color:var(--x-background-a100);color:var(--x-text-400);position:relative;box-sizing:border-box;min-width:0;max-width:100%;font-size:var(--x-font-size-small);border-radius:var(--x-border-radius);word-break:break-word;margin-bottom:1rem}.x-bubble-reasoning-header{padding:.5rem 1rem .5rem .45rem;display:flex;align-items:center;gap:.5rem;cursor:pointer}.x-bubble-reasoning-toggle{font-size:var(--x-font-size-large)}.x-bubble-reasoning-content{position:relative;padding:0rem 1rem 0rem 2rem;margin-bottom:1rem}.x-bubble-reasoning-content:before{position:absolute;top:0;left:1rem;content:\" \";height:100%;border-left:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-bubble-content{position:relative;box-sizing:border-box;min-width:0;max-width:100%;color:var(--x-text);font-size:var(--x-font-size);border-radius:var(--x-border-radius);word-break:break-word}.x-bubble-outlined .x-bubble-content{border:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-bubble-filled .x-bubble-content{background-color:var(--x-background-a200)}.x-bubble-shadow .x-bubble-content{box-shadow:var(--x-box-shadow)}.x-bubble-end{flex-direction:row-reverse}.x-bubble-end .x-bubble-wrapper{align-items:flex-end}.x-bubble-header{margin-bottom:.25rem}.x-bubble-footer{margin-top:.5rem}.x-bubble-cursor.x-bubble-typing .x-bubble-content:after{content:\"\";display:inline-block;width:.0625rem;height:1.1em;margin-left:.0625rem;background-color:currentColor;vertical-align:middle;animation:x-bubble-blink 1s infinite}.x-bubble-cursor:not(.x-bubble-typing) .x-bubble-content:after{display:none}.x-bubble-avatar-hidden{visibility:hidden}@keyframes x-bubble-blink{0%{opacity:1}50%{opacity:0}to{opacity:1}}.x-bubble.x-big{column-gap:var(--x-padding-big)}.x-bubble.x-big .x-bubble-content{padding:calc(var(--x-padding-big) - .25rem) var(--x-padding-big);line-height:calc(var(--x-height-big) - 1rem);min-height:calc(var(--x-padding-big) * 2 + var(--x-height-big) - 1.5rem)}.x-bubble.x-large{column-gap:var(--x-padding-large)}.x-bubble.x-large .x-bubble-content{padding:calc(var(--x-padding-large) - .25rem) var(--x-padding-large);line-height:calc(var(--x-height-large) - 1rem);min-height:calc(var(--x-padding-large) * 2 + var(--x-height-large) - 1.5rem)}.x-bubble.x-medium{column-gap:var(--x-padding-medium)}.x-bubble.x-medium .x-bubble-content{padding:calc(var(--x-padding-medium) - .25rem) var(--x-padding-medium);line-height:calc(var(--x-height-medium) - 1rem);min-height:calc(var(--x-padding-medium) * 2 + var(--x-height-medium) - 1.5rem)}.x-bubble.x-small{column-gap:var(--x-padding-small)}.x-bubble.x-small .x-bubble-content{padding:calc(var(--x-padding-small) - .25rem) var(--x-padding-small);line-height:calc(var(--x-height-small) - 1rem);min-height:calc(var(--x-padding-small) * 2 + var(--x-height-small) - 1.5rem)}.x-bubble.x-mini{column-gap:var(--x-padding-mini)}.x-bubble.x-mini .x-bubble-content{padding:calc(var(--x-padding-mini) - .25rem) var(--x-padding-mini);line-height:calc(var(--x-height-mini) - 1rem);min-height:calc(var(--x-padding-mini) * 2 + var(--x-height-mini) - 1.5rem)}\n"] }]
|
|
467
|
+
}], ctorParameters: () => [], propDecorators: { wrapperRef: [{ type: i0.ViewChild, args: ['wrapperRef', { isSignal: true }] }] } });
|
|
385
468
|
|
|
386
469
|
class XBubbleModule {
|
|
387
470
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XBubbleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|