@topconsultnpm/sdkui-react 6.20.0-dev1.37 → 6.20.0-dev1.39
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/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +6 -6
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +3 -6
- package/lib/components/NewComponents/FloatingMenuBar/styles.js +60 -21
- package/lib/components/choosers/TMMetadataChooser.js +8 -1
- package/lib/components/features/documents/TMDcmtForm.js +2 -2
- package/lib/components/features/search/TMSearchResult.js +2 -2
- package/lib/components/features/search/TMSignSettingsForm.js +1 -1
- package/lib/helper/TMIcons.d.ts +1 -0
- package/lib/helper/TMIcons.js +3 -0
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { ContextMenu } from '../ContextMenu';
|
|
|
4
4
|
import ShowAlert from '../../base/TMAlert';
|
|
5
5
|
import TMTooltip from '../../base/TMTooltip';
|
|
6
6
|
import * as S from './styles';
|
|
7
|
-
import {
|
|
7
|
+
import { IconAdd, IconApply, IconMenuVertical, IconPencil, IconPin, IconUndo, SDKUI_Globals, SDKUI_Localizator } from '../../../helper';
|
|
8
8
|
const IconDraggableDots = (props) => (_jsx("svg", { fontSize: 18, viewBox: "0 0 24 24", fill: "currentColor", height: "1em", width: "1em", ...props, children: _jsx("path", { d: "M9 3a2 2 0 11-4 0 2 2 0 014 0zm0 9a2 2 0 11-4 0 2 2 0 014 0zm0 9a2 2 0 11-4 0 2 2 0 014 0zm10-18a2 2 0 11-4 0 2 2 0 014 0zm0 9a2 2 0 11-4 0 2 2 0 014 0zm0 9a2 2 0 11-4 0 2 2 0 014 0z" }) }));
|
|
9
9
|
const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained = false, defaultPosition = { x: 100, y: 100 }, maxItems = 8, }) => {
|
|
10
10
|
const getDefaultConfig = () => ({
|
|
@@ -248,6 +248,9 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
|
|
|
248
248
|
}
|
|
249
249
|
setState(s => ({ ...s, isDragging: true }));
|
|
250
250
|
};
|
|
251
|
+
const handleGripDoubleClick = () => {
|
|
252
|
+
toggleOrientation();
|
|
253
|
+
};
|
|
251
254
|
const handleMouseMove = useCallback((e) => {
|
|
252
255
|
if (!state.isDragging || !containerRef.current || !floatingRef.current)
|
|
253
256
|
return;
|
|
@@ -438,7 +441,7 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
|
|
|
438
441
|
setState(s => ({ ...s, draggedItemIndex: null }));
|
|
439
442
|
setDragOverIndex(null);
|
|
440
443
|
};
|
|
441
|
-
return (_jsxs(_Fragment, { children: [_jsx(S.Overlay, { "$visible": state.isConfigMode }), _jsxs(S.FloatingContainer, { ref: floatingRef, "$x": state.position.x, "$y": state.position.y, "$orientation": state.orientation, "$isDragging": state.isDragging, "$isConfigMode": state.isConfigMode, "$isConstrained": isConstrained, children: [_jsx(S.GripHandle, { "$orientation": state.orientation, onMouseDown: handleMouseDown, children: _jsx(IconDraggableDots, {}) }), _jsx(S.Separator, { "$orientation": state.orientation }), state.items.map((item, index) => {
|
|
444
|
+
return (_jsxs(_Fragment, { children: [_jsx(S.Overlay, { "$visible": state.isConfigMode }), _jsxs(S.FloatingContainer, { ref: floatingRef, "$x": state.position.x, "$y": state.position.y, "$orientation": state.orientation, "$isDragging": state.isDragging, "$isConfigMode": state.isConfigMode, "$isConstrained": isConstrained, children: [_jsx(S.GripHandle, { "$orientation": state.orientation, onMouseDown: handleMouseDown, onDoubleClick: handleGripDoubleClick, children: _jsx(IconDraggableDots, {}) }), _jsx(S.Separator, { "$orientation": state.orientation }), state.items.map((item, index) => {
|
|
442
445
|
// Get current state (disabled and onClick) from contextMenuItems
|
|
443
446
|
const currentState = getCurrentItemState(item.id);
|
|
444
447
|
const isDisabled = currentState.disabled || false;
|
|
@@ -456,9 +459,6 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
|
|
|
456
459
|
currentOnClick();
|
|
457
460
|
}
|
|
458
461
|
}, disabled: isDisabled, children: item.icon }) })), state.isConfigMode && (_jsx(S.RemoveButton, { onClick: () => removeItem(item.id), children: "\u00D7" }))] }, item.id));
|
|
459
|
-
}), !state.isConfigMode && contextMenuItems.length > 0 && (_jsx(ContextMenu, { items: contextMenuItems, trigger: "left", children: _jsx(S.ContextMenuButton, { children: _jsx(IconMenuVertical, {}) }) })), state.isConfigMode && state.items.length < maxItems && contextMenuItems.length > 0 && (_jsx(ContextMenu, { items: getPinContextMenuItems(), trigger: "left", children: _jsx(TMTooltip, { content: SDKUI_Localizator.Add, children: _jsx(S.AddButton, { children:
|
|
460
|
-
_jsx(TMTooltip, { content: SDKUI_Localizator.ApplyAndClose, position: state.orientation === 'horizontal' ? 'right' : 'top', children: _jsx(IconApply, { fontSize: 18 }) })
|
|
461
|
-
:
|
|
462
|
-
_jsx(TMTooltip, { content: SDKUI_Localizator.Configure, position: state.orientation === 'horizontal' ? 'right' : 'top', children: _jsx(IconPencil, { fontSize: 18 }) }) })] })] })] }));
|
|
462
|
+
}), !state.isConfigMode && contextMenuItems.length > 0 && (_jsx(ContextMenu, { items: contextMenuItems, trigger: "left", children: _jsx(S.ContextMenuButton, { children: _jsx(IconMenuVertical, {}) }) })), state.isConfigMode && state.items.length < maxItems && contextMenuItems.length > 0 && (_jsx(ContextMenu, { items: getPinContextMenuItems(), trigger: "left", children: _jsx(TMTooltip, { content: SDKUI_Localizator.Add, children: _jsx(S.AddButton, { children: _jsx(IconAdd, {}) }) }) })), _jsx(S.Separator, { "$orientation": state.orientation }), _jsxs(S.ButtonGroup, { "$orientation": state.orientation, children: [state.isConfigMode && (_jsx(TMTooltip, { content: SDKUI_Localizator.Undo, position: state.orientation === 'horizontal' ? 'right' : 'top', children: _jsx(S.UndoButton, { onClick: handleUndo, disabled: !hasChanges(), children: _jsx(IconUndo, { fontSize: 18 }) }) })), state.isConfigMode ? (_jsx(TMTooltip, { content: state.items.length === 0 ? 'Devi aggiungere almeno un item' : SDKUI_Localizator.ApplyAndClose, position: state.orientation === 'horizontal' ? 'right' : 'top', children: _jsx(S.ApplyButton, { onClick: toggleConfigMode, disabled: state.items.length === 0, children: _jsx(IconApply, { fontSize: 20 }) }) })) : (_jsx(TMTooltip, { content: SDKUI_Localizator.Configure, position: state.orientation === 'horizontal' ? 'right' : 'top', children: _jsx(S.ConfigButton, { onClick: toggleConfigMode, children: _jsx(IconPencil, {}) }) }))] })] })] }));
|
|
463
463
|
};
|
|
464
464
|
export default TMFloatingMenuBar;
|
|
@@ -27,9 +27,8 @@ export declare const Separator: import("styled-components/dist/types").IStyledCo
|
|
|
27
27
|
export declare const MenuButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
28
28
|
$isActive?: boolean;
|
|
29
29
|
}>> & string;
|
|
30
|
-
export declare const ConfigButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components
|
|
31
|
-
|
|
32
|
-
}>> & string;
|
|
30
|
+
export declare const ConfigButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
31
|
+
export declare const ApplyButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
33
32
|
export declare const ContextMenuButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "$isActive"> & {
|
|
34
33
|
$isActive?: boolean;
|
|
35
34
|
}, "ref"> & {
|
|
@@ -37,9 +36,7 @@ export declare const ContextMenuButton: import("styled-components/dist/types").I
|
|
|
37
36
|
}, never>> & string;
|
|
38
37
|
export declare const AddButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
39
38
|
export declare const RemoveButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
40
|
-
export declare const
|
|
41
|
-
$orientation: "horizontal" | "vertical";
|
|
42
|
-
}>> & string;
|
|
39
|
+
export declare const UndoButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
43
40
|
export declare const DraggableItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
44
41
|
$isDragging: boolean;
|
|
45
42
|
$isDragOver: boolean;
|
|
@@ -140,29 +140,68 @@ export const ConfigButton = styled.button `
|
|
|
140
140
|
display: flex;
|
|
141
141
|
align-items: center;
|
|
142
142
|
justify-content: center;
|
|
143
|
-
width:
|
|
144
|
-
height:
|
|
143
|
+
width: 21px;
|
|
144
|
+
height: 21px;
|
|
145
145
|
background: transparent;
|
|
146
146
|
border: none;
|
|
147
147
|
border-radius: 4px;
|
|
148
|
-
color:
|
|
148
|
+
color: rgba(255, 255, 255, 0.5);
|
|
149
149
|
font-size: 10px;
|
|
150
150
|
cursor: pointer;
|
|
151
151
|
transition: all 0.2s ease;
|
|
152
|
-
padding:
|
|
152
|
+
padding: 4px;
|
|
153
153
|
|
|
154
|
-
&:hover {
|
|
154
|
+
&:hover:not(:disabled) {
|
|
155
155
|
background: rgba(255, 255, 255, 0.1);
|
|
156
156
|
color: rgba(255, 255, 255, 0.8);
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
&:active {
|
|
159
|
+
&:active:not(:disabled) {
|
|
160
160
|
transform: scale(0.9);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
&:disabled {
|
|
164
|
+
opacity: 0.3;
|
|
165
|
+
cursor: not-allowed;
|
|
166
|
+
}
|
|
167
|
+
|
|
163
168
|
svg {
|
|
164
|
-
width:
|
|
165
|
-
height:
|
|
169
|
+
width: 16px;
|
|
170
|
+
height: 16px;
|
|
171
|
+
}
|
|
172
|
+
`;
|
|
173
|
+
export const ApplyButton = styled.button `
|
|
174
|
+
display: flex;
|
|
175
|
+
align-items: center;
|
|
176
|
+
justify-content: center;
|
|
177
|
+
width: 24px;
|
|
178
|
+
height: 24px;
|
|
179
|
+
background: transparent;
|
|
180
|
+
border: none;
|
|
181
|
+
border-radius: 4px;
|
|
182
|
+
color: rgba(34, 197, 94, 1);
|
|
183
|
+
font-size: 10px;
|
|
184
|
+
cursor: pointer;
|
|
185
|
+
transition: all 0.2s ease;
|
|
186
|
+
padding: 3px;
|
|
187
|
+
|
|
188
|
+
&:hover:not(:disabled) {
|
|
189
|
+
background: rgba(255, 255, 255, 0.1);
|
|
190
|
+
color: rgba(34, 197, 94, 1);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
&:active:not(:disabled) {
|
|
194
|
+
transform: scale(0.9);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&:disabled {
|
|
198
|
+
opacity: 0.3;
|
|
199
|
+
cursor: not-allowed;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
svg {
|
|
203
|
+
width: 20px;
|
|
204
|
+
height: 20px;
|
|
166
205
|
}
|
|
167
206
|
`;
|
|
168
207
|
export const ContextMenuButton = styled(MenuButton) `
|
|
@@ -182,16 +221,17 @@ export const AddButton = styled.button `
|
|
|
182
221
|
color: white;
|
|
183
222
|
font-size: 20px;
|
|
184
223
|
font-weight: bold;
|
|
224
|
+
line-height: 0;
|
|
185
225
|
cursor: pointer;
|
|
186
226
|
transition: all 0.2s ease;
|
|
187
227
|
position: relative;
|
|
188
228
|
margin-right: 6px;
|
|
189
229
|
margin-left: 8px;
|
|
230
|
+
padding: 0;
|
|
190
231
|
|
|
191
232
|
&:hover {
|
|
192
233
|
background: rgba(255, 255, 255, 0.25);
|
|
193
234
|
border-color: rgba(255, 255, 255, 0.6);
|
|
194
|
-
transform: scale(1.05);
|
|
195
235
|
}
|
|
196
236
|
|
|
197
237
|
&:active {
|
|
@@ -210,7 +250,7 @@ export const RemoveButton = styled.button `
|
|
|
210
250
|
color: white;
|
|
211
251
|
font-size: 14px;
|
|
212
252
|
font-weight: bold;
|
|
213
|
-
line-height:
|
|
253
|
+
line-height: 0;
|
|
214
254
|
cursor: pointer;
|
|
215
255
|
display: flex;
|
|
216
256
|
align-items: center;
|
|
@@ -227,29 +267,28 @@ export const RemoveButton = styled.button `
|
|
|
227
267
|
background: #b91c1c;
|
|
228
268
|
}
|
|
229
269
|
`;
|
|
230
|
-
export const
|
|
270
|
+
export const UndoButton = styled.button `
|
|
231
271
|
display: flex;
|
|
232
272
|
align-items: center;
|
|
233
273
|
justify-content: center;
|
|
234
|
-
width:
|
|
235
|
-
height:
|
|
274
|
+
width: 24px;
|
|
275
|
+
height: 24px;
|
|
236
276
|
background: transparent;
|
|
237
277
|
border: none;
|
|
238
278
|
border-radius: 4px;
|
|
239
|
-
color: rgba(
|
|
279
|
+
color: rgba(249, 115, 22, 1);
|
|
240
280
|
font-size: 10px;
|
|
241
281
|
cursor: pointer;
|
|
242
282
|
transition: all 0.2s ease;
|
|
243
283
|
padding: 2px;
|
|
244
|
-
transform: ${props => props.$orientation === 'horizontal' ? 'rotate(90deg)' : 'rotate(0deg)'};
|
|
245
284
|
|
|
246
285
|
&:hover:not(:disabled) {
|
|
247
286
|
background: rgba(255, 255, 255, 0.1);
|
|
248
|
-
color: rgba(
|
|
287
|
+
color: rgba(249, 115, 22, 1);
|
|
249
288
|
}
|
|
250
289
|
|
|
251
290
|
&:active:not(:disabled) {
|
|
252
|
-
transform:
|
|
291
|
+
transform: scale(0.9);
|
|
253
292
|
}
|
|
254
293
|
|
|
255
294
|
&:disabled {
|
|
@@ -258,8 +297,8 @@ export const OrientationToggle = styled.button `
|
|
|
258
297
|
}
|
|
259
298
|
|
|
260
299
|
svg {
|
|
261
|
-
width:
|
|
262
|
-
height:
|
|
300
|
+
width: 16px;
|
|
301
|
+
height: 16px;
|
|
263
302
|
}
|
|
264
303
|
`;
|
|
265
304
|
export const DraggableItem = styled.div `
|
|
@@ -301,7 +340,7 @@ export const ContextMenuWrapper = styled.div `
|
|
|
301
340
|
`;
|
|
302
341
|
export const ButtonGroup = styled.div `
|
|
303
342
|
display: flex;
|
|
304
|
-
flex-direction:
|
|
343
|
+
flex-direction: row;
|
|
305
344
|
align-items: center;
|
|
306
|
-
gap:
|
|
345
|
+
gap: 0;
|
|
307
346
|
`;
|
|
@@ -13,8 +13,15 @@ import TMChooserForm from '../forms/TMChooserForm';
|
|
|
13
13
|
import TMSpinner from '../base/TMSpinner';
|
|
14
14
|
const TMMetadataChooser = ({ tmSession, dataSource, showEditButton = true, buttons = [], disabled, validationItems, getColorIndex, showCompleteMetadataName, qdShowOnlySelectItems, borderRadius = '4px', fontSize = FontSize.defaultFontSize, backgroundColor, openEditorOnSummaryClick, showBorder = true, showId = false, elementStyle, allowMultipleSelection, allowSysMetadata, showSysMetadataDirectly, value, values, isModifiedWhen, tids, label, width, height, showClearButton, qd, placeHolder, filterMetadata, onValueChanged }) => {
|
|
15
15
|
const [showChooser, setShowChooser] = useState(false);
|
|
16
|
+
const getinputMd = () => {
|
|
17
|
+
if (values && values.length > 0 && values[0].mid && values[0].mid < 0) {
|
|
18
|
+
let md = dataSource?.find((md) => md.id === values[0].mid);
|
|
19
|
+
return md;
|
|
20
|
+
}
|
|
21
|
+
return undefined;
|
|
22
|
+
};
|
|
16
23
|
const renderTemplate = useMemo(() => {
|
|
17
|
-
return (_jsxs(StyledDivHorizontal, { style: { width: 'max-content', height: '100%' }, children: [values && _jsx(TMMidViewer, { tmSession: tmSession, tid_mid: values[0], showIcon: true, showId: showId, showCompleteName: showCompleteMetadataName }), values && values.length > 1 && _jsx("p", { style: { marginLeft: '10px' }, children: `(+${values.length - 1} ${values.length == 2 ? 'altro' : 'altri'})` }), (values == undefined || values.length == 0) && _jsx("p", { children: placeHolder })] }));
|
|
24
|
+
return (_jsxs(StyledDivHorizontal, { style: { width: 'max-content', height: '100%' }, children: [values && values.length > 0 && values[0].mid && values[0].mid > 0 && _jsx(TMMidViewer, { tmSession: tmSession, tid_mid: values[0], showIcon: true, showId: showId, showCompleteName: showCompleteMetadataName }), values && values.length > 0 && values[0].mid && values[0].mid < 0 && _jsx(TMMidViewer, { tmSession: tmSession, tid_mid: values[0], inputMd: getinputMd(), showIcon: true, showId: showId, showCompleteName: showCompleteMetadataName }), values && values.length > 1 && _jsx("p", { style: { marginLeft: '10px' }, children: `(+${values.length - 1} ${values.length == 2 ? 'altro' : 'altri'})` }), (values == undefined || values.length == 0) && _jsx("p", { children: placeHolder })] }));
|
|
18
25
|
}, [values, tmSession, showId, showCompleteMetadataName, placeHolder]);
|
|
19
26
|
return (_jsxs(_Fragment, { children: [_jsx(TMSummary, { label: label, width: width, height: height, disabled: disabled, validationItems: validationItems, backgroundColor: backgroundColor, buttons: buttons, placeHolder: placeHolder, fontSize: fontSize, showBorder: showBorder, borderRadius: borderRadius, hasValue: values && values.length > 0, showClearButton: showClearButton, showEditButton: showEditButton, iconEditButton: _jsx(IconSearch, { fontSize: 16 }), openEditorOnSummaryClick: openEditorOnSummaryClick, onEditorClick: () => !disabled && setShowChooser(true), elementStyle: elementStyle, isModifiedWhen: isModifiedWhen, template: renderTemplate, onClearClick: showClearButton ? () => { onValueChanged?.([]); } : undefined }), showChooser &&
|
|
20
27
|
_jsx(TMMetadataChooserForm, { tmSession: tmSession, allowMultipleSelection: allowMultipleSelection, height: '500px', width: '600px', allowSysMetadata: allowSysMetadata, showSysMetadataDirectly: showSysMetadataDirectly, getColorIndex: getColorIndex, dataSource: dataSource, tids: tids, qd: qd, qdShowOnlySelectItems: qdShowOnlySelectItems, filterMetadata: filterMetadata, selectedIDs: values, onClose: () => setShowChooser(false), onChoose: (tid_mids) => { onValueChanged?.(tid_mids); } })] }));
|
|
@@ -8,7 +8,7 @@ import { DeviceType, useDeviceType } from '../../base/TMDeviceProvider';
|
|
|
8
8
|
import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
|
|
9
9
|
import { useRelatedDocuments } from '../../../hooks/useRelatedDocuments';
|
|
10
10
|
import { getWorkItemSetIDAsync, handleArchiveVisibility, searchResultToMetadataValues } from '../../../helper/queryHelper';
|
|
11
|
-
import { genUniqueId, IconShow, SDKUI_Localizator, updateMruTids, IconBoard, IconDcmtTypeSys, IconDetailDcmts, IconDownload, calcIsModified, IconMenuVertical, Globalization, getListMaxItems, getSystemMetadata, IconBoxArchiveIn, IconClear, IconUndo, SDKUI_Globals, IconPreview, isTaskMoreInfo, IconWorkflow, IconSearch, deepCompare, IconCheck, IconActivity, TMImageLibrary, IconStar, IconRelation, IconInfo, IconArchiveDoc, IconDelete, IconPair, IconUnpair, IconArchiveMaster, IconArchiveDetail, getDcmtCicoStatus, IconFileDots } from '../../../helper';
|
|
11
|
+
import { genUniqueId, IconShow, SDKUI_Localizator, updateMruTids, IconBoard, IconDcmtTypeSys, IconDetailDcmts, IconDownload, calcIsModified, IconMenuVertical, Globalization, getListMaxItems, getSystemMetadata, IconBoxArchiveIn, IconClear, IconUndo, SDKUI_Globals, IconPreview, isTaskMoreInfo, IconWorkflow, IconSearch, deepCompare, IconCheck, IconActivity, TMImageLibrary, IconStar, IconRelation, IconInfo, IconArchiveDoc, IconDelete, IconPair, IconUnpair, IconArchiveMaster, IconArchiveDetail, getDcmtCicoStatus, IconFileDots, IconCustom } from '../../../helper';
|
|
12
12
|
import { hasDetailRelations, hasMasterRelations, isXMLFileExt } from '../../../helper/dcmtsHelper';
|
|
13
13
|
import { Gutters, TMColors } from '../../../utils/theme';
|
|
14
14
|
import { StyledFormButtonsContainer, StyledLoadingContainer, StyledModalContainer, StyledReferenceButton, StyledSpinner, StyledToolbarCardContainer } from '../../base/Styled';
|
|
@@ -733,7 +733,7 @@ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTa
|
|
|
733
733
|
onClick: () => setCustomButton(customButton)
|
|
734
734
|
}));
|
|
735
735
|
customButtonsItems && customButtonsItems.length > 0 && items.push({
|
|
736
|
-
icon: _jsx(
|
|
736
|
+
icon: _jsx(IconCustom, {}),
|
|
737
737
|
name: SDKUI_Localizator.CustomButtons,
|
|
738
738
|
submenu: customButtonsItems
|
|
739
739
|
});
|
|
@@ -3,7 +3,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
|
3
3
|
import { SDK_Globals, DataColumnTypes, MetadataDataDomains, DataListViewModes, MetadataFormats, LayoutModes, TemplateTIDs, DcmtTypeListCacheService, SystemMIDsAsNumber, RetrieveFileOptions, DcmtOpers, GeneralRetrieveFormats, AccessLevelsEx, LayoutCacheService, UserListCacheService } from '@topconsultnpm/sdk-ts';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import { getAllFieldSelectedDcmtsOrFocused, getCommandsMenuItems, getSelectedDcmtsOrFocused } from './TMSearchResultsMenuItems';
|
|
6
|
-
import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, SDKUI_Localizator, IconDelete, IconRefresh, IconMenuVertical, deepCompare, generateUniqueColumnKeys, searchResultDescriptorToSimpleArray, searchResultToMetadataValues, IconSearchCheck,
|
|
6
|
+
import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, SDKUI_Localizator, IconDelete, IconRefresh, IconMenuVertical, deepCompare, generateUniqueColumnKeys, searchResultDescriptorToSimpleArray, searchResultToMetadataValues, IconSearchCheck, TMImageLibrary, convertSearchResultDescriptorToFileItems, IconCustom } from '../../../helper';
|
|
7
7
|
import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
|
|
8
8
|
import { useInputAttachmentsDialog, useInputCvtFormatDialog } from '../../../hooks/useInputDialog';
|
|
9
9
|
import { useRelatedDocuments } from '../../../hooks/useRelatedDocuments';
|
|
@@ -365,7 +365,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
|
|
|
365
365
|
onClick: () => setCustomButton(customButton)
|
|
366
366
|
}));
|
|
367
367
|
return customButtonsItems && customButtonsItems.length > 0 ? {
|
|
368
|
-
icon: _jsx(
|
|
368
|
+
icon: _jsx(IconCustom, {}),
|
|
369
369
|
name: SDKUI_Localizator.CustomButtons,
|
|
370
370
|
submenu: customButtonsItems
|
|
371
371
|
} : {};
|
|
@@ -333,7 +333,7 @@ const TMSignSettingsForm = (props) => {
|
|
|
333
333
|
fontWeight: 'bold',
|
|
334
334
|
color: isModified ? MODIFIED_COLOR : '#777',
|
|
335
335
|
transition: 'opacity 0.2s ease'
|
|
336
|
-
}, onMouseEnter: (e) => { e.currentTarget.style.opacity = '0.9'; }, onMouseLeave: (e) => { e.currentTarget.style.opacity = '0.5'; }, children: "
|
|
336
|
+
}, onMouseEnter: (e) => { e.currentTarget.style.opacity = '0.9'; }, onMouseLeave: (e) => { e.currentTarget.style.opacity = '0.5'; }, children: _jsx("i", { className: "dx-icon-close" }) })] }));
|
|
337
337
|
};
|
|
338
338
|
const renderMultiSignerTag = (tagData) => {
|
|
339
339
|
const handleRemoveTag = () => {
|
package/lib/helper/TMIcons.d.ts
CHANGED
|
@@ -275,4 +275,5 @@ export declare function IconUnpair(props: React.SVGProps<SVGSVGElement>): import
|
|
|
275
275
|
export declare function IconCtrlWorkflow(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
276
276
|
export declare function IconBackhandIndexPointingRight(props: Readonly<React.SVGProps<SVGSVGElement>>): import("react/jsx-runtime").JSX.Element;
|
|
277
277
|
export declare function IconMoveToFolder(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
278
|
+
export declare function IconCustom(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
278
279
|
export { Icon123, IconABC, IconAccessPoint, IconAddressBook, IconSignCert, IconServerService, IconActivity, IconActivityLog, IconAdd, IconAddCircleOutline, IconAll, IconApply, IconApplyAndClose, IconArchive, IconArchiveDoc, IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowUp, IconAtSign, IconAttachment, IconAutoConfig, IconBackward, IconBasket, IconBoard, IconBoxArchiveIn, IconBxInfo, IconBxLock, IconCalendar, IconCloseCircle, IconCloseOutline, IconCloud, IconCircleInfo, IconClear, IconColumns, IconCommand, IconCopy, IconCount, IconCrown, IconDashboard, IconDcmtType, IconDcmtTypeOnlyMetadata, IconDcmtTypeSys, IconDelete, IconDetails, IconDown, IconDownload, IconDotsVerticalCircleOutline, IconDuplicate, IconEdit, IconEqual, IconEqualNot, IconEraser, IconExpandRight, IconExport, IconFastBackward, IconFoldeAdd, IconFolderSearch, IconFolderZip, IconFastForward, IconFastSearch, IconFileDots, IconFilter, IconForceStop, IconForward, IconFreeze, IconFreeSearch, IconGreaterThan, IconGreaterThanOrEqual, IconHistory, IconImport, IconTag, IconInfo, IconInsertAbove, IconInsertBelow, IconHeart, IconHide, IconLanguage, IconLeft, IconLessThan, IconLessThanOrEqual, IconLock, IconLockClosed, IconLogin, IconLink, IconLogout, IconMail, IconMapping, IconMic, IconMenuHorizontal, IconMenuKebab, IconMenuVertical, IconMetadata, IconMetadata_Computed, IconMetadata_DataList, IconMetadata_Date, IconMetadata_DynamicDataList, IconMetadata_Numerator, IconMetadata_Numeric, IconMetadata_Special, IconMetadata_Text, IconMetadata_User, IconMonitor, IconOpenInNew, IconNotification, IconPassword, IconPencil, IconPlatform, IconPlay, IconPreview, IconPrinter, IconPrintOutline, IconProcess, IconProgressAbortRequested, IconProgressCompleted, IconProgressNotCompleted, IconProgressReady, IconProgressRunning, IconProgressStarted, IconRefresh, IconReset, IconRecentlyViewed, IconRight, IconSave, IconSearch, IconSelected, IconSettings, IconShow, IconSort, IconStop, IconStopwatch, IconSuccess, IconAlarmPlus, IconHourglass, IconNone, IconNotStarted, IconProgress, IconSuccessCirlce, IconSuitcase, IconSupport, IconUndo, IconUnFreeze, IconUp, IconUpdate, IconUpload, IconUser, IconUserProfile, IconVisible, IconWarning, IconWeb, IconWifi, IconWindowMaximize, IconWindowMinimize, IconWorkflow, IconWorkspace, IconUserGroup, IconUserGroupOutline, IconUserLevelMember, IconUserLevelAdministrator, IconUserLevelSystemAdministrator, IconUserLevelAutonomousAdministrator, IconDraggabledots, IconRelation, IconEasy, IconSum, IconDisk, IconDataList, IconPalette, IconFormatPageSplit, IconPaste, IconFileSearch, IconStar, IconStarRemove, IconSearchCheck, IconLightningFill, IconArrowUnsorted, IconArrowSortedUp, IconArrowSortedDown, IconConvertFilePdf, IconExportTo, IconSharedDcmt, IconShare, IconBatchUpdate, IconCheckFile, IconStatistics, IconSubstFile, IconAdvanced, IconSync, IconSavedQuery, IconSignature, IconSignaturePencil, IconRecursiveOps, IconCheckIn, IconTree, IconGrid, IconList, IconFolder, IconFolderOpen, IconFactory, IconTest, IconCheck, IconUncheck, IconSortAsc, IconSortDesc, IconRoundFileUpload, IconSortAscLetters, IconSortDescLetters, IconRotate, IconSortAscNumbers, IconSortDescNumbers, IconSortAscClock, IconSortDescClock, IconLayerGroup, IconBell, IconBellCheck, IconBellOutline, IconBellCheckOutline, IconEnvelopeOpenText, IconChangeUser, IconUserCheck, IconRelationManyToMany, IconRelationOneToMany, IconUserExpired, IconKey, IconZoomInLinear, IconZoomOutLinear, IconMenuCAWorkingGroups, IconCADossier, IconMenuCACaseflow, IconMenuDashboard, IconMenuCAAreas, IconMenuTask, IconMenuSearch, IconMenuFullTextSearch, IconMenuFavourite, IconSAPLogin, IconSAPLogin2, IconView, IconNewSignature };
|
package/lib/helper/TMIcons.js
CHANGED
|
@@ -687,4 +687,7 @@ export function IconBackhandIndexPointingRight(props) {
|
|
|
687
687
|
export function IconMoveToFolder(props) {
|
|
688
688
|
return (_jsx("svg", { fontSize: props.fontSize ?? FONTSIZE, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 28 28", width: "1em", height: "1em", ...props, children: _jsx("path", { d: "M21.5 15a5.5 5.5 0 1 1 0 11a5.5 5.5 0 0 1 0-11zM10.207 4c.46 0 .908.141 1.284.402l.156.12L14.022 6.5h9.728a2.25 2.25 0 0 1 2.229 1.938l.016.158l.005.154v7.06a6.518 6.518 0 0 0-1.499-1.077L24.5 8.75a.75.75 0 0 0-.648-.743L23.75 8h-9.729l-2.374 1.978a2.25 2.25 0 0 1-1.244.513l-.196.009l-6.707-.001V21.75c0 .38.282.693.648.743l.102.007h11.064a6.47 6.47 0 0 0 .709 1.501L4.25 24a2.25 2.25 0 0 1-2.245-2.096L2 21.75V6.25a2.25 2.25 0 0 1 2.096-2.245L4.25 4h5.957zm11.585 13.545l-.076.044l-.07.057l-.057.07a.5.5 0 0 0 0 .568l.057.07l1.646 1.645l-4.798.001l-.09.008a.5.5 0 0 0-.402.402l-.008.09l.008.09a.5.5 0 0 0 .402.402l.09.008l4.8-.001l-1.648 1.647l-.057.07a.5.5 0 0 0 .695.695l.07-.057l2.535-2.541l.031-.042l.042-.08l.026-.083l.01-.064l-.002-.11l-.008-.042l-.026-.083l-.042-.08l-.037-.05l-2.53-2.533l-.069-.057a.5.5 0 0 0-.492-.044zM10.207 5.5H4.25a.75.75 0 0 0-.743.648L3.5 6.25v2.749L10.207 9a.75.75 0 0 0 .395-.113l.085-.06l1.891-1.578l-1.89-1.575a.75.75 0 0 0-.377-.167l-.104-.007z", fill: "currentColor", fillRule: "nonzero" }) }));
|
|
689
689
|
}
|
|
690
|
+
export function IconCustom(props) {
|
|
691
|
+
return (_jsx("svg", { fontSize: props.fontSize ?? FONTSIZE, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "1em", height: "1em", ...props, children: _jsx("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: "10", strokeWidth: "1.5", d: "M14 17h6m-3 3v-6M5.6 4h2.8A1.6 1.6 0 0 1 10 5.6v2.8A1.6 1.6 0 0 1 8.4 10H5.6A1.6 1.6 0 0 1 4 8.4V5.6A1.6 1.6 0 0 1 5.6 4m0 10h2.8a1.6 1.6 0 0 1 1.6 1.6v2.8A1.6 1.6 0 0 1 8.4 20H5.6A1.6 1.6 0 0 1 4 18.4v-2.8A1.6 1.6 0 0 1 5.6 14m10-10h2.8A1.6 1.6 0 0 1 20 5.6v2.8a1.6 1.6 0 0 1-1.6 1.6h-2.8A1.6 1.6 0 0 1 14 8.4V5.6A1.6 1.6 0 0 1 15.6 4" }) }));
|
|
692
|
+
}
|
|
690
693
|
export { Icon123, IconABC, IconAccessPoint, IconAddressBook, IconSignCert, IconServerService, IconActivity, IconActivityLog, IconAdd, IconAddCircleOutline, IconAll, IconApply, IconApplyAndClose, IconArchive, IconArchiveDoc, IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowUp, IconAtSign, IconAttachment, IconAutoConfig, IconBackward, IconBasket, IconBoard, IconBoxArchiveIn, IconBxInfo, IconBxLock, IconCalendar, IconCloseCircle, IconCloseOutline, IconCloud, IconCircleInfo, IconClear, IconColumns, IconCommand, IconCopy, IconCount, IconCrown, IconDashboard, IconDcmtType, IconDcmtTypeOnlyMetadata, IconDcmtTypeSys, IconDelete, IconDetails, IconDown, IconDownload, IconDotsVerticalCircleOutline, IconDuplicate, IconEdit, IconEqual, IconEqualNot, IconEraser, IconExpandRight, IconExport, IconFastBackward, IconFoldeAdd, IconFolderSearch, IconFolderZip, IconFastForward, IconFastSearch, IconFileDots, IconFilter, IconForceStop, IconForward, IconFreeze, IconFreeSearch, IconGreaterThan, IconGreaterThanOrEqual, IconHistory, IconImport, IconTag, IconInfo, IconInsertAbove, IconInsertBelow, IconHeart, IconHide, IconLanguage, IconLeft, IconLessThan, IconLessThanOrEqual, IconLock, IconLockClosed, IconLogin, IconLink, IconLogout, IconMail, IconMapping, IconMic, IconMenuHorizontal, IconMenuKebab, IconMenuVertical, IconMetadata, IconMetadata_Computed, IconMetadata_DataList, IconMetadata_Date, IconMetadata_DynamicDataList, IconMetadata_Numerator, IconMetadata_Numeric, IconMetadata_Special, IconMetadata_Text, IconMetadata_User, IconMonitor, IconOpenInNew, IconNotification, IconPassword, IconPencil, IconPlatform, IconPlay, IconPreview, IconPrinter, IconPrintOutline, IconProcess, IconProgressAbortRequested, IconProgressCompleted, IconProgressNotCompleted, IconProgressReady, IconProgressRunning, IconProgressStarted, IconRefresh, IconReset, IconRecentlyViewed, IconRight, IconSave, IconSearch, IconSelected, IconSettings, IconShow, IconSort, IconStop, IconStopwatch, IconSuccess, IconAlarmPlus, IconHourglass, IconNone, IconNotStarted, IconProgress, IconSuccessCirlce, IconSuitcase, IconSupport, IconUndo, IconUnFreeze, IconUp, IconUpdate, IconUpload, IconUser, IconUserProfile, IconVisible, IconWarning, IconWeb, IconWifi, IconWindowMaximize, IconWindowMinimize, IconWorkflow, IconWorkspace, IconUserGroup, IconUserGroupOutline, IconUserLevelMember, IconUserLevelAdministrator, IconUserLevelSystemAdministrator, IconUserLevelAutonomousAdministrator, IconDraggabledots, IconRelation, IconEasy, IconSum, IconDisk, IconDataList, IconPalette, IconFormatPageSplit, IconPaste, IconFileSearch, IconStar, IconStarRemove, IconSearchCheck, IconLightningFill, IconArrowUnsorted, IconArrowSortedUp, IconArrowSortedDown, IconConvertFilePdf, IconExportTo, IconSharedDcmt, IconShare, IconBatchUpdate, IconCheckFile, IconStatistics, IconSubstFile, IconAdvanced, IconSync, IconSavedQuery, IconSignature, IconSignaturePencil, IconRecursiveOps, IconCheckIn, IconTree, IconGrid, IconList, IconFolder, IconFolderOpen, IconFactory, IconTest, IconCheck, IconUncheck, IconSortAsc, IconSortDesc, IconRoundFileUpload, IconSortAscLetters, IconSortDescLetters, IconRotate, IconSortAscNumbers, IconSortDescNumbers, IconSortAscClock, IconSortDescClock, IconLayerGroup, IconBell, IconBellCheck, IconBellOutline, IconBellCheckOutline, IconEnvelopeOpenText, IconChangeUser, IconUserCheck, IconRelationManyToMany, IconRelationOneToMany, IconUserExpired, IconKey, IconZoomInLinear, IconZoomOutLinear, IconMenuCAWorkingGroups, IconCADossier, IconMenuCACaseflow, IconMenuDashboard, IconMenuCAAreas, IconMenuTask, IconMenuSearch, IconMenuFullTextSearch, IconMenuFavourite, IconSAPLogin, IconSAPLogin2, IconView, IconNewSignature };
|