@itfin/components 1.3.96 → 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 (85) 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/sortable/draggable.js +2 -1
  72. package/src/components/table/Table2.vue +24 -1
  73. package/src/components/table/TableBody.vue +7 -2
  74. package/src/components/table/TableGroup.vue +8 -4
  75. package/src/components/table/TableHeader.vue +101 -24
  76. package/src/components/table/TableRows.vue +3 -1
  77. package/src/components/table/index.stories.js +22 -200
  78. package/src/components/table/table2.scss +178 -49
  79. package/src/components/text-field/TextField.vue +12 -8
  80. package/src/components/view/View.vue +119 -0
  81. package/src/components/view/index.stories.js +588 -0
  82. package/src/helpers/formatters.js +14 -1
  83. package/src/locales/en.js +13 -0
  84. package/src/locales/uk.js +11 -0
  85. package/src/components/table/TableRow.vue +0 -221
@@ -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
+ }))
@@ -36,6 +36,19 @@ export function parseHours (str, { hoursInDay } = { hoursInDay: 8 }) {
36
36
  return isNegative * seconds;
37
37
  }
38
38
 
39
+ export function formatFinanceMoney (val, symbol = '', digits = 2, showNegative = true) {
40
+ if (isNaN(val) || val === null || val === undefined) {
41
+ return '—';
42
+ }
43
+ if (typeof symbol !== 'string' && symbol !== null && typeof symbol !== 'undefined') {
44
+ if (symbol.IsCryptoCurrency && digits === 2 && Math.abs(val) < 0.01) {
45
+ digits = 6;
46
+ }
47
+ symbol = symbol.Symbol; // in case of passing object of currency
48
+ }
49
+ const isNegative = showNegative && (val < 0);
50
+ return (isNegative ? '(' : '') + formatMoney(Math.abs(val), symbol, digits) + (isNegative ? ')' : '');
51
+ }
39
52
 
40
53
  // https://stptrans.com/wp-content/uploads/2020/02/Working-with-currency-number-and-date-formats.pdf
41
54
  export function formatMoney (val, symbol = '', digits = null) {
@@ -43,7 +56,7 @@ export function formatMoney (val, symbol = '', digits = null) {
43
56
  const thousandSeparator = ITFSettings.moneyThousandSeparator || ',';
44
57
  const decimalSeparator = ITFSettings.moneyDecimalSeparator || '.';
45
58
 
46
- if (Number.isNaN(val) || val === null) {
59
+ if (Number.isNaN(val) || val === null || val === undefined) {
47
60
  return '—';
48
61
  }
49
62
  let symbolStr = symbol?.currencySymbol ?? symbol?.symbol ?? symbol?.Symbol ?? '';
package/src/locales/en.js CHANGED
@@ -103,6 +103,8 @@ module.exports = {
103
103
  sortAscending: 'Sort ascending',
104
104
  sortDescending: 'Sort descending',
105
105
  groupBy: 'Group by',
106
+ sorting: 'Sorting',
107
+ actions: 'Actions',
106
108
  hideColumn: 'Hide in view',
107
109
  freezeColumn: 'Freeze up to column',
108
110
  unfreezeColumn: 'Unfreeze column',
@@ -120,6 +122,11 @@ module.exports = {
120
122
  calculateCountNotEmpty: 'Count not empty',
121
123
  calculatePercentEmpty: 'Percent empty',
122
124
  calculatePercentNotEmpty: 'Percent not empty',
125
+ filter: 'Filter',
126
+ moveRight: 'Move right',
127
+ moveLeft: 'Move left',
128
+ columns: 'Columns',
129
+ resetTableSettings: 'Reset table settings',
123
130
  },
124
131
  pagination: {
125
132
  itemsPerPage: 'Items per page',
@@ -135,5 +142,11 @@ module.exports = {
135
142
  noResults: 'No results',
136
143
  showMore: 'show all ({count})',
137
144
  hideMore: 'hide',
145
+ exact: 'Exact',
146
+ range: 'Range',
147
+ filterBy: 'Filter',
148
+ from: 'From',
149
+ to: 'To',
150
+ value: 'Value',
138
151
  }
139
152
  };
package/src/locales/uk.js CHANGED
@@ -108,6 +108,8 @@ module.exports = {
108
108
  sortAscending: 'Сортувати за зростанням',
109
109
  sortDescending: 'Сортувати за спаданням',
110
110
  groupBy: 'Групувати',
111
+ sorting: 'Сортування',
112
+ actions: 'Дії',
111
113
  hideColumn: 'Приховати колонку',
112
114
  freezeColumn: 'Закріпити колонку',
113
115
  unfreezeColumn: 'Відкріпити колонку',
@@ -125,6 +127,11 @@ module.exports = {
125
127
  calculateCountNotEmpty: 'Кількість не порожніх',
126
128
  calculatePercentEmpty: 'Відсоток порожніх',
127
129
  calculatePercentNotEmpty: 'Відсоток не порожніх',
130
+ filter: 'Фільтрувати',
131
+ moveRight: 'Посунути вправо',
132
+ moveLeft: 'Посунути вліво',
133
+ columns: 'Колонки',
134
+ resetTableSettings: 'Скинути налаштування таблиці',
128
135
  },
129
136
  filter: {
130
137
  search: 'Пошук',
@@ -135,5 +142,9 @@ module.exports = {
135
142
  noResults: 'Немає результатів',
136
143
  showMore: 'показати всі ({count})',
137
144
  hideMore: 'сховати',
145
+ filterBy: 'Фільтрувати за',
146
+ from: 'Від',
147
+ to: 'До',
148
+ value: 'Значення',
138
149
  }
139
150
  };