@topconsultnpm/sdkui-react-beta 6.14.99 → 6.14.100

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.
@@ -14,6 +14,8 @@ const TMDcmtBlog = ({ tid, did, isVisible }) => {
14
14
  const [lastLoadedDid, setLastLoadedDid] = useState(undefined); // `lastLoadedDid` tiene traccia dell'ultimo `did` per cui abbiamo caricato i dati
15
15
  // State to manage show comment form selected file
16
16
  const [showCommentForm, setShowCommentForm] = useState(false);
17
+ // Flag to determine if the last blog should be automatically selected (after a new blog is added)
18
+ const [shouldSelectLastBlog, setShouldSelectLastBlog] = useState(false);
17
19
  const showCommentFormCallback = useCallback(() => {
18
20
  setShowCommentForm(true);
19
21
  }, []);
@@ -49,6 +51,9 @@ const TMDcmtBlog = ({ tid, did, isVisible }) => {
49
51
  fetchDataAsync(tid, did);
50
52
  }
51
53
  }, [tid, did, isVisible, hasLoadedDataOnce, lastLoadedDid]);
54
+ const updateShouldSelectLastBlog = (value) => {
55
+ setShouldSelectLastBlog(value);
56
+ };
52
57
  return (_jsxs("div", { style: { width: '100%', height: '100%' }, children: [_jsx(StyledContainer, { children: _jsx(StyledSectionContainer, { style: { position: 'relative' }, children: _jsx(StyledBoardContainer, { children: !did ? _jsx(TMNothingToShow, { text: 'Nessun documento selezionato.', secondText: 'Bacheca non disponibile.', icon: _jsx(IconBoard, { fontSize: 96 }) }) :
53
58
  _jsx(TMBlogs, { context: { engine: 'SearchEngine', object: { tid, did } }, id: "dcmt-blog", allData: blogsDatasource, showExtendedAttachments: false, showFloatingCommentButton: true, showCommentFormCallback: showCommentFormCallback, refreshCallback: () => fetchDataAsync(tid, did), contextMenuParams: {
54
59
  isShowHideFilterEnabled: true,
@@ -61,7 +66,7 @@ const TMDcmtBlog = ({ tid, did, isVisible }) => {
61
66
  isRefreshEnabled: true,
62
67
  isRestoreEnabled: true,
63
68
  isCreateContextualTask: false
64
- }, layoutMode: 'chat' }) }) }) }), (showCommentForm && tid && did) && _jsx(TMBlogCommentForm, { context: { engine: 'SearchEngine', object: { tid, did } }, onClose: () => setShowCommentForm(false), refreshCallback: () => { return fetchDataAsync(tid, did); }, participants: [], showAttachmentsSection: false })] }));
69
+ }, layoutMode: 'chat', shouldSelectLastBlog: shouldSelectLastBlog, updateShouldSelectLastBlog: updateShouldSelectLastBlog }) }) }) }), (showCommentForm && tid && did) && _jsx(TMBlogCommentForm, { context: { engine: 'SearchEngine', object: { tid, did } }, onClose: () => setShowCommentForm(false), refreshCallback: () => { return fetchDataAsync(tid, did); }, participants: [], showAttachmentsSection: false, updateShouldSelectLastBlog: updateShouldSelectLastBlog })] }));
65
70
  };
66
71
  export default TMDcmtBlog;
67
72
  const StyledContainer = styled.div ` user-select: none; overflow: hidden; background-color: #ffffff; width: calc(100%); height: calc(100%); display: flex; gap: 10px; `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.14.99",
3
+ "version": "6.14.100",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",