@farris/ui-vue 1.0.0-beta.3 → 1.0.0-beta.5

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 (197) hide show
  1. package/accordion/package.json +3 -2
  2. package/avatar/package.json +3 -2
  3. package/button/package.json +3 -2
  4. package/button-edit/package.json +3 -2
  5. package/checkbox/package.json +3 -2
  6. package/combo-list/package.json +3 -2
  7. package/data-grid/index.esm.js +1 -2
  8. package/data-grid/index.umd.js +1 -1
  9. package/data-grid/package.json +3 -2
  10. package/date-picker/package.json +3 -2
  11. package/farris.all.esm.js +3 -3
  12. package/farris.all.umd.js +1 -1
  13. package/list-view/package.json +3 -2
  14. package/message-box/package.json +3 -2
  15. package/modal/package.json +3 -2
  16. package/notify/package.json +3 -2
  17. package/package.json +3 -2
  18. package/pagination/package.json +3 -2
  19. package/popover/package.json +3 -2
  20. package/radio-group/package.json +3 -2
  21. package/section/package.json +3 -2
  22. package/style.css +11 -1
  23. package/switch/package.json +3 -2
  24. package/tabs/package.json +3 -2
  25. package/text/package.json +3 -2
  26. package/tooltip/package.json +3 -2
  27. package/types/accordion/index.d.ts +25 -0
  28. package/types/accordion/src/accordion.component.d.ts +70 -0
  29. package/types/accordion/src/accordion.props.d.ts +50 -0
  30. package/types/accordion/src/components/accordion-item.component.d.ts +38 -0
  31. package/types/accordion/src/components/accordion-item.props.d.ts +34 -0
  32. package/types/avatar/index.d.ts +23 -0
  33. package/types/avatar/src/avatar.component.d.ts +109 -0
  34. package/types/avatar/src/avatar.props.d.ts +96 -0
  35. package/types/avatar/src/composition/types.d.ts +31 -0
  36. package/types/avatar/src/composition/use-image.d.ts +19 -0
  37. package/types/button/index.d.ts +24 -0
  38. package/types/button/src/button-group.component.d.ts +106 -0
  39. package/types/button/src/button-group.props.d.ts +106 -0
  40. package/types/button/src/button.component.d.ts +34 -0
  41. package/types/button/src/button.props.d.ts +47 -0
  42. package/types/button/src/composition/types-group.d.ts +24 -0
  43. package/types/button/src/composition/types.d.ts +24 -0
  44. package/types/button/src/composition/use-button-group.d.ts +19 -0
  45. package/types/button/src/composition/use-button.d.ts +19 -0
  46. package/types/button-edit/index.d.ts +23 -0
  47. package/types/button-edit/src/button-edit.props.d.ts +135 -0
  48. package/types/button-edit/src/composition/types.d.ts +118 -0
  49. package/types/button-edit/src/composition/use-button.d.ts +19 -0
  50. package/types/button-edit/src/composition/use-clear.d.ts +19 -0
  51. package/types/button-edit/src/composition/use-text-box.d.ts +19 -0
  52. package/types/checkbox/index.d.ts +23 -0
  53. package/types/checkbox/src/checkbox-group.component.d.ts +148 -0
  54. package/types/checkbox/src/checkbox-group.props.d.ts +123 -0
  55. package/types/checkbox/src/composition/types.d.ts +46 -0
  56. package/types/checkbox/src/composition/use-checkbox-group.d.ts +19 -0
  57. package/types/combo-list/index.d.ts +25 -0
  58. package/types/combo-list/src/combo-list.props.d.ts +290 -0
  59. package/types/combo-list/src/components/option.component.d.ts +39 -0
  60. package/types/combo-list/src/components/options.component.d.ts +10 -0
  61. package/types/combo-list/src/composition/index.d.ts +18 -0
  62. package/types/combo-list/src/composition/use-combo-list.d.ts +30 -0
  63. package/types/combo-list/src/composition/use-option.d.ts +19 -0
  64. package/types/combo-list/src/composition/use-options.d.ts +2 -0
  65. package/types/combo-list/src/composition/use-panel.d.ts +8 -0
  66. package/types/combo-list/src/const.d.ts +40 -0
  67. package/types/combo-list/src/types.d.ts +186 -0
  68. package/types/data-grid/index.d.ts +23 -0
  69. package/types/data-grid/src/components/data/data-area.component.d.ts +21 -0
  70. package/types/data-grid/src/components/editors/date-picker.component.d.ts +2 -0
  71. package/types/data-grid/src/components/editors/text-area-editor.component.d.ts +2 -0
  72. package/types/data-grid/src/components/editors/text-editor.component.d.ts +17 -0
  73. package/types/data-grid/src/components/header/data-grid-header.component.d.ts +22 -0
  74. package/types/data-grid/src/components/pagination/data-grid-pagination.component.d.ts +5 -0
  75. package/types/data-grid/src/components/scrollbar/horizontal-scrollbar.component.d.ts +21 -0
  76. package/types/data-grid/src/components/scrollbar/vertical-scrollbar.component.d.ts +21 -0
  77. package/types/data-grid/src/components/sidebar/data-grid-sidebar.component.d.ts +21 -0
  78. package/types/data-grid/src/components/summary/data-grid-summary.component.d.ts +5 -0
  79. package/types/data-grid/src/composition/types.d.ts +175 -0
  80. package/types/data-grid/src/composition/use-column.d.ts +17 -0
  81. package/types/data-grid/src/composition/use-data-view.d.ts +19 -0
  82. package/types/data-grid/src/composition/use-edit.d.ts +18 -0
  83. package/types/data-grid/src/composition/use-fit-column.d.ts +20 -0
  84. package/types/data-grid/src/composition/use-group-column.d.ts +22 -0
  85. package/types/data-grid/src/composition/use-group-data.d.ts +3 -0
  86. package/types/data-grid/src/composition/use-positon-style.d.ts +20 -0
  87. package/types/data-grid/src/composition/use-resize.d.ts +20 -0
  88. package/types/data-grid/src/composition/use-row.d.ts +3 -0
  89. package/types/data-grid/src/composition/use-sidebar.d.ts +3 -0
  90. package/types/data-grid/src/composition/use-virtual-scroll.d.ts +20 -0
  91. package/types/data-grid/src/composition/use-visual-data.d.ts +19 -0
  92. package/types/data-grid/src/data-grid.component.d.ts +278 -0
  93. package/types/data-grid/src/data-grid.props.d.ts +650 -0
  94. package/types/date-picker/index.d.ts +28 -0
  95. package/types/date-picker/src/components/calendar/calendar.component.d.ts +166 -0
  96. package/types/date-picker/src/components/calendar/calendar.props.d.ts +94 -0
  97. package/types/date-picker/src/components/calendar-navbar/calendar-navbar.component.d.ts +138 -0
  98. package/types/date-picker/src/components/calendar-navbar/calendar-navbar.props.d.ts +81 -0
  99. package/types/date-picker/src/components/date-picker-container/date-picker-container.component.d.ts +626 -0
  100. package/types/date-picker/src/components/date-picker-container/date-picker-container.props.d.ts +306 -0
  101. package/types/date-picker/src/components/month/month.component.d.ts +86 -0
  102. package/types/date-picker/src/components/month/month.props.d.ts +57 -0
  103. package/types/date-picker/src/components/year/year.component.d.ts +86 -0
  104. package/types/date-picker/src/components/year/year.props.d.ts +57 -0
  105. package/types/date-picker/src/composition/types.d.ts +102 -0
  106. package/types/date-picker/src/composition/use-calendar.d.ts +2 -0
  107. package/types/date-picker/src/composition/use-compare.d.ts +2 -0
  108. package/types/date-picker/src/composition/use-date.d.ts +2 -0
  109. package/types/date-picker/src/composition/use-disable-date.d.ts +18 -0
  110. package/types/date-picker/src/composition/use-disable-month.d.ts +2 -0
  111. package/types/date-picker/src/composition/use-event.d.ts +45 -0
  112. package/types/date-picker/src/composition/use-mark.d.ts +2 -0
  113. package/types/date-picker/src/composition/use-month.d.ts +2 -0
  114. package/types/date-picker/src/composition/use-number.d.ts +2 -0
  115. package/types/date-picker/src/composition/use-year.d.ts +2 -0
  116. package/types/date-picker/src/date-picker.props.d.ts +168 -0
  117. package/types/date-picker/src/types/calendar.d.ts +30 -0
  118. package/types/date-picker/src/types/common.d.ts +42 -0
  119. package/types/date-picker/src/types/date-model.d.ts +38 -0
  120. package/types/date-picker/src/types/month.d.ts +48 -0
  121. package/types/date-picker/src/types/year.d.ts +24 -0
  122. package/types/index.d.ts +20 -0
  123. package/types/list-view/index.d.ts +23 -0
  124. package/types/list-view/src/components/list-view-checkbox.component.d.ts +32 -0
  125. package/types/list-view/src/components/list-view-checkbox.props.d.ts +31 -0
  126. package/types/list-view/src/list-view.props.d.ts +44 -0
  127. package/types/message-box/index.d.ts +24 -0
  128. package/types/message-box/src/composition/types.d.ts +18 -0
  129. package/types/message-box/src/composition/use-copy.d.ts +18 -0
  130. package/types/message-box/src/message-box.component.d.ts +72 -0
  131. package/types/message-box/src/message-box.props.d.ts +52 -0
  132. package/types/modal/index.d.ts +23 -0
  133. package/types/modal/src/modal.component.d.ts +104 -0
  134. package/types/modal/src/modal.props.d.ts +72 -0
  135. package/types/notify/index.d.ts +26 -0
  136. package/types/notify/src/components/toast.component.d.ts +21 -0
  137. package/types/notify/src/components/toast.props.d.ts +27 -0
  138. package/types/notify/src/notify.props.d.ts +99 -0
  139. package/types/number-range/index.d.ts +23 -0
  140. package/types/number-range/src/composition/types.d.ts +52 -0
  141. package/types/number-range/src/composition/use-data.d.ts +19 -0
  142. package/types/number-range/src/composition/use-util.d.ts +19 -0
  143. package/types/number-range/src/number-range.component.d.ts +247 -0
  144. package/types/number-range/src/number-range.props.d.ts +216 -0
  145. package/types/number-spinner/index.d.ts +23 -0
  146. package/types/number-spinner/src/composition/types.d.ts +52 -0
  147. package/types/number-spinner/src/composition/use-data.d.ts +19 -0
  148. package/types/number-spinner/src/composition/use-util.d.ts +19 -0
  149. package/types/number-spinner/src/number-spinner.component.d.ts +202 -0
  150. package/types/number-spinner/src/number-spinner.props.d.ts +181 -0
  151. package/types/overlay/src/overlay.component.d.ts +20 -0
  152. package/types/overlay/src/overlay.props.d.ts +26 -0
  153. package/types/pagination/index.d.ts +23 -0
  154. package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +19 -0
  155. package/types/pagination/src/components/buttons/next-buttons.component.d.ts +20 -0
  156. package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +20 -0
  157. package/types/pagination/src/components/pages/page-info.component.d.ts +19 -0
  158. package/types/pagination/src/components/pages/page-list.component.d.ts +19 -0
  159. package/types/pagination/src/components/pages/page-number.component.d.ts +20 -0
  160. package/types/pagination/src/composition/types.d.ts +24 -0
  161. package/types/pagination/src/composition/use-pages.d.ts +18 -0
  162. package/types/pagination/src/pagination.components.d.ts +41 -0
  163. package/types/pagination/src/pagination.props.d.ts +36 -0
  164. package/types/popover/index.d.ts +24 -0
  165. package/types/popover/src/popover.component.d.ts +26 -0
  166. package/types/popover/src/popover.directive.d.ts +5 -0
  167. package/types/popover/src/popover.props.d.ts +30 -0
  168. package/types/radio-group/index.d.ts +23 -0
  169. package/types/radio-group/src/composition/change-radio.d.ts +19 -0
  170. package/types/radio-group/src/composition/types.d.ts +42 -0
  171. package/types/radio-group/src/radio-group.component.d.ts +91 -0
  172. package/types/radio-group/src/radio-group.props.d.ts +87 -0
  173. package/types/section/index.d.ts +23 -0
  174. package/types/section/src/section.component.d.ts +187 -0
  175. package/types/section/src/section.props.d.ts +117 -0
  176. package/types/switch/index.d.ts +23 -0
  177. package/types/switch/src/switch.component.d.ts +66 -0
  178. package/types/switch/src/switch.props.d.ts +52 -0
  179. package/types/tabs/index.d.ts +25 -0
  180. package/types/tabs/src/components/tab-page.component.d.ts +101 -0
  181. package/types/tabs/src/components/tab-page.props.d.ts +63 -0
  182. package/types/tabs/src/composition/types.d.ts +35 -0
  183. package/types/tabs/src/composition/use-tabs.d.ts +18 -0
  184. package/types/tabs/src/tabs.component.d.ts +149 -0
  185. package/types/tabs/src/tabs.props.d.ts +86 -0
  186. package/types/text/index.d.ts +23 -0
  187. package/types/text/src/text.component.d.ts +14 -0
  188. package/types/text/src/text.props.d.ts +26 -0
  189. package/types/tooltip/index.d.ts +24 -0
  190. package/types/tooltip/src/composition/types.d.ts +45 -0
  191. package/types/tooltip/src/composition/use-adjust-placement.d.ts +20 -0
  192. package/types/tooltip/src/composition/use-adjust-position.d.ts +6 -0
  193. package/types/tooltip/src/composition/use-calculate-position.d.ts +21 -0
  194. package/types/tooltip/src/composition/use-relative.d.ts +19 -0
  195. package/types/tooltip/src/composition/use-tooltip-position.d.ts +22 -0
  196. package/types/tooltip/src/tooltip.component.d.ts +56 -0
  197. package/types/tooltip/src/tooltip.props.d.ts +45 -0
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export * from './use-option';
17
+ export * from './use-combo-list';
18
+ export * from './use-panel';
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { SetupContext } from 'vue';
17
+ import { ComboListProps } from '../combo-list.props';
18
+ import { Option, UseComboListEventOptions, UseComboListEvent } from '../types';
19
+ export declare function useComboList(props: ComboListProps, context: SetupContext): {
20
+ displayText: import("vue").Ref<string | undefined>;
21
+ modelValue: import("vue").Ref<string | number | undefined>;
22
+ isPanelVisible: import("vue").Ref<boolean>;
23
+ dataSource: import("vue").Ref<any>;
24
+ onValueChange: (item: Option) => void;
25
+ };
26
+ /**
27
+ * 下拉列表事件处理钩子
28
+ * @param options 上下文
29
+ */
30
+ export declare function useComboListEvent(options: UseComboListEventOptions): UseComboListEvent;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { SetupContext } from 'vue';
17
+ import { UseOption } from '../types';
18
+ import { OptionProps } from '../combo-list.props';
19
+ export declare function useOption(props: OptionProps, context: SetupContext): UseOption;
@@ -0,0 +1,2 @@
1
+ import { UseOptions } from '../types';
2
+ export declare function useOptions(): UseOptions;
@@ -0,0 +1,8 @@
1
+ import { UsePanelEventOptions, UsePanelEvent, UsePanelOptions, UsePanel } from '../types';
2
+ export declare function usePanel(options: UsePanelOptions): UsePanel;
3
+ /**
4
+ * 下拉列表事件处理钩子
5
+ * @param options 上下文
6
+ */
7
+ export declare function usePanelEvent(options: UsePanelEventOptions): UsePanelEvent;
8
+ export declare function debounce(task: (...args: any) => any, timeout?: number): (...args: any) => void;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { InjectionKey } from 'vue';
17
+ import { ComboListContext, ComboListPanelContext } from './types';
18
+ export declare const groupIcon = "<span class=\"f-icon f-icon-arrow-60-down\"></span>";
19
+ /**
20
+ * combo list injector token
21
+ */
22
+ export declare const COMBO_LIST_TOKEN: InjectionKey<Readonly<ComboListContext>>;
23
+ /**
24
+ * combo-list panel injector token
25
+ */
26
+ export declare const COMBO_LIST_PANEL_TOKEN: InjectionKey<Readonly<ComboListPanelContext>>;
27
+ /**
28
+ * combo-list component events
29
+ */
30
+ export declare const enum EVENTS {
31
+ clear = "clear",
32
+ update = "update:modelValue"
33
+ }
34
+ /**
35
+ * panel component events
36
+ */
37
+ export declare const enum PANEL_EVENTS {
38
+ panelShow = "panelShow",
39
+ panelHidden = "panelHidden"
40
+ }
@@ -0,0 +1,186 @@
1
+ /**
2
+ * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { ComputedRef, Ref, SetupContext, Slot } from 'vue';
17
+ import { ComboListProps, PanelProps } from './combo-list.props';
18
+ export type ModelValue = number | string | undefined | Array<number | string | undefined>;
19
+ /**
20
+ * 数据展现方式
21
+ */
22
+ export declare enum ViewType {
23
+ Text = "text",
24
+ Tag = "tag"
25
+ }
26
+ /**
27
+ * 展示位置
28
+ */
29
+ export declare const enum Placement {
30
+ /**
31
+ * 在控件的上方展示
32
+ */
33
+ top = "top",
34
+ /**
35
+ * 在控件底部展示
36
+ */
37
+ bottom = "bottom",
38
+ /**
39
+ * 根据控件的位置自动确认展示位置
40
+ */
41
+ auto = "auto"
42
+ }
43
+ export interface UseOption {
44
+ name: ComputedRef<string | number | undefined>;
45
+ /**
46
+ * 下拉列表行样式
47
+ */
48
+ rowStyle: ComputedRef<any>;
49
+ onOptionClick: ($event: Event) => void;
50
+ optionClass: ComputedRef<object>;
51
+ multiSelect: ComputedRef<boolean>;
52
+ isChecked: ComputedRef<boolean>;
53
+ defaultOptionSlot: any;
54
+ }
55
+ export interface Option {
56
+ disabled: boolean;
57
+ [prop: string]: any;
58
+ }
59
+ export type Options = Array<Option>;
60
+ export interface ComboListContext {
61
+ readonly isPanelVisible: boolean;
62
+ readonly comboListProps: ComboListProps;
63
+ readonly comboListRef: Ref<any>;
64
+ readonly modelValue: string | number | undefined;
65
+ dataSource: Ref<Options>;
66
+ readonly defaultOptionSlot: Slot | undefined;
67
+ readonly [prop: string]: any;
68
+ }
69
+ export interface ComboListPanelContext {
70
+ readonly onPanelItemClick: (event: any) => void;
71
+ readonly data: Options;
72
+ }
73
+ /**
74
+ * combo-list事件钩子参数约定
75
+ */
76
+ export interface UseComboListEventOptions {
77
+ /**
78
+ * is combo-list panel visible(opend)
79
+ */
80
+ isPanelVisible: Ref<boolean | unknown>;
81
+ /**
82
+ * combo-list props
83
+ */
84
+ props: ComboListProps;
85
+ /**
86
+ * setup context
87
+ */
88
+ context: SetupContext;
89
+ /**
90
+ * modelvalue
91
+ */
92
+ modelValue: Ref<string | number | undefined>;
93
+ }
94
+ export interface UseComboListEvent {
95
+ /**
96
+ * clear event handler
97
+ */
98
+ onClear: ($event: Event) => void;
99
+ /**
100
+ * button click event handler
101
+ */
102
+ onButtonClick: ($event: any) => void;
103
+ /**
104
+ * button click event handler
105
+ */
106
+ onPanelHidden: ($event: any) => void;
107
+ /**
108
+ * text box click event handler
109
+ * @param $event
110
+ * @returns
111
+ */
112
+ onClick: ($event: any) => void;
113
+ }
114
+ export interface UsePanelOptions {
115
+ panelRef: Ref<any>;
116
+ /**
117
+ * combo-list props
118
+ */
119
+ props: PanelProps;
120
+ /**
121
+ * is combo-list panel visible(opend)
122
+ */
123
+ isPanelVisible: Ref<boolean>;
124
+ /**
125
+ * setup context
126
+ */
127
+ context: SetupContext;
128
+ }
129
+ export interface UsePanel {
130
+ /**
131
+ * panel class
132
+ */
133
+ panelClass: ComputedRef<object>;
134
+ /**
135
+ * panel styles
136
+ */
137
+ panelStyle: ComputedRef<any>;
138
+ /**
139
+ * panel card styles
140
+ */
141
+ cardStyle: ComputedRef<any>;
142
+ enableSearch: ComputedRef<boolean>;
143
+ keyword: Ref<string>;
144
+ items: Ref<any>;
145
+ }
146
+ export interface UsePanelEventOptions {
147
+ /**
148
+ * is combo-list panel visible(opend)
149
+ */
150
+ isPanelVisible: Ref<boolean>;
151
+ panelRef: Ref<any>;
152
+ /**
153
+ * setup context
154
+ */
155
+ context: SetupContext;
156
+ }
157
+ export interface UsePanelEvent {
158
+ onPanelContainerClick: ($event: any) => void;
159
+ onPanelItemClick: ($event: any) => void;
160
+ onSearchClick: ($event: any) => void;
161
+ onPanelClick: ($event: any) => void;
162
+ }
163
+ export interface UseOptions {
164
+ idField: string | undefined;
165
+ valueField: string | undefined;
166
+ textField: string | undefined;
167
+ }
168
+ /**
169
+ * position
170
+ */
171
+ export interface Position {
172
+ top: number;
173
+ left: number;
174
+ width: number;
175
+ height: number;
176
+ bottom: number;
177
+ }
178
+ /**
179
+ * remote info
180
+ */
181
+ export interface Remote {
182
+ url: string;
183
+ method?: 'GET' | 'POST' | 'PUT';
184
+ headers?: any;
185
+ body?: any;
186
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { App } from 'vue';
17
+ import FDataGrid from './src/data-grid.component';
18
+ export * from './src/data-grid.props';
19
+ export { FDataGrid };
20
+ declare const _default: {
21
+ install(app: App): void;
22
+ };
23
+ export default _default;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Ref } from 'vue';
17
+ import { UseCellPosition, UseColumn, UseEdit, UseGroupData, UseRow, UseVirtualScroll, UseVisualData, VisualData } from '../../composition/types';
18
+ import { DataGridProps } from '../../data-grid.props';
19
+ export default function (props: DataGridProps, primaryGridContentRef: Ref<any>, useCellPositionComposition: UseCellPosition, useColumnComposition: UseColumn, useEditComposition: UseEdit, useGroupDataComposition: UseGroupData, useRowComposition: UseRow, useVisualDataComposition: UseVisualData, useVirtualScrollComposition: UseVirtualScroll, visibleDatas: Ref<VisualData[]>): {
20
+ renderDataArea: () => JSX.Element[];
21
+ };
@@ -0,0 +1,2 @@
1
+ import { VisualDataCell } from '../../composition/types';
2
+ export default function (cell: VisualDataCell): JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { VisualDataCell } from '../../composition/types';
2
+ export default function (cell: VisualDataCell): JSX.Element;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { VisualDataCell } from '../../composition/types';
17
+ export default function (cell: VisualDataCell): JSX.Element;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Ref } from 'vue';
17
+ import { UseColumn, UseFitColumn, UseSidebar, UseVirtualScroll } from '../../composition/types';
18
+ import { DataGridProps } from '../../data-grid.props';
19
+ export default function (props: DataGridProps, gridContentRef: Ref<any>, useColumnComposition: UseColumn, useFitColumnComposition: UseFitColumn, useSidebarComposition: UseSidebar, useVirtualScrollComposition: UseVirtualScroll, viewPortWidth: Ref<number>): {
20
+ renderGridHeader: () => JSX.Element;
21
+ renderGridColumnResizeOverlay: () => JSX.Element;
22
+ };
@@ -0,0 +1,5 @@
1
+ import { UseDataView } from '../../composition/types';
2
+ import { DataGridProps } from '../../data-grid.props';
3
+ export default function (props: DataGridProps, dataView: UseDataView): {
4
+ renderDataGridPagination: () => JSX.Element;
5
+ };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Ref } from 'vue';
17
+ import { UseVirtualScroll } from '../../composition/types';
18
+ import { DataGridProps } from '../../data-grid.props';
19
+ export default function (props: DataGridProps, gridContentRef: Ref<any>, useVirtualScrollComposition: UseVirtualScroll): {
20
+ renderHorizontalScrollbar: () => JSX.Element;
21
+ };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Ref } from 'vue';
17
+ import { UseVirtualScroll } from '../../composition/types';
18
+ import { DataGridProps } from '../../data-grid.props';
19
+ export default function (props: DataGridProps, gridContentRef: Ref<any>, useVirtualScrollComposition: UseVirtualScroll): {
20
+ renderVerticalScrollbar: () => JSX.Element;
21
+ };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Ref } from 'vue';
17
+ import { UseRow, UseSidebar, UseVirtualScroll, VisualData } from '../../composition/types';
18
+ import { DataGridProps } from '../../data-grid.props';
19
+ export default function (props: DataGridProps, useRowComposition: UseRow, useSidebarComposition: UseSidebar, useVirtualScrollComposition: UseVirtualScroll): {
20
+ renderDataGridSidebar: (visibleDatas: Ref<VisualData[]>) => JSX.Element;
21
+ };
@@ -0,0 +1,5 @@
1
+ import { UseColumn, UseDataView } from '../../composition/types';
2
+ import { DataGridProps } from '../../data-grid.props';
3
+ export default function (props: DataGridProps, dataView: UseDataView, useColumnComposition: UseColumn): {
4
+ renderDataGridSummery: () => false | JSX.Element | undefined;
5
+ };
@@ -0,0 +1,175 @@
1
+ /**
2
+ * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { ComputedRef, Ref } from 'vue';
17
+ import { DataGridColumn } from '../data-grid.props';
18
+ import { ColumnRenderContext } from './use-column';
19
+ import { DataViewFilter } from './use-data-view';
20
+ export interface DataGridHeaderCell {
21
+ actualWidth: number;
22
+ children: DataGridHeaderCell[];
23
+ depth: number;
24
+ layer: number;
25
+ left: number;
26
+ field: string;
27
+ parent: DataGridHeaderCell | null;
28
+ resizable: boolean;
29
+ title: string;
30
+ }
31
+ export declare enum CellMode {
32
+ readonly = 0,
33
+ editable = 1,
34
+ editing = 2
35
+ }
36
+ export declare enum VisualDataType {
37
+ data = 0,
38
+ group = 1,
39
+ summary = 2
40
+ }
41
+ export interface VisualDataCell {
42
+ actualHeight?: number;
43
+ cellHeight?: number;
44
+ colSpan: number;
45
+ data: any;
46
+ getEditor: (cell: VisualDataCell) => any;
47
+ field: string;
48
+ index: number;
49
+ mode: CellMode;
50
+ ref?: any;
51
+ rowSpan: number;
52
+ setRef: (vnode: any) => void;
53
+ spannedBy?: VisualDataCell;
54
+ spanned?: VisualDataCell[];
55
+ parent: any;
56
+ update: (value: any) => void;
57
+ }
58
+ export interface VisualData {
59
+ collapse?: boolean;
60
+ data: Record<string, VisualDataCell>;
61
+ details?: VisualData[];
62
+ groupField?: string;
63
+ groupValue?: any;
64
+ layer: number;
65
+ index: number;
66
+ dataIndex: number;
67
+ top: number;
68
+ type: VisualDataType;
69
+ ref?: any;
70
+ height?: number;
71
+ pre?: any;
72
+ refreshKey?: string;
73
+ setRef: (vnode: any) => void;
74
+ }
75
+ export interface UseVisualData {
76
+ getVisualData: (start: number, end: number, pre?: VisualData, forceToRefresh?: boolean) => VisualData[];
77
+ maxVisibleRowIndex: Ref<number>;
78
+ minVisibleRowIndex: Ref<number>;
79
+ toggleGroupRow: (status: 'collapse' | 'expand', groupRow: VisualData, visibleDatas: VisualData[]) => VisualData[];
80
+ }
81
+ export interface UseCellPosition {
82
+ calculateCellPositionInRow: (columns: DataGridColumn[]) => Record<string, {
83
+ left: number;
84
+ width: number;
85
+ }>;
86
+ cellKey: (dataItem: VisualData, columnIndex: number) => string;
87
+ cellPosition: (cell: VisualDataCell, cellPositionMap: Record<string, {
88
+ left: number;
89
+ width: number;
90
+ }>) => Record<string, any>;
91
+ rowKey: (dataItem: VisualData) => string;
92
+ rowPosition: (dataItem: VisualData) => Record<string, any>;
93
+ rowSpanCellPosition: (visualDataItem: VisualData, cell: VisualDataCell, cellPositionMap: Record<string, {
94
+ left: number;
95
+ width: number;
96
+ }>) => Record<string, any>;
97
+ groupCellPosition: (groupCell: VisualDataCell, cellPositionMap: Record<string, {
98
+ left: number;
99
+ width: number;
100
+ }>, layer: number) => Record<string, any>;
101
+ summaryCellPosition: (groupCell: VisualDataCell, cellPositionMap: Record<string, {
102
+ left: number;
103
+ width: number;
104
+ }>, layer: number) => Record<string, any>;
105
+ }
106
+ export interface UseVirtualScroll {
107
+ onMouseDownScrollThumb: ($event: MouseEvent, gridContentRef: Ref<any>, thumbType: 'vertical' | 'horizontal') => void;
108
+ onWheel: (payload: WheelEvent) => void;
109
+ dataGridWidth: Ref<number>;
110
+ gridDataStyle: ComputedRef<Record<string, any>>;
111
+ gridHeaderColumnsStyle: ComputedRef<Record<string, any>>;
112
+ gridMergedDataStyle: ComputedRef<Record<string, any>>;
113
+ gridSideStyle: ComputedRef<Record<string, any>>;
114
+ viewPortHeight: Ref<number>;
115
+ viewPortWidth: Ref<number>;
116
+ horizontalScrollThumbStyle: ComputedRef<Record<string, any>>;
117
+ leftFixedGridDataStyle: ComputedRef<Record<string, any>>;
118
+ leftFixedGridHeaderColumnsStyle: ComputedRef<Record<string, any>>;
119
+ leftFixedGridMergedDataStyle: ComputedRef<Record<string, any>>;
120
+ reCalculateVisualDataRows: (forceToRefresh?: boolean) => void;
121
+ rightFixedGridDataStyle: ComputedRef<Record<string, any>>;
122
+ rightFixedGridHeaderColumnsStyle: ComputedRef<Record<string, any>>;
123
+ rightFixedGridMergedDataStyle: ComputedRef<Record<string, any>>;
124
+ verticalScrollThumbStyle: ComputedRef<Record<string, any>>;
125
+ }
126
+ export interface UseRow {
127
+ gridRowClass(dataItem: VisualData): Record<string, any>;
128
+ sidebarRowClass(dataItem: VisualData): Record<string, any>;
129
+ onClickRow: ($event: MouseEvent, dataItem: VisualData) => any;
130
+ onMouseoverRow: ($event: MouseEvent, dataItem: VisualData) => any;
131
+ }
132
+ export interface UseColumn {
133
+ columnContext: Ref<ColumnRenderContext>;
134
+ hasLeftFixedColumn: ComputedRef<boolean>;
135
+ hasRightFixedColumn: ComputedRef<boolean>;
136
+ }
137
+ export interface UseFitColumn {
138
+ calculateColumnHeaders: (context: Ref<ColumnRenderContext>) => void;
139
+ calculateColumnsSize: (context: Ref<ColumnRenderContext>, gridContentElement: any, viewPortWidth: Ref<number>) => void;
140
+ calculateColumnsWidth: (context: Ref<ColumnRenderContext>) => void;
141
+ }
142
+ export interface UseSidebar {
143
+ showRowCheckbox: Ref<boolean>;
144
+ showRowNumer: Ref<boolean>;
145
+ sidebarWidth: ComputedRef<number>;
146
+ sidebarCellPosition: (dataItem: VisualData) => Record<string, any>;
147
+ sidebarCornerCellStyle: ComputedRef<Record<string, any>>;
148
+ }
149
+ export interface UseGroupData {
150
+ collpaseGroupIconClass: (groupRow: VisualData) => Record<string, boolean>;
151
+ renderGroupedData: (groupFields: string[], rawData: any[]) => any[];
152
+ renderGroupRow: (dataItem: any, preDataItem: any, rowIndex: number, top: number, columns: DataGridColumn[]) => VisualData;
153
+ renderSummaryRow: (dataItem: any, preDataItem: any, rowIndex: number, top: number, columns: DataGridColumn[]) => VisualData;
154
+ }
155
+ export interface UseDataView {
156
+ collapse: (collapseField: string, collapseValue: any) => any[];
157
+ dataView: Ref<any[]>;
158
+ expand: (expandField: string, expandValue: any) => any[];
159
+ getRange: (filters: DataViewFilter[], start: number, end: number) => any[];
160
+ navigatePageTo: (pageIndex: number) => void;
161
+ summaries: Map<string, number>;
162
+ totalItems: ComputedRef<number>;
163
+ }
164
+ export interface UseResize {
165
+ onClickColumnResizeBar: ($event: MouseEvent, columnField: string) => any;
166
+ resizeHandleStyle: Ref<Record<string, any>>;
167
+ resizeOverlayStyle: Ref<Record<string, any>>;
168
+ }
169
+ export interface UseEdit {
170
+ getEditor: (cell: VisualDataCell, column: DataGridColumn) => any;
171
+ onClickCell: ($event: MouseEvent, cell: VisualDataCell) => any;
172
+ }
173
+ export interface UseGroupColumn {
174
+ getGridHeaderCells: (columns: DataGridColumn[]) => Map<string, DataGridHeaderCell>;
175
+ }