@ninebone/table 0.1.37 → 0.1.39

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.
@@ -1,3 +1,6 @@
1
+ :host {
2
+ --scrollbar-size: 16px;
3
+ }
1
4
 
2
5
  nine-table-filter-panel, cell-combo-panel {
3
6
  z-index: 2;
@@ -0,0 +1,3 @@
1
+ nine-table-hscrollbar {
2
+ display: none; /* 평소에는 기본 숨김 */
3
+ }
@@ -8,21 +8,47 @@ nine-table-sheet {
8
8
  box-sizing: border-box;
9
9
  background: #ffffff;
10
10
  overflow: hidden;
11
- }
12
11
 
12
+ .ng-sheet-body {
13
+ display: block;
14
+ flex: 1 1 auto;
15
+ width: 100%;
16
+ height: 100%;
17
+ overflow-y: auto;
18
+ overflow-x: hidden;
19
+ position: relative;
20
+ scrollbar-width: none;
21
+ &::-webkit-scrollbar { display: none; height: 0px; width: 0px; }
22
+ }
13
23
 
14
- nine-table-sheet .ng-sheet-body thead {
15
- display: table-header-group;
16
- position: sticky;
17
- top: 0;
18
- z-index: 10;
19
- }
20
- nine-table-sheet .ng-sheet-body tfoot {
21
- display: table-footer-group;
22
- position: sticky;
23
- bottom: 0;
24
- z-index: 10;
25
- background: red;
24
+ .ng-sheet-body-content {
25
+ display: flex;
26
+ flex-direction: row;
27
+ width: 100%;
28
+ height: 100%;
29
+ left: 0;
30
+ top: 0;
31
+ position: sticky;
32
+ }
33
+
34
+
35
+
36
+ .ng-container-left, .ng-container-body, .ng-container-right {
37
+ flex-direction: column;
38
+ position: relative;
39
+ background: #ffffff;
40
+ }
41
+ .ng-container-body {
42
+ display: flex;
43
+ }
44
+
45
+ .ng-container-left, .ng-container-right {
46
+ border: none;
47
+ }
48
+
49
+ .ng-scroll-edge {
50
+ display: none; /* 평소에는 기본 숨김 */
51
+ }
26
52
  }
27
53
 
28
54
  nine-table-sheet.active {
@@ -31,110 +57,24 @@ nine-table-sheet.active {
31
57
 
32
58
  /* --- 세로 스크롤바가 활성화되었을 때만 CSS로 2열 너비 확장 및 요소 표시 --- */
33
59
  nine-table-sheet.vscroll-visible {
34
- grid-template-columns: 1fr ${sbSize}px;
35
- }
60
+ grid-template-columns: 1fr var(--scrollbar-size);
36
61
 
37
- nine-table-sheet.vscroll-visible nine-table-vscrollbar {
38
- display: flex;
39
- }
40
-
41
- nine-table-vscrollbar {
42
- display: none; /* 평소에는 기본 숨김 */
43
- border-top: 2px solid #333;
62
+ nine-table-vscrollbar {
63
+ display: flex;
64
+ }
44
65
  }
45
66
 
46
67
  /* --- 가로 스크롤바가 활성화되었을 때만 CSS로 행 높이 확장 및 요소 표시 --- */
47
68
  nine-table-sheet.hscroll-visible {
48
- grid-template-rows: 1fr ${sbSize}px;
49
- }
50
-
51
- nine-table-sheet.hscroll-visible nine-table-hscrollbar,
52
- nine-table-sheet.hscroll-visible .ng-scroll-edge {
53
- display: flex;
54
- }
55
-
56
- nine-table-hscrollbar,
57
- nine-table-sheet .ng-scroll-edge {
58
- display: none; /* 평소에는 기본 숨김 */
59
- }
60
-
61
- nine-table-sheet .ng-main-content-wrapper {
62
- grid-row: 1;
63
- grid-column: 1;
64
- display: flex;
65
- flex-direction: column;
66
- width: 100%;
67
- height: 100%;
68
- overflow: hidden;
69
- position: relative;
70
- }
69
+ grid-template-rows: 1fr var(--scrollbar-size);
71
70
 
72
- nine-table-sheet .ng-sheet-header,
73
- nine-table-sheet .ng-sheet-footer {
74
- display: flex;
75
- flex-direction: row;
76
- flex-shrink: 0;
77
- width: 100%;
78
- background: #f9fafb;
79
- z-index: 3;
80
- overflow: hidden;
81
- box-sizing: border-box;
82
- }
83
-
84
- nine-table-sheet .ng-virtual-height-holder {
85
- width: 100%;
86
- pointer-events: none;
87
- visibility: hidden;
88
- }
89
-
90
- nine-table-sheet .ng-sheet-body {
91
- display: block;
92
- flex: 1 1 auto;
93
- width: 100%;
94
- height: 100%;
95
- overflow-y: auto;
96
- overflow-x: hidden;
97
- position: relative;
98
- scrollbar-width: none;
99
- &::-webkit-scrollbar { display: none; height: 0px; width: 0px; }
100
- }
101
-
102
- nine-table-sheet tbody {
103
- position: relative;
104
- }
105
-
106
- nine-table-sheet .ng-sheet-body-content {
107
- display: flex;
108
- flex-direction: row;
109
- width: 100%;
110
- height: 100%;
111
- left: 0;
112
- top: 0;
113
- position: sticky;
114
- }
115
-
116
- nine-table-sheet .ng-container-left,
117
- nine-table-sheet .ng-container-body,
118
- nine-table-sheet .ng-container-right {
119
- display: flex;
120
- flex-direction: column;
121
- position: relative;
122
- background: #ffffff;
71
+ nine-table-hscrollbar, ng-scroll-edge {
72
+ display: flex;
73
+ }
123
74
  }
124
75
 
125
- /* 3. 좌우 고정 영역 구분선 제거 */
126
- .ng-container-left,
127
- .ng-container-right {
128
- border: none;
129
- }
130
76
 
131
- .ng-container-left, .ng-container-body, .ng-container-right {
132
- --border-right: none;
133
- }
134
77
 
135
- nine-table-sheet tbody.foot {
136
- height: 100vh;
137
- }
138
78
 
139
79
  nine-table-sheet .ng-container-left {
140
80
  --border-right: 1px solid #e5e7eb;
@@ -164,7 +104,7 @@ nine-table-sheet .ng-container-left, nine-table-sheet .ng-container-right {
164
104
  nine-table-vscrollbar {
165
105
  grid-row: 1;
166
106
  grid-column: 2;
167
- width: ${sbSize}px;
107
+ width: var(--scrollbar-size);
168
108
  height: 100%;
169
109
  z-index: 50;
170
110
  }
@@ -174,8 +114,8 @@ nine-table-hscrollbar {
174
114
  grid-row: 2;
175
115
  grid-column: 1;
176
116
  flex-direction: row;
177
- height: ${sbSize}px;
178
- min-height: ${sbSize}px;
117
+ height: var(--scrollbar-size);
118
+ min-height: var(--scrollbar-size);
179
119
  background: #f9fafb;
180
120
  border-top: 1px solid #e5e7eb;
181
121
  z-index: 10;
@@ -187,8 +127,8 @@ nine-table-hscrollbar {
187
127
  nine-table-sheet .ng-scroll-edge {
188
128
  grid-row: 2;
189
129
  grid-column: 2;
190
- width: ${sbSize}px;
191
- height: ${sbSize}px;
130
+ width: var(--scrollbar-size);
131
+ height: var(--scrollbar-size);
192
132
  background: #f3f4f6;
193
133
  border-top: 1px solid #e5e7eb;
194
134
  z-index: 10;
@@ -0,0 +1,4 @@
1
+ nine-table-vscrollbar {
2
+ display: none; /* 평소에는 기본 숨김 */
3
+ border-top: 2px solid #333;
4
+ }
@@ -0,0 +1,22 @@
1
+ thead {
2
+ display: table-header-group;
3
+ position: sticky;
4
+ top: 0;
5
+ z-index: 10;
6
+ }
7
+
8
+ tfoot {
9
+ display: table-footer-group;
10
+ position: sticky;
11
+ bottom: 0;
12
+ z-index: 10;
13
+ background: red;
14
+ }
15
+
16
+ tbody {
17
+ position: relative;
18
+ }
19
+
20
+ tbody.foot {
21
+ height: 100vh;
22
+ }
@@ -3349,8 +3349,8 @@ const Qo = class Qo {
3349
3349
  const e = Array.from(t(this, et).children).filter((c) => c.tagName.toUpperCase() === "TABLE"), s = t(this, et).getAttribute("auto-height") === "true", i = e.length, n = e.map((c, u) => {
3350
3350
  const g = u === 0 ? "active" : "", f = c.id || `sheet${u + 1}`, b = `<nine-table-sheet class="${g}" data-index="${u}" data-sheet-id="${f}" id="${f}"></nine-table-sheet>`, m = u < i - 1 ? `<nine-splitter class="h" data-split-index="${u}"></nine-splitter>` : "";
3351
3351
  return b + m;
3352
- }).join(""), o = ["layout.css", "nine-table-sheet.css"], l = o.map(
3353
- (c) => `@import "https://cdn.jsdelivr.net/npm/@ninebone/table@0.1.37/dist/css/${c}";`
3352
+ }).join(""), o = ["layout.css", "nine-table-sheet.css", "nine-table-vscrollbar", "nine-table-hscrollbar", "table"], l = o.map(
3353
+ (c) => `@import "https://cdn.jsdelivr.net/npm/@ninebone/table@0.1.39/dist/css/${c}";`
3354
3354
  ), a = [];
3355
3355
  nine.cssPath && o.forEach((c) => {
3356
3356
  a.push(`@import "${nine.cssPath}/${c}";`);