@itfin/components 1.3.95 → 2.0.1

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.
Files changed (109) hide show
  1. package/package.json +1 -1
  2. package/src/assets/scss/_css_variables.scss +2 -2
  3. package/src/assets/scss/_variables.scss +18 -7
  4. package/src/assets/scss/components/_button.scss +10 -0
  5. package/src/assets/scss/components/_pagination.scss +4 -1
  6. package/src/assets/scss/components/_select.scss +1 -3
  7. package/src/assets/scss/components/_text-field.scss +17 -7
  8. package/src/assets/scss/main.scss +36 -2
  9. package/src/components/app/message.js +1 -1
  10. package/src/components/button/Button.vue +4 -2
  11. package/src/components/filter/FilterAmountRange.vue +50 -42
  12. package/src/components/filter/FilterBadge.vue +25 -22
  13. package/src/components/filter/FilterFacetsList.vue +1 -1
  14. package/src/components/filter/FilterPanel.vue +82 -27
  15. package/src/components/filter/index.stories.js +0 -2
  16. package/src/components/icon/Icon.vue +3 -1
  17. package/src/components/icon/components/fi_fingerprint.vue +4 -0
  18. package/src/components/icon/components/nomi-arrow-down.vue +4 -0
  19. package/src/components/icon/components/nomi-arrow-right-top.vue +4 -0
  20. package/src/components/icon/components/nomi-arrow-up.vue +4 -0
  21. package/src/components/icon/components/nomi-arrows.vue +7 -0
  22. package/src/components/icon/components/nomi-calendar-alt.vue +4 -0
  23. package/src/components/icon/components/nomi-calendar.vue +11 -0
  24. package/src/components/icon/components/nomi-card.vue +4 -0
  25. package/src/components/icon/components/nomi-close.vue +5 -0
  26. package/src/components/icon/components/nomi-eye-close.vue +4 -0
  27. package/src/components/icon/components/nomi-eye-open.vue +4 -0
  28. package/src/components/icon/components/nomi-filter.vue +4 -0
  29. package/src/components/icon/components/nomi-hide.vue +4 -0
  30. package/src/components/icon/components/nomi-money.vue +4 -0
  31. package/src/components/icon/components/nomi-move-left.vue +4 -0
  32. package/src/components/icon/components/nomi-move-right.vue +4 -0
  33. package/src/components/icon/components/nomi-person.vue +5 -0
  34. package/src/components/icon/components/nomi-pin.vue +7 -0
  35. package/src/components/icon/components/nomi-sort-asc.vue +7 -0
  36. package/src/components/icon/components/nomi-sort-desc.vue +7 -0
  37. package/src/components/icon/components/nomi-table-view.vue +4 -0
  38. package/src/components/icon/components/nomi-tag.vue +4 -0
  39. package/src/components/icon/components/nomi-target.vue +4 -0
  40. package/src/components/icon/components/nomi-text.vue +6 -0
  41. package/src/components/icon/components/nomi-unpin.vue +7 -0
  42. package/src/components/icon/convert-icons.js +11 -0
  43. package/src/components/icon/icons.js +302 -277
  44. package/src/components/icon/new-icons/arrow-down.svg +3 -0
  45. package/src/components/icon/new-icons/arrow-right-top.svg +3 -0
  46. package/src/components/icon/new-icons/arrow-up.svg +3 -0
  47. package/src/components/icon/new-icons/arrows.svg +6 -0
  48. package/src/components/icon/new-icons/calendar-alt.svg +3 -0
  49. package/src/components/icon/new-icons/calendar.svg +10 -0
  50. package/src/components/icon/new-icons/card.svg +3 -0
  51. package/src/components/icon/new-icons/clear.svg +3 -0
  52. package/src/components/icon/new-icons/close.svg +4 -0
  53. package/src/components/icon/new-icons/eye-close.svg +3 -0
  54. package/src/components/icon/new-icons/eye-open.svg +3 -0
  55. package/src/components/icon/new-icons/filter.svg +3 -0
  56. package/src/components/icon/new-icons/hide.svg +3 -0
  57. package/src/components/icon/new-icons/money.svg +3 -0
  58. package/src/components/icon/new-icons/move-left.svg +3 -0
  59. package/src/components/icon/new-icons/move-right.svg +3 -0
  60. package/src/components/icon/new-icons/person.svg +4 -0
  61. package/src/components/icon/new-icons/pin.svg +6 -0
  62. package/src/components/icon/new-icons/sort-asc.svg +6 -0
  63. package/src/components/icon/new-icons/sort-desc.svg +6 -0
  64. package/src/components/icon/new-icons/table-view.svg +3 -0
  65. package/src/components/icon/new-icons/tag.svg +3 -0
  66. package/src/components/icon/new-icons/target.svg +3 -0
  67. package/src/components/icon/new-icons/text.svg +5 -0
  68. package/src/components/icon/new-icons/unpin.svg +6 -0
  69. package/src/components/pagination/Pagination.vue +3 -2
  70. package/src/components/pagination/Pagination2.vue +176 -0
  71. package/src/components/panels/Panel.vue +5 -1
  72. package/src/components/panels/PanelItemEdit.vue +61 -0
  73. package/src/components/panels/PanelList.vue +2 -0
  74. package/src/components/select/Select.vue +1 -1
  75. package/src/components/sortable/draggable.js +2 -1
  76. package/src/components/table/Table2.vue +24 -1
  77. package/src/components/table/TableBody.vue +7 -2
  78. package/src/components/table/TableGroup.vue +8 -4
  79. package/src/components/table/TableHeader.vue +101 -24
  80. package/src/components/table/TableRows.vue +5 -3
  81. package/src/components/table/index.stories.js +22 -200
  82. package/src/components/table/table2.scss +179 -52
  83. package/src/components/text-field/MoneyField.vue +2 -2
  84. package/src/components/text-field/TextField.vue +12 -8
  85. package/src/components/tree/TreeEditor.vue +602 -0
  86. package/src/components/view/View.vue +119 -0
  87. package/src/components/view/index.stories.js +588 -0
  88. package/src/helpers/formatters.js +14 -1
  89. package/src/helpers/tree/cdbl.js +32 -0
  90. package/src/helpers/tree/cint.js +43 -0
  91. package/src/helpers/tree/domDrag.js +911 -0
  92. package/src/helpers/tree/domFinds.js +20 -0
  93. package/src/helpers/tree/domGetPointFromEvent.js +53 -0
  94. package/src/helpers/tree/domIsClientXYIn.js +65 -0
  95. package/src/helpers/tree/domRemove.js +50 -0
  96. package/src/helpers/tree/evem.js +27 -0
  97. package/src/helpers/tree/genID.js +56 -0
  98. package/src/helpers/tree/isEle.js +28 -0
  99. package/src/helpers/tree/isestr.js +35 -0
  100. package/src/helpers/tree/isint.js +40 -0
  101. package/src/helpers/tree/isnbr.js +24 -0
  102. package/src/helpers/tree/isnum.js +38 -0
  103. package/src/helpers/tree/ispint.js +41 -0
  104. package/src/helpers/tree/isstr.js +27 -0
  105. package/src/helpers/tree.js +30 -0
  106. package/src/helpers/vuetifyColor.js +136 -0
  107. package/src/locales/en.js +13 -0
  108. package/src/locales/uk.js +11 -0
  109. package/src/components/table/TableRow.vue +0 -221
@@ -0,0 +1,119 @@
1
+ <template>
2
+
3
+ <div v-loading="loading" class="flex-grow-1 w-100 d-flex flex-column">
4
+ {{filter}}
5
+ <itf-filter-panel
6
+ search-placeholder="Search by text"
7
+ search
8
+ class="py-2 px-3"
9
+ :static-filters="filters"
10
+ v-model="filter"
11
+ @input="$emit('load')"
12
+ >
13
+ <template #after-filter-btn>
14
+ <itf-dropdown v-if="$refs.table" shadow :button-options="{ default: true, icon: true }" autoclose="outside">
15
+ <template #button>
16
+ <itf-icon new name="table-view" />
17
+ </template>
18
+ <div class="dropdown-header">
19
+ {{ $t('components.table.columns') }}
20
+ </div>
21
+ <a v-for="(property, n) of schema.properties" :key="n" href="" @click.stop.prevent="$refs.table.toggleVisibility(property.property)" class="dropdown-item justify-content-between d-flex gap-3">
22
+ <div class="d-flex align-items-center gap-1">
23
+ <itf-icon v-if="property.icon" :size="24" new :name="property.icon" />
24
+ {{property.title.en_US}}
25
+ </div>
26
+
27
+ <itf-icon v-if="$refs.table.getColumnVisibility(property.property)" new :size="24" name="eye-open" />
28
+ <itf-icon v-else new name="eye-close" />
29
+ </a>
30
+ <div class="dropdown-header">
31
+ {{ $t('components.table.actions') }}
32
+ </div>
33
+ <a href="" @click.stop.prevent="$refs.table.resetSettings()" class="dropdown-item justify-content-between d-flex gap-3">
34
+ <div class="d-flex align-items-center gap-1">
35
+ <itf-icon new :size="24" name="download" />
36
+ {{ $t('components.table.resetTableSettings') }}
37
+ </div>
38
+ </a>
39
+ </itf-dropdown>
40
+ </template>
41
+ </itf-filter-panel>
42
+
43
+ <div class="flex-grow-1 px-3 d-flex flex-column">
44
+ <div class="position-relative flex-grow-1">
45
+ <itf-table
46
+ ref="table"
47
+ style="--shadow-area-width: 0px;"
48
+ absolute
49
+ striped
50
+ column-sorting
51
+ column-resizing
52
+ :rows="items"
53
+ :schema="schema"
54
+ >
55
+ <template v-for="(_, name) in $slots" #[name]="slotData">
56
+ <slot :name="name" v-bind="slotData || {}"/>
57
+ </template>
58
+ <template v-for="(_, name) in $scopedSlots" #[name]="slotData">
59
+ <slot :name="name" v-bind="slotData || {}"/>
60
+ </template>
61
+ </itf-table>
62
+ </div>
63
+ </div>
64
+
65
+ <itf-pagination
66
+ class="my-2 px-3"
67
+ show-size
68
+ :size="size"
69
+ :items="items"
70
+ :pages="countPages"
71
+ :value="page"
72
+ @input="$emit('update:page', $event)"
73
+ >
74
+ <template #center>
75
+ <slot name="pagination-center" />
76
+ </template>
77
+ </itf-pagination>
78
+ </div>
79
+
80
+ </template>
81
+ <script>
82
+ import { Vue, Component, Prop } from 'vue-property-decorator';
83
+ import loading from '../../directives/loading';
84
+ import itfTable from '../table/Table2.vue';
85
+ import itfFilterPanel from '../filter/FilterPanel.vue';
86
+ import itfPagination from '../pagination/Pagination2.vue';
87
+ import itfTableBody from "@/components/table/TableBody.vue";
88
+ import itfIcon from "@/components/icon/Icon.vue";
89
+ import itfDropdown from "@/components/dropdown/Dropdown.vue";
90
+
91
+ export default @Component({
92
+ name: 'itfView',
93
+ components: {
94
+ itfDropdown, itfIcon,
95
+ itfPagination,
96
+ itfFilterPanel,
97
+ itfTableBody,
98
+ itfTable
99
+ },
100
+ directives: {
101
+ loading
102
+ }
103
+ })
104
+ class itfView extends Vue {
105
+ @Prop({ type: Boolean }) loading;
106
+ @Prop({ type: Array, required: true }) items;
107
+ @Prop({ type: Array }) filters;
108
+ @Prop({ type: Object, required: true }) schema;
109
+ @Prop({ default: 20 }) size;
110
+ @Prop({ default: 100 }) total;
111
+ @Prop({ default: 1 }) page;
112
+
113
+ filter = {};
114
+
115
+ get countPages() {
116
+ return Math.ceil(this.total / this.size);
117
+ }
118
+ }
119
+ </script>
@@ -0,0 +1,588 @@
1
+ import { storiesOf } from '@storybook/vue';
2
+ import itfApp from '../app/App.vue';
3
+ import itfView from './View.vue';
4
+ import itfIcon from '../icon/Icon.vue';
5
+
6
+ storiesOf('Common', module)
7
+ .add('View', () => ({
8
+ components: {
9
+ itfApp,
10
+ itfIcon,
11
+ itfView
12
+ },
13
+ data() {
14
+ return {
15
+ selectedIds: [],
16
+ sorting: 'Description',
17
+ list: Array.from({length: 20}).map((_, i) => ({
18
+ Id: i,
19
+ text: `Рахунок ✅`,
20
+ Name: `Item #${i}`
21
+ })).concat(Array.from({length: 20}).map((_, i) => ({
22
+ Id: i,
23
+ text: `Рахунок ❌`,
24
+ Name: `Item #${i}`
25
+ }))),
26
+ columns2: [
27
+ {
28
+ text: 'Рахунок',
29
+ name: 'Account',
30
+ width: 200,
31
+ min: 250,
32
+ max: 250
33
+ },
34
+ {
35
+ text: 'Рахунок',
36
+ name: 'Account',
37
+ width: 200,
38
+ min: 250,
39
+ max: 250
40
+ }
41
+ ],
42
+ page: 1,
43
+ list2: [
44
+ {
45
+ Id: 1,
46
+ summary: true,
47
+ Description: 'Total asd asd dad ad ada dadad a',
48
+ EmployeeId: 1,
49
+ Total: 100,
50
+ FTE: 1.0,
51
+ Position: { Title: 'Developer', Id: 1 },
52
+ MinutesInternal: '10h 20m',
53
+ MinutesExternal: '10h 20m',
54
+ AmountInternal: 1000,
55
+ AmountExternal: 2000,
56
+ AmountShare: 200,
57
+ Notes: 'Test',
58
+ Rate: '10',
59
+ Time: '10h 00m',
60
+ Amount: 2000
61
+ },
62
+ {
63
+ Id: 2,
64
+ summary: true,
65
+ Description: 'Total asd asd dad ad ada dadad a',
66
+ EmployeeId: 1,
67
+ Total: 100,
68
+ FTE: 1.0,
69
+ Position: { Title: 'Developer', Id: 1 },
70
+ MinutesInternal: '10h 20m',
71
+ MinutesExternal: '10h 20m',
72
+ AmountInternal: 1000,
73
+ AmountExternal: 2000,
74
+ AmountShare: 200,
75
+ Notes: 'Test',
76
+ Rate: '10',
77
+ Time: '10h 00m',
78
+ Amount: 2000
79
+ },
80
+ {
81
+ Id: 2,
82
+ summary: true,
83
+ Description: 'Total asd asd dad ad ada dadad a',
84
+ EmployeeId: 1,
85
+ Total: 100,
86
+ FTE: 1.0,
87
+ Position: { Title: 'Developer', Id: 1 },
88
+ MinutesInternal: '10h 20m',
89
+ MinutesExternal: '10h 20m',
90
+ AmountInternal: 1000,
91
+ AmountExternal: 2000,
92
+ AmountShare: 200,
93
+ Notes: 'Test',
94
+ Rate: '10',
95
+ Time: '10h 00m',
96
+ Amount: 2000
97
+ },
98
+ {
99
+ Id: 2,
100
+ summary: true,
101
+ Description: 'Total asd asd dad ad ada dadad a',
102
+ EmployeeId: 1,
103
+ Total: 100,
104
+ FTE: 1.0,
105
+ Position: { Title: 'Developer', Id: 1 },
106
+ MinutesInternal: '10h 20m',
107
+ MinutesExternal: '10h 20m',
108
+ AmountInternal: 1000,
109
+ AmountExternal: 2000,
110
+ AmountShare: 200,
111
+ Notes: 'Test',
112
+ Rate: '10',
113
+ Time: '10h 00m',
114
+ Amount: 2000
115
+ },
116
+ {
117
+ Id: 2,
118
+ summary: true,
119
+ Description: 'Total asd asd dad ad ada dadad a',
120
+ EmployeeId: 1,
121
+ Total: 100,
122
+ FTE: 1.0,
123
+ Position: { Title: 'Developer', Id: 1 },
124
+ MinutesInternal: '10h 20m',
125
+ MinutesExternal: '10h 20m',
126
+ AmountInternal: 1000,
127
+ AmountExternal: 2000,
128
+ AmountShare: 200,
129
+ Notes: 'Test',
130
+ Rate: '10',
131
+ Time: '10h 00m',
132
+ Amount: 2000
133
+ },
134
+ {
135
+ Id: 2,
136
+ summary: true,
137
+ Description: 'Total asd asd dad ad ada dadad a',
138
+ EmployeeId: 1,
139
+ Total: 100,
140
+ FTE: 1.0,
141
+ Position: { Title: 'Developer', Id: 1 },
142
+ MinutesInternal: '10h 20m',
143
+ MinutesExternal: '10h 20m',
144
+ AmountInternal: 1000,
145
+ AmountExternal: 2000,
146
+ AmountShare: 200,
147
+ Notes: 'Test',
148
+ Rate: '10',
149
+ Time: '10h 00m',
150
+ Amount: 2000
151
+ },
152
+ {
153
+ Id: 2,
154
+ summary: true,
155
+ Description: 'Total asd asd dad ad ada dadad a',
156
+ EmployeeId: 1,
157
+ Total: 100,
158
+ FTE: 1.0,
159
+ Position: { Title: 'Developer', Id: 1 },
160
+ MinutesInternal: '10h 20m',
161
+ MinutesExternal: '10h 20m',
162
+ AmountInternal: 1000,
163
+ AmountExternal: 2000,
164
+ AmountShare: 200,
165
+ Notes: 'Test',
166
+ Rate: '10',
167
+ Time: '10h 00m',
168
+ Amount: 2000
169
+ },
170
+ {
171
+ Id: 2,
172
+ summary: true,
173
+ Description: 'Total asd asd dad ad ada dadad a',
174
+ EmployeeId: 1,
175
+ Total: 100,
176
+ FTE: 1.0,
177
+ Position: { Title: 'Developer', Id: 1 },
178
+ MinutesInternal: '10h 20m',
179
+ MinutesExternal: '10h 20m',
180
+ AmountInternal: 1000,
181
+ AmountExternal: 2000,
182
+ AmountShare: 200,
183
+ Notes: 'Test',
184
+ Rate: '10',
185
+ Time: '10h 00m',
186
+ Amount: 2000
187
+ },
188
+ {
189
+ Id: 2,
190
+ summary: true,
191
+ Description: 'Total asd asd dad ad ada dadad a',
192
+ EmployeeId: 1,
193
+ Total: 100,
194
+ FTE: 1.0,
195
+ Position: { Title: 'Developer', Id: 1 },
196
+ MinutesInternal: '10h 20m',
197
+ MinutesExternal: '10h 20m',
198
+ AmountInternal: 1000,
199
+ AmountExternal: 2000,
200
+ AmountShare: 200,
201
+ Notes: 'Test',
202
+ Rate: '10',
203
+ Time: '10h 00m',
204
+ Amount: 2000
205
+ },
206
+ {
207
+ Id: 2,
208
+ summary: true,
209
+ Description: 'Total asd asd dad ad ada dadad a',
210
+ EmployeeId: 1,
211
+ Total: 100,
212
+ FTE: 1.0,
213
+ Position: { Title: 'Developer', Id: 1 },
214
+ MinutesInternal: '10h 20m',
215
+ MinutesExternal: '10h 20m',
216
+ AmountInternal: 1000,
217
+ AmountExternal: 2000,
218
+ AmountShare: 200,
219
+ Notes: 'Test',
220
+ Rate: '10',
221
+ Time: '10h 00m',
222
+ Amount: 2000
223
+ },
224
+ {
225
+ Id: 2,
226
+ summary: true,
227
+ Description: 'Total asd asd dad ad ada dadad a',
228
+ EmployeeId: 1,
229
+ Total: 100,
230
+ FTE: 1.0,
231
+ Position: { Title: 'Developer', Id: 1 },
232
+ MinutesInternal: '10h 20m',
233
+ MinutesExternal: '10h 20m',
234
+ AmountInternal: 1000,
235
+ AmountExternal: 2000,
236
+ AmountShare: 200,
237
+ Notes: 'Test',
238
+ Rate: '10',
239
+ Time: '10h 00m',
240
+ Amount: 2000
241
+ },
242
+ {
243
+ Id: 2,
244
+ summary: true,
245
+ Description: 'Total asd asd dad ad ada dadad a',
246
+ EmployeeId: 1,
247
+ Total: 100,
248
+ FTE: 1.0,
249
+ Position: { Title: 'Developer', Id: 1 },
250
+ MinutesInternal: '10h 20m',
251
+ MinutesExternal: '10h 20m',
252
+ AmountInternal: 1000,
253
+ AmountExternal: 2000,
254
+ AmountShare: 200,
255
+ Notes: 'Test',
256
+ Rate: '10',
257
+ Time: '10h 00m',
258
+ Amount: 2000
259
+ },
260
+ {
261
+ Id: 2,
262
+ summary: true,
263
+ Description: 'Total asd asd dad ad ada dadad a',
264
+ EmployeeId: 1,
265
+ Total: 100,
266
+ FTE: 1.0,
267
+ Position: { Title: 'Developer', Id: 1 },
268
+ MinutesInternal: '10h 20m',
269
+ MinutesExternal: '10h 20m',
270
+ AmountInternal: 1000,
271
+ AmountExternal: 2000,
272
+ AmountShare: 200,
273
+ Notes: 'Test',
274
+ Rate: '10',
275
+ Time: '10h 00m',
276
+ Amount: 2000
277
+ },
278
+ {
279
+ Id: 2,
280
+ summary: true,
281
+ Description: 'Total asd asd dad ad ada dadad a',
282
+ EmployeeId: 1,
283
+ Total: 100,
284
+ FTE: 1.0,
285
+ Position: { Title: 'Developer', Id: 1 },
286
+ MinutesInternal: '10h 20m',
287
+ MinutesExternal: '10h 20m',
288
+ AmountInternal: 1000,
289
+ AmountExternal: 2000,
290
+ AmountShare: 200,
291
+ Notes: 'Test',
292
+ Rate: '10',
293
+ Time: '10h 00m',
294
+ Amount: 2000
295
+ }
296
+ ],
297
+ schema: {
298
+ "properties": [
299
+ {
300
+ "property": "Description",
301
+ "title": { "en_US": "Description", "uk_UA": "Прізвище" },
302
+ "type": "text",
303
+ "editable": true,
304
+ "sortable": true,
305
+ "filtrable": true,
306
+ icon: 'money',
307
+ width: 200,
308
+ minWidth: 100,
309
+ maxWidth: 300
310
+ },
311
+ {
312
+ "property": "EmployeeId",
313
+ "title": { "en_US": "Employee full name", "uk_UA": "Імʼя" },
314
+ prefix: 'USD',
315
+ "type": "employee",
316
+ "copy": true,
317
+ "editable": true,
318
+ "sortable": false,
319
+ icon: 'card',
320
+ width: 200,
321
+ minWidth: 100,
322
+ maxWidth: 300
323
+ },
324
+ {
325
+ "property": "Rate",
326
+ "title": { "en_US": "Rate", "uk_UA": "Прізвище" },
327
+ "type": "money",
328
+ "editable": true,
329
+ "sortable": false,
330
+ icon: 'calendar',
331
+ width: 200,
332
+ minWidth: 100,
333
+ maxWidth: 300
334
+ },
335
+ {
336
+ "property": "Time",
337
+ "title": { "en_US": "Time", "uk_UA": "Прізвище" },
338
+ "type": "time",
339
+ "editable": true,
340
+ "sortable": false,
341
+ icon: 'person',
342
+ width: 200,
343
+ minWidth: 100,
344
+ maxWidth: 300
345
+ },
346
+ {
347
+ "property": "Amount",
348
+ "title": { "en_US": "Amount", "uk_UA": "Прізвище" },
349
+ "type": "money",
350
+ icon: 'text',
351
+ "sortable": false,
352
+ width: 200,
353
+ minWidth: 100,
354
+ maxWidth: 300
355
+ }
356
+ ]
357
+ },
358
+ filters: [
359
+ {
360
+ "name": "period",
361
+ "type": "period",
362
+ icon: 'calendar',
363
+ "options": {
364
+ "defaultValue": {
365
+ "label": "Весь час",
366
+ "value": null
367
+ }
368
+ }
369
+ },
370
+ {
371
+ "name": "amount",
372
+ "type": "amount",
373
+ icon: 'money',
374
+ "options": {
375
+ "min": 0.05,
376
+ "max": 116907,
377
+ "histogram": [
378
+ 164,
379
+ 10,
380
+ 4,
381
+ 4,
382
+ 2,
383
+ 3,
384
+ 1,
385
+ 4,
386
+ 1,
387
+ 0,
388
+ 1,
389
+ 1,
390
+ 0,
391
+ 0,
392
+ 0,
393
+ 2,
394
+ 1,
395
+ 0,
396
+ 0,
397
+ 0,
398
+ 1,
399
+ 1
400
+ ],
401
+ "defaultValue": {
402
+ "value": [
403
+ 0.05,
404
+ 116907
405
+ ],
406
+ "label": "Будь-яка сума"
407
+ }
408
+ }
409
+ },
410
+ {
411
+ "name": "type",
412
+ "type": "list",
413
+ icon: 'arrows',
414
+ "options": {
415
+ "items": [
416
+ {
417
+ "value": "income",
418
+ "label": "Тільки доходи",
419
+ "text": "Дохідні"
420
+ },
421
+ {
422
+ "value": "outcome",
423
+ "label": "Тільки витрати",
424
+ "text": "Витратні"
425
+ },
426
+ {
427
+ "value": "transfer",
428
+ "label": "Перекази",
429
+ "text": "Перекази"
430
+ },
431
+ {
432
+ "value": "all",
433
+ "label": "Всі операції",
434
+ "text": "Всі"
435
+ }
436
+ ],
437
+ "defaultValue": {
438
+ "value": "all",
439
+ "label": "Всі операції",
440
+ "text": "Всі"
441
+ }
442
+ }
443
+ },
444
+ {
445
+ "name": "accountId",
446
+ "type": "facets-list",
447
+ "options": {
448
+ "multiple": true,
449
+ "title": "Рахунки",
450
+ "items": [
451
+ {
452
+ "value": "wk571",
453
+ "label": "Cash test",
454
+ "count": "8"
455
+ },
456
+ {
457
+ "value": "wrDM1",
458
+ "label": "Ceska",
459
+ "count": "31"
460
+ },
461
+ {
462
+ "value": "e8bEZ",
463
+ "label": "test Account",
464
+ "count": "1"
465
+ },
466
+ {
467
+ "value": "eYvmw",
468
+ "label": "Test2",
469
+ "count": "1"
470
+ },
471
+ {
472
+ "value": "wD54Z",
473
+ "label": "Wise",
474
+ "count": "108"
475
+ },
476
+ {
477
+ "value": "ezJXe",
478
+ "label": "Ukrsib UAH",
479
+ "count": "13"
480
+ },
481
+ {
482
+ "value": "eqxL1",
483
+ "label": "Raiffeisen",
484
+ "count": "10"
485
+ },
486
+ {
487
+ "value": "12gbe",
488
+ "label": "Virtual wallet for refill",
489
+ "count": "3"
490
+ },
491
+ {
492
+ "value": "wOPxZ",
493
+ "label": "Upwork",
494
+ "count": "21"
495
+ },
496
+ {
497
+ "value": "wj58e",
498
+ "label": "Польський банк",
499
+ "count": "3"
500
+ },
501
+ {
502
+ "value": "e47n1",
503
+ "label": "czech account test",
504
+ "count": "1"
505
+ }
506
+ ],
507
+ "total": 200,
508
+ "defaultValue": {
509
+ "label": "Усі рахунки",
510
+ "value": []
511
+ }
512
+ }
513
+ },
514
+ {
515
+ "name": "businessUnitId",
516
+ "type": "facets-list",
517
+ "options": {
518
+ "multiple": true,
519
+ "title": "Бізнес юніти",
520
+ "items": [
521
+ {
522
+ "value": "null",
523
+ "label": "No business unit",
524
+ "count": "39"
525
+ },
526
+ {
527
+ "value": "18edR",
528
+ "label": "BU Main",
529
+ "count": "161"
530
+ }
531
+ ],
532
+ "total": 200,
533
+ "defaultValue": {
534
+ "label": "Усі бізнес юніти",
535
+ "value": []
536
+ }
537
+ }
538
+ }
539
+ ]
540
+ }
541
+ },
542
+ methods: {
543
+ onAdd(title) {
544
+ this.list2.push({ Id: Math.random() });
545
+ }
546
+ },
547
+ template: `<div>
548
+
549
+ <h3>Example</h3>
550
+
551
+ <itf-app>
552
+ <itf-view
553
+ style="height: 500px;"
554
+ add-new-rows
555
+ striped
556
+ @new="onAdd"
557
+ state-name="test"
558
+ :page.sync="page"
559
+ :schema="schema"
560
+ :filters="filters"
561
+ :items="list2"
562
+ v-model="selectedIds"
563
+ show-summary
564
+ id-property="Id"
565
+ :sorting.sync="sorting"
566
+ column-sorting column-resizing show-add-column show-grouping @add-column="onAdd">
567
+ <template #pagination-center>
568
+ <div class="text-muted small d-flex align-items-center">
569
+ <itf-icon name="arrow-up" new />
570
+ 123
571
+ </div>
572
+ </template>
573
+ <template #format.employee="{ item }">
574
+ {{item.EmployeeId}}
575
+ </template>
576
+ <template #edit.employee="{ item }">
577
+ <itf-select
578
+ class="w-100"
579
+ v-model="item.EmployeeId"
580
+ :reduce="item => item.Id"
581
+ :get-option-label="item => item.Name"
582
+ :options="[{ Id: 1, Name: 'Vitalii Savchuk' }]" />
583
+ </template>
584
+ </itf-view>
585
+ </itf-app>
586
+
587
+ </div>`,
588
+ }))