@sellmate/design-system 1.28.0 → 1.31.0

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 (467) hide show
  1. package/dist/cjs/design-system.cjs.js +2 -2
  2. package/dist/cjs/{index-D12oddge.js → index-Jr8OU0y9.js} +1 -15
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/sd-action-modal.cjs.entry.js +2 -2
  5. package/dist/cjs/sd-badge.cjs.entry.js +2 -2
  6. package/dist/cjs/sd-barcode-input.cjs.entry.js +2 -2
  7. package/dist/cjs/sd-button_2.cjs.entry.js +3 -3
  8. package/dist/cjs/sd-calendar_2.cjs.entry.js +8 -9
  9. package/dist/cjs/sd-callout.cjs.entry.js +2 -2
  10. package/dist/cjs/sd-card.cjs.entry.js +2 -2
  11. package/dist/cjs/sd-checkbox.cjs.entry.js +5 -5
  12. package/dist/cjs/sd-chip-input.cjs.entry.js +22 -17
  13. package/dist/cjs/sd-chip.cjs.entry.js +7 -7
  14. package/dist/cjs/sd-circle-progress.cjs.entry.js +4 -4
  15. package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +33 -36
  16. package/dist/cjs/sd-date-box.cjs.entry.js +1 -1
  17. package/dist/cjs/{component.datepicker-CUQbDSku.js → sd-date-picker.config-CgyNxY03.js} +64 -0
  18. package/dist/cjs/{sd-date-picker_7.cjs.entry.js → sd-date-picker_8.cjs.entry.js} +446 -47
  19. package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +162 -12
  20. package/dist/cjs/sd-divider.cjs.entry.js +3 -3
  21. package/dist/cjs/sd-dropdown-button.cjs.entry.js +2 -2
  22. package/dist/cjs/sd-field_3.cjs.entry.js +51 -52
  23. package/dist/cjs/sd-form.cjs.entry.js +1 -1
  24. package/dist/cjs/sd-ghost-button_3.cjs.entry.js +14 -10
  25. package/dist/cjs/sd-guide.cjs.entry.js +2 -2
  26. package/dist/cjs/sd-key-value-table.cjs.entry.js +88 -18
  27. package/dist/cjs/sd-linear-progress.cjs.entry.js +3 -3
  28. package/dist/cjs/sd-loading-container.cjs.entry.js +3 -3
  29. package/dist/cjs/sd-modal-container.cjs.entry.js +16 -2
  30. package/dist/cjs/sd-pagination.cjs.entry.js +173 -0
  31. package/dist/cjs/sd-popover.cjs.entry.js +134 -44
  32. package/dist/cjs/sd-popup.cjs.entry.js +3 -3
  33. package/dist/cjs/sd-radio-button.cjs.entry.js +3 -3
  34. package/dist/cjs/sd-radio.cjs.entry.js +4 -2
  35. package/dist/cjs/{sd-select_3.cjs.entry.js → sd-select-list-item_4.cjs.entry.js} +294 -315
  36. package/dist/cjs/sd-switch.cjs.entry.js +13 -3
  37. package/dist/cjs/sd-tabs.cjs.entry.js +2 -2
  38. package/dist/cjs/sd-text-link.cjs.entry.js +4 -4
  39. package/dist/cjs/sd-time-picker-selector.cjs.entry.js +179 -0
  40. package/dist/cjs/sd-time-picker-trigger.cjs.entry.js +75 -0
  41. package/dist/cjs/sd-time-picker.cjs.entry.js +173 -0
  42. package/dist/cjs/sd-time-picker.config-C7REB08L.js +156 -0
  43. package/dist/cjs/sd-time-range-picker-selector.cjs.entry.js +219 -0
  44. package/dist/cjs/sd-time-range-picker.cjs.entry.js +204 -0
  45. package/dist/cjs/sd-toast-container.cjs.entry.js +2 -2
  46. package/dist/cjs/sd-toast.cjs.entry.js +3 -3
  47. package/dist/cjs/sd-toggle.cjs.entry.js +2 -2
  48. package/dist/cjs/{system-MjrAugX-.js → system-B4KkVpu2.js} +1 -7
  49. package/dist/cjs/{tooltipArrow-Dda4ik0V.js → tooltipArrow-BlrFItn5.js} +1 -1
  50. package/dist/cjs/useDatePicker-j06ymWZ_.js +103 -0
  51. package/dist/collection/collection-manifest.json +8 -8
  52. package/dist/collection/components/sd-action-modal/sd-action-modal.js +1 -1
  53. package/dist/collection/components/sd-badge/sd-badge.js +1 -1
  54. package/dist/collection/components/sd-barcode-input/sd-barcode-input.js +1 -1
  55. package/dist/collection/components/sd-button/sd-button.js +2 -2
  56. package/dist/collection/components/sd-calendar/sd-calendar.js +3 -3
  57. package/dist/collection/components/sd-callout/sd-callout.js +1 -1
  58. package/dist/collection/components/sd-card/sd-card.js +1 -1
  59. package/dist/collection/components/sd-checkbox/sd-checkbox.js +8 -8
  60. package/dist/collection/components/sd-chip/sd-chip.js +8 -8
  61. package/dist/collection/components/sd-chip-input/sd-chip-input.css +3 -0
  62. package/dist/collection/components/sd-chip-input/sd-chip-input.js +43 -17
  63. package/dist/collection/components/sd-circle-progress/sd-circle-progress.css +1 -0
  64. package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +1 -1
  65. package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.css +3 -0
  66. package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +35 -59
  67. package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +2 -2
  68. package/dist/collection/components/sd-date-picker/sd-date-picker.js +23 -2
  69. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.css +75 -0
  70. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +152 -6
  71. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.config.js +27 -0
  72. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +59 -3
  73. package/dist/collection/components/sd-divider/sd-divider.js +1 -1
  74. package/dist/collection/components/sd-field/sd-field.css +4 -0
  75. package/dist/collection/components/sd-field/sd-field.js +58 -5
  76. package/dist/collection/components/sd-file-picker/sd-file-picker.config.js +17 -10
  77. package/dist/collection/components/sd-file-picker/sd-file-picker.js +46 -16
  78. package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
  79. package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +27 -3
  80. package/dist/collection/components/sd-input/sd-input.js +4 -4
  81. package/dist/collection/components/sd-key-value-table/sd-key-value-table.config.js +2 -0
  82. package/dist/collection/components/sd-key-value-table/sd-key-value-table.css +5 -1
  83. package/dist/collection/components/sd-key-value-table/sd-key-value-table.js +65 -15
  84. package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
  85. package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
  86. package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +1 -1
  87. package/dist/collection/components/sd-modal-container/sd-modal-container.js +15 -1
  88. package/dist/collection/components/sd-number-input/sd-number-input.js +58 -7
  89. package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
  90. package/dist/collection/components/sd-popover/sd-popover.config.js +41 -0
  91. package/dist/collection/components/sd-popover/sd-popover.js +189 -191
  92. package/dist/collection/components/sd-popup/sd-popup.js +1 -1
  93. package/dist/collection/components/sd-portal/sd-portal.js +1 -1
  94. package/dist/collection/components/sd-radio/sd-radio.js +25 -4
  95. package/dist/collection/components/sd-radio-button/sd-radio-button.js +6 -6
  96. package/dist/collection/components/sd-radio-group/sd-radio-group.js +7 -7
  97. package/dist/collection/components/sd-select/sd-select-list-item/sd-select-list-item.js +2 -2
  98. package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.js +4 -4
  99. package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +2 -2
  100. package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +2 -2
  101. package/dist/collection/components/sd-select/sd-select.js +4 -4
  102. package/dist/collection/components/sd-switch/sd-switch.js +54 -3
  103. package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
  104. package/dist/collection/components/sd-tag/sd-tag.js +7 -8
  105. package/dist/collection/components/sd-text-link/sd-text-link.js +3 -3
  106. package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
  107. package/dist/collection/components/sd-time-picker/sd-time-picker-selector/sd-time-picker-selector.css +87 -0
  108. package/dist/collection/components/sd-time-picker/sd-time-picker-selector/sd-time-picker-selector.js +266 -0
  109. package/dist/collection/components/sd-time-picker/sd-time-picker-trigger/sd-time-picker-trigger.css +38 -0
  110. package/dist/collection/components/sd-time-picker/sd-time-picker-trigger/sd-time-picker-trigger.js +216 -0
  111. package/dist/collection/components/sd-time-picker/sd-time-picker.config.js +78 -0
  112. package/dist/collection/components/sd-time-picker/sd-time-picker.css +12 -0
  113. package/dist/collection/components/sd-time-picker/sd-time-picker.js +761 -0
  114. package/dist/collection/components/sd-time-range-picker/sd-time-range-picker-selector/sd-time-range-picker-selector.css +102 -0
  115. package/dist/collection/components/sd-time-range-picker/sd-time-range-picker-selector/sd-time-range-picker-selector.js +338 -0
  116. package/dist/collection/components/sd-time-range-picker/sd-time-range-picker.config.js +23 -0
  117. package/dist/collection/components/sd-time-range-picker/sd-time-range-picker.css +12 -0
  118. package/dist/collection/components/sd-time-range-picker/sd-time-range-picker.js +809 -0
  119. package/dist/collection/components/sd-toast/sd-toast.js +2 -2
  120. package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
  121. package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
  122. package/dist/collection/components/sd-tooltip/sd-tooltip.js +36 -189
  123. package/dist/components/index.js +1 -1
  124. package/dist/components/p-1DsQj3tv.js +1 -0
  125. package/dist/components/p-2g4jlJ3i.js +1 -0
  126. package/dist/components/{p-BE6ymp9E.js → p-6U1qyU5A.js} +1 -1
  127. package/dist/components/{p-1i6Q61TF.js → p-B-EV9bey.js} +1 -1
  128. package/dist/components/p-B887QQl2.js +1 -0
  129. package/dist/components/{p-BysikR_g.js → p-BPzs63D8.js} +1 -1
  130. package/dist/components/p-Bth2l1cy.js +1 -0
  131. package/dist/components/{p-CTDPl65u.js → p-BvJ14GuJ.js} +1 -1
  132. package/dist/components/p-Bxv2AFOb.js +1 -0
  133. package/dist/components/p-C6o10dl7.js +1 -0
  134. package/dist/components/p-C6wuKkUq.js +1 -0
  135. package/dist/components/{p-BAVsc1Ml.js → p-C9IKm4j5.js} +1 -1
  136. package/dist/components/{p-BuADVB78.js → p-CH9dgzTr.js} +1 -1
  137. package/dist/components/p-CKV2W-zU.js +1 -0
  138. package/dist/components/p-CTCt17CE.js +1 -0
  139. package/dist/components/{p-laVsm9VM.js → p-CghFB91T.js} +1 -1
  140. package/dist/components/p-Ckr9iuVb.js +1 -0
  141. package/dist/components/p-ClbD4Gsr.js +1 -0
  142. package/dist/components/p-CmCOLnc0.js +1 -0
  143. package/dist/components/{p-DNbbdJIc.js → p-CwzkplrI.js} +1 -1
  144. package/dist/components/p-CzJ9g73f.js +1 -0
  145. package/dist/components/p-D8yhjm54.js +1 -0
  146. package/dist/components/p-D9qp3o5Y.js +1 -0
  147. package/dist/components/{p-Bgxca9o5.js → p-DE8Ws9As.js} +1 -1
  148. package/dist/components/p-DMm_GeZC.js +1 -0
  149. package/dist/components/{p-BnI9HUOv.js → p-DOfLrOEu.js} +1 -1
  150. package/dist/components/{p-vtuEYpc6.js → p-DSWD8udu.js} +1 -1
  151. package/dist/components/{p-BKV1WAFb.js → p-DWnuCSqC.js} +1 -1
  152. package/dist/components/p-DYjaQs6e.js +1 -0
  153. package/dist/components/{p-pwGA4sDj.js → p-DasiqnrU.js} +1 -1
  154. package/dist/components/p-Dc9g3-5z.js +1 -0
  155. package/dist/components/{p-ClD0nx1l.js → p-DnlLqzGM.js} +1 -1
  156. package/dist/components/p-DsZwiWiU.js +1 -0
  157. package/dist/components/{p-IDlLs_KA.js → p-FGII920I.js} +1 -1
  158. package/dist/components/p-Hjv7LqkN.js +1 -0
  159. package/dist/components/{p-CHHlQceE.js → p-In6mljvA.js} +1 -1
  160. package/dist/components/p-OnBLxJAP.js +1 -0
  161. package/dist/components/p-SYnTIeiO.js +1 -0
  162. package/dist/{design-system/p-D2S9Zafz.js → components/p-bXzpfkfN.js} +1 -1
  163. package/dist/components/p-mcbwNjNT.js +1 -0
  164. package/dist/components/p-qZxAQy4p.js +1 -0
  165. package/dist/components/sd-action-modal.js +1 -1
  166. package/dist/components/sd-badge.js +1 -1
  167. package/dist/components/sd-barcode-input.js +1 -1
  168. package/dist/components/sd-button.js +1 -1
  169. package/dist/components/sd-calendar.js +1 -1
  170. package/dist/components/sd-callout.js +1 -1
  171. package/dist/components/sd-card.js +1 -1
  172. package/dist/components/sd-checkbox.js +1 -1
  173. package/dist/components/sd-chip-input.js +1 -1
  174. package/dist/components/sd-chip.js +1 -1
  175. package/dist/components/sd-circle-progress.js +1 -1
  176. package/dist/components/sd-confirm-modal.js +1 -1
  177. package/dist/components/sd-date-box.js +1 -1
  178. package/dist/components/sd-date-picker-trigger.js +1 -1
  179. package/dist/components/sd-date-picker.js +1 -1
  180. package/dist/components/sd-date-range-picker-calendar.js +1 -1
  181. package/dist/components/sd-date-range-picker.js +1 -1
  182. package/dist/components/sd-divider.js +1 -1
  183. package/dist/components/sd-dropdown-button.js +1 -1
  184. package/dist/components/sd-field.js +1 -1
  185. package/dist/components/sd-file-picker.js +1 -1
  186. package/dist/components/sd-floating-portal.js +1 -1
  187. package/dist/components/sd-form.js +1 -1
  188. package/dist/components/sd-ghost-button.js +1 -1
  189. package/dist/components/sd-guide.js +1 -1
  190. package/dist/components/sd-icon.js +1 -1
  191. package/dist/components/sd-input.js +1 -1
  192. package/dist/components/sd-key-value-table.js +1 -1
  193. package/dist/components/sd-linear-progress.js +1 -1
  194. package/dist/components/sd-loading-container.js +1 -1
  195. package/dist/components/sd-loading-modal.js +1 -1
  196. package/dist/components/sd-modal-container.js +1 -1
  197. package/dist/components/sd-number-input.js +1 -1
  198. package/dist/components/sd-pagination.js +1 -1
  199. package/dist/components/sd-popover.js +1 -1
  200. package/dist/components/sd-popup.js +1 -1
  201. package/dist/components/sd-portal.js +1 -1
  202. package/dist/components/sd-radio-button.js +1 -1
  203. package/dist/components/sd-radio-group.js +1 -1
  204. package/dist/components/sd-radio.js +1 -1
  205. package/dist/components/sd-select-list-item-search.js +1 -1
  206. package/dist/components/sd-select-list-item.js +1 -1
  207. package/dist/components/sd-select-listbox.js +1 -1
  208. package/dist/components/sd-select-trigger.js +1 -1
  209. package/dist/components/sd-select.js +1 -1
  210. package/dist/components/sd-switch.js +1 -1
  211. package/dist/components/sd-tabs.js +1 -1
  212. package/dist/components/sd-tag.js +1 -1
  213. package/dist/components/sd-text-link.js +1 -1
  214. package/dist/components/sd-textarea.js +1 -1
  215. package/dist/components/sd-time-picker-selector.d.ts +11 -0
  216. package/dist/components/sd-time-picker-selector.js +1 -0
  217. package/dist/components/{sd-table.d.ts → sd-time-picker-trigger.d.ts} +4 -4
  218. package/dist/components/sd-time-picker-trigger.js +1 -0
  219. package/dist/components/{sd-thead.d.ts → sd-time-picker.d.ts} +4 -4
  220. package/dist/components/sd-time-picker.js +1 -0
  221. package/dist/components/sd-time-range-picker-selector.d.ts +11 -0
  222. package/dist/components/sd-time-range-picker-selector.js +1 -0
  223. package/dist/components/{sd-td.d.ts → sd-time-range-picker.d.ts} +4 -4
  224. package/dist/components/sd-time-range-picker.js +1 -0
  225. package/dist/components/sd-toast-container.js +1 -1
  226. package/dist/components/sd-toast.js +1 -1
  227. package/dist/components/sd-toggle.js +1 -1
  228. package/dist/components/sd-tooltip.js +1 -1
  229. package/dist/design-system/design-system.css +1 -1
  230. package/dist/design-system/design-system.esm.js +1 -1
  231. package/dist/design-system/{p-750a9112.entry.js → p-129b6330.entry.js} +1 -1
  232. package/dist/design-system/p-15f43b9b.entry.js +1 -0
  233. package/dist/design-system/p-16b9eac4.entry.js +1 -0
  234. package/dist/design-system/{p-0b8c86c3.entry.js → p-1858636f.entry.js} +1 -1
  235. package/dist/design-system/{p-a938ffee.entry.js → p-21672bb8.entry.js} +1 -1
  236. package/dist/design-system/{p-3b3a46cd.entry.js → p-219288ef.entry.js} +1 -1
  237. package/dist/design-system/{p-26f2f4c2.entry.js → p-22ac9e05.entry.js} +1 -1
  238. package/dist/design-system/p-2534d3d4.entry.js +1 -0
  239. package/dist/design-system/p-3859316f.entry.js +1 -0
  240. package/dist/design-system/{p-67f19734.entry.js → p-46da4e95.entry.js} +1 -1
  241. package/dist/design-system/{p-287d8016.entry.js → p-46eb3421.entry.js} +1 -1
  242. package/dist/design-system/p-4782331f.entry.js +1 -0
  243. package/dist/design-system/p-4a117dd6.entry.js +1 -0
  244. package/dist/design-system/{p-58ec51db.entry.js → p-4ae0a64a.entry.js} +1 -1
  245. package/dist/design-system/{p-bbd24816.entry.js → p-52b1be6f.entry.js} +1 -1
  246. package/dist/design-system/p-56e7c87b.entry.js +1 -0
  247. package/dist/design-system/p-570b9e91.entry.js +1 -0
  248. package/dist/design-system/p-5a113197.entry.js +1 -0
  249. package/dist/design-system/p-62ff77e4.entry.js +1 -0
  250. package/dist/design-system/{p-1230b51b.entry.js → p-655324cd.entry.js} +1 -1
  251. package/dist/design-system/p-66cff123.entry.js +1 -0
  252. package/dist/design-system/{p-4970f1ff.entry.js → p-6c4fa9d7.entry.js} +1 -1
  253. package/dist/design-system/{p-071e73e0.entry.js → p-809a0a71.entry.js} +1 -1
  254. package/dist/design-system/{p-70608fec.entry.js → p-82cb62a9.entry.js} +1 -1
  255. package/dist/design-system/p-843d1a8a.entry.js +1 -0
  256. package/dist/design-system/{p-fbeed0e4.entry.js → p-8836d9ff.entry.js} +1 -1
  257. package/dist/design-system/p-8af8e302.entry.js +1 -0
  258. package/dist/design-system/p-9c131122.entry.js +1 -0
  259. package/dist/design-system/{p-BqWuC4-J.js → p-BnUjeY2n.js} +1 -1
  260. package/dist/design-system/p-Bth2l1cy.js +1 -0
  261. package/dist/design-system/p-C599jhDs.js +2 -0
  262. package/dist/design-system/{p-CRWmn35N.js → p-Cn8LZw1e.js} +1 -1
  263. package/dist/design-system/p-DMm_GeZC.js +1 -0
  264. package/dist/design-system/p-Dz23PPdF.js +1 -0
  265. package/dist/design-system/p-a0c55a19.entry.js +1 -0
  266. package/dist/design-system/p-a6c292d1.entry.js +1 -0
  267. package/dist/design-system/p-a9cc4697.entry.js +1 -0
  268. package/dist/design-system/{p-2553bb1f.entry.js → p-b2dc1202.entry.js} +1 -1
  269. package/dist/design-system/{p-9c0bca09.entry.js → p-b5229957.entry.js} +1 -1
  270. package/dist/design-system/{p-d7e302af.entry.js → p-b75cc0dd.entry.js} +1 -1
  271. package/dist/design-system/p-b97a6cf3.entry.js +1 -0
  272. package/dist/design-system/p-c1e625e5.entry.js +1 -0
  273. package/dist/design-system/{p-5687ed0c.entry.js → p-c7f03dea.entry.js} +1 -1
  274. package/dist/design-system/p-cdb2433a.entry.js +1 -0
  275. package/dist/design-system/{p-61f5d5ea.entry.js → p-d5325895.entry.js} +1 -1
  276. package/dist/design-system/p-e0e4a451.entry.js +1 -0
  277. package/dist/design-system/p-e387ec65.entry.js +1 -0
  278. package/dist/design-system/{p-bab692c6.entry.js → p-efe3601d.entry.js} +1 -1
  279. package/dist/esm/design-system.js +3 -3
  280. package/dist/esm/{index-DDNBPrZh.js → index-C599jhDs.js} +2 -14
  281. package/dist/esm/loader.js +3 -3
  282. package/dist/esm/sd-action-modal.entry.js +2 -2
  283. package/dist/esm/sd-badge.entry.js +2 -2
  284. package/dist/esm/sd-barcode-input.entry.js +2 -2
  285. package/dist/esm/sd-button_2.entry.js +3 -3
  286. package/dist/esm/sd-calendar_2.entry.js +8 -9
  287. package/dist/esm/sd-callout.entry.js +2 -2
  288. package/dist/esm/sd-card.entry.js +2 -2
  289. package/dist/esm/sd-checkbox.entry.js +5 -5
  290. package/dist/esm/sd-chip-input.entry.js +22 -17
  291. package/dist/esm/sd-chip.entry.js +7 -7
  292. package/dist/esm/sd-circle-progress.entry.js +4 -4
  293. package/dist/esm/sd-confirm-modal_2.entry.js +33 -36
  294. package/dist/esm/sd-date-box.entry.js +1 -1
  295. package/dist/esm/{component.datepicker-laVsm9VM.js → sd-date-picker.config-CdXJcOGr.js} +63 -1
  296. package/dist/esm/{sd-date-picker_7.entry.js → sd-date-picker_8.entry.js} +446 -48
  297. package/dist/esm/sd-date-range-picker-calendar.entry.js +158 -8
  298. package/dist/esm/sd-divider.entry.js +3 -3
  299. package/dist/esm/sd-dropdown-button.entry.js +2 -2
  300. package/dist/esm/sd-field_3.entry.js +51 -52
  301. package/dist/esm/sd-form.entry.js +1 -1
  302. package/dist/esm/sd-ghost-button_3.entry.js +14 -10
  303. package/dist/esm/sd-guide.entry.js +2 -2
  304. package/dist/esm/sd-key-value-table.entry.js +87 -17
  305. package/dist/esm/sd-linear-progress.entry.js +3 -3
  306. package/dist/esm/sd-loading-container.entry.js +3 -3
  307. package/dist/esm/sd-modal-container.entry.js +16 -2
  308. package/dist/esm/sd-pagination.entry.js +171 -0
  309. package/dist/esm/sd-popover.entry.js +134 -44
  310. package/dist/esm/sd-popup.entry.js +3 -3
  311. package/dist/esm/sd-radio-button.entry.js +3 -3
  312. package/dist/esm/sd-radio.entry.js +4 -2
  313. package/dist/esm/{sd-select_3.entry.js → sd-select-list-item_4.entry.js} +277 -299
  314. package/dist/esm/sd-switch.entry.js +13 -3
  315. package/dist/esm/sd-tabs.entry.js +2 -2
  316. package/dist/esm/sd-text-link.entry.js +4 -4
  317. package/dist/esm/sd-time-picker-selector.entry.js +177 -0
  318. package/dist/esm/sd-time-picker-trigger.entry.js +73 -0
  319. package/dist/esm/sd-time-picker.config-DUq29Nhs.js +148 -0
  320. package/dist/esm/sd-time-picker.entry.js +171 -0
  321. package/dist/esm/sd-time-range-picker-selector.entry.js +217 -0
  322. package/dist/esm/sd-time-range-picker.entry.js +202 -0
  323. package/dist/esm/sd-toast-container.entry.js +2 -2
  324. package/dist/esm/sd-toast.entry.js +3 -3
  325. package/dist/esm/sd-toggle.entry.js +2 -2
  326. package/dist/esm/{system-BJfiMC9H.js → system-Bth2l1cy.js} +1 -7
  327. package/dist/esm/{tooltipArrow-blL0aWPE.js → tooltipArrow-DbLihSLI.js} +1 -1
  328. package/dist/esm/{useDatePicker-DoUg--aq.js → useDatePicker-DQ5Kyy_D.js} +1 -1
  329. package/dist/types/components/sd-checkbox/sd-checkbox.d.ts +2 -2
  330. package/dist/types/components/sd-chip/sd-chip.d.ts +3 -3
  331. package/dist/types/components/sd-chip-input/sd-chip-input.d.ts +4 -2
  332. package/dist/types/components/sd-confirm-modal/sd-confirm-modal.d.ts +10 -10
  333. package/dist/types/components/sd-date-picker/sd-date-picker.d.ts +2 -0
  334. package/dist/types/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.d.ts +20 -0
  335. package/dist/types/components/sd-date-range-picker/sd-date-range-picker.config.d.ts +25 -0
  336. package/dist/types/components/sd-date-range-picker/sd-date-range-picker.d.ts +9 -0
  337. package/dist/types/components/sd-field/sd-field.d.ts +7 -0
  338. package/dist/types/components/sd-file-picker/sd-file-picker.config.d.ts +28 -0
  339. package/dist/types/components/sd-file-picker/sd-file-picker.d.ts +3 -1
  340. package/dist/types/components/sd-ghost-button/sd-ghost-button.d.ts +5 -0
  341. package/dist/types/components/sd-input/sd-input.d.ts +1 -1
  342. package/dist/types/components/sd-key-value-table/sd-key-value-table.config.d.ts +22 -3
  343. package/dist/types/components/sd-key-value-table/sd-key-value-table.d.ts +9 -1
  344. package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +3 -0
  345. package/dist/types/components/sd-modal-container/sd-modal-container.d.ts +2 -0
  346. package/dist/types/components/sd-number-input/sd-number-input.d.ts +8 -0
  347. package/dist/types/components/sd-popover/sd-popover.config.d.ts +22 -0
  348. package/dist/types/components/sd-popover/sd-popover.d.ts +29 -36
  349. package/dist/types/components/sd-radio/sd-radio.d.ts +3 -1
  350. package/dist/types/components/sd-radio-button/sd-radio-button.d.ts +2 -2
  351. package/dist/types/components/sd-radio-group/sd-radio-group.d.ts +2 -2
  352. package/dist/types/components/sd-switch/sd-switch.d.ts +8 -1
  353. package/dist/types/components/sd-tag/sd-tag.d.ts +2 -2
  354. package/dist/types/components/sd-time-picker/sd-time-picker-selector/sd-time-picker-selector.d.ts +35 -0
  355. package/dist/types/components/sd-time-picker/sd-time-picker-trigger/sd-time-picker-trigger.d.ts +21 -0
  356. package/dist/types/components/sd-time-picker/sd-time-picker.config.d.ts +71 -0
  357. package/dist/types/components/sd-time-picker/sd-time-picker.d.ts +84 -0
  358. package/dist/types/components/sd-time-range-picker/sd-time-range-picker-selector/sd-time-range-picker-selector.d.ts +40 -0
  359. package/dist/types/components/sd-time-range-picker/sd-time-range-picker.config.d.ts +9 -0
  360. package/dist/types/components/sd-time-range-picker/sd-time-range-picker.d.ts +88 -0
  361. package/dist/types/components/sd-tooltip/sd-tooltip.d.ts +7 -22
  362. package/dist/types/components.d.ts +1093 -885
  363. package/dist/types/index.d.ts +0 -1
  364. package/hydrate/index.js +2573 -3144
  365. package/hydrate/index.mjs +2573 -3144
  366. package/package.json +1 -1
  367. package/dist/cjs/component.table-POXY492T.js +0 -72
  368. package/dist/cjs/constants-DJRV1upE.js +0 -5
  369. package/dist/cjs/sd-date-picker.config-De7ahWIs.js +0 -41
  370. package/dist/cjs/sd-pagination_4.cjs.entry.js +0 -858
  371. package/dist/cjs/sd-select-list-item_2.cjs.entry.js +0 -173
  372. package/dist/cjs/sd-select.config-omyxekRa.js +0 -144
  373. package/dist/cjs/sd-table.cjs.entry.js +0 -956
  374. package/dist/cjs/sd-table.config-DFy_S4bc.js +0 -83
  375. package/dist/cjs/sd-td.cjs.entry.js +0 -201
  376. package/dist/cjs/useDatePicker-iMd6WToc.js +0 -103
  377. package/dist/collection/components/sd-table/constants.js +0 -1
  378. package/dist/collection/components/sd-table/sd-table.config.js +0 -88
  379. package/dist/collection/components/sd-table/sd-table.css +0 -180
  380. package/dist/collection/components/sd-table/sd-table.js +0 -1709
  381. package/dist/collection/components/sd-table/sd-table.stories.helpers.js +0 -242
  382. package/dist/collection/components/sd-table/sd-tbody/sd-tbody.css +0 -10
  383. package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +0 -110
  384. package/dist/collection/components/sd-table/sd-td/sd-td.css +0 -15
  385. package/dist/collection/components/sd-table/sd-td/sd-td.js +0 -381
  386. package/dist/collection/components/sd-table/sd-thead/sd-thead.css +0 -186
  387. package/dist/collection/components/sd-table/sd-thead/sd-thead.js +0 -629
  388. package/dist/collection/components/sd-table/sd-tr/sd-tr.css +0 -145
  389. package/dist/collection/components/sd-table/sd-tr/sd-tr.js +0 -530
  390. package/dist/components/p-5pkzwl5N.js +0 -1
  391. package/dist/components/p-B-pJW3nY.js +0 -1
  392. package/dist/components/p-B2pYDEK7.js +0 -1
  393. package/dist/components/p-B3HYnTGx.js +0 -1
  394. package/dist/components/p-B6ezDhRg.js +0 -1
  395. package/dist/components/p-BCxePXvg.js +0 -1
  396. package/dist/components/p-BJfiMC9H.js +0 -1
  397. package/dist/components/p-BNHhtZUf.js +0 -1
  398. package/dist/components/p-BQ4Okfcm.js +0 -1
  399. package/dist/components/p-BSxleKw8.js +0 -1
  400. package/dist/components/p-BUgGuigd.js +0 -1
  401. package/dist/components/p-BWHQn4fD.js +0 -1
  402. package/dist/components/p-BZXgIBUG.js +0 -1
  403. package/dist/components/p-Bxb7TcZh.js +0 -1
  404. package/dist/components/p-C0tnN4yn.js +0 -1
  405. package/dist/components/p-CMvHDxR5.js +0 -1
  406. package/dist/components/p-CSh-DcM7.js +0 -1
  407. package/dist/components/p-Cf62Nvrx.js +0 -1
  408. package/dist/components/p-DbPS61bp.js +0 -1
  409. package/dist/components/p-DckXBMgo.js +0 -1
  410. package/dist/components/p-DmAnTwUx.js +0 -1
  411. package/dist/components/p-E8OA_psS.js +0 -1
  412. package/dist/components/p-PFLrdhQj.js +0 -1
  413. package/dist/components/p-l9RiSWRc.js +0 -1
  414. package/dist/components/p-paSLRXAR.js +0 -1
  415. package/dist/components/p-sZMi_32I.js +0 -1
  416. package/dist/components/p-yxZBh03f.js +0 -1
  417. package/dist/components/sd-table.js +0 -1
  418. package/dist/components/sd-tbody.d.ts +0 -11
  419. package/dist/components/sd-tbody.js +0 -1
  420. package/dist/components/sd-td.js +0 -1
  421. package/dist/components/sd-thead.js +0 -1
  422. package/dist/components/sd-tr.d.ts +0 -11
  423. package/dist/components/sd-tr.js +0 -1
  424. package/dist/design-system/p-0048de73.entry.js +0 -1
  425. package/dist/design-system/p-20f69606.entry.js +0 -1
  426. package/dist/design-system/p-27197194.entry.js +0 -1
  427. package/dist/design-system/p-5c8f4d9c.entry.js +0 -1
  428. package/dist/design-system/p-5pkzwl5N.js +0 -1
  429. package/dist/design-system/p-75726e20.entry.js +0 -1
  430. package/dist/design-system/p-7abf62f3.entry.js +0 -1
  431. package/dist/design-system/p-7ae27a26.entry.js +0 -1
  432. package/dist/design-system/p-84d0181b.entry.js +0 -1
  433. package/dist/design-system/p-91f7be74.entry.js +0 -1
  434. package/dist/design-system/p-94d6b7b4.entry.js +0 -1
  435. package/dist/design-system/p-9b21773a.entry.js +0 -1
  436. package/dist/design-system/p-BJfiMC9H.js +0 -1
  437. package/dist/design-system/p-Cf62Nvrx.js +0 -1
  438. package/dist/design-system/p-CuAh9n2o.js +0 -1
  439. package/dist/design-system/p-DDNBPrZh.js +0 -2
  440. package/dist/design-system/p-a12d7362.entry.js +0 -1
  441. package/dist/design-system/p-b831eded.entry.js +0 -1
  442. package/dist/design-system/p-c5502585.entry.js +0 -1
  443. package/dist/design-system/p-c81898a0.entry.js +0 -1
  444. package/dist/design-system/p-d4e2f412.entry.js +0 -1
  445. package/dist/design-system/p-d6b3d78b.entry.js +0 -1
  446. package/dist/design-system/p-dbfa3931.entry.js +0 -1
  447. package/dist/design-system/p-f16985c9.entry.js +0 -1
  448. package/dist/design-system/p-fa967329.entry.js +0 -1
  449. package/dist/design-system/p-laVsm9VM.js +0 -1
  450. package/dist/design-system/p-sZMi_32I.js +0 -1
  451. package/dist/esm/component.table-5pkzwl5N.js +0 -70
  452. package/dist/esm/constants-sZMi_32I.js +0 -3
  453. package/dist/esm/sd-date-picker.config-D-ks6qNf.js +0 -38
  454. package/dist/esm/sd-pagination_4.entry.js +0 -853
  455. package/dist/esm/sd-select-list-item_2.entry.js +0 -170
  456. package/dist/esm/sd-select.config-CeHGlqOT.js +0 -129
  457. package/dist/esm/sd-table.config-DmOBlnsM.js +0 -70
  458. package/dist/esm/sd-table.entry.js +0 -954
  459. package/dist/esm/sd-td.entry.js +0 -199
  460. package/dist/types/components/sd-table/constants.d.ts +0 -50
  461. package/dist/types/components/sd-table/sd-table.config.d.ts +0 -71
  462. package/dist/types/components/sd-table/sd-table.d.ts +0 -199
  463. package/dist/types/components/sd-table/sd-table.stories.helpers.d.ts +0 -39
  464. package/dist/types/components/sd-table/sd-tbody/sd-tbody.d.ts +0 -15
  465. package/dist/types/components/sd-table/sd-td/sd-td.d.ts +0 -38
  466. package/dist/types/components/sd-table/sd-thead/sd-thead.d.ts +0 -62
  467. package/dist/types/components/sd-table/sd-tr/sd-tr.d.ts +0 -54
@@ -1,1709 +0,0 @@
1
- import { h, Host, readTask, forceUpdate, } from "@stencil/core";
2
- import { nanoid } from "nanoid";
3
- import { TABLE_ID_ATTR, } from "./constants";
4
- import { TABLE_RADIUS, TABLE_BORDER, TABLE_BODY_TYPOGRAPHY, TABLE_BODY_LAYOUT, TABLE_SELECTABLE_COLUMN_WIDTH, } from "./sd-table.config";
5
- export class SdTable {
6
- static DEFAULT_NO_DATA_LABEL = '데이터가 없습니다.';
7
- el;
8
- /** 테이블 고유 ID (자식 슬롯 매핑에 사용) */
9
- tableId = nanoid(8);
10
- fallbackTableId = nanoid(8);
11
- /** 컬럼 정의 목록 */
12
- columns = [];
13
- /** 행 데이터 배열 */
14
- rows;
15
- /** 현재 선택된 행 목록 */
16
- selected = [];
17
- /** 행 고유 식별 필드명 */
18
- rowKey = 'id';
19
- /** 행 선택(체크박스) 기능 활성화 여부 */
20
- selectable = false;
21
- /** 컬럼 너비 조절 기능 활성화 여부 */
22
- resizable = false;
23
- /** 테이블 너비 */
24
- width;
25
- /** 테이블 높이 */
26
- height;
27
- /** 헤더 고정(sticky) 여부 */
28
- stickyHeader = false;
29
- /** 고정할 좌우 컬럼 수 */
30
- stickyColumn = { left: 0, right: 0 };
31
- /** border-radius 제어 */
32
- radius = 'default';
33
- /** 데이터 없을 때 표시할 메시지 */
34
- noDataLabel = SdTable.DEFAULT_NO_DATA_LABEL;
35
- resolvedNoDataLabel = SdTable.DEFAULT_NO_DATA_LABEL;
36
- /** 로딩 스피너 표시 여부 */
37
- isLoading = false;
38
- /** 페이지네이션 옵션 */
39
- pagination;
40
- /** 테이블 내부에서 페이지네이션을 직접 관리할지 여부 */
41
- useInternalPagination = false;
42
- /** 페이지당 행 수 선택 셀렉트 표시 여부 */
43
- useRowsPerPageSelect = false;
44
- /** 행 높이를 줄인 조밀 모드 여부 */
45
- dense = false;
46
- // ─── Virtual Scroll ───────────────────────────────────────────────
47
- /** 가상 스크롤 사용 여부 */
48
- useVirtualScroll = false;
49
- /** 가상 스크롤 행 높이 (px, 없으면 dense 여부에 따라 자동) */
50
- rowHeight;
51
- get effectiveRowHeight() {
52
- if (this.rowHeight != null)
53
- return this.rowHeight;
54
- return this.dense
55
- ? Number(TABLE_BODY_LAYOUT.dense.height)
56
- : Number(TABLE_BODY_LAYOUT.default.height);
57
- }
58
- /** 가상 스크롤 상하 버퍼 행 수 */
59
- virtualBuffer = 5;
60
- /** 가상 스크롤 끝 도달 감지 임계값 (마지막 N행 이내에 들어오면 이벤트 발생) */
61
- virtualEndThreshold = 10;
62
- // ─────────────────────────────────────────────────────────────────
63
- /** 페이지당 행 수 선택 옵션 목록 */
64
- rowsPerPageOption = [
65
- { label: '10개씩 보기', value: 10 },
66
- { label: '25개씩 보기', value: 25 },
67
- { label: '50개씩 보기', value: 50 },
68
- { label: '100개씩 보기', value: 100 },
69
- ];
70
- /** 행 선택 상태가 변경될 때 선택된 행 목록을 전달합니다. */
71
- sdSelectChange;
72
- /** 페이지가 변경될 때 새 페이지 번호를 전달합니다. */
73
- sdPageChange;
74
- /** 페이지당 행 수가 변경될 때 발생합니다. */
75
- sdRowsPerPageChange;
76
- /** 가상 스크롤 가시 범위가 변경될 때 발생합니다. */
77
- sdVirtualUpdate;
78
- /** 가상 스크롤이 끝 임계값에 도달할 때 발생합니다. */
79
- sdVirtualReachEnd;
80
- currentPage = 1;
81
- innerRowsPerPage = 10;
82
- innerSelected = new Set();
83
- columnWidths = [];
84
- scrolledLeft = false;
85
- scrolledRight = false;
86
- rowCount = 0;
87
- loadingScrollTop = 0;
88
- noDataBodyHeight = 60;
89
- // light DOM에 sd-thead / sd-tbody 자식이 없으면 sd-table이 직접 렌더해야 함을 알리는 플래그.
90
- // componentWillLoad에서 한 번 결정되며, 이후 동적 토글은 지원하지 않는다.
91
- autoThead = false;
92
- autoTbody = false;
93
- vsStart = 0;
94
- vsEnd = 0;
95
- lastReachEndNotifiedRowCount = -1;
96
- scrollContainer = null;
97
- noDataContentEl = null;
98
- noDataContentResizeObserver;
99
- onScroll;
100
- // 키: `${rowKey}::${field}` → { rowspan, colspan }
101
- spanRegistry = new Map();
102
- // rowKey → Set<field>: useFrame=true인 sd-td가 있는 행을 추적한다.
103
- // 하나라도 등록되면 해당 행은 dense를 무시하고 default 레이아웃으로 렌더된다.
104
- useFrameRegistry = new Map();
105
- // 키: `${rowKey}::${field}` → sd-td의 sdClass 문자열
106
- // sd-tr가 td를 그릴 때 머지해서 셀-단위 커스텀 클래스를 적용한다.
107
- cellClassRegistry = new Map();
108
- // rowKey 문자열 → rows 배열에서의 visual index.
109
- // rowspan 위쪽 행 스캔에서 "내 위에 있느냐"를 판정하기 위한 시각적 순서 소스.
110
- // rows prop이 있으면 채워지고, 없으면 비어 있어 Number(rowKey) fallback이 사용된다.
111
- rowIndexMap = new Map();
112
- rebuildRowIndexMap() {
113
- this.rowIndexMap.clear();
114
- if (!Array.isArray(this.rows))
115
- return;
116
- const field = this.rowKey;
117
- this.rows.forEach((r, i) => {
118
- const k = r?.[field];
119
- if (k == null)
120
- return;
121
- this.rowIndexMap.set(String(k), i);
122
- });
123
- }
124
- // rowKey의 시각적 행 인덱스를 돌려준다.
125
- // 1) rows 기반 맵에 있으면 그 값 (임의 문자열 rowKey 지원)
126
- // 2) 없으면 Number(rowKey) fallback (rows prop 없이 슬롯-온리 + 숫자 rowKey 사용 패턴)
127
- // 3) 둘 다 안 되면 null — rowspan 평가 스킵
128
- resolveRowIndex(rowKey) {
129
- const fromMap = this.rowIndexMap.get(rowKey);
130
- if (fromMap !== undefined)
131
- return fromMap;
132
- const n = Number(rowKey);
133
- return Number.isFinite(n) ? n : null;
134
- }
135
- toFiniteNumber(value, fallback) {
136
- const n = typeof value === 'number' ? value : Number(value);
137
- return Number.isFinite(n) ? n : fallback;
138
- }
139
- isRowsPerPageValue(value) {
140
- return value === null || typeof value === 'string' || typeof value === 'number';
141
- }
142
- isValidTableId(value) {
143
- return (typeof value === 'string' &&
144
- value.trim().length > 0 &&
145
- value !== 'undefined' &&
146
- value !== 'null');
147
- }
148
- getResolvedTableId() {
149
- if (this.isValidTableId(this.tableId))
150
- return this.tableId;
151
- const attrId = this.el?.getAttribute(TABLE_ID_ATTR);
152
- if (this.isValidTableId(attrId))
153
- return attrId;
154
- return this.fallbackTableId;
155
- }
156
- syncTableIdAttribute() {
157
- const resolvedTableId = this.getResolvedTableId();
158
- if (this.el?.getAttribute(TABLE_ID_ATTR) !== resolvedTableId) {
159
- this.el.setAttribute(TABLE_ID_ATTR, resolvedTableId);
160
- }
161
- }
162
- handleIsLoadingChange(newVal) {
163
- if (newVal) {
164
- this.loadingScrollTop = this.scrollContainer?.scrollTop ?? 0;
165
- }
166
- this.syncNoDataContentObserver();
167
- }
168
- handleUseVirtualScrollChange(newVal) {
169
- if (newVal) {
170
- // DOM이 새 --table-container-height로 업데이트된 후 계산해야 정확함
171
- readTask(() => this.propagateVirtualUpdate());
172
- }
173
- }
174
- handleColumnsChange(newCols) {
175
- this.columnWidths = newCols.map(c => (c.autoWidth ? 0 : parseInt(c.width || '120', 10)));
176
- this.refreshChildrenConfig();
177
- }
178
- handleRowsChange(newRows) {
179
- if (!Array.isArray(newRows))
180
- return;
181
- this.rowCount = newRows.length;
182
- this.rebuildRowIndexMap();
183
- if (this.useVirtualScroll)
184
- this.propagateVirtualUpdate(true);
185
- this.pushRowsToChildren(newRows);
186
- this.syncNoDataContentObserver();
187
- }
188
- handleRowKeyChange() {
189
- this.rebuildRowIndexMap();
190
- }
191
- handleTableIdChange() {
192
- this.syncTableIdAttribute();
193
- }
194
- handleNoDataLabelChange(newLabel) {
195
- if (typeof newLabel === 'string' &&
196
- newLabel.trim().length > 0 &&
197
- newLabel !== 'undefined' &&
198
- newLabel !== 'null') {
199
- this.resolvedNoDataLabel = newLabel;
200
- }
201
- else {
202
- this.resolvedNoDataLabel = SdTable.DEFAULT_NO_DATA_LABEL;
203
- }
204
- }
205
- handleConfigChange() {
206
- this.refreshChildrenConfig();
207
- }
208
- handleSelectedChange(newSelected) {
209
- this.innerSelected = new Set(newSelected);
210
- }
211
- handlePaginationChange(newVal) {
212
- if (newVal?.page != null && newVal.page !== this.currentPage) {
213
- this.currentPage = newVal.page;
214
- }
215
- if (newVal?.rowsPerPage != null && newVal.rowsPerPage !== this.innerRowsPerPage) {
216
- this.innerRowsPerPage = newVal.rowsPerPage;
217
- }
218
- }
219
- detectChildren() {
220
- const hasThead = !!this.el.querySelector(':scope > sd-thead');
221
- const hasTbody = !!this.el.querySelector(':scope > sd-tbody');
222
- this.autoThead = !hasThead;
223
- this.autoTbody = !hasTbody;
224
- }
225
- componentWillLoad() {
226
- this.syncTableIdAttribute();
227
- this.handleNoDataLabelChange(this.noDataLabel);
228
- this.detectChildren();
229
- this.innerSelected = new Set(this.selected || []);
230
- this.columnWidths = (this.columns || []).map(c => c.autoWidth ? 0 : parseInt(c.width || '120', 10));
231
- this.rebuildRowIndexMap();
232
- if (this.pagination?.page != null) {
233
- this.currentPage = this.pagination.page;
234
- }
235
- if (this.pagination?.rowsPerPage != null) {
236
- this.innerRowsPerPage = this.pagination.rowsPerPage;
237
- }
238
- // host element 에 자식 컴포넌트(sd-thead/sd-tbody/sd-tr) 가 직접 접근하는 internal sync helpers 를 monkey-patch.
239
- // 28개 메서드 전체를 typed interface 로 노출하면 코드 비용이 크고, 어차피 internal 이라 외부 사용자가 호출하지 않는다.
240
- // 정식 @Method 노출로 옮기는 작업은 별도 이슈로 분리.
241
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
242
- const el = this.el;
243
- el.isRowSelectedSync = this.isRowSelectedSync.bind(this);
244
- el.updateRowSelectSync = this.updateRowSelectSync.bind(this);
245
- el.toggleSelectAllSync = this.toggleSelectAllSync.bind(this);
246
- el.getIsAllCheckedSync = this.getIsAllCheckedSync.bind(this);
247
- el.getStickyStyleSync = this.getStickyStyleSync.bind(this);
248
- el.setRowCountSync = this.setRowCountSync.bind(this);
249
- el.handleResize = this.handleResize.bind(this);
250
- el.getPaginationInfoSync = this.getPaginationInfoSync.bind(this);
251
- el.getVirtualScrollRangeSync = this.getVirtualScrollRangeSync.bind(this);
252
- el.getConfigSync = this.getConfigSync.bind(this);
253
- el.getTableIdSync = () => this.getResolvedTableId();
254
- el.getVirtualScrollConfigSync = this.getVirtualScrollConfigSync.bind(this);
255
- el.calculateVisibleRange = this.calculateVisibleRange.bind(this);
256
- el.registerSpanSync = this.registerSpanSync.bind(this);
257
- el.unregisterSpanSync = this.unregisterSpanSync.bind(this);
258
- el.getSpanSync = this.getSpanSync.bind(this);
259
- el.isCoveredSync = this.isCoveredSync.bind(this);
260
- el.hasRowspanSync = this.hasRowspanSync.bind(this);
261
- el.registerCellClassSync = this.registerCellClassSync.bind(this);
262
- el.unregisterCellClassSync = this.unregisterCellClassSync.bind(this);
263
- el.getCellClassSync = this.getCellClassSync.bind(this);
264
- el.registerUseFrameSync = this.registerUseFrameSync.bind(this);
265
- el.unregisterUseFrameSync = this.unregisterUseFrameSync.bind(this);
266
- el.hasUseFrameInRowSync = this.hasUseFrameInRowSync.bind(this);
267
- el.isCellUseFrameSync = this.isCellUseFrameSync.bind(this);
268
- if (Array.isArray(this.rows)) {
269
- this.rowCount = this.rows.length;
270
- this.pushRowsToChildren(this.rows);
271
- }
272
- }
273
- componentDidLoad() {
274
- if (Array.isArray(this.rows)) {
275
- this.pushRowsToChildren(this.rows);
276
- }
277
- readTask(() => {
278
- const wrapper = this.el.shadowRoot?.querySelector('.sd-table__scroll-container');
279
- if (!wrapper)
280
- return;
281
- let rafPending = false;
282
- this.onScroll = () => {
283
- // 가로 스크롤 그림자
284
- const scrollLeft = wrapper.scrollLeft;
285
- const scrollWidth = wrapper.scrollWidth;
286
- const clientWidth = wrapper.clientWidth;
287
- const newScrolledLeft = scrollLeft > 0;
288
- const newScrolledRight = scrollLeft + clientWidth < scrollWidth;
289
- if (this.scrolledLeft !== newScrolledLeft || this.scrolledRight !== newScrolledRight) {
290
- this.scrolledLeft = newScrolledLeft;
291
- this.scrolledRight = newScrolledRight;
292
- this.refreshChildrenConfig();
293
- }
294
- // 세로 가상 스크롤 — RAF로 프레임당 1회만 처리
295
- if (this.useVirtualScroll && !rafPending) {
296
- rafPending = true;
297
- requestAnimationFrame(() => {
298
- rafPending = false;
299
- this.propagateVirtualUpdate();
300
- });
301
- }
302
- };
303
- this.scrollContainer = wrapper;
304
- wrapper.addEventListener('scroll', this.onScroll, { passive: true });
305
- this.onScroll();
306
- if (this.useVirtualScroll) {
307
- this.propagateVirtualUpdate(); // 초기 렌더
308
- }
309
- });
310
- this.syncNoDataContentObserver();
311
- }
312
- disconnectedCallback() {
313
- if (this.scrollContainer && this.onScroll) {
314
- this.scrollContainer.removeEventListener('scroll', this.onScroll);
315
- }
316
- this.noDataContentResizeObserver?.disconnect();
317
- this.noDataContentResizeObserver = undefined;
318
- }
319
- syncNoDataContentObserver() {
320
- const isNoData = this.rowCount === 0 && !this.isLoading;
321
- if (!isNoData) {
322
- this.noDataContentResizeObserver?.disconnect();
323
- this.noDataContentResizeObserver = undefined;
324
- this.noDataBodyHeight = 60;
325
- return;
326
- }
327
- this.observeNoDataContentHeight();
328
- }
329
- // observer를 붙이고 콘텐츠 높이를 측정해 noDataBodyHeight를 갱신하는 함수
330
- observeNoDataContentHeight() {
331
- if (typeof ResizeObserver === 'undefined')
332
- return;
333
- const target = this.noDataContentEl;
334
- if (!target)
335
- return;
336
- this.noDataContentResizeObserver?.disconnect();
337
- this.noDataContentResizeObserver = new ResizeObserver(() => {
338
- const measured = Math.ceil(target.scrollHeight);
339
- const nextHeight = Math.max(60, measured);
340
- if (nextHeight !== this.noDataBodyHeight) {
341
- this.noDataBodyHeight = nextHeight;
342
- }
343
- });
344
- this.noDataContentResizeObserver.observe(target);
345
- readTask(() => {
346
- if (!this.noDataContentEl)
347
- return;
348
- const measured = Math.ceil(this.noDataContentEl.scrollHeight);
349
- const next = Math.max(60, measured);
350
- if (next !== this.noDataBodyHeight) {
351
- this.noDataBodyHeight = next;
352
- }
353
- });
354
- }
355
- queryChildEl(selector) {
356
- return (this.el.querySelector(selector) ??
357
- this.el.shadowRoot?.querySelector(selector) ??
358
- null);
359
- }
360
- queryAllTr() {
361
- const light = Array.from(this.el.querySelectorAll('sd-tr'));
362
- const shadow = Array.from(this.el.shadowRoot?.querySelectorAll('sd-tr') ?? []);
363
- return [...light, ...shadow];
364
- }
365
- pushRowsToChildren(rows) {
366
- const tbody = this.queryChildEl('sd-tbody');
367
- if (tbody)
368
- tbody.rows = rows;
369
- const thead = this.queryChildEl('sd-thead');
370
- if (thead)
371
- thead.rows = rows;
372
- }
373
- handleStructureSlotChange = () => {
374
- if (Array.isArray(this.rows)) {
375
- this.pushRowsToChildren(this.rows);
376
- }
377
- this.refreshChildrenConfig();
378
- };
379
- refreshChildrenSelection() {
380
- const thead = this.queryChildEl('sd-thead');
381
- thead?.refreshSelection?.();
382
- this.queryAllTr().forEach(tr => tr.refreshSelection?.());
383
- }
384
- refreshChildrenConfig() {
385
- const thead = this.queryChildEl('sd-thead');
386
- thead?.refreshConfig?.();
387
- this.queryAllTr().forEach(tr => tr.refreshConfig?.());
388
- }
389
- maybeEmitVirtualReachEnd(start, end) {
390
- const threshold = Math.max(1, this.virtualEndThreshold);
391
- const nearEnd = end >= Math.max(0, this.rowCount - threshold);
392
- if (!nearEnd)
393
- return;
394
- if (this.lastReachEndNotifiedRowCount === this.rowCount)
395
- return;
396
- this.lastReachEndNotifiedRowCount = this.rowCount;
397
- this.sdVirtualReachEnd.emit({
398
- from: start,
399
- to: end,
400
- rowCount: this.rowCount,
401
- threshold,
402
- });
403
- }
404
- propagateVirtualUpdate(forceSpacerUpdate = false) {
405
- if (!this.scrollContainer || !this.useVirtualScroll)
406
- return;
407
- const scrollTop = this.toFiniteNumber(this.scrollContainer.scrollTop, 0);
408
- const containerHeight = this.toFiniteNumber(this.scrollContainer.clientHeight, 0);
409
- const { start, end } = this.calculateVisibleRange(scrollTop, containerHeight);
410
- if (!Number.isFinite(start) || !Number.isFinite(end))
411
- return;
412
- const rangeChanged = this.vsStart !== start || this.vsEnd !== end;
413
- if (!rangeChanged && !forceSpacerUpdate)
414
- return;
415
- this.vsStart = start;
416
- this.vsEnd = end;
417
- const topHeight = start * this.effectiveRowHeight;
418
- const bottomHeight = Math.max(0, (this.rowCount - end) * this.effectiveRowHeight);
419
- // setSpacersSync 는 sd-tbody 가 host element 에 monkey-patch 하는 internal sync helper.
420
- const tbody = this.queryChildEl('sd-tbody');
421
- tbody?.setSpacersSync?.(topHeight, bottomHeight);
422
- if (rangeChanged) {
423
- this.sdVirtualUpdate.emit({
424
- from: start,
425
- to: end,
426
- });
427
- }
428
- this.maybeEmitVirtualReachEnd(start, end);
429
- }
430
- getVirtualScrollConfigSync() {
431
- return {
432
- useVirtualScroll: this.useVirtualScroll,
433
- rowHeight: this.effectiveRowHeight,
434
- virtualBuffer: this.virtualBuffer,
435
- vsStart: this.vsStart,
436
- vsEnd: this.vsEnd,
437
- rowCount: this.rowCount,
438
- };
439
- }
440
- getConfigSync() {
441
- return {
442
- columns: this.columns,
443
- selectable: this.selectable,
444
- resizable: this.resizable,
445
- stickyColumn: this.stickyColumn,
446
- stickyHeader: this.stickyHeader,
447
- scrolledLeft: this.scrolledLeft,
448
- scrolledRight: this.scrolledRight,
449
- columnWidths: this.columnWidths,
450
- dense: this.dense,
451
- };
452
- }
453
- registerUseFrameSync(rowKey, field) {
454
- if (rowKey == null || field === '')
455
- return;
456
- let fields = this.useFrameRegistry.get(rowKey);
457
- if (!fields) {
458
- fields = new Set();
459
- this.useFrameRegistry.set(rowKey, fields);
460
- }
461
- fields.add(field);
462
- }
463
- unregisterUseFrameSync(rowKey, field) {
464
- if (rowKey == null || field === '')
465
- return;
466
- const fields = this.useFrameRegistry.get(rowKey);
467
- if (!fields)
468
- return;
469
- fields.delete(field);
470
- if (fields.size === 0)
471
- this.useFrameRegistry.delete(rowKey);
472
- }
473
- hasUseFrameInRowSync(rowKey) {
474
- const fields = this.useFrameRegistry.get(rowKey);
475
- return fields != null && fields.size > 0;
476
- }
477
- isCellUseFrameSync(rowKey, field) {
478
- return this.useFrameRegistry.get(rowKey)?.has(field) ?? false;
479
- }
480
- isRowSelectedSync(row) {
481
- return Array.from(this.innerSelected).some(r => r[this.rowKey ?? 'id'] === row[this.rowKey ?? 'id']);
482
- }
483
- /** 행이 선택되어 있는지 확인합니다. */
484
- async isRowSelected(row) {
485
- return this.isRowSelectedSync(row);
486
- }
487
- updateRowSelectSync(row) {
488
- const selectedArray = Array.from(this.innerSelected);
489
- const exists = this.isRowSelectedSync(row);
490
- const newSelected = exists
491
- ? selectedArray.filter(r => r[this.rowKey ?? 'id'] !== row[this.rowKey ?? 'id'])
492
- : [...selectedArray, row];
493
- if (newSelected.length === selectedArray.length)
494
- return;
495
- this.innerSelected = new Set(newSelected);
496
- this.selected = Array.from(this.innerSelected);
497
- this.sdSelectChange.emit(Array.from(this.innerSelected));
498
- this.refreshChildrenSelection();
499
- }
500
- /** 행 선택 상태를 토글합니다. */
501
- async updateRowSelect(row) {
502
- this.updateRowSelectSync(row);
503
- }
504
- toggleSelectAllSync(checked, rows) {
505
- if (checked) {
506
- const pageRows = new Set([...rows]);
507
- this.innerSelected = new Set([...this.innerSelected, ...pageRows]);
508
- }
509
- else {
510
- const currentPageKeys = rows.map(r => r[this.rowKey ?? 'id']);
511
- this.innerSelected = new Set([...this.innerSelected].filter(r => !currentPageKeys.includes(r[this.rowKey ?? 'id'])));
512
- }
513
- this.selected = Array.from(this.innerSelected);
514
- this.sdSelectChange.emit(Array.from(this.innerSelected));
515
- this.refreshChildrenSelection();
516
- }
517
- /** 전체 행 선택/해제를 처리합니다. */
518
- async toggleSelectAll(checked, rows) {
519
- this.toggleSelectAllSync(checked, rows);
520
- }
521
- getIsAllCheckedSync(rows) {
522
- const total = rows.length;
523
- const selectedCount = rows.filter(row => Array.from(this.innerSelected).some(selectedRow => selectedRow[this.rowKey ?? 'id'] === row[this.rowKey ?? 'id'])).length;
524
- if (selectedCount === 0)
525
- return false;
526
- if (selectedCount === total)
527
- return true;
528
- return null; // indeterminate
529
- }
530
- /** 전체 선택 체크 상태를 반환합니다 (true/false/null=indeterminate). */
531
- async getIsAllChecked(rows) {
532
- return this.getIsAllCheckedSync(rows);
533
- }
534
- changePage(page) {
535
- if (!this.useInternalPagination) {
536
- this.sdPageChange.emit(page);
537
- return;
538
- }
539
- this.currentPage = page;
540
- this.sdPageChange.emit(this.currentPage);
541
- this.updateRowsVisibility();
542
- }
543
- updateRowsVisibility() {
544
- this.queryAllTr().forEach(tr => tr.updateVisibility?.());
545
- }
546
- changeRowsPerPage(perPage) {
547
- const changedRowsPerPage = perPage != null && perPage !== '' ? Number(perPage) : 0;
548
- if (!this.useInternalPagination) {
549
- this.sdRowsPerPageChange.emit(changedRowsPerPage);
550
- return;
551
- }
552
- this.innerRowsPerPage = changedRowsPerPage;
553
- const newLastPage = Math.max(1, Math.ceil(this.rowCount / changedRowsPerPage));
554
- if (this.currentPage > newLastPage) {
555
- this.currentPage = newLastPage;
556
- }
557
- this.sdRowsPerPageChange.emit(changedRowsPerPage);
558
- this.updateRowsVisibility();
559
- }
560
- get lastPageNumber() {
561
- if (this.useInternalPagination) {
562
- return Math.max(1, Math.ceil(this.rowCount / this.innerRowsPerPage));
563
- }
564
- const { lastPage, rowsPerPage = 10 } = this.pagination || {};
565
- return lastPage ?? Math.max(1, Math.ceil(this.rowCount / rowsPerPage));
566
- }
567
- handleResize(index, event, reversed = false) {
568
- if (typeof document === 'undefined')
569
- return;
570
- const startX = event.clientX;
571
- const startWidth = this.columnWidths[index];
572
- const handleMouseMove = (moveEvent) => {
573
- const col = this.columns[index];
574
- if (col == null)
575
- return;
576
- const minWidth = col.minWidth || 50;
577
- const maxWidth = col.maxWidth || 9999;
578
- const delta = moveEvent.clientX - startX;
579
- const newWidth = Math.min(Math.max(startWidth + (reversed ? -delta : delta), minWidth), maxWidth);
580
- this.columnWidths = this.columnWidths.map((width, idx) => (idx === index ? newWidth : width));
581
- const thead = this.queryChildEl('sd-thead');
582
- thead?.setColumnWidths?.(this.columnWidths);
583
- this.queryAllTr().forEach(tr => tr.setColumnWidths?.(this.columnWidths));
584
- const stickyRightCount = this.stickyColumn?.right || 0;
585
- const visibleColCount = this.columns.filter(c => c.visible !== false).length;
586
- const isRightStickyEdgeResizer = stickyRightCount > 0 && index === visibleColCount - stickyRightCount;
587
- if (isRightStickyEdgeResizer) {
588
- requestAnimationFrame(() => {
589
- this.onScroll?.();
590
- });
591
- }
592
- };
593
- const handleMouseUp = () => {
594
- document.removeEventListener('mousemove', handleMouseMove);
595
- document.removeEventListener('mouseup', handleMouseUp);
596
- };
597
- document.addEventListener('mousemove', handleMouseMove);
598
- document.addEventListener('mouseup', handleMouseUp);
599
- }
600
- getStickyStyleSync(colIdx) {
601
- const leftOffset = this.columnWidths
602
- .slice(0, colIdx)
603
- .reduce((a, b) => a + b, this.selectable ? TABLE_SELECTABLE_COLUMN_WIDTH : 0);
604
- const rightOffset = this.columnWidths
605
- .filter((_, i) => i >=
606
- this.columns.filter(c => c.visible !== false).length -
607
- (this.stickyColumn?.right || 0) && i > colIdx)
608
- .reduce((a, b) => a + b, 0);
609
- const visibleCol = this.columns.filter(c => c.visible !== false)[colIdx];
610
- const base = {
611
- '--sticky-left-offset': `${leftOffset}px`,
612
- '--sticky-right-offset': `${rightOffset}px`,
613
- };
614
- if (!visibleCol?.autoWidth) {
615
- base['width'] = `${this.columnWidths[colIdx]}px`;
616
- base['minWidth'] = `${this.columnWidths[colIdx]}px`;
617
- base['maxWidth'] = `${this.columnWidths[colIdx]}px`;
618
- }
619
- return base;
620
- }
621
- /** 지정한 컬럼 인덱스의 sticky 스타일 객체를 반환합니다. */
622
- async getStickyStyle(colIdx) {
623
- return this.getStickyStyleSync(colIdx);
624
- }
625
- // ─── rowspan / colspan registry ─────────────────────────────────
626
- // sd-td가 mount/unmount 시 자기 (rowKey, field)와 span을 등록한다.
627
- // sd-tr는 render마다 isCoveredSync로 자신의 셀 위치가 다른 셀의 span에
628
- // 덮였는지 판정해 <td>를 그릴지 결정한다.
629
- spanKey(rowKey, field) {
630
- return `${rowKey}::${field}`;
631
- }
632
- // span 등록은 sd-td의 lifecycle에서 비동기적으로 일어나므로,
633
- // 등록/해제 직후 형제 sd-tr들이 새 레지스트리 상태로 다시 그려져야
634
- // 덮인 셀이 사라지거나 다시 나타난다.
635
- // forceUpdate는 React 래퍼 환경에서 prop 동기화 사이클과 부딪혀 누락되는
636
- // 경우가 있어, sd-tr의 @State (spansVersion)을 통해 재렌더를 강제한다.
637
- requestAllTrUpdate() {
638
- this.queryAllTr().forEach(tr => {
639
- if (typeof tr.bumpSpansVersion === 'function') {
640
- tr.bumpSpansVersion();
641
- }
642
- else {
643
- forceUpdate(tr);
644
- }
645
- });
646
- }
647
- registerSpanSync(rowKey, field, rowspan, colspan) {
648
- if (rowKey == null || field === '')
649
- return;
650
- const safeRowspan = Math.max(1, Math.floor(rowspan || 1));
651
- const safeColspan = Math.max(1, Math.floor(colspan || 1));
652
- const key = this.spanKey(rowKey, field);
653
- const prev = this.spanRegistry.get(key);
654
- if (safeRowspan === 1 && safeColspan === 1) {
655
- if (!prev)
656
- return;
657
- this.spanRegistry.delete(key);
658
- this.requestAllTrUpdate();
659
- return;
660
- }
661
- if (prev && prev.rowspan === safeRowspan && prev.colspan === safeColspan)
662
- return;
663
- this.spanRegistry.set(key, { rowspan: safeRowspan, colspan: safeColspan });
664
- this.requestAllTrUpdate();
665
- }
666
- unregisterSpanSync(rowKey, field) {
667
- if (rowKey == null || field === '')
668
- return;
669
- const key = this.spanKey(rowKey, field);
670
- if (!this.spanRegistry.has(key))
671
- return;
672
- this.spanRegistry.delete(key);
673
- this.requestAllTrUpdate();
674
- }
675
- getSpanSync(rowKey, field) {
676
- return this.spanRegistry.get(this.spanKey(rowKey, field));
677
- }
678
- // sd-td의 sdClass 등록. 빈/공백만 있는 값은 해제로 취급.
679
- // span과 달리 다른 셀에 영향이 없으므로 형제 sd-tr 전체를 재렌더하지 않고,
680
- // sd-td 쪽에서 자기 부모 tr만 bumpSpansVersion으로 새로 그린다.
681
- registerCellClassSync(rowKey, field, cls) {
682
- if (rowKey == null || field === '')
683
- return;
684
- const key = this.spanKey(rowKey, field);
685
- const safe = (cls ?? '').trim();
686
- if (safe === '') {
687
- this.cellClassRegistry.delete(key);
688
- return;
689
- }
690
- this.cellClassRegistry.set(key, safe);
691
- }
692
- unregisterCellClassSync(rowKey, field) {
693
- if (rowKey == null || field === '')
694
- return;
695
- this.cellClassRegistry.delete(this.spanKey(rowKey, field));
696
- }
697
- getCellClassSync(rowKey, field) {
698
- return this.cellClassRegistry.get(this.spanKey(rowKey, field));
699
- }
700
- // 레지스트리에 rowspan>1 항목이 하나라도 있으면 true.
701
- // hover 동작을 끌지 결정하는 데 사용 — colspan만 있는 경우는 그대로 hover 유지.
702
- hasRowspanSync() {
703
- for (const span of this.spanRegistry.values()) {
704
- if (span.rowspan > 1)
705
- return true;
706
- }
707
- return false;
708
- }
709
- isCoveredSync(rowKey, colIdx, columns) {
710
- if (this.spanRegistry.size === 0)
711
- return false;
712
- const visibleCols = columns.filter(c => c.visible !== false);
713
- // 1. 같은 행 왼쪽 스캔 — colspan으로 이 위치를 덮는 셀이 있는가
714
- for (let i = 0; i < colIdx; i++) {
715
- const c = visibleCols[i];
716
- if (c == null)
717
- continue;
718
- const field = typeof c.field === 'string' ? c.field : c.name;
719
- const span = this.spanRegistry.get(this.spanKey(rowKey, field));
720
- if (!span)
721
- continue;
722
- if (i + span.colspan > colIdx)
723
- return true;
724
- }
725
- // 2. 위쪽 행 스캔 — rows 기반 visual index로 "내 위에 있느냐" 판정
726
- // rows prop이 있으면 rowIndexMap로 임의 문자열 rowKey 지원,
727
- // 없으면 Number(rowKey) fallback (resolveRowIndex가 처리)
728
- const myRowIdx = this.resolveRowIndex(rowKey);
729
- if (myRowIdx == null)
730
- return false;
731
- for (const [key, span] of this.spanRegistry) {
732
- if (span.rowspan <= 1)
733
- continue;
734
- const sepIdx = key.indexOf('::');
735
- if (sepIdx < 0)
736
- continue;
737
- const otherRowKey = key.slice(0, sepIdx);
738
- const otherField = key.slice(sepIdx + 2);
739
- const otherRowIdx = this.resolveRowIndex(otherRowKey);
740
- if (otherRowIdx == null)
741
- continue;
742
- if (otherRowIdx >= myRowIdx)
743
- continue;
744
- if (otherRowIdx + span.rowspan <= myRowIdx)
745
- continue;
746
- const otherColIdx = visibleCols.findIndex(c => (typeof c.field === 'string' ? c.field : c.name) === otherField);
747
- if (otherColIdx < 0)
748
- continue;
749
- if (otherColIdx <= colIdx && otherColIdx + span.colspan > colIdx)
750
- return true;
751
- }
752
- return false;
753
- }
754
- setRowCountSync(count) {
755
- const safeCount = Math.max(0, Math.floor(this.toFiniteNumber(count, 0)));
756
- if (safeCount !== this.rowCount) {
757
- this.lastReachEndNotifiedRowCount = -1;
758
- }
759
- this.rowCount = safeCount;
760
- if (this.useVirtualScroll) {
761
- this.propagateVirtualUpdate(true);
762
- }
763
- }
764
- /** 가상 스크롤 총 행 수를 설정합니다. */
765
- async setRowCount(count) {
766
- this.setRowCountSync(count);
767
- }
768
- calculateVisibleRange(scrollTop, containerHeight) {
769
- const safeRowHeight = Math.max(1, this.toFiniteNumber(this.effectiveRowHeight, 40));
770
- const safeBuffer = Math.max(0, Math.floor(this.toFiniteNumber(this.virtualBuffer, 5)));
771
- const safeScrollTop = Math.max(0, this.toFiniteNumber(scrollTop, 0));
772
- const safeContainerHeight = Math.max(0, this.toFiniteNumber(containerHeight, 0));
773
- const safeRowCount = Math.max(0, Math.floor(this.toFiniteNumber(this.rowCount, 0)));
774
- const firstVisible = Math.floor(safeScrollTop / safeRowHeight);
775
- const visibleCount = Math.ceil(safeContainerHeight / safeRowHeight);
776
- const start = Math.max(0, firstVisible - safeBuffer);
777
- const end = Math.min(safeRowCount, firstVisible + visibleCount + safeBuffer);
778
- return { start, end };
779
- }
780
- getPaginationInfoSync() {
781
- if (!this.useInternalPagination || !this.pagination)
782
- return null;
783
- const startIndex = (this.currentPage - 1) * this.innerRowsPerPage;
784
- const endIndex = startIndex + this.innerRowsPerPage;
785
- return {
786
- startIndex,
787
- endIndex,
788
- currentPage: this.currentPage,
789
- rowsPerPage: this.innerRowsPerPage,
790
- };
791
- }
792
- /** 현재 페이지네이션 상태(startIndex, endIndex, currentPage, rowsPerPage)를 반환합니다. */
793
- async getPaginationInfo() {
794
- return this.getPaginationInfoSync();
795
- }
796
- getVirtualScrollRangeSync() {
797
- if (!this.useVirtualScroll)
798
- return null;
799
- if (!(this.vsEnd > 0))
800
- return null;
801
- return { from: this.vsStart, to: this.vsEnd };
802
- }
803
- // autoTbody fallback에서 sd-table이 직접 sd-tr을 만들어내는 경로.
804
- // 가상 스크롤은 사용자가 직접 SdTbody+SdTr을 작성해야 하므로 빈 배열을 반환한다.
805
- renderAutoRows() {
806
- if (this.useVirtualScroll)
807
- return null;
808
- const allRows = this.rows ?? [];
809
- const pageInfo = this.getPaginationInfoSync();
810
- const startIdx = pageInfo?.startIndex ?? 0;
811
- const displayed = pageInfo ? allRows.slice(pageInfo.startIndex, pageInfo.endIndex) : allRows;
812
- return displayed.map((row, i) => {
813
- const absoluteIdx = startIdx + i;
814
- return h("sd-tr", { key: absoluteIdx, "row-key": String(absoluteIdx), row: row });
815
- });
816
- }
817
- get tableClasses() {
818
- return [
819
- 'sd-table',
820
- this.stickyHeader && 'sd-table--sticky-header',
821
- this.selectable && 'sd-table--selectable',
822
- this.resizable && 'sd-table--resizable',
823
- (this.selectable ||
824
- (this.stickyColumn?.left ?? 0) > 0 ||
825
- (this.stickyColumn?.right ?? 0) > 0) &&
826
- 'sd-table--sticky-column',
827
- this.scrolledLeft && 'sd-table--scrolled-left',
828
- this.scrolledRight && 'sd-table--scrolled-right',
829
- this.rowCount === 0 && !this.isLoading && 'sd-table--no-data',
830
- ]
831
- .filter(Boolean)
832
- .join(' ');
833
- }
834
- render() {
835
- const resolvedTableId = this.getResolvedTableId();
836
- const isNoData = this.rowCount === 0 && !this.isLoading;
837
- const paginationHeight = this.pagination && this.rowCount > 0 && !this.useVirtualScroll ? 48 : 0;
838
- const noDataTotalHeight = 36 + this.noDataBodyHeight;
839
- const hostHeight = isNoData
840
- ? this.height !== undefined
841
- ? `max(${this.height}, ${noDataTotalHeight}px)`
842
- : `max(${noDataTotalHeight}px, 100%)`
843
- : (this.height ?? '100%');
844
- const hostStyle = {
845
- '--table-radius': `${TABLE_RADIUS}px`,
846
- '--table-border-color': TABLE_BORDER.color,
847
- '--table-border-width': `${TABLE_BORDER.width}px`,
848
- '--table-body-font-family': TABLE_BODY_TYPOGRAPHY.fontFamily,
849
- '--table-body-font-weight': TABLE_BODY_TYPOGRAPHY.fontWeight,
850
- '--table-body-font-size': `${TABLE_BODY_TYPOGRAPHY.fontSize}px`,
851
- '--table-body-line-height': `${TABLE_BODY_TYPOGRAPHY.lineHeight}px`,
852
- '--table-body-text-decoration': TABLE_BODY_TYPOGRAPHY.textDecoration,
853
- '--table-selectable-width': `${TABLE_SELECTABLE_COLUMN_WIDTH}px`,
854
- '--table-host-height': hostHeight,
855
- };
856
- return (h(Host, { key: 'e4f8c5d93a6fdae077abab4641ea4ea883249cae', style: hostStyle }, h("div", { key: '4af67aafb4cadc6de00ae92884e7d3585d85990b', class: "sd-table__container", style: {
857
- '--table-width': this.width,
858
- '--pagination-height': `${paginationHeight}px`,
859
- } }, h("div", { key: 'd88a3f49c6cd1c0798774d06b9510fa62592138f', class: {
860
- 'sd-table__wrapper': true,
861
- 'sd-table__wrapper--radius-useTop': this.radius === 'useTop',
862
- 'sd-table__wrapper--radius-full': this.radius === 'full',
863
- } }, h("div", { key: '891e2acca41a9224acaa1a688eedbb2defea7964', class: {
864
- 'sd-table__scroll-container': true,
865
- 'sd-table__scroll-container--loading': this.isLoading,
866
- 'sd-table__scroll-container--no-data': isNoData,
867
- } }, this.isLoading && (h("div", { key: 'e59045daf43b2ac2e34a77e6b3532d5f6b18d1f5', class: "sd-table__loading", style: { top: `${this.loadingScrollTop}px` } }, h("sd-circle-progress", { key: '88023a5a6a25fef9f643e9c25a822adc292d8dff', indeterminate: true }))), isNoData && (h(h.Fragment, null, h("div", { key: 'd532beb284595d75086b9fd529ecd23c8ca9f03d', class: "sd-table__no-data-header-overlay" }), h("div", { key: 'f0d1047870fdb069bfc89caf14e52c14c664e57e', class: "sd-table__no-data" }, h("div", { key: '827123263a6dfaef37a59f6773e1385d4fc56579', class: "sd-table__no-data-content", ref: el => {
868
- this.noDataContentEl = el;
869
- if (el)
870
- this.syncNoDataContentObserver();
871
- } }, h("slot", { key: '208dec9639a23e294eb8b2d806a0bc4a33fbfee7', name: "no-data" }, h("span", { key: '7afeda8315328ffb550bbf977ad8c68aaf7ea8cb' }, this.resolvedNoDataLabel)))))), h("table", { key: '66fc88a1ce062da02512fa4ec8f147cb8a24c876', class: this.tableClasses }, this.autoThead ? (h("slot", { name: `${resolvedTableId}-head`, onSlotchange: this.handleStructureSlotChange }, h("sd-thead", { rows: this.rows ?? [] }))) : (h("slot", { name: `${resolvedTableId}-head`, onSlotchange: this.handleStructureSlotChange })), this.autoTbody ? (h("slot", { name: `${resolvedTableId}-body`, onSlotchange: this.handleStructureSlotChange }, h("sd-tbody", { rows: this.rows ?? [] }, this.renderAutoRows()))) : (h("slot", { name: `${resolvedTableId}-body`, onSlotchange: this.handleStructureSlotChange }))))), this.pagination &&
872
- this.pagination.rowsPerPage > 0 &&
873
- this.rowCount > 0 &&
874
- !this.useVirtualScroll && (h("div", { key: '98a0feac03369f0fb49db1378b0a1bdc84b4cf8e', class: "sd-table__pagination" }, h("sd-pagination", { key: 'b030119f0952a7375176775c666a16952828057b', currentPage: !this.useInternalPagination ? this.pagination.page : this.currentPage, lastPage: !this.useInternalPagination ? this.pagination.lastPage : this.lastPageNumber, onSdPageChange: (e) => this.changePage(e.detail) }), this.useRowsPerPageSelect && (h("sd-select", { key: '3873d513d3f17a3ff3ae92fcbe38132faef8e07a', value: this.useInternalPagination
875
- ? this.innerRowsPerPage
876
- : this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", emitValue: true, onSdUpdate: e => {
877
- if (!this.isRowsPerPageValue(e.detail))
878
- return;
879
- this.changeRowsPerPage(e.detail);
880
- } })))))));
881
- }
882
- static get is() { return "sd-table"; }
883
- static get encapsulation() { return "shadow"; }
884
- static get originalStyleUrls() {
885
- return {
886
- "$": ["sd-table.scss"]
887
- };
888
- }
889
- static get styleUrls() {
890
- return {
891
- "$": ["sd-table.css"]
892
- };
893
- }
894
- static get properties() {
895
- return {
896
- "tableId": {
897
- "type": "string",
898
- "mutable": false,
899
- "complexType": {
900
- "original": "string",
901
- "resolved": "string",
902
- "references": {}
903
- },
904
- "required": false,
905
- "optional": false,
906
- "docs": {
907
- "tags": [],
908
- "text": "\uD14C\uC774\uBE14 \uACE0\uC720 ID (\uC790\uC2DD \uC2AC\uB86F \uB9E4\uD551\uC5D0 \uC0AC\uC6A9)"
909
- },
910
- "getter": false,
911
- "setter": false,
912
- "reflect": true,
913
- "attribute": "table-id",
914
- "defaultValue": "nanoid(8)"
915
- },
916
- "columns": {
917
- "type": "unknown",
918
- "mutable": false,
919
- "complexType": {
920
- "original": "SdTableColumn[]",
921
- "resolved": "SdTableColumn[]",
922
- "references": {
923
- "SdTableColumn": {
924
- "location": "import",
925
- "path": "./constants",
926
- "id": "src/components/sd-table/constants.ts::SdTableColumn",
927
- "referenceLocation": "SdTableColumn"
928
- }
929
- }
930
- },
931
- "required": false,
932
- "optional": false,
933
- "docs": {
934
- "tags": [],
935
- "text": "\uCEEC\uB7FC \uC815\uC758 \uBAA9\uB85D"
936
- },
937
- "getter": false,
938
- "setter": false,
939
- "defaultValue": "[]"
940
- },
941
- "rows": {
942
- "type": "unknown",
943
- "mutable": false,
944
- "complexType": {
945
- "original": "Row[]",
946
- "resolved": "Row[] | undefined",
947
- "references": {
948
- "Row": {
949
- "location": "import",
950
- "path": "./constants",
951
- "id": "src/components/sd-table/constants.ts::Row",
952
- "referenceLocation": "Row"
953
- }
954
- }
955
- },
956
- "required": false,
957
- "optional": true,
958
- "docs": {
959
- "tags": [],
960
- "text": "\uD589 \uB370\uC774\uD130 \uBC30\uC5F4"
961
- },
962
- "getter": false,
963
- "setter": false
964
- },
965
- "selected": {
966
- "type": "unknown",
967
- "mutable": true,
968
- "complexType": {
969
- "original": "Row[]",
970
- "resolved": "Row[]",
971
- "references": {
972
- "Row": {
973
- "location": "import",
974
- "path": "./constants",
975
- "id": "src/components/sd-table/constants.ts::Row",
976
- "referenceLocation": "Row"
977
- }
978
- }
979
- },
980
- "required": false,
981
- "optional": false,
982
- "docs": {
983
- "tags": [],
984
- "text": "\uD604\uC7AC \uC120\uD0DD\uB41C \uD589 \uBAA9\uB85D"
985
- },
986
- "getter": false,
987
- "setter": false,
988
- "defaultValue": "[]"
989
- },
990
- "rowKey": {
991
- "type": "string",
992
- "mutable": false,
993
- "complexType": {
994
- "original": "string",
995
- "resolved": "string",
996
- "references": {}
997
- },
998
- "required": false,
999
- "optional": false,
1000
- "docs": {
1001
- "tags": [],
1002
- "text": "\uD589 \uACE0\uC720 \uC2DD\uBCC4 \uD544\uB4DC\uBA85"
1003
- },
1004
- "getter": false,
1005
- "setter": false,
1006
- "reflect": false,
1007
- "attribute": "row-key",
1008
- "defaultValue": "'id'"
1009
- },
1010
- "selectable": {
1011
- "type": "boolean",
1012
- "mutable": false,
1013
- "complexType": {
1014
- "original": "boolean",
1015
- "resolved": "boolean",
1016
- "references": {}
1017
- },
1018
- "required": false,
1019
- "optional": false,
1020
- "docs": {
1021
- "tags": [],
1022
- "text": "\uD589 \uC120\uD0DD(\uCCB4\uD06C\uBC15\uC2A4) \uAE30\uB2A5 \uD65C\uC131\uD654 \uC5EC\uBD80"
1023
- },
1024
- "getter": false,
1025
- "setter": false,
1026
- "reflect": false,
1027
- "attribute": "selectable",
1028
- "defaultValue": "false"
1029
- },
1030
- "resizable": {
1031
- "type": "boolean",
1032
- "mutable": false,
1033
- "complexType": {
1034
- "original": "boolean",
1035
- "resolved": "boolean",
1036
- "references": {}
1037
- },
1038
- "required": false,
1039
- "optional": false,
1040
- "docs": {
1041
- "tags": [],
1042
- "text": "\uCEEC\uB7FC \uB108\uBE44 \uC870\uC808 \uAE30\uB2A5 \uD65C\uC131\uD654 \uC5EC\uBD80"
1043
- },
1044
- "getter": false,
1045
- "setter": false,
1046
- "reflect": false,
1047
- "attribute": "resizable",
1048
- "defaultValue": "false"
1049
- },
1050
- "width": {
1051
- "type": "string",
1052
- "mutable": false,
1053
- "complexType": {
1054
- "original": "string",
1055
- "resolved": "string | undefined",
1056
- "references": {}
1057
- },
1058
- "required": false,
1059
- "optional": true,
1060
- "docs": {
1061
- "tags": [],
1062
- "text": "\uD14C\uC774\uBE14 \uB108\uBE44"
1063
- },
1064
- "getter": false,
1065
- "setter": false,
1066
- "reflect": false,
1067
- "attribute": "width"
1068
- },
1069
- "height": {
1070
- "type": "string",
1071
- "mutable": false,
1072
- "complexType": {
1073
- "original": "string",
1074
- "resolved": "string | undefined",
1075
- "references": {}
1076
- },
1077
- "required": false,
1078
- "optional": true,
1079
- "docs": {
1080
- "tags": [],
1081
- "text": "\uD14C\uC774\uBE14 \uB192\uC774"
1082
- },
1083
- "getter": false,
1084
- "setter": false,
1085
- "reflect": false,
1086
- "attribute": "height"
1087
- },
1088
- "stickyHeader": {
1089
- "type": "boolean",
1090
- "mutable": false,
1091
- "complexType": {
1092
- "original": "boolean",
1093
- "resolved": "boolean",
1094
- "references": {}
1095
- },
1096
- "required": false,
1097
- "optional": false,
1098
- "docs": {
1099
- "tags": [],
1100
- "text": "\uD5E4\uB354 \uACE0\uC815(sticky) \uC5EC\uBD80"
1101
- },
1102
- "getter": false,
1103
- "setter": false,
1104
- "reflect": false,
1105
- "attribute": "sticky-header",
1106
- "defaultValue": "false"
1107
- },
1108
- "stickyColumn": {
1109
- "type": "unknown",
1110
- "mutable": false,
1111
- "complexType": {
1112
- "original": "SdTableStickyColumn",
1113
- "resolved": "SdTableStickyColumn",
1114
- "references": {
1115
- "SdTableStickyColumn": {
1116
- "location": "import",
1117
- "path": "./constants",
1118
- "id": "src/components/sd-table/constants.ts::SdTableStickyColumn",
1119
- "referenceLocation": "SdTableStickyColumn"
1120
- }
1121
- }
1122
- },
1123
- "required": false,
1124
- "optional": false,
1125
- "docs": {
1126
- "tags": [],
1127
- "text": "\uACE0\uC815\uD560 \uC88C\uC6B0 \uCEEC\uB7FC \uC218"
1128
- },
1129
- "getter": false,
1130
- "setter": false,
1131
- "defaultValue": "{ left: 0, right: 0 }"
1132
- },
1133
- "radius": {
1134
- "type": "string",
1135
- "mutable": false,
1136
- "complexType": {
1137
- "original": "'default' | 'useTop' | 'full'",
1138
- "resolved": "\"default\" | \"full\" | \"useTop\"",
1139
- "references": {}
1140
- },
1141
- "required": false,
1142
- "optional": false,
1143
- "docs": {
1144
- "tags": [],
1145
- "text": "border-radius \uC81C\uC5B4"
1146
- },
1147
- "getter": false,
1148
- "setter": false,
1149
- "reflect": false,
1150
- "attribute": "radius",
1151
- "defaultValue": "'default'"
1152
- },
1153
- "noDataLabel": {
1154
- "type": "string",
1155
- "mutable": false,
1156
- "complexType": {
1157
- "original": "string",
1158
- "resolved": "string",
1159
- "references": {}
1160
- },
1161
- "required": false,
1162
- "optional": false,
1163
- "docs": {
1164
- "tags": [],
1165
- "text": "\uB370\uC774\uD130 \uC5C6\uC744 \uB54C \uD45C\uC2DC\uD560 \uBA54\uC2DC\uC9C0"
1166
- },
1167
- "getter": false,
1168
- "setter": false,
1169
- "reflect": false,
1170
- "attribute": "no-data-label",
1171
- "defaultValue": "SdTable.DEFAULT_NO_DATA_LABEL"
1172
- },
1173
- "isLoading": {
1174
- "type": "boolean",
1175
- "mutable": false,
1176
- "complexType": {
1177
- "original": "boolean",
1178
- "resolved": "boolean",
1179
- "references": {}
1180
- },
1181
- "required": false,
1182
- "optional": false,
1183
- "docs": {
1184
- "tags": [],
1185
- "text": "\uB85C\uB529 \uC2A4\uD53C\uB108 \uD45C\uC2DC \uC5EC\uBD80"
1186
- },
1187
- "getter": false,
1188
- "setter": false,
1189
- "reflect": false,
1190
- "attribute": "is-loading",
1191
- "defaultValue": "false"
1192
- },
1193
- "pagination": {
1194
- "type": "unknown",
1195
- "mutable": false,
1196
- "complexType": {
1197
- "original": "SdTablePagination",
1198
- "resolved": "SdTablePagination | undefined",
1199
- "references": {
1200
- "SdTablePagination": {
1201
- "location": "import",
1202
- "path": "./constants",
1203
- "id": "src/components/sd-table/constants.ts::SdTablePagination",
1204
- "referenceLocation": "SdTablePagination"
1205
- }
1206
- }
1207
- },
1208
- "required": false,
1209
- "optional": true,
1210
- "docs": {
1211
- "tags": [],
1212
- "text": "\uD398\uC774\uC9C0\uB124\uC774\uC158 \uC635\uC158"
1213
- },
1214
- "getter": false,
1215
- "setter": false
1216
- },
1217
- "useInternalPagination": {
1218
- "type": "boolean",
1219
- "mutable": false,
1220
- "complexType": {
1221
- "original": "boolean",
1222
- "resolved": "boolean",
1223
- "references": {}
1224
- },
1225
- "required": false,
1226
- "optional": false,
1227
- "docs": {
1228
- "tags": [],
1229
- "text": "\uD14C\uC774\uBE14 \uB0B4\uBD80\uC5D0\uC11C \uD398\uC774\uC9C0\uB124\uC774\uC158\uC744 \uC9C1\uC811 \uAD00\uB9AC\uD560\uC9C0 \uC5EC\uBD80"
1230
- },
1231
- "getter": false,
1232
- "setter": false,
1233
- "reflect": false,
1234
- "attribute": "use-internal-pagination",
1235
- "defaultValue": "false"
1236
- },
1237
- "useRowsPerPageSelect": {
1238
- "type": "boolean",
1239
- "mutable": false,
1240
- "complexType": {
1241
- "original": "boolean",
1242
- "resolved": "boolean",
1243
- "references": {}
1244
- },
1245
- "required": false,
1246
- "optional": false,
1247
- "docs": {
1248
- "tags": [],
1249
- "text": "\uD398\uC774\uC9C0\uB2F9 \uD589 \uC218 \uC120\uD0DD \uC140\uB809\uD2B8 \uD45C\uC2DC \uC5EC\uBD80"
1250
- },
1251
- "getter": false,
1252
- "setter": false,
1253
- "reflect": false,
1254
- "attribute": "use-rows-per-page-select",
1255
- "defaultValue": "false"
1256
- },
1257
- "dense": {
1258
- "type": "boolean",
1259
- "mutable": false,
1260
- "complexType": {
1261
- "original": "boolean",
1262
- "resolved": "boolean",
1263
- "references": {}
1264
- },
1265
- "required": false,
1266
- "optional": false,
1267
- "docs": {
1268
- "tags": [],
1269
- "text": "\uD589 \uB192\uC774\uB97C \uC904\uC778 \uC870\uBC00 \uBAA8\uB4DC \uC5EC\uBD80"
1270
- },
1271
- "getter": false,
1272
- "setter": false,
1273
- "reflect": false,
1274
- "attribute": "dense",
1275
- "defaultValue": "false"
1276
- },
1277
- "useVirtualScroll": {
1278
- "type": "boolean",
1279
- "mutable": false,
1280
- "complexType": {
1281
- "original": "boolean",
1282
- "resolved": "boolean",
1283
- "references": {}
1284
- },
1285
- "required": false,
1286
- "optional": false,
1287
- "docs": {
1288
- "tags": [],
1289
- "text": "\uAC00\uC0C1 \uC2A4\uD06C\uB864 \uC0AC\uC6A9 \uC5EC\uBD80"
1290
- },
1291
- "getter": false,
1292
- "setter": false,
1293
- "reflect": false,
1294
- "attribute": "use-virtual-scroll",
1295
- "defaultValue": "false"
1296
- },
1297
- "rowHeight": {
1298
- "type": "number",
1299
- "mutable": false,
1300
- "complexType": {
1301
- "original": "number",
1302
- "resolved": "number | undefined",
1303
- "references": {}
1304
- },
1305
- "required": false,
1306
- "optional": true,
1307
- "docs": {
1308
- "tags": [],
1309
- "text": "\uAC00\uC0C1 \uC2A4\uD06C\uB864 \uD589 \uB192\uC774 (px, \uC5C6\uC73C\uBA74 dense \uC5EC\uBD80\uC5D0 \uB530\uB77C \uC790\uB3D9)"
1310
- },
1311
- "getter": false,
1312
- "setter": false,
1313
- "reflect": false,
1314
- "attribute": "row-height"
1315
- },
1316
- "virtualBuffer": {
1317
- "type": "number",
1318
- "mutable": false,
1319
- "complexType": {
1320
- "original": "number",
1321
- "resolved": "number",
1322
- "references": {}
1323
- },
1324
- "required": false,
1325
- "optional": false,
1326
- "docs": {
1327
- "tags": [],
1328
- "text": "\uAC00\uC0C1 \uC2A4\uD06C\uB864 \uC0C1\uD558 \uBC84\uD37C \uD589 \uC218"
1329
- },
1330
- "getter": false,
1331
- "setter": false,
1332
- "reflect": false,
1333
- "attribute": "virtual-buffer",
1334
- "defaultValue": "5"
1335
- },
1336
- "virtualEndThreshold": {
1337
- "type": "number",
1338
- "mutable": false,
1339
- "complexType": {
1340
- "original": "number",
1341
- "resolved": "number",
1342
- "references": {}
1343
- },
1344
- "required": false,
1345
- "optional": false,
1346
- "docs": {
1347
- "tags": [],
1348
- "text": "\uAC00\uC0C1 \uC2A4\uD06C\uB864 \uB05D \uB3C4\uB2EC \uAC10\uC9C0 \uC784\uACC4\uAC12 (\uB9C8\uC9C0\uB9C9 N\uD589 \uC774\uB0B4\uC5D0 \uB4E4\uC5B4\uC624\uBA74 \uC774\uBCA4\uD2B8 \uBC1C\uC0DD)"
1349
- },
1350
- "getter": false,
1351
- "setter": false,
1352
- "reflect": false,
1353
- "attribute": "virtual-end-threshold",
1354
- "defaultValue": "10"
1355
- },
1356
- "rowsPerPageOption": {
1357
- "type": "unknown",
1358
- "mutable": false,
1359
- "complexType": {
1360
- "original": "SelectOption[]",
1361
- "resolved": "SelectOption[]",
1362
- "references": {
1363
- "SelectOption": {
1364
- "location": "import",
1365
- "path": "./constants",
1366
- "id": "src/components/sd-table/constants.ts::SelectOption",
1367
- "referenceLocation": "SelectOption"
1368
- }
1369
- }
1370
- },
1371
- "required": false,
1372
- "optional": false,
1373
- "docs": {
1374
- "tags": [],
1375
- "text": "\uD398\uC774\uC9C0\uB2F9 \uD589 \uC218 \uC120\uD0DD \uC635\uC158 \uBAA9\uB85D"
1376
- },
1377
- "getter": false,
1378
- "setter": false,
1379
- "defaultValue": "[\n { label: '10\uAC1C\uC529 \uBCF4\uAE30', value: 10 },\n { label: '25\uAC1C\uC529 \uBCF4\uAE30', value: 25 },\n { label: '50\uAC1C\uC529 \uBCF4\uAE30', value: 50 },\n { label: '100\uAC1C\uC529 \uBCF4\uAE30', value: 100 },\n ]"
1380
- }
1381
- };
1382
- }
1383
- static get states() {
1384
- return {
1385
- "resolvedNoDataLabel": {},
1386
- "currentPage": {},
1387
- "innerRowsPerPage": {},
1388
- "innerSelected": {},
1389
- "columnWidths": {},
1390
- "scrolledLeft": {},
1391
- "scrolledRight": {},
1392
- "rowCount": {},
1393
- "loadingScrollTop": {},
1394
- "noDataBodyHeight": {},
1395
- "autoThead": {},
1396
- "autoTbody": {}
1397
- };
1398
- }
1399
- static get events() {
1400
- return [{
1401
- "method": "sdSelectChange",
1402
- "name": "sdSelectChange",
1403
- "bubbles": true,
1404
- "cancelable": true,
1405
- "composed": true,
1406
- "docs": {
1407
- "tags": [],
1408
- "text": "\uD589 \uC120\uD0DD \uC0C1\uD0DC\uAC00 \uBCC0\uACBD\uB420 \uB54C \uC120\uD0DD\uB41C \uD589 \uBAA9\uB85D\uC744 \uC804\uB2EC\uD569\uB2C8\uB2E4."
1409
- },
1410
- "complexType": {
1411
- "original": "Row[]",
1412
- "resolved": "Row[]",
1413
- "references": {
1414
- "Row": {
1415
- "location": "import",
1416
- "path": "./constants",
1417
- "id": "src/components/sd-table/constants.ts::Row",
1418
- "referenceLocation": "Row"
1419
- }
1420
- }
1421
- }
1422
- }, {
1423
- "method": "sdPageChange",
1424
- "name": "sdPageChange",
1425
- "bubbles": true,
1426
- "cancelable": true,
1427
- "composed": true,
1428
- "docs": {
1429
- "tags": [],
1430
- "text": "\uD398\uC774\uC9C0\uAC00 \uBCC0\uACBD\uB420 \uB54C \uC0C8 \uD398\uC774\uC9C0 \uBC88\uD638\uB97C \uC804\uB2EC\uD569\uB2C8\uB2E4."
1431
- },
1432
- "complexType": {
1433
- "original": "number",
1434
- "resolved": "number",
1435
- "references": {}
1436
- }
1437
- }, {
1438
- "method": "sdRowsPerPageChange",
1439
- "name": "sdRowsPerPageChange",
1440
- "bubbles": true,
1441
- "cancelable": true,
1442
- "composed": true,
1443
- "docs": {
1444
- "tags": [],
1445
- "text": "\uD398\uC774\uC9C0\uB2F9 \uD589 \uC218\uAC00 \uBCC0\uACBD\uB420 \uB54C \uBC1C\uC0DD\uD569\uB2C8\uB2E4."
1446
- },
1447
- "complexType": {
1448
- "original": "number",
1449
- "resolved": "number",
1450
- "references": {}
1451
- }
1452
- }, {
1453
- "method": "sdVirtualUpdate",
1454
- "name": "sdVirtualUpdate",
1455
- "bubbles": true,
1456
- "cancelable": true,
1457
- "composed": true,
1458
- "docs": {
1459
- "tags": [],
1460
- "text": "\uAC00\uC0C1 \uC2A4\uD06C\uB864 \uAC00\uC2DC \uBC94\uC704\uAC00 \uBCC0\uACBD\uB420 \uB54C \uBC1C\uC0DD\uD569\uB2C8\uB2E4."
1461
- },
1462
- "complexType": {
1463
- "original": "{\n from: number;\n to: number;\n }",
1464
- "resolved": "{ from: number; to: number; }",
1465
- "references": {}
1466
- }
1467
- }, {
1468
- "method": "sdVirtualReachEnd",
1469
- "name": "sdVirtualReachEnd",
1470
- "bubbles": true,
1471
- "cancelable": true,
1472
- "composed": true,
1473
- "docs": {
1474
- "tags": [],
1475
- "text": "\uAC00\uC0C1 \uC2A4\uD06C\uB864\uC774 \uB05D \uC784\uACC4\uAC12\uC5D0 \uB3C4\uB2EC\uD560 \uB54C \uBC1C\uC0DD\uD569\uB2C8\uB2E4."
1476
- },
1477
- "complexType": {
1478
- "original": "{\n from: number;\n to: number;\n rowCount: number;\n threshold: number;\n }",
1479
- "resolved": "{ from: number; to: number; rowCount: number; threshold: number; }",
1480
- "references": {}
1481
- }
1482
- }];
1483
- }
1484
- static get methods() {
1485
- return {
1486
- "isRowSelected": {
1487
- "complexType": {
1488
- "signature": "(row: Row) => Promise<boolean>",
1489
- "parameters": [{
1490
- "name": "row",
1491
- "type": "Row",
1492
- "docs": ""
1493
- }],
1494
- "references": {
1495
- "Promise": {
1496
- "location": "global",
1497
- "id": "global::Promise"
1498
- },
1499
- "Row": {
1500
- "location": "import",
1501
- "path": "./constants",
1502
- "id": "src/components/sd-table/constants.ts::Row",
1503
- "referenceLocation": "Row"
1504
- }
1505
- },
1506
- "return": "Promise<boolean>"
1507
- },
1508
- "docs": {
1509
- "text": "\uD589\uC774 \uC120\uD0DD\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD569\uB2C8\uB2E4.",
1510
- "tags": []
1511
- }
1512
- },
1513
- "updateRowSelect": {
1514
- "complexType": {
1515
- "signature": "(row: Row) => Promise<void>",
1516
- "parameters": [{
1517
- "name": "row",
1518
- "type": "Row",
1519
- "docs": ""
1520
- }],
1521
- "references": {
1522
- "Promise": {
1523
- "location": "global",
1524
- "id": "global::Promise"
1525
- },
1526
- "Row": {
1527
- "location": "import",
1528
- "path": "./constants",
1529
- "id": "src/components/sd-table/constants.ts::Row",
1530
- "referenceLocation": "Row"
1531
- }
1532
- },
1533
- "return": "Promise<void>"
1534
- },
1535
- "docs": {
1536
- "text": "\uD589 \uC120\uD0DD \uC0C1\uD0DC\uB97C \uD1A0\uAE00\uD569\uB2C8\uB2E4.",
1537
- "tags": []
1538
- }
1539
- },
1540
- "toggleSelectAll": {
1541
- "complexType": {
1542
- "signature": "(checked: boolean, rows: Row[]) => Promise<void>",
1543
- "parameters": [{
1544
- "name": "checked",
1545
- "type": "boolean",
1546
- "docs": ""
1547
- }, {
1548
- "name": "rows",
1549
- "type": "Row[]",
1550
- "docs": ""
1551
- }],
1552
- "references": {
1553
- "Promise": {
1554
- "location": "global",
1555
- "id": "global::Promise"
1556
- },
1557
- "Row": {
1558
- "location": "import",
1559
- "path": "./constants",
1560
- "id": "src/components/sd-table/constants.ts::Row",
1561
- "referenceLocation": "Row"
1562
- }
1563
- },
1564
- "return": "Promise<void>"
1565
- },
1566
- "docs": {
1567
- "text": "\uC804\uCCB4 \uD589 \uC120\uD0DD/\uD574\uC81C\uB97C \uCC98\uB9AC\uD569\uB2C8\uB2E4.",
1568
- "tags": []
1569
- }
1570
- },
1571
- "getIsAllChecked": {
1572
- "complexType": {
1573
- "signature": "(rows: Row[]) => Promise<boolean | null>",
1574
- "parameters": [{
1575
- "name": "rows",
1576
- "type": "Row[]",
1577
- "docs": ""
1578
- }],
1579
- "references": {
1580
- "Promise": {
1581
- "location": "global",
1582
- "id": "global::Promise"
1583
- },
1584
- "Row": {
1585
- "location": "import",
1586
- "path": "./constants",
1587
- "id": "src/components/sd-table/constants.ts::Row",
1588
- "referenceLocation": "Row"
1589
- }
1590
- },
1591
- "return": "Promise<boolean | null>"
1592
- },
1593
- "docs": {
1594
- "text": "\uC804\uCCB4 \uC120\uD0DD \uCCB4\uD06C \uC0C1\uD0DC\uB97C \uBC18\uD658\uD569\uB2C8\uB2E4 (true/false/null=indeterminate).",
1595
- "tags": []
1596
- }
1597
- },
1598
- "getStickyStyle": {
1599
- "complexType": {
1600
- "signature": "(colIdx: number) => Promise<Record<string, string>>",
1601
- "parameters": [{
1602
- "name": "colIdx",
1603
- "type": "number",
1604
- "docs": ""
1605
- }],
1606
- "references": {
1607
- "Promise": {
1608
- "location": "global",
1609
- "id": "global::Promise"
1610
- },
1611
- "Record": {
1612
- "location": "global",
1613
- "id": "global::Record"
1614
- }
1615
- },
1616
- "return": "Promise<Record<string, string>>"
1617
- },
1618
- "docs": {
1619
- "text": "\uC9C0\uC815\uD55C \uCEEC\uB7FC \uC778\uB371\uC2A4\uC758 sticky \uC2A4\uD0C0\uC77C \uAC1D\uCCB4\uB97C \uBC18\uD658\uD569\uB2C8\uB2E4.",
1620
- "tags": []
1621
- }
1622
- },
1623
- "setRowCount": {
1624
- "complexType": {
1625
- "signature": "(count: number) => Promise<void>",
1626
- "parameters": [{
1627
- "name": "count",
1628
- "type": "number",
1629
- "docs": ""
1630
- }],
1631
- "references": {
1632
- "Promise": {
1633
- "location": "global",
1634
- "id": "global::Promise"
1635
- }
1636
- },
1637
- "return": "Promise<void>"
1638
- },
1639
- "docs": {
1640
- "text": "\uAC00\uC0C1 \uC2A4\uD06C\uB864 \uCD1D \uD589 \uC218\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.",
1641
- "tags": []
1642
- }
1643
- },
1644
- "getPaginationInfo": {
1645
- "complexType": {
1646
- "signature": "() => Promise<{ startIndex: number; endIndex: number; currentPage: number; rowsPerPage: number; } | null>",
1647
- "parameters": [],
1648
- "references": {
1649
- "Promise": {
1650
- "location": "global",
1651
- "id": "global::Promise"
1652
- }
1653
- },
1654
- "return": "Promise<{ startIndex: number; endIndex: number; currentPage: number; rowsPerPage: number; } | null>"
1655
- },
1656
- "docs": {
1657
- "text": "\uD604\uC7AC \uD398\uC774\uC9C0\uB124\uC774\uC158 \uC0C1\uD0DC(startIndex, endIndex, currentPage, rowsPerPage)\uB97C \uBC18\uD658\uD569\uB2C8\uB2E4.",
1658
- "tags": []
1659
- }
1660
- }
1661
- };
1662
- }
1663
- static get elementRef() { return "el"; }
1664
- static get watchers() {
1665
- return [{
1666
- "propName": "isLoading",
1667
- "methodName": "handleIsLoadingChange"
1668
- }, {
1669
- "propName": "useVirtualScroll",
1670
- "methodName": "handleUseVirtualScrollChange"
1671
- }, {
1672
- "propName": "columns",
1673
- "methodName": "handleColumnsChange"
1674
- }, {
1675
- "propName": "rows",
1676
- "methodName": "handleRowsChange"
1677
- }, {
1678
- "propName": "rowKey",
1679
- "methodName": "handleRowKeyChange"
1680
- }, {
1681
- "propName": "tableId",
1682
- "methodName": "handleTableIdChange"
1683
- }, {
1684
- "propName": "noDataLabel",
1685
- "methodName": "handleNoDataLabelChange"
1686
- }, {
1687
- "propName": "selectable",
1688
- "methodName": "handleConfigChange"
1689
- }, {
1690
- "propName": "resizable",
1691
- "methodName": "handleConfigChange"
1692
- }, {
1693
- "propName": "stickyColumn",
1694
- "methodName": "handleConfigChange"
1695
- }, {
1696
- "propName": "stickyHeader",
1697
- "methodName": "handleConfigChange"
1698
- }, {
1699
- "propName": "dense",
1700
- "methodName": "handleConfigChange"
1701
- }, {
1702
- "propName": "selected",
1703
- "methodName": "handleSelectedChange"
1704
- }, {
1705
- "propName": "pagination",
1706
- "methodName": "handlePaginationChange"
1707
- }];
1708
- }
1709
- }