@topconsultnpm/sdkui-react 6.20.0-dev1.5 → 6.20.0-dev1.50

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 (70) hide show
  1. package/lib/components/NewComponents/ContextMenu/TMContextMenu.d.ts +4 -0
  2. package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +302 -0
  3. package/lib/components/NewComponents/ContextMenu/hooks.d.ts +13 -0
  4. package/lib/components/NewComponents/ContextMenu/hooks.js +61 -0
  5. package/lib/components/NewComponents/ContextMenu/index.d.ts +2 -0
  6. package/lib/components/NewComponents/ContextMenu/index.js +1 -0
  7. package/lib/components/NewComponents/ContextMenu/styles.d.ts +31 -0
  8. package/lib/components/NewComponents/ContextMenu/styles.js +336 -0
  9. package/lib/components/NewComponents/ContextMenu/types.d.ts +38 -0
  10. package/lib/components/NewComponents/ContextMenu/types.js +1 -0
  11. package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.d.ts +4 -0
  12. package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +686 -0
  13. package/lib/components/NewComponents/FloatingMenuBar/index.d.ts +2 -0
  14. package/lib/components/NewComponents/FloatingMenuBar/index.js +2 -0
  15. package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +47 -0
  16. package/lib/components/NewComponents/FloatingMenuBar/styles.js +346 -0
  17. package/lib/components/NewComponents/FloatingMenuBar/types.d.ts +28 -0
  18. package/lib/components/NewComponents/FloatingMenuBar/types.js +1 -0
  19. package/lib/components/base/TMCustomButton.js +61 -17
  20. package/lib/components/base/TMDataGrid.d.ts +7 -4
  21. package/lib/components/base/TMDataGrid.js +112 -11
  22. package/lib/components/choosers/TMMetadataChooser.js +8 -1
  23. package/lib/components/editors/TMMetadataValues.js +23 -5
  24. package/lib/components/features/documents/TMDcmtForm.d.ts +13 -1
  25. package/lib/components/features/documents/TMDcmtForm.js +385 -193
  26. package/lib/components/features/documents/TMDcmtPreview.js +37 -66
  27. package/lib/components/features/documents/TMMasterDetailDcmts.js +1 -1
  28. package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +8 -0
  29. package/lib/components/features/search/{TMSearchResultCheckoutInfoForm.js → TMDcmtCheckoutInfoForm.js} +5 -10
  30. package/lib/components/features/search/TMSearch.js +30 -5
  31. package/lib/components/features/search/TMSearchQueryPanel.js +13 -12
  32. package/lib/components/features/search/TMSearchResult.js +58 -208
  33. package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +3 -3
  34. package/lib/components/features/search/TMSearchResultsMenuItems.js +205 -169
  35. package/lib/components/features/search/TMSignSettingsForm.js +1 -1
  36. package/lib/components/features/search/TMSignatureInfoContent.d.ts +6 -0
  37. package/lib/components/features/search/TMSignatureInfoContent.js +140 -0
  38. package/lib/components/features/search/TMViewHistoryDcmt.js +1 -1
  39. package/lib/components/features/tasks/TMTasksView.js +2 -2
  40. package/lib/components/features/workflow/diagram/WFDiagram.js +2 -2
  41. package/lib/components/forms/Login/LoginValidatorService.d.ts +2 -0
  42. package/lib/components/forms/Login/LoginValidatorService.js +7 -2
  43. package/lib/components/forms/Login/TMLoginForm.js +34 -6
  44. package/lib/components/forms/TMChooserForm.js +1 -1
  45. package/lib/components/index.d.ts +1 -0
  46. package/lib/components/index.js +1 -0
  47. package/lib/css/tm-sdkui.css +1 -1
  48. package/lib/helper/SDKUI_Globals.d.ts +17 -0
  49. package/lib/helper/SDKUI_Globals.js +9 -0
  50. package/lib/helper/SDKUI_Localizator.d.ts +2 -1
  51. package/lib/helper/SDKUI_Localizator.js +11 -1
  52. package/lib/helper/TMIcons.d.ts +1 -0
  53. package/lib/helper/TMIcons.js +3 -0
  54. package/lib/helper/TMPdfViewer.d.ts +8 -0
  55. package/lib/helper/TMPdfViewer.js +187 -0
  56. package/lib/helper/checkinCheckoutManager.d.ts +32 -2
  57. package/lib/helper/checkinCheckoutManager.js +115 -38
  58. package/lib/helper/devextremeCustomMessages.d.ts +30 -0
  59. package/lib/helper/devextremeCustomMessages.js +30 -0
  60. package/lib/helper/helpers.d.ts +2 -1
  61. package/lib/helper/helpers.js +12 -2
  62. package/lib/helper/index.d.ts +1 -0
  63. package/lib/helper/index.js +1 -0
  64. package/lib/helper/queryHelper.js +29 -0
  65. package/lib/hooks/useCheckInOutOperations.d.ts +28 -0
  66. package/lib/hooks/useCheckInOutOperations.js +223 -0
  67. package/lib/hooks/useWorkflowApprove.d.ts +4 -0
  68. package/lib/hooks/useWorkflowApprove.js +14 -1
  69. package/package.json +5 -2
  70. package/lib/components/features/search/TMSearchResultCheckoutInfoForm.d.ts +0 -8
@@ -0,0 +1,336 @@
1
+ import styled, { keyframes } from 'styled-components';
2
+ const fadeIn = keyframes `
3
+ from {
4
+ opacity: 0;
5
+ transform: scale(0.95);
6
+ }
7
+ to {
8
+ opacity: 1;
9
+ transform: scale(1);
10
+ }
11
+ `;
12
+ const slideIn = keyframes `
13
+ from {
14
+ opacity: 0;
15
+ transform: translateX(-10px);
16
+ }
17
+ to {
18
+ opacity: 1;
19
+ transform: translateX(0);
20
+ }
21
+ `;
22
+ export const MenuContainer = styled.div `
23
+ position: fixed;
24
+ left: ${props => props.$openLeft ? 'auto' : `${props.$x}px`};
25
+ right: ${props => props.$openLeft ? `${window.innerWidth - props.$x}px` : 'auto'};
26
+ top: ${props => props.$openUp ? 'auto' : `${props.$y}px`};
27
+ bottom: ${props => props.$openUp ? `${window.innerHeight - props.$y}px` : 'auto'};
28
+ z-index: 10100;
29
+ background: #ffffff;
30
+ border-radius: 12px;
31
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
32
+ 0 2px 8px rgba(0, 0, 0, 0.08);
33
+ min-width: max-content;
34
+ width: max-content;
35
+ padding: 4px 0;
36
+ animation: ${fadeIn} 0.15s ease-out;
37
+ backdrop-filter: blur(10px);
38
+ border: 1px solid rgba(0, 0, 0, 0.06);
39
+ opacity: ${props => props.$isPositioned ? 1 : 0};
40
+ transition: opacity 0.05s ease-in;
41
+
42
+ /* Reset color inheritance from parent with !important to override panel header styles */
43
+ & *:not(svg):not(.right-icon-btn):not(.right-icon-btn *) {
44
+ color: #1a1a1a !important;
45
+ }
46
+
47
+ [data-theme='dark'] & {
48
+ background: #2a2a2a;
49
+ border-color: rgba(255, 255, 255, 0.1);
50
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
51
+ 0 2px 8px rgba(0, 0, 0, 0.3);
52
+ }
53
+
54
+ [data-theme='dark'] & *:not(svg):not(.right-icon-btn):not(.right-icon-btn *) {
55
+ color: #e0e0e0 !important;
56
+ }
57
+
58
+ ${props => props.$externalControl && `
59
+ @media (max-width: 768px) {
60
+ left: 100px !important;
61
+ right: 100px !important;
62
+ max-width: calc(100vw - 200px);
63
+ width: auto;
64
+ min-width: auto;
65
+ }
66
+ `}
67
+ `;
68
+ export const MenuItem = styled.div `
69
+ display: flex;
70
+ align-items: center;
71
+ justify-content: space-between;
72
+ padding: 4px 12px;
73
+ cursor: ${props => props.$disabled ? 'default' : 'pointer'};
74
+ transition: all 0.15s ease;
75
+ position: relative;
76
+ user-select: none;
77
+ font-size: 13px;
78
+ color: ${props => props.$disabled ? '#999' : '#1a1a1a'};
79
+ font-weight: 500;
80
+ ${props => props.$beginGroup && `
81
+ border-top: 1px solid rgba(0, 0, 0, 0.1);
82
+ margin-top: 4px;
83
+ padding-top: 8px;
84
+ `}
85
+
86
+ /* Apply opacity only to direct children except right-icon-btn */
87
+ & > *:not(.right-icon-btn) {
88
+ opacity: ${props => props.$disabled ? 0.4 : 1};
89
+ }
90
+
91
+ /* Right icon button hidden by default, shown on hover */
92
+ & .right-icon-btn {
93
+ cursor: pointer !important;
94
+ }
95
+
96
+ &:hover {
97
+ ${props => !props.$disabled && `
98
+ background: linear-gradient(90deg, #f0f7ff 0%, #e6f2ff 100%);
99
+ color: #0066cc;
100
+ `}
101
+
102
+ /* Show right icon on hover */
103
+ & .right-icon-btn {
104
+ opacity: 1 !important;
105
+ }
106
+ }
107
+
108
+ &:active {
109
+ ${props => !props.$disabled && `
110
+ background: linear-gradient(90deg, #e6f2ff 0%, #d9ebff 100%);
111
+ transform: scale(0.98);
112
+ `}
113
+ }
114
+
115
+ [data-theme='dark'] & {
116
+ color: ${props => props.$disabled ? '#666' : '#e0e0e0'};
117
+ ${props => props.$beginGroup && `
118
+ border-top-color: rgba(255, 255, 255, 0.1);
119
+ `}
120
+
121
+ &:hover {
122
+ ${props => !props.$disabled && `
123
+ background: linear-gradient(90deg, #1a3a52 0%, #1e4159 100%);
124
+ color: #4db8ff;
125
+ `}
126
+ }
127
+
128
+ &:active {
129
+ ${props => !props.$disabled && `
130
+ background: linear-gradient(90deg, #1e4159 0%, #234a66 100%);
131
+ `}
132
+ }
133
+ }
134
+
135
+ @media (max-width: 768px) {
136
+ padding: 4px 10px;
137
+ font-size: 12px;
138
+ }
139
+ `;
140
+ export const MenuItemContent = styled.div `
141
+ display: flex;
142
+ align-items: center;
143
+ gap: 10px;
144
+ flex: 1;
145
+ `;
146
+ export const IconWrapper = styled.span `
147
+ display: flex;
148
+ align-items: center;
149
+ justify-content: center;
150
+ font-size: 14px;
151
+ width: 18px;
152
+ height: 18px;
153
+ `;
154
+ export const MenuItemName = styled.span `
155
+ flex: 1;
156
+ white-space: normal;
157
+ word-wrap: break-word;
158
+ overflow-wrap: break-word;
159
+ line-height: 1.4;
160
+ `;
161
+ export const RightIconButton = styled.button.attrs({
162
+ className: 'right-icon-btn'
163
+ }) `
164
+ display: flex;
165
+ align-items: center;
166
+ justify-content: center;
167
+ background: transparent;
168
+ border: none;
169
+ cursor: pointer !important;
170
+ padding: 4px 8px;
171
+ margin-left: 8px;
172
+ border-radius: 6px;
173
+ font-size: 14px;
174
+ opacity: 0 !important;
175
+ transition: opacity 0.15s ease, background 0.15s ease, transform 0.15s ease;
176
+
177
+ &:hover {
178
+ background: rgba(0, 0, 0, 0.05);
179
+ transform: scale(1.1);
180
+ }
181
+
182
+ &:active {
183
+ transform: scale(0.95);
184
+ }
185
+
186
+ [data-theme='dark'] & {
187
+ &:hover {
188
+ background: rgba(255, 255, 255, 0.1);
189
+ }
190
+ }
191
+ `;
192
+ export const SubmenuIndicator = styled.span `
193
+ display: flex;
194
+ align-items: center;
195
+ font-size: 12px;
196
+ margin-left: 8px;
197
+ opacity: 0.6;
198
+ transition: transform 0.15s ease;
199
+
200
+ ${MenuItem}:hover & {
201
+ ${props => !props.$isMobile && `
202
+ transform: translateX(2px);
203
+ opacity: 1;
204
+ `}
205
+ }
206
+ `;
207
+ export const Submenu = styled.div `
208
+ position: fixed;
209
+ left: ${props => {
210
+ const spaceOnRight = globalThis.innerWidth - props.$parentRect.right;
211
+ return spaceOnRight > 240 ? `${props.$parentRect.right - 8}px` : 'auto';
212
+ }};
213
+ right: ${props => {
214
+ const spaceOnRight = globalThis.innerWidth - props.$parentRect.right;
215
+ return spaceOnRight > 240 ? 'auto' : `${globalThis.innerWidth - props.$parentRect.left + 8}px`;
216
+ }};
217
+ /* Vertical positioning: Each submenu independently decides direction based on its own space */
218
+ top: ${props => {
219
+ // If openUp is true, don't anchor to top
220
+ return props.$openUp ? 'auto' : `${props.$parentRect.top - 8}px`;
221
+ }};
222
+ bottom: ${props => {
223
+ // If openUp is true, anchor to bottom and grow upward
224
+ return props.$openUp ? `${globalThis.innerHeight - props.$parentRect.bottom - 8}px` : 'auto';
225
+ }};
226
+ z-index: 10101;
227
+ background: #ffffff;
228
+ border-radius: 12px;
229
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
230
+ 0 2px 8px rgba(0, 0, 0, 0.08);
231
+ min-width: max-content;
232
+ width: max-content;
233
+ padding: 4px 0;
234
+ animation: ${slideIn} 0.15s ease-out;
235
+ backdrop-filter: blur(10px);
236
+ border: 1px solid rgba(0, 0, 0, 0.06);
237
+
238
+ /* Add invisible padding to bridge the gap - works for both sides */
239
+ &::before {
240
+ content: '';
241
+ position: absolute;
242
+ right: 100%;
243
+ top: 0;
244
+ bottom: 0;
245
+ width: 15px;
246
+ background: transparent;
247
+ }
248
+
249
+ /* Bridge on the right side for nested submenus */
250
+ &::after {
251
+ content: '';
252
+ position: absolute;
253
+ left: 100%;
254
+ top: 0;
255
+ bottom: 0;
256
+ width: 15px;
257
+ background: transparent;
258
+ }
259
+
260
+ /* Reset color inheritance from parent with !important to override panel header styles */
261
+ & *:not(svg):not(.right-icon-btn):not(.right-icon-btn *) {
262
+ color: #1a1a1a !important;
263
+ }
264
+
265
+ [data-theme='dark'] & {
266
+ background: #2a2a2a;
267
+ border-color: rgba(255, 255, 255, 0.1);
268
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
269
+ 0 2px 8px rgba(0, 0, 0, 0.3);
270
+ }
271
+
272
+ [data-theme='dark'] & *:not(svg):not(.right-icon-btn):not(.right-icon-btn *) {
273
+ color: #e0e0e0 !important;
274
+ }
275
+ `;
276
+ export const MobileMenuHeader = styled.div `
277
+ display: flex;
278
+ align-items: center;
279
+ padding: 4px 8px;
280
+ border-bottom: 1px solid rgba(0, 0, 0, 0.08);
281
+ margin-bottom: 8px;
282
+ gap: 12px;
283
+ background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
284
+ border-radius: 12px 12px 0 0;
285
+
286
+ [data-theme='dark'] & {
287
+ background: linear-gradient(180deg, #1a1a1a 0%, #2a2a2a 100%);
288
+ border-bottom-color: rgba(255, 255, 255, 0.1);
289
+ }
290
+ `;
291
+ export const BackButton = styled.button `
292
+ display: flex;
293
+ align-items: center;
294
+ justify-content: center;
295
+ border: none;
296
+ border-radius: 8px;
297
+ width: 32px;
298
+ height: 32px;
299
+ cursor: pointer;
300
+ transition: all 0.15s ease;
301
+ font-size: 16px;
302
+ transform: translateY(-2px);
303
+
304
+ &:active {
305
+ transform: scale(0.95);
306
+ }
307
+ `;
308
+ export const HeaderTitle = styled.h3 `
309
+ margin: 0;
310
+ font-size: 16px;
311
+ font-weight: 600;
312
+ color: #1a1a1a;
313
+ flex: 1;
314
+
315
+ [data-theme='dark'] & {
316
+ color: #e0e0e0;
317
+ }
318
+ `;
319
+ export const MenuDivider = styled.div `
320
+ height: 1px;
321
+ background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.1) 50%, transparent 100%);
322
+ margin: 8px 0;
323
+
324
+ [data-theme='dark'] & {
325
+ background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
326
+ }
327
+ `;
328
+ export const Overlay = styled.div `
329
+ position: fixed;
330
+ top: 0;
331
+ left: 0;
332
+ right: 0;
333
+ bottom: 0;
334
+ z-index: 9999;
335
+ background: transparent;
336
+ `;
@@ -0,0 +1,38 @@
1
+ export interface TMContextMenuItemProps {
2
+ id?: string;
3
+ name: string;
4
+ icon?: React.ReactNode;
5
+ disabled?: boolean;
6
+ onClick?: () => void;
7
+ submenu?: TMContextMenuItemProps[];
8
+ visible?: boolean;
9
+ rightIcon?: React.ReactNode;
10
+ onRightIconClick?: () => void;
11
+ beginGroup?: boolean;
12
+ tooltip?: string;
13
+ operationType?: 'singleRow' | 'multiRow';
14
+ }
15
+ export interface TMContextMenuProps {
16
+ items: TMContextMenuItemProps[];
17
+ trigger?: 'right' | 'left';
18
+ children?: React.ReactNode;
19
+ externalControl?: {
20
+ visible: boolean;
21
+ position: {
22
+ x: number;
23
+ y: number;
24
+ };
25
+ onClose: () => void;
26
+ };
27
+ keepOpenOnClick?: boolean;
28
+ }
29
+ export interface Position {
30
+ x: number;
31
+ y: number;
32
+ }
33
+ export interface MenuState {
34
+ visible: boolean;
35
+ position: Position;
36
+ submenuStack: TMContextMenuItemProps[][];
37
+ parentNames: string[];
38
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { TMFloatingMenuBarProps } from './types';
3
+ declare const TMFloatingMenuBar: React.FC<TMFloatingMenuBarProps>;
4
+ export default TMFloatingMenuBar;