vxe-table 4.18.7 → 4.18.8

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 (148) hide show
  1. package/LICENSE +20 -20
  2. package/README.en.md +118 -118
  3. package/README.ja-JP.md +117 -117
  4. package/README.md +268 -268
  5. package/README.zh-TW.md +117 -117
  6. package/es/style.css +1 -1
  7. package/es/table/src/table.js +85 -78
  8. package/es/table/src/util.js +6 -0
  9. package/es/table/style.css +18 -48
  10. package/es/ui/index.js +1 -1
  11. package/es/ui/src/dom.js +21 -0
  12. package/es/ui/src/log.js +1 -1
  13. package/es/vxe-table/style.css +18 -48
  14. package/lib/index.common.js +2 -1
  15. package/lib/index.umd.js +2762 -2833
  16. package/lib/index.umd.min.js +1 -1
  17. package/lib/style.css +1 -1
  18. package/lib/table/src/table.js +14 -11
  19. package/lib/table/src/table.min.js +1 -1
  20. package/lib/table/src/util.js +6 -0
  21. package/lib/table/src/util.min.js +1 -1
  22. package/lib/table/style/style.css +18 -48
  23. package/lib/ui/index.js +1 -1
  24. package/lib/ui/index.min.js +1 -1
  25. package/lib/ui/src/dom.js +23 -0
  26. package/lib/ui/src/dom.min.js +1 -1
  27. package/lib/ui/src/log.js +1 -1
  28. package/lib/ui/src/log.min.js +1 -1
  29. package/lib/v-x-e-table/index.js +2 -1
  30. package/lib/v-x-e-table/index.min.js +1 -1
  31. package/lib/vxe-colgroup/index.js +2 -1
  32. package/lib/vxe-colgroup/index.min.js +1 -1
  33. package/lib/vxe-column/index.js +2 -1
  34. package/lib/vxe-column/index.min.js +1 -1
  35. package/lib/vxe-grid/index.js +2 -1
  36. package/lib/vxe-grid/index.min.js +1 -1
  37. package/lib/vxe-table/index.js +2 -1
  38. package/lib/vxe-table/index.min.js +1 -1
  39. package/lib/vxe-table/style/style.css +18 -48
  40. package/lib/vxe-toolbar/index.js +2 -1
  41. package/lib/vxe-toolbar/index.min.js +1 -1
  42. package/lib/vxe-ui/index.js +2 -1
  43. package/lib/vxe-ui/index.min.js +1 -1
  44. package/lib/vxe-v-x-e-table/index.js +2 -1
  45. package/lib/vxe-v-x-e-table/index.min.js +1 -1
  46. package/package.json +91 -91
  47. package/packages/colgroup/index.ts +22 -22
  48. package/packages/column/index.ts +22 -22
  49. package/packages/components.ts +43 -43
  50. package/packages/grid/index.ts +18 -18
  51. package/packages/grid/src/emits.ts +19 -19
  52. package/packages/grid/src/grid.ts +1768 -1768
  53. package/packages/grid/src/props.ts +23 -23
  54. package/packages/index.ts +4 -4
  55. package/packages/locale/lang/ar-EG.ts +832 -832
  56. package/packages/locale/lang/de-DE.ts +832 -832
  57. package/packages/locale/lang/en-US.ts +832 -832
  58. package/packages/locale/lang/es-ES.ts +832 -832
  59. package/packages/locale/lang/fr-FR.ts +832 -832
  60. package/packages/locale/lang/hu-HU.ts +832 -832
  61. package/packages/locale/lang/hy-AM.ts +832 -832
  62. package/packages/locale/lang/id-ID.ts +832 -832
  63. package/packages/locale/lang/it-IT.ts +832 -832
  64. package/packages/locale/lang/ja-JP.ts +832 -832
  65. package/packages/locale/lang/ko-KR.ts +832 -832
  66. package/packages/locale/lang/ms-MY.ts +832 -832
  67. package/packages/locale/lang/nb-NO.ts +832 -832
  68. package/packages/locale/lang/pt-BR.ts +832 -832
  69. package/packages/locale/lang/ru-RU.ts +832 -832
  70. package/packages/locale/lang/th-TH.ts +832 -832
  71. package/packages/locale/lang/ug-CN.ts +832 -832
  72. package/packages/locale/lang/uk-UA.ts +832 -832
  73. package/packages/locale/lang/uz-UZ.ts +832 -832
  74. package/packages/locale/lang/vi-VN.ts +832 -832
  75. package/packages/locale/lang/zh-CHT.ts +832 -832
  76. package/packages/locale/lang/zh-CN.ts +832 -832
  77. package/packages/locale/lang/zh-HK.ts +3 -3
  78. package/packages/locale/lang/zh-MO.ts +3 -3
  79. package/packages/locale/lang/zh-TC.ts +3 -3
  80. package/packages/locale/lang/zh-TW.ts +3 -3
  81. package/packages/table/index.ts +26 -26
  82. package/packages/table/module/custom/hook.ts +359 -359
  83. package/packages/table/module/custom/panel.ts +1331 -1331
  84. package/packages/table/module/edit/hook.ts +1032 -1032
  85. package/packages/table/module/export/export-panel.ts +567 -567
  86. package/packages/table/module/export/hook.ts +1654 -1654
  87. package/packages/table/module/export/import-panel.ts +266 -266
  88. package/packages/table/module/export/util.ts +24 -24
  89. package/packages/table/module/filter/hook.ts +468 -468
  90. package/packages/table/module/filter/panel.ts +301 -301
  91. package/packages/table/module/keyboard/hook.ts +495 -495
  92. package/packages/table/module/menu/hook.ts +325 -325
  93. package/packages/table/module/menu/panel.ts +201 -201
  94. package/packages/table/module/validator/hook.ts +631 -631
  95. package/packages/table/render/index.ts +1440 -1440
  96. package/packages/table/src/body.ts +932 -932
  97. package/packages/table/src/cell.ts +1290 -1290
  98. package/packages/table/src/column.ts +190 -190
  99. package/packages/table/src/columnInfo.ts +225 -225
  100. package/packages/table/src/emits.ts +123 -123
  101. package/packages/table/src/footer.ts +368 -368
  102. package/packages/table/src/group.ts +59 -59
  103. package/packages/table/src/header.ts +559 -559
  104. package/packages/table/src/props.ts +324 -324
  105. package/packages/table/src/store.ts +14 -14
  106. package/packages/table/src/table.ts +14010 -14004
  107. package/packages/table/src/use/cell-view.ts +44 -44
  108. package/packages/table/src/use/index.ts +1 -1
  109. package/packages/table/src/util.ts +1070 -1064
  110. package/packages/toolbar/index.ts +18 -18
  111. package/packages/toolbar/src/toolbar.ts +701 -701
  112. package/packages/ui/index.ts +530 -530
  113. package/packages/ui/src/anime.ts +52 -52
  114. package/packages/ui/src/comp.ts +3 -3
  115. package/packages/ui/src/dom.ts +259 -236
  116. package/packages/ui/src/log.ts +8 -8
  117. package/packages/ui/src/utils.ts +56 -56
  118. package/packages/ui/src/vn.ts +55 -55
  119. package/packages/v-x-e-table/index.d.ts +4 -4
  120. package/packages/v-x-e-table/index.ts +4 -4
  121. package/styles/all.scss +7 -7
  122. package/styles/base.scss +16 -16
  123. package/styles/components/grid.scss +89 -89
  124. package/styles/components/icon.scss +225 -225
  125. package/styles/components/old-icon.scss +715 -715
  126. package/styles/components/table-module/all.scss +6 -6
  127. package/styles/components/table-module/custom.scss +527 -527
  128. package/styles/components/table-module/export.scss +130 -130
  129. package/styles/components/table-module/filter.scss +130 -130
  130. package/styles/components/table-module/menu.scss +81 -81
  131. package/styles/components/table.scss +2679 -2679
  132. package/styles/components/toolbar.scss +119 -119
  133. package/styles/default.scss +2 -2
  134. package/styles/helpers/baseMixin.scss +95 -95
  135. package/styles/index.scss +4 -4
  136. package/styles/modules.scss +5 -5
  137. package/styles/theme/base.scss +93 -93
  138. package/styles/theme/dark.scss +49 -49
  139. package/styles/theme/light.scss +44 -44
  140. package/styles/variable.scss +43 -43
  141. package/types/all.d.ts +37 -37
  142. package/types/index.d.ts +4 -4
  143. /package/es/{iconfont.1773991907408.ttf → iconfont.1774240404046.ttf} +0 -0
  144. /package/es/{iconfont.1773991907408.woff → iconfont.1774240404046.woff} +0 -0
  145. /package/es/{iconfont.1773991907408.woff2 → iconfont.1774240404046.woff2} +0 -0
  146. /package/lib/{iconfont.1773991907408.ttf → iconfont.1774240404046.ttf} +0 -0
  147. /package/lib/{iconfont.1773991907408.woff → iconfont.1774240404046.woff} +0 -0
  148. /package/lib/{iconfont.1773991907408.woff2 → iconfont.1774240404046.woff2} +0 -0
@@ -1,56 +1,56 @@
1
- import XEUtils from 'xe-utils'
2
- import { VxeUI } from '@vxe-ui/core'
3
- import DomZIndex from 'dom-zindex'
4
-
5
- const { getConfig } = VxeUI
6
-
7
- export function isEnableConf (conf: any): boolean {
8
- return conf && conf.enabled !== false
9
- }
10
-
11
- export function isEmptyValue (cellValue: any) {
12
- return cellValue === null || cellValue === undefined || cellValue === ''
13
- }
14
-
15
- export function parseFile (file: File) {
16
- const name = file.name
17
- const tIndex = XEUtils.lastIndexOf(name, '.')
18
- const type = name.substring(tIndex + 1, name.length).toLowerCase()
19
- const filename = name.substring(0, tIndex)
20
- return { filename, type }
21
- }
22
-
23
- export function nextZIndex () {
24
- return DomZIndex.getNext()
25
- }
26
-
27
- export function getLastZIndex () {
28
- return DomZIndex.getCurrent()
29
- }
30
-
31
- export function hasChildrenList (item: any) {
32
- return item && item.children && item.children.length > 0
33
- }
34
-
35
- export function getFuncText (content?: string | number | boolean | null, args?: any) {
36
- if (XEUtils.eqNull(content)) {
37
- return ''
38
- }
39
- const translate = getConfig().translate
40
- return `${translate ? translate('' + content, args) : content}`
41
- }
42
-
43
- export function formatText (value: any, placeholder?: any) {
44
- return '' + (isEmptyValue(value) ? (placeholder ? getConfig().emptyCell : '') : value)
45
- }
46
-
47
- /**
48
- * 判断值为:'' | null | undefined 时都属于空值
49
- */
50
- export function eqEmptyValue (cellValue: any) {
51
- return cellValue === '' || XEUtils.eqNull(cellValue)
52
- }
53
-
54
- export function getDefaultConfig (val1: any, def1: any) {
55
- return XEUtils.eqNull(val1) ? def1 : val1
56
- }
1
+ import XEUtils from 'xe-utils'
2
+ import { VxeUI } from '@vxe-ui/core'
3
+ import DomZIndex from 'dom-zindex'
4
+
5
+ const { getConfig } = VxeUI
6
+
7
+ export function isEnableConf (conf: any): boolean {
8
+ return conf && conf.enabled !== false
9
+ }
10
+
11
+ export function isEmptyValue (cellValue: any) {
12
+ return cellValue === null || cellValue === undefined || cellValue === ''
13
+ }
14
+
15
+ export function parseFile (file: File) {
16
+ const name = file.name
17
+ const tIndex = XEUtils.lastIndexOf(name, '.')
18
+ const type = name.substring(tIndex + 1, name.length).toLowerCase()
19
+ const filename = name.substring(0, tIndex)
20
+ return { filename, type }
21
+ }
22
+
23
+ export function nextZIndex () {
24
+ return DomZIndex.getNext()
25
+ }
26
+
27
+ export function getLastZIndex () {
28
+ return DomZIndex.getCurrent()
29
+ }
30
+
31
+ export function hasChildrenList (item: any) {
32
+ return item && item.children && item.children.length > 0
33
+ }
34
+
35
+ export function getFuncText (content?: string | number | boolean | null, args?: any) {
36
+ if (XEUtils.eqNull(content)) {
37
+ return ''
38
+ }
39
+ const translate = getConfig().translate
40
+ return `${translate ? translate('' + content, args) : content}`
41
+ }
42
+
43
+ export function formatText (value: any, placeholder?: any) {
44
+ return '' + (isEmptyValue(value) ? (placeholder ? getConfig().emptyCell : '') : value)
45
+ }
46
+
47
+ /**
48
+ * 判断值为:'' | null | undefined 时都属于空值
49
+ */
50
+ export function eqEmptyValue (cellValue: any) {
51
+ return cellValue === '' || XEUtils.eqNull(cellValue)
52
+ }
53
+
54
+ export function getDefaultConfig (val1: any, def1: any) {
55
+ return XEUtils.eqNull(val1) ? def1 : val1
56
+ }
@@ -1,55 +1,55 @@
1
- import XEUtils from 'xe-utils'
2
-
3
- import type { VxeGlobalRendererHandles } from 'vxe-pc-ui'
4
- import type { VxeComponentSlotType } from '../../../types'
5
-
6
- export function getOnName (type: string) {
7
- return 'on' + type.substring(0, 1).toLocaleUpperCase() + type.substring(1)
8
- }
9
-
10
- export function getModelEvent (renderOpts: VxeGlobalRendererHandles.RenderOptions) {
11
- switch (renderOpts.name) {
12
- case 'input':
13
- case 'textarea':
14
- return 'input'
15
- case 'select':
16
- return 'change'
17
- }
18
- return 'update:modelValue'
19
- }
20
-
21
- export function getChangeEvent (renderOpts: VxeGlobalRendererHandles.RenderOptions) {
22
- switch (renderOpts.name) {
23
- case 'input':
24
- case 'textarea':
25
- case 'VxeInput':
26
- case 'VxeNumberInput':
27
- case 'VxeTextarea':
28
- case '$input':
29
- case '$textarea':
30
- return 'input'
31
- }
32
- return 'change'
33
- }
34
-
35
- export function hasInputType (renderOpts: VxeGlobalRendererHandles.RenderOptions) {
36
- switch (renderOpts.name) {
37
- case 'VxeInput':
38
- case 'VxeNumberInput':
39
- case 'VxeTextarea':
40
- case '$input':
41
- case '$textarea':
42
- return true
43
- }
44
- return false
45
- }
46
-
47
- export function getSlotVNs (vns: VxeComponentSlotType | VxeComponentSlotType[]) {
48
- if (vns === null || vns === undefined) {
49
- return []
50
- }
51
- if (XEUtils.isArray(vns)) {
52
- return vns
53
- }
54
- return [vns]
55
- }
1
+ import XEUtils from 'xe-utils'
2
+
3
+ import type { VxeGlobalRendererHandles } from 'vxe-pc-ui'
4
+ import type { VxeComponentSlotType } from '../../../types'
5
+
6
+ export function getOnName (type: string) {
7
+ return 'on' + type.substring(0, 1).toLocaleUpperCase() + type.substring(1)
8
+ }
9
+
10
+ export function getModelEvent (renderOpts: VxeGlobalRendererHandles.RenderOptions) {
11
+ switch (renderOpts.name) {
12
+ case 'input':
13
+ case 'textarea':
14
+ return 'input'
15
+ case 'select':
16
+ return 'change'
17
+ }
18
+ return 'update:modelValue'
19
+ }
20
+
21
+ export function getChangeEvent (renderOpts: VxeGlobalRendererHandles.RenderOptions) {
22
+ switch (renderOpts.name) {
23
+ case 'input':
24
+ case 'textarea':
25
+ case 'VxeInput':
26
+ case 'VxeNumberInput':
27
+ case 'VxeTextarea':
28
+ case '$input':
29
+ case '$textarea':
30
+ return 'input'
31
+ }
32
+ return 'change'
33
+ }
34
+
35
+ export function hasInputType (renderOpts: VxeGlobalRendererHandles.RenderOptions) {
36
+ switch (renderOpts.name) {
37
+ case 'VxeInput':
38
+ case 'VxeNumberInput':
39
+ case 'VxeTextarea':
40
+ case '$input':
41
+ case '$textarea':
42
+ return true
43
+ }
44
+ return false
45
+ }
46
+
47
+ export function getSlotVNs (vns: VxeComponentSlotType | VxeComponentSlotType[]) {
48
+ if (vns === null || vns === undefined) {
49
+ return []
50
+ }
51
+ if (XEUtils.isArray(vns)) {
52
+ return vns
53
+ }
54
+ return [vns]
55
+ }
@@ -1,4 +1,4 @@
1
- import VxeUI from '../ui'
2
-
3
- export * from '../ui'
4
- export default VxeUI
1
+ import VxeUI from '../ui'
2
+
3
+ export * from '../ui'
4
+ export default VxeUI
@@ -1,4 +1,4 @@
1
- import VxeUI from '../ui'
2
-
3
- export * from '../ui'
4
- export default VxeUI
1
+ import VxeUI from '../ui'
2
+
3
+ export * from '../ui'
4
+ export default VxeUI
package/styles/all.scss CHANGED
@@ -1,7 +1,7 @@
1
- @use './base.scss';
2
-
3
- @use './components/column.scss';
4
- @use './components/colgroup.scss';
5
- @use './components/table.scss';
6
- @use './components/grid.scss';
7
- @use './components/toolbar.scss';
1
+ @use './base.scss';
2
+
3
+ @use './components/column.scss';
4
+ @use './components/colgroup.scss';
5
+ @use './components/table.scss';
6
+ @use './components/grid.scss';
7
+ @use './components/toolbar.scss';
package/styles/base.scss CHANGED
@@ -1,16 +1,16 @@
1
- @use './theme/light.scss';
2
- @use './theme/dark.scss';
3
-
4
- %boxSizing {
5
- box-sizing: border-box;
6
- }
7
-
8
- [class*="vxe-"] {
9
- font-variant: tabular-nums;
10
- font-feature-settings: 'tnum';
11
- @extend %boxSizing;
12
- &:after, &:before,
13
- *:after, *:before {
14
- @extend %boxSizing;
15
- }
16
- }
1
+ @use './theme/light.scss';
2
+ @use './theme/dark.scss';
3
+
4
+ %boxSizing {
5
+ box-sizing: border-box;
6
+ }
7
+
8
+ [class*="vxe-"] {
9
+ font-variant: tabular-nums;
10
+ font-feature-settings: 'tnum';
11
+ @extend %boxSizing;
12
+ &:after, &:before,
13
+ *:after, *:before {
14
+ @extend %boxSizing;
15
+ }
16
+ }
@@ -1,89 +1,89 @@
1
- .vxe-grid {
2
- position: relative;
3
- display: flex;
4
- flex-direction: column;
5
- &.is--loading {
6
- &:before {
7
- content: "";
8
- position: absolute;
9
- top: 0;
10
- left: 0;
11
- width: 100%;
12
- height: 100%;
13
- z-index: 99;
14
- user-select: none;
15
- background-color: var(--vxe-ui-loading-background-color);
16
- }
17
- & > .vxe-table {
18
- .vxe-loading {
19
- background-color: transparent;
20
- }
21
- }
22
- }
23
- &.is--maximize {
24
- position: fixed;
25
- top: 0;
26
- left: 0;
27
- width: 100%;
28
- height: 100%;
29
- padding: 0.5em 1em;
30
- background-color: var(--vxe-ui-layout-background-color);
31
- }
32
- .vxe-grid--form-wrapper,
33
- .vxe-grid--top-wrapper,
34
- .vxe-grid--bottom-wrapper {
35
- position: relative;
36
- }
37
- .vxe-grid--table-container {
38
- display: flex;
39
- flex-direction: row;
40
- flex-grow: 1;
41
- overflow: hidden;
42
- }
43
- .vxe-grid--left-wrapper,
44
- .vxe-grid--right-wrapper {
45
- flex-shrink: 0;
46
- overflow: auto;
47
- outline: 0;
48
- }
49
- .vxe-grid--table-wrapper {
50
- flex-grow: 1;
51
- overflow: hidden;
52
- }
53
- }
54
-
55
- .vxe-grid--layout-body-wrapper {
56
- display: flex;
57
- flex-direction: row;
58
- overflow: auto;
59
- flex-grow: 1;
60
- }
61
- .vxe-grid--layout-body-content-wrapper {
62
- display: flex;
63
- flex-direction: column;
64
- flex-grow: 1;
65
- overflow: auto;
66
- }
67
- .vxe-grid--layout-header-wrapper,
68
- .vxe-grid--layout-footer-wrapper,
69
- .vxe-grid--layout-aside-left-wrapper,
70
- .vxe-grid--layout-aside-left-wrapper {
71
- flex-shrink: 0;
72
- }
73
- .vxe-grid--layout-aside-left-wrapper,
74
- .vxe-grid--layout-aside-left-wrapper {
75
- overflow: auto;
76
- }
77
-
78
- .vxe-grid {
79
- font-size: var(--vxe-ui-font-size-default);
80
- &.size--medium {
81
- font-size: var(--vxe-ui-font-size-medium);
82
- }
83
- &.size--small {
84
- font-size: var(--vxe-ui-font-size-small);
85
- }
86
- &.size--mini {
87
- font-size: var(--vxe-ui-font-size-mini);
88
- }
89
- }
1
+ .vxe-grid {
2
+ position: relative;
3
+ display: flex;
4
+ flex-direction: column;
5
+ &.is--loading {
6
+ &:before {
7
+ content: "";
8
+ position: absolute;
9
+ top: 0;
10
+ left: 0;
11
+ width: 100%;
12
+ height: 100%;
13
+ z-index: 99;
14
+ user-select: none;
15
+ background-color: var(--vxe-ui-loading-background-color);
16
+ }
17
+ & > .vxe-table {
18
+ .vxe-loading {
19
+ background-color: transparent;
20
+ }
21
+ }
22
+ }
23
+ &.is--maximize {
24
+ position: fixed;
25
+ top: 0;
26
+ left: 0;
27
+ width: 100%;
28
+ height: 100%;
29
+ padding: 0.5em 1em;
30
+ background-color: var(--vxe-ui-layout-background-color);
31
+ }
32
+ .vxe-grid--form-wrapper,
33
+ .vxe-grid--top-wrapper,
34
+ .vxe-grid--bottom-wrapper {
35
+ position: relative;
36
+ }
37
+ .vxe-grid--table-container {
38
+ display: flex;
39
+ flex-direction: row;
40
+ flex-grow: 1;
41
+ overflow: hidden;
42
+ }
43
+ .vxe-grid--left-wrapper,
44
+ .vxe-grid--right-wrapper {
45
+ flex-shrink: 0;
46
+ overflow: auto;
47
+ outline: 0;
48
+ }
49
+ .vxe-grid--table-wrapper {
50
+ flex-grow: 1;
51
+ overflow: hidden;
52
+ }
53
+ }
54
+
55
+ .vxe-grid--layout-body-wrapper {
56
+ display: flex;
57
+ flex-direction: row;
58
+ overflow: auto;
59
+ flex-grow: 1;
60
+ }
61
+ .vxe-grid--layout-body-content-wrapper {
62
+ display: flex;
63
+ flex-direction: column;
64
+ flex-grow: 1;
65
+ overflow: auto;
66
+ }
67
+ .vxe-grid--layout-header-wrapper,
68
+ .vxe-grid--layout-footer-wrapper,
69
+ .vxe-grid--layout-aside-left-wrapper,
70
+ .vxe-grid--layout-aside-left-wrapper {
71
+ flex-shrink: 0;
72
+ }
73
+ .vxe-grid--layout-aside-left-wrapper,
74
+ .vxe-grid--layout-aside-left-wrapper {
75
+ overflow: auto;
76
+ }
77
+
78
+ .vxe-grid {
79
+ font-size: var(--vxe-ui-font-size-default);
80
+ &.size--medium {
81
+ font-size: var(--vxe-ui-font-size-medium);
82
+ }
83
+ &.size--small {
84
+ font-size: var(--vxe-ui-font-size-small);
85
+ }
86
+ &.size--mini {
87
+ font-size: var(--vxe-ui-font-size-mini);
88
+ }
89
+ }