@itfin/components 1.3.37 → 1.3.38
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
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
:data-column="n"
|
|
94
94
|
class="position-relative line-overflow"
|
|
95
95
|
:style="`width: ${column.width}px; max-width: ${column.width}px;`">
|
|
96
|
-
<itf-dropdown append-to-context text right @open="persistSummary = true" @close="persistSummary = false">
|
|
96
|
+
<itf-dropdown append-to-context text right @open="persistSummary = true" @close="persistSummary = false" autoclose="outside">
|
|
97
97
|
<template #button>
|
|
98
98
|
<span data-test="summary-column" class="invisible-summary d-flex align-items-center justify-content-end flex-auto">
|
|
99
99
|
<span v-if="column.calculate === 'none' || !column.calculate" class="table-summary-column summary-placeholder align-items-center justify-content-center">
|
|
@@ -245,13 +245,14 @@
|
|
|
245
245
|
.table-add-new-item {
|
|
246
246
|
border-right: 1px solid rgb(238 238 238 / 1);
|
|
247
247
|
border-bottom: 1px solid rgb(238 238 238 / 1);
|
|
248
|
+
outline: none;
|
|
248
249
|
|
|
249
250
|
& > span {
|
|
250
251
|
left: var(--shadow-area-width);
|
|
251
252
|
position: sticky;
|
|
252
253
|
padding-left: var(--shadow-area-width);
|
|
253
254
|
}
|
|
254
|
-
&:hover {
|
|
255
|
+
&:hover, &:active {
|
|
255
256
|
background: var(--hover-bg);
|
|
256
257
|
}
|
|
257
258
|
}
|
|
@@ -323,7 +324,7 @@ class itfTableGroup extends Vue {
|
|
|
323
324
|
@Prop(Boolean) showHeader;
|
|
324
325
|
@Prop(Boolean) noColumnMenu;
|
|
325
326
|
@Prop(Boolean) noSelectAll;
|
|
326
|
-
@Prop({type: String, default: function() { return this.$t('components.new'); } }) newLabel;
|
|
327
|
+
@Prop({type: String, default: function() { return this.$t('components.table.new'); } }) newLabel;
|
|
327
328
|
@Prop({type: Object, default: () => ({})}) schema;
|
|
328
329
|
|
|
329
330
|
isShowTable = true;
|
|
@@ -375,24 +376,24 @@ class itfTableGroup extends Vue {
|
|
|
375
376
|
{ id: 'none', title: this.$t('components.table.calculateNone') },
|
|
376
377
|
{ id: 'total', title: this.$t('components.table.calculateTotal'), summary: 'Total', func: (rows, column) => rows.reduce((acc, row) => acc + (getNumber(row, column.property)), 0) },
|
|
377
378
|
{ id: 'average', title: this.$t('components.table.calculateAverage'), summary: 'Average', func: (rows, column) => {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
379
|
+
const sum = rows.reduce((acc, row) => acc + (getNumber(row, column.property)), 0);
|
|
380
|
+
return round(sum / rows.length, 3);
|
|
381
|
+
} },
|
|
381
382
|
{ id: 'min', title: this.$t('components.table.calculateMin'), summary: 'Min', func: (rows, column) => Math.min(...rows.map(row => getNumber(row, column.property))) },
|
|
382
383
|
{ id: 'max', title: this.$t('components.table.calculateMax'), summary: 'Max', func: (rows, column) => Math.max(...rows.map(row => getNumber(row, column.property))) },
|
|
383
384
|
{ id: 'countAll', title: this.$t('components.table.calculateCountAll'), summary: 'Count', func: (rows) => rows.length },
|
|
384
385
|
{ id: 'countValues', title: this.$t('components.table.calculateCountValues'), summary: 'Values', func: (rows, column) => rows.filter(row => !!get(row, column.property)).length },
|
|
385
|
-
{ id: 'countUniqueValues', title: this.$t('components.table.calculateCountUniqueValues'), summary: 'Unique', func: (rows, column) => uniq(rows.
|
|
386
|
+
{ id: 'countUniqueValues', title: this.$t('components.table.calculateCountUniqueValues'), summary: 'Unique', func: (rows, column) => uniq(rows.map(row => get(row, column.property)).filter(item => !!item)).length },
|
|
386
387
|
{ id: 'countEmpty', title: this.$t('components.table.calculateCountEmpty'), summary: 'Empty', func: (rows, column) => rows.filter(row => !get(row, column.property)).length },
|
|
387
388
|
{ id: 'countNotEmpty', title: this.$t('components.table.calculateCountNotEmpty'), summary: 'Not Empty', func: (rows, column) => rows.filter(row => !!get(row, column.property)).length },
|
|
388
389
|
{ id: 'percentEmpty', title: this.$t('components.table.calculatePercentEmpty'), summary: 'Empty', func: (rows, column) => {
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
390
|
+
const empty = rows.filter(row => !get(row, column.property)).length;
|
|
391
|
+
return round(empty / rows.length * 100, 3) + '%';
|
|
392
|
+
} },
|
|
392
393
|
{ id: 'percentNotEmpty', title: this.$t('components.table.calculatePercentNotEmpty'), summary: 'Not Empty', func: (rows, column) => {
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
394
|
+
const notEmpty = rows.filter(row => !!get(row, column.property)).length;
|
|
395
|
+
return round(notEmpty / rows.length * 100, 3) + '%';
|
|
396
|
+
} },
|
|
396
397
|
];
|
|
397
398
|
}
|
|
398
399
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="itf-money-field" :class="{'currency-arrow': !currencyDisabled, 'currency-select': currencySelect}">
|
|
3
|
-
<div class="input-group h-100" :style="`--itf-money-field-padding-left: ${noCurrencySign ? 1 : selectedCurrencySymbol.length * 0.6 + 1}rem`">
|
|
3
|
+
<div :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"
|