@itfin/components 1.3.38 → 1.3.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.
- package/package.json +4 -3
- package/src/ITFSettings.js +9 -0
- package/src/assets/scss/_dark-theme.scss +5 -0
- package/src/assets/scss/components/_text-field.scss +0 -2
- package/src/assets/scss/components/select/_dropdown-toggle.scss +2 -0
- package/src/assets/scss/main.scss +0 -1
- package/src/components/datepicker/DatePickerInline.vue +2 -0
- package/src/components/datepicker/MonthPicker.vue +19 -17
- package/src/components/form/index.stories.js +8 -3
- package/src/components/table/Table2.vue +2 -17
- package/src/components/table/TableBody.vue +11 -44
- package/src/components/table/TableGroup.vue +4 -2
- package/src/components/table/TableHeader.vue +3 -158
- package/src/components/table/index.stories.js +16 -4
- package/src/components/table/table2.scss +261 -0
- package/src/components/text-field/MoneyField.vue +12 -7
- package/src/components/text-field/TextField.vue +4 -4
- package/src/components/text-field/Textarea.vue +1 -1
- package/src/directives/visible.js +5 -7
- package/dist/ITFComponents.common.js +0 -133
- package/dist/ITFComponents.common.js.map +0 -1
- package/dist/ITFComponents.umd.js +0 -143
- package/dist/ITFComponents.umd.js.map +0 -1
- package/dist/ITFComponents.umd.min.js +0 -2
- package/dist/ITFComponents.umd.min.js.map +0 -1
- package/dist/demo.html +0 -10
- package/dist/tailwind.css +0 -937
- package/src/assets/scss/_fonts.scss +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itfin/components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.40",
|
|
4
4
|
"author": "Vitalii Savchuk <esvit666@gmail.com>",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"serve": "vue-cli-service serve",
|
|
@@ -37,14 +37,13 @@
|
|
|
37
37
|
"@mdi/js": "^7.2.96",
|
|
38
38
|
"@popperjs/core": "^2.11.8",
|
|
39
39
|
"@shopify/draggable": "^1.0.0-beta.8",
|
|
40
|
-
"@vue/cli-service": "^5.0.1",
|
|
41
40
|
"@vue/composition-api": "^1.7.1",
|
|
42
41
|
"@vue/web-component-wrapper": "^1.3.0",
|
|
43
42
|
"air-datepicker": "^3.3.5",
|
|
44
43
|
"bootstrap": "^5.3.x",
|
|
45
44
|
"bpmn-js": "^17.0.2",
|
|
45
|
+
"clipboard": "^2.0.11",
|
|
46
46
|
"core-js": "^3.7.0",
|
|
47
|
-
"debug": "^4.2.0",
|
|
48
47
|
"intersection-observer": "^0.12.2",
|
|
49
48
|
"lodash": "^4.17.20",
|
|
50
49
|
"luxon": "^3.3.0",
|
|
@@ -57,6 +56,7 @@
|
|
|
57
56
|
"vue-virtual-scroller": "^1.1.2"
|
|
58
57
|
},
|
|
59
58
|
"devDependencies": {
|
|
59
|
+
"@vue/cli-service": "^5.0.1",
|
|
60
60
|
"@babel/eslint-parser": "^7.19.1",
|
|
61
61
|
"@babel/plugin-proposal-numeric-separator": "^7.18.6",
|
|
62
62
|
"@babel/plugin-syntax-numeric-separator": "^7.10.4",
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
"eslint-plugin-vue": "^9.9.0",
|
|
77
77
|
"fibers": "^5.0.0",
|
|
78
78
|
"marked": "^4.2.5",
|
|
79
|
+
"postcss-cli": "^11.0.0",
|
|
79
80
|
"sass": "^1.29.0",
|
|
80
81
|
"sass-loader": "^10.0.5",
|
|
81
82
|
"vue": "^2.6.12",
|
package/src/ITFSettings.js
CHANGED
|
@@ -10,6 +10,7 @@ class ITFSettings {
|
|
|
10
10
|
defaultLocale: 'en_US',
|
|
11
11
|
defaultDisplayDateFormat: 'MM/dd/yyyy',
|
|
12
12
|
// defaultDisplayDateFormat: 'dd.MM.yyyy',
|
|
13
|
+
currencies: []
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
get defaultLocale() {
|
|
@@ -20,6 +21,14 @@ class ITFSettings {
|
|
|
20
21
|
this.options.defaultLocale = val;
|
|
21
22
|
}
|
|
22
23
|
|
|
24
|
+
get currencies() {
|
|
25
|
+
return this.options.currencies;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
set currencies(val) {
|
|
29
|
+
this.options.currencies = val;
|
|
30
|
+
}
|
|
31
|
+
|
|
23
32
|
get supportLanguages() {
|
|
24
33
|
return [
|
|
25
34
|
{ locale: 'en_US', name: 'English', dateFormat: 'MM/dd/yyyy' },
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
.itf-text-field {
|
|
4
4
|
&__input {
|
|
5
|
-
border-radius: $input-border-radius !important;
|
|
6
5
|
-moz-appearance: textfield; // Hide Arrows From Input Number (Firefox)
|
|
7
6
|
|
|
8
7
|
&::-webkit-outer-spin-button, // Hide Arrows From Input Number (Chrome, Safari, Edge, Opera)
|
|
@@ -27,7 +26,6 @@
|
|
|
27
26
|
z-index: 10;
|
|
28
27
|
}
|
|
29
28
|
&__input {
|
|
30
|
-
border-radius: $input-border-radius !important;
|
|
31
29
|
resize: none;
|
|
32
30
|
}
|
|
33
31
|
&__autogrow &__input {
|
|
@@ -39,6 +39,7 @@ class itfDatePickerInline extends Vue {
|
|
|
39
39
|
@Prop({ type: Boolean, default: false }) range;
|
|
40
40
|
@Prop({ type: Object, default: () => ({}) }) customDays;
|
|
41
41
|
@Prop({ type: [String, Date], default: '' }) minDate;
|
|
42
|
+
@Prop({ type: [String, Date], default: '' }) maxDate;
|
|
42
43
|
@Prop({
|
|
43
44
|
type: Array,
|
|
44
45
|
default: function () {
|
|
@@ -90,6 +91,7 @@ class itfDatePickerInline extends Vue {
|
|
|
90
91
|
view: (this.valueAsLuxon && !this.minView) ? 'days' : this.startView,
|
|
91
92
|
minView: this.minView,
|
|
92
93
|
minDate: this.minDate,
|
|
94
|
+
maxDate: this.maxDate,
|
|
93
95
|
selectedDates: this.valueAsLuxon ? [this.valueAsLuxon.toJSDate()] : [],
|
|
94
96
|
onSelect: ({ date }) => {
|
|
95
97
|
if (this.range && !this.calendar.rangeDateTo) {
|
|
@@ -6,28 +6,29 @@
|
|
|
6
6
|
</slot>
|
|
7
7
|
</div>
|
|
8
8
|
<input
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
ref="input"
|
|
10
|
+
readonly
|
|
11
|
+
:disabled="disabled"
|
|
12
|
+
class="form-control text-capitalize"
|
|
13
|
+
:class="{ 'is-invalid': isInvalid(), 'is-valid': isSuccess() }"
|
|
14
|
+
@focus="onFocus"
|
|
15
|
+
@blur="onBlur"
|
|
16
|
+
:value="displayValue"
|
|
17
|
+
:placeholder="placeholder"
|
|
18
18
|
/>
|
|
19
19
|
<div style="display: none">
|
|
20
20
|
<div ref="dropdown" class="itf-monthpicker__dropdown border rounded">
|
|
21
21
|
<div>
|
|
22
22
|
<itf-date-picker-inline
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
:value="value"
|
|
24
|
+
start-view="months"
|
|
25
|
+
min-view="months"
|
|
26
|
+
:min-date="minDate"
|
|
27
|
+
:max-date="maxDate"
|
|
28
|
+
only-calendar
|
|
29
|
+
:display-format="displayFormat"
|
|
30
|
+
:value-format="valueFormat"
|
|
31
|
+
@input="selectInlineDate"
|
|
31
32
|
/>
|
|
32
33
|
</div>
|
|
33
34
|
<slot name="after-calendar" />
|
|
@@ -57,6 +58,7 @@ class itfMonthPicker extends Vue {
|
|
|
57
58
|
@Prop({ type: Boolean }) disabled;
|
|
58
59
|
@Prop({ type: String, default: 'ISO' }) valueFormat;
|
|
59
60
|
@Prop({ type: [String, Date], default: '' }) minDate;
|
|
61
|
+
@Prop({ type: [String, Date], default: '' }) maxDate;
|
|
60
62
|
@Prop({ type: String, default: 'LLLL, yyyy' }) displayFormat;
|
|
61
63
|
@Prop({ type: String, default: '' }) placeholder;
|
|
62
64
|
@Prop({ type: String, default: '' }) prependIcon;
|
|
@@ -42,6 +42,8 @@ storiesOf('Common', module)
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
template: `<div>
|
|
45
|
+
<itf-app ref="app">
|
|
46
|
+
|
|
45
47
|
<p>You need wrap whole application with this tag</p>
|
|
46
48
|
|
|
47
49
|
<h2>Usage</h2>
|
|
@@ -57,8 +59,6 @@ storiesOf('Common', module)
|
|
|
57
59
|
|
|
58
60
|
<h2>Example</h2>
|
|
59
61
|
|
|
60
|
-
<itf-app ref="app">
|
|
61
|
-
|
|
62
62
|
<itf-form ref="form">
|
|
63
63
|
|
|
64
64
|
<itf-icon name="project_tnm" size="32" />
|
|
@@ -71,6 +71,7 @@ storiesOf('Common', module)
|
|
|
71
71
|
|
|
72
72
|
<itf-select
|
|
73
73
|
:options="['tnm', 'fixed', 'nonprofit']"
|
|
74
|
+
append-to-body
|
|
74
75
|
v-model="text">
|
|
75
76
|
|
|
76
77
|
<template #selected-option="{ option }">
|
|
@@ -96,7 +97,11 @@ storiesOf('Common', module)
|
|
|
96
97
|
<div class="col-12">
|
|
97
98
|
<itf-label :rules="[$v.emptyValidation()]" :value="text" label="Text field" required>
|
|
98
99
|
|
|
99
|
-
|
|
100
|
+
<itf-text-field v-model="text">
|
|
101
|
+
<template #addon>
|
|
102
|
+
<span class="input-group-text" id="basic-addon1">@</span>
|
|
103
|
+
</template>
|
|
104
|
+
</itf-text-field>
|
|
100
105
|
|
|
101
106
|
</itf-label>
|
|
102
107
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
|
|
3
|
-
<div class="scrollable scrollable-x
|
|
3
|
+
<div class="itf-table2 scrollable scrollable-x" :class="{'permanent-checkboxes': selectedIds.length}">
|
|
4
4
|
<itf-checkbox-group v-model="selectedIds">
|
|
5
5
|
<template v-for="(group, index) in groups">
|
|
6
6
|
<div class="table-view-body">
|
|
@@ -40,22 +40,6 @@
|
|
|
40
40
|
|
|
41
41
|
</template>
|
|
42
42
|
<style lang="scss">
|
|
43
|
-
.scrollable {
|
|
44
|
-
--itf-table-hover-bg: #f2f2f2;
|
|
45
|
-
--itf-table-min-width: 45px;
|
|
46
|
-
|
|
47
|
-
body[data-theme="dark"] & {
|
|
48
|
-
--itf-table-hover-bg: #393b41;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
-webkit-overflow-scrolling: touch;
|
|
52
|
-
overflow: hidden scroll;
|
|
53
|
-
|
|
54
|
-
&.scrollable-x {
|
|
55
|
-
overflow-x: scroll;
|
|
56
|
-
padding-right: 4px;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
43
|
.last-sticky-column:after {
|
|
60
44
|
content: '';
|
|
61
45
|
background: linear-gradient(to right,#dfe0e2,rgba(255,0,0,0));
|
|
@@ -77,6 +61,7 @@ import itfButton from '../button/Button.vue';
|
|
|
77
61
|
import itfIcon from '../icon/Icon.vue';
|
|
78
62
|
import itfTableGroup from './TableGroup.vue';
|
|
79
63
|
import itfTableHeader from './TableHeader.vue';
|
|
64
|
+
import './table2.scss';
|
|
80
65
|
|
|
81
66
|
export default @Component({
|
|
82
67
|
name: 'itfTable2',
|
|
@@ -4,7 +4,11 @@
|
|
|
4
4
|
<div
|
|
5
5
|
v-for="(item, n) in rows"
|
|
6
6
|
:key="n"
|
|
7
|
-
group="items"
|
|
7
|
+
group="items"
|
|
8
|
+
data-test="table-item"
|
|
9
|
+
class="table-view-item grouped draggable-item"
|
|
10
|
+
:class="{'selected': selectedIds.includes(item[idProperty])}"
|
|
11
|
+
>
|
|
8
12
|
<div class="table-row-template">
|
|
9
13
|
<div accept-group="items" class="table-view-body-space"></div>
|
|
10
14
|
<div class="shadow-area">
|
|
@@ -31,7 +35,7 @@
|
|
|
31
35
|
v-if="column.visible !== false"
|
|
32
36
|
:data-column="k"
|
|
33
37
|
:style="`width: ${column.width}px; max-width: ${column.width}px; left: ${column.left}px;`"
|
|
34
|
-
:class="{'sticky': column.pinned, 'last-sticky-column': k === lastPinnedIndex, 'flex-grow-1': column.grow, 'px-2': !column.editable, '
|
|
38
|
+
:class="{'sticky': column.pinned, 'last-sticky-column': k === lastPinnedIndex, 'flex-grow-1': column.grow, 'px-2': !column.editable, 'editable': column.editable}"
|
|
35
39
|
class="table-view-item-value d-flex h-100 align-items-stretch">
|
|
36
40
|
<slot :name="`column.${column.property}`" :item="item" :column="column">
|
|
37
41
|
<template v-if="column.editable">
|
|
@@ -45,7 +49,7 @@
|
|
|
45
49
|
@update:hours="updateValue(item, $event, n, column)"
|
|
46
50
|
/>
|
|
47
51
|
<itf-textarea class="w-100" :rows="2" autogrow v-else-if="column.type === 'textarea'" :value="getValue(item, column)" @input="updateValue(item, $event, n, column)" />
|
|
48
|
-
<itf-money-field class="w-100" v-else-if="column.type === 'money'"
|
|
52
|
+
<itf-money-field class="w-100" currency-select v-else-if="column.type === 'money'" :value="getValue(item, column)" @input="updateValue(item, $event, n, column)" />
|
|
49
53
|
</slot>
|
|
50
54
|
</template>
|
|
51
55
|
<template v-else>
|
|
@@ -92,45 +96,6 @@
|
|
|
92
96
|
flex-direction: row;
|
|
93
97
|
}
|
|
94
98
|
|
|
95
|
-
.table-view-item-value {
|
|
96
|
-
text-overflow: ellipsis;
|
|
97
|
-
background-color: var(--bs-body-bg);
|
|
98
|
-
border-right: 1px solid var(--bs-border-color);
|
|
99
|
-
border-bottom: 1px solid var(--bs-border-color);
|
|
100
|
-
align-items: stretch;
|
|
101
|
-
display: flex;
|
|
102
|
-
position: relative;
|
|
103
|
-
min-width: var(--itf-table-min-width);
|
|
104
|
-
|
|
105
|
-
&.highlight-drop-column {
|
|
106
|
-
position: relative;
|
|
107
|
-
|
|
108
|
-
&:after {
|
|
109
|
-
content: "";
|
|
110
|
-
height: 100%;
|
|
111
|
-
z-index: 100;
|
|
112
|
-
width: 2px;
|
|
113
|
-
background: #47beff;
|
|
114
|
-
margin-left: -1px;
|
|
115
|
-
position: absolute;
|
|
116
|
-
left: 0;
|
|
117
|
-
}
|
|
118
|
-
&.right:after {
|
|
119
|
-
left: auto;
|
|
120
|
-
right: 0;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
&:hover {
|
|
124
|
-
background-color: var(--bs-tertiary-bg);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
&.sticky {
|
|
128
|
-
z-index: 4;
|
|
129
|
-
position: -webkit-sticky;
|
|
130
|
-
position: sticky;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
99
|
.table-item-inner .extra {
|
|
135
100
|
flex-grow: 1;
|
|
136
101
|
border-color: var(--bs-border-color);
|
|
@@ -143,9 +108,9 @@
|
|
|
143
108
|
z-index: 4;
|
|
144
109
|
position: -webkit-sticky;
|
|
145
110
|
position: sticky;
|
|
146
|
-
background-color: var(--
|
|
111
|
+
background-color: var(--itf-table2-row-bg);
|
|
147
112
|
//border-right: 1px solid var(--bs-border-color);
|
|
148
|
-
border-bottom: 1px solid var(--bs-border-color);
|
|
113
|
+
//border-bottom: 1px solid var(--bs-border-color);
|
|
149
114
|
display: flex;
|
|
150
115
|
align-items: center;
|
|
151
116
|
justify-content: center;
|
|
@@ -201,6 +166,7 @@
|
|
|
201
166
|
|
|
202
167
|
.table-item-inner .boundary.right {
|
|
203
168
|
left: auto;
|
|
169
|
+
border-right: 1px solid var(--itf-table-border-color);
|
|
204
170
|
right: 0;
|
|
205
171
|
}
|
|
206
172
|
|
|
@@ -255,6 +221,7 @@ class itfTableBody extends Vue {
|
|
|
255
221
|
@Prop() idProperty;
|
|
256
222
|
@Prop(Boolean) showAddColumn;
|
|
257
223
|
@Prop(Boolean) noSelectAll;
|
|
224
|
+
@Prop() selectedIds;
|
|
258
225
|
|
|
259
226
|
getValue(item, column) {
|
|
260
227
|
return get(item, column.property);
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
:rows="rows"
|
|
60
60
|
:columns="visibleColumns"
|
|
61
61
|
:no-select-all="noSelectAll"
|
|
62
|
+
:selected-ids="selectedIds"
|
|
62
63
|
:show-add-column="showAddColumn">
|
|
63
64
|
<template v-for="(_, name) in $slots" #[name]="slotData">
|
|
64
65
|
<slot :name="name" v-bind="slotData || {}"/>
|
|
@@ -243,8 +244,9 @@
|
|
|
243
244
|
}
|
|
244
245
|
|
|
245
246
|
.table-add-new-item {
|
|
246
|
-
border-
|
|
247
|
-
border-
|
|
247
|
+
border-left: 1px solid var(--itf-table-border-color);
|
|
248
|
+
border-right: 1px solid var(--itf-table-border-color);
|
|
249
|
+
border-bottom: 1px solid var(--itf-table-border-color);
|
|
248
250
|
outline: none;
|
|
249
251
|
|
|
250
252
|
& > span {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
|
|
3
|
-
<div class="itf-
|
|
3
|
+
<div class="itf-table2__header" :class="{'no-header': !visibleHeader}">
|
|
4
4
|
<div ref="container" class="table-row-template">
|
|
5
5
|
<div accept-group="items" class="table-view-body-space" v-dropzone="{ payload: 0 }"></div>
|
|
6
6
|
<div class="shadow-area"></div>
|
|
@@ -36,8 +36,9 @@
|
|
|
36
36
|
<span :title="column.title[locale] || column.title['en_US']">
|
|
37
37
|
<span v-if="column.icon" :class="column.icon"></span>
|
|
38
38
|
{{column.title[locale] || column.title['en_US']}}
|
|
39
|
+
<div class="itf-table2__subtitle">kr</div>
|
|
39
40
|
</span>
|
|
40
|
-
|
|
41
|
+
<itf-icon name="arrow_up" :size="16" class="ms-1" />
|
|
41
42
|
</template>
|
|
42
43
|
|
|
43
44
|
<div v-if="column.sortable">
|
|
@@ -127,162 +128,6 @@
|
|
|
127
128
|
</div>
|
|
128
129
|
|
|
129
130
|
</template>
|
|
130
|
-
<style lang="scss">
|
|
131
|
-
.itf-table-header {
|
|
132
|
-
position: sticky;
|
|
133
|
-
top: 0;
|
|
134
|
-
z-index: calc(var(--row-count) + 1);
|
|
135
|
-
|
|
136
|
-
&.no-header {
|
|
137
|
-
--table-row-height: 0px;
|
|
138
|
-
--table-small-row-size: 0px;
|
|
139
|
-
|
|
140
|
-
.table-view-header-value {
|
|
141
|
-
border-top: 0 none;
|
|
142
|
-
border-bottom: 0 none;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
.table-header.draggable-mirror{
|
|
146
|
-
z-index: 100000001;
|
|
147
|
-
background: rgba(235,237,239,0.75);
|
|
148
|
-
}
|
|
149
|
-
.table-row-template {
|
|
150
|
-
display: flex;
|
|
151
|
-
align-items: stretch;
|
|
152
|
-
height: var(--table-small-row-size);
|
|
153
|
-
user-select: none;
|
|
154
|
-
}
|
|
155
|
-
.table-view-header-value {
|
|
156
|
-
cursor: pointer;
|
|
157
|
-
align-items: center;
|
|
158
|
-
justify-content: center;
|
|
159
|
-
height: var(--table-row-height);
|
|
160
|
-
white-space: nowrap;
|
|
161
|
-
//border-top: 0;
|
|
162
|
-
border-top: 1px solid transparent;
|
|
163
|
-
border-left: 0;
|
|
164
|
-
border-right-width: thin;
|
|
165
|
-
border-bottom-width: thin;
|
|
166
|
-
border-style: solid;
|
|
167
|
-
position: relative;
|
|
168
|
-
display: flex;
|
|
169
|
-
min-width: var(--itf-table-min-width);
|
|
170
|
-
border-right-color: transparent;
|
|
171
|
-
border-bottom-color: var(--bs-border-color);
|
|
172
|
-
background-color: var(--bs-body-bg);
|
|
173
|
-
//background-color: rgb(238 238 238 / 1);
|
|
174
|
-
font-weight: 500;
|
|
175
|
-
|
|
176
|
-
&.last-sticky-column {
|
|
177
|
-
border-right-color: var(--bs-border-color);
|
|
178
|
-
}
|
|
179
|
-
&.reserved {
|
|
180
|
-
left: var(--shadow-area-width);
|
|
181
|
-
width: var(--indicator-area-width);
|
|
182
|
-
}
|
|
183
|
-
&.sticky {
|
|
184
|
-
position: sticky;
|
|
185
|
-
position: -webkit-sticky;
|
|
186
|
-
z-index: calc(var(--row-count) + 4);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
.table-header {
|
|
190
|
-
flex: 0 0 auto;
|
|
191
|
-
overflow: hidden;
|
|
192
|
-
width: 100%;
|
|
193
|
-
text-overflow: ellipsis;
|
|
194
|
-
padding-left: 0.75rem;
|
|
195
|
-
padding-right: 0.75rem;
|
|
196
|
-
gap: 0.25rem;
|
|
197
|
-
align-items: center;
|
|
198
|
-
& > div {
|
|
199
|
-
min-height: var(--table-row-height);
|
|
200
|
-
align-items: center;
|
|
201
|
-
justify-content: space-between;
|
|
202
|
-
display: flex;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
&.table-header-add-column {
|
|
206
|
-
text-overflow: clip;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
.resize-handle {
|
|
210
|
-
width: 4px;
|
|
211
|
-
height: var(--table-row-height);
|
|
212
|
-
position: absolute;
|
|
213
|
-
right: -2px;
|
|
214
|
-
top: 0;
|
|
215
|
-
background: #29ACE1;
|
|
216
|
-
border-radius: 2px;
|
|
217
|
-
z-index: 100;
|
|
218
|
-
opacity: 0;
|
|
219
|
-
cursor: ew-resize;
|
|
220
|
-
transition: .2s;
|
|
221
|
-
|
|
222
|
-
&:hover {
|
|
223
|
-
opacity: 1;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
.context-menu-toggle {
|
|
227
|
-
flex: 1 1 auto;
|
|
228
|
-
text-overflow: ellipsis;
|
|
229
|
-
white-space: nowrap;
|
|
230
|
-
overflow: hidden;
|
|
231
|
-
|
|
232
|
-
span {
|
|
233
|
-
font-size: 12px;
|
|
234
|
-
line-height: 36px;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
.itf-sortable-list {
|
|
238
|
-
display: flex;
|
|
239
|
-
}
|
|
240
|
-
.table-view-header-space {
|
|
241
|
-
height: 100%;
|
|
242
|
-
position: absolute;
|
|
243
|
-
left: 0;
|
|
244
|
-
display: none;
|
|
245
|
-
background: transparent;
|
|
246
|
-
z-index: 100;
|
|
247
|
-
width: 2px;
|
|
248
|
-
margin-left: -1px;
|
|
249
|
-
|
|
250
|
-
&.right {
|
|
251
|
-
left: auto;
|
|
252
|
-
right: 0;
|
|
253
|
-
top: 0;
|
|
254
|
-
}
|
|
255
|
-
&.active {
|
|
256
|
-
display: block;
|
|
257
|
-
&.over {
|
|
258
|
-
background: #47BEFF;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
.draggable-mirror {
|
|
263
|
-
opacity: .5;
|
|
264
|
-
}
|
|
265
|
-
.draggable-container--over .table-view-header-space {
|
|
266
|
-
display: block;
|
|
267
|
-
}
|
|
268
|
-
.draggable-container--over .draggable--over .table-view-header-space {
|
|
269
|
-
background: #47BEFF;
|
|
270
|
-
}
|
|
271
|
-
.table-view-header-space > .table-view-header-dropzone {
|
|
272
|
-
position: absolute;
|
|
273
|
-
top: 0;
|
|
274
|
-
right: -50px;
|
|
275
|
-
bottom: 0;
|
|
276
|
-
left: -50px;
|
|
277
|
-
}
|
|
278
|
-
.table-view-header-value:not(.reserved):hover {
|
|
279
|
-
background-color: var(--bs-tertiary-bg);
|
|
280
|
-
}
|
|
281
|
-
.draggable-source--is-dragging {
|
|
282
|
-
z-index: 100;
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
</style>
|
|
286
131
|
<script>
|
|
287
132
|
import {Vue, Component, Prop, PropSync, Watch, Inject} from 'vue-property-decorator';
|
|
288
133
|
import itfCheckbox from '../checkbox/Checkbox.vue';
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { storiesOf } from '@storybook/vue';
|
|
2
|
+
import ITFSettings from '../../ITFSettings';
|
|
2
3
|
import itfApp from '../app/App.vue';
|
|
3
4
|
import itfButton from '../button/Button.vue';
|
|
4
5
|
import itfTable from './Table.vue';
|
|
5
6
|
import itfTable2 from './Table2.vue';
|
|
7
|
+
import itfSelect from '../select/Select.vue';
|
|
6
8
|
|
|
7
9
|
const exampleData = [{
|
|
8
10
|
Employee: 'Cool',
|
|
@@ -72,12 +74,17 @@ const exampleData = [{
|
|
|
72
74
|
Notes: 'Test'
|
|
73
75
|
}];
|
|
74
76
|
|
|
77
|
+
ITFSettings.currencies = [
|
|
78
|
+
{ Id: '1', Code: 'USD', Title: 'USD', IsDefault: true, Symbol: '$' }
|
|
79
|
+
];
|
|
80
|
+
|
|
75
81
|
storiesOf('Common', module)
|
|
76
82
|
.add('Simple Table', () => ({
|
|
77
83
|
components: {
|
|
78
84
|
itfTable,
|
|
79
85
|
itfButton,
|
|
80
|
-
itfTable2
|
|
86
|
+
itfTable2,
|
|
87
|
+
itfSelect
|
|
81
88
|
},
|
|
82
89
|
data() {
|
|
83
90
|
return {
|
|
@@ -111,7 +118,7 @@ storiesOf('Common', module)
|
|
|
111
118
|
Id: 1,
|
|
112
119
|
summary: true,
|
|
113
120
|
Description: 'Total',
|
|
114
|
-
EmployeeId:
|
|
121
|
+
EmployeeId: 1,
|
|
115
122
|
Total: 100,
|
|
116
123
|
FTE: 1.0,
|
|
117
124
|
Position: { Title: 'Developer', Id: 1 },
|
|
@@ -131,7 +138,7 @@ storiesOf('Common', module)
|
|
|
131
138
|
{
|
|
132
139
|
"property": "Description",
|
|
133
140
|
"title": { "en_US": "Description", "uk_UA": "Прізвище" },
|
|
134
|
-
"type": "
|
|
141
|
+
"type": "text",
|
|
135
142
|
"editable": true,
|
|
136
143
|
"sortable": false,
|
|
137
144
|
width: 200,
|
|
@@ -331,7 +338,12 @@ storiesOf('Common', module)
|
|
|
331
338
|
{{item.EmployeeId}}
|
|
332
339
|
</template>
|
|
333
340
|
<template #edit.employee="{ item }">
|
|
334
|
-
|
|
341
|
+
<itf-select
|
|
342
|
+
class="w-100"
|
|
343
|
+
v-model="item.EmployeeId"
|
|
344
|
+
:reduce="item => item.Id"
|
|
345
|
+
:get-option-label="item => item.Name"
|
|
346
|
+
:options="[{ Id: 1, Name: 'Vitalii Savchuk' }]" />
|
|
335
347
|
</template>
|
|
336
348
|
</itf-table2>
|
|
337
349
|
|