@itfin/components 1.3.95 → 1.3.97
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/panels/Panel.vue +4 -0
- package/src/components/panels/PanelList.vue +2 -0
- package/src/components/table/Table2.vue +2 -0
- package/src/components/table/TableGroup.vue +2 -0
- package/src/components/table/TableHeader.vue +5 -2
- package/src/components/table/TableRows.vue +1 -1
- package/src/components/text-field/MoneyField.vue +6 -2
package/package.json
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
:collapsed="panel.isCollapsed"
|
|
20
20
|
:closeable="panel.isCloseable"
|
|
21
21
|
:animate="panel.isAnimate"
|
|
22
|
+
@open="openPanel($event[0], $event[1], n + 1)"
|
|
22
23
|
@expand="expandPanel(panel)"
|
|
23
24
|
@fullsize="fullsizePanel(panel)"
|
|
24
25
|
@close="closePanel(panel)"
|
|
@@ -162,6 +163,7 @@ export interface IPanel {
|
|
|
162
163
|
nocard?: boolean;
|
|
163
164
|
isCollapsed: boolean;
|
|
164
165
|
isCloseable: boolean;
|
|
166
|
+
isAnimate: boolean;
|
|
165
167
|
open: (type: string, visOptions: VisualOptions, payload: any) => void;
|
|
166
168
|
close: () => void;
|
|
167
169
|
expand: () => void;
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
:editable-property="editableProperty"
|
|
54
54
|
:sorting.sync="_sorting"
|
|
55
55
|
:active="active"
|
|
56
|
+
:sort-as-string="sortAsString"
|
|
56
57
|
@update:expanded-ids="$emit('update:expanded-ids', $event)"
|
|
57
58
|
@new="$emit('new', $event)"
|
|
58
59
|
@add-column="$emit('add-column', $event)"
|
|
@@ -113,6 +114,7 @@ class itfTable2 extends Vue {
|
|
|
113
114
|
@Prop({ type: Array, default: () => [] }) expandedIds;
|
|
114
115
|
@Prop() currency;
|
|
115
116
|
@Prop() currencies;
|
|
117
|
+
@Prop(Boolean) sortAsString;
|
|
116
118
|
@Prop(Boolean) stickyHeader;
|
|
117
119
|
@Prop(Boolean) addNewRows;
|
|
118
120
|
@Prop(Boolean) columnSorting;
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
:rows="rows"
|
|
43
43
|
:schema="schema"
|
|
44
44
|
:editable="editable"
|
|
45
|
+
:sort-as-string="sortAsString"
|
|
45
46
|
:no-column-menu="noColumnMenu"
|
|
46
47
|
:no-select-all="noSelectAll"
|
|
47
48
|
:selected-ids="selectedIds"
|
|
@@ -361,6 +362,7 @@ class itfTableGroup extends Vue {
|
|
|
361
362
|
@Prop(Boolean) expandedAll;
|
|
362
363
|
@Prop(Boolean) striped;
|
|
363
364
|
@Prop(Boolean) stickyHeader;
|
|
365
|
+
@Prop(Boolean) sortAsString;
|
|
364
366
|
@Prop() indicatorWidth;
|
|
365
367
|
@Prop() cssProperty;
|
|
366
368
|
@PropSync('sorting') _sorting;
|
|
@@ -174,6 +174,7 @@ class itfTableHeader extends Vue {
|
|
|
174
174
|
@Prop(Boolean) noColumnMenu;
|
|
175
175
|
@Prop(Boolean) noSelectAll;
|
|
176
176
|
@Prop(Boolean) editable;
|
|
177
|
+
@Prop(Boolean) sortAsString;
|
|
177
178
|
@Prop() idProperty;
|
|
178
179
|
@Prop() indicatorType;
|
|
179
180
|
|
|
@@ -359,8 +360,10 @@ class itfTableHeader extends Vue {
|
|
|
359
360
|
}
|
|
360
361
|
|
|
361
362
|
sortBy(column, order) {
|
|
362
|
-
let sort =
|
|
363
|
-
|
|
363
|
+
let sort = { [column.property]: order };
|
|
364
|
+
if (this.sortAsString) {
|
|
365
|
+
sort = order === 'desc' ? `-${column.property}` : column.property;
|
|
366
|
+
}
|
|
364
367
|
this.$emit('update:sorting', sort);
|
|
365
368
|
}
|
|
366
369
|
}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
<div
|
|
51
51
|
v-if="column.visible !== false"
|
|
52
52
|
:data-column="k"
|
|
53
|
-
:style="column.grow ? `left: ${column.left}px; flex-grow: 1` : `width: ${column.width}px; max-width: ${column.width}px; left: ${column.left}px;`"
|
|
53
|
+
:style="column.grow ? `left: ${column.left}px; width: ${column.width}px; flex-grow: 1` : `width: ${column.width}px; max-width: ${column.width}px; left: ${column.left}px;`"
|
|
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)">
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="itf-money-field ph-no-capture" :class="{'currency-arrow': !currencyDisabled, 'currency-select': currencySelect}">
|
|
3
|
-
<div :class="{'input-group h-100': noCurrencySign}" :style="`--itf-money-field-padding-left: ${noCurrencySign ? 1 : selectedCurrencySymbol.length * 0.6 + 1}rem`">
|
|
3
|
+
<div class="h-100" :class="{'input-group h-100': noCurrencySign}" :style="`--itf-money-field-padding-left: ${noCurrencySign ? 1 : selectedCurrencySymbol.length * 0.6 + 1}rem`">
|
|
4
4
|
<span class="itf-money-field__prepend" v-if="!noCurrencySign">{{ selectedCurrencySymbol }}</span>
|
|
5
5
|
<i-mask-component
|
|
6
6
|
ref="input"
|
|
7
7
|
v-bind="mask"
|
|
8
|
-
class="form-control"
|
|
8
|
+
class="form-control h-100"
|
|
9
9
|
:class="{ 'is-invalid': isInvalid(), 'is-valid': isSuccess() }"
|
|
10
10
|
@input="setValue"
|
|
11
11
|
:value="maskedValue"
|
|
@@ -167,6 +167,10 @@ class itfMoneyField extends Vue {
|
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
setValue (val) {
|
|
170
|
+
if (val === '') {
|
|
171
|
+
this.$emit('input', null);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
170
174
|
if (!isNumeric(val) || (val || '').toString().match(/\..*0$/)) { // що не видаляло останній нуль вкінці
|
|
171
175
|
return;
|
|
172
176
|
}
|