@topconsultnpm/sdkui-react-beta 6.6.27 → 6.6.29

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.
@@ -60,6 +60,8 @@ export const TMMetadataChooserForm = ({ tmSession, tids, inputDcmtTypesList, qd,
60
60
  }
61
61
  }
62
62
  else if (inputDcmtTypesList) {
63
+ if (refreshCache)
64
+ onRefreshCache?.();
63
65
  for (const dtd of inputDcmtTypesList) {
64
66
  const newDtd = new DcmtTypeDescriptor();
65
67
  newDtd.init({ ...dtd });
@@ -21,10 +21,8 @@ const TMChooserForm = ({ children, title, allowMultipleSelection, hasShowOnlySel
21
21
  if (dataSource) {
22
22
  if (refreshCache)
23
23
  onRefreshCache?.();
24
- else {
25
- setItems(dataSource);
26
- setSelectedItems(dataSource.filter((o) => selectedIDs?.includes(o[keyName])));
27
- }
24
+ setItems(dataSource);
25
+ setSelectedItems(dataSource.filter((o) => selectedIDs?.includes(o[keyName])));
28
26
  return;
29
27
  }
30
28
  getItems?.(refreshCache).then((result) => {
@@ -7,6 +7,7 @@ import { SDK_Globals, AuthenticationModes } from '@topconsultnpm/sdk-ts-beta';
7
7
  import { FontSize, TMColors } from '../../utils/theme';
8
8
  import { ButtonNames, TMMessageBoxManager } from '../base/TMPopUp';
9
9
  import Logo from '../../assets/Toppy-generico.png';
10
+ import { ApplicationThemeColor } from './TMSidebarItem';
10
11
  export var TMSearchContext;
11
12
  (function (TMSearchContext) {
12
13
  TMSearchContext["JOBS"] = "jobs";
@@ -16,7 +17,7 @@ export var TMSearchContext;
16
17
  TMSearchContext["PLATFORM"] = "OrchestrationPlatform";
17
18
  TMSearchContext["QE"] = "QueryEditor";
18
19
  })(TMSearchContext || (TMSearchContext = {}));
19
- const StyledHeaderContainer = styled.div ` width: 100%; height: 50px; /* background: #E85C36 0% 0% no-repeat padding-box; */ background: ${props => props.$appName === 'ORCHESTRATOR' ? 'linear-gradient(90deg, #f0f4fa, #135596)' : props.$appName === 'SURFER' ? 'linear-gradient(90deg, #f0f4fa, #0e7418)' : 'linear-gradient(90deg, #f0f4fa, #b51678)'}; opacity: 1; display: flex; flex-direction: row; width: 100%; justify-content: space-between; align-items: center; `;
20
+ const StyledHeaderContainer = styled.div ` width: 100%; height: 50px; /* background: #E85C36 0% 0% no-repeat padding-box; */ background: ${props => props.$appName === 'ORCHESTRATOR' ? `linear-gradient(90deg, #f0f4fa, ${ApplicationThemeColor.ORCHESTRATOR})` : props.$appName === 'SURFER' ? `linear-gradient(90deg, #f0f4fa, ${ApplicationThemeColor.SURFER})` : `linear-gradient(90deg, #f0f4fa, ${ApplicationThemeColor.DESIGNER})`}; opacity: 1; display: flex; flex-direction: row; width: 100%; justify-content: space-between; align-items: center; `;
20
21
  const StyledMenu = styled.div ` position: absolute; top: 50px; right: 0px; width: fit-content; height: fit-content; padding: 10px 20px; border: 1px solid #2459A420; background: #E2E9EF 0% 0% no-repeat padding-box; z-index: 20000022; display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 10px; border: 1px solid #c9c9c9; border-top: none; `;
21
22
  const StyledMenuItem = styled.p ` font-size: ${props => props.$fontSize}; display: flex; flex-direction: row; justify-content: flex-start; align-items: center; gap: 2px; cursor: pointer; color: gray; &:hover{ color: ${TMColors.primary}; transition: color 100ms ease; } `;
22
23
  const StyledHeaderIcon = styled.div ` width: 50px; height: 50px; margin-left: 10px; display: flex; align-items: center; justify-content: center; color: ${props => props.$isSelected ? '#135596' : '#ffffff'}; transition: color ease 100ms; background-color: ${props => props.$isSelected && '#ffffff'}; cursor: pointer; &:hover { color: #ffffff; background-color: #0d3862; transition: color ease 100ms; } `;
@@ -7,15 +7,11 @@ import TMTooltip from '../base/TMTooltip';
7
7
  const TMDataListItemViewer = ({ dataListId, value, viewMode = DataListViewModes.ImageAndDescription }) => {
8
8
  const [dataListItem, setDataListItem] = useState();
9
9
  useEffect(() => {
10
- if (!dataListId || dataListId <= 0) {
10
+ if (!dataListId || dataListId <= 0 || !value || value.length <= 0) {
11
11
  setDataListItem(undefined);
12
12
  return;
13
13
  }
14
- value && DataListCacheService.GetAsync(dataListId).then((dl) => {
15
- if (value.length > 0) {
16
- setDataListItem(dl?.items?.find(o => o.value == value));
17
- }
18
- });
14
+ DataListCacheService.GetAsync(dataListId).then((dl) => { setDataListItem(dl?.items?.find(o => o.value == value)); });
19
15
  }, [dataListId, value]);
20
16
  let showIcon = viewMode != DataListViewModes.Description;
21
17
  return (_jsxs(StyledDivHorizontal, { children: [showIcon && dataListItem && _jsx(TMTooltip, { content: dataListItem.value, children: _jsx(TMImageLibrary, { imageID: dataListItem.imageID }) }), _jsx("p", { style: { textAlign: 'left', marginLeft: showIcon ? '5px' : '' }, children: dataListItem?.name })] }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.6.27",
3
+ "version": "6.6.29",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",