@topconsultnpm/sdkui-react 6.21.0-t1 → 6.21.0-t3
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/TMContextMenu.js +22 -1
- package/lib/components/NewComponents/ContextMenu/styles.d.ts +4 -4
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +10 -10
- package/lib/components/base/Styled.d.ts +1 -1
- package/lib/components/base/TMAccordionNew.d.ts +1 -0
- package/lib/components/base/TMAccordionNew.js +6 -5
- package/lib/components/base/TMAreaManager.js +30 -3
- package/lib/components/base/TMCounterBar.d.ts +2 -2
- package/lib/components/base/TMCounterContainer.d.ts +2 -1
- package/lib/components/base/TMCustomButton.d.ts +1 -1
- package/lib/components/base/TMDataGrid.js +14 -4
- package/lib/components/base/TMDataGridExportForm.d.ts +2 -1
- package/lib/components/base/TMDataGridExportForm.js +19 -8
- package/lib/components/base/TMFileManager.d.ts +2 -1
- package/lib/components/base/TMFileManagerDataGridView.d.ts +2 -1
- package/lib/components/base/TMFileManagerDataGridView.js +4 -4
- package/lib/components/base/TMFileManagerThumbnailItems.d.ts +1 -1
- package/lib/components/base/TMFileManagerThumbnailItems.js +3 -3
- package/lib/components/base/TMFileManagerThumbnailsView.d.ts +1 -1
- package/lib/components/base/TMFileManagerUtils.d.ts +7 -0
- package/lib/components/base/TMFileManagerUtils.js +14 -1
- package/lib/components/base/TMLayout.d.ts +4 -4
- package/lib/components/base/TMList.d.ts +2 -1
- package/lib/components/base/TMListView.d.ts +1 -1
- package/lib/components/base/TMModal.d.ts +1 -0
- package/lib/components/base/TMModal.js +4 -4
- package/lib/components/base/TMPanel.d.ts +7 -4
- package/lib/components/base/TMPanel.js +58 -26
- package/lib/components/base/TMPopUp.d.ts +1 -0
- package/lib/components/base/TMPopUp.js +59 -2
- package/lib/components/base/TMSpinner.d.ts +5 -2
- package/lib/components/base/TMSpinner.js +33 -6
- package/lib/components/base/TMTab.d.ts +4 -3
- package/lib/components/base/TMTooltip.d.ts +1 -1
- package/lib/components/base/TMTreeView.d.ts +1 -1
- package/lib/components/base/TMTreeView.js +24 -17
- package/lib/components/base/TMUserAvatar.d.ts +2 -1
- package/lib/components/base/TMVilViewer.d.ts +2 -1
- package/lib/components/base/TMWaitPanel.d.ts +5 -2
- package/lib/components/base/TMWaitPanel.js +14 -9
- package/lib/components/choosers/TMDistinctValues.js +35 -21
- package/lib/components/choosers/TMDynDataListItemChooser.d.ts +1 -1
- package/lib/components/choosers/TMDynDataListItemChooser.js +6 -1
- package/lib/components/choosers/TMGroupChooser.js +1 -1
- package/lib/components/choosers/TMInvoiceRetrieveFormats.d.ts +2 -1
- package/lib/components/choosers/TMOrderRetrieveFormats.d.ts +2 -1
- package/lib/components/choosers/TMRelationChooser.d.ts +3 -3
- package/lib/components/choosers/TMUserChooser.d.ts +6 -2
- package/lib/components/choosers/TMUserChooser.js +7 -5
- package/lib/components/editors/TMDateBox.js +4 -2
- package/lib/components/editors/TMEditorStyled.d.ts +6 -6
- package/lib/components/editors/TMFormulaEditor.d.ts +4 -1
- package/lib/components/editors/TMFormulaEditor.js +125 -22
- package/lib/components/editors/TMHtmlContentDisplay.d.ts +2 -1
- package/lib/components/editors/TMHtmlEditor.d.ts +2 -1
- package/lib/components/editors/TMMetadataEditor.js +6 -2
- package/lib/components/editors/TMMetadataValues.js +25 -7
- package/lib/components/editors/TMRadioButton.js +7 -5
- package/lib/components/editors/TMTextArea.d.ts +2 -0
- package/lib/components/editors/TMTextArea.js +6 -3
- package/lib/components/editors/TMTextBox.d.ts +2 -0
- package/lib/components/editors/TMTextBox.js +3 -3
- package/lib/components/editors/TMTreeDropDown.d.ts +1 -1
- package/lib/components/features/archive/TMArchive.js +1 -1
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.d.ts +1 -1
- package/lib/components/features/blog/TMBlogCommentForm.d.ts +2 -1
- package/lib/components/features/blog/TMBlogCommentForm.js +5 -2
- package/lib/components/features/documents/TMCopyToFolderForm.d.ts +24 -0
- package/lib/components/features/documents/TMCopyToFolderForm.js +401 -0
- package/lib/components/features/documents/TMDcmtForm.d.ts +1 -0
- package/lib/components/features/documents/TMDcmtForm.js +166 -54
- package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +1 -1
- package/lib/components/features/documents/TMDcmtFormActionButtons.js +259 -60
- package/lib/components/features/documents/TMDcmtIcon.d.ts +2 -1
- package/lib/components/features/documents/TMDcmtIcon.js +1 -1
- package/lib/components/features/documents/TMDcmtPreview.d.ts +2 -1
- package/lib/components/features/documents/TMDcmtPreview.js +2 -2
- package/lib/components/features/documents/TMDcmtTasks.d.ts +3 -1
- package/lib/components/features/documents/TMDcmtTasks.js +2 -2
- package/lib/components/features/documents/TMDownloadRelationViewerSection.d.ts +23 -0
- package/lib/components/features/documents/TMDownloadRelationViewerSection.js +173 -0
- package/lib/components/features/documents/TMDragDropOverlay.d.ts +1 -1
- package/lib/components/features/documents/TMFileUploader.js +1 -1
- package/lib/components/features/documents/TMMasterDetailDcmts.d.ts +2 -0
- package/lib/components/features/documents/TMMasterDetailDcmts.js +28 -9
- package/lib/components/features/documents/TMMergeToPdfForm.d.ts +24 -0
- package/lib/components/features/documents/TMMergeToPdfForm.js +309 -0
- package/lib/components/features/documents/TMRelationViewer.d.ts +13 -0
- package/lib/components/features/documents/TMRelationViewer.js +80 -6
- package/lib/components/features/documents/copyAndMergeDcmtsShared.d.ts +58 -0
- package/lib/components/features/documents/copyAndMergeDcmtsShared.js +266 -0
- package/lib/components/features/search/SignatureParamsManager.d.ts +70 -0
- package/lib/components/features/search/SignatureParamsManager.js +145 -0
- package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +2 -1
- package/lib/components/features/search/TMMetadataOutputForm.d.ts +18 -0
- package/lib/components/features/search/TMMetadataOutputForm.js +225 -0
- package/lib/components/features/search/TMMetadataSorterForm.d.ts +18 -0
- package/lib/components/features/search/TMMetadataSorterForm.js +243 -0
- package/lib/components/features/search/TMSavedQuerySelector.d.ts +3 -3
- package/lib/components/features/search/TMSavedQuerySelector.js +3 -2
- package/lib/components/features/search/TMSearch.d.ts +4 -1
- package/lib/components/features/search/TMSearch.js +16 -10
- package/lib/components/features/search/TMSearchQueryEditor.js +14 -8
- package/lib/components/features/search/TMSearchQueryPanel.js +250 -59
- package/lib/components/features/search/TMSearchResult.d.ts +3 -0
- package/lib/components/features/search/TMSearchResult.js +154 -38
- package/lib/components/features/search/TMSearchResultFloatingActionButton.d.ts +1 -1
- package/lib/components/features/search/TMSignatureInfoContent.d.ts +2 -1
- package/lib/components/features/search/TMViewHistoryDcmt.d.ts +2 -1
- package/lib/components/features/search/TMViewHistoryDcmt.js +2 -3
- package/lib/components/features/search/metadataFormHelper.d.ts +16 -0
- package/lib/components/features/search/metadataFormHelper.js +77 -0
- package/lib/components/features/tasks/TMTaskForm.d.ts +1 -1
- package/lib/components/features/tasks/TMTaskFormUtils.d.ts +10 -10
- package/lib/components/features/tasks/TMTasksAgenda.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksCalendar.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksHeader.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksPanelContent.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksUtilsView.d.ts +5 -5
- package/lib/components/features/tasks/TMTasksView.d.ts +1 -1
- package/lib/components/features/wg/TMWGsCopyMoveForm.d.ts +3 -2
- package/lib/components/features/workflow/TMWorkflowPopup.d.ts +8 -7
- package/lib/components/features/workflow/TMWorkflowPopup.js +3 -0
- package/lib/components/features/workflow/diagram/queryDescriptorParser.js +3 -6
- package/lib/components/forms/Login/Chooser.d.ts +2 -2
- package/lib/components/forms/Login/TMLoginForm.d.ts +9 -0
- package/lib/components/forms/Login/TMLoginForm.js +76 -3
- package/lib/components/forms/TMChooserForm.d.ts +2 -1
- package/lib/components/forms/TMResultDialog.d.ts +1 -1
- package/lib/components/forms/TMResultDialog.js +4 -2
- package/lib/components/forms/TMSaveForm.d.ts +4 -4
- package/lib/components/grids/TMBlogAttachments.d.ts +3 -1
- package/lib/components/grids/TMBlogAttachments.js +39 -13
- package/lib/components/grids/TMBlogHeader.d.ts +1 -1
- package/lib/components/grids/TMBlogsPost.d.ts +1 -1
- package/lib/components/grids/TMBlogsPost.js +12 -4
- package/lib/components/grids/TMBlogsPostUtils.d.ts +10 -9
- package/lib/components/grids/TMBlogsPostUtils.js +14 -18
- package/lib/components/grids/TMValidationItemsList.d.ts +2 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +1 -0
- package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +2 -1
- package/lib/components/layout/panelManager/TMPanelManagerContext.d.ts +2 -2
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +1 -1
- package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.d.ts +2 -2
- package/lib/components/layout/panelManager/TMPanelWrapper.d.ts +2 -2
- package/lib/components/pages/TMPage.d.ts +1 -1
- package/lib/components/pages/TMPage.js +3 -1
- package/lib/components/query/TMQueryEditor.js +2 -2
- package/lib/components/settings/SettingsAppearance.d.ts +2 -1
- package/lib/components/sidebar/TMAboutApp.d.ts +2 -1
- package/lib/components/sidebar/TMHeader.d.ts +3 -3
- package/lib/components/viewers/TMDataListItemViewer.d.ts +3 -2
- package/lib/components/viewers/TMDataUserIdItemViewer.d.ts +3 -2
- package/lib/components/viewers/TMMidViewer.d.ts +2 -2
- package/lib/components/viewers/TMTidViewer.d.ts +2 -2
- package/lib/components/viewers/TMTidViewer.js +1 -1
- package/lib/components/wizard/TMWizard.d.ts +1 -0
- package/lib/components/wizard/TMWizard.js +5 -3
- package/lib/helper/Enum_Localizator.js +1 -0
- package/lib/helper/GlobalStyles.js +6 -0
- package/lib/helper/MergePdfManager.d.ts +45 -0
- package/lib/helper/MergePdfManager.js +148 -0
- package/lib/helper/SDKUI_Globals.d.ts +15 -0
- package/lib/helper/SDKUI_Globals.js +16 -1
- package/lib/helper/SDKUI_Localizator.d.ts +112 -2
- package/lib/helper/SDKUI_Localizator.js +1120 -12
- package/lib/helper/TMCommandsContextMenu.d.ts +1 -1
- package/lib/helper/TMIcons.d.ts +278 -278
- package/lib/helper/TMPdfViewer.d.ts +2 -1
- package/lib/helper/TMPdfViewer.js +25 -24
- package/lib/helper/TMToppyMessage.d.ts +2 -2
- package/lib/helper/TMUtils.d.ts +25 -1
- package/lib/helper/TMUtils.js +72 -0
- package/lib/helper/ZipManager.d.ts +56 -0
- package/lib/helper/ZipManager.js +127 -0
- package/lib/helper/checkinCheckoutManager.d.ts +4 -3
- package/lib/helper/checkinCheckoutManager.js +29 -11
- package/lib/helper/helpers.d.ts +3 -2
- package/lib/helper/helpers.js +1 -0
- package/lib/helper/index.d.ts +1 -0
- package/lib/helper/index.js +1 -0
- package/lib/hooks/useCheckInOutOperations.d.ts +4 -3
- package/lib/hooks/useDataUserIdItem.js +6 -4
- package/lib/hooks/useDcmtOperations.d.ts +26 -2
- package/lib/hooks/useDcmtOperations.js +292 -38
- package/lib/hooks/useDocumentOperations.d.ts +3 -0
- package/lib/hooks/useDocumentOperations.js +254 -26
- package/lib/hooks/useForm.js +5 -2
- package/lib/hooks/useInputDialog.d.ts +2 -1
- package/lib/hooks/useRelatedDocuments.js +4 -4
- package/lib/hooks/useResizeObserver.d.ts +1 -1
- package/lib/hooks/useResizeObserver.js +16 -15
- package/lib/services/platform_services.d.ts +7 -6
- package/lib/ts/types.d.ts +3 -1
- package/lib/ts/types.js +1 -0
- package/package.json +15 -7
|
@@ -58,11 +58,15 @@ export const renderFormulaIcon = (iconType, tid, md) => {
|
|
|
58
58
|
default: return _jsx(_Fragment, {});
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
+
const FormulaTreeViewItem = ({ item }) => {
|
|
62
|
+
return (_jsxs(StyledDivHorizontal, { style: { display: 'flex', gap: '5px', alignItems: 'center' }, children: [renderFormulaIcon(item.icon, item.tid, item.md), _jsx("span", { style: { whiteSpace: 'nowrap', textOverflow: 'ellipsis', overflow: 'hidden' }, children: item.text })] }));
|
|
63
|
+
};
|
|
61
64
|
const TMFormulaEditor = (props) => {
|
|
62
65
|
const deviceType = useDeviceType();
|
|
63
66
|
const [validationItems, setValidationItems] = useState([]);
|
|
64
67
|
const { formData, setFormData, formDataOrig, exception, applyData } = useApplyForm(props.formMode, props.inputData, () => new FormulaDescriptor(), props.onApplied);
|
|
65
68
|
const [isVertical, setIsVertical] = useState(deviceType === DeviceType.MOBILE);
|
|
69
|
+
const [selectedItem, setSelectedItem] = useState(null);
|
|
66
70
|
// const [code, setCode] = useState(`function add(a, b) {\n return a + b;\n}` );
|
|
67
71
|
const textAreaRef = useRef(null);
|
|
68
72
|
const { ref, width } = useResizeObserver();
|
|
@@ -130,37 +134,26 @@ const TMFormulaEditor = (props) => {
|
|
|
130
134
|
}
|
|
131
135
|
};
|
|
132
136
|
const renderTreeViewItem = useCallback((item) => {
|
|
133
|
-
return (
|
|
137
|
+
return _jsx(FormulaTreeViewItem, { item: item });
|
|
134
138
|
}, []);
|
|
135
|
-
const translateDescInFormula = (text) => {
|
|
136
|
-
switch (text) {
|
|
137
|
-
case `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithoutLogin})`:
|
|
138
|
-
return `[dbo].[TM_GetViewLink](NULL, NULL, NULL, 0, {@TID}, {@DID}, 1, NULL, 0)`;
|
|
139
|
-
case `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithLogin})`:
|
|
140
|
-
return `[dbo].[TM_GetViewLink](NULL, 'ASKLOGIN', NULL, 0, {@TID}, {@DID}, 1, NULL, 0)`;
|
|
141
|
-
case `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithDate})`:
|
|
142
|
-
return `[dbo].[TM_GetViewLink](NULL, NULL, NULL, 0, {@TID}, {@DID}, 1, CONVERT(VARCHAR, {@CreationTime}+30, 126), 0)`;
|
|
143
|
-
break;
|
|
144
|
-
}
|
|
145
|
-
return text;
|
|
146
|
-
};
|
|
147
139
|
const handleTreeViewItemClick = (e) => {
|
|
148
140
|
if (!e)
|
|
149
141
|
return;
|
|
150
142
|
if (e.itemData?.hasItems)
|
|
151
143
|
return;
|
|
152
|
-
|
|
144
|
+
setSelectedItem(e.itemData);
|
|
145
|
+
insertText(FormulaHelper.translateDescInFormula(e.itemData?.text));
|
|
153
146
|
};
|
|
154
|
-
return (
|
|
147
|
+
return (_jsxs(TMApplyForm, { isModal: props.isModal, formMode: props.formMode, isModified: formData.expression !== formDataOrig.expression, exception: exception, validationItems: validationItems, title: SDKUI_Localizator.Formula, hasNavigation: false, showBack: props.showBack, height: '600px', width: '800px', onApply: () => applyData(), onClose: props.onClose, onUndo: () => {
|
|
155
148
|
setFormData(formDataOrig);
|
|
156
149
|
setValidationItems([]);
|
|
157
|
-
}, customToolbarElements: _jsx(TMButton, { caption: SDKUI_Localizator.EvaluateResult, onClick: () => { formulaValidator_BackEnd(); }, btnStyle: 'toolbar', icon: _jsx(IconNotification, {}) }), children: _jsx("div", { ref: ref, style: { width: '100%', height: '100%' }, children: _jsxs(TMSplitterLayout, { direction: isVertical ? 'vertical' : 'horizontal', showSeparator: true, separatorSize: 5, start: isVertical ? ['50%', '50%'] : ['35%', '65%'], min: ['0px', '0px'], children: [_jsx(TMCard, { scrollX: true, children: _jsx(TreeView, { id: "treeview", items: props.inputData?.items, width: '100%', height: '100%', scrollDirection: 'vertical', itemRender: renderTreeViewItem, onItemClick: handleTreeViewItemClick }) }), _jsxs(TMLayoutContainer, { direction: 'vertical', children: [_jsx(TMLayoutItem, { children: _jsx(TMCard, { scrollX: true, children: _jsx("textarea", { ref: textAreaRef, spellCheck: false, value: formData?.expression ?? '', onChange: (e) => {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
150
|
+
}, customToolbarElements: _jsx(TMButton, { caption: SDKUI_Localizator.EvaluateResult, onClick: () => { formulaValidator_BackEnd(); }, btnStyle: 'toolbar', icon: _jsx(IconNotification, {}) }), children: [selectedItem?.description && (_jsx(TMLayoutItem, { height: "max-content", children: _jsxs("div", { style: { padding: '6px 10px', background: TMColors.default_background, borderTop: `1px solid ${TMColors.border_normal}`, fontSize: FontSize.defaultFontSize }, children: [_jsx("span", { style: { fontWeight: 'bold', color: TMColors.info, marginRight: '8px' }, children: selectedItem.syntax }), _jsx("span", { style: { color: TMColors.info }, children: selectedItem.description })] }) })), _jsx("div", { ref: ref, style: { width: '100%', height: '100%' }, children: _jsxs(TMSplitterLayout, { direction: isVertical ? 'vertical' : 'horizontal', showSeparator: true, separatorSize: 5, start: isVertical ? ['50%', '50%'] : ['35%', '65%'], min: ['0px', '0px'], children: [_jsx(TMCard, { scrollX: true, children: _jsx(TreeView, { id: "treeview", items: props.inputData?.items, width: '100%', height: '100%', scrollDirection: 'vertical', itemRender: renderTreeViewItem, onItemClick: handleTreeViewItemClick }) }), _jsxs(TMLayoutContainer, { direction: 'vertical', children: [_jsx(TMLayoutItem, { children: _jsx(TMCard, { scrollX: true, children: _jsx("textarea", { ref: textAreaRef, spellCheck: false, value: formData?.expression ?? '', onChange: (e) => {
|
|
151
|
+
setFormData({ ...formData, expression: e.target.value });
|
|
152
|
+
if (e.target.value != formDataOrig?.expression)
|
|
153
|
+
insertValidationItem();
|
|
154
|
+
else
|
|
155
|
+
setValidationItems([]);
|
|
156
|
+
}, style: { border: 'none', resize: 'none', color: TMColors.text_normal, fontSize: FontSize.defaultFontSize, padding: '5px', width: '100%', height: 'calc(100% - 4px)' } }) }) }), _jsx(TMLayoutItem, { height: "max-content", children: _jsx(TMVilViewer, { vil: validationItems }) })] })] }) })] }));
|
|
164
157
|
};
|
|
165
158
|
export default TMFormulaEditor;
|
|
166
159
|
export class FormulaHelper {
|
|
@@ -351,6 +344,8 @@ export class FormulaHelper {
|
|
|
351
344
|
tid: -1,
|
|
352
345
|
expanded: false,
|
|
353
346
|
hasItems: false,
|
|
347
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_SS_CASE,
|
|
348
|
+
syntax: "CASE...WHEN boolean_expression THEN result_expression ...ELSE else_result_expression...END"
|
|
354
349
|
}, {
|
|
355
350
|
id: '1_4_2',
|
|
356
351
|
text: 'IS NULL',
|
|
@@ -358,6 +353,8 @@ export class FormulaHelper {
|
|
|
358
353
|
tid: -1,
|
|
359
354
|
expanded: false,
|
|
360
355
|
hasItems: false,
|
|
356
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_SS_ISNULL,
|
|
357
|
+
syntax: "expression IS [ NOT ] NULL"
|
|
361
358
|
}];
|
|
362
359
|
break;
|
|
363
360
|
case DBBrands.Oracle:
|
|
@@ -369,6 +366,8 @@ export class FormulaHelper {
|
|
|
369
366
|
tid: -1,
|
|
370
367
|
expanded: false,
|
|
371
368
|
hasItems: false,
|
|
369
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_ORA_CASE,
|
|
370
|
+
syntax: "CASE case_operand ...WHEN when_operand THEN statement...ELSE statement...END"
|
|
372
371
|
}, {
|
|
373
372
|
id: '1_4_2',
|
|
374
373
|
text: 'IS NULL',
|
|
@@ -376,6 +375,8 @@ export class FormulaHelper {
|
|
|
376
375
|
tid: -1,
|
|
377
376
|
expanded: false,
|
|
378
377
|
hasItems: false,
|
|
378
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_ORA_IS_NULL,
|
|
379
|
+
syntax: "expression IS [ NOT ] NULL"
|
|
379
380
|
}, {
|
|
380
381
|
id: '1_4_3',
|
|
381
382
|
text: 'GREATEST',
|
|
@@ -383,6 +384,8 @@ export class FormulaHelper {
|
|
|
383
384
|
tid: -1,
|
|
384
385
|
expanded: false,
|
|
385
386
|
hasItems: false,
|
|
387
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_ORA_GREATEST,
|
|
388
|
+
syntax: "GREATEST(expr [, expr ])"
|
|
386
389
|
}, {
|
|
387
390
|
id: '1_4_4',
|
|
388
391
|
text: 'LEAST',
|
|
@@ -390,6 +393,8 @@ export class FormulaHelper {
|
|
|
390
393
|
tid: -1,
|
|
391
394
|
expanded: false,
|
|
392
395
|
hasItems: false,
|
|
396
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_ORA_LEAST,
|
|
397
|
+
syntax: "LEAST(expr [, expr ])"
|
|
393
398
|
}];
|
|
394
399
|
break;
|
|
395
400
|
}
|
|
@@ -437,24 +442,32 @@ export class FormulaHelper {
|
|
|
437
442
|
icon: FormulaIconTypes.Function,
|
|
438
443
|
expanded: false,
|
|
439
444
|
hasItems: false,
|
|
445
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_SS_CONVERT,
|
|
446
|
+
syntax: "CONVERT ( data_type [ ( length ) ] , expression [ , style ] )"
|
|
440
447
|
}, {
|
|
441
448
|
id: '3_1_2',
|
|
442
449
|
text: 'CONVERT(nvarchar)',
|
|
443
450
|
icon: FormulaIconTypes.Function,
|
|
444
451
|
expanded: false,
|
|
445
452
|
hasItems: false,
|
|
453
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_SS_CONVERTnvarchar,
|
|
454
|
+
syntax: "CONVERT ( NVARCHAR [ ( length ) ] , expression [ , style ] )"
|
|
446
455
|
}, {
|
|
447
456
|
id: '3_1_3',
|
|
448
457
|
text: 'CONVERT(int)',
|
|
449
458
|
icon: FormulaIconTypes.Function,
|
|
450
459
|
expanded: false,
|
|
451
460
|
hasItems: false,
|
|
461
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_SS_CONVERTint,
|
|
462
|
+
syntax: "CONVERT ( INT [ ( length ) ] , expression [ , style ] )"
|
|
452
463
|
}, {
|
|
453
464
|
id: '3_1_4',
|
|
454
465
|
text: 'ISNULL',
|
|
455
466
|
icon: FormulaIconTypes.Function,
|
|
456
467
|
expanded: false,
|
|
457
468
|
hasItems: false,
|
|
469
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_SS_ISNULL,
|
|
470
|
+
syntax: "ISNULL ( expression , replacement_value )"
|
|
458
471
|
}];
|
|
459
472
|
break;
|
|
460
473
|
case DBBrands.Oracle:
|
|
@@ -465,24 +478,32 @@ export class FormulaHelper {
|
|
|
465
478
|
icon: FormulaIconTypes.Function,
|
|
466
479
|
expanded: false,
|
|
467
480
|
hasItems: false,
|
|
481
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_ORA_CAST,
|
|
482
|
+
syntax: "CAST( { expr | MULTISET ( subquery ) } AS type_name )"
|
|
468
483
|
}, {
|
|
469
484
|
id: '3_1_2',
|
|
470
485
|
text: 'CAST(NVARCHAR2)',
|
|
471
486
|
icon: FormulaIconTypes.Function,
|
|
472
487
|
expanded: false,
|
|
473
488
|
hasItems: false,
|
|
489
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_ORA_CASTnvarchar2,
|
|
490
|
+
syntax: "CAST ( expression | MULTISET ( subquery ) AS NVARCHAR2( length ) )"
|
|
474
491
|
}, {
|
|
475
492
|
id: '3_1_3',
|
|
476
493
|
text: 'CAST(NUMERIC)',
|
|
477
494
|
icon: FormulaIconTypes.Function,
|
|
478
495
|
expanded: false,
|
|
479
496
|
hasItems: false,
|
|
497
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_ORA_CASTnumeric,
|
|
498
|
+
syntax: "CAST ( expression | MULTISET ( subquery ) AS NUMERIC( precision, scale ) )"
|
|
480
499
|
}, {
|
|
481
500
|
id: '3_1_4',
|
|
482
501
|
text: 'NVL',
|
|
483
502
|
icon: FormulaIconTypes.Function,
|
|
484
503
|
expanded: false,
|
|
485
504
|
hasItems: false,
|
|
505
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_ORA_NVL,
|
|
506
|
+
syntax: "NVL ( expression , replacement_value )"
|
|
486
507
|
}];
|
|
487
508
|
break;
|
|
488
509
|
}
|
|
@@ -499,72 +520,96 @@ export class FormulaHelper {
|
|
|
499
520
|
icon: FormulaIconTypes.Function,
|
|
500
521
|
expanded: false,
|
|
501
522
|
hasItems: false,
|
|
523
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_LEN,
|
|
524
|
+
syntax: "LEN ( string_expression )"
|
|
502
525
|
}, {
|
|
503
526
|
id: '3_2_2',
|
|
504
527
|
text: 'LEFT',
|
|
505
528
|
icon: FormulaIconTypes.Function,
|
|
506
529
|
expanded: false,
|
|
507
530
|
hasItems: false,
|
|
531
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_LEFT,
|
|
532
|
+
syntax: "LEFT ( character_expression , integer_expression )"
|
|
508
533
|
}, {
|
|
509
534
|
id: '3_2_3',
|
|
510
535
|
text: 'LOWER',
|
|
511
536
|
icon: FormulaIconTypes.Function,
|
|
512
537
|
expanded: false,
|
|
513
538
|
hasItems: false,
|
|
539
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_LOWER,
|
|
540
|
+
syntax: "LOWER ( string_expression )"
|
|
514
541
|
}, {
|
|
515
542
|
id: '3_2_4',
|
|
516
543
|
text: 'LTRIM',
|
|
517
544
|
icon: FormulaIconTypes.Function,
|
|
518
545
|
expanded: false,
|
|
519
546
|
hasItems: false,
|
|
547
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_LTRIM,
|
|
548
|
+
syntax: "LTRIM ( string_expression )"
|
|
520
549
|
}, {
|
|
521
550
|
id: '3_2_5',
|
|
522
551
|
text: 'REPLACE',
|
|
523
552
|
icon: FormulaIconTypes.Function,
|
|
524
553
|
expanded: false,
|
|
525
554
|
hasItems: false,
|
|
555
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_REPLACE,
|
|
556
|
+
syntax: "REPLACE ( string_expression , string_pattern , string_replacement )"
|
|
526
557
|
}, {
|
|
527
558
|
id: '3_2_6',
|
|
528
559
|
text: 'REPLICATE',
|
|
529
560
|
icon: FormulaIconTypes.Function,
|
|
530
561
|
expanded: false,
|
|
531
562
|
hasItems: false,
|
|
563
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_REPLICATE,
|
|
564
|
+
syntax: "REPLICATE ( string_expression , integer_expression )"
|
|
532
565
|
}, {
|
|
533
566
|
id: '3_2_7',
|
|
534
567
|
text: 'RIGHT',
|
|
535
568
|
icon: FormulaIconTypes.Function,
|
|
536
569
|
expanded: false,
|
|
537
570
|
hasItems: false,
|
|
571
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_RIGHT,
|
|
572
|
+
syntax: "RIGHT ( string_expression , integer_expression )"
|
|
538
573
|
}, {
|
|
539
574
|
id: '3_2_8',
|
|
540
575
|
text: 'RTRIM',
|
|
541
576
|
icon: FormulaIconTypes.Function,
|
|
542
577
|
expanded: false,
|
|
543
578
|
hasItems: false,
|
|
579
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_RTRIM,
|
|
580
|
+
syntax: "RTRIM ( string_expression )"
|
|
544
581
|
}, {
|
|
545
582
|
id: '3_2_9',
|
|
546
583
|
text: 'SPACE',
|
|
547
584
|
icon: FormulaIconTypes.Function,
|
|
548
585
|
expanded: false,
|
|
549
586
|
hasItems: false,
|
|
587
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_SPACE,
|
|
588
|
+
syntax: "SPACE ( integer_expression )"
|
|
550
589
|
}, {
|
|
551
590
|
id: '3_2_10',
|
|
552
591
|
text: 'STUFF',
|
|
553
592
|
icon: FormulaIconTypes.Function,
|
|
554
593
|
expanded: false,
|
|
555
594
|
hasItems: false,
|
|
595
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_STUFF,
|
|
596
|
+
syntax: "STUFF ( character_expression , start , length , replaceWith_character_expression )"
|
|
556
597
|
}, {
|
|
557
598
|
id: '3_2_11',
|
|
558
599
|
text: 'SUBSTRING',
|
|
559
600
|
icon: FormulaIconTypes.Function,
|
|
560
601
|
expanded: false,
|
|
561
602
|
hasItems: false,
|
|
603
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_SUBSTRING,
|
|
604
|
+
syntax: "SUBSTRING ( expression , start , length )"
|
|
562
605
|
}, {
|
|
563
606
|
id: '3_2_12',
|
|
564
607
|
text: 'UPPER',
|
|
565
608
|
icon: FormulaIconTypes.Function,
|
|
566
609
|
expanded: false,
|
|
567
610
|
hasItems: false,
|
|
611
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_UPPER,
|
|
612
|
+
syntax: "UPPER ( string_expression )"
|
|
568
613
|
}];
|
|
569
614
|
break;
|
|
570
615
|
case DBBrands.Oracle:
|
|
@@ -575,36 +620,48 @@ export class FormulaHelper {
|
|
|
575
620
|
icon: FormulaIconTypes.Function,
|
|
576
621
|
expanded: false,
|
|
577
622
|
hasItems: false,
|
|
623
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_LENGTH,
|
|
624
|
+
syntax: "LENGTH ( string )"
|
|
578
625
|
}, {
|
|
579
626
|
id: '3_2_2',
|
|
580
627
|
text: 'LOWER',
|
|
581
628
|
icon: FormulaIconTypes.Function,
|
|
582
629
|
expanded: false,
|
|
583
630
|
hasItems: false,
|
|
631
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_LOWER,
|
|
632
|
+
syntax: "LOWER ( string )"
|
|
584
633
|
}, {
|
|
585
634
|
id: '3_2_3',
|
|
586
635
|
text: 'TRIM',
|
|
587
636
|
icon: FormulaIconTypes.Function,
|
|
588
637
|
expanded: false,
|
|
589
638
|
hasItems: false,
|
|
639
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_TRIM,
|
|
640
|
+
syntax: "TRIM ( [ trim_character FROM ] string )"
|
|
590
641
|
}, {
|
|
591
642
|
id: '3_2_4',
|
|
592
643
|
text: 'REPLACE',
|
|
593
644
|
icon: FormulaIconTypes.Function,
|
|
594
645
|
expanded: false,
|
|
595
646
|
hasItems: false,
|
|
647
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_REPLACE,
|
|
648
|
+
syntax: "REPLACE ( string, search_string, replacement_string )"
|
|
596
649
|
}, {
|
|
597
650
|
id: '3_2_5',
|
|
598
651
|
text: 'SUBSTR',
|
|
599
652
|
icon: FormulaIconTypes.Function,
|
|
600
653
|
expanded: false,
|
|
601
654
|
hasItems: false,
|
|
655
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_SUBSTR,
|
|
656
|
+
syntax: "SUBSTR ( string, start_position [, length ] )"
|
|
602
657
|
}, {
|
|
603
658
|
id: '3_2_6',
|
|
604
659
|
text: 'UPPER',
|
|
605
660
|
icon: FormulaIconTypes.Function,
|
|
606
661
|
expanded: false,
|
|
607
662
|
hasItems: false,
|
|
663
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_UPPER,
|
|
664
|
+
syntax: "UPPER ( string )"
|
|
608
665
|
}];
|
|
609
666
|
break;
|
|
610
667
|
}
|
|
@@ -621,18 +678,24 @@ export class FormulaHelper {
|
|
|
621
678
|
icon: FormulaIconTypes.Function,
|
|
622
679
|
expanded: false,
|
|
623
680
|
hasItems: false,
|
|
681
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_DATEDIFFyear,
|
|
682
|
+
syntax: "DATEDIFF ( datepart , startdate , enddate )"
|
|
624
683
|
}, {
|
|
625
684
|
id: '3_3_2',
|
|
626
685
|
text: 'DATEDIFF ( day )',
|
|
627
686
|
icon: FormulaIconTypes.Function,
|
|
628
687
|
expanded: false,
|
|
629
688
|
hasItems: false,
|
|
689
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_DATEDIFFday,
|
|
690
|
+
syntax: "DATEDIFF ( datepart , startdate , enddate )"
|
|
630
691
|
}, {
|
|
631
692
|
id: '3_3_3',
|
|
632
693
|
text: 'DATEADD',
|
|
633
694
|
icon: FormulaIconTypes.Function,
|
|
634
695
|
expanded: false,
|
|
635
696
|
hasItems: false,
|
|
697
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_DATEADD,
|
|
698
|
+
syntax: "DATEADD ( datepart , number , date )"
|
|
636
699
|
}];
|
|
637
700
|
if (formulaTarget == FormulaTargets.DefaultValue || formulaTarget == FormulaTargets.BatchUpdate) {
|
|
638
701
|
items.push({
|
|
@@ -641,24 +704,32 @@ export class FormulaHelper {
|
|
|
641
704
|
icon: FormulaIconTypes.Function,
|
|
642
705
|
expanded: false,
|
|
643
706
|
hasItems: false,
|
|
707
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_GETDATE,
|
|
708
|
+
syntax: "GETDATE()"
|
|
644
709
|
}, {
|
|
645
710
|
id: '3_3_5',
|
|
646
711
|
text: 'DAY(GETDATE())',
|
|
647
712
|
icon: FormulaIconTypes.Function,
|
|
648
713
|
expanded: false,
|
|
649
714
|
hasItems: false,
|
|
715
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_DAYGETDATE,
|
|
716
|
+
syntax: "DAY(GETDATE())"
|
|
650
717
|
}, {
|
|
651
718
|
id: '3_3_6',
|
|
652
719
|
text: 'MONTH(GETDATE())',
|
|
653
720
|
icon: FormulaIconTypes.Function,
|
|
654
721
|
expanded: false,
|
|
655
722
|
hasItems: false,
|
|
723
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_MONTHGETDATE,
|
|
724
|
+
syntax: "MONTH(GETDATE())"
|
|
656
725
|
}, {
|
|
657
726
|
id: '3_3_7',
|
|
658
727
|
text: 'YEAR(GETDATE())',
|
|
659
728
|
icon: FormulaIconTypes.Function,
|
|
660
729
|
expanded: false,
|
|
661
730
|
hasItems: false,
|
|
731
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_YEARGETDATE,
|
|
732
|
+
syntax: "YEAR(GETDATE())"
|
|
662
733
|
});
|
|
663
734
|
}
|
|
664
735
|
break;
|
|
@@ -670,18 +741,24 @@ export class FormulaHelper {
|
|
|
670
741
|
icon: FormulaIconTypes.Function,
|
|
671
742
|
expanded: false,
|
|
672
743
|
hasItems: false,
|
|
744
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_TO_DATE,
|
|
745
|
+
syntax: "TO_DATE( string, format )"
|
|
673
746
|
}, {
|
|
674
747
|
id: '3_3_2',
|
|
675
748
|
text: 'LAST_DAY',
|
|
676
749
|
icon: FormulaIconTypes.Function,
|
|
677
750
|
expanded: false,
|
|
678
751
|
hasItems: false,
|
|
752
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_LAST_DAY,
|
|
753
|
+
syntax: "LAST_DAY( date )"
|
|
679
754
|
}, {
|
|
680
755
|
id: '3_3_3',
|
|
681
756
|
text: 'ADD_MONTHS',
|
|
682
757
|
icon: FormulaIconTypes.Function,
|
|
683
758
|
expanded: false,
|
|
684
759
|
hasItems: false,
|
|
760
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_ADD_MONTHS,
|
|
761
|
+
syntax: "ADD_MONTHS( date, n_months )"
|
|
685
762
|
}];
|
|
686
763
|
if (formulaTarget == FormulaTargets.DefaultValue || formulaTarget == FormulaTargets.BatchUpdate) {
|
|
687
764
|
items.push({
|
|
@@ -690,24 +767,32 @@ export class FormulaHelper {
|
|
|
690
767
|
icon: FormulaIconTypes.Function,
|
|
691
768
|
expanded: false,
|
|
692
769
|
hasItems: false,
|
|
770
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_SYSDATE,
|
|
771
|
+
syntax: "SYSDATE"
|
|
693
772
|
}, {
|
|
694
773
|
id: '3_3_5',
|
|
695
774
|
text: 'TO_CHAR(SYSDATE, "DD")',
|
|
696
775
|
icon: FormulaIconTypes.Function,
|
|
697
776
|
expanded: false,
|
|
698
777
|
hasItems: false,
|
|
778
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_TOCHARDATETIME,
|
|
779
|
+
syntax: "TO_CHAR(SYSDATE, 'DD')"
|
|
699
780
|
}, {
|
|
700
781
|
id: '3_3_6',
|
|
701
782
|
text: 'TO_CHAR(SYSDATE, "MM")',
|
|
702
783
|
icon: FormulaIconTypes.Function,
|
|
703
784
|
expanded: false,
|
|
704
785
|
hasItems: false,
|
|
786
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_TOCHARDATETIME,
|
|
787
|
+
syntax: "TO_CHAR(SYSDATE, 'MM')"
|
|
705
788
|
}, {
|
|
706
789
|
id: '3_3_7',
|
|
707
790
|
text: 'TO_CHAR(SYSDATE, "YYYY")',
|
|
708
791
|
icon: FormulaIconTypes.Function,
|
|
709
792
|
expanded: false,
|
|
710
793
|
hasItems: false,
|
|
794
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_TOCHARDATETIME,
|
|
795
|
+
syntax: "TO_CHAR(SYSDATE, 'YYYY')"
|
|
711
796
|
});
|
|
712
797
|
}
|
|
713
798
|
break;
|
|
@@ -721,19 +806,37 @@ export class FormulaHelper {
|
|
|
721
806
|
icon: FormulaIconTypes.Function,
|
|
722
807
|
expanded: false,
|
|
723
808
|
hasItems: false,
|
|
809
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_TM_GetViewLink_WithoutLogin,
|
|
810
|
+
syntax: "TM_GetViewLink(Domain, UserName, Psw, CultureID, TID, DID, WithoutP7M, ExpDate, LastVer)"
|
|
724
811
|
}, {
|
|
725
812
|
id: '3_4_2',
|
|
726
813
|
text: `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithLogin})`,
|
|
727
814
|
icon: FormulaIconTypes.Function,
|
|
728
815
|
expanded: false,
|
|
729
816
|
hasItems: false,
|
|
817
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_TM_GetViewLink_WithLogin,
|
|
818
|
+
syntax: "TM_GetViewLink(Domain, UserName, Psw, CultureID, TID, DID, WithoutP7M, ExpDate, LastVer)"
|
|
730
819
|
}, {
|
|
731
820
|
id: '3_4_3',
|
|
732
821
|
text: `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithDate})`,
|
|
733
822
|
icon: FormulaIconTypes.Function,
|
|
734
823
|
expanded: false,
|
|
735
824
|
hasItems: false,
|
|
825
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_TM_GetViewLink_WithDate,
|
|
826
|
+
syntax: "TM_GetViewLink(Domain, UserName, Psw, CultureID, TID, DID, WithoutP7M, ExpDate, LastVer)"
|
|
736
827
|
}];
|
|
737
828
|
return items;
|
|
738
829
|
}
|
|
739
830
|
}
|
|
831
|
+
FormulaHelper.translateDescInFormula = (text, returnType) => {
|
|
832
|
+
switch (text) {
|
|
833
|
+
case `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithoutLogin})`:
|
|
834
|
+
return `[dbo].[TM_GetViewLink](NULL, NULL, NULL, 0, {@TID}, {@DID}, 1, NULL, 0)`;
|
|
835
|
+
case `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithLogin})`:
|
|
836
|
+
return `[dbo].[TM_GetViewLink](NULL, 'ASKLOGIN', NULL, 0, {@TID}, {@DID}, 1, NULL, 0)`;
|
|
837
|
+
case `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithDate})`:
|
|
838
|
+
return `[dbo].[TM_GetViewLink](NULL, NULL, NULL, 0, {@TID}, {@DID}, 1, CONVERT(VARCHAR, {@CreationTime}+30, 126), 0)`;
|
|
839
|
+
break;
|
|
840
|
+
}
|
|
841
|
+
return returnType ?? text;
|
|
842
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
interface IHtmlContentDisplay {
|
|
2
3
|
markup: string;
|
|
3
4
|
isSelected: boolean;
|
|
4
5
|
searchText?: string;
|
|
5
6
|
}
|
|
6
|
-
declare const TMHtmlContentDisplay: (props: IHtmlContentDisplay) =>
|
|
7
|
+
declare const TMHtmlContentDisplay: (props: IHtmlContentDisplay) => React.JSX.Element;
|
|
7
8
|
export default TMHtmlContentDisplay;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ValidationItem } from '@topconsultnpm/sdk-ts';
|
|
2
3
|
export declare const sanitizeAndFormatComment: (raw?: string) => string;
|
|
3
4
|
export interface ITMHtmlEditor {
|
|
@@ -34,5 +35,5 @@ export interface ITMHtmlEditor {
|
|
|
34
35
|
/** If true, displays a character count below the editor */
|
|
35
36
|
showCount?: boolean;
|
|
36
37
|
}
|
|
37
|
-
declare const TMHtmlEditor: (props: ITMHtmlEditor) =>
|
|
38
|
+
declare const TMHtmlEditor: (props: ITMHtmlEditor) => React.JSX.Element;
|
|
38
39
|
export default TMHtmlEditor;
|
|
@@ -79,12 +79,16 @@ const TMMetadataEditor = ({ isSelected = false, customLabel, isReadOnly, isLexPr
|
|
|
79
79
|
if (value?.startsWith("{@QueryParam") || value == "{@UserName}" || value == "{@UserID}" || queryOperator == QueryOperators.Custom || isEditable)
|
|
80
80
|
return _jsx(TMTextBox, { placeHolder: layoutMode === LayoutModes.Ark ? md?.defaultValue ?? '' : '', isModifiedWhen: isModifiedWhenInternal(), readOnly: isReadOnlyResult, label: (modulesWithLabelTop || showLabelTop) ? (customLabel ?? md?.nameLoc) : undefined, icon: showLabelTop ? icon : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, type: 'text', maxLength: isEditable ? undefined : maxLength, autoFocus: autoFocus, value: value ?? '', onValueChanged: (e) => onValueChange?.(e.target.value), onBlur: (newValue) => onValueChanged?.(newValue) });
|
|
81
81
|
if (md?.dataDomain == MetadataDataDomains.DynamicDataList)
|
|
82
|
-
return _jsx(TMDynDataListItemChooser, { placeHolder: layoutMode === LayoutModes.Ark ? md?.defaultValue ?? '' : '', titleForm: md.nameLoc, readOnly: isReadOnlyResult, layoutMode: layoutMode, isModifiedWhen: isModifiedWhenInternal(), label: (modulesWithLabelTop || showLabelTop) ? (customLabel ?? md?.nameLoc) : undefined, icon: showLabelTop ? icon : undefined, validationItems: validationItems, disabled: disabled, md: md, tid: tid, openChooserBySingleClick: openChooserBySingleClick, queryParamsDynDataList: queryParamsDynDataList, onCascadeRefreshDynDataLists: onCascadeRefreshDynDataLists, onCascadeUpdateMIDs: onCascadeUpdateMIDs, elementStyle: { width: '100%' }, backgroundColor: TMColors.default_background, allowMultipleSelection: multipleSelectionIsenabled, values: value ? value.split(',')
|
|
82
|
+
return _jsx(TMDynDataListItemChooser, { placeHolder: layoutMode === LayoutModes.Ark ? md?.defaultValue ?? '' : '', titleForm: md.nameLoc, readOnly: isReadOnlyResult, layoutMode: layoutMode, isModifiedWhen: isModifiedWhenInternal(), label: (modulesWithLabelTop || showLabelTop) ? (customLabel ?? md?.nameLoc) : undefined, icon: showLabelTop ? icon : undefined, validationItems: validationItems, disabled: disabled, md: md, tid: tid, openChooserBySingleClick: openChooserBySingleClick, queryParamsDynDataList: queryParamsDynDataList, onCascadeRefreshDynDataLists: onCascadeRefreshDynDataLists, onCascadeUpdateMIDs: onCascadeUpdateMIDs, elementStyle: { width: '100%' }, backgroundColor: TMColors.default_background, allowMultipleSelection: multipleSelectionIsenabled, values: multipleSelectionIsenabled ? (value ? value.split(',') : []) : (value ? [value] : []), showClearButton: !isReadOnlyResult, onValueChanged: (IDs) => {
|
|
83
83
|
const filteredIDs = IDs?.filter(id => id.trim() !== '');
|
|
84
84
|
if (!filteredIDs || filteredIDs.length <= 0)
|
|
85
85
|
onValueChanged?.(undefined);
|
|
86
|
-
else
|
|
86
|
+
else if (multipleSelectionIsenabled) {
|
|
87
87
|
onValueChanged?.(filteredIDs.join(","));
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
onValueChanged?.(filteredIDs[0]);
|
|
91
|
+
}
|
|
88
92
|
}, updateIsModalOpen: updateIsModalOpen });
|
|
89
93
|
if (md?.dataDomain == MetadataDataDomains.DataList)
|
|
90
94
|
return _jsx(TMDataListItemChooser, { placeHolder: layoutMode === LayoutModes.Ark ? md?.defaultValue ?? '' : '', titleForm: md.nameLoc, readOnly: isReadOnlyResult, isModifiedWhen: isModifiedWhenInternal(), label: (modulesWithLabelTop || showLabelTop) ? (customLabel ?? md?.nameLoc) : undefined, icon: showLabelTop ? icon : undefined, validationItems: validationItems, disabled: disabled, elementStyle: { width: '100%' }, backgroundColor: TMColors.default_background, dataListId: md.dataListID, openChooserBySingleClick: openChooserBySingleClick, allowMultipleSelection: multipleSelectionIsenabled, values: value?.split(',').map((item) => !item.startsWith("'") ? item : item.slice(1, -1)) ?? [], showClearButton: !isReadOnlyResult, onValueChanged: (IDs) => {
|
|
@@ -15,6 +15,8 @@ import { TMNothingToShow } from "../features/documents/TMDcmtPreview";
|
|
|
15
15
|
import TMAccordion from "../base/TMAccordion";
|
|
16
16
|
import TabPanel, { Item } from 'devextreme-react/tab-panel';
|
|
17
17
|
import { TMExceptionBoxManager } from "../base/TMPopUp";
|
|
18
|
+
// Costante per la minWidth degli elementi - garantisce coerenza tra layout orizzontale e verticale
|
|
19
|
+
const ITEM_MIN_WIDTH = 200;
|
|
18
20
|
export var ShowCheckBoxesMode;
|
|
19
21
|
(function (ShowCheckBoxesMode) {
|
|
20
22
|
ShowCheckBoxesMode[ShowCheckBoxesMode["Never"] = 0] = "Never";
|
|
@@ -47,8 +49,12 @@ const TMMetadataValues = ({ showCheckBoxes = ShowCheckBoxesMode.Never, checkPerm
|
|
|
47
49
|
let dynDLToBeRefreshed = dynDataListsToBeRefreshed.find(o => o.midStarter === mid);
|
|
48
50
|
while (dynDLToBeRefreshed != undefined) {
|
|
49
51
|
const item = newValues.find(value => value.mid === dynDLToBeRefreshed?.mid);
|
|
50
|
-
if (item)
|
|
52
|
+
if (item) {
|
|
51
53
|
item.value = newValue;
|
|
54
|
+
if (showCheckBoxes !== ShowCheckBoxesMode.Never) {
|
|
55
|
+
item.isSelected = false;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
52
58
|
dynDLToBeRefreshed = dynDataListsToBeRefreshed.find(o => o.midStarter === item?.mid);
|
|
53
59
|
}
|
|
54
60
|
}
|
|
@@ -287,8 +293,12 @@ const TMMetadataValues = ({ showCheckBoxes = ShowCheckBoxesMode.Never, checkPerm
|
|
|
287
293
|
let newMetadata = structuredClone(metadataValues);
|
|
288
294
|
for (const item of midsToBeUpdated) {
|
|
289
295
|
const mdItem = newMetadata.find(value => value.mid === item.mid);
|
|
290
|
-
if (mdItem)
|
|
296
|
+
if (mdItem) {
|
|
291
297
|
mdItem.value = item.value;
|
|
298
|
+
if (showCheckBoxes !== ShowCheckBoxesMode.Never) {
|
|
299
|
+
mdItem.isSelected = !stringIsNullOrEmpty(item.value);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
292
302
|
}
|
|
293
303
|
onValueChanged?.(newMetadata);
|
|
294
304
|
}, updateIsModalOpen: updateIsModalOpen }), FormulaHelper.isFormula(item.value)
|
|
@@ -579,7 +589,7 @@ const TMMetadataValues = ({ showCheckBoxes = ShowCheckBoxesMode.Never, checkPerm
|
|
|
579
589
|
else if (layoutItem.type === LayoutItemTypes.LayoutGroup && layoutItem.lgd) {
|
|
580
590
|
const children = getChildren(layoutItem.layoutItemID);
|
|
581
591
|
const groupDescriptor = layoutItem.lgd;
|
|
582
|
-
const groupTitle = groupDescriptor.caption || `Group ${layoutItem.layoutItemID}
|
|
592
|
+
const groupTitle = (groupDescriptor.showCaption ? groupDescriptor.caption || `Group ${layoutItem.layoutItemID}` : '');
|
|
583
593
|
const groupIsNoBorder = groupDescriptor.borderStyle == undefined || groupDescriptor.borderStyle == LayoutGroupBorderStyles.NoBorder || groupDescriptor.borderStyle == LayoutGroupBorderStyles.None;
|
|
584
594
|
const isCollapsed = false; // LayoutGroupDescriptor doesn't have collapsed property
|
|
585
595
|
const isVertical = groupDescriptor.orientation === LayoutGroupOrientations.Vertical;
|
|
@@ -608,7 +618,7 @@ const TMMetadataValues = ({ showCheckBoxes = ShowCheckBoxesMode.Never, checkPerm
|
|
|
608
618
|
}
|
|
609
619
|
// Orizzontale con bordo, children e titolo
|
|
610
620
|
if (!groupIsNoBorder && isHorizontal && children.length > 0 && groupTitle.length > 0) {
|
|
611
|
-
return (_jsxs("div", { style:
|
|
621
|
+
return (_jsxs("div", { style: { position: 'relative', border: '2px solid #CAD9EB', borderRadius: '3px', padding: '12px 6px 6px', margin: '10px' }, children: [groupTitleElement, _jsx("div", { style: { display: 'flex', flexDirection: 'row', flexWrap: 'nowrap', gap: '8px', overflowX: 'auto', overflowY: 'hidden', paddingBottom: '8px' }, children: children.map(child => (_jsx("div", { style: { flex: `1 1 ${ITEM_MIN_WIDTH}px`, minWidth: `${ITEM_MIN_WIDTH}px` }, children: renderLayoutItem(child, nextDepth, visited) }, child.layoutItemID))) })] }, `group-horizontal-${layoutItem.layoutItemID}`));
|
|
612
622
|
}
|
|
613
623
|
// Verticale senza bordo
|
|
614
624
|
if (groupIsNoBorder && isVertical) {
|
|
@@ -625,8 +635,14 @@ const TMMetadataValues = ({ showCheckBoxes = ShowCheckBoxesMode.Never, checkPerm
|
|
|
625
635
|
}
|
|
626
636
|
// Orizzontale
|
|
627
637
|
if (isHorizontal) {
|
|
628
|
-
const renderHorizontalChildren = () => children.map(child => (_jsx("div", { style: { flex:
|
|
629
|
-
|
|
638
|
+
const renderHorizontalChildren = () => (_jsx("div", { style: { display: 'flex', flexDirection: 'row', flexWrap: 'nowrap', gap: '8px', overflowX: 'auto', overflowY: 'hidden', paddingBottom: '8px' }, children: children.map(child => (_jsx("div", { style: { flex: `1 1 ${ITEM_MIN_WIDTH}px`, minWidth: `${ITEM_MIN_WIDTH}px` }, children: renderLayoutItem(child, nextDepth, visited) }, child.layoutItemID))) }));
|
|
639
|
+
if (groupDescriptor.borderStyle === LayoutGroupBorderStyles.GroupBox || groupDescriptor.borderStyle === LayoutGroupBorderStyles.Tabbed) {
|
|
640
|
+
return (_jsx(TMAccordion, { title: groupTitle, titleSize: "Small", children: renderHorizontalChildren() }, `group-horizontal-${layoutItem.layoutItemID}`));
|
|
641
|
+
}
|
|
642
|
+
if (groupDescriptor.borderStyle === LayoutGroupBorderStyles.Group) {
|
|
643
|
+
return (_jsxs("div", { style: { position: 'relative', border: '2px solid #CAD9EB', borderRadius: '3px', padding: '12px 6px 6px', margin: '10px' }, children: [groupTitleElement, renderHorizontalChildren()] }, `group-horizontal-${layoutItem.layoutItemID}`));
|
|
644
|
+
}
|
|
645
|
+
return (_jsx("div", { children: renderHorizontalChildren() }, `group-horizontal-${layoutItem.layoutItemID}`));
|
|
630
646
|
}
|
|
631
647
|
// Fallback: gruppo con accordion e indentazione
|
|
632
648
|
const indentationPx = depth > 0 ? depth * 10 : 0;
|
|
@@ -675,7 +691,8 @@ const TMMetadataValues = ({ showCheckBoxes = ShowCheckBoxesMode.Never, checkPerm
|
|
|
675
691
|
if (allSystem) {
|
|
676
692
|
return metadataValues.map((item) => renderMetadataItem(item, true));
|
|
677
693
|
}
|
|
678
|
-
|
|
694
|
+
// Se siamo in ApprovalWorkflowView e non è in sola lettura, forziamo il layout del WorkItem anche se non è presente un layout specifico
|
|
695
|
+
if ((isApprovalWorkflowView(currentDTD) && !isReadOnly) && (!layout || !layout.items || layout.items.length === 0)) {
|
|
679
696
|
return layoutWorkItem;
|
|
680
697
|
}
|
|
681
698
|
switch (currentDTD?.id) {
|
|
@@ -708,6 +725,7 @@ const StyledRow = styled.div `
|
|
|
708
725
|
display: flex;
|
|
709
726
|
flex-direction: row;
|
|
710
727
|
width: 100%;
|
|
728
|
+
min-width: ${ITEM_MIN_WIDTH}px;
|
|
711
729
|
gap: 5px;
|
|
712
730
|
`;
|
|
713
731
|
const StyledSeparator = styled.hr `
|