@itfin/components 1.4.35 → 1.4.40

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.
@@ -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: #7A818EA5;
10
+ --itf-table-header-color: #575b63;
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: #7A818E33;
13
+ --itf-table-header-border-color: #8E97A533;
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,6 +23,8 @@
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);
26
28
 
27
29
  --group-title-height: 40px;
28
30
  --table-row-height: none;
@@ -43,6 +45,9 @@ body[data-theme="dark"] {
43
45
  --itf-table-selected-bg: #011534;
44
46
  --itf-table-active-bg: #022e72;
45
47
  --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);
46
51
  }
47
52
  .itf-table2 {
48
53
  font-size: var(--itf-table-content-font-size, var(--itf-table-font-size));
@@ -60,7 +65,7 @@ body[data-theme="dark"] {
60
65
  height: 100%;
61
66
  }
62
67
  .scroller {
63
- margin-bottom: 12px;
68
+ //margin-bottom: .5rem;
64
69
  }
65
70
  .scrollable-x {
66
71
  overflow-x: scroll;
@@ -97,34 +102,18 @@ body[data-theme="dark"] {
97
102
  position: sticky;
98
103
  top: 0;
99
104
  bottom: 0;
100
- right: -.5rem;
105
+ right: -5px;
101
106
  z-index: 8;
107
+ padding-right: 5px;
108
+ padding-left: 5px;
102
109
  display: flex;
103
110
  align-items: center;
104
-
105
- @media (max-width: 768px) {
106
- position: relative;
107
- opacity: 1;
108
- }
109
111
  }
110
112
  .on-hover {
111
113
  opacity: 0;
112
- width: 0;
113
- padding: 4px .5rem;
114
- overflow: hidden;
115
114
  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
- }
125
115
  }
126
116
  .table-row-template:hover .on-hover {
127
- width: max-content;
128
117
  opacity: 1;
129
118
  pointer-events: all;
130
119
  }
@@ -451,11 +440,11 @@ body[data-theme="dark"] {
451
440
  }
452
441
 
453
442
  &__row-divider {
454
- background-color: #F7F8FA;
443
+ background-color: var(--itf-table-divider-bg);
455
444
  height: 5px;
456
445
  padding: 0;
457
- border-top: 1px solid rgba(238, 238, 238, 1);
458
- border-bottom: 1px solid rgba(238, 238, 238, 1);
446
+ border-top: 1px solid var(--itf-table-divider-border);
447
+ border-bottom: 1px solid var(--itf-table-divider-border);
459
448
  }
460
449
  //&:hover, &.permanent-editable-border {
461
450
  // .table-view-item-value.editable {
@@ -468,6 +457,7 @@ body[data-theme="dark"] {
468
457
  position: relative;
469
458
  z-index: 2;
470
459
  width: 100%;
460
+ display: flex;
471
461
  height: 100%;
472
462
  background: var(--itf-table2-row-bg)
473
463
  }
@@ -10,7 +10,8 @@
10
10
  :endpoint="filtersEndpoint"
11
11
  :panel="panel"
12
12
  v-model="filter"
13
- @input="onFilterSet"
13
+ @loaded="onFilterSet($event, true)"
14
+ @change="onFilterSet($event, false)"
14
15
  @set-table-schema="setTableSchema"
15
16
  >
16
17
  <template #after-filter-btn>
@@ -213,7 +214,7 @@ class itfView extends Vue {
213
214
 
214
215
  getDownloadLinks() {
215
216
  const state = this.$refs.table ? this.$refs.table.getTableState() : null;
216
- const filter = this.filter;
217
+ const filter = { ...this.filter };
217
218
  const sorting = this.sorting;
218
219
  const filterableColumnsNames = (state?.columns ?? []).filter(column => column.visible).map(column => column.property);
219
220
 
@@ -297,7 +298,7 @@ class itfView extends Vue {
297
298
  this.$emit('load', this.filter);
298
299
  this.loadingData = true;
299
300
  await this.$try(async () => {
300
- let filter = this.filter;
301
+ let filter = { ...this.filter };
301
302
  if (this.oldFormat) {
302
303
  filter = Object.keys(filter).reduce((acc, key) => {
303
304
  acc[`filter[${key}]`] = filter[key];
@@ -370,7 +371,9 @@ class itfView extends Vue {
370
371
  sources.forEach(source => {
371
372
  if (source && typeof source === 'object') {
372
373
  Object.entries(source).forEach(([key, value]) => {
373
- if (value !== undefined) {
374
+ if (key === 'page' && value === null) {
375
+ delete target[key];
376
+ } else if (value !== undefined) {
374
377
  target[key] = value;
375
378
  }
376
379
  });
@@ -380,10 +383,14 @@ class itfView extends Vue {
380
383
  }
381
384
  }
382
385
 
383
- onFilterSet(filter) {
384
- this.page = 1;
385
- this.selectedIds = [];
386
- this.setPanelPayload({ ...filter, page: 1 });
386
+ onFilterSet(filter, keepPage = false) {
387
+ if (keepPage) {
388
+ // при завантаженні сторінки не потрібно скидувати сторінку
389
+ this.setPanelPayload({ ...filter });
390
+ } else {
391
+ this.page = 1;
392
+ this.setPanelPayload({ ...filter, page: null });
393
+ }
387
394
  this.loadData();
388
395
  }
389
396