cloud-b2b 1.0.2 → 1.0.3

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 (50) hide show
  1. package/es/Area/Area.js +166 -0
  2. package/es/Area/package.json +6 -0
  3. package/es/Control/Control.js +27 -1
  4. package/es/Header/Header.js +1 -1
  5. package/es/Header/Header.less +12 -11
  6. package/es/HomeHeader/Header.less +1 -1
  7. package/es/Sidebar/Sidebar.js +2 -2
  8. package/es/Sidebar/Sidebar.less +10 -9
  9. package/es/SuperForm/SuperForm.js +74 -27
  10. package/es/SuperTable/DragSortRow.js +125 -0
  11. package/es/SuperTable/DragSortRow.less +17 -0
  12. package/es/SuperTable/FilterDropDown.js +188 -0
  13. package/es/SuperTable/FilterDropDown.less +30 -0
  14. package/es/SuperTable/SuperTable.js +933 -0
  15. package/es/SuperTable/SuperTable.less +135 -0
  16. package/es/SuperTable/fixed.js +42 -0
  17. package/es/SuperTable/package.json +6 -0
  18. package/es/SuperTable2/SuperTable2.js +700 -0
  19. package/es/SuperTable2/SuperTable2.less +100 -0
  20. package/es/SuperTable2/SuperTableCell.js +215 -0
  21. package/es/SuperTable2/package.json +6 -0
  22. package/es/adjust.less +89 -0
  23. package/es/index.js +4 -1
  24. package/es/style.less +20 -1
  25. package/lib/Area/Area.js +194 -0
  26. package/lib/Area/package.json +6 -0
  27. package/lib/Control/Control.js +29 -1
  28. package/lib/Header/Header.js +1 -1
  29. package/lib/Header/Header.less +12 -11
  30. package/lib/HomeHeader/Header.less +1 -1
  31. package/lib/Sidebar/Sidebar.js +2 -2
  32. package/lib/Sidebar/Sidebar.less +10 -9
  33. package/lib/SuperForm/SuperForm.js +72 -27
  34. package/lib/SuperTable/DragSortRow.js +142 -0
  35. package/lib/SuperTable/DragSortRow.less +17 -0
  36. package/lib/SuperTable/FilterDropDown.js +205 -0
  37. package/lib/SuperTable/FilterDropDown.less +30 -0
  38. package/lib/SuperTable/SuperTable.js +937 -0
  39. package/lib/SuperTable/SuperTable.less +135 -0
  40. package/lib/SuperTable/fixed.js +55 -0
  41. package/lib/SuperTable/package.json +6 -0
  42. package/lib/SuperTable2/SuperTable2.js +725 -0
  43. package/lib/SuperTable2/SuperTable2.less +100 -0
  44. package/lib/SuperTable2/SuperTableCell.js +231 -0
  45. package/lib/SuperTable2/package.json +6 -0
  46. package/lib/adjust.less +89 -0
  47. package/lib/index.js +28 -1
  48. package/lib/index.less +5 -0
  49. package/lib/style.less +20 -1
  50. package/package.json +1 -1
@@ -0,0 +1,135 @@
1
+ @import '../variables.less';
2
+
3
+ .@{cloudlink-prefix}-SuperTable {
4
+ border-spacing: 0;
5
+ cursor: default;
6
+
7
+ table {
8
+ white-space: pre;
9
+
10
+ :global(.ant-checkbox-input) {
11
+ z-index: -1;
12
+ }
13
+ }
14
+
15
+ :global(.ant-table-placeholder) {
16
+ padding: 0;
17
+
18
+ > div {
19
+ margin: 0;
20
+ }
21
+ }
22
+ .select {
23
+ background-color: @primary-1;
24
+ }
25
+
26
+ .center {
27
+ text-align: center !important;
28
+ }
29
+
30
+ .left {
31
+ text-align: left !important;
32
+ }
33
+
34
+ .right {
35
+ text-align: right !important;
36
+ }
37
+
38
+ .emphasizedSelectRow{
39
+ background-color: @table-row-hover-bg;
40
+ color :#000;
41
+ font-weight: 700;
42
+ }
43
+ .emphasizedUnselectRow{
44
+ color :#000;
45
+ font-weight: 700;
46
+ }
47
+
48
+ .weakenedSelectRow{
49
+ background-color: @table-row-hover-bg;
50
+ color :#999;
51
+ }
52
+ .weakenedUnselectRow{
53
+ color :#999;
54
+ }
55
+
56
+ .warningRow{
57
+ color: red;
58
+ }
59
+
60
+ .noTransition{
61
+ tr {
62
+ transition: all 0s!important;
63
+ >td{
64
+ transition: all 0s!important;
65
+ }
66
+ }
67
+ }
68
+
69
+ .noWrap{
70
+ white-space: nowrap;
71
+ }
72
+
73
+ .totalRow {
74
+ color: #222!important;
75
+ background-color: #f0f0f0!important;
76
+ transition: all 0s!important;
77
+ td {
78
+ border-top: 1px solid #ddd!important;
79
+ background-color: #f0f0f0!important;
80
+ border-bottom: 0!important;
81
+ transition: all 0s!important;
82
+ }
83
+ }
84
+
85
+ }
86
+
87
+
88
+
89
+
90
+
91
+ :global(.ant-table-footer) {
92
+ padding: 0!important;
93
+ }
94
+
95
+ .footer {
96
+ vertical-align: middle;
97
+ overflow: auto;
98
+ scrollbar-width: none;
99
+ -ms-overflow-style: none;
100
+ scrollbar-color: transparent transparent;
101
+ scrollbar-track-color: transparent;
102
+ -ms-scrollbar-track-color: transparent;
103
+ .footerItem {
104
+ white-space: pre;
105
+ > span {
106
+ display: inline-block;
107
+ color: #222;
108
+ position: relative;
109
+ vertical-align: middle;
110
+ border-top: 1px solid #dedede;
111
+ display: inline-block;
112
+ box-sizing: border-box;
113
+ height: 35px;
114
+ padding: 8px 8px 7px !important;
115
+ border-right: 1px solid transparent;
116
+ }
117
+ .ghost {
118
+ opacity: 0;
119
+ filter: alpha(opacity=0);
120
+ }
121
+ .content {
122
+ position: absolute;
123
+ left: 0;
124
+ }
125
+ }
126
+ }
127
+
128
+ .footer::-webkit-scrollbar {
129
+ display: none;
130
+ width: 0!important;
131
+ height: 0!important;
132
+ opacity: 0;
133
+ filter: alpha(opacity=0);
134
+ }
135
+
@@ -0,0 +1,42 @@
1
+ import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/index-of";
2
+
3
+ var isFirefox = function isFirefox() {
4
+ var _context;
5
+
6
+ return _indexOfInstanceProperty(_context = navigator.userAgent).call(_context, 'Firefox') > 0;
7
+ };
8
+
9
+ var getComputedStyle = function getComputedStyle(element) {
10
+ return window.getComputedStyle ? window.getComputedStyle(element, null) : element.currentStyle;
11
+ };
12
+
13
+ var fixed = function fixed(container, header, maxHeight) {
14
+ var totalFooter = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
15
+ container.style.overflowY = 'auto';
16
+ container.style.maxHeight = maxHeight;
17
+
18
+ if (isFirefox()) {
19
+ container.style.position = 'relative';
20
+ header.style.top = '0';
21
+ header.style.position = 'sticky';
22
+ header.style.zIndex = '1';
23
+ } else {
24
+ header.parentNode.appendChild(header);
25
+ }
26
+
27
+ var containerHeight = Number(getComputedStyle(container).height.replace('px', ''));
28
+ var translateHeight = containerHeight - 10 - container.scrollHeight;
29
+ var pageTotalElement = totalFooter.pageTotalElement,
30
+ searchTotalElement = totalFooter.searchTotalElement;
31
+ pageTotalElement && (pageTotalElement.style.transform = "translateY(".concat(translateHeight + container.scrollTop, "px)"));
32
+ searchTotalElement && (searchTotalElement.style.transform = "translateY(".concat(translateHeight + container.scrollTop, "px)"));
33
+
34
+ container.onscroll = function () {
35
+ if (container.scrollTop + containerHeight - 10 > container.scrollHeight) return;
36
+ !isFirefox() && (header.style.transform = "translateY(".concat(container.scrollTop, "px)"));
37
+ pageTotalElement && (pageTotalElement.style.transform = "translateY(".concat(translateHeight + container.scrollTop, "px)"));
38
+ searchTotalElement && (searchTotalElement.style.transform = "translateY(".concat(translateHeight + container.scrollTop, "px)"));
39
+ };
40
+ };
41
+
42
+ export default fixed;
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "SuperTable",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "main": "./SuperTable.js"
6
+ }