frst-components 0.21.64 → 0.21.65

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/dist/index.js CHANGED
@@ -4584,17 +4584,6 @@ const RepplysContainer = styled__default["default"].div `
4584
4584
  width: ${({ width }) => (width ? `${width}px` : 'auto')};
4585
4585
  margin-left:50px`;
4586
4586
 
4587
- const InputContainer = styled__default["default"].div `
4588
- display:flex;
4589
- flex-direction:column;
4590
- position:relative;
4591
- `;
4592
- const Container$g = styled__default["default"].div `
4593
- display:flex;
4594
- justify-content:center;
4595
- margin-bottom:40px;
4596
- `;
4597
-
4598
4587
  const container = styled__default["default"].div `
4599
4588
  display: flex;
4600
4589
  justify-content: center;
@@ -4668,6 +4657,17 @@ function Loading(props) {
4668
4657
  return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: jsxRuntime.jsxs(container, { textPosition: PositionTextLoad, style: { ...props.style }, children: [jsxRuntime.jsx(loader, { children: jsxRuntime.jsx(Load, { width: Size, height: Size, fill: Color !== '' && Color }) }), jsxRuntime.jsx(loadText, { style: { color: props.loadTextColor ? props.loadTextColor : 'white' }, children: LoadText })] }) }));
4669
4658
  }
4670
4659
 
4660
+ const InputContainer = styled__default["default"].div `
4661
+ display:flex;
4662
+ flex-direction:column;
4663
+ position:relative;
4664
+ `;
4665
+ const Container$g = styled__default["default"].div `
4666
+ display:flex;
4667
+ justify-content:center;
4668
+ margin-bottom:40px;
4669
+ `;
4670
+
4671
4671
  const InputReply = ({ placeHolderText, getSearchUsers, onClickPublishButton, parentId, limitInput, publishButtonText, replyMentionedUser, imgProfile, styles, handleHiddenInput }) => {
4672
4672
  const [comment, setComment] = React.useState('');
4673
4673
  const [CaptureFormattedValue, setCaptureFormattedValue] = React.useState('');
@@ -4675,6 +4675,16 @@ const InputReply = ({ placeHolderText, getSearchUsers, onClickPublishButton, par
4675
4675
  const [users, setUsers] = React.useState([]);
4676
4676
  const [isLoading, setIsLoading] = React.useState(false);
4677
4677
  const inputRef = React.useRef(null);
4678
+ const user = {
4679
+ user_uuid: replyMentionedUser.uuid,
4680
+ name: replyMentionedUser.name,
4681
+ profile: {
4682
+ avatar: replyMentionedUser.avatar,
4683
+ company_name: replyMentionedUser.company_name,
4684
+ role_name: replyMentionedUser.role_name
4685
+ }
4686
+ };
4687
+ const [userMentionedOnReplied, setUserMentionedOnReply] = React.useState(false);
4678
4688
  const handleClickOutside = (event) => {
4679
4689
  if (inputRef.current && !inputRef.current.contains(event.target) && comment.length === 0) {
4680
4690
  handleHiddenInput();
@@ -4702,6 +4712,7 @@ const InputReply = ({ placeHolderText, getSearchUsers, onClickPublishButton, par
4702
4712
  };
4703
4713
  let timeout;
4704
4714
  const setCommentData = (value) => {
4715
+ setUserMentionedOnReply(true);
4705
4716
  clearTimeout(timeout);
4706
4717
  timeout = setTimeout(() => {
4707
4718
  setComment(value);
@@ -4713,7 +4724,7 @@ const InputReply = ({ placeHolderText, getSearchUsers, onClickPublishButton, par
4713
4724
  };
4714
4725
  return (jsxRuntime.jsxs(Container$g, { children: [jsxRuntime.jsx(Avatar, { src: imgProfile, size: "32px", style: { marginTop: '55px', marginRight: '8px' } }), jsxRuntime.jsxs(InputContainer, { ref: inputRef, style: { ...styles }, children: [jsxRuntime.jsx(InputComment$1, { styles: { width: '100%', marginTop: '22.5px' }, className: "userComment", onChange: (e) => {
4715
4726
  handleSearchUsers(e);
4716
- }, value: comment, placeholder: placeHolderText, limit: limitInput, showCharacterCounter: true, onContentUnformat: (unformattedValue) => setCommentData(unformattedValue), onContentFormat: (formattedValue) => setCaptureFormattedValue(formattedValue), onSendMentions: (mentions) => setCaptureMentions(mentions), users: users }), jsxRuntime.jsx(MiniButton, { disabled: comment.length <= 0 || isLoading, label: publishButtonText, onClick: () => handlePublish(), variant: "primary", styles: { marginLeft: 'auto', marginTop: '15px' } }), isLoading && jsxRuntime.jsx(Loading, {})] })] }));
4727
+ }, value: comment, placeholder: placeHolderText, limit: limitInput, showCharacterCounter: true, onContentUnformat: (unformattedValue) => setCommentData(unformattedValue), onContentFormat: (formattedValue) => setCaptureFormattedValue(formattedValue), onSendMentions: (mentions) => setCaptureMentions(mentions), users: users, replyMentionedUser: !userMentionedOnReplied && user }), jsxRuntime.jsx(MiniButton, { disabled: comment.length <= 0 || isLoading, label: publishButtonText, onClick: () => handlePublish(), variant: "primary", styles: { marginLeft: 'auto', marginTop: '15px' } }), isLoading && jsxRuntime.jsx(Loading, {})] })] }));
4717
4728
  };
4718
4729
 
4719
4730
  const CommentaryBoxReply = ({ commentData, showMoreButtonText, showLessButtonText, answerButtonText, onClickAnswerButton }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/FI/ThreadComments/utilitiesComponents/inputReply/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAKjD,eAAO,MAAM,UAAU,kKAWpB,WAAW,gBAiFb,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/FI/ThreadComments/utilitiesComponents/inputReply/index.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,eAAO,MAAM,UAAU,kKAWpB,WAAW,gBAgGb,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "frst-components",
3
3
  "homepage": "http://FRST-Falconi.github.io/storybook.frstfalconi.com",
4
- "version": "0.21.64",
4
+ "version": "0.21.65",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",