@sellmate/design-system 0.0.48 → 0.0.49

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 (198) hide show
  1. package/dist/cjs/design-system.cjs.js +1 -1
  2. package/dist/cjs/{index-DXo1Fhkn.js → index-Bxead0A0.js} +4 -2
  3. package/dist/cjs/{index-DXo1Fhkn.js.map → index-Bxead0A0.js.map} +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/sd-badge.cjs.entry.js +2 -2
  6. package/dist/cjs/sd-button.sd-checkbox.sd-icon.sd-input.sd-loading-spinner.sd-pagination.sd-portal.sd-select.sd-select-option.sd-table-backup.sd-tooltip.sd-tooltip-portal.entry.cjs.js.map +1 -1
  7. package/dist/cjs/sd-button_12.cjs.entry.js +206 -105
  8. package/dist/cjs/sd-card.cjs.entry.js +2 -2
  9. package/dist/cjs/sd-date-box.cjs.entry.js +1 -1
  10. package/dist/cjs/sd-date-picker.cjs.entry.js +2 -2
  11. package/dist/cjs/sd-date-range-picker.cjs.entry.js +3 -3
  12. package/dist/cjs/sd-guide.cjs.entry.js +4 -4
  13. package/dist/cjs/sd-modal-card.cjs.entry.js +1 -1
  14. package/dist/cjs/sd-popover.cjs.entry.js +4 -4
  15. package/dist/cjs/sd-progress.cjs.entry.js +3 -3
  16. package/dist/cjs/sd-select-multiple-group.cjs.entry.js +1 -1
  17. package/dist/cjs/sd-select-multiple.cjs.entry.js +3 -3
  18. package/dist/cjs/sd-select-option-group.cjs.entry.js +4 -4
  19. package/dist/cjs/sd-table.cjs.entry.js +1 -1
  20. package/dist/cjs/sd-tag.cjs.entry.js +2 -2
  21. package/dist/cjs/sd-tbody_3.cjs.entry.js +4 -4
  22. package/dist/cjs/sd-td.cjs.entry.js +3 -3
  23. package/dist/cjs/{tooltipArrow-DNiGFQNW.js → tooltipArrow-C7cIAuTo.js} +3 -3
  24. package/dist/cjs/{tooltipArrow-DNiGFQNW.js.map → tooltipArrow-C7cIAuTo.js.map} +1 -1
  25. package/dist/collection/components/sd-badge/sd-badge.js +1 -1
  26. package/dist/collection/components/sd-card/sd-card.js +1 -1
  27. package/dist/collection/components/sd-date-picker/sd-date-picker.js +1 -1
  28. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +2 -2
  29. package/dist/collection/components/sd-guide/sd-guide.js +3 -3
  30. package/dist/collection/components/sd-icon/sd-icon.js +1 -1
  31. package/dist/collection/components/sd-input/sd-input.js +2 -2
  32. package/dist/collection/components/sd-loading-spinner/sd-loading-spinner.js +1 -1
  33. package/dist/collection/components/sd-pagination/sd-pagination.js +2 -2
  34. package/dist/collection/components/sd-popover/sd-popover.js +2 -2
  35. package/dist/collection/components/sd-portal/sd-portal.js +1 -1
  36. package/dist/collection/components/sd-progress/sd-progress.js +2 -2
  37. package/dist/collection/components/sd-select/sd-select-option/sd-select-option.js +1 -1
  38. package/dist/collection/components/sd-select-multiple/sd-select-multiple.js +2 -2
  39. package/dist/collection/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.js +3 -3
  40. package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +1 -1
  41. package/dist/collection/components/sd-table/sd-td/sd-td.js +2 -2
  42. package/dist/collection/components/sd-table/sd-th/sd-th.js +1 -1
  43. package/dist/collection/components/sd-table/sd-tr/sd-tr.js +1 -1
  44. package/dist/collection/components/sd-table-backup/sd-table-backup.css +17 -15
  45. package/dist/collection/components/sd-table-backup/sd-table-backup.js +191 -90
  46. package/dist/collection/components/sd-table-backup/sd-table-backup.js.map +1 -1
  47. package/dist/collection/components/sd-tag/sd-tag.js +1 -1
  48. package/dist/collection/components/sd-tooltip/sd-tooltip.js +4 -4
  49. package/dist/collection/components/sd-tooltip-portal/sd-tooltip-portal.js +1 -1
  50. package/dist/components/index.js +1 -1
  51. package/dist/components/{p-Bn_wuPsh.js → p-BAhPNR2w.js} +8 -8
  52. package/dist/components/{p-Bn_wuPsh.js.map → p-BAhPNR2w.js.map} +1 -1
  53. package/dist/components/{p-C9qV_qzP.js → p-BozMKCTh.js} +6 -6
  54. package/dist/components/{p-C9qV_qzP.js.map → p-BozMKCTh.js.map} +1 -1
  55. package/dist/components/{p-BvuTaRpn.js → p-BpNH68jy.js} +3 -3
  56. package/dist/components/{p-BvuTaRpn.js.map → p-BpNH68jy.js.map} +1 -1
  57. package/dist/components/{p-CIkSynaQ.js → p-C930Kn80.js} +4 -4
  58. package/dist/components/{p-CIkSynaQ.js.map → p-C930Kn80.js.map} +1 -1
  59. package/dist/components/{p-Cb33bhDR.js → p-CRB0WJnC.js} +4 -4
  60. package/dist/components/{p-Cb33bhDR.js.map → p-CRB0WJnC.js.map} +1 -1
  61. package/dist/components/{p-DWfls6IE.js → p-CVDnYikl.js} +11 -11
  62. package/dist/components/{p-DWfls6IE.js.map → p-CVDnYikl.js.map} +1 -1
  63. package/dist/components/{p-BBhUxTuK.js → p-CaLViLir.js} +9 -9
  64. package/dist/components/{p-BBhUxTuK.js.map → p-CaLViLir.js.map} +1 -1
  65. package/dist/components/{p-BlDZogGu.js → p-CePRmFej.js} +4 -4
  66. package/dist/components/{p-BlDZogGu.js.map → p-CePRmFej.js.map} +1 -1
  67. package/dist/components/{p-lS2AF6uZ.js → p-CxKXdl1J.js} +6 -6
  68. package/dist/components/{p-lS2AF6uZ.js.map → p-CxKXdl1J.js.map} +1 -1
  69. package/dist/components/{p-D2rvzY8X.js → p-D2YMmHfl.js} +4 -4
  70. package/dist/components/{p-D2rvzY8X.js.map → p-D2YMmHfl.js.map} +1 -1
  71. package/dist/components/{p-B6GiEilD.js → p-D2aGA3BX.js} +4 -4
  72. package/dist/components/{p-B6GiEilD.js.map → p-D2aGA3BX.js.map} +1 -1
  73. package/dist/components/{p-CMcI4ZlP.js → p-DC5fpNnQ.js} +4 -4
  74. package/dist/components/{p-CMcI4ZlP.js.map → p-DC5fpNnQ.js.map} +1 -1
  75. package/dist/components/{p-Cafw-qR4.js → p-DY6t0qQj.js} +3 -3
  76. package/dist/components/{p-Cafw-qR4.js.map → p-DY6t0qQj.js.map} +1 -1
  77. package/dist/components/{p-DsXAGqf9.js → p-Dg_O2miv.js} +4 -4
  78. package/dist/components/{p-DsXAGqf9.js.map → p-Dg_O2miv.js.map} +1 -1
  79. package/dist/components/{p-DCDoqfn8.js → p-LziGti_p.js} +4 -4
  80. package/dist/components/{p-DCDoqfn8.js.map → p-LziGti_p.js.map} +1 -1
  81. package/dist/components/{p-WhZES_rm.js → p-RZm_wGW3.js} +6 -6
  82. package/dist/components/{p-WhZES_rm.js.map → p-RZm_wGW3.js.map} +1 -1
  83. package/dist/components/{p-CbnL1UUF.js → p-TFWJruz2.js} +4 -3
  84. package/dist/components/p-TFWJruz2.js.map +1 -0
  85. package/dist/components/{p-t7JZlmXM.js → p-cOQWi_dD.js} +4 -4
  86. package/dist/components/{p-t7JZlmXM.js.map → p-cOQWi_dD.js.map} +1 -1
  87. package/dist/components/{p-wA4KCOG0.js → p-gnOKrd57.js} +3 -3
  88. package/dist/components/{p-wA4KCOG0.js.map → p-gnOKrd57.js.map} +1 -1
  89. package/dist/components/sd-badge.js +2 -2
  90. package/dist/components/sd-button.js +1 -1
  91. package/dist/components/sd-card.js +2 -2
  92. package/dist/components/sd-checkbox.js +1 -1
  93. package/dist/components/sd-date-box.js +1 -1
  94. package/dist/components/sd-date-picker.js +6 -6
  95. package/dist/components/sd-date-range-picker.js +7 -7
  96. package/dist/components/sd-guide.js +7 -7
  97. package/dist/components/sd-icon.js +1 -1
  98. package/dist/components/sd-input.js +1 -1
  99. package/dist/components/sd-loading-spinner.js +1 -1
  100. package/dist/components/sd-modal-card.js +3 -3
  101. package/dist/components/sd-pagination.js +1 -1
  102. package/dist/components/sd-popover.js +7 -7
  103. package/dist/components/sd-portal.js +1 -1
  104. package/dist/components/sd-progress.js +3 -3
  105. package/dist/components/sd-select-multiple-group.js +7 -7
  106. package/dist/components/sd-select-multiple.js +9 -9
  107. package/dist/components/sd-select-option-group.js +1 -1
  108. package/dist/components/sd-select-option.js +1 -1
  109. package/dist/components/sd-select.js +1 -1
  110. package/dist/components/sd-table-backup.js +203 -102
  111. package/dist/components/sd-table-backup.js.map +1 -1
  112. package/dist/components/sd-table.js +14 -14
  113. package/dist/components/sd-tag.js +2 -2
  114. package/dist/components/sd-tbody.js +1 -1
  115. package/dist/components/sd-td.js +3 -3
  116. package/dist/components/sd-th.js +1 -1
  117. package/dist/components/sd-tooltip-portal.js +1 -1
  118. package/dist/components/sd-tooltip.js +1 -1
  119. package/dist/components/sd-tr.js +1 -1
  120. package/dist/design-system/design-system.esm.js +1 -1
  121. package/dist/design-system/{p-390283f7.entry.js → p-037de6ce.entry.js} +2 -2
  122. package/dist/design-system/p-0cada447.entry.js +2 -0
  123. package/dist/design-system/p-154958ba.entry.js +2 -0
  124. package/dist/design-system/{p-826c6517.entry.js → p-2285c061.entry.js} +2 -2
  125. package/dist/design-system/{p-d4b5575e.entry.js → p-267985b3.entry.js} +2 -2
  126. package/dist/design-system/p-328d7e6c.entry.js +2 -0
  127. package/dist/design-system/{p-8734ded6.entry.js → p-45bb29cf.entry.js} +2 -2
  128. package/dist/design-system/{p-871c8d66.entry.js → p-6d81e6f8.entry.js} +2 -2
  129. package/dist/design-system/p-6f16399e.entry.js +2 -0
  130. package/dist/design-system/{p-6320b9c6.entry.js.map → p-6f16399e.entry.js.map} +1 -1
  131. package/dist/design-system/{p-f9d01bdb.entry.js → p-74c0eee4.entry.js} +2 -2
  132. package/dist/design-system/{p-3574f319.entry.js → p-8d1a2a13.entry.js} +2 -2
  133. package/dist/design-system/p-927b3333.entry.js +2 -0
  134. package/dist/design-system/p-927b3333.entry.js.map +1 -0
  135. package/dist/design-system/p-ClyGLKUd.js +3 -0
  136. package/dist/design-system/{p-B2T3tS5r.js.map → p-ClyGLKUd.js.map} +1 -1
  137. package/dist/design-system/p-DXZjHQmQ.js +2 -0
  138. package/dist/design-system/{p-BE6EMCXm.js.map → p-DXZjHQmQ.js.map} +1 -1
  139. package/dist/design-system/{p-4386db36.entry.js → p-bea456ad.entry.js} +2 -2
  140. package/dist/design-system/{p-ce8fe1fd.entry.js → p-d7fe0919.entry.js} +2 -2
  141. package/dist/design-system/{p-0d776157.entry.js → p-dc6681a7.entry.js} +2 -2
  142. package/dist/design-system/p-ecb38b6a.entry.js +2 -0
  143. package/dist/design-system/{p-db0f705b.entry.js.map → p-ecb38b6a.entry.js.map} +1 -1
  144. package/dist/design-system/p-fb4d628a.entry.js +2 -0
  145. package/dist/design-system/sd-button.sd-checkbox.sd-icon.sd-input.sd-loading-spinner.sd-pagination.sd-portal.sd-select.sd-select-option.sd-table-backup.sd-tooltip.sd-tooltip-portal.entry.esm.js.map +1 -1
  146. package/dist/esm/design-system.js +2 -2
  147. package/dist/esm/{index-B2T3tS5r.js → index-ClyGLKUd.js} +4 -3
  148. package/dist/esm/{index-B2T3tS5r.js.map → index-ClyGLKUd.js.map} +1 -1
  149. package/dist/esm/loader.js +2 -2
  150. package/dist/esm/sd-badge.entry.js +2 -2
  151. package/dist/esm/sd-button.sd-checkbox.sd-icon.sd-input.sd-loading-spinner.sd-pagination.sd-portal.sd-select.sd-select-option.sd-table-backup.sd-tooltip.sd-tooltip-portal.entry.js.map +1 -1
  152. package/dist/esm/sd-button_12.entry.js +206 -105
  153. package/dist/esm/sd-card.entry.js +2 -2
  154. package/dist/esm/sd-date-box.entry.js +1 -1
  155. package/dist/esm/sd-date-picker.entry.js +2 -2
  156. package/dist/esm/sd-date-range-picker.entry.js +3 -3
  157. package/dist/esm/sd-guide.entry.js +4 -4
  158. package/dist/esm/sd-modal-card.entry.js +1 -1
  159. package/dist/esm/sd-popover.entry.js +4 -4
  160. package/dist/esm/sd-progress.entry.js +3 -3
  161. package/dist/esm/sd-select-multiple-group.entry.js +1 -1
  162. package/dist/esm/sd-select-multiple.entry.js +3 -3
  163. package/dist/esm/sd-select-option-group.entry.js +4 -4
  164. package/dist/esm/sd-table.entry.js +1 -1
  165. package/dist/esm/sd-tag.entry.js +2 -2
  166. package/dist/esm/sd-tbody_3.entry.js +4 -4
  167. package/dist/esm/sd-td.entry.js +3 -3
  168. package/dist/esm/{tooltipArrow-Pa2XQhpp.js → tooltipArrow-BwO7_hdW.js} +3 -3
  169. package/dist/esm/{tooltipArrow-Pa2XQhpp.js.map → tooltipArrow-BwO7_hdW.js.map} +1 -1
  170. package/dist/types/components/sd-table-backup/sd-table-backup.d.ts +15 -0
  171. package/hydrate/index.js +236 -126
  172. package/hydrate/index.mjs +236 -126
  173. package/package.json +2 -2
  174. package/dist/components/p-CbnL1UUF.js.map +0 -1
  175. package/dist/design-system/p-043b7fd1.entry.js +0 -2
  176. package/dist/design-system/p-043b7fd1.entry.js.map +0 -1
  177. package/dist/design-system/p-059ca6cb.entry.js +0 -2
  178. package/dist/design-system/p-6320b9c6.entry.js +0 -2
  179. package/dist/design-system/p-7b4fe5bf.entry.js +0 -2
  180. package/dist/design-system/p-7e8db11c.entry.js +0 -2
  181. package/dist/design-system/p-B2T3tS5r.js +0 -3
  182. package/dist/design-system/p-BE6EMCXm.js +0 -2
  183. package/dist/design-system/p-d4e043c5.entry.js +0 -2
  184. package/dist/design-system/p-db0f705b.entry.js +0 -2
  185. /package/dist/design-system/{p-390283f7.entry.js.map → p-037de6ce.entry.js.map} +0 -0
  186. /package/dist/design-system/{p-7b4fe5bf.entry.js.map → p-0cada447.entry.js.map} +0 -0
  187. /package/dist/design-system/{p-059ca6cb.entry.js.map → p-154958ba.entry.js.map} +0 -0
  188. /package/dist/design-system/{p-826c6517.entry.js.map → p-2285c061.entry.js.map} +0 -0
  189. /package/dist/design-system/{p-d4b5575e.entry.js.map → p-267985b3.entry.js.map} +0 -0
  190. /package/dist/design-system/{p-7e8db11c.entry.js.map → p-328d7e6c.entry.js.map} +0 -0
  191. /package/dist/design-system/{p-8734ded6.entry.js.map → p-45bb29cf.entry.js.map} +0 -0
  192. /package/dist/design-system/{p-871c8d66.entry.js.map → p-6d81e6f8.entry.js.map} +0 -0
  193. /package/dist/design-system/{p-f9d01bdb.entry.js.map → p-74c0eee4.entry.js.map} +0 -0
  194. /package/dist/design-system/{p-3574f319.entry.js.map → p-8d1a2a13.entry.js.map} +0 -0
  195. /package/dist/design-system/{p-4386db36.entry.js.map → p-bea456ad.entry.js.map} +0 -0
  196. /package/dist/design-system/{p-ce8fe1fd.entry.js.map → p-d7fe0919.entry.js.map} +0 -0
  197. /package/dist/design-system/{p-0d776157.entry.js.map → p-dc6681a7.entry.js.map} +0 -0
  198. /package/dist/design-system/{p-d4e043c5.entry.js.map → p-fb4d628a.entry.js.map} +0 -0
@@ -113,7 +113,7 @@ export class SdPortal {
113
113
  this.sdClose.emit();
114
114
  }
115
115
  render() {
116
- return h("slot", { key: 'b24b7f844564365e887dc8cee8b98e26a94961cd' });
116
+ return h("slot", { key: '2f6a1908864a2b5bbe86127fbf41b6b44a599666' });
117
117
  }
118
118
  static get is() { return "sd-portal"; }
119
119
  static get properties() {
@@ -13,10 +13,10 @@ export class SdProgress {
13
13
  error: '#FB4444',
14
14
  };
15
15
  render() {
16
- return (h(Host, { key: 'e5a1be5c3343e0645db107b076fac36d1a935ca7', style: {
16
+ return (h(Host, { key: 'fa4a0bdd1e76231bc3ff349c5e94a18f1d747bf4', style: {
17
17
  '--progress-color': this.statusColor[this.status],
18
18
  '--progress-percentage': `${this.percentage}%`,
19
- } }, this.type === 'bar' ? this.renderBarProgress() : this.renderSpinnerProgress(), this.label && h("div", { key: 'd2676df17ad3474f88d3c0972802a7b373b5652e', class: "sd-progress__label" }, this.label)));
19
+ } }, this.type === 'bar' ? this.renderBarProgress() : this.renderSpinnerProgress(), this.label && h("div", { key: '2c356835e29ec88765f0be0efbe9ee416f1e27ea', class: "sd-progress__label" }, this.label)));
20
20
  }
21
21
  renderBarProgress() {
22
22
  return (h("div", { class: `sd-progress__bar sd-progress__bar--${this.status}` }, h("div", { class: ['sd-progress__bar__percent', this.percentage < 100 ? 'proceed' : ''].join(' ') }), h("div", { class: "sd-progress__bar__indicator sd-progress__bar__indicator--left" }, this.percentage, "%"), h("div", { class: "sd-progress__bar__indicator sd-progress__bar__indicator--right" }, this.percentage, "%")));
@@ -24,7 +24,7 @@ export class SdSelectOption {
24
24
  }
25
25
  };
26
26
  render() {
27
- return (h(Host, { key: 'f1874b4e539573ddaa48cb2bdc9d13ea96bf350e' }, h("div", { key: '5a3bbd66f6623a1c02d5e1295bb974e82883b8a1', class: {
27
+ return (h(Host, { key: '70eafe63e44409063337d0a43846c3be869086df' }, h("div", { key: '21cafb06d87968387f9b9ec91fdd09643cded1ca', class: {
28
28
  'sd-select__option': true,
29
29
  'sd-select__option--selected': this.isSelected,
30
30
  'sd-select__option--disabled': !!this.option.disabled,
@@ -208,11 +208,11 @@ export class SdSelectMultiple extends BaseDropdownEvent {
208
208
  '--select-width': this.width || '200px',
209
209
  '--select-dropdown-height': this.dropdownHeight || '260px',
210
210
  };
211
- return (h(Host, { key: '0e488c3906b12e73abc6e6216e14b2b4e6a130c8', style: style }, h("div", { key: '714a95f446631269a19e44d098ef0dc81c7c6fd5', class: {
211
+ return (h(Host, { key: '71bf4aa9bb298ddd42fa2df53ffcaa75acd17811', style: style }, h("div", { key: '9f0970babd424f097b82acab1e93d4922cd5a36e', class: {
212
212
  'sd-select-multiple': true,
213
213
  'sd-select-multiple--open': this.isOpen,
214
214
  'sd-select-multiple--disabled': this.disabled,
215
- }, ref: el => (this.selectRef = el) }, this.renderLabel(this.label), h("div", { key: '08912b8586c926107cbcaed28b73bd6eb94d47d9', class: "sd-select-multiple__container" }, this.renderTrigger(), this.renderDropdown()))));
215
+ }, ref: el => (this.selectRef = el) }, this.renderLabel(this.label), h("div", { key: '57d243584fdf590139ec3436c473d54daa477e36', class: "sd-select-multiple__container" }, this.renderTrigger(), this.renderDropdown()))));
216
216
  }
217
217
  renderLabel(label) {
218
218
  if (!label)
@@ -39,7 +39,7 @@ export class SdSelectOptionGroup {
39
39
  }
40
40
  };
41
41
  render() {
42
- return (h("div", { key: 'e96411f172ed4ed5359fef2a124bf49df88e10ec', class: {
42
+ return (h("div", { key: '1fb3028e6869ec0d77878dd577ad9f4f711edc38', class: {
43
43
  'sd-select__option-group': true,
44
44
  'sd-select__option-group--selected': !!this.isSelected,
45
45
  'sd-select__option-group--disabled': !!this.option.disabled,
@@ -48,10 +48,10 @@ export class SdSelectOptionGroup {
48
48
  'sd-select__option-group--group': this.option.type === 'group',
49
49
  'sd-select__option-group--subgroup': this.option.type === 'subgroup',
50
50
  'sd-select__option-group--item': this.option.type === 'item',
51
- }, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), style: this.optionStyle, "data-index": this.index, onClick: event => this.handleClick(this.option, this.isSelected, event) }, h("div", { key: 'fa9464cac1ee58b46b983f17882eeb847e3dc9b7', class: "sd-select__option-group__label-wrapper" }, this.useCheckbox && (h("sd-checkbox", { key: 'f9a7ab839d566671d6ee9e7164424d307a81f2d6', checked: this.isSelected, disabled: this.option.disabled, onClick: e => {
51
+ }, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), style: this.optionStyle, "data-index": this.index, onClick: event => this.handleClick(this.option, this.isSelected, event) }, h("div", { key: '5d2f2564587c376d4708921e5eb68bc1d41039ab', class: "sd-select__option-group__label-wrapper" }, this.useCheckbox && (h("sd-checkbox", { key: '0d4e839a0a091d47f0a07f8a248fbc71cf2b67a3', checked: this.isSelected, disabled: this.option.disabled, onClick: e => {
52
52
  e.preventDefault();
53
53
  this.handleClick(this.option, this.isSelected, e);
54
- } })), h("span", { key: 'ee27fb5e2d14acf898c7ce1e22b8cbffe59cec31', class: "sd-select__option-group-label" }, this.option.label), this.useIndicator && this.option.type !== 'item' && (h("span", { key: 'aaf9552da0a665ac34848ab5649d5993133394c4', class: "sd-select__option-group__count-indicator" }, `(${this.countInfo?.selectedCount}/${this.countInfo?.totalCount})`)))));
54
+ } })), h("span", { key: '6ff97d5a3c84e97a4712d98f04b4cf5a5fef1895', class: "sd-select__option-group-label" }, this.option.label), this.useIndicator && this.option.type !== 'item' && (h("span", { key: '861bc3ff0ac64af5482783e7412f1ec706fe90e4', class: "sd-select__option-group__count-indicator" }, `(${this.countInfo?.selectedCount}/${this.countInfo?.totalCount})`)))));
55
55
  }
56
56
  static get is() { return "sd-select-option-group"; }
57
57
  static get originalStyleUrls() {
@@ -1,7 +1,7 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  export class SdTbody {
3
3
  render() {
4
- return (h(Host, { key: 'b94310b0ad1566cf9ccbac3ccdc5fbcdd2e53f8c' }, h("slot", { key: '382fb835aa4516adad374443556084703b8560c3' })));
4
+ return (h(Host, { key: 'f981fe2f39d8d1f292f018fba5f6f28f6606fc12' }, h("slot", { key: 'ae556a0c16e782d1842fabc1cb54a495b88f1ce5' })));
5
5
  }
6
6
  static get is() { return "sd-tbody"; }
7
7
  static get originalStyleUrls() {
@@ -5,11 +5,11 @@ export class SdTd {
5
5
  tdStyle;
6
6
  tdClass;
7
7
  render() {
8
- return (h(Host, { key: '87c947cf0092ac524cdfed0be5f1703685a64db6', role: "cell", class: {
8
+ return (h(Host, { key: '3fe3f8f4ec5b068bda0edd22ebbc5c973ae75b15', role: "cell", class: {
9
9
  'sd-td': true,
10
10
  [`sd-td--${this.align}`]: true,
11
11
  [this.tdClass || '']: Boolean(this.tdClass),
12
- }, style: this.tdStyle }, h("slot", { key: '4369629e345d8cc5bb17166d6877dba421522e4d' })));
12
+ }, style: this.tdStyle }, h("slot", { key: 'f94a99bafb7723389304e01f809b3003deda067c' })));
13
13
  }
14
14
  static get is() { return "sd-td"; }
15
15
  static get originalStyleUrls() {
@@ -1,7 +1,7 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  export class SdTh {
3
3
  render() {
4
- return (h(Host, { key: 'cf30b704166adc6d7de5ade8d455d34ecf575199', role: "columnheader" }, h("slot", { key: '7863306b924a749aba5ba55f70b8b3d5c205d133' })));
4
+ return (h(Host, { key: '59aee067627e3ac7c23ea5d9f9401c19a00203bd', role: "columnheader" }, h("slot", { key: 'ea015f9ebcdccd3e08aab46af4e2a8bcb46e4a3a' })));
5
5
  }
6
6
  static get is() { return "sd-th"; }
7
7
  static get originalStyleUrls() {
@@ -1,7 +1,7 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  export class SdTr {
3
3
  render() {
4
- return (h(Host, { key: '2cfec32649fa440cb44f83392c439e58dcb24644', role: "row" }, h("slot", { key: '0146af3690a7a6445b65893f86e0b9e5cd1d8a02' })));
4
+ return (h(Host, { key: '90de593581b21ca801462331e50126899946bf43', role: "row" }, h("slot", { key: '58eb2f9b52a36495afe40899d45bd6d1ba62b5d4' })));
5
5
  }
6
6
  static get is() { return "sd-tr"; }
7
7
  static get originalStyleUrls() {
@@ -40,12 +40,27 @@
40
40
  .sd-table__wrapper .sd-table__container .sd-table__middle {
41
41
  overflow: auto;
42
42
  will-change: scroll-position;
43
+ min-height: var(--table-container-height, auto);
43
44
  }
44
45
  .sd-table__wrapper .sd-table__container .sd-table__middle--scrollable {
45
46
  height: var(--table-container-height, auto);
46
47
  }
47
48
  .sd-table__wrapper .sd-table__container .sd-table__middle--loading {
48
49
  overflow: hidden !important;
50
+ pointer-events: none;
51
+ }
52
+ .sd-table__wrapper .sd-table__container .sd-table__middle--loading__spinner {
53
+ position: absolute;
54
+ top: 0;
55
+ left: 0;
56
+ width: var(--table-width, 100%);
57
+ height: var(--table-container-height, 100%);
58
+ min-height: var(--table-container-height, 100%);
59
+ background: rgba(255, 255, 255, 0.6);
60
+ z-index: 200;
61
+ display: flex;
62
+ align-items: center;
63
+ justify-content: center;
49
64
  }
50
65
  .sd-table__wrapper .sd-table__container .sd-table__middle .sd-table {
51
66
  background-color: white;
@@ -203,19 +218,6 @@
203
218
  border-left: 1px solid #cccccc;
204
219
  border-right: 1px solid #cccccc;
205
220
  }
206
- .sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody .sd-table__loading {
207
- position: absolute;
208
- top: 0;
209
- left: 0;
210
- width: var(--table-width, 100%);
211
- height: var(--table-container-height, 100%);
212
- min-height: var(--table-container-height, 100%);
213
- background: rgba(255, 255, 255, 0.6);
214
- z-index: 200;
215
- display: flex;
216
- align-items: center;
217
- justify-content: center;
218
- }
219
221
  .sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody tr td {
220
222
  height: 44px;
221
223
  padding: 0 16px;
@@ -259,11 +261,11 @@
259
261
  }
260
262
  .sd-table__wrapper .sd-table__virtual-spacer,
261
263
  .sd-table__wrapper .sd-table__virtual-row-spacer {
262
- padding: 0;
264
+ padding: 0 !important;
263
265
  }
264
266
  .sd-table__wrapper .sd-table__virtual-spacer td,
265
267
  .sd-table__wrapper .sd-table__virtual-row-spacer td {
266
- padding: 0;
268
+ padding: 0 !important;
267
269
  border: none;
268
270
  }
269
271
  .sd-table__wrapper .sd-table__virtual-spacer .sd-table__skeleton,
@@ -1,4 +1,4 @@
1
- import { h, Host, } from "@stencil/core";
1
+ import { h, Host, readTask, } from "@stencil/core";
2
2
  export class SdTable {
3
3
  el;
4
4
  columns;
@@ -50,6 +50,7 @@ export class SdTable {
50
50
  virtualStartColIdx = 0;
51
51
  virtualEndColIdx = 0;
52
52
  scrollLeftPosition = 0;
53
+ // 가상 스크롤 Raf(Request Animation Frame) 관리
53
54
  scrollRequestAnimationFrame = null;
54
55
  scrollContainer = null;
55
56
  rafScheduled = false;
@@ -57,19 +58,39 @@ export class SdTable {
57
58
  vertical: false,
58
59
  horizontal: false,
59
60
  };
61
+ // 상태 캐시값
62
+ cachedVisibleColumns = null;
63
+ lastColumnsRef = null;
64
+ cachedVirtualRows = null;
65
+ cachedVirtualIndexKey = '';
66
+ cachedColumnOrder = null;
67
+ lastColumnOrderKey = '';
68
+ // DOM 측정 캐시값
69
+ cachedContainerHeight = 0;
70
+ cachedContainerWidth = 0;
71
+ // 스타일 캐시
72
+ stickyStyleCache = new Map();
73
+ // isAllChecked 캐시
74
+ cachedIsAllChecked;
75
+ lastSelectionKey = '';
76
+ onScroll;
60
77
  handleColumnsChange(newCols) {
61
78
  this.columnWidths = newCols.map(c => parseInt(c.width || '120', 10));
79
+ this.cleanUpVirtualCache();
80
+ this.stickyStyleCache.clear();
62
81
  if (this.useVirtualScroll.horizontal) {
63
82
  this.scheduleUpdate('horizontal');
64
83
  }
65
84
  }
66
85
  handleColumnWidthsChange() {
86
+ this.stickyStyleCache.clear();
67
87
  if (this.useVirtualScroll.horizontal) {
68
88
  this.scheduleUpdate('horizontal');
69
89
  }
70
90
  }
71
91
  handleRowsChange(newRows) {
72
92
  this.innerRows = [...newRows];
93
+ this.cleanUpVirtualCache();
73
94
  if (this.useVirtualScroll.vertical) {
74
95
  this.scheduleUpdate('vertical');
75
96
  }
@@ -77,11 +98,19 @@ export class SdTable {
77
98
  handleSelectedChange(newSelected) {
78
99
  this.innerSelected = new Set(newSelected);
79
100
  }
101
+ cleanUpVirtualCache() {
102
+ this.cachedVisibleColumns = null;
103
+ this.lastColumnsRef = null;
104
+ this.cachedVirtualRows = null;
105
+ this.cachedVirtualIndexKey = '';
106
+ this.cachedColumnOrder = null;
107
+ this.lastColumnOrderKey = '';
108
+ }
80
109
  handlePaginationChange(newVal) {
81
110
  if (newVal?.page && newVal.page !== this.currentPage) {
82
111
  this.currentPage = newVal.page;
83
112
  if (this.useVirtualScroll.vertical && this.scrollContainer) {
84
- this.scrollContainer.scrollTop = 0;
113
+ this.scrollContainer.scrollTo({ top: 0, behavior: 'instant' });
85
114
  this.scrollTopPosition = 0;
86
115
  this.calculateVisibleRange();
87
116
  }
@@ -96,66 +125,120 @@ export class SdTable {
96
125
  }
97
126
  }
98
127
  componentDidLoad() {
99
- // SSR 환경 체크
100
- if (typeof window === 'undefined')
101
- return;
102
- const middle = this.el.querySelector('.sd-table__middle');
103
- if (!middle)
104
- return;
105
- this.scrollContainer = middle;
106
- const onScroll = () => {
107
- const { scrollLeft, scrollWidth, clientWidth, scrollTop } = middle;
108
- this.scrolledLeft = scrollLeft > 0;
109
- this.scrolledRight = scrollLeft + clientWidth < scrollWidth;
110
- // 실제 변경사항이 있을 때만 RAF 스케줄
111
- const verticalChanged = this.useVirtualScroll.vertical && this.scrollTopPosition !== scrollTop;
112
- const horizontalChanged = this.useVirtualScroll.horizontal && this.scrollLeftPosition !== scrollLeft;
113
- if (verticalChanged || horizontalChanged) {
114
- if (this.scrollRequestAnimationFrame !== null) {
115
- cancelAnimationFrame(this.scrollRequestAnimationFrame);
128
+ readTask(() => {
129
+ const middle = this.el.querySelector('.sd-table__middle');
130
+ if (!middle)
131
+ return;
132
+ this.onScroll = () => {
133
+ const scrollLeft = middle.scrollLeft;
134
+ const scrollWidth = middle.scrollWidth;
135
+ const clientWidth = middle.clientWidth;
136
+ const scrollTop = middle.scrollTop;
137
+ const verticalChanged = this.useVirtualScroll.vertical && this.scrollTopPosition !== scrollTop;
138
+ const horizontalChanged = this.useVirtualScroll.horizontal && this.scrollLeftPosition !== scrollLeft;
139
+ const newScrolledLeft = scrollLeft > 0;
140
+ const newScrolledRight = scrollLeft + clientWidth < scrollWidth;
141
+ if (this.scrolledLeft !== newScrolledLeft || this.scrolledRight !== newScrolledRight) {
142
+ this.scrolledLeft = newScrolledLeft;
143
+ this.scrolledRight = newScrolledRight;
116
144
  }
117
- this.scrollRequestAnimationFrame = requestAnimationFrame(() => {
118
- if (verticalChanged) {
119
- this.scrollTopPosition = scrollTop;
120
- this.calculateVisibleRange();
121
- }
122
- if (horizontalChanged) {
123
- this.scrollLeftPosition = scrollLeft;
124
- this.calculateVisibleColumnRange();
145
+ if (verticalChanged || horizontalChanged) {
146
+ if (this.scrollRequestAnimationFrame !== null) {
147
+ cancelAnimationFrame(this.scrollRequestAnimationFrame);
125
148
  }
126
- this.scrollRequestAnimationFrame = null;
127
- });
128
- }
149
+ this.scrollRequestAnimationFrame = requestAnimationFrame(() => {
150
+ if (verticalChanged) {
151
+ this.scrollTopPosition = scrollTop;
152
+ this.calculateVisibleRange();
153
+ }
154
+ if (horizontalChanged) {
155
+ this.scrollLeftPosition = scrollLeft;
156
+ this.calculateVisibleColumnRange();
157
+ }
158
+ this.scrollRequestAnimationFrame = null;
159
+ });
160
+ }
161
+ };
162
+ this.scrollContainer = middle;
163
+ requestAnimationFrame(() => {
164
+ if (this.scrollContainer && this.onScroll) {
165
+ this.cachedContainerHeight = this.scrollContainer.clientHeight;
166
+ this.cachedContainerWidth = this.scrollContainer.clientWidth;
167
+ middle.addEventListener('scroll', this.onScroll, { passive: true });
168
+ this.onScroll();
169
+ }
170
+ });
171
+ });
172
+ }
173
+ changePage(page) {
174
+ if (!this.useInternalPagination) {
175
+ this.sdPageChange.emit(page);
176
+ return;
177
+ }
178
+ this.currentPage = page;
179
+ this.sdPageChange.emit(this.currentPage);
180
+ }
181
+ changeRowsPerPage(perPage) {
182
+ const changedRowsPerPage = perPage ? Number(perPage) : 0;
183
+ if (!this.useInternalPagination) {
184
+ this.sdRowsPerPageChange.emit(changedRowsPerPage);
185
+ return;
186
+ }
187
+ const newRowsPerPage = Number(perPage || 0);
188
+ let newLastPage = Math.max(1, Math.ceil(this.innerRows.length / newRowsPerPage));
189
+ let newCurrentPage = this.currentPage;
190
+ if (newCurrentPage > newLastPage) {
191
+ newCurrentPage = newLastPage;
192
+ }
193
+ this.pagination = {
194
+ page: newCurrentPage,
195
+ rowsPerPage: newRowsPerPage,
196
+ lastPage: newLastPage,
129
197
  };
130
- middle.addEventListener('scroll', onScroll, { passive: true });
131
- onScroll();
198
+ this.currentPage = newCurrentPage;
199
+ this.sdRowsPerPageChange.emit(changedRowsPerPage);
132
200
  }
133
201
  disconnectedCallback() {
202
+ if (this.scrollContainer && this.onScroll) {
203
+ this.scrollContainer.removeEventListener('scroll', this.onScroll);
204
+ }
134
205
  if (this.scrollRequestAnimationFrame !== null) {
135
206
  cancelAnimationFrame(this.scrollRequestAnimationFrame);
136
207
  }
137
208
  }
138
209
  // ----- Derived getters -----
139
210
  get visibleColumns() {
140
- return this.columns.filter(col => col.visible !== false);
211
+ if (this.cachedVisibleColumns && this.lastColumnsRef === this.columns) {
212
+ return this.cachedVisibleColumns;
213
+ }
214
+ this.lastColumnsRef = this.columns;
215
+ this.cachedVisibleColumns = this.columns.filter(col => col.visible !== false);
216
+ return this.cachedVisibleColumns;
141
217
  }
142
218
  get paginatedRows() {
143
219
  if (!this.pagination || !this.useInternalPagination)
144
220
  return this.innerRows;
145
221
  const { rowsPerPage = this.rows.length } = this.pagination || {};
146
- const result = this.innerRows.slice((this.currentPage - 1) * rowsPerPage, this.currentPage * rowsPerPage);
147
- return result;
222
+ return this.innerRows.slice((this.currentPage - 1) * rowsPerPage, this.currentPage * rowsPerPage);
148
223
  }
149
224
  get virtualRows() {
225
+ const newVirtualIndexKey = `${this.virtualStartIndex}-${this.virtualEndIndex}`;
226
+ if (this.cachedVirtualRows && this.cachedVirtualIndexKey === newVirtualIndexKey) {
227
+ return this.cachedVirtualRows;
228
+ }
229
+ this.cachedVirtualIndexKey = newVirtualIndexKey;
150
230
  if (!this.useVirtualScroll.vertical) {
151
- return this.paginatedRows.map((row, idx) => ({ row, actualIndex: idx }));
231
+ this.cachedVirtualRows = this.paginatedRows.map((row, idx) => ({ row, actualIndex: idx }));
152
232
  }
153
- return this.paginatedRows
154
- .slice(this.virtualStartIndex, this.virtualEndIndex + 1)
155
- .map((row, relativeIdx) => ({
156
- row,
157
- actualIndex: this.virtualStartIndex + relativeIdx,
158
- }));
233
+ else {
234
+ this.cachedVirtualRows = this.paginatedRows
235
+ .slice(this.virtualStartIndex, this.virtualEndIndex + 1)
236
+ .map((row, relativeIdx) => ({
237
+ row,
238
+ actualIndex: this.virtualStartIndex + relativeIdx,
239
+ }));
240
+ }
241
+ return this.cachedVirtualRows;
159
242
  }
160
243
  get topSpacerHeight() {
161
244
  if (!this.useVirtualScroll.vertical || this.virtualStartIndex === 0)
@@ -228,6 +311,7 @@ export class SdTable {
228
311
  if (newSelected.length === selectedArray.length)
229
312
  return;
230
313
  this.innerSelected = new Set(newSelected);
314
+ this.cachedIsAllChecked = undefined;
231
315
  this.sdSelectChange.emit(Array.from(this.innerSelected));
232
316
  }
233
317
  toggleSelectAll(checked) {
@@ -239,16 +323,29 @@ export class SdTable {
239
323
  const currentPageKeys = this.paginatedRows.map(r => r[this.rowKey]);
240
324
  this.innerSelected = new Set([...this.innerSelected].filter(r => !currentPageKeys.includes(r[this.rowKey])));
241
325
  }
326
+ this.cachedIsAllChecked = undefined;
242
327
  this.sdSelectChange.emit(Array.from(this.innerSelected));
243
328
  }
244
329
  get isAllChecked() {
330
+ const selectionKey = `${this.paginatedRows.length}-${this.innerSelected.size}`;
331
+ if (this.cachedIsAllChecked !== undefined && this.lastSelectionKey === selectionKey) {
332
+ return this.cachedIsAllChecked;
333
+ }
245
334
  const total = this.paginatedRows.length;
246
335
  const selectedCount = this.paginatedRows.filter(row => Array.from(this.innerSelected).some(selectedRow => selectedRow[this.rowKey] === row[this.rowKey])).length;
247
- if (selectedCount === 0)
248
- return false; // 아무것도 안 선택됨
249
- if (selectedCount === total)
250
- return true; // 전부 선택됨
251
- return null; // 일부만 선택됨
336
+ let result;
337
+ if (selectedCount === 0) {
338
+ result = false; // 아무것도 안 선택됨
339
+ }
340
+ else if (selectedCount === total) {
341
+ result = true; // 전부 선택됨
342
+ }
343
+ else {
344
+ result = null; // 일부만 선택됨
345
+ }
346
+ this.cachedIsAllChecked = result;
347
+ this.lastSelectionKey = selectionKey;
348
+ return result;
252
349
  }
253
350
  // RAF 통합 관리
254
351
  scheduleUpdate(type) {
@@ -274,13 +371,22 @@ export class SdTable {
274
371
  return;
275
372
  }
276
373
  const scrollTop = this.scrollTopPosition;
277
- const containerHeight = this.scrollContainer?.clientHeight || 0;
374
+ let containerHeight = this.cachedContainerHeight;
375
+ if (containerHeight === 0 && this.scrollContainer) {
376
+ containerHeight = this.scrollContainer.clientHeight;
377
+ this.cachedContainerHeight = containerHeight;
378
+ }
379
+ const bufferSize = this.virtualBufferSize.vertical || 5;
278
380
  const startIndex = Math.floor(scrollTop / this.virtualRowHeight);
279
381
  const visibleCount = Math.ceil(containerHeight / this.virtualRowHeight);
280
- const endIndex = startIndex + visibleCount;
281
- const bufferSize = this.virtualBufferSize.vertical || 5;
282
- this.virtualStartIndex = Math.max(0, startIndex - bufferSize);
283
- this.virtualEndIndex = Math.min(this.paginatedRows.length - 1, endIndex + bufferSize);
382
+ const endIndex = startIndex + visibleCount - 1;
383
+ const newStartIndex = Math.max(0, startIndex - bufferSize);
384
+ const newEndIndex = Math.min(this.paginatedRows.length - 1, endIndex + bufferSize);
385
+ // 실제로 변경된 경우에만 상태 업데이트
386
+ if (this.virtualStartIndex !== newStartIndex || this.virtualEndIndex !== newEndIndex) {
387
+ this.virtualStartIndex = newStartIndex;
388
+ this.virtualEndIndex = newEndIndex;
389
+ }
284
390
  }
285
391
  // 가로 가상 스크롤 렌더링 계산
286
392
  calculateVisibleColumnRange() {
@@ -290,7 +396,12 @@ export class SdTable {
290
396
  return;
291
397
  }
292
398
  const scrollLeft = this.scrollLeftPosition;
293
- const containerWidth = this.scrollContainer?.clientWidth || 0;
399
+ // 캐시된 사용, 없으면 측정 후 캐시
400
+ let containerWidth = this.cachedContainerWidth;
401
+ if (containerWidth === 0 && this.scrollContainer) {
402
+ containerWidth = this.scrollContainer.clientWidth;
403
+ this.cachedContainerWidth = containerWidth;
404
+ }
294
405
  const stickyLeftCount = this.stickyColumn.left || 0;
295
406
  const stickyRightCount = this.stickyColumn.right || 0;
296
407
  // 가상 스크롤 컬럼 - sticky column 제외
@@ -330,22 +441,34 @@ export class SdTable {
330
441
  }
331
442
  }
332
443
  const bufferSize = this.virtualBufferSize.horizontal || 5;
333
- this.virtualStartColIdx = Math.max(0, startIdx - bufferSize);
334
- this.virtualEndColIdx = Math.min(virtualColumns.length - 1, endIdx + bufferSize);
444
+ const newStartColIdx = Math.max(0, startIdx - bufferSize);
445
+ const newEndColIdx = Math.min(virtualColumns.length - 1, endIdx + bufferSize);
446
+ // 실제로 변경된 경우에만 상태 업데이트
447
+ if (this.virtualStartColIdx !== newStartColIdx || this.virtualEndColIdx !== newEndColIdx) {
448
+ this.virtualStartColIdx = newStartColIdx;
449
+ this.virtualEndColIdx = newEndColIdx;
450
+ }
335
451
  }
336
452
  // ----- Helpers -----
337
453
  getStickyStyle(colIdx) {
454
+ // 캐시된 스타일이 있으면 반환
455
+ if (this.stickyStyleCache.has(colIdx)) {
456
+ return this.stickyStyleCache.get(colIdx);
457
+ }
338
458
  const leftOffset = this.columnWidths.slice(0, colIdx).reduce((a, b) => a + b, 0) + (this.selectable ? 52 : 0);
339
459
  const rightOffset = this.columnWidths
340
460
  .filter((_, i) => i >= this.visibleColumns.length - (this.stickyColumn.right || 0) && i > colIdx)
341
461
  .reduce((a, b) => a + b, 0);
342
- return {
462
+ const style = {
343
463
  '--sticky-left-offset': `${leftOffset}px`,
344
464
  '--sticky-right-offset': `${rightOffset}px`,
345
465
  'width': `${this.columnWidths[colIdx]}px`,
346
466
  'minWidth': `${this.columnWidths[colIdx]}px`,
347
467
  'maxWidth': `${this.columnWidths[colIdx]}px`,
348
468
  };
469
+ // 스타일 캐시에 저장
470
+ this.stickyStyleCache.set(colIdx, style);
471
+ return style;
349
472
  }
350
473
  handleResize(index, event) {
351
474
  // SSR 환경 체크
@@ -375,6 +498,10 @@ export class SdTable {
375
498
  return format ? format(value, row) : value;
376
499
  }
377
500
  getColumnRenderedInOrder() {
501
+ const orderKey = `${this.visibleColumns.length}-${this.virtualStartColIdx}-${this.virtualEndColIdx}`;
502
+ if (this.cachedColumnOrder && this.lastColumnOrderKey === orderKey) {
503
+ return this.cachedColumnOrder;
504
+ }
378
505
  const stickyLeftCount = this.stickyColumn.left || 0;
379
506
  const stickyRightCount = this.stickyColumn.right || 0;
380
507
  // Sticky left 컬럼들
@@ -385,13 +512,15 @@ export class SdTable {
385
512
  .slice(stickyLeftCount, this.visibleColumns.length - stickyRightCount)
386
513
  .slice(this.virtualStartColIdx, this.virtualEndColIdx + 1)
387
514
  : this.visibleColumns.slice(stickyLeftCount, this.visibleColumns.length - stickyRightCount);
388
- return {
515
+ this.cachedColumnOrder = {
389
516
  stickyLeftCount,
390
517
  stickyRightCount,
391
518
  stickyLeftCols,
392
519
  middleCols,
393
520
  stickyRightCols,
394
521
  };
522
+ this.lastColumnOrderKey = orderKey;
523
+ return this.cachedColumnOrder;
395
524
  }
396
525
  // ----- Render -----
397
526
  renderHead() {
@@ -429,7 +558,7 @@ export class SdTable {
429
558
  }))));
430
559
  }
431
560
  renderBody() {
432
- return (h("tbody", { ...(!this.paginatedRows.length && { part: 'tbody-empty' }), class: `sd-table-tbody ${this.useVirtualScroll.vertical ? 'sd-table-tbody--virtual-scroll' : ''}`, style: { '--total-virtual-height': `${this.totalVirtualHeight}px` } }, this.isLoading && (h("div", { class: "sd-table__loading" }, h("sd-loading-spinner", null))), this.useVirtualScroll.vertical && this.topSpacerHeight > 0 && this.renderSpacerRow('top'), this.paginatedRows.length > 0 &&
561
+ return (h("tbody", { ...(!this.paginatedRows.length && { part: 'tbody-empty' }), class: `sd-table-tbody ${this.useVirtualScroll.vertical ? 'sd-table-tbody--virtual-scroll' : ''}`, style: { '--total-virtual-height': `${this.totalVirtualHeight}px` } }, this.useVirtualScroll.vertical && this.topSpacerHeight > 0 && this.renderSpacerRow('top'), this.paginatedRows.length > 0 &&
433
562
  this.virtualRows.map(({ row, actualIndex }) => this.renderRow(row, actualIndex)), this.useVirtualScroll.vertical &&
434
563
  this.bottomSpacerHeight > 0 &&
435
564
  this.renderSpacerRow('bottom')));
@@ -499,44 +628,16 @@ export class SdTable {
499
628
  }, "aria-hidden": "true" }, h("div", { class: "sd-table__skeleton-cell" })));
500
629
  }
501
630
  render() {
502
- return (h(Host, { key: '658ead41c51d9f031c0334d91cad9a06811721b9' }, h("div", { key: 'c98a48d31b16cbd934e4ae47b55bcfeaa5db2520', class: "sd-table__wrapper", style: {
631
+ return (h(Host, { key: '8c01d8c3b3428d0fccb37e337fd12412c7aee51a' }, h("div", { key: 'be41d64f4b9daaa1440f2a89e253ce487894758e', class: "sd-table__wrapper", style: {
503
632
  '--table-width': this.width,
504
633
  '--table-height': this.height,
505
- } }, h("div", { key: '080fc2b81b016c4876cf90502952e49a5e468534', class: "sd-table__container", style: {
634
+ } }, h("div", { key: '580c4ca69d5374585eeacc756561e5caf2ea6e29', class: "sd-table__container", style: {
506
635
  '--table-container-height': `calc(${this.height} - ${this.pagination && this.innerRows.length > 0 ? 48 : 0}px)`,
507
- } }, h("div", { key: 'd56754a7cd4acc0505bb36d2d8a116a20d19c0e4', class: {
636
+ } }, h("div", { key: '2832a6e9078923daeefa28512450950abfca0aad', class: {
508
637
  'sd-table__middle': true,
509
638
  'sd-table__middle--scrollable': this.paginatedRows.length > 0,
510
639
  'sd-table__middle--loading': this.isLoading,
511
- } }, h("table", { key: '39d620db8e2f9ea585f8c73222687f59aaa830e6', part: "table", class: this.sdTableClasses }, this.renderHead(), this.renderBody())), h("div", { key: 'dcd87252620d5fb95deda064e2a7b4e6871c9dc1', class: "sd-table__bottom" }, !this.paginatedRows.length && (h("div", { key: 'd31ea2dbc747385fb7f7a733725e0e34f24f4489', class: "sd-table__no-data" }, h("slot", { key: '8375b5f42dafa7d430ad33226500d2a84b099990', name: "no-data" }, this.noDataLabel))))), this.pagination && this.innerRows.length > 0 && (h("div", { key: '2b231be27d05c5bb52ff1c0ced255f10be449068', class: "sd-table__pagination" }, h("sd-pagination", { key: '45676f7c4c931896c6414fa8beb6a6c23e203e92', currentPage: !this.useInternalPagination ? this.pagination.page : this.currentPage, lastPage: !this.useInternalPagination ? this.pagination.lastPage : this.lastPageNumber, onPageChange: (e) => {
512
- if (!this.useInternalPagination) {
513
- this.sdPageChange.emit(e.detail);
514
- }
515
- else {
516
- this.currentPage = e.detail;
517
- this.sdPageChange.emit(this.currentPage);
518
- }
519
- } }), this.useRowsPerPageSelect && (h("sd-select", { key: '3f65639b064a27993dc62a8e4a5dc86b16aec4f8', value: this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", onSdChange: (e) => {
520
- const changedRowsPerPage = e.detail.value ? Number(e.detail.value) : 0;
521
- if (!this.useInternalPagination) {
522
- this.sdRowsPerPageChange.emit(changedRowsPerPage);
523
- }
524
- else {
525
- const newRowsPerPage = Number(e.detail.value || 0);
526
- let newLastPage = Math.max(1, Math.ceil(this.innerRows.length / newRowsPerPage));
527
- let newCurrentPage = this.currentPage;
528
- if (newCurrentPage > newLastPage) {
529
- newCurrentPage = newLastPage;
530
- }
531
- this.pagination = {
532
- page: newCurrentPage,
533
- rowsPerPage: newRowsPerPage,
534
- lastPage: newLastPage,
535
- };
536
- this.currentPage = newCurrentPage;
537
- this.sdRowsPerPageChange.emit(changedRowsPerPage);
538
- }
539
- } })))))));
640
+ } }, this.isLoading && (h("div", { key: '696cc35d6d3c58dabf92aa49dbff9a7034a0ed64', class: "sd-table__middle--loading__spinner" }, h("sd-loading-spinner", { key: '8cbd272006b64c4a6e10c87c58313a0792358451' }))), h("table", { key: 'de78dba38361cfebe39f8c3cddb57a1c93861ff6', part: "table", class: this.sdTableClasses }, this.renderHead(), this.renderBody())), h("div", { key: '662407b29c2ea446d96553dd548bec11e8179185', class: "sd-table__bottom" }, !this.paginatedRows.length && (h("div", { key: '3a475142c5da9cc40f92b761923415893a1366fa', class: "sd-table__no-data" }, h("slot", { key: '49e90e85516b6656c7019b4b33a50f6b36d949a8', name: "no-data" }, this.noDataLabel))))), this.pagination && this.innerRows.length > 0 && (h("div", { key: '460a669cb3841fdc7745e4acb774729910890b42', class: "sd-table__pagination" }, h("sd-pagination", { key: '971f5e41f8df09f4455cdf41f969e5f47d2aac99', currentPage: !this.useInternalPagination ? this.pagination.page : this.currentPage, lastPage: !this.useInternalPagination ? this.pagination.lastPage : this.lastPageNumber, onPageChange: (e) => this.changePage(e.detail) }), this.useRowsPerPageSelect && (h("sd-select", { key: 'ed37b8efc95ae51bf4c903a5c7c5a068ec9bfcca', value: this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", onSdChange: (e) => this.changeRowsPerPage(e.detail.value) })))))));
540
641
  }
541
642
  static get is() { return "sd-table-backup"; }
542
643
  static get originalStyleUrls() {