@uzum-tech/ui 2.0.5 → 2.0.6
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/index.js +1039 -493
- package/dist/index.mjs +1039 -493
- package/dist/index.prod.js +2 -2
- package/dist/index.prod.mjs +2 -2
- package/es/_internal/icons/DragHandleRound.d.ts +2 -0
- package/es/_internal/icons/DragHandleRound.mjs +16 -0
- package/es/_internal/icons/index.d.ts +1 -0
- package/es/_internal/icons/index.mjs +1 -0
- package/es/components.d.ts +32 -0
- package/es/data-table/src/DataTable.d.ts +24 -0
- package/es/data-table/src/DataTable.mjs +31 -0
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +6 -0
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +6 -0
- package/es/data-table/src/TableParts/Body.d.ts +17 -9
- package/es/data-table/src/TableParts/Body.mjs +81 -274
- package/es/data-table/src/TableParts/BodyEmpty.d.ts +3 -0
- package/es/data-table/src/TableParts/BodyEmpty.mjs +22 -0
- package/es/data-table/src/TableParts/BodyRow.d.ts +3 -0
- package/es/data-table/src/TableParts/BodyRow.mjs +257 -0
- package/es/data-table/src/TableParts/BodySkeleton.mjs +5 -2
- package/es/data-table/src/TableParts/Header.d.ts +6 -0
- package/es/data-table/src/TableParts/Header.mjs +5 -1
- package/es/data-table/src/TableParts/VirtualListItemWrapper.d.ts +36 -0
- package/es/data-table/src/TableParts/VirtualListItemWrapper.mjs +46 -0
- package/es/data-table/src/interface.d.ts +161 -2
- package/es/data-table/src/styles/index.cssr.mjs +26 -3
- package/es/data-table/src/use-group-header.d.ts +3 -3
- package/es/data-table/src/use-row-drag.d.ts +2 -0
- package/es/data-table/src/use-row-drag.mjs +241 -0
- package/es/data-table/src/use-sorter.d.ts +4 -8
- package/es/data-table/src/use-sorter.mjs +14 -2
- package/es/data-table/src/use-table-data.d.ts +11 -14
- package/es/data-table/src/use-table-data.mjs +4 -2
- package/es/data-table/src/use-table-storage.d.ts +2 -2
- package/es/data-table/src/use-table-storage.mjs +1 -1
- package/es/data-table/src/utils/column-utils.d.ts +3 -2
- package/es/data-table/src/utils/column-utils.mjs +9 -1
- package/es/data-table/src/utils/csv-utils.mjs +1 -1
- package/es/data-table/src/utils/flatten-rows.d.ts +2 -0
- package/es/data-table/src/utils/flatten-rows.mjs +33 -0
- package/es/data-table/src/utils/index.d.ts +1 -0
- package/es/data-table/src/utils/index.mjs +1 -0
- package/es/data-table/src/utils/resize-orchestrator-utils.d.ts +3 -5
- package/es/data-table/src/utils/width-utils.d.ts +2 -2
- package/es/data-table/styles/light.d.ts +6 -0
- package/es/data-table/styles/light.mjs +3 -0
- package/es/mapping-card/src/MappingCard.d.ts +8 -0
- package/es/mapping-card/src/MappingCard.mjs +3 -1
- package/es/mapping-card/src/MappingCardParts/Header.mjs +31 -10
- package/es/mapping-card/src/interface.d.ts +8 -0
- package/es/mapping-card/src/interface.mjs +4 -0
- package/es/mapping-card/src/styles/index.cssr.mjs +8 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/_internal/icons/DragHandleRound.d.ts +2 -0
- package/lib/_internal/icons/DragHandleRound.js +10 -0
- package/lib/_internal/icons/index.d.ts +1 -0
- package/lib/_internal/icons/index.js +4 -2
- package/lib/components.d.ts +32 -0
- package/lib/data-table/src/DataTable.d.ts +24 -0
- package/lib/data-table/src/DataTable.js +19 -1
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +6 -0
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +6 -0
- package/lib/data-table/src/TableParts/Body.d.ts +18 -10
- package/lib/data-table/src/TableParts/Body.js +65 -237
- package/lib/data-table/src/TableParts/BodyEmpty.d.ts +3 -0
- package/lib/data-table/src/TableParts/BodyEmpty.js +15 -0
- package/lib/data-table/src/TableParts/BodyRow.d.ts +3 -0
- package/lib/data-table/src/TableParts/BodyRow.js +210 -0
- package/lib/data-table/src/TableParts/BodySkeleton.js +8 -2
- package/lib/data-table/src/TableParts/Header.d.ts +6 -0
- package/lib/data-table/src/TableParts/Header.js +6 -0
- package/lib/data-table/src/TableParts/VirtualListItemWrapper.d.ts +36 -0
- package/lib/data-table/src/TableParts/VirtualListItemWrapper.js +29 -0
- package/lib/data-table/src/interface.d.ts +161 -2
- package/lib/data-table/src/styles/index.cssr.js +26 -3
- package/lib/data-table/src/use-group-header.d.ts +3 -3
- package/lib/data-table/src/use-row-drag.d.ts +2 -0
- package/lib/data-table/src/use-row-drag.js +270 -0
- package/lib/data-table/src/use-sorter.d.ts +4 -8
- package/lib/data-table/src/use-sorter.js +14 -0
- package/lib/data-table/src/use-table-data.d.ts +11 -14
- package/lib/data-table/src/use-table-data.js +5 -1
- package/lib/data-table/src/use-table-storage.d.ts +2 -2
- package/lib/data-table/src/use-table-storage.js +1 -0
- package/lib/data-table/src/utils/column-utils.d.ts +3 -2
- package/lib/data-table/src/utils/column-utils.js +11 -2
- package/lib/data-table/src/utils/csv-utils.js +1 -0
- package/lib/data-table/src/utils/flatten-rows.d.ts +2 -0
- package/lib/data-table/src/utils/flatten-rows.js +35 -0
- package/lib/data-table/src/utils/index.d.ts +1 -0
- package/lib/data-table/src/utils/index.js +1 -0
- package/lib/data-table/src/utils/resize-orchestrator-utils.d.ts +3 -5
- package/lib/data-table/src/utils/width-utils.d.ts +2 -2
- package/lib/data-table/styles/light.d.ts +6 -0
- package/lib/data-table/styles/light.js +3 -0
- package/lib/mapping-card/src/MappingCard.d.ts +8 -0
- package/lib/mapping-card/src/MappingCard.js +5 -1
- package/lib/mapping-card/src/MappingCardParts/Header.js +29 -5
- package/lib/mapping-card/src/interface.d.ts +8 -0
- package/lib/mapping-card/src/interface.js +4 -0
- package/lib/mapping-card/src/styles/index.cssr.js +8 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
|
@@ -59,6 +59,7 @@ function useSorter(props, { dataRelatedColsRef, filteredDataRef }) {
|
|
|
59
59
|
// If one of the columns's sort order is false or 'ascend' or 'descend',
|
|
60
60
|
// the table's controll functionality should work in controlled manner.
|
|
61
61
|
const columnsWithControlledSortOrder = dataRelatedColsRef.value.filter(column => column.type !== 'selection'
|
|
62
|
+
&& column.type !== 'draggable'
|
|
62
63
|
&& column.sorter !== undefined
|
|
63
64
|
&& (column.sortOrder === 'ascend'
|
|
64
65
|
|| column.sortOrder === 'descend'
|
|
@@ -116,6 +117,18 @@ function useSorter(props, { dataRelatedColsRef, filteredDataRef }) {
|
|
|
116
117
|
return compareResult;
|
|
117
118
|
});
|
|
118
119
|
}
|
|
120
|
+
const draggableColumn = dataRelatedColsRef.value.find((column) => column.type === 'draggable' && column.sortByKey !== false);
|
|
121
|
+
if (draggableColumn) {
|
|
122
|
+
const orderKey = draggableColumn.key;
|
|
123
|
+
return filteredDataRef.value.slice().sort((tmNode1, tmNode2) => {
|
|
124
|
+
const order1 = tmNode1.rawNode[orderKey];
|
|
125
|
+
const order2 = tmNode2.rawNode[orderKey];
|
|
126
|
+
if (typeof order1 === 'number' && typeof order2 === 'number') {
|
|
127
|
+
return order1 - order2;
|
|
128
|
+
}
|
|
129
|
+
return 0;
|
|
130
|
+
});
|
|
131
|
+
}
|
|
119
132
|
return filteredDataRef.value;
|
|
120
133
|
});
|
|
121
134
|
function getUpdatedSorterState(sortState) {
|
|
@@ -158,6 +171,7 @@ function useSorter(props, { dataRelatedColsRef, filteredDataRef }) {
|
|
|
158
171
|
else {
|
|
159
172
|
const columnToSort = dataRelatedColsRef.value.find(column => column.type !== 'selection'
|
|
160
173
|
&& column.type !== 'expand'
|
|
174
|
+
&& column.type !== 'draggable'
|
|
161
175
|
&& column.key === columnKey);
|
|
162
176
|
if (!(columnToSort === null || columnToSort === void 0 ? void 0 : columnToSort.sorter))
|
|
163
177
|
return;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import type { ComputedRef } from 'vue';
|
|
2
1
|
import type { PaginationProps } from '../../pagination/src/Pagination';
|
|
3
|
-
import type { ColumnKey, DataTableSetupProps, FilterState, InternalRowData, RowKey, SortState, TableBaseColumn,
|
|
4
|
-
export declare function useTableData(props: DataTableSetupProps, { dataRelatedColsRef }: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
mergedFilterStateRef: ComputedRef<FilterState>;
|
|
13
|
-
mergedSortStateRef: ComputedRef<{
|
|
2
|
+
import type { ColumnKey, DataTableSetupProps, FilterState, InternalRowData, RowKey, SortState, TableBaseColumn, TableSelectionColumn, TmNode, UseTableDataDeps } from './interface';
|
|
3
|
+
export declare function useTableData(props: DataTableSetupProps, { dataRelatedColsRef }: UseTableDataDeps): {
|
|
4
|
+
treeMateRef: import("vue").ComputedRef<import("treemate").TreeMate<InternalRowData, InternalRowData, InternalRowData>>;
|
|
5
|
+
mergedCurrentPageRef: import("vue").ComputedRef<number>;
|
|
6
|
+
mergedPaginationRef: import("vue").ComputedRef<PaginationProps>;
|
|
7
|
+
paginatedDataRef: import("vue").ComputedRef<TmNode[]>;
|
|
8
|
+
rawPaginatedDataRef: import("vue").ComputedRef<InternalRowData[]>;
|
|
9
|
+
mergedFilterStateRef: import("vue").ComputedRef<FilterState>;
|
|
10
|
+
mergedSortStateRef: import("vue").ComputedRef<{
|
|
14
11
|
columnKey: ColumnKey;
|
|
15
12
|
order: import("./interface").SortOrder;
|
|
16
13
|
sorter: boolean | "default" | import("./interface").CompareFn<InternalRowData> | {
|
|
@@ -19,8 +16,8 @@ export declare function useTableData(props: DataTableSetupProps, { dataRelatedCo
|
|
|
19
16
|
};
|
|
20
17
|
}[]>;
|
|
21
18
|
hoverKeyRef: import("vue").Ref<RowKey | null, RowKey | null>;
|
|
22
|
-
selectionColumnRef: ComputedRef<TableSelectionColumn | null>;
|
|
23
|
-
childTriggerColIndexRef: ComputedRef<number>;
|
|
19
|
+
selectionColumnRef: import("vue").ComputedRef<TableSelectionColumn | null>;
|
|
20
|
+
childTriggerColIndexRef: import("vue").ComputedRef<number>;
|
|
24
21
|
doUpdateFilters: (filters: FilterState, sourceColumn: TableBaseColumn) => void;
|
|
25
22
|
deriveNextSorter: (sortState: SortState | null) => void;
|
|
26
23
|
doUpdatePageSize: (pageSize: number) => void;
|
|
@@ -65,8 +65,11 @@ function useTableData(props, { dataRelatedColsRef }) {
|
|
|
65
65
|
const controlledFilterState = {};
|
|
66
66
|
columnsWithControlledFilter.forEach((column) => {
|
|
67
67
|
var _a;
|
|
68
|
-
if (column.type === 'selection'
|
|
68
|
+
if (column.type === 'selection'
|
|
69
|
+
|| column.type === 'expand'
|
|
70
|
+
|| column.type === 'draggable') {
|
|
69
71
|
return;
|
|
72
|
+
}
|
|
70
73
|
if (column.filterOptionValues === undefined) {
|
|
71
74
|
controlledFilterState[column.key] = (_a = column.filterOptionValue) !== null && _a !== void 0 ? _a : null;
|
|
72
75
|
}
|
|
@@ -88,6 +91,7 @@ function useTableData(props, { dataRelatedColsRef }) {
|
|
|
88
91
|
columns.forEach((column) => {
|
|
89
92
|
if (column.type === 'selection'
|
|
90
93
|
|| column.type === 'expand'
|
|
94
|
+
|| column.type === 'draggable'
|
|
91
95
|
|| 'children' in column) {
|
|
92
96
|
return;
|
|
93
97
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DataTableStorageState, SortState
|
|
1
|
+
import type { DataRelatedColumn, DataTableStorageState, SortState } from './interface';
|
|
2
2
|
export declare function loadTableState(localStorageKey: string): DataTableStorageState | null;
|
|
3
3
|
export declare function saveTableState(localStorageKey: string, state: DataTableStorageState): void;
|
|
4
|
-
export declare function restoreSortStateFromStored(stored: DataTableStorageState['sortState'], dataRelatedCols:
|
|
4
|
+
export declare function restoreSortStateFromStored(stored: DataTableStorageState['sortState'], dataRelatedCols: DataRelatedColumn[]): SortState[] | null;
|
|
@@ -33,6 +33,7 @@ function restoreSortStateFromStored(stored, dataRelatedCols) {
|
|
|
33
33
|
for (const item of stored) {
|
|
34
34
|
const column = dataRelatedCols.find(col => col.type !== 'selection'
|
|
35
35
|
&& col.type !== 'expand'
|
|
36
|
+
&& col.type !== 'draggable'
|
|
36
37
|
&& 'key' in col
|
|
37
38
|
&& col.key === item.columnKey
|
|
38
39
|
&& col.sorter !== undefined);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { CSSProperties } from 'vue';
|
|
2
|
-
import type { CreateRowClassName,
|
|
2
|
+
import type { CreateRowClassName, DataRelatedColumn, InternalRowData, TableColumn } from '../interface';
|
|
3
3
|
export declare const SELECTION_COL_WIDTH = 40;
|
|
4
4
|
export declare const EXPAND_COL_WIDTH = 40;
|
|
5
|
+
export declare const DRAGGABLE_COL_WIDTH = 40;
|
|
5
6
|
export declare function getNumberColWidth(column: TableColumn): number | undefined;
|
|
6
7
|
export declare function getStringColWidth(column: TableColumn): string | undefined;
|
|
7
8
|
export declare function getColKey(column: TableColumn): string | number;
|
|
8
|
-
export declare function createCustomWidthStyle(column:
|
|
9
|
+
export declare function createCustomWidthStyle(column: DataRelatedColumn, resizedWidth?: string): CSSProperties;
|
|
9
10
|
export declare function createRowClassName(row: InternalRowData, index: number, rowClassName?: string | CreateRowClassName): string;
|
|
10
11
|
export declare function isColumnSortable(column: TableColumn): boolean;
|
|
11
12
|
export declare function isColumnEllipsisEnabled(column: Pick<TableColumn, 'ellipsis'>): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EXPAND_COL_WIDTH = exports.SELECTION_COL_WIDTH = void 0;
|
|
3
|
+
exports.DRAGGABLE_COL_WIDTH = exports.EXPAND_COL_WIDTH = exports.SELECTION_COL_WIDTH = void 0;
|
|
4
4
|
exports.getNumberColWidth = getNumberColWidth;
|
|
5
5
|
exports.getStringColWidth = getStringColWidth;
|
|
6
6
|
exports.getColKey = getColKey;
|
|
@@ -15,6 +15,7 @@ const _utils_1 = require("../../../_utils");
|
|
|
15
15
|
const width_utils_1 = require("./width-utils");
|
|
16
16
|
exports.SELECTION_COL_WIDTH = 40;
|
|
17
17
|
exports.EXPAND_COL_WIDTH = 40;
|
|
18
|
+
exports.DRAGGABLE_COL_WIDTH = 40;
|
|
18
19
|
function getNumberColWidth(column) {
|
|
19
20
|
if (column.type === 'selection') {
|
|
20
21
|
return column.width === undefined ? exports.SELECTION_COL_WIDTH : (0, seemly_1.depx)(column.width);
|
|
@@ -22,6 +23,9 @@ function getNumberColWidth(column) {
|
|
|
22
23
|
if (column.type === 'expand') {
|
|
23
24
|
return column.width === undefined ? exports.EXPAND_COL_WIDTH : (0, seemly_1.depx)(column.width);
|
|
24
25
|
}
|
|
26
|
+
if (column.type === 'draggable') {
|
|
27
|
+
return column.width === undefined ? exports.DRAGGABLE_COL_WIDTH : (0, seemly_1.depx)(column.width);
|
|
28
|
+
}
|
|
25
29
|
if ('children' in column)
|
|
26
30
|
return undefined;
|
|
27
31
|
if (typeof column.width === 'string') {
|
|
@@ -30,13 +34,16 @@ function getNumberColWidth(column) {
|
|
|
30
34
|
return column.width;
|
|
31
35
|
}
|
|
32
36
|
function getStringColWidth(column) {
|
|
33
|
-
var _a, _b;
|
|
37
|
+
var _a, _b, _c;
|
|
34
38
|
if (column.type === 'selection') {
|
|
35
39
|
return (0, _utils_1.formatLength)((_a = column.width) !== null && _a !== void 0 ? _a : exports.SELECTION_COL_WIDTH);
|
|
36
40
|
}
|
|
37
41
|
if (column.type === 'expand') {
|
|
38
42
|
return (0, _utils_1.formatLength)((_b = column.width) !== null && _b !== void 0 ? _b : exports.EXPAND_COL_WIDTH);
|
|
39
43
|
}
|
|
44
|
+
if (column.type === 'draggable') {
|
|
45
|
+
return (0, _utils_1.formatLength)((_c = column.width) !== null && _c !== void 0 ? _c : exports.DRAGGABLE_COL_WIDTH);
|
|
46
|
+
}
|
|
40
47
|
if ('children' in column) {
|
|
41
48
|
return undefined;
|
|
42
49
|
}
|
|
@@ -47,6 +54,8 @@ function getColKey(column) {
|
|
|
47
54
|
return '__n_selection__';
|
|
48
55
|
if (column.type === 'expand')
|
|
49
56
|
return '__n_expand__';
|
|
57
|
+
if (column.type === 'draggable')
|
|
58
|
+
return '__n_draggable__';
|
|
50
59
|
return column.key;
|
|
51
60
|
}
|
|
52
61
|
function createCustomWidthStyle(column, resizedWidth) {
|
|
@@ -15,6 +15,7 @@ function formatCsvCell(value) {
|
|
|
15
15
|
function generateCsv(columns, data, getCsvCell, getCsvHeader) {
|
|
16
16
|
const exportableColumns = columns.filter(column => column.type !== 'expand'
|
|
17
17
|
&& column.type !== 'selection'
|
|
18
|
+
&& column.type !== 'draggable'
|
|
18
19
|
&& column.allowExport !== false);
|
|
19
20
|
const header = exportableColumns
|
|
20
21
|
.map((col) => {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.flattenExpandedRows = flattenExpandedRows;
|
|
4
|
+
function flattenExpandedRows(rowInfos, expandedRowKeys) {
|
|
5
|
+
const flattenedRows = [];
|
|
6
|
+
function traverse(nodes, rootIndex) {
|
|
7
|
+
nodes.forEach((node) => {
|
|
8
|
+
if (node.children && expandedRowKeys.has(node.key)) {
|
|
9
|
+
flattenedRows.push({
|
|
10
|
+
tmNode: node,
|
|
11
|
+
striped: false,
|
|
12
|
+
key: node.key,
|
|
13
|
+
index: rootIndex
|
|
14
|
+
});
|
|
15
|
+
traverse(node.children, rootIndex);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
flattenedRows.push({
|
|
19
|
+
key: node.key,
|
|
20
|
+
tmNode: node,
|
|
21
|
+
striped: false,
|
|
22
|
+
index: rootIndex
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
rowInfos.forEach((rowInfo) => {
|
|
28
|
+
flattenedRows.push(rowInfo);
|
|
29
|
+
const { children } = rowInfo.tmNode;
|
|
30
|
+
if (children && expandedRowKeys.has(rowInfo.key)) {
|
|
31
|
+
traverse(children, rowInfo.index);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
return flattenedRows;
|
|
35
|
+
}
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.pickValidColumnWidths = exports.getLengthNumber = void 0;
|
|
18
18
|
__exportStar(require("./column-utils"), exports);
|
|
19
19
|
__exportStar(require("./csv-utils"), exports);
|
|
20
|
+
__exportStar(require("./flatten-rows"), exports);
|
|
20
21
|
__exportStar(require("./mask-defaults"), exports);
|
|
21
22
|
__exportStar(require("./resize-orchestrator-utils"), exports);
|
|
22
23
|
__exportStar(require("./sort-filter-utils"), exports);
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type { ColumnWidthComputationItem,
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function deriveResizableColumnWidthItems(columns: ResizableLeafColumn[]): ColumnWidthComputationItem[];
|
|
1
|
+
import type { ColumnWidthComputationItem, DataRelatedColumn } from '../interface';
|
|
2
|
+
export declare function deriveVisibleLeafColumnWidthItems(columns: DataRelatedColumn[]): ColumnWidthComputationItem[];
|
|
3
|
+
export declare function deriveResizableColumnWidthItems(columns: DataRelatedColumn[]): ColumnWidthComputationItem[];
|
|
5
4
|
export declare function deriveColumnWidthSignature(columns: ColumnWidthComputationItem[]): string;
|
|
6
|
-
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { ColumnKey, ColumnWidthComputationItem,
|
|
1
|
+
import type { ColumnKey, ColumnWidthComputationItem, DataRelatedColumn } from '../interface';
|
|
2
2
|
export interface ColumnWidthConstraint {
|
|
3
3
|
min?: number;
|
|
4
4
|
max?: number;
|
|
5
5
|
}
|
|
6
6
|
export declare function clampValueFollowCSSRules(value: number, min?: number | string, max?: number | string): number;
|
|
7
7
|
export declare function parseLengthToNumber(value: number | string | undefined): number | undefined;
|
|
8
|
-
export declare function resolveColumnWidthConstraint(column:
|
|
8
|
+
export declare function resolveColumnWidthConstraint(column: DataRelatedColumn | ColumnWidthComputationItem, systemMinWidth?: number | string, systemMaxWidth?: number | string): ColumnWidthConstraint;
|
|
9
9
|
export declare function computeFixedTableColumnWidths(columns: ColumnWidthComputationItem[], { containerWidth, systemMinWidth, systemMaxWidth, preferredWidths }: {
|
|
10
10
|
containerWidth?: number;
|
|
11
11
|
systemMinWidth?: number | string;
|
|
@@ -41,6 +41,9 @@ export declare function self(vars: ThemeCommonVars): {
|
|
|
41
41
|
thButtonColorHover: string;
|
|
42
42
|
thIconColor: string;
|
|
43
43
|
thIconColorActive: string;
|
|
44
|
+
dropMarkColor: string;
|
|
45
|
+
dragGhostOpacity: string;
|
|
46
|
+
dragGhostFilter: string;
|
|
44
47
|
borderColorModal: string;
|
|
45
48
|
tdColorHoverModal: string;
|
|
46
49
|
tdColorStripedModal: string;
|
|
@@ -102,6 +105,9 @@ declare const dataTableLight: import("../../_mixins").Theme<"DataTable", {
|
|
|
102
105
|
thButtonColorHover: string;
|
|
103
106
|
thIconColor: string;
|
|
104
107
|
thIconColorActive: string;
|
|
108
|
+
dropMarkColor: string;
|
|
109
|
+
dragGhostOpacity: string;
|
|
110
|
+
dragGhostFilter: string;
|
|
105
111
|
borderColorModal: string;
|
|
106
112
|
tdColorHoverModal: string;
|
|
107
113
|
tdColorStripedModal: string;
|
|
@@ -56,6 +56,9 @@ function self(vars) {
|
|
|
56
56
|
thButtonColorHover: elementsTertiary,
|
|
57
57
|
thIconColor: elementsPrimary,
|
|
58
58
|
thIconColorActive: brandPrimary500,
|
|
59
|
+
dropMarkColor: brandPrimary500,
|
|
60
|
+
dragGhostOpacity: '0.85',
|
|
61
|
+
dragGhostFilter: 'drop-shadow(0 4px 12px rgba(0, 0, 0, 0.18))',
|
|
59
62
|
// modal
|
|
60
63
|
borderColorModal: elementsQuaternary,
|
|
61
64
|
tdColorHoverModal: elementsTertiary,
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
2
|
title: import("vue").PropType<import("./interface").MappingCardInterface["title"]>;
|
|
3
3
|
description: import("vue").PropType<import("./interface").MappingCardInterface["description"]>;
|
|
4
|
+
subTitle: import("vue").PropType<import("./interface").MappingCardInterface["subTitle"]>;
|
|
5
|
+
subDescription: import("vue").PropType<import("./interface").MappingCardInterface["subDescription"]>;
|
|
6
|
+
headerInfo: import("vue").PropType<import("./interface").MappingCardInterface["headerInfo"]>;
|
|
7
|
+
headerSubInfo: import("vue").PropType<import("./interface").MappingCardInterface["headerSubInfo"]>;
|
|
4
8
|
rows: import("vue").PropType<import("./interface").MappingCardInterface["rows"]>;
|
|
5
9
|
cols: {
|
|
6
10
|
readonly type: import("vue").PropType<import("./interface").MappingCardInterface["cols"]>;
|
|
@@ -1055,6 +1059,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1055
1059
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1056
1060
|
title: import("vue").PropType<import("./interface").MappingCardInterface["title"]>;
|
|
1057
1061
|
description: import("vue").PropType<import("./interface").MappingCardInterface["description"]>;
|
|
1062
|
+
subTitle: import("vue").PropType<import("./interface").MappingCardInterface["subTitle"]>;
|
|
1063
|
+
subDescription: import("vue").PropType<import("./interface").MappingCardInterface["subDescription"]>;
|
|
1064
|
+
headerInfo: import("vue").PropType<import("./interface").MappingCardInterface["headerInfo"]>;
|
|
1065
|
+
headerSubInfo: import("vue").PropType<import("./interface").MappingCardInterface["headerSubInfo"]>;
|
|
1058
1066
|
rows: import("vue").PropType<import("./interface").MappingCardInterface["rows"]>;
|
|
1059
1067
|
cols: {
|
|
1060
1068
|
readonly type: import("vue").PropType<import("./interface").MappingCardInterface["cols"]>;
|
|
@@ -52,7 +52,11 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
52
52
|
const { cssVars, themeClass, onRender } = this;
|
|
53
53
|
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
54
54
|
return ((0, vue_1.h)("div", { class: [`${this.mergedClsPrefix}-mapping-card`, themeClass], style: cssVars },
|
|
55
|
-
(0, vue_1.h)(Header_1.default, null, {
|
|
55
|
+
(0, vue_1.h)(Header_1.default, null, {
|
|
56
|
+
headerActions: this.$slots.headerActions,
|
|
57
|
+
headerInfo: this.$slots.headerInfo,
|
|
58
|
+
headerSubInfo: this.$slots.headerSubInfo
|
|
59
|
+
}),
|
|
56
60
|
(0, vue_1.h)(Body_1.default, null)));
|
|
57
61
|
}
|
|
58
62
|
});
|
|
@@ -22,12 +22,34 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
22
22
|
const theme = mergedThemeRef.value;
|
|
23
23
|
const locale = localeRef.value;
|
|
24
24
|
const renderTextProp = (value) => typeof value === 'function' ? value() : value;
|
|
25
|
+
const renderInfoText = (title, description) => {
|
|
26
|
+
if (!title && !description)
|
|
27
|
+
return null;
|
|
28
|
+
return ((0, vue_1.h)("div", { class: `${prefix}-mapping-card__header-info-text` },
|
|
29
|
+
title && ((0, vue_1.h)("div", { class: `${prefix}-mapping-card__header-title` }, renderTextProp(title))),
|
|
30
|
+
description && ((0, vue_1.h)("div", { class: `${prefix}-mapping-card__header-description` }, renderTextProp(description)))));
|
|
31
|
+
};
|
|
32
|
+
const mainInfo = (0, _utils_1.resolveSlot)(slots.headerInfo, () => {
|
|
33
|
+
var _a;
|
|
34
|
+
const fromProp = (_a = props.headerInfo) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
35
|
+
if (fromProp)
|
|
36
|
+
return [fromProp];
|
|
37
|
+
const fallback = renderInfoText(props.title, props.description);
|
|
38
|
+
return fallback ? [fallback] : [];
|
|
39
|
+
});
|
|
40
|
+
const subInfo = (0, _utils_1.resolveSlot)(slots.headerSubInfo, () => {
|
|
41
|
+
var _a;
|
|
42
|
+
const fromProp = (_a = props.headerSubInfo) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
43
|
+
if (fromProp)
|
|
44
|
+
return [fromProp];
|
|
45
|
+
const fallback = renderInfoText(props.subTitle, props.subDescription);
|
|
46
|
+
return fallback ? [fallback] : [];
|
|
47
|
+
});
|
|
48
|
+
const hasSubInfo = subInfo.length > 0;
|
|
25
49
|
return ((0, vue_1.h)("div", { class: `${prefix}-mapping-card__header` },
|
|
26
50
|
(0, vue_1.h)(flex_1.UFlex, { align: "center", size: "small", class: `${prefix}-mapping-card__header-info` }, {
|
|
27
51
|
default: () => ((0, vue_1.h)(vue_1.Fragment, null,
|
|
28
|
-
|
|
29
|
-
(0, vue_1.h)("div", { class: `${prefix}-mapping-card__header-title` }, renderTextProp(props.title)),
|
|
30
|
-
props.description && ((0, vue_1.h)("div", { class: `${prefix}-mapping-card__header-description` }, renderTextProp(props.description)))),
|
|
52
|
+
mainInfo,
|
|
31
53
|
!props.hideCopy && ((0, vue_1.h)(tooltip_1.UTooltip, null, {
|
|
32
54
|
trigger: () => {
|
|
33
55
|
var _a;
|
|
@@ -39,7 +61,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
39
61
|
}));
|
|
40
62
|
},
|
|
41
63
|
default: () => locale.copyTooltip
|
|
42
|
-
}))
|
|
64
|
+
})),
|
|
65
|
+
hasSubInfo && ((0, vue_1.h)("div", { class: `${prefix}-mapping-card__header-info-divider` })),
|
|
66
|
+
hasSubInfo && subInfo))
|
|
43
67
|
}),
|
|
44
68
|
!props.hideHeaderActions && ((0, vue_1.h)(flex_1.UFlex, { align: "center", size: "small" }, {
|
|
45
69
|
default: () => (0, _utils_1.resolveSlot)(slots.headerActions, () => {
|
|
@@ -48,7 +72,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
48
72
|
buttons.push((0, vue_1.h)(tooltip_1.UTooltip, null, {
|
|
49
73
|
trigger: () => {
|
|
50
74
|
var _a;
|
|
51
|
-
return ((0, vue_1.h)(switch_1.USwitch, Object.assign({}, ((_a = props.headerSwitchProps) !== null && _a !== void 0 ? _a : {}), { theme: theme.peers.Switch, themeOverrides: theme.peerOverrides.Switch, onUpdateValue: (
|
|
75
|
+
return ((0, vue_1.h)(switch_1.USwitch, Object.assign({}, ((_a = props.headerSwitchProps) !== null && _a !== void 0 ? _a : {}), { theme: theme.peers.Switch, themeOverrides: theme.peerOverrides.Switch, onUpdateValue: (value) => { var _a; return (_a = props.onSwitchChange) === null || _a === void 0 ? void 0 : _a.call(props, value); } })));
|
|
52
76
|
},
|
|
53
77
|
default: () => locale.switchTooltip
|
|
54
78
|
}));
|
|
@@ -32,6 +32,10 @@ export interface MappingRow {
|
|
|
32
32
|
export interface MappingCardInterface {
|
|
33
33
|
title: string | (() => VNodeChild);
|
|
34
34
|
description: string | (() => VNodeChild);
|
|
35
|
+
subTitle?: string | (() => VNodeChild);
|
|
36
|
+
subDescription?: string | (() => VNodeChild);
|
|
37
|
+
headerInfo?: () => VNodeChild;
|
|
38
|
+
headerSubInfo?: () => VNodeChild;
|
|
35
39
|
rows: MappingRow[];
|
|
36
40
|
cols?: number;
|
|
37
41
|
defaultSpan?: number;
|
|
@@ -61,6 +65,10 @@ export interface MappingCardListInterface {
|
|
|
61
65
|
export declare const mappingCardProps: {
|
|
62
66
|
readonly title: PropType<MappingCardInterface["title"]>;
|
|
63
67
|
readonly description: PropType<MappingCardInterface["description"]>;
|
|
68
|
+
readonly subTitle: PropType<MappingCardInterface["subTitle"]>;
|
|
69
|
+
readonly subDescription: PropType<MappingCardInterface["subDescription"]>;
|
|
70
|
+
readonly headerInfo: PropType<MappingCardInterface["headerInfo"]>;
|
|
71
|
+
readonly headerSubInfo: PropType<MappingCardInterface["headerSubInfo"]>;
|
|
64
72
|
readonly rows: PropType<MappingCardInterface["rows"]>;
|
|
65
73
|
readonly cols: {
|
|
66
74
|
readonly type: PropType<MappingCardInterface["cols"]>;
|
|
@@ -4,6 +4,10 @@ exports.mappingCardListProps = exports.mappingCardProps = void 0;
|
|
|
4
4
|
exports.mappingCardProps = {
|
|
5
5
|
title: [String, Function],
|
|
6
6
|
description: [String, Function],
|
|
7
|
+
subTitle: [String, Function],
|
|
8
|
+
subDescription: [String, Function],
|
|
9
|
+
headerInfo: Function,
|
|
10
|
+
headerSubInfo: Function,
|
|
7
11
|
rows: Array,
|
|
8
12
|
cols: {
|
|
9
13
|
type: Number,
|
|
@@ -19,7 +19,7 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('mapping-card', `
|
|
|
19
19
|
border-radius: var(--u-border-radius);
|
|
20
20
|
overflow: hidden;
|
|
21
21
|
box-sizing: border-box;
|
|
22
|
-
`, [(0, cssr_1.cE)('header', `
|
|
22
|
+
`, [(0, cssr_1.cE)('header', `
|
|
23
23
|
padding: var(--u-header-padding);
|
|
24
24
|
display: flex;
|
|
25
25
|
align-items: center;
|
|
@@ -38,11 +38,18 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('mapping-card', `
|
|
|
38
38
|
min-width: 0;
|
|
39
39
|
`), (0, cssr_1.cE)('header-info-text', `
|
|
40
40
|
min-width: 0;
|
|
41
|
+
margin-right: 12px;
|
|
41
42
|
`), (0, cssr_1.cE)('header-title', `
|
|
42
43
|
color: var(--u-title-color);
|
|
43
44
|
`), (0, cssr_1.cE)('header-description', `
|
|
44
45
|
color: var(--u-description-color);
|
|
45
46
|
margin-top: 2px;
|
|
47
|
+
`), (0, cssr_1.cE)('header-info-divider', `
|
|
48
|
+
margin-right: 12px;
|
|
49
|
+
width: 1px;
|
|
50
|
+
align-self: stretch;
|
|
51
|
+
background: var(--u-border-color);
|
|
52
|
+
flex-shrink: 0;
|
|
46
53
|
`), (0, cssr_1.cE)('body', `
|
|
47
54
|
display: flex;
|
|
48
55
|
padding: var(--u-body-padding);
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "2.0.
|
|
1
|
+
declare const _default: "2.0.6";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
package/web-types.json
CHANGED