@ticatec/uniface-element 0.1.9 → 0.1.10
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/app-layout/HeaderLayout.svelte +9 -8
- package/dist/data-table/DataTable.svelte +4 -2
- package/dist/data-table/parts/ActionsPanel.svelte +4 -2
- package/dist/data-table/parts/ActionsPanel.svelte.d.ts +2 -1
- package/dist/data-table/parts/ActionsRow.svelte +8 -3
- package/dist/data-table/parts/ActionsRow.svelte.d.ts +1 -0
- package/dist/data-table/parts/ContentPanel.svelte +2 -2
- package/dist/data-table/parts/FixedColumnsPanel.svelte +4 -2
- package/dist/data-table/parts/FixedColumnsPanel.svelte.d.ts +1 -0
- package/dist/data-table/parts/FixedRow.svelte +5 -6
- package/dist/data-table/parts/FixedRow.svelte.d.ts +1 -0
- package/dist/ticatec-uniface-web.css +8 -1
- package/package.json +1 -1
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
|
|
26
25
|
</script>
|
|
27
26
|
|
|
28
27
|
<div style="width: 100%; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; position: relative">
|
|
@@ -30,14 +29,16 @@
|
|
|
30
29
|
<slot name="header"></slot>
|
|
31
30
|
</div>
|
|
32
31
|
<div style="width: 100%; flex: 1 1 auto; overflow: hidden; display: flex; flex-direction: row;">
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
{#if $$slots['sidebar']}
|
|
33
|
+
<div bind:this={sidebar}
|
|
34
|
+
style="height: 100%; flex: 0 0 auto; overflow: auto; width: {sidebarWidth}; {minWidth} {maxWidth}">
|
|
35
|
+
<slot name="sidebar"></slot>
|
|
36
|
+
</div>
|
|
37
|
+
{#if sidebarResize}
|
|
38
|
+
<Split direction="vertical" bindingPanel={sidebar}/>
|
|
39
|
+
{/if}
|
|
39
40
|
{/if}
|
|
40
|
-
<div style="height: 100%; flex: 1 1 auto; overflow:
|
|
41
|
+
<div style="height: 100%; flex: 1 1 auto; overflow: hidden">
|
|
41
42
|
<slot></slot>
|
|
42
43
|
</div>
|
|
43
44
|
</div>
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
table = new UniDataTable(id, indicatorColumn.width);
|
|
33
33
|
})
|
|
34
34
|
const sortRows = (compareFun: CompareFunction, descending: boolean) => {
|
|
35
|
-
|
|
35
|
+
let oList = list.sort(compareFun);
|
|
36
|
+
displayList = descending ? oList.reverse() : oList;
|
|
36
37
|
rows = table.rows;
|
|
37
38
|
}
|
|
38
39
|
|
|
@@ -46,11 +47,12 @@
|
|
|
46
47
|
|
|
47
48
|
$: selectedRows = selectedRows ?? [];
|
|
48
49
|
|
|
50
|
+
$: displayList = [...list];
|
|
49
51
|
|
|
50
52
|
$: {
|
|
51
53
|
if (table && columns) {
|
|
52
54
|
table.setColumns(columns)
|
|
53
|
-
table.data =
|
|
55
|
+
table.data = displayList;
|
|
54
56
|
rows = table.rows;
|
|
55
57
|
dataColumns = table.columns;
|
|
56
58
|
colStyle = table.generateTemplateStyle();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
|
|
3
3
|
import ActionsRow from "./ActionsRow.svelte";
|
|
4
|
-
import type
|
|
4
|
+
import type ActionsColumn from "../lib/ActionsColumn";
|
|
5
5
|
import type TableRow from "./TableRow";
|
|
6
6
|
import {onDestroy, onMount} from "svelte";
|
|
7
7
|
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
|
|
14
14
|
export let expandRow: TableRow;
|
|
15
15
|
|
|
16
|
+
export let rowHeight: number;
|
|
17
|
+
|
|
16
18
|
const handleActionPanelScroll = (e: Event) => {
|
|
17
19
|
scrollTop = e.target?.scrollTop;
|
|
18
20
|
}
|
|
@@ -46,7 +48,7 @@
|
|
|
46
48
|
<div class="action-panel" bind:this={panel} style="user-select: none; width: {actionsColumn.width}px;">
|
|
47
49
|
<div bind:this={scrollPanel} class="scroll-panel" on:scroll|passive={handleActionPanelScroll}>
|
|
48
50
|
{#each rows as row, idx}
|
|
49
|
-
<ActionsRow {row} parentRect={rect} alternative={idx % 2 == 1} width={actionsColumn.width} actions={actionsColumn.getActions(row)}/>
|
|
51
|
+
<ActionsRow {row} {rowHeight} parentRect={rect} alternative={idx % 2 == 1} width={actionsColumn.width} actions={actionsColumn.getActions(row)}/>
|
|
50
52
|
{#if row == expandRow}
|
|
51
53
|
<div class="inline-panel" style="height: {inlineRowHeight??0}px">
|
|
52
54
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import type ActionsColumn from "../lib/ActionsColumn";
|
|
2
2
|
import type TableRow from "./TableRow";
|
|
3
3
|
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
4
4
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
@@ -19,6 +19,7 @@ declare const ActionsPanel: $$__sveltets_2_IsomorphicComponent<{
|
|
|
19
19
|
rows: Array<TableRow>;
|
|
20
20
|
inlineRowHeight?: number;
|
|
21
21
|
expandRow: TableRow;
|
|
22
|
+
rowHeight: number;
|
|
22
23
|
}, {
|
|
23
24
|
[evt: string]: CustomEvent<any>;
|
|
24
25
|
}, {}, {}, string>;
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
import {onDestroy, onMount, tick} from "svelte";
|
|
7
7
|
import utils from "../../common/utils";
|
|
8
8
|
import PopupMenu from "./PopupMenu.svelte";
|
|
9
|
-
|
|
10
|
-
|
|
11
9
|
export let row: TableRow;
|
|
12
10
|
export let actions: Array<RowAction>;
|
|
13
11
|
export let alternative: boolean;
|
|
@@ -15,6 +13,11 @@
|
|
|
15
13
|
|
|
16
14
|
export let width: number;
|
|
17
15
|
|
|
16
|
+
export let rowHeight: number;
|
|
17
|
+
|
|
18
|
+
let style: string;
|
|
19
|
+
|
|
20
|
+
|
|
18
21
|
let actionList: Array<RowAction> = [...actions]
|
|
19
22
|
let popupList: Array<RowAction> = [];
|
|
20
23
|
|
|
@@ -78,8 +81,10 @@
|
|
|
78
81
|
checkOverflow();
|
|
79
82
|
}
|
|
80
83
|
|
|
84
|
+
$: style = rowHeight== null ? '' : `height: ${rowHeight}px`
|
|
85
|
+
|
|
81
86
|
</script>
|
|
82
|
-
<div class="table-row" class:alternative style="position: relative; width: {width}px;
|
|
87
|
+
<div class="table-row" class:alternative style="position: relative; width: {width}px; display: block; {style}">
|
|
83
88
|
<div bind:this={cell}
|
|
84
89
|
style="width: max-content; overflow-x: auto; white-space: nowrap; top: 50%; position: relative; transform: translateY(-50%);">
|
|
85
90
|
{#each actionList as action}
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
|
|
108
108
|
</script>
|
|
109
109
|
<div class="data-content-panel">
|
|
110
|
-
<FixedColumnsPanel {indicatorColumn} {expandRow} {fixedCols} {inlineRowHeight} {rows} bind:scrollTop {handleRowExpand}
|
|
110
|
+
<FixedColumnsPanel {indicatorColumn} {expandRow} {rowHeight} {fixedCols} {inlineRowHeight} {rows} bind:scrollTop {handleRowExpand}
|
|
111
111
|
{handleRowSelectChange}/>
|
|
112
112
|
<div class="data-view-panel" bind:this={dataPanel} on:scroll|passive={handleDataTableScroll} on:wheel|passive={handleWheelEvent}
|
|
113
113
|
style="{actionsColumn == null ? 'overflow-y: scroll' : ''}">
|
|
@@ -143,6 +143,6 @@
|
|
|
143
143
|
{/if}
|
|
144
144
|
</div>
|
|
145
145
|
{#if actionsColumn}
|
|
146
|
-
<ActionPanel {expandRow} {actionsColumn} {rows} {inlineRowHeight} bind:scrollTop/>
|
|
146
|
+
<ActionPanel {expandRow} {rowHeight} {actionsColumn} {rows} {inlineRowHeight} bind:scrollTop/>
|
|
147
147
|
{/if}
|
|
148
148
|
</div>
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
export let expandRow: TableRow;
|
|
18
18
|
|
|
19
|
+
export let rowHeight: number;
|
|
20
|
+
|
|
19
21
|
let width: number = indicatorColumn.width;
|
|
20
22
|
|
|
21
23
|
export let inlineRowHeight: number = 0;
|
|
@@ -32,9 +34,9 @@
|
|
|
32
34
|
<div class="fixed-panel" style="width: {width}px">
|
|
33
35
|
<div class="scroll-panel" style="overflow-y: hidden">
|
|
34
36
|
<div style="top: {-scrollTop}px">
|
|
35
|
-
{#each rows??[] as row, idx}
|
|
37
|
+
{#each rows ?? [] as row, idx}
|
|
36
38
|
<FixedRow rowNo={idx+1} {row} selected={row.selected} alternative={idx % 2 == 1} {selectable} cols={fixedCols}
|
|
37
|
-
|
|
39
|
+
{rowHeight} {expandable} {handleRowExpand} {handleRowSelectChange}/>
|
|
38
40
|
{#if row == expandRow}
|
|
39
41
|
<div class="inline-panel" style="height: {inlineRowHeight}px">
|
|
40
42
|
|
|
@@ -23,6 +23,7 @@ declare const FixedColumnsPanel: $$__sveltets_2_IsomorphicComponent<{
|
|
|
23
23
|
handleRowExpand: RowEventHandler;
|
|
24
24
|
handleRowSelectChange: TableEventHandler;
|
|
25
25
|
expandRow: TableRow;
|
|
26
|
+
rowHeight: number;
|
|
26
27
|
inlineRowHeight?: number;
|
|
27
28
|
}, {
|
|
28
29
|
[evt: string]: CustomEvent<any>;
|
|
@@ -15,12 +15,9 @@
|
|
|
15
15
|
export let handleRowSelectChange: RowEventHandler;
|
|
16
16
|
export let selected: boolean = row.selected;
|
|
17
17
|
|
|
18
|
+
export let rowHeight: number;
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
// const handleCheckBoxClick = (e: MouseEvent) => {
|
|
21
|
-
// e.stopPropagation();
|
|
22
|
-
// toggleRowSectionHandler?.(row);
|
|
23
|
-
// }
|
|
20
|
+
let style: string;
|
|
24
21
|
|
|
25
22
|
const showInlineData = (e: MouseEvent) => {
|
|
26
23
|
handleRowExpand?.(row);
|
|
@@ -33,8 +30,10 @@
|
|
|
33
30
|
handleRowSelectChange(row.selected);
|
|
34
31
|
}
|
|
35
32
|
|
|
33
|
+
$: style = rowHeight== null ? '' : `height: ${rowHeight}px`
|
|
34
|
+
|
|
36
35
|
</script>
|
|
37
|
-
<div class="table-row" class:alternative >
|
|
36
|
+
<div class="table-row" class:alternative {style}>
|
|
38
37
|
<div class="indicator-cell">
|
|
39
38
|
{#if selectable}
|
|
40
39
|
<input type="checkbox" bind:checked={selected}/>
|
|
@@ -1510,6 +1510,7 @@
|
|
|
1510
1510
|
height: var(--uniface-card-header-height, 54px);
|
|
1511
1511
|
border-bottom: 1px solid var(--uniface-card-inside-border-color, #E2E8F0);
|
|
1512
1512
|
box-sizing: border-box;
|
|
1513
|
+
font-weight: 600;
|
|
1513
1514
|
}
|
|
1514
1515
|
.uniface-card > div .card-header.simple {
|
|
1515
1516
|
line-height: var(--uniface-card-header-height, 54px);
|
|
@@ -3748,13 +3749,19 @@
|
|
|
3748
3749
|
height: 100%;
|
|
3749
3750
|
position: relative;
|
|
3750
3751
|
box-sizing: border-box;
|
|
3751
|
-
padding:
|
|
3752
|
+
padding: 4px;
|
|
3752
3753
|
}
|
|
3753
3754
|
.uniface-data-table .data-content-panel .table-row .table-data-cell > div {
|
|
3754
3755
|
position: relative;
|
|
3755
3756
|
top: 50%;
|
|
3756
3757
|
transform: translateY(-50%);
|
|
3757
3758
|
}
|
|
3759
|
+
.uniface-data-table .data-content-panel .table-row .table-data-cell .cell-text {
|
|
3760
|
+
overflow: hidden;
|
|
3761
|
+
}
|
|
3762
|
+
.uniface-data-table .data-content-panel .table-row .table-data-cell:first-child {
|
|
3763
|
+
padding-left: 8px;
|
|
3764
|
+
}
|
|
3758
3765
|
.uniface-data-table .data-content-panel .table-row .table-data-cell:last-child {
|
|
3759
3766
|
padding: 0;
|
|
3760
3767
|
}
|