@topconsultnpm/sdkui-react-beta 6.13.43 → 6.13.45
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/features/documents/TMDcmtForm.js +1 -1
- package/lib/components/features/search/TMSavedQuerySelector.js +1 -1
- package/lib/components/features/search/TMSearch.js +151 -83
- package/lib/components/features/search/TMSearchQueryEditor.js +1 -1
- package/lib/components/layout/panel/TMPanelContext.d.ts +1 -1
- package/lib/components/layout/panel/TMPanelContext.js +2 -2
- package/lib/components/layout/panel/TMPanelToolbar.js +2 -2
- package/lib/components/layout/panel/useResizablePanels.js +2 -2
- package/lib/components/viewers/TMMidViewer.d.ts +5 -2
- package/lib/components/viewers/TMMidViewer.js +9 -9
- package/lib/utils/theme.d.ts +1 -0
- package/lib/utils/theme.js +1 -0
- package/package.json +2 -2
@@ -454,7 +454,7 @@ const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes
|
|
454
454
|
gap: SDKUI_Globals.userSettings.themeSettings.gutters,
|
455
455
|
width: '100%',
|
456
456
|
height: '100%',
|
457
|
-
}, children: [_jsx("div", { style: { flex: 1, minWidth: 0, height: '100%' }, children: _jsxs(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: useWaitPanelLocalState ? showWaitPanelLocal : showWaitPanel, showWaitPanelPrimary: useWaitPanelLocalState ? showPrimaryLocal : showPrimary, showWaitPanelSecondary: useWaitPanelLocalState ? showSecondaryLocal : showSecondary, waitPanelTitle: useWaitPanelLocalState ? waitPanelTitleLocal : waitPanelTitle, waitPanelTextPrimary: useWaitPanelLocalState ? waitPanelTextPrimaryLocal : waitPanelTextPrimary, waitPanelValuePrimary: useWaitPanelLocalState ? waitPanelValuePrimaryLocal : waitPanelValuePrimary, waitPanelMaxValuePrimary: useWaitPanelLocalState ? waitPanelMaxValuePrimaryLocal : waitPanelMaxValuePrimary, waitPanelTextSecondary: useWaitPanelLocalState ? waitPanelTextSecondaryLocal : waitPanelTextSecondary, waitPanelValueSecondary: useWaitPanelLocalState ? waitPanelValueSecondaryLocal : waitPanelValueSecondary, waitPanelMaxValueSecondary: useWaitPanelLocalState ? waitPanelMaxValueSecondaryLocal : waitPanelMaxValueSecondary, isCancelable: useWaitPanelLocalState ? dcmtFile ? dcmtFile.size >= 1000000 : false : true, abortController: useWaitPanelLocalState ? abortControllerLocal : abortController, children: [_jsxs(TMSplitterLayout, { direction: 'horizontal', overflow: 'visible', separatorSize: SDKUI_Globals.userSettings.themeSettings.gutters, separatorColor: 'transparent', showSeparator: (isOpenPreview || isOpenMiddlePanel()) && deviceType !== DeviceType.MOBILE && isOpenDcmtForm, start: getPrimarySplitterStartLayout(), min: deviceType !== DeviceType.MOBILE && isOpenDcmtForm ? ['150px', '0'] : ['0', '0'], children: [_jsx(TMLayoutItem, { children: _jsx(TMPanel, { showHeader: showHeader, title: fromDTD?.nameLoc, toolbar: allowNavigation ? formToolbar : _jsx(_Fragment, {}), onBack: isClosable && deviceType !== DeviceType.MOBILE ? undefined : handleClose, onClose: isClosable ? handleClose : undefined, children: metadataValuesSource.length > 0 && _jsxs(StyledToolbarCardContainer, { children: [_jsx(TMMetadataValues, { TID: TID, metadataValues: metadataValuesSource, metadataValuesOrig: metadataValuesSourceOrig, isExpertMode: isExpertMode, isOpenDistinctValues: isOpenDistinctValues, openChooserBySingleClick: !isOpenDistinctValues, selectedMID: focusedMetadataValue?.mid, layoutMode: layoutMode, deviceType: deviceType, validationItems: validationItems, onFocusedItemChanged: (item) => { (item?.mid !== focusedMetadataValue?.mid) && setFocusedMetadataValue(item); }, onValueChanged: (newItems) => {
|
457
|
+
}, children: [_jsx("div", { style: { flex: 1, minWidth: 0, height: '100%' }, children: _jsxs(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: useWaitPanelLocalState ? showWaitPanelLocal : showWaitPanel, showWaitPanelPrimary: useWaitPanelLocalState ? showPrimaryLocal : showPrimary, showWaitPanelSecondary: useWaitPanelLocalState ? showSecondaryLocal : showSecondary, waitPanelTitle: useWaitPanelLocalState ? waitPanelTitleLocal : waitPanelTitle, waitPanelTextPrimary: useWaitPanelLocalState ? waitPanelTextPrimaryLocal : waitPanelTextPrimary, waitPanelValuePrimary: useWaitPanelLocalState ? waitPanelValuePrimaryLocal : waitPanelValuePrimary, waitPanelMaxValuePrimary: useWaitPanelLocalState ? waitPanelMaxValuePrimaryLocal : waitPanelMaxValuePrimary, waitPanelTextSecondary: useWaitPanelLocalState ? waitPanelTextSecondaryLocal : waitPanelTextSecondary, waitPanelValueSecondary: useWaitPanelLocalState ? waitPanelValueSecondaryLocal : waitPanelValueSecondary, waitPanelMaxValueSecondary: useWaitPanelLocalState ? waitPanelMaxValueSecondaryLocal : waitPanelMaxValueSecondary, isCancelable: useWaitPanelLocalState ? dcmtFile ? dcmtFile.size >= 1000000 : false : true, abortController: useWaitPanelLocalState ? abortControllerLocal : abortController, children: [_jsxs(TMSplitterLayout, { direction: 'horizontal', overflow: 'visible', separatorSize: SDKUI_Globals.userSettings.themeSettings.gutters, separatorColor: 'transparent', showSeparator: (isOpenPreview || isOpenMiddlePanel()) && deviceType !== DeviceType.MOBILE && isOpenDcmtForm, start: getPrimarySplitterStartLayout(), min: deviceType !== DeviceType.MOBILE && isOpenDcmtForm ? ['150px', '0'] : ['0', '0'], children: [_jsx(TMLayoutItem, { children: _jsx(TMPanel, { showHeader: showHeader, title: fromDTD?.nameLoc, toolbar: allowNavigation ? formToolbar : _jsx(_Fragment, {}), onBack: (isClosable && deviceType !== DeviceType.MOBILE) ? undefined : handleClose, onClose: isClosable ? handleClose : undefined, children: metadataValuesSource.length > 0 && _jsxs(StyledToolbarCardContainer, { children: [_jsx(TMMetadataValues, { TID: TID, metadataValues: metadataValuesSource, metadataValuesOrig: metadataValuesSourceOrig, isExpertMode: isExpertMode, isOpenDistinctValues: isOpenDistinctValues, openChooserBySingleClick: !isOpenDistinctValues, selectedMID: focusedMetadataValue?.mid, layoutMode: layoutMode, deviceType: deviceType, validationItems: validationItems, onFocusedItemChanged: (item) => { (item?.mid !== focusedMetadataValue?.mid) && setFocusedMetadataValue(item); }, onValueChanged: (newItems) => {
|
458
458
|
setFormData((prevItems) => prevItems.map((item) => {
|
459
459
|
const newItem = newItems.find((newItem) => newItem.tid === item.tid && newItem.mid === item.mid);
|
460
460
|
return newItem ? { ...item, ...newItem } : item;
|
@@ -65,7 +65,7 @@ const getSharingModeColor = (sharingMode) => {
|
|
65
65
|
export const getTooltipBySqd = (sqd) => {
|
66
66
|
if (!sqd)
|
67
67
|
return null;
|
68
|
-
return (_jsxs("div", { style: { textAlign: "left" }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 10 }, children: [_jsx(IconSavedQuery, { color: getSharingModeColor(sqd.sharingMode), fontSize: 20, style: { flexShrink: 0 } }), _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 2 }, children: [_jsxs("div", { children: ["ID: ", sqd.id] }), _jsxs("div", { children: ["Master TID: ", sqd.masterTID] }), sqd.description && _jsx("div", { children: `${SDKUI_Localizator.Description}: ${sqd.description}` })] })] }), _jsx("hr", {}), _jsxs("div", { children: [SDKUI_Localizator.OwnerName, ": ", sqd.ownerName, " (", sqd.ownerID, ")"] }), _jsx("div", { children: LocalizeSharingModes(sqd.sharingMode) }), _jsxs("div", { children: ["Default: ", sqd.isDefault == 1 ? SDKUI_Localizator.Yes : SDKUI_Localizator.No] }), _jsxs("div", { children: ["Filtro semplice", ": ", sqd.isEasyWhere == 1 ? SDKUI_Localizator.Yes : SDKUI_Localizator.No] }), _jsxs("div", { children: ["Esegui ricerca immediatamente", ": ", sqd.runSearchWhenSelected == 1 ? SDKUI_Localizator.Yes : SDKUI_Localizator.No] }), _jsx("hr", {}), _jsxs("div", { children: [SDKUI_Localizator.CreationTime, ": ", Globalization.getDateTimeDisplayValue(sqd.creationTime)] }), _jsxs("div", { children: [SDKUI_Localizator.LastUpdateTime, ": ", Globalization.getDateTimeDisplayValue(sqd.lastUpdateTime)] })] }));
|
68
|
+
return (_jsxs("div", { style: { textAlign: "left", fontSize: '1rem', color: TMColors.primaryColor }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 10 }, children: [_jsx(IconSavedQuery, { color: getSharingModeColor(sqd.sharingMode), fontSize: 20, style: { flexShrink: 0 } }), _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 2 }, children: [_jsxs("div", { children: ["ID: ", sqd.id] }), _jsxs("div", { children: ["Master TID: ", sqd.masterTID] }), sqd.description && _jsx("div", { children: `${SDKUI_Localizator.Description}: ${sqd.description}` })] })] }), _jsx("hr", {}), _jsxs("div", { children: [SDKUI_Localizator.OwnerName, ": ", sqd.ownerName, " (", sqd.ownerID, ")"] }), _jsx("div", { children: LocalizeSharingModes(sqd.sharingMode) }), _jsxs("div", { children: ["Default: ", sqd.isDefault == 1 ? SDKUI_Localizator.Yes : SDKUI_Localizator.No] }), _jsxs("div", { children: ["Filtro semplice", ": ", sqd.isEasyWhere == 1 ? SDKUI_Localizator.Yes : SDKUI_Localizator.No] }), _jsxs("div", { children: ["Esegui ricerca immediatamente", ": ", sqd.runSearchWhenSelected == 1 ? SDKUI_Localizator.Yes : SDKUI_Localizator.No] }), _jsx("hr", {}), _jsxs("div", { children: [SDKUI_Localizator.CreationTime, ": ", Globalization.getDateTimeDisplayValue(sqd.creationTime)] }), _jsxs("div", { children: [SDKUI_Localizator.LastUpdateTime, ": ", Globalization.getDateTimeDisplayValue(sqd.lastUpdateTime)] })] }));
|
69
69
|
};
|
70
70
|
const initialSQDsMaxItems = 12;
|
71
71
|
const SavedQueryContexMenu = ({ sqd, manageDefault, isMobile, deleteAsync, favManageAsync, setDefaultAsync, setInfoSQD }) => _jsx(ContextMenu, { items: [
|
@@ -1,17 +1,20 @@
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import { useCallback, useEffect, useState } from 'react';
|
2
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
3
3
|
import { SavedQueryCacheService, DcmtTypeListCacheService, SDK_Localizator } from '@topconsultnpm/sdk-ts-beta';
|
4
4
|
import TMSavedQuerySelector from './TMSavedQuerySelector';
|
5
5
|
import TMTreeSelector from './TMTreeSelector';
|
6
6
|
import { TabPanel, Item } from 'devextreme-react/tab-panel';
|
7
7
|
import TMSearchQueryPanel, { refreshLastSearch } from './TMSearchQueryPanel';
|
8
|
-
import { getSysAllDcmtsSQD,
|
8
|
+
import { getSysAllDcmtsSQD, IconFilter, IconInfo, IconRecentlyViewed, IconSavedQuery, IconTree, SDKUI_Globals, SDKUI_Localizator } from '../../../helper';
|
9
9
|
import TMSearchResult from './TMSearchResult';
|
10
10
|
import TMRecentsManager from '../../grids/TMRecentsManager';
|
11
11
|
import { SearchResultContext } from '../../../ts';
|
12
12
|
import { useDeviceType, DeviceType } from '../../base/TMDeviceProvider';
|
13
13
|
import { StyledMultiViewPanel } from '../../base/Styled';
|
14
|
-
import
|
14
|
+
import { TMPanelManagerContextProvider, useTMPanelContext } from '../../layout/panel/TMPanelContext';
|
15
|
+
import { TMPanelToolbar } from '../../layout/panel/TMPanelToolbar';
|
16
|
+
import { useResizablePanels } from '../../layout/panel/useResizablePanels';
|
17
|
+
import TMPanel from '../../base/TMPanel';
|
15
18
|
var TMSearchViews;
|
16
19
|
(function (TMSearchViews) {
|
17
20
|
TMSearchViews[TMSearchViews["Search"] = 0] = "Search";
|
@@ -118,18 +121,18 @@ const TMSearch = ({ inputTID, inputSqdID, isExpertMode = SDKUI_Globals.userSetti
|
|
118
121
|
await setSqdAsync?.(sqdToBeSet);
|
119
122
|
}, []);
|
120
123
|
const isMobile = deviceType === DeviceType.MOBILE;
|
121
|
-
const renderTMTreeSelector = (handleTogglePanel) => _jsx(TMTreeSelector, { onClosePanel: () => handleTogglePanel('TMTreeSelector'), onSelectedTIDChanged: (tid) => {
|
124
|
+
const renderTMTreeSelector = (handleTogglePanel) => _jsx(TMTreeSelector, { onClosePanel: () => handleTogglePanel?.('TMTreeSelector'), onSelectedTIDChanged: (tid) => {
|
122
125
|
setCurrentTID(tid);
|
123
126
|
if (tid && mruTIDs.includes(tid))
|
124
127
|
setCurrentMruTID(tid);
|
125
128
|
else
|
126
129
|
setCurrentMruTID(0);
|
127
|
-
isMobile && handleTogglePanel('TMSearchQueryPanel');
|
130
|
+
isMobile && handleTogglePanel?.('TMSearchQueryPanel');
|
128
131
|
} });
|
129
132
|
const renderTMRecentsManager = (handleTogglePanel) => _jsx(TMRecentsManager, { mruTIDs: mruTIDs, currentMruTID: currentMruTID, deviceType: deviceType, onSelectedTID: (tid) => {
|
130
133
|
setCurrentMruTID(tid);
|
131
134
|
setCurrentTID(tid);
|
132
|
-
isMobile && handleTogglePanel('TMSearchQueryPanel');
|
135
|
+
isMobile && handleTogglePanel?.('TMSearchQueryPanel');
|
133
136
|
}, onDeletedTID: (tid) => {
|
134
137
|
let newMruTIDS = mruTIDs.slice();
|
135
138
|
let index = newMruTIDS.findIndex(o => o == tid);
|
@@ -162,90 +165,155 @@ const TMSearch = ({ inputTID, inputSqdID, isExpertMode = SDKUI_Globals.userSetti
|
|
162
165
|
} });
|
163
166
|
const renderTMSavedQuerySelector = (handleTogglePanel) => _jsxs(TabPanel, { width: "100%", height: "100%", showNavButtons: true, repaintChangesOnly: true, selectedIndex: currentSQDMode, onSelectedIndexChange: (index) => setCurrentSQDMode(index), children: [(currentTID || currentSQD) ? _jsx(Item, { title: fromDTD?.nameLoc, children: _jsx(TMSavedQuerySelector, { allowShowSearch: false, items: filteredByTIDSQDs, selectedId: currentSQD?.id, onRefreshData: () => { loadDataSQDsAsync(true); }, onItemClick: (sqd) => {
|
164
167
|
onSQDItemClick(sqd, setSQDAsync);
|
165
|
-
isMobile && handleTogglePanel('TMSearchQueryPanel');
|
168
|
+
isMobile && handleTogglePanel?.('TMSearchQueryPanel');
|
166
169
|
}, onDeleted: (sqd) => onSQDDeleted(sqd, sqd.id == currentSQD?.id ? filteredByTIDSQDs.find(o => o.id == 1) : currentSQD, setSQDAsync) }) }) : _jsx(_Fragment, {}), _jsx(Item, { title: SDKUI_Localizator.Alls2, children: _jsx(TMSavedQuerySelector, { allowShowSearch: true, items: allSQDs, manageDefault: false,
|
167
170
|
// selectedId={currentSQD?.id}
|
168
171
|
onItemClick: (sqd) => {
|
169
172
|
onSQDItemClick(sqd, setSQDAsync);
|
170
|
-
isMobile && handleTogglePanel('TMSearchQueryPanel');
|
173
|
+
isMobile && handleTogglePanel?.('TMSearchQueryPanel');
|
171
174
|
}, onDeleted: (sqd) => onSQDDeleted(sqd, sqd.id == currentSQD?.id ? undefined : currentSQD, setSQDAsync) }) })] });
|
172
|
-
|
173
|
-
{
|
174
|
-
id: 'TMTreeSelector',
|
175
|
-
name: SDK_Localizator.Trees,
|
176
|
-
toolbarOptions: { icon: _jsx(IconTree, { fontSize: 24 }), visible: true, isActive: true, orderNumber: 1 },
|
177
|
-
type: 'content',
|
178
|
-
contentOptions: {
|
179
|
-
visible: true,
|
180
|
-
height: '100%',
|
181
|
-
width: '20%',
|
182
|
-
content: renderTMTreeSelector,
|
183
|
-
},
|
184
|
-
},
|
185
|
-
{
|
186
|
-
id: 'TMRecentsManager',
|
187
|
-
name: "Scorciatoie",
|
188
|
-
toolbarOptions: { icon: _jsx(IconRecentlyViewed, { fontSize: 24 }), visible: true, isActive: true, orderNumber: 2 },
|
189
|
-
type: 'content',
|
190
|
-
contentOptions: {
|
191
|
-
visible: true,
|
192
|
-
height: '100%',
|
193
|
-
width: '20%',
|
194
|
-
content: (handleTogglePanel) => renderTMRecentsManager(handleTogglePanel),
|
195
|
-
panelContainer: {
|
196
|
-
title: "Scorciatoie",
|
197
|
-
totalItems: mruTIDs.length,
|
198
|
-
allowMaximize: !isMobile
|
199
|
-
},
|
200
|
-
},
|
201
|
-
},
|
202
|
-
{
|
203
|
-
id: 'TMSearchQueryPanel',
|
204
|
-
name: SDK_Localizator.QueryWhere,
|
205
|
-
toolbarOptions: { icon: _jsx(IconFilter, { fontSize: 24 }), visible: true, isActive: true, orderNumber: 3 },
|
206
|
-
type: 'content',
|
207
|
-
contentOptions: {
|
208
|
-
visible: true,
|
209
|
-
height: '100%',
|
210
|
-
width: '40%',
|
211
|
-
content: renderTMSearchQueryPanel,
|
212
|
-
},
|
213
|
-
},
|
214
|
-
{
|
215
|
-
id: 'TMSavedQuerySelector',
|
216
|
-
name: SDK_Localizator.SavedQueries,
|
217
|
-
toolbarOptions: { icon: _jsx(IconSavedQuery, { fontSize: 24 }), visible: true, isActive: true, orderNumber: 4 },
|
218
|
-
type: 'content',
|
219
|
-
contentOptions: {
|
220
|
-
visible: true,
|
221
|
-
height: '100%',
|
222
|
-
width: '20%',
|
223
|
-
content: renderTMSavedQuerySelector,
|
224
|
-
panelContainer: {
|
225
|
-
title: SDK_Localizator.SavedQueries,
|
226
|
-
allowMaximize: !isMobile
|
227
|
-
},
|
228
|
-
},
|
229
|
-
},
|
230
|
-
{
|
231
|
-
id: 'goToResult',
|
232
|
-
name: 'Vai a risultato',
|
233
|
-
toolbarOptions: {
|
234
|
-
icon: _jsx(IconArrowRight, { fontSize: 24 }),
|
235
|
-
visible: searchResult.length > 0,
|
236
|
-
isActive: searchResult.length > 0,
|
237
|
-
orderNumber: 5,
|
238
|
-
beginGroup: true
|
239
|
-
},
|
240
|
-
type: 'button',
|
241
|
-
buttonOptions: {
|
242
|
-
onClick: () => setCurrentSearchView(TMSearchViews.Result),
|
243
|
-
},
|
244
|
-
},
|
245
|
-
];
|
246
|
-
return (_jsxs(_Fragment, { children: [_jsx(StyledMultiViewPanel, { "$isVisible": currentSearchView === TMSearchViews.Search, children: _jsx(TMPanelManager, { panels: panelsConfig, initialMobilePanelId: 'TMRecentsManager', toolbarMode: 1 }) }), searchResult.length > 0 &&
|
175
|
+
return (_jsxs(_Fragment, { children: [_jsx(StyledMultiViewPanel, { "$isVisible": currentSearchView === TMSearchViews.Search, children: _jsx(TMPanelManagerContextProvider, { panels: panels, initialMobilePanelId: "TMRecentsManager", children: _jsx(TMSearchPanelContent, { isMobile: isMobile, panelTMTreeSelector: renderTMTreeSelector, panelTMRecentsManager: renderTMRecentsManager, panelTMSearchQueryPanel: renderTMSearchQueryPanel(), panelTMSavedQuerySelector: renderTMSavedQuerySelector }) }) }), searchResult.length > 0 &&
|
247
176
|
_jsx(TMSearchResult, { isVisible: currentSearchView === TMSearchViews.Result, context: SearchResultContext.METADATA_SEARCH, searchResults: searchResult, onRefreshAfterAddDcmtToFavs: onRefreshAfterAddDcmtToFavs, onRefreshSearchAsync: async () => {
|
248
177
|
setSearchResult(await refreshLastSearch(lastQdSearched) ?? []);
|
249
178
|
}, onTaskCreateRequest: onTaskCreateRequest, onClose: () => { setCurrentSearchView(TMSearchViews.Search); } })] }));
|
250
179
|
};
|
180
|
+
const TMSearchPanelContent = ({ isMobile, panelTMTreeSelector, panelTMRecentsManager, panelTMSearchQueryPanel, panelTMSavedQuerySelector }) => {
|
181
|
+
const gutters = SDKUI_Globals.userSettings.themeSettings.gutters;
|
182
|
+
const { visibility, maximizedPanelId, getPanelDimensions, togglePanel, toggleMaximizePanel, setPanelDisabledById, setPanelVisibility, hasVisiblePanels } = useTMPanelContext();
|
183
|
+
const containerRef = useRef(null);
|
184
|
+
const { onMouseDown } = useResizablePanels(containerRef);
|
185
|
+
const { width: widthPanel1, height: heightPanel1 } = getPanelDimensions('TMTreeSelector');
|
186
|
+
const { width: widthPanel2, height: heightPanel2 } = getPanelDimensions('TMRecentsManager');
|
187
|
+
const { width: widthPanel3, height: heightPanel3 } = getPanelDimensions('TMSearchQueryPanel');
|
188
|
+
const { width: widthPanel4, height: heightPanel4 } = getPanelDimensions('TMSavedQuerySelector');
|
189
|
+
return (_jsxs("div", { style: { display: 'flex', height: '100%', width: '100%', flexDirection: isMobile ? 'column' : 'row', gap: gutters }, children: [_jsx("div", { style: {
|
190
|
+
display: 'flex',
|
191
|
+
flexGrow: 1,
|
192
|
+
width: `calc(100% - ${isMobile ? 0 : 70}px)`,
|
193
|
+
height: `calc(100% - ${isMobile ? 55 : 0}px)`,
|
194
|
+
flexDirection: 'row'
|
195
|
+
}, children: _jsxs("div", { style: { width: '100%', height: '100%' }, children: [_jsxs("div", { ref: containerRef, style: {
|
196
|
+
display: hasVisiblePanels() ? 'flex' : 'none',
|
197
|
+
width: '100%',
|
198
|
+
height: '100%',
|
199
|
+
}, children: [_jsx("div", { style: {
|
200
|
+
display: visibility.TMTreeSelector ? 'block' : 'none',
|
201
|
+
width: widthPanel1,
|
202
|
+
height: heightPanel1,
|
203
|
+
overflow: 'hidden',
|
204
|
+
}, children: panelTMTreeSelector(() => togglePanel('TMSearchQueryPanel')) }), visibility.TMTreeSelector && visibility.TMRecentsManager && maximizedPanelId === null && (_jsx("div", { style: {
|
205
|
+
background: 'transparent',
|
206
|
+
cursor: 'col-resize',
|
207
|
+
width: `${gutters}px`,
|
208
|
+
height: '100%',
|
209
|
+
userSelect: 'none',
|
210
|
+
}, onMouseDown: (e) => onMouseDown(e, 'TMTreeSelector', 'TMRecentsManager', true) })), _jsx("div", { style: {
|
211
|
+
display: visibility.TMRecentsManager ? 'block' : 'none',
|
212
|
+
width: widthPanel2,
|
213
|
+
height: heightPanel2,
|
214
|
+
overflow: 'hidden',
|
215
|
+
}, children: _jsx(TMPanel, { title: 'Scorciatoie', onClose: () => togglePanel('TMRecentsManager'), onMaximize: () => toggleMaximizePanel('TMRecentsManager'), onHeaderDoubleClick: () => toggleMaximizePanel('TMRecentsManager'), allowMaximize: !isMobile, children: panelTMRecentsManager(() => togglePanel('TMSearchQueryPanel')) }) }), visibility.TMRecentsManager && visibility.TMSearchQueryPanel && maximizedPanelId === null && (_jsx("div", { style: {
|
216
|
+
background: 'transparent',
|
217
|
+
cursor: 'col-resize',
|
218
|
+
width: `${gutters}px`,
|
219
|
+
height: '100%',
|
220
|
+
userSelect: 'none',
|
221
|
+
}, onMouseDown: (e) => onMouseDown(e, 'TMRecentsManager', 'TMSearchQueryPanel', true) })), _jsx("div", { style: {
|
222
|
+
display: visibility.TMSearchQueryPanel ? 'block' : 'none',
|
223
|
+
width: widthPanel3,
|
224
|
+
height: heightPanel3,
|
225
|
+
overflow: 'hidden',
|
226
|
+
}, children: panelTMSearchQueryPanel }), visibility.TMSearchQueryPanel && visibility.TMSavedQuerySelector && maximizedPanelId === null && (_jsx("div", { style: {
|
227
|
+
background: 'transparent',
|
228
|
+
cursor: 'col-resize',
|
229
|
+
width: `${gutters}px`,
|
230
|
+
height: '100%',
|
231
|
+
userSelect: 'none',
|
232
|
+
}, onMouseDown: (e) => onMouseDown(e, 'TMSearchQueryPanel', 'TMSavedQuerySelector', true) })), _jsx("div", { style: {
|
233
|
+
display: visibility.TMSavedQuerySelector ? 'block' : 'none',
|
234
|
+
width: widthPanel4,
|
235
|
+
height: heightPanel4,
|
236
|
+
overflow: 'hidden',
|
237
|
+
}, children: _jsx(TMPanel, { title: SDK_Localizator.SavedQueries, onClose: () => togglePanel('TMSavedQuerySelector'), onMaximize: () => toggleMaximizePanel('TMSavedQuerySelector'), onHeaderDoubleClick: () => toggleMaximizePanel('TMSavedQuerySelector'), allowMaximize: !isMobile, children: panelTMSavedQuerySelector(() => togglePanel('TMSearchQueryPanel')) }) })] }), _jsxs("div", { style: {
|
238
|
+
display: hasVisiblePanels() ? 'none' : 'flex',
|
239
|
+
flexDirection: 'column',
|
240
|
+
width: '100%',
|
241
|
+
height: '100%',
|
242
|
+
justifyContent: 'center',
|
243
|
+
alignItems: 'center',
|
244
|
+
fontSize: '1.5rem',
|
245
|
+
fontWeight: 'bold',
|
246
|
+
color: '#888',
|
247
|
+
backgroundColor: '#fff',
|
248
|
+
borderRadius: '10px'
|
249
|
+
}, children: [_jsx(IconInfo, { style: { fontSize: 50 } }), _jsx("div", { children: SDKUI_Localizator.NoPanelSelected })] })] }) }), _jsx("div", { style: {
|
250
|
+
display: 'flex',
|
251
|
+
flexDirection: isMobile ? 'row' : 'column',
|
252
|
+
alignItems: 'center',
|
253
|
+
width: isMobile ? '100%' : '50px',
|
254
|
+
height: isMobile ? '50px' : 'max-content',
|
255
|
+
background: 'transparent linear-gradient(90deg, #CCE0F4 0%, #7EC1E7 14%, #39A6DB 28%, #1E9CD7 35%, #0075BE 78%, #005B97 99%) 0% 0% no-repeat padding-box',
|
256
|
+
borderRadius: isMobile ? '10px' : '10px 0px 0px 10px',
|
257
|
+
padding: '10px',
|
258
|
+
gap: '10px'
|
259
|
+
}, children: _jsx(TMPanelToolbar, {}) })] }));
|
260
|
+
};
|
251
261
|
export default TMSearch;
|
262
|
+
const panels = [
|
263
|
+
{
|
264
|
+
id: 'TMTreeSelector',
|
265
|
+
name: SDK_Localizator.Trees,
|
266
|
+
children: [],
|
267
|
+
contentOptions: {
|
268
|
+
width: '20%',
|
269
|
+
height: '100%',
|
270
|
+
},
|
271
|
+
toolbarOptions: {
|
272
|
+
icon: _jsx(IconTree, { fontSize: 24 }),
|
273
|
+
visible: true,
|
274
|
+
isActive: true
|
275
|
+
}
|
276
|
+
},
|
277
|
+
{
|
278
|
+
id: 'TMRecentsManager',
|
279
|
+
name: 'Scorciatoie',
|
280
|
+
children: [],
|
281
|
+
contentOptions: {
|
282
|
+
width: '20%',
|
283
|
+
height: '100%',
|
284
|
+
},
|
285
|
+
toolbarOptions: {
|
286
|
+
icon: _jsx(IconRecentlyViewed, { fontSize: 24 }),
|
287
|
+
visible: true,
|
288
|
+
isActive: true
|
289
|
+
}
|
290
|
+
},
|
291
|
+
{
|
292
|
+
id: 'TMSearchQueryPanel',
|
293
|
+
name: SDK_Localizator.QueryWhere,
|
294
|
+
children: [],
|
295
|
+
contentOptions: {
|
296
|
+
width: '40%',
|
297
|
+
height: '100%',
|
298
|
+
},
|
299
|
+
toolbarOptions: {
|
300
|
+
icon: _jsx(IconFilter, { fontSize: 24 }),
|
301
|
+
visible: false,
|
302
|
+
isActive: true
|
303
|
+
}
|
304
|
+
},
|
305
|
+
{
|
306
|
+
id: 'TMSavedQuerySelector',
|
307
|
+
name: SDK_Localizator.SavedQueries,
|
308
|
+
children: [],
|
309
|
+
contentOptions: {
|
310
|
+
width: '20%',
|
311
|
+
height: '100%',
|
312
|
+
},
|
313
|
+
toolbarOptions: {
|
314
|
+
icon: _jsx(IconSavedQuery, { fontSize: 24 }),
|
315
|
+
visible: true,
|
316
|
+
isActive: true
|
317
|
+
}
|
318
|
+
},
|
319
|
+
];
|
@@ -187,7 +187,7 @@ const TMSearchQueryEditor = ({ qd, fromDTD, dcmtTypesList = [], isOpenDistinctVa
|
|
187
187
|
}, onWhereItemChange: (newWi) => { handleWhereItemChanged(newWi); }, onHideEditor: () => { setCurrentEditingMID(0); } }) }, `${wi.tid}_${wi.mid}_${index}`))) })
|
188
188
|
:
|
189
189
|
_jsx("div", { style: { display: 'grid', borderRadius: '8px', alignItems: 'center', overflow: 'auto', padding: '5px', gap: '8px', gridTemplateColumns: 'minmax(0, max-content) minmax(0, max-content) minmax(50%, 1fr)' }, children: qd?.where?.slice(0, showAllMdWhere ? qd?.where.length : initialMaxItems).map((whereItem, index) => {
|
190
|
-
return (_jsxs(React.Fragment, { children: [_jsx("div", { id: `wi-item-${whereItem.mid}`, style: { gridColumn: 1 }, children: _jsx(TMMidViewer, { isMetadataSelected: showDistinctValuesPanel && whereItem.mid === focusedTidMid?.mid, showIcon: true, tid_mid: { tid: whereItem?.tid, mid: whereItem?.mid, aliasTID: whereItem?.alias } }) }), _jsx("div", { style: { gridColumn: 2, paddingLeft: '5px', paddingRight: '5px' }, children: _jsx(TMDropDownMenu, { backgroundColor: colorOperator, color: getOperatorColor(whereItem), items: getQueryOperatorsMenuItems(whereItem, index), content: _jsx(StyledItemWrapper, { children: LocalizeQueryOperators(whereItem.operator) }) }) }), _jsxs("div", { style: { gridColumn: 3, position: 'relative' }, onClick: () => { handleMetadataSelection(whereItem.tid, whereItem.mid); }, onFocus: () => { handleMetadataSelection(whereItem.tid, whereItem.mid); }, children: [_jsx(TMSearchWhereItemEditor, { isSelected: showDistinctValuesPanel && whereItem.mid === focusedTidMid?.mid, openChooserBySingleClick: !showDistinctValuesPanel, whereItem: whereItem, index: index, isEditableList: isEditableList(whereItem.mid), queryParamsDynDataList: dynDataListsToBeRefreshed.find(o => o.mid == whereItem.mid)?.queryParams ?? [], onValueChanged: (values) => {
|
190
|
+
return (_jsxs(React.Fragment, { children: [_jsx("div", { id: `wi-item-${whereItem.mid}`, style: { gridColumn: 1 }, children: _jsx(TMMidViewer, { color: TMColors.primaryColor, isMetadataSelected: showDistinctValuesPanel && whereItem.mid === focusedTidMid?.mid, showIcon: true, tid_mid: { tid: whereItem?.tid, mid: whereItem?.mid, aliasTID: whereItem?.alias } }) }), _jsx("div", { style: { gridColumn: 2, paddingLeft: '5px', paddingRight: '5px' }, children: _jsx(TMDropDownMenu, { backgroundColor: colorOperator, color: getOperatorColor(whereItem), items: getQueryOperatorsMenuItems(whereItem, index), content: _jsx(StyledItemWrapper, { children: LocalizeQueryOperators(whereItem.operator) }) }) }), _jsxs("div", { style: { gridColumn: 3, position: 'relative' }, onClick: () => { handleMetadataSelection(whereItem.tid, whereItem.mid); }, onFocus: () => { handleMetadataSelection(whereItem.tid, whereItem.mid); }, children: [_jsx(TMSearchWhereItemEditor, { isSelected: showDistinctValuesPanel && whereItem.mid === focusedTidMid?.mid, openChooserBySingleClick: !showDistinctValuesPanel, whereItem: whereItem, index: index, isEditableList: isEditableList(whereItem.mid), queryParamsDynDataList: dynDataListsToBeRefreshed.find(o => o.mid == whereItem.mid)?.queryParams ?? [], onValueChanged: (values) => {
|
191
191
|
handleWhereItemChanged({ ...whereItem, value1: values[0], value2: values[1] });
|
192
192
|
}, onCascadeRefreshDynDataLists: (ddlToBeRefreshed) => {
|
193
193
|
let newDynDataListsToBeRefreshed = [];
|
@@ -35,7 +35,7 @@ interface ITMPanelManagerContext {
|
|
35
35
|
setPanelDisabledById: (id: string, disabled: boolean) => void;
|
36
36
|
hasVisiblePanels: () => boolean;
|
37
37
|
}
|
38
|
-
export declare function
|
38
|
+
export declare function useTMPanelContext(): ITMPanelManagerContext;
|
39
39
|
interface TMPanelContextProviderProps {
|
40
40
|
panels: Array<TMPanelManagerItemContext>;
|
41
41
|
initialMobilePanelId: string;
|
@@ -4,10 +4,10 @@ import { DeviceType, useDeviceType } from '../../base/TMDeviceProvider';
|
|
4
4
|
// Creazione del context
|
5
5
|
const TMPanelManagerContext = createContext(undefined);
|
6
6
|
// Hook custom per accedere al context
|
7
|
-
export function
|
7
|
+
export function useTMPanelContext() {
|
8
8
|
const context = useContext(TMPanelManagerContext);
|
9
9
|
if (!context) {
|
10
|
-
throw new Error('
|
10
|
+
throw new Error('useTMPanelContext must be used within a TMPanelContextProvider');
|
11
11
|
}
|
12
12
|
return context;
|
13
13
|
}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
import { useMemo } from 'react';
|
3
|
-
import {
|
3
|
+
import { useTMPanelContext } from './TMPanelContext';
|
4
4
|
import styled from 'styled-components';
|
5
5
|
import { DeviceType, useDeviceType } from '../../base/TMDeviceProvider';
|
6
6
|
import TMTooltip from '../../base/TMTooltip';
|
7
7
|
export const TMPanelToolbar = () => {
|
8
|
-
const { panelTree, togglePanel, calculateEffectiveVisibility } =
|
8
|
+
const { panelTree, togglePanel, calculateEffectiveVisibility } = useTMPanelContext();
|
9
9
|
const deviceType = useDeviceType();
|
10
10
|
let isMobile = useMemo(() => { return deviceType === DeviceType.MOBILE; }, [deviceType]);
|
11
11
|
// Ricorsivamente trova tutti i pannelli parent (hanno figli)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { useRef, useCallback } from 'react';
|
2
|
-
import {
|
2
|
+
import { useTMPanelContext } from './TMPanelContext';
|
3
3
|
export function useResizablePanels(containerRef) {
|
4
|
-
const { getPanelDimensions, updatePanelSize } =
|
4
|
+
const { getPanelDimensions, updatePanelSize } = useTMPanelContext();
|
5
5
|
const resizingRef = useRef(null);
|
6
6
|
const getSizePercent = useCallback((panelId, isRow) => {
|
7
7
|
const dim = getPanelDimensions(panelId);
|
@@ -2,9 +2,10 @@ import React from 'react';
|
|
2
2
|
import { ITopMediaSession, LayoutModes, MetadataDescriptor } from '@topconsultnpm/sdk-ts-beta';
|
3
3
|
import { TID_MID } from '../../ts';
|
4
4
|
import { DataGridTypes } from 'devextreme-react/cjs/data-grid';
|
5
|
-
export declare const TMMidViewer: ({ isMetadataSelected, tmSession, tid_mid, showCompleteName, showIcon, showId, noneSelectionText }: {
|
5
|
+
export declare const TMMidViewer: ({ isMetadataSelected, color, tmSession, tid_mid, showCompleteName, showIcon, showId, noneSelectionText }: {
|
6
6
|
tmSession?: ITopMediaSession;
|
7
7
|
tid_mid: TID_MID | undefined;
|
8
|
+
color?: string;
|
8
9
|
showCompleteName?: boolean;
|
9
10
|
showIcon?: boolean;
|
10
11
|
showId?: boolean;
|
@@ -14,13 +15,15 @@ export declare const TMMidViewer: ({ isMetadataSelected, tmSession, tid_mid, sho
|
|
14
15
|
interface ITMMetadataIcon {
|
15
16
|
tid: number | undefined;
|
16
17
|
md: MetadataDescriptor | undefined;
|
18
|
+
color?: string;
|
17
19
|
layoutMode?: LayoutModes;
|
18
20
|
isMetadataSelected?: boolean;
|
19
21
|
}
|
20
|
-
export declare const TMMetadataIcon: ({ tid, md, layoutMode, isMetadataSelected }: ITMMetadataIcon) => import("react/jsx-runtime").JSX.Element | null;
|
22
|
+
export declare const TMMetadataIcon: ({ tid, md, color, layoutMode, isMetadataSelected }: ITMMetadataIcon) => import("react/jsx-runtime").JSX.Element | null;
|
21
23
|
interface ITMMetadataTooltip {
|
22
24
|
tid: number | undefined;
|
23
25
|
md: MetadataDescriptor | undefined;
|
26
|
+
color?: string;
|
24
27
|
children?: React.ReactNode;
|
25
28
|
layoutMode?: LayoutModes;
|
26
29
|
}
|
@@ -5,7 +5,7 @@ import { DcmtTypeListCacheService, LayoutModes, MetadataDataDomains, MetadataDat
|
|
5
5
|
import { StyledDivHorizontal, StyledTooltipContainer, StyledTooltipItem, StyledTooltipSeparatorItem } from '../base/Styled';
|
6
6
|
import TMTooltip from '../base/TMTooltip';
|
7
7
|
import { TMColors } from '../../utils/theme';
|
8
|
-
export const TMMidViewer = ({ isMetadataSelected = false, tmSession, tid_mid, showCompleteName, showIcon = false, showId = false, noneSelectionText = `<${SDKUI_Localizator.NoneSelection}>` }) => {
|
8
|
+
export const TMMidViewer = ({ isMetadataSelected = false, color, tmSession, tid_mid, showCompleteName, showIcon = false, showId = false, noneSelectionText = `<${SDKUI_Localizator.NoneSelection}>` }) => {
|
9
9
|
const [md, setMd] = useState();
|
10
10
|
const [dcmtTypeName, setDcmtTypeName] = useState();
|
11
11
|
useEffect(() => {
|
@@ -29,22 +29,22 @@ export const TMMidViewer = ({ isMetadataSelected = false, tmSession, tid_mid, sh
|
|
29
29
|
return (_jsxs(StyledDivHorizontal, { style: {
|
30
30
|
whiteSpace: 'nowrap',
|
31
31
|
overflow: 'hidden',
|
32
|
-
textOverflow: 'ellipsis'
|
33
|
-
|
32
|
+
textOverflow: 'ellipsis',
|
33
|
+
color: md?.isRequired == 1 ? 'red' : color,
|
34
|
+
}, children: [showIcon && _jsx(TMMetadataIcon, { isMetadataSelected: isMetadataSelected, tid: tid_mid?.tid, md: md, color: color }), _jsx("p", { title: displayName(), style: {
|
34
35
|
textAlign: 'left',
|
35
36
|
marginLeft: showIcon ? '5px' : '',
|
36
|
-
color: md?.isRequired == 1 ? 'red' : undefined,
|
37
37
|
whiteSpace: 'nowrap',
|
38
38
|
overflow: 'hidden',
|
39
39
|
textOverflow: 'ellipsis'
|
40
40
|
}, children: displayName() }), showId && _jsx("p", { style: { padding: '0px 3px' }, children: `(MID: ${tid_mid?.mid})` })] }));
|
41
41
|
};
|
42
|
-
export const TMMetadataIcon = ({ tid, md, layoutMode = LayoutModes.Update, isMetadataSelected = false }) => {
|
42
|
+
export const TMMetadataIcon = ({ tid, md, color, layoutMode = LayoutModes.Update, isMetadataSelected = false }) => {
|
43
43
|
let selectedMetadataStyle = { borderBottom: isMetadataSelected ? `thick solid ${TMColors.text_normal}` : 'none', height: 'max-content' };
|
44
44
|
if (!md)
|
45
45
|
return null;
|
46
46
|
let isNumeratorInArk = md.dataDomain === MetadataDataDomains.Numerator && layoutMode === LayoutModes.Ark;
|
47
|
-
let iconColor = md.isRequired === 1 && !isNumeratorInArk ? TMColors.error : TMColors.text_normal;
|
47
|
+
let iconColor = md.isRequired === 1 && !isNumeratorInArk ? TMColors.error : (color ?? TMColors.text_normal);
|
48
48
|
let icon = null;
|
49
49
|
switch (md.dataDomain) {
|
50
50
|
case MetadataDataDomains.Computed:
|
@@ -82,9 +82,9 @@ export const TMMetadataIcon = ({ tid, md, layoutMode = LayoutModes.Update, isMet
|
|
82
82
|
}
|
83
83
|
break;
|
84
84
|
}
|
85
|
-
return (_jsx(_Fragment, { children: icon ? _jsx(TMMetadataTooltip, { tid: tid, md: md, layoutMode: layoutMode, children: icon }) : null }));
|
85
|
+
return (_jsx(_Fragment, { children: icon ? _jsx(TMMetadataTooltip, { tid: tid, md: md, layoutMode: layoutMode, color: color, children: icon }) : null }));
|
86
86
|
};
|
87
|
-
export const TMMetadataTooltip = ({ tid, md, children, layoutMode = LayoutModes.Update }) => {
|
87
|
+
export const TMMetadataTooltip = ({ tid, md, color, children, layoutMode = LayoutModes.Update }) => {
|
88
88
|
const _setDefaultValueForUI = (defaultValue) => {
|
89
89
|
if (!defaultValue)
|
90
90
|
return defaultValue;
|
@@ -95,7 +95,7 @@ export const TMMetadataTooltip = ({ tid, md, children, layoutMode = LayoutModes.
|
|
95
95
|
let isNumeratorInArk = md?.dataDomain === MetadataDataDomains.Numerator && layoutMode === LayoutModes.Ark;
|
96
96
|
const renderTooltipContent = (tid, md) => {
|
97
97
|
return (!md ? null
|
98
|
-
: _jsxs(StyledTooltipContainer, { children: [_jsx(StyledTooltipItem, { children: `${SDK_Globals.useLocalizedName ? md.nameLoc : md.name} (TID: ${tid}, MID: ${md.id})` }), md.description && _jsx(StyledTooltipItem, { children: md.description }), _jsx(StyledTooltipSeparatorItem, {}), _jsxs(StyledTooltipItem, { children: [md.dataType, " ", md.dataType == MetadataDataTypes.Varchar ? `(${md.length ?? 0})` : md.dataType == MetadataDataTypes.Number ? `(${md.length ?? 0},${md.scale ?? 0})` : '', md.isPrimaryKey === 1 ? ' (PK)' : ''] }), _jsx(StyledTooltipItem, { style: { color: md.isRequired === 1 && !isNumeratorInArk ? TMColors.error :
|
98
|
+
: _jsxs(StyledTooltipContainer, { children: [_jsx(StyledTooltipItem, { "$color": color, children: `${SDK_Globals.useLocalizedName ? md.nameLoc : md.name} (TID: ${tid}, MID: ${md.id})` }), md.description && _jsx(StyledTooltipItem, { "$color": color, children: md.description }), _jsx(StyledTooltipSeparatorItem, { color: color }), _jsxs(StyledTooltipItem, { "$color": color, children: [md.dataType, " ", md.dataType == MetadataDataTypes.Varchar ? `(${md.length ?? 0})` : md.dataType == MetadataDataTypes.Number ? `(${md.length ?? 0},${md.scale ?? 0})` : '', md.isPrimaryKey === 1 ? ' (PK)' : ''] }), _jsx(StyledTooltipItem, { style: { color: md.isRequired === 1 && !isNumeratorInArk ? TMColors.error : color }, children: md.isRequired === 1 && !isNumeratorInArk ? SDKUI_Localizator.Required : SDKUI_Localizator.RequiredNOT }), md.dataDomain && _jsx(StyledTooltipItem, { "$color": color, children: md.dataDomain }), md.isLexProt == 1 && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.Yes}` }), md.isLexProt == 2 && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.MetadataFlag}` }), md.isLexProt == 3 && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.Yes} (${SDKUI_Localizator.MetadataFlag})` }), md.isFreeSearchInput && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Search_Free}: ${SDKUI_Localizator.Yes}` }), md.isSpecialSearchOutput && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Search_Special}: ${SDKUI_Localizator.Yes}` }), md.format?.format && md.format.format != MetadataFormats.None && _jsx(StyledTooltipItem, { color: color, children: `${SDKUI_Localizator.Format}: ${LocalizeMetadataFormats(md.format.format)}` }), md.defaultValue && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Default}: ${_setDefaultValueForUI(md.defaultValue)}` }), md.fromTID && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.MetadataRoot}: ${md.isRootMID == 1 ? SDKUI_Localizator.Yes : SDKUI_Localizator.No}` }), md.templateMID && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Template}: ${md.templateMID}` }), md.perm && _jsxs(_Fragment, { children: [_jsx(StyledTooltipItem, { "$color": 'primary', "$marginTop": '5px', children: SDKUI_Localizator.Perms }), _jsx(StyledTooltipSeparatorItem, { color: color }), _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Archive}: ${md.perm.canArchive ?? SDKUI_Localizator.No}` }), _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.View_Metadato}: ${md.perm.canView ?? SDKUI_Localizator.No}` }), _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Search}: ${md.perm.canSearch ?? SDKUI_Localizator.No}` }), _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Update}: ${md.perm.canUpdate ?? SDKUI_Localizator.No}` })] })] }));
|
99
99
|
};
|
100
100
|
return (_jsx("div", { style: { pointerEvents: 'all' }, children: _jsx(TMTooltip, { content: renderTooltipContent(tid, md), children: children }) }));
|
101
101
|
};
|
package/lib/utils/theme.d.ts
CHANGED
@@ -47,6 +47,7 @@ declare class TMColors {
|
|
47
47
|
static set backgroundColorHeader(theBackgroundColorHeader: string | undefined);
|
48
48
|
static get colorHeader(): string | undefined;
|
49
49
|
static set colorHeader(theColorHeader: string | undefined);
|
50
|
+
static separator: string;
|
50
51
|
}
|
51
52
|
declare class FontSize {
|
52
53
|
static defaultFontSize: string;
|
package/lib/utils/theme.js
CHANGED
@@ -47,6 +47,7 @@ TMColors.isModified = "#E29000"; //= tertiary
|
|
47
47
|
TMColors.card_background = "#CAD9EB";
|
48
48
|
TMColors._backgroundColorHeader = "#CAD9EB";
|
49
49
|
TMColors._colorHeader = "black";
|
50
|
+
TMColors.separator = "#00A99D";
|
50
51
|
class FontSize {
|
51
52
|
}
|
52
53
|
FontSize.defaultFontSize = '1rem';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@topconsultnpm/sdkui-react-beta",
|
3
|
-
"version": "6.13.
|
3
|
+
"version": "6.13.45",
|
4
4
|
"description": "",
|
5
5
|
"scripts": {
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
@@ -42,7 +42,7 @@
|
|
42
42
|
"lib"
|
43
43
|
],
|
44
44
|
"dependencies": {
|
45
|
-
"@topconsultnpm/sdk-ts-beta": "6.13.
|
45
|
+
"@topconsultnpm/sdk-ts-beta": "6.13.8",
|
46
46
|
"buffer": "^6.0.3",
|
47
47
|
"devextreme": "24.2.6",
|
48
48
|
"devextreme-react": "24.2.6",
|