frst-components 0.22.56 → 0.22.58

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
@@ -5238,8 +5238,8 @@ const CommentaryBoxReply = ({ commentData, showMoreButtonText, showLessButtonTex
5238
5238
  const handleLoadMoreReplies = () => {
5239
5239
  setShowAnswers(true);
5240
5240
  };
5241
- return (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(CommentaryBoxV2, { hasActionToClickOnAvatar: false, imgProfile: commentData.user?.avatar, loggedInUser: loggedInUser, userName: commentData.user?.name, userOffice: commentData.user?.role_name, userCompany: commentData.user?.company_name, commentId: commentData.id, commentText: commentData.text, commentUuid: commentData.uuid, howLongAgo: commentData.howLongAgo, showMoreText: showMoreButtonText, actionAnswer: () => setShowReplyInput(true), showLessText: showLessButtonText, answerButtonText: answerButtonText, styles: { marginTop: '16px' }, commentTextWithMention: commentData.mentionText, isAuthor: isAuthor, isOwnerPost: isOwnerPost, deleteText: deleteText, editText: editText, showOptions: isAuthor || isOwnerPost, actionDeleteComment: onClickDelete, limitInput: limitInput, cancelButtonText: cancelButtonText, saveButtonText: saveButtonText, orText: orText, limitMessageExceeded: limitMessageExceeded, actionEditComment: onClickEdit, placeHolderText: placeHolderText, getSearchUsers: getSearchUsers, likes: likes, actionLike: onClickLike, actionUnlike: onClickUnlike, showLikeButton: false, likeButtonText: likeButtonText, showInterconnectionLine: replies.length > 0 && showAnswers }), replies.length > 0 && !showAnswers && (jsxRuntime.jsx(ViewReplysButtonContainer, { style: { left: '44px' }, children: jsxRuntime.jsx("span", { onClick: handleLoadMoreReplies, children: `${toViewText} ${replies.length} ${replies.length === 1 ? answerText : answersText}` }) })), showReplyInput && (jsxRuntime.jsx(InputReply, { imgProfile: loggedInUser?.avatar, styles: { width: '100%' }, idInput: `idInput-${commentData.id}`, placeHolderText: placeHolderText, publishButtonText: publishButtonText, limitInput: limitInput, onClickPublishButton: onClickPublishButton, replyMentionedUser: mainCommentUser, getSearchUsers: getSearchUsers, parentId: commentData.id, handleHiddenInput: () => setShowReplyInput(false), group_uuid: group_uuid, limitMessageExceeded: limitMessageExceeded })), showAnswers &&
5242
- replies?.map((reply, index) => (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(CommentaryBoxV2, { styles: { marginTop: '16px' }, userName: reply.user?.name, userOffice: reply.user?.role_name, userCompany: reply.user?.company_name, commentUuid: reply.uuid, commentId: reply.id, commentText: reply.text, commentTextWithMention: reply.mentionText, howLongAgo: reply.howLongAgo, placeHolderText: placeHolderText, cancelButtonText: cancelButtonText, saveButtonText: saveButtonText, likeButtonText: likeButtonText, editText: editText, deleteText: deleteText, orText: orText, limitInput: limitInput, showMoreText: showMoreButtonText, showLessText: showLessButtonText, hasActionToClickOnAvatar: false, likes: reply.likes, loggedInUser: loggedInUser, limitMessageExceeded: limitMessageExceeded, showLikeButton: false, actionLike: onClickLike, actionUnlike: onClickUnlike, getSearchUsers: getSearchUsers, actionEditComment: onClickEdit, actionDeleteComment: onClickDelete, isAuthor: reply.user?.uuid === loggedInUser?.id, isOwnerPost: isAuthor || isOwnerPost || isGoalOwner, showOptions: isAuthor || isOwnerPost || reply.user?.uuid === loggedInUser?.id || isGoalOwner, imgProfile: reply.user?.avatar, showInterconnectionLine: replies.length != index + 1 }, reply.id) })))] }));
5241
+ return (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(CommentaryBoxV2, { hasActionToClickOnAvatar: false, imgProfile: commentData.user?.avatar, loggedInUser: loggedInUser, userName: commentData.user?.name, userOffice: commentData.user?.role_name, userCompany: commentData.user?.company_name, commentId: commentData.id, commentText: commentData.text, commentUuid: commentData.uuid, howLongAgo: commentData.howLongAgo, showMoreText: showMoreButtonText, actionAnswer: () => setShowReplyInput(true), showLessText: showLessButtonText, answerButtonText: answerButtonText, styles: { marginTop: '16px' }, commentTextWithMention: commentData.mentionText, isAuthor: isAuthor, isOwnerPost: isOwnerPost, deleteText: deleteText, editText: editText, showOptions: isAuthor || isOwnerPost, actionDeleteComment: onClickDelete, limitInput: limitInput, cancelButtonText: cancelButtonText, saveButtonText: saveButtonText, orText: orText, limitMessageExceeded: limitMessageExceeded, actionEditComment: onClickEdit, placeHolderText: placeHolderText, getSearchUsers: getSearchUsers, likes: likes, actionLike: onClickLike, actionUnlike: onClickUnlike, showLikeButton: true, likeButtonText: likeButtonText, showInterconnectionLine: replies.length > 0 && showAnswers }), replies.length > 0 && !showAnswers && (jsxRuntime.jsx(ViewReplysButtonContainer, { style: { left: '44px' }, children: jsxRuntime.jsx("span", { onClick: handleLoadMoreReplies, children: `${toViewText} ${replies.length} ${replies.length === 1 ? answerText : answersText}` }) })), showReplyInput && (jsxRuntime.jsx(InputReply, { imgProfile: loggedInUser?.avatar, styles: { width: '100%' }, idInput: `idInput-${commentData.id}`, placeHolderText: placeHolderText, publishButtonText: publishButtonText, limitInput: limitInput, onClickPublishButton: onClickPublishButton, replyMentionedUser: mainCommentUser, getSearchUsers: getSearchUsers, parentId: commentData.id, handleHiddenInput: () => setShowReplyInput(false), group_uuid: group_uuid, limitMessageExceeded: limitMessageExceeded })), showAnswers &&
5242
+ replies?.map((reply, index) => (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(CommentaryBoxV2, { styles: { marginTop: '16px' }, userName: reply.user?.name, userOffice: reply.user?.role_name, userCompany: reply.user?.company_name, commentUuid: reply.uuid, commentId: reply.id, commentText: reply.text, commentTextWithMention: reply.mentionText, howLongAgo: reply.howLongAgo, placeHolderText: placeHolderText, cancelButtonText: cancelButtonText, saveButtonText: saveButtonText, likeButtonText: likeButtonText, editText: editText, deleteText: deleteText, orText: orText, limitInput: limitInput, showMoreText: showMoreButtonText, showLessText: showLessButtonText, hasActionToClickOnAvatar: false, likes: reply.likes, loggedInUser: loggedInUser, limitMessageExceeded: limitMessageExceeded, showLikeButton: true, actionLike: onClickLike, actionUnlike: onClickUnlike, getSearchUsers: getSearchUsers, actionEditComment: onClickEdit, actionDeleteComment: onClickDelete, isAuthor: reply.user?.uuid === loggedInUser?.id, isOwnerPost: isAuthor || isOwnerPost || isGoalOwner, showOptions: isAuthor || isOwnerPost || reply.user?.uuid === loggedInUser?.id || isGoalOwner, imgProfile: reply.user?.avatar, showInterconnectionLine: replies.length != index + 1 }, reply.id) })))] }));
5243
5243
  };
5244
5244
 
5245
5245
  const ThreadComments = ({ mainComment, listReplyComments, placeHolderText, onClickPublishButton, showReplysButtonText, publishButtonText, limitInputs, answerButtonText, loggedInUser, group_uuid, getSearchUsers, showMoreButtonText, showLessButtonText, styles, relationToPhaseText, limitMessageExceeded, size = 5, showMoreReplysButtonText, isGoalOwner, editText, deleteText, onClickDelete, onClickEdit, cancelButtonText, saveButtonText, orText, onClickLike, onClickUnlike, likeButtonText, toViewText, answersText, answerText }) => {
@@ -5399,7 +5399,7 @@ styled__default["default"].div `
5399
5399
  border-radius: 20px;
5400
5400
  `;
5401
5401
 
5402
- function ScrollContainer$1({ children, type, isVisibleControlsButtons, positionArrowButton, marginTopArrrowButton, stepMove, className, styles, sizeArrowButton, marginsArrowButton, horizontalMarginInternScroll, refreshResize, widthProtectClick, hiddenHorizontalScrollBar, colorBackground, paddingLeft }) {
5402
+ function ScrollContainer$1({ children, type, isVisibleControlsButtons, positionArrowButton, marginTopArrrowButton, stepMove, className, styles, sizeArrowButton, marginsArrowButton, horizontalMarginInternScroll, refreshResize, widthProtectClick, hiddenHorizontalScrollBar, colorBackground, paddingLeft, handleClick }) {
5403
5403
  const [actionAreaButtonLeft, setActionAreaButtonLeft] = React.useState(false);
5404
5404
  const [actionAreaButtonRight, setActionAreaButtonRight] = React.useState(false);
5405
5405
  const [iDScroll, setIDScroll] = React.useState(`iDScroll-${randID$1()}`);
@@ -5411,6 +5411,7 @@ function ScrollContainer$1({ children, type, isVisibleControlsButtons, positionA
5411
5411
  objDiv.scrollLeft - stepMove <= 0 ? setIsVisibleArrowButtonLeft(false) : setIsVisibleArrowButtonLeft(true);
5412
5412
  setIsVisibleArrowButtonRight(true);
5413
5413
  objDiv.scrollLeft = objDiv.scrollLeft - stepMove;
5414
+ handleClick();
5414
5415
  }
5415
5416
  };
5416
5417
  const scrollToRight = () => {
@@ -5421,6 +5422,7 @@ function ScrollContainer$1({ children, type, isVisibleControlsButtons, positionA
5421
5422
  ? setIsVisibleArrowButtonRight(false)
5422
5423
  : setIsVisibleArrowButtonRight(true);
5423
5424
  objDiv.scrollLeft = objDiv.scrollLeft + stepMove;
5425
+ handleClick();
5424
5426
  }
5425
5427
  };
5426
5428
  React.useEffect(() => {
@@ -19465,7 +19467,7 @@ function ButtonControll({ onClick, onClickLongPress, isVisible, direction, Arrow
19465
19467
  }
19466
19468
 
19467
19469
  // @ts-nocheck
19468
- const useScroll = (stepMove) => {
19470
+ const useScroll = (stepMove, handleClick) => {
19469
19471
  const scrollRef = React.useRef();
19470
19472
  const [isVisibleLeft, setIsVisibleLeft] = React.useState(false);
19471
19473
  const [isVisibleRight, setIsVisibleRight] = React.useState(false);
@@ -19474,6 +19476,7 @@ const useScroll = (stepMove) => {
19474
19476
  scrollElement.scrollLeft - stepMove <= 0 ? setIsVisibleLeft(false) : setIsVisibleLeft(true);
19475
19477
  setIsVisibleRight(true);
19476
19478
  scrollElement.scrollLeft = scrollElement.scrollLeft - stepMove;
19479
+ handleClick();
19477
19480
  };
19478
19481
  const scrollToRight = () => {
19479
19482
  const scrollElement = scrollRef.current;
@@ -19482,6 +19485,7 @@ const useScroll = (stepMove) => {
19482
19485
  ? setIsVisibleRight(false)
19483
19486
  : setIsVisibleRight(true);
19484
19487
  scrollElement.scrollLeft = scrollElement.scrollLeft + stepMove;
19488
+ handleClick();
19485
19489
  };
19486
19490
  const onClickLongPress = (direction) => {
19487
19491
  let stepMoveLocal = 999999;
@@ -19544,9 +19548,8 @@ const useScroll = (stepMove) => {
19544
19548
  };
19545
19549
  };
19546
19550
 
19547
- function ScrollContainer(props) {
19548
- const { children, isVisibleControlsButtons, stepMove, horizontalMarginInternScroll, verticalMarginInternScroll, marginsArrowButtonHorizontal, marginsArrowButtonVertical, positionArrowButton, className, styles, sizeArrowButton, hiddenHorizontalScrollBar, } = props;
19549
- const { scrollToLeft, scrollToRight, onClickLongPress, isVisibleLeft, isVisibleRight, scrollRef } = useScroll(stepMove);
19551
+ function ScrollContainer({ children, isVisibleControlsButtons, stepMove, horizontalMarginInternScroll, verticalMarginInternScroll, marginsArrowButtonHorizontal, marginsArrowButtonVertical, positionArrowButton, className, styles, sizeArrowButton, hiddenHorizontalScrollBar, handleClick }) {
19552
+ const { scrollToLeft, scrollToRight, onClickLongPress, isVisibleLeft, isVisibleRight, scrollRef } = useScroll(stepMove, handleClick);
19550
19553
  return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: jsxRuntime.jsx("div", { style: { position: 'relative' }, className: className, children: jsxRuntime.jsxs(WrapperHorizontal, { position: positionArrowButton, style: { ...styles }, children: [jsxRuntime.jsx(WrapperContent, { ref: scrollRef, paddingInternHorizontal: horizontalMarginInternScroll, paddingInternVertical: verticalMarginInternScroll, hiddenHorizontalScrollBar: hiddenHorizontalScrollBar, children: jsxRuntime.jsx("div", { style: {
19551
19554
  width: 'fit-content',
19552
19555
  display: 'flex',
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import '../../../shared/global.css';
3
- export default function ScrollContainer(props: any): JSX.Element;
3
+ import { IScrollContainer } from './scrollContainer';
4
+ export default function ScrollContainer({ children, isVisibleControlsButtons, stepMove, horizontalMarginInternScroll, verticalMarginInternScroll, marginsArrowButtonHorizontal, marginsArrowButtonVertical, positionArrowButton, className, styles, sizeArrowButton, hiddenHorizontalScrollBar, handleClick }: IScrollContainer): JSX.Element;
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/DS/scroll-container-v2/index.tsx"],"names":[],"mappings":";AACA,OAAO,4BAA4B,CAAA;AAcnC,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,KAAA,eAoF5C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/DS/scroll-container-v2/index.tsx"],"names":[],"mappings":";AACA,OAAO,4BAA4B,CAAA;AAMnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAQpD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAE,EACvC,QAAQ,EACR,wBAAwB,EACxB,QAAQ,EACR,4BAA4B,EAC5B,0BAA0B,EAC1B,4BAA4B,EAC5B,0BAA0B,EAC1B,mBAAmB,EACnB,SAAS,EACT,MAAM,EACN,eAAe,EACf,yBAAyB,EACzB,WAAW,EACZ,EAAC,gBAAgB,eAuEjB"}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare const useScroll: (stepMove: any) => {
2
+ export declare const useScroll: (stepMove: any, handleClick: any) => {
3
3
  scrollToLeft: () => void;
4
4
  scrollToRight: () => void;
5
5
  onClickLongPress: (direction: any) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"useScroll.d.ts","sourceRoot":"","sources":["../../../../../src/components/DS/scroll-container-v2/useScroll.ts"],"names":[],"mappings":"AACA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAE1D,eAAO,MAAM,SAAS;;;;;;;CA8EnB,CAAA"}
1
+ {"version":3,"file":"useScroll.d.ts","sourceRoot":"","sources":["../../../../../src/components/DS/scroll-container-v2/useScroll.ts"],"names":[],"mappings":"AACA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAE1D,eAAO,MAAM,SAAS;;;;;;;CAgFnB,CAAA"}
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import '../../shared/global.css';
3
3
  import { IScrollContainer } from './scrollContainer';
4
- export default function ScrollContainer({ children, type, isVisibleControlsButtons, positionArrowButton, marginTopArrrowButton, stepMove, className, styles, sizeArrowButton, marginsArrowButton, horizontalMarginInternScroll, refreshResize, widthProtectClick, hiddenHorizontalScrollBar, colorBackground, paddingLeft }: IScrollContainer): JSX.Element;
4
+ export default function ScrollContainer({ children, type, isVisibleControlsButtons, positionArrowButton, marginTopArrrowButton, stepMove, className, styles, sizeArrowButton, marginsArrowButton, horizontalMarginInternScroll, refreshResize, widthProtectClick, hiddenHorizontalScrollBar, colorBackground, paddingLeft, handleClick }: IScrollContainer): JSX.Element;
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/scroll-container/index.tsx"],"names":[],"mappings":";AACA,OAAO,yBAAyB,CAAA;AAMhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAKpD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,QAAQ,EACR,IAAI,EACJ,wBAAwB,EACxB,mBAAmB,EACnB,qBAAqB,EACrB,QAAQ,EACR,SAAS,EACT,MAAM,EACN,eAAe,EACf,kBAAkB,EAClB,4BAA4B,EAC5B,aAAa,EACb,iBAAiB,EACjB,yBAAyB,EACzB,eAAe,EACf,WAAW,EACZ,EAAE,gBAAgB,eA6IlB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/scroll-container/index.tsx"],"names":[],"mappings":";AACA,OAAO,yBAAyB,CAAA;AAMhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAKpD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,QAAQ,EACR,IAAI,EACJ,wBAAwB,EACxB,mBAAmB,EACnB,qBAAqB,EACrB,QAAQ,EACR,SAAS,EACT,MAAM,EACN,eAAe,EACf,kBAAkB,EAClB,4BAA4B,EAC5B,aAAa,EACb,iBAAiB,EACjB,yBAAyB,EACzB,eAAe,EACf,WAAW,EACX,WAAW,EACZ,EAAE,gBAAgB,eA+IlB"}
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.22.56",
4
+ "version": "0.22.58",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",