ngx-tethys 19.1.0-next.2 → 19.1.0-next.4
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/CHANGELOG.md +24 -0
- package/badge/badge.component.d.ts +1 -1
- package/date-picker/date-picker.config.d.ts +2 -0
- package/date-picker/lib/date/date-table-cell.component.d.ts +7 -3
- package/empty/empty.component.d.ts +2 -1
- package/fesm2022/ngx-tethys-badge.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-picker.mjs +20 -10
- package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-empty.mjs +5 -2
- package/fesm2022/ngx-tethys-empty.mjs.map +1 -1
- package/fesm2022/ngx-tethys-list.mjs +37 -52
- package/fesm2022/ngx-tethys-list.mjs.map +1 -1
- package/fesm2022/ngx-tethys-message.mjs +28 -34
- package/fesm2022/ngx-tethys-message.mjs.map +1 -1
- package/fesm2022/ngx-tethys-notify.mjs +33 -41
- package/fesm2022/ngx-tethys-notify.mjs.map +1 -1
- package/fesm2022/ngx-tethys-resizable.mjs +20 -17
- package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
- package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
- package/fesm2022/ngx-tethys-time-picker.mjs +244 -271
- package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys.mjs +1 -1
- package/fesm2022/ngx-tethys.mjs.map +1 -1
- package/list/list-item-meta.component.d.ts +7 -9
- package/list/list-item.component.d.ts +0 -2
- package/list/list.component.d.ts +2 -8
- package/message/abstract/abstract-message.component.d.ts +2 -3
- package/message/message-container.component.d.ts +0 -1
- package/message/message.component.d.ts +1 -3
- package/notify/notify-container.component.d.ts +0 -1
- package/notify/notify.component.d.ts +7 -12
- package/package.json +1 -1
- package/resizable/resizable.directive.d.ts +2 -1
- package/schematics/version.d.ts +1 -1
- package/schematics/version.js +1 -1
- package/stepper/stepper.component.d.ts +1 -1
- package/time-picker/inner/inner-time-picker.class.d.ts +15 -13
- package/time-picker/inner/inner-time-picker.component.d.ts +26 -26
- package/time-picker/time-picker-panel.component.d.ts +18 -20
- package/time-picker/time-picker.component.d.ts +22 -30
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
# [19.1.0-next.4](https://github.com/atinc/ngx-tethys/compare/19.1.0-next.3...19.1.0-next.4) (2025-08-06)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **resizable:** remove bindMouseEnterAndLeaveEvents from afterNextRender #TINFR-2644 ([3d7c006](https://github.com/atinc/ngx-tethys/commit/3d7c006dde8861cd8212a27c348da24eae83736d)), closes [#TINFR-2644](https://github.com/atinc/ngx-tethys/issues/TINFR-2644)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **date-picker:** add dateCellRender #TINFR-2386 ([#3495](https://github.com/atinc/ngx-tethys/issues/3495)) ([#3499](https://github.com/atinc/ngx-tethys/issues/3499)) ([346c27b](https://github.com/atinc/ngx-tethys/commit/346c27b20e8668f1a5a5e33e0fe1681ed67a4679)), closes [#TINFR-2386](https://github.com/atinc/ngx-tethys/issues/TINFR-2386)
|
|
16
|
+
* **time-picker:** migrate to signal for time-picker ([#3501](https://github.com/atinc/ngx-tethys/issues/3501)) ([4399590](https://github.com/atinc/ngx-tethys/commit/439959008b2bfcdbd6d0bad6807120af63ab4008))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# [19.1.0-next.3](https://github.com/atinc/ngx-tethys/compare/19.1.0-next.2...19.1.0-next.3) (2025-08-01)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* **empty:** add setMessage for update display text #TINFR-2616 ([0e060ef](https://github.com/atinc/ngx-tethys/commit/0e060ef3bb28f860ea0117685f11a94092796f7d)), closes [#TINFR-2616](https://github.com/atinc/ngx-tethys/issues/TINFR-2616)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
5
29
|
# [19.1.0-next.2](https://github.com/atinc/ngx-tethys/compare/19.1.0-next.1...19.1.0-next.2) (2025-07-28)
|
|
6
30
|
|
|
7
31
|
|
|
@@ -8,7 +8,7 @@ export type ThyBadgeSize = 'md' | 'sm' | 'lg';
|
|
|
8
8
|
export declare class ThyBadge implements OnInit {
|
|
9
9
|
private elementRef;
|
|
10
10
|
private nativeElement;
|
|
11
|
-
readonly displayContent: Signal<string>;
|
|
11
|
+
readonly displayContent: Signal<string | number>;
|
|
12
12
|
readonly badgeClassName: Signal<string>;
|
|
13
13
|
protected isWrapper: boolean;
|
|
14
14
|
readonly isShowBadge: Signal<boolean>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { SafeHtml } from '@angular/platform-browser';
|
|
2
3
|
import { ThyI18nService } from 'ngx-tethys/i18n';
|
|
3
4
|
import { WeekDayIndex } from 'ngx-tethys/util';
|
|
4
5
|
import { CompatiblePresets, ThyShortcutPosition } from './standard-types';
|
|
@@ -10,6 +11,7 @@ export interface ThyDatePickerConfig {
|
|
|
10
11
|
weekStartsOn: WeekDayIndex;
|
|
11
12
|
separator: string;
|
|
12
13
|
timestampPrecision: 'seconds' | 'milliseconds';
|
|
14
|
+
dateCellRender?: (date: Date) => SafeHtml | undefined;
|
|
13
15
|
}
|
|
14
16
|
/**
|
|
15
17
|
* @deprecated
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isTemplateRef } from 'ngx-tethys/util';
|
|
2
|
+
import { ThyDatePickerConfigService } from '../../date-picker.service';
|
|
2
3
|
import { DateCell } from './types';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
/**
|
|
@@ -6,9 +7,12 @@ import * as i0 from "@angular/core";
|
|
|
6
7
|
*/
|
|
7
8
|
export declare class DateTableCell {
|
|
8
9
|
isTemplateRef: typeof isTemplateRef;
|
|
9
|
-
prefixCls:
|
|
10
|
-
cell: DateCell
|
|
10
|
+
readonly prefixCls: import("@angular/core").InputSignal<"thy-calendar" | "thy-calendar-full">;
|
|
11
|
+
readonly cell: import("@angular/core").InputSignal<DateCell>;
|
|
11
12
|
isNonEmptyString: (v: any) => boolean;
|
|
13
|
+
functionRenderResult: import("@angular/core").Signal<boolean>;
|
|
14
|
+
datePickerConfigService: ThyDatePickerConfigService;
|
|
15
|
+
cellRender: import("@angular/core").Signal<string | ((date: Date) => import("@angular/platform-browser").SafeHtml | undefined) | import("@angular/core").TemplateRef<Date>>;
|
|
12
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<DateTableCell, never>;
|
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DateTableCell, "[date-table-cell]", ["dateTableCell"], { "prefixCls": { "alias": "prefixCls"; "required": false; }; "cell": { "alias": "cell"; "required": false; }; }, {}, never, never, true, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateTableCell, "[date-table-cell]", ["dateTableCell"], { "prefixCls": { "alias": "prefixCls"; "required": false; "isSignal": true; }; "cell": { "alias": "cell"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
14
18
|
}
|
|
@@ -81,7 +81,8 @@ export declare class ThyEmpty implements AfterViewInit {
|
|
|
81
81
|
*/
|
|
82
82
|
readonly extraTemplateRef: Signal<TemplateRef<any>>;
|
|
83
83
|
protected readonly presetSvg: Signal<import("@angular/platform-browser").SafeHtml>;
|
|
84
|
-
protected readonly displayText:
|
|
84
|
+
protected readonly displayText: import("@angular/core").WritableSignal<any>;
|
|
85
|
+
setMessage(text: string): void;
|
|
85
86
|
constructor();
|
|
86
87
|
private _calculatePosition;
|
|
87
88
|
updateClass(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-badge.mjs","sources":["../../../src/badge/badge.component.ts","../../../src/badge/badge.component.html","../../../src/badge/badge.module.ts","../../../src/badge/ngx-tethys-badge.ts"],"sourcesContent":["import { isTextColor } from 'ngx-tethys/core';\n\nimport { ChangeDetectionStrategy, Component, ElementRef, OnInit, Signal, computed, inject, input, numberAttribute } from '@angular/core';\n\nimport { coerceBooleanProperty, isUndefined } from 'ngx-tethys/util';\n\nexport type ThyBadgeSize = 'md' | 'sm' | 'lg';\n\n/**\n * 徽标组件,支持组件`thy-badge`和`thyBadge`指令两种使用方式\n * @name thy-badge,[thyBadge]\n */\n@Component({\n selector: 'thy-badge,[thyBadge]',\n templateUrl: './badge.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-badge-container',\n '[class.thy-badge-wrapper]': 'isWrapper'\n },\n imports: []\n})\nexport class ThyBadge implements OnInit {\n private elementRef = inject(ElementRef);\n\n private nativeElement: any;\n\n readonly displayContent: Signal<string> = computed(() => {\n let content = this.value() as string;\n if (this.value() && !isUndefined(this.thyMaxCount()) && (this.value() as number) > this.thyMaxCount()) {\n content = `${this.thyMaxCount()}+`;\n }\n return content;\n });\n\n readonly badgeClassName: Signal<string> = computed(() => {\n const classes: string[] = [];\n classes.push(`thy-badge-${this.thyType()}`);\n if (this.thySize()) {\n classes.push(`thy-badge-${this.thySize()}`);\n }\n if (this.thyIsDot()) {\n classes.push(`thy-badge-dot`);\n } else if (this.thyIsHollow()) {\n classes.push(`thy-badge-hollow`);\n } else {\n classes.push(`thy-badge-count`);\n }\n const builtInTextColorClass = isTextColor(this.thyTextColor()) ? `text-${this.thyTextColor()}` : null;\n if (builtInTextColorClass) {\n classes.push(builtInTextColorClass);\n }\n const builtInBackgroundColorClass = isTextColor(this.thyBackgroundColor()) ? `bg-${this.thyBackgroundColor()}` : null;\n if (builtInBackgroundColorClass) {\n classes.push(builtInBackgroundColorClass);\n }\n return classes.join(' ');\n });\n\n // 是否包裹在元素上\n protected isWrapper = false;\n\n public readonly isShowBadge: Signal<boolean> = computed(() => {\n return !(!this.value() && !this.thyKeepShow() && !this.thyIsDot() && !this.thyIsHollow());\n });\n\n private readonly value: Signal<number | string> = computed(() => {\n return this.thyContent() || this.thyContext() || this.thyCount();\n });\n\n protected readonly textColor: Signal<string> = computed(() => {\n return !isTextColor(this.thyTextColor()) ? this.thyTextColor() : null;\n });\n\n protected readonly backgroundColor: Signal<string> = computed(() => {\n return !isTextColor(this.thyBackgroundColor()) ? this.thyBackgroundColor() : null;\n });\n\n constructor() {\n this.nativeElement = this.elementRef.nativeElement;\n }\n\n /**\n * 徽标类型\n * @type default | primary | danger | warning | success\n */\n readonly thyType = input<string, string>('danger', {\n transform: (value: string) => value || 'danger'\n });\n\n /**\n * 徽标内容数字\n * @type number\n */\n readonly thyCount = input<number, unknown>(undefined, { transform: numberAttribute });\n\n /**\n * 徽标内容文本\n * @type string\n */\n readonly thyContent = input<string>();\n\n /**\n * 已废弃,徽标内容文本,命名错误,请使用 thyContent\n */\n readonly thyContext = input<string>();\n\n /**\n * 徽标显示的最大值, 与 thyCount 一起使用,thyCount 超过了 thyMaxCount 设置的值时,徽标内容为 thyMaxCount+\n * @type number\n */\n readonly thyMaxCount = input<number, unknown>(undefined, { transform: numberAttribute });\n\n /**\n * 徽标显示的大小\n * @type md | sm | lg\n */\n readonly thySize = input<ThyBadgeSize, ThyBadgeSize>('md', { transform: (value: ThyBadgeSize) => value || 'md' });\n\n /**\n * 已废弃,徽标是一个实心点,已经被废弃\n * @deprecated\n */\n readonly thyIsDot = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 已废弃,徽标是一个空心点\n * @deprecated\n */\n readonly thyIsHollow = input(false, { transform: coerceBooleanProperty });\n\n /**\n * thyCount 为 0 时,强制显示数字 0,默认不显示\n */\n readonly thyKeepShow = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 设置徽标字体的颜色,支持内置颜色和自定义颜色 'primary' | '#87d068' | ...\n * @type string\n */\n readonly thyTextColor = input<string>('');\n\n /**\n * 设置徽标的背景颜色,支持内置颜色和自定义颜色 'primary' | '#87d068' | ...\n * @type string\n */\n readonly thyBackgroundColor = input<string>('');\n\n ngOnInit() {\n let childNodeCount = 0;\n this.nativeElement.childNodes.forEach((n: HTMLElement) => {\n if (['#comment'].indexOf(n.nodeName) < 0) {\n childNodeCount++;\n }\n });\n this.isWrapper = childNodeCount > 0;\n }\n}\n","@if (isShowBadge()) {\n <div class=\"thy-badge {{ badgeClassName() }}\" [style.color]=\"textColor()\" [style.backgroundColor]=\"backgroundColor()\">\n <span>{{ displayContent() }}</span>\n </div>\n}\n<ng-content></ng-content>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyBadge } from './badge.component';\n\n@NgModule({\n imports: [CommonModule, ThyBadge],\n exports: [ThyBadge]\n})\nexport class ThyBadgeModule {\n constructor() {}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAQA;;;AAGG;MAWU,QAAQ,CAAA;AAwDjB,IAAA,WAAA,GAAA;AAvDQ,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAI9B,QAAA,IAAA,CAAA,cAAc,GAAmB,QAAQ,CAAC,MAAK;AACpD,YAAA,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,EAAY;YACpC,IAAI,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,IAAK,IAAI,CAAC,KAAK,EAAa,GAAG,IAAI,CAAC,WAAW,EAAE,EAAE;AACnG,gBAAA,OAAO,GAAG,CAAG,EAAA,IAAI,CAAC,WAAW,EAAE,GAAG;;AAEtC,YAAA,OAAO,OAAO;AAClB,SAAC,CAAC;AAEO,QAAA,IAAA,CAAA,cAAc,GAAmB,QAAQ,CAAC,MAAK;YACpD,MAAM,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gBa,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAVpB,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,EAEf,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA;AACF,wBAAA,KAAK,EAAE,qBAAqB;AAC5B,wBAAA,2BAA2B,EAAE;AAChC,qBAAA,EAAA,OAAA,EACQ,EAAE,EAAA,QAAA,EAAA,0OAAA,EAAA;;;MEZF,cAAc,CAAA;AACvB,IAAA,WAAA,GAAA;8GADS,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAHb,OAAA,EAAA,CAAA,YAAY,EAAE,QAAQ,aACtB,QAAQ,CAAA,EAAA,CAAA,CAAA;AAET,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAHb,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGb,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,QAAQ,CAAC;oBACjC,OAAO,EAAE,CAAC,QAAQ;AACrB,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-tethys-badge.mjs","sources":["../../../src/badge/badge.component.ts","../../../src/badge/badge.component.html","../../../src/badge/badge.module.ts","../../../src/badge/ngx-tethys-badge.ts"],"sourcesContent":["import { isTextColor } from 'ngx-tethys/core';\n\nimport { ChangeDetectionStrategy, Component, ElementRef, OnInit, Signal, computed, inject, input, numberAttribute } from '@angular/core';\n\nimport { coerceBooleanProperty, isUndefined } from 'ngx-tethys/util';\n\nexport type ThyBadgeSize = 'md' | 'sm' | 'lg';\n\n/**\n * 徽标组件,支持组件`thy-badge`和`thyBadge`指令两种使用方式\n * @name thy-badge,[thyBadge]\n */\n@Component({\n selector: 'thy-badge,[thyBadge]',\n templateUrl: './badge.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-badge-container',\n '[class.thy-badge-wrapper]': 'isWrapper'\n },\n imports: []\n})\nexport class ThyBadge implements OnInit {\n private elementRef = inject(ElementRef);\n\n private nativeElement: any;\n\n readonly displayContent: Signal<string | number> = computed(() => {\n let content = this.value() as string;\n if (this.value() && !isUndefined(this.thyMaxCount()) && (this.value() as number) > this.thyMaxCount()) {\n content = `${this.thyMaxCount()}+`;\n }\n return content;\n });\n\n readonly badgeClassName: Signal<string> = computed(() => {\n const classes: string[] = [];\n classes.push(`thy-badge-${this.thyType()}`);\n if (this.thySize()) {\n classes.push(`thy-badge-${this.thySize()}`);\n }\n if (this.thyIsDot()) {\n classes.push(`thy-badge-dot`);\n } else if (this.thyIsHollow()) {\n classes.push(`thy-badge-hollow`);\n } else {\n classes.push(`thy-badge-count`);\n }\n const builtInTextColorClass = isTextColor(this.thyTextColor()) ? `text-${this.thyTextColor()}` : null;\n if (builtInTextColorClass) {\n classes.push(builtInTextColorClass);\n }\n const builtInBackgroundColorClass = isTextColor(this.thyBackgroundColor()) ? `bg-${this.thyBackgroundColor()}` : null;\n if (builtInBackgroundColorClass) {\n classes.push(builtInBackgroundColorClass);\n }\n return classes.join(' ');\n });\n\n // 是否包裹在元素上\n protected isWrapper = false;\n\n public readonly isShowBadge: Signal<boolean> = computed(() => {\n return !(!this.value() && !this.thyKeepShow() && !this.thyIsDot() && !this.thyIsHollow());\n });\n\n private readonly value: Signal<number | string> = computed(() => {\n return this.thyContent() || this.thyContext() || this.thyCount();\n });\n\n protected readonly textColor: Signal<string> = computed(() => {\n return !isTextColor(this.thyTextColor()) ? this.thyTextColor() : null;\n });\n\n protected readonly backgroundColor: Signal<string> = computed(() => {\n return !isTextColor(this.thyBackgroundColor()) ? this.thyBackgroundColor() : null;\n });\n\n constructor() {\n this.nativeElement = this.elementRef.nativeElement;\n }\n\n /**\n * 徽标类型\n * @type default | primary | danger | warning | success\n */\n readonly thyType = input<string, string>('danger', {\n transform: (value: string) => value || 'danger'\n });\n\n /**\n * 徽标内容数字\n * @type number\n */\n readonly thyCount = input<number, unknown>(undefined, { transform: numberAttribute });\n\n /**\n * 徽标内容文本\n * @type string\n */\n readonly thyContent = input<string>();\n\n /**\n * 已废弃,徽标内容文本,命名错误,请使用 thyContent\n */\n readonly thyContext = input<string>();\n\n /**\n * 徽标显示的最大值, 与 thyCount 一起使用,thyCount 超过了 thyMaxCount 设置的值时,徽标内容为 thyMaxCount+\n * @type number\n */\n readonly thyMaxCount = input<number, unknown>(undefined, { transform: numberAttribute });\n\n /**\n * 徽标显示的大小\n * @type md | sm | lg\n */\n readonly thySize = input<ThyBadgeSize, ThyBadgeSize>('md', { transform: (value: ThyBadgeSize) => value || 'md' });\n\n /**\n * 已废弃,徽标是一个实心点,已经被废弃\n * @deprecated\n */\n readonly thyIsDot = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 已废弃,徽标是一个空心点\n * @deprecated\n */\n readonly thyIsHollow = input(false, { transform: coerceBooleanProperty });\n\n /**\n * thyCount 为 0 时,强制显示数字 0,默认不显示\n */\n readonly thyKeepShow = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 设置徽标字体的颜色,支持内置颜色和自定义颜色 'primary' | '#87d068' | ...\n * @type string\n */\n readonly thyTextColor = input<string>('');\n\n /**\n * 设置徽标的背景颜色,支持内置颜色和自定义颜色 'primary' | '#87d068' | ...\n * @type string\n */\n readonly thyBackgroundColor = input<string>('');\n\n ngOnInit() {\n let childNodeCount = 0;\n this.nativeElement.childNodes.forEach((n: HTMLElement) => {\n if (['#comment'].indexOf(n.nodeName) < 0) {\n childNodeCount++;\n }\n });\n this.isWrapper = childNodeCount > 0;\n }\n}\n","@if (isShowBadge()) {\n <div class=\"thy-badge {{ badgeClassName() }}\" [style.color]=\"textColor()\" [style.backgroundColor]=\"backgroundColor()\">\n <span>{{ displayContent() }}</span>\n </div>\n}\n<ng-content></ng-content>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyBadge } from './badge.component';\n\n@NgModule({\n imports: [CommonModule, ThyBadge],\n exports: [ThyBadge]\n})\nexport class ThyBadgeModule {\n constructor() {}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAQA;;;AAGG;MAWU,QAAQ,CAAA;AAwDjB,IAAA,WAAA,GAAA;AAvDQ,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAI9B,QAAA,IAAA,CAAA,cAAc,GAA4B,QAAQ,CAAC,MAAK;AAC7D,YAAA,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,EAAY;YACpC,IAAI,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,IAAK,IAAI,CAAC,KAAK,EAAa,GAAG,IAAI,CAAC,WAAW,EAAE,EAAE;AACnG,gBAAA,OAAO,GAAG,CAAG,EAAA,IAAI,CAAC,WAAW,EAAE,GAAG;;AAEtC,YAAA,OAAO,OAAO;AAClB,SAAC,CAAC;AAEO,QAAA,IAAA,CAAA,cAAc,GAAmB,QAAQ,CAAC,MAAK;YACpD,MAAM,OAAO,GAAa,EAAE;YAC5B,OAAO,CAAC,IAAI,CAAC,CAAa,UAAA,EAAA,IAAI,CAAC,OAAO,EAAE,CAAE,CAAA,CAAC;AAC3C,YAAA,IAAI,IAAI,CAAC,OAAO,EAAE,EAA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EAAA;AACF,wBAAA,KAAK,EAAE,qBAAqB;AAC5B,wBAAA,2BAA2B,EAAE;AAChC,qBAAA,EAAA,OAAA,EACQ,EAAE,EAAA,QAAA,EAAA,0OAAA,EAAA;;;MEZF,cAAc,CAAA;AACvB,IAAA,WAAA,GAAA;8GADS,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAHb,OAAA,EAAA,CAAA,YAAY,EAAE,QAAQ,aACtB,QAAQ,CAAA,EAAA,CAAA,CAAA;AAET,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAHb,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGb,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,QAAQ,CAAC;oBACjC,OAAO,EAAE,CAAC,QAAQ;AACrB,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CdkOverlayOrigin, CdkConnectedOverlay, OverlayModule } from '@angular/cdk/overlay';
|
|
2
2
|
import { formatDate, NgClass, NgTemplateOutlet, CommonModule, isPlatformBrowser, registerLocaleData } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Injectable, inject, EventEmitter, Output, Input, Directive, ChangeDetectionStrategy, Component, InjectionToken, Pipe, ChangeDetectorRef, forwardRef, HostBinding, NgModule, ViewChild,
|
|
4
|
+
import { Injectable, inject, EventEmitter, Output, Input, Directive, ChangeDetectionStrategy, Component, InjectionToken, Pipe, ChangeDetectorRef, forwardRef, HostBinding, input, computed, NgModule, ViewChild, ElementRef, PLATFORM_ID, NgZone, numberAttribute } from '@angular/core';
|
|
5
5
|
import localeZhHans from '@angular/common/locales/zh-Hans';
|
|
6
|
-
import { TinyDate, coerceBooleanProperty, subDays, startOfDay, startOfWeek, addDays, addWeeks, helpers, coerceArray, isTemplateRef, isEmpty, isString,
|
|
6
|
+
import { TinyDate, coerceBooleanProperty, subDays, startOfDay, startOfWeek, addDays, addWeeks, helpers, coerceArray, isTemplateRef, isEmpty, isString, isFunction, isUndefinedOrNull, valueFunctionProp, endOfDay, sortRangeValue, elementMatchClosest, warnDeprecation } from 'ngx-tethys/util';
|
|
7
7
|
import { injectLocale, ThyI18nService, ThyLocaleType } from 'ngx-tethys/i18n';
|
|
8
8
|
import { ThyIcon, ThyIconModule } from 'ngx-tethys/icon';
|
|
9
9
|
import * as i1 from '@angular/forms';
|
|
@@ -228,7 +228,7 @@ class CalendarFooter {
|
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: CalendarFooter, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
231
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: CalendarFooter, isStandalone: true, selector: "calendar-footer", inputs: { showTime: "showTime", mustShowTime: "mustShowTime", value: "value", timeZone: "timeZone", disableTimeConfirm: ["disableTimeConfirm", "disableTimeConfirm", coerceBooleanProperty] }, outputs: { selectTime: "selectTime", clickOk: "clickOk", clickRemove: "clickRemove", showTimePickerChange: "showTimePickerChange" }, exportAs: ["calendarFooter"], usesOnChanges: true, ngImport: i0, template: "@if (isShowTime || isCanTime) {\n <div class=\"time-picker-section\" (click)=\"$event.stopPropagation()\">\n @if (isCanTime) {\n <a href=\"javascript:;\" class=\"link-has-icon time-picker-set-btn\" (click)=\"changeTimeShowMode('show')\">\n <thy-icon thyIconName=\"clock-circle\"></thy-icon>{{ locale().setTime }}\n </a>\n }\n @if (isShowTime) {\n <thy-inner-time-picker\n class=\"time-picker-wrap\"\n [showMeridian]=\"false\"\n [timeZone]=\"timeZone\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onSelectTime($event)\"></thy-inner-time-picker>\n }\n <div class=\"time-picker-btn-wrap\">\n @if (!isCanTime) {\n <button [disabled]=\"disableTimeConfirm\" class=\"time-picker-ok-btn\" thyButton=\"primary\" thySize=\"sm\" (click)=\"onTimeOk()\">\n {{ locale().ok }}\n </button>\n }\n <button class=\"time-picker-clear-btn\" thyButton=\"link-secondary\" thySize=\"sm\" (click)=\"onClear()\">{{ locale().clear }}</button>\n </div>\n </div>\n}\n", dependencies: [{ kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyInnerTimePicker, selector: "thy-inner-time-picker", inputs: ["hourStep", "minuteStep", "secondsStep", "readonlyInput", "disabled", "mousewheel", "arrowKeys", "showSpinners", "showMeridian", "showMinutes", "showSeconds", "meridians", "min", "max", "hoursPlaceholder", "minutesPlaceholder", "secondsPlaceholder", "timeZone"], outputs: ["isValid"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ThyButton, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thyBlock"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
231
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: CalendarFooter, isStandalone: true, selector: "calendar-footer", inputs: { showTime: "showTime", mustShowTime: "mustShowTime", value: "value", timeZone: "timeZone", disableTimeConfirm: ["disableTimeConfirm", "disableTimeConfirm", coerceBooleanProperty] }, outputs: { selectTime: "selectTime", clickOk: "clickOk", clickRemove: "clickRemove", showTimePickerChange: "showTimePickerChange" }, exportAs: ["calendarFooter"], usesOnChanges: true, ngImport: i0, template: "@if (isShowTime || isCanTime) {\n <div class=\"time-picker-section\" (click)=\"$event.stopPropagation()\">\n @if (isCanTime) {\n <a href=\"javascript:;\" class=\"link-has-icon time-picker-set-btn\" (click)=\"changeTimeShowMode('show')\">\n <thy-icon thyIconName=\"clock-circle\"></thy-icon>{{ locale().setTime }}\n </a>\n }\n @if (isShowTime) {\n <thy-inner-time-picker\n class=\"time-picker-wrap\"\n [showMeridian]=\"false\"\n [timeZone]=\"timeZone\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onSelectTime($event)\"></thy-inner-time-picker>\n }\n <div class=\"time-picker-btn-wrap\">\n @if (!isCanTime) {\n <button [disabled]=\"disableTimeConfirm\" class=\"time-picker-ok-btn\" thyButton=\"primary\" thySize=\"sm\" (click)=\"onTimeOk()\">\n {{ locale().ok }}\n </button>\n }\n <button class=\"time-picker-clear-btn\" thyButton=\"link-secondary\" thySize=\"sm\" (click)=\"onClear()\">{{ locale().clear }}</button>\n </div>\n </div>\n}\n", dependencies: [{ kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyInnerTimePicker, selector: "thy-inner-time-picker", inputs: ["hourStep", "minuteStep", "secondsStep", "readonlyInput", "disabled", "mousewheel", "arrowKeys", "showSpinners", "showMeridian", "showMinutes", "showSeconds", "meridians", "min", "max", "hoursPlaceholder", "minutesPlaceholder", "secondsPlaceholder", "timeZone"], outputs: ["disabledChange", "isValid"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ThyButton, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thyBlock"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
232
232
|
}
|
|
233
233
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: CalendarFooter, decorators: [{
|
|
234
234
|
type: Component,
|
|
@@ -1240,19 +1240,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
1240
1240
|
class DateTableCell {
|
|
1241
1241
|
constructor() {
|
|
1242
1242
|
this.isTemplateRef = isTemplateRef;
|
|
1243
|
+
this.prefixCls = input();
|
|
1244
|
+
this.cell = input();
|
|
1243
1245
|
this.isNonEmptyString = (v) => isEmpty(v) && isString(v);
|
|
1246
|
+
this.functionRenderResult = computed(() => {
|
|
1247
|
+
const renderFn = this.cellRender();
|
|
1248
|
+
if (!isFunction(renderFn)) {
|
|
1249
|
+
return false;
|
|
1250
|
+
}
|
|
1251
|
+
const result = renderFn(this.cell().value);
|
|
1252
|
+
return !isUndefinedOrNull(result);
|
|
1253
|
+
});
|
|
1254
|
+
this.datePickerConfigService = inject(ThyDatePickerConfigService);
|
|
1255
|
+
this.cellRender = computed(() => {
|
|
1256
|
+
return this.cell()?.dateCellRender || this.datePickerConfigService.config?.dateCellRender;
|
|
1257
|
+
});
|
|
1244
1258
|
}
|
|
1245
1259
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DateTableCell, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1246
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: DateTableCell, isStandalone: true, selector: "[date-table-cell]", inputs: { prefixCls: "prefixCls", cell: "cell" }, exportAs: ["dateTableCell"], ngImport: i0, template: "
|
|
1260
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: DateTableCell, isStandalone: true, selector: "[date-table-cell]", inputs: { prefixCls: { classPropertyName: "prefixCls", publicName: "prefixCls", isSignal: true, isRequired: false, transformFunction: null }, cell: { classPropertyName: "cell", publicName: "cell", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["dateTableCell"], ngImport: i0, template: "@switch (prefixCls()) {\n @case ('thy-calendar') {\n @switch (true) {\n @case (isTemplateRef(cellRender())) {\n <ng-container *ngTemplateOutlet=\"cellRender(); context: { $implicit: cell().value }\"></ng-container>\n }\n @case (isNonEmptyString(cellRender())) {\n <span [innerHTML]=\"cellRender()\"></span>\n }\n @case (functionRenderResult()) {\n <span [innerHTML]=\"$any(cellRender())(cell().value)\"></span>\n }\n @default {\n <div class=\"{{ prefixCls() }}-date\" [attr.aria-selected]=\"cell().isSelected\" [attr.aria-disabled]=\"cell().isDisabled\">\n {{ cell().content }}\n </div>\n }\n }\n }\n @case ('thy-calendar-full') {\n <div\n tabindex=\"0\"\n class=\"{{ prefixCls() }}-date thy-calendar-full-cell-inner\"\n [class.thy-calendar-full-calendar-date-today]=\"cell().isToday\">\n @if (cell().fullCellRender) {\n <ng-container *ngTemplateOutlet=\"$any(cell().fullCellRender); context: { $implicit: cell().value }\"> </ng-container>\n } @else {\n <div class=\"{{ prefixCls() }}-date-value\">\n <span class=\"{{ prefixCls() }}-date-value-today-text\">\n <span class=\"{{ prefixCls() }}-date-value-text\">{{ cell().content }}</span>\n </span>\n </div>\n <div class=\"{{ prefixCls() }}-date-content\">\n <ng-container *ngTemplateOutlet=\"$any(cellRender()); context: { $implicit: cell().value }\"> </ng-container>\n </div>\n }\n </div>\n }\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
1247
1261
|
}
|
|
1248
1262
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DateTableCell, decorators: [{
|
|
1249
1263
|
type: Component,
|
|
1250
|
-
args: [{ selector: '[date-table-cell]', exportAs: 'dateTableCell', imports: [NgTemplateOutlet], template: "
|
|
1251
|
-
}]
|
|
1252
|
-
type: Input
|
|
1253
|
-
}], cell: [{
|
|
1254
|
-
type: Input
|
|
1255
|
-
}] } });
|
|
1264
|
+
args: [{ selector: '[date-table-cell]', exportAs: 'dateTableCell', imports: [NgTemplateOutlet], template: "@switch (prefixCls()) {\n @case ('thy-calendar') {\n @switch (true) {\n @case (isTemplateRef(cellRender())) {\n <ng-container *ngTemplateOutlet=\"cellRender(); context: { $implicit: cell().value }\"></ng-container>\n }\n @case (isNonEmptyString(cellRender())) {\n <span [innerHTML]=\"cellRender()\"></span>\n }\n @case (functionRenderResult()) {\n <span [innerHTML]=\"$any(cellRender())(cell().value)\"></span>\n }\n @default {\n <div class=\"{{ prefixCls() }}-date\" [attr.aria-selected]=\"cell().isSelected\" [attr.aria-disabled]=\"cell().isDisabled\">\n {{ cell().content }}\n </div>\n }\n }\n }\n @case ('thy-calendar-full') {\n <div\n tabindex=\"0\"\n class=\"{{ prefixCls() }}-date thy-calendar-full-cell-inner\"\n [class.thy-calendar-full-calendar-date-today]=\"cell().isToday\">\n @if (cell().fullCellRender) {\n <ng-container *ngTemplateOutlet=\"$any(cell().fullCellRender); context: { $implicit: cell().value }\"> </ng-container>\n } @else {\n <div class=\"{{ prefixCls() }}-date-value\">\n <span class=\"{{ prefixCls() }}-date-value-today-text\">\n <span class=\"{{ prefixCls() }}-date-value-text\">{{ cell().content }}</span>\n </span>\n </div>\n <div class=\"{{ prefixCls() }}-date-content\">\n <ng-container *ngTemplateOutlet=\"$any(cellRender()); context: { $implicit: cell().value }\"> </ng-container>\n </div>\n }\n </div>\n }\n}\n" }]
|
|
1265
|
+
}] });
|
|
1256
1266
|
|
|
1257
1267
|
/**
|
|
1258
1268
|
* @private
|