@fox-js/foxui-pc 3.0.14 → 4.0.1-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.
@@ -0,0 +1,1162 @@
1
+ import type { AllowedComponentProps } from 'vue';
2
+ import { App } from 'vue';
3
+ import { clone } from '@fox-js/fox';
4
+ import { compareTo } from '@fox-js/big-decimal';
5
+ import type { ComponentCustomProps } from 'vue';
6
+ import { ComponentInternalInstance } from 'vue';
7
+ import type { ComponentOptionsMixin } from 'vue';
8
+ import { ComponentPublicInstance } from 'vue';
9
+ import type { ComputedOptions } from 'vue';
10
+ import type { DefineComponent } from 'vue';
11
+ import { divide } from '@fox-js/big-decimal';
12
+ import { ExecuteValidator } from '@fox-js/validator';
13
+ import { extend } from '@fox-js/fox';
14
+ import { isArray } from '@fox-js/fox';
15
+ import { isDate } from '@fox-js/fox';
16
+ import { isEqual } from '@fox-js/fox';
17
+ import { isESModule } from '@fox-js/fox';
18
+ import { isFunction } from '@fox-js/fox';
19
+ import { isMap } from '@fox-js/fox';
20
+ import { isObject } from '@fox-js/fox';
21
+ import { isPlainObject } from '@fox-js/fox';
22
+ import { isPromise } from '@fox-js/fox';
23
+ import { isSet } from '@fox-js/fox';
24
+ import { isString } from '@fox-js/fox';
25
+ import { isSymbol } from '@fox-js/fox';
26
+ import type { MethodOptions } from 'vue';
27
+ import { multiply } from '@fox-js/big-decimal';
28
+ import { negate } from '@fox-js/big-decimal';
29
+ import { numberFormat } from '@fox-js/big-decimal';
30
+ import { Ref } from 'vue';
31
+ import { Rule } from '@fox-js/validator';
32
+ import { toBoolean } from '@fox-js/fox';
33
+ import { toNumber } from '@fox-js/fox';
34
+ import { toTypeString } from '@fox-js/fox';
35
+ import { unNumberFormat } from '@fox-js/big-decimal';
36
+ import { UnwrapNestedRefs } from 'vue';
37
+ import { UnwrapRef } from 'vue';
38
+ import { ValidateMessages } from '@fox-js/validator';
39
+ import { ValidateResult } from '@fox-js/validator';
40
+ import type { VNodeProps } from 'vue';
41
+
42
+ /**
43
+ * 是否接受value过滤器
44
+ */
45
+ export declare interface AcceptFilter {
46
+ (value: any): boolean;
47
+ }
48
+
49
+ /**
50
+ * 广播类
51
+ */
52
+ export declare class Broadcast {
53
+ /**
54
+ * parent
55
+ */
56
+ private parent;
57
+ /**
58
+ * children
59
+ */
60
+ private children;
61
+ /**
62
+ * 回调函数注册表
63
+ */
64
+ private callbacks;
65
+ /**
66
+ * vue instance
67
+ */
68
+ private instance;
69
+ /**
70
+ * 名称
71
+ */
72
+ private name?;
73
+ /**
74
+ * 构造函数
75
+ * @param parent
76
+ * @param instance
77
+ * @param name
78
+ */
79
+ constructor(parent: Broadcast | null, instance: ComponentInternalInstance, name?: string);
80
+ /**
81
+ * 加入孩子节点
82
+ * @param child
83
+ */
84
+ private addChild;
85
+ /**
86
+ * 移除孩子节点
87
+ * @param child
88
+ */
89
+ private removeChild;
90
+ /**
91
+ * 销毁
92
+ */
93
+ destroy(): void;
94
+ /**
95
+ * 发生消息
96
+ * @param matched
97
+ * @param action
98
+ * @param args
99
+ */
100
+ emit(matched: Matched, action: string, ...args: any[]): Results;
101
+ /**
102
+ * 发生消息(只发给孩子节点)
103
+ * @param matched
104
+ * @param action
105
+ * @param args
106
+ */
107
+ emitToChildren(matched: Matched, action: string, ...args: any[]): Results;
108
+ /**
109
+ * 注册回调函数
110
+ * @param action
111
+ * @param callback
112
+ * @returns
113
+ */
114
+ on(action: string, callback: BroadcastCallback): void;
115
+ }
116
+
117
+ /**
118
+ * broadcast callback
119
+ */
120
+ export declare interface BroadcastCallback {
121
+ (...args: any[]): Result;
122
+ }
123
+
124
+ export declare const BroadcastKey: unique symbol;
125
+
126
+ /**
127
+ * 清理非数字
128
+ */
129
+ export declare function clearNonNumber(value: string, allowDot?: boolean, allowMinus?: boolean): string;
130
+
131
+ export { clone }
132
+
133
+ export { compareTo }
134
+
135
+ export declare const Content: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
136
+
137
+ /**
138
+ * 创建broadcast
139
+ * @param parent
140
+ * @param name
141
+ * @param callbacks
142
+ * @returns
143
+ */
144
+ export declare function createBroadcast(instance: ComponentInternalInstance, parent: Broadcast | null, name?: string, callbacks?: Record<string, BroadcastCallback>): Broadcast;
145
+
146
+ /**
147
+ * 创建校验schema
148
+ * @param instance
149
+ * @param parent
150
+ * @param descriptor
151
+ * @returns
152
+ */
153
+ export declare function createValidateSchema(instance: ComponentInternalInstance, parent: ValidateSchema | null, descriptor: Descriptor): ValidateSchema;
154
+
155
+ export declare const DateItem: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
156
+
157
+ /**
158
+ * 防抖函数
159
+ * @param func 函数
160
+ * @param time 防止抖动毫秒数
161
+ * @returns
162
+ */
163
+ export declare function debounce(func: GenericFunction, time: number): GenericFunction;
164
+
165
+ /**
166
+ * 获取小数长度
167
+ * @param value
168
+ */
169
+ export declare function decimalLength(value: string | number): number;
170
+
171
+ declare const _default: FoxUIApp;
172
+ export default _default;
173
+
174
+ /**
175
+ * anyNode
176
+ * @param name
177
+ * @param callbacks
178
+ * @returns
179
+ */
180
+ export declare function defineBroadcast(name?: string, callbacks?: Record<string, BroadcastCallback>): Broadcast | null;
181
+
182
+ /**
183
+ * 安装domain
184
+ * @param name 名称
185
+ * @param props 属性
186
+ * @param ignores 忽略的属性
187
+ * @param exposes 暴露的方法
188
+ * @returns
189
+ */
190
+ export declare function defineDomain(name: string | null, props: Record<string, any>, ignores?: any[], exposes?: Record<string, BroadcastCallback>): Domain;
191
+
192
+ /**
193
+ * 定义domain item
194
+ * @returns
195
+ */
196
+ export declare function defineItem(descriptor: Descriptor, name?: string, exposes?: Record<string, BroadcastCallback>): DomainItem;
197
+
198
+ /**
199
+ * 创建page state
200
+ *
201
+ * @param domain
202
+ * @param overrideProps
203
+ */
204
+ export declare function definePageState(domain: Domain, overrideProps?: Record<string, unknown>): UnwrapNestedRefs<PageState> | null;
205
+
206
+ /**
207
+ * 删除公共校验器
208
+ * @param type
209
+ */
210
+ export declare function deleteGlobalValidator(type: string): void;
211
+
212
+ /**
213
+ * 组件描述
214
+ */
215
+ export declare interface Descriptor {
216
+ componentName: string;
217
+ fieldName?: string;
218
+ valueName?: string;
219
+ valueType?: ValueType;
220
+ validate?: boolean;
221
+ validateHandler?: ValidateHandler;
222
+ validateCheckEvents?: string[];
223
+ validateResetEvents?: string[];
224
+ }
225
+
226
+ export declare const DialogItem: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
227
+
228
+ /**
229
+ * 禁用属性
230
+ * @param source
231
+ */
232
+ export declare function disabledProperty(source: Ref): Ref;
233
+
234
+ export { divide }
235
+
236
+ /**
237
+ * Domain
238
+ */
239
+ export declare class Domain {
240
+ /**
241
+ * 父亲domain
242
+ */
243
+ private _parent;
244
+ get parent(): Domain | null;
245
+ set parent(val: Domain | null);
246
+ /**
247
+ * 名称
248
+ */
249
+ private _name;
250
+ get name(): string | null;
251
+ /**
252
+ * 广播器
253
+ */
254
+ private _broadcast;
255
+ get broadcast(): Broadcast | null;
256
+ set broadcast(val: Broadcast | null);
257
+ /**
258
+ * 校验器
259
+ */
260
+ private _validateSchema;
261
+ get validateSchema(): ValidateSchema | null;
262
+ set validateSchema(val: ValidateSchema | null);
263
+ /**
264
+ * 属性集合
265
+ */
266
+ private _props;
267
+ /**
268
+ * 构造函数
269
+ * @param name
270
+ */
271
+ constructor(name?: string | null);
272
+ /**
273
+ * 销毁
274
+ */
275
+ destroy(): void;
276
+ /**
277
+ * 合并属性
278
+ * @param props
279
+ */
280
+ merge(props: Record<string | number, any>, ignores?: any[]): void;
281
+ /**
282
+ * 判断是否有属性
283
+ */
284
+ has(key: string | number): boolean;
285
+ /**
286
+ * 删除属性
287
+ * @param key
288
+ */
289
+ delete(key: string | number): void;
290
+ /**
291
+ * 设置属性
292
+ * @param key
293
+ * @param value
294
+ */
295
+ set(key: string | number, value: any): void;
296
+ /**
297
+ * 获取属性
298
+ *
299
+ * @param key
300
+ * @param defaultValue
301
+ */
302
+ get(key: string | number, defaultValue?: any): any;
303
+ /**
304
+ * 获取属性
305
+ *
306
+ * @param key
307
+ * @param defaultValue
308
+ */
309
+ getForParent(key: string | number, defaultValue?: any): any;
310
+ /**
311
+ * 获取self属性
312
+ * @param key
313
+ * @returns
314
+ */
315
+ getForSelf(key: string | number): any;
316
+ /**
317
+ * 从继承关系中获取属性集合
318
+ * @param key
319
+ */
320
+ getAll(key: string | number): any[];
321
+ }
322
+
323
+ /**
324
+ * domain item
325
+ */
326
+ export declare interface DomainItem {
327
+ broadcast: Broadcast;
328
+ validateSchema: ValidateSchema;
329
+ emitEvent: {
330
+ (type: string, ...args: any[]): void;
331
+ };
332
+ onEvent: {
333
+ (type: string, listener: EventListener_2): void;
334
+ };
335
+ offEvent: {
336
+ (type: string, listener: EventListener_2): void;
337
+ };
338
+ }
339
+
340
+ /**
341
+ * domain key
342
+ */
343
+ export declare const DomainKey: unique symbol;
344
+
345
+ /**
346
+ * event listener
347
+ */
348
+ declare interface EventListener_2 {
349
+ (...args: any[]): void;
350
+ }
351
+
352
+ /**
353
+ * 根据排除模版,抽取属性
354
+ * @param src
355
+ * @param excludeTemplates
356
+ * @returns
357
+ */
358
+ export declare function excludeProps(src: Record<string, any>, ...excludeTemplates: Record<string, any>[]): Record<string, any>;
359
+
360
+ export { extend }
361
+
362
+ export declare const floatData: (format: any, dataOp: any, mapOps: any) => any;
363
+
364
+ export declare const FooterBar: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
365
+
366
+ /**
367
+ * Fox UI
368
+ */
369
+ declare interface FoxUI {
370
+ /**
371
+ * 版本号
372
+ */
373
+ version: string;
374
+ /**
375
+ * 安装
376
+ * @param app
377
+ * @param options
378
+ */
379
+ install(app: App, options: FoxUIOptions): void;
380
+ /**
381
+ * 初始化page Layout
382
+ *
383
+ * @param options
384
+ * @param rootDomain
385
+ */
386
+ initPageLayout(options: FoxUIOptions, rootDomain?: Domain): void;
387
+ /**
388
+ * 设置scope getter
389
+ * @param getter
390
+ */
391
+ setScopeGetter(getter: ScopeGetter): void;
392
+ /**
393
+ * 设置API
394
+ * @param name
395
+ * @param func
396
+ * @param scope
397
+ */
398
+ setAPI(name: string, func: any, scope?: string): void;
399
+ /**
400
+ * 获取API
401
+ * @param proxy
402
+ * @param name
403
+ * @param scope
404
+ */
405
+ getAPI(proxy: ComponentPublicInstance, name: string, scope?: string): any | null;
406
+ /**
407
+ * 批量增加api
408
+ * @param apis
409
+ * @param scope
410
+ */
411
+ batchSetAPI(apis: Record<string, any>, scope?: string): void;
412
+ /**
413
+ * 清空scope apis
414
+ * @param scope
415
+ */
416
+ clearScopeAPI(scope: string): void;
417
+ /**
418
+ * 获取root domain
419
+ */
420
+ getRootDomain(): Domain;
421
+ }
422
+
423
+ /**
424
+ * Fox UI App
425
+ */
426
+ declare class FoxUIApp implements FoxUI {
427
+ /**
428
+ * packages
429
+ */
430
+ private packages;
431
+ /**
432
+ * 安装器
433
+ */
434
+ private installers;
435
+ /**
436
+ * version
437
+ */
438
+ private _version;
439
+ get version(): string;
440
+ /**
441
+ * 构造函数
442
+ * @param packages
443
+ * @param version
444
+ */
445
+ constructor(packages: any[], installers: Installer[], version: string);
446
+ /**
447
+ * 安装
448
+ * @param app
449
+ * @param options
450
+ */
451
+ install(app: App, options?: FoxUIOptions): void;
452
+ /**
453
+ * 初始化page Layout
454
+ *
455
+ * @param options
456
+ * @param rootDomain
457
+ */
458
+ initPageLayout(options: FoxUIOptions, rootDomain?: Domain): void;
459
+ /**
460
+ * 设置scope getter
461
+ * @param getter
462
+ */
463
+ setScopeGetter(getter: ScopeGetter): void;
464
+ /**
465
+ * 设置API
466
+ * @param name
467
+ * @param api
468
+ * @param scope
469
+ */
470
+ setAPI(name: string, api: any, scope?: string): void;
471
+ /**
472
+ * 获取API
473
+ * @param proxy
474
+ * @param name
475
+ * @param scope
476
+ */
477
+ getAPI(proxy: ComponentPublicInstance, name: string, scope?: string): any | null;
478
+ /**
479
+ * 批量增加api
480
+ * @param apis
481
+ * @param scope
482
+ */
483
+ batchSetAPI(apis: Record<string, any>, scope?: string): void;
484
+ /**
485
+ * 清空scope apis
486
+ * @param scope
487
+ */
488
+ clearScopeAPI(scope: string): void;
489
+ /**
490
+ * 获取root domain
491
+ */
492
+ getRootDomain(): Domain;
493
+ }
494
+
495
+ /**
496
+ * UI Options
497
+ */
498
+ declare interface FoxUIOptions {
499
+ headerBarHeight?: number;
500
+ footerBarHeight?: number;
501
+ safeAreaInset?: SafeAreaInset;
502
+ pageLayout?: PageLayout;
503
+ headerPadding?: Rect;
504
+ contentPadding?: Rect;
505
+ groupLayout?: GroupLayout;
506
+ labelWidth?: number | string;
507
+ [propName: string]: any;
508
+ }
509
+
510
+ /**
511
+ * 通用函数接口
512
+ */
513
+ export declare interface GenericFunction {
514
+ (...args: any[]): any;
515
+ }
516
+
517
+ /**
518
+ * 获取公共校验检查事件
519
+ */
520
+ export declare function getGlobalValidateCheckEvents(): string[];
521
+
522
+ /**
523
+ * 获取公共校验重置事件
524
+ */
525
+ export declare function getGlobalValidateResetEvents(): string[];
526
+
527
+ /**
528
+ * 获取page content区域高度(pageHeight - headerHeight - footerHeight - padding )
529
+ * @param domain
530
+ * @param state
531
+ * @returns
532
+ */
533
+ export declare function getPageContentAreaHeight(domain: Domain, state?: PageState): number;
534
+
535
+ /**
536
+ * 获取page content区域宽度(pageWidth - padding )
537
+ * @param domain
538
+ * @param state
539
+ * @returns
540
+ */
541
+ export declare function getPageContentAreaWidth(domain: Domain, state?: PageState): number;
542
+
543
+ /**
544
+ * 获取page footer区域高度(footerHeight + SafeAreaBottom )
545
+ * @param domain
546
+ * @param state
547
+ * @returns
548
+ */
549
+ export declare function getPageFooterAreaHeight(domain: Domain, state?: PageState): number;
550
+
551
+ /**
552
+ * 获取page header区域高度(headerHeight + SafeAreaTop )
553
+ * @param domain
554
+ * @param state
555
+ * @returns
556
+ */
557
+ export declare function getPageHeaderAreaHeight(domain: Domain, state?: PageState): number;
558
+
559
+ /**
560
+ * 获取root domain
561
+ * @returns
562
+ */
563
+ export declare function getRootDomain(): Domain;
564
+
565
+ export declare const Group: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
566
+
567
+ /**
568
+ * Layout信息接口
569
+ */
570
+ declare interface GroupLayout {
571
+ type: string;
572
+ width: number;
573
+ column: number;
574
+ gutter: number;
575
+ }
576
+
577
+ export declare const HeaderBar: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
578
+
579
+ export declare const HintText: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
580
+
581
+ /**
582
+ * 根据包含模版,抽取属性
583
+ * @param src
584
+ * @param includeTemplates
585
+ * @returns
586
+ */
587
+ export declare function includeProps(src: Record<string, any>, ...includeTemplates: Record<string, any>[]): Record<string, any>;
588
+
589
+ /**
590
+ * 获取对应元素的在数组中第一个匹配的索引
591
+ * @param x
592
+ * @param arr
593
+ * @returns
594
+ */
595
+ export declare function indexOf(x: unknown, arr: unknown[]): number;
596
+
597
+ export declare const InputItem: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
598
+
599
+ /**
600
+ * 安装函数
601
+ */
602
+ declare interface Installer {
603
+ (app: App, options?: any): void;
604
+ }
605
+
606
+ /**
607
+ * 获取整数长度
608
+ * @param value
609
+ */
610
+ export declare function integerLength(value: string | number): number;
611
+
612
+ export { isArray }
613
+
614
+ /**
615
+ * 是否为浏览器环境
616
+ */
617
+ export declare const isBrowser: boolean;
618
+
619
+ export { isDate }
620
+
621
+ /**
622
+ * 是否空字符串
623
+ * @param v
624
+ * @returns
625
+ */
626
+ export declare const isEmptyString: (v: unknown) => boolean;
627
+
628
+ export { isEqual }
629
+
630
+ export { isESModule }
631
+
632
+ export { isFunction }
633
+
634
+ /**
635
+ * 是否为内嵌页面
636
+ * 内嵌页面为内嵌在容器内,如dialog,不需要设置content的高度
637
+ * @param domain
638
+ * @param proxy
639
+ * @returns
640
+ */
641
+ export declare function isInnerPage(domain: Domain, proxy: any): boolean;
642
+
643
+ export { isMap }
644
+
645
+ /**
646
+ * 是否为数字字符串
647
+ * @param value
648
+ * @returns
649
+ */
650
+ export declare function isNumberString(value: string): boolean;
651
+
652
+ export { isObject }
653
+
654
+ export { isPlainObject }
655
+
656
+ export { isPromise }
657
+
658
+ /**
659
+ * 判断是否为正则表达式
660
+ * @param v
661
+ * @returns
662
+ */
663
+ export declare function isRegExp(v: unknown): v is RegExp;
664
+
665
+ export { isSet }
666
+
667
+ export { isString }
668
+
669
+ /**
670
+ * 是否子页面
671
+ * @param domain
672
+ */
673
+ export declare function isSubPage(domain: Domain): boolean;
674
+
675
+ export { isSymbol }
676
+
677
+ export declare const Item: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
678
+
679
+ /**
680
+ * 获取对应元素的在数组中最后一个匹配的索引
681
+ * @param x
682
+ * @param arr
683
+ * @returns
684
+ */
685
+ export declare function lastIndexOf(x: unknown, arr: unknown[]): number;
686
+
687
+ /**
688
+ * 匹配条件
689
+ */
690
+ export declare interface Matched {
691
+ name?: string | RegExp | {
692
+ (name: string): boolean;
693
+ };
694
+ maxLevel?: number;
695
+ level?: number;
696
+ }
697
+
698
+ export { multiply }
699
+
700
+ export { negate }
701
+
702
+ export { numberFormat }
703
+
704
+ /**
705
+ * padding
706
+ */
707
+ export declare interface Padding {
708
+ left: number | null;
709
+ top: number | null;
710
+ right: number | null;
711
+ bottom: number | null;
712
+ }
713
+
714
+ export declare const Page: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
715
+
716
+ /**
717
+ * page layout
718
+ */
719
+ export declare interface PageLayout {
720
+ width: number | string;
721
+ height: number | string;
722
+ headerHeight: number | string;
723
+ footerHeight: number | string;
724
+ headerPadding?: Padding;
725
+ footerPadding?: Padding;
726
+ contentPadding?: Padding;
727
+ }
728
+
729
+ export declare interface PageState {
730
+ width: number;
731
+ height: number;
732
+ headerHeight: number;
733
+ headerPadding: Padding;
734
+ footerHeight: number;
735
+ footerPadding: Padding;
736
+ contentHeight: number | string | null;
737
+ contentPadding: Padding;
738
+ safeAreaTop: number;
739
+ safeAreaBottom: number;
740
+ safeAreaLeft: number;
741
+ safeAreaRight: number;
742
+ headerMounted?: boolean;
743
+ footerMounted?: boolean;
744
+ }
745
+
746
+ /**
747
+ * 坐标
748
+ */
749
+ export declare interface Point {
750
+ x: number;
751
+ y: number;
752
+ }
753
+
754
+ export declare const Price: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
755
+
756
+ /**
757
+ * 优先策略
758
+ */
759
+ export declare enum PriorityPolicy {
760
+ Parent = 0,
761
+ Near = 1
762
+ }
763
+
764
+ /**
765
+ * 属性
766
+ * @param source
767
+ * @param name
768
+ * @param policy
769
+ * @param filter
770
+ */
771
+ export declare function property(source: Ref, name: string, policy?: PriorityPolicy, filter?: AcceptFilter): Ref;
772
+
773
+ /**
774
+ * 动画
775
+ */
776
+ export declare const raf: any;
777
+
778
+ /**
779
+ * 只读属性
780
+ * @param source
781
+ */
782
+ export declare function readonlyProperty(source: Ref): Ref;
783
+
784
+ /**
785
+ * Rect类型
786
+ */
787
+ declare interface Rect {
788
+ left: number;
789
+ top: number;
790
+ right: number;
791
+ bottom: number;
792
+ }
793
+
794
+ declare interface Rect_2 {
795
+ top: number;
796
+ left: number;
797
+ right: number;
798
+ bottom: number;
799
+ width: number;
800
+ height: number;
801
+ }
802
+
803
+ /**
804
+ * 结果类型
805
+ */
806
+ export declare type Result = Promise<any> | any;
807
+
808
+ /**
809
+ * 结果集合
810
+ */
811
+ export declare type Results = Result[];
812
+
813
+ export declare const RowItem: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
814
+
815
+ /**
816
+ * 安全区域
817
+ */
818
+ export declare interface SafeAreaInset {
819
+ left: number | string;
820
+ top: number | string;
821
+ right: number | string;
822
+ bottom: number | string;
823
+ }
824
+
825
+ /**
826
+ * scope getter
827
+ */
828
+ declare interface ScopeGetter {
829
+ (proxy: ComponentPublicInstance): string | null;
830
+ }
831
+
832
+ export declare const SelectItem: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
833
+
834
+ /**
835
+ * 设置公共校验检查事件
836
+ * @param events
837
+ */
838
+ export declare function setGlobalValidateCheckEvents(events: string[]): void;
839
+
840
+ /**
841
+ * 设置公共的校验处理器
842
+ * @param validateHandler
843
+ */
844
+ export declare function setGlobalValidateHandler(validateHandler: ValidateHandler): void;
845
+
846
+ /**
847
+ * 设置公共校验提示信息
848
+ */
849
+ export declare function setGlobalValidateMessages(messages: ValidateMessages): void;
850
+
851
+ /**
852
+ * 设置公共校验重置事件
853
+ * @param events
854
+ */
855
+ export declare function setGlobalValidateResetEvents(events: string[]): void;
856
+
857
+ /**
858
+ * 设置公共校验器
859
+ * @param type
860
+ * @param validator
861
+ */
862
+ export declare function setGlobalValidator(type: string, validator: ExecuteValidator): void;
863
+
864
+ export declare const SlotItem: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
865
+
866
+ export declare const TableItem: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
867
+
868
+ /**
869
+ * 节流函数
870
+ * @param func 函数
871
+ * @param time 延迟执行毫秒数
872
+ * @returns
873
+ */
874
+ export declare function throttle(func: GenericFunction, time: number): GenericFunction;
875
+
876
+ export declare const TimeItem: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
877
+
878
+ export declare const TimeSelectItem: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
879
+
880
+ export { toBoolean }
881
+
882
+ export { toNumber }
883
+
884
+ /**
885
+ * 转换为number rect
886
+ */
887
+ export declare function toPadding(rect: any): Padding;
888
+
889
+ /**
890
+ * 转换为px number数值
891
+ * @param value
892
+ * @param size
893
+ */
894
+ export declare function toPx(value: number | string, size?: number): number;
895
+
896
+ /**
897
+ * to px desc
898
+ * @param value
899
+ * @returns
900
+ */
901
+ export declare const toPxDesc: (value: string | number) => string;
902
+
903
+ export { toTypeString }
904
+
905
+ /**
906
+ * to model value
907
+ * @param props
908
+ * @param format
909
+ * @returns
910
+ */
911
+ export declare function toValue(props: UnwrapRef<Record<string, any>>, name?: string, format?: ValueFormat<any, any>): Ref;
912
+
913
+ export declare class UniqueID {
914
+ /**
915
+ * seed id
916
+ */
917
+ private seed;
918
+ /**
919
+ * 种子
920
+ * @param seed
921
+ */
922
+ constructor(seed?: number);
923
+ /**
924
+ * 获取唯一ID
925
+ * @returns
926
+ */
927
+ get(): number;
928
+ }
929
+
930
+ export { unNumberFormat }
931
+
932
+ /**
933
+ * 更新 page state
934
+ * @param state
935
+ * @param pageLayout
936
+ * @param overrideProps
937
+ */
938
+ export declare function updatePageState(state: PageState, pageLayout: any, overrideProps?: Record<string, unknown>, root?: boolean, rootWidth?: number, rootHeight?: number, headerBarHeight?: number, footerBarHeight?: number): void;
939
+
940
+ /**
941
+ * 使用broadcast
942
+ * @param proxy
943
+ * @returns
944
+ */
945
+ export declare function useBroadcast(proxy?: ComponentPublicInstance | null): Broadcast | null;
946
+
947
+ /**
948
+ * 获取当前domain
949
+ * @returns
950
+ */
951
+ export declare function useDomain(instance?: ComponentInternalInstance | null): Domain | null;
952
+
953
+ /**
954
+ * use expose
955
+ * @param apis
956
+ */
957
+ export declare function useExpose(apis: Record<string, any>, instance?: ComponentInternalInstance | null): void;
958
+
959
+ /**
960
+ * 获取page state
961
+ * @param domain
962
+ * @returns
963
+ */
964
+ export declare function usePageState(domain: Domain): PageState | null;
965
+
966
+ /**
967
+ * 获取element 位置
968
+ * @param elementRef
969
+ * @returns
970
+ */
971
+ export declare const usePosition: (elementRef: (Element | Window) | Ref<Element | Window | undefined>) => Point;
972
+
973
+ export declare const useRect: (elementRef: (Element | Window) | Ref<Element | Window | undefined>) => Rect_2;
974
+
975
+ /**
976
+ * 校验器handler
977
+ */
978
+ export declare interface ValidateHandler {
979
+ /**
980
+ * 错误处理
981
+ * @param errorMsg
982
+ * @param proxy
983
+ * @param instance
984
+ */
985
+ error?(errorMsg: string, proxy: ComponentPublicInstance, instance: ComponentInternalInstance): void;
986
+ /**
987
+ * 重置处理
988
+ * @param proxy
989
+ * @param instance
990
+ */
991
+ reset?(proxy: ComponentPublicInstance, instance: ComponentInternalInstance): void;
992
+ /**
993
+ * 成功处理
994
+ * @param proxy
995
+ * @param instance
996
+ */
997
+ success?(proxy: ComponentPublicInstance, instance: ComponentInternalInstance): void;
998
+ /**
999
+ * 规则装饰处理
1000
+ * @param newRule
1001
+ * @param oldRule
1002
+ * @param proxy
1003
+ * @param instance
1004
+ */
1005
+ decorate?(newRule: Rule, oldRle: Rule, proxy: ComponentPublicInstance, instance: ComponentInternalInstance): void;
1006
+ /**
1007
+ * 获取value
1008
+ * @param proxy
1009
+ * @param instance
1010
+ */
1011
+ getValue?(proxy: ComponentPublicInstance, instance: ComponentInternalInstance): any;
1012
+ }
1013
+
1014
+ /**
1015
+ * 校验器schema
1016
+ */
1017
+ export declare class ValidateSchema {
1018
+ /**
1019
+ * parent
1020
+ */
1021
+ private parent;
1022
+ /**
1023
+ * 校验器
1024
+ */
1025
+ private validators;
1026
+ /**
1027
+ * 属性rule
1028
+ */
1029
+ private attrRules;
1030
+ /**
1031
+ * rule
1032
+ */
1033
+ private rules;
1034
+ /**
1035
+ * 描述
1036
+ */
1037
+ private descriptor;
1038
+ /**
1039
+ * 实例
1040
+ */
1041
+ private instance;
1042
+ /**
1043
+ * effect scope
1044
+ */
1045
+ private scope;
1046
+ /**
1047
+ * 构造函数
1048
+ * @param parent
1049
+ * @param descriptor
1050
+ * @param instance
1051
+ */
1052
+ constructor(parent: ValidateSchema | null, descriptor: Descriptor, instance: ComponentInternalInstance);
1053
+ /**
1054
+ * 初始化
1055
+ */
1056
+ private init;
1057
+ /**
1058
+ * 销毁
1059
+ */
1060
+ destroy(): void;
1061
+ /**
1062
+ * 执行validate handler函数
1063
+ * @param name
1064
+ * @param args
1065
+ */
1066
+ private execHandler;
1067
+ /**
1068
+ * 调用装饰处理函数
1069
+ */
1070
+ private decorate;
1071
+ /**
1072
+ * 调用成功处理函数
1073
+ */
1074
+ private success;
1075
+ /**
1076
+ * 调用错误处理函数
1077
+ * @returns
1078
+ */
1079
+ private error;
1080
+ /**
1081
+ * 调用错误处理函数
1082
+ * @returns
1083
+ */
1084
+ private getValue;
1085
+ /**
1086
+ * 设置校验器
1087
+ * @param type
1088
+ * @param validator
1089
+ * @param global
1090
+ *
1091
+ * @returns
1092
+ */
1093
+ setValidator(type: string, validator: ExecuteValidator, global?: boolean): void;
1094
+ /**
1095
+ * 获取validator(只获取私有的validator)
1096
+ * @param type
1097
+ */
1098
+ getValidator(type: string): ExecuteValidator | null;
1099
+ /**
1100
+ * 删除校验器
1101
+ * @param type
1102
+ * @param global
1103
+ */
1104
+ deleteValidator(type: string, global?: boolean): void;
1105
+ /**
1106
+ * 判断校验器是否存在
1107
+ * @param type
1108
+ * @param global
1109
+ * @returns
1110
+ */
1111
+ hasValidator(type: string, global?: boolean): boolean;
1112
+ /**
1113
+ * 设置rule
1114
+ * @param rule
1115
+ */
1116
+ setRule(rule: Rule | null): void;
1117
+ /**
1118
+ * 清空校验错误信息
1119
+ * @params deep
1120
+ * @returns
1121
+ */
1122
+ clear(): void;
1123
+ /**
1124
+ * 执行校验
1125
+ * @returns
1126
+ */
1127
+ validate(): Promise<ValidateResult>;
1128
+ }
1129
+
1130
+ /**
1131
+ * validate schema key
1132
+ */
1133
+ export declare const ValidateSchemaKey: unique symbol;
1134
+
1135
+ /**
1136
+ * 校验条件
1137
+ */
1138
+ export declare interface ValidateTerm {
1139
+ exclude?: string[];
1140
+ include?: string[];
1141
+ }
1142
+
1143
+ /**
1144
+ * value 格式话
1145
+ */
1146
+ export declare interface ValueFormat<T, K> {
1147
+ (value: T): K;
1148
+ }
1149
+
1150
+ /**
1151
+ * 获取value长度
1152
+ * @param val
1153
+ * @returns
1154
+ */
1155
+ export declare function valueLength(val: unknown): number;
1156
+
1157
+ /**
1158
+ * value 类型
1159
+ */
1160
+ export declare type ValueType = 'string' | 'number' | 'date';
1161
+
1162
+ export { }