@topconsultnpm/sdkui-react-beta 6.15.98 → 6.15.99

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.
@@ -252,7 +252,7 @@ const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes
252
252
  setSecondaryMasterDcmts((prevItems) => prevItems.filter(item => item.TID !== tid && item.DID !== did));
253
253
  };
254
254
  const isPreviewDisabled = layoutMode === LayoutModes.Ark && fromDTD?.archiveConstraint === ArchiveConstraints.OnlyMetadata;
255
- // const isBoardDisabled = layoutMode !== LayoutModes.Update || fromDTD?.hasBlog !== 1;
255
+ const isBoardDisabled = layoutMode !== LayoutModes.Update || fromDTD?.hasBlog !== 1;
256
256
  const isSysMetadataDisabled = layoutMode !== LayoutModes.Update;
257
257
  const isDetailsDisabled = layoutMode !== LayoutModes.Update || !DID;
258
258
  const isMasterDisabled = layoutMode !== LayoutModes.Update || !DID;
@@ -605,7 +605,13 @@ const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes
605
605
  id: 'tmBlog',
606
606
  name: SDKUI_Localizator.BlogCase,
607
607
  contentOptions: { component: tmBlog, panelContainer: { title: SDKUI_Localizator.BlogCase, allowMaximize: !isMobile } },
608
- toolbarOptions: { icon: _jsx(IconBoard, { fontSize: 24 }), visible: true, disabled: false, orderNumber: 2, isActive: allInitialPanelVisibility['tmBlog'] }
608
+ toolbarOptions: {
609
+ icon: _jsx(IconBoard, { fontSize: 24 }),
610
+ visible: true,
611
+ disabled: isBoardDisabled,
612
+ orderNumber: 2,
613
+ isActive: allInitialPanelVisibility['tmBlog']
614
+ }
609
615
  },
610
616
  {
611
617
  id: 'tmSysMetadata',
@@ -636,7 +642,7 @@ const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes
636
642
  isActive: allInitialPanelVisibility['tmWF']
637
643
  }
638
644
  },
639
- ], [tmDcmtForm, tmBlog, tmSysMetadata, tmDcmtPreview, tmWF, isPreviewDisabled, isSysMetadataDisabled, isWFDisabled, inputFile, isClosable]);
645
+ ], [fromDTD, tmDcmtForm, tmBlog, tmSysMetadata, tmDcmtPreview, tmWF, isPreviewDisabled, isSysMetadataDisabled, isBoardDisabled, isWFDisabled, inputFile, isClosable]);
640
646
  // Retrieves the current document form setting based on the normalized TID
641
647
  const getCurrentDcmtFormSetting = () => {
642
648
  const settings = SDKUI_Globals.userSettings.dcmtFormSettings;
@@ -728,7 +734,7 @@ const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes
728
734
  height: '100%',
729
735
  position: 'relative',
730
736
  overflow: 'hidden'
731
- }, 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: [(groupId && groupId.length > 0)
737
+ }, children: [fromDTD && _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: [(groupId && groupId.length > 0)
732
738
  ? _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showDcmtFormSidebar })
733
739
  : _jsx(TMPanelManagerWithPersistenceProvider, { panels: initialPanels, initialVisibility: allInitialPanelVisibility, defaultDimensions: defaultPanelDimensions, initialDimensions: defaultPanelDimensions, initialMobilePanelId: 'tmDcmtForm', isPersistenceEnabled: !isMobile ? hasSavedLayout() : false, persistPanelStates: !isMobile ? (state) => persistPanelStates(state) : undefined, persistedPanelStates: getPersistedPanelStates(), children: _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showDcmtFormSidebar }) }), isOpenDistinctValues &&
734
740
  _jsx(TMDistinctValues, { tid: TID, mid: focusedMetadataValue?.mid, isModal: true, showHeader: false, layoutMode: layoutMode, onSelectionChanged: (e) => {
@@ -811,11 +817,6 @@ const validateMaxLength = (mvd, value, validationItems) => {
811
817
  const TMDcmtPreviewWrapper = ({ currentDcmt, layoutMode, fromDTD, dcmtFile, deviceType, isVisible, onFileUpload }) => {
812
818
  const { setPanelVisibilityById, toggleMaximize, isResizingActive, countVisibleLeafPanels, setToolbarButtonDisabled } = useTMPanelManagerContext();
813
819
  const isMobile = deviceType === DeviceType.MOBILE;
814
- useEffect(() => {
815
- if (layoutMode !== LayoutModes.Update || fromDTD?.hasBlog !== 1) {
816
- setToolbarButtonDisabled('tmBlog', true);
817
- }
818
- }, [fromDTD, layoutMode]);
819
820
  return (layoutMode === LayoutModes.Update ?
820
821
  _jsx(TMDcmtPreview, { isVisible: isVisible, onClosePanel: (!isMobile && countVisibleLeafPanels() > 1) ? () => setPanelVisibilityById('tmDcmtPreview', false) : undefined, allowMaximize: !isMobile && countVisibleLeafPanels() > 1, onMaximizePanel: (!isMobile && countVisibleLeafPanels() > 1) ? () => toggleMaximize("tmDcmtPreview") : undefined, dcmtData: currentDcmt, isResizingActive: isResizingActive }) :
821
822
  _jsx(TMFileUploader, { onFileUpload: onFileUpload, onClose: (!isMobile && countVisibleLeafPanels() > 1) ? () => setPanelVisibilityById('tmDcmtPreview', false) : undefined, isRequired: fromDTD?.archiveConstraint === ArchiveConstraints.ContentCompulsory && dcmtFile === null, defaultBlob: dcmtFile, deviceType: deviceType, isResizingActive: isResizingActive }));
@@ -124,7 +124,7 @@ const TMHeader = ({ onMenusOpen, showSettingsMenu = true, showSearchBar = true,
124
124
  case AppModules.POWERPOINT_CONNECTOR: return 'POWERPOINT CONNECTOR';
125
125
  default: return SDK_Globals.appModule;
126
126
  }
127
- }, [SDK_Globals.appModule]);
127
+ }, [SDK_Globals.appModule, AppModules]);
128
128
  useEffect(() => { clearSearchJobValue && setSearchJobsValue(''); }, [clearSearchJobValue]);
129
129
  useEffect(() => { clearSearchQEValue && setSearchQEValue(''); }, [clearSearchQEValue]);
130
130
  useEffect(() => {
@@ -241,7 +241,7 @@ const TMHeader = ({ onMenusOpen, showSettingsMenu = true, showSearchBar = true,
241
241
  return SDK_Globals.appModule === AppModules.WORD_CONNECTOR || SDK_Globals.appModule === AppModules.EXCEL_CONNECTOR || SDK_Globals.appModule === AppModules.POWERPOINT_CONNECTOR;
242
242
  }, [SDK_Globals.appModule]);
243
243
  return (_jsxs(StyledHeaderContainer, { "$appName": SDK_Globals.appModule, children: [(isAdministrativeLevel && !isOfficeConnector) &&
244
- _jsx(TMResizableMenu, { ref: appMenuRef, isVisible: showAppMenu, top: 58, left: 10, resizable: false, maxWidth: 215, minWidth: 215, maxHeight: 180, minHeight: 180, onClose: () => { }, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '10px' }, children: [_jsx("h5", { style: { color: TMColors.primary }, children: "Accessi ad altre applicazioni " }), _jsx("hr", {}), _jsxs("div", { style: { display: 'flex', gap: '10px', alignItems: 'center', width: '100%' }, children: [_jsxs(AppMenuButton, { onClick: () => openAppsHandler(appModuleHandler.app_1, tmSession, appRoutes), "$bgColor": '#482234', children: [_jsx("img", { src: six, alt: appModuleHandler.app_1, width: 30, height: 30 }), " ", appModuleHandler.app_1.toUpperCase()] }), _jsxs(AppMenuButton, { onClick: () => openAppsHandler(appModuleHandler.app_2, tmSession, appRoutes), "$bgColor": '#1d6f42', children: [_jsx("img", { src: six, alt: appModuleHandler.app_2, width: 30, height: 30 }), " ", appModuleHandler.app_2.toUpperCase()] })] })] }) }), _jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', width: '100%', gap: isMobile ? 5 : 15 }, children: [_jsxs("div", { style: { height: '50px', display: 'flex', alignItems: 'center', gap: 20, justifyContent: 'center' }, children: [_jsx(StyledLogo, { ref: logoRef, style: { cursor: (isAdministrativeLevel && SDK_Globals.appModule !== AppModules.WORD_CONNECTOR) ? 'pointer' : 'default' }, onMouseEnter: () => {
244
+ _jsx(TMResizableMenu, { ref: appMenuRef, isVisible: showAppMenu, top: 58, left: 10, resizable: false, maxWidth: 215, minWidth: 215, maxHeight: 180, minHeight: 180, onClose: () => { }, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '10px' }, children: [_jsx("h5", { style: { color: TMColors.primary }, children: "Accessi ad altre applicazioni " }), _jsx("hr", {}), _jsxs("div", { style: { display: 'flex', gap: '10px', alignItems: 'center', width: '100%' }, children: [_jsxs(AppMenuButton, { onClick: () => openAppsHandler(appModuleHandler.app_1, tmSession, appRoutes), "$bgColor": '#482234', children: [_jsx("img", { src: six, alt: appModuleHandler.app_1, width: 30, height: 30 }), " ", appModuleHandler.app_1.toUpperCase()] }), _jsxs(AppMenuButton, { onClick: () => openAppsHandler(appModuleHandler.app_2, tmSession, appRoutes), "$bgColor": '#1d6f42', children: [_jsx("img", { src: six, alt: appModuleHandler.app_2, width: 30, height: 30 }), " ", appModuleHandler.app_2.toUpperCase()] })] })] }) }), _jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', width: '100%', gap: isMobile ? 5 : 15 }, children: [_jsxs("div", { style: { height: '50px', display: 'flex', alignItems: 'center', gap: 20, justifyContent: 'center' }, children: [_jsx(StyledLogo, { ref: logoRef, style: { cursor: (isAdministrativeLevel && !isOfficeConnector) ? 'pointer' : 'default' }, onMouseEnter: () => {
245
245
  if (openMenuTimer.current)
246
246
  clearTimeout(openMenuTimer.current);
247
247
  openMenuTimer.current = setTimeout(() => { setShowAppMenu(true); onMenusOpen?.(); }, 200);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.15.98",
3
+ "version": "6.15.99",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",