@itfin/components 1.4.30 → 1.4.35
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 +1 -1
- package/src/components/app/App.vue +6 -3
- package/src/components/checkbox/Checkbox.vue +1 -1
- package/src/components/checkbox/RadioBox.vue +13 -6
- package/src/components/customize/PropertyItem.vue +13 -5
- package/src/components/datepicker/DatePickerInline.vue +62 -129
- package/src/components/filter/FilterPanel.vue +16 -37
- package/src/components/icon/components/nomi-.DS_Store +0 -0
- package/src/components/icon/components/nomi-arrow_left.vue +4 -0
- package/src/components/icon/components/nomi-balance_turnover.vue +5 -0
- package/src/components/icon/components/nomi-bar-horizontal.vue +7 -0
- package/src/components/icon/components/nomi-check-alt.vue +4 -0
- package/src/components/icon/components/nomi-credit.vue +4 -0
- package/src/components/icon/components/nomi-duplicate.vue +5 -0
- package/src/components/icon/components/nomi-goods-turnover.vue +4 -0
- package/src/components/icon/components/nomi-goods.vue +5 -0
- package/src/components/icon/components/nomi-help-alt.vue +4 -0
- package/src/components/icon/components/nomi-link.vue +6 -0
- package/src/components/icon/components/nomi-menu.vue +3 -3
- package/src/components/icon/components/nomi-minus.vue +1 -1
- package/src/components/icon/components/nomi-pc.vue +4 -0
- package/src/components/icon/components/nomi-promo.vue +4 -0
- package/src/components/icon/components/nomi-transactions_delete.vue +5 -0
- package/src/components/icon/components/nomi-types.vue +7 -0
- package/src/components/icon/components/nomi-warning_triangle.vue +6 -0
- package/src/components/panels/PanelItemEdit.vue +8 -6
- package/src/components/panels/PanelLink.vue +15 -6
- package/src/components/panels/PanelList.vue +3 -7
- package/src/components/panels/helpers.ts +4 -10
- package/src/components/table/Table2.vue +61 -65
- package/src/components/table/TableBody.vue +0 -6
- package/src/components/table/TableGroup.vue +4 -14
- package/src/components/table/TableHeader.vue +7 -12
- package/src/components/table/TableRowToggle.vue +1 -9
- package/src/components/table/TableRows.vue +43 -55
- package/src/components/table/table2.scss +25 -15
- package/src/components/view/View.vue +8 -15
|
@@ -25,22 +25,6 @@
|
|
|
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>
|
|
44
28
|
</div>
|
|
45
29
|
</div>
|
|
46
30
|
<div accept-group="items" class="table-item-inner" @click="$emit('row-click', item)">
|
|
@@ -49,37 +33,37 @@
|
|
|
49
33
|
v-if="column.visible !== false"
|
|
50
34
|
:data-column="k"
|
|
51
35
|
:style="`width: ${column.width}px; max-width: ${column.width}px; left: ${column.left}px;`"
|
|
52
|
-
:class="{'sticky': column.pinned, 'last-sticky-column': k === lastPinnedIndex, 'editable': column.editable && editable}"
|
|
36
|
+
:class="{'justify-content-end': column.align === 'end', 'sticky': column.pinned, 'last-sticky-column': k === lastPinnedIndex, 'editable': column.editable && editable}"
|
|
53
37
|
class="table-view-item-value d-flex h-100">
|
|
54
|
-
<div class="table-view-item-value-content
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
38
|
+
<div class="table-view-item-value-content" :class="{'px-2': !(column.editable && editable)}">
|
|
39
|
+
<slot
|
|
40
|
+
:name="`column.${column.property}`"
|
|
41
|
+
:toggle="() => $emit('toggle', item)"
|
|
42
|
+
:hasSubitems="!!(subrowsProperty && item[subrowsProperty] && item[subrowsProperty].length)"
|
|
43
|
+
:isExpanded="!!(item[subrowsProperty] && item[subrowsProperty].length && !isExpanded(item))"
|
|
44
|
+
:level="level" :editable="column.editable && editable" :item="item" :column="column" :updateFields="(val) => updateValues(item, val, n, column)" :update="(val) => updateValue(item, val, n, column)" :value="getValue(item, column)">
|
|
45
|
+
<template v-if="column.editable && editable && (!editableProperty || item[editableProperty])">
|
|
46
|
+
<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">
|
|
47
|
+
<itf-text-field class="w-100 h-100" v-if="column.type === 'text'" :value="getValue(item, column)" @input="updateValue(item, $event, n, column)" />
|
|
48
|
+
<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)" />
|
|
49
|
+
<itf-hours-field
|
|
50
|
+
class="w-100 h-100"
|
|
51
|
+
placeholder="00h 00m"
|
|
52
|
+
v-else-if="column.type === 'time'"
|
|
53
|
+
:hours="getValue(item, column)"
|
|
54
|
+
@update:hours="updateValue(item, $event, n, column)"
|
|
55
|
+
/>
|
|
56
|
+
<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)" />
|
|
57
|
+
<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)" />
|
|
58
|
+
<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
|
+
</slot>
|
|
60
|
+
</template>
|
|
61
|
+
<div v-else class="h-100 align-items-center d-flex w-100">
|
|
62
|
+
<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
|
+
{{getValue(item, column)}}
|
|
64
|
+
</slot>
|
|
65
|
+
</div>
|
|
66
|
+
</slot>
|
|
83
67
|
</div>
|
|
84
68
|
</div>
|
|
85
69
|
</template>
|
|
@@ -102,7 +86,6 @@
|
|
|
102
86
|
:columns="columns"
|
|
103
87
|
:id-property="idProperty"
|
|
104
88
|
:subrows-property="subrowsProperty"
|
|
105
|
-
:async-subrows-property="asyncSubrowsProperty"
|
|
106
89
|
:show-add-column="showAddColumn"
|
|
107
90
|
:show-actions="showActions"
|
|
108
91
|
:no-select-all="noSelectAll"
|
|
@@ -162,7 +145,6 @@ class itfTableRows extends Vue {
|
|
|
162
145
|
@Prop() rows;
|
|
163
146
|
@Prop() idProperty;
|
|
164
147
|
@Prop() subrowsProperty;
|
|
165
|
-
@Prop() asyncSubrowsProperty;
|
|
166
148
|
@Prop() dividerProperty;
|
|
167
149
|
@Prop() active;
|
|
168
150
|
@Prop(Boolean) showAddColumn;
|
|
@@ -192,12 +174,6 @@ class itfTableRows extends Vue {
|
|
|
192
174
|
return this.columns.findIndex((column) => column.lastPinned);
|
|
193
175
|
}
|
|
194
176
|
|
|
195
|
-
hasSubitems(item) {
|
|
196
|
-
const hasFactItems = this.subrowsProperty && item[this.subrowsProperty] && item[this.subrowsProperty].length;
|
|
197
|
-
const hasPlanItems = this.asyncSubrowsProperty && item[this.asyncSubrowsProperty] && item[this.asyncSubrowsProperty];
|
|
198
|
-
return !!(hasFactItems || hasPlanItems);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
177
|
updateValue(item, value, index, column) {
|
|
202
178
|
const newItem = { ...item };
|
|
203
179
|
if (newItem[column.property] !== value) {
|
|
@@ -212,8 +188,20 @@ class itfTableRows extends Vue {
|
|
|
212
188
|
}
|
|
213
189
|
}
|
|
214
190
|
|
|
191
|
+
updateValues(item, values, index, column) {
|
|
192
|
+
const newItem = { ...item };
|
|
193
|
+
Object.assign(newItem, values);
|
|
194
|
+
this.$emit('update', {
|
|
195
|
+
index,
|
|
196
|
+
item,
|
|
197
|
+
inputValue: values,
|
|
198
|
+
value: newItem,
|
|
199
|
+
column
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
|
|
215
203
|
isActive(id) {
|
|
216
|
-
if (!this.idProperty
|
|
204
|
+
if (!this.idProperty) {
|
|
217
205
|
return false;
|
|
218
206
|
}
|
|
219
207
|
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: #7A818EA5;
|
|
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: #7A818E33;
|
|
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,8 +23,6 @@
|
|
|
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);
|
|
28
26
|
|
|
29
27
|
--group-title-height: 40px;
|
|
30
28
|
--table-row-height: none;
|
|
@@ -45,9 +43,6 @@ body[data-theme="dark"] {
|
|
|
45
43
|
--itf-table-selected-bg: #011534;
|
|
46
44
|
--itf-table-active-bg: #022e72;
|
|
47
45
|
--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);
|
|
51
46
|
}
|
|
52
47
|
.itf-table2 {
|
|
53
48
|
font-size: var(--itf-table-content-font-size, var(--itf-table-font-size));
|
|
@@ -65,7 +60,7 @@ body[data-theme="dark"] {
|
|
|
65
60
|
height: 100%;
|
|
66
61
|
}
|
|
67
62
|
.scroller {
|
|
68
|
-
|
|
63
|
+
margin-bottom: 12px;
|
|
69
64
|
}
|
|
70
65
|
.scrollable-x {
|
|
71
66
|
overflow-x: scroll;
|
|
@@ -102,18 +97,34 @@ body[data-theme="dark"] {
|
|
|
102
97
|
position: sticky;
|
|
103
98
|
top: 0;
|
|
104
99
|
bottom: 0;
|
|
105
|
-
right:
|
|
100
|
+
right: -.5rem;
|
|
106
101
|
z-index: 8;
|
|
107
|
-
padding-right: 5px;
|
|
108
|
-
padding-left: 5px;
|
|
109
102
|
display: flex;
|
|
110
103
|
align-items: center;
|
|
104
|
+
|
|
105
|
+
@media (max-width: 768px) {
|
|
106
|
+
position: relative;
|
|
107
|
+
opacity: 1;
|
|
108
|
+
}
|
|
111
109
|
}
|
|
112
110
|
.on-hover {
|
|
113
111
|
opacity: 0;
|
|
112
|
+
width: 0;
|
|
113
|
+
padding: 4px .5rem;
|
|
114
|
+
overflow: hidden;
|
|
114
115
|
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
|
+
}
|
|
115
125
|
}
|
|
116
126
|
.table-row-template:hover .on-hover {
|
|
127
|
+
width: max-content;
|
|
117
128
|
opacity: 1;
|
|
118
129
|
pointer-events: all;
|
|
119
130
|
}
|
|
@@ -440,11 +451,11 @@ body[data-theme="dark"] {
|
|
|
440
451
|
}
|
|
441
452
|
|
|
442
453
|
&__row-divider {
|
|
443
|
-
background-color:
|
|
454
|
+
background-color: #F7F8FA;
|
|
444
455
|
height: 5px;
|
|
445
456
|
padding: 0;
|
|
446
|
-
border-top: 1px solid
|
|
447
|
-
border-bottom: 1px solid
|
|
457
|
+
border-top: 1px solid rgba(238, 238, 238, 1);
|
|
458
|
+
border-bottom: 1px solid rgba(238, 238, 238, 1);
|
|
448
459
|
}
|
|
449
460
|
//&:hover, &.permanent-editable-border {
|
|
450
461
|
// .table-view-item-value.editable {
|
|
@@ -457,7 +468,6 @@ body[data-theme="dark"] {
|
|
|
457
468
|
position: relative;
|
|
458
469
|
z-index: 2;
|
|
459
470
|
width: 100%;
|
|
460
|
-
display: flex;
|
|
461
471
|
height: 100%;
|
|
462
472
|
background: var(--itf-table2-row-bg)
|
|
463
473
|
}
|
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
:endpoint="filtersEndpoint"
|
|
11
11
|
:panel="panel"
|
|
12
12
|
v-model="filter"
|
|
13
|
-
@
|
|
14
|
-
@change="onFilterSet($event, false)"
|
|
13
|
+
@input="onFilterSet"
|
|
15
14
|
@set-table-schema="setTableSchema"
|
|
16
15
|
>
|
|
17
16
|
<template #after-filter-btn>
|
|
@@ -214,7 +213,7 @@ class itfView extends Vue {
|
|
|
214
213
|
|
|
215
214
|
getDownloadLinks() {
|
|
216
215
|
const state = this.$refs.table ? this.$refs.table.getTableState() : null;
|
|
217
|
-
const filter =
|
|
216
|
+
const filter = this.filter;
|
|
218
217
|
const sorting = this.sorting;
|
|
219
218
|
const filterableColumnsNames = (state?.columns ?? []).filter(column => column.visible).map(column => column.property);
|
|
220
219
|
|
|
@@ -298,7 +297,7 @@ class itfView extends Vue {
|
|
|
298
297
|
this.$emit('load', this.filter);
|
|
299
298
|
this.loadingData = true;
|
|
300
299
|
await this.$try(async () => {
|
|
301
|
-
let filter =
|
|
300
|
+
let filter = this.filter;
|
|
302
301
|
if (this.oldFormat) {
|
|
303
302
|
filter = Object.keys(filter).reduce((acc, key) => {
|
|
304
303
|
acc[`filter[${key}]`] = filter[key];
|
|
@@ -371,9 +370,7 @@ class itfView extends Vue {
|
|
|
371
370
|
sources.forEach(source => {
|
|
372
371
|
if (source && typeof source === 'object') {
|
|
373
372
|
Object.entries(source).forEach(([key, value]) => {
|
|
374
|
-
if (
|
|
375
|
-
delete target[key];
|
|
376
|
-
} else if (value !== undefined) {
|
|
373
|
+
if (value !== undefined) {
|
|
377
374
|
target[key] = value;
|
|
378
375
|
}
|
|
379
376
|
});
|
|
@@ -383,14 +380,10 @@ class itfView extends Vue {
|
|
|
383
380
|
}
|
|
384
381
|
}
|
|
385
382
|
|
|
386
|
-
onFilterSet(filter
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
} else {
|
|
391
|
-
this.page = 1;
|
|
392
|
-
this.setPanelPayload({ ...filter, page: null });
|
|
393
|
-
}
|
|
383
|
+
onFilterSet(filter) {
|
|
384
|
+
this.page = 1;
|
|
385
|
+
this.selectedIds = [];
|
|
386
|
+
this.setPanelPayload({ ...filter, page: 1 });
|
|
394
387
|
this.loadData();
|
|
395
388
|
}
|
|
396
389
|
|