@topconsultnpm/sdkui-react 6.22.0-dev2.31 → 6.22.0-dev2.33
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/search/TMSearch.js +4 -4
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +1 -0
- package/lib/components/features/search/TMSearchQueryPanel.js +17 -2
- package/lib/devextreme-license.d.ts +1 -0
- package/lib/devextreme-license.js +3 -0
- package/lib/index.js +2 -1
- package/package.json +69 -68
|
@@ -208,10 +208,10 @@ const TMSearch = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTask
|
|
|
208
208
|
SDKUI_Globals.userSettings.searchSettings.mruTIDs = newMruTIDS;
|
|
209
209
|
setMruTIDs(newMruTIDS);
|
|
210
210
|
} }), [mruTIDs, currentMruTID, deviceType]);
|
|
211
|
-
const tmSearchQueryPanelElement = useMemo(() => _jsx(TMSearchQueryPanelWrapper, { passToArchiveCallback: passToArchiveCallback, isExpertMode: isExpertMode, showBackToResultButton: searchResult.length > 0, fromDTD: fromDTD, SQD: currentSQD, inputMids: inputMids, maxDcmtsToBeReturned: maxDcmtsToBeReturned, onBackToResult: () => { setCurrentSearchView(TMSearchViews.Result); }, onSearchCompleted: handleSearchCompleted, onSqdSaved: async (newSqd) => {
|
|
211
|
+
const tmSearchQueryPanelElement = useMemo(() => _jsx(TMSearchQueryPanelWrapper, { isSearchViewOnScreen: currentSearchView === TMSearchViews.Search, passToArchiveCallback: passToArchiveCallback, isExpertMode: isExpertMode, showBackToResultButton: searchResult.length > 0, fromDTD: fromDTD, SQD: currentSQD, inputMids: inputMids, maxDcmtsToBeReturned: maxDcmtsToBeReturned, onBackToResult: () => { setCurrentSearchView(TMSearchViews.Result); }, onSearchCompleted: handleSearchCompleted, onSqdSaved: async (newSqd) => {
|
|
212
212
|
await loadDataSQDsAsync(true, newSqd.masterTID);
|
|
213
213
|
await setSQDAsync(newSqd);
|
|
214
|
-
} }), [fromDTD, showSearchResults, setShowSearchResults, currentSQD, isExpertMode, mruTIDs, searchResult, passToArchiveCallback, inputMids, maxDcmtsToBeReturned, handleSearchCompleted]);
|
|
214
|
+
} }), [fromDTD, showSearchResults, setShowSearchResults, currentSQD, currentSearchView, isExpertMode, mruTIDs, searchResult, passToArchiveCallback, inputMids, maxDcmtsToBeReturned, handleSearchCompleted]);
|
|
215
215
|
const tmSavedQuerySelectorElement = useMemo(() => _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(TMSavedQuerySelectorWrapper, { allowShowSearch: false, items: filteredByTIDSQDs, selectedId: currentSQD?.id, onRefreshData: () => { loadDataSQDsAsync(true); }, onItemClick: (sqd) => {
|
|
216
216
|
onSQDItemClick(sqd, setSQDAsync);
|
|
217
217
|
}, onDeleted: (sqd) => onSQDDeleted(sqd, sqd.id == currentSQD?.id ? filteredByTIDSQDs.find(o => o.id == 1) : currentSQD, setSQDAsync), refreshFavoriteSavedQueries: refreshFavoriteSavedQueries }) }) : _jsx(_Fragment, {}), _jsx(Item, { title: SDKUI_Localizator.AllFemale, children: _jsx(TMSavedQuerySelectorWrapper, { allowShowSearch: true, items: allSQDs, manageDefault: false, onItemClick: (sqd) => {
|
|
@@ -298,11 +298,11 @@ const TMRecentsManagerWrapper = ({ mruTIDs, currentMruTID, deviceType, onSelecte
|
|
|
298
298
|
onDeletedTID?.(tid);
|
|
299
299
|
} }));
|
|
300
300
|
};
|
|
301
|
-
const TMSearchQueryPanelWrapper = ({ fromDTD, SQD, isExpertMode, showBackToResultButton, onSearchCompleted, onSqdSaved, onBackToResult, passToArchiveCallback, inputMids, maxDcmtsToBeReturned }) => {
|
|
301
|
+
const TMSearchQueryPanelWrapper = ({ isSearchViewOnScreen, fromDTD, SQD, isExpertMode, showBackToResultButton, onSearchCompleted, onSqdSaved, onBackToResult, passToArchiveCallback, inputMids, maxDcmtsToBeReturned }) => {
|
|
302
302
|
const { setPanelVisibilityById, toggleMaximize, countVisibleLeafPanels } = useTMPanelManagerContext();
|
|
303
303
|
const deviceType = useDeviceType();
|
|
304
304
|
const isMobile = deviceType === DeviceType.MOBILE;
|
|
305
|
-
return (_jsx(TMSearchQueryPanel, { onClosePanel: (!isMobile && countVisibleLeafPanels() > 1) ? () => setPanelVisibilityById('TMSearchQueryPanel', false) : undefined, allowMaximize: !isMobile && countVisibleLeafPanels() > 1, onMaximizePanel: (!isMobile && countVisibleLeafPanels() > 1) ? () => toggleMaximize("TMSearchQueryPanel") : undefined, isExpertMode: isExpertMode, fromDTD: fromDTD, SQD: SQD, inputMids: inputMids, onSearchCompleted: onSearchCompleted, onSqdSaved: onSqdSaved, showBackToResultButton: showBackToResultButton, onBackToResult: onBackToResult, passToArchiveCallback: passToArchiveCallback, maxDcmtsToBeReturned: maxDcmtsToBeReturned }));
|
|
305
|
+
return (_jsx(TMSearchQueryPanel, { isSearchViewOnScreen: isSearchViewOnScreen, onClosePanel: (!isMobile && countVisibleLeafPanels() > 1) ? () => setPanelVisibilityById('TMSearchQueryPanel', false) : undefined, allowMaximize: !isMobile && countVisibleLeafPanels() > 1, onMaximizePanel: (!isMobile && countVisibleLeafPanels() > 1) ? () => toggleMaximize("TMSearchQueryPanel") : undefined, isExpertMode: isExpertMode, fromDTD: fromDTD, SQD: SQD, inputMids: inputMids, onSearchCompleted: onSearchCompleted, onSqdSaved: onSqdSaved, showBackToResultButton: showBackToResultButton, onBackToResult: onBackToResult, passToArchiveCallback: passToArchiveCallback, maxDcmtsToBeReturned: maxDcmtsToBeReturned }));
|
|
306
306
|
};
|
|
307
307
|
const TMSavedQuerySelectorWrapper = ({ items, selectedId, allowShowSearch, manageDefault, onRefreshData, onItemClick, onDeleted, refreshFavoriteSavedQueries }) => {
|
|
308
308
|
const { setPanelVisibilityById } = useTMPanelManagerContext();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DcmtTypeDescriptor, QueryDescriptor, SavedQueryDescriptor, SearchResultDescriptor } from '@topconsultnpm/sdk-ts';
|
|
3
3
|
interface ITMSearchQueryPanelProps {
|
|
4
|
+
isSearchViewOnScreen?: boolean;
|
|
4
5
|
fromDTD?: DcmtTypeDescriptor;
|
|
5
6
|
SQD?: SavedQueryDescriptor;
|
|
6
7
|
isExpertMode?: boolean;
|
|
@@ -24,7 +24,7 @@ import TMToppyMessage from '../../../helper/TMToppyMessage';
|
|
|
24
24
|
import TMMetadataSorterForm from './TMMetadataSorterForm';
|
|
25
25
|
import TMMetadataOutputForm from './TMMetadataOutputForm';
|
|
26
26
|
import TMTooltip from '../../base/TMTooltip';
|
|
27
|
-
const TMSearchQueryPanel = ({ fromDTD, showBackToResultButton, isExpertMode = SDKUI_Globals.userSettings.advancedSettings.expertMode === 1, SQD, inputMids, onSearchCompleted, onSqdSaved, onBack, onClosePanel, allowMaximize = true, onMaximizePanel, onBackToResult, passToArchiveCallback, maxDcmtsToBeReturned }) => {
|
|
27
|
+
const TMSearchQueryPanel = ({ isSearchViewOnScreen = true, fromDTD, showBackToResultButton, isExpertMode = SDKUI_Globals.userSettings.advancedSettings.expertMode === 1, SQD, inputMids, onSearchCompleted, onSqdSaved, onBack, onClosePanel, allowMaximize = true, onMaximizePanel, onBackToResult, passToArchiveCallback, maxDcmtsToBeReturned }) => {
|
|
28
28
|
const [confirmQueryParams, ConfirmQueryParamsDialog] = useQueryParametersDialog();
|
|
29
29
|
const [qd, setQd] = useState();
|
|
30
30
|
const [shouldSearch, setShouldSearch] = useState(false);
|
|
@@ -44,10 +44,25 @@ const TMSearchQueryPanel = ({ fromDTD, showBackToResultButton, isExpertMode = SD
|
|
|
44
44
|
const deviceType = useDeviceType();
|
|
45
45
|
const isMobile = deviceType === DeviceType.MOBILE;
|
|
46
46
|
let initialMaxItems = deviceType === DeviceType.MOBILE ? 8 : 12;
|
|
47
|
+
const tmPanelRef = useRef(null);
|
|
48
|
+
// Passando nella vista risultati si prenota il focus, che verrà ripreso al rientro nella ricerca
|
|
49
|
+
const shouldRefocusOnReturnRef = useRef(false);
|
|
47
50
|
const appliedInputMidsRef = useRef(null);
|
|
48
51
|
const pendingMidsRef = useRef(null);
|
|
49
52
|
// Flag "accoda": impostato dall'azione secondaria del bottone Ricerca, consumato in executeSearch
|
|
50
53
|
const appendNextSearchRef = useRef(false);
|
|
54
|
+
// Tornando dalla vista risultati il pannello dei metadati di ricerca riprende il focus,
|
|
55
|
+
// così è lui quello evidenziato: prendendo il focus gli altri pannelli ricevono l'onBlur e si disattivano
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
if (!isSearchViewOnScreen) {
|
|
58
|
+
shouldRefocusOnReturnRef.current = true;
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (!shouldRefocusOnReturnRef.current)
|
|
62
|
+
return;
|
|
63
|
+
shouldRefocusOnReturnRef.current = false;
|
|
64
|
+
tmPanelRef.current?.focusPanel();
|
|
65
|
+
}, [isSearchViewOnScreen]);
|
|
51
66
|
useEffect(() => {
|
|
52
67
|
if (!SQD)
|
|
53
68
|
return;
|
|
@@ -342,7 +357,7 @@ const TMSearchQueryPanel = ({ fromDTD, showBackToResultButton, isExpertMode = SD
|
|
|
342
357
|
return false;
|
|
343
358
|
return qd?.orderBy && qd.orderBy.length > 0;
|
|
344
359
|
}, [showAdvancedSearch, qd?.orderBy]);
|
|
345
|
-
return (_jsxs(_Fragment, { children: [_jsxs(TMPanel, { title: fromDTD?.nameLoc ?? SDKUI_Localizator.Search_Metadata, allowMaximize: allowMaximize, onMaximize: onMaximizePanel, onHeaderDoubleClick: onMaximizePanel, onBack: onBack, onActiveChanged: handlePanelActiveChanged, toolbar: _jsx(_Fragment, { children: (SQD && !showSqdForm) ?
|
|
360
|
+
return (_jsxs(_Fragment, { children: [_jsxs(TMPanel, { ref: tmPanelRef, title: fromDTD?.nameLoc ?? SDKUI_Localizator.Search_Metadata, allowMaximize: allowMaximize, onMaximize: onMaximizePanel, onHeaderDoubleClick: onMaximizePanel, onBack: onBack, onActiveChanged: handlePanelActiveChanged, toolbar: _jsx(_Fragment, { children: (SQD && !showSqdForm) ?
|
|
346
361
|
_jsx(ContextMenu, { items: contextMenuItems, trigger: "left", children: _jsx(TMButton, { btnStyle: 'icon', caption: 'Altro', icon: _jsx(IconMenuVertical, { color: 'white' }), showTooltip: false, onClick: () => setIsQueryPanelActive(true) }) })
|
|
347
362
|
: _jsx(_Fragment, {}) }), children: [_jsx(ConfirmQueryParamsDialog, {}), SQD
|
|
348
363
|
? _jsxs("div", { onContextMenu: (e) => e.preventDefault(), style: { height: '100%', width: '100%', position: 'relative', display: showSqdForm ? 'none' : 'flex', flexDirection: 'column', gap: 5 }, children: [showAdvancedSearch
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const licenseKey = "LCPv1>7eY(j4LeYSi9_V6!J4He7,1:JfoSYV:%QDL7+aJZee3%oR>!N,(7<,!cyaX>Qta3%e7(nrB7+a42R-8pJ@(>Qm<IJ+(Sn,e3J+:VN-;(y,$Zj4yZ74[S<FZ:ee49ntV(%Xn3Lr19Y9[7iR3:74X7RV(6ye(Iea1cNSS3gFf!N91%R-ppQQmk79-6%)<SQf-I_@F6_y6SjzB6_!Q2bREIgF:aQdE!KF6>%X<2p@62%!F2bR62<-$2i-)2i-FI%d@G<-@!jy$2iRQ6b-v!jyvIg!:ajzvaj@Fpg!$2b-FIp9;9K-:>Q4:G_@@9Qdv6<!F6<dFI7yFI7yFI7Ll";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// Auto-generated by devextreme-license.
|
|
2
|
+
// Do not commit this file to source control.
|
|
3
|
+
export const licenseKey = 'LCPv1>7eY(j4LeYSi9_V6!J4He7,1:JfoSYV:%QDL7+aJZee3%oR>!N,(7<,!cyaX>Qta3%e7(nrB7+a42R-8pJ@(>Qm<IJ+(Sn,e3J+:VN-;(y,$Zj4yZ74[S<FZ:ee49ntV(%Xn3Lr19Y9[7iR3:74X7RV(6ye(Iea1cNSS3gFf!N91%R-ppQQmk79-6%)<SQf-I_@F6_y6SjzB6_!Q2bREIgF:aQdE!KF6>%X<2p@62%!F2bR62<-$2i-)2i-FI%d@G<-@!jy$2iRQ6b-v!jyvIg!:ajzvaj@Fpg!$2b-FIp9;9K-:>Q4:G_@@9Qdv6<!F6<dFI7yFI7yFI7Ll';
|
package/lib/index.js
CHANGED
|
@@ -15,5 +15,6 @@ export * from './hooks/useBetaFeatures';
|
|
|
15
15
|
export * from './hooks/useShowDossiersV5';
|
|
16
16
|
export * from './services';
|
|
17
17
|
import config from 'devextreme/core/config';
|
|
18
|
+
import { licenseKey } from "./devextreme-license";
|
|
18
19
|
// DevExtreme License Key (valid for v25.2 and earlier versions)
|
|
19
|
-
config({ licenseKey
|
|
20
|
+
config({ licenseKey });
|
package/package.json
CHANGED
|
@@ -1,68 +1,69 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@topconsultnpm/sdkui-react",
|
|
3
|
-
"version": "6.22.0-dev2.
|
|
4
|
-
"description": "",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
7
|
-
"clean": "node -e \"const fs=require('fs');fs.rmSync('lib',{recursive:true,force:true});fs.mkdirSync('lib')\"",
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"tm-
|
|
11
|
-
"tm-
|
|
12
|
-
"tm-
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
"@storybook
|
|
21
|
-
"@storybook/addon-
|
|
22
|
-
"@storybook/
|
|
23
|
-
"@
|
|
24
|
-
"@types/
|
|
25
|
-
"@types/react
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"react
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"@
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"devextreme
|
|
47
|
-
"devextreme-
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"react-
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"esbuild@0.25.12": true,
|
|
66
|
-
"inferno@8.2.3": true
|
|
67
|
-
|
|
68
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@topconsultnpm/sdkui-react",
|
|
3
|
+
"version": "6.22.0-dev2.33",
|
|
4
|
+
"description": "",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
7
|
+
"clean": "node -e \"const fs=require('fs');fs.rmSync('lib',{recursive:true,force:true});fs.mkdirSync('lib')\"",
|
|
8
|
+
"gen-license": "devextreme-license --out src/devextreme-license.ts --force --no-gitignore",
|
|
9
|
+
"copy-files": "cpx \"src/{assets/*.*,assets/ImageLibrary/*.*,assets/thumbnails/*.*,assets/IconsS4t/*.*,assets/Metadata/*.*,css/tm-sdkui.css}\" lib",
|
|
10
|
+
"tm-build": "npm run clean && npm run gen-license && tsc && npm run copy-files",
|
|
11
|
+
"tm-watch": "tsc -w",
|
|
12
|
+
"tm-publish": "npm publish --tag latest",
|
|
13
|
+
"tm-publish_wl": "npm publish",
|
|
14
|
+
"storybook": "npm run gen-license && storybook dev -p 6006",
|
|
15
|
+
"build-storybook": "npm run gen-license && storybook build"
|
|
16
|
+
},
|
|
17
|
+
"author": "TopConsult",
|
|
18
|
+
"license": "ISC",
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@chromatic-com/storybook": "^5.1.2",
|
|
21
|
+
"@storybook/addon-docs": "^10.3.5",
|
|
22
|
+
"@storybook/addon-onboarding": "^10.3.5",
|
|
23
|
+
"@storybook/react-vite": "^10.3.5",
|
|
24
|
+
"@types/node": "^24.12.2",
|
|
25
|
+
"@types/react": "^18.3.3",
|
|
26
|
+
"@types/react-dom": "^18.3.3",
|
|
27
|
+
"cpx2": "^9.0.0",
|
|
28
|
+
"esbuild": "^0.25.0",
|
|
29
|
+
"react": "^18.3.1",
|
|
30
|
+
"react-dom": "^18.3.1",
|
|
31
|
+
"storybook": "^10.3.5",
|
|
32
|
+
"typescript": "^5.9.3",
|
|
33
|
+
"vite": "^6.1.1"
|
|
34
|
+
},
|
|
35
|
+
"main": "dist/cjs/index.js",
|
|
36
|
+
"types": "./index.d.ts",
|
|
37
|
+
"module": "lib/esm/index.js",
|
|
38
|
+
"files": [
|
|
39
|
+
"dist",
|
|
40
|
+
"lib"
|
|
41
|
+
],
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@topconsultnpm/sdk-ts": "6.22.0-dev2.7",
|
|
44
|
+
"@zip.js/zip.js": "2.8.26",
|
|
45
|
+
"buffer": "^6.0.3",
|
|
46
|
+
"devextreme": "26.1.4",
|
|
47
|
+
"devextreme-exceljs-fork": "4.4.13",
|
|
48
|
+
"devextreme-react": "26.1.4",
|
|
49
|
+
"htmlparser2": "^10.0.0",
|
|
50
|
+
"pdf-lib": "^1.17.1",
|
|
51
|
+
"react-pdf": "^10.4.1",
|
|
52
|
+
"react-window": "^2.2.7",
|
|
53
|
+
"styled-components": "^6.1.1"
|
|
54
|
+
},
|
|
55
|
+
"overrides": {
|
|
56
|
+
"esbuild": "^0.25.0",
|
|
57
|
+
"devextreme-exceljs-fork": {
|
|
58
|
+
"archiver": "^8.0.0"
|
|
59
|
+
},
|
|
60
|
+
"quill-delta": {
|
|
61
|
+
"lodash.isequal": "npm:fast-deep-equal@^3.1.3"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"allowScripts": {
|
|
65
|
+
"esbuild@0.25.12": true,
|
|
66
|
+
"inferno@8.2.3": true,
|
|
67
|
+
"core-js@3.50.0": true
|
|
68
|
+
}
|
|
69
|
+
}
|