frst-components 0.21.83 → 0.21.85
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
|
@@ -3193,9 +3193,9 @@ function Textarea(props) {
|
|
|
3193
3193
|
|
|
3194
3194
|
const InputWrapper$2 = styled__default["default"].div `
|
|
3195
3195
|
display: flex;
|
|
3196
|
-
align-items:
|
|
3196
|
+
align-items:center;
|
|
3197
3197
|
width: 100%;
|
|
3198
|
-
min-height:
|
|
3198
|
+
min-height: 48px;
|
|
3199
3199
|
position: 'relative';
|
|
3200
3200
|
background-color: ${({ theme, isInputLimit }) => !isInputLimit ? theme.colors.neutralsGrey9 : theme.colors.inputError};
|
|
3201
3201
|
|
|
@@ -3221,12 +3221,11 @@ const InputText$4 = styled__default["default"].div `
|
|
|
3221
3221
|
font-style: normal;
|
|
3222
3222
|
font-weight: normal;
|
|
3223
3223
|
font-size: 16px;
|
|
3224
|
-
line-height: 20px;
|
|
3225
3224
|
letter-spacing: -0.02em;
|
|
3226
3225
|
border: 1px solid ${({ theme }) => theme.colors.neutralsGrey3};
|
|
3227
3226
|
overflow: hidden;
|
|
3228
3227
|
background-color: inherit;
|
|
3229
|
-
|
|
3228
|
+
|
|
3230
3229
|
padding: 0;
|
|
3231
3230
|
margin: ${({ isPlaceholder }) => isPlaceholder ? '10px 4px 10px 15px' : '10px 4px 40px 15px'};
|
|
3232
3231
|
border: none;
|
|
@@ -3704,7 +3703,7 @@ const Mentions = (mention) => {
|
|
|
3704
3703
|
function InputComment$1({ placeholder, onChange, limit, users, showCharacterCounter, styles, onSendMentions, onContentFormat, onContentUnformat, disabled, className, value, replyMentionedUser, group_uuid, limitMessageExceeded }) {
|
|
3705
3704
|
const { handleInput, isPlaceholder, focus, setFocus, divInputRef, handleMentionUser, mentionTopPosition, setShowMention, showMention, textLength, styleLimitExceeded } = useInputHook({ limit, placeholder, onContentFormat, onContentUnformat, onSendMentions, onChange, value, replyMentionedUser });
|
|
3706
3705
|
const showMentions = showMention && ['b1005836-b0a6-4a50-8147-537ebdc64a75', '413c2f36-9195-4fef-86fe-572c49049007'].includes(group_uuid);
|
|
3707
|
-
return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: jsxRuntime.jsxs("div", { style: { ...styles }, tabIndex: 0, children: [jsxRuntime.jsxs(InputWrapper$2, { focus: focus, tabIndex: 1, isPlaceholder: isPlaceholder, isInputLimit: styleLimitExceeded, children: [jsxRuntime.jsx(InputText$4, { tabIndex: 2, contentEditable: true, ref: divInputRef, onFocus: () => setFocus(true), onBlur: () => setFocus(false), onKeyUpCapture: (event) => {
|
|
3706
|
+
return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: jsxRuntime.jsxs("div", { style: { ...styles, minHeight: '48px' }, tabIndex: 0, children: [jsxRuntime.jsxs(InputWrapper$2, { focus: focus, tabIndex: 1, isPlaceholder: isPlaceholder, isInputLimit: styleLimitExceeded, children: [jsxRuntime.jsx(InputText$4, { tabIndex: 2, contentEditable: true, ref: divInputRef, onFocus: () => setFocus(true), onBlur: () => setFocus(false), onKeyUpCapture: (event) => {
|
|
3708
3707
|
handleInput(event);
|
|
3709
3708
|
}, "data-text": "enter", isPlaceholder: isPlaceholder, suppressContentEditableWarning: true, children: jsxRuntime.jsx("p", { children: jsxRuntime.jsx("br", {}) }) }), showMentions && jsxRuntime.jsx(Mentions, { users: users, top: mentionTopPosition, onSelect: (user) => {
|
|
3710
3709
|
setShowMention(false);
|
|
@@ -4813,7 +4812,7 @@ const InputReply = ({ placeHolderText, getSearchUsers, onClickPublishButton, par
|
|
|
4813
4812
|
const response = await getSearchUsers(value);
|
|
4814
4813
|
setUsers(response?.data?.results || response);
|
|
4815
4814
|
};
|
|
4816
|
-
return (jsxRuntime.jsxs(Container$g, { children: [jsxRuntime.jsx(Avatar, { src: imgProfile, size: "32px", style: { marginTop: '
|
|
4815
|
+
return (jsxRuntime.jsxs(Container$g, { children: [jsxRuntime.jsx(Avatar, { src: imgProfile, size: "32px", style: { marginTop: '50px', marginRight: '8px' } }), jsxRuntime.jsxs(InputContainer, { ref: inputRef, style: { ...styles }, children: [jsxRuntime.jsx(InputComment$1, { styles: { width: '100%', marginTop: '22.5px' }, className: "userComment", onChange: (e) => {
|
|
4817
4816
|
handleSearchUsers(e);
|
|
4818
4817
|
}, value: comment, placeholder: placeHolderText, limit: limitInput, showCharacterCounter: true, onContentUnformat: (unformattedValue) => setCommentData(unformattedValue), onContentFormat: (formattedValue) => setCaptureFormattedValue(formattedValue), onSendMentions: (mentions) => setCaptureMentions(mentions), users: users,
|
|
4819
4818
|
//replyMentionedUser={!userMentionedOnReplied && user}
|
|
@@ -14921,18 +14920,10 @@ styled__default["default"].div `
|
|
|
14921
14920
|
function FeedInteraction(props) {
|
|
14922
14921
|
const [openReview, setOpenReview] = React.useState(false);
|
|
14923
14922
|
const [openComments, setOpenComments] = React.useState(false);
|
|
14924
|
-
// const [loadCommentsText, setLoadCommentsText] = useState(props.commentList?.length < 2 ? false : true);
|
|
14925
|
-
// const [showMoreComments, setShowMoreComments] = useState(false);
|
|
14926
|
-
// const [focusComment, setFocusComment] = useState(false);
|
|
14927
|
-
// const [commentData, setCommentData] = useState('');
|
|
14928
14923
|
const [isVisibleComments, setIsVisibleComments] = React.useState(!props?.hideComments);
|
|
14929
14924
|
React.useEffect(() => {
|
|
14930
14925
|
setIsVisibleComments(!props?.hideComments);
|
|
14931
14926
|
}, [props?.hideComments]);
|
|
14932
|
-
// const [stateLatestComment, setStateLatestComment] = useState(props.latestComment)
|
|
14933
|
-
// useEffect(() => {
|
|
14934
|
-
// setStateLatestComment(props.latestComment)
|
|
14935
|
-
// }, [props.latestComment]);
|
|
14936
14927
|
const [stateTotalComments, setStateTotalComments] = React.useState(props.qtdComments);
|
|
14937
14928
|
React.useEffect(() => {
|
|
14938
14929
|
setStateTotalComments(props.qtdComments);
|
|
@@ -14945,19 +14936,6 @@ function FeedInteraction(props) {
|
|
|
14945
14936
|
setOpenComments(!openComments);
|
|
14946
14937
|
setOpenReview(false);
|
|
14947
14938
|
};
|
|
14948
|
-
// const OnLoadCommentsClick = () => {
|
|
14949
|
-
// setLoadCommentsText(false)
|
|
14950
|
-
// setShowMoreComments(true)
|
|
14951
|
-
// }
|
|
14952
|
-
// const OnChangeComment = (e) => {
|
|
14953
|
-
// setCommentData(e.target.value)
|
|
14954
|
-
// setFocusComment(true)
|
|
14955
|
-
// }
|
|
14956
|
-
// const HandleSaveComment = () => {
|
|
14957
|
-
// props.handleSaveCommentBtn(commentData)
|
|
14958
|
-
// setCommentData('')
|
|
14959
|
-
// setFocusComment(false)
|
|
14960
|
-
// }
|
|
14961
14939
|
return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: jsxRuntime.jsxs(Container$2, { style: { ...props.style }, id: props.id, children: [!props.textTotalView && (props.qtdLikes || stateTotalComments) ?
|
|
14962
14940
|
jsxRuntime.jsxs(infoContent, { children: [props.qtdLikes ?
|
|
14963
14941
|
jsxRuntime.jsxs(info, { style: { left: 0 }, children: [" ", jsxRuntime.jsx(ThumbsUpCovered, {}), " \u00A0", props.qtdLikes] })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/FI/feedInteraction/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/FI/feedInteraction/index.tsx"],"names":[],"mappings":";AAcA,UAAU,gBAAgB;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,cAAc,EAAE,MAAM,CAAA;IACtB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,iBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,cAAe,CAAC,EAAE,MAAM,CAAA;IACxB,YAAa,CAAC,EAAE,OAAO,CAAA;IACvB,gBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,UAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,oBAAqB,CAAC,EAAE,OAAO,CAAA;IAE/B,KAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC5B,eAAgB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC7B,mBAAmB,CAAC,EAAE,GAAG,CAAA;IACzB,sBAAsB,CAAC,EAAE,GAAG,CAAA;IAC5B,sBAAuB,CAAC,EAAE,GAAG,CAAA;IAE7B,YAAa,CAAC,EAAE,GAAG,CAAA;IAEnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,yBAAyB,CAAC,EAAE,MAAM,IAAI,CAAA;IAEtC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,iBAAiB,CAAC,EAAE,GAAG,CAAA;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAG,KAAK,EAAG,gBAAgB,eAyGjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputCommentStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/input-comment/inputCommentStyles.ts"],"names":[],"mappings":"AAQA,UAAU,OAAO;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,YAAY,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,UAAU,YAAY;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,mBAAmB,CAAC,EAAE,GAAG,CAAA;CAC5B;AACD,UAAU,QAAQ;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;CAE3B;AAED,eAAO,MAAM,YAAY,yEAoBxB,CAAA;AAED,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"inputCommentStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/input-comment/inputCommentStyles.ts"],"names":[],"mappings":"AAQA,UAAU,OAAO;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,YAAY,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,UAAU,YAAY;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,mBAAmB,CAAC,EAAE,GAAG,CAAA;CAC5B;AACD,UAAU,QAAQ;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;CAE3B;AAED,eAAO,MAAM,YAAY,yEAoBxB,CAAA;AAED,eAAO,MAAM,SAAS,0EAiBrB,CAAA;AAED,eAAO,MAAM,SAAS,oEAiBrB,CAAA;AACD,eAAO,MAAM,eAAe,oEAG3B,CAAA;AACD,eAAO,MAAM,UAAU;mBAA8B,OAAO;SAkB3D,CAAA;AAED,eAAO,MAAM,WAAW,8EAWvB,CAAC;AACF,eAAO,MAAM,mBAAmB,oEAK/B,CAAA;AAGD,eAAO,MAAM,yBAAyB,qEAIrC,CAAA"}
|