@topconsultnpm/sdkui-react 6.22.0-dev1.5 → 6.22.0-dev1.7
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.
|
@@ -1514,7 +1514,7 @@ const TMDcmtForm = ({ TID, DID, groupId, layoutMode = LayoutModes.Update, formMo
|
|
|
1514
1514
|
overflow: 'hidden'
|
|
1515
1515
|
}, children: [_jsxs("div", { style: { width: '100%', height: '100%', display: isOpenDetails || isOpenMaster ? 'none' : 'flex' }, children: [isNavigating && _jsx(Spinner, { description: SDKUI_Localizator.Loading, flat: false }), (fromDTD) && _jsx(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(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showCicoWaitPanel, showWaitPanelPrimary: showCicoPrimaryProgress, waitPanelTitle: cicoWaitPanelTitle, waitPanelTextPrimary: cicoPrimaryProgressText, waitPanelValuePrimary: cicoPrimaryProgressValue, waitPanelMaxValuePrimary: cicoPrimaryProgressMax, isCancelable: true, abortController: abortControllerLocal, children: [(groupId && groupId.length > 0)
|
|
1516
1516
|
? _jsxs(_Fragment, { children: [_jsx(PanelDisabledStateHandler, { isWFDisabled: isWFDisabled, isSysMetadataDisabled: isSysMetadataDisabled, isBoardDisabled: isBoardDisabled, isDcmtTasksDisabled: isDcmtTasksDisabled, isPreviewDisabled: isPreviewDisabled }), _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showDcmtFormSidebar })] })
|
|
1517
|
-
: _jsxs(TMPanelManagerWithPersistenceProvider, { panels: initialPanels, initialVisibility: allInitialPanelVisibility, defaultDimensions: defaultPanelDimensions, initialDimensions: defaultPanelDimensions, initialMobilePanelId: 'tmDcmtForm', isPersistenceEnabled: !isMobile && layoutMode !== LayoutModes.Ark ? hasSavedLayout() : false, persistPanelStates: !isMobile && layoutMode !== LayoutModes.Ark ? (state) => persistPanelStates(state) : undefined, persistedPanelStates: layoutMode !== LayoutModes.Ark ? getPersistedPanelStates() : undefined, children: [_jsx(PanelDisabledStateHandler, { isWFDisabled: isWFDisabled, isSysMetadataDisabled: isSysMetadataDisabled, isBoardDisabled: isBoardDisabled, isDcmtTasksDisabled: isDcmtTasksDisabled, isPreviewDisabled: isPreviewDisabled }), _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showDcmtFormSidebar })] }), isOpenDistinctValues &&
|
|
1517
|
+
: _jsxs(TMPanelManagerWithPersistenceProvider, { panels: initialPanels, initialVisibility: allInitialPanelVisibility, defaultDimensions: defaultPanelDimensions, initialDimensions: defaultPanelDimensions, initialMobilePanelId: 'tmDcmtForm', isPersistenceEnabled: !isMobile && layoutMode !== LayoutModes.Ark ? hasSavedLayout() : false, persistPanelStates: !isMobile && layoutMode !== LayoutModes.Ark ? (state) => persistPanelStates(state) : undefined, persistedPanelStates: layoutMode !== LayoutModes.Ark ? getPersistedPanelStates() : undefined, children: [_jsx(PanelDisabledStateHandler, { isWFDisabled: isWFDisabled, isSysMetadataDisabled: isSysMetadataDisabled, isBoardDisabled: isBoardDisabled, isDcmtTasksDisabled: isDcmtTasksDisabled, isPreviewDisabled: isPreviewDisabled }), _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showDcmtFormSidebar })] }, `dcmtForm-${TID}-${DID}`), isOpenDistinctValues &&
|
|
1518
1518
|
_jsx(TMDistinctValues, { tid: TID, mid: focusedMetadataValue?.mid, isModal: true, showHeader: false, layoutMode: layoutMode, onClosePanelCallback: () => setIsOpenDistinctValues(false), onSelectionChanged: (e) => {
|
|
1519
1519
|
if (!e)
|
|
1520
1520
|
return;
|
|
@@ -1605,8 +1605,12 @@ const validateMaxLength = (mvd, value, validationItems) => {
|
|
|
1605
1605
|
//#endregion Validation
|
|
1606
1606
|
// Synchronizes panel visibility and toolbar button disabled states when panels become disabled
|
|
1607
1607
|
const PanelDisabledStateHandler = ({ isWFDisabled, isSysMetadataDisabled, isBoardDisabled, isDcmtTasksDisabled, isPreviewDisabled }) => {
|
|
1608
|
-
const { setPanelVisibilityById, setToolbarButtonDisabled } = useTMPanelManagerContext();
|
|
1608
|
+
const { setPanelVisibilityById, setToolbarButtonDisabled, panelVisibility } = useTMPanelManagerContext();
|
|
1609
|
+
// Wait until panel visibility is initialized before applying disabled states
|
|
1610
|
+
const isInitialized = Object.keys(panelVisibility).length > 0;
|
|
1609
1611
|
useEffect(() => {
|
|
1612
|
+
if (!isInitialized)
|
|
1613
|
+
return;
|
|
1610
1614
|
if (isSysMetadataDisabled) {
|
|
1611
1615
|
setToolbarButtonDisabled('tmSysMetadata', true);
|
|
1612
1616
|
setPanelVisibilityById('tmSysMetadata', false);
|
|
@@ -1614,8 +1618,10 @@ const PanelDisabledStateHandler = ({ isWFDisabled, isSysMetadataDisabled, isBoar
|
|
|
1614
1618
|
else {
|
|
1615
1619
|
setToolbarButtonDisabled('tmSysMetadata', false);
|
|
1616
1620
|
}
|
|
1617
|
-
}, [isSysMetadataDisabled]);
|
|
1621
|
+
}, [isSysMetadataDisabled, isInitialized, setToolbarButtonDisabled, setPanelVisibilityById]);
|
|
1618
1622
|
useEffect(() => {
|
|
1623
|
+
if (!isInitialized)
|
|
1624
|
+
return;
|
|
1619
1625
|
if (isBoardDisabled) {
|
|
1620
1626
|
setToolbarButtonDisabled('tmBlog', true);
|
|
1621
1627
|
setPanelVisibilityById('tmBlog', false);
|
|
@@ -1623,8 +1629,10 @@ const PanelDisabledStateHandler = ({ isWFDisabled, isSysMetadataDisabled, isBoar
|
|
|
1623
1629
|
else {
|
|
1624
1630
|
setToolbarButtonDisabled('tmBlog', false);
|
|
1625
1631
|
}
|
|
1626
|
-
}, [isBoardDisabled]);
|
|
1632
|
+
}, [isBoardDisabled, isInitialized, setToolbarButtonDisabled, setPanelVisibilityById]);
|
|
1627
1633
|
useEffect(() => {
|
|
1634
|
+
if (!isInitialized)
|
|
1635
|
+
return;
|
|
1628
1636
|
if (isWFDisabled) {
|
|
1629
1637
|
setToolbarButtonDisabled('tmWF', true);
|
|
1630
1638
|
setPanelVisibilityById('tmWF', false);
|
|
@@ -1632,8 +1640,10 @@ const PanelDisabledStateHandler = ({ isWFDisabled, isSysMetadataDisabled, isBoar
|
|
|
1632
1640
|
else {
|
|
1633
1641
|
setToolbarButtonDisabled('tmWF', false);
|
|
1634
1642
|
}
|
|
1635
|
-
}, [isWFDisabled]);
|
|
1643
|
+
}, [isWFDisabled, isInitialized, setToolbarButtonDisabled, setPanelVisibilityById]);
|
|
1636
1644
|
useEffect(() => {
|
|
1645
|
+
if (!isInitialized)
|
|
1646
|
+
return;
|
|
1637
1647
|
if (isDcmtTasksDisabled) {
|
|
1638
1648
|
setToolbarButtonDisabled('tmDcmtTasks', true);
|
|
1639
1649
|
setPanelVisibilityById('tmDcmtTasks', false);
|
|
@@ -1641,8 +1651,10 @@ const PanelDisabledStateHandler = ({ isWFDisabled, isSysMetadataDisabled, isBoar
|
|
|
1641
1651
|
else {
|
|
1642
1652
|
setToolbarButtonDisabled('tmDcmtTasks', false);
|
|
1643
1653
|
}
|
|
1644
|
-
}, [isDcmtTasksDisabled]);
|
|
1654
|
+
}, [isDcmtTasksDisabled, isInitialized, setToolbarButtonDisabled, setPanelVisibilityById]);
|
|
1645
1655
|
useEffect(() => {
|
|
1656
|
+
if (!isInitialized)
|
|
1657
|
+
return;
|
|
1646
1658
|
if (isPreviewDisabled) {
|
|
1647
1659
|
setToolbarButtonDisabled('tmDcmtPreview', true);
|
|
1648
1660
|
setPanelVisibilityById('tmDcmtPreview', false);
|
|
@@ -1650,7 +1662,7 @@ const PanelDisabledStateHandler = ({ isWFDisabled, isSysMetadataDisabled, isBoar
|
|
|
1650
1662
|
else {
|
|
1651
1663
|
setToolbarButtonDisabled('tmDcmtPreview', false);
|
|
1652
1664
|
}
|
|
1653
|
-
}, [isPreviewDisabled]);
|
|
1665
|
+
}, [isPreviewDisabled, isInitialized, setToolbarButtonDisabled, setPanelVisibilityById]);
|
|
1654
1666
|
return null;
|
|
1655
1667
|
};
|
|
1656
1668
|
const TMDcmtPreviewWrapper = ({ refreshPreviewTrigger, fromDTD, currentDcmt, layoutMode, dcmtFile, deviceType, isVisible, onFileUpload, openFileUploaderPdfEditor, enableDragDropOverlay = false, onScanRequest, onBack }) => {
|
package/package.json
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name":
|
|
3
|
-
"version":
|
|
4
|
-
"description":
|
|
5
|
-
"scripts":
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"author":
|
|
17
|
-
"license":
|
|
18
|
-
"devDependencies":
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"main":
|
|
35
|
-
"types":
|
|
36
|
-
"module":
|
|
37
|
-
"files":
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"dependencies":
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"overrides":
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
2
|
+
"name": "@topconsultnpm/sdkui-react",
|
|
3
|
+
"version": "6.22.0-dev1.7",
|
|
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
|
+
"copy-files": "cpx \"src/{assets/*.*,assets/ImageLibrary/*.*,assets/thumbnails/*.*,assets/IconsS4t/*.*,assets/Metadata/*.*,css/tm-sdkui.css}\" lib",
|
|
9
|
+
"tm-build": "npm run clean && tsc && npm run copy-files",
|
|
10
|
+
"tm-watch": "tsc -w",
|
|
11
|
+
"tm-publish": "npm publish --tag latest",
|
|
12
|
+
"tm-publish_wl": "npm publish",
|
|
13
|
+
"storybook": "storybook dev -p 6006",
|
|
14
|
+
"build-storybook": "storybook build"
|
|
15
|
+
},
|
|
16
|
+
"author": "TopConsult",
|
|
17
|
+
"license": "ISC",
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@chromatic-com/storybook": "^5.1.2",
|
|
20
|
+
"@storybook/addon-docs": "^10.3.5",
|
|
21
|
+
"@storybook/addon-onboarding": "^10.3.5",
|
|
22
|
+
"@storybook/react-vite": "^10.3.5",
|
|
23
|
+
"@types/node": "^24.12.2",
|
|
24
|
+
"@types/react": "^18.3.3",
|
|
25
|
+
"@types/react-dom": "^18.3.3",
|
|
26
|
+
"cpx2": "^9.0.0",
|
|
27
|
+
"esbuild": "^0.25.0",
|
|
28
|
+
"react": "^18.3.1",
|
|
29
|
+
"react-dom": "^18.3.1",
|
|
30
|
+
"storybook": "^10.3.5",
|
|
31
|
+
"typescript": "^5.9.3",
|
|
32
|
+
"vite": "^6.1.1"
|
|
33
|
+
},
|
|
34
|
+
"main": "dist/cjs/index.js",
|
|
35
|
+
"types": "./index.d.ts",
|
|
36
|
+
"module": "lib/esm/index.js",
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"lib"
|
|
40
|
+
],
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@topconsultnpm/sdk-ts": "6.22.0-dev1.2",
|
|
43
|
+
"@zip.js/zip.js": "2.8.26",
|
|
44
|
+
"buffer": "^6.0.3",
|
|
45
|
+
"devextreme": "^25.2.6",
|
|
46
|
+
"devextreme-exceljs-fork": "^4.4.10",
|
|
47
|
+
"devextreme-react": "^25.2.6",
|
|
48
|
+
"htmlparser2": "^10.0.0",
|
|
49
|
+
"pdf-lib": "^1.17.1",
|
|
50
|
+
"react-pdf": "^10.4.1",
|
|
51
|
+
"react-window": "^2.2.7",
|
|
52
|
+
"styled-components": "^6.1.1"
|
|
53
|
+
},
|
|
54
|
+
"overrides": {
|
|
55
|
+
"esbuild": "^0.25.0",
|
|
56
|
+
"devextreme-exceljs-fork": {
|
|
57
|
+
"archiver": "^8.0.0"
|
|
58
|
+
},
|
|
59
|
+
"quill-delta": {
|
|
60
|
+
"lodash.isequal": "npm:fast-deep-equal@^3.1.3"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
63
|
}
|