@inceptionbg/iui 2.0.16 → 2.0.19
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/dist/index.d.ts +156 -89
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/iui.css +1 -1
- package/package.json +3 -5
- package/src/assets/icons/duotone/faBell.ts +17 -0
- package/src/assets/icons/light/faBell.ts +15 -0
- package/src/assets/icons/light/faEnvelope.ts +15 -0
- package/src/assets/icons/solid/faEnvelopeDot.ts +15 -0
- package/src/components/Button/SplitButton.tsx +5 -5
- package/src/components/Header/Components/ModuleSelect.tsx +5 -5
- package/src/components/Header/Components/Notifications.tsx +208 -0
- package/src/components/Header/Header.tsx +5 -4
- package/src/components/Inputs/NumberInput.tsx +3 -0
- package/src/components/Inputs/Selects/components/SelectWrapper.tsx +20 -30
- package/src/components/Loader/ProgressBar.tsx +1 -1
- package/src/components/Pullover/Pullover.tsx +44 -33
- package/src/components/Table/Table.tsx +5 -3
- package/src/components/Table/components/columns/TableColumnsEdit.tsx +5 -9
- package/src/components/Table/components/edit/TableEditRow.tsx +23 -12
- package/src/components/Table/components/header/TableHeaderRow.tsx +1 -0
- package/src/components/Table/components/items/TableItemActions.tsx +14 -13
- package/src/components/Table/components/print/TablePrint.tsx +1 -5
- package/src/components/Table/components/templates/CreateTemplateDialog.tsx +48 -0
- package/src/components/Table/components/templates/TableTemplates.tsx +24 -4
- package/src/components/Table/contexts/TableContext.tsx +33 -24
- package/src/components/Table/hooks/localHooks/useLocalTableColumns.tsx +6 -4
- package/src/components/Table/hooks/localHooks/useLocalTableData.tsx +17 -11
- package/src/components/Table/hooks/localHooks/useLocalTableKeyboard.ts +8 -6
- package/src/components/Table/hooks/useTableColumns.ts +1 -3
- package/src/components/Table/hooks/useTableEdit.tsx +24 -2
- package/src/components/Table/hooks/useTablePrint.ts +12 -4
- package/src/components/Table/hooks/useTableSelect.ts +1 -1
- package/src/components/Tooltip/Tooltip.tsx +81 -14
- package/src/components/Wrappers/FormWrapper.tsx +1 -1
- package/src/hooks/useIsMenuOpen.ts +3 -3
- package/src/hooks/usePopupControl.ts +9 -4
- package/src/index.ts +23 -4
- package/src/styles/App.scss +1 -0
- package/src/styles/components/_accordions.scss +1 -0
- package/src/styles/components/_badge.scss +7 -0
- package/src/styles/components/_header.scss +14 -1
- package/src/styles/components/_notifications.scss +71 -0
- package/src/styles/components/_page.scss +1 -0
- package/src/styles/components/_pullover.scss +1 -1
- package/src/styles/components/_sidebar.scss +1 -3
- package/src/styles/components/_table.scss +96 -54
- package/src/types/IKeyboard.ts +0 -5
- package/src/types/IMenu.ts +2 -2
- package/src/types/INotifications.ts +15 -0
- package/src/types/IPopup.ts +2 -2
- package/src/types/ISelect.ts +1 -0
- package/src/types/ITable.ts +35 -32
- package/src/utils/i18n/i18nIUICyrilic.ts +12 -0
- package/src/utils/i18n/i18nIUILatin.ts +13 -0
- package/src/utils/i18n/i18nIUIMe.ts +12 -0
- package/src/utils/objectUtils.ts +19 -0
- package/src/utils/tableUtils.ts +1 -1
- package/idea/Notifications.tsx +0 -245
- package/idea/Table/Components/Columns/ColumnsList.tsx +0 -61
- package/idea/Table/Components/Columns/SetColumnsList.tsx +0 -113
|
@@ -18,6 +18,12 @@
|
|
|
18
18
|
border: 2px solid var(--background);
|
|
19
19
|
background-color: var(--primary);
|
|
20
20
|
}
|
|
21
|
+
&.header-btn-badge {
|
|
22
|
+
border: 1px solid var(--primary);
|
|
23
|
+
background-color: var(--danger);
|
|
24
|
+
right: 4px;
|
|
25
|
+
top: 4px;
|
|
26
|
+
}
|
|
21
27
|
// SIZES
|
|
22
28
|
&.s {
|
|
23
29
|
font-size: 10px;
|
|
@@ -36,6 +42,7 @@
|
|
|
36
42
|
border-radius: 20px;
|
|
37
43
|
width: fit-content;
|
|
38
44
|
font-size: 12px;
|
|
45
|
+
box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.3);
|
|
39
46
|
&.success {
|
|
40
47
|
background-color: var(--success-200);
|
|
41
48
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
display: flex;
|
|
10
10
|
align-items: center;
|
|
11
11
|
justify-content: space-between;
|
|
12
|
-
padding:
|
|
12
|
+
padding-left: 8px;
|
|
13
13
|
box-sizing: border-box;
|
|
14
14
|
z-index: 2;
|
|
15
15
|
.header-button {
|
|
@@ -20,8 +20,14 @@
|
|
|
20
20
|
circle {
|
|
21
21
|
fill: var(--white);
|
|
22
22
|
}
|
|
23
|
+
svg {
|
|
24
|
+
height: 24px !important;
|
|
25
|
+
width: 24px !important;
|
|
26
|
+
color: var(--white);
|
|
27
|
+
}
|
|
23
28
|
&:hover,
|
|
24
29
|
&.active {
|
|
30
|
+
// background-color: var(--primary-600);
|
|
25
31
|
background-color: var(--neutral-hover);
|
|
26
32
|
circle {
|
|
27
33
|
fill: var(--primary);
|
|
@@ -91,6 +97,10 @@
|
|
|
91
97
|
gap: 8px;
|
|
92
98
|
height: var(--header-height);
|
|
93
99
|
position: relative;
|
|
100
|
+
border-radius: 32px;
|
|
101
|
+
padding-left: 8px;
|
|
102
|
+
// margin-left: -8px;
|
|
103
|
+
padding-right: 24px;
|
|
94
104
|
cursor: pointer;
|
|
95
105
|
user-select: none;
|
|
96
106
|
-webkit-user-drag: none;
|
|
@@ -123,6 +133,9 @@
|
|
|
123
133
|
background-color: var(--danger);
|
|
124
134
|
right: -5px;
|
|
125
135
|
}
|
|
136
|
+
&:hover {
|
|
137
|
+
background-color: var(--primary-600);
|
|
138
|
+
}
|
|
126
139
|
}
|
|
127
140
|
.header-user-menu {
|
|
128
141
|
top: var(--header-height) !important;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
.notification-button svg {
|
|
2
|
+
color: var(--primary);
|
|
3
|
+
.fa-secondary {
|
|
4
|
+
opacity: 1;
|
|
5
|
+
fill: #ffaa33;
|
|
6
|
+
stroke: #544417;
|
|
7
|
+
stroke-width: 30px;
|
|
8
|
+
stroke-opacity: 0.5;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.notifications {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
max-height: calc(100dvh - var(--header-height) - 40px);
|
|
16
|
+
padding: 16px;
|
|
17
|
+
max-width: min(500px, 90vw);
|
|
18
|
+
.notifications-content-header {
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: 16px;
|
|
23
|
+
margin-bottom: 16px;
|
|
24
|
+
.iui-input-container {
|
|
25
|
+
width: unset;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
.notifications-options {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: space-between;
|
|
32
|
+
gap: 8px;
|
|
33
|
+
border-bottom: var(--border);
|
|
34
|
+
margin-bottom: 8px;
|
|
35
|
+
padding-bottom: 4px;
|
|
36
|
+
}
|
|
37
|
+
.notifications-container {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
flex: 1;
|
|
41
|
+
overflow: auto;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.notification {
|
|
45
|
+
cursor: default;
|
|
46
|
+
padding: 12px;
|
|
47
|
+
border-radius: 8px;
|
|
48
|
+
.notification-header {
|
|
49
|
+
display: flex;
|
|
50
|
+
justify-content: space-between;
|
|
51
|
+
align-items: flex-start;
|
|
52
|
+
gap: 16px;
|
|
53
|
+
.title {
|
|
54
|
+
color: var(--primary-dark);
|
|
55
|
+
font-size: 14px;
|
|
56
|
+
font-weight: bold;
|
|
57
|
+
}
|
|
58
|
+
.date {
|
|
59
|
+
color: var(--neutral);
|
|
60
|
+
font-size: 11px;
|
|
61
|
+
margin: 4px 0;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
.desc {
|
|
65
|
+
font-size: 13px;
|
|
66
|
+
}
|
|
67
|
+
&:hover:not(:has(button:hover:not(:disabled))) {
|
|
68
|
+
background-color: var(--neutral-100);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -22,7 +22,6 @@ $fixedWidth: (500, 600);
|
|
|
22
22
|
display: flex;
|
|
23
23
|
flex-direction: column;
|
|
24
24
|
height: 100dvh;
|
|
25
|
-
overflow: auto;
|
|
26
25
|
overscroll-behavior: none;
|
|
27
26
|
}
|
|
28
27
|
}
|
|
@@ -74,6 +73,7 @@ $fixedWidth: (500, 600);
|
|
|
74
73
|
z-index: 2;
|
|
75
74
|
}
|
|
76
75
|
.pullover-header {
|
|
76
|
+
padding-right: 16px;
|
|
77
77
|
justify-content: space-between;
|
|
78
78
|
.search-input {
|
|
79
79
|
width: min(250px, 50vw);
|
|
@@ -21,14 +21,12 @@
|
|
|
21
21
|
right: -16px;
|
|
22
22
|
border-radius: 50%;
|
|
23
23
|
background-color: white;
|
|
24
|
-
height: 32px;
|
|
25
|
-
width: 32px;
|
|
26
24
|
display: flex;
|
|
27
25
|
align-items: center;
|
|
28
26
|
justify-content: center;
|
|
29
27
|
transition: opacity 0.15s ease-in-out;
|
|
30
28
|
border: 1px solid var(--primary);
|
|
31
|
-
z-index:
|
|
29
|
+
z-index: 11;
|
|
32
30
|
&:active {
|
|
33
31
|
transform: translateY(2px);
|
|
34
32
|
}
|
|
@@ -18,13 +18,15 @@ table {
|
|
|
18
18
|
th {
|
|
19
19
|
padding: 4px 12px;
|
|
20
20
|
font-weight: bold;
|
|
21
|
+
height: 40px;
|
|
21
22
|
p {
|
|
22
23
|
font-size: 12px;
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
.table-container {
|
|
26
27
|
overflow: auto;
|
|
27
|
-
scroll-snap-type:
|
|
28
|
+
// scroll-snap-type: x proximity;
|
|
29
|
+
// scroll-snap-type: y proximity;
|
|
28
30
|
// box-shadow: var(--container-shadow);
|
|
29
31
|
&::-webkit-scrollbar {
|
|
30
32
|
width: 8px;
|
|
@@ -35,23 +37,32 @@ table {
|
|
|
35
37
|
top: 0;
|
|
36
38
|
z-index: 1;
|
|
37
39
|
}
|
|
38
|
-
|
|
39
40
|
//// Body ////
|
|
40
41
|
// Row
|
|
41
|
-
tr
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
// tr,
|
|
43
|
+
// td {
|
|
44
|
+
// scroll-snap-align: start;
|
|
45
|
+
// }
|
|
44
46
|
tbody tr {
|
|
45
47
|
&.clickable:hover,
|
|
46
48
|
&.selected {
|
|
47
|
-
background-color:
|
|
49
|
+
background-color: #f2f2f2;
|
|
50
|
+
.sticky-column {
|
|
51
|
+
background-color: #f2f2f2;
|
|
52
|
+
}
|
|
48
53
|
}
|
|
49
54
|
&:has(.iui-icon-btn:hover),
|
|
50
55
|
&:has(a:hover) {
|
|
51
56
|
background-color: transparent !important;
|
|
57
|
+
.sticky-column {
|
|
58
|
+
background-color: var(--background) !important;
|
|
59
|
+
}
|
|
52
60
|
}
|
|
53
61
|
&.focused {
|
|
54
62
|
background-color: var(--primary-100);
|
|
63
|
+
.sticky-column {
|
|
64
|
+
background-color: var(--primary-100);
|
|
65
|
+
}
|
|
55
66
|
}
|
|
56
67
|
&.loading {
|
|
57
68
|
opacity: 0.5;
|
|
@@ -71,6 +82,7 @@ table {
|
|
|
71
82
|
font-size: 14px;
|
|
72
83
|
height: 48px;
|
|
73
84
|
padding: 6px 12px;
|
|
85
|
+
// background-color: var(--background);
|
|
74
86
|
&.s {
|
|
75
87
|
height: 40px;
|
|
76
88
|
padding: 2px 12px;
|
|
@@ -80,8 +92,8 @@ table {
|
|
|
80
92
|
padding: 2px 12px;
|
|
81
93
|
}
|
|
82
94
|
}
|
|
83
|
-
.clickable-
|
|
84
|
-
background-color: var(--primary-
|
|
95
|
+
.clickable-cell:hover {
|
|
96
|
+
background-color: var(--primary-100) !important;
|
|
85
97
|
}
|
|
86
98
|
// Item Actions
|
|
87
99
|
.table-item-actions {
|
|
@@ -140,13 +152,30 @@ table {
|
|
|
140
152
|
}
|
|
141
153
|
|
|
142
154
|
@media #{bp.$landscape} {
|
|
155
|
+
thead {
|
|
156
|
+
box-shadow: 0 2px 5px -2px rgba(0, 0, 0, 0.2);
|
|
157
|
+
}
|
|
143
158
|
td,
|
|
144
159
|
th {
|
|
145
160
|
border-right: var(--border-light);
|
|
146
161
|
&:first-child:not(.not-first-cell) {
|
|
147
162
|
border-left: var(--border-light);
|
|
148
163
|
}
|
|
164
|
+
&.sticky-column {
|
|
165
|
+
position: sticky;
|
|
166
|
+
left: 0;
|
|
167
|
+
transition: background-color 250ms;
|
|
168
|
+
// box-shadow: 2px 0 5px -2px rgba(0, 0, 0, 0.2);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
th.sticky-column {
|
|
172
|
+
top: 0;
|
|
173
|
+
background-color: var(--neutral-100);
|
|
149
174
|
}
|
|
175
|
+
td.sticky-column {
|
|
176
|
+
background-color: var(--background);
|
|
177
|
+
}
|
|
178
|
+
|
|
150
179
|
.select-col,
|
|
151
180
|
.actions-col {
|
|
152
181
|
padding: 0;
|
|
@@ -210,54 +239,73 @@ table {
|
|
|
210
239
|
.table-sort-item {
|
|
211
240
|
flex-direction: row-reverse;
|
|
212
241
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
242
|
+
|
|
243
|
+
.column-pullover {
|
|
244
|
+
.pullover-content {
|
|
245
|
+
overflow: hidden;
|
|
246
|
+
display: flex;
|
|
247
|
+
flex-direction: column;
|
|
218
248
|
}
|
|
219
|
-
.list-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
249
|
+
.dual-list-container {
|
|
250
|
+
flex: 1;
|
|
251
|
+
display: flex;
|
|
252
|
+
flex-direction: column;
|
|
253
|
+
min-height: 0;
|
|
254
|
+
|
|
255
|
+
.dual-list-content {
|
|
256
|
+
display: grid;
|
|
257
|
+
grid-template-columns: 1fr auto 1fr;
|
|
258
|
+
grid-template-rows: auto auto 1fr;
|
|
259
|
+
gap: 16px 12px;
|
|
260
|
+
flex: 1;
|
|
261
|
+
min-height: 0;
|
|
262
|
+
}
|
|
263
|
+
.list-box {
|
|
264
|
+
border: var(--border-light);
|
|
265
|
+
border-radius: 8px;
|
|
266
|
+
padding: 8px;
|
|
267
|
+
user-select: none;
|
|
268
|
+
overflow-y: auto;
|
|
269
|
+
|
|
270
|
+
& > .item {
|
|
271
|
+
display: flex;
|
|
272
|
+
justify-content: space-between;
|
|
273
|
+
align-items: center;
|
|
274
|
+
padding: 8px;
|
|
275
|
+
font-size: 14px;
|
|
276
|
+
svg {
|
|
277
|
+
color: var(--text);
|
|
278
|
+
margin-left: 1rem;
|
|
279
|
+
}
|
|
280
|
+
&:hover {
|
|
281
|
+
background-color: var(--primary-o10);
|
|
282
|
+
}
|
|
283
|
+
&:active {
|
|
284
|
+
background-color: var(--primary-o25);
|
|
285
|
+
}
|
|
286
|
+
&.dragging {
|
|
287
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
288
|
+
background-color: #fff !important;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
.exchange-icon {
|
|
225
293
|
display: flex;
|
|
226
|
-
justify-content: space-between;
|
|
227
294
|
align-items: center;
|
|
228
|
-
padding: 8px;
|
|
229
|
-
font-size: 14spx;
|
|
230
295
|
svg {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
}
|
|
234
|
-
&:hover {
|
|
235
|
-
background-color: var(--primary-o10);
|
|
236
|
-
}
|
|
237
|
-
&:active {
|
|
238
|
-
background-color: var(--primary-o25);
|
|
239
|
-
}
|
|
240
|
-
&.dragging {
|
|
241
|
-
transform: scale(1.02);
|
|
242
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
243
|
-
background-color: #fff !important;
|
|
296
|
+
height: 20px;
|
|
297
|
+
width: 20px;
|
|
244
298
|
}
|
|
245
299
|
}
|
|
246
300
|
}
|
|
247
|
-
.exchange-icon {
|
|
248
|
-
display: flex;
|
|
249
|
-
align-items: center;
|
|
250
|
-
svg {
|
|
251
|
-
height: 20px;
|
|
252
|
-
width: 20px;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
301
|
}
|
|
256
302
|
|
|
257
303
|
.edit-row {
|
|
258
304
|
background: var(--neutral-100);
|
|
259
305
|
td {
|
|
260
|
-
|
|
306
|
+
&.editable {
|
|
307
|
+
padding: 4px;
|
|
308
|
+
}
|
|
261
309
|
.iui-input-wrapper-field {
|
|
262
310
|
// border: none;
|
|
263
311
|
// border-radius: 0;
|
|
@@ -269,16 +317,10 @@ table {
|
|
|
269
317
|
}
|
|
270
318
|
}
|
|
271
319
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
320
|
+
.primary-row {
|
|
321
|
+
background-color: var(--primary-100);
|
|
322
|
+
}
|
|
323
|
+
|
|
275
324
|
// .secondary-row {
|
|
276
325
|
// background-color: #f1f1f1;
|
|
277
326
|
// }
|
|
278
|
-
|
|
279
|
-
// .table-options {
|
|
280
|
-
// display: flex;
|
|
281
|
-
// align-items: center;
|
|
282
|
-
// justify-content: space-between;
|
|
283
|
-
// padding: 8px;
|
|
284
|
-
// }
|
package/src/types/IKeyboard.ts
CHANGED
|
@@ -13,11 +13,6 @@ export interface IKeyboardAction {
|
|
|
13
13
|
export interface ITableKeyboardActionsBase {
|
|
14
14
|
moveDisabled?: boolean;
|
|
15
15
|
editDisabled?: boolean;
|
|
16
|
-
delete?: {
|
|
17
|
-
enabled: boolean;
|
|
18
|
-
setItemToDeleteUuids: (itemUuids: string[]) => void;
|
|
19
|
-
onAction?: () => void;
|
|
20
|
-
};
|
|
21
16
|
additional?: (props: {
|
|
22
17
|
focusedRow: ITableDataItem | null;
|
|
23
18
|
isEditing: boolean;
|
package/src/types/IMenu.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IconDefinition, RotateProp } from '@fortawesome/fontawesome-svg-core';
|
|
2
|
-
import { MouseEventHandler } from 'react';
|
|
1
|
+
import type { IconDefinition, RotateProp } from '@fortawesome/fontawesome-svg-core';
|
|
2
|
+
import type { MouseEventHandler } from 'react';
|
|
3
3
|
|
|
4
4
|
export type IMenuPlacement = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
5
5
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface INotification {
|
|
2
|
+
uuid: string;
|
|
3
|
+
type: INotificationType;
|
|
4
|
+
values?: {
|
|
5
|
+
key: string;
|
|
6
|
+
value: string;
|
|
7
|
+
url?: string;
|
|
8
|
+
format?: 'TRANSLATE' | 'DATE' | 'DATE_TIME';
|
|
9
|
+
}[];
|
|
10
|
+
seen: boolean;
|
|
11
|
+
event: string;
|
|
12
|
+
organization?: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
}
|
|
15
|
+
export type INotificationType = 'WEB' | 'EMAIL';
|
package/src/types/IPopup.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
|
|
3
|
-
export interface
|
|
3
|
+
export interface IPopupControlRef {
|
|
4
4
|
onOpen: () => void;
|
|
5
5
|
onClose: () => void;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export interface ILocalPopupControl {
|
|
9
|
-
controlRef: RefObject<
|
|
9
|
+
controlRef: RefObject<IPopupControlRef | null>;
|
|
10
10
|
isOpen: boolean;
|
|
11
11
|
setIsOpen: (isOpen: boolean) => void;
|
|
12
12
|
}
|
package/src/types/ISelect.ts
CHANGED
package/src/types/ITable.ts
CHANGED
|
@@ -6,23 +6,24 @@ import { IPopupControl } from './IPopup';
|
|
|
6
6
|
export interface ITable<T = unknown> {
|
|
7
7
|
id?: string;
|
|
8
8
|
columnData: ITableColumnsData;
|
|
9
|
-
data: ITableDataItem[];
|
|
10
|
-
dataActions?: ITableDataActions
|
|
9
|
+
data: ITableDataItem<T>[];
|
|
10
|
+
dataActions?: ITableDataActions<T>;
|
|
11
11
|
rowSelect?: {
|
|
12
12
|
selectedRows: Set<string>;
|
|
13
13
|
setSelectedRows: Dispatch<SetStateAction<Set<string>>>;
|
|
14
|
-
actions
|
|
14
|
+
actions?: ITableSelectedAction[];
|
|
15
15
|
};
|
|
16
16
|
filterData?: ITableFilterData;
|
|
17
17
|
sortData?: ITableSortData;
|
|
18
18
|
templateData?: ITableTemplateData;
|
|
19
19
|
printData?: IPrintData<T>;
|
|
20
|
-
sumRows?: ITableDataItem[];
|
|
21
|
-
editable?: ITableEdit
|
|
20
|
+
sumRows?: ITableDataItem<T>[];
|
|
21
|
+
editable?: ITableEdit<T>;
|
|
22
22
|
selectedRowUuid?: string;
|
|
23
|
+
itemDeleteData?: ITableItemDeleteData;
|
|
23
24
|
keyboard?: {
|
|
24
25
|
enabled: boolean;
|
|
25
|
-
actions
|
|
26
|
+
actions?: ITableKeyboardActionsBase;
|
|
26
27
|
};
|
|
27
28
|
headerWrap?: boolean;
|
|
28
29
|
customHeader?: ITableColumn[][];
|
|
@@ -49,14 +50,16 @@ export interface ITableColumn {
|
|
|
49
50
|
label?: string | ReactElement;
|
|
50
51
|
labelForFilter?: string;
|
|
51
52
|
align?: 'center' | 'left' | 'right' | 'justify' | undefined;
|
|
52
|
-
hidden?: boolean;
|
|
53
53
|
unavailable?: boolean;
|
|
54
|
+
hidden?: boolean;
|
|
55
|
+
printHidden?: boolean;
|
|
54
56
|
width?: string;
|
|
55
57
|
minWidth?: string;
|
|
56
58
|
colSpan?: number;
|
|
57
59
|
rowSpan?: number;
|
|
58
60
|
break?: boolean;
|
|
59
61
|
color?: 'secondary';
|
|
62
|
+
sticky?: boolean;
|
|
60
63
|
sortOptions?: {
|
|
61
64
|
asc: string;
|
|
62
65
|
desc: string;
|
|
@@ -67,11 +70,11 @@ export interface ITableColumn {
|
|
|
67
70
|
className?: string;
|
|
68
71
|
}
|
|
69
72
|
|
|
70
|
-
export interface ITableDataItem {
|
|
73
|
+
export interface ITableDataItem<T = unknown> {
|
|
71
74
|
uuid: string;
|
|
72
75
|
onRowClick?: (event?: MouseEvent<HTMLTableRowElement>) => void;
|
|
73
76
|
className?: string;
|
|
74
|
-
item?:
|
|
77
|
+
item?: T;
|
|
75
78
|
disableSelect?: boolean;
|
|
76
79
|
cells: ITableDataItemCells;
|
|
77
80
|
extendable?: {
|
|
@@ -93,18 +96,13 @@ export interface ITableDataItemCells {
|
|
|
93
96
|
};
|
|
94
97
|
}
|
|
95
98
|
|
|
96
|
-
export interface ITableDataActions {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
};
|
|
100
|
-
delete?: {
|
|
101
|
-
onClick: (itemUuid: string) => void;
|
|
102
|
-
hasAccess: boolean;
|
|
103
|
-
};
|
|
104
|
-
actions?: {
|
|
99
|
+
export interface ITableDataActions<T = unknown> {
|
|
100
|
+
hasEditAccess: boolean;
|
|
101
|
+
actions?: (item?: T) => {
|
|
105
102
|
label: string;
|
|
106
|
-
onClick: (
|
|
103
|
+
onClick: () => void;
|
|
107
104
|
hasAccess: boolean;
|
|
105
|
+
disabled?: boolean;
|
|
108
106
|
}[];
|
|
109
107
|
}
|
|
110
108
|
export interface ITableFilterData {
|
|
@@ -156,25 +154,23 @@ export interface ITableSelectedAction {
|
|
|
156
154
|
export interface ITableTemplateData {
|
|
157
155
|
identifier: string;
|
|
158
156
|
popupController: IPopupControl;
|
|
157
|
+
defaultTemplate?: IReportTemplate;
|
|
159
158
|
items: IReportTemplate[];
|
|
160
159
|
isLoading?: boolean;
|
|
161
160
|
isFetching?: boolean;
|
|
162
161
|
setSearch?: (search: string) => void;
|
|
163
|
-
initiateCreate: () => void;
|
|
164
|
-
initiateCreateDefault: () => void;
|
|
165
162
|
setItemToDeleteUuids: (itemUuids: string[]) => void;
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
TemplateNode: ReactNode;
|
|
163
|
+
DeleteDialog: ReactNode;
|
|
164
|
+
createItem: {
|
|
165
|
+
allowPublicCreate?: boolean;
|
|
166
|
+
onCreate: (data: Partial<IReportTemplate>) => void;
|
|
167
|
+
onCreateDefault: () => void;
|
|
168
|
+
};
|
|
173
169
|
}
|
|
174
170
|
///// EDIT /////
|
|
175
|
-
export interface ITableEdit<T =
|
|
176
|
-
selectedItem: T | null;
|
|
177
|
-
setSelectedItem: (item: T | null) => void;
|
|
171
|
+
export interface ITableEdit<T = unknown> {
|
|
172
|
+
selectedItem: ITableDataItem<T> | null;
|
|
173
|
+
setSelectedItem: (item: ITableDataItem<T> | null) => void;
|
|
178
174
|
editData: Partial<T>;
|
|
179
175
|
setEditData: Dispatch<SetStateAction<Partial<T>>>;
|
|
180
176
|
onSubmit: (data: T, onSubmitCallback: () => void) => void;
|
|
@@ -186,6 +182,14 @@ export interface ITableEdit<T = any> {
|
|
|
186
182
|
keepEditOnSubmit?: boolean;
|
|
187
183
|
}
|
|
188
184
|
|
|
185
|
+
///// DELETE /////
|
|
186
|
+
export interface ITableItemDeleteData {
|
|
187
|
+
hasAccess: boolean;
|
|
188
|
+
itemToDeleteUuids: string[];
|
|
189
|
+
setItemToDeleteUuids: Dispatch<SetStateAction<string[]>>;
|
|
190
|
+
DeleteDialog: ReactNode;
|
|
191
|
+
}
|
|
192
|
+
|
|
189
193
|
///// PRINT /////
|
|
190
194
|
export interface IBasePrintData {
|
|
191
195
|
label: string;
|
|
@@ -211,7 +215,6 @@ export type IGetPrintData<T> = (props: {
|
|
|
211
215
|
export interface IPrintData<T = unknown> extends IBasePrintData {
|
|
212
216
|
printPopupControl: IPopupControl;
|
|
213
217
|
customHeader?: ITableColumn[][];
|
|
214
|
-
excludeColumnIds?: string[];
|
|
215
218
|
isLoading?: boolean;
|
|
216
219
|
progress?: number;
|
|
217
220
|
tableData?: ITableDataItem[];
|
|
@@ -91,6 +91,18 @@ export const i18nIUICyrilic = {
|
|
|
91
91
|
ErrorMessage: 'Дошло је до грешке!',
|
|
92
92
|
TryAgain: 'Покушај поново',
|
|
93
93
|
|
|
94
|
+
////// NOTIFICATIONS //////
|
|
95
|
+
InApp: 'U aplikaciji',
|
|
96
|
+
MarkAllAsRead: 'Означи све као прочитано',
|
|
97
|
+
NoNewNotifications: 'Немате нове нотификације',
|
|
98
|
+
Notifications: 'Нотификације',
|
|
99
|
+
NotificationsAll: 'Све',
|
|
100
|
+
NotificationsUnread: 'Непрочитане',
|
|
101
|
+
NotificationsRead: 'Прочитане',
|
|
102
|
+
NotificationSound: 'Звук нотификације',
|
|
103
|
+
// NTitleADD_DOC: 'Додат је документ на платформу',
|
|
104
|
+
// NContentADD_DOC: 'Документ са бројем <documentNumber>{{- documentNumber}}</documentNumber> је додат на платформу',
|
|
105
|
+
|
|
94
106
|
////// PAGES //////
|
|
95
107
|
ReturnToHomepage: 'Повратак на почетну страну',
|
|
96
108
|
FooterText: `Инцептион ЦА је акредитовано сертификационо тело за квалификовану електронску доставу,
|
|
@@ -91,6 +91,19 @@ export const i18nIUILatin = {
|
|
|
91
91
|
ErrorMessage: 'Došlo je do greške!',
|
|
92
92
|
TryAgain: 'Pokušaj ponovo',
|
|
93
93
|
|
|
94
|
+
////// NOTIFICATIONS //////
|
|
95
|
+
InApp: 'In-app',
|
|
96
|
+
// MarkAsRead: 'Označi kao pročitano',
|
|
97
|
+
MarkAllAsRead: 'Označi sve kao pročitano',
|
|
98
|
+
NoNewNotifications: 'Nemate nove notifikacije',
|
|
99
|
+
Notifications: 'Notifikacije',
|
|
100
|
+
NotificationsAll: 'Sve',
|
|
101
|
+
NotificationsUnread: 'Nepročitane',
|
|
102
|
+
NotificationsRead: 'Pročitane',
|
|
103
|
+
NotificationSound: 'Zvuk notifikacije',
|
|
104
|
+
// NTitleADD_DOC: 'Dodat je dokument na platformu',
|
|
105
|
+
// NContentADD_DOC: 'Dokument sa brojem <documentNumber>{{- documentNumber}}</documentNumber> je dodat na platformu',
|
|
106
|
+
|
|
94
107
|
////// PAGES //////
|
|
95
108
|
ReturnToHomepage: 'Povratak na početnu stranu',
|
|
96
109
|
FooterText: `Inception CA je akreditovano sertifikaciono telo za kvalifikovanu elektronsku dostavu,
|
|
@@ -90,6 +90,18 @@ export const i18nIUIMe = {
|
|
|
90
90
|
ErrorMessage: 'Došlo je do greške!',
|
|
91
91
|
TryAgain: 'Pokušajte ponovo',
|
|
92
92
|
|
|
93
|
+
////// NOTIFICATIONS //////
|
|
94
|
+
InApp: 'In-app',
|
|
95
|
+
MarkAllAsRead: 'Označi sve kao pročitano',
|
|
96
|
+
NoNewNotifications: 'Nemate nove notifikacije',
|
|
97
|
+
Notifications: 'Notifikacije',
|
|
98
|
+
NotificationsAll: 'Sve',
|
|
99
|
+
NotificationsUnread: 'Nepročitane',
|
|
100
|
+
NotificationsRead: 'Pročitane',
|
|
101
|
+
NotificationSound: 'Zvuk notifikacije',
|
|
102
|
+
// NTitleADD_DOC: 'Dodat je dokument na platformu',
|
|
103
|
+
// NContentADD_DOC: 'Dokument sa brojem <documentNumber>{{- documentNumber}}</documentNumber> je dodat na platformu',
|
|
104
|
+
|
|
93
105
|
////// PAGES //////
|
|
94
106
|
ReturnToHomepage: 'Povratak na početnu stranicu',
|
|
95
107
|
FooterText: '',
|