bkui-vue 0.0.2-beta.9 → 0.0.2-table-refactor.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.
Files changed (249) hide show
  1. package/dist/index.cjs.js +69 -61
  2. package/dist/index.esm.js +15945 -15487
  3. package/dist/index.umd.js +69 -61
  4. package/dist/locale/en.esm.js +1 -1
  5. package/dist/locale/en.esm.js.map +1 -1
  6. package/dist/locale/en.umd.js +1 -1
  7. package/dist/locale/en.umd.js.map +1 -1
  8. package/dist/locale/zh-cn.esm.js +1 -1
  9. package/dist/locale/zh-cn.esm.js.map +1 -1
  10. package/dist/locale/zh-cn.umd.js +1 -1
  11. package/dist/locale/zh-cn.umd.js.map +1 -1
  12. package/dist/style.css +1 -1
  13. package/dist/style.variable.css +1 -1
  14. package/lib/affix/affix.d.ts +1 -1
  15. package/lib/affix/index.d.ts +4 -4
  16. package/lib/alert/alert.css +7 -0
  17. package/lib/alert/alert.d.ts +5 -5
  18. package/lib/alert/alert.less +16 -6
  19. package/lib/alert/alert.variable.css +7 -0
  20. package/lib/alert/index.d.ts +10 -10
  21. package/lib/animate-number/index.d.ts +1 -1
  22. package/lib/backtop/index.d.ts +1 -1
  23. package/lib/badge/badge.d.ts +2 -2
  24. package/lib/badge/index.d.ts +7 -7
  25. package/lib/breadcrumb/index.d.ts +2 -2
  26. package/lib/button/button.css +20 -0
  27. package/lib/button/button.less +105 -94
  28. package/lib/button/button.variable.css +20 -0
  29. package/lib/button/index.d.ts +2 -2
  30. package/lib/card/card.d.ts +1 -1
  31. package/lib/card/index.d.ts +4 -4
  32. package/lib/cascader/cascader.d.ts +1 -0
  33. package/lib/cascader/index.d.ts +5 -2
  34. package/lib/cascader/index.js +1 -1
  35. package/lib/cascader/interface.d.ts +1 -1
  36. package/lib/checkbox/checkbox-group.d.ts +6 -3
  37. package/lib/checkbox/checkbox.d.ts +4 -4
  38. package/lib/checkbox/index.d.ts +22 -19
  39. package/lib/checkbox/index.js +1 -1
  40. package/lib/code-diff/index.d.ts +1 -1
  41. package/lib/collapse/index.d.ts +2 -2
  42. package/lib/collapse-transition/index.d.ts +128 -2
  43. package/lib/collapse-transition/index.js +1 -1
  44. package/lib/color-picker/color-picker.d.ts +16 -0
  45. package/lib/color-picker/components/recommend-colors.d.ts +16 -0
  46. package/lib/color-picker/index.d.ts +19 -1
  47. package/lib/color-picker/index.js +1 -1
  48. package/lib/config-provider/config-provider.d.ts +3 -0
  49. package/lib/config-provider/index.d.ts +5 -1
  50. package/lib/config-provider/index.js +1 -1
  51. package/lib/config-provider/token.d.ts +1 -0
  52. package/lib/config-provider/use-global-config.d.ts +2 -0
  53. package/lib/config-provider/use-prefix.d.ts +2 -0
  54. package/lib/container/index.d.ts +2 -2
  55. package/lib/date-picker/date-picker.d.ts +3 -1
  56. package/lib/date-picker/index.d.ts +12 -5
  57. package/lib/date-picker/index.js +1 -1
  58. package/lib/date-picker/panel/date-range.d.ts +2 -1
  59. package/lib/dialog/dialog.css +2 -0
  60. package/lib/dialog/dialog.variable.css +2 -0
  61. package/lib/dialog/index.d.ts +1 -1
  62. package/lib/directives/index.js +1 -1
  63. package/lib/directives/tooltips.d.ts +3 -2
  64. package/lib/divider/index.d.ts +1 -1
  65. package/lib/dropdown/dropdown.css +1 -0
  66. package/lib/dropdown/dropdown.variable.css +1 -0
  67. package/lib/dropdown/index.d.ts +2 -2
  68. package/lib/exception/index.d.ts +2 -2
  69. package/lib/fixed-navbar/index.d.ts +1 -1
  70. package/lib/form/index.d.ts +3 -3
  71. package/lib/form/index.js +1 -1
  72. package/lib/hooks.d.ts +1 -1
  73. package/lib/hooks.js +1 -1
  74. package/lib/icon/assistant.d.ts +4 -0
  75. package/lib/icon/assistant.js +1 -0
  76. package/lib/icon/index.d.ts +1 -0
  77. package/lib/icon/index.js +1 -1
  78. package/lib/image/index.d.ts +1 -1
  79. package/lib/image/index.js +1 -1
  80. package/lib/info-box/index.js +1 -1
  81. package/lib/info-box/info-box.css +2 -0
  82. package/lib/info-box/info-box.less +2 -1
  83. package/lib/info-box/info-box.variable.css +2 -0
  84. package/lib/input/index.d.ts +146 -50
  85. package/lib/input/index.js +2 -1
  86. package/lib/input/index.js.LICENSE.txt +1 -0
  87. package/lib/input/input.css +34 -6
  88. package/lib/input/input.d.ts +100 -11
  89. package/lib/input/input.less +53 -14
  90. package/lib/input/input.variable.css +34 -6
  91. package/lib/input/util.d.ts +6 -0
  92. package/lib/link/index.d.ts +4 -4
  93. package/lib/link/link.d.ts +1 -1
  94. package/lib/loading/index.d.ts +2 -2
  95. package/lib/locale/index.js +1 -1
  96. package/lib/locale/lang/en.d.ts +1 -0
  97. package/lib/menu/index.d.ts +2 -2
  98. package/lib/message/index.js +1 -1
  99. package/lib/message/message.css +33 -9
  100. package/lib/message/message.less +78 -54
  101. package/lib/message/message.variable.css +33 -9
  102. package/lib/message/messageConstructor.d.ts +25 -4
  103. package/lib/modal/index.d.ts +2 -2
  104. package/lib/modal/index.js +1 -1
  105. package/lib/modal/modal.css +2 -0
  106. package/lib/modal/modal.variable.css +2 -0
  107. package/lib/navigation/index.d.ts +4 -1
  108. package/lib/navigation/index.js +1 -1
  109. package/lib/navigation/navigation.d.ts +1 -0
  110. package/lib/notify/index.js +1 -1
  111. package/lib/notify/notifyConstructor.d.ts +1 -1
  112. package/lib/overflow-title/components/overflow-title.d.ts +257 -1
  113. package/lib/overflow-title/index.d.ts +387 -2
  114. package/lib/overflow-title/index.js +1 -1
  115. package/lib/overflow-title/props.d.ts +129 -0
  116. package/lib/pagination/index.d.ts +2 -2
  117. package/lib/plugin-popover/index.js +1 -1
  118. package/lib/pop-confirm/index.d.ts +1 -1
  119. package/lib/popover/content.d.ts +33 -0
  120. package/lib/popover/index.d.ts +74 -16
  121. package/lib/popover/index.js +1 -1
  122. package/lib/popover/popover.css +1 -0
  123. package/lib/popover/popover.d.ts +40 -7
  124. package/lib/popover/popover.less +3 -2
  125. package/lib/popover/popover.variable.css +1 -0
  126. package/lib/popover/props.d.ts +25 -2
  127. package/lib/popover/use-floating.d.ts +1 -1
  128. package/lib/popover/use-popover-init.d.ts +2 -1
  129. package/lib/popover2/index.d.ts +1 -1
  130. package/lib/preset.d.ts +2 -0
  131. package/lib/process/index.d.ts +1 -1
  132. package/lib/progress/index.d.ts +1 -1
  133. package/lib/radio/index.d.ts +23 -23
  134. package/lib/radio/radio-button.d.ts +4 -4
  135. package/lib/radio/radio-group.d.ts +4 -4
  136. package/lib/radio/radio.d.ts +4 -4
  137. package/lib/rate/index.d.ts +8 -4
  138. package/lib/rate/index.js +1 -1
  139. package/lib/rate/rate.d.ts +2 -1
  140. package/lib/resize-layout/index.d.ts +4 -4
  141. package/lib/resize-layout/index.js +1 -1
  142. package/lib/resize-layout/resize-layout.css +12 -0
  143. package/lib/resize-layout/resize-layout.d.ts +1 -1
  144. package/lib/resize-layout/resize-layout.less +12 -0
  145. package/lib/resize-layout/resize-layout.variable.css +12 -0
  146. package/lib/search-select/index.d.ts +62 -29
  147. package/lib/search-select/index.js +1 -1
  148. package/lib/search-select/input.d.ts +5 -1
  149. package/lib/search-select/menu.d.ts +33 -2
  150. package/lib/search-select/search-select.css +31 -11
  151. package/lib/search-select/search-select.d.ts +23 -20
  152. package/lib/search-select/search-select.less +29 -10
  153. package/lib/search-select/search-select.variable.css +31 -11
  154. package/lib/search-select/selected.d.ts +5 -1
  155. package/lib/search-select/utils.d.ts +13 -5
  156. package/lib/select/common.d.ts +1 -0
  157. package/lib/select/index.d.ts +203 -72
  158. package/lib/select/index.js +1 -1
  159. package/lib/select/option.d.ts +11 -0
  160. package/lib/select/select.css +9 -1
  161. package/lib/select/select.d.ts +86 -31
  162. package/lib/select/select.less +11 -1
  163. package/lib/select/select.variable.css +9 -1
  164. package/lib/select/selectTagInput.d.ts +8 -5
  165. package/lib/shared/helper.d.ts +1 -1
  166. package/lib/shared/index.js +1 -1
  167. package/lib/shared/mask-manager.d.ts +3 -4
  168. package/lib/shared/pop-manager.d.ts +6 -2
  169. package/lib/shared/popover.d.ts +2 -2
  170. package/lib/shared/vue-types.d.ts +3 -2
  171. package/lib/sideslider/index.d.ts +1 -1
  172. package/lib/slider/index.d.ts +1 -1
  173. package/lib/slider/index.js +1 -1
  174. package/lib/steps/index.d.ts +1 -1
  175. package/lib/steps/index.js +1 -1
  176. package/lib/styles/mixins/clearfix.css +8 -0
  177. package/lib/styles/mixins/clearfix.less +10 -0
  178. package/lib/styles/mixins/clearfix.variable.css +8 -0
  179. package/lib/styles/mixins/mixins.css +72 -0
  180. package/lib/styles/mixins/mixins.less +5 -0
  181. package/lib/styles/mixins/mixins.variable.css +72 -0
  182. package/lib/styles/mixins/popper.less +6 -5
  183. package/lib/swiper/index.d.ts +1 -1
  184. package/lib/swiper/index.js +1 -1
  185. package/lib/swiper/swiper.css +0 -6
  186. package/lib/swiper/swiper.less +0 -8
  187. package/lib/swiper/swiper.variable.css +0 -6
  188. package/lib/switcher/index.d.ts +30 -16
  189. package/lib/switcher/index.js +1 -1
  190. package/lib/switcher/switcher.d.ts +74 -5
  191. package/lib/tab/index.d.ts +3 -3
  192. package/lib/tab/tab-nav.d.ts +12 -2
  193. package/lib/tab/tab-panel.d.ts +1 -1
  194. package/lib/table/components/table-cell.d.ts +22 -24
  195. package/lib/table/components/table-column.d.ts +123 -81
  196. package/lib/table/const.d.ts +18 -2
  197. package/lib/table/events.d.ts +26 -26
  198. package/lib/table/index.d.ts +279 -294
  199. package/lib/table/index.js +1 -1
  200. package/lib/table/plugins/head-filter.css +3 -0
  201. package/lib/table/plugins/head-filter.less +3 -0
  202. package/lib/table/plugins/head-filter.variable.css +3 -0
  203. package/lib/table/plugins/settings.d.ts +7 -17
  204. package/lib/table/plugins/use-column-resize.d.ts +30 -10
  205. package/lib/table/plugins/use-fixed-column.d.ts +6 -5
  206. package/lib/table/plugins/use-pagination.d.ts +7 -4
  207. package/lib/table/props.d.ts +117 -58
  208. package/lib/table/render.d.ts +7 -17
  209. package/lib/table/table.css +79 -10
  210. package/lib/table/table.d.ts +95 -72
  211. package/lib/table/table.less +55 -20
  212. package/lib/table/table.variable.css +79 -10
  213. package/lib/table/use-attributes.d.ts +55 -0
  214. package/lib/table/use-column.d.ts +175 -49
  215. package/lib/table/use-common.d.ts +1608 -88
  216. package/lib/table/use-render.d.ts +11 -0
  217. package/lib/table/utils.d.ts +30 -29
  218. package/lib/table-column/index.d.ts +235 -405
  219. package/lib/table-column/index.js +1 -1
  220. package/lib/tag/index.d.ts +10 -10
  221. package/lib/tag/index.js +1 -1
  222. package/lib/tag/tag.d.ts +5 -5
  223. package/lib/tag-input/index.d.ts +49 -7
  224. package/lib/tag-input/index.js +1 -1
  225. package/lib/tag-input/tag-input.css +9 -1
  226. package/lib/tag-input/tag-input.d.ts +46 -6
  227. package/lib/tag-input/tag-input.less +13 -4
  228. package/lib/tag-input/tag-input.variable.css +9 -1
  229. package/lib/tag-input/tag-props.d.ts +16 -2
  230. package/lib/time-picker/index.d.ts +1 -1
  231. package/lib/timeline/index.d.ts +1 -1
  232. package/lib/transfer/index.d.ts +1 -1
  233. package/lib/tree/constant.d.ts +2 -2
  234. package/lib/tree/index.d.ts +37 -7
  235. package/lib/tree/index.js +1 -1
  236. package/lib/tree/props.d.ts +8 -1
  237. package/lib/tree/tree.d.ts +20 -2
  238. package/lib/tree/use-node-action.d.ts +3 -2
  239. package/lib/tree/use-node-attribute.d.ts +15 -8
  240. package/lib/tree/use-tree-init.d.ts +1 -2
  241. package/lib/tree/util.d.ts +7 -2
  242. package/lib/upload/index.d.ts +1 -1
  243. package/lib/virtual-render/index.d.ts +43 -1
  244. package/lib/virtual-render/index.js +1 -1
  245. package/lib/virtual-render/props.d.ts +15 -0
  246. package/lib/virtual-render/v-virtual-render.d.ts +1 -0
  247. package/lib/virtual-render/virtual-render.d.ts +27 -2
  248. package/lib/volar.components.d.ts +24 -24
  249. package/package.json +17 -16
@@ -0,0 +1,11 @@
1
+ import { SetupContext } from 'vue';
2
+ import { TablePropTypes } from './props';
3
+ import { ITableResponse } from './use-attributes';
4
+ declare const _default: (props: TablePropTypes, context: SetupContext<any>, tableResp: ITableResponse, styleRef: any) => {
5
+ renderTableHeadSchema: () => (string | JSX.Element)[];
6
+ renderTableBodySchema: (rows: any[]) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
7
+ [key: string]: any;
8
+ }>[] | JSX.Element;
9
+ renderTableFooter: (options: any) => JSX.Element;
10
+ };
11
+ export default _default;
@@ -1,4 +1,4 @@
1
- import { Column, GroupColumn, TablePropTypes } from './props';
1
+ import { Column, GroupColumn, ISortPropShape, TablePropTypes } from './props';
2
2
  /**
3
3
  * 解析Prop值 | 可能为多种类型 & 函数返回的场景
4
4
  * @param prop 当前Prop
@@ -44,14 +44,6 @@ export declare const resolvePropBorderToClassStr: (val: string | string[]) => st
44
44
  * @returns
45
45
  */
46
46
  export declare const getColumnReactWidth: (colmun: GroupColumn, orders?: string[]) => any;
47
- /**
48
- * 根据Props Column配置计算并设置列宽度
49
- * @param root 当前根元素
50
- * @param colgroups Columns配置
51
- * @param autoWidth 自动填充宽度
52
- * @param offsetWidth 需要减掉的偏移量(滚动条|外层边框)
53
- */
54
- export declare const resolveColumnWidth: (root: HTMLElement, colgroups: GroupColumn[], autoWidth?: number, offsetWidth?: number) => void;
55
47
  /**
56
48
  * 监听目标元素的Resize事件
57
49
  * @param root 目标元素
@@ -79,21 +71,23 @@ export declare const isPercentPixOrNumber: (val: string | number) => boolean;
79
71
  export declare const resolveHeadConfig: (props: TablePropTypes) => {
80
72
  isShow: boolean;
81
73
  height: number;
82
- } & {
83
- height?: Number;
84
- isShow?: boolean;
85
- cellFn?: Function;
86
- color?: string;
87
- };
74
+ } & import("./props").Thead;
75
+ /**
76
+ * 获取当前行指定列的内容
77
+ * @param row 当前行
78
+ * @param key 指定列名
79
+ * @param column 列配置
80
+ * @param index 当前行Index
81
+ * @returns
82
+ */
83
+ export declare const getRowText: (row: any, key: string) => any;
88
84
  /**
89
- * 获取当前行指定列的内容
90
- * @param row 当前行
91
- * @param key 指定列名
92
- * @param column 列配置
93
- * @param index 当前行Index
94
- * @returns
95
- */
96
- export declare const getRowText: (row: any, key: string, column: Column) => any;
85
+ * 获取当前行指定列的值
86
+ * @param row 当前行
87
+ * @param key 指定列名
88
+ * @returns
89
+ */
90
+ export declare const getRowValue: (row: any, key: string) => any;
97
91
  /**
98
92
  * 格式化prop配置为标准数组格式
99
93
  * @param prop prop对象值
@@ -118,15 +112,22 @@ export declare const resolveCellSpan: (column: Column, colIndex: number, row: an
118
112
  rowspan: any;
119
113
  };
120
114
  export declare const skipThisColumn: (columns: Column[], colIndex: number, row: any, rowIndex: number) => boolean;
121
- export declare const getSortFn: (column: any, sortType: any) => (() => boolean) | ((_a: any, _b: any) => number);
115
+ export declare const getSortFn: (column: any, sortType: any) => ((_a: any, _b: any) => boolean) | ((_a: any, _b: any) => number);
122
116
  export declare const getNextSortType: (sortType: string) => string;
123
- export declare const resolveSort: (sort: string | boolean | any) => any;
117
+ export declare const resolveSort: (sort: ISortPropShape) => import("./props").ISortShape | {
118
+ sortFn?: Function;
119
+ sortScope?: import("./props").SortScope;
120
+ value: string;
121
+ };
124
122
  export declare const isRowSelectEnable: (props: any, { row, index, isCheckAll }: {
125
123
  row: any;
126
124
  index: any;
127
125
  isCheckAll: any;
128
126
  }) => any;
129
- export declare const getRowId: (row: any, index: any, props: any) => any;
130
- export declare const getRowSourceData: (row: any) => any;
131
- export declare const getColumnSourceData: (column: any) => any;
132
- export declare const getRowIndex: (row: any, index: any) => any;
127
+ export declare const getRowId: (row: any, defVal: any, props: any) => any;
128
+ export declare const resolveColumnSortProp: (col: Column, props: TablePropTypes) => {
129
+ type: string;
130
+ fn: Function;
131
+ scope: import("./props").SortScope;
132
+ active: boolean;
133
+ };