@fox-js/foxui-pc 4.0.1-13 → 4.0.1-14

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.
Files changed (112) hide show
  1. package/dist/index.cjs.js +3 -3
  2. package/dist/index.d.ts +2 -2
  3. package/dist/index.esm.js +4781 -7465
  4. package/dist/index.umd.js +3 -3
  5. package/dist/style.css +1 -1
  6. package/dist/style.esm.js +1 -1
  7. package/dist/types/index.d.ts +0 -20
  8. package/package.json +1 -1
  9. package/dist/index.cjs.js.map +0 -1
  10. package/dist/index.esm.js.map +0 -1
  11. package/dist/index.umd.js.map +0 -1
  12. package/dist/types/src/api/index.d.ts +0 -35
  13. package/dist/types/src/base/component.d.ts +0 -70
  14. package/dist/types/src/base/index.d.ts +0 -4
  15. package/dist/types/src/base/plugin.d.ts +0 -2
  16. package/dist/types/src/components/autocompleteitem/common.d.ts +0 -152
  17. package/dist/types/src/components/autocompleteitem/index.vue.d.ts +0 -3
  18. package/dist/types/src/components/cascaderitem/common.d.ts +0 -223
  19. package/dist/types/src/components/cascaderitem/index.vue.d.ts +0 -3
  20. package/dist/types/src/components/cascaderitem/model.d.ts +0 -70
  21. package/dist/types/src/components/cascaderitem/types.d.ts +0 -26
  22. package/dist/types/src/components/checkboxitem/common.d.ts +0 -181
  23. package/dist/types/src/components/checkboxitem/index.vue.d.ts +0 -3
  24. package/dist/types/src/components/checkboxitem/model.d.ts +0 -63
  25. package/dist/types/src/components/checkboxitem/types.d.ts +0 -33
  26. package/dist/types/src/components/content/common.d.ts +0 -16
  27. package/dist/types/src/components/content/index.vue.d.ts +0 -3
  28. package/dist/types/src/components/dateitem/common.d.ts +0 -152
  29. package/dist/types/src/components/dateitem/index.vue.d.ts +0 -3
  30. package/dist/types/src/components/dialogitem/common.d.ts +0 -27
  31. package/dist/types/src/components/dialogitem/index.vue.d.ts +0 -3
  32. package/dist/types/src/components/exticon/index.vue.d.ts +0 -3
  33. package/dist/types/src/components/footerbar/common.d.ts +0 -26
  34. package/dist/types/src/components/footerbar/index.vue.d.ts +0 -3
  35. package/dist/types/src/components/footerbar/type.d.ts +0 -1
  36. package/dist/types/src/components/group/commons.d.ts +0 -122
  37. package/dist/types/src/components/group/group-props.d.ts +0 -97
  38. package/dist/types/src/components/group/index.vue.d.ts +0 -3
  39. package/dist/types/src/components/headerbar/common.d.ts +0 -80
  40. package/dist/types/src/components/headerbar/index.vue.d.ts +0 -3
  41. package/dist/types/src/components/headerbar/types.d.ts +0 -5
  42. package/dist/types/src/components/hinttext/index.d.ts +0 -27
  43. package/dist/types/src/components/hinttext/index.vue.d.ts +0 -3
  44. package/dist/types/src/components/indicator/common.d.ts +0 -19
  45. package/dist/types/src/components/indicator/index.vue.d.ts +0 -3
  46. package/dist/types/src/components/indicator/types.d.ts +0 -1
  47. package/dist/types/src/components/inputitem/common.d.ts +0 -176
  48. package/dist/types/src/components/inputitem/index.vue.d.ts +0 -3
  49. package/dist/types/src/components/inputnumberitem/common.d.ts +0 -176
  50. package/dist/types/src/components/inputnumberitem/index.vue.d.ts +0 -3
  51. package/dist/types/src/components/item/common.d.ts +0 -137
  52. package/dist/types/src/components/item/index.vue.d.ts +0 -3
  53. package/dist/types/src/components/mapping/common.d.ts +0 -105
  54. package/dist/types/src/components/mapping/index.vue.d.ts +0 -3
  55. package/dist/types/src/components/mapping/model.d.ts +0 -28
  56. package/dist/types/src/components/mapping/types.d.ts +0 -17
  57. package/dist/types/src/components/moneyitem/common.d.ts +0 -300
  58. package/dist/types/src/components/moneyitem/index.vue.d.ts +0 -3
  59. package/dist/types/src/components/moneyitem/util.d.ts +0 -51
  60. package/dist/types/src/components/page/common.d.ts +0 -120
  61. package/dist/types/src/components/page/index.vue.d.ts +0 -3
  62. package/dist/types/src/components/price/index.vue.d.ts +0 -3
  63. package/dist/types/src/components/price/price-props.d.ts +0 -37
  64. package/dist/types/src/components/radioitem/common.d.ts +0 -173
  65. package/dist/types/src/components/radioitem/index.vue.d.ts +0 -3
  66. package/dist/types/src/components/radioitem/model.d.ts +0 -63
  67. package/dist/types/src/components/radioitem/types.d.ts +0 -33
  68. package/dist/types/src/components/rateitem/common.d.ts +0 -136
  69. package/dist/types/src/components/rateitem/index.vue.d.ts +0 -3
  70. package/dist/types/src/components/rowitem/common.d.ts +0 -38
  71. package/dist/types/src/components/rowitem/index.vue.d.ts +0 -3
  72. package/dist/types/src/components/selectitem/common.d.ts +0 -239
  73. package/dist/types/src/components/selectitem/index.vue.d.ts +0 -3
  74. package/dist/types/src/components/selectitem/model.d.ts +0 -70
  75. package/dist/types/src/components/selectitem/types.d.ts +0 -26
  76. package/dist/types/src/components/slotitem/common.d.ts +0 -21
  77. package/dist/types/src/components/slotitem/index.vue.d.ts +0 -3
  78. package/dist/types/src/components/switchitem/common.d.ts +0 -136
  79. package/dist/types/src/components/switchitem/index.vue.d.ts +0 -3
  80. package/dist/types/src/components/tableitem/common.d.ts +0 -230
  81. package/dist/types/src/components/tableitem/index.vue.d.ts +0 -3
  82. package/dist/types/src/components/tableitem/model.d.ts +0 -27
  83. package/dist/types/src/components/tableitem/types.d.ts +0 -19
  84. package/dist/types/src/components/tablemappingcolumn/common.d.ts +0 -56
  85. package/dist/types/src/components/tablemappingcolumn/index.vue.d.ts +0 -3
  86. package/dist/types/src/components/timeitem/common.d.ts +0 -152
  87. package/dist/types/src/components/timeitem/index.vue.d.ts +0 -3
  88. package/dist/types/src/components/timeselectitem/common.d.ts +0 -152
  89. package/dist/types/src/components/timeselectitem/index.vue.d.ts +0 -3
  90. package/dist/types/src/foxui.vue.build.d.ts +0 -137
  91. package/dist/types/src/interface.d.ts +0 -83
  92. package/dist/types/src/main.d.ts +0 -81
  93. package/dist/types/src/utils/commons.d.ts +0 -220
  94. package/dist/types/src/utils/create/component.d.ts +0 -18
  95. package/dist/types/src/utils/create/index.d.ts +0 -1
  96. package/dist/types/src/utils/date.d.ts +0 -76
  97. package/dist/types/src/utils/domain/broadcast.d.ts +0 -116
  98. package/dist/types/src/utils/domain/domain.d.ts +0 -146
  99. package/dist/types/src/utils/domain/events.d.ts +0 -51
  100. package/dist/types/src/utils/domain/group.d.ts +0 -61
  101. package/dist/types/src/utils/domain/index.d.ts +0 -5
  102. package/dist/types/src/utils/domain/item.d.ts +0 -45
  103. package/dist/types/src/utils/domain/page.d.ts +0 -113
  104. package/dist/types/src/utils/domain/types.d.ts +0 -5
  105. package/dist/types/src/utils/domain/validator.d.ts +0 -230
  106. package/dist/types/src/utils/functions.d.ts +0 -20
  107. package/dist/types/src/utils/px.d.ts +0 -13
  108. package/dist/types/src/utils/unique-id.d.ts +0 -16
  109. package/dist/types/src/utils/use-expose/index.d.ts +0 -6
  110. package/dist/types/src/utils/use-position/index.d.ts +0 -14
  111. package/dist/types/src/utils/use-rect/index.d.ts +0 -20
  112. package/dist/types/src/utils/use-touch/index.d.ts +0 -21
@@ -1,116 +0,0 @@
1
- import { FoxComponentPublicInstance } from './types';
2
- export declare const BroadcastKey: unique symbol;
3
- /**
4
- * 匹配条件
5
- */
6
- export interface Matched {
7
- name?: string | RegExp | {
8
- (name: string): boolean;
9
- };
10
- maxLevel?: number;
11
- level?: number;
12
- }
13
- /**
14
- * 结果类型
15
- */
16
- export declare type Result = Promise<any> | any;
17
- /**
18
- * 结果集合
19
- */
20
- export declare type Results = Result[];
21
- /**
22
- * broadcast callback
23
- */
24
- export interface BroadcastCallback {
25
- (...args: any[]): Result;
26
- }
27
- /**
28
- * 广播类
29
- */
30
- export declare class Broadcast {
31
- /**
32
- * parent
33
- */
34
- private parent;
35
- /**
36
- * children
37
- */
38
- private children;
39
- /**
40
- * 回调函数注册表
41
- */
42
- private callbacks;
43
- /**
44
- * vue proxy
45
- */
46
- private proxy;
47
- /**
48
- * 名称
49
- */
50
- private name?;
51
- /**
52
- * 构造函数
53
- * @param parent
54
- * @param proxy
55
- * @param name
56
- */
57
- constructor(parent: Broadcast | null, proxy: FoxComponentPublicInstance, name?: string);
58
- /**
59
- * 加入孩子节点
60
- * @param child
61
- */
62
- private addChild;
63
- /**
64
- * 移除孩子节点
65
- * @param child
66
- */
67
- private removeChild;
68
- /**
69
- * 销毁
70
- */
71
- destroy(): void;
72
- /**
73
- * 发生消息
74
- * @param matched
75
- * @param action
76
- * @param args
77
- */
78
- emit(matched: Matched, action: string, ...args: any[]): Results;
79
- /**
80
- * 发生消息(只发给孩子节点)
81
- * @param matched
82
- * @param action
83
- * @param args
84
- */
85
- emitToChildren(matched: Matched, action: string, ...args: any[]): Results;
86
- /**
87
- * 注册回调函数
88
- * @param action
89
- * @param callback
90
- * @returns
91
- */
92
- on(action: string, callback: BroadcastCallback): void;
93
- }
94
- /**
95
- * 创建broadcast
96
- *
97
- * @param proxy
98
- * @param parent
99
- * @param name
100
- * @param callbacks
101
- * @returns
102
- */
103
- export declare function createBroadcast(proxy: FoxComponentPublicInstance, parent: Broadcast | null, name?: string, callbacks?: Record<string, BroadcastCallback>): Broadcast;
104
- /**
105
- * anyNode
106
- * @param name
107
- * @param callbacks
108
- * @returns
109
- */
110
- export declare function defineBroadcast(name?: string, callbacks?: Record<string, BroadcastCallback>, proxy?: FoxComponentPublicInstance): Broadcast | null;
111
- /**
112
- * 使用broadcast
113
- * @param proxy
114
- * @returns
115
- */
116
- export declare function useBroadcast(proxy?: FoxComponentPublicInstance | null): Broadcast | null;
@@ -1,146 +0,0 @@
1
- import { ComponentInternalInstance } from 'vue';
2
- import { Broadcast, BroadcastCallback } from './broadcast';
3
- import { ValidateSchema, Descriptor } from './validator';
4
- import { EventListener } from './events';
5
- /**
6
- * domain key
7
- */
8
- export declare const DomainKey: unique symbol;
9
- /**
10
- * data items key
11
- */
12
- export declare const DataItemsKey: unique symbol;
13
- /**
14
- * Domain
15
- */
16
- export declare class Domain {
17
- /**
18
- * 父亲domain
19
- */
20
- private _parent;
21
- get parent(): Domain | null;
22
- set parent(val: Domain | null);
23
- /**
24
- * 名称
25
- */
26
- private _name;
27
- get name(): string | null;
28
- /**
29
- * 广播器
30
- */
31
- private _broadcast;
32
- get broadcast(): Broadcast | null;
33
- set broadcast(val: Broadcast | null);
34
- /**
35
- * 校验器
36
- */
37
- private _validateSchema;
38
- get validateSchema(): ValidateSchema | null;
39
- set validateSchema(val: ValidateSchema | null);
40
- /**
41
- * 属性集合
42
- */
43
- private _props;
44
- /**
45
- * 构造函数
46
- * @param name
47
- */
48
- constructor(name?: string | null);
49
- /**
50
- * 销毁
51
- */
52
- destroy(): void;
53
- /**
54
- * 合并属性
55
- * @param props
56
- */
57
- merge(props: Record<string | number, any>, ignores?: any[]): void;
58
- /**
59
- * 判断是否有属性
60
- */
61
- has(key: string | number): boolean;
62
- /**
63
- * 删除属性
64
- * @param key
65
- */
66
- delete(key: string | number): void;
67
- /**
68
- * 设置属性
69
- * @param key
70
- * @param value
71
- */
72
- set(key: string | number, value: any): void;
73
- /**
74
- * 获取属性
75
- *
76
- * @param key
77
- * @param defaultValue
78
- */
79
- get(key: string | number, defaultValue?: any): any;
80
- /**
81
- * 获取属性
82
- *
83
- * @param key
84
- * @param defaultValue
85
- */
86
- getForParent(key: string | number, defaultValue?: any): any;
87
- /**
88
- * 获取self属性
89
- * @param key
90
- * @returns
91
- */
92
- getForSelf(key: string | number): any;
93
- /**
94
- * 从继承关系中获取属性集合
95
- * @param key
96
- */
97
- getAll(key: string | number): any[];
98
- }
99
- /**
100
- * 获取root domain
101
- * @returns
102
- */
103
- export declare function getRootDomain(): Domain;
104
- /**
105
- * 获取当前domain
106
- * @returns
107
- */
108
- export declare function useDomain(instance?: ComponentInternalInstance | null): Domain | null;
109
- /**
110
- * 安装domain
111
- * @param name 名称
112
- * @param props 属性
113
- * @param ignores 忽略的属性
114
- * @param exposes 暴露的方法
115
- * @returns
116
- */
117
- export declare function defineDomain(name: string | null, props: Record<string, any>, ignores?: any[], exposes?: Record<string, BroadcastCallback>): Domain;
118
- /**
119
- * domain item
120
- */
121
- export interface DomainItem {
122
- broadcast: Broadcast;
123
- validateSchema: ValidateSchema;
124
- emitEvent: {
125
- (type: string, ...args: any[]): void;
126
- };
127
- onEvent: {
128
- (type: string, listener: EventListener): void;
129
- };
130
- offEvent: {
131
- (type: string, listener: EventListener): void;
132
- };
133
- }
134
- /**
135
- * 定义domain item
136
- * @returns
137
- */
138
- export declare function defineItem(descriptor: Descriptor, name?: string, exposes?: Record<string, BroadcastCallback>): DomainItem;
139
- /**
140
- * 定义domain data item
141
- * @returns
142
- */
143
- export declare function defineDataItem(domain: Domain, name: string, descriptor: Descriptor, parentBroadcast: Broadcast, parentValidateSchema: ValidateSchema): {
144
- broadcast: Broadcast;
145
- validateSchema: ValidateSchema;
146
- };
@@ -1,51 +0,0 @@
1
- import { ComponentPublicInstance } from 'vue';
2
- /**
3
- * event emitter key
4
- */
5
- export declare const EventEmitterKey: unique symbol;
6
- /**
7
- * event listener
8
- */
9
- export interface EventListener {
10
- (...args: any[]): void;
11
- }
12
- /**
13
- * event emitter
14
- */
15
- export declare class EventEmitter {
16
- /**
17
- * 监听器
18
- */
19
- private register;
20
- /**
21
- * componenet instance
22
- */
23
- private proxy;
24
- /**
25
- * 构造函数
26
- * @param proxy
27
- */
28
- constructor(proxy: ComponentPublicInstance);
29
- /**
30
- * 销毁
31
- */
32
- destroy(): void;
33
- /**
34
- * 注销监听事件
35
- * @param type
36
- * @param listener
37
- */
38
- off(type: string, listener: EventListener): void;
39
- /**
40
- * 注册监听事件
41
- * @param type
42
- * @param listener
43
- */
44
- on(type: string, listener: EventListener): void;
45
- /**
46
- * 触发事件
47
- * @param type
48
- * @param args
49
- */
50
- emit(type: string, ...args: any[]): void;
51
- }
@@ -1,61 +0,0 @@
1
- import { Ref } from 'vue';
2
- import { Domain } from './domain';
3
- /**
4
- * 获取group scope的值
5
- * @returns
6
- */
7
- export declare function injectGroupScope(): boolean;
8
- /**
9
- * 设置group scope的值
10
- * @param flag
11
- */
12
- export declare function provideGroupScope(flag?: boolean): void;
13
- /**
14
- * Layout信息接口
15
- */
16
- export interface GroupLayout {
17
- type: string;
18
- width: number;
19
- column: number;
20
- gutter: number;
21
- }
22
- /**
23
- * 创建group state
24
- *
25
- * @param domain
26
- */
27
- export declare function createGroupState(domain: Domain, props?: Partial<GroupLayout>): {
28
- layout: Ref<GroupLayout>;
29
- passport: number;
30
- order: {
31
- index: number;
32
- };
33
- };
34
- /**
35
- * 更新group layout
36
- * @param domain
37
- * @param width
38
- * @param column
39
- * @param gutter
40
- * @param immediate
41
- */
42
- export declare function updateGroupLayout(domain: Domain, width: number | string, column?: number | string, gutter?: number | string, immediate?: boolean, minItemWidth?: number): void;
43
- /**
44
- * 获取 group layout
45
- * @param domain
46
- */
47
- export declare function getGroupLayout(domain: Domain, inGroupItem?: boolean): Ref<GroupLayout>;
48
- /**
49
- * 获取 group layout
50
- * @param domain
51
- */
52
- export declare function getGroupOrder(domain: Domain, inGroupItem?: boolean): {
53
- index: number;
54
- };
55
- /**
56
- * 获取item width
57
- * @param column
58
- * @param n
59
- * @returns
60
- */
61
- export declare function getItemPercentageWidth(column: number, n?: number | string): number;
@@ -1,5 +0,0 @@
1
- export * from './domain';
2
- export * from './page';
3
- export * from './item';
4
- export * from './broadcast';
5
- export * from './validator';
@@ -1,45 +0,0 @@
1
- import { Ref, UnwrapRef } from 'vue';
2
- /**
3
- * 优先策略
4
- */
5
- export declare enum PriorityPolicy {
6
- Parent = 0,
7
- Near = 1
8
- }
9
- /**
10
- * 是否接受value过滤器
11
- */
12
- export interface AcceptFilter {
13
- (value: any): boolean;
14
- }
15
- /**
16
- * 属性
17
- * @param source
18
- * @param name
19
- * @param policy
20
- * @param filter
21
- */
22
- export declare function property(source: Ref, name: string, policy?: PriorityPolicy, filter?: AcceptFilter): Ref;
23
- /**
24
- * 只读属性
25
- * @param source
26
- */
27
- export declare function readonlyProperty(source: Ref): Ref;
28
- /**
29
- * 禁用属性
30
- * @param source
31
- */
32
- export declare function disabledProperty(source: Ref): Ref;
33
- /**
34
- * value 格式话
35
- */
36
- export interface ValueFormat<T, K> {
37
- (value: T): K;
38
- }
39
- /**
40
- * to model value
41
- * @param props
42
- * @param format
43
- * @returns
44
- */
45
- export declare function toValue(props: UnwrapRef<Record<string, any>>, name?: string, format?: ValueFormat<any, any>): Ref;
@@ -1,113 +0,0 @@
1
- import { Domain } from './domain';
2
- import { UnwrapNestedRefs } from 'vue';
3
- /**
4
- * 安全区域
5
- */
6
- export interface SafeAreaInset {
7
- left: number | string;
8
- top: number | string;
9
- right: number | string;
10
- bottom: number | string;
11
- }
12
- /**
13
- * padding
14
- */
15
- export interface Padding {
16
- left: number | null;
17
- top: number | null;
18
- right: number | null;
19
- bottom: number | null;
20
- }
21
- /**
22
- * page layout
23
- */
24
- export interface PageLayout {
25
- width: number | string;
26
- height?: number | string;
27
- headerHeight: number | string;
28
- footerHeight: number | string;
29
- headerPadding?: Padding;
30
- footerPadding?: Padding;
31
- contentPadding?: Padding;
32
- }
33
- export interface PageState {
34
- width: number;
35
- height: number;
36
- headerHeight: number;
37
- headerPadding: Padding;
38
- footerHeight: number;
39
- footerPadding: Padding;
40
- contentHeight: number | string | null;
41
- contentPadding: Padding;
42
- safeAreaTop: number;
43
- safeAreaBottom: number;
44
- safeAreaLeft: number;
45
- safeAreaRight: number;
46
- headerMounted?: boolean;
47
- footerMounted?: boolean;
48
- }
49
- /**
50
- * 转换为number rect
51
- */
52
- export declare function toPadding(rect: any): Padding;
53
- /**
54
- * 更新 page state
55
- * @param state
56
- * @param pageLayout
57
- * @param overrideProps
58
- */
59
- export declare function updatePageState(state: PageState, pageLayout: any, overrideProps?: Record<string, unknown>, root?: boolean, rootWidth?: number, rootHeight?: number, headerBarHeight?: number, footerBarHeight?: number): void;
60
- /**
61
- * 创建page state
62
- *
63
- * @param domain
64
- * @param overrideProps
65
- */
66
- export declare function definePageState(domain: Domain, overrideProps?: Record<string, unknown>): UnwrapNestedRefs<PageState> | null;
67
- /**
68
- * 获取page state
69
- * @param domain
70
- * @returns
71
- */
72
- export declare function usePageState(domain: Domain): PageState | null;
73
- /**
74
- * 获取page header区域高度(headerHeight + SafeAreaTop )
75
- * @param domain
76
- * @param state
77
- * @returns
78
- */
79
- export declare function getPageHeaderAreaHeight(domain: Domain, state?: PageState): number;
80
- /**
81
- * 获取page footer区域高度(footerHeight + SafeAreaBottom )
82
- * @param domain
83
- * @param state
84
- * @returns
85
- */
86
- export declare function getPageFooterAreaHeight(domain: Domain, state?: PageState): number;
87
- /**
88
- * 获取page content区域高度(pageHeight - headerHeight - footerHeight - padding )
89
- * @param domain
90
- * @param state
91
- * @returns
92
- */
93
- export declare function getPageContentAreaHeight(domain: Domain, state?: PageState): number;
94
- /**
95
- * 获取page content区域宽度(pageWidth - padding )
96
- * @param domain
97
- * @param state
98
- * @returns
99
- */
100
- export declare function getPageContentAreaWidth(domain: Domain, state?: PageState): number;
101
- /**
102
- * 是否为内嵌页面
103
- * 内嵌页面为内嵌在容器内,如dialog,不需要设置content的高度
104
- * @param domain
105
- * @param proxy
106
- * @returns
107
- */
108
- export declare function isInnerPage(domain: Domain, proxy: any): boolean;
109
- /**
110
- * 是否子页面
111
- * @param domain
112
- */
113
- export declare function isSubPage(domain: Domain): boolean;
@@ -1,5 +0,0 @@
1
- export declare type FoxComponentPublicInstance = any;
2
- export declare type MatchedCondition = (string | symbol)[] | {
3
- include?: (string | symbol)[];
4
- exclude?: (string | symbol)[];
5
- };