@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.
- package/dist/{chunk-BMT5PGAQ.mjs → chunk-3KIIMXJC.mjs} +2 -2
- package/dist/{chunk-GVZRR2WP.mjs → chunk-5BGVVVVD.mjs} +2 -2
- package/dist/{chunk-OA3HAUBT.js → chunk-5BILS3SG.js} +279 -83
- package/dist/{chunk-7M4UUCJF.mjs → chunk-5Z2OCSVJ.mjs} +280 -84
- package/dist/{chunk-2LNNB55E.js → chunk-6XI4VDU4.js} +3 -3
- package/dist/{chunk-7RIWAO2A.mjs → chunk-BDTPFPSB.mjs} +2 -1
- package/dist/{chunk-PACAXQQ4.js → chunk-DMNOK6OP.js} +5 -5
- package/dist/{chunk-JDCVS4SJ.js → chunk-EQW6IUHG.js} +2 -1
- package/dist/{chunk-YR75F34D.mjs → chunk-FATIMV7O.mjs} +1 -1
- package/dist/{chunk-FAYSOSR7.js → chunk-FKCZSBM6.js} +4 -4
- package/dist/{chunk-4CWRNKPE.mjs → chunk-G7O3G2LI.mjs} +2 -2
- package/dist/{chunk-IBB54GHF.js → chunk-ICECZVMX.js} +2 -2
- package/dist/{chunk-ZNGRSXFK.js → chunk-JE7AWY34.js} +3 -3
- package/dist/{chunk-U5RXZ2IL.mjs → chunk-JKJ7HMFO.mjs} +1 -1
- package/dist/{chunk-CWQOEU6G.js → chunk-JNIKT6AL.js} +5 -5
- package/dist/{chunk-DBTS5QBX.mjs → chunk-JPZJZFC4.mjs} +18 -4
- package/dist/{chunk-TOE2XSEO.js → chunk-JT2ANXUR.js} +4 -4
- package/dist/{chunk-MVZGR3ZB.js → chunk-MD7S2A55.js} +2 -2
- package/dist/{chunk-LWDA7ABQ.js → chunk-NNFDOVVA.js} +24 -10
- package/dist/{chunk-IXJSZIAE.mjs → chunk-NP6KUJ4X.mjs} +1 -1
- package/dist/{chunk-RHAIJVMW.mjs → chunk-NYH6GSP7.mjs} +1 -1
- package/dist/{chunk-MCRT64VS.js → chunk-O23S65U3.js} +70 -8
- package/dist/{chunk-CBECE4ZO.mjs → chunk-OGDZTDZ6.mjs} +1 -1
- package/dist/{chunk-PHWAXBFG.mjs → chunk-OKBZKBFP.mjs} +70 -8
- package/dist/{chunk-4GYBJBFJ.mjs → chunk-QIXG7OIN.mjs} +1 -1
- package/dist/{chunk-UC3UXUVN.js → chunk-QJLFHHI2.js} +5 -5
- package/dist/{chunk-A5HHG53Z.js → chunk-SSMSRTEQ.js} +4 -4
- package/dist/{chunk-DRQ2QXZT.mjs → chunk-SZFEDBLT.mjs} +1 -1
- package/dist/{chunk-4J5EK3WY.mjs → chunk-UETVHC4K.mjs} +1 -1
- package/dist/{chunk-5HUZ33NC.mjs → chunk-V2IDOR7Y.mjs} +1 -1
- package/dist/{chunk-H5JDEKIV.js → chunk-V6T5GRLE.js} +2 -2
- package/dist/{chunk-FKLK6RHZ.js → chunk-WIQPVVUQ.js} +2 -2
- package/dist/{chunk-PCUUTKQZ.mjs → chunk-XQRKFOXS.mjs} +1 -1
- package/dist/{chunk-33YTJPF7.js → chunk-YCYS6LAQ.js} +4 -4
- package/dist/components/ActivityFeed.d.mts +6 -6
- package/dist/components/ActivityFeed.d.ts +6 -6
- package/dist/components/ActivityFeed.js +4 -4
- package/dist/components/ActivityFeed.mjs +3 -3
- package/dist/components/Alert.d.mts +3 -3
- package/dist/components/Alert.d.ts +3 -3
- package/dist/components/Anchor.d.mts +1 -1
- package/dist/components/Anchor.d.ts +1 -1
- package/dist/components/AreaChart.d.mts +2 -2
- package/dist/components/AreaChart.d.ts +2 -2
- package/dist/components/AutoComplete.d.mts +2 -2
- package/dist/components/AutoComplete.d.ts +2 -2
- package/dist/components/Avatar.d.mts +1 -1
- package/dist/components/Avatar.d.ts +1 -1
- package/dist/components/Badge.d.mts +3 -3
- package/dist/components/Badge.d.ts +3 -3
- package/dist/components/BarChart.d.mts +1 -1
- package/dist/components/BarChart.d.ts +1 -1
- package/dist/components/Breadcrumb.d.mts +2 -2
- package/dist/components/Breadcrumb.d.ts +2 -2
- package/dist/components/Button.d.mts +3 -3
- package/dist/components/Button.d.ts +3 -3
- package/dist/components/ButtonGroup.d.mts +1 -1
- package/dist/components/ButtonGroup.d.ts +1 -1
- package/dist/components/Calendar.d.mts +1 -1
- package/dist/components/Calendar.d.ts +1 -1
- package/dist/components/Card.d.mts +2 -2
- package/dist/components/Card.d.ts +2 -2
- package/dist/components/ChartGrid.d.mts +1 -1
- package/dist/components/ChartGrid.d.ts +1 -1
- package/dist/components/ChatWindow.d.mts +3 -3
- package/dist/components/ChatWindow.d.ts +3 -3
- package/dist/components/ChatWindow.js +3 -3
- package/dist/components/ChatWindow.mjs +2 -2
- package/dist/components/CodeEditor.d.mts +2 -2
- package/dist/components/CodeEditor.d.ts +2 -2
- package/dist/components/Collapse.d.mts +1 -1
- package/dist/components/Collapse.d.ts +1 -1
- package/dist/components/CollapsePanel.d.mts +1 -1
- package/dist/components/CollapsePanel.d.ts +1 -1
- package/dist/components/ColorSwatch.d.mts +1 -1
- package/dist/components/ColorSwatch.d.ts +1 -1
- package/dist/components/CommentThread.d.mts +2 -2
- package/dist/components/CommentThread.d.ts +2 -2
- package/dist/components/ConfigProvider.d.mts +1 -1
- package/dist/components/ConfigProvider.d.ts +1 -1
- package/dist/components/CropUpload.js +4 -4
- package/dist/components/CropUpload.mjs +3 -3
- package/dist/components/DataTableWithToolbar.d.mts +51 -11
- package/dist/components/DataTableWithToolbar.d.ts +51 -11
- package/dist/components/DataTableWithToolbar.js +8 -3
- package/dist/components/DataTableWithToolbar.mjs +7 -2
- package/dist/components/DatePicker.d.mts +2 -2
- package/dist/components/DatePicker.d.ts +2 -2
- package/dist/components/Descriptions.d.mts +2 -2
- package/dist/components/Descriptions.d.ts +2 -2
- package/dist/components/DonutChart.d.mts +2 -2
- package/dist/components/DonutChart.d.ts +2 -2
- package/dist/components/Drawer.d.mts +5 -5
- package/dist/components/Drawer.d.ts +5 -5
- package/dist/components/Drawer.js +3 -3
- package/dist/components/Drawer.mjs +2 -2
- package/dist/components/Dropdown.js +3 -3
- package/dist/components/Dropdown.mjs +2 -2
- package/dist/components/DropdownItem.js +4 -4
- package/dist/components/DropdownItem.mjs +3 -3
- package/dist/components/DropdownMenu.js +4 -4
- package/dist/components/DropdownMenu.mjs +2 -2
- package/dist/components/Empty.d.mts +1 -1
- package/dist/components/Empty.d.ts +1 -1
- package/dist/components/FileManager.d.mts +1 -1
- package/dist/components/FileManager.d.ts +1 -1
- package/dist/components/FloatButton.d.mts +3 -3
- package/dist/components/FloatButton.d.ts +3 -3
- package/dist/components/Form.d.mts +1 -1
- package/dist/components/Form.d.ts +1 -1
- package/dist/components/FormWizard.d.mts +6 -6
- package/dist/components/FormWizard.d.ts +6 -6
- package/dist/components/FunnelChart.d.mts +1 -1
- package/dist/components/FunnelChart.d.ts +1 -1
- package/dist/components/Gantt.d.mts +1 -1
- package/dist/components/Gantt.d.ts +1 -1
- package/dist/components/GaugeChart.d.mts +1 -1
- package/dist/components/GaugeChart.d.ts +1 -1
- package/dist/components/HeatmapChart.d.mts +2 -2
- package/dist/components/HeatmapChart.d.ts +2 -2
- package/dist/components/Image.d.mts +2 -2
- package/dist/components/Image.d.ts +2 -2
- package/dist/components/ImageAnnotation.d.mts +4 -4
- package/dist/components/ImageAnnotation.d.ts +4 -4
- package/dist/components/InfiniteScroll.d.mts +2 -2
- package/dist/components/InfiniteScroll.d.ts +2 -2
- package/dist/components/Input.d.mts +4 -4
- package/dist/components/Input.d.ts +4 -4
- package/dist/components/InputGroup.d.mts +1 -1
- package/dist/components/InputGroup.d.ts +1 -1
- package/dist/components/InputNumber.d.mts +1 -1
- package/dist/components/InputNumber.d.ts +1 -1
- package/dist/components/Kanban.d.mts +1 -1
- package/dist/components/Kanban.d.ts +1 -1
- package/dist/components/LineChart.d.mts +2 -2
- package/dist/components/LineChart.d.ts +2 -2
- package/dist/components/Link.d.mts +1 -1
- package/dist/components/Link.d.ts +1 -1
- package/dist/components/List.d.mts +6 -6
- package/dist/components/List.d.ts +6 -6
- package/dist/components/Loading.d.mts +5 -5
- package/dist/components/Loading.d.ts +5 -5
- package/dist/components/Loading.js +3 -3
- package/dist/components/Loading.mjs +2 -2
- package/dist/components/MarkdownEditor.d.mts +2 -2
- package/dist/components/MarkdownEditor.d.ts +2 -2
- package/dist/components/Mentions.d.mts +2 -2
- package/dist/components/Mentions.d.ts +2 -2
- package/dist/components/Menu.d.mts +5 -5
- package/dist/components/Menu.d.ts +5 -5
- package/dist/components/Menu.js +3 -3
- package/dist/components/Menu.mjs +2 -2
- package/dist/components/MenuItem.js +4 -4
- package/dist/components/MenuItem.mjs +2 -2
- package/dist/components/MenuItemGroup.js +4 -4
- package/dist/components/MenuItemGroup.mjs +2 -2
- package/dist/components/Modal.d.mts +8 -8
- package/dist/components/Modal.d.ts +8 -8
- package/dist/components/Modal.js +3 -3
- package/dist/components/Modal.mjs +2 -2
- package/dist/components/NotificationCenter.d.mts +5 -5
- package/dist/components/NotificationCenter.d.ts +5 -5
- package/dist/components/NotificationCenter.js +4 -4
- package/dist/components/NotificationCenter.mjs +3 -3
- package/dist/components/NumberKeyboard.d.mts +2 -2
- package/dist/components/NumberKeyboard.d.ts +2 -2
- package/dist/components/OrgChart.d.mts +1 -1
- package/dist/components/OrgChart.d.ts +1 -1
- package/dist/components/Pagination.d.mts +5 -5
- package/dist/components/Pagination.d.ts +5 -5
- package/dist/components/PieChart.d.mts +2 -2
- package/dist/components/PieChart.d.ts +2 -2
- package/dist/components/Popconfirm.d.mts +3 -3
- package/dist/components/Popconfirm.d.ts +3 -3
- package/dist/components/Popconfirm.js +4 -4
- package/dist/components/Popconfirm.mjs +3 -3
- package/dist/components/Popover.d.mts +1 -1
- package/dist/components/Popover.d.ts +1 -1
- package/dist/components/Popover.js +4 -4
- package/dist/components/Popover.mjs +3 -3
- package/dist/components/Progress.d.mts +3 -3
- package/dist/components/Progress.d.ts +3 -3
- package/dist/components/QRCode.d.mts +1 -1
- package/dist/components/QRCode.d.ts +1 -1
- package/dist/components/RadarChart.d.mts +2 -2
- package/dist/components/RadarChart.d.ts +2 -2
- package/dist/components/RichTextEditor.d.mts +1 -1
- package/dist/components/RichTextEditor.d.ts +1 -1
- package/dist/components/Row.d.mts +1 -1
- package/dist/components/Row.d.ts +1 -1
- package/dist/components/ScatterChart.d.mts +1 -1
- package/dist/components/ScatterChart.d.ts +1 -1
- package/dist/components/ScrollSpy.d.mts +2 -2
- package/dist/components/ScrollSpy.d.ts +2 -2
- package/dist/components/Select.d.mts +1 -1
- package/dist/components/Select.d.ts +1 -1
- package/dist/components/Signature.d.mts +2 -2
- package/dist/components/Signature.d.ts +2 -2
- package/dist/components/Skeleton.d.mts +1 -1
- package/dist/components/Skeleton.d.ts +1 -1
- package/dist/components/Space.d.mts +2 -2
- package/dist/components/Space.d.ts +2 -2
- package/dist/components/Splitter.d.mts +1 -1
- package/dist/components/Splitter.d.ts +1 -1
- package/dist/components/Spotlight.d.mts +4 -4
- package/dist/components/Spotlight.d.ts +4 -4
- package/dist/components/Spotlight.js +3 -3
- package/dist/components/Spotlight.mjs +2 -2
- package/dist/components/Steps.d.mts +3 -3
- package/dist/components/Steps.d.ts +3 -3
- package/dist/components/SubMenu.js +4 -4
- package/dist/components/SubMenu.mjs +2 -2
- package/dist/components/SunburstChart.d.mts +1 -1
- package/dist/components/SunburstChart.d.ts +1 -1
- package/dist/components/Table.d.mts +49 -11
- package/dist/components/Table.d.ts +49 -11
- package/dist/components/Table.js +8 -2
- package/dist/components/Table.mjs +7 -1
- package/dist/components/Tabs.d.mts +2 -2
- package/dist/components/Tabs.d.ts +2 -2
- package/dist/components/Tag.d.mts +1 -1
- package/dist/components/Tag.d.ts +1 -1
- package/dist/components/TaskBoard.d.mts +2 -2
- package/dist/components/TaskBoard.d.ts +2 -2
- package/dist/components/Text.d.mts +3 -3
- package/dist/components/Text.d.ts +3 -3
- package/dist/components/Textarea.d.mts +1 -1
- package/dist/components/Textarea.d.ts +1 -1
- package/dist/components/TimePicker.d.mts +3 -3
- package/dist/components/TimePicker.d.ts +3 -3
- package/dist/components/Timeline.d.mts +3 -3
- package/dist/components/Timeline.d.ts +3 -3
- package/dist/components/Tooltip.d.mts +1 -1
- package/dist/components/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip.js +4 -4
- package/dist/components/Tooltip.mjs +3 -3
- package/dist/components/Tour.d.mts +2 -2
- package/dist/components/Tour.d.ts +2 -2
- package/dist/components/Tree.d.mts +2 -2
- package/dist/components/Tree.d.ts +2 -2
- package/dist/components/TreeMapChart.d.mts +1 -1
- package/dist/components/TreeMapChart.d.ts +1 -1
- package/dist/components/Upload.d.mts +4 -4
- package/dist/components/Upload.d.ts +4 -4
- package/dist/components/VirtualTable.d.mts +2 -2
- package/dist/components/VirtualTable.d.ts +2 -2
- package/dist/components/Watermark.d.mts +1 -1
- package/dist/components/Watermark.d.ts +1 -1
- package/dist/index.js +27 -27
- package/dist/index.mjs +27 -27
- package/package.json +2 -2
- package/dist/{chunk-S45NWVQS.mjs → chunk-6GPX4ONB.mjs} +3 -3
- package/dist/{chunk-VES3OJOP.js → chunk-YS6FW775.js} +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFloatingPopup
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JPZJZFC4.mjs";
|
|
4
4
|
import {
|
|
5
5
|
renderVueBodyTeleport
|
|
6
|
-
} from "./chunk-
|
|
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-
|
|
3
|
+
} from "./chunk-JPZJZFC4.mjs";
|
|
4
4
|
import {
|
|
5
5
|
renderVueBodyTeleport
|
|
6
|
-
} from "./chunk-
|
|
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:
|
|
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
|
-
|
|
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,
|
|
1250
|
-
renderTableBody(ctx,
|
|
1251
|
-
renderSummaryRow(ctx,
|
|
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,
|
|
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 =
|
|
1277
|
-
"
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
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
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
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
|
-
|
|
1311
|
-
class:
|
|
1312
|
-
|
|
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
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
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
|
-
|
|
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":
|
|
1572
|
+
"aria-label": tableLabels.value.loadingText
|
|
1377
1573
|
},
|
|
1378
|
-
[LoadingSpinner(), _vue.h.call(void 0, "span", { class: "sr-only" },
|
|
1574
|
+
[LoadingSpinner(), _vue.h.call(void 0, "span", { class: "sr-only" }, tableLabels.value.loadingText)]
|
|
1379
1575
|
),
|
|
1380
|
-
renderPagination(ctx,
|
|
1576
|
+
renderPagination(ctx, renderProps, {
|
|
1381
1577
|
locale: paginationLocale.value,
|
|
1382
1578
|
disableI18n: isPaginationI18nDisabled.value
|
|
1383
1579
|
})
|