@gzmjs/ui-basic 0.2.0 → 0.3.0
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/dist/000-helper/attr.d.ts +61 -0
- package/dist/000-helper/center.d.ts +22 -0
- package/dist/000-helper/corner.d.ts +25 -0
- package/dist/000-helper/element.d.ts +30 -0
- package/dist/000-helper/helper.d.ts +12 -0
- package/dist/000-helper/lang.d.ts +93 -0
- package/dist/000-helper/style.d.ts +27 -0
- package/dist/000-helper/theme.d.ts +7 -0
- package/dist/003-accessory/badge.d.ts +17 -0
- package/dist/003-accessory/close.d.ts +15 -0
- package/dist/003-accessory/icon.d.ts +18 -0
- package/dist/003-accessory/iconCache.d.ts +3 -0
- package/dist/011-dialog/circle.d.ts +24 -0
- package/dist/011-dialog/dialog.d.ts +12 -0
- package/dist/011-dialog/show.d.ts +10 -0
- package/dist/512.png +0 -0
- package/dist/index.d.ts +15 -0
- package/dist/vite.svg +1 -0
- package/package.json +2 -2
- package/dist/ui-basic.d.ts +0 -418
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export declare function getSnakeCaseName(propName: string): string;
|
|
2
|
+
/**
|
|
3
|
+
* 基于:
|
|
4
|
+
* 1 - Atribute 属性(A属性)的特性,具体请看 /try/WC/attr.html
|
|
5
|
+
* 2 - auto-accessor 装饰器的特性,具体请看 /try/ts/auto-accessor.ts
|
|
6
|
+
*
|
|
7
|
+
* 对于所有的 auto-accessor 装饰器生成的属性,属性的类型与默认值必须按如下定义:
|
|
8
|
+
* 1 - 目前支持三种类型: 整数、布尔 和 字符串。其中字符串是万金油,因为 ts 中经常用字符串来定义联合类型,如 'a' | 'b' 等。
|
|
9
|
+
* 2 - 每种数据类型都支持两种方式:
|
|
10
|
+
* a - 与 undefined 联合,默认值是 void 0
|
|
11
|
+
* b - 不与 undefined 联合,编译器要求必须初始化,那么不要在构造函数中初始化。因为构造函数中调用的是 set() 会导致设置 A 属性,导致 createElement() 异常。
|
|
12
|
+
* 3 - 开发组件的时候 P属性 优先使用与 undefined 的联合类型,也就不需要默认值。可以将默认值写在 get() 时,如 this.propName ?? default。
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* @strAttr
|
|
16
|
+
* accessor propName: V = '';
|
|
17
|
+
* 或者
|
|
18
|
+
* @strAttr
|
|
19
|
+
* accessor propName: V | undefined;
|
|
20
|
+
*/
|
|
21
|
+
export declare function strAttr<This extends HTMLElement, V>(_: ClassAccessorDecoratorTarget<This, V>, context: ClassAccessorDecoratorContext<This, V>): {
|
|
22
|
+
get(this: This): V;
|
|
23
|
+
set(this: This, value: V): void;
|
|
24
|
+
init(this: This, value: V): V;
|
|
25
|
+
};
|
|
26
|
+
type BoolOrUndef = boolean | undefined;
|
|
27
|
+
type BoolType = boolean | BoolOrUndef;
|
|
28
|
+
/**
|
|
29
|
+
* @boolAttr
|
|
30
|
+
* accessor propName: boolean = false;
|
|
31
|
+
* 或者
|
|
32
|
+
* @boolAttr
|
|
33
|
+
* accessor propName: boolean | undefined;
|
|
34
|
+
*/
|
|
35
|
+
export declare function boolAttr<This extends HTMLElement, V extends BoolType>(_: ClassAccessorDecoratorTarget<This, V>, context: ClassAccessorDecoratorContext<This, V>): {
|
|
36
|
+
get(this: This): V;
|
|
37
|
+
set(this: This, value: V): void;
|
|
38
|
+
init(this: This, value: V): V;
|
|
39
|
+
};
|
|
40
|
+
type NumOrUndef = number | undefined;
|
|
41
|
+
type NumType = number | NumOrUndef;
|
|
42
|
+
/**
|
|
43
|
+
* @intAttr
|
|
44
|
+
* accessor propName: number | undefined;
|
|
45
|
+
* 或者
|
|
46
|
+
* @intAttr
|
|
47
|
+
* accessor propName: number = 12345;
|
|
48
|
+
*/
|
|
49
|
+
export declare function intAttr<This extends HTMLElement, V extends NumType>(_: ClassAccessorDecoratorTarget<This, V>, context: ClassAccessorDecoratorContext<This, V>): {
|
|
50
|
+
get(this: This): V;
|
|
51
|
+
set(this: This, value: V): void;
|
|
52
|
+
init(this: This, value: V): V;
|
|
53
|
+
};
|
|
54
|
+
type StrArrayOrUndef = string[] | undefined;
|
|
55
|
+
type StrArrayType = string[] | StrArrayOrUndef;
|
|
56
|
+
export declare function saAttr<This extends HTMLElement, V extends StrArrayType>(_: ClassAccessorDecoratorTarget<This, V>, context: ClassAccessorDecoratorContext<This, V>): {
|
|
57
|
+
get(this: This): V;
|
|
58
|
+
set(this: This, value: V): void;
|
|
59
|
+
init(this: This, value: V): V;
|
|
60
|
+
};
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const borders: readonly ["bottom", "top", "right", "left"];
|
|
2
|
+
export type AttachBorder = typeof borders[number];
|
|
3
|
+
export declare const attachBorderAttributeName = "gzm-attach-border";
|
|
4
|
+
export interface TransitionPopup {
|
|
5
|
+
doTransition: boolean;
|
|
6
|
+
beforeOpenTransition?: () => void;
|
|
7
|
+
afterOpenTransition?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare class CenterHelper {
|
|
10
|
+
#private;
|
|
11
|
+
constructor($tooltip: HTMLElement & TransitionPopup, $attachTo: HTMLElement, attachBorder: AttachBorder);
|
|
12
|
+
$tt: HTMLElement & TransitionPopup;
|
|
13
|
+
$attachTo: HTMLElement;
|
|
14
|
+
realBorder: AttachBorder;
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
marginLeft: string;
|
|
18
|
+
marginTop: string;
|
|
19
|
+
ttWidth: number;
|
|
20
|
+
ttHeight: number;
|
|
21
|
+
pos($tt?: HTMLElement & TransitionPopup): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 因为 tsconfig.json erasableSyntaxOnly 所以不能使用枚举。
|
|
3
|
+
* xy
|
|
4
|
+
* 00 - 左上角 = 0
|
|
5
|
+
* 01 - 左下角 = 1
|
|
6
|
+
* 10 - 右上角 = 10
|
|
7
|
+
* 11 - 右下角 = 11
|
|
8
|
+
*/
|
|
9
|
+
export declare const xy: {
|
|
10
|
+
readonly leftTop: 0;
|
|
11
|
+
readonly leftBottom: 1;
|
|
12
|
+
readonly rightTop: 10;
|
|
13
|
+
readonly rightBottom: 11;
|
|
14
|
+
};
|
|
15
|
+
export type Corner = typeof xy[keyof typeof xy];
|
|
16
|
+
export declare function isLeftCorner(c: Corner): boolean;
|
|
17
|
+
export declare function isTopCorner(c: Corner): boolean;
|
|
18
|
+
export declare function makeCorner(isLeft: boolean, isTop: boolean): Corner;
|
|
19
|
+
export declare class CornerHelper {
|
|
20
|
+
#private;
|
|
21
|
+
constructor($popup: HTMLElement, popupCorner: Corner, $attachTo: HTMLElement, attachCorner: Corner);
|
|
22
|
+
readonly $popup: HTMLElement;
|
|
23
|
+
readonly $attachTo: HTMLElement;
|
|
24
|
+
pos(): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
type CustomElement = {
|
|
2
|
+
tagName: string;
|
|
3
|
+
style?: CSSStyleSheet;
|
|
4
|
+
mutableAttributes?: readonly string[];
|
|
5
|
+
/**
|
|
6
|
+
* 必须在 mutableAttributes 不为空时才有效。
|
|
7
|
+
* key 是 mutableAttributes 中的一员,value 是组件的属性名称(数组)
|
|
8
|
+
*/
|
|
9
|
+
copyAttributes?: Record<string, string | string[]>;
|
|
10
|
+
};
|
|
11
|
+
export declare function defineElement(ele: CustomElement): (constructor: CustomElementConstructor, ctx: ClassDecoratorContext) => void;
|
|
12
|
+
/**
|
|
13
|
+
* 模拟 string.replaceAll() 方法
|
|
14
|
+
*/
|
|
15
|
+
type ReplaceAll<Str extends string, From extends string, To extends string> = From extends "" ? Str : Str extends `${infer Prefix}${From}${infer Suffix}` ? `${Prefix}${To}${ReplaceAll<Suffix, From, To>}` : Str;
|
|
16
|
+
/**
|
|
17
|
+
* 模拟 getAttributeSetHandlerName(name) 的逻辑
|
|
18
|
+
*/
|
|
19
|
+
type GetAttributeSetHandlerName<Name extends string> = `_${ReplaceAll<Name, '-', '_'>}_set`;
|
|
20
|
+
/**
|
|
21
|
+
* 对于每一个有 mutableAttributes 的组件,都必须实现下面这个类型。
|
|
22
|
+
* 其中 T 是 typeof mutableAttributes[number]
|
|
23
|
+
* 如果同时也有 copyAttributes,那么需要排除 copyAttributes 中的属性:
|
|
24
|
+
* Exclude<typeof mutableAttributes[number], keyof typeof copyAttributes>。
|
|
25
|
+
* 050-tree.ts 就是这么做到。
|
|
26
|
+
*/
|
|
27
|
+
export type AttributeHandlers<T extends string> = {
|
|
28
|
+
[K in T as GetAttributeSetHandlerName<K>]: <P extends string>(nv: P | null, ov: P | null) => void;
|
|
29
|
+
};
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 防抖
|
|
3
|
+
* @param func
|
|
4
|
+
* @param wait
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export declare function debounce<T extends (...args: unknown[]) => unknown>(func: T, wait?: number): (...args: Parameters<T>) => void;
|
|
8
|
+
/**
|
|
9
|
+
* 生成一个随机 ID 字符串,极大概率唯一
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
export declare function generateId(): string;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
declare const zh: {
|
|
2
|
+
readonly close: "关闭";
|
|
3
|
+
readonly true: "✔️";
|
|
4
|
+
readonly false: "❌";
|
|
5
|
+
readonly undefined: "未定义";
|
|
6
|
+
readonly default: "默认";
|
|
7
|
+
readonly valueMissing: "请填写此字段。";
|
|
8
|
+
readonly count: "计数";
|
|
9
|
+
readonly min: "最小";
|
|
10
|
+
readonly max: "最大";
|
|
11
|
+
readonly sum: "合计";
|
|
12
|
+
readonly avg: "平均";
|
|
13
|
+
readonly hide: "隐藏";
|
|
14
|
+
readonly del: "删除";
|
|
15
|
+
readonly asc: "升序";
|
|
16
|
+
readonly desc: "降序";
|
|
17
|
+
readonly ok: "确定";
|
|
18
|
+
readonly cancel: "取消";
|
|
19
|
+
readonly waiting: "正在处理中,请稍候...";
|
|
20
|
+
readonly confirming: "请确认:{0} ?";
|
|
21
|
+
readonly completed: "已完成";
|
|
22
|
+
readonly error: "错误";
|
|
23
|
+
readonly attention: "注意";
|
|
24
|
+
readonly noMenuSet: "未设置菜单!?";
|
|
25
|
+
readonly readonly: "只读";
|
|
26
|
+
};
|
|
27
|
+
export declare const globalTexts: {
|
|
28
|
+
zh: {
|
|
29
|
+
readonly close: "关闭";
|
|
30
|
+
readonly true: "✔️";
|
|
31
|
+
readonly false: "❌";
|
|
32
|
+
readonly undefined: "未定义";
|
|
33
|
+
readonly default: "默认";
|
|
34
|
+
readonly valueMissing: "请填写此字段。";
|
|
35
|
+
readonly count: "计数";
|
|
36
|
+
readonly min: "最小";
|
|
37
|
+
readonly max: "最大";
|
|
38
|
+
readonly sum: "合计";
|
|
39
|
+
readonly avg: "平均";
|
|
40
|
+
readonly hide: "隐藏";
|
|
41
|
+
readonly del: "删除";
|
|
42
|
+
readonly asc: "升序";
|
|
43
|
+
readonly desc: "降序";
|
|
44
|
+
readonly ok: "确定";
|
|
45
|
+
readonly cancel: "取消";
|
|
46
|
+
readonly waiting: "正在处理中,请稍候...";
|
|
47
|
+
readonly confirming: "请确认:{0} ?";
|
|
48
|
+
readonly completed: "已完成";
|
|
49
|
+
readonly error: "错误";
|
|
50
|
+
readonly attention: "注意";
|
|
51
|
+
readonly noMenuSet: "未设置菜单!?";
|
|
52
|
+
readonly readonly: "只读";
|
|
53
|
+
};
|
|
54
|
+
en: {
|
|
55
|
+
readonly close: "关闭";
|
|
56
|
+
readonly true: "✔️";
|
|
57
|
+
readonly false: "❌";
|
|
58
|
+
readonly undefined: "未定义";
|
|
59
|
+
readonly default: "默认";
|
|
60
|
+
readonly valueMissing: "请填写此字段。";
|
|
61
|
+
readonly count: "计数";
|
|
62
|
+
readonly min: "最小";
|
|
63
|
+
readonly max: "最大";
|
|
64
|
+
readonly sum: "合计";
|
|
65
|
+
readonly avg: "平均";
|
|
66
|
+
readonly hide: "隐藏";
|
|
67
|
+
readonly del: "删除";
|
|
68
|
+
readonly asc: "升序";
|
|
69
|
+
readonly desc: "降序";
|
|
70
|
+
readonly ok: "确定";
|
|
71
|
+
readonly cancel: "取消";
|
|
72
|
+
readonly waiting: "正在处理中,请稍候...";
|
|
73
|
+
readonly confirming: "请确认:{0} ?";
|
|
74
|
+
readonly completed: "已完成";
|
|
75
|
+
readonly error: "错误";
|
|
76
|
+
readonly attention: "注意";
|
|
77
|
+
readonly noMenuSet: "未设置菜单!?";
|
|
78
|
+
readonly readonly: "只读";
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
declare const bindHtmlElement = "bindHtmlElement";
|
|
82
|
+
type BindableTextProxy = {
|
|
83
|
+
[bindHtmlElement]: <P>(this: P, $ele: HTMLElement) => P;
|
|
84
|
+
};
|
|
85
|
+
type IncludesCurlyZero<T extends string> = T extends `${string}{0}${string}` ? (...args: unknown[]) => string : string;
|
|
86
|
+
type TextProxy<T> = {
|
|
87
|
+
[K in keyof T]: T[K] extends string ? IncludesCurlyZero<T[K]> : never;
|
|
88
|
+
};
|
|
89
|
+
type GlobalTextProxy = TextProxy<typeof zh>;
|
|
90
|
+
type JoinedText<T extends Record<string, unknown>[]> = T extends [Record<string, infer First>, ...infer Rest] ? TextProxy<First> & JoinedText<Rest extends Record<string, unknown>[] ? Rest : []> : unknown;
|
|
91
|
+
export declare function createText<T extends Record<string, unknown>[]>(this: unknown, ...txts: T): JoinedText<T> & BindableTextProxy;
|
|
92
|
+
export declare const GT: GlobalTextProxy;
|
|
93
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type Rules = {
|
|
2
|
+
[prop: string]: string;
|
|
3
|
+
};
|
|
4
|
+
export type Style = {
|
|
5
|
+
[selector: string]: Rules | string;
|
|
6
|
+
};
|
|
7
|
+
export declare function createStyleSheet(style: Style): CSSStyleSheet;
|
|
8
|
+
export declare function getElementRules(tagName: string, ...ruleNames: string[]): Rules;
|
|
9
|
+
/**
|
|
10
|
+
* 主要是字体的设置,应该作为网页 reset 的一部分。
|
|
11
|
+
* 不设置 :host 的字体,具体请看 style-font.md
|
|
12
|
+
* 因为此项目开发的是组件,所以用不到。
|
|
13
|
+
*
|
|
14
|
+
* 以下内容是通过 tailwind.css 获得,具体方法;
|
|
15
|
+
* 访问:/try/tailwind/test.html,在浏览器开发工具的源代码选中 /src/style.css
|
|
16
|
+
*/ /**
|
|
17
|
+
* 从 dist/assets/index.css 中提取的样式。
|
|
18
|
+
* 找到其中的 @layer base,然后开始做减法。
|
|
19
|
+
* 1 - 去掉不用的伪类,如 ::file-selector-button, ::-webkit-*。
|
|
20
|
+
* 2 - 去掉具体的 tag 定义,如 hr, h1-6, button, 因为多半用不到。
|
|
21
|
+
*/
|
|
22
|
+
export declare const baseStyle: CSSStyleSheet;
|
|
23
|
+
export declare const gzmHeader = "\n background: var(--gzm-header-background);\n border: var(--gzm-header-border);\n color: var(--gzm-header-txt-color);\n";
|
|
24
|
+
export declare const gzmFrame = "\n background: var(--gzm-content-background);\n color: var(--gzm-content-txt-color);\n border-radius: 0.5rem;\n border: var(--gzm-btn-border);\n padding: 0.5rem;\n";
|
|
25
|
+
export declare const utilityStyle: CSSStyleSheet;
|
|
26
|
+
export declare function createTxtBtn(txt: string): HTMLButtonElement;
|
|
27
|
+
export declare function isTxtBtn($btn: HTMLElement): boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as ELE from '../000-helper/element';
|
|
2
|
+
export declare const tagName = "GZM-BADGE";
|
|
3
|
+
declare global {
|
|
4
|
+
interface HTMLElementTagNameMap {
|
|
5
|
+
[tagName]: Badge;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
declare const mutableAttributes: readonly ["badge", "corner"];
|
|
9
|
+
export declare class Badge extends HTMLElement implements ELE.AttributeHandlers<typeof mutableAttributes[number]> {
|
|
10
|
+
constructor();
|
|
11
|
+
readonly shadowRoot: ShadowRoot;
|
|
12
|
+
_badge_set(badge: string | null): void;
|
|
13
|
+
_corner_set(): void;
|
|
14
|
+
accessor badge: string | undefined;
|
|
15
|
+
accessor corner: boolean | undefined;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as ELE from '../000-helper/element';
|
|
2
|
+
export declare const tagName = "GZM-CLOSE-BTN";
|
|
3
|
+
declare global {
|
|
4
|
+
interface HTMLElementTagNameMap {
|
|
5
|
+
[tagName]: CloseBtn;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
declare const mutableAttributes: readonly ["corner"];
|
|
9
|
+
export declare class CloseBtn extends HTMLElement implements ELE.AttributeHandlers<typeof mutableAttributes[number]> {
|
|
10
|
+
constructor();
|
|
11
|
+
readonly shadowRoot: ShadowRoot;
|
|
12
|
+
_corner_set(): void;
|
|
13
|
+
accessor corner: boolean | undefined;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as ELE from '../000-helper/element';
|
|
2
|
+
export declare const tagName = "GZM-ICON";
|
|
3
|
+
declare global {
|
|
4
|
+
interface HTMLElementTagNameMap {
|
|
5
|
+
[tagName]: Icon;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
declare const mutableAttributes: readonly ["icon"];
|
|
9
|
+
export declare class Icon extends HTMLElement implements ELE.AttributeHandlers<typeof mutableAttributes[number]> {
|
|
10
|
+
#private;
|
|
11
|
+
constructor();
|
|
12
|
+
readonly shadowRoot: ShadowRoot;
|
|
13
|
+
setImg(icon: string): boolean;
|
|
14
|
+
setSvg(icon: string): boolean;
|
|
15
|
+
_icon_set(icon: string | null): void;
|
|
16
|
+
accessor icon: string | undefined;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as ELE from '../000-helper/element';
|
|
2
|
+
export declare const tagName = "GZM-CHECK-CIRCLE";
|
|
3
|
+
declare global {
|
|
4
|
+
interface HTMLElementTagNameMap {
|
|
5
|
+
[tagName]: CheckCircle;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
declare const mutableAttributes: readonly ["size"];
|
|
9
|
+
/**
|
|
10
|
+
* https://www.bilibili.com/video/BV17w4m1D7xi
|
|
11
|
+
* https://devdocs.io/svg/attribute/stroke-dasharray
|
|
12
|
+
* https://devdocs.io/svg/attribute/stroke-dashoffset
|
|
13
|
+
*/
|
|
14
|
+
export declare class CheckCircle extends HTMLElement implements ELE.AttributeHandlers<typeof mutableAttributes[number]> {
|
|
15
|
+
#private;
|
|
16
|
+
connectedCallback(): void;
|
|
17
|
+
$circle?: SVGCircleElement;
|
|
18
|
+
$polyline?: SVGPolylineElement;
|
|
19
|
+
play(): Promise<unknown>;
|
|
20
|
+
accessor size: string | undefined;
|
|
21
|
+
accessor duration: number | undefined;
|
|
22
|
+
_size_set(nv: string | null): void;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface DialogOptions {
|
|
2
|
+
reusable?: boolean;
|
|
3
|
+
resizable?: boolean;
|
|
4
|
+
title?: string;
|
|
5
|
+
movable?: boolean;
|
|
6
|
+
$body?: HTMLElement;
|
|
7
|
+
width?: string;
|
|
8
|
+
height?: string;
|
|
9
|
+
okHandler?: ($dlg: HTMLDialogElement) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function createDialog(options: DialogOptions): HTMLDialogElement;
|
|
12
|
+
export declare function showDockRightModalDlg(options: DialogOptions): HTMLDialogElement;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function showWaiting(title: string, msg?: string): {
|
|
2
|
+
$dlg: HTMLDialogElement;
|
|
3
|
+
complete(msg?: string): Promise<void>;
|
|
4
|
+
error(e?: object | string): void;
|
|
5
|
+
alert(msg: string): void;
|
|
6
|
+
close(): void;
|
|
7
|
+
setTitle(title: string): void;
|
|
8
|
+
};
|
|
9
|
+
export declare function showError(errMsg: string): HTMLDialogElement;
|
|
10
|
+
export declare function showAlert(msg: string): HTMLDialogElement;
|
package/dist/512.png
ADDED
|
Binary file
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './000-helper/attr';
|
|
2
|
+
export * from './000-helper/center';
|
|
3
|
+
export * from './000-helper/corner';
|
|
4
|
+
export * from './000-helper/element';
|
|
5
|
+
export * from './000-helper/helper';
|
|
6
|
+
export * from './000-helper/lang';
|
|
7
|
+
export * from './000-helper/style';
|
|
8
|
+
export * from './000-helper/theme';
|
|
9
|
+
export { tagName as badgeTagName, Badge } from './003-accessory/badge';
|
|
10
|
+
export { tagName as closeTagName, CloseBtn } from './003-accessory/close';
|
|
11
|
+
export { tagName as iconTagName, Icon } from './003-accessory/icon';
|
|
12
|
+
export * from './003-accessory/iconCache';
|
|
13
|
+
export { tagName as checkCircleTagName, CheckCircle } from './011-dialog/circle';
|
|
14
|
+
export * from './011-dialog/dialog';
|
|
15
|
+
export * from './011-dialog/show';
|
package/dist/vite.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/package.json
CHANGED
package/dist/ui-basic.d.ts
DELETED
|
@@ -1,418 +0,0 @@
|
|
|
1
|
-
export declare const allThemes: {
|
|
2
|
-
readonly name: string;
|
|
3
|
-
readonly label: string;
|
|
4
|
-
}[];
|
|
5
|
-
|
|
6
|
-
export declare type AttachBorder = typeof borders[number];
|
|
7
|
-
|
|
8
|
-
export declare const attachBorderAttributeName = "gzm-attach-border";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* 对于每一个有 mutableAttributes 的组件,都必须实现下面这个类型。
|
|
12
|
-
* 其中 T 是 typeof mutableAttributes[number]
|
|
13
|
-
* 如果同时也有 copyAttributes,那么需要排除 copyAttributes 中的属性:
|
|
14
|
-
* Exclude<typeof mutableAttributes[number], keyof typeof copyAttributes>。
|
|
15
|
-
* 050-tree.ts 就是这么做到。
|
|
16
|
-
*/
|
|
17
|
-
export declare type AttributeHandlers<T extends string> = {
|
|
18
|
-
[K in T as GetAttributeSetHandlerName<K>]: <P extends string>(nv: P | null, ov: P | null) => void;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export declare class Badge extends HTMLElement implements ELE.AttributeHandlers<typeof mutableAttributes[number]> {
|
|
22
|
-
constructor();
|
|
23
|
-
readonly shadowRoot: ShadowRoot;
|
|
24
|
-
_badge_set(badge: string | null): void;
|
|
25
|
-
_corner_set(): void;
|
|
26
|
-
accessor badge: string | undefined;
|
|
27
|
-
accessor corner: boolean | undefined;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export declare const badgeTagName = "GZM-BADGE";
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* 从 dist/assets/index.css 中提取的样式。
|
|
34
|
-
* 找到其中的 @layer base,然后开始做减法。
|
|
35
|
-
* 1 - 去掉不用的伪类,如 ::file-selector-button, ::-webkit-*。
|
|
36
|
-
* 2 - 去掉具体的 tag 定义,如 hr, h1-6, button, 因为多半用不到。
|
|
37
|
-
*/
|
|
38
|
-
export declare const baseStyle: CSSStyleSheet;
|
|
39
|
-
|
|
40
|
-
declare type BindableTextProxy = {
|
|
41
|
-
[bindHtmlElement]: <P>(this: P, $ele: HTMLElement) => P;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
declare const bindHtmlElement = "bindHtmlElement";
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* @boolAttr
|
|
48
|
-
* accessor propName: boolean = false;
|
|
49
|
-
* 或者
|
|
50
|
-
* @boolAttr
|
|
51
|
-
* accessor propName: boolean | undefined;
|
|
52
|
-
*/
|
|
53
|
-
export declare function boolAttr<This extends HTMLElement, V extends BoolType>(_: ClassAccessorDecoratorTarget<This, V>, context: ClassAccessorDecoratorContext<This, V>): {
|
|
54
|
-
get(this: This): V;
|
|
55
|
-
set(this: This, value: V): void;
|
|
56
|
-
init(this: This, value: V): V;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
declare type BoolOrUndef = boolean | undefined;
|
|
60
|
-
|
|
61
|
-
declare type BoolType = boolean | BoolOrUndef;
|
|
62
|
-
|
|
63
|
-
export declare const borders: readonly ["bottom", "top", "right", "left"];
|
|
64
|
-
|
|
65
|
-
export declare class CenterHelper {
|
|
66
|
-
#private;
|
|
67
|
-
constructor($tooltip: HTMLElement & TransitionPopup, $attachTo: HTMLElement, attachBorder: AttachBorder);
|
|
68
|
-
$tt: HTMLElement & TransitionPopup;
|
|
69
|
-
$attachTo: HTMLElement;
|
|
70
|
-
realBorder: AttachBorder;
|
|
71
|
-
x: number;
|
|
72
|
-
y: number;
|
|
73
|
-
marginLeft: string;
|
|
74
|
-
marginTop: string;
|
|
75
|
-
ttWidth: number;
|
|
76
|
-
ttHeight: number;
|
|
77
|
-
pos($tt?: HTMLElement & TransitionPopup): void;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* https://www.bilibili.com/video/BV17w4m1D7xi
|
|
82
|
-
* https://devdocs.io/svg/attribute/stroke-dasharray
|
|
83
|
-
* https://devdocs.io/svg/attribute/stroke-dashoffset
|
|
84
|
-
*/
|
|
85
|
-
export declare class CheckCircle extends HTMLElement implements ELE.AttributeHandlers<typeof mutableAttributes_4[number]> {
|
|
86
|
-
#private;
|
|
87
|
-
connectedCallback(): void;
|
|
88
|
-
$circle?: SVGCircleElement;
|
|
89
|
-
$polyline?: SVGPolylineElement;
|
|
90
|
-
play(): Promise<unknown>;
|
|
91
|
-
accessor size: string | undefined;
|
|
92
|
-
accessor duration: number | undefined;
|
|
93
|
-
_size_set(nv: string | null): void;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export declare const checkCircleTagName = "GZM-CHECK-CIRCLE";
|
|
97
|
-
|
|
98
|
-
export declare class CloseBtn extends HTMLElement implements ELE.AttributeHandlers<typeof mutableAttributes_2[number]> {
|
|
99
|
-
constructor();
|
|
100
|
-
readonly shadowRoot: ShadowRoot;
|
|
101
|
-
_corner_set(): void;
|
|
102
|
-
accessor corner: boolean | undefined;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export declare const closeTagName = "GZM-CLOSE-BTN";
|
|
106
|
-
|
|
107
|
-
export declare type Corner = typeof xy[keyof typeof xy];
|
|
108
|
-
|
|
109
|
-
export declare class CornerHelper {
|
|
110
|
-
#private;
|
|
111
|
-
constructor($popup: HTMLElement, popupCorner: Corner, $attachTo: HTMLElement, attachCorner: Corner);
|
|
112
|
-
readonly $popup: HTMLElement;
|
|
113
|
-
readonly $attachTo: HTMLElement;
|
|
114
|
-
pos(): void;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export declare function createDialog(options: DialogOptions): HTMLDialogElement;
|
|
118
|
-
|
|
119
|
-
export declare function createStyleSheet(style: Style): CSSStyleSheet;
|
|
120
|
-
|
|
121
|
-
export declare function createText<T extends Record<string, unknown>[]>(this: unknown, ...txts: T): JoinedText<T> & BindableTextProxy;
|
|
122
|
-
|
|
123
|
-
export declare function createTxtBtn(txt: string): HTMLButtonElement;
|
|
124
|
-
|
|
125
|
-
declare type CustomElement = {
|
|
126
|
-
tagName: string;
|
|
127
|
-
style?: CSSStyleSheet;
|
|
128
|
-
mutableAttributes?: readonly string[];
|
|
129
|
-
/**
|
|
130
|
-
* 必须在 mutableAttributes 不为空时才有效。
|
|
131
|
-
* key 是 mutableAttributes 中的一员,value 是组件的属性名称(数组)
|
|
132
|
-
*/
|
|
133
|
-
copyAttributes?: Record<string, string | string[]>;
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* 防抖
|
|
138
|
-
* @param func
|
|
139
|
-
* @param wait
|
|
140
|
-
* @returns
|
|
141
|
-
*/
|
|
142
|
-
export declare function debounce<T extends (...args: unknown[]) => unknown>(func: T, wait?: number): (...args: Parameters<T>) => void;
|
|
143
|
-
|
|
144
|
-
export declare function defineElement(ele: CustomElement): (constructor: CustomElementConstructor, ctx: ClassDecoratorContext) => void;
|
|
145
|
-
|
|
146
|
-
export declare interface DialogOptions {
|
|
147
|
-
reusable?: boolean;
|
|
148
|
-
resizable?: boolean;
|
|
149
|
-
title?: string;
|
|
150
|
-
movable?: boolean;
|
|
151
|
-
$body?: HTMLElement;
|
|
152
|
-
width?: string;
|
|
153
|
-
height?: string;
|
|
154
|
-
okHandler?: ($dlg: HTMLDialogElement) => void;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
declare namespace ELE {
|
|
158
|
-
export {
|
|
159
|
-
defineElement,
|
|
160
|
-
AttributeHandlers
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* 生成一个随机 ID 字符串,极大概率唯一
|
|
166
|
-
* @returns
|
|
167
|
-
*/
|
|
168
|
-
export declare function generateId(): string;
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* 模拟 getAttributeSetHandlerName(name) 的逻辑
|
|
172
|
-
*/
|
|
173
|
-
declare type GetAttributeSetHandlerName<Name extends string> = `_${ReplaceAll<Name, '-', '_'>}_set`;
|
|
174
|
-
|
|
175
|
-
export declare function getCurrentTheme(): string;
|
|
176
|
-
|
|
177
|
-
export declare function getElementRules(tagName: string, ...ruleNames: string[]): Rules;
|
|
178
|
-
|
|
179
|
-
export declare function getSnakeCaseName(propName: string): string;
|
|
180
|
-
|
|
181
|
-
declare type GlobalTextProxy = TextProxy<typeof zh>;
|
|
182
|
-
|
|
183
|
-
export declare const globalTexts: {
|
|
184
|
-
zh: {
|
|
185
|
-
readonly close: "关闭";
|
|
186
|
-
readonly true: "✔️";
|
|
187
|
-
readonly false: "❌";
|
|
188
|
-
readonly undefined: "未定义";
|
|
189
|
-
readonly default: "默认";
|
|
190
|
-
readonly valueMissing: "请填写此字段。";
|
|
191
|
-
readonly count: "计数";
|
|
192
|
-
readonly min: "最小";
|
|
193
|
-
readonly max: "最大";
|
|
194
|
-
readonly sum: "合计";
|
|
195
|
-
readonly avg: "平均";
|
|
196
|
-
readonly hide: "隐藏";
|
|
197
|
-
readonly del: "删除";
|
|
198
|
-
readonly asc: "升序";
|
|
199
|
-
readonly desc: "降序";
|
|
200
|
-
readonly ok: "确定";
|
|
201
|
-
readonly cancel: "取消";
|
|
202
|
-
readonly waiting: "正在处理中,请稍候...";
|
|
203
|
-
readonly confirming: "请确认:{0} ?";
|
|
204
|
-
readonly completed: "已完成";
|
|
205
|
-
readonly error: "错误";
|
|
206
|
-
readonly attention: "注意";
|
|
207
|
-
readonly noMenuSet: "未设置菜单!?";
|
|
208
|
-
readonly readonly: "只读";
|
|
209
|
-
};
|
|
210
|
-
en: {
|
|
211
|
-
readonly close: "关闭";
|
|
212
|
-
readonly true: "✔️";
|
|
213
|
-
readonly false: "❌";
|
|
214
|
-
readonly undefined: "未定义";
|
|
215
|
-
readonly default: "默认";
|
|
216
|
-
readonly valueMissing: "请填写此字段。";
|
|
217
|
-
readonly count: "计数";
|
|
218
|
-
readonly min: "最小";
|
|
219
|
-
readonly max: "最大";
|
|
220
|
-
readonly sum: "合计";
|
|
221
|
-
readonly avg: "平均";
|
|
222
|
-
readonly hide: "隐藏";
|
|
223
|
-
readonly del: "删除";
|
|
224
|
-
readonly asc: "升序";
|
|
225
|
-
readonly desc: "降序";
|
|
226
|
-
readonly ok: "确定";
|
|
227
|
-
readonly cancel: "取消";
|
|
228
|
-
readonly waiting: "正在处理中,请稍候...";
|
|
229
|
-
readonly confirming: "请确认:{0} ?";
|
|
230
|
-
readonly completed: "已完成";
|
|
231
|
-
readonly error: "错误";
|
|
232
|
-
readonly attention: "注意";
|
|
233
|
-
readonly noMenuSet: "未设置菜单!?";
|
|
234
|
-
readonly readonly: "只读";
|
|
235
|
-
};
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
export declare const GT: GlobalTextProxy;
|
|
239
|
-
|
|
240
|
-
export declare const gzmFrame = "\n background: var(--gzm-content-background);\n color: var(--gzm-content-txt-color);\n border-radius: 0.5rem;\n border: var(--gzm-btn-border);\n padding: 0.5rem;\n";
|
|
241
|
-
|
|
242
|
-
export declare const gzmHeader = "\n background: var(--gzm-header-background);\n border: var(--gzm-header-border);\n color: var(--gzm-header-txt-color);\n";
|
|
243
|
-
|
|
244
|
-
export declare const htmlThemeAttr = "gzm-theme";
|
|
245
|
-
|
|
246
|
-
export declare class Icon extends HTMLElement implements ELE.AttributeHandlers<typeof mutableAttributes_3[number]> {
|
|
247
|
-
#private;
|
|
248
|
-
constructor();
|
|
249
|
-
readonly shadowRoot: ShadowRoot;
|
|
250
|
-
setImg(icon: string): boolean;
|
|
251
|
-
setSvg(icon: string): boolean;
|
|
252
|
-
_icon_set(icon: string | null): void;
|
|
253
|
-
accessor icon: string | undefined;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
export declare const iconCache: {
|
|
257
|
-
[key: string]: string | HTMLImageElement;
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
export declare const iconTagName = "GZM-ICON";
|
|
261
|
-
|
|
262
|
-
declare type IncludesCurlyZero<T extends string> = T extends `${string}{0}${string}` ? (...args: unknown[]) => string : string;
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* @intAttr
|
|
266
|
-
* accessor propName: number | undefined;
|
|
267
|
-
* 或者
|
|
268
|
-
* @intAttr
|
|
269
|
-
* accessor propName: number = 12345;
|
|
270
|
-
*/
|
|
271
|
-
export declare function intAttr<This extends HTMLElement, V extends NumType>(_: ClassAccessorDecoratorTarget<This, V>, context: ClassAccessorDecoratorContext<This, V>): {
|
|
272
|
-
get(this: This): V;
|
|
273
|
-
set(this: This, value: V): void;
|
|
274
|
-
init(this: This, value: V): V;
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
export declare function isLeftCorner(c: Corner): boolean;
|
|
278
|
-
|
|
279
|
-
export declare function isTopCorner(c: Corner): boolean;
|
|
280
|
-
|
|
281
|
-
export declare function isTxtBtn($btn: HTMLElement): boolean;
|
|
282
|
-
|
|
283
|
-
declare type JoinedText<T extends Record<string, unknown>[]> = T extends [Record<string, infer First>, ...infer Rest] ? TextProxy<First> & JoinedText<Rest extends Record<string, unknown>[] ? Rest : []> : unknown;
|
|
284
|
-
|
|
285
|
-
export declare function makeCorner(isLeft: boolean, isTop: boolean): Corner;
|
|
286
|
-
|
|
287
|
-
declare const mutableAttributes: readonly ["badge", "corner"];
|
|
288
|
-
|
|
289
|
-
declare const mutableAttributes_2: readonly ["corner"];
|
|
290
|
-
|
|
291
|
-
declare const mutableAttributes_3: readonly ["icon"];
|
|
292
|
-
|
|
293
|
-
declare const mutableAttributes_4: readonly ["size"];
|
|
294
|
-
|
|
295
|
-
declare type NumOrUndef = number | undefined;
|
|
296
|
-
|
|
297
|
-
declare type NumType = number | NumOrUndef;
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* 模拟 string.replaceAll() 方法
|
|
301
|
-
*/
|
|
302
|
-
declare type ReplaceAll<Str extends string, From extends string, To extends string> = From extends "" ? Str : Str extends `${infer Prefix}${From}${infer Suffix}` ? `${Prefix}${To}${ReplaceAll<Suffix, From, To>}` : Str;
|
|
303
|
-
|
|
304
|
-
export declare type Rules = {
|
|
305
|
-
[prop: string]: string;
|
|
306
|
-
};
|
|
307
|
-
|
|
308
|
-
export declare function saAttr<This extends HTMLElement, V extends StrArrayType>(_: ClassAccessorDecoratorTarget<This, V>, context: ClassAccessorDecoratorContext<This, V>): {
|
|
309
|
-
get(this: This): V;
|
|
310
|
-
set(this: This, value: V): void;
|
|
311
|
-
init(this: This, value: V): V;
|
|
312
|
-
};
|
|
313
|
-
|
|
314
|
-
export declare function setCurrentTheme(themeName: string): boolean;
|
|
315
|
-
|
|
316
|
-
export declare function showAlert(msg: string): HTMLDialogElement;
|
|
317
|
-
|
|
318
|
-
export declare function showDockRightModalDlg(options: DialogOptions): HTMLDialogElement;
|
|
319
|
-
|
|
320
|
-
export declare function showError(errMsg: string): HTMLDialogElement;
|
|
321
|
-
|
|
322
|
-
export declare function showWaiting(title: string, msg?: string): {
|
|
323
|
-
$dlg: HTMLDialogElement;
|
|
324
|
-
complete(msg?: string): Promise<void>;
|
|
325
|
-
error(e?: object | string): void;
|
|
326
|
-
alert(msg: string): void;
|
|
327
|
-
close(): void;
|
|
328
|
-
setTitle(title: string): void;
|
|
329
|
-
};
|
|
330
|
-
|
|
331
|
-
declare type StrArrayOrUndef = string[] | undefined;
|
|
332
|
-
|
|
333
|
-
declare type StrArrayType = string[] | StrArrayOrUndef;
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* 基于:
|
|
337
|
-
* 1 - Atribute 属性(A属性)的特性,具体请看 /try/WC/attr.html
|
|
338
|
-
* 2 - auto-accessor 装饰器的特性,具体请看 /try/ts/auto-accessor.ts
|
|
339
|
-
*
|
|
340
|
-
* 对于所有的 auto-accessor 装饰器生成的属性,属性的类型与默认值必须按如下定义:
|
|
341
|
-
* 1 - 目前支持三种类型: 整数、布尔 和 字符串。其中字符串是万金油,因为 ts 中经常用字符串来定义联合类型,如 'a' | 'b' 等。
|
|
342
|
-
* 2 - 每种数据类型都支持两种方式:
|
|
343
|
-
* a - 与 undefined 联合,默认值是 void 0
|
|
344
|
-
* b - 不与 undefined 联合,编译器要求必须初始化,那么不要在构造函数中初始化。因为构造函数中调用的是 set() 会导致设置 A 属性,导致 createElement() 异常。
|
|
345
|
-
* 3 - 开发组件的时候 P属性 优先使用与 undefined 的联合类型,也就不需要默认值。可以将默认值写在 get() 时,如 this.propName ?? default。
|
|
346
|
-
*/
|
|
347
|
-
/**
|
|
348
|
-
* @strAttr
|
|
349
|
-
* accessor propName: V = '';
|
|
350
|
-
* 或者
|
|
351
|
-
* @strAttr
|
|
352
|
-
* accessor propName: V | undefined;
|
|
353
|
-
*/
|
|
354
|
-
export declare function strAttr<This extends HTMLElement, V>(_: ClassAccessorDecoratorTarget<This, V>, context: ClassAccessorDecoratorContext<This, V>): {
|
|
355
|
-
get(this: This): V;
|
|
356
|
-
set(this: This, value: V): void;
|
|
357
|
-
init(this: This, value: V): V;
|
|
358
|
-
};
|
|
359
|
-
|
|
360
|
-
export declare type Style = {
|
|
361
|
-
[selector: string]: Rules | string;
|
|
362
|
-
};
|
|
363
|
-
|
|
364
|
-
declare type TextProxy<T> = {
|
|
365
|
-
[K in keyof T]: T[K] extends string ? IncludesCurlyZero<T[K]> : never;
|
|
366
|
-
};
|
|
367
|
-
|
|
368
|
-
export declare interface TransitionPopup {
|
|
369
|
-
doTransition: boolean;
|
|
370
|
-
beforeOpenTransition?: () => void;
|
|
371
|
-
afterOpenTransition?: () => void;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
export declare const utilityStyle: CSSStyleSheet;
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* 因为 tsconfig.json erasableSyntaxOnly 所以不能使用枚举。
|
|
378
|
-
* xy
|
|
379
|
-
* 00 - 左上角 = 0
|
|
380
|
-
* 01 - 左下角 = 1
|
|
381
|
-
* 10 - 右上角 = 10
|
|
382
|
-
* 11 - 右下角 = 11
|
|
383
|
-
*/
|
|
384
|
-
export declare const xy: {
|
|
385
|
-
readonly leftTop: 0;
|
|
386
|
-
readonly leftBottom: 1;
|
|
387
|
-
readonly rightTop: 10;
|
|
388
|
-
readonly rightBottom: 11;
|
|
389
|
-
};
|
|
390
|
-
|
|
391
|
-
declare const zh: {
|
|
392
|
-
readonly close: "关闭";
|
|
393
|
-
readonly true: "✔️";
|
|
394
|
-
readonly false: "❌";
|
|
395
|
-
readonly undefined: "未定义";
|
|
396
|
-
readonly default: "默认";
|
|
397
|
-
readonly valueMissing: "请填写此字段。";
|
|
398
|
-
readonly count: "计数";
|
|
399
|
-
readonly min: "最小";
|
|
400
|
-
readonly max: "最大";
|
|
401
|
-
readonly sum: "合计";
|
|
402
|
-
readonly avg: "平均";
|
|
403
|
-
readonly hide: "隐藏";
|
|
404
|
-
readonly del: "删除";
|
|
405
|
-
readonly asc: "升序";
|
|
406
|
-
readonly desc: "降序";
|
|
407
|
-
readonly ok: "确定";
|
|
408
|
-
readonly cancel: "取消";
|
|
409
|
-
readonly waiting: "正在处理中,请稍候...";
|
|
410
|
-
readonly confirming: "请确认:{0} ?";
|
|
411
|
-
readonly completed: "已完成";
|
|
412
|
-
readonly error: "错误";
|
|
413
|
-
readonly attention: "注意";
|
|
414
|
-
readonly noMenuSet: "未设置菜单!?";
|
|
415
|
-
readonly readonly: "只读";
|
|
416
|
-
};
|
|
417
|
-
|
|
418
|
-
export { }
|