@topconsultnpm/sdkui-react 6.21.0-dev2.15 → 6.21.0-dev2.16
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/ContextMenu/styles.d.ts +19 -43
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +27 -79
- package/lib/components/base/Styled.d.ts +40 -76
- package/lib/components/base/TMFileManagerUtils.d.ts +2 -6
- package/lib/components/base/TMTreeView.d.ts +3 -5
- package/lib/components/editors/TMEditorStyled.d.ts +10 -42
- package/lib/components/editors/TMFormulaEditor.d.ts +2 -0
- package/lib/components/editors/TMFormulaEditor.js +69 -15
- package/lib/components/features/documents/TMDcmtPreview.d.ts +3 -5
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +3 -3
- package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.d.ts +1 -1
- package/lib/components/forms/Login/ChangePasswordInputs.d.ts +1 -1
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +2 -5
- package/lib/components/pages/TMPage.js +3 -1
- package/lib/components/query/TMQueryEditor.d.ts +6 -10
- package/lib/components/sidebar/TMCommandsPanel.d.ts +2 -4
- package/lib/helper/SDKUI_Localizator.d.ts +47 -0
- package/lib/helper/SDKUI_Localizator.js +472 -0
- package/lib/helper/TMPdfViewer.js +25 -24
- package/lib/helper/TMUtils.d.ts +3 -3
- package/lib/hooks/useDocumentOperations.js +1 -1
- package/package.json +1 -1
|
@@ -154,11 +154,11 @@ const TMPdfViewer = (props) => {
|
|
|
154
154
|
// Pattern specifici per rilevare JavaScript effettivo nelle strutture PDF
|
|
155
155
|
const jsPatterns = [
|
|
156
156
|
// Esempio: /JavaScript [ (app.alert('Hello');) ]
|
|
157
|
-
{ name: 'JavaScript Dictionary Entry', pattern: /\/JavaScript\s
|
|
157
|
+
{ name: 'JavaScript Dictionary Entry', pattern: /\/JavaScript\s+[(\[<][\s\S]*?[)\]>]/i },
|
|
158
158
|
// Esempio: /JS 15 0 R (riferimento a un oggetto JavaScript)
|
|
159
159
|
{ name: 'JavaScript Object Reference', pattern: /\/JS\s+\d+\s+\d+\s+R/i },
|
|
160
160
|
// Esempio: /JS (app.alert('Click');) o /JS <hexstring>
|
|
161
|
-
{ name: 'Inline JavaScript Code', pattern: /\/JS\s
|
|
161
|
+
{ name: 'Inline JavaScript Code', pattern: /\/JS\s+[(<][\s\S]*?[)>]/i },
|
|
162
162
|
// Esempio: /AA << /O << /S /JavaScript /JS (app.alert('Open');) >> >>
|
|
163
163
|
{ name: 'Additional Actions (AA) with JavaScript', pattern: /\/AA\s*<<[\s\S]*?\/JS[\s\S]*?>>/is },
|
|
164
164
|
// Esempio: /OpenAction << /S /JavaScript /JS (this.print();) >>
|
|
@@ -258,11 +258,11 @@ const TMPdfViewer = (props) => {
|
|
|
258
258
|
const normalizedIndex = normalizedContext.indexOf(normalizedMatch);
|
|
259
259
|
if (normalizedIndex === -1) {
|
|
260
260
|
// Se ancora non trova, mostra tutto in grassetto rosso
|
|
261
|
-
return _jsx("strong", { style: { color: '#
|
|
261
|
+
return _jsx("strong", { style: { color: '#e65100', fontWeight: 'bold' }, children: context });
|
|
262
262
|
}
|
|
263
|
-
return (_jsxs(_Fragment, { children: [normalizedContext.substring(0, normalizedIndex), _jsx("strong", { style: { color: '#
|
|
263
|
+
return (_jsxs(_Fragment, { children: [normalizedContext.substring(0, normalizedIndex), _jsx("strong", { style: { color: '#e65100', fontWeight: 'bold', background: '#fff3e0' }, children: normalizedContext.substring(normalizedIndex, normalizedIndex + normalizedMatch.length) }), normalizedContext.substring(normalizedIndex + normalizedMatch.length)] }));
|
|
264
264
|
}
|
|
265
|
-
return (_jsxs(_Fragment, { children: [context.substring(0, matchIndex), _jsx("strong", { style: { color: '#
|
|
265
|
+
return (_jsxs(_Fragment, { children: [context.substring(0, matchIndex), _jsx("strong", { style: { color: '#e65100', fontWeight: 'bold', background: '#fff3e0' }, children: context.substring(matchIndex, matchIndex + matchText.length) }), context.substring(matchIndex + matchText.length)] }));
|
|
266
266
|
};
|
|
267
267
|
TMMessageBoxManager.show({
|
|
268
268
|
title: `${SDKUI_Localizator.Attention}: ${SDKUI_Localizator.PotentiallyUnsafeContent}`,
|
|
@@ -273,8 +273,8 @@ const TMPdfViewer = (props) => {
|
|
|
273
273
|
message: (_jsxs("div", { style: { maxHeight: '500px', overflowY: 'auto', padding: '10px', lineHeight: '1.6' }, children: [_jsxs("div", { style: {
|
|
274
274
|
marginBottom: '20px',
|
|
275
275
|
padding: '12px',
|
|
276
|
-
background: '#
|
|
277
|
-
border: '1px solid #
|
|
276
|
+
background: '#fff8e1',
|
|
277
|
+
border: '1px solid #ffe0b2',
|
|
278
278
|
borderRadius: '6px',
|
|
279
279
|
fontSize: '14px',
|
|
280
280
|
wordBreak: 'normal',
|
|
@@ -282,22 +282,22 @@ const TMPdfViewer = (props) => {
|
|
|
282
282
|
}, children: [_jsxs("strong", { children: [SDKUI_Localizator.Attention, ":"] }), " ", SDKUI_Localizator.PotentiallyUnsafeCodePatternsDetected.replaceParams(jsMatches.length.toString())] }), jsMatches.length > 0 ? (jsMatches.map((match, index) => (_jsxs("div", { style: {
|
|
283
283
|
marginBottom: '16px',
|
|
284
284
|
padding: '16px',
|
|
285
|
-
border: '1px solid #
|
|
285
|
+
border: '1px solid #ffe0b2',
|
|
286
286
|
borderRadius: '8px',
|
|
287
287
|
background: '#fff',
|
|
288
288
|
boxShadow: '0 1px 3px rgba(0,0,0,0.1)'
|
|
289
289
|
}, children: [_jsx("div", { style: {
|
|
290
290
|
marginBottom: '12px',
|
|
291
291
|
paddingBottom: '8px',
|
|
292
|
-
borderBottom: '2px solid #
|
|
292
|
+
borderBottom: '2px solid #ffb74d'
|
|
293
293
|
}, children: _jsxs("strong", { style: {
|
|
294
|
-
color: '#
|
|
294
|
+
color: '#e65100',
|
|
295
295
|
fontSize: '15px',
|
|
296
296
|
display: 'flex',
|
|
297
297
|
alignItems: 'center',
|
|
298
298
|
gap: '8px'
|
|
299
299
|
}, children: [_jsx("span", { style: {
|
|
300
|
-
background: '#
|
|
300
|
+
background: '#ff9800',
|
|
301
301
|
color: '#fff',
|
|
302
302
|
borderRadius: '50%',
|
|
303
303
|
width: '24px',
|
|
@@ -311,7 +311,7 @@ const TMPdfViewer = (props) => {
|
|
|
311
311
|
background: '#f5f5f5',
|
|
312
312
|
padding: '10px',
|
|
313
313
|
borderRadius: '4px',
|
|
314
|
-
borderLeft: '3px solid #
|
|
314
|
+
borderLeft: '3px solid #ff9800',
|
|
315
315
|
fontFamily: 'Consolas, Monaco, monospace',
|
|
316
316
|
fontSize: '12px',
|
|
317
317
|
wordBreak: 'break-all',
|
|
@@ -408,23 +408,24 @@ const TMPdfViewer = (props) => {
|
|
|
408
408
|
display: 'flex',
|
|
409
409
|
justifyContent: 'center',
|
|
410
410
|
alignItems: 'center',
|
|
411
|
-
padding: '
|
|
412
|
-
background: '#
|
|
413
|
-
borderTop: '
|
|
414
|
-
gap: '
|
|
411
|
+
padding: '8px 16px',
|
|
412
|
+
background: '#fff8e1',
|
|
413
|
+
borderTop: '1px solid #ffe0b2',
|
|
414
|
+
gap: '5px',
|
|
415
415
|
flexShrink: 0
|
|
416
|
-
}, children: [
|
|
416
|
+
}, children: [jsMatches.length > 0 && (_jsx("span", { className: "dx-icon-info", style: {
|
|
417
|
+
fontSize: '18px',
|
|
418
|
+
color: '#e65100',
|
|
419
|
+
cursor: 'pointer',
|
|
420
|
+
transition: 'color 0.2s',
|
|
421
|
+
flexShrink: 0
|
|
422
|
+
}, onClick: showMatchDetails, title: "Clicca per vedere i dettagli", onMouseEnter: (e) => e.currentTarget.style.color = '#bf360c', onMouseLeave: (e) => e.currentTarget.style.color = '#e65100' })), _jsxs("span", { style: {
|
|
417
423
|
color: '#856404',
|
|
424
|
+
fontSize: '13px',
|
|
418
425
|
whiteSpace: 'nowrap',
|
|
419
426
|
overflow: 'hidden',
|
|
420
427
|
textOverflow: 'ellipsis',
|
|
421
428
|
flex: 1
|
|
422
|
-
}, children: [_jsx("strong", { children: "Attenzione:" }), " Questo documento contiene contenuti potenzialmente non sicuri."] })
|
|
423
|
-
fontSize: '20px',
|
|
424
|
-
color: '#d32f2f',
|
|
425
|
-
cursor: 'pointer',
|
|
426
|
-
transition: 'color 0.2s',
|
|
427
|
-
marginLeft: '4px'
|
|
428
|
-
}, onClick: showMatchDetails, title: "Clicca per vedere i dettagli", onMouseEnter: (e) => e.currentTarget.style.color = '#b71c1c', onMouseLeave: (e) => e.currentTarget.style.color = '#d32f2f' }))] }))] }) }));
|
|
429
|
+
}, children: [_jsx("strong", { children: "Attenzione:" }), " Questo documento contiene contenuti potenzialmente non sicuri."] })] }))] }) }));
|
|
429
430
|
};
|
|
430
431
|
export default TMPdfViewer;
|
package/lib/helper/TMUtils.d.ts
CHANGED
|
@@ -23,9 +23,9 @@ interface TabItemProps {
|
|
|
23
23
|
$isSelected: boolean;
|
|
24
24
|
$activeGradient?: string;
|
|
25
25
|
}
|
|
26
|
-
export declare const StyledTabItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
27
|
-
export declare const StyledTabIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
28
|
-
export declare const TMCountBadge: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never
|
|
26
|
+
export declare const StyledTabItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, TabItemProps>> & string;
|
|
27
|
+
export declare const StyledTabIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, TabItemProps>> & string;
|
|
28
|
+
export declare const TMCountBadge: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
29
29
|
export declare const PDGS_COLORS: {
|
|
30
30
|
DOSSIER: string;
|
|
31
31
|
DOCUMENT: string;
|
|
@@ -978,7 +978,7 @@ export const useDocumentOperations = (props) => {
|
|
|
978
978
|
};
|
|
979
979
|
const handleWFOperationCompleted = async () => {
|
|
980
980
|
await onWFOperationCompleted?.();
|
|
981
|
-
if (
|
|
981
|
+
if (!showMoreInfoPopup) {
|
|
982
982
|
onCloseDcmtForm?.();
|
|
983
983
|
}
|
|
984
984
|
};
|