@inceptionbg/iui 2.0.10 → 2.0.12

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 (117) hide show
  1. package/dist/icons/index.d.ts +5 -1
  2. package/dist/icons/index.js +1 -1
  3. package/dist/index.d.ts +169 -85
  4. package/dist/index.js +1 -1
  5. package/dist/index.js.map +1 -1
  6. package/dist/iui.css +1 -1
  7. package/package.json +1 -1
  8. package/src/assets/icons/duotone/faCircleUser.ts +6 -6
  9. package/src/assets/icons/index.ts +2 -0
  10. package/src/assets/icons/light/faArrowDownShortWide.ts +1 -1
  11. package/src/assets/icons/light/faArrowDownWideShort.ts +1 -1
  12. package/src/assets/icons/light/faArrowUpArrowDown.ts +5 -5
  13. package/src/assets/icons/light/faArrowUpRightFromSquare.ts +1 -1
  14. package/src/assets/icons/light/faArrowsToLine.ts +1 -1
  15. package/src/assets/icons/light/faArrowsUpDown.ts +1 -1
  16. package/src/assets/icons/light/faBookmark.ts +15 -0
  17. package/src/assets/icons/light/faBookmarkSlash.ts +15 -0
  18. package/src/assets/icons/light/faCalendarPlus.ts +5 -5
  19. package/src/assets/icons/light/faCheck.ts +1 -1
  20. package/src/assets/icons/light/faChevronDown.ts +5 -5
  21. package/src/assets/icons/light/faChevronRight.ts +5 -5
  22. package/src/assets/icons/light/faCircleInfo.ts +5 -5
  23. package/src/assets/icons/light/faCircleXmark.ts +5 -5
  24. package/src/assets/icons/light/faClipboardCheck.ts +5 -5
  25. package/src/assets/icons/light/faClockRotateLeft.ts +1 -1
  26. package/src/assets/icons/light/faEllipsisVertical.ts +1 -1
  27. package/src/assets/icons/light/faEye.ts +5 -5
  28. package/src/assets/icons/light/faEyeSlash.ts +5 -5
  29. package/src/assets/icons/light/faFilter.ts +5 -5
  30. package/src/assets/icons/light/faGear.ts +1 -1
  31. package/src/assets/icons/light/faHouse.ts +5 -5
  32. package/src/assets/icons/light/faIdBadge.ts +5 -5
  33. package/src/assets/icons/light/faLineColumns.ts +5 -5
  34. package/src/assets/icons/light/faLink.ts +1 -1
  35. package/src/assets/icons/light/faMagnifyingGlass.ts +5 -5
  36. package/src/assets/icons/light/faPen.ts +15 -15
  37. package/src/assets/icons/light/faPrint.ts +5 -5
  38. package/src/assets/icons/light/faQuestion.ts +5 -5
  39. package/src/assets/icons/light/faRotateRight.ts +5 -5
  40. package/src/assets/icons/light/faTrashCan.ts +5 -5
  41. package/src/assets/icons/light/faTriangleExclamation.ts +5 -5
  42. package/src/assets/icons/light/faXmark.ts +1 -1
  43. package/src/assets/icons/regular/faArrowLeft.ts +6 -6
  44. package/src/assets/icons/regular/faArrowRightArrowLeft.ts +1 -1
  45. package/src/assets/icons/regular/faCircleCheck.ts +1 -1
  46. package/src/assets/icons/regular/faCircleExclamation.ts +1 -1
  47. package/src/assets/icons/regular/faCircleInfo.ts +1 -1
  48. package/src/assets/icons/regular/faFileArrowDown.ts +1 -1
  49. package/src/assets/icons/regular/faFilterCircleXmark.ts +1 -1
  50. package/src/assets/icons/regular/faTriangleExclamation.ts +1 -1
  51. package/src/assets/icons/solid/faAngleLeft.ts +1 -1
  52. package/src/assets/icons/solid/faAngleRight.ts +1 -1
  53. package/src/assets/icons/solid/faArrowDownWideShort.ts +1 -1
  54. package/src/assets/icons/solid/faCaretDown.ts +1 -1
  55. package/src/assets/icons/solid/faCheck.ts +5 -5
  56. package/src/assets/icons/solid/faEllipsisVertical.ts +1 -1
  57. package/src/assets/icons/solid/faFilter.ts +1 -1
  58. package/src/assets/icons/solid/faFloppyDisk.ts +1 -1
  59. package/src/assets/icons/solid/faGripDotsVertical.ts +1 -1
  60. package/src/assets/icons/solid/faListUl.ts +1 -1
  61. package/src/assets/icons/solid/faMinus.ts +6 -6
  62. package/src/assets/icons/solid/faPlus.ts +6 -6
  63. package/src/assets/icons/solid/faPrint.ts +1 -1
  64. package/src/assets/icons/solid/faRotateRight.ts +1 -1
  65. package/src/assets/icons/solid/faXmark.ts +1 -1
  66. package/src/components/Button/Button.tsx +1 -1
  67. package/src/components/Button/IconButton.tsx +1 -1
  68. package/src/components/Dashboard/FastLinksWidget/FastLinksWidget.tsx +1 -1
  69. package/src/components/Dialog/Dialog.tsx +6 -8
  70. package/src/components/Dialog/components/DialogFooter.tsx +1 -1
  71. package/src/components/Header/Components/ModuleSelect.tsx +14 -6
  72. package/src/components/Header/Components/UserMenu.tsx +2 -4
  73. package/src/components/Inputs/DateInput/DateInput.tsx +1 -2
  74. package/src/components/Inputs/InputWrapper.tsx +1 -1
  75. package/src/components/Inputs/PasswordInput.tsx +2 -1
  76. package/src/components/Inputs/Select2/Select.tsx +0 -1
  77. package/src/components/Inputs/TextInput.tsx +1 -1
  78. package/src/components/List/List.tsx +18 -0
  79. package/src/components/List/ListItem.tsx +24 -0
  80. package/src/components/Loader/ProgressBar.tsx +41 -0
  81. package/src/components/Menu/Menu.tsx +0 -3
  82. package/src/components/Menu/MenuItem.tsx +21 -23
  83. package/src/components/Menu/NewMenu.tsx +0 -3
  84. package/src/components/Menu/hooks/useMenuPosition.tsx +26 -8
  85. package/src/components/Pullover/Pullover.tsx +33 -16
  86. package/src/components/Sidebar/types/ISidebar.ts +1 -1
  87. package/src/components/Table/Table.tsx +18 -11
  88. package/src/components/Table/components/filters/TableFilters.tsx +5 -8
  89. package/src/components/Table/components/footer/TableFooter.tsx +6 -10
  90. package/src/components/Table/components/header/TableHeader.tsx +22 -24
  91. package/src/components/Table/components/header/TableHeaderRow.tsx +16 -7
  92. package/{idea/Table/Components/Print → src/components/Table/components/print}/TablePrint.tsx +89 -96
  93. package/src/components/Table/components/sort/TableSort.tsx +2 -0
  94. package/src/components/Table/components/templates/TableTemplates.tsx +81 -0
  95. package/src/components/Table/hooks/useTablePrint.ts +75 -0
  96. package/src/components/Wrappers/PageLayout.tsx +1 -1
  97. package/src/hooks/useLocalPopoverControl.ts +11 -17
  98. package/src/hooks/usePopupControl.ts +11 -7
  99. package/src/index.ts +11 -0
  100. package/src/styles/App.scss +2 -0
  101. package/src/styles/common/_animations.scss +8 -14
  102. package/src/styles/common/_typography.scss +1 -1
  103. package/src/styles/common/helpers/_base.scss +0 -4
  104. package/src/styles/components/_header.scss +21 -9
  105. package/src/styles/components/_list.scss +40 -0
  106. package/src/styles/components/_loader.scss +3 -1
  107. package/src/styles/components/_menu.scss +19 -18
  108. package/src/styles/components/_print.scss +36 -46
  109. package/src/styles/components/_progressBar.scss +83 -0
  110. package/src/styles/components/_table.scss +16 -22
  111. package/src/types/IHeader.ts +13 -7
  112. package/src/types/IPopup.ts +17 -0
  113. package/src/types/ITable.ts +55 -32
  114. package/src/utils/i18n/i18nIUICyrilic.ts +2 -1
  115. package/src/utils/i18n/i18nIUILatin.ts +16 -12
  116. package/src/utils/i18n/i18nIUIMe.ts +2 -1
  117. package/src/utils/icons.ts +1 -1
@@ -21,6 +21,7 @@
21
21
  }
22
22
  }
23
23
 
24
+ ///// Modules /////
24
25
  .module-name {
25
26
  display: flex;
26
27
  align-items: center;
@@ -32,15 +33,25 @@
32
33
  background-color: var(--neutral-hover);
33
34
  }
34
35
  }
35
- .module-item {
36
- display: flex;
37
- flex-direction: column;
38
- gap: 8px;
39
- align-items: center;
40
- padding: 8px;
41
- border-radius: 8px;
42
- .menu-item-label {
43
- font-weight: 600;
36
+ .modules-menu {
37
+ display: grid;
38
+ grid-template-columns: repeat(2, 1fr);
39
+ padding: 8px !important;
40
+ @media #{bp.$mobile} {
41
+ grid-template-columns: 1fr;
42
+ }
43
+ .module-item {
44
+ display: flex;
45
+ flex-direction: column;
46
+ gap: 8px;
47
+ align-items: center;
48
+ padding: 8px;
49
+ border-radius: 8px;
50
+ .menu-item-label {
51
+ font-weight: 600;
52
+ white-space: pre-line;
53
+ text-align: center;
54
+ }
44
55
  }
45
56
  }
46
57
  .module-item .menu-item-icon,
@@ -59,6 +70,7 @@
59
70
  }
60
71
  }
61
72
 
73
+ ///// User Box /////
62
74
  .user-box {
63
75
  display: flex;
64
76
  align-items: center;
@@ -0,0 +1,40 @@
1
+ .iui-list {
2
+ overflow: auto;
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: 8px;
6
+ .iui-list-item {
7
+ border: var(--border);
8
+ border-radius: 8px;
9
+ padding: 12px 16px;
10
+ p {
11
+ font-size: 14px;
12
+ line-height: 20px;
13
+ }
14
+ .iui-list-item-desc {
15
+ display: flex;
16
+ line-height: 1.5;
17
+ gap: 8px;
18
+ font-size: 12px;
19
+ color: var(--neutral);
20
+ margin-top: 4px;
21
+ }
22
+ &.disabled {
23
+ cursor: default;
24
+ opacity: 0.5;
25
+ }
26
+ &:not(.disabled) {
27
+ cursor: pointer;
28
+ &:hover {
29
+ background-color: var(--neutral-hover);
30
+ }
31
+ &.active {
32
+ background-color: var(--primary);
33
+ color: var(--text-inverse);
34
+ .iui-list-item-desc {
35
+ color: var(--neutral-300);
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
@@ -35,8 +35,10 @@
35
35
  }
36
36
 
37
37
  .empty-loader {
38
- height: 60px;
39
38
  width: 100%;
39
+ .loader {
40
+ min-height: fit-content;
41
+ }
40
42
  }
41
43
 
42
44
  .full-page-loader {
@@ -22,6 +22,24 @@
22
22
  }
23
23
 
24
24
  .iui-menu-item {
25
+ display: flex;
26
+ align-items: center;
27
+ gap: 8px;
28
+ padding: 8px 16px;
29
+ user-select: none;
30
+ .menu-item-icon {
31
+ display: flex;
32
+ align-items: center;
33
+ justify-content: center;
34
+ color: var(--text);
35
+ svg {
36
+ height: 16px;
37
+ width: 16px;
38
+ }
39
+ }
40
+ .menu-item-label {
41
+ width: 100%;
42
+ }
25
43
  &.clickable:hover:not(:disabled):not(.disabled):not(.active) {
26
44
  background-color: var(--neutral-hover);
27
45
  }
@@ -29,30 +47,13 @@
29
47
  transition: none;
30
48
  background-color: var(--primary);
31
49
  color: var(--text-inverse);
32
- .menu-item-content .menu-item-icon {
50
+ .menu-item-icon {
33
51
  color: var(--text-inverse);
34
52
  }
35
53
  }
36
54
  &.with-devider:not(:last-child) {
37
55
  border-bottom: var(--border);
38
56
  }
39
- .menu-item-content {
40
- display: flex;
41
- align-items: center;
42
- gap: 8px;
43
- padding: 8px 16px;
44
- user-select: none;
45
- .menu-item-icon {
46
- display: flex;
47
- align-items: center;
48
- justify-content: center;
49
- color: var(--text);
50
- svg {
51
- height: 16px;
52
- width: 16px;
53
- }
54
- }
55
- }
56
57
  .menu-item-badge {
57
58
  top: -3px;
58
59
  right: -3px;
@@ -1,14 +1,6 @@
1
- .iui-print-dialog {
2
- position: absolute;
3
- z-index: 2000;
4
- left: 0;
5
- top: 0;
6
- bottom: 0;
7
- left: 0;
8
- min-height: 100vh;
9
- width: 100%;
10
- animation: fade-in 200ms forwards;
11
- & > .content {
1
+ .iui-print {
2
+ padding: 0 !important;
3
+ & > .print-content {
12
4
  background: #fefefe;
13
5
  padding: 10px 50px 60px 50px;
14
6
  p,
@@ -24,46 +16,17 @@
24
16
  margin-bottom: 5px;
25
17
  }
26
18
  }
27
- @media print {
28
- .content {
29
- padding: 0;
30
- }
31
- }
32
- }
33
- .iui-print-actions {
34
- position: fixed;
35
- left: 0;
36
- right: 0;
37
- bottom: 0;
38
- height: 50px;
39
- background-color: #fefefe;
40
- box-shadow: var(--container-shadow);
41
- display: flex;
42
- align-items: center;
43
- justify-content: center;
44
19
  }
45
20
 
46
21
  .print-table {
47
- @media print and (orientation: landscape) {
48
- width: 842pt;
49
- }
50
- @media print and (orientation: portrait) {
51
- width: 595pt;
52
- }
53
- // font-size: 10pt;
22
+ border-spacing: 0px;
23
+ border-collapse: collapse;
54
24
  thead tr {
55
25
  background: #f1f1f1;
56
26
  }
57
- th {
58
- padding: 5px;
59
- border: 1px solid silver;
60
- p {
61
- // font-size: 10pt;
62
- padding: 4px 8px !important;
63
- }
64
- }
27
+ th,
65
28
  td {
66
- padding: 3px;
29
+ padding: 4px;
67
30
  border: 1px solid silver;
68
31
  }
69
32
  }
@@ -72,14 +35,41 @@
72
35
  @page {
73
36
  margin: 6.5mm;
74
37
  }
38
+
39
+ @media (orientation: landscape) {
40
+ .iui-print {
41
+ width: 842pt;
42
+ }
43
+ }
44
+ @media (orientation: portrait) {
45
+ .iui-print {
46
+ width: 595pt;
47
+ }
48
+ }
49
+ .pullover {
50
+ position: static !important;
51
+ overflow: visible !important;
52
+ }
53
+ .iui-print {
54
+ position: absolute !important;
55
+ inset: 0 !important;
56
+ width: 100% !important;
57
+ background: white !important;
58
+ overflow: visible !important;
59
+ .print-content {
60
+ padding: 0 !important;
61
+ height: auto !important;
62
+ overflow: visible !important;
63
+ }
64
+ }
75
65
  #root,
76
66
  .no-print {
77
- display: none;
67
+ display: none !important;
78
68
  }
79
69
  body {
80
70
  -webkit-print-color-adjust: exact;
81
71
  print-color-adjust: exact;
82
- // overflow: visible !important;
72
+ overflow: visible !important;
83
73
  }
84
74
  tbody td {
85
75
  white-space: pre-wrap !important;
@@ -0,0 +1,83 @@
1
+ .progress-bar-container {
2
+ width: 100%;
3
+ max-width: 400px;
4
+ margin: auto;
5
+ }
6
+
7
+ .progress-label {
8
+ margin-bottom: 8px;
9
+ font-size: 16px;
10
+ color: var(--text);
11
+ }
12
+
13
+ .progress-bar-bg {
14
+ position: relative;
15
+ width: 100%;
16
+ height: 32px;
17
+ background: var(--neutral-200);
18
+ border-radius: 16px;
19
+ overflow: hidden;
20
+ display: flex;
21
+ align-items: center;
22
+ justify-content: center;
23
+ }
24
+
25
+ .progress-bar-fill {
26
+ position: absolute;
27
+ left: 0;
28
+ height: 100%;
29
+ background: linear-gradient(90deg, var(--primary-400) 0%, var(--primary-600) 100%);
30
+ transition: width 0.3s cubic-bezier(0.67, 0.01, 0.83, 0.98);
31
+ overflow: hidden;
32
+
33
+ // Subtle shimmer animation to show activity
34
+ &.loading::before {
35
+ content: '';
36
+ position: absolute;
37
+ top: 0;
38
+ left: -100%;
39
+ width: 80%;
40
+ height: 100%;
41
+ background: linear-gradient(
42
+ 90deg,
43
+ transparent 0%,
44
+ rgba(255, 255, 255, 0.3) 50%,
45
+ transparent 100%
46
+ );
47
+ animation: shimmer 2s ease-in-out infinite;
48
+ }
49
+ }
50
+
51
+ .progress-bar-text {
52
+ width: 100%;
53
+ text-align: center;
54
+ font-size: 16px;
55
+ font-weight: bold;
56
+ color: var(--text);
57
+ border-radius: 32px;
58
+ padding: 0 8px;
59
+ pointer-events: none;
60
+ z-index: 1;
61
+ position: relative;
62
+
63
+ // White text overlay that shows only where progress bar is
64
+ &::after {
65
+ content: var(--progress-text, '');
66
+ position: absolute;
67
+ top: 0;
68
+ left: 0;
69
+ right: 0;
70
+ bottom: 0;
71
+ color: white;
72
+ display: flex;
73
+ align-items: center;
74
+ justify-content: center;
75
+ clip-path: polygon(
76
+ 0 0,
77
+ var(--progress-clip, 0%) 0%,
78
+ var(--progress-clip, 0%) 100%,
79
+ 0 100%
80
+ );
81
+ transition: clip-path 0.3s cubic-bezier(0.67, 0.01, 0.83, 0.98);
82
+ }
83
+ }
@@ -2,19 +2,19 @@
2
2
 
3
3
  table {
4
4
  border-spacing: 0px;
5
- border-collapse: collapse;
5
+ // border-collapse: collapse;
6
6
  }
7
7
  .iui-table {
8
8
  //// Header ////
9
9
  thead {
10
10
  z-index: 2;
11
- background-color: var(--primary-100);
11
+ background-color: var(--neutral-200);
12
+ tr:first-child th {
13
+ border-top: var(--border);
14
+ }
12
15
  }
13
16
  th {
14
17
  padding: 4px 12px;
15
- border-left: var(--border);
16
- border-right: var(--border);
17
-
18
18
  font-weight: bold;
19
19
  p {
20
20
  font-size: 12px;
@@ -33,22 +33,13 @@ table {
33
33
  top: 0;
34
34
  z-index: 1;
35
35
  }
36
- .border-row {
37
- background-color: var(--border-color);
38
- height: 1px;
39
- padding: 0;
40
- }
41
36
 
42
37
  //// Body ////
43
- // tbody.no-last-border tr:last-child td {
44
- // border: none;
45
- // }
46
38
  // Row
47
39
  tr {
48
40
  scroll-snap-align: start;
49
41
  }
50
42
  tbody tr {
51
- // border-bottom: var(--border);
52
43
  &.clickable:hover,
53
44
  &.selected {
54
45
  background-color: rgba(0, 0, 0, 0.05);
@@ -64,18 +55,14 @@ table {
64
55
  // Cell
65
56
  th,
66
57
  td {
67
- // 1px solid #f2f4f7;
58
+ border-bottom: var(--border);
68
59
  // Cell colors
69
60
  &.secondary {
70
61
  background-color: rgba(0, 0, 0, 0.04);
71
- // border-bottom: 1px solid #d3d3d3;
72
62
  }
73
63
  }
74
64
  td {
75
- border: var(--border);
76
- border-top: none;
77
65
  font-size: 14px;
78
- box-sizing: border-box;
79
66
  height: 48px;
80
67
  padding: 6px 12px;
81
68
  &.s {
@@ -96,7 +83,6 @@ table {
96
83
  align-items: center;
97
84
  justify-content: center;
98
85
  padding: 0 4px;
99
- // gap: 8px;
100
86
  }
101
87
 
102
88
  //// Footer ////
@@ -106,7 +92,6 @@ table {
106
92
  width: 100%;
107
93
  padding: 8px;
108
94
  font-size: var(--fs-m);
109
- box-sizing: border-box;
110
95
  .pagination {
111
96
  display: flex;
112
97
  align-items: center;
@@ -149,6 +134,13 @@ table {
149
134
  }
150
135
 
151
136
  @media #{bp.$landscape} {
137
+ td,
138
+ th {
139
+ border-right: var(--border);
140
+ &:first-child:not(.not-first-cell) {
141
+ border-left: var(--border);
142
+ }
143
+ }
152
144
  .select-col,
153
145
  .actions-col {
154
146
  padding: 0;
@@ -168,7 +160,6 @@ table {
168
160
  }
169
161
  tr {
170
162
  padding-bottom: 20px;
171
- border-top: var(--border);
172
163
  }
173
164
  td {
174
165
  display: flex;
@@ -210,6 +201,9 @@ table {
210
201
  }
211
202
  }
212
203
 
204
+ .table-sort-item {
205
+ flex-direction: row-reverse;
206
+ }
213
207
  // .dual-list-container {
214
208
  // .dual-list-content {
215
209
  // display: grid;
@@ -2,6 +2,7 @@ import { IconDefinition, RotateProp } from '@fortawesome/fontawesome-svg-core';
2
2
  import { IButtonColor } from '../components/Button/Button';
3
3
  import { IMenuItem } from './IMenu';
4
4
  import { FC } from 'react';
5
+ import { IPopupControl } from './IPopup';
5
6
 
6
7
  export interface IHeaderAction {
7
8
  label: string;
@@ -20,15 +21,20 @@ export type IHeaderUserMenuProps = {
20
21
  setIsOpen: (isOpen: boolean) => void;
21
22
  userName?: string;
22
23
  organizationName?: string;
24
+ menuItems: IMenuItem[];
23
25
  showBadge?: boolean;
24
- menuItems?: IMenuItem[];
25
-
26
+ controls: {
27
+ myAccountControl: IPopupControl;
28
+ changeOrgControl: IPopupControl;
29
+ orgInvitesControl: IPopupControl;
30
+ };
31
+ refetchOrganizationInvites?: () => void;
26
32
  HeaderUserMenuDialogs: FC<{
27
- openedDialog: string | null;
28
- setOpenedDialog: (dialog: string | null) => void;
33
+ controls: {
34
+ myAccountControl: IPopupControl;
35
+ changeOrgControl: IPopupControl;
36
+ orgInvitesControl: IPopupControl;
37
+ };
29
38
  refetchOrganizationInvites?: () => void;
30
39
  }>;
31
- openedDialog: string | null;
32
- setOpenedDialog: (dialog: string | null) => void;
33
- refetchOrganizationInvites?: () => void;
34
40
  };
@@ -0,0 +1,17 @@
1
+ import { RefObject } from 'react';
2
+
3
+ export interface PopupControlRef {
4
+ onOpen: () => void;
5
+ onClose: () => void;
6
+ }
7
+
8
+ export interface ILocalPopupControl {
9
+ controlRef: RefObject<PopupControlRef | null>;
10
+ isOpen: boolean;
11
+ setIsOpen: (isOpen: boolean) => void;
12
+ }
13
+ export interface IPopupControl {
14
+ control: ILocalPopupControl;
15
+ onOpen: () => void;
16
+ onClose: () => void;
17
+ }
@@ -1,13 +1,12 @@
1
1
  import { Dispatch, MouseEvent, ReactElement, ReactNode, SetStateAction } from 'react';
2
- import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
3
2
  import { IAnyObject, ISimpleObject } from './IBasic';
4
3
  import { ITableKeyboardActionsBase } from './IKeyboard';
4
+ import { IPopupControl } from './IPopup';
5
5
 
6
- export interface ITable {
6
+ export interface ITable<T = unknown> {
7
7
  columns: ITableColumn[];
8
8
  // setColumns?: (data: ITableColumn[]) => void;
9
9
  // withColumnsSearch?: boolean;
10
- customHeader?: ITableColumn[][];
11
10
  data: ITableDataItem[];
12
11
  dataActions?: {
13
12
  edit?: {
@@ -23,11 +22,6 @@ export interface ITable {
23
22
  hasAccess: boolean;
24
23
  }[];
25
24
  };
26
- sumRows?: ITableDataItem[];
27
- isLoading?: boolean;
28
-
29
- headerWrap?: boolean;
30
- selectedRowUuid?: string;
31
25
  rowSelect?: {
32
26
  selectedRows: Set<string>;
33
27
  setSelectedRows: Dispatch<SetStateAction<Set<string>>>;
@@ -35,14 +29,18 @@ export interface ITable {
35
29
  };
36
30
  filterData?: ITableFilterData;
37
31
  sortData?: ITableSortData;
38
- // printData?: IPrintData;
39
- // customPrintData?: ICustomPrintData;
40
- // additionsalOptions?: ReactNode;
32
+ printData?: IPrintData<T>;
33
+ sumRows?: ITableDataItem[];
41
34
  editable?: ITableEdit;
35
+ selectedRowUuid?: string;
42
36
  keyboard?: {
43
37
  enabled: boolean;
44
38
  actions: ITableKeyboardActionsBase;
45
39
  };
40
+ headerWrap?: boolean;
41
+ customHeader?: ITableColumn[][];
42
+ // customPrintData?: ICustomPrintData;
43
+ // additionsalOptions?: ReactNode;
46
44
  footer?: {
47
45
  paginationControl?: IPaginationControl;
48
46
  customPagination?: {
@@ -51,22 +49,35 @@ export interface ITable {
51
49
  };
52
50
  totalRows?: number;
53
51
  // noTotalRows?: boolean;
54
- footerAction?: {
55
- icon?: IconDefinition;
56
- onClick: () => void;
57
- };
52
+ refetch?: () => void;
58
53
  };
59
-
54
+ isLoading?: boolean;
60
55
  className?: string;
61
56
  rowHeight?: 'xs' | 's' | 'm';
62
57
  maxHeight?: string;
63
- // templates?: {
64
- // identifier: string;
65
- // data: IReportTemplateData;
66
- // setTemplateName?: (templateName: string) => void;
67
- // onClearFilters: () => void;
68
- // allowPublicCreate?: boolean;
69
- // };
58
+ templates?: {
59
+ identifier: string;
60
+ setSearch?: (search: string) => void;
61
+ items: {
62
+ uuid: string;
63
+ name: string;
64
+ // identifier: string;
65
+ // filterValues?: IReportTemplateFilterValue[];
66
+ // columns: string[];
67
+ // organization?: ISimpleObject;
68
+ // subsystem?: IModule;
69
+ // sorts?: string[];
70
+ // isPublic?: boolean;
71
+ // isDefault?: boolean;
72
+ // order?: number;
73
+ // createdAt?: string;
74
+ // createdBy?: ISimpleObject;
75
+ }[];
76
+ // data: IReportTemplateData;
77
+ // setTemplateName?: (templateName: string) => void;
78
+ // onClearFilters: () => void;
79
+ // allowPublicCreate?: boolean;
80
+ };
70
81
  }
71
82
 
72
83
  export interface ITableColumn {
@@ -87,6 +98,7 @@ export interface ITableColumn {
87
98
  desc: string;
88
99
  label: string;
89
100
  };
101
+ notFirstCell?: boolean;
90
102
  // code?: string;
91
103
  className?: string;
92
104
  }
@@ -193,19 +205,30 @@ export interface IBasePrintData {
193
205
  };
194
206
  saveXlsx?: () => void;
195
207
  }
196
- export interface ICustomPrintData extends IBasePrintData {
197
- content: ReactNode;
198
- }
199
- export interface IPrintData extends IBasePrintData {
208
+
209
+ export type IGetPrintData<T> = (props: {
210
+ pagination: IPagination;
211
+ noTotalRows?: boolean;
212
+ }) => Promise<{ items: T[]; totalRows?: number }>;
213
+
214
+ export interface IPrintData<T = unknown> extends IBasePrintData {
215
+ printPopupControl: IPopupControl;
216
+ customHeader?: ITableColumn[][];
217
+ excludeColumnIds?: string[];
218
+ isLoading?: boolean;
219
+ progress?: number;
220
+ tableData?: ITableDataItem[];
221
+ items?: T[];
222
+ paginationControl?: IPaginationControl;
223
+ totals?: ITableDataItem;
200
224
  optionalNode?: {
201
225
  aboveTable?: ReactNode;
202
226
  bellowTable?: ReactNode;
203
227
  };
204
- customHeader?: ITableColumn[][];
205
- excludeColumns?: string[];
206
- getPrintData: (pagination: IPagination) => Promise<{ data: any[]; totalRows?: number }>;
207
- formatPrintData: (data: any) => ITableDataItem[];
208
- totals?: ITableDataItem;
228
+ }
229
+
230
+ export interface ICustomPrintData extends IBasePrintData {
231
+ content: ReactNode;
209
232
  }
210
233
  ///////////////
211
234
 
@@ -13,7 +13,7 @@ export const i18nIUICyrilic = {
13
13
  Close: 'Затвори',
14
14
  Confirm: 'Потврди',
15
15
  Create: 'Креирај',
16
- Delete: 'Избриши',
16
+ Delete: 'Обриши',
17
17
  Edit: 'Измени',
18
18
  FreeText: 'Слободан унос',
19
19
  from: 'од',
@@ -32,6 +32,7 @@ export const i18nIUICyrilic = {
32
32
  Title: 'Наслов',
33
33
  to: 'до',
34
34
  Yes: 'Да',
35
+ LoadingProgress: 'Учитавање...',
35
36
 
36
37
  ////// TABLE //////
37
38
  RefreshData: 'Освежи податке',