@itfin/components 1.3.67 → 1.3.68
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
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
:striped="striped"
|
|
40
40
|
:expanded-ids="expandedIds"
|
|
41
41
|
:css-property="cssProperty"
|
|
42
|
+
:editable-property="editableProperty"
|
|
42
43
|
:sorting.sync="_sorting"
|
|
43
44
|
@update:expanded-ids="$emit('update:expanded-ids', $event)"
|
|
44
45
|
@new="$emit('new', $event)"
|
|
@@ -86,6 +87,7 @@ class itfTable2 extends Vue {
|
|
|
86
87
|
@Prop({ type: String, default: null }) idProperty;
|
|
87
88
|
@Prop({ type: String, default: null }) cssProperty;
|
|
88
89
|
@Prop({ type: String, default: null }) subrowsProperty;
|
|
90
|
+
@Prop({ type: String, default: null }) editableProperty;
|
|
89
91
|
@Prop({ default: 45 }) indicatorWidth;
|
|
90
92
|
@Prop({ type: String, default: null, validator: (val) => ['order', 'checkbox', 'toggle', 'property'].includes(val) }) indicatorType;
|
|
91
93
|
@Prop({ type: String, default: null }) stateName; // save state to storage
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
:striped="striped"
|
|
18
18
|
:expanded-all="expandedAll"
|
|
19
19
|
:css-property="cssProperty"
|
|
20
|
+
:editable-property="editableProperty"
|
|
20
21
|
@update:expanded-ids="$emit('update:expanded-ids', $event)"
|
|
21
22
|
@row-click="$emit('row-click', $event)"
|
|
22
23
|
@update="$emit('update', $event)"
|
|
@@ -186,6 +187,7 @@ class itfTableBody extends Vue {
|
|
|
186
187
|
@Prop(Boolean) editable;
|
|
187
188
|
@Prop(Boolean) expandedAll;
|
|
188
189
|
@Prop(Boolean) striped;
|
|
190
|
+
@Prop() editableProperty;
|
|
189
191
|
@Prop() selectedIds;
|
|
190
192
|
@Prop() currency;
|
|
191
193
|
@Prop() currencies;
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
:show-add-column="showAddColumn"
|
|
72
72
|
:expanded-ids="expandedIds"
|
|
73
73
|
:css-property="cssProperty"
|
|
74
|
+
:editable-property="editableProperty"
|
|
74
75
|
@update:expanded-ids="$emit('update:expanded-ids', $event)"
|
|
75
76
|
>
|
|
76
77
|
<template v-for="(_, name) in $slots" #[name]="slotData">
|
|
@@ -344,6 +345,7 @@ class itfTableGroup extends Vue {
|
|
|
344
345
|
@Prop(Boolean) noColumnMenu;
|
|
345
346
|
@Prop(Boolean) noSelectAll;
|
|
346
347
|
@Prop(Boolean) editable;
|
|
348
|
+
@Prop() editableProperty;
|
|
347
349
|
@Prop(Boolean) expandedAll;
|
|
348
350
|
@Prop(Boolean) striped;
|
|
349
351
|
@Prop() indicatorWidth;
|
|
@@ -54,9 +54,10 @@
|
|
|
54
54
|
:class="{'justify-content-end': column.align === 'end', 'sticky': column.pinned, 'last-sticky-column': k === lastPinnedIndex, 'flex-grow-1': column.grow, 'px-2': !(column.editable && editable), 'editable': column.editable && editable}"
|
|
55
55
|
class="table-view-item-value d-flex h-100">
|
|
56
56
|
<slot :name="`column.${column.property}`" :toggle="() => $emit('toggle', item)" :level="level" :editable="column.editable && editable" :item="item" :column="column" :update="(val) => updateValue(item, val, n, column)" :value="getValue(item, column)">
|
|
57
|
-
<template v-if="column.editable && editable">
|
|
57
|
+
<template v-if="column.editable && editable && (!editableProperty || item[editableProperty])">
|
|
58
58
|
<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">
|
|
59
59
|
<itf-text-field class="w-100" v-if="column.type === 'text'" :value="getValue(item, column)" @input="updateValue(item, $event, n, column)" />
|
|
60
|
+
<itf-text-field class="w-100" v-if="column.type === 'number'" type="number" :value="getValue(item, column)" @input="updateValue(item, $event, n, column)" />
|
|
60
61
|
<itf-hours-field
|
|
61
62
|
class="w-100"
|
|
62
63
|
placeholder="00h 00m"
|
|
@@ -103,6 +104,8 @@
|
|
|
103
104
|
:expanded-ids="expandedIds"
|
|
104
105
|
:expanded-all="expandedAll"
|
|
105
106
|
:css-property="cssProperty"
|
|
107
|
+
:editable-property="editableProperty"
|
|
108
|
+
@update="$emit('update', $event)"
|
|
106
109
|
@toggle="$emit('toggle', $event)"
|
|
107
110
|
>
|
|
108
111
|
<template v-for="(_, name) in $slots" #[name]="slotData">
|
|
@@ -153,6 +156,7 @@ class itfTableRows extends Vue {
|
|
|
153
156
|
@Prop(Boolean) editable;
|
|
154
157
|
@Prop(Boolean) expandedAll;
|
|
155
158
|
@Prop(Boolean) striped;
|
|
159
|
+
@Prop() editableProperty;
|
|
156
160
|
@Prop() selectedIds;
|
|
157
161
|
@Prop() expandedIds;
|
|
158
162
|
@Prop() currency;
|
|
@@ -180,6 +184,7 @@ class itfTableRows extends Vue {
|
|
|
180
184
|
this.$emit('update', {
|
|
181
185
|
index,
|
|
182
186
|
item,
|
|
187
|
+
inputValue: value,
|
|
183
188
|
value: newItem,
|
|
184
189
|
column
|
|
185
190
|
});
|