@matechat/ng 20.0.1-alpha.0 → 20.1.0-alpha.1
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 +206 -41
- package/fesm2022/matechat-ng.mjs +71 -70
- package/fesm2022/matechat-ng.mjs.map +1 -1
- package/index.d.ts +612 -3
- package/package.json +14 -3
- package/Base/base.component.d.ts +0 -11
- package/Bubble/avatar/avatar.component.d.ts +0 -23
- package/Bubble/avatar-body-icon/avatar-body-icon.component.d.ts +0 -7
- package/Bubble/avatar-no-body-icon/avatar-no-body-icon.component.d.ts +0 -7
- package/Bubble/bubble-loading/bubble-loading.component.d.ts +0 -5
- package/Bubble/bubble.component.d.ts +0 -26
- package/Bubble/bubble.module.d.ts +0 -10
- package/Bubble/index.d.ts +0 -6
- package/Input/button/button.component.d.ts +0 -32
- package/Input/index.d.ts +0 -2
- package/Input/input.component.d.ts +0 -65
- package/Input/input.module.d.ts +0 -11
- package/Input/send-icon/send-icon.component.d.ts +0 -5
- package/Locale/index.d.ts +0 -5
- package/Locale/locale.module.d.ts +0 -17
- package/Locale/locale.service.d.ts +0 -50
- package/Locale/translate.pipe.d.ts +0 -23
- package/MarkdownCard/code-block.component.d.ts +0 -49
- package/MarkdownCard/index.d.ts +0 -3
- package/MarkdownCard/markdown-card.component.d.ts +0 -200
- package/MarkdownCard/markdown-card.module.d.ts +0 -13
- package/components-common/Base/foundation.d.ts +0 -45
- package/components-common/Bubble/common/bubble-constants.d.ts +0 -4
- package/components-common/Bubble/common/bubble-types.d.ts +0 -12
- package/components-common/Bubble/foundation.d.ts +0 -9
- package/components-common/Input/button-foundation.d.ts +0 -15
- package/components-common/Input/common/types.d.ts +0 -16
- package/components-common/Input/foundation.d.ts +0 -20
- package/components-common/Locale/lang/en-us.d.ts +0 -26
- package/components-common/Locale/lang/zh-cn.d.ts +0 -26
- package/components-common/MarkdownCard/codeblock-foundation.d.ts +0 -21
- package/components-common/MarkdownCard/common/MDCardService.d.ts +0 -14
- package/components-common/MarkdownCard/common/MermaidService.d.ts +0 -23
- package/components-common/MarkdownCard/common/mdCard.types.d.ts +0 -56
- package/components-common/MarkdownCard/common/parser.d.ts +0 -150
- package/components-common/MarkdownCard/foundation.d.ts +0 -38
- package/esm2022/Base/base.component.mjs +0 -46
- package/esm2022/Bubble/avatar/avatar.component.mjs +0 -121
- package/esm2022/Bubble/avatar-body-icon/avatar-body-icon.component.mjs +0 -19
- package/esm2022/Bubble/avatar-no-body-icon/avatar-no-body-icon.component.mjs +0 -19
- package/esm2022/Bubble/bubble-loading/bubble-loading.component.mjs +0 -11
- package/esm2022/Bubble/bubble.component.mjs +0 -89
- package/esm2022/Bubble/bubble.module.mjs +0 -36
- package/esm2022/Bubble/index.mjs +0 -7
- package/esm2022/Input/button/button.component.mjs +0 -83
- package/esm2022/Input/index.mjs +0 -3
- package/esm2022/Input/input.component.mjs +0 -285
- package/esm2022/Input/input.module.mjs +0 -34
- package/esm2022/Input/send-icon/send-icon.component.mjs +0 -11
- package/esm2022/Locale/index.mjs +0 -6
- package/esm2022/Locale/locale.module.mjs +0 -39
- package/esm2022/Locale/locale.service.mjs +0 -140
- package/esm2022/Locale/translate.pipe.mjs +0 -38
- package/esm2022/MarkdownCard/code-block.component.mjs +0 -175
- package/esm2022/MarkdownCard/index.mjs +0 -4
- package/esm2022/MarkdownCard/markdown-card.component.mjs +0 -436
- package/esm2022/MarkdownCard/markdown-card.module.mjs +0 -44
- package/esm2022/components-common/Base/foundation.mjs +0 -66
- package/esm2022/components-common/Bubble/common/bubble-constants.mjs +0 -5
- package/esm2022/components-common/Bubble/common/bubble-types.mjs +0 -2
- package/esm2022/components-common/Bubble/foundation.mjs +0 -30
- package/esm2022/components-common/Input/button-foundation.mjs +0 -33
- package/esm2022/components-common/Input/common/types.mjs +0 -21
- package/esm2022/components-common/Input/foundation.mjs +0 -71
- package/esm2022/components-common/Locale/lang/en-us.mjs +0 -26
- package/esm2022/components-common/Locale/lang/zh-cn.mjs +0 -26
- package/esm2022/components-common/MarkdownCard/codeblock-foundation.mjs +0 -132
- package/esm2022/components-common/MarkdownCard/common/MDCardService.mjs +0 -69
- package/esm2022/components-common/MarkdownCard/common/MermaidService.mjs +0 -222
- package/esm2022/components-common/MarkdownCard/common/mdCard.types.mjs +0 -6
- package/esm2022/components-common/MarkdownCard/common/parser.mjs +0 -194
- package/esm2022/components-common/MarkdownCard/foundation.mjs +0 -84
- package/esm2022/matechat-ng.mjs +0 -5
- package/esm2022/public-api.mjs +0 -8
- package/public-api.d.ts +0 -4
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class AvatarBodyIconComponent {
|
|
3
|
-
width: number;
|
|
4
|
-
height: number;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AvatarBodyIconComponent, never>;
|
|
6
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AvatarBodyIconComponent, "mc-avatar-body-icon", never, { "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; }, {}, never, never, true, never>;
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class AvatarNoBodyIconComponent {
|
|
3
|
-
width: number;
|
|
4
|
-
height: number;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AvatarNoBodyIconComponent, never>;
|
|
6
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AvatarNoBodyIconComponent, "mc-avatar-no-body-icon", never, { "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; }, {}, never, never, true, never>;
|
|
7
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class BubbleLoadingComponent {
|
|
3
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BubbleLoadingComponent, never>;
|
|
4
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BubbleLoadingComponent, "mc-bubble-loading", never, {}, {}, never, never, true, never>;
|
|
5
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { TemplateRef, QueryList } from '@angular/core';
|
|
2
|
-
import { BubbleAlign, BubbleVariant, AvatarPosition, BubbleAvatar } from '../components-common//Bubble/common/bubble-types';
|
|
3
|
-
import { BubbleAdapter, BubbleFoundation } from '../components-common/Bubble/foundation';
|
|
4
|
-
import BaseComponent from '../Base/base.component';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class BubbleComponent extends BaseComponent<BubbleFoundation> {
|
|
7
|
-
content: string;
|
|
8
|
-
loading: boolean;
|
|
9
|
-
align: BubbleAlign;
|
|
10
|
-
avatarPosition: AvatarPosition;
|
|
11
|
-
variant: BubbleVariant;
|
|
12
|
-
avatarConfig?: BubbleAvatar;
|
|
13
|
-
avatarTemplate: TemplateRef<any> | null;
|
|
14
|
-
topTemplate: TemplateRef<any> | null;
|
|
15
|
-
loadingTplTemplate: TemplateRef<any> | null;
|
|
16
|
-
bottomTemplate: TemplateRef<any> | null;
|
|
17
|
-
contentChildren: QueryList<any>;
|
|
18
|
-
get ngContentProjected(): boolean;
|
|
19
|
-
constructor();
|
|
20
|
-
ngOnInit(): void;
|
|
21
|
-
get adapter(): BubbleAdapter;
|
|
22
|
-
get bubbleClasses(): string;
|
|
23
|
-
get isEmptyAvatar(): boolean;
|
|
24
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BubbleComponent, never>;
|
|
25
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BubbleComponent, "mc-bubble", never, { "content": { "alias": "content"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "align": { "alias": "align"; "required": false; }; "avatarPosition": { "alias": "avatarPosition"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "avatarConfig": { "alias": "avatarConfig"; "required": false; }; }, {}, ["avatarTemplate", "topTemplate", "loadingTplTemplate", "bottomTemplate", "contentChildren"], ["[avatar]", "[top]", "[loadingTpl]", "*", "[bottom]"], true, never>;
|
|
26
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "@angular/common";
|
|
3
|
-
import * as i2 from "./bubble.component";
|
|
4
|
-
import * as i3 from "./bubble-loading/bubble-loading.component";
|
|
5
|
-
import * as i4 from "./avatar/avatar.component";
|
|
6
|
-
export declare class BubbleModule {
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BubbleModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<BubbleModule, never, [typeof i1.CommonModule, typeof i2.BubbleComponent, typeof i3.BubbleLoadingComponent, typeof i4.AvatarComponent], [typeof i2.BubbleComponent, typeof i3.BubbleLoadingComponent, typeof i4.AvatarComponent]>;
|
|
9
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<BubbleModule>;
|
|
10
|
-
}
|
package/Bubble/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export * from './bubble.component';
|
|
2
|
-
export * from './bubble.module';
|
|
3
|
-
export * from './bubble-loading/bubble-loading.component';
|
|
4
|
-
export * from './avatar/avatar.component';
|
|
5
|
-
export * from './avatar-body-icon/avatar-body-icon.component';
|
|
6
|
-
export * from './avatar-no-body-icon/avatar-no-body-icon.component';
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, ElementRef } from '@angular/core';
|
|
2
|
-
import { SendBtnVariant } from '../../components-common/Input/common/types';
|
|
3
|
-
import BaseComponent from '../../Base/base.component';
|
|
4
|
-
import { LocaleService } from '../../Locale';
|
|
5
|
-
import { InputButtonFoundation } from '../../components-common/Input/button-foundation';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class ButtonComponent extends BaseComponent<InputButtonFoundation> {
|
|
8
|
-
private localeService;
|
|
9
|
-
disabled: boolean;
|
|
10
|
-
loading: boolean;
|
|
11
|
-
inputValue: string;
|
|
12
|
-
sendBtnVariant: SendBtnVariant;
|
|
13
|
-
submit: EventEmitter<string>;
|
|
14
|
-
cancel: EventEmitter<void>;
|
|
15
|
-
change: EventEmitter<string>;
|
|
16
|
-
buttonElement: ElementRef<HTMLButtonElement>;
|
|
17
|
-
isMouseDown: boolean;
|
|
18
|
-
showWave: boolean;
|
|
19
|
-
waveStyle: {
|
|
20
|
-
top: string;
|
|
21
|
-
left: string;
|
|
22
|
-
};
|
|
23
|
-
constructor(localeService: LocaleService);
|
|
24
|
-
get buttonClasses(): Record<string, any>;
|
|
25
|
-
ngOnInit(): void;
|
|
26
|
-
onMouseDown(): void;
|
|
27
|
-
onMouseUp(): void;
|
|
28
|
-
showClickWave(event: MouseEvent): void;
|
|
29
|
-
onConfirm(event: MouseEvent): void;
|
|
30
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "mc-button", never, { "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "inputValue": { "alias": "inputValue"; "required": false; }; "sendBtnVariant": { "alias": "sendBtnVariant"; "required": false; }; }, { "submit": "submit"; "cancel": "cancel"; "change": "change"; }, never, never, true, never>;
|
|
32
|
-
}
|
package/Input/index.d.ts
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnInit, ElementRef, TemplateRef, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { DisplayType, InputVariant, SendBtnVariant, SubmitShortKey } from '../components-common/Input/common/types';
|
|
3
|
-
import BaseComponent from '../Base/base.component';
|
|
4
|
-
import { InputAdapter, InputFoundation } from '../components-common/Input/foundation';
|
|
5
|
-
import { LocaleService } from '../Locale/locale.service';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export type TextareaAutoSize = {
|
|
8
|
-
minRows?: number;
|
|
9
|
-
maxRows?: number;
|
|
10
|
-
} | boolean;
|
|
11
|
-
export declare const inputContextToken = "input-context";
|
|
12
|
-
export declare class InputComponent extends BaseComponent<InputFoundation> implements OnInit {
|
|
13
|
-
private localeService;
|
|
14
|
-
value: string;
|
|
15
|
-
placeholder: string;
|
|
16
|
-
disabled: boolean;
|
|
17
|
-
displayType: DisplayType;
|
|
18
|
-
variant: InputVariant;
|
|
19
|
-
sendBtnVariant: SendBtnVariant;
|
|
20
|
-
loading: boolean;
|
|
21
|
-
showCount: boolean;
|
|
22
|
-
maxLength: number | null;
|
|
23
|
-
submitShortKey: SubmitShortKey | null | string;
|
|
24
|
-
autofocus: boolean;
|
|
25
|
-
autosize: TextareaAutoSize;
|
|
26
|
-
textareaStyle: Record<string, string>;
|
|
27
|
-
change: EventEmitter<string>;
|
|
28
|
-
submit: EventEmitter<string>;
|
|
29
|
-
cancel: EventEmitter<void>;
|
|
30
|
-
focus: EventEmitter<FocusEvent>;
|
|
31
|
-
blur: EventEmitter<FocusEvent>;
|
|
32
|
-
textareaElement: ElementRef<HTMLTextAreaElement>;
|
|
33
|
-
headTemplate: TemplateRef<any> | null;
|
|
34
|
-
prefixTemplate: TemplateRef<any> | null;
|
|
35
|
-
suffixTemplate: TemplateRef<any> | null;
|
|
36
|
-
buttonTemplate: TemplateRef<any> | null;
|
|
37
|
-
extraTemplate: TemplateRef<any> | null;
|
|
38
|
-
inputValue: string;
|
|
39
|
-
lock: boolean;
|
|
40
|
-
constructor(localeService: LocaleService);
|
|
41
|
-
ngOnInit(): void;
|
|
42
|
-
get adapter(): InputAdapter;
|
|
43
|
-
onChange(e: any): void;
|
|
44
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
45
|
-
get inputClasses(): Record<string, any>;
|
|
46
|
-
get maxlengthValue(): number | null;
|
|
47
|
-
onInput(): void;
|
|
48
|
-
onCompositionStart(): void;
|
|
49
|
-
onCompositionEnd(): void;
|
|
50
|
-
onKeydown(event: KeyboardEvent): void;
|
|
51
|
-
clearInput(): void;
|
|
52
|
-
getInput(): string;
|
|
53
|
-
onButtonSubmit(value: string): void;
|
|
54
|
-
onButtonCancel(): void;
|
|
55
|
-
onButtonChange(value: string): void;
|
|
56
|
-
ngAfterViewInit(): void;
|
|
57
|
-
updateTextareaStyle(): void;
|
|
58
|
-
private getAutosizeConfig;
|
|
59
|
-
private computeTextareaHeight;
|
|
60
|
-
get placeholderText(): string;
|
|
61
|
-
onFocus(event: FocusEvent): void;
|
|
62
|
-
onBlur(event: FocusEvent): void;
|
|
63
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, never>;
|
|
64
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "mc-input", never, { "value": { "alias": "value"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "displayType": { "alias": "displayType"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "sendBtnVariant": { "alias": "sendBtnVariant"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "showCount": { "alias": "showCount"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "submitShortKey": { "alias": "submitShortKey"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "autosize": { "alias": "autosize"; "required": false; }; }, { "change": "change"; "submit": "submit"; "cancel": "cancel"; "focus": "focus"; "blur": "blur"; }, ["headTemplate", "prefixTemplate", "suffixTemplate", "buttonTemplate", "extraTemplate"], never, true, never>;
|
|
65
|
-
}
|
package/Input/input.module.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "@angular/common";
|
|
3
|
-
import * as i2 from "@angular/forms";
|
|
4
|
-
import * as i3 from "./button/button.component";
|
|
5
|
-
import * as i4 from "./send-icon/send-icon.component";
|
|
6
|
-
import * as i5 from "./input.component";
|
|
7
|
-
export declare class InputModule {
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<InputModule, never>;
|
|
9
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<InputModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i3.ButtonComponent, typeof i4.SendIconComponent, typeof i5.InputComponent], [typeof i5.InputComponent]>;
|
|
10
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<InputModule>;
|
|
11
|
-
}
|
package/Locale/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { LocaleService } from './locale.service';
|
|
2
|
-
import { LocaleModule } from './locale.module';
|
|
3
|
-
import { TranslatePipe } from './translate.pipe';
|
|
4
|
-
export type { LanguageCode, LocaleData } from './locale.service';
|
|
5
|
-
export { LocaleService, LocaleModule, TranslatePipe };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class LocaleModule {
|
|
4
|
-
/**
|
|
5
|
-
* 静态方法,用于配置模块并提供服务
|
|
6
|
-
* 可以在AppModule中使用LocaleModule.forRoot()来初始化
|
|
7
|
-
*/
|
|
8
|
-
static forRoot(): ModuleWithProviders<LocaleModule>;
|
|
9
|
-
/**
|
|
10
|
-
* 普通导入方法,用于特性模块中导入
|
|
11
|
-
* 避免服务被多次实例化
|
|
12
|
-
*/
|
|
13
|
-
static forChild(): ModuleWithProviders<LocaleModule>;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LocaleModule, never>;
|
|
15
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<LocaleModule, never, never, never>;
|
|
16
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<LocaleModule>;
|
|
17
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export interface LocaleData {
|
|
3
|
-
[key: string]: any;
|
|
4
|
-
}
|
|
5
|
-
export type LanguageCode = 'zh-cn' | 'en-us' | string;
|
|
6
|
-
export declare class LocaleService {
|
|
7
|
-
private _currentLanguage;
|
|
8
|
-
private _localeData;
|
|
9
|
-
private _languageChange;
|
|
10
|
-
languageChange$: import("rxjs").Observable<string>;
|
|
11
|
-
constructor();
|
|
12
|
-
/**
|
|
13
|
-
* 加载默认语言包
|
|
14
|
-
*/
|
|
15
|
-
private loadDefaultLocales;
|
|
16
|
-
/**
|
|
17
|
-
* 设置当前语言
|
|
18
|
-
*/
|
|
19
|
-
setLanguage(language: LanguageCode): void;
|
|
20
|
-
/**
|
|
21
|
-
* 获取当前语言
|
|
22
|
-
*/
|
|
23
|
-
getLanguage(): LanguageCode;
|
|
24
|
-
/**
|
|
25
|
-
* 翻译文本
|
|
26
|
-
* @param key 翻译键,支持嵌套路径如 'Input.send'
|
|
27
|
-
* @param params 替换参数
|
|
28
|
-
*/
|
|
29
|
-
translate(key: string, params?: {
|
|
30
|
-
[key: string]: string | number;
|
|
31
|
-
}): string;
|
|
32
|
-
/**
|
|
33
|
-
* 添加新的语言
|
|
34
|
-
*/
|
|
35
|
-
addLanguage(language: LanguageCode, localeData: LocaleData): void;
|
|
36
|
-
/**
|
|
37
|
-
* 覆盖现有语言的部分翻译
|
|
38
|
-
*/
|
|
39
|
-
overrideLocale(language: LanguageCode, localeData: LocaleData): void;
|
|
40
|
-
/**
|
|
41
|
-
* 获取所有支持的语言
|
|
42
|
-
*/
|
|
43
|
-
getSupportedLanguages(): LanguageCode[];
|
|
44
|
-
/**
|
|
45
|
-
* 深度合并对象
|
|
46
|
-
*/
|
|
47
|
-
private deepMerge;
|
|
48
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LocaleService, never>;
|
|
49
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<LocaleService>;
|
|
50
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { LocaleService } from './locale.service';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* 翻译管道,用于在Angular模板中直接使用翻译功能
|
|
6
|
-
* 用法:{{ 'Input.send' | translate }}
|
|
7
|
-
* 带参数:{{ 'Input.pleaseEnterPlaceholder' | translate:{ enterKey: 'Enter', shiftEnterKey: 'Shift + Enter' } }}
|
|
8
|
-
*/
|
|
9
|
-
export declare class TranslatePipe implements PipeTransform {
|
|
10
|
-
private localeService;
|
|
11
|
-
constructor(localeService: LocaleService);
|
|
12
|
-
/**
|
|
13
|
-
* 转换方法,实现PipeTransform接口
|
|
14
|
-
* @param key 翻译键
|
|
15
|
-
* @param params 替换参数
|
|
16
|
-
*/
|
|
17
|
-
transform(key: string, params?: {
|
|
18
|
-
[key: string]: string | number;
|
|
19
|
-
}): string;
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TranslatePipe, never>;
|
|
21
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<TranslatePipe, "translate", true>;
|
|
22
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<TranslatePipe>;
|
|
23
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { OnInit, ElementRef, OnChanges, SimpleChanges, ChangeDetectorRef, QueryList } from '@angular/core';
|
|
2
|
-
import { TemplateRef } from '@angular/core';
|
|
3
|
-
import type { MermaidConfig } from '../components-common/MarkdownCard/common/mdCard.types';
|
|
4
|
-
import BaseComponent from '../Base/base.component';
|
|
5
|
-
import { CodeBlockAdapter, CodeBlockFoundation } from '../components-common/MarkdownCard/codeblock-foundation';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class CodeBlockComponent extends BaseComponent<CodeBlockFoundation> implements OnInit, OnChanges {
|
|
8
|
-
private cdr;
|
|
9
|
-
code: string;
|
|
10
|
-
language: string;
|
|
11
|
-
blockIndex: number;
|
|
12
|
-
theme: 'light' | 'dark';
|
|
13
|
-
enableMermaid: boolean;
|
|
14
|
-
mermaidConfig: MermaidConfig;
|
|
15
|
-
contentTemplate: TemplateRef<any> | null;
|
|
16
|
-
headerTemplate: TemplateRef<any> | null;
|
|
17
|
-
actionsTemplate: TemplateRef<any> | null;
|
|
18
|
-
rootRef: ElementRef;
|
|
19
|
-
mermaidContentRef: ElementRef;
|
|
20
|
-
codeElementRef: ElementRef;
|
|
21
|
-
codeElementTemplates: QueryList<ElementRef>;
|
|
22
|
-
expanded: boolean;
|
|
23
|
-
copied: boolean;
|
|
24
|
-
mermaidContent: string;
|
|
25
|
-
private diffDom;
|
|
26
|
-
private _showMermaidDiagram;
|
|
27
|
-
get showMermaidDiagram(): boolean;
|
|
28
|
-
set showMermaidDiagram(value: boolean);
|
|
29
|
-
highlightedCode: string;
|
|
30
|
-
isMermaid: boolean;
|
|
31
|
-
private copySubject;
|
|
32
|
-
constructor(cdr: ChangeDetectorRef);
|
|
33
|
-
get adapter(): CodeBlockAdapter;
|
|
34
|
-
switchShowMermaid(show: boolean): void;
|
|
35
|
-
ngOnInit(): void;
|
|
36
|
-
ngAfterViewInit(): void;
|
|
37
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
38
|
-
private checkIsMermaid;
|
|
39
|
-
private updateHighlightedCode;
|
|
40
|
-
zoomIn(): void;
|
|
41
|
-
zoomOut(): void;
|
|
42
|
-
download(): void;
|
|
43
|
-
renderMermaid(): Promise<void>;
|
|
44
|
-
toggleExpand(): void;
|
|
45
|
-
copyCode(): void;
|
|
46
|
-
copyCodeInternal(): void;
|
|
47
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CodeBlockComponent, never>;
|
|
48
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CodeBlockComponent, "mc-code-block", never, { "code": { "alias": "code"; "required": false; }; "language": { "alias": "language"; "required": false; }; "blockIndex": { "alias": "blockIndex"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "enableMermaid": { "alias": "enableMermaid"; "required": false; }; "mermaidConfig": { "alias": "mermaidConfig"; "required": false; }; "contentTemplate": { "alias": "contentTemplate"; "required": false; }; "headerTemplate": { "alias": "headerTemplate"; "required": false; }; "actionsTemplate": { "alias": "actionsTemplate"; "required": false; }; }, {}, never, never, false, never>;
|
|
49
|
-
}
|
package/MarkdownCard/index.d.ts
DELETED
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { OnInit, OnChanges, OnDestroy, ChangeDetectorRef, SimpleChanges, EventEmitter, Renderer2, ViewContainerRef, TemplateRef } from '@angular/core';
|
|
2
|
-
import markdownit from 'markdown-it';
|
|
3
|
-
import type { Token } from 'markdown-it';
|
|
4
|
-
import type { ASTNode } from '../components-common/MarkdownCard/common/mdCard.types';
|
|
5
|
-
import { MarkdownCardProps } from '../components-common/MarkdownCard/common/mdCard.types';
|
|
6
|
-
import BaseComponent from '../Base/base.component';
|
|
7
|
-
import { MarkdownCardAdapter, MarkdownCardFoundation } from '../components-common/MarkdownCard/foundation';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class MarkdownCardComponent extends BaseComponent<MarkdownCardFoundation> implements OnInit, OnChanges, OnDestroy {
|
|
10
|
-
private renderer;
|
|
11
|
-
cdr: ChangeDetectorRef;
|
|
12
|
-
private diffDom;
|
|
13
|
-
content: string;
|
|
14
|
-
typing: boolean;
|
|
15
|
-
enableThink: boolean;
|
|
16
|
-
typingOptions: MarkdownCardProps['typingOptions'] | any;
|
|
17
|
-
thinkOptions: MarkdownCardProps['thinkOptions'];
|
|
18
|
-
mdOptions: MarkdownCardProps['mdOptions'];
|
|
19
|
-
mdPlugins: MarkdownCardProps['mdPlugins'];
|
|
20
|
-
customXssRules: MarkdownCardProps['customXssRules'];
|
|
21
|
-
theme: 'light' | 'dark' | any;
|
|
22
|
-
enableMermaid: boolean;
|
|
23
|
-
mermaidConfig: MarkdownCardProps['mermaidConfig'];
|
|
24
|
-
actionsTemplate: TemplateRef<any> | null;
|
|
25
|
-
headerTemplate: TemplateRef<any> | null;
|
|
26
|
-
contentTemplate: TemplateRef<any> | null;
|
|
27
|
-
private codeBlockComponentsCache;
|
|
28
|
-
afterMdtInit: EventEmitter<markdownit>;
|
|
29
|
-
typingStart: EventEmitter<void>;
|
|
30
|
-
typingEvent: EventEmitter<void>;
|
|
31
|
-
typingEnd: EventEmitter<void>;
|
|
32
|
-
markdownContainer: ViewContainerRef;
|
|
33
|
-
private mdt;
|
|
34
|
-
typingIndex: number;
|
|
35
|
-
isTyping: boolean;
|
|
36
|
-
timer: number | null;
|
|
37
|
-
parser: {
|
|
38
|
-
isSelfClosingTag: (token: {
|
|
39
|
-
type: string;
|
|
40
|
-
tag: string;
|
|
41
|
-
attrs: [string, string][] | null;
|
|
42
|
-
map: [number, number] | null;
|
|
43
|
-
nesting: Token.Nesting;
|
|
44
|
-
level: number;
|
|
45
|
-
children: any[] | null;
|
|
46
|
-
content: string;
|
|
47
|
-
markup: string;
|
|
48
|
-
info: string;
|
|
49
|
-
meta: any;
|
|
50
|
-
block: boolean;
|
|
51
|
-
hidden: boolean;
|
|
52
|
-
attrIndex(name: string): number;
|
|
53
|
-
attrPush(attrData: [string, string]): void;
|
|
54
|
-
attrSet(name: string, value: string): void;
|
|
55
|
-
attrGet(name: string): string | null;
|
|
56
|
-
attrJoin(name: string, value: string): void;
|
|
57
|
-
}) => boolean;
|
|
58
|
-
isClosingTag: (openToken: {
|
|
59
|
-
type: string;
|
|
60
|
-
tag: string;
|
|
61
|
-
attrs: [string, string][] | null;
|
|
62
|
-
map: [number, number] | null;
|
|
63
|
-
nesting: Token.Nesting;
|
|
64
|
-
level: number;
|
|
65
|
-
children: any[] | null;
|
|
66
|
-
content: string;
|
|
67
|
-
markup: string;
|
|
68
|
-
info: string;
|
|
69
|
-
meta: any;
|
|
70
|
-
block: boolean;
|
|
71
|
-
hidden: boolean;
|
|
72
|
-
attrIndex(name: string): number;
|
|
73
|
-
attrPush(attrData: [string, string]): void;
|
|
74
|
-
attrSet(name: string, value: string): void;
|
|
75
|
-
attrGet(name: string): string | null;
|
|
76
|
-
attrJoin(name: string, value: string): void;
|
|
77
|
-
}, closeToken: {
|
|
78
|
-
type: string;
|
|
79
|
-
tag: string;
|
|
80
|
-
attrs: [string, string][] | null;
|
|
81
|
-
map: [number, number] | null;
|
|
82
|
-
nesting: Token.Nesting;
|
|
83
|
-
level: number;
|
|
84
|
-
children: any[] | null;
|
|
85
|
-
content: string;
|
|
86
|
-
markup: string;
|
|
87
|
-
info: string;
|
|
88
|
-
meta: any;
|
|
89
|
-
block: boolean;
|
|
90
|
-
hidden: boolean;
|
|
91
|
-
attrIndex(name: string): number;
|
|
92
|
-
attrPush(attrData: [string, string]): void;
|
|
93
|
-
attrSet(name: string, value: string): void;
|
|
94
|
-
attrGet(name: string): string | null;
|
|
95
|
-
attrJoin(name: string, value: string): void;
|
|
96
|
-
}) => boolean;
|
|
97
|
-
tokensToAst: (tokens: {
|
|
98
|
-
type: string;
|
|
99
|
-
tag: string;
|
|
100
|
-
attrs: [string, string][] | null;
|
|
101
|
-
map: [number, number] | null;
|
|
102
|
-
nesting: Token.Nesting;
|
|
103
|
-
level: number;
|
|
104
|
-
children: any[] | null;
|
|
105
|
-
content: string;
|
|
106
|
-
markup: string;
|
|
107
|
-
info: string;
|
|
108
|
-
meta: any;
|
|
109
|
-
block: boolean;
|
|
110
|
-
hidden: boolean;
|
|
111
|
-
attrIndex(name: string): number;
|
|
112
|
-
attrPush(attrData: [string, string]): void;
|
|
113
|
-
attrSet(name: string, value: string): void;
|
|
114
|
-
attrGet(name: string): string | null;
|
|
115
|
-
attrJoin(name: string, value: string): void;
|
|
116
|
-
}[]) => ASTNode[];
|
|
117
|
-
genTreeNode: (node: {
|
|
118
|
-
type: string;
|
|
119
|
-
tag: string;
|
|
120
|
-
attrs: [string, string][] | null;
|
|
121
|
-
map: [number, number] | null;
|
|
122
|
-
nesting: Token.Nesting;
|
|
123
|
-
level: number;
|
|
124
|
-
children: any[] | null;
|
|
125
|
-
content: string;
|
|
126
|
-
markup: string;
|
|
127
|
-
info: string;
|
|
128
|
-
meta: any;
|
|
129
|
-
block: boolean;
|
|
130
|
-
hidden: boolean;
|
|
131
|
-
attrIndex(name: string): number;
|
|
132
|
-
attrPush(attrData: [string, string]): void;
|
|
133
|
-
attrSet(name: string, value: string): void;
|
|
134
|
-
attrGet(name: string): string | null;
|
|
135
|
-
attrJoin(name: string, value: string): void;
|
|
136
|
-
} | null) => ASTNode;
|
|
137
|
-
matchHtmlToken: (token: {
|
|
138
|
-
type: string;
|
|
139
|
-
tag: string;
|
|
140
|
-
attrs: [string, string][] | null;
|
|
141
|
-
map: [number, number] | null;
|
|
142
|
-
nesting: Token.Nesting;
|
|
143
|
-
level: number;
|
|
144
|
-
children: any[] | null;
|
|
145
|
-
content: string;
|
|
146
|
-
markup: string;
|
|
147
|
-
info: string;
|
|
148
|
-
meta: any;
|
|
149
|
-
block: boolean;
|
|
150
|
-
hidden: boolean;
|
|
151
|
-
attrIndex(name: string): number;
|
|
152
|
-
attrPush(attrData: [string, string]): void;
|
|
153
|
-
attrSet(name: string, value: string): void;
|
|
154
|
-
attrGet(name: string): string | null;
|
|
155
|
-
attrJoin(name: string, value: string): void;
|
|
156
|
-
}, stack: {
|
|
157
|
-
type: string;
|
|
158
|
-
tag: string;
|
|
159
|
-
attrs: [string, string][] | null;
|
|
160
|
-
map: [number, number] | null;
|
|
161
|
-
nesting: Token.Nesting;
|
|
162
|
-
level: number;
|
|
163
|
-
children: any[] | null;
|
|
164
|
-
content: string;
|
|
165
|
-
markup: string;
|
|
166
|
-
info: string;
|
|
167
|
-
meta: any;
|
|
168
|
-
block: boolean;
|
|
169
|
-
hidden: boolean;
|
|
170
|
-
attrIndex(name: string): number;
|
|
171
|
-
attrPush(attrData: [string, string]): void;
|
|
172
|
-
attrSet(name: string, value: string): void;
|
|
173
|
-
attrGet(name: string): string | null;
|
|
174
|
-
attrJoin(name: string, value: string): void;
|
|
175
|
-
}[]) => void;
|
|
176
|
-
isValidTagName: (tagName: string | undefined) => boolean;
|
|
177
|
-
};
|
|
178
|
-
mdCardService: any;
|
|
179
|
-
noDiff: boolean;
|
|
180
|
-
constructor(renderer: Renderer2, cdr: ChangeDetectorRef);
|
|
181
|
-
ngOnInit(): void;
|
|
182
|
-
get adapter(): MarkdownCardAdapter;
|
|
183
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
184
|
-
private parseContent;
|
|
185
|
-
private renderContent;
|
|
186
|
-
private getEmptyCodeBlock;
|
|
187
|
-
private astToVnodes;
|
|
188
|
-
private processASTNode;
|
|
189
|
-
private processHTMLNode;
|
|
190
|
-
private renderContentNoDiff;
|
|
191
|
-
private processInlineToken;
|
|
192
|
-
private processFenceNode;
|
|
193
|
-
private processASTNodeInternal;
|
|
194
|
-
private processToken;
|
|
195
|
-
private createCodeBlock;
|
|
196
|
-
private typewriterStart;
|
|
197
|
-
ngOnDestroy(): void;
|
|
198
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MarkdownCardComponent, never>;
|
|
199
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MarkdownCardComponent, "mc-markdown-card", never, { "content": { "alias": "content"; "required": false; }; "typing": { "alias": "typing"; "required": false; }; "enableThink": { "alias": "enableThink"; "required": false; }; "typingOptions": { "alias": "typingOptions"; "required": false; }; "thinkOptions": { "alias": "thinkOptions"; "required": false; }; "mdOptions": { "alias": "mdOptions"; "required": false; }; "mdPlugins": { "alias": "mdPlugins"; "required": false; }; "customXssRules": { "alias": "customXssRules"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "enableMermaid": { "alias": "enableMermaid"; "required": false; }; "mermaidConfig": { "alias": "mermaidConfig"; "required": false; }; "actionsTemplate": { "alias": "actionsTemplate"; "required": false; }; "headerTemplate": { "alias": "headerTemplate"; "required": false; }; "contentTemplate": { "alias": "contentTemplate"; "required": false; }; }, { "afterMdtInit": "afterMdtInit"; "typingStart": "typingStart"; "typingEvent": "typingEvent"; "typingEnd": "typingEnd"; }, never, ["*"], false, never>;
|
|
200
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "./markdown-card.component";
|
|
4
|
-
import * as i2 from "./code-block.component";
|
|
5
|
-
import * as i3 from "@angular/common";
|
|
6
|
-
import * as i4 from "../Locale/translate.pipe";
|
|
7
|
-
import * as i5 from "../Locale/locale.module";
|
|
8
|
-
export declare class MarkdownCardModule {
|
|
9
|
-
static forRoot(): ModuleWithProviders<MarkdownCardModule>;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MarkdownCardModule, never>;
|
|
11
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MarkdownCardModule, [typeof i1.MarkdownCardComponent, typeof i2.CodeBlockComponent], [typeof i3.CommonModule, typeof i4.TranslatePipe, typeof i5.LocaleModule], [typeof i1.MarkdownCardComponent, typeof i2.CodeBlockComponent]>;
|
|
12
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<MarkdownCardModule>;
|
|
13
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export type noopFunction = (...args: any) => any;
|
|
2
|
-
export interface DefaultAdapter {
|
|
3
|
-
getProp(key: string): any;
|
|
4
|
-
getProps(): any;
|
|
5
|
-
getState(key: string): any;
|
|
6
|
-
getStates(): any;
|
|
7
|
-
setState(s: any, callback?: any): void;
|
|
8
|
-
getCache(c: string): any;
|
|
9
|
-
getCaches(): any;
|
|
10
|
-
setCache(key: any, value: any): void;
|
|
11
|
-
nextTick(cb: (...args: any) => void): void;
|
|
12
|
-
}
|
|
13
|
-
declare class BaseFoundation<T extends DefaultAdapter> {
|
|
14
|
-
static get cssClasses(): {};
|
|
15
|
-
static get strings(): {};
|
|
16
|
-
static get numbers(): {};
|
|
17
|
-
static get defaultAdapter(): {
|
|
18
|
-
getProp: () => void;
|
|
19
|
-
getProps: () => void;
|
|
20
|
-
getState: () => void;
|
|
21
|
-
getStates: () => void;
|
|
22
|
-
setState: () => void;
|
|
23
|
-
getContext: () => void;
|
|
24
|
-
getContexts: () => void;
|
|
25
|
-
getCache: () => void;
|
|
26
|
-
setCache: () => void;
|
|
27
|
-
getCaches: () => void;
|
|
28
|
-
stopPropagation: () => void;
|
|
29
|
-
};
|
|
30
|
-
_adapter: T;
|
|
31
|
-
constructor(adapter: T);
|
|
32
|
-
getProp(key: string): any;
|
|
33
|
-
getProps(): any;
|
|
34
|
-
getState(key: string): any;
|
|
35
|
-
getStates(): any;
|
|
36
|
-
setState(states: any, cb?: (...args: any) => void): void;
|
|
37
|
-
getCaches(): any;
|
|
38
|
-
getCache(key: string): any;
|
|
39
|
-
setCache(key: string, value: any): void | "";
|
|
40
|
-
nextTick(cb: (...args: any) => void): void;
|
|
41
|
-
_isInProps(key: string): boolean;
|
|
42
|
-
init(lifecycle?: any): void;
|
|
43
|
-
destroy(): void;
|
|
44
|
-
}
|
|
45
|
-
export default BaseFoundation;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export type BubbleVariant = 'filled' | 'none' | 'bordered';
|
|
2
|
-
export type AvatarPosition = 'top' | 'side';
|
|
3
|
-
export type BubbleAlign = 'left' | 'right';
|
|
4
|
-
export interface BubbleAvatar {
|
|
5
|
-
name?: string;
|
|
6
|
-
gender?: string;
|
|
7
|
-
width?: number;
|
|
8
|
-
height?: number;
|
|
9
|
-
isRound?: boolean;
|
|
10
|
-
imgSrc?: string;
|
|
11
|
-
displayName?: string;
|
|
12
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BubbleAvatar } from "./common/bubble-types";
|
|
2
|
-
import BaseFoundation, { DefaultAdapter } from "../Base/foundation";
|
|
3
|
-
export interface BubbleAdapter extends DefaultAdapter {
|
|
4
|
-
}
|
|
5
|
-
export declare class BubbleFoundation extends BaseFoundation<BubbleAdapter> {
|
|
6
|
-
constructor(adapter: BubbleAdapter);
|
|
7
|
-
getBubbleClasses(): string;
|
|
8
|
-
getIsEmptyAvatar(avatarConfig: BubbleAvatar | undefined): boolean;
|
|
9
|
-
}
|