@itfin/components 1.3.34 → 1.3.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.
@@ -1,5 +1,6 @@
1
1
  @import './css_variables.scss';
2
2
  @import './fonts.scss';
3
+ @import './icons.scss';
3
4
  @import './dark-theme.scss';
4
5
  @import './scrollbar';
5
6
  @import './components/air-select';
@@ -2,7 +2,6 @@ import { storiesOf } from '@storybook/vue';
2
2
  import itfAvatar from './Avatar.vue';
3
3
 
4
4
  storiesOf('Common', module)
5
- .addDecorator(withKnobs)
6
5
  .add('Avatar', () => ({
7
6
  components: {
8
7
  itfAvatar
@@ -0,0 +1,30 @@
1
+ <div class="notion-overlay-container notion-default-overlay-container"
2
+ style="position: fixed; inset: 0px; z-index: 999; pointer-events: none; overflow: hidden;">
3
+ <div style="position: relative; z-index: 0;"></div>
4
+ <div data-overlay="true" style="pointer-events: auto; position: relative; z-index: 0;">
5
+ <div>
6
+ <div style="position: fixed; top: 0px; left: 0px; width: 100vw; height: 100vh;"></div>
7
+ <div style="position: fixed; left: 347px; top: 463.398px; pointer-events: none;">
8
+ <div style="width: 280px; height: 0px;"></div>
9
+ <div style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start;">
10
+ <div style="position: relative; top: 100%; pointer-events: auto;">
11
+ <div style="display: flex; align-items: center; position: relative; flex-direction: column-reverse; transform-origin: 0% top; left: 0px; top: 0px;">
12
+ <div role="dialog"
13
+ style="border-radius: 6px; background: white; backdrop-filter: none; position: relative; max-width: calc(-24px + 100vw); box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px; overflow: visible; width: 280px; min-height: 34px; max-height: 634px; display: flex; flex-direction: column;">
14
+ <div style="display: flex; flex-direction: column; overflow-y: auto; flex-grow: 1; height: 100%;">
15
+ <div style="padding: 6px 9px; font-size: 14px; min-height: 34px; display: flex; height: 100%; flex-direction: column; justify-content: space-between; flex-grow: 1; font-weight: 500;">
16
+ <div class="notranslate" spellcheck="true" placeholder=" "
17
+ data-content-editable-leaf="true" contenteditable="true"
18
+ style="max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47);">
19
+ d
20
+ </div>
21
+ </div>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </div>
26
+ </div>
27
+ </div>
28
+ </div>
29
+ </div>
30
+ </div>
@@ -0,0 +1,116 @@
1
+ const CSS_CLASSES = {
2
+ btn: ['itf-button', 'btn'],
3
+ basic: ['btn-basic'],
4
+ primary: ['btn-primary'],
5
+ secondary: ['btn-secondary'],
6
+ large: ['btn-lg'],
7
+ small: ['btn-sm'],
8
+ block: ['itf-button__block'],
9
+ labeled: ['labeled'],
10
+ squircle: ['btn-squircle'],
11
+ icon: ['btn-icon'],
12
+ loading: ['loading'],
13
+ spinner: ['itf-spinner'],
14
+ loadingWhite: ['itf-spinner__white'],
15
+ };
16
+
17
+ export
18
+ class Button extends HTMLElement {
19
+
20
+ static get observedAttributes() {
21
+ return ['disabled', 'open'];
22
+ }
23
+
24
+ get isLoading() {
25
+ return this.hasAttribute('loading');
26
+ }
27
+
28
+ get styleClasses() {
29
+ let styles = [];
30
+ if (this.hasAttribute('color')) {
31
+ styles.push(`btn-${this.getAttribute('color')}`);
32
+ }
33
+ if (this.hasAttribute('block')) {
34
+ styles.push(CSS_CLASSES.block);
35
+ }
36
+ if (this.hasAttribute('labeled')) {
37
+ styles.push(CSS_CLASSES.labeled);
38
+ }
39
+ if (this.hasAttribute('squircle')) {
40
+ styles.push(CSS_CLASSES.squircle);
41
+ }
42
+ if (this.hasAttribute('icon')) {
43
+ styles.push(CSS_CLASSES.icon);
44
+ }
45
+ if (this.isLoading) {
46
+ styles.push(CSS_CLASSES.loading);
47
+ }
48
+
49
+ if (this.hasAttribute('small')) {
50
+ styles = styles.concat(CSS_CLASSES.small);
51
+ } else if (this.hasAttribute('large')) {
52
+ styles = styles.concat(CSS_CLASSES.large);
53
+ }
54
+
55
+ if (this.hasAttribute('primary')) {
56
+ styles = styles.concat(CSS_CLASSES.primary);
57
+ } else if (this.hasAttribute('secondary')) {
58
+ styles = styles.concat(CSS_CLASSES.secondary);
59
+ } else if (!this.hasAttribute('color')) {
60
+ styles = styles.concat(CSS_CLASSES.basic);
61
+ }
62
+ return styles;
63
+ }
64
+
65
+ get open() {
66
+ return this.hasAttribute('open');
67
+ }
68
+
69
+ get disabled() {
70
+ return this.hasAttribute('disabled');
71
+ }
72
+
73
+ set disabled(val) {
74
+ if (val) {
75
+ this.setAttribute('tabindex', '-1');
76
+ this.setAttribute('disabled', '');
77
+ this.setAttribute('aria-disabled', 'true');
78
+ } else {
79
+ this.setAttribute('tabindex', '0');
80
+ this.setAttribute('aria-disabled', 'false');
81
+ this.removeAttribute('disabled');
82
+ }
83
+ }
84
+
85
+ constructor() {
86
+ super();
87
+ }
88
+
89
+ connectedCallback() {
90
+ const button = document.createElement('button');
91
+
92
+ const loadingText = this.getAttribute('loading-text');
93
+ const html = this.innerHTML;
94
+ this.replaceWith(button);
95
+ button.innerHTML = html;
96
+ button.classList.add(...CSS_CLASSES.btn);
97
+ button.classList.add(...this.styleClasses);
98
+
99
+ if (this.isLoading) {
100
+ button.setAttribute('disabled', 'disabled');
101
+ const loadingDiv = document.createElement('div');
102
+ const spinnerDiv = document.createElement('div');
103
+ spinnerDiv.classList.add(...CSS_CLASSES.spinner);
104
+ if (this.hasAttribute('primary') || this.hasAttribute('white')) {
105
+ spinnerDiv.classList.add(CSS_CLASSES.loadingWhite);
106
+ }
107
+ loadingDiv.appendChild(spinnerDiv);
108
+ // if (this.isLoading && loadingText) {
109
+ // const loadingTextDiv = document.createElement('div');
110
+ // loadingTextDiv.innerHTML = loadingText;
111
+ // loadingDiv.appendChild(loadingTextDiv);
112
+ // }
113
+ button.appendChild(loadingDiv);
114
+ }
115
+ }
116
+ }
@@ -5,14 +5,18 @@ import itfLabel from '../form/Label.vue';
5
5
  import itfDatePicker from '../datepicker/DatePicker.vue';
6
6
  import itfDateRangePicker from '../datepicker/DateRangePicker.vue';
7
7
  import itfApp from '../app/App.vue';
8
+ // import {Button} from './Button.js';
9
+
10
+ // window.customElements.define('itf-button', Button);
11
+
8
12
 
9
13
  storiesOf('Common', module)
10
14
  .add('Buttons', () => ({
11
15
  components: {
16
+ itfButton,
12
17
  itfApp,
13
18
  itfForm,
14
19
  itfLabel,
15
- itfButton,
16
20
  itfDatePicker,
17
21
  itfDateRangePicker
18
22
  },
@@ -62,7 +66,7 @@ storiesOf('Common', module)
62
66
 
63
67
  <h3>Standart button</h3>
64
68
 
65
- <itf-button primary>Primary button</itf-button>
69
+ <itf-button squircle primary>Primary button</itf-button>
66
70
  <itf-button secondary>Secondary button</itf-button>
67
71
  <itf-button>Basic button</itf-button>
68
72
  <itf-button icon>
@@ -88,7 +92,7 @@ storiesOf('Common', module)
88
92
 
89
93
  <h3>Large button</h3>
90
94
 
91
- <itf-button large primary>Primary button</itf-button>
95
+ <itf-button squircle large primary>Primary button</itf-button>
92
96
  <itf-button large secondary>Secondary button</itf-button>
93
97
  <itf-button large>Basic button</itf-button>
94
98
  <itf-button large icon>
@@ -103,12 +107,12 @@ storiesOf('Common', module)
103
107
  <itf-button primary loading>Primary button</itf-button>
104
108
  <itf-button secondary loading>Secondary button</itf-button>
105
109
  <itf-button loading>Basic button</itf-button>
106
- <itf-button primary loading small>Small button</itf-button>
110
+ <itf-button primary loading small loading-text="Loading...">Small button</itf-button>
107
111
  <itf-button primary loading large>Large button</itf-button>
108
112
 
109
113
  <h4>Test loading</h4>
110
-
111
- <itf-button @click="testLoading" primary :loading="isLoading" loading-text="Saving...">Click to test loading</itf-button>
114
+ {{isLoading}}
115
+ <itf-button onclick="testLoading" primary :loading.prop="isLoading" loading-text="Saving...">Click to test loading</itf-button>
112
116
 
113
117
  </itf-app>
114
118
  </div>`,
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
 
3
3
  <div class="itf-checkbox form-check" :class="{ 'form-switch': this.switch, 'itf-checkbox__large': large, 'itf-checkbox__medium': medium }">
4
- <input class="form-check-input" :id="id" type="checkbox" name="checkbox" v-model="isChecked" :disabled="isDisabled" />
4
+ <input class="form-check-input" ref="input" :id="id" type="checkbox" name="checkbox" v-model="isChecked" :disabled="isDisabled" />
5
5
  <label :for="id" class="form-check-label">
6
6
  <slot name="label">
7
7
  {{label}}
@@ -60,5 +60,9 @@ class itfCheckbox extends Vue {
60
60
  }
61
61
  this.$emit('input', val);
62
62
  }
63
+
64
+ get input() {
65
+ return this.$refs.input;
66
+ }
63
67
  }
64
68
  </script>
@@ -33,22 +33,23 @@ class itfDropdown extends Vue {
33
33
  render (createElement, context) {
34
34
  const { props, slots, data } = context;
35
35
  const modalId = `dropdownId${globalModalIndex++}`;
36
- const { buttonOptions, toggle, text, right, shadow, label, appendToBody } = props;
36
+ const { buttonOptions, toggle, text, disabled, label, appendToBody } = props;
37
37
  const { button, default: defaultSlot } = slots();
38
38
  let elements = [
39
39
  createElement(
40
40
  text ? 'div' : itfButton,
41
41
  {
42
+ staticClass: data.staticClass || '',
42
43
  props: buttonOptions || {},
43
44
  class: { 'dropdown-toggle': toggle },
44
- attrs: { id: modalId, 'data-bs-toggle': 'dropdown', 'aria-expanded': 'false' },
45
- ref: 'toggle',
45
+ attrs: { id: modalId, 'data-bs-toggle': 'dropdown', 'aria-expanded': 'false', ...(data.attrs || {}) },
46
46
  },
47
47
  button || label
48
48
  ),
49
- createElement(
49
+ disabled ? null : createElement(
50
50
  itfDropdownMenu,
51
51
  {
52
+ ref: data.ref,
52
53
  props: { ...props, toggleId: modalId },
53
54
  },
54
55
  defaultSlot
@@ -57,6 +57,13 @@ class itfDropdownMenu extends Vue {
57
57
  });
58
58
  }
59
59
 
60
+ beforeDestroy() {
61
+ if (this.modalEl) {
62
+ this.modalEl.hide();
63
+ this.modalEl.dispose();
64
+ }
65
+ }
66
+
60
67
  show() {
61
68
  if (this.modalEl) {
62
69
  this.modalEl.show();
@@ -1,5 +1,5 @@
1
1
  import Vue from 'vue';
2
- import { Draggable } from './draggable'
2
+ import { Draggable } from '@shopify/draggable';
3
3
  import DraggableEvent from './event'
4
4
 
5
5
 
@@ -1,34 +1,38 @@
1
1
  <template>
2
2
 
3
- <div class="scrollable scrollable-x big-scrollbar">
4
- <template v-for="(group, index) in groups">
5
- <div class="table-view-body">
6
- <itf-table-group
7
- :key="index"
8
- :style="`--table-row-height: ${rowHeight}px`"
9
- :columns="columns"
10
- @update:columns="onColumnsUpdate"
11
- :rows="group.rows"
12
- :title="group.name"
13
- :add-new-rows="addNewRows"
14
- :column-sorting="columnSorting"
15
- :column-resizing="columnResizing"
16
- :show-grouping="showGrouping"
17
- :show-summary="showSummary"
18
- :show-add-column="showAddColumn"
19
- :row-height="rowHeight"
20
- :show-header="index === 0"
21
- @add-column="$emit('add-column', $event)"
22
- >
23
- <template v-for="(_, name) in $slots" #[name]="slotData">
24
- <slot :name="name" v-bind="slotData || {}" />
25
- </template>
26
- <template v-for="(_, name) in $scopedSlots" #[name]="slotData">
27
- <slot :name="name" v-bind="slotData || {}" />
28
- </template>
29
- </itf-table-group>
30
- </div>
31
- </template>
3
+ <div class="scrollable scrollable-x big-scrollbar" :class="{'permanent-checkboxes': selectedIds.length}">
4
+ <itf-checkbox-group v-model="selectedIds">
5
+ <template v-for="(group, index) in groups">
6
+ <div class="table-view-body">
7
+ <itf-table-group
8
+ :key="index"
9
+ :id-property="idProperty"
10
+ :columns="columns"
11
+ @update:columns="onColumnsUpdate"
12
+ :rows="group.rows"
13
+ :title="group.name"
14
+ :selected-ids.sync="selectedIds"
15
+ :add-new-rows="addNewRows"
16
+ :column-sorting="columnSorting"
17
+ :column-resizing="columnResizing"
18
+ :show-grouping="showGrouping"
19
+ :show-summary="showSummary"
20
+ :show-add-column="showAddColumn"
21
+ :show-header="!noHeader"
22
+ :schema="schema"
23
+ @new="$emit('new', $event)"
24
+ @add-column="$emit('add-column', $event)"
25
+ >
26
+ <template v-for="(_, name) in $slots" #[name]="slotData">
27
+ <slot :name="name" v-bind="slotData || {}" />
28
+ </template>
29
+ <template v-for="(_, name) in $scopedSlots" #[name]="slotData">
30
+ <slot :name="name" v-bind="slotData || {}" />
31
+ </template>
32
+ </itf-table-group>
33
+ </div>
34
+ </template>
35
+ </itf-checkbox-group>
32
36
  </div>
33
37
 
34
38
  </template>
@@ -65,7 +69,8 @@
65
69
  }
66
70
  </style>
67
71
  <script>
68
- import { Vue, Component, Prop, PropSync } from 'vue-property-decorator';
72
+ import { Vue, Component, Prop, Watch } from 'vue-property-decorator';
73
+ import itfCheckboxGroup from '../checkbox/CheckboxGroup.vue';
69
74
  import itfButton from '../button/Button.vue';
70
75
  import itfIcon from '../icon/Icon.vue';
71
76
  import itfTableGroup from './TableGroup.vue';
@@ -73,7 +78,11 @@ import itfTableHeader from './TableHeader.vue';
73
78
 
74
79
  export default @Component({
75
80
  name: 'itfTable2',
81
+ provide() {
82
+ return { tableEl: this }; // do not use Provide from vue-property-decorator
83
+ },
76
84
  components: {
85
+ itfCheckboxGroup,
77
86
  itfTableHeader,
78
87
  itfButton,
79
88
  itfIcon,
@@ -81,16 +90,72 @@ export default @Component({
81
90
  }
82
91
  })
83
92
  class itfTable2 extends Vue {
84
- @Prop({ required: true, type: Array }) columns;
93
+ // @Prop({ required: true, type: Array }) columns;
85
94
  @Prop({ required: true, type: Array }) rows;
86
- @Prop({ type: Number, default: 40 }) rowHeight;
87
95
  @Prop({ type: String, default: null }) groupBy;
96
+ @Prop({ type: String, default: 'Id' }) idProperty;
97
+ @Prop({ type: String, default: null }) stateName; // save state to storage
98
+ @Prop({ type: Object, default: () => ({}) }) schema;
88
99
  @Prop(Boolean) addNewRows;
89
100
  @Prop(Boolean) columnSorting;
90
101
  @Prop(Boolean) columnResizing;
91
102
  @Prop(Boolean) showAddColumn;
92
103
  @Prop(Boolean) showGrouping;
93
104
  @Prop(Boolean) showSummary;
105
+ @Prop(Boolean) noHeader;
106
+
107
+ state = {
108
+ selectedIds: [],
109
+ columns: []
110
+ };
111
+ selectedIds = [];
112
+
113
+ getTableState() {
114
+ const list = this.schema?.properties || [];
115
+ let state = this.stateName ? JSON.parse(localStorage.getItem(this.stateKey) || 'null') : null;
116
+ if (!state) {
117
+ state = {
118
+ selectedIds: [],
119
+ columns: [...list]
120
+ };
121
+ }
122
+ state.selectedIds = [];
123
+ for (const column of list) {
124
+ const stateColumn = state.columns.find(i => i.property === column.property);
125
+ if (stateColumn) {
126
+ Object.assign(stateColumn, column);
127
+ } else {
128
+ state.columns.push(column);
129
+ }
130
+ }
131
+ for (const column of state.columns) {
132
+ const originColumn = list.find(i => i.property === column.property);
133
+ if (!originColumn) {
134
+ state.columns = state.columns.filter(i => i.property !== column.property);
135
+ }
136
+ }
137
+ return state;
138
+ }
139
+
140
+ get stateKey() {
141
+ return this.stateName ? `itf-table-${this.stateName}` : null;
142
+ }
143
+
144
+ saveTableState() {
145
+ if (!this.stateName) {
146
+ return;
147
+ }
148
+ localStorage.setItem(this.stateKey, JSON.stringify(this.state));
149
+ }
150
+
151
+ mounted() {
152
+ this.state = this.getTableState();
153
+ this.selectedIds = this.state.selectedIds;
154
+ }
155
+
156
+ get columns() {
157
+ return this.state?.columns || [];
158
+ }
94
159
 
95
160
  get groups() {
96
161
  const { groupBy, rows } = this;
@@ -108,8 +173,18 @@ class itfTable2 extends Vue {
108
173
  return Object.entries(groups).map(([name, rows]) => ({ name, rows }));
109
174
  }
110
175
 
176
+ @Watch('selectedIds')
177
+ onSelectedIdsUpdate(selectedIds) {
178
+ this.state.selectedIds = selectedIds;
179
+ this.saveTableState();
180
+ }
181
+
111
182
  onColumnsUpdate(columns) {
112
- this.$emit('update:columns', columns);
183
+ const pinned = [...columns.filter(i => i.pinned)];
184
+ const unpinned = [...columns.filter(i => !i.pinned)];
185
+ this.state.columns = [...pinned, ...unpinned].map((item, key) => ({ ...item, index: key }));
186
+ this.$emit('update:columns', this.state.columns);
187
+ this.saveTableState();
113
188
  }
114
189
  }
115
190
  </script>
@@ -1,15 +1,10 @@
1
1
  <template>
2
2
 
3
- <recycle-scroller
4
- class="scroller"
5
- page-mode
6
- :items="rows"
7
- :item-size="rowHeight"
8
- key-field="Id"
9
- v-slot="{ item }"
10
- direction="vertical"
11
- >
12
- <div group="items" data-test="table-item" class="table-view-item grouped draggable-item">
3
+ <div class="scroller">
4
+ <div
5
+ v-for="(item, n) in rows"
6
+ :key="n"
7
+ group="items" data-test="table-item" class="table-view-item grouped draggable-item">
13
8
  <div class="table-row-template">
14
9
  <div accept-group="items" class="table-view-body-space"></div>
15
10
  <div class="shadow-area">
@@ -24,17 +19,10 @@
24
19
  </div>
25
20
  <div class="indicator sticky">
26
21
  <div class="fill on-rest table-view-row-count">
27
- <span>{{ item.Id }}</span>
22
+ <!-- <span>{{ item[idProperty] }}</span>-->
28
23
  </div>
29
24
  <div class="fill on-hover">
30
- <a href="" data-test="table-item-expand">
31
- <i class="ic-expand"></i>
32
- </a>
33
- <div class="">
34
- <a data-test="table-row-generator" href="">
35
- <i class="ic-plus"></i>
36
- </a>
37
- </div>
25
+ <itf-checkbox :value="item[idProperty]" />
38
26
  </div>
39
27
  </div>
40
28
  <div accept-group="items" class="table-item-inner">
@@ -44,12 +32,18 @@
44
32
  :data-column="n"
45
33
  :style="`width: ${column.width}px; left: ${column.left}px;`"
46
34
  :class="{'sticky': column.pinned, 'last-sticky-column': n === lastPinnedIndex, 'flex-grow-1': column.grow}"
47
- class="table-view-item-value d-flex h-100 align-items-stretch px-2">
35
+ class="table-view-item-value d-flex h-100 align-items-stretch">
48
36
  <slot :name="`column.${column.name}`" :item="item" :column="column">
49
- <template v-if="editTypes[column.Type]">
50
- <property-inline-edit :value="item[column.field]" :field="column" editable focused />
37
+ <template v-if="column.editable">
38
+ <slot :name="`edit.${column.type}`" :value="getValue(item, column)" :item="item" :column="column">
39
+ <div class="px-1 py-1 w-100"><itf-text-field :value="getValue(item, column)" /></div>
40
+ </slot>
41
+ </template>
42
+ <template v-else>
43
+ <slot :name="`format.${column.type}`" :value="getValue(item, column)" :item="item" :column="column">
44
+ <div class="px-2 w-100">{{getValue(item, column)}}</div>
45
+ </slot>
51
46
  </template>
52
- <div v-else v-text="item.Name" />
53
47
  </slot>
54
48
  </div>
55
49
  </template>
@@ -61,7 +55,7 @@
61
55
  </div>
62
56
  </div>
63
57
  </div>
64
- </recycle-scroller>
58
+ </div>
65
59
  </template>
66
60
  <style lang="scss">
67
61
  .table-row-template {
@@ -70,7 +64,6 @@
70
64
  align-items: stretch;
71
65
  }
72
66
  .table-item-inner {
73
- height: 100%;
74
67
  flex-grow: 1;
75
68
  position: relative;
76
69
  display: flex;
@@ -83,7 +76,6 @@
83
76
  border-right: 1px solid var(--bs-border-color);
84
77
  border-bottom: 1px solid var(--bs-border-color);
85
78
  align-items: stretch;
86
- height: 100%;
87
79
  display: flex;
88
80
  position: relative;
89
81
  line-height: var(--itf-table-line-height);
@@ -108,7 +100,7 @@
108
100
  }
109
101
  }
110
102
  &:hover {
111
- background-color: var(--itf-table-hover-bg);
103
+ background-color: var(--bs-tertiary-bg);
112
104
  }
113
105
 
114
106
  &.sticky {
@@ -119,20 +111,19 @@
119
111
  }
120
112
 
121
113
  .table-item-inner .extra {
122
- height: 100%;
123
114
  flex-grow: 1;
124
115
  border-color: var(--bs-border-color);
125
116
  }
126
117
 
127
118
  .indicator {
128
- height: 100%;
119
+ //height: 100%;
129
120
  left: var(--shadow-area-width);
130
121
  width: var(--indicator-area-width);
131
122
  z-index: 4;
132
123
  position: -webkit-sticky;
133
124
  position: sticky;
134
125
  background-color: var(--bs-body-bg);
135
- border-right: 1px solid var(--bs-border-color);
126
+ //border-right: 1px solid var(--bs-border-color);
136
127
  border-bottom: 1px solid var(--bs-border-color);
137
128
  display: flex;
138
129
  align-items: center;
@@ -140,6 +131,31 @@
140
131
  min-width: var(--itf-table-min-width);
141
132
  }
142
133
 
134
+ .table-row-template, .table-view-header-value {
135
+ .form-check {
136
+ padding: 0;
137
+ margin-bottom: 0;
138
+
139
+ .form-check-input {
140
+ margin-left: 0;
141
+ }
142
+ }
143
+ }
144
+ .table-row-template {
145
+ .on-hover {
146
+ display: none;
147
+ }
148
+ &:hover, .permanent-checkboxes & {
149
+ .on-rest {
150
+ display: none;
151
+ }
152
+
153
+ .on-hover {
154
+ display: block;
155
+ }
156
+ }
157
+ }
158
+
143
159
  .table-item-inner .boundary {
144
160
  z-index: 3;
145
161
  position: absolute;
@@ -172,7 +188,7 @@
172
188
  bottom: 0;
173
189
  }
174
190
  .table-small-row .table-view-item {
175
- height: var(--table-row-height);
191
+ // height: var(--table-row-height);
176
192
  }
177
193
  .resize-observer {
178
194
  position: absolute;
@@ -191,27 +207,33 @@
191
207
  </style>
192
208
  <script>
193
209
  import { Vue, Component, Prop } from 'vue-property-decorator';
210
+ import get from 'lodash/get';
194
211
  import { RecycleScroller } from 'vue-virtual-scroller'
195
- import sortBy from 'lodash/sortBy';
196
- import PropertyInlineEdit from '../customize/PropertyInlineEdit.vue';
212
+ import itfCheckbox from '../checkbox/Checkbox.vue';
213
+ import itfTextField from '../text-field/TextField.vue';
197
214
  import { INLINE_TYPES } from '../customize/constants';
198
215
  import 'vue-virtual-scroller/dist/vue-virtual-scroller.css';
199
216
 
200
217
  export default @Component({
201
218
  name: 'itfTableBody',
202
219
  components: {
203
- RecycleScroller,
204
- PropertyInlineEdit
220
+ itfCheckbox,
221
+ itfTextField,
222
+ RecycleScroller
205
223
  }
206
224
  })
207
225
  class itfTableBody extends Vue {
208
226
  @Prop() columns;
209
227
  @Prop() rows;
228
+ @Prop() idProperty;
210
229
  @Prop(Boolean) showAddColumn;
211
- @Prop({ type: Number, default: 40 }) rowHeight;
212
230
 
213
231
  editTypes = {};
214
232
 
233
+ getValue(item, column) {
234
+ return get(item, column.property);
235
+ }
236
+
215
237
  get visibleAttributes() {
216
238
  return this.columns;
217
239
  }