@yongdall/web 0.6.1 → 0.6.2
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/index.d.mts +307 -44
- package/index.mjs +51 -51
- package/index.mjs.map +1 -1
- package/package.json +11 -5
- package/plugin.d.mts +1 -1
- package/yongdall.assets.json +10 -1
package/index.d.mts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as dot_request1 from "dot-request";
|
|
2
2
|
import DotRequest, { default as DotRequest$1 } from "dot-request";
|
|
3
3
|
import { ArrayStore, BindObjectStore, ObjectStore, Schema, Schema as Schema$1, Store, Store as Store$1, StoreLayout, StoreLayout as StoreLayout$1, renderStore } from "@neeloong/form";
|
|
4
4
|
import { Hook, Indicator, Plugin, Search } from "@yongdall/common";
|
|
5
5
|
import { Field, FormLayout, MaybePromise, PageForm, Permission, Permissions } from "@yongdall/types";
|
|
6
6
|
import { Signal as Signal$1 } from "signal-polyfill";
|
|
7
|
+
import { Cell, Workbook, Worksheet } from "exceljs";
|
|
7
8
|
export * from "@yongdall/common";
|
|
8
9
|
export * from "@yongdall/types";
|
|
9
10
|
|
|
10
11
|
//#region \0rolldown/runtime.js
|
|
11
12
|
//#endregion
|
|
12
|
-
//#region packages/web/signal.d.mts
|
|
13
|
+
//#region packages/web/data/signal.d.mts
|
|
13
14
|
/**
|
|
14
15
|
* @template T
|
|
15
16
|
*/
|
|
@@ -170,15 +171,15 @@ declare namespace Print {
|
|
|
170
171
|
/**
|
|
171
172
|
* - 文本对齐
|
|
172
173
|
*/
|
|
173
|
-
textAlign?: "left" | "center" | "right" | "
|
|
174
|
+
textAlign?: "left" | "center" | "right" | "end" | "start" | "justify" | undefined;
|
|
174
175
|
/**
|
|
175
176
|
* - 垂直对齐
|
|
176
177
|
*/
|
|
177
|
-
verticalAlign?: number | "sub" | "
|
|
178
|
+
verticalAlign?: number | "sub" | "bottom" | "middle" | "top" | "baseline" | "super" | "text-top" | "text-bottom" | undefined;
|
|
178
179
|
/**
|
|
179
180
|
* - 内边距属性对象
|
|
180
181
|
*/
|
|
181
|
-
padding?: Record<"left" | "right" | "
|
|
182
|
+
padding?: Record<"left" | "right" | "bottom" | "top", string | number> | undefined;
|
|
182
183
|
border?: Print.Border | undefined;
|
|
183
184
|
};
|
|
184
185
|
type Context = string | Print.Newline | Print.Image | Print.Barcode | Print.Counter;
|
|
@@ -757,6 +758,34 @@ declare function createProgressModal<T, R>(list: T[], exec: (item: T, signal: Ab
|
|
|
757
758
|
title?: string | undefined;
|
|
758
759
|
}): Promise<PromiseSettledResult<R>[]>;
|
|
759
760
|
//#endregion
|
|
761
|
+
//#region packages/web/data/GlobalState.d.mts
|
|
762
|
+
interface GlobalState {
|
|
763
|
+
[key: string | symbol]: any;
|
|
764
|
+
}
|
|
765
|
+
declare const GlobalState: Partial<GlobalState>;
|
|
766
|
+
//#endregion
|
|
767
|
+
//#region packages/web/data/EnvState.d.mts
|
|
768
|
+
interface EnvState {
|
|
769
|
+
user: string;
|
|
770
|
+
visitor: string;
|
|
771
|
+
organization: string;
|
|
772
|
+
application: string;
|
|
773
|
+
[key: string | symbol]: any;
|
|
774
|
+
}
|
|
775
|
+
declare const EnvState: Partial<EnvState>;
|
|
776
|
+
/**
|
|
777
|
+
* 设置环境变量(唯一合法的写入方式)
|
|
778
|
+
* @param key 环境变量的键名
|
|
779
|
+
* @param state 响应式 State 对象
|
|
780
|
+
*/
|
|
781
|
+
declare function setEnvState<K extends string | symbol>(key: K, state: State<EnvState[K]>): void;
|
|
782
|
+
//#endregion
|
|
783
|
+
//#region packages/web/data/DataBus.d.mts
|
|
784
|
+
interface DataBus {
|
|
785
|
+
[key: string | symbol]: any;
|
|
786
|
+
}
|
|
787
|
+
declare const DataBus: Partial<DataBus>;
|
|
788
|
+
//#endregion
|
|
760
789
|
//#region packages/web/services/page.d.mts
|
|
761
790
|
type PageConfiguration = {
|
|
762
791
|
id?: string | undefined;
|
|
@@ -791,6 +820,7 @@ type PageConfiguration = {
|
|
|
791
820
|
field: string;
|
|
792
821
|
label?: string;
|
|
793
822
|
operator: string;
|
|
823
|
+
state?: string;
|
|
794
824
|
}[] | undefined;
|
|
795
825
|
};
|
|
796
826
|
//#endregion
|
|
@@ -1503,7 +1533,7 @@ type DataSource = {
|
|
|
1503
1533
|
total: number;
|
|
1504
1534
|
}>;
|
|
1505
1535
|
option(id: string | number): Promise<any>;
|
|
1506
|
-
create(data: Record<string, any
|
|
1536
|
+
create(data: Record<string, any>, signal?: dot_request1.default.Signal): Promise<any>;
|
|
1507
1537
|
document(id: string | number): {
|
|
1508
1538
|
then<TResult1 = Record<string, any>, TResult2 = never>(onfulfilled?: ((value: Record<string, any>) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
|
|
1509
1539
|
catch<TResult2 = never>(onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<Record<string, any> | TResult2>;
|
|
@@ -1541,26 +1571,12 @@ declare namespace DataSource {
|
|
|
1541
1571
|
}
|
|
1542
1572
|
//#endregion
|
|
1543
1573
|
//#region packages/web/request.d.mts
|
|
1544
|
-
/**
|
|
1545
|
-
* @callback ErrorAlerter
|
|
1546
|
-
* @param {*} error
|
|
1547
|
-
* @returns {PromiseLike<void> | void}
|
|
1548
|
-
*/
|
|
1549
|
-
/**
|
|
1550
|
-
* @param {*} error
|
|
1551
|
-
* @returns {PromiseLike<void> | void}
|
|
1552
|
-
*/
|
|
1553
|
-
declare function ErrorAlerter(error: any): PromiseLike<void> | void;
|
|
1554
|
-
type ErrorAlerter = (error: any) => PromiseLike<void> | void;
|
|
1555
1574
|
declare class ARequest extends DotRequest$1 {
|
|
1556
|
-
|
|
1557
|
-
*
|
|
1558
|
-
* @param {string} method
|
|
1559
|
-
* @param {string} [path]
|
|
1560
|
-
* @returns
|
|
1561
|
-
*/
|
|
1575
|
+
build(): ARequest;
|
|
1562
1576
|
method(method: string, path?: string): this;
|
|
1563
1577
|
}
|
|
1578
|
+
type ErrorAlerter = (error: any) => PromiseLike<void> | void;
|
|
1579
|
+
declare function ErrorAlerter(error: any): PromiseLike<void> | void;
|
|
1564
1580
|
declare const request: ARequest;
|
|
1565
1581
|
//#endregion
|
|
1566
1582
|
//#region packages/web/typesDefine.d.mts
|
|
@@ -1732,7 +1748,25 @@ type IconDefine = string | [path: string, viewBox?: string] | ((ctx: {
|
|
|
1732
1748
|
interface URIConverter {
|
|
1733
1749
|
(uri: string): MaybePromise<string | null>;
|
|
1734
1750
|
}
|
|
1751
|
+
interface NavButton {
|
|
1752
|
+
disabled?(ctx: NavButton.Context): boolean;
|
|
1753
|
+
hidden?(ctx: NavButton.Context): boolean;
|
|
1754
|
+
title?(ctx: NavButton.Context): string;
|
|
1755
|
+
label?(ctx: NavButton.Context): string;
|
|
1756
|
+
createIcon?(ctx: NavButton.Context): Element;
|
|
1757
|
+
createPanel?(ctx: NavButton.Context): HTMLElement;
|
|
1758
|
+
href?(ctx: NavButton.Context): string | null;
|
|
1759
|
+
click?(ctx: NavButton.Context): boolean | null | void;
|
|
1760
|
+
}
|
|
1761
|
+
declare namespace NavButton {
|
|
1762
|
+
interface Context {
|
|
1763
|
+
readonly shown: boolean;
|
|
1764
|
+
readonly signal: AbortSignal;
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1735
1767
|
interface Hooks {
|
|
1768
|
+
navButton: NavButton | string | (() => MaybePromise<NavButton | NavButton[] | null>);
|
|
1769
|
+
navButtons: NavButton | string | (() => MaybePromise<NavButton | NavButton[] | null>);
|
|
1736
1770
|
uriConverters: Record<string, URIConverter>;
|
|
1737
1771
|
/** 自动加载的样式文件 */
|
|
1738
1772
|
styles: string;
|
|
@@ -1765,6 +1799,9 @@ interface Authenticator {
|
|
|
1765
1799
|
elements: Element | Element[];
|
|
1766
1800
|
/** 添加到根节点上的类名 */
|
|
1767
1801
|
rootClassName: string;
|
|
1802
|
+
required?: boolean;
|
|
1803
|
+
header?(): MaybePromise<Record<string, string>>;
|
|
1804
|
+
runHeader?(headers: Headers): MaybePromise<void>;
|
|
1768
1805
|
login(signal: AbortSignal): PromiseLike<void> | void;
|
|
1769
1806
|
}
|
|
1770
1807
|
declare namespace Component {
|
|
@@ -1890,9 +1927,10 @@ declare function modelService(model: string): {
|
|
|
1890
1927
|
/**
|
|
1891
1928
|
*
|
|
1892
1929
|
* @param {Record<string, any>} data
|
|
1930
|
+
* @param {DotRequest.Signal} [signal]
|
|
1893
1931
|
* @returns
|
|
1894
1932
|
*/
|
|
1895
|
-
create(data: Record<string, any
|
|
1933
|
+
create(data: Record<string, any>, signal?: DotRequest$1.Signal): Promise<any>;
|
|
1896
1934
|
/**
|
|
1897
1935
|
*
|
|
1898
1936
|
* @param {string | number} id
|
|
@@ -2404,9 +2442,9 @@ type WorkspaceDefine = ContinuationDefine & {
|
|
|
2404
2442
|
*/
|
|
2405
2443
|
/**
|
|
2406
2444
|
*
|
|
2407
|
-
* @param {{get(): Search.AndList, set(v: Search.AndList): void}} andList
|
|
2445
|
+
* @param {{get(): Search.AndList, set(v: Search.AndList): void; update(v: Search.AndList | null): void}} andList
|
|
2408
2446
|
* @param {HTMLElement} root
|
|
2409
|
-
* @param {{field: string; label?: string; operator: string}[]} filters
|
|
2447
|
+
* @param {{field: string; label?: string; operator: string; state?: string; sign?: boolean}[]} filters
|
|
2410
2448
|
* @param {object} options
|
|
2411
2449
|
* @param {Record<string, FieldScriptConfiguration>} options.fields
|
|
2412
2450
|
* @param {boolean} [options.inline]
|
|
@@ -2416,10 +2454,13 @@ type WorkspaceDefine = ContinuationDefine & {
|
|
|
2416
2454
|
declare function createQuickFilters(andList: {
|
|
2417
2455
|
get(): Search.AndList;
|
|
2418
2456
|
set(v: Search.AndList): void;
|
|
2457
|
+
update(v: Search.AndList | null): void;
|
|
2419
2458
|
}, root: HTMLElement, filters: {
|
|
2420
2459
|
field: string;
|
|
2421
2460
|
label?: string;
|
|
2422
2461
|
operator: string;
|
|
2462
|
+
state?: string;
|
|
2463
|
+
sign?: boolean;
|
|
2423
2464
|
}[], {
|
|
2424
2465
|
fields,
|
|
2425
2466
|
showLabel,
|
|
@@ -2659,14 +2700,33 @@ declare function waitAbortSignal(signal: AbortSignal | null | undefined, useReje
|
|
|
2659
2700
|
* @returns {Promise<void | never>}
|
|
2660
2701
|
*/
|
|
2661
2702
|
declare function waitAbortSignal(signal?: AbortSignal | null | undefined, useReject?: boolean | null | undefined): Promise<void | never>;
|
|
2703
|
+
//#endregion
|
|
2704
|
+
//#region packages/web/utils/image2data.d.mts
|
|
2705
|
+
declare function image2data(image: HTMLOrSVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | OffscreenCanvas | VideoFrame | ImageData): Promise<ImageData | null>;
|
|
2662
2706
|
declare namespace code128_d_exports {
|
|
2663
|
-
export { encode$
|
|
2707
|
+
export { encode$2 as encode };
|
|
2664
2708
|
}
|
|
2665
2709
|
/**
|
|
2666
2710
|
*
|
|
2667
2711
|
* @param {string} text
|
|
2668
2712
|
*/
|
|
2669
|
-
declare function encode$
|
|
2713
|
+
declare function encode$2(text: string): (0 | 1)[];
|
|
2714
|
+
declare namespace Qrcode_d_exports {
|
|
2715
|
+
export { decode$1 as decode, encode$1 as encode, scan };
|
|
2716
|
+
}
|
|
2717
|
+
declare function encode$1(text: string, level?: 'L' | 'M' | 'Q' | 'H'): Promise<number[]>;
|
|
2718
|
+
declare function decode$1(image: ImageData): Promise<{
|
|
2719
|
+
text: string;
|
|
2720
|
+
} | null>;
|
|
2721
|
+
declare function scan(signal?: AbortSignal): Promise<string | undefined>;
|
|
2722
|
+
declare namespace Media_d_exports {
|
|
2723
|
+
export { createVideoDialog, createVideoStream, stop };
|
|
2724
|
+
}
|
|
2725
|
+
declare function stop(stream: MediaStream): void;
|
|
2726
|
+
declare function createVideoStream(signal?: AbortSignal): Promise<MediaStream>;
|
|
2727
|
+
declare function createVideoDialog(signal?: AbortSignal): {
|
|
2728
|
+
[Symbol.asyncIterator](): AsyncGenerator<ImageData, void, unknown>;
|
|
2729
|
+
};
|
|
2670
2730
|
//#endregion
|
|
2671
2731
|
//#region packages/web/script/index.d.mts
|
|
2672
2732
|
/**
|
|
@@ -2710,7 +2770,7 @@ declare const _default: {
|
|
|
2710
2770
|
then<TResult1 = Permission$1[], TResult2 = never>(onfulfilled?: ((value: Permission$1[]) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
|
|
2711
2771
|
catch<TResult2 = never>(onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<Permission$1[] | TResult2>;
|
|
2712
2772
|
finally(onfinally?: (() => void) | null | undefined): Promise<Permission$1[]>;
|
|
2713
|
-
load: typeof load;
|
|
2773
|
+
load: typeof load$1;
|
|
2714
2774
|
get: typeof get;
|
|
2715
2775
|
};
|
|
2716
2776
|
type Permission$1 = ({
|
|
@@ -2724,7 +2784,7 @@ type Permission$1 = ({
|
|
|
2724
2784
|
*
|
|
2725
2785
|
* @param {boolean} [force]
|
|
2726
2786
|
*/
|
|
2727
|
-
declare function load(force?: boolean): Promise<Permission$1[]>;
|
|
2787
|
+
declare function load$1(force?: boolean): Promise<Permission$1[]>;
|
|
2728
2788
|
declare function get(): Permission$1[];
|
|
2729
2789
|
//#endregion
|
|
2730
2790
|
//#region packages/web/services/application.d.mts
|
|
@@ -2845,10 +2905,10 @@ declare function toId(document: Record<string, any>, model: ModelConfiguration |
|
|
|
2845
2905
|
//#region packages/web/icons/index.d.mts
|
|
2846
2906
|
/**
|
|
2847
2907
|
*
|
|
2848
|
-
* @param {string | string[]} key
|
|
2908
|
+
* @param {string | string[] | State<string | string[]>} key
|
|
2849
2909
|
* @param {AbortSignal | boolean} [signal]
|
|
2850
2910
|
*/
|
|
2851
|
-
declare function createIcon(key: string | string[]
|
|
2911
|
+
declare function createIcon(key: string | string[] | State<string | string[]>, signal?: AbortSignal | boolean): SVGSVGElement;
|
|
2852
2912
|
//#endregion
|
|
2853
2913
|
//#region packages/web/file.d.mts
|
|
2854
2914
|
/**
|
|
@@ -2974,9 +3034,9 @@ declare function testPermissions(authorization: string, permissions: Permission[
|
|
|
2974
3034
|
*/
|
|
2975
3035
|
declare function getPermissionFields(authorization: string, permissions: Permission[], model: ModelConfiguration | ModelScriptConfiguration): Set<string>;
|
|
2976
3036
|
declare namespace zip_d_exports {
|
|
2977
|
-
export { MIME, create, parse$1 as parse };
|
|
3037
|
+
export { MIME$1 as MIME, create, parse$1 as parse };
|
|
2978
3038
|
}
|
|
2979
|
-
declare const MIME: {
|
|
3039
|
+
declare const MIME$1: {
|
|
2980
3040
|
[key: string]: readonly string[];
|
|
2981
3041
|
};
|
|
2982
3042
|
/**
|
|
@@ -2986,6 +3046,214 @@ declare const MIME: {
|
|
|
2986
3046
|
*/
|
|
2987
3047
|
declare function parse$1(file: Blob | ArrayBuffer | ArrayBufferView<ArrayBuffer>): Promise<Record<string, Blob | null>>;
|
|
2988
3048
|
declare function create(files: Record<string, string | Blob | ArrayBuffer | ArrayBufferView<ArrayBuffer> | null>, name?: string): Promise<File>;
|
|
3049
|
+
declare namespace Sheet_d_exports {
|
|
3050
|
+
export { Alignment, Border, BorderStyle, Borders, CellDefine, Fill, FillPattern, FillPatterns, Font, MIME, RichTextDefine, RowColDefine, SheetDefine, array2sheet, colLetterToIndex, errors, fill, findActiveSheet, getCellValue, load, read, readCell, setCellValue, sheet2array, table2sheet, toBlob, toError, toSheetDefine };
|
|
3051
|
+
}
|
|
3052
|
+
/**
|
|
3053
|
+
* 富文本元素描述
|
|
3054
|
+
*/
|
|
3055
|
+
interface RichTextDefine {
|
|
3056
|
+
/** 文本内容 */
|
|
3057
|
+
text: string;
|
|
3058
|
+
/** XLSX 内的富文本格式,暂不考虑渲染 */
|
|
3059
|
+
font?: Partial<Font>;
|
|
3060
|
+
}
|
|
3061
|
+
/**
|
|
3062
|
+
* 单元格对象描述
|
|
3063
|
+
*/
|
|
3064
|
+
interface CellDefine {
|
|
3065
|
+
/** 单元格内的公式,不包含最前面的等号 */
|
|
3066
|
+
formula?: string;
|
|
3067
|
+
/** 单元格内的值,除非有错误,如果有公式,则为计算后的公式 */
|
|
3068
|
+
value: null | number | string | boolean | Date | {
|
|
3069
|
+
richText: RichTextDefine[];
|
|
3070
|
+
} | Error;
|
|
3071
|
+
/** 数字格式化字符串 */
|
|
3072
|
+
numFmt?: string;
|
|
3073
|
+
/** XLSX 单元格超链接,暂不考虑渲染 */
|
|
3074
|
+
hyperlink?: string;
|
|
3075
|
+
/** XLSX 单元格样式提示信息,暂不考虑渲染 */
|
|
3076
|
+
tooltip?: string;
|
|
3077
|
+
/** XLSX 单元格字体样式,暂不考虑渲染 */
|
|
3078
|
+
font?: Partial<Font>;
|
|
3079
|
+
/** XLSX 单元格对齐方式,暂不考虑渲染 */
|
|
3080
|
+
alignment?: Partial<Alignment>;
|
|
3081
|
+
/** XLSX 单元格边框样式,暂不考虑渲染 */
|
|
3082
|
+
border?: Partial<Borders>;
|
|
3083
|
+
/** XLSX 单元格填充样式,暂不考虑渲染 */
|
|
3084
|
+
fill?: Fill;
|
|
3085
|
+
/** 是否只读 */
|
|
3086
|
+
readonly?: boolean;
|
|
3087
|
+
}
|
|
3088
|
+
type BorderStyle = 'none' | 'double' | 'thin' | 'dotted' | 'hair' | 'medium' | 'thick' | 'dashed' | 'dashDot' | 'dashDotDot' | 'slantDashDot' | 'mediumDashed' | 'mediumDashDotDot' | 'mediumDashDot';
|
|
3089
|
+
interface Border {
|
|
3090
|
+
style: BorderStyle;
|
|
3091
|
+
color: string;
|
|
3092
|
+
}
|
|
3093
|
+
interface Borders {
|
|
3094
|
+
top?: Partial<Border>;
|
|
3095
|
+
left?: Partial<Border>;
|
|
3096
|
+
bottom?: Partial<Border>;
|
|
3097
|
+
right?: Partial<Border>;
|
|
3098
|
+
}
|
|
3099
|
+
type FillPatterns = 'none' | 'solid' | 'darkVertical' | 'darkHorizontal' | 'darkGrid' | 'darkTrellis' | 'darkDown' | 'darkUp' | 'lightVertical' | 'lightHorizontal' | 'lightGrid' | 'lightTrellis' | 'lightDown' | 'lightUp' | 'darkGray' | 'mediumGray' | 'lightGray' | 'gray125' | 'gray0625';
|
|
3100
|
+
interface FillPattern {
|
|
3101
|
+
type: 'pattern';
|
|
3102
|
+
pattern: FillPatterns;
|
|
3103
|
+
fgColor?: string;
|
|
3104
|
+
bgColor?: string;
|
|
3105
|
+
}
|
|
3106
|
+
type Fill = FillPattern;
|
|
3107
|
+
/**
|
|
3108
|
+
* 定义单元格文本对齐方式的配置对象。
|
|
3109
|
+
*/
|
|
3110
|
+
interface Alignment {
|
|
3111
|
+
/** 水平对齐方式 */
|
|
3112
|
+
horizontal: 'left' | 'center' | 'right' | 'fill' | 'justify' | 'centerContinuous' | 'distributed';
|
|
3113
|
+
/** 垂直对齐方式 */
|
|
3114
|
+
vertical: 'top' | 'middle' | 'bottom' | 'distributed' | 'justify';
|
|
3115
|
+
/** 是否自动换行 */
|
|
3116
|
+
wrapText: boolean;
|
|
3117
|
+
/** 是否缩小字体以适应单元格宽度 */
|
|
3118
|
+
shrinkToFit: boolean;
|
|
3119
|
+
/** 文本缩进级别(以字符为单位) */
|
|
3120
|
+
indent: number;
|
|
3121
|
+
/** 阅读顺序(从右到左或从左到右) */
|
|
3122
|
+
readingOrder: 'rtl' | 'ltr';
|
|
3123
|
+
/** 文本旋转角度(数字,单位为度)或 'vertical' 表示垂直堆叠 */
|
|
3124
|
+
textRotation: number | 'vertical';
|
|
3125
|
+
}
|
|
3126
|
+
interface Font {
|
|
3127
|
+
/** 字体名称 */
|
|
3128
|
+
name: string;
|
|
3129
|
+
/** 字体大小(通常以磅为单位) */
|
|
3130
|
+
size: number;
|
|
3131
|
+
/** 字体族编号(如 1 表示 Roman,2 表示 Swiss 等) */
|
|
3132
|
+
family: number;
|
|
3133
|
+
/** 字体方案类型 */
|
|
3134
|
+
scheme: 'minor' | 'major' | 'none';
|
|
3135
|
+
/** 字符集编码(如 0 表示 ANSI,134 表示 GB2312 等) */
|
|
3136
|
+
charset: number;
|
|
3137
|
+
/** 字体颜色,仅包含 Color 接口的部分属性 */
|
|
3138
|
+
color: string;
|
|
3139
|
+
/** 是否为粗体 */
|
|
3140
|
+
bold: boolean;
|
|
3141
|
+
/** 是否为斜体 */
|
|
3142
|
+
italic: boolean;
|
|
3143
|
+
/** 下划线样式 */
|
|
3144
|
+
underline: boolean | 'none' | 'single' | 'double' | 'singleAccounting' | 'doubleAccounting';
|
|
3145
|
+
/** 垂直对齐方式,可为上标或下标 */
|
|
3146
|
+
vertAlign: 'superscript' | 'subscript';
|
|
3147
|
+
/** 是否添加删除线 */
|
|
3148
|
+
strike: boolean;
|
|
3149
|
+
/** 是否使用轮廓字体 */
|
|
3150
|
+
outline: boolean;
|
|
3151
|
+
}
|
|
3152
|
+
/**
|
|
3153
|
+
* 行/列对象描述
|
|
3154
|
+
*/
|
|
3155
|
+
interface RowColDefine {
|
|
3156
|
+
hidden: boolean;
|
|
3157
|
+
size: number;
|
|
3158
|
+
/** 数字格式化字符串 */
|
|
3159
|
+
numFmt?: string;
|
|
3160
|
+
/** XLSX 单元格超链接,暂不考虑渲染 */
|
|
3161
|
+
hyperlink?: string;
|
|
3162
|
+
/** XLSX 单元格样式提示信息,暂不考虑渲染 */
|
|
3163
|
+
tooltip?: string;
|
|
3164
|
+
/** XLSX 单元格字体样式,暂不考虑渲染 */
|
|
3165
|
+
font?: Partial<Font>;
|
|
3166
|
+
/** XLSX 单元格对齐方式,暂不考虑渲染 */
|
|
3167
|
+
alignment?: Partial<Alignment>;
|
|
3168
|
+
/** XLSX 单元格边框样式,暂不考虑渲染 */
|
|
3169
|
+
border?: Partial<Borders>;
|
|
3170
|
+
/** XLSX 单元格填充样式,暂不考虑渲染 */
|
|
3171
|
+
fill?: Fill;
|
|
3172
|
+
}
|
|
3173
|
+
/**
|
|
3174
|
+
* 工作表对象描述
|
|
3175
|
+
*/
|
|
3176
|
+
interface SheetDefine {
|
|
3177
|
+
rows: RowColDefine[];
|
|
3178
|
+
cols: RowColDefine[];
|
|
3179
|
+
cells: CellDefine[][];
|
|
3180
|
+
frozen: string;
|
|
3181
|
+
merges: string[];
|
|
3182
|
+
}
|
|
3183
|
+
declare const errors: {
|
|
3184
|
+
nil: Error;
|
|
3185
|
+
div0: Error;
|
|
3186
|
+
value: Error;
|
|
3187
|
+
ref: Error;
|
|
3188
|
+
name: Error;
|
|
3189
|
+
num: Error;
|
|
3190
|
+
na: Error;
|
|
3191
|
+
error: Error;
|
|
3192
|
+
};
|
|
3193
|
+
declare function toError(text: string): Error;
|
|
3194
|
+
declare const MIME: {
|
|
3195
|
+
[key: string]: readonly string[];
|
|
3196
|
+
};
|
|
3197
|
+
declare function load(xlsx: Blob): Promise<Workbook>;
|
|
3198
|
+
declare function getCellValue(cell?: Cell): any;
|
|
3199
|
+
declare function setCellValue(cell?: Cell, value?: any): void;
|
|
3200
|
+
declare function findActiveSheet(workbook?: Workbook | null): Worksheet | null;
|
|
3201
|
+
/**
|
|
3202
|
+
* 将数组数据转换为工作表内容
|
|
3203
|
+
*/
|
|
3204
|
+
declare function array2sheet(sheet: Worksheet, data: any[], columns: {
|
|
3205
|
+
name: string;
|
|
3206
|
+
label?: string | null;
|
|
3207
|
+
}[], options?: {
|
|
3208
|
+
rowOffset?: number;
|
|
3209
|
+
colOffset?: number;
|
|
3210
|
+
}): Promise<void>;
|
|
3211
|
+
/**
|
|
3212
|
+
* 将二维表格数据写入工作表
|
|
3213
|
+
*/
|
|
3214
|
+
declare function table2sheet(sheet: Worksheet, table: any[][], {
|
|
3215
|
+
rowOffset,
|
|
3216
|
+
colOffset
|
|
3217
|
+
}?: {
|
|
3218
|
+
rowOffset?: number;
|
|
3219
|
+
colOffset?: number;
|
|
3220
|
+
}): Promise<void>;
|
|
3221
|
+
/**
|
|
3222
|
+
* 将工作表内容转换为二维数组
|
|
3223
|
+
*/
|
|
3224
|
+
declare function sheet2array(sheet?: Worksheet | null): Promise<any[][] | null>;
|
|
3225
|
+
/**
|
|
3226
|
+
* 读取工作簿中指定单元格的值
|
|
3227
|
+
*/
|
|
3228
|
+
declare function readCell(workbook: Workbook, sheet: string, cell: string): any;
|
|
3229
|
+
/**
|
|
3230
|
+
* 生成器:按字段读取工作簿中的单元格
|
|
3231
|
+
*/
|
|
3232
|
+
declare function read(workbook: Workbook, fields: {
|
|
3233
|
+
cell?: string;
|
|
3234
|
+
sheet: string;
|
|
3235
|
+
[key: string]: any;
|
|
3236
|
+
}[]): Iterable<[any, any]>;
|
|
3237
|
+
/**
|
|
3238
|
+
* 批量填充工作簿中的单元格
|
|
3239
|
+
*/
|
|
3240
|
+
declare function fill(workbook: Workbook, values: {
|
|
3241
|
+
sheet: string;
|
|
3242
|
+
cell: string;
|
|
3243
|
+
value: any;
|
|
3244
|
+
}[]): void;
|
|
3245
|
+
/**
|
|
3246
|
+
* 将工作簿转换为 Blob 文件
|
|
3247
|
+
*/
|
|
3248
|
+
declare function toBlob(workbook: Workbook, name?: string): Promise<File>;
|
|
3249
|
+
/**
|
|
3250
|
+
* 将列字母转换为索引
|
|
3251
|
+
*/
|
|
3252
|
+
declare function colLetterToIndex(colLetter: string): number;
|
|
3253
|
+
/**
|
|
3254
|
+
* 将 exceljs 工作表转换为自定义的 SheetDefine 对象
|
|
3255
|
+
*/
|
|
3256
|
+
declare function toSheetDefine(sheet: Worksheet): SheetDefine;
|
|
2989
3257
|
declare namespace Ident_d_exports {
|
|
2990
3258
|
export { decode, encode, parse, stringify, stringifyPaths };
|
|
2991
3259
|
}
|
|
@@ -3051,7 +3319,7 @@ declare function buildPlugin(pluginId: string): {
|
|
|
3051
3319
|
method(method: string, path?: string): /*elided*/any;
|
|
3052
3320
|
get version(): string;
|
|
3053
3321
|
buildResult(response: Promise<Response>): Result;
|
|
3054
|
-
clone<T extends
|
|
3322
|
+
clone<T extends dot_request1.default>(target: T): T;
|
|
3055
3323
|
clone(): /*elided*/any;
|
|
3056
3324
|
get(path?: string | undefined): /*elided*/any;
|
|
3057
3325
|
get(template: TemplateStringsArray, ...substitutions: any[]): /*elided*/any;
|
|
@@ -3111,7 +3379,7 @@ declare function buildPlugin(pluginId: string): {
|
|
|
3111
3379
|
errorHandler(eh: ErrorHandler | null): /*elided*/any;
|
|
3112
3380
|
parseJSON(fn: ((value: string) => any) | null): /*elided*/any;
|
|
3113
3381
|
create(): Request;
|
|
3114
|
-
fetch(fetch: Fetch): /*elided*/any;
|
|
3382
|
+
fetch(fetch: dot_request1.default.Fetch): /*elided*/any;
|
|
3115
3383
|
fetch(): Result;
|
|
3116
3384
|
ok(error?: ErrorHandler | null | undefined): Result;
|
|
3117
3385
|
text(): Promise<string>;
|
|
@@ -3168,13 +3436,8 @@ declare let List: Components["List"];
|
|
|
3168
3436
|
declare let Pagination$1: Components["Pagination"];
|
|
3169
3437
|
//#endregion
|
|
3170
3438
|
//#region packages/web/allHooks.d.mts
|
|
3171
|
-
/** @typedef {Object.<'main' | 'details' | 'setting' | 'input' | 'edit', string | PageRenderer>} ContinuationDefine */
|
|
3172
|
-
/**
|
|
3173
|
-
*
|
|
3174
|
-
* @param {Record<string, Hook.Define<Hooks>>} hooks
|
|
3175
|
-
*/
|
|
3176
|
-
declare function updateHooks(hooks: Record<string, Hook.Define<Hooks>>): void;
|
|
3177
|
-
/** @type {Hook<Hooks>} */
|
|
3178
3439
|
declare const allHooks: Hook<Hooks>;
|
|
3440
|
+
declare function updateHooks(hooks: Record<string, Hook.Define<Hooks>>): void;
|
|
3441
|
+
declare function loadNavButtons(): AsyncIterableIterator<NavButton>;
|
|
3179
3442
|
//#endregion
|
|
3180
|
-
export { Application, ArrayStore, Authenticator, BindObjectStore, code128_d_exports as Code128, Command, Component, Components, ConfiguratorComponent, ConfiguratorContext, type ContinuationDefine, CurrentPage, type DataSource, DotRequest, ErrorAlerter, FieldComponent, FieldComponentEvent, FieldComponents, FieldContext, FieldDefine, FieldFilter, FieldFilterComponent, FieldFilterContext, FieldFilterFns, FieldFilterOptions, FieldFilterStyle, type FieldScript, type FieldScriptConfiguration, FieldShowHandle, FieldStyle, FilterFns, FormFieldHook, FromRenderer, GeneralContext, GlobalPage, Guide, type HomeContext, Hooks, IconDefine, Ident_d_exports as Ident, List, type Match, Menu, Modal, ModalFooter, ModalHeader, type ModelConfiguration, ModelIndicator, type ModelScript, type ModelScriptConfiguration, ObjectStore, Page, type PageConfiguration, type PageContext, type PageError, PageFooter, PageFrame, type PageHandle, PageHeader, PageIdent, type PageManager, type PageRenderer, PageSection, PageSectionParam, PageSider, Pagination$1 as Pagination, type Print, ResponseError, type Schema, Signal$1 as Signal, State, Store, type StoreLayout, SubmodelsLayoutEvent, Theme, URIConverter, User, UserHook, VerifyContext, VerifyError, type WorkspaceDefine, zip_d_exports as ZIP, addManager, allHooks, boot, buildDataSource, buildPlugin, createComputed, createDeeply, createDocumentInModal, createFilters, createFrame, createIcon, createModal, createModelDefault, createNeverAbortedSignal, createProgressModal, createQuickFilters, createSafeComputed, createShowField, createState, createStore, createStoreField, createTick, effect, enumerationsService, execScript, filterPermission, flatPermission, formLayoutsService, getAllFilterFns, getAuthorizations, getField, getFieldFilter, getFieldFilterOperators, getFilterFns, getPages, getPermissionFields, getPrimaryFields, hasField, hasFieldFilter, importScript, importStyle, importWidget, isMac, isPluginId, modelService, pathRoots, _default as permissionsService, plugins, _default$1 as renderForm, renderStore, _default$2 as renderStoreForm, request, require$1 as require, root$1 as root, selectFile, setIcon, showDocumentInModal, _default$3 as showFilterDialog, showSortDialog, start, testPermission, testPermissionConstraints, testPermissions, toFileLink, toFileURL, toId, toPermissionFilter, toSchema, toUrl, updateHooks, waitAbortSignal, watch };
|
|
3443
|
+
export { Application, ArrayStore, Authenticator, BindObjectStore, code128_d_exports as Code128, Command, Component, Components, ConfiguratorComponent, ConfiguratorContext, type ContinuationDefine, CurrentPage, DataBus, type DataSource, DotRequest, EnvState, ErrorAlerter, FieldComponent, FieldComponentEvent, FieldComponents, FieldContext, FieldDefine, FieldFilter, FieldFilterComponent, FieldFilterContext, FieldFilterFns, FieldFilterOptions, FieldFilterStyle, type FieldScript, type FieldScriptConfiguration, FieldShowHandle, FieldStyle, FilterFns, FormFieldHook, FromRenderer, GeneralContext, GlobalPage, GlobalState, Guide, type HomeContext, Hooks, IconDefine, Ident_d_exports as Ident, List, type Match, Media_d_exports as Media, Menu, Modal, ModalFooter, ModalHeader, type ModelConfiguration, ModelIndicator, type ModelScript, type ModelScriptConfiguration, NavButton, ObjectStore, Page, type PageConfiguration, type PageContext, type PageError, PageFooter, PageFrame, type PageHandle, PageHeader, PageIdent, type PageManager, type PageRenderer, PageSection, PageSectionParam, PageSider, Pagination$1 as Pagination, type Print, Qrcode_d_exports as Qrcode, ResponseError, type Schema, Sheet_d_exports as Sheet, Signal$1 as Signal, State, Store, type StoreLayout, SubmodelsLayoutEvent, Theme, URIConverter, User, UserHook, VerifyContext, VerifyError, type WorkspaceDefine, zip_d_exports as ZIP, addManager, allHooks, boot, buildDataSource, buildPlugin, createComputed, createDeeply, createDocumentInModal, createFilters, createFrame, createIcon, createModal, createModelDefault, createNeverAbortedSignal, createProgressModal, createQuickFilters, createSafeComputed, createShowField, createState, createStore, createStoreField, createTick, effect, enumerationsService, execScript, filterPermission, flatPermission, formLayoutsService, getAllFilterFns, getAuthorizations, getField, getFieldFilter, getFieldFilterOperators, getFilterFns, getPages, getPermissionFields, getPrimaryFields, hasField, hasFieldFilter, image2data, importScript, importStyle, importWidget, isMac, isPluginId, loadNavButtons, modelService, pathRoots, _default as permissionsService, plugins, _default$1 as renderForm, renderStore, _default$2 as renderStoreForm, request, require$1 as require, root$1 as root, selectFile, setEnvState, setIcon, showDocumentInModal, _default$3 as showFilterDialog, showSortDialog, start, testPermission, testPermissionConstraints, testPermissions, toFileLink, toFileURL, toId, toPermissionFilter, toSchema, toUrl, updateHooks, waitAbortSignal, watch };
|