cmat 0.0.108 → 0.0.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/cmat-components-custom-formly.mjs +4 -3
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-empty-state.mjs +7 -3
- package/fesm2022/cmat-components-empty-state.mjs.map +1 -1
- package/fesm2022/cmat.mjs +10 -6
- package/fesm2022/cmat.mjs.map +1 -1
- package/package.json +1 -1
- package/types/cmat-components-empty-state.d.ts +3 -1
- package/types/cmat.d.ts +3 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NgClass } from '@angular/common';
|
|
1
2
|
import * as i0 from '@angular/core';
|
|
2
3
|
import { input, output, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
4
|
import * as i1 from '@angular/material/button';
|
|
@@ -17,18 +18,21 @@ class CmatEmptyStateComponent {
|
|
|
17
18
|
...(ngDevMode ? [{ debugName: "ctaLabel" }] : /* istanbul ignore next */ []));
|
|
18
19
|
this.ctaDisabled = input(false, /* @ts-ignore */
|
|
19
20
|
...(ngDevMode ? [{ debugName: "ctaDisabled" }] : /* istanbul ignore next */ []));
|
|
21
|
+
/** 是否渲染卡片边框背景,嵌套在已有卡片内时应设为 false 避免双重包裹 */
|
|
22
|
+
this.bordered = input(true, /* @ts-ignore */
|
|
23
|
+
...(ngDevMode ? [{ debugName: "bordered" }] : /* istanbul ignore next */ []));
|
|
20
24
|
this.ctaClick = output();
|
|
21
25
|
}
|
|
22
26
|
emitAction() {
|
|
23
27
|
this.ctaClick.emit();
|
|
24
28
|
}
|
|
25
29
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CmatEmptyStateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
26
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: CmatEmptyStateComponent, isStandalone: true, selector: "cmat-empty-state", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, ctaLabel: { classPropertyName: "ctaLabel", publicName: "ctaLabel", isSignal: true, isRequired: false, transformFunction: null }, ctaDisabled: { classPropertyName: "ctaDisabled", publicName: "ctaDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ctaClick: "ctaClick" }, ngImport: i0, template: "<div\r\n class=\"flex flex-col items-center justify-center
|
|
30
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: CmatEmptyStateComponent, isStandalone: true, selector: "cmat-empty-state", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, ctaLabel: { classPropertyName: "ctaLabel", publicName: "ctaLabel", isSignal: true, isRequired: false, transformFunction: null }, ctaDisabled: { classPropertyName: "ctaDisabled", publicName: "ctaDisabled", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ctaClick: "ctaClick" }, ngImport: i0, template: "<div\r\n class=\"flex h-full w-full flex-col items-center justify-center px-6 py-10 text-center\"\r\n [ngClass]=\"bordered() ? 'rounded-xl border border-slate-200 dark:border-slate-700 bg-card dark:bg-transparent' : 'bg-transparent'\"\r\n>\r\n @if (icon()) {\r\n <div\r\n class=\"flex h-16 w-16 items-center justify-center rounded-full bg-slate-100 dark:bg-slate-600 text-slate-500 dark:text-slate-300\"\r\n >\r\n <mat-icon [svgIcon]=\"icon()\"></mat-icon>\r\n </div>\r\n }\r\n\r\n <h3 class=\"mt-4 text-lg font-semibold text-secondary\">{{ title() }}</h3>\r\n\r\n @if (description()) {\r\n <p\r\n class=\"mt-2 max-w-xl text-sm leading-6 text-hint\"\r\n >\r\n {{ description() }}\r\n </p>\r\n }\r\n\r\n @if (ctaLabel()) {\r\n <div class=\"mt-4\">\r\n <button\r\n matButton=\"outlined\"\r\n type=\"button\"\r\n [disabled]=\"ctaDisabled()\"\r\n (click)=\"emitAction()\"\r\n >\r\n {{ ctaLabel() }}\r\n </button>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
27
31
|
}
|
|
28
32
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CmatEmptyStateComponent, decorators: [{
|
|
29
33
|
type: Component,
|
|
30
|
-
args: [{ selector: 'cmat-empty-state', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButtonModule, MatIconModule], template: "<div\r\n class=\"flex flex-col items-center justify-center
|
|
31
|
-
}], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], ctaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ctaLabel", required: false }] }], ctaDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "ctaDisabled", required: false }] }], ctaClick: [{ type: i0.Output, args: ["ctaClick"] }] } });
|
|
34
|
+
args: [{ selector: 'cmat-empty-state', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgClass, MatButtonModule, MatIconModule], template: "<div\r\n class=\"flex h-full w-full flex-col items-center justify-center px-6 py-10 text-center\"\r\n [ngClass]=\"bordered() ? 'rounded-xl border border-slate-200 dark:border-slate-700 bg-card dark:bg-transparent' : 'bg-transparent'\"\r\n>\r\n @if (icon()) {\r\n <div\r\n class=\"flex h-16 w-16 items-center justify-center rounded-full bg-slate-100 dark:bg-slate-600 text-slate-500 dark:text-slate-300\"\r\n >\r\n <mat-icon [svgIcon]=\"icon()\"></mat-icon>\r\n </div>\r\n }\r\n\r\n <h3 class=\"mt-4 text-lg font-semibold text-secondary\">{{ title() }}</h3>\r\n\r\n @if (description()) {\r\n <p\r\n class=\"mt-2 max-w-xl text-sm leading-6 text-hint\"\r\n >\r\n {{ description() }}\r\n </p>\r\n }\r\n\r\n @if (ctaLabel()) {\r\n <div class=\"mt-4\">\r\n <button\r\n matButton=\"outlined\"\r\n type=\"button\"\r\n [disabled]=\"ctaDisabled()\"\r\n (click)=\"emitAction()\"\r\n >\r\n {{ ctaLabel() }}\r\n </button>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block}\n"] }]
|
|
35
|
+
}], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], ctaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ctaLabel", required: false }] }], ctaDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "ctaDisabled", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], ctaClick: [{ type: i0.Output, args: ["ctaClick"] }] } });
|
|
32
36
|
|
|
33
37
|
/**
|
|
34
38
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-components-empty-state.mjs","sources":["../../../projects/cmat/components/empty-state/empty-state.component.ts","../../../projects/cmat/components/empty-state/empty-state.component.html","../../../projects/cmat/components/empty-state/cmat-components-empty-state.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatIconModule } from '@angular/material/icon';\r\n\r\n@Component({\r\n selector: 'cmat-empty-state',\r\n templateUrl: './empty-state.component.html',\r\n styleUrls: ['./empty-state.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [MatButtonModule, MatIconModule],\r\n})\r\nexport class CmatEmptyStateComponent {\r\n readonly icon = input<string>('mat_outline:inbox');\r\n\r\n readonly title = input<string>('暂无内容');\r\n readonly description = input<string>('当前没有可显示的数据。');\r\n readonly ctaLabel = input<string>('');\r\n readonly ctaDisabled = input<boolean>(false);\r\n readonly ctaClick = output<void>();\r\n\r\n emitAction(): void {\r\n this.ctaClick.emit();\r\n }\r\n}\r\n","<div\r\n class=\"flex flex-col items-center justify-center
|
|
1
|
+
{"version":3,"file":"cmat-components-empty-state.mjs","sources":["../../../projects/cmat/components/empty-state/empty-state.component.ts","../../../projects/cmat/components/empty-state/empty-state.component.html","../../../projects/cmat/components/empty-state/cmat-components-empty-state.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, input, output } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatIconModule } from '@angular/material/icon';\r\n\r\n@Component({\r\n selector: 'cmat-empty-state',\r\n templateUrl: './empty-state.component.html',\r\n styleUrls: ['./empty-state.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [NgClass, MatButtonModule, MatIconModule],\r\n})\r\nexport class CmatEmptyStateComponent {\r\n readonly icon = input<string>('mat_outline:inbox');\r\n\r\n readonly title = input<string>('暂无内容');\r\n readonly description = input<string>('当前没有可显示的数据。');\r\n readonly ctaLabel = input<string>('');\r\n readonly ctaDisabled = input<boolean>(false);\r\n /** 是否渲染卡片边框背景,嵌套在已有卡片内时应设为 false 避免双重包裹 */\r\n readonly bordered = input<boolean>(true);\r\n readonly ctaClick = output<void>();\r\n\r\n emitAction(): void {\r\n this.ctaClick.emit();\r\n }\r\n}\r\n","<div\r\n class=\"flex h-full w-full flex-col items-center justify-center px-6 py-10 text-center\"\r\n [ngClass]=\"bordered() ? 'rounded-xl border border-slate-200 dark:border-slate-700 bg-card dark:bg-transparent' : 'bg-transparent'\"\r\n>\r\n @if (icon()) {\r\n <div\r\n class=\"flex h-16 w-16 items-center justify-center rounded-full bg-slate-100 dark:bg-slate-600 text-slate-500 dark:text-slate-300\"\r\n >\r\n <mat-icon [svgIcon]=\"icon()\"></mat-icon>\r\n </div>\r\n }\r\n\r\n <h3 class=\"mt-4 text-lg font-semibold text-secondary\">{{ title() }}</h3>\r\n\r\n @if (description()) {\r\n <p\r\n class=\"mt-2 max-w-xl text-sm leading-6 text-hint\"\r\n >\r\n {{ description() }}\r\n </p>\r\n }\r\n\r\n @if (ctaLabel()) {\r\n <div class=\"mt-4\">\r\n <button\r\n matButton=\"outlined\"\r\n type=\"button\"\r\n [disabled]=\"ctaDisabled()\"\r\n (click)=\"emitAction()\"\r\n >\r\n {{ ctaLabel() }}\r\n </button>\r\n </div>\r\n }\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAYa,uBAAuB,CAAA;AAPpC,IAAA,WAAA,GAAA;QAQW,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,mBAAmB;iFAAC;QAEzC,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,MAAM;kFAAC;QAC7B,IAAA,CAAA,WAAW,GAAG,KAAK,CAAS,aAAa;wFAAC;QAC1C,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,EAAE;qFAAC;QAC5B,IAAA,CAAA,WAAW,GAAG,KAAK,CAAU,KAAK;wFAAC;;QAEnC,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,IAAI;qFAAC;QAC/B,IAAA,CAAA,QAAQ,GAAG,MAAM,EAAQ;AAKnC,IAAA;IAHC,UAAU,GAAA;AACR,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;IACtB;8GAbW,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,uBAAuB,83BCZpC,ohCAmCA,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDzBY,OAAO,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,eAAe,mXAAE,aAAa,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,SAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAEtC,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;+BACE,kBAAkB,EAAA,eAAA,EAGX,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,OAAO,EAAE,eAAe,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,ohCAAA,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA;;;AEVpD;;AAEG;;;;"}
|
package/fesm2022/cmat.mjs
CHANGED
|
@@ -55,6 +55,7 @@ import { CmatCascadeListComponent as CmatCascadeListComponent$1 } from 'cmat/com
|
|
|
55
55
|
import { CmatMediaWatcherService as CmatMediaWatcherService$1 } from 'cmat/services/media-watcher';
|
|
56
56
|
import * as i1$9 from '@angular/material/checkbox';
|
|
57
57
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
58
|
+
import { CmatEmptyStateComponent as CmatEmptyStateComponent$1 } from 'cmat/components/empty-state';
|
|
58
59
|
import { CmatChipInputComponent as CmatChipInputComponent$1 } from 'cmat/components/chip-input';
|
|
59
60
|
import { CmatColorPickerButtonComponent } from 'cmat/components/color-picker';
|
|
60
61
|
import { CmatDataPickerComponent as CmatDataPickerComponent$1 } from 'cmat/components/data-picker';
|
|
@@ -3061,7 +3062,7 @@ class CmatCheckListTypeComponent extends FieldType {
|
|
|
3061
3062
|
filterByQuery(event) {
|
|
3062
3063
|
const query = typeof event === 'string' ? event : event.target?.value ?? '';
|
|
3063
3064
|
this._filterQuery.set(query.toLowerCase());
|
|
3064
|
-
this.
|
|
3065
|
+
this._refreshFilteredData();
|
|
3065
3066
|
}
|
|
3066
3067
|
toggleCheckList(data, event) {
|
|
3067
3068
|
event.preventDefault();
|
|
@@ -3156,11 +3157,11 @@ class CmatCheckListTypeComponent extends FieldType {
|
|
|
3156
3157
|
}
|
|
3157
3158
|
}
|
|
3158
3159
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CmatCheckListTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3159
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: CmatCheckListTypeComponent, isStandalone: true, selector: "cmat-checklist-type", usesInheritance: true, ngImport: i0, template: "<div class=\"flex flex-col\">\r\n <div class=\"p-2\">\r\n @if(props.label){\r\n <legend class=\"text-lg\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n }\r\n @if(props.description){\r\n <p>{{ props.description }}</p>\r\n }\r\n </div>\r\n\r\n <div class=\"w-full h-full rounded-
|
|
3160
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: CmatCheckListTypeComponent, isStandalone: true, selector: "cmat-checklist-type", usesInheritance: true, ngImport: i0, template: "<div class=\"flex flex-col\">\r\n <div class=\"p-2\">\r\n @if(props.label){\r\n <legend class=\"text-lg\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n }\r\n @if(props.description){\r\n <p>{{ props.description }}</p>\r\n }\r\n </div>\r\n\r\n <div class=\"w-full h-full rounded-xl border border-slate-200 dark:border-slate-700 bg-card dark:bg-transparent\" [tabIndex]=\"props.tabindex\">\r\n <div class=\"flex items-center m-1 mr-2 min-h-12 print:hidden\">\r\n @if (props.showAllCheck&&!props.disabled) {\r\n <div>\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10 m-1\" [color]=\"'primary'\" [checked]=\"isChecked()\"\r\n [indeterminate]=\"isIndeterminate()\" (change)=\"allCheckChange($event.checked)\">\r\n </mat-checkbox>\r\n </div>\r\n }\r\n <div class=\"flex items-center w-full\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:magnifying-glass'\"></mat-icon>\r\n <div class=\"ml-2\">\r\n <input #query class=\"w-full min-w-0 py-1 border-none\" type=\"text\" placeholder=\"\u8F93\u5165\u8FC7\u6EE4\u4FE1\u606F\"\r\n [disabled]=\"props.disabled\"\r\n (input)=\"filterByQuery(query.value)\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flex flex-col border-t overflow-y-auto scrollbar-custom\"\r\n [ngClass]=\"props.controlMaxHeight?'max-h-64 sm:max-h-128 lg:max-h-64 py-4':'flex-auto'\">\r\n @if (filteredItems()) {\r\n @if(filteredItems()!.length>0){\r\n @for (data of filteredItems(); track trackByFn($index, data)) {\r\n <div role=\"presentation\" class=\"flex items-center pl-2 pr-4 py-2 h-15 w-full\" matRipple [matRippleDisabled]=\"disabled\"\r\n [ngClass]=\"{'cursor-pointer hover:bg-hover': !disabled}\" (click)=\"toggleCheckList(data,$event)\">\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10 pointer-events-none\" disableRipple [color]=\"'primary'\"\r\n [checked]=\"isCheck(data)\" [disabled]=\"data.disabled||props.disabled\">\r\n <div class=\"flex flex-col flex-auto\">\r\n <div class=\"font-medium leading-5 truncate\">{{data.label}}</div>\r\n </div>\r\n </mat-checkbox>\r\n </div>\r\n }\r\n } @else {\r\n <cmat-empty-state\r\n [bordered]=\"false\"\r\n [icon]=\"'mat_outline:inbox'\"\r\n [title]=\"'\u6682\u65E0\u6570\u636E'\"\r\n [ctaLabel]=\"''\"\r\n ></cmat-empty-state> \r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1$9.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i3$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: CmatEmptyStateComponent$1, selector: "cmat-empty-state", inputs: ["icon", "title", "description", "ctaLabel", "ctaDisabled", "bordered"], outputs: ["ctaClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3160
3161
|
}
|
|
3161
3162
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CmatCheckListTypeComponent, decorators: [{
|
|
3162
3163
|
type: Component,
|
|
3163
|
-
args: [{ selector: 'cmat-checklist-type', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatCheckboxModule, MatIconModule, NgClass, MatRippleModule], template: "<div class=\"flex flex-col\">\r\n <div class=\"p-2\">\r\n @if(props.label){\r\n <legend class=\"text-lg\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n }\r\n @if(props.description){\r\n <p>{{ props.description }}</p>\r\n }\r\n </div>\r\n\r\n <div class=\"w-full h-full rounded-
|
|
3164
|
+
args: [{ selector: 'cmat-checklist-type', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatCheckboxModule, MatIconModule, NgClass, MatRippleModule, CmatEmptyStateComponent$1], template: "<div class=\"flex flex-col\">\r\n <div class=\"p-2\">\r\n @if(props.label){\r\n <legend class=\"text-lg\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n }\r\n @if(props.description){\r\n <p>{{ props.description }}</p>\r\n }\r\n </div>\r\n\r\n <div class=\"w-full h-full rounded-xl border border-slate-200 dark:border-slate-700 bg-card dark:bg-transparent\" [tabIndex]=\"props.tabindex\">\r\n <div class=\"flex items-center m-1 mr-2 min-h-12 print:hidden\">\r\n @if (props.showAllCheck&&!props.disabled) {\r\n <div>\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10 m-1\" [color]=\"'primary'\" [checked]=\"isChecked()\"\r\n [indeterminate]=\"isIndeterminate()\" (change)=\"allCheckChange($event.checked)\">\r\n </mat-checkbox>\r\n </div>\r\n }\r\n <div class=\"flex items-center w-full\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:magnifying-glass'\"></mat-icon>\r\n <div class=\"ml-2\">\r\n <input #query class=\"w-full min-w-0 py-1 border-none\" type=\"text\" placeholder=\"\u8F93\u5165\u8FC7\u6EE4\u4FE1\u606F\"\r\n [disabled]=\"props.disabled\"\r\n (input)=\"filterByQuery(query.value)\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flex flex-col border-t overflow-y-auto scrollbar-custom\"\r\n [ngClass]=\"props.controlMaxHeight?'max-h-64 sm:max-h-128 lg:max-h-64 py-4':'flex-auto'\">\r\n @if (filteredItems()) {\r\n @if(filteredItems()!.length>0){\r\n @for (data of filteredItems(); track trackByFn($index, data)) {\r\n <div role=\"presentation\" class=\"flex items-center pl-2 pr-4 py-2 h-15 w-full\" matRipple [matRippleDisabled]=\"disabled\"\r\n [ngClass]=\"{'cursor-pointer hover:bg-hover': !disabled}\" (click)=\"toggleCheckList(data,$event)\">\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10 pointer-events-none\" disableRipple [color]=\"'primary'\"\r\n [checked]=\"isCheck(data)\" [disabled]=\"data.disabled||props.disabled\">\r\n <div class=\"flex flex-col flex-auto\">\r\n <div class=\"font-medium leading-5 truncate\">{{data.label}}</div>\r\n </div>\r\n </mat-checkbox>\r\n </div>\r\n }\r\n } @else {\r\n <cmat-empty-state\r\n [bordered]=\"false\"\r\n [icon]=\"'mat_outline:inbox'\"\r\n [title]=\"'\u6682\u65E0\u6570\u636E'\"\r\n [ctaLabel]=\"''\"\r\n ></cmat-empty-state> \r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>", styles: [":host{width:100%}\n"] }]
|
|
3164
3165
|
}], ctorParameters: () => [] });
|
|
3165
3166
|
|
|
3166
3167
|
class CmatChipsInputTypeComponent extends FieldType {
|
|
@@ -6695,18 +6696,21 @@ class CmatEmptyStateComponent {
|
|
|
6695
6696
|
...(ngDevMode ? [{ debugName: "ctaLabel" }] : /* istanbul ignore next */ []));
|
|
6696
6697
|
this.ctaDisabled = input(false, /* @ts-ignore */
|
|
6697
6698
|
...(ngDevMode ? [{ debugName: "ctaDisabled" }] : /* istanbul ignore next */ []));
|
|
6699
|
+
/** 是否渲染卡片边框背景,嵌套在已有卡片内时应设为 false 避免双重包裹 */
|
|
6700
|
+
this.bordered = input(true, /* @ts-ignore */
|
|
6701
|
+
...(ngDevMode ? [{ debugName: "bordered" }] : /* istanbul ignore next */ []));
|
|
6698
6702
|
this.ctaClick = output();
|
|
6699
6703
|
}
|
|
6700
6704
|
emitAction() {
|
|
6701
6705
|
this.ctaClick.emit();
|
|
6702
6706
|
}
|
|
6703
6707
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CmatEmptyStateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6704
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: CmatEmptyStateComponent, isStandalone: true, selector: "cmat-empty-state", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, ctaLabel: { classPropertyName: "ctaLabel", publicName: "ctaLabel", isSignal: true, isRequired: false, transformFunction: null }, ctaDisabled: { classPropertyName: "ctaDisabled", publicName: "ctaDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ctaClick: "ctaClick" }, ngImport: i0, template: "<div\r\n class=\"flex flex-col items-center justify-center
|
|
6708
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: CmatEmptyStateComponent, isStandalone: true, selector: "cmat-empty-state", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, ctaLabel: { classPropertyName: "ctaLabel", publicName: "ctaLabel", isSignal: true, isRequired: false, transformFunction: null }, ctaDisabled: { classPropertyName: "ctaDisabled", publicName: "ctaDisabled", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ctaClick: "ctaClick" }, ngImport: i0, template: "<div\r\n class=\"flex h-full w-full flex-col items-center justify-center px-6 py-10 text-center\"\r\n [ngClass]=\"bordered() ? 'rounded-xl border border-slate-200 dark:border-slate-700 bg-card dark:bg-transparent' : 'bg-transparent'\"\r\n>\r\n @if (icon()) {\r\n <div\r\n class=\"flex h-16 w-16 items-center justify-center rounded-full bg-slate-100 dark:bg-slate-600 text-slate-500 dark:text-slate-300\"\r\n >\r\n <mat-icon [svgIcon]=\"icon()\"></mat-icon>\r\n </div>\r\n }\r\n\r\n <h3 class=\"mt-4 text-lg font-semibold text-secondary\">{{ title() }}</h3>\r\n\r\n @if (description()) {\r\n <p\r\n class=\"mt-2 max-w-xl text-sm leading-6 text-hint\"\r\n >\r\n {{ description() }}\r\n </p>\r\n }\r\n\r\n @if (ctaLabel()) {\r\n <div class=\"mt-4\">\r\n <button\r\n matButton=\"outlined\"\r\n type=\"button\"\r\n [disabled]=\"ctaDisabled()\"\r\n (click)=\"emitAction()\"\r\n >\r\n {{ ctaLabel() }}\r\n </button>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6705
6709
|
}
|
|
6706
6710
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CmatEmptyStateComponent, decorators: [{
|
|
6707
6711
|
type: Component,
|
|
6708
|
-
args: [{ selector: 'cmat-empty-state', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButtonModule, MatIconModule], template: "<div\r\n class=\"flex flex-col items-center justify-center
|
|
6709
|
-
}], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], ctaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ctaLabel", required: false }] }], ctaDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "ctaDisabled", required: false }] }], ctaClick: [{ type: i0.Output, args: ["ctaClick"] }] } });
|
|
6712
|
+
args: [{ selector: 'cmat-empty-state', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgClass, MatButtonModule, MatIconModule], template: "<div\r\n class=\"flex h-full w-full flex-col items-center justify-center px-6 py-10 text-center\"\r\n [ngClass]=\"bordered() ? 'rounded-xl border border-slate-200 dark:border-slate-700 bg-card dark:bg-transparent' : 'bg-transparent'\"\r\n>\r\n @if (icon()) {\r\n <div\r\n class=\"flex h-16 w-16 items-center justify-center rounded-full bg-slate-100 dark:bg-slate-600 text-slate-500 dark:text-slate-300\"\r\n >\r\n <mat-icon [svgIcon]=\"icon()\"></mat-icon>\r\n </div>\r\n }\r\n\r\n <h3 class=\"mt-4 text-lg font-semibold text-secondary\">{{ title() }}</h3>\r\n\r\n @if (description()) {\r\n <p\r\n class=\"mt-2 max-w-xl text-sm leading-6 text-hint\"\r\n >\r\n {{ description() }}\r\n </p>\r\n }\r\n\r\n @if (ctaLabel()) {\r\n <div class=\"mt-4\">\r\n <button\r\n matButton=\"outlined\"\r\n type=\"button\"\r\n [disabled]=\"ctaDisabled()\"\r\n (click)=\"emitAction()\"\r\n >\r\n {{ ctaLabel() }}\r\n </button>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block}\n"] }]
|
|
6713
|
+
}], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], ctaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ctaLabel", required: false }] }], ctaDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "ctaDisabled", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], ctaClick: [{ type: i0.Output, args: ["ctaClick"] }] } });
|
|
6710
6714
|
|
|
6711
6715
|
class CmatFilePreviewComponent {
|
|
6712
6716
|
constructor() {
|