@expcat/tigercat-vue 1.2.34 → 1.2.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/dist/{chunk-BMT5PGAQ.mjs → chunk-3KIIMXJC.mjs} +2 -2
  2. package/dist/{chunk-GVZRR2WP.mjs → chunk-5BGVVVVD.mjs} +2 -2
  3. package/dist/{chunk-OA3HAUBT.js → chunk-5BILS3SG.js} +279 -83
  4. package/dist/{chunk-7M4UUCJF.mjs → chunk-5Z2OCSVJ.mjs} +280 -84
  5. package/dist/{chunk-2LNNB55E.js → chunk-6XI4VDU4.js} +3 -3
  6. package/dist/{chunk-7RIWAO2A.mjs → chunk-BDTPFPSB.mjs} +2 -1
  7. package/dist/{chunk-PACAXQQ4.js → chunk-DMNOK6OP.js} +5 -5
  8. package/dist/{chunk-JDCVS4SJ.js → chunk-EQW6IUHG.js} +2 -1
  9. package/dist/{chunk-YR75F34D.mjs → chunk-FATIMV7O.mjs} +1 -1
  10. package/dist/{chunk-FAYSOSR7.js → chunk-FKCZSBM6.js} +4 -4
  11. package/dist/{chunk-4CWRNKPE.mjs → chunk-G7O3G2LI.mjs} +2 -2
  12. package/dist/{chunk-IBB54GHF.js → chunk-ICECZVMX.js} +2 -2
  13. package/dist/{chunk-ZNGRSXFK.js → chunk-JE7AWY34.js} +3 -3
  14. package/dist/{chunk-U5RXZ2IL.mjs → chunk-JKJ7HMFO.mjs} +1 -1
  15. package/dist/{chunk-CWQOEU6G.js → chunk-JNIKT6AL.js} +5 -5
  16. package/dist/{chunk-DBTS5QBX.mjs → chunk-JPZJZFC4.mjs} +18 -4
  17. package/dist/{chunk-TOE2XSEO.js → chunk-JT2ANXUR.js} +4 -4
  18. package/dist/{chunk-MVZGR3ZB.js → chunk-MD7S2A55.js} +2 -2
  19. package/dist/{chunk-LWDA7ABQ.js → chunk-NNFDOVVA.js} +24 -10
  20. package/dist/{chunk-IXJSZIAE.mjs → chunk-NP6KUJ4X.mjs} +1 -1
  21. package/dist/{chunk-RHAIJVMW.mjs → chunk-NYH6GSP7.mjs} +1 -1
  22. package/dist/{chunk-MCRT64VS.js → chunk-O23S65U3.js} +70 -8
  23. package/dist/{chunk-CBECE4ZO.mjs → chunk-OGDZTDZ6.mjs} +1 -1
  24. package/dist/{chunk-PHWAXBFG.mjs → chunk-OKBZKBFP.mjs} +70 -8
  25. package/dist/{chunk-4GYBJBFJ.mjs → chunk-QIXG7OIN.mjs} +1 -1
  26. package/dist/{chunk-UC3UXUVN.js → chunk-QJLFHHI2.js} +5 -5
  27. package/dist/{chunk-A5HHG53Z.js → chunk-SSMSRTEQ.js} +4 -4
  28. package/dist/{chunk-DRQ2QXZT.mjs → chunk-SZFEDBLT.mjs} +1 -1
  29. package/dist/{chunk-4J5EK3WY.mjs → chunk-UETVHC4K.mjs} +1 -1
  30. package/dist/{chunk-5HUZ33NC.mjs → chunk-V2IDOR7Y.mjs} +1 -1
  31. package/dist/{chunk-H5JDEKIV.js → chunk-V6T5GRLE.js} +2 -2
  32. package/dist/{chunk-FKLK6RHZ.js → chunk-WIQPVVUQ.js} +2 -2
  33. package/dist/{chunk-PCUUTKQZ.mjs → chunk-XQRKFOXS.mjs} +1 -1
  34. package/dist/{chunk-33YTJPF7.js → chunk-YCYS6LAQ.js} +4 -4
  35. package/dist/components/ActivityFeed.d.mts +6 -6
  36. package/dist/components/ActivityFeed.d.ts +6 -6
  37. package/dist/components/ActivityFeed.js +4 -4
  38. package/dist/components/ActivityFeed.mjs +3 -3
  39. package/dist/components/Alert.d.mts +3 -3
  40. package/dist/components/Alert.d.ts +3 -3
  41. package/dist/components/Anchor.d.mts +1 -1
  42. package/dist/components/Anchor.d.ts +1 -1
  43. package/dist/components/AreaChart.d.mts +2 -2
  44. package/dist/components/AreaChart.d.ts +2 -2
  45. package/dist/components/AutoComplete.d.mts +2 -2
  46. package/dist/components/AutoComplete.d.ts +2 -2
  47. package/dist/components/Avatar.d.mts +1 -1
  48. package/dist/components/Avatar.d.ts +1 -1
  49. package/dist/components/Badge.d.mts +3 -3
  50. package/dist/components/Badge.d.ts +3 -3
  51. package/dist/components/BarChart.d.mts +1 -1
  52. package/dist/components/BarChart.d.ts +1 -1
  53. package/dist/components/Breadcrumb.d.mts +2 -2
  54. package/dist/components/Breadcrumb.d.ts +2 -2
  55. package/dist/components/Button.d.mts +3 -3
  56. package/dist/components/Button.d.ts +3 -3
  57. package/dist/components/ButtonGroup.d.mts +1 -1
  58. package/dist/components/ButtonGroup.d.ts +1 -1
  59. package/dist/components/Calendar.d.mts +1 -1
  60. package/dist/components/Calendar.d.ts +1 -1
  61. package/dist/components/Card.d.mts +2 -2
  62. package/dist/components/Card.d.ts +2 -2
  63. package/dist/components/ChartGrid.d.mts +1 -1
  64. package/dist/components/ChartGrid.d.ts +1 -1
  65. package/dist/components/ChatWindow.d.mts +3 -3
  66. package/dist/components/ChatWindow.d.ts +3 -3
  67. package/dist/components/ChatWindow.js +3 -3
  68. package/dist/components/ChatWindow.mjs +2 -2
  69. package/dist/components/CodeEditor.d.mts +2 -2
  70. package/dist/components/CodeEditor.d.ts +2 -2
  71. package/dist/components/Collapse.d.mts +1 -1
  72. package/dist/components/Collapse.d.ts +1 -1
  73. package/dist/components/CollapsePanel.d.mts +1 -1
  74. package/dist/components/CollapsePanel.d.ts +1 -1
  75. package/dist/components/ColorSwatch.d.mts +1 -1
  76. package/dist/components/ColorSwatch.d.ts +1 -1
  77. package/dist/components/CommentThread.d.mts +2 -2
  78. package/dist/components/CommentThread.d.ts +2 -2
  79. package/dist/components/ConfigProvider.d.mts +1 -1
  80. package/dist/components/ConfigProvider.d.ts +1 -1
  81. package/dist/components/CropUpload.js +4 -4
  82. package/dist/components/CropUpload.mjs +3 -3
  83. package/dist/components/DataTableWithToolbar.d.mts +51 -11
  84. package/dist/components/DataTableWithToolbar.d.ts +51 -11
  85. package/dist/components/DataTableWithToolbar.js +8 -3
  86. package/dist/components/DataTableWithToolbar.mjs +7 -2
  87. package/dist/components/DatePicker.d.mts +2 -2
  88. package/dist/components/DatePicker.d.ts +2 -2
  89. package/dist/components/Descriptions.d.mts +2 -2
  90. package/dist/components/Descriptions.d.ts +2 -2
  91. package/dist/components/DonutChart.d.mts +2 -2
  92. package/dist/components/DonutChart.d.ts +2 -2
  93. package/dist/components/Drawer.d.mts +5 -5
  94. package/dist/components/Drawer.d.ts +5 -5
  95. package/dist/components/Drawer.js +3 -3
  96. package/dist/components/Drawer.mjs +2 -2
  97. package/dist/components/Dropdown.js +3 -3
  98. package/dist/components/Dropdown.mjs +2 -2
  99. package/dist/components/DropdownItem.js +4 -4
  100. package/dist/components/DropdownItem.mjs +3 -3
  101. package/dist/components/DropdownMenu.js +4 -4
  102. package/dist/components/DropdownMenu.mjs +2 -2
  103. package/dist/components/Empty.d.mts +1 -1
  104. package/dist/components/Empty.d.ts +1 -1
  105. package/dist/components/FileManager.d.mts +1 -1
  106. package/dist/components/FileManager.d.ts +1 -1
  107. package/dist/components/FloatButton.d.mts +3 -3
  108. package/dist/components/FloatButton.d.ts +3 -3
  109. package/dist/components/Form.d.mts +1 -1
  110. package/dist/components/Form.d.ts +1 -1
  111. package/dist/components/FormWizard.d.mts +6 -6
  112. package/dist/components/FormWizard.d.ts +6 -6
  113. package/dist/components/FunnelChart.d.mts +1 -1
  114. package/dist/components/FunnelChart.d.ts +1 -1
  115. package/dist/components/Gantt.d.mts +1 -1
  116. package/dist/components/Gantt.d.ts +1 -1
  117. package/dist/components/GaugeChart.d.mts +1 -1
  118. package/dist/components/GaugeChart.d.ts +1 -1
  119. package/dist/components/HeatmapChart.d.mts +2 -2
  120. package/dist/components/HeatmapChart.d.ts +2 -2
  121. package/dist/components/Image.d.mts +2 -2
  122. package/dist/components/Image.d.ts +2 -2
  123. package/dist/components/ImageAnnotation.d.mts +4 -4
  124. package/dist/components/ImageAnnotation.d.ts +4 -4
  125. package/dist/components/InfiniteScroll.d.mts +2 -2
  126. package/dist/components/InfiniteScroll.d.ts +2 -2
  127. package/dist/components/Input.d.mts +4 -4
  128. package/dist/components/Input.d.ts +4 -4
  129. package/dist/components/InputGroup.d.mts +1 -1
  130. package/dist/components/InputGroup.d.ts +1 -1
  131. package/dist/components/InputNumber.d.mts +1 -1
  132. package/dist/components/InputNumber.d.ts +1 -1
  133. package/dist/components/Kanban.d.mts +1 -1
  134. package/dist/components/Kanban.d.ts +1 -1
  135. package/dist/components/LineChart.d.mts +2 -2
  136. package/dist/components/LineChart.d.ts +2 -2
  137. package/dist/components/Link.d.mts +1 -1
  138. package/dist/components/Link.d.ts +1 -1
  139. package/dist/components/List.d.mts +6 -6
  140. package/dist/components/List.d.ts +6 -6
  141. package/dist/components/Loading.d.mts +5 -5
  142. package/dist/components/Loading.d.ts +5 -5
  143. package/dist/components/Loading.js +3 -3
  144. package/dist/components/Loading.mjs +2 -2
  145. package/dist/components/MarkdownEditor.d.mts +2 -2
  146. package/dist/components/MarkdownEditor.d.ts +2 -2
  147. package/dist/components/Mentions.d.mts +2 -2
  148. package/dist/components/Mentions.d.ts +2 -2
  149. package/dist/components/Menu.d.mts +5 -5
  150. package/dist/components/Menu.d.ts +5 -5
  151. package/dist/components/Menu.js +3 -3
  152. package/dist/components/Menu.mjs +2 -2
  153. package/dist/components/MenuItem.js +4 -4
  154. package/dist/components/MenuItem.mjs +2 -2
  155. package/dist/components/MenuItemGroup.js +4 -4
  156. package/dist/components/MenuItemGroup.mjs +2 -2
  157. package/dist/components/Modal.d.mts +8 -8
  158. package/dist/components/Modal.d.ts +8 -8
  159. package/dist/components/Modal.js +3 -3
  160. package/dist/components/Modal.mjs +2 -2
  161. package/dist/components/NotificationCenter.d.mts +5 -5
  162. package/dist/components/NotificationCenter.d.ts +5 -5
  163. package/dist/components/NotificationCenter.js +4 -4
  164. package/dist/components/NotificationCenter.mjs +3 -3
  165. package/dist/components/NumberKeyboard.d.mts +2 -2
  166. package/dist/components/NumberKeyboard.d.ts +2 -2
  167. package/dist/components/OrgChart.d.mts +1 -1
  168. package/dist/components/OrgChart.d.ts +1 -1
  169. package/dist/components/Pagination.d.mts +5 -5
  170. package/dist/components/Pagination.d.ts +5 -5
  171. package/dist/components/PieChart.d.mts +2 -2
  172. package/dist/components/PieChart.d.ts +2 -2
  173. package/dist/components/Popconfirm.d.mts +3 -3
  174. package/dist/components/Popconfirm.d.ts +3 -3
  175. package/dist/components/Popconfirm.js +4 -4
  176. package/dist/components/Popconfirm.mjs +3 -3
  177. package/dist/components/Popover.d.mts +1 -1
  178. package/dist/components/Popover.d.ts +1 -1
  179. package/dist/components/Popover.js +4 -4
  180. package/dist/components/Popover.mjs +3 -3
  181. package/dist/components/Progress.d.mts +3 -3
  182. package/dist/components/Progress.d.ts +3 -3
  183. package/dist/components/QRCode.d.mts +1 -1
  184. package/dist/components/QRCode.d.ts +1 -1
  185. package/dist/components/RadarChart.d.mts +2 -2
  186. package/dist/components/RadarChart.d.ts +2 -2
  187. package/dist/components/RichTextEditor.d.mts +1 -1
  188. package/dist/components/RichTextEditor.d.ts +1 -1
  189. package/dist/components/Row.d.mts +1 -1
  190. package/dist/components/Row.d.ts +1 -1
  191. package/dist/components/ScatterChart.d.mts +1 -1
  192. package/dist/components/ScatterChart.d.ts +1 -1
  193. package/dist/components/ScrollSpy.d.mts +2 -2
  194. package/dist/components/ScrollSpy.d.ts +2 -2
  195. package/dist/components/Select.d.mts +1 -1
  196. package/dist/components/Select.d.ts +1 -1
  197. package/dist/components/Signature.d.mts +2 -2
  198. package/dist/components/Signature.d.ts +2 -2
  199. package/dist/components/Skeleton.d.mts +1 -1
  200. package/dist/components/Skeleton.d.ts +1 -1
  201. package/dist/components/Space.d.mts +2 -2
  202. package/dist/components/Space.d.ts +2 -2
  203. package/dist/components/Splitter.d.mts +1 -1
  204. package/dist/components/Splitter.d.ts +1 -1
  205. package/dist/components/Spotlight.d.mts +4 -4
  206. package/dist/components/Spotlight.d.ts +4 -4
  207. package/dist/components/Spotlight.js +3 -3
  208. package/dist/components/Spotlight.mjs +2 -2
  209. package/dist/components/Steps.d.mts +3 -3
  210. package/dist/components/Steps.d.ts +3 -3
  211. package/dist/components/SubMenu.js +4 -4
  212. package/dist/components/SubMenu.mjs +2 -2
  213. package/dist/components/SunburstChart.d.mts +1 -1
  214. package/dist/components/SunburstChart.d.ts +1 -1
  215. package/dist/components/Table.d.mts +49 -11
  216. package/dist/components/Table.d.ts +49 -11
  217. package/dist/components/Table.js +8 -2
  218. package/dist/components/Table.mjs +7 -1
  219. package/dist/components/Tabs.d.mts +2 -2
  220. package/dist/components/Tabs.d.ts +2 -2
  221. package/dist/components/Tag.d.mts +1 -1
  222. package/dist/components/Tag.d.ts +1 -1
  223. package/dist/components/TaskBoard.d.mts +2 -2
  224. package/dist/components/TaskBoard.d.ts +2 -2
  225. package/dist/components/Text.d.mts +3 -3
  226. package/dist/components/Text.d.ts +3 -3
  227. package/dist/components/Textarea.d.mts +1 -1
  228. package/dist/components/Textarea.d.ts +1 -1
  229. package/dist/components/TimePicker.d.mts +3 -3
  230. package/dist/components/TimePicker.d.ts +3 -3
  231. package/dist/components/Timeline.d.mts +3 -3
  232. package/dist/components/Timeline.d.ts +3 -3
  233. package/dist/components/Tooltip.d.mts +1 -1
  234. package/dist/components/Tooltip.d.ts +1 -1
  235. package/dist/components/Tooltip.js +4 -4
  236. package/dist/components/Tooltip.mjs +3 -3
  237. package/dist/components/Tour.d.mts +2 -2
  238. package/dist/components/Tour.d.ts +2 -2
  239. package/dist/components/Tree.d.mts +2 -2
  240. package/dist/components/Tree.d.ts +2 -2
  241. package/dist/components/TreeMapChart.d.mts +1 -1
  242. package/dist/components/TreeMapChart.d.ts +1 -1
  243. package/dist/components/Upload.d.mts +4 -4
  244. package/dist/components/Upload.d.ts +4 -4
  245. package/dist/components/VirtualTable.d.mts +2 -2
  246. package/dist/components/VirtualTable.d.ts +2 -2
  247. package/dist/components/Watermark.d.mts +1 -1
  248. package/dist/components/Watermark.d.ts +1 -1
  249. package/dist/index.js +27 -27
  250. package/dist/index.mjs +27 -27
  251. package/package.json +2 -2
  252. package/dist/{chunk-S45NWVQS.mjs → chunk-6GPX4ONB.mjs} +3 -3
  253. package/dist/{chunk-VES3OJOP.js → chunk-YS6FW775.js} +2 -2
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  useFloatingPopup
3
- } from "./chunk-DBTS5QBX.mjs";
3
+ } from "./chunk-JPZJZFC4.mjs";
4
4
  import {
5
5
  renderVueBodyTeleport
6
- } from "./chunk-7RIWAO2A.mjs";
6
+ } from "./chunk-BDTPFPSB.mjs";
7
7
 
8
8
  // src/components/Tooltip.ts
9
9
  import { defineComponent, computed, h } from "vue";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  useFloatingPopup
3
- } from "./chunk-DBTS5QBX.mjs";
3
+ } from "./chunk-JPZJZFC4.mjs";
4
4
  import {
5
5
  renderVueBodyTeleport
6
- } from "./chunk-7RIWAO2A.mjs";
6
+ } from "./chunk-BDTPFPSB.mjs";
7
7
 
8
8
  // src/components/Popover.ts
9
9
  import { defineComponent, computed, h } from "vue";
@@ -1,7 +1,19 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
+ var _chunkBGMAWKWVjs = require('./chunk-BGMAWKWV.js');
4
+
5
+
6
+ var _chunk3QV2D54Hjs = require('./chunk-3QV2D54H.js');
7
+
8
+
3
9
  var _chunk25EYT2CBjs = require('./chunk-25EYT2CB.js');
4
10
 
11
+
12
+ var _chunkNOZ65AMOjs = require('./chunk-NOZ65AMO.js');
13
+
14
+
15
+ var _chunk2YFXJUBTjs = require('./chunk-2YFXJUBT.js');
16
+
5
17
  // src/components/Table.ts
6
18
 
7
19
 
@@ -27,6 +39,11 @@ var _vue = require('vue');
27
39
 
28
40
 
29
41
 
42
+
43
+
44
+
45
+
46
+
30
47
 
31
48
 
32
49
  var _tigercatcore = require('@expcat/tigercat-core');
@@ -83,9 +100,15 @@ var tableProps = {
83
100
  type: Boolean,
84
101
  default: false
85
102
  },
103
+ locale: {
104
+ type: [Object, Function]
105
+ },
106
+ labels: {
107
+ type: Object
108
+ },
86
109
  emptyText: {
87
110
  type: String,
88
- default: "No data"
111
+ default: void 0
89
112
  },
90
113
  pagination: {
91
114
  type: [Object, Boolean],
@@ -126,6 +149,16 @@ var tableProps = {
126
149
  type: String,
127
150
  default: "scroll"
128
151
  },
152
+ cardBreakpoint: {
153
+ type: String,
154
+ default: "sm"
155
+ },
156
+ cardClassName: {
157
+ type: [String, Function]
158
+ },
159
+ renderCard: {
160
+ type: Function
161
+ },
129
162
  // --- v0.6.0 props ---
130
163
  virtual: { type: Boolean, default: false },
131
164
  autoVirtual: { type: Boolean, default: true },
@@ -327,6 +360,20 @@ function useTableState(props, emit, measuredColumnWidths) {
327
360
  const total = _optionalChain([paginationConfig, 'access', _44 => _44.value, 'optionalAccess', _45 => _45.total]) !== void 0 && paginationConfig.value.total > 0 ? paginationConfig.value.total : processedData.value.length;
328
361
  return _tigercatcore.calculatePagination.call(void 0, total, currentPage.value, currentPageSize.value);
329
362
  });
363
+ function handleSetSort(nextSortState) {
364
+ if (!isSortControlled.value) {
365
+ uncontrolledSortState.value = nextSortState;
366
+ }
367
+ emit("sort-change", nextSortState);
368
+ emit("change", {
369
+ sort: nextSortState,
370
+ filters: filterState.value,
371
+ pagination: props.pagination !== false ? {
372
+ current: currentPage.value,
373
+ pageSize: currentPageSize.value
374
+ } : null
375
+ });
376
+ }
330
377
  function handleSort(columnKey) {
331
378
  const column = displayColumns.value.find((col) => col.key === columnKey);
332
379
  if (!column || !column.sortable) {
@@ -340,21 +387,9 @@ function useTableState(props, emit, measuredColumnWidths) {
340
387
  newDirection = null;
341
388
  }
342
389
  }
343
- const nextSortState = {
390
+ handleSetSort({
344
391
  key: newDirection ? columnKey : null,
345
392
  direction: newDirection
346
- };
347
- if (!isSortControlled.value) {
348
- uncontrolledSortState.value = nextSortState;
349
- }
350
- emit("sort-change", nextSortState);
351
- emit("change", {
352
- sort: nextSortState,
353
- filters: filterState.value,
354
- pagination: props.pagination !== false ? {
355
- current: currentPage.value,
356
- pageSize: currentPageSize.value
357
- } : null
358
393
  });
359
394
  }
360
395
  function handleFilter(columnKey, value) {
@@ -550,6 +585,7 @@ function useTableState(props, emit, measuredColumnWidths) {
550
585
  editingValue,
551
586
  virtualScrollTop,
552
587
  toggleColumnLock,
588
+ handleSetSort,
553
589
  handleSort,
554
590
  handleFilter,
555
591
  handlePageChange,
@@ -1185,11 +1221,14 @@ var Table = _vue.defineComponent.call(void 0, {
1185
1221
  const measuredRowHeights = _vue.ref.call(void 0, []);
1186
1222
  const ctx = useTableState(props, emit, measuredColumnWidths);
1187
1223
  const resolvedPaginationLocale = _vue.ref.call(void 0, );
1224
+ const resolvedTableLocale = _vue.ref.call(void 0, );
1188
1225
  let paginationLocaleResolveId = 0;
1226
+ let tableLocaleResolveId = 0;
1189
1227
  const paginationLocaleInput = _vue.computed.call(void 0,
1190
1228
  () => props.pagination !== false && typeof props.pagination === "object" ? props.pagination.locale : void 0
1191
1229
  );
1192
1230
  const isPaginationI18nDisabled = _vue.computed.call(void 0, () => paginationLocaleInput.value === false);
1231
+ const tableLocaleInput = _vue.computed.call(void 0, () => props.locale);
1193
1232
  _vue.watch.call(void 0,
1194
1233
  paginationLocaleInput,
1195
1234
  (locale) => {
@@ -1216,6 +1255,36 @@ var Table = _vue.defineComponent.call(void 0, {
1216
1255
  const paginationLocale = _vue.computed.call(void 0,
1217
1256
  () => isPaginationI18nDisabled.value ? void 0 : _tigercatcore.mergeTigerLocale.call(void 0, config.value.locale, resolvedPaginationLocale.value)
1218
1257
  );
1258
+ _vue.watch.call(void 0,
1259
+ tableLocaleInput,
1260
+ (locale) => {
1261
+ const resolveId = ++tableLocaleResolveId;
1262
+ if (!locale) {
1263
+ resolvedTableLocale.value = void 0;
1264
+ return;
1265
+ }
1266
+ const immediateLocale = _tigercatcore.getImmediateTigerLocale.call(void 0, locale);
1267
+ resolvedTableLocale.value = immediateLocale;
1268
+ if (!_tigercatcore.isLazyTigerLocale.call(void 0, locale)) return;
1269
+ _tigercatcore.resolveTigerLocale.call(void 0, locale).then((nextLocale) => {
1270
+ if (resolveId === tableLocaleResolveId) {
1271
+ resolvedTableLocale.value = nextLocale;
1272
+ }
1273
+ }).catch(() => {
1274
+ if (resolveId === tableLocaleResolveId) {
1275
+ resolvedTableLocale.value = immediateLocale;
1276
+ }
1277
+ });
1278
+ },
1279
+ { immediate: true }
1280
+ );
1281
+ const tableLocale = _vue.computed.call(void 0,
1282
+ () => _tigercatcore.mergeTigerLocale.call(void 0, config.value.locale, resolvedTableLocale.value)
1283
+ );
1284
+ const tableLabels = _vue.computed.call(void 0, () => {
1285
+ const overrides = props.emptyText === void 0 ? props.labels : { ...props.labels, emptyText: props.emptyText };
1286
+ return _tigercatcore.getTableLabels.call(void 0, tableLocale.value, overrides);
1287
+ });
1219
1288
  const resizeController = _tigercatcore.createTableResizeObserverController.call(void 0, {
1220
1289
  onResize: (snapshot) => {
1221
1290
  if (!areNumberRecordsEqual(measuredColumnWidths.value, snapshot.columnWidths)) {
@@ -1245,10 +1314,14 @@ var Table = _vue.defineComponent.call(void 0, {
1245
1314
  const wrapperStyle = resolvedProps.maxHeight ? {
1246
1315
  maxHeight: typeof resolvedProps.maxHeight === "number" ? `${resolvedProps.maxHeight}px` : resolvedProps.maxHeight
1247
1316
  } : void 0;
1317
+ const renderProps = {
1318
+ ...resolvedProps,
1319
+ emptyText: tableLabels.value.emptyText
1320
+ };
1248
1321
  const tableChildren = [
1249
- renderTableHeader(ctx, resolvedProps, slots),
1250
- renderTableBody(ctx, resolvedProps, slots),
1251
- renderSummaryRow(ctx, resolvedProps)
1322
+ renderTableHeader(ctx, renderProps, slots),
1323
+ renderTableBody(ctx, renderProps, slots),
1324
+ renderSummaryRow(ctx, renderProps)
1252
1325
  ];
1253
1326
  const tableInner = _vue.h.call(void 0,
1254
1327
  "table",
@@ -1256,7 +1329,10 @@ var Table = _vue.defineComponent.call(void 0, {
1256
1329
  ref: tableRef,
1257
1330
  class: _tigercatcore.classNames.call(void 0,
1258
1331
  _tigercatcore.tableBaseClasses,
1259
- _tigercatcore.getTableResponsiveTableClasses.call(void 0, resolvedProps.responsiveMode),
1332
+ _tigercatcore.getTableResponsiveTableClasses.call(void 0,
1333
+ resolvedProps.responsiveMode,
1334
+ resolvedProps.cardBreakpoint
1335
+ ),
1260
1336
  resolvedProps.tableLayout === "fixed" ? "table-fixed" : "table-auto"
1261
1337
  ),
1262
1338
  style: ctx.fixedColumnsInfo.value.hasFixedColumns && ctx.fixedColumnsInfo.value.minTableWidth ? { minWidth: `${ctx.fixedColumnsInfo.value.minTableWidth}px` } : void 0
@@ -1273,72 +1349,192 @@ var Table = _vue.defineComponent.call(void 0, {
1273
1349
  },
1274
1350
  [tableInner]
1275
1351
  ) : tableInner;
1276
- const cardContent = resolvedProps.responsiveMode === "card" ? _vue.h.call(void 0,
1277
- "div",
1278
- { class: _tigercatcore.tableResponsiveCardListClasses, "data-tiger-table-mobile": "card" },
1279
- ctx.paginatedData.value.length === 0 ? [_vue.h.call(void 0, "div", { class: _tigercatcore.tableResponsiveCardClasses }, resolvedProps.emptyText)] : ctx.paginatedData.value.map((record, index) => {
1280
- const key = ctx.paginatedRowKeys.value[index];
1281
- const isExpanded = ctx.expandedRowKeySet.value.has(key);
1282
- const isRowExpandable = resolvedProps.expandable ? resolvedProps.expandable.rowExpandable ? resolvedProps.expandable.rowExpandable(record) : true : false;
1283
- const rows = ctx.displayColumns.value.map((column) => {
1284
- const dataKey = column.dataKey || column.key;
1285
- const cellValue = record[dataKey];
1286
- const cellContent = _nullishCoalesce(_optionalChain([slots, 'access', _86 => _86[`cell-${column.key}`], 'optionalCall', _87 => _87({ record, index })]), () => ( (column.render ? column.render(record, index) : cellValue)));
1287
- return _vue.h.call(void 0, "div", { key: column.key, class: _tigercatcore.tableResponsiveCardRowClasses }, [
1288
- _vue.h.call(void 0, "div", { class: _tigercatcore.tableResponsiveCardLabelClasses }, column.title),
1289
- _vue.h.call(void 0, "div", { class: _tigercatcore.tableResponsiveCardValueClasses }, [cellContent])
1290
- ]);
1291
- });
1292
- const controls = [];
1293
- if (resolvedProps.rowSelection && resolvedProps.rowSelection.showCheckbox !== false) {
1294
- const checkboxProps = _optionalChain([resolvedProps, 'access', _88 => _88.rowSelection, 'access', _89 => _89.getCheckboxProps, 'optionalCall', _90 => _90(record)]) || {};
1295
- controls.push(
1296
- _vue.h.call(void 0, "input", {
1297
- type: resolvedProps.rowSelection.type === "radio" ? "radio" : "checkbox",
1298
- checked: ctx.selectedRowKeySet.value.has(key),
1299
- disabled: checkboxProps.disabled,
1300
- onClick: (event) => event.stopPropagation(),
1301
- onChange: (event) => ctx.handleSelectRow(key, event.target.checked)
1352
+ const cardContent = (() => {
1353
+ if (resolvedProps.responsiveMode !== "card") return null;
1354
+ const cardChildren = [];
1355
+ const sortableColumns = ctx.displayColumns.value.filter((column) => column.sortable);
1356
+ if (resolvedProps.rowSelection && resolvedProps.rowSelection.type !== "radio" && resolvedProps.rowSelection.showCheckbox !== false && ctx.paginatedData.value.length > 0) {
1357
+ cardChildren.push(
1358
+ _vue.h.call(void 0,
1359
+ "div",
1360
+ {
1361
+ class: "flex items-center justify-between rounded-[var(--tiger-radius-md,0.5rem)] border border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface,#ffffff)] px-3 py-2"
1362
+ },
1363
+ [
1364
+ _vue.h.call(void 0,
1365
+ _chunk2YFXJUBTjs.Checkbox,
1366
+ {
1367
+ size: "sm",
1368
+ modelValue: ctx.allSelected.value,
1369
+ indeterminate: ctx.someSelected.value,
1370
+ onChange: (checked) => ctx.handleSelectAll(checked)
1371
+ },
1372
+ { default: () => tableLabels.value.selectAllText }
1373
+ )
1374
+ ]
1375
+ )
1376
+ );
1377
+ }
1378
+ if (sortableColumns.length > 0) {
1379
+ cardChildren.push(
1380
+ _vue.h.call(void 0, "div", {
1381
+ class: "rounded-[var(--tiger-radius-md,0.5rem)] border border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface,#ffffff)] px-3 py-2"
1382
+ }, [
1383
+ _vue.h.call(void 0, _chunkBGMAWKWVjs.Select, {
1384
+ size: "sm",
1385
+ modelValue: ctx.sortState.value.key && ctx.sortState.value.direction ? `${ctx.sortState.value.key}:${ctx.sortState.value.direction}` : "",
1386
+ options: [
1387
+ { label: tableLabels.value.clearSortText, value: "" },
1388
+ ...sortableColumns.flatMap((column) => [
1389
+ {
1390
+ label: `${_tigercatcore.formatTableSortByText.call(void 0, tableLabels.value.sortByText, column.title)} \u2191`,
1391
+ value: `${column.key}:asc`
1392
+ },
1393
+ {
1394
+ label: `${_tigercatcore.formatTableSortByText.call(void 0, tableLabels.value.sortByText, column.title)} \u2193`,
1395
+ value: `${column.key}:desc`
1396
+ }
1397
+ ])
1398
+ ],
1399
+ clearable: false,
1400
+ "onUpdate:modelValue": (value) => {
1401
+ const nextValue = String(_nullishCoalesce(value, () => ( "")));
1402
+ if (!nextValue) {
1403
+ ctx.handleSetSort({ key: null, direction: null });
1404
+ return;
1405
+ }
1406
+ const separatorIndex = nextValue.lastIndexOf(":");
1407
+ const key = nextValue.slice(0, separatorIndex);
1408
+ const direction = nextValue.slice(separatorIndex + 1);
1409
+ ctx.handleSetSort({ key, direction });
1410
+ }
1302
1411
  })
1303
- );
1304
- }
1305
- if (resolvedProps.expandable && isRowExpandable) {
1306
- controls.push(
1307
- _vue.h.call(void 0,
1308
- "button",
1412
+ ])
1413
+ );
1414
+ }
1415
+ if (ctx.paginatedData.value.length === 0) {
1416
+ cardChildren.push(
1417
+ _vue.h.call(void 0, "div", { class: _tigercatcore.tableResponsiveCardClasses }, [
1418
+ _vue.h.call(void 0, _chunkNOZ65AMOjs.Empty, { showImage: false, description: tableLabels.value.emptyText })
1419
+ ])
1420
+ );
1421
+ } else {
1422
+ cardChildren.push(
1423
+ ...ctx.paginatedData.value.map((record, index) => {
1424
+ const key = ctx.paginatedRowKeys.value[index];
1425
+ const isExpanded = ctx.expandedRowKeySet.value.has(key);
1426
+ const isSelected = ctx.selectedRowKeySet.value.has(key);
1427
+ const isRowExpandable = resolvedProps.expandable ? resolvedProps.expandable.rowExpandable ? resolvedProps.expandable.rowExpandable(record) : true : false;
1428
+ const { titleColumn, bodyColumns } = _tigercatcore.getCardColumns.call(void 0, ctx.displayColumns.value);
1429
+ const renderCardCellContent = (column) => {
1430
+ const dataKey = column.dataKey || column.key;
1431
+ return _nullishCoalesce(_optionalChain([slots, 'access', _86 => _86[`cell-${column.key}`], 'optionalCall', _87 => _87({ record, index })]), () => ( (column.render ? column.render(record, index) : record[dataKey])));
1432
+ };
1433
+ const titleNode = titleColumn ? _vue.h.call(void 0, "div", { class: _tigercatcore.tableResponsiveCardTitleClasses }, [
1434
+ renderCardCellContent(titleColumn)
1435
+ ]) : null;
1436
+ const rows = bodyColumns.map(
1437
+ (column) => _vue.h.call(void 0, "div", { key: column.key, class: _tigercatcore.tableResponsiveCardRowClasses }, [
1438
+ _vue.h.call(void 0, "div", { class: _tigercatcore.tableResponsiveCardLabelClasses }, column.title),
1439
+ _vue.h.call(void 0, "div", { class: _tigercatcore.tableResponsiveCardValueClasses }, [
1440
+ renderCardCellContent(column)
1441
+ ])
1442
+ ])
1443
+ );
1444
+ const controls = [];
1445
+ if (resolvedProps.rowSelection && resolvedProps.rowSelection.showCheckbox !== false) {
1446
+ const checkboxProps = _optionalChain([resolvedProps, 'access', _88 => _88.rowSelection, 'access', _89 => _89.getCheckboxProps, 'optionalCall', _90 => _90(record)]) || {};
1447
+ controls.push(
1448
+ _vue.h.call(void 0,
1449
+ "span",
1450
+ { onClick: (event) => event.stopPropagation() },
1451
+ [
1452
+ resolvedProps.rowSelection.type === "radio" ? _vue.h.call(void 0, _chunk3QV2D54Hjs.Radio, {
1453
+ value: key,
1454
+ checked: isSelected,
1455
+ disabled: checkboxProps.disabled,
1456
+ "aria-label": _tigercatcore.formatTableSelectRowAriaLabel.call(void 0,
1457
+ tableLabels.value.selectRowAriaLabel,
1458
+ index + 1,
1459
+ _optionalChain([tableLocale, 'access', _91 => _91.value, 'optionalAccess', _92 => _92.locale])
1460
+ ),
1461
+ onChange: () => ctx.handleSelectRow(key, true)
1462
+ }) : _vue.h.call(void 0, _chunk2YFXJUBTjs.Checkbox, {
1463
+ size: "sm",
1464
+ modelValue: isSelected,
1465
+ disabled: checkboxProps.disabled,
1466
+ "aria-label": _tigercatcore.formatTableSelectRowAriaLabel.call(void 0,
1467
+ tableLabels.value.selectRowAriaLabel,
1468
+ index + 1,
1469
+ _optionalChain([tableLocale, 'access', _93 => _93.value, 'optionalAccess', _94 => _94.locale])
1470
+ ),
1471
+ onChange: (checked) => ctx.handleSelectRow(key, checked)
1472
+ })
1473
+ ]
1474
+ )
1475
+ );
1476
+ }
1477
+ if (resolvedProps.expandable && isRowExpandable) {
1478
+ controls.push(
1479
+ _vue.h.call(void 0,
1480
+ "button",
1481
+ {
1482
+ type: "button",
1483
+ class: "text-sm text-[var(--tiger-primary,#2563eb)]",
1484
+ "aria-expanded": isExpanded,
1485
+ onClick: (event) => {
1486
+ event.stopPropagation();
1487
+ ctx.handleToggleExpand(key, record);
1488
+ }
1489
+ },
1490
+ isExpanded ? tableLabels.value.collapseText : tableLabels.value.expandText
1491
+ )
1492
+ );
1493
+ }
1494
+ const expandedContent = resolvedProps.expandable && isExpanded && isRowExpandable ? _nullishCoalesce(_optionalChain([slots, 'access', _95 => _95["expanded-row"], 'optionalCall', _96 => _96({ record, index })]), () => ( _optionalChain([resolvedProps, 'access', _97 => _97.expandable, 'access', _98 => _98.expandedRowRender, 'optionalCall', _99 => _99(record, index)]))) : null;
1495
+ const cardContext = {
1496
+ record,
1497
+ index,
1498
+ columns: ctx.displayColumns.value,
1499
+ selected: isSelected,
1500
+ expanded: isExpanded,
1501
+ toggleExpand: () => ctx.handleToggleExpand(key, record),
1502
+ selectRow: (checked) => ctx.handleSelectRow(key, checked)
1503
+ };
1504
+ const customCard = _nullishCoalesce(_optionalChain([slots, 'access', _100 => _100.card, 'optionalCall', _101 => _101(cardContext)]), () => ( _optionalChain([resolvedProps, 'access', _102 => _102.renderCard, 'optionalCall', _103 => _103(cardContext)])));
1505
+ const resolvedCardClassName = typeof resolvedProps.cardClassName === "function" ? resolvedProps.cardClassName(record, index) : resolvedProps.cardClassName;
1506
+ return _vue.h.call(void 0,
1507
+ "div",
1309
1508
  {
1310
- type: "button",
1311
- class: "text-sm text-[var(--tiger-primary,#2563eb)]",
1312
- "aria-expanded": isExpanded,
1313
- onClick: (event) => {
1314
- event.stopPropagation();
1315
- ctx.handleToggleExpand(key, record);
1316
- }
1509
+ key,
1510
+ class: _tigercatcore.classNames.call(void 0, _tigercatcore.tableResponsiveCardClasses, resolvedCardClassName),
1511
+ onClick: () => ctx.handleRowClick(record, index, key)
1317
1512
  },
1318
- isExpanded ? "Collapse" : "Expand"
1319
- )
1320
- );
1321
- }
1322
- const expandedContent = resolvedProps.expandable && isExpanded && isRowExpandable ? _nullishCoalesce(_optionalChain([slots, 'access', _91 => _91["expanded-row"], 'optionalCall', _92 => _92({ record, index })]), () => ( _optionalChain([resolvedProps, 'access', _93 => _93.expandable, 'access', _94 => _94.expandedRowRender, 'optionalCall', _95 => _95(record, index)]))) : null;
1323
- return _vue.h.call(void 0,
1324
- "div",
1325
- {
1326
- key,
1327
- class: _tigercatcore.tableResponsiveCardClasses,
1328
- onClick: () => ctx.handleRowClick(record, index, key)
1329
- },
1330
- [
1331
- controls.length ? _vue.h.call(void 0, "div", { class: "mb-2 flex items-center gap-3" }, controls) : null,
1332
- ...rows,
1333
- expandedContent ? _vue.h.call(void 0,
1334
- "div",
1335
- { class: "mt-3 border-t border-[var(--tiger-border,#e5e7eb)] pt-3" },
1336
- [expandedContent]
1337
- ) : null
1338
- ]
1513
+ customCard !== void 0 && customCard !== null ? [customCard] : [
1514
+ controls.length ? _vue.h.call(void 0, "div", { class: "mb-2 flex items-center gap-3" }, controls) : null,
1515
+ titleNode,
1516
+ ...rows,
1517
+ expandedContent ? _vue.h.call(void 0,
1518
+ "div",
1519
+ {
1520
+ class: "mt-3 border-t border-[var(--tiger-border,#e5e7eb)] pt-3"
1521
+ },
1522
+ [expandedContent]
1523
+ ) : null
1524
+ ]
1525
+ );
1526
+ })
1339
1527
  );
1340
- })
1341
- ) : null;
1528
+ }
1529
+ return _vue.h.call(void 0,
1530
+ "div",
1531
+ {
1532
+ class: _tigercatcore.getTableResponsiveCardListClasses.call(void 0, resolvedProps.cardBreakpoint),
1533
+ "data-tiger-table-mobile": "card"
1534
+ },
1535
+ cardChildren
1536
+ );
1537
+ })();
1342
1538
  return _vue.h.call(void 0,
1343
1539
  "div",
1344
1540
  {
@@ -1373,11 +1569,11 @@ var Table = _vue.defineComponent.call(void 0, {
1373
1569
  class: _tigercatcore.tableLoadingOverlayClasses,
1374
1570
  role: "status",
1375
1571
  "aria-live": "polite",
1376
- "aria-label": "Loading"
1572
+ "aria-label": tableLabels.value.loadingText
1377
1573
  },
1378
- [LoadingSpinner(), _vue.h.call(void 0, "span", { class: "sr-only" }, "Loading")]
1574
+ [LoadingSpinner(), _vue.h.call(void 0, "span", { class: "sr-only" }, tableLabels.value.loadingText)]
1379
1575
  ),
1380
- renderPagination(ctx, resolvedProps, {
1576
+ renderPagination(ctx, renderProps, {
1381
1577
  locale: paginationLocale.value,
1382
1578
  disableI18n: isPaginationI18nDisabled.value
1383
1579
  })