@topconsultnpm/sdkui-react 6.20.0-dev1.99 → 6.20.0-dev2.1

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 (91) hide show
  1. package/lib/assets/headergradient.svg +87 -0
  2. package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +56 -18
  3. package/lib/components/NewComponents/ContextMenu/styles.js +13 -34
  4. package/lib/components/NewComponents/ContextMenu/types.d.ts +8 -2
  5. package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +315 -271
  6. package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +4 -0
  7. package/lib/components/NewComponents/FloatingMenuBar/styles.js +6 -2
  8. package/lib/components/NewComponents/FloatingMenuBar/types.d.ts +7 -4
  9. package/lib/components/base/TMButton.js +6 -0
  10. package/lib/components/base/TMClosableList.js +4 -0
  11. package/lib/components/base/TMDropDownMenu.js +2 -0
  12. package/lib/components/base/TMListView.js +1 -1
  13. package/lib/components/base/TMPanel.d.ts +1 -1
  14. package/lib/components/base/TMPanel.js +9 -5
  15. package/lib/components/base/TMPopUp.js +6 -0
  16. package/lib/components/base/TMToolbarCard.js +2 -0
  17. package/lib/components/base/TMTreeView.d.ts +2 -1
  18. package/lib/components/base/TMTreeView.js +33 -26
  19. package/lib/components/choosers/TMDataListItemChooser.d.ts +2 -0
  20. package/lib/components/choosers/TMDataListItemChooser.js +8 -2
  21. package/lib/components/choosers/TMDcmtTypeChooser.d.ts +1 -0
  22. package/lib/components/choosers/TMDcmtTypeChooser.js +11 -3
  23. package/lib/components/choosers/TMDistinctValues.js +2 -2
  24. package/lib/components/choosers/TMDynDataListItemChooser.d.ts +2 -0
  25. package/lib/components/choosers/TMDynDataListItemChooser.js +8 -2
  26. package/lib/components/choosers/TMMetadataChooser.d.ts +2 -0
  27. package/lib/components/choosers/TMMetadataChooser.js +11 -3
  28. package/lib/components/choosers/TMUserChooser.d.ts +2 -0
  29. package/lib/components/choosers/TMUserChooser.js +8 -2
  30. package/lib/components/editors/TMCheckBox.js +2 -0
  31. package/lib/components/editors/TMDateBox.js +18 -9
  32. package/lib/components/editors/TMEditorStyled.js +7 -0
  33. package/lib/components/editors/TMLocalizedTextBox.d.ts +3 -1
  34. package/lib/components/editors/TMLocalizedTextBox.js +16 -14
  35. package/lib/components/editors/TMMetadataEditor.d.ts +1 -0
  36. package/lib/components/editors/TMMetadataEditor.js +4 -4
  37. package/lib/components/editors/TMMetadataTextBox.d.ts +9 -0
  38. package/lib/components/editors/TMMetadataTextBox.js +92 -0
  39. package/lib/components/editors/TMMetadataValues.d.ts +2 -0
  40. package/lib/components/editors/TMMetadataValues.js +3 -3
  41. package/lib/components/editors/TMRadioButton.js +2 -0
  42. package/lib/components/editors/TMTextBox.d.ts +1 -1
  43. package/lib/components/editors/TMTextBox.js +23 -1
  44. package/lib/components/editors/TMTextExpression.js +6 -91
  45. package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +2 -0
  46. package/lib/components/features/documents/TMDcmtBlog.js +1 -1
  47. package/lib/components/features/documents/TMDcmtForm.js +120 -87
  48. package/lib/components/features/documents/TMDcmtPreview.js +27 -30
  49. package/lib/components/features/search/TMSearch.js +5 -1
  50. package/lib/components/features/search/TMSearchQueryEditor.d.ts +1 -0
  51. package/lib/components/features/search/TMSearchQueryEditor.js +10 -10
  52. package/lib/components/features/search/TMSearchQueryPanel.js +24 -10
  53. package/lib/components/features/search/TMSearchResult.js +168 -8
  54. package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +1 -1
  55. package/lib/components/features/search/TMSearchResultsMenuItems.js +24 -4
  56. package/lib/components/features/search/TMViewHistoryDcmt.js +45 -50
  57. package/lib/components/features/tasks/TMTaskForm.js +55 -24
  58. package/lib/components/features/tasks/TMTasksUtils.js +14 -1
  59. package/lib/components/features/workflow/TMWorkflowPopup.js +5 -4
  60. package/lib/components/features/workflow/diagram/DiagramItemComponent.js +2 -0
  61. package/lib/components/features/workflow/diagram/DiagramItemForm.js +1 -1
  62. package/lib/components/features/workflow/diagram/WFDiagram.js +1 -1
  63. package/lib/components/forms/Login/TMLoginForm.js +1 -1
  64. package/lib/components/grids/TMValidationItemsList.js +6 -0
  65. package/lib/components/index.d.ts +1 -0
  66. package/lib/components/index.js +1 -0
  67. package/lib/components/layout/panelManager/TMPanelManagerContext.js +13 -5
  68. package/lib/components/query/TMQueryEditor.d.ts +4 -0
  69. package/lib/components/query/TMQueryEditor.js +14 -10
  70. package/lib/components/sidebar/TMHeader.js +11 -7
  71. package/lib/components/sidebar/TMSidebar.d.ts +0 -1
  72. package/lib/components/sidebar/TMSidebar.js +16 -44
  73. package/lib/components/sidebar/TMSidebarItem.js +36 -17
  74. package/lib/helper/SDKUI_Globals.d.ts +3 -0
  75. package/lib/helper/SDKUI_Globals.js +6 -3
  76. package/lib/helper/SDKUI_Localizator.d.ts +4 -16
  77. package/lib/helper/SDKUI_Localizator.js +37 -157
  78. package/lib/helper/TMIcons.d.ts +1 -0
  79. package/lib/helper/TMIcons.js +3 -0
  80. package/lib/helper/TMToppyMessage.js +4 -0
  81. package/lib/helper/TMUtils.d.ts +2 -1
  82. package/lib/helper/TMUtils.js +13 -1
  83. package/lib/helper/helpers.d.ts +27 -1
  84. package/lib/helper/helpers.js +107 -1
  85. package/lib/helper/queryHelper.d.ts +1 -1
  86. package/lib/helper/queryHelper.js +24 -1
  87. package/lib/hooks/useFloatingBarPinnedItems.d.ts +11 -0
  88. package/lib/hooks/useFloatingBarPinnedItems.js +54 -0
  89. package/lib/hooks/useMetadataExpression.d.ts +19 -0
  90. package/lib/hooks/useMetadataExpression.js +99 -0
  91. package/package.json +56 -56
@@ -297,7 +297,20 @@ newTasks // Array of new tasks to merge
297
297
  return Array.from(taskMap.values());
298
298
  };
299
299
  export const getOriginLabel = (pdg, ID1Name) => {
300
- return pdg ? (ID1Name ?? '') : SDKUI_Localizator.NoSource;
300
+ let label = ID1Name ?? SDKUI_Localizator.NoSource;
301
+ try {
302
+ if (typeof label === 'string' && label.length > 0) {
303
+ // Rimuove: (TID: 123), (DID: 456), TID: 123, DID: 456
304
+ label = label.replace(/\s*\(\s*\b(?:TID|DID):\s*\d+\s*\)|\s*\b(?:TID|DID):\s*\d+/gi, '');
305
+ // Rimuove eventuali spazi multipli rimasti
306
+ label = label.replace(/\s{2,}/g, ' ').trim();
307
+ }
308
+ }
309
+ catch {
310
+ label = ID1Name ?? SDKUI_Localizator.NoSource;
311
+ }
312
+ // Se pdg esiste ritorna la label (anche se vuota), altrimenti ritorna sempre NoSource
313
+ return pdg ? label : SDKUI_Localizator.NoSource;
301
314
  };
302
315
  export const taskValidatorAsync = async (taskDescriptor) => {
303
316
  let vil = [];
@@ -263,7 +263,7 @@ export const WorkflowEndInstanceModal = ({ selectedInstances, onClose, onComplet
263
263
  ShowAlert({
264
264
  mode: 'success',
265
265
  position: 'TOP_RIGHT',
266
- title: 'Terminazione istanze',
266
+ title: SDKUI_Localizator.WorkflowEndInstance,
267
267
  message: `${selectedInstances.length} ${selectedInstances.length === 1 ? 'istanza terminata' : 'istanze terminate'} con successo`,
268
268
  duration: 3000
269
269
  });
@@ -277,9 +277,10 @@ export const WorkflowEndInstanceModal = ({ selectedInstances, onClose, onComplet
277
277
  TMSpinner.hide();
278
278
  }
279
279
  };
280
- const itemCount = selectedInstances.length > 0 ? `(${selectedInstances.length} ${selectedInstances.length === 1 ? 'istanza' : 'istanze'})` : '';
281
- const title = `Termina istanza ${itemCount}`;
282
- return (_jsx(TMModal, { title: title, onClose: onClose, width: '600px', height: '270px', isModal: true, children: _jsxs(StyledModalBodyWrapper, { children: [_jsxs(StyledModalContentContainer, { children: [_jsx("div", { style: { fontWeight: 600, marginBottom: '8px' }, children: "Motivazione (obbligatorio):" }), _jsx(StyledTextArea, { "$isValid": !disable, value: commentValue, onChange: (e) => setCommentValue(e.target.value), placeholder: "Inserisci il motivo della terminazione...", maxLength: 200 }), _jsxs(CharacterCounter, { children: [commentValue.length, "/200"] })] }), _jsx(StyledModalFooter, { children: _jsx(TMButton, { btnStyle: 'advanced', showTooltip: false, icon: _jsx(IconStop, {}), caption: "Termina istanza", width: '150px', disabled: disable, onClick: () => !disable && endInstancesAsync(), advancedColor: TMColors.error }) })] }) }));
280
+ const title = selectedInstances.length === 1
281
+ ? `${SDKUI_Localizator.WorkflowEndInstance} (DID: ${selectedInstances[0].did})`
282
+ : `${SDKUI_Localizator.WorkflowEndInstance} (${selectedInstances.length} istanze)`;
283
+ return (_jsx(TMModal, { title: title, onClose: onClose, width: '600px', height: '270px', isModal: true, children: _jsxs(StyledModalBodyWrapper, { children: [_jsxs(StyledModalContentContainer, { children: [_jsx("div", { style: { fontWeight: 600, marginBottom: '8px' }, children: "Motivazione (obbligatorio):" }), _jsx(StyledTextArea, { "$isValid": !disable, value: commentValue, onChange: (e) => setCommentValue(e.target.value), placeholder: "Inserisci il motivo della terminazione...", maxLength: 200 }), _jsxs(CharacterCounter, { children: [commentValue.length, "/200"] })] }), _jsx(StyledModalFooter, { children: _jsx(TMButton, { btnStyle: 'advanced', showTooltip: false, icon: _jsx(IconStop, {}), caption: SDKUI_Localizator.WorkflowEndInstance, width: '150px', disabled: disable, onClick: () => !disable && endInstancesAsync(), advancedColor: TMColors.error }) })] }) }));
283
284
  };
284
285
  export const WorkFlowMoreInfoPopUp = ({ DID = 0, TID = 0, deviceType = DeviceType.DESKTOP, onClose, onCompleted }) => {
285
286
  const [users, setUsers] = useState([]);
@@ -70,6 +70,8 @@ const StyledDiagramItem = styled.g `
70
70
  fill: #333;
71
71
  text-anchor: middle;
72
72
  user-select: none;
73
+ -webkit-touch-callout: none;
74
+ -webkit-user-select: none;
73
75
  pointer-events: none;
74
76
  }
75
77
  `;
@@ -409,7 +409,7 @@ const DiagramItemForm = ({ itemToEdit, wf, onClose, onApply }) => {
409
409
  return qd;
410
410
  };
411
411
  const qdForRecipientsEditor = localItem.QD ?? newQD();
412
- return (_jsxs(_Fragment, { children: [_jsx(TMLocalizedTextBox, { label: SDKUI_Localizator.Description, value: localItem.Description, value_IT: localItem.Description_IT, value_EN: localItem.Description_EN, value_FR: localItem.Description_FR, value_PT: localItem.Description_PT, value_ES: localItem.Description_ES, value_DE: localItem.Description_DE, isModifiedWhen: localItem.Description !== localItemOrig.Description, validationItems: validationItems.filter(v => v.PropertyName === DiagramItemProps.Description), onValueChanged: handleLocalizedDescriptionChange }), _jsx(TMTextBox, { label: "SetID", value: localItem.ID ?? '', readOnly: true }), _jsx(WorkitemRecipientsEditor, { tos: localItem.Tos ?? '', mTID: wf?.MTID, qd: qdForRecipientsEditor, onTosChange: handleTosChange, onQDChange: handleSetRuleQDChange }), _jsx(TMVilViewer, { vil: validationItems.filter(v => v.PropertyName === DiagramItemProps.Tos) }), _jsxs(FlexContainer, { children: [_jsx(TMDropDown, { label: SDKUI_Localizator.WorkflowRecipientSetRule, elementStyle: { width: '320px' }, dataSource: SET_RULE_DATASOURCE, value: localItem.SetRule, isModifiedWhen: localItem.SetRule !== localItemOrig.SetRule, onValueChanged: (e) => { handleSetRuleChange(e.target.value); } }), _jsx(TMCheckBox, { value: localItem.AllowZeroTos ?? 0, label: SDKUI_Localizator.WorkflowAllowZeroTos, isModifiedWhen: localItem.AllowZeroTos !== localItemOrig.AllowZeroTos, onValueChanged: handleAllowZeroTosChange })] }), localItem.Type === DiagramItemTypes.ExecTask &&
412
+ return (_jsxs(_Fragment, { children: [_jsx(TMLocalizedTextBox, { label: SDKUI_Localizator.Description, value: localItem.Description, value_IT: localItem.Description_IT, value_EN: localItem.Description_EN, value_FR: localItem.Description_FR, value_PT: localItem.Description_PT, value_ES: localItem.Description_ES, value_DE: localItem.Description_DE, tid: wf?.MTID, isModifiedWhen: localItem.Description !== localItemOrig.Description, validationItems: validationItems.filter(v => v.PropertyName === DiagramItemProps.Description), onValueChanged: handleLocalizedDescriptionChange }), _jsx(TMTextBox, { label: "SetID", value: localItem.ID ?? '', readOnly: true }), _jsx(WorkitemRecipientsEditor, { tos: localItem.Tos ?? '', mTID: wf?.MTID, qd: qdForRecipientsEditor, onTosChange: handleTosChange, onQDChange: handleSetRuleQDChange }), _jsx(TMVilViewer, { vil: validationItems.filter(v => v.PropertyName === DiagramItemProps.Tos) }), _jsxs(FlexContainer, { children: [_jsx(TMDropDown, { label: SDKUI_Localizator.WorkflowRecipientSetRule, elementStyle: { width: '320px' }, dataSource: SET_RULE_DATASOURCE, value: localItem.SetRule, isModifiedWhen: localItem.SetRule !== localItemOrig.SetRule, onValueChanged: (e) => { handleSetRuleChange(e.target.value); } }), _jsx(TMCheckBox, { value: localItem.AllowZeroTos ?? 0, label: SDKUI_Localizator.WorkflowAllowZeroTos, isModifiedWhen: localItem.AllowZeroTos !== localItemOrig.AllowZeroTos, onValueChanged: handleAllowZeroTosChange })] }), localItem.Type === DiagramItemTypes.ExecTask &&
413
413
  _jsxs(BoxContainer, { children: [_jsx(HeaderContainer, { children: _jsx("span", { children: SDKUI_Localizator.Application }) }), renderAppFields()] })] }));
414
414
  };
415
415
  // Function to render UpdateDcmt-specific fields
@@ -1822,7 +1822,7 @@ const WFDiagram = ({ xmlDiagramString, currentSetID, allowEdit = true, onDiagram
1822
1822
  }, [isFullScreen]);
1823
1823
  const diagramContent = (_jsxs(CanvasContainer, { onDoubleClick: handleCanvasDoubleClick, children: [_jsx("input", { ref: fileInputRef, type: "file", accept: ".xml" // Filtra per file XML
1824
1824
  , onChange: handleFileChange, style: { display: 'none' } }), SDK_Globals.tmSession?.SessionDescr?.appModuleID === AppModules.SURFER ?
1825
- _jsx(TMFloatingMenuBar, { containerRef: diagramRef, defaultPosition: { x: 45, y: 85 }, disbaleConfigMode: true, defaultItems: [
1825
+ _jsx(TMFloatingMenuBar, { containerRef: diagramRef, defaultPosition: { x: 45, y: 85 }, enableConfigMode: false, fixedItems: [
1826
1826
  { icon: _jsx(IconZoomIn, {}), name: SDKUI_Localizator.ZoomIn, disabled: isAutoZoomEnabled, onClick: () => { handleZoomIn(); }, id: 'zoom-in', isPinned: true },
1827
1827
  { icon: _jsx(IconZoomOut, {}), name: SDKUI_Localizator.ZoomOut, disabled: isAutoZoomEnabled, onClick: () => { handleZoomOut(); }, id: 'zoom-out', isPinned: true },
1828
1828
  { icon: _jsx(IconZoomAuto, {}), name: 'AutoZoom', onClick: () => { handleToggleAutoZoom(); }, id: 'zoom-auto', isPinned: true, isToggle: isAutoZoomEnabled },
@@ -264,7 +264,7 @@ const TMLoginForm = (props) => {
264
264
  { value: AuthenticationModes.TopMediaWithMFA, display: LOGINLocalizator.TopMediaWithMFA },
265
265
  { value: AuthenticationModes.TopMediaOnBehalfOf, display: SDKUI_Localizator.AuthMode_OnBehalfOf },
266
266
  { value: AuthenticationModes.WindowsThroughTopMedia, display: SDKUI_Localizator.AuthMode_WindowsViaTopMedia },
267
- { value: AuthenticationModes.MSAzure, display: 'MSAzure' }];
267
+ { value: AuthenticationModes.MSAzure, display: 'Microsoft Entra ID' }];
268
268
  }, [props.cultureID]);
269
269
  const accessPointAdditionalIcons = useMemo(() => {
270
270
  return [
@@ -14,6 +14,8 @@ const StyledValidationItemsTabs = styled.div `
14
14
  border-bottom: 1px solid $primary;
15
15
  width: 100%;
16
16
  user-select: none;
17
+ -webkit-touch-callout: none;
18
+ -webkit-user-select: none;
17
19
  background-color: ${TMColors.primary};
18
20
  z-index: 20;
19
21
  border-top: 1px solid #122C4C;
@@ -44,12 +46,16 @@ const StyledMessageIcon = styled.div `
44
46
  const StyledMessageResultType = styled.div `
45
47
  width: 50px;
46
48
  user-select: none;
49
+ -webkit-touch-callout: none;
50
+ -webkit-user-select: none;
47
51
  margin-right: 20px;
48
52
  `;
49
53
  const StyledMessageElement = styled.div `
50
54
  width: 150px;
51
55
  text-align: left;
52
56
  user-select: none;
57
+ -webkit-touch-callout: none;
58
+ -webkit-user-select: none;
53
59
  margin-right: 20px;
54
60
  `;
55
61
  const StyledMessageText = styled.div `
@@ -30,6 +30,7 @@ export { default as TMSummary } from './editors/TMSummary';
30
30
  export { default as TMTextBox } from './editors/TMTextBox';
31
31
  export { default as TMTextArea } from './editors/TMTextArea';
32
32
  export { default as TMTextExpression } from './editors/TMTextExpression';
33
+ export { default as TMMetadataTextBox } from './editors/TMMetadataTextBox';
33
34
  export { default as TMCheckBox } from './editors/TMCheckBox';
34
35
  export { default as TMRadioButton } from './editors/TMRadioButton';
35
36
  export { default as TMDateBox } from './editors/TMDateBox';
@@ -32,6 +32,7 @@ export { default as TMSummary } from './editors/TMSummary';
32
32
  export { default as TMTextBox } from './editors/TMTextBox';
33
33
  export { default as TMTextArea } from './editors/TMTextArea';
34
34
  export { default as TMTextExpression } from './editors/TMTextExpression';
35
+ export { default as TMMetadataTextBox } from './editors/TMMetadataTextBox';
35
36
  export { default as TMCheckBox } from './editors/TMCheckBox';
36
37
  export { default as TMRadioButton } from './editors/TMRadioButton';
37
38
  export { default as TMDateBox } from './editors/TMDateBox';
@@ -107,11 +107,19 @@ export const TMPanelManagerProvider = (props) => {
107
107
  });
108
108
  }
109
109
  else {
110
- let updated = { ...initialVisibility };
111
- Object.entries(initialVisibility).forEach(([id, isVisible]) => {
112
- updated = adjustPanelVisibilityAndSize(id, isVisible, updated);
113
- });
114
- setPanelVisibility(updated);
110
+ if (isPersistenceEnabled) {
111
+ // If persistence is enabled, visibility and dimensions are already synced from persisted state, so just set them directly
112
+ setPanelVisibility(initialVisibility);
113
+ }
114
+ else {
115
+ // If persistence is not enabled, recalculate visibility and dimensions based on the initial visibility, applying the hierarchy logic
116
+ let updated = { ...initialVisibility };
117
+ Object.entries(initialVisibility).forEach(([id, isVisible]) => {
118
+ updated = adjustPanelVisibilityAndSize(id, isVisible, updated);
119
+ });
120
+ // Update panel visibility state with recalculated values
121
+ setPanelVisibility(updated);
122
+ }
115
123
  }
116
124
  }, [isMobile]);
117
125
  // Function to maximize a panel (and its parent panels)
@@ -46,6 +46,10 @@ interface ITMQueryEditor extends ITMApplyFormProps<QueryDescriptor> {
46
46
  onFromTIDChanged?: (tid: number) => void;
47
47
  onQDChanged?: (qd: QueryDescriptor) => void;
48
48
  ShowOnlySAP?: boolean;
49
+ updateIsModalOpen?: (isOpen: boolean) => void;
50
+ showSearchResultSidebar?: boolean;
51
+ showToppyDraggableHelpCenter?: boolean;
52
+ toppyHelpCenterUsePortal?: boolean;
49
53
  }
50
54
  declare const TMQueryEditor: React.FunctionComponent<ITMQueryEditor>;
51
55
  export default TMQueryEditor;
@@ -62,7 +62,7 @@ export function useQueryApplyForm(d, formMode, inputData, onApplied, parameters)
62
62
  const [validationItems, setValidationItems] = useState([]);
63
63
  return { formData, setFormData, formDataOrig, validationItems, setValidationItems, exception, applyData };
64
64
  }
65
- const TMQueryEditor = ({ formMode, inputData, onQDChanged, isExpertMode, showDistinct = false, showToolbar = true, validateSelect = true, validateOrderBy = true, raiseWarningForOnlyMetadataDcmtTypes = false, onApplied, onClose, height = 'auto', borderRadius = '4px', searchText, showApply, showUndo, showBack, onFromTIDChanged, ShowOnlySAP }) => {
65
+ const TMQueryEditor = ({ formMode, inputData, onQDChanged, isExpertMode, showDistinct = false, showToolbar = true, validateSelect = true, validateOrderBy = true, raiseWarningForOnlyMetadataDcmtTypes = false, onApplied, onClose, height = 'auto', borderRadius = '4px', searchText, showApply, showUndo, showBack, onFromTIDChanged, ShowOnlySAP, updateIsModalOpen, showSearchResultSidebar = true, showToppyDraggableHelpCenter = true, toppyHelpCenterUsePortal = false }) => {
66
66
  const [confirmQueryParams, ConfirmQueryParamsDialog] = useQueryParametersDialog();
67
67
  const { formData, setFormData, formDataOrig, validationItems, setValidationItems, exception, applyData } = useQueryApplyForm(Descriptors.Query, formMode, inputData, onApplied);
68
68
  const [dcmtTypesList, setDcmtTypesList] = useState([]);
@@ -596,7 +596,9 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, isExpertMode, showDis
596
596
  };
597
597
  // #endregion
598
598
  // #region Ricerca
599
- const renderResultSearchForm = _jsx(TMSearchResult, { context: SearchResultContext.METADATA_SEARCH, allowFloatingBar: false, onClose: () => { setShowResultSearch(false); }, searchResults: resultSearch });
599
+ const renderResultSearchForm = (_jsx(TMSearchResult, { context: SearchResultContext.METADATA_SEARCH, allowFloatingBar: false, onClose: () => {
600
+ setShowResultSearch(false);
601
+ }, searchResults: resultSearch, showSearchResultSidebar: showSearchResultSidebar, showToppyDraggableHelpCenter: showToppyDraggableHelpCenter, toppyHelpCenterUsePortal: toppyHelpCenterUsePortal }));
600
602
  const onSearchAsync = async (qdInput) => {
601
603
  try {
602
604
  let qdSearch = await prepareQdForSearchAsync(qdInput);
@@ -715,7 +717,7 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, isExpertMode, showDis
715
717
  }, children: [(!isReadOnly || fromCount > 0) && _jsx(Item, { title: SDKUI_Localizator.Source, titleRender: (tabItemProps) => renderAccordionTitle(tabItemProps, fromCount, validationItems.filter((o) => [TMPropertyNames.fromTid, TMPropertyNames.join].includes(o.PropertyName))), children: _jsx(StyledAccordionItemContainer, { style: { maxHeight: fromCount > 0 ? '330px' : '100%' }, children: _jsxs(StyledAccordionItemContent, { "$disabled": isReadOnly, style: { height: '100%' }, children: [_jsxs(StyledRowItem, { children: [!isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', icon: _jsx(IconClear, { color: TMColors.button_icon }), caption: SDKUI_Localizator.Remove, onClick: () => { let qd = SearchEngine.NewQueryDescriptor(); setFormData({ ...qd }); } }), !isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', elementStyle: { opacity: !formData?.from?.tid ? 0.4 : 1 }, disabled: !formData?.from?.tid, icon: _jsx(IconAddCircleOutline, { color: TMColors.button_icon }), caption: SDKUI_Localizator.AddBelow, onClick: onAdd_JoinItem }), _jsx("div", { style: { pointerEvents: 'all' }, children: _jsx(TMQdDropDownMenu, { content: _jsx(IconDotsVerticalCircleOutline, { color: TMColors.button_icon }), items: [
716
718
  { icon: showId ? _jsx(IconHide, { color: TMColors.button_icon }) : _jsx(IconShow, { color: TMColors.button_icon }), name: showId ? SDKUI_Localizator.ID_Hide : SDKUI_Localizator.ID_Show, onClick: () => setShowId(!showId) },
717
719
  { icon: showCompleteMetadataName ? _jsx(IconHide, { color: TMColors.primary }) : _jsx(IconShow, { color: TMColors.primary }), name: showCompleteMetadataName ? SDKUI_Localizator.Hide_CompleteName : SDKUI_Localizator.Show_CompleteName, onClick: () => setShowCompleteMetadataName(!showCompleteMetadataName) }
718
- ] }) }), _jsx(TMDcmtTypeChooser, { disabled: isReadOnly, showEditButton: false, placeHolder: `<${SDKUI_Localizator.DcmtTypeSelect} ...>`, borderRadius: borderRadius, ShowOnlySAP: ShowOnlySAP, openEditorOnSummaryClick: true, showBorder: false, showId: showId, backgroundColor: getColorIndex({ tid: formData.from?.tid, alias: undefined }), values: [formData.from?.tid], validationItems: validationItems.filter((o) => o.PropertyName === TMPropertyNames.fromTid), onValueChanged: (tids) => { let qd = SearchEngine.NewQueryDescriptor(); qd.from.tid = tids[0]; setFormData({ ...qd }); onFromTIDChanged?.(tids[0]); } })] }), formData?.join?.map((ji, index) => {
720
+ ] }) }), _jsx(TMDcmtTypeChooser, { disabled: isReadOnly, showEditButton: false, placeHolder: `<${SDKUI_Localizator.DcmtTypeSelect} ...>`, borderRadius: borderRadius, ShowOnlySAP: ShowOnlySAP, openEditorOnSummaryClick: true, showBorder: false, showId: showId, backgroundColor: getColorIndex({ tid: formData.from?.tid, alias: undefined }), values: [formData.from?.tid], validationItems: validationItems.filter((o) => o.PropertyName === TMPropertyNames.fromTid), onValueChanged: (tids) => { let qd = SearchEngine.NewQueryDescriptor(); qd.from.tid = tids[0]; setFormData({ ...qd }); onFromTIDChanged?.(tids[0]); }, updateIsModalOpen: updateIsModalOpen })] }), formData?.join?.map((ji, index) => {
719
721
  return (_jsxs("div", { style: { width: 'max-content', padding: isReadOnly ? '0px 20px' : 0 }, children: [_jsxs(StyledRowItem, { onDragEnd: dragEnd, onDragOver: dragOver, onDrop: (e) => dropJoin(e, ji), children: [!isReadOnly && _jsx(StyledDraggableDiv, { draggable: true, onDragStart: (e) => dragStart(e, ji), children: _jsx(IconDraggabledots, { fontSize: 15, color: TMColors.button_icon }) }), !isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', icon: _jsx(IconClear, { color: TMColors.button_icon }), caption: SDKUI_Localizator.Remove, onClick: () => onRemove_JoinItem(index) }), !isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', icon: _jsx(IconAddCircleOutline, { color: TMColors.button_icon }), caption: SDKUI_Localizator.AddBelow, onClick: () => onAdd_JoinItem(index + 1) }), !isReadOnly && _jsx(TMQdDropDownMenu, { content: _jsx(TMTooltip, { content: SDK_Localizator.toCaseWord(SDKUI_Localizator.OneMore), children: _jsx(IconDotsVerticalCircleOutline, { color: TMColors.button_icon }) }), items: [
720
722
  { name: SDKUI_Localizator.AddAbove, onClick: () => onAdd_JoinItem(index) },
721
723
  { name: SDKUI_Localizator.AddBelow, onClick: () => onAdd_JoinItem(index + 1) },
@@ -737,13 +739,13 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, isExpertMode, showDis
737
739
  setFormData({ ...formData, join: joinCopy });
738
740
  }
739
741
  }
740
- ] }), _jsx(TMMetadataChooser, { disabled: isReadOnly, showEditButton: false, getColorIndex: getColorIndex, showCompleteMetadataName: showCompleteMetadataName, openEditorOnSummaryClick: true, showBorder: false, borderRadius: borderRadius, showId: showId, backgroundColor: getColorIndex({ tid: onItem.leftTID, alias: onItem.leftAlias }), qd: formData, values: onItem.leftTID ? [{ tid: onItem.leftTID, mid: onItem.leftMID, aliasTID: onItem.leftAlias }] : [], onValueChanged: (values) => { values.length > 0 && onChange_OnJoinMetadatoLeft(values[0], index, indexOn); } }), _jsx(TMQdDropDownMenu, { backgroundColor: colorOperator, color: 'green', borderRadius: borderRadius, content: _jsx(StyledItemWrapper, { children: LocalizeQueryOperators(onItem.operator) }), items: [] }), _jsx(TMMetadataChooser, { disabled: isReadOnly, showEditButton: false, getColorIndex: getColorIndex, showCompleteMetadataName: showCompleteMetadataName, openEditorOnSummaryClick: true, showBorder: false, borderRadius: borderRadius, showId: showId, backgroundColor: getColorIndex({ tid: onItem.rightTID, alias: onItem.rightAlias }), qd: formData, values: onItem.rightTID ? [{ tid: onItem.rightTID, mid: onItem.rightMID, aliasTID: onItem.rightAlias }] : [], onValueChanged: (values) => { values.length > 0 && onChange_OnJoinMetadatoRight(values[0], index, indexOn); } })] }, indexOn));
742
+ ] }), _jsx(TMMetadataChooser, { disabled: isReadOnly, showEditButton: false, getColorIndex: getColorIndex, showCompleteMetadataName: showCompleteMetadataName, openEditorOnSummaryClick: true, showBorder: false, borderRadius: borderRadius, showId: showId, backgroundColor: getColorIndex({ tid: onItem.leftTID, alias: onItem.leftAlias }), qd: formData, values: onItem.leftTID ? [{ tid: onItem.leftTID, mid: onItem.leftMID, aliasTID: onItem.leftAlias }] : [], onValueChanged: (values) => { values.length > 0 && onChange_OnJoinMetadatoLeft(values[0], index, indexOn); }, updateIsModalOpen: updateIsModalOpen }), _jsx(TMQdDropDownMenu, { backgroundColor: colorOperator, color: 'green', borderRadius: borderRadius, content: _jsx(StyledItemWrapper, { children: LocalizeQueryOperators(onItem.operator) }), items: [] }), _jsx(TMMetadataChooser, { disabled: isReadOnly, showEditButton: false, getColorIndex: getColorIndex, showCompleteMetadataName: showCompleteMetadataName, openEditorOnSummaryClick: true, showBorder: false, borderRadius: borderRadius, showId: showId, backgroundColor: getColorIndex({ tid: onItem.rightTID, alias: onItem.rightAlias }), qd: formData, values: onItem.rightTID ? [{ tid: onItem.rightTID, mid: onItem.rightMID, aliasTID: onItem.rightAlias }] : [], onValueChanged: (values) => { values.length > 0 && onChange_OnJoinMetadatoRight(values[0], index, indexOn); }, updateIsModalOpen: updateIsModalOpen })] }, indexOn));
741
743
  })] }, `${ji.tid}_${index}`));
742
744
  }), _jsx(TMVilViewer, { vil: validationItems.filter((o) => o.PropertyName === TMPropertyNames.join) })] }) }) }), canShowSelect && _jsx(Item, { title: SDK_Localizator.QuerySelect, titleRender: (tabItemProps) => renderAccordionTitle(tabItemProps, selectCount, validationItems.filter((o) => o.PropertyName == TMPropertyNames.select)), children: _jsx(StyledAccordionItemContainer, { children: _jsxs(StyledAccordionItemContent, { "$disabled": isReadOnly, children: [_jsx(TMVilViewer, { vil: validationItems.filter((o) => o.PropertyName === TMPropertyNames.select) }), (!formData?.select || formData?.select.length <= 0) && !isReadOnly &&
743
745
  _jsxs(StyledRowItem, { children: [_jsx(TMButton, { btnStyle: 'normal', disabled: !formData?.from?.tid, caption: SDKUI_Localizator.Add, onClick: onAdd_SelectItem }), dcmtTypesList.length == 1
744
746
  ? _jsx(TMButton, { btnStyle: 'normal', disabled: !formData?.from?.tid, caption: SDKUI_Localizator.AddAlls, onClick: () => { onAddAll_SelectItem(qdTIDs[0]); } })
745
747
  : _jsx(TMQdDropDownMenu, { backgroundColor: 'white', borderRadius: '3px', content: _jsx(TMButton, { btnStyle: 'normal', disabled: !formData?.from?.tid, caption: SDKUI_Localizator.AddAlls }), items: qdTIDs.map((tid_alias) => ({ name: `${getDisplayAlias(getDcmtTypeName(tid_alias.tid), tid_alias.alias)}`, onClick: () => { onAddAll_SelectItem(tid_alias); } })) })] }), formData?.select?.map((si, index) => {
746
- return (_jsxs(StyledRowItem, { onDragEnd: dragEnd, onDragOver: dragOver, onDrop: (e) => dropSelect(e, si), children: [!isReadOnly && _jsx(StyledDraggableDiv, { draggable: true, onDragStart: (e) => dragStart(e, si), children: _jsx(IconDraggabledots, { fontSize: 15, color: TMColors.button_icon }) }), !isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', icon: _jsx(IconClear, { color: TMColors.button_icon }), caption: SDKUI_Localizator.Remove, onClick: () => onRemove_SelectItem(index) }), !isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', icon: _jsx(IconAddCircleOutline, { color: TMColors.button_icon }), caption: SDKUI_Localizator.AddBelow, onClick: () => onAdd_SelectItem(index + 1) }), !isReadOnly && _jsx(TMQdDropDownMenu, { content: _jsx(TMTooltip, { content: SDK_Localizator.toCaseWord(SDKUI_Localizator.OneMore), children: _jsx(IconDotsVerticalCircleOutline, { color: TMColors.button_icon }) }), items: getSelectMenuItems(index) }), (!isReadOnly || (si.function && si.function != QueryFunctions.None)) && _jsx(TMQdDropDownMenu, { backgroundColor: colorOperator, color: 'green', borderRadius: borderRadius, content: _jsx(StyledItemWrapper, { children: si.function === QueryFunctions.None ? "..." : LocalizeQueryFunctions(si.function) }), items: getQueryFunctionsMenuItems(si, index) }), _jsx(TMMetadataChooser, { disabled: isReadOnly, filterMetadata: (o => o.perm?.canView === AccessLevels.Yes || o.perm?.canUpdate === AccessLevels.Yes), showEditButton: false, getColorIndex: getColorIndex, showCompleteMetadataName: showCompleteMetadataName, openEditorOnSummaryClick: true, showBorder: false, borderRadius: borderRadius, showId: showId, backgroundColor: getColorIndex({ tid: si.tid, alias: si.alias }), qd: formData, values: [{ tid: si.tid, mid: si.mid, aliasTID: si.alias }], onValueChanged: (values) => { values.length > 0 && onChange_SelectItem_MID(values[0], index); } }), (!isReadOnly || si.as) && _jsx(TMQdEditableItem, { value: si.as, backgroundColor: colorValue, placeHolder: `<${SDKUI_Localizator.Query_EnterAlias}...>`, width: '100%', onValueChanged: (value) => { onChange_SelectItem_As(value, index); } })] }, `${si.tid}_${si.mid}_${index}`));
748
+ return (_jsxs(StyledRowItem, { onDragEnd: dragEnd, onDragOver: dragOver, onDrop: (e) => dropSelect(e, si), children: [!isReadOnly && _jsx(StyledDraggableDiv, { draggable: true, onDragStart: (e) => dragStart(e, si), children: _jsx(IconDraggabledots, { fontSize: 15, color: TMColors.button_icon }) }), !isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', icon: _jsx(IconClear, { color: TMColors.button_icon }), caption: SDKUI_Localizator.Remove, onClick: () => onRemove_SelectItem(index) }), !isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', icon: _jsx(IconAddCircleOutline, { color: TMColors.button_icon }), caption: SDKUI_Localizator.AddBelow, onClick: () => onAdd_SelectItem(index + 1) }), !isReadOnly && _jsx(TMQdDropDownMenu, { content: _jsx(TMTooltip, { content: SDK_Localizator.toCaseWord(SDKUI_Localizator.OneMore), children: _jsx(IconDotsVerticalCircleOutline, { color: TMColors.button_icon }) }), items: getSelectMenuItems(index) }), (!isReadOnly || (si.function && si.function != QueryFunctions.None)) && _jsx(TMQdDropDownMenu, { backgroundColor: colorOperator, color: 'green', borderRadius: borderRadius, content: _jsx(StyledItemWrapper, { children: si.function === QueryFunctions.None ? "..." : LocalizeQueryFunctions(si.function) }), items: getQueryFunctionsMenuItems(si, index) }), _jsx(TMMetadataChooser, { disabled: isReadOnly, filterMetadata: (o => o.perm?.canView === AccessLevels.Yes || o.perm?.canUpdate === AccessLevels.Yes), showEditButton: false, getColorIndex: getColorIndex, showCompleteMetadataName: showCompleteMetadataName, openEditorOnSummaryClick: true, showBorder: false, borderRadius: borderRadius, showId: showId, backgroundColor: getColorIndex({ tid: si.tid, alias: si.alias }), qd: formData, values: [{ tid: si.tid, mid: si.mid, aliasTID: si.alias }], onValueChanged: (values) => { values.length > 0 && onChange_SelectItem_MID(values[0], index); }, updateIsModalOpen: updateIsModalOpen }), (!isReadOnly || si.as) && _jsx(TMQdEditableItem, { value: si.as, backgroundColor: colorValue, placeHolder: `<${SDKUI_Localizator.Query_EnterAlias}...>`, width: '100%', onValueChanged: (value) => { onChange_SelectItem_As(value, index); } })] }, `${si.tid}_${si.mid}_${index}`));
747
749
  })] }) }) }), fromCount > 0 && (!isReadOnly || whereCount > 0) && _jsx(Item, { title: SDK_Localizator.QueryWhere, titleRender: (tabItemProps) => renderAccordionTitle(tabItemProps, whereCount, validationItems.filter((o) => o.PropertyName == TMPropertyNames.where)), children: _jsx(StyledAccordionItemContainer, { children: _jsxs(StyledAccordionItemContent, { "$disabled": isReadOnly, children: [_jsx(TMVilViewer, { vil: validationItems.filter((o) => o.PropertyName === TMPropertyNames.where) }), (!formData?.where || formData?.where.length <= 0) && !isReadOnly &&
748
750
  _jsx(StyledRowItem, { children: _jsx(TMButton, { btnStyle: 'normal', disabled: !formData?.from?.tid, caption: SDKUI_Localizator.Add, onClick: onAdd_WhereItem }) }), formData?.where?.map((wi, index) => {
749
751
  return (_jsxs(StyledRowItem, { onDragEnd: dragEnd, onDragOver: dragOver, onDrop: (e) => dropWhere(e, wi), children: [!isReadOnly && _jsx(StyledDraggableDiv, { draggable: true, onDragStart: (e) => dragStart(e, wi), children: _jsx(IconDraggabledots, { fontSize: 15, color: TMColors.button_icon }) }), !isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', icon: _jsx(IconClear, { color: TMColors.button_icon }), caption: SDKUI_Localizator.Remove, onClick: () => onRemove_WhereItem(index) }), !isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', icon: _jsx(IconAddCircleOutline, { color: TMColors.button_icon }), caption: SDKUI_Localizator.AddBelow, onClick: () => onAdd_WhereItem(index + 1) }), !isReadOnly && _jsx(TMQdDropDownMenu, { content: _jsx(TMTooltip, { content: SDK_Localizator.toCaseWord(SDKUI_Localizator.OneMore), children: _jsx(IconDotsVerticalCircleOutline, { color: TMColors.button_icon }) }), items: [
@@ -761,7 +763,7 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, isExpertMode, showDis
761
763
  ] }), _jsx(TMQdDropDownMenu, { disabled: index == 0, color: 'green', content: _jsx("div", { style: { fontSize: '1rem' }, children: wi.or ? 'OR' : 'AND' }), items: [
762
764
  { name: 'AND', onClick: () => onChange_WhereItem_Or(false, index) },
763
765
  { name: 'OR', onClick: () => onChange_WhereItem_Or(true, index) }
764
- ] }), _jsx(TMQdEditableItem, { value: wi.leftBrackets, allowedPattern: /\(/g, backgroundColor: colorBrackets, onValueChanged: (value) => { onChange_WhereItem_Brackets(value, true, index); } }), _jsx(TMMetadataChooser, { disabled: isReadOnly, filterMetadata: (o => o.perm?.canSearch === AccessLevels.Yes), showEditButton: false, getColorIndex: getColorIndex, showCompleteMetadataName: showCompleteMetadataName, openEditorOnSummaryClick: true, showBorder: false, borderRadius: borderRadius, showId: showId, backgroundColor: getColorIndex({ tid: wi.tid, alias: wi.alias }), qd: formData, values: [{ tid: wi.tid, mid: wi.mid, aliasTID: wi.alias }], onValueChanged: (values) => { values.length > 0 && onChange_WhereItem_Metadato(values[0], index); } }), _jsx(TMQdDropDownMenu, { backgroundColor: colorOperator, color: 'green', borderRadius: borderRadius, content: _jsx(StyledDivHorizontal, { children: _jsx(StyledItemWrapper, { children: LocalizeQueryOperators(wi.operator) }) }), items: getQueryOperatorsMenuItems(wi, index) }), _jsx(TMQdWhereItemValue, { whereItem: wi, index: index, onValueChanged: (values) => { onChange_WhereItem_Values(values[0], values[1], index); } }), _jsx(TMQdEditableItem, { value: wi.rightBrackets, allowedPattern: /\)/g, backgroundColor: colorBrackets, onValueChanged: (value) => { onChange_WhereItem_Brackets(value, false, index); } })] }, `${wi.tid}_${wi.mid}_${index}`));
766
+ ] }), _jsx(TMQdEditableItem, { value: wi.leftBrackets, allowedPattern: /\(/g, backgroundColor: colorBrackets, onValueChanged: (value) => { onChange_WhereItem_Brackets(value, true, index); } }), _jsx(TMMetadataChooser, { disabled: isReadOnly, filterMetadata: (o => o.perm?.canSearch === AccessLevels.Yes), showEditButton: false, getColorIndex: getColorIndex, showCompleteMetadataName: showCompleteMetadataName, openEditorOnSummaryClick: true, showBorder: false, borderRadius: borderRadius, showId: showId, backgroundColor: getColorIndex({ tid: wi.tid, alias: wi.alias }), qd: formData, values: [{ tid: wi.tid, mid: wi.mid, aliasTID: wi.alias }], onValueChanged: (values) => { values.length > 0 && onChange_WhereItem_Metadato(values[0], index); }, updateIsModalOpen: updateIsModalOpen }), _jsx(TMQdDropDownMenu, { backgroundColor: colorOperator, color: 'green', borderRadius: borderRadius, content: _jsx(StyledDivHorizontal, { children: _jsx(StyledItemWrapper, { children: LocalizeQueryOperators(wi.operator) }) }), items: getQueryOperatorsMenuItems(wi, index) }), _jsx(TMQdWhereItemValue, { whereItem: wi, index: index, onValueChanged: (values) => { onChange_WhereItem_Values(values[0], values[1], index); }, updateIsModalOpen: updateIsModalOpen }), _jsx(TMQdEditableItem, { value: wi.rightBrackets, allowedPattern: /\)/g, backgroundColor: colorBrackets, onValueChanged: (value) => { onChange_WhereItem_Brackets(value, false, index); } })] }, `${wi.tid}_${wi.mid}_${index}`));
765
767
  })] }) }) }), fromCount > 0 && (!isReadOnly || orderByCount > 0) && _jsx(Item, { title: SDK_Localizator.QueryOrderBy, titleRender: (tabItemProps) => renderAccordionTitle(tabItemProps, orderByCount, validationItems.filter((o) => o.PropertyName == TMPropertyNames.orderBy)), children: _jsx(StyledAccordionItemContainer, { children: _jsxs(StyledAccordionItemContent, { "$disabled": isReadOnly, children: [(!formData?.orderBy || formData?.orderBy.length <= 0) && !isReadOnly &&
766
768
  _jsx(StyledRowItem, { children: _jsx(TMButton, { btnStyle: 'normal', disabled: !formData?.from?.tid, caption: SDKUI_Localizator.Add, onClick: onAdd_OrderByItem }) }), formData?.orderBy?.map((oi, index) => {
767
769
  return (_jsxs(StyledRowItem, { onDragEnd: dragEnd, onDragOver: dragOver, onDrop: (e) => dropOrderBy(e, oi), children: [!isReadOnly && _jsx(StyledDraggableDiv, { draggable: true, onDragStart: (e) => dragStart(e, oi), children: _jsx(IconDraggabledots, { fontSize: 15, color: TMColors.button_icon }) }), !isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', icon: _jsx(IconClear, { color: TMColors.button_icon }), caption: SDKUI_Localizator.Remove, onClick: () => onRemove_OrderByItem(index) }), !isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', icon: _jsx(IconAddCircleOutline, { color: TMColors.button_icon }), caption: SDKUI_Localizator.AddBelow, onClick: () => onAdd_OrderByItem(index + 1) }), !isReadOnly && _jsx(TMQdDropDownMenu, { content: _jsx(TMTooltip, { content: SDK_Localizator.toCaseWord(SDKUI_Localizator.OneMore), children: _jsx(IconDotsVerticalCircleOutline, { color: TMColors.button_icon }) }), items: [
@@ -769,11 +771,11 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, isExpertMode, showDis
769
771
  { name: SDKUI_Localizator.AddBelow, onClick: () => onAdd_OrderByItem(index + 1) },
770
772
  { name: SDKUI_Localizator.Remove, onClick: () => onRemove_OrderByItem(index) },
771
773
  { name: SDKUI_Localizator.RemoveAll, onClick: () => setFormData({ ...formData, orderBy: undefined }) },
772
- ] }), _jsx(TMMetadataChooser, { disabled: isReadOnly, filterMetadata: (o => o.perm?.canView === AccessLevels.Yes || o.perm?.canUpdate === AccessLevels.Yes), showEditButton: false, getColorIndex: getColorIndex, showCompleteMetadataName: showCompleteMetadataName, openEditorOnSummaryClick: true, showBorder: false, showId: showId, borderRadius: borderRadius, backgroundColor: getColorIndex({ tid: oi.tid, alias: oi.alias }), qd: formData, values: [{ tid: oi.tid, mid: oi.mid, aliasTID: oi.alias }], onValueChanged: (values) => onChange_OrderByItem_MID(values[0], index) }), _jsx(TMQdDropDownMenu, { backgroundColor: colorOperator, borderRadius: borderRadius, content: _jsx(StyledItemWrapper, { children: oi.asc ? 'ASC' : 'DESC' }), items: [
774
+ ] }), _jsx(TMMetadataChooser, { disabled: isReadOnly, filterMetadata: (o => o.perm?.canView === AccessLevels.Yes || o.perm?.canUpdate === AccessLevels.Yes), showEditButton: false, getColorIndex: getColorIndex, showCompleteMetadataName: showCompleteMetadataName, openEditorOnSummaryClick: true, showBorder: false, showId: showId, borderRadius: borderRadius, backgroundColor: getColorIndex({ tid: oi.tid, alias: oi.alias }), qd: formData, values: [{ tid: oi.tid, mid: oi.mid, aliasTID: oi.alias }], onValueChanged: (values) => onChange_OrderByItem_MID(values[0], index), updateIsModalOpen: updateIsModalOpen }), _jsx(TMQdDropDownMenu, { backgroundColor: colorOperator, borderRadius: borderRadius, content: _jsx(StyledItemWrapper, { children: oi.asc ? 'ASC' : 'DESC' }), items: [
773
775
  { name: 'ASC', onClick: () => onChange_OrderByItem_Asc(true, oi, index) },
774
776
  { name: 'DESC', onClick: () => onChange_OrderByItem_Asc(false, oi, index) }
775
777
  ] })] }, `${oi.tid}_${oi.mid}_${index}`));
776
- })] }) }) }), fromCount > 0 && _jsx(Item, { title: SDKUI_Localizator.Options, titleRender: (tabItemProps) => renderAccordionTitle(tabItemProps, undefined, []), children: _jsx(StyledAccordionItemContainer, { children: _jsxs(StyledAccordionItemContent, { "$disabled": isReadOnly, children: [showDistinct && _jsx(TMCheckBox, { label: SDK_Localizator.QueryDistinct, value: formData.isDistinct, onValueChanged: () => { setFormData({ ...formData, isDistinct: !formData.isDistinct }); } }), _jsx(TMTextBox, { type: 'number', width: '200px', label: SDKUI_Localizator.MaxDcmtsToBeReturned, validationItems: validationItems.filter((o) => o.PropertyName == TMPropertyNames.maxDcmtsToBeReturned), value: formData.maxDcmtsToBeReturned, onBlur: (newValue) => setFormData({ ...formData, maxDcmtsToBeReturned: Number(newValue) }) })] }) }) })] }), _jsx(ConfirmQueryParamsDialog, {})] }), showResultSearch && _jsxs(StyledModalContainer, { children: [" ", renderResultSearchForm, " "] })] }));
778
+ })] }) }) }), fromCount > 0 && _jsx(Item, { title: SDKUI_Localizator.Options, titleRender: (tabItemProps) => renderAccordionTitle(tabItemProps, undefined, []), children: _jsx(StyledAccordionItemContainer, { children: _jsxs(StyledAccordionItemContent, { "$disabled": isReadOnly, children: [showDistinct && _jsx(TMCheckBox, { label: SDK_Localizator.QueryDistinct, value: formData.isDistinct, onValueChanged: () => { setFormData({ ...formData, isDistinct: !formData.isDistinct }); } }), _jsx(TMTextBox, { type: 'number', width: '200px', label: SDKUI_Localizator.MaxDcmtsToBeReturned, validationItems: validationItems.filter((o) => o.PropertyName == TMPropertyNames.maxDcmtsToBeReturned), value: formData.maxDcmtsToBeReturned, onBlur: (newValue) => setFormData({ ...formData, maxDcmtsToBeReturned: Number(newValue) }) })] }) }) })] }), _jsx(ConfirmQueryParamsDialog, {})] }), showResultSearch && _jsxs(StyledModalContainer, { style: { backgroundColor: 'white' }, children: [" ", renderResultSearchForm, " "] })] }));
777
779
  };
778
780
  export default TMQueryEditor;
779
781
  const TMQdEditableItem = ({ value, placeHolder, width, backgroundColor, allowedPattern, onValueChanged }) => {
@@ -795,7 +797,7 @@ const TMQdEditableItem = ({ value, placeHolder, width, backgroundColor, allowedP
795
797
  :
796
798
  _jsx(StyledItemWrapper, { onClick: () => setIsComponentVisible(true), style: { backgroundColor: backgroundColor, cursor: 'pointer' }, children: value ?? placeHolder }) }));
797
799
  };
798
- const TMQdWhereItemValue = ({ whereItem, index, queryParamsDynDataList, onlyEditing = false, onValueChanged, onCascadeRefreshDynDataLists }) => {
800
+ const TMQdWhereItemValue = ({ whereItem, index, queryParamsDynDataList, onlyEditing = false, onValueChanged, onCascadeRefreshDynDataLists, updateIsModalOpen }) => {
799
801
  let EditingModes;
800
802
  (function (EditingModes) {
801
803
  EditingModes[EditingModes["None"] = 0] = "None";
@@ -943,7 +945,7 @@ const TMQdWhereItemValue = ({ whereItem, index, queryParamsDynDataList, onlyEdit
943
945
  };
944
946
  const mdValueEmptyDescr = `<${SDKUI_Localizator.Search_EnterValue}...>`;
945
947
  return (_jsxs("div", { ref: ref, id: containerId, style: { width: isEditing && whereItem.operator == QueryOperators.Custom && !onlyEditing ? "100%" : undefined }, children: [(isEditing || onlyEditing) &&
946
- _jsxs(StyledRowItem, { children: [showValue1 && _jsx(TMMetadataEditor, { tid: whereItem.tid, mid: whereItem.mid, layoutMode: LayoutModes.None, isEditable: isEditableList, value: whereItem.value1, queryOperator: whereItem.operator, autoFocus: !onlyEditing, containerElement: containerElement, onValueChange: (value) => setCurrentValue1(value), onValueChanged: (value) => { normalizeValue(value, true); } }), showValue2 && _jsx(TMMetadataEditor, { tid: whereItem.tid, mid: whereItem.mid, layoutMode: LayoutModes.None, isEditable: isEditableList, value: whereItem.value1, queryOperator: whereItem.operator, autoFocus: !onlyEditing, containerElement: containerElement, onValueChange: (value) => setCurrentValue2(value), onValueChanged: (value) => { normalizeValue(value, false); } })] }), !isEditing && !onlyEditing && (showValue1 || showValue2) &&
948
+ _jsxs(StyledRowItem, { children: [showValue1 && _jsx(TMMetadataEditor, { tid: whereItem.tid, mid: whereItem.mid, layoutMode: LayoutModes.None, isEditable: isEditableList, value: whereItem.value1, queryOperator: whereItem.operator, autoFocus: !onlyEditing, containerElement: containerElement, onValueChange: (value) => setCurrentValue1(value), onValueChanged: (value) => { normalizeValue(value, true); }, updateIsModalOpen: updateIsModalOpen }), showValue2 && _jsx(TMMetadataEditor, { tid: whereItem.tid, mid: whereItem.mid, layoutMode: LayoutModes.None, isEditable: isEditableList, value: whereItem.value1, queryOperator: whereItem.operator, autoFocus: !onlyEditing, containerElement: containerElement, onValueChange: (value) => setCurrentValue2(value), onValueChanged: (value) => { normalizeValue(value, false); }, updateIsModalOpen: updateIsModalOpen })] }), !isEditing && !onlyEditing && (showValue1 || showValue2) &&
947
949
  _jsxs(StyledDivHorizontal, { children: [(editingMode == EditingModes.Chooser) &&
948
950
  _jsxs(_Fragment, { children: [showDataListChooseForm && !isEditableList &&
949
951
  _jsx(TMDataListItemChooserForm, { height: '500px', width: '450px', allowMultipleSelection: whereItem.operator == QueryOperators.In || whereItem.operator == QueryOperators.NotIn, dataListId: md?.dataListID, selectedIDs: whereItem.value1?.split(',').map((item) => !item.startsWith("'") ? item : item.slice(1, -1)) ?? [], onClose: () => setShowDataListChooseForm(false), onChoose: (IDs) => { IDs && normalizeValue(IDs.length == 1 ? IDs[0] : IDs.map((item) => `${item}`).join(","), true); } }), showDynDataListChooseForm && !isEditableList &&
@@ -985,6 +987,8 @@ const StyledContent = styled.div `
985
987
  opacity: ${props => props.$disabled ? 0.4 : 1};
986
988
  pointer-events: ${props => props.$disabled ? 'none' : ''};
987
989
  user-select: none;
990
+ -webkit-touch-callout: none;
991
+ -webkit-user-select: none;
988
992
  display: flex;
989
993
  align-items: center;
990
994
 
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useState, useEffect, useRef, useMemo } from 'react';
3
3
  import six from '../../assets/six.png';
4
- import { getAvatarColor, IconCloseOutline, IconCopy, IconSearch, openApps, SDKUI_Localizator } from '../../helper';
4
+ import { getAvatarColor, IconCloseOutline, IconCopy, openApps, SDKUI_Localizator } from '../../helper';
5
5
  import styled, { keyframes } from 'styled-components';
6
6
  import { SDK_Globals, AuthenticationModes, AppModules, UserLevels, CultureIDs } from '@topconsultnpm/sdk-ts';
7
7
  import { TMColors } from '../../utils/theme';
@@ -87,7 +87,7 @@ export const copyUserInfoToClipboard = (userName, cultureId, archiveId, archiveD
87
87
  };
88
88
  export const TMSearchBar = ({ searchValue, onSearchValueChanged, maxWidth, marginLeft }) => {
89
89
  const deviceType = useDeviceType();
90
- return (_jsxs(StyledSearchBarContainer, { style: { maxWidth: maxWidth ? maxWidth : deviceType === DeviceType.MOBILE ? '65%' : '650px', marginLeft: marginLeft ? marginLeft : deviceType === DeviceType.MOBILE ? '10px' : '20px' }, "$isMobile": deviceType === DeviceType.MOBILE, children: [" ", _jsx(IconSearch, { fontSize: 12, color: '#00000060', style: { position: 'absolute', width: '20px', height: '20px', left: '5px', top: '5px', zIndex: 1 } }), _jsx(StyledSearchBar, { placeholder: SDKUI_Localizator.Search + '...', type: "text", value: searchValue, onChange: (e) => onSearchValueChanged(e.target.value) }), searchValue.length > 0 && _jsx(IconCloseOutline, { onClick: () => onSearchValueChanged(''), color: '#00000060', style: { cursor: 'pointer', position: 'absolute', width: '20px', height: '20px', right: '5px', top: '5px', zIndex: 1 } })] }));
90
+ return (_jsxs(StyledSearchBarContainer, { style: { maxWidth: maxWidth ? maxWidth : deviceType === DeviceType.MOBILE ? '65%' : '650px', marginLeft: marginLeft ? marginLeft : deviceType === DeviceType.MOBILE ? '10px' : '20px' }, "$isMobile": deviceType === DeviceType.MOBILE, children: [" ", _jsx(StyledSearchBar, { placeholder: SDKUI_Localizator.Search + '...', type: "text", value: searchValue, onChange: (e) => onSearchValueChanged(e.target.value) }), searchValue.length > 0 && _jsx(IconCloseOutline, { onClick: () => onSearchValueChanged(''), color: '#00000060', style: { cursor: 'pointer', position: 'absolute', width: '20px', height: '20px', right: '5px', top: '5px', zIndex: 1 } })] }));
91
91
  };
92
92
  const TMHeader = ({ customButtons = _jsx(_Fragment, {}), onMenusOpen, showSettingsMenu = true, showSearchBar = true, clearSearchJobValue, clearSearchQEValue, searchContext = TMSearchContext.JOBS, onChangePassword, onLogout, settingsMenuContext, onSeacrhJobsValueChange, onSeacrhJobslistValueChange, onSeacrhProcessMonitorValueChange, onSeacrhProcessValueChange, onSeacrhPlatformValueChange, onSeacrhQEValueChange, onSettingsClick }) => {
93
93
  const [appRoutes, setAppRoutes] = useState();
@@ -302,9 +302,9 @@ const StyledLogo = styled.img `
302
302
  `;
303
303
  const StyledHeaderContainer = styled.div `
304
304
  position:fixed;
305
- width: 100%;
306
- height: 60px;
307
- background-color:transparent;
305
+ height:60px;
306
+ background: transparent;
307
+ background-size: 200%;
308
308
  opacity: 1;
309
309
  display: flex;
310
310
  flex-direction: row;
@@ -381,8 +381,8 @@ const StyledHeaderIcon = styled.div `
381
381
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
382
382
  }
383
383
  `;
384
- const StyledSearchBarContainer = styled.div ` position: relative; height:30px; width: 100%; max-width: ${props => props.$isMobile ? '65%' : '650px'}; margin-left: ${props => props.$isMobile ? '10px' : '50px'}; `;
385
- const StyledSearchBar = styled.input ` background: #FFFFFF 0% 0% no-repeat padding-box; border: 1px solid #dbdbdb; border-radius: 5px; padding: 5px 30px; width:100%; transition: 100ms linear; &:focus{ outline: none; border-bottom: 2px solid ${TMColors.primary}; } `;
384
+ const StyledSearchBarContainer = styled.div ` position: relative; height:35px; width: 100%; max-width: ${props => props.$isMobile ? '65%' : '650px'}; margin-left: ${props => props.$isMobile ? '10px' : '50px'}; `;
385
+ const StyledSearchBar = styled.input ` background: #FFFFFF 0% 0% no-repeat padding-box; border: 1px solid #dbdbdb; border-radius: 5px; padding: 8px 30px 8px 20px; width:100%; transition: 100ms linear; &:focus{ outline: none; border-bottom: 2px solid ${TMColors.primary}; } `;
386
386
  const StyledHeaderAppText = styled.h2 ` text-align: left; letter-spacing: 0px; color: ${TMColors.primary}; opacity: 1; `;
387
387
  const AppMenuButton = styled.div `
388
388
  width: 90px;
@@ -400,6 +400,8 @@ const AppMenuButton = styled.div `
400
400
  cursor: pointer;
401
401
  box-shadow: 0 2px 8px #2459a41a;
402
402
  user-select: none;
403
+ -webkit-touch-callout: none;
404
+ -webkit-user-select: none;
403
405
  gap: 5px;
404
406
  transition:
405
407
  transform 0.18s cubic-bezier(.4,0,.2,1),
@@ -445,6 +447,8 @@ const UserAvatar = styled.div `
445
447
  font-weight: 600;
446
448
  letter-spacing: 0.5px;
447
449
  user-select: none;
450
+ -webkit-touch-callout: none;
451
+ -webkit-user-select: none;
448
452
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
449
453
  `;
450
454
  const UserAvatarLarge = styled(UserAvatar) `
@@ -9,7 +9,6 @@ export interface AppRoute {
9
9
  type?: AppRouteType;
10
10
  }
11
11
  interface ITMSidebar {
12
- /** List of TMSidebarItem components that make up the menu */
13
12
  items: JSX.Element[];
14
13
  height?: string;
15
14
  width?: string;
@@ -1,61 +1,33 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useEffect, useState } from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
3
2
  import styled from 'styled-components';
4
- import { AccessLevelsEx, DcmtTypeListCacheService, SDK_Globals } from '@topconsultnpm/sdk-ts';
3
+ import { AppModules, SDK_Globals } from '@topconsultnpm/sdk-ts';
5
4
  import { ScrollView } from 'devextreme-react';
6
5
  import { TMColors } from '../../utils/theme';
7
- import TMSpinner from '../base/TMSpinner';
8
- import { TMExceptionBoxManager } from '../base/TMPopUp';
9
6
  const StyledTMSidebarContainer = styled.div `
10
- top: ${props => props.$top || '53px'};
7
+ top: ${props => props.$top || '70px'};
11
8
  left: ${props => props.$left || '0px'};
12
9
  width: ${props => props.$width || '50px'};
13
- height: ${props => props.$height || 'calc(100% - 88px)'};
14
- background: ${() => TMColors.primaryColor} 0% 0% no-repeat padding-box;
15
- box-shadow: 0px 3px 6px #00000029;
16
- border-radius: 0;
10
+ height: ${props => props.$height || 'calc(100% - 90px)'};
11
+ background: linear-gradient(180deg, ${() => TMColors.primaryColor} 0%, ${props => props.$appName === AppModules.DESIGNER ? '#351525' : props.$appName === AppModules.ORCHESTRATOR ? '#0a3d23' : '#0a3d23'} 100%);
12
+ box-shadow: 2px 0 8px rgba(0,0,0,0.08);
13
+ border-radius: 0px 10px 10px 0px;
17
14
  opacity: 1;
18
15
  display: flex;
19
16
  flex-direction: column;
20
17
  justify-content: space-between;
21
18
  align-items: center;
22
- padding: 10px 0px;
19
+ padding: 20px 0px;
23
20
  position: absolute;
24
- border-top-right-radius: 10px;
25
- border-bottom-right-radius: 10px;
26
21
  overflow: hidden;
27
- `;
28
- const FixedBottomContainer = styled.div `
29
- display: flex;
30
- flex-direction: column;
31
- align-items: center;
32
- position: relative;
33
- bottom: 10px;
22
+ z-index: 100;
34
23
  `;
35
24
  const TMSidebar = ({ items, height, borderRightRadius, left, top, width }) => {
36
- const [canArchive, setCanArhive] = useState(false);
37
- const [canSearch, setCanSearch] = useState(false);
38
- useEffect(() => {
39
- getAllDcmtTypesAsync();
40
- }, []);
41
- const getAllDcmtTypesAsync = async () => {
42
- try {
43
- TMSpinner.show();
44
- const res = await DcmtTypeListCacheService.GetAllWithoutMetadataAsync();
45
- if (!res)
46
- return;
47
- if (res.some(r => r.perm?.canArchive === AccessLevelsEx.Yes))
48
- setCanArhive(true);
49
- if (res.some(r => r.perm?.canSearch === AccessLevelsEx.Yes))
50
- setCanSearch(true);
51
- }
52
- catch (e) {
53
- TMExceptionBoxManager.show({ exception: e });
54
- }
55
- finally {
56
- TMSpinner.hide();
57
- }
58
- };
59
- return (_jsxs(StyledTMSidebarContainer, { "$borderRightRadius": borderRightRadius, "$left": left, "$top": top, "$width": width, "$appName": SDK_Globals.appModule, "$height": height, children: [_jsx(ScrollView, { height: "100%", width: "100%", style: { padding: "5px 0 0 5px" }, useNative: true, children: items.filter(item => item.props.type !== 'app') }), _jsx(FixedBottomContainer, { children: items.filter(item => item.props.type === 'app') })] }));
25
+ return (_jsx(StyledTMSidebarContainer, { "$borderRightRadius": borderRightRadius, "$left": left, "$top": top, "$width": width, "$appName": SDK_Globals.appModule, "$height": height, children: _jsx(ScrollView, { height: "calc(100%)", width: "100%", useNative: true, children: _jsx("div", { style: {
26
+ display: "flex",
27
+ flexDirection: "column",
28
+ alignItems: "center",
29
+ gap: "3px",
30
+ width: "100%"
31
+ }, children: items.filter(item => item.props.type !== 'app') }) }) }));
60
32
  };
61
33
  export default TMSidebar;
@@ -1,8 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import styled from 'styled-components';
2
+ import styled, { css } from 'styled-components';
3
3
  import TMTooltip from '../base/TMTooltip';
4
4
  import { SDK_Globals } from '@topconsultnpm/sdk-ts';
5
- import { TMColors } from '../../utils/theme';
6
5
  var ApplicationThemeColor;
7
6
  (function (ApplicationThemeColor) {
8
7
  ApplicationThemeColor["SURFER"] = "#1d6f42";
@@ -11,29 +10,49 @@ var ApplicationThemeColor;
11
10
  ApplicationThemeColor["DESIGNER"] = "#482234";
12
11
  })(ApplicationThemeColor || (ApplicationThemeColor = {}));
13
12
  const StyledTMSidebarItemContainer = styled.div `
14
- margin-bottom: 10px;
15
- background-color: transparent;
16
- padding: 5px 0 0 5px;
17
- transition: all 200ms ease;
18
- user-select: none;
13
+ width: 40px;
14
+ height: 40px;
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+ border-radius: 8px;
19
19
  cursor: pointer;
20
- color: ${(props) => props.$isSelected ? TMColors.primaryColor : '#fff'};
21
- background-color: ${props => props.$isSelected ? 'white' : 'transparent'} ;
22
- border-radius: 3px;
23
- width: 32px;
24
- height: 32px;
20
+ color: #fff;
21
+ position: relative;
22
+ transition: background-color 200ms ease;
23
+ user-select: none;
24
+ -webkit-touch-callout: none;
25
+ -webkit-user-select: none;
26
+ background-color: ${props => props.$isSelected ? 'rgba(255,255,255,0.35)' : 'transparent'};
25
27
 
26
28
  p {
27
29
  display: none;
28
30
  }
29
31
 
30
- &:hover {
31
- background-color: ${props => !props.$isApp && 'white'};
32
- color: ${props => !props.$isApp && TMColors.primaryColor};
33
- }
32
+ ${props => !props.$isApp && css `
33
+ &:hover {
34
+ background-color: rgba(255,255,255,0.35);
35
+ }
36
+ `}
34
37
  `;
35
38
  const TMSidebarItem = (props) => {
36
39
  let app = SDK_Globals.appModule;
37
- return (_jsx(TMTooltip, { hideAfterDelay: true, content: props.tooltipContent ?? props.name, children: _jsxs(StyledTMSidebarItemContainer, { "$app": app, "$isApp": props.isAppIcon, onClick: () => props.onClick?.(props), style: { position: 'relative' }, "$isSelected": props.isSelected, children: [_jsxs("div", { children: [_jsx("i", { children: props.icon }), _jsx("p", { children: props.name })] }), props.badgeNumber > 0 && _jsx("div", { style: { width: '22px', height: '22px', backgroundColor: '#f09c0a', position: 'absolute', borderRadius: '22px', top: -6, right: -6, color: 'white', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: '1rem', fontWeight: 'bold' }, children: props.badgeNumber })] }) }));
40
+ return (_jsx(TMTooltip, { hideAfterDelay: true, content: props.tooltipContent ?? props.name, children: _jsxs(StyledTMSidebarItemContainer, { "$app": app, "$isApp": props.isAppIcon, onClick: () => props.onClick?.(props), "$isSelected": props.isSelected, children: [_jsxs("div", { children: [_jsx("i", { children: props.icon }), _jsx("p", { children: props.name })] }), props.badgeNumber > 0 && (_jsx("div", { style: {
41
+ position: 'absolute',
42
+ top: '4px',
43
+ right: '4px',
44
+ background: '#f09c0a',
45
+ color: '#fff',
46
+ fontSize: '10px',
47
+ minWidth: '16px',
48
+ height: '16px',
49
+ borderRadius: '8px',
50
+ display: 'flex',
51
+ alignItems: 'center',
52
+ justifyContent: 'center',
53
+ padding: '0 4px',
54
+ pointerEvents: 'none',
55
+ fontWeight: 'bold'
56
+ }, children: props.badgeNumber }))] }) }));
38
57
  };
39
58
  export default TMSidebarItem;
@@ -47,6 +47,9 @@ export declare class ThemeSettings {
47
47
  gridSettings: DataGridSettings;
48
48
  };
49
49
  }
50
+ export declare const DEFAULT_PREVIEW_THRESHOLD = 500;
51
+ export declare const DEFAULT_PAGE_SIZE = 100;
52
+ export declare const DEFAULT_MAX_DCMTS_TO_BE_RETURNED = 200;
50
53
  export declare class SearchSettings {
51
54
  autoFindReferences: ObjectClasses[];
52
55
  invoiceRetrieveFormat: InvoiceRetrieveFormats;
@@ -90,6 +90,9 @@ export class ThemeSettings {
90
90
  };
91
91
  }
92
92
  }
93
+ export const DEFAULT_PREVIEW_THRESHOLD = 500; // KB
94
+ export const DEFAULT_PAGE_SIZE = 100;
95
+ export const DEFAULT_MAX_DCMTS_TO_BE_RETURNED = 200;
93
96
  export class SearchSettings {
94
97
  constructor() {
95
98
  this.autoFindReferences = [];
@@ -97,9 +100,9 @@ export class SearchSettings {
97
100
  this.orderRetrieveFormat = OrderRetrieveFormats.NSO_HTML;
98
101
  this.mruTIDs = [];
99
102
  this.defaultTree = -1;
100
- this.previewThreshold = 500; // KB
101
- this.pageSize = 100;
102
- this.maxDcmtsToBeReturned = 200;
103
+ this.previewThreshold = DEFAULT_PREVIEW_THRESHOLD;
104
+ this.pageSize = DEFAULT_PAGE_SIZE;
105
+ this.maxDcmtsToBeReturned = DEFAULT_MAX_DCMTS_TO_BE_RETURNED;
103
106
  this.floatingMenuBar = new FloatingMenuBarSettings();
104
107
  this.panelLayout = {};
105
108
  }