stk-table-vue 0.6.17 → 0.7.1

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 (40) hide show
  1. package/README.md +211 -213
  2. package/lib/src/StkTable/StkTable.vue.d.ts +43 -24
  3. package/lib/src/StkTable/components/TriangleIcon.vue.d.ts +2 -0
  4. package/lib/src/StkTable/const.d.ts +0 -1
  5. package/lib/src/StkTable/types/highlightDimOptions.d.ts +1 -5
  6. package/lib/src/StkTable/types/index.d.ts +27 -7
  7. package/lib/src/StkTable/useHighlight.d.ts +1 -1
  8. package/lib/src/StkTable/useRowExpand.d.ts +17 -0
  9. package/lib/src/StkTable/useTree.d.ts +20 -0
  10. package/lib/src/StkTable/utils/index.d.ts +3 -1
  11. package/lib/stk-table-vue.js +320 -167
  12. package/lib/style.css +29 -20
  13. package/package.json +74 -75
  14. package/src/StkTable/StkTable.vue +1557 -1550
  15. package/src/StkTable/components/DragHandle.vue +9 -9
  16. package/src/StkTable/components/SortIcon.vue +6 -6
  17. package/src/StkTable/components/TriangleIcon.vue +3 -0
  18. package/src/StkTable/const.ts +37 -37
  19. package/src/StkTable/index.ts +4 -4
  20. package/src/StkTable/style.less +567 -553
  21. package/src/StkTable/types/highlightDimOptions.ts +26 -26
  22. package/src/StkTable/types/index.ts +260 -239
  23. package/src/StkTable/useAutoResize.ts +91 -91
  24. package/src/StkTable/useColResize.ts +216 -216
  25. package/src/StkTable/useFixedCol.ts +148 -148
  26. package/src/StkTable/useFixedStyle.ts +75 -75
  27. package/src/StkTable/useGetFixedColPosition.ts +65 -65
  28. package/src/StkTable/useHighlight.ts +320 -318
  29. package/src/StkTable/useKeyboardArrowScroll.ts +112 -112
  30. package/src/StkTable/useRowExpand.ts +78 -0
  31. package/src/StkTable/useThDrag.ts +102 -102
  32. package/src/StkTable/useTrDrag.ts +118 -118
  33. package/src/StkTable/useTree.ts +158 -0
  34. package/src/StkTable/useVirtualScroll.ts +462 -462
  35. package/src/StkTable/utils/constRefUtils.ts +29 -29
  36. package/src/StkTable/utils/index.ts +224 -212
  37. package/src/StkTable/utils/useTriggerRef.ts +33 -33
  38. package/src/VirtualTree.vue +622 -622
  39. package/src/VirtualTreeSelect.vue +367 -367
  40. package/src/vite-env.d.ts +10 -10
@@ -1,9 +1,9 @@
1
- <template>
2
- <span class="drag-row-handle" draggable="true">
3
- <svg viewBox="0 0 1024 1024" width="16" height="16" fill="currentColor">
4
- <path
5
- d="M640 853.3a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3z m-256 0a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3z m256-256a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3z m-256 0a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3z m256-256a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3zM384 341.3a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3z"
6
- ></path>
7
- </svg>
8
- </span>
9
- </template>
1
+ <template>
2
+ <span class="drag-row-handle" draggable="true">
3
+ <svg viewBox="0 0 1024 1024" width="16" height="16" fill="currentColor">
4
+ <path
5
+ d="M640 853.3a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3z m-256 0a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3z m256-256a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3z m-256 0a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3z m256-256a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3zM384 341.3a85.3 85.3 0 1 1 85.3-85.3 85.3 85.3 0 0 1-85.3 85.3z"
6
+ ></path>
7
+ </svg>
8
+ </span>
9
+ </template>
@@ -1,6 +1,6 @@
1
- <template>
2
- <svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0 0 16 16">
3
- <polygon class="arrow-up" fill="#757699" points="8 2 4.8 6 11.2 6"></polygon>
4
- <polygon class="arrow-down" transform="translate(8, 12) rotate(-180) translate(-8, -12) " points="8 10 4.8 14 11.2 14"></polygon>
5
- </svg>
6
- </template>
1
+ <template>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0 0 16 16">
3
+ <polygon class="arrow-up" fill="#757699" points="8 2 4.8 6 11.2 6"></polygon>
4
+ <polygon class="arrow-down" transform="translate(8, 12) rotate(-180) translate(-8, -12) " points="8 10 4.8 14 11.2 14"></polygon>
5
+ </svg>
6
+ </template>
@@ -0,0 +1,3 @@
1
+ <template>
2
+ <div class="stk-fold-icon"></div>
3
+ </template>
@@ -1,37 +1,37 @@
1
- import { getBrowsersVersion } from './utils';
2
-
3
- export const DEFAULT_COL_WIDTH = '100';
4
-
5
- export const DEFAULT_TABLE_HEIGHT = 100;
6
- export const DEFAULT_TABLE_WIDTH = 200;
7
- export const DEFAULT_ROW_HEIGHT = 28;
8
-
9
- /** highlight background */
10
- export const HIGHLIGHT_COLOR = {
11
- light: { from: '#71a2fd', to: '#fff' },
12
- dark: { from: '#1e4c99', to: '#181c21' },
13
- };
14
- export const HIGHLIGHT_DURATION = 2000;
15
-
16
- /** highlight change frequency 1000/30 -> 30FPS */
17
- export const HIGHLIGHT_FREQ = 1000 / 30;
18
-
19
- export const HIGHLIGHT_ROW_CLASS = 'highlight-row';
20
- export const HIGHLIGHT_CELL_CLASS = 'highlight-cell';
21
-
22
- const _chromeVersion = getBrowsersVersion('chrome');
23
- const _firefoxVersion = getBrowsersVersion('firefox');
24
-
25
- /** legacy sticky compatible mode */
26
- export const IS_LEGACY_MODE = _chromeVersion < 56 || _firefoxVersion < 59;
27
-
28
- /** default props.smoothDefault */
29
- export const DEFAULT_SMOOTH_SCROLL = _chromeVersion < 85;
30
-
31
- export const STK_ID_PREFIX = 'stk';
32
-
33
- /** expanded row key prefix */
34
- export const EXPANDED_ROW_KEY_PREFIX = 'expanded-';
35
-
36
- /** cell key 的分隔符 */
37
- export const CELL_KEY_SEPARATE = '--';
1
+ import { getBrowsersVersion } from './utils';
2
+
3
+ export const DEFAULT_COL_WIDTH = '100';
4
+
5
+ export const DEFAULT_TABLE_HEIGHT = 100;
6
+ export const DEFAULT_TABLE_WIDTH = 200;
7
+ export const DEFAULT_ROW_HEIGHT = 28;
8
+
9
+ /** highlight background */
10
+ export const HIGHLIGHT_COLOR = {
11
+ light: { from: '#71a2fd', to: '#fff' },
12
+ dark: { from: '#1e4c99', to: '#181c21' },
13
+ };
14
+ export const HIGHLIGHT_DURATION = 2000;
15
+
16
+ /** highlight change frequency 1000/30 -> 30FPS */
17
+ // export const HIGHLIGHT_FREQ = 1000 / 30;
18
+
19
+ export const HIGHLIGHT_ROW_CLASS = 'highlight-row';
20
+ export const HIGHLIGHT_CELL_CLASS = 'highlight-cell';
21
+
22
+ const _chromeVersion = getBrowsersVersion('chrome');
23
+ const _firefoxVersion = getBrowsersVersion('firefox');
24
+
25
+ /** legacy sticky compatible mode */
26
+ export const IS_LEGACY_MODE = _chromeVersion < 56 || _firefoxVersion < 59;
27
+
28
+ /** default props.smoothDefault */
29
+ export const DEFAULT_SMOOTH_SCROLL = _chromeVersion < 85;
30
+
31
+ export const STK_ID_PREFIX = 'stk';
32
+
33
+ /** expanded row key prefix */
34
+ export const EXPANDED_ROW_KEY_PREFIX = 'expanded-';
35
+
36
+ /** cell key 的分隔符 */
37
+ export const CELL_KEY_SEPARATE = '--';
@@ -1,4 +1,4 @@
1
- export { default as StkTable } from './StkTable.vue';
2
- export { tableSort, insertToOrderedArray, strCompare, binarySearch } from './utils';
3
- export type { StkTableColumn } from './types/index';
4
- import './style.less';
1
+ export { default as StkTable } from './StkTable.vue';
2
+ export { tableSort, insertToOrderedArray, strCompare, binarySearch } from './utils';
3
+ export type { StkTableColumn } from './types/index';
4
+ import './style.less';