@itfin/components 1.5.2 → 1.5.3
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/package.json +12 -1
- package/src/ITFSettings.js +0 -6
- package/src/components/button/Button.vue +1 -3
- package/src/components/button/NativeButton.js +0 -4
- package/src/components/button/index.stories.js +2 -2
- package/src/components/card/BentoGrid.vue +0 -2
- package/src/components/customize/PropertiesList.vue +2 -0
- package/src/components/customize/PropertiesPopupMenu.vue +1 -1
- package/src/components/customize/PropertyItem.vue +24 -6
- package/src/components/datepicker/DatePicker.vue +1 -1
- package/src/components/datepicker/MonthPicker.vue +21 -1
- package/src/components/dropdown/Dropdown.vue +1 -1
- package/src/components/dropdown/DropdownMenu.vue +1 -1
- package/src/components/editable/EditButton.vue +1 -1
- package/src/components/filter/FilterBadge.vue +5 -4
- package/src/components/filter/FilterFacetsList.vue +3 -2
- package/src/components/filter/FilterPanel.vue +20 -6
- package/src/components/icon/components/nomi-calendar-view.vue +4 -0
- package/src/components/icon/components/nomi-help.vue +3 -2
- package/src/components/icon/components/nomi-kanban-view.vue +6 -0
- package/src/components/icon/components/nomi-list-view.vue +7 -0
- package/src/components/icon/components/nomi-lock.vue +1 -1
- package/src/components/icon/components/nomi-project.vue +2 -2
- package/src/components/icon/components/nomi-scissors.vue +1 -1
- package/src/components/icon/components/nomi-table-config.vue +9 -0
- package/src/components/icon/components/nomi-table-view.vue +4 -1
- package/src/components/icon/components/nomi-user.vue +3 -3
- package/src/components/icon/convert-icons.js +0 -3
- package/src/components/icon/icons.js +402 -397
- package/src/components/icon/new-icons/calendar-view.svg +3 -0
- package/src/components/icon/new-icons/help.svg +3 -2
- package/src/components/icon/new-icons/kanban-view.svg +5 -0
- package/src/components/icon/new-icons/list-view.svg +6 -0
- package/src/components/icon/new-icons/lock.svg +1 -1
- package/src/components/icon/new-icons/project.svg +2 -2
- package/src/components/icon/new-icons/scissors.svg +1 -1
- package/src/components/icon/new-icons/table-config.svg +8 -0
- package/src/components/icon/new-icons/table-view.svg +4 -1
- package/src/components/icon/new-icons/user.svg +3 -3
- package/src/components/kanban/BoardCard.vue +1 -1
- package/src/components/kanban/BoardCardTimer.vue +1 -1
- package/src/components/overlay/SensitiveOverlay.vue +4 -2
- package/src/components/panels/Panel.vue +21 -0
- package/src/components/panels/PanelList.vue +14 -3
- package/src/components/table/Table2.vue +65 -60
- package/src/components/table/TableBody.vue +6 -0
- package/src/components/table/TableGroup.vue +13 -4
- package/src/components/table/TableHeader.vue +77 -76
- package/src/components/table/TableRowToggle.vue +9 -1
- package/src/components/table/TableRows.vue +54 -30
- package/src/components/table/table2.scss +15 -34
- package/src/components/tree/TreeEditor.vue +2 -3
- package/src/components/view/View.vue +214 -59
- package/src/helpers/validators.js +35 -9
- package/src/helpers/validators.spec.js +48 -11
- package/src/locales/en.js +1 -1
- package/src/locales/uk.js +4 -9
|
@@ -29,90 +29,88 @@
|
|
|
29
29
|
<div v-if="visibleHeader" group="tablecolumns"
|
|
30
30
|
class="table-header"
|
|
31
31
|
@drop="reorderColumns"
|
|
32
|
-
v-draggable="{ handle: true, payload: { index: n, item: column }, mirror: {yAxis:false} }">
|
|
33
|
-
<
|
|
34
|
-
<
|
|
35
|
-
<
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<div v-if="column.prefix" class="itf-table2__subtitle text-truncate" v-text="column.prefix" />
|
|
42
|
-
</div>
|
|
32
|
+
v-draggable="{ dragHandleClass: null, handle: true, payload: { index: n, item: column }, mirror: {yAxis:false} }">
|
|
33
|
+
<itf-dropdown text append-to-body shadow ref="dropdown" class="w-100" :disabled="noColumnMenu">
|
|
34
|
+
<template #button>
|
|
35
|
+
<div class="itf-table2__header-title d-flex w-100 align-items-center" :title="getTitle(column.title)">
|
|
36
|
+
<itf-icon class="itf-table2__header-icon" new v-if="column.icon" :name="column.icon"></itf-icon>
|
|
37
|
+
<div class="flex-grow-1 w-100 itf-table2__title-container d-flex align-items-center" :class="{'justify-content-end': column.align === 'end'}">
|
|
38
|
+
<div class="itf-table2__title text-truncate">
|
|
39
|
+
{{getTitle(column.title)}}
|
|
40
|
+
<div v-if="column.prefix" class="itf-table2__subtitle text-truncate" :class="{'text-end': column.align === 'end'}" v-text="column.prefix" />
|
|
43
41
|
</div>
|
|
44
|
-
<itf-icon v-if="sortColumnParams[column.property]" :name="sortColumnParams[column.property] === 'asc' ? 'sort-asc' : 'sort-desc'" new :size="20" class="ms-1" />
|
|
45
42
|
</div>
|
|
46
|
-
</template>
|
|
47
|
-
<div class="dropdown-header">
|
|
48
|
-
{{$t('components.table.actions')}}
|
|
49
43
|
</div>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
44
|
+
<itf-icon v-if="sortColumnParams[column.property]" :name="sortColumnParams[column.property] === 'asc' ? 'sort-asc' : 'sort-desc'" new :size="20" class="ms-1" />
|
|
45
|
+
</template>
|
|
46
|
+
<div class="dropdown-header">
|
|
47
|
+
{{$t('components.table.actions')}}
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<div v-if="column.groupable">
|
|
51
|
+
<a class="dropdown-item d-flex align-items-center" href="javascript:;">
|
|
52
|
+
<itf-icon name="episodes" :size="16" class="me-1" />
|
|
53
|
+
{{$t('components.table.groupBy')}}
|
|
54
|
+
</a>
|
|
55
|
+
</div>
|
|
56
|
+
<div>
|
|
57
|
+
<a class="dropdown-item d-flex align-items-center gap-1" href="javascript:;" @click="togglePinned(n)">
|
|
58
|
+
<itf-icon v-if="column.pinned" name="pin" new />
|
|
59
|
+
<itf-icon v-else name="pin" new />
|
|
60
|
+
|
|
61
|
+
<span v-if="column.pinned">{{$t('components.table.unfreezeColumn')}}</span>
|
|
62
|
+
<span v-else>{{$t('components.table.freezeColumn')}}</span>
|
|
63
|
+
</a>
|
|
64
|
+
</div>
|
|
65
|
+
<div v-if="showAddColumn">
|
|
66
|
+
<a class="dropdown-item d-flex align-items-center gap-1" href="javascript:;" @click="hideColumn(n)">
|
|
67
|
+
<itf-icon name="hide" new />
|
|
68
|
+
|
|
69
|
+
{{$t('components.table.hideColumn')}}
|
|
70
|
+
</a>
|
|
71
|
+
</div>
|
|
72
|
+
<div v-if="column.filtrable">
|
|
73
|
+
<a class="dropdown-item d-flex align-items-center gap-1" href="javascript:;" @click="$emit('filter', column)">
|
|
74
|
+
<itf-icon name="filter" new />
|
|
75
|
+
|
|
76
|
+
{{$t('components.table.filter')}}
|
|
77
|
+
</a>
|
|
78
|
+
</div>
|
|
79
|
+
<div v-if="canMoveColumn(1, column)">
|
|
80
|
+
<a class="dropdown-item d-flex align-items-center gap-1" href="javascript:;" @click="moveColumn(1, column)">
|
|
81
|
+
<itf-icon name="move-right" new />
|
|
82
|
+
|
|
83
|
+
{{$t('components.table.moveRight')}}
|
|
84
|
+
</a>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<div v-if="canMoveColumn(-1, column)">
|
|
88
|
+
<a class="dropdown-item d-flex align-items-center gap-1" href="javascript:;" @click="moveColumn(-1, column)">
|
|
89
|
+
<itf-icon name="move-left" new />
|
|
90
|
+
|
|
91
|
+
{{$t('components.table.moveLeft')}}
|
|
92
|
+
</a>
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
<template v-if="column.sortable">
|
|
96
|
+
<div class="dropdown-header">
|
|
97
|
+
{{$t('components.table.sorting')}}
|
|
56
98
|
</div>
|
|
57
99
|
<div>
|
|
58
|
-
<a class="dropdown-item d-flex align-items-center gap-1" href="javascript:;" @click="
|
|
59
|
-
<itf-icon
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
<span v-if="column.pinned">{{$t('components.table.unfreezeColumn')}}</span>
|
|
63
|
-
<span v-else>{{$t('components.table.freezeColumn')}}</span>
|
|
64
|
-
</a>
|
|
65
|
-
</div>
|
|
66
|
-
<div v-if="showAddColumn">
|
|
67
|
-
<a class="dropdown-item d-flex align-items-center gap-1" href="javascript:;" @click="hideColumn(n)">
|
|
68
|
-
<itf-icon name="hide" new />
|
|
69
|
-
|
|
70
|
-
{{$t('components.table.hideColumn')}}
|
|
71
|
-
</a>
|
|
72
|
-
</div>
|
|
73
|
-
<div v-if="column.filtrable">
|
|
74
|
-
<a class="dropdown-item d-flex align-items-center gap-1" href="javascript:;" @click="$emit('filter', column)">
|
|
75
|
-
<itf-icon name="filter" new />
|
|
76
|
-
|
|
77
|
-
{{$t('components.table.filter')}}
|
|
100
|
+
<a class="dropdown-item d-flex align-items-center gap-1" href="javascript:;" @click="sortBy(column, 'asc')">
|
|
101
|
+
<itf-icon name="sort-asc" new />
|
|
102
|
+
{{$t('components.table.sortAscending')}}
|
|
78
103
|
</a>
|
|
79
104
|
</div>
|
|
80
|
-
<div
|
|
81
|
-
<a class="dropdown-item d-flex align-items-center gap-1" href="javascript:;" @click="
|
|
82
|
-
<itf-icon name="
|
|
83
|
-
|
|
84
|
-
{{$t('components.table.moveRight')}}
|
|
85
|
-
</a>
|
|
86
|
-
</div>
|
|
87
|
-
|
|
88
|
-
<div v-if="canMoveColumn(-1, column)">
|
|
89
|
-
<a class="dropdown-item d-flex align-items-center gap-1" href="javascript:;" @click="moveColumn(-1, column)">
|
|
90
|
-
<itf-icon name="move-left" new />
|
|
91
|
-
|
|
92
|
-
{{$t('components.table.moveLeft')}}
|
|
105
|
+
<div>
|
|
106
|
+
<a class="dropdown-item d-flex align-items-center gap-1" href="javascript:;" @click="sortBy(column, 'desc')">
|
|
107
|
+
<itf-icon name="sort-desc" new />
|
|
108
|
+
{{$t('components.table.sortDescending')}}
|
|
93
109
|
</a>
|
|
94
110
|
</div>
|
|
95
|
-
|
|
96
|
-
<template v-if="column.sortable">
|
|
97
|
-
<div class="dropdown-header">
|
|
98
|
-
{{$t('components.table.sorting')}}
|
|
99
|
-
</div>
|
|
100
|
-
<div>
|
|
101
|
-
<a class="dropdown-item d-flex align-items-center gap-1" href="javascript:;" @click="sortBy(column, 'asc')">
|
|
102
|
-
<itf-icon name="sort-asc" new />
|
|
103
|
-
{{$t('components.table.sortAscending')}}
|
|
104
|
-
</a>
|
|
105
|
-
</div>
|
|
106
|
-
<div>
|
|
107
|
-
<a class="dropdown-item d-flex align-items-center gap-1" href="javascript:;" @click="sortBy(column, 'desc')">
|
|
108
|
-
<itf-icon name="sort-desc" new />
|
|
109
|
-
{{$t('components.table.sortDescending')}}
|
|
110
|
-
</a>
|
|
111
|
-
</div>
|
|
112
|
-
</template>
|
|
113
|
-
</itf-dropdown>
|
|
111
|
+
</template>
|
|
114
112
|
<slot :name="`header.${column.property}.after`" v-bind="{ column }"></slot>
|
|
115
|
-
</
|
|
113
|
+
</itf-dropdown>
|
|
116
114
|
<div v-if="columnSorting" v-drag-handle class="itf-table2__drag-column">
|
|
117
115
|
<svg width="35" height="23" viewBox="0 0 35 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
118
116
|
<g filter="url(#filter0_d_1081_25763)">
|
|
@@ -200,6 +198,7 @@ class itfTableHeader extends Vue {
|
|
|
200
198
|
@Prop(Boolean) noColumnMenu;
|
|
201
199
|
@Prop(Boolean) noSelectAll;
|
|
202
200
|
@Prop(Boolean) editable;
|
|
201
|
+
@Prop(Boolean) sortAsString;
|
|
203
202
|
@Prop() idProperty;
|
|
204
203
|
@Prop() indicatorType;
|
|
205
204
|
|
|
@@ -421,8 +420,10 @@ class itfTableHeader extends Vue {
|
|
|
421
420
|
}
|
|
422
421
|
|
|
423
422
|
sortBy(column, order) {
|
|
424
|
-
let sort =
|
|
425
|
-
|
|
423
|
+
let sort = { [column.property]: order };
|
|
424
|
+
if (this.sortAsString) {
|
|
425
|
+
sort = order === 'desc' ? `-${column.property}` : column.property;
|
|
426
|
+
}
|
|
426
427
|
this.$emit('update:sorting', sort);
|
|
427
428
|
}
|
|
428
429
|
}
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<div @click.prevent.stop="toggle" class="d-flex align-items-center flex-nowrap" :class="{'active-toggle': visible}">
|
|
4
4
|
<div class="item-toggle text-muted">
|
|
5
|
-
<template v-if="visible &&
|
|
5
|
+
<template v-if="visible && loading">
|
|
6
|
+
<div class="itf-spinner"></div>
|
|
7
|
+
</template>
|
|
8
|
+
<template v-else-if="visible && expanded">
|
|
6
9
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
7
10
|
width="16" height="16" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
|
8
11
|
<path d="M184.7,413.1l2.1-1.8l156.5-136c5.3-4.6,8.6-11.5,8.6-19.2c0-7.7-3.4-14.6-8.6-19.2L187.1,101l-2.6-2.3
|
|
@@ -23,6 +26,10 @@
|
|
|
23
26
|
</div>
|
|
24
27
|
</template>
|
|
25
28
|
<style lang="scss" scoped>
|
|
29
|
+
.itf-spinner {
|
|
30
|
+
width: 1rem;
|
|
31
|
+
height: 1rem;
|
|
32
|
+
}
|
|
26
33
|
.active-toggle {
|
|
27
34
|
cursor: pointer;
|
|
28
35
|
}
|
|
@@ -43,6 +50,7 @@ export default @Component({
|
|
|
43
50
|
class itfTableRowToggle extends Vue {
|
|
44
51
|
@Prop(Boolean) expanded;
|
|
45
52
|
@Prop(Boolean) visible;
|
|
53
|
+
@Prop(Boolean) loading;
|
|
46
54
|
|
|
47
55
|
toggle() {
|
|
48
56
|
this.$emit('toggle');
|
|
@@ -25,6 +25,22 @@
|
|
|
25
25
|
<span v-if="indicatorType === 'order'">{{ (n + 1) }}</span>
|
|
26
26
|
<span v-else-if="indicatorType === 'property'">{{ item[idProperty] }}</span>
|
|
27
27
|
<span v-else-if="indicatorType === 'checkbox'"><itf-checkbox :disabled="item.isDisabled" :value="item[idProperty]" /></span>
|
|
28
|
+
<a href="" @click.prevent.stop="$emit('toggle', item)" v-else-if="indicatorType === 'toggle'">
|
|
29
|
+
<template v-if="subrowsProperty && item[subrowsProperty] && item[subrowsProperty].length">
|
|
30
|
+
<template v-if="item[subrowsProperty] && item[subrowsProperty].length && !isExpanded(item)">
|
|
31
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-plus-square" viewBox="0 0 16 16">
|
|
32
|
+
<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z"/>
|
|
33
|
+
<path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4"/>
|
|
34
|
+
</svg>
|
|
35
|
+
</template>
|
|
36
|
+
<template v-else>
|
|
37
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-dash-square" viewBox="0 0 16 16">
|
|
38
|
+
<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z"/>
|
|
39
|
+
<path d="M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8"/>
|
|
40
|
+
</svg>
|
|
41
|
+
</template>
|
|
42
|
+
</template>
|
|
43
|
+
</a>
|
|
28
44
|
</div>
|
|
29
45
|
</div>
|
|
30
46
|
<div accept-group="items" class="table-item-inner" @click="$emit('row-click', item)">
|
|
@@ -35,35 +51,35 @@
|
|
|
35
51
|
:style="`width: ${column.width}px; max-width: ${column.width}px; left: ${column.left}px;`"
|
|
36
52
|
:class="{[column.cssClass]: !!column.cssClass, 'justify-content-end': column.align === 'end', 'sticky': column.pinned && !getIsMobileView(), 'last-sticky-column': k === lastPinnedIndex && !getIsMobileView(), 'editable': column.editable && editable}"
|
|
37
53
|
class="table-view-item-value d-flex h-100">
|
|
38
|
-
<div class="table-view-item-value-content" :class="{'
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
54
|
+
<div class="table-view-item-value-content align-items-center" :class="{'justify-content-end': column.align === 'end', 'px-2': !(column.editable && editable)}">
|
|
55
|
+
<slot
|
|
56
|
+
:name="`column.${column.property}`"
|
|
57
|
+
:toggle="() => $emit('toggle', item)"
|
|
58
|
+
:hasSubitems="hasSubitems(item)"
|
|
59
|
+
:isExpanded="!!(hasSubitems(item) && !isExpanded(item))"
|
|
60
|
+
:level="level" :editable="column.editable && editable" :item="item" :column="column" :update="(val) => updateValue(item, val, n, column)" :value="getValue(item, column)">
|
|
61
|
+
<template v-if="column.editable && editable && (!editableProperty || item[editableProperty])">
|
|
62
|
+
<slot :name="`edit.${column.type}`" :level="level" :toggle="() => $emit('toggle', item)" :update="(val) => updateValue(item, val, n, column)" :value="getValue(item, column)" :item="item" :column="column">
|
|
63
|
+
<itf-text-field class="w-100 h-100" v-if="column.type === 'text'" :value="getValue(item, column)" @input="updateValue(item, $event, n, column)" />
|
|
64
|
+
<itf-text-field class="w-100 h-100" v-if="column.type === 'number'" type="number" :value="getValue(item, column)" @input="updateValue(item, $event, n, column)" />
|
|
65
|
+
<itf-hours-field
|
|
66
|
+
class="w-100 h-100"
|
|
67
|
+
placeholder="00h 00m"
|
|
68
|
+
v-else-if="column.type === 'time'"
|
|
69
|
+
:hours="getValue(item, column)"
|
|
70
|
+
@update:hours="updateValue(item, $event, n, column)"
|
|
71
|
+
/>
|
|
72
|
+
<itf-textarea class="w-100 h-100" :rows="1" autogrow v-else-if="column.type === 'textarea'" :value="getValue(item, column)" @input="updateValue(item, $event, n, column)" />
|
|
73
|
+
<itf-money-field class="w-100 h-100" currency-disabled :currency="currency" :currencies="currencies" v-else-if="column.type === 'money'" :value="getValue(item, column)" @input="updateValue(item, $event, n, column)" />
|
|
74
|
+
<itf-select class="w-100 h-100" v-else-if="column.type === 'select'" :reduce="(item) => item.value" :value="getValue(item, column)" @input="updateValue(item, $event, n, column)" :options="column.options"></itf-select>
|
|
75
|
+
</slot>
|
|
76
|
+
</template>
|
|
77
|
+
<span v-else class="text-truncate">
|
|
78
|
+
<slot :name="`format.${column.type}`" :toggle="() => $emit('toggle', item)" :level="level" :value="getValue(item, column)" :update="(value) => updateValue(item, value, n, column)" :item="item" :column="column">
|
|
79
|
+
{{getValue(item, column)}}
|
|
80
|
+
</slot>
|
|
81
|
+
</span>
|
|
82
|
+
</slot>
|
|
67
83
|
</div>
|
|
68
84
|
</div>
|
|
69
85
|
</template>
|
|
@@ -86,6 +102,7 @@
|
|
|
86
102
|
:columns="columns"
|
|
87
103
|
:id-property="idProperty"
|
|
88
104
|
:subrows-property="subrowsProperty"
|
|
105
|
+
:async-subrows-property="asyncSubrowsProperty"
|
|
89
106
|
:show-add-column="showAddColumn"
|
|
90
107
|
:show-actions="showActions"
|
|
91
108
|
:no-select-all="noSelectAll"
|
|
@@ -147,6 +164,7 @@ class itfTableRows extends Vue {
|
|
|
147
164
|
@Prop() rows;
|
|
148
165
|
@Prop() idProperty;
|
|
149
166
|
@Prop() subrowsProperty;
|
|
167
|
+
@Prop() asyncSubrowsProperty;
|
|
150
168
|
@Prop() dividerProperty;
|
|
151
169
|
@Prop() active;
|
|
152
170
|
@Prop(Boolean) showAddColumn;
|
|
@@ -176,6 +194,12 @@ class itfTableRows extends Vue {
|
|
|
176
194
|
return this.columns.findIndex((column) => column.lastPinned);
|
|
177
195
|
}
|
|
178
196
|
|
|
197
|
+
hasSubitems(item) {
|
|
198
|
+
const hasFactItems = this.subrowsProperty && item[this.subrowsProperty] && item[this.subrowsProperty].length;
|
|
199
|
+
const hasPlanItems = this.asyncSubrowsProperty && item[this.asyncSubrowsProperty] && item[this.asyncSubrowsProperty];
|
|
200
|
+
return !!(hasFactItems || hasPlanItems);
|
|
201
|
+
}
|
|
202
|
+
|
|
179
203
|
getIsMobileView() {
|
|
180
204
|
return getIsMobileView();
|
|
181
205
|
}
|
|
@@ -207,7 +231,7 @@ class itfTableRows extends Vue {
|
|
|
207
231
|
}
|
|
208
232
|
|
|
209
233
|
isActive(id) {
|
|
210
|
-
if (!this.idProperty) {
|
|
234
|
+
if (!this.idProperty || !this.active) {
|
|
211
235
|
return false;
|
|
212
236
|
}
|
|
213
237
|
if (Array.isArray(this.active)) {
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
--itf-table-alt-bg: #F9FAFB;
|
|
8
8
|
--itf-table-alt-selected-bg: #eff1f3;
|
|
9
9
|
--itf-table-header-bg: #f5f7f8;
|
|
10
|
-
--itf-table-header-color: #
|
|
10
|
+
--itf-table-header-color: #575b63;
|
|
11
11
|
--itf-table-mirror-bg: #F2F4F7;
|
|
12
12
|
--itf-table-border-color: transparent; //var(--itf-table-header-bg);
|
|
13
|
-
--itf-table-header-border-color: #
|
|
13
|
+
--itf-table-header-border-color: #8E97A533;
|
|
14
14
|
--itf-table-border-base-color: var(--itf-table-header-bg); // кольори границь таблиці без внутрішніх рядків
|
|
15
15
|
--itf-table-border-base-width: 2px;
|
|
16
16
|
--itf-table-hover-header-bg: #dfe5ef;
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
--itf-table-summary-text: var(--bs-tertiary-color);
|
|
24
24
|
--itf-table-table-border-radius: 1rem;
|
|
25
25
|
--itf-table-header-height: 2.25rem;
|
|
26
|
+
--itf-table-divider-bg: #F7F8FA;
|
|
27
|
+
--itf-table-divider-border: rgba(238, 238, 238, 1);
|
|
26
28
|
|
|
27
29
|
--group-title-height: 40px;
|
|
28
30
|
--table-row-height: none;
|
|
@@ -43,6 +45,9 @@ body[data-theme="dark"] {
|
|
|
43
45
|
--itf-table-selected-bg: #011534;
|
|
44
46
|
--itf-table-active-bg: #022e72;
|
|
45
47
|
--itf-table-summary-text: #82909d80;
|
|
48
|
+
--itf-table-border-base-color: var(--itf-table-header-bg);
|
|
49
|
+
--itf-table-divider-bg: #0f0f0f;
|
|
50
|
+
--itf-table-divider-border: rgb(100, 100, 100, .1);
|
|
46
51
|
}
|
|
47
52
|
.itf-table2 {
|
|
48
53
|
font-size: var(--itf-table-content-font-size, var(--itf-table-font-size));
|
|
@@ -60,7 +65,7 @@ body[data-theme="dark"] {
|
|
|
60
65
|
height: 100%;
|
|
61
66
|
}
|
|
62
67
|
.scroller {
|
|
63
|
-
margin-bottom:
|
|
68
|
+
//margin-bottom: .5rem;
|
|
64
69
|
}
|
|
65
70
|
.scrollable-x {
|
|
66
71
|
overflow-x: scroll;
|
|
@@ -97,34 +102,18 @@ body[data-theme="dark"] {
|
|
|
97
102
|
position: sticky;
|
|
98
103
|
top: 0;
|
|
99
104
|
bottom: 0;
|
|
100
|
-
right:
|
|
105
|
+
right: -5px;
|
|
101
106
|
z-index: 8;
|
|
107
|
+
padding-right: 5px;
|
|
108
|
+
padding-left: 5px;
|
|
102
109
|
display: flex;
|
|
103
110
|
align-items: center;
|
|
104
|
-
|
|
105
|
-
@media (max-width: 768px) {
|
|
106
|
-
position: relative;
|
|
107
|
-
opacity: 1;
|
|
108
|
-
}
|
|
109
111
|
}
|
|
110
112
|
.on-hover {
|
|
111
113
|
opacity: 0;
|
|
112
|
-
width: 0;
|
|
113
|
-
padding: 4px .5rem;
|
|
114
|
-
overflow: hidden;
|
|
115
114
|
pointer-events: none;
|
|
116
|
-
position: absolute;
|
|
117
|
-
right: 0;
|
|
118
|
-
background: linear-gradient(90deg, transparent 0, var(--itf-table2-row-bg) 10px);
|
|
119
|
-
|
|
120
|
-
@media (max-width: 768px) {
|
|
121
|
-
width: max-content;
|
|
122
|
-
opacity: 1;
|
|
123
|
-
position: relative;
|
|
124
|
-
}
|
|
125
115
|
}
|
|
126
116
|
.table-row-template:hover .on-hover {
|
|
127
|
-
width: max-content;
|
|
128
117
|
opacity: 1;
|
|
129
118
|
pointer-events: all;
|
|
130
119
|
}
|
|
@@ -240,9 +229,6 @@ body[data-theme="dark"] {
|
|
|
240
229
|
&:not(.draggable-container--is-dragging):hover .table-view-header-value {
|
|
241
230
|
z-index: 39;
|
|
242
231
|
}
|
|
243
|
-
&:not(.draggable-container--is-dragging):hover .sticky {
|
|
244
|
-
z-index: 40;
|
|
245
|
-
}
|
|
246
232
|
&:after {
|
|
247
233
|
content: "";
|
|
248
234
|
position: absolute;
|
|
@@ -451,20 +437,14 @@ body[data-theme="dark"] {
|
|
|
451
437
|
.indicator {
|
|
452
438
|
border-left: var(--itf-table-border-base-width) solid var(--itf-table2-border-color);
|
|
453
439
|
}
|
|
454
|
-
|
|
455
|
-
&.disabled {
|
|
456
|
-
.table-view-item-value {
|
|
457
|
-
opacity: 0.5;
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
440
|
}
|
|
461
441
|
|
|
462
442
|
&__row-divider {
|
|
463
|
-
background-color:
|
|
443
|
+
background-color: var(--itf-table-divider-bg);
|
|
464
444
|
height: 5px;
|
|
465
445
|
padding: 0;
|
|
466
|
-
border-top: 1px solid
|
|
467
|
-
border-bottom: 1px solid
|
|
446
|
+
border-top: 1px solid var(--itf-table-divider-border);
|
|
447
|
+
border-bottom: 1px solid var(--itf-table-divider-border);
|
|
468
448
|
}
|
|
469
449
|
//&:hover, &.permanent-editable-border {
|
|
470
450
|
// .table-view-item-value.editable {
|
|
@@ -477,6 +457,7 @@ body[data-theme="dark"] {
|
|
|
477
457
|
position: relative;
|
|
478
458
|
z-index: 2;
|
|
479
459
|
width: 100%;
|
|
460
|
+
display: flex;
|
|
480
461
|
height: 100%;
|
|
481
462
|
background: var(--itf-table2-row-bg)
|
|
482
463
|
}
|
|
@@ -25,11 +25,10 @@
|
|
|
25
25
|
@keyup.enter="(e)=>{$emit('click',{event:e,ele:e.target,node,knode})}"
|
|
26
26
|
@click="(e)=>{$emit('click',{event:e,ele:e.target,node,knode})}"
|
|
27
27
|
>
|
|
28
|
-
<div v-if="node.level >= toggleStartLevel" class="itf-tree-editor_node_toggle">
|
|
28
|
+
<div v-if="node.level >= toggleStartLevel" class="itf-tree-editor_node_toggle ps-2">
|
|
29
29
|
<itf-button
|
|
30
|
-
v-if="autoToggleTree && node.level >= toggleStartLevel && node
|
|
30
|
+
v-if="autoToggleTree && node.level >= toggleStartLevel && node.Children && node.Children.length > 0"
|
|
31
31
|
small
|
|
32
|
-
icon
|
|
33
32
|
@click.stop="toggleNode($event, node, knode)"
|
|
34
33
|
>
|
|
35
34
|
<itf-icon v-if="isNodeToggled(node)" name="plus" size="24" />
|