@piying-lib/angular-daisyui 1.2.0 → 1.2.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/extension/index.d.ts +59 -9
- package/fesm2022/piying-lib-angular-daisyui-extension.mjs +246 -11
- package/fesm2022/piying-lib-angular-daisyui-extension.mjs.map +1 -1
- package/fesm2022/{piying-lib-angular-daisyui-field-control-props.directive-C5mF89PX.mjs → piying-lib-angular-daisyui-field-control-props.directive-I-MQ3iQV.mjs} +2 -1
- package/fesm2022/piying-lib-angular-daisyui-field-control-props.directive-I-MQ3iQV.mjs.map +1 -0
- package/fesm2022/piying-lib-angular-daisyui-field-control.mjs +142 -16
- package/fesm2022/piying-lib-angular-daisyui-field-control.mjs.map +1 -1
- package/fesm2022/piying-lib-angular-daisyui-field-group.mjs +90 -12
- package/fesm2022/piying-lib-angular-daisyui-field-group.mjs.map +1 -1
- package/fesm2022/piying-lib-angular-daisyui-non-field-control.mjs +145 -0
- package/fesm2022/piying-lib-angular-daisyui-non-field-control.mjs.map +1 -1
- package/fesm2022/piying-lib-angular-daisyui-wrapper.mjs +2 -2
- package/fesm2022/piying-lib-angular-daisyui-wrapper.mjs.map +1 -1
- package/field-control/index.d.ts +126 -6
- package/field-group/index.d.ts +91 -9
- package/non-field-control/index.d.ts +150 -0
- package/package.json +2 -2
- package/wrapper/index.d.ts +1 -1
- package/fesm2022/piying-lib-angular-daisyui-field-control-props.directive-C5mF89PX.mjs.map +0 -1
|
@@ -11,13 +11,22 @@ import { CssPrefixPipe, MergeClassPipe, TwPrefixPipe } from '@piying-lib/angular
|
|
|
11
11
|
import { PurePipe } from '@cyia/ngx-common/pipe';
|
|
12
12
|
import { FormsModule } from '@angular/forms';
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* 警告提示组件
|
|
16
|
+
* 用于显示重要的提示信息,支持多种样式、颜色和布局方向
|
|
17
|
+
* 常用于操作反馈、错误提示、成功通知等场景
|
|
18
|
+
*/
|
|
14
19
|
class AlertNFCC {
|
|
15
20
|
static __version = 2;
|
|
16
21
|
StrOrTemplateComponent = StrOrTemplateComponent;
|
|
17
22
|
templateRef = viewChild.required('templateRef');
|
|
23
|
+
/** 样式风格 */
|
|
18
24
|
style = input(...(ngDevMode ? [undefined, { debugName: "style" }] : []));
|
|
25
|
+
/** 颜色主题 */
|
|
19
26
|
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : []));
|
|
27
|
+
/** 方向 */
|
|
20
28
|
direction = input(...(ngDevMode ? [undefined, { debugName: "direction" }] : []));
|
|
29
|
+
/** 内容 */
|
|
21
30
|
content = input('Default', ...(ngDevMode ? [{ debugName: "content" }] : []));
|
|
22
31
|
#theme = inject(ThemeService);
|
|
23
32
|
wrapperClass$ = computed(() => {
|
|
@@ -31,13 +40,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
31
40
|
args: [{ selector: 'app-alert', imports: [AttributesDirective, NgClass, SelectorlessOutlet], template: "<ng-template #templateRef let-attr=\"attributes\">\n <div role=\"alert\" [attributes]=\"attr()\" [ngClass]=\"wrapperClass$()\">\n <ng-template\n [selectlessOutlet]=\"StrOrTemplateComponent\"\n [selectlessOutletInputs]=\"{ content: content }\"\n ></ng-template>\n </div>\n</ng-template>\n" }]
|
|
32
41
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }] } });
|
|
33
42
|
|
|
43
|
+
/**
|
|
44
|
+
* 头像组件
|
|
45
|
+
* 用于显示用户头像、图标或占位符,支持在线/离线状态指示
|
|
46
|
+
* 可用于个人资料、列表项、评论等场景
|
|
47
|
+
*/
|
|
34
48
|
class AvatarNFCC {
|
|
35
49
|
static __version = 2;
|
|
36
50
|
templateRef = viewChild.required('templateRef');
|
|
51
|
+
/** 占位符文本或内容 */
|
|
37
52
|
placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : []));
|
|
53
|
+
/** 占位符 CSS 类名 */
|
|
38
54
|
placeholderClass = input('', ...(ngDevMode ? [{ debugName: "placeholderClass" }] : []));
|
|
55
|
+
/** 图片 URL */
|
|
39
56
|
imgUrl = input(...(ngDevMode ? [undefined, { debugName: "imgUrl" }] : []));
|
|
57
|
+
/** 包装器 CSS 类名 */
|
|
40
58
|
wrapperClass = input('w-24 rounded', ...(ngDevMode ? [{ debugName: "wrapperClass" }] : []));
|
|
59
|
+
/** 状态指示 */
|
|
41
60
|
status = input(...(ngDevMode ? [undefined, { debugName: "status" }] : []));
|
|
42
61
|
#theme = inject(ThemeService);
|
|
43
62
|
mainClass$$ = computed(() => {
|
|
@@ -51,13 +70,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
51
70
|
args: [{ selector: 'app-avatar', imports: [AttributesDirective, NgClass], template: "<ng-template #templateRef let-attr=\"attributes\">\n <div [attributes]=\"attr()\" [ngClass]=\"mainClass$$()\">\n <div [class]=\"wrapperClass()\">\n @if (imgUrl()) {\n <img [src]=\"imgUrl()\" />\n } @else {\n <span [class]=\"placeholderClass()\">{{ placeholder() }}</span>\n }\n </div>\n </div>\n</ng-template>\n" }]
|
|
52
71
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], placeholderClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholderClass", required: false }] }], imgUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "imgUrl", required: false }] }], wrapperClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrapperClass", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }] } });
|
|
53
72
|
|
|
73
|
+
/**
|
|
74
|
+
* 徽章组件
|
|
75
|
+
* 用于显示数量标签、状态标记或重要提示,如未读消息数、通知提示等
|
|
76
|
+
* 支持多种样式风格和颜色尺寸配置
|
|
77
|
+
*/
|
|
54
78
|
class BadgeNFCC {
|
|
55
79
|
static __version = 2;
|
|
56
80
|
StrOrTemplateComponent = StrOrTemplateComponent;
|
|
57
81
|
templateRef = viewChild.required('templateRef');
|
|
82
|
+
/** 样式风格 */
|
|
58
83
|
style = input(...(ngDevMode ? [undefined, { debugName: "style" }] : []));
|
|
84
|
+
/** 颜色主题 */
|
|
59
85
|
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : []));
|
|
86
|
+
/** 尺寸大小 */
|
|
60
87
|
size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
|
|
88
|
+
/** 内容 */
|
|
61
89
|
content = input('Badge', ...(ngDevMode ? [{ debugName: "content" }] : []));
|
|
62
90
|
#theme = inject(ThemeService);
|
|
63
91
|
wrapperClass$ = computed(() => {
|
|
@@ -71,10 +99,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
71
99
|
args: [{ selector: 'app-badge', imports: [AttributesDirective, NgClass, SelectorlessOutlet, EventsDirective], template: "<ng-template #templateRef let-attr=\"attributes\" let-events=\"events\">\n <span [attributes]=\"attr()\" [ngClass]=\"wrapperClass$()\" [events]=\"events()\">\n <ng-template\n [selectlessOutlet]=\"StrOrTemplateComponent\"\n [selectlessOutletInputs]=\"{ content: content }\"\n ></ng-template\n ></span>\n</ng-template>\n" }]
|
|
72
100
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }] } });
|
|
73
101
|
|
|
102
|
+
/**
|
|
103
|
+
* 面包屑导航组件
|
|
104
|
+
* 用于显示页面层级结构和当前位置,帮助用户了解所处位置并快速返回上级页面
|
|
105
|
+
* 支持自定义标签、图标和 URL 配置
|
|
106
|
+
*/
|
|
74
107
|
class BreadcrumbsNFCC {
|
|
75
108
|
static __version = 2;
|
|
76
109
|
templateRef = viewChild.required('templateRef');
|
|
110
|
+
/** 面包屑选项列表 */
|
|
77
111
|
options = input(...(ngDevMode ? [undefined, { debugName: "options" }] : []));
|
|
112
|
+
/** 选项 CSS 类名 */
|
|
78
113
|
optionClass = input(...(ngDevMode ? [undefined, { debugName: "optionClass" }] : []));
|
|
79
114
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: BreadcrumbsNFCC, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
80
115
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: BreadcrumbsNFCC, isStandalone: true, selector: "app-breadcrumbs", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionClass: { classPropertyName: "optionClass", publicName: "optionClass", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #displayTemp let-item>\n @if (item.icon) {\n <mat-icon\n [inline]=\"item.icon.inline\"\n [fontIcon]=\"item.icon.fontIcon\"\n [fontSet]=\"item.icon.fontSet\"\n [svgIcon]=\"item.icon.svgIcon\"\n ></mat-icon>\n }\n @if (item.label) {\n <span>{{ item.label }}</span>\n }\n @if (item.templateRef) {\n <ng-container *ngTemplateOutlet=\"item.templateRef; context: { $implicit: item }\"></ng-container>\n }\n</ng-template>\n\n<ng-template #templateRef let-attr=\"attributes\">\n <div\n [class]=\"attr()?.class | mergeClass: ('breadcrumbs' | cssPrefix)\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n >\n <ul>\n @for (item of options(); track $index) {\n <li [class]=\"optionClass()\">\n @if (item.url && item.extraLink) {\n <a [href]=\"item.url\" class=\"{{ 'link' | cssPrefix }}\">\n <ng-container\n *ngTemplateOutlet=\"displayTemp; context: { $implicit: item }\"\n ></ng-container>\n </a>\n } @else if (item.url) {\n <a\n [routerLink]=\"item.url\"\n routerLinkActive=\"{{ 'breadcrumbs-item-activate' | cssPrefix }}\"\n class=\"{{ 'link' | cssPrefix }}\"\n >\n <ng-container\n *ngTemplateOutlet=\"displayTemp; context: { $implicit: item }\"\n ></ng-container\n ></a>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"displayTemp; context: { $implicit: item }\"\n ></ng-container>\n }\n </li>\n }\n </ul>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: AttributesDirective, selector: "[attributes]", inputs: ["attributes", "excludes"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: CssPrefixPipe, name: "cssPrefix" }, { kind: "pipe", type: MergeClassPipe, name: "mergeClass" }] });
|
|
@@ -92,18 +127,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
92
127
|
], template: "<ng-template #displayTemp let-item>\n @if (item.icon) {\n <mat-icon\n [inline]=\"item.icon.inline\"\n [fontIcon]=\"item.icon.fontIcon\"\n [fontSet]=\"item.icon.fontSet\"\n [svgIcon]=\"item.icon.svgIcon\"\n ></mat-icon>\n }\n @if (item.label) {\n <span>{{ item.label }}</span>\n }\n @if (item.templateRef) {\n <ng-container *ngTemplateOutlet=\"item.templateRef; context: { $implicit: item }\"></ng-container>\n }\n</ng-template>\n\n<ng-template #templateRef let-attr=\"attributes\">\n <div\n [class]=\"attr()?.class | mergeClass: ('breadcrumbs' | cssPrefix)\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n >\n <ul>\n @for (item of options(); track $index) {\n <li [class]=\"optionClass()\">\n @if (item.url && item.extraLink) {\n <a [href]=\"item.url\" class=\"{{ 'link' | cssPrefix }}\">\n <ng-container\n *ngTemplateOutlet=\"displayTemp; context: { $implicit: item }\"\n ></ng-container>\n </a>\n } @else if (item.url) {\n <a\n [routerLink]=\"item.url\"\n routerLinkActive=\"{{ 'breadcrumbs-item-activate' | cssPrefix }}\"\n class=\"{{ 'link' | cssPrefix }}\"\n >\n <ng-container\n *ngTemplateOutlet=\"displayTemp; context: { $implicit: item }\"\n ></ng-container\n ></a>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"displayTemp; context: { $implicit: item }\"\n ></ng-container>\n }\n </li>\n }\n </ul>\n </div>\n</ng-template>\n" }]
|
|
93
128
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionClass", required: false }] }] } });
|
|
94
129
|
|
|
130
|
+
/**
|
|
131
|
+
* 按钮组件
|
|
132
|
+
* 用于触发操作或提交表单,是最常用的操作控件
|
|
133
|
+
* 支持多种颜色、样式、尺寸、形状以及加载状态
|
|
134
|
+
*/
|
|
95
135
|
class ButtonNFCC {
|
|
96
136
|
static __version = 2;
|
|
97
137
|
StrOrTemplateComponent = StrOrTemplateComponent;
|
|
98
138
|
templateRef = viewChild.required('templateRef');
|
|
139
|
+
/** 颜色主题 */
|
|
99
140
|
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : []));
|
|
141
|
+
/** 按钮样式风格 */
|
|
100
142
|
style = input(...(ngDevMode ? [undefined, { debugName: "style" }] : []));
|
|
143
|
+
/** 尺寸大小 */
|
|
101
144
|
size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
|
|
145
|
+
/** 形状 */
|
|
102
146
|
shape = input(...(ngDevMode ? [undefined, { debugName: "shape" }] : []));
|
|
147
|
+
/** 是否激活状态 */
|
|
103
148
|
active = input(...(ngDevMode ? [undefined, { debugName: "active" }] : []));
|
|
149
|
+
/** 按钮内容 */
|
|
104
150
|
content = input('Default', ...(ngDevMode ? [{ debugName: "content" }] : []));
|
|
151
|
+
/** 点击事件处理函数 */
|
|
105
152
|
clicked = input(...(ngDevMode ? [undefined, { debugName: "clicked" }] : []));
|
|
153
|
+
/** 是否禁用 */
|
|
106
154
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
155
|
+
/** 是否禁用加载图标 */
|
|
107
156
|
disableLoadingIcon = input(false, ...(ngDevMode ? [{ debugName: "disableLoadingIcon" }] : []));
|
|
108
157
|
isLoading$ = signal(false, ...(ngDevMode ? [{ debugName: "isLoading$" }] : []));
|
|
109
158
|
async onClick(event) {
|
|
@@ -130,12 +179,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
130
179
|
args: [{ selector: 'app-button', imports: [AttributesDirective, CssPrefixPipe, SelectorlessOutlet, MergeClassPipe, TwPrefixPipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n @let forAttr = attr()?.for;\n @let isDisabled = isLoading$() || disabled();\n @if (forAttr) {\n <label\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"\n attr()?.class\n | mergeClass: wrapperClass$() : (isDisabled ? ('btn-disabled' | cssPrefix) : undefined)\n \"\n (click)=\"onClick($event)\"\n tabindex=\"-1\"\n role=\"button\"\n aria-disabled=\"true\"\n >\n @if (isLoading$() && !disableLoadingIcon()) {\n <span\n [class]=\"'loading loading-spinner' | cssPrefix | mergeClass: ('absolute z-10' | twPrefix)\"\n ></span>\n }\n <ng-template\n [selectlessOutlet]=\"StrOrTemplateComponent\"\n [selectlessOutletInputs]=\"{ content: content }\"\n ></ng-template\n ></label>\n } @else {\n <button\n [attributes]=\"attr()\"\n [excludes]=\"['class', 'type']\"\n [class]=\"attr()?.class | mergeClass: wrapperClass$()\"\n (click)=\"onClick($event)\"\n [disabled]=\"isLoading$() || disabled()\"\n [type]=\"attr()?.type ?? 'button'\"\n >\n @if (isLoading$() && !disableLoadingIcon()) {\n <span\n [class]=\"'loading loading-spinner' | cssPrefix | mergeClass: ('absolute z-10' | twPrefix)\"\n ></span>\n }\n <ng-template\n [selectlessOutlet]=\"StrOrTemplateComponent\"\n [selectlessOutletInputs]=\"{ content: content }\"\n ></ng-template>\n </button>\n }\n</ng-template>\n" }]
|
|
131
180
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], clicked: [{ type: i0.Input, args: [{ isSignal: true, alias: "clicked", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], disableLoadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableLoadingIcon", required: false }] }] } });
|
|
132
181
|
|
|
182
|
+
/**
|
|
183
|
+
* 分割线组件
|
|
184
|
+
* 用于在内容之间添加视觉分隔,支持水平/垂直方向和内容位置调整
|
|
185
|
+
* 常用于表单、列表、段落之间的分隔
|
|
186
|
+
*/
|
|
133
187
|
class DividerNFCC {
|
|
134
188
|
static __version = 2;
|
|
135
189
|
templateRef = viewChild.required('templateRef');
|
|
190
|
+
/** 颜色主题 */
|
|
136
191
|
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : []));
|
|
192
|
+
/** 方向 */
|
|
137
193
|
direction = input(...(ngDevMode ? [undefined, { debugName: "direction" }] : []));
|
|
194
|
+
/** 内容位置 */
|
|
138
195
|
contentPosition = input(...(ngDevMode ? [undefined, { debugName: "contentPosition" }] : []));
|
|
196
|
+
/** 分割线内容 */
|
|
139
197
|
content = input('Default', ...(ngDevMode ? [{ debugName: "content" }] : []));
|
|
140
198
|
#theme = inject(ThemeService);
|
|
141
199
|
wrapperClass$$ = computed(() => {
|
|
@@ -179,8 +237,11 @@ class FabItem {
|
|
|
179
237
|
class FabNFCC {
|
|
180
238
|
static __version = 2;
|
|
181
239
|
templateRef = viewChild.required('templateRef');
|
|
240
|
+
/** 选项列表 */
|
|
182
241
|
options = input(...(ngDevMode ? [undefined, { debugName: "options" }] : []));
|
|
242
|
+
/** 是否启用花朵式展开 */
|
|
183
243
|
flower = input(false, ...(ngDevMode ? [{ debugName: "flower" }] : []));
|
|
244
|
+
/** 点击选项后是否自动关闭 */
|
|
184
245
|
autoClose = input(true, ...(ngDevMode ? [{ debugName: "autoClose" }] : []));
|
|
185
246
|
resolvedOptions$$ = computed(() => {
|
|
186
247
|
return (this.options()?.map((option) => {
|
|
@@ -228,10 +289,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
228
289
|
], template: "<ng-template #iconTemp let-item let-disableButton=\"disableButton\">\n @if (item.option.templateRef) {\n <ng-container\n *ngTemplateOutlet=\"item.option.templateRef; context: { $implicit: item }\"\n ></ng-container>\n } @else if (item.option.label) {\n @if (disableButton) {\n <span [class]=\"item.option.class | mergeClass: commonClass()\" (click)=\"item.onClick($event)\">\n {{ item.option.label }}\n </span>\n } @else {\n <button\n [class]=\"item.option.class\"\n (click)=\"item.onClick($event)\"\n [disabled]=\"item.isLoading$()\"\n >\n {{ item.option.label }}\n </button>\n }\n } @else {\n @let icon = item.option.icon;\n <mat-icon\n [class]=\"item.option.class\"\n (click)=\"item.onClick($event)\"\n [ariaDisabled]=\"item.isLoading$()\"\n [inline]=\"icon.inline\"\n [fontIcon]=\"icon.fontIcon\"\n [fontSet]=\"icon.fontSet\"\n [svgIcon]=\"icon.svgIcon\"\n ></mat-icon>\n }\n</ng-template>\n\n<ng-template #templateRef let-attr=\"attributes\">\n <div\n [class]=\"attr()?.class\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n class=\"{{ 'fab' | cssPrefix }}\"\n [ngClass]=\"wrapperClass()\"\n >\n @let defaultIcon = defaultIcon$$();\n <div tabindex=\"0\" role=\"button\">\n <ng-container\n *ngTemplateOutlet=\"iconTemp; context: { $implicit: defaultIcon, disableButton: true }\"\n ></ng-container>\n </div>\n @if (closeIcon$$(); as closeIcon) {\n <div class=\"{{ 'fab-close' | cssPrefix }}\" role=\"button\" tabindex=\"0\">\n <ng-container\n *ngTemplateOutlet=\"iconTemp; context: { $implicit: closeIcon, disableButton: true }\"\n ></ng-container>\n </div>\n }\n @if (mainIcon$$(); as mainIcon) {\n <div class=\"{{ 'fab-main-action' | cssPrefix }}\">\n <ng-container *ngTemplateOutlet=\"iconTemp; context: { $implicit: mainIcon }\"></ng-container>\n </div>\n }\n\n @for (item of resolvedOptions$$(); track $index) {\n <ng-container *ngTemplateOutlet=\"iconTemp; context: { $implicit: item }\"></ng-container>\n }\n </div>\n</ng-template>\n" }]
|
|
229
290
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], flower: [{ type: i0.Input, args: [{ isSignal: true, alias: "flower", required: false }] }], autoClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoClose", required: false }] }], commonClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "commonClass", required: false }] }], defaultIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultIcon", required: false }] }], closeIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeIcon", required: false }] }], mainIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "mainIcon", required: false }] }] } });
|
|
230
291
|
|
|
292
|
+
/**
|
|
293
|
+
* 键盘按键组件
|
|
294
|
+
* 用于展示键盘快捷键或组合键提示,常见于帮助文档、教程或功能说明中
|
|
295
|
+
* 可显示单个按键或按键组合
|
|
296
|
+
*/
|
|
231
297
|
class KbdNFCC {
|
|
232
298
|
static __version = 2;
|
|
233
299
|
templateRef = viewChild.required('templateRef');
|
|
300
|
+
/** 尺寸大小 */
|
|
234
301
|
size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
|
|
302
|
+
/** 内容 */
|
|
235
303
|
content = input('Default', ...(ngDevMode ? [{ debugName: "content" }] : []));
|
|
236
304
|
#theme = inject(ThemeService);
|
|
237
305
|
wrapperClass$ = computed(() => {
|
|
@@ -245,10 +313,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
245
313
|
args: [{ selector: 'app-kbd', imports: [AttributesDirective, NgClass, CssPrefixPipe, MergeClassPipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n <kbd\n [class]=\"attr()?.class | mergeClass: ('kbd' | cssPrefix)\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [ngClass]=\"wrapperClass$()\"\n >{{ content() }}</kbd\n >\n</ng-template>\n" }]
|
|
246
314
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }] } });
|
|
247
315
|
|
|
316
|
+
/**
|
|
317
|
+
* 加载指示器组件
|
|
318
|
+
* 用于在数据加载、请求处理等异步操作期间显示加载状态
|
|
319
|
+
* 提供多种样式类型(-spinner、dots、ring 等)供选择
|
|
320
|
+
*/
|
|
248
321
|
class LoadingNFCC {
|
|
249
322
|
static __version = 2;
|
|
250
323
|
templateRef = viewChild.required('templateRef');
|
|
324
|
+
/** 尺寸大小 */
|
|
251
325
|
size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
|
|
326
|
+
/** 加载类型 */
|
|
252
327
|
type = input(...(ngDevMode ? [undefined, { debugName: "type" }] : []));
|
|
253
328
|
#theme = inject(ThemeService);
|
|
254
329
|
wrapperClass$$ = computed(() => {
|
|
@@ -262,11 +337,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
262
337
|
args: [{ selector: 'app-loading', imports: [AttributesDirective, NgClass, CssPrefixPipe, MergeClassPipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n <span\n [class]=\"attr()?.class | mergeClass: ('loading' | cssPrefix)\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [ngClass]=\"wrapperClass$$()\"\n ></span>\n</ng-template>\n" }]
|
|
263
338
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }] } });
|
|
264
339
|
|
|
340
|
+
/**
|
|
341
|
+
* 进度条组件
|
|
342
|
+
* 用于显示操作完成的进度或数据加载的百分比
|
|
343
|
+
* 支持自定义颜色和进度值显示
|
|
344
|
+
*/
|
|
265
345
|
class ProgressNFCC {
|
|
266
346
|
static __version = 2;
|
|
267
347
|
templateRef = viewChild.required('templateRef');
|
|
348
|
+
/** 颜色主题 */
|
|
268
349
|
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : []));
|
|
350
|
+
/** 进度值 */
|
|
269
351
|
value = input(...(ngDevMode ? [undefined, { debugName: "value" }] : []));
|
|
352
|
+
/** 最大值 */
|
|
270
353
|
max = input(100, ...(ngDevMode ? [{ debugName: "max" }] : []));
|
|
271
354
|
#theme = inject(ThemeService);
|
|
272
355
|
wrapperClass$ = computed(() => {
|
|
@@ -283,13 +366,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
283
366
|
args: [{ selector: 'app-progress', imports: [AttributesDirective, NgClass, CssPrefixPipe, MergeClassPipe, PurePipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n @if (isNumber | pure: value()) {\n <progress\n [value]=\"value()\"\n [max]=\"max()\"\n [class]=\"attr()?.class | mergeClass: ('progress' | cssPrefix)\"\n [ngClass]=\"wrapperClass$()\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n ></progress>\n } @else {\n <progress\n [max]=\"max()\"\n [class]=\"attr()?.class | mergeClass: ('progress' | cssPrefix)\"\n [ngClass]=\"wrapperClass$()\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n ></progress>\n }\n</ng-template>\n" }]
|
|
284
367
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }] } });
|
|
285
368
|
|
|
369
|
+
/**
|
|
370
|
+
* 环形进度组件
|
|
371
|
+
* 用于显示圆形的进度指示器,适合空间受限或需要美观展示的场景
|
|
372
|
+
* 支持自定义线宽和进度值配置
|
|
373
|
+
*/
|
|
286
374
|
class RadialProgressNFCC {
|
|
287
375
|
static __version = 2;
|
|
288
376
|
templateRef = viewChild.required('templateRef');
|
|
377
|
+
/** 进度值 */
|
|
289
378
|
value = input(0, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
379
|
+
/** 进度值映射函数 */
|
|
290
380
|
valueMap = input((value) => {
|
|
291
381
|
return `${value * 100}%`;
|
|
292
382
|
}, ...(ngDevMode ? [{ debugName: "valueMap" }] : []));
|
|
383
|
+
/** 线宽 */
|
|
293
384
|
strokeWidth = input(...(ngDevMode ? [undefined, { debugName: "strokeWidth" }] : []));
|
|
294
385
|
value$$ = computed(() => {
|
|
295
386
|
return this.value() * 100;
|
|
@@ -313,13 +404,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
313
404
|
args: [{ selector: 'app-radial-progress', imports: [AttributesDirective, NgStyle, CssPrefixPipe, MergeClassPipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n <div\n [aria-valuenow]=\"value$$()\"\n role=\"progressbar\"\n [ngStyle]=\"wrapperStyle$$()\"\n [class]=\"attr()?.class | mergeClass: ('radial-progress' | cssPrefix)\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n >\n {{ valueMap()(value()) }}\n </div>\n</ng-template>\n" }]
|
|
314
405
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], valueMap: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueMap", required: false }] }], strokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "strokeWidth", required: false }] }] } });
|
|
315
406
|
|
|
407
|
+
/**
|
|
408
|
+
* 状态指示器组件
|
|
409
|
+
* 用于显示对象的当前状态(如在线、离线、完成等),常用于列表项或卡片中
|
|
410
|
+
* 支持多种动画效果(ping、bounce)增强视觉提示
|
|
411
|
+
*/
|
|
316
412
|
class StatusNFCC {
|
|
317
413
|
static __version = 2;
|
|
318
414
|
templateRef = viewChild.required('templateRef');
|
|
415
|
+
/** 内容 */
|
|
319
416
|
content = input('Default', ...(ngDevMode ? [{ debugName: "content" }] : []));
|
|
417
|
+
/** 颜色主题 */
|
|
320
418
|
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : []));
|
|
419
|
+
/** 尺寸大小 */
|
|
321
420
|
size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
|
|
421
|
+
/** 是否启用 ping 动画效果 */
|
|
322
422
|
animatePing = input(...(ngDevMode ? [undefined, { debugName: "animatePing" }] : []));
|
|
423
|
+
/** 是否启用 bounce 动画效果 */
|
|
323
424
|
animateBounce = input(...(ngDevMode ? [undefined, { debugName: "animateBounce" }] : []));
|
|
324
425
|
#theme = inject(ThemeService);
|
|
325
426
|
wrapperClass$ = computed(() => {
|
|
@@ -333,9 +434,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
333
434
|
args: [{ selector: 'app-status', imports: [AttributesDirective, NgClass, CssPrefixPipe, TwPrefixPipe, MergeClassPipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n <div\n [class]=\"attr()?.class | mergeClass: 'flex items-center gap-2'\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n >\n @if (animatePing()) {\n <div class=\"{{ 'inline-grid *:[grid-area:1/1]' | twPrefix }}\">\n <div class=\"{{ 'status' | cssPrefix }}\" [ngClass]=\"wrapperClass$()\"></div>\n <div class=\"{{ 'status' | cssPrefix }}\" [ngClass]=\"wrapperClass$()\"></div>\n </div>\n } @else {\n <div class=\"{{ 'status' | cssPrefix }}\" [ngClass]=\"wrapperClass$()\"></div>\n }\n @if (content(); as value) {\n <span>\n {{ value }}\n </span>\n }\n </div>\n</ng-template>\n" }]
|
|
334
435
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], animatePing: [{ type: i0.Input, args: [{ isSignal: true, alias: "animatePing", required: false }] }], animateBounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "animateBounce", required: false }] }] } });
|
|
335
436
|
|
|
437
|
+
/**
|
|
438
|
+
* 主题控制器组件
|
|
439
|
+
* 用于切换应用的主题样式,通常与主题切换功能配合使用
|
|
440
|
+
* 可通过配置不同的主题值来改变整体配色方案
|
|
441
|
+
*/
|
|
336
442
|
class ThemeControllerNFCC {
|
|
337
443
|
static __version = 2;
|
|
338
444
|
templateRef = viewChild.required('templateRef');
|
|
445
|
+
/** 主题值 */
|
|
339
446
|
value = input('synthwave', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
340
447
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThemeControllerNFCC, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
341
448
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.14", type: ThemeControllerNFCC, isStandalone: true, selector: "app-theme-controller", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #templateRef let-attr=\"attributes\">\n <input\n type=\"checkbox\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"attr()?.class | mergeClass: ('toggle theme-controller' | cssPrefix)\"\n [value]=\"value()\"\n />\n</ng-template>\n", dependencies: [{ kind: "directive", type: AttributesDirective, selector: "[attributes]", inputs: ["attributes", "excludes"] }, { kind: "pipe", type: CssPrefixPipe, name: "cssPrefix" }, { kind: "pipe", type: MergeClassPipe, name: "mergeClass" }] });
|
|
@@ -345,16 +452,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
345
452
|
args: [{ selector: 'app-theme-controller', imports: [AttributesDirective, CssPrefixPipe, MergeClassPipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n <input\n type=\"checkbox\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"attr()?.class | mergeClass: ('toggle theme-controller' | cssPrefix)\"\n [value]=\"value()\"\n />\n</ng-template>\n" }]
|
|
346
453
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }] } });
|
|
347
454
|
|
|
455
|
+
/**
|
|
456
|
+
* 下拉菜单组件
|
|
457
|
+
* 用于在有限空间内展示多个操作选项或列表项
|
|
458
|
+
* 支持悬停或点击触发,可配置菜单对齐方式和显示位置
|
|
459
|
+
*/
|
|
348
460
|
class DropdownNFCC {
|
|
349
461
|
static __version = 2;
|
|
350
462
|
StrOrTemplateComponent = StrOrTemplateComponent;
|
|
351
463
|
templateRef = viewChild.required('templateRef');
|
|
464
|
+
/** 标题内容 */
|
|
352
465
|
title = input('Default', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
466
|
+
/** 标题 CSS 类名 */
|
|
353
467
|
titleClass = input(...(ngDevMode ? [undefined, { debugName: "titleClass" }] : []));
|
|
468
|
+
/** 对齐方式 */
|
|
354
469
|
align = input(...(ngDevMode ? [undefined, { debugName: "align" }] : []));
|
|
470
|
+
/** 位置 */
|
|
355
471
|
position = input(...(ngDevMode ? [undefined, { debugName: "position" }] : []));
|
|
472
|
+
/** 触发动作 */
|
|
356
473
|
triggerAction = input(...(ngDevMode ? [undefined, { debugName: "triggerAction" }] : []));
|
|
474
|
+
/** 内容 */
|
|
357
475
|
content = input(...(ngDevMode ? [undefined, { debugName: "content" }] : []));
|
|
476
|
+
/** 内容 CSS 类名 */
|
|
358
477
|
contentClass = input(...(ngDevMode ? [undefined, { debugName: "contentClass" }] : []));
|
|
359
478
|
#theme = inject(ThemeService);
|
|
360
479
|
wrapperClass$ = computed(() => {
|
|
@@ -376,19 +495,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
376
495
|
], template: "<ng-template #templateRef let-attr=\"attributes\">\n <div\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"attr()?.class\"\n [ngClass]=\"wrapperClass$()\"\n >\n <div\n tabindex=\"0\"\n role=\"button\"\n class=\"{{ 'btn' | cssPrefix | mergeClass: ('m-1' | twPrefix) : titleClass() }}\"\n >\n <ng-template\n [selectlessOutlet]=\"StrOrTemplateComponent\"\n [selectlessOutletInputs]=\"{ content: title }\"\n ></ng-template>\n </div>\n <div tabindex=\"-1\" class=\"{{ 'dropdown-content' | cssPrefix | mergeClass: contentClass() }}\">\n <ng-template\n [selectlessOutlet]=\"StrOrTemplateComponent\"\n [selectlessOutletInputs]=\"{ content: content }\"\n ></ng-template>\n </div>\n </div>\n</ng-template>\n" }]
|
|
377
496
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], titleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleClass", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], triggerAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerAction", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], contentClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentClass", required: false }] }] } });
|
|
378
497
|
|
|
498
|
+
/**
|
|
499
|
+
* 统计数据显示组件
|
|
500
|
+
* 用于展示关键数据指标,支持标题、数值、描述和图标的组合展示
|
|
501
|
+
* 常用于数据报表、仪表盘等数据可视化场景
|
|
502
|
+
*/
|
|
379
503
|
class StatNFCC {
|
|
380
504
|
static __version = 2;
|
|
381
505
|
StrOrTemplateComponent = StrOrTemplateComponent;
|
|
382
506
|
PiyingView = PiyingView;
|
|
383
507
|
templateRef = viewChild.required('templateRef');
|
|
384
508
|
parentPyOptions = inject(PI_INPUT_OPTIONS_TOKEN, { optional: true });
|
|
509
|
+
/** 标题内容 */
|
|
385
510
|
title = input(...(ngDevMode ? [undefined, { debugName: "title" }] : []));
|
|
511
|
+
/** 标题 CSS 类名 */
|
|
386
512
|
titleClass = input(...(ngDevMode ? [undefined, { debugName: "titleClass" }] : []));
|
|
513
|
+
/** 数值内容 */
|
|
387
514
|
value = input(...(ngDevMode ? [undefined, { debugName: "value" }] : []));
|
|
515
|
+
/** 数值 CSS 类名 */
|
|
388
516
|
valueClass = input(...(ngDevMode ? [undefined, { debugName: "valueClass" }] : []));
|
|
517
|
+
/** 描述内容 */
|
|
389
518
|
desc = input(...(ngDevMode ? [undefined, { debugName: "desc" }] : []));
|
|
519
|
+
/** 描述 CSS 类名 */
|
|
390
520
|
descClass = input(...(ngDevMode ? [undefined, { debugName: "descClass" }] : []));
|
|
521
|
+
/** 图标内容 */
|
|
391
522
|
figure = input(...(ngDevMode ? [undefined, { debugName: "figure" }] : []));
|
|
523
|
+
/** 图标 CSS 类名 */
|
|
392
524
|
figureClass = input(...(ngDevMode ? [undefined, { debugName: "figureClass" }] : []));
|
|
393
525
|
templateInput = (schema) => {
|
|
394
526
|
return {
|
|
@@ -413,16 +545,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
413
545
|
], template: "<ng-template #templateRef let-attr=\"attributes\">\n <div\n [class]=\"'stat' | cssPrefix | mergeClass: attr?.().class\"\n [attributes]=\"attr?.()\"\n [excludes]=\"['class']\"\n >\n @if (title()) {\n <div [class]=\"'stat-title' | cssPrefix | mergeClass: titleClass()\">\n <ng-template\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"templateInput | pure: title\"\n ></ng-template>\n </div>\n }\n @if (value()) {\n <div [class]=\"'stat-value' | cssPrefix | mergeClass: valueClass()\">\n <ng-template\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"templateInput | pure: value\"\n ></ng-template>\n </div>\n }\n @if (desc()) {\n <div [class]=\"'stat-desc' | cssPrefix | mergeClass: descClass()\">\n <ng-template\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"templateInput | pure: desc\"\n ></ng-template>\n </div>\n }\n @if (figure()) {\n <div [class]=\"'stat-figure' | cssPrefix | mergeClass: figureClass()\">\n <ng-template\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"templateInput | pure: figure\"\n ></ng-template>\n </div>\n }\n </div>\n</ng-template>\n" }]
|
|
414
546
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], titleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleClass", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], valueClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueClass", required: false }] }], desc: [{ type: i0.Input, args: [{ isSignal: true, alias: "desc", required: false }] }], descClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "descClass", required: false }] }], figure: [{ type: i0.Input, args: [{ isSignal: true, alias: "figure", required: false }] }], figureClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "figureClass", required: false }] }] } });
|
|
415
547
|
|
|
548
|
+
/**
|
|
549
|
+
* 表单提交按钮组件
|
|
550
|
+
* 用于表单提交、重置等操作,具有与按钮组件相同的样式特性
|
|
551
|
+
* 常用于表单底部操作区域
|
|
552
|
+
*/
|
|
416
553
|
class InputButtonNFCC {
|
|
417
554
|
static __version = 2;
|
|
418
555
|
templateRef = viewChild.required('templateRef');
|
|
556
|
+
/** 按钮类型 */
|
|
419
557
|
type = input('submit', ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
558
|
+
/** 颜色主题 */
|
|
420
559
|
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : []));
|
|
560
|
+
/** 按钮样式风格 */
|
|
421
561
|
style = input(...(ngDevMode ? [undefined, { debugName: "style" }] : []));
|
|
562
|
+
/** 尺寸大小 */
|
|
422
563
|
size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
|
|
564
|
+
/** 形状 */
|
|
423
565
|
shape = input(...(ngDevMode ? [undefined, { debugName: "shape" }] : []));
|
|
566
|
+
/** 是否激活状态 */
|
|
424
567
|
active = input(...(ngDevMode ? [undefined, { debugName: "active" }] : []));
|
|
568
|
+
/** 点击事件处理函数 */
|
|
425
569
|
clicked = input(...(ngDevMode ? [undefined, { debugName: "clicked" }] : []));
|
|
570
|
+
/** 是否禁用 */
|
|
426
571
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
427
572
|
isLoading$ = signal(false, ...(ngDevMode ? [{ debugName: "isLoading$" }] : []));
|
|
428
573
|
async onClick(event) {
|