@ninebone/table 0.0.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 (63) hide show
  1. package/dist/css/_common.css +11 -0
  2. package/dist/css/ai.css +609 -0
  3. package/dist/css/aiMessage.css +18 -0
  4. package/dist/css/ideAssi.css +616 -0
  5. package/dist/css/ideDiff.css +124 -0
  6. package/dist/css/ngButton.css +40 -0
  7. package/dist/css/ngCheckBox.css +81 -0
  8. package/dist/css/ngColExpand.css +17 -0
  9. package/dist/css/ngCombo.css +75 -0
  10. package/dist/css/ngComboPanel.css +102 -0
  11. package/dist/css/ngExpandButton.css +71 -0
  12. package/dist/css/ngExpandCheck.css +34 -0
  13. package/dist/css/ngExpandIcon.css +36 -0
  14. package/dist/css/ngFilterPanel.css +94 -0
  15. package/dist/css/ngFlexBox.css +7 -0
  16. package/dist/css/ngFoot.css +109 -0
  17. package/dist/css/ngHScrollBar.css +85 -0
  18. package/dist/css/ngHead.css +86 -0
  19. package/dist/css/ngImg.css +22 -0
  20. package/dist/css/ngInfo.css +54 -0
  21. package/dist/css/ngInputColor.css +77 -0
  22. package/dist/css/ngInputDate.css +74 -0
  23. package/dist/css/ngInputText.css +65 -0
  24. package/dist/css/ngMaximize.css +26 -0
  25. package/dist/css/ngProgress.css +40 -0
  26. package/dist/css/ngRadio.css +61 -0
  27. package/dist/css/ngRenderer.css +59 -0
  28. package/dist/css/ngRowDetail.css +26 -0
  29. package/dist/css/ngRowDrag.css +13 -0
  30. package/dist/css/ngRowExpand.css +20 -0
  31. package/dist/css/ngRowIndicator.css +111 -0
  32. package/dist/css/ngRowPin.css +30 -0
  33. package/dist/css/ngRowState.css +16 -0
  34. package/dist/css/ngSvg.css +22 -0
  35. package/dist/css/ngTextArea.css +64 -0
  36. package/dist/css/ngTreeItem.css +133 -0
  37. package/dist/css/ngVScrollBar.css +85 -0
  38. package/dist/css/ninegrid.css +1212 -0
  39. package/dist/css/nxAlert.css +142 -0
  40. package/dist/css/nxButtons.css +33 -0
  41. package/dist/css/nxCollapse.css +67 -0
  42. package/dist/css/nxConfirm.css +143 -0
  43. package/dist/css/nxDialog.css +606 -0
  44. package/dist/css/nxDiv.css +120 -0
  45. package/dist/css/nxEditor.css +171 -0
  46. package/dist/css/nxForm.css +67 -0
  47. package/dist/css/nxModal.css +627 -0
  48. package/dist/css/nxPanel.css +129 -0
  49. package/dist/css/nxSideMenu.css +62 -0
  50. package/dist/css/nxSideMenuBody.css +8 -0
  51. package/dist/css/nxSideMenuFoot.css +78 -0
  52. package/dist/css/nxSideMenuHead.css +82 -0
  53. package/dist/css/nxSideMenuItem.css +203 -0
  54. package/dist/css/nxSplitter.css +63 -0
  55. package/dist/css/nxTab.css +193 -0
  56. package/dist/css/nxTitle.css +210 -0
  57. package/dist/css/nxTitle2.css +33 -0
  58. package/dist/index.html +60 -0
  59. package/dist/nine-table.js +141 -0
  60. package/dist/nine-table.js.map +1 -0
  61. package/dist/nine-table.umd.js +47 -0
  62. package/dist/nine-table.umd.js.map +1 -0
  63. package/package.json +34 -0
@@ -0,0 +1,193 @@
1
+ :host {
2
+ position: relative;
3
+ }
4
+ :host(nx-tab.theme-1) {
5
+ .tabs {
6
+ --border-bottom: 1px solid #eee;
7
+ gap: 3px;
8
+ }
9
+ .tab-button {
10
+ color: #666;
11
+ font-weight: 500;
12
+ transform: translateY(1px);
13
+ z-index: 1;
14
+ --border-bottom: 1px solid #ccc;
15
+ }
16
+ .tab-button.active {
17
+ color: #666;
18
+ font-weight: 700;
19
+ border-bottom: 1px solid white;
20
+ }
21
+ .tab-pages {
22
+ border: 1px solid #ccc;
23
+ }
24
+ }
25
+
26
+ :host(.theme-2) {
27
+ .tabs {
28
+ border-bottom: 1px solid #eee;
29
+ gap: 40px;
30
+ }
31
+ .tab-button {
32
+ color: #666;
33
+ font-weight: 500;
34
+ border: none;
35
+ }
36
+ .tab-button.active {
37
+ color: green;
38
+ font-weight: 700;
39
+ border-bottom: 3px solid green;
40
+ }
41
+ }
42
+
43
+ :host(.theme-3) {
44
+ .tabs {
45
+ border-bottom: 1px solid #eee;
46
+ gap: 16px;
47
+ button {
48
+ display: block;
49
+ }
50
+ }
51
+ .tab-button {
52
+ color: #666;
53
+ font-weight: 500;
54
+ border: none;
55
+ padding: 4px;
56
+ font-size: 12px;
57
+ }
58
+ .tab-button.active {
59
+ color: green;
60
+ font-weight: 700;
61
+ border-bottom: 3px solid green;
62
+ }
63
+ .tab-pages {
64
+ border-bottom: 1px solid #f0f0f0;
65
+ height: 100%;
66
+ }
67
+ .tab-page {
68
+ padding: 4px 16px;
69
+ font-size: 12px;
70
+ display: flex;
71
+ justify-content: center;
72
+ align-items: stretch;
73
+ button.search {
74
+ margin-top: -4px;
75
+ margin-bottom: -4px;
76
+ margin-right: -16px;
77
+ cursor: pointer;
78
+ }
79
+ }
80
+ }
81
+
82
+ :host(.theme-4) {
83
+ display: flex;
84
+ flex-direction: column;
85
+ width: 100%;
86
+ height: 100%;
87
+
88
+
89
+ .tabs {
90
+ border-bottom: 1px solid #eee;
91
+ gap: 16px;
92
+ button {
93
+ display: block;
94
+ }
95
+ }
96
+ .tab-button {
97
+ color: #666;
98
+ font-weight: 500;
99
+ border: none;
100
+ padding: 4px;
101
+ font-size: 12px;
102
+ }
103
+ .tab-button.active {
104
+ color: green;
105
+ font-weight: 700;
106
+ border-bottom: 3px solid green;
107
+ }
108
+ .tab-pages {
109
+ border-bottom: 1px solid #f0f0f0;
110
+ height: 100% !important;
111
+ div {
112
+ height: 100%;
113
+ }
114
+ }
115
+ .tab-page {
116
+ padding: 4px 0 0;
117
+ font-size: 12px;
118
+ display: flex;
119
+ justify-content: center;
120
+ align-items: stretch;
121
+ button.search {
122
+ margin-top: -4px;
123
+ margin-bottom: -4px;
124
+ margin-right: -16px;
125
+ cursor: pointer;
126
+ }
127
+ }
128
+ }
129
+
130
+ .tabs {
131
+ display: flex;
132
+ button {
133
+ display: none;
134
+ position: absolute;
135
+ --top: 2px;
136
+ right: 2px;
137
+ cursor: pointer;
138
+ width: 16px;
139
+ height: 16px;
140
+ border: none;
141
+ background-color: transparent;
142
+ background-repeat: no-repeat;
143
+ background-position: center;
144
+ background-size: auto;
145
+ background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="darkgray" class="bi bi-box-arrow-in-up-right" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M6.364 13.5a.5.5 0 0 0 .5.5H13.5a1.5 1.5 0 0 0 1.5-1.5v-10A1.5 1.5 0 0 0 13.5 1h-10A1.5 1.5 0 0 0 2 2.5v6.636a.5.5 0 1 0 1 0V2.5a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 .5.5v10a.5.5 0 0 1-.5.5H6.864a.5.5 0 0 0-.5.5"/><path fill-rule="evenodd" d="M11 5.5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793l-8.147 8.146a.5.5 0 0 0 .708.708L10 6.707V10.5a.5.5 0 0 0 1 0z"/></svg>');
146
+ animation: rotate-out 0.3s ease-in-out forwards;
147
+ }
148
+ }
149
+ .tab-button {
150
+ padding: 8px;
151
+ border: 1px solid #ccc;
152
+ text-align: center;
153
+ outline: 0;
154
+ cursor: pointer;
155
+ transition: all 0.3s ease;
156
+ }
157
+ .tab-button:hover {
158
+ filter: brightness(80%);
159
+ --background-color: #777; /* 진한 배경으로 강조 */
160
+ --box-shadow: 0 2px 8px rgba(0,0,0,0.3); /* 입체감 glow */
161
+ transform: scale(1.05); /* 약간 확대 */
162
+ }
163
+ .tab-pages {
164
+ position: relative;
165
+ width: 100%;
166
+ overflow: hidden;
167
+ transition: height 0.5s ease-in-out;
168
+ transform: translateY(-1px);
169
+ }
170
+ .tab-page {
171
+ position: absolute;
172
+ width: 100%;
173
+ top: 0;
174
+ transition: left 0.5s ease-in-out;
175
+ padding: 16px;
176
+ box-sizing: border-box;
177
+ white-space: nowrap;
178
+ overflow: hidden;
179
+ text-overflow: ellipsis;
180
+ text-align: left;
181
+ }
182
+ .tab-page.active {
183
+ left: 0;
184
+ }
185
+ .tab-page.exit-left {
186
+ left: -100%;
187
+ }
188
+ .tab-page.exit-right {
189
+ left: 100%;
190
+ }
191
+
192
+
193
+
@@ -0,0 +1,210 @@
1
+ :host(nx-title) {
2
+
3
+ display: flex;
4
+ justify-content: center;
5
+ width: 100%;
6
+ height: 0;
7
+
8
+ .wrapper {
9
+ display: flex;
10
+
11
+ .title-wrapper {
12
+ background: darkcyan;
13
+ --opacity: 0.3;
14
+ height: 24px;
15
+ display: flex;
16
+ align-items: center;
17
+ --font-weight: 700;
18
+ padding: 0 32px 4px;
19
+ --background-color: #666;
20
+ border-top: none;
21
+ border-bottom-right-radius: 8px;
22
+ border-bottom-left-radius: 8px;
23
+ --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
24
+ --gap: 4px;
25
+ .title-icon {
26
+ display: none;
27
+ --width: 16px;
28
+ height: 16px;
29
+ background-repeat: no-repeat;
30
+ background-position: center;
31
+ background-size: auto;
32
+ background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgb(200,200,200)" class="bi bi-grid" viewBox="0 0 16 16"><path d="M1 2.5A1.5 1.5 0 0 1 2.5 1h3A1.5 1.5 0 0 1 7 2.5v3A1.5 1.5 0 0 1 5.5 7h-3A1.5 1.5 0 0 1 1 5.5zM2.5 2a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zm6.5.5A1.5 1.5 0 0 1 10.5 1h3A1.5 1.5 0 0 1 15 2.5v3A1.5 1.5 0 0 1 13.5 7h-3A1.5 1.5 0 0 1 9 5.5zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zM1 10.5A1.5 1.5 0 0 1 2.5 9h3A1.5 1.5 0 0 1 7 10.5v3A1.5 1.5 0 0 1 5.5 15h-3A1.5 1.5 0 0 1 1 13.5zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zm6.5.5A1.5 1.5 0 0 1 10.5 9h3a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-3A1.5 1.5 0 0 1 9 13.5zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5z"/></svg>');
33
+ }
34
+ span {
35
+ padding-left: 8px;
36
+ padding-right: 8px;
37
+ color: white;
38
+ font-weight: 700;
39
+ font-size: 14px;
40
+ }
41
+
42
+ .bar1, .bar8 {
43
+ display: none;
44
+ width: 4px;
45
+ height: 4px;
46
+ border-radius: 50%;
47
+ background: green;
48
+ }
49
+ .bar2, .bar7 {
50
+ display: none;
51
+ width: 32px;
52
+ height: 1px;
53
+ background: green;
54
+ }
55
+ }
56
+ }
57
+
58
+ /* Breadcrumb CSS */
59
+ .breadcrumb-container {
60
+ position: absolute;
61
+ right: 4px;
62
+ margin-top: 2px;
63
+ padding: 0px 4px;
64
+ font-size: 10px;
65
+ color: #777;
66
+ display: flex; /* 가로 정렬 */
67
+ align-items: center;
68
+ justify-content: flex-end; /* 오른쪽 정렬 */
69
+ --border-left: 2px solid #666;
70
+ border-right: 2px solid #666;
71
+ }
72
+ .breadcrumb-item {
73
+ white-space: nowrap; /* 줄바꿈 방지 */
74
+ }
75
+ .breadcrumb-separator {
76
+ margin: 0 5px;
77
+ color: #bbb;
78
+ }
79
+ .breadcrumb-current {
80
+ --font-weight: bold;
81
+ color: #333;
82
+ }
83
+
84
+ /* Title CSS (아이콘 및 텍스트 스타일) */
85
+ .title-wrapper {
86
+ display: flex;
87
+ align-items: center;
88
+ padding-bottom: 2px;
89
+ --border-bottom: 2px solid #eee;
90
+ --margin-bottom: 15px;
91
+ }
92
+ .title-icon {
93
+ margin-right: 10px;
94
+ font-size: 20px;
95
+ color: #333;
96
+ /* Font Awesome 등 외부 아이콘 라이브러리를 사용하는 경우 */
97
+ /* font-family: 'Font Awesome 5 Free'; */
98
+ /* font-weight: 900; */
99
+ /* content: ' 054'; */
100
+ }
101
+ .title-text {
102
+ font-size: 18px;
103
+ font-weight: bold;
104
+ color: #333;
105
+ }
106
+
107
+ a {
108
+ color: #007bff; /* 파란색 계열로 링크임을 강조 */
109
+ text-decoration: none; /* 기본 밑줄 제거 */
110
+ transition: color 0.3s, background-color 0.3s; /* 호버 효과를 부드럽게 */
111
+ }
112
+ /* 마우스 오버 시 */
113
+ a:hover {
114
+ color: #0056b3; /* 기본색보다 어둡게 변경 */
115
+ text-decoration: underline; /* 밑줄을 다시 추가하여 클릭 유도 */
116
+ }
117
+
118
+ /* 클릭 중일 때 */
119
+ a:active {
120
+ color: #004085; /* 더 어둡게 변경 */
121
+ }
122
+
123
+ /* 방문한 링크 */
124
+ a:visited {
125
+ color: #007bff; /* 방문한 링크는 다른 색으로 변경 */
126
+ }
127
+ }
128
+
129
+
130
+ :host(nx-title.sub) {
131
+
132
+ .wrapper {
133
+ display: flex; /* 아이콘과 텍스트를 한 줄에 정렬 */
134
+ justify-content: space-between;
135
+ align-items: flex-end;
136
+ --padding: 10px 15px; /* 내부 여백 */
137
+ border-bottom: 2px solid #eee; /* 아래쪽 구분선 */
138
+ margin-bottom: 15px; /* 아래쪽 여백 */
139
+ }
140
+
141
+
142
+ /* Breadcrumb CSS */
143
+ .breadcrumb-container {
144
+ padding: 0 4px 0 0;
145
+ --background-color: #f5f5f5;
146
+ --border-bottom: 1px solid #eee;
147
+ font-size: 10px;
148
+ color: #777;
149
+ display: flex; /* 가로 정렬 */
150
+ align-items: center;
151
+ justify-content: flex-end; /* 오른쪽 정렬 */
152
+ --margin-bottom: 15px; /* 제목과의 간격 */
153
+ }
154
+ .breadcrumb-item {
155
+ white-space: nowrap; /* 줄바꿈 방지 */
156
+ }
157
+ .breadcrumb-separator {
158
+ margin: 0 5px;
159
+ color: #bbb;
160
+ }
161
+ .breadcrumb-current {
162
+ --font-weight: bold;
163
+ color: #333;
164
+ }
165
+
166
+ /* Title CSS (아이콘 및 텍스트 스타일) */
167
+ .title-wrapper {
168
+ display: flex;
169
+ align-items: center;
170
+ padding-bottom: 2px;
171
+ --border-bottom: 2px solid #eee;
172
+ --margin-bottom: 15px;
173
+ }
174
+ .title-icon {
175
+ margin-right: 10px;
176
+ font-size: 20px;
177
+ color: #333;
178
+ /* Font Awesome 등 외부 아이콘 라이브러리를 사용하는 경우 */
179
+ /* font-family: 'Font Awesome 5 Free'; */
180
+ /* font-weight: 900; */
181
+ /* content: ' 054'; */
182
+ }
183
+ .title-text {
184
+ font-size: 18px;
185
+ font-weight: bold;
186
+ color: #333;
187
+ }
188
+
189
+ a {
190
+ color: #007bff; /* 파란색 계열로 링크임을 강조 */
191
+ text-decoration: none; /* 기본 밑줄 제거 */
192
+ transition: color 0.3s, background-color 0.3s; /* 호버 효과를 부드럽게 */
193
+ }
194
+ /* 마우스 오버 시 */
195
+ a:hover {
196
+ color: #0056b3; /* 기본색보다 어둡게 변경 */
197
+ text-decoration: underline; /* 밑줄을 다시 추가하여 클릭 유도 */
198
+ }
199
+
200
+ /* 클릭 중일 때 */
201
+ a:active {
202
+ color: #004085; /* 더 어둡게 변경 */
203
+ }
204
+
205
+ /* 방문한 링크 */
206
+ a:visited {
207
+ color: #007bff; /* 방문한 링크는 다른 색으로 변경 */
208
+ }
209
+ }
210
+
@@ -0,0 +1,33 @@
1
+ :host(nx-title2) {
2
+
3
+ display: flex;
4
+ flex-direction: row;
5
+ justify-content: space-between;
6
+ border-bottom: 1px solid #ccc;
7
+
8
+ .left {
9
+ display: flex;
10
+ padding: 0 8px;
11
+ border-bottom: 2px solid green;
12
+ margin-bottom: -1px;
13
+ font-weight: bold;
14
+ color: green;
15
+ font-size: 16px;
16
+ }
17
+
18
+ nx-buttons {
19
+ padding-bottom: 2px;
20
+ padding-right: 4px;
21
+ }
22
+ }
23
+
24
+ :host(nx-title2.changed) .left span::after {
25
+ content: '*';
26
+ color: red;
27
+ font-size: 12px;
28
+ font-weight: normal;
29
+ margin-left: 4px;
30
+ }
31
+
32
+
33
+
@@ -0,0 +1,60 @@
1
+ <!DOCTYPE html>
2
+ <html lang="ko">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <title>태그 라이브러리 테스트</title>
6
+
7
+
8
+ <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
9
+ <script src="../src/_back/etc/object-observe.js"></script>
10
+
11
+ <script type="module" src="../dist/bundle.cjs.js"></script>
12
+
13
+ <script>
14
+ //ninegrid.cssPath = "/src/css";
15
+ //console.log(ninegrid);
16
+ </script>
17
+ </head>
18
+ <body>
19
+ <nine-table display-row-count="3" row-resizable="true" col-movable="true" css-path="/src/css">
20
+  <table>
21
+   <colgroup>
22
+    <col width="40" fixed="left">
23
+    <col width="100" fixed="left">
24
+    <col width="100">
25
+    <col width="100">
26
+    <col width="200">
27
+    <col width="100">
28
+    <col width="100">
29
+    <col width="100">
30
+   </colgroup>
31
+   <thead>
32
+    <tr>
33
+     <th>No.</th>
34
+     <th><nx-i18n><datalist><option locale="ko" label="이름"></option><option locale="en" label="Name"></option></datalist></nx-i18n></th>
35
+     <th><nx-i18n><datalist><option locale="ko" label="성별"></option><option locale="en" label="Gender"></option></datalist></nx-i18n></th>
36
+     <th><nx-i18n><datalist><option locale="ko" label="나이"></option><option locale="en" label="Age"></option></datalist></nx-i18n></th>
37
+     <th><nx-i18n><datalist><option locale="ko" label="연락처"></option><option locale="en" label="Contact"></option></datalist></nx-i18n></th>
38
+     <th><nx-i18n><datalist><option locale="ko" label="국어"></option><option locale="en" label="Korean"></option></datalist></nx-i18n></th>
39
+     <th><nx-i18n><datalist><option locale="ko" label="수학"></option><option locale="en" label="Math"></option></datalist></nx-i18n></th>
40
+     <th><nx-i18n><datalist><option locale="ko" label="영어"></option><option locale="en" label="English"></option></datalist></nx-i18n></th>
41
+    </tr>
42
+   </thead>
43
+   <tbody>
44
+    <tr>
45
+     <th data-bind="rowState" data-expr="data.__ng._[ninegrid.ROW.ORDER]" text-align="center">
46
+      <ng-row-indicator has-icon-pin="true" has-icon-detail="true" class="ng-left"></ng-row-indicator>
47
+     </th>
48
+     <td data-bind="NAME"></td>
49
+     <td data-bind="SEX" text-align="center"></td>
50
+     <td data-bind="AGE" text-align="right"></td>
51
+     <td data-bind="TEL"></td>
52
+     <td data-bind="REC1" text-align="right"></td>
53
+     <td data-bind="REC2" text-align="right"></td>
54
+     <td data-bind="REC3" text-align="right"></td>
55
+    </tr>
56
+   </tbody>
57
+  </table>
58
+ </nine-table>
59
+ </body>
60
+ </html>
@@ -0,0 +1,141 @@
1
+ var N = Object.defineProperty;
2
+ var H = (i) => {
3
+ throw TypeError(i);
4
+ };
5
+ var a = (i, e) => N(i, "name", { value: e, configurable: !0 });
6
+ var y = (i, e, t) => e.has(i) || H("Cannot " + t);
7
+ var o = (i, e, t) => (y(i, e, "read from private field"), t ? t.call(i) : e.get(i)), l = (i, e, t) => e.has(i) ? H("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), c = (i, e, t, r) => (y(i, e, "write to private field"), r ? r.call(i, t) : e.set(i, t), t), b = (i, e, t) => (y(i, e, "access private method"), t);
8
+ import { trace as W } from "@ninebone/util";
9
+ const S = class S extends W.constructor {
10
+ constructor() {
11
+ super(), this.init("nine-table", "green");
12
+ }
13
+ };
14
+ a(S, "Trace");
15
+ let w = S;
16
+ const p = new w();
17
+ var x, d, s, h, R, $;
18
+ const q = class q {
19
+ constructor(e, t) {
20
+ l(this, h);
21
+ l(this, x);
22
+ l(this, d);
23
+ l(this, s);
24
+ c(this, x, e), c(this, d, t), c(this, s, e.shadowRoot);
25
+ }
26
+ init() {
27
+ b(this, h, R).call(this), b(this, h, $).call(this), o(this, d).length > 0 && this.renderTable(0), p.log("TableView initialized with proper flex row layout for 3 columns.");
28
+ }
29
+ renderTable(e) {
30
+ o(this, d)[e] && (this.tabBar.innerHTML = "", o(this, d).forEach((t, r) => {
31
+ const n = document.createElement("div");
32
+ n.className = `grid-tab-item ${r === e ? "active" : ""}`, n.textContent = `Table ${r + 1}`, n.addEventListener("click", () => this.renderTable(r)), this.tabBar.appendChild(n);
33
+ }), this.tableContainer.innerHTML = "", this.tableContainer.appendChild(o(this, d)[e].cloneNode(!0)), p.log(`Rendered layout tab index: ${e}`));
34
+ }
35
+ destroy() {
36
+ o(this, s).innerHTML = "", p.log("TableView destroyed.");
37
+ }
38
+ };
39
+ x = new WeakMap(), d = new WeakMap(), s = new WeakMap(), h = new WeakSet(), R = /* @__PURE__ */ a(function() {
40
+ o(this, s).innerHTML = `
41
+ <style>
42
+ :host { display: block; position: relative; overflow: hidden; height: 100%; }
43
+ .grid-root { display: flex; flex-direction: column; height: 100%; position: relative; }
44
+
45
+ /* 탭 바와 푸터 사이에 가로로 3개 영역을 나란히 묶어주는 래퍼 추가 */
46
+ .grid-main-layout { display: flex; flex: 1; overflow: hidden; position: relative; }
47
+
48
+ .grid-sidebar-left { width: 150px; flex-shrink: 0; overflow: auto; border-right: 1px solid #e5e7eb; background: #f9fafb; }
49
+ .grid-viewport { flex: 1; overflow: auto; position: relative; background: #ffffff; display: flex; flex-direction: column; }
50
+ .grid-sidebar-right { width: 150px; flex-shrink: 0; overflow: auto; border-left: 1px solid #e5e7eb; background: #f9fafb; }
51
+
52
+ .grid-footer-bar { display: flex; height: 16px; flex-shrink: 0; }
53
+
54
+ /* 탭 내비게이션 및 테이블 뷰포트 */
55
+ .grid-tab-bar { display: flex; background: #f3f4f6; border-bottom: 1px solid #e5e7eb; height: 36px; align-items: center; padding: 0 8px; gap: 4px; flex-shrink: 0; }
56
+ .grid-tab-item { padding: 6px 14px; cursor: pointer; font-size: 13px; color: #4b5563; border: 1px solid transparent; border-bottom: none; border-radius: 4px 4px 0 0; }
57
+ .grid-tab-item.active { background: #ffffff; border-color: #e5e7eb; color: #111827; font-weight: 600; }
58
+
59
+ .grid-table-container { flex: 1; overflow: auto; }
60
+ table { border-collapse: collapse; width: 100%; table-layout: fixed; }
61
+ th, td { box-sizing: border-box; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 6px 8px; border: 1px solid #e5e7eb; }
62
+ </style>
63
+
64
+ <div class="grid-root">
65
+ <!-- 최상단 탭 바 -->
66
+ <div class="grid-tab-bar"></div>
67
+
68
+ <!-- 가로 배치를 위한 중간 메인 래퍼 -->
69
+ <div class="grid-main-layout">
70
+ <!-- 1. 좌측 통계/사이드 영역 -->
71
+ <div class="grid-sidebar-left"></div>
72
+
73
+ <!-- 2. 중앙 테이블 뷰포트 -->
74
+ <div class="grid-viewport">
75
+ <div class="grid-table-container"></div>
76
+ </div>
77
+
78
+ <!-- 3. 우측 통계/사이드 영역 -->
79
+ <div class="grid-sidebar-right"></div>
80
+ </div>
81
+
82
+ <!-- 최하단 푸터 바 -->
83
+ <div class="grid-footer-bar"></div>
84
+ </div>
85
+ `;
86
+ }, "#renderShell"), $ = /* @__PURE__ */ a(function() {
87
+ this.sidebarLeft = o(this, s).querySelector(".grid-sidebar-left"), this.tableContainer = o(this, s).querySelector(".grid-table-container"), this.sidebarRight = o(this, s).querySelector(".grid-sidebar-right"), this.tabBar = o(this, s).querySelector(".grid-tab-bar");
88
+ }, "#bindElements"), a(q, "TableView");
89
+ let k = q;
90
+ var m, f, A, B;
91
+ const T = class T {
92
+ constructor(e) {
93
+ l(this, f);
94
+ l(this, m);
95
+ c(this, m, e);
96
+ }
97
+ // [Public] 테이블 초기화 진입점 (필요한 최소한의 마크업 보정만 수행)
98
+ initializeTable(e) {
99
+ return b(this, f, A).call(this, e), b(this, f, B).call(this, e), e.classList.add("nine-table-element"), e;
100
+ }
101
+ };
102
+ m = new WeakMap(), f = new WeakSet(), // [Private] colgroup 보정
103
+ A = /* @__PURE__ */ a(function(e) {
104
+ var v;
105
+ if (e.querySelector("colgroup")) return;
106
+ const t = ((v = e.querySelector("tbody tr")) == null ? void 0 : v.querySelectorAll("th, td").length) || 1, r = document.createElement("colgroup"), n = Math.max(Math.floor((e.clientWidth || 600) / t), 100);
107
+ for (let M = 0; M < t; M++) {
108
+ const z = document.createElement("col");
109
+ z.setAttribute("width", n), r.appendChild(z);
110
+ }
111
+ e.prepend(r);
112
+ }, "#ensureColgroup"), // [Private] thead 보정
113
+ B = /* @__PURE__ */ a(function(e) {
114
+ if (e.querySelector("thead")) return;
115
+ const t = document.createElement("thead"), r = e.querySelector("colgroup");
116
+ r ? r.after(t) : e.prepend(t);
117
+ }, "#ensureThead"), a(T, "TableInitializer");
118
+ let E = T;
119
+ var u, g;
120
+ const L = class L extends HTMLElement {
121
+ constructor() {
122
+ super();
123
+ l(this, u, !1);
124
+ l(this, g, []);
125
+ this.attachShadow({ mode: "open" });
126
+ }
127
+ connectedCallback() {
128
+ if (o(this, u)) return;
129
+ this.querySelectorAll("table").forEach((r) => {
130
+ const v = new E(this).initializeTable(r);
131
+ o(this, g).push(v), r.style.display = "none";
132
+ }), this.view = new k(this, o(this, g)), this.view.init(), c(this, u, !0), p.log("NineTable connected and layout initialized."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
133
+ }
134
+ disconnectedCallback() {
135
+ this.view && this.view.destroy(), p.log("NineTable disconnected.");
136
+ }
137
+ };
138
+ u = new WeakMap(), g = new WeakMap(), a(L, "NineTable");
139
+ let C = L;
140
+ customElements.get("nine-table") || customElements.define("nine-table", C);
141
+ //# sourceMappingURL=nine-table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nine-table.js","sources":["../src/external/NoPeer.js","../src/ui/TableView.js","../src/ui/TableInitializer.js","../src/core/nine-table.js"],"sourcesContent":["import { trace as traceOrigin } from '@ninebone/util';\n\nexport class Trace extends traceOrigin.constructor {\n constructor() {\n super();\n this.init(\"nine-table\", \"green\");\n }\n}\n\nexport const trace = new Trace();","import {trace} from \"@nopeer\";\n\nexport class TableView {\n #container;\n #layouts;\n #shadowRoot;\n\n constructor(container, layouts) {\n this.#container = container;\n this.#layouts = layouts;\n this.#shadowRoot = container.shadowRoot;\n }\n\n init() {\n this.#renderShell();\n this.#bindElements();\n\n if (this.#layouts.length > 0) {\n this.renderTable(0);\n }\n trace.log('TableView initialized with proper flex row layout for 3 columns.');\n }\n\n #renderShell() {\n this.#shadowRoot.innerHTML = `\n <style>\n :host { display: block; position: relative; overflow: hidden; height: 100%; }\n .grid-root { display: flex; flex-direction: column; height: 100%; position: relative; }\n \n /* 탭 바와 푸터 사이에 가로로 3개 영역을 나란히 묶어주는 래퍼 추가 */\n .grid-main-layout { display: flex; flex: 1; overflow: hidden; position: relative; }\n\n .grid-sidebar-left { width: 150px; flex-shrink: 0; overflow: auto; border-right: 1px solid #e5e7eb; background: #f9fafb; }\n .grid-viewport { flex: 1; overflow: auto; position: relative; background: #ffffff; display: flex; flex-direction: column; }\n .grid-sidebar-right { width: 150px; flex-shrink: 0; overflow: auto; border-left: 1px solid #e5e7eb; background: #f9fafb; }\n \n .grid-footer-bar { display: flex; height: 16px; flex-shrink: 0; }\n \n /* 탭 내비게이션 및 테이블 뷰포트 */\n .grid-tab-bar { display: flex; background: #f3f4f6; border-bottom: 1px solid #e5e7eb; height: 36px; align-items: center; padding: 0 8px; gap: 4px; flex-shrink: 0; }\n .grid-tab-item { padding: 6px 14px; cursor: pointer; font-size: 13px; color: #4b5563; border: 1px solid transparent; border-bottom: none; border-radius: 4px 4px 0 0; }\n .grid-tab-item.active { background: #ffffff; border-color: #e5e7eb; color: #111827; font-weight: 600; }\n\n .grid-table-container { flex: 1; overflow: auto; }\n table { border-collapse: collapse; width: 100%; table-layout: fixed; }\n th, td { box-sizing: border-box; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 6px 8px; border: 1px solid #e5e7eb; }\n </style>\n \n <div class=\"grid-root\">\n <!-- 최상단 탭 바 -->\n <div class=\"grid-tab-bar\"></div>\n\n <!-- 가로 배치를 위한 중간 메인 래퍼 -->\n <div class=\"grid-main-layout\">\n <!-- 1. 좌측 통계/사이드 영역 -->\n <div class=\"grid-sidebar-left\"></div>\n \n <!-- 2. 중앙 테이블 뷰포트 -->\n <div class=\"grid-viewport\">\n <div class=\"grid-table-container\"></div>\n </div>\n \n <!-- 3. 우측 통계/사이드 영역 -->\n <div class=\"grid-sidebar-right\"></div>\n </div>\n\n <!-- 최하단 푸터 바 -->\n <div class=\"grid-footer-bar\"></div>\n </div>\n `;\n }\n\n #bindElements() {\n this.sidebarLeft = this.#shadowRoot.querySelector('.grid-sidebar-left');\n this.tableContainer = this.#shadowRoot.querySelector('.grid-table-container');\n this.sidebarRight = this.#shadowRoot.querySelector('.grid-sidebar-right');\n this.tabBar = this.#shadowRoot.querySelector('.grid-tab-bar');\n }\n\n renderTable(index) {\n if (!this.#layouts[index]) return;\n\n this.tabBar.innerHTML = '';\n this.#layouts.forEach((_, idx) => {\n const tab = document.createElement('div');\n tab.className = `grid-tab-item ${idx === index ? 'active' : ''}`;\n tab.textContent = `Table ${idx + 1}`;\n tab.addEventListener('click', () => this.renderTable(idx));\n this.tabBar.appendChild(tab);\n });\n\n this.tableContainer.innerHTML = '';\n this.tableContainer.appendChild(this.#layouts[index].cloneNode(true));\n\n trace.log(`Rendered layout tab index: ${index}`);\n }\n\n destroy() {\n this.#shadowRoot.innerHTML = '';\n trace.log('TableView destroyed.');\n }\n}","export class TableInitializer {\n #container;\n\n constructor(container) {\n this.#container = container;\n }\n\n // [Public] 테이블 초기화 진입점 (필요한 최소한의 마크업 보정만 수행)\n initializeTable(tbl) {\n this.#ensureColgroup(tbl);\n this.#ensureThead(tbl);\n\n tbl.classList.add('nine-table-element');\n return tbl;\n }\n\n // [Private] colgroup 보정\n #ensureColgroup(tbl) {\n if (tbl.querySelector('colgroup')) return;\n\n const colCount = tbl.querySelector('tbody tr')?.querySelectorAll('th, td').length || 1;\n const colgroup = document.createElement('colgroup');\n const defaultWidth = Math.max(Math.floor((tbl.clientWidth || 600) / colCount), 100);\n\n for (let i = 0; i < colCount; i++) {\n const col = document.createElement('col');\n col.setAttribute('width', defaultWidth);\n colgroup.appendChild(col);\n }\n tbl.prepend(colgroup);\n }\n\n // [Private] thead 보정\n #ensureThead(tbl) {\n if (tbl.querySelector('thead')) return;\n\n const thead = document.createElement('thead');\n const colgroup = tbl.querySelector('colgroup');\n if (colgroup) {\n colgroup.after(thead);\n } else {\n tbl.prepend(thead);\n }\n }\n}","import {trace} from \"@nopeer\";\nimport { TableView } from '../ui/TableView.js';\nimport { TableInitializer } from '../ui/TableInitializer.js';\n\nexport default class NineTable extends HTMLElement {\n #created = false;\n #layouts = [];\n\n constructor() {\n super();\n // 최외곽 컴포넌트에만 Shadow DOM 적용\n this.attachShadow({ mode: 'open' });\n }\n\n connectedCallback() {\n if (this.#created) return;\n\n // 1. 컴포넌트 내부의 원본 table 태그들 수집\n const tables = this.querySelectorAll('table');\n tables.forEach(tbl => {\n const initializer = new TableInitializer(this);\n const processedTbl = initializer.initializeTable(tbl);\n this.#layouts.push(processedTbl);\n tbl.style.display = 'none'; // 원본 숨김\n });\n\n // 2. 뷰 초기화 (Shadow DOM 내부에 일반 DOM 엘리먼트들 생성)\n this.view = new TableView(this, this.#layouts);\n this.view.init();\n\n this.#created = true;\n trace.log('NineTable connected and layout initialized.');\n\n this.dispatchEvent(new CustomEvent('load', { bubbles: true, detail: { target: this } }));\n }\n\n disconnectedCallback() {\n if (this.view) {\n this.view.destroy();\n }\n trace.log('NineTable disconnected.');\n }\n}\n\nif (!customElements.get('nine-table')) {\n customElements.define('nine-table', NineTable);\n}"],"names":["_Trace","traceOrigin","__name","Trace","trace","_TableView","container","layouts","__privateAdd","_TableView_instances","_container","_layouts","_shadowRoot","__privateSet","__privateMethod","renderShell_fn","bindElements_fn","__privateGet","index","_","idx","tab","TableView","_TableInitializer","_TableInitializer_instances","tbl","ensureColgroup_fn","ensureThead_fn","colCount","_a","colgroup","defaultWidth","i","col","thead","TableInitializer","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