@itfin/components 1.4.1 → 1.4.2
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
CHANGED
|
@@ -35,8 +35,10 @@
|
|
|
35
35
|
<div class="itf-table2__header-title d-flex w-100 align-items-center" :title="getTitle(column.title)">
|
|
36
36
|
<itf-icon class="itf-table2__header-icon" new v-if="column.icon" :name="column.icon"></itf-icon>
|
|
37
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
|
-
|
|
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" />
|
|
41
|
+
</div>
|
|
40
42
|
</div>
|
|
41
43
|
</div>
|
|
42
44
|
<itf-icon v-if="sortColumnParams[column.property]" :name="sortColumnParams[column.property] === 'asc' ? 'sort-asc' : 'sort-desc'" new :size="20" class="ms-1" />
|
|
@@ -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 :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)">
|
|
@@ -33,9 +49,9 @@
|
|
|
33
49
|
v-if="column.visible !== false"
|
|
34
50
|
:data-column="k"
|
|
35
51
|
:style="`width: ${column.width}px; max-width: ${column.width}px; left: ${column.left}px;`"
|
|
36
|
-
:class="{'
|
|
52
|
+
:class="{'sticky': column.pinned, 'last-sticky-column': k === lastPinnedIndex, 'editable': column.editable && editable}"
|
|
37
53
|
class="table-view-item-value d-flex h-100">
|
|
38
|
-
<div class="table-view-item-value-content" :class="{'px-2': !(column.editable && editable)}">
|
|
54
|
+
<div class="table-view-item-value-content align-items-center" :class="{'justify-content-end': column.align === 'end', 'px-2': !(column.editable && editable)}">
|
|
39
55
|
<slot
|
|
40
56
|
:name="`column.${column.property}`"
|
|
41
57
|
:toggle="() => $emit('toggle', item)"
|
|
@@ -58,11 +74,11 @@
|
|
|
58
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>
|
|
59
75
|
</slot>
|
|
60
76
|
</template>
|
|
61
|
-
<
|
|
77
|
+
<span v-else class="text-truncate">
|
|
62
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">
|
|
63
79
|
{{getValue(item, column)}}
|
|
64
80
|
</slot>
|
|
65
|
-
</
|
|
81
|
+
</span>
|
|
66
82
|
</slot>
|
|
67
83
|
</div>
|
|
68
84
|
</div>
|
|
@@ -189,7 +205,7 @@ class itfTableRows extends Vue {
|
|
|
189
205
|
}
|
|
190
206
|
|
|
191
207
|
isActive(id) {
|
|
192
|
-
if (!this.idProperty) {
|
|
208
|
+
if (!this.idProperty || !this.active) {
|
|
193
209
|
return false;
|
|
194
210
|
}
|
|
195
211
|
if (Array.isArray(this.active)) {
|