frst-components 0.27.4 → 0.27.6
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 +12 -10
- package/dist/src/components/DS/hypotesisAndImpediment/index.d.ts.map +1 -1
- package/dist/src/components/DS/impedimentosTab/index.d.ts +1 -1
- package/dist/src/components/DS/impedimentosTab/index.d.ts.map +1 -1
- package/dist/src/components/DS/impedimentosTab/styles.d.ts +9 -6
- package/dist/src/components/DS/impedimentosTab/styles.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7458,9 +7458,9 @@ const TabWrapper = styled__default["default"]('div') `
|
|
|
7458
7458
|
const Tab$1 = styled__default["default"]('div') `
|
|
7459
7459
|
width: 137px;
|
|
7460
7460
|
padding: 12px 16px;
|
|
7461
|
-
background-color: ${({ theme }) => theme.colors.shadeWhite};
|
|
7461
|
+
background-color: ${({ theme, style, selected }) => style?.backgroundColor || (selected ? '#D2ACE4' : theme.colors.shadeWhite)};
|
|
7462
7462
|
border-radius: 8px 8px 0px 0px;
|
|
7463
|
-
cursor:
|
|
7463
|
+
cursor: pointer;
|
|
7464
7464
|
|
|
7465
7465
|
${(props) => props.selected &&
|
|
7466
7466
|
styled.css `
|
|
@@ -7561,8 +7561,8 @@ const WrapperImpedimentoSelect = styled__default["default"]('div') `
|
|
|
7561
7561
|
gap: 8px;
|
|
7562
7562
|
padding: 8px;
|
|
7563
7563
|
border-radius: 6px;
|
|
7564
|
-
background-color: ${({ theme }) => theme.colors.shadeWhite};
|
|
7565
|
-
cursor:
|
|
7564
|
+
background-color: ${({ theme, style }) => style?.backgroundColor || theme.colors.shadeWhite};
|
|
7565
|
+
cursor: pointer;
|
|
7566
7566
|
|
|
7567
7567
|
p {
|
|
7568
7568
|
font-family: 'PT Sans';
|
|
@@ -7817,7 +7817,7 @@ function Dropdown$1({ isOpen, anchor, onClose, impedimentoList, onClickImpedimen
|
|
|
7817
7817
|
}, children: jsxRuntime.jsx(ContainerDropdown$1, { children: render() }) }));
|
|
7818
7818
|
}
|
|
7819
7819
|
|
|
7820
|
-
function ImpedimentosTab({ maxTabs, tabsList, showAddButton, onSaveNewImpedimento, onSelectedTab, idSelectedTab, currentTab, addButtonText, emptyComponent }) {
|
|
7820
|
+
function ImpedimentosTab({ maxTabs, tabsList, showAddButton, onSaveNewImpedimento, onSelectedTab, idSelectedTab, currentTab, addButtonText, emptyComponent, style }) {
|
|
7821
7821
|
const [selectedTab, setSelectedTab] = React.useState(null);
|
|
7822
7822
|
const [allTabs, setAllTabs] = React.useState([]);
|
|
7823
7823
|
const [onShowTabs, setOnShowTabs] = React.useState([]);
|
|
@@ -7873,7 +7873,7 @@ function ImpedimentosTab({ maxTabs, tabsList, showAddButton, onSaveNewImpediment
|
|
|
7873
7873
|
handleClickTab(impedimento);
|
|
7874
7874
|
};
|
|
7875
7875
|
const renderTabs = (tabInfo, index) => {
|
|
7876
|
-
return (jsxRuntime.jsx(Tab$1, { selected: tabInfo.id === selectedTab?.id, onClick: () => handleClickTab(tabInfo), children: jsxRuntime.jsx("p", { children: tabInfo.title }) }, index));
|
|
7876
|
+
return (jsxRuntime.jsx(Tab$1, { style: style, selected: tabInfo.id === selectedTab?.id, onClick: () => handleClickTab(tabInfo), children: jsxRuntime.jsx("p", { children: tabInfo.title }) }, index));
|
|
7877
7877
|
};
|
|
7878
7878
|
const handleUpdate = () => {
|
|
7879
7879
|
if (editDescription == '')
|
|
@@ -7911,7 +7911,7 @@ function ImpedimentosTab({ maxTabs, tabsList, showAddButton, onSaveNewImpediment
|
|
|
7911
7911
|
setEditDescription(selectedTab.description || '');
|
|
7912
7912
|
}
|
|
7913
7913
|
}, [selectedTab]);
|
|
7914
|
-
return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: allTabs?.length > 0 ? (jsxRuntime.jsxs(ContainerImpedimentos, { children: [jsxRuntime.jsxs(TabWrapper, { children: [jsxRuntime.jsxs(material.Box, { display: 'flex', alignItems: 'center', children: [onShowTabs.map((item, index) => renderTabs(item, index)), onHideTabs.length > 0 ? (jsxRuntime.jsx(Tooltip$2, { content: "Ver todos os impedimentos", direction: "bottom", delay: 200, style: { textAlign: 'center' }, children: jsxRuntime.jsxs(WrapperImpedimentoSelect, { activeSelect: openImpedimentoSelect, onClick: (e) => setImpedimentoSelectAnchor(e.currentTarget), children: [jsxRuntime.jsxs("p", { children: ["Mais ", onHideTabs.length] }), jsxRuntime.jsx(WrapperSelectIcon$1, { isOpenSelect: openImpedimentoSelect, children: jsxRuntime.jsx(ArrrowExpandDropdown, {}) })] }) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, {}))] }), jsxRuntime.jsx(material.Box, { display: 'flex', alignItems: 'center', children: showAddButton ? (jsxRuntime.jsx(Tooltip$2, { content: "Sugerir impedimento", direction: "bottom", delay: 200, style: { textAlign: 'center' }, children: jsxRuntime.jsxs(WrapperAddButton, { activeButton: openAddImpedimento, onClick: handleClickAddImpedimento, children: [jsxRuntime.jsx(AddIcon, {}), jsxRuntime.jsx("p", { children: addButtonText })] }) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, {})) })] }), selectedTab?.id ? (jsxRuntime.jsxs(TabInfoWrapper, { onDoubleClick: () => selectedTab?.showOptions && setIsEdit(true), children: [jsxRuntime.jsx(Tooltip$2, { content: selectedTab?.user_name, direction: "bottom", delay: 200, style: {
|
|
7914
|
+
return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: allTabs?.length > 0 ? (jsxRuntime.jsxs(ContainerImpedimentos, { children: [jsxRuntime.jsxs(TabWrapper, { children: [jsxRuntime.jsxs(material.Box, { display: 'flex', alignItems: 'center', children: [onShowTabs.map((item, index) => renderTabs(item, index)), onHideTabs.length > 0 ? (jsxRuntime.jsx(Tooltip$2, { content: "Ver todos os impedimentos", direction: "bottom", delay: 200, style: { textAlign: 'center' }, children: jsxRuntime.jsxs(WrapperImpedimentoSelect, { activeSelect: openImpedimentoSelect, onClick: (e) => setImpedimentoSelectAnchor(e.currentTarget), style: style, children: [jsxRuntime.jsxs("p", { children: ["Mais ", onHideTabs.length] }), jsxRuntime.jsx(WrapperSelectIcon$1, { isOpenSelect: openImpedimentoSelect, children: jsxRuntime.jsx(ArrrowExpandDropdown, {}) })] }) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, {}))] }), jsxRuntime.jsx(material.Box, { display: 'flex', alignItems: 'center', children: showAddButton ? (jsxRuntime.jsx(Tooltip$2, { content: "Sugerir impedimento", direction: "bottom", delay: 200, style: { textAlign: 'center' }, children: jsxRuntime.jsxs(WrapperAddButton, { activeButton: openAddImpedimento, onClick: handleClickAddImpedimento, children: [jsxRuntime.jsx(AddIcon, {}), jsxRuntime.jsx("p", { children: addButtonText })] }) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, {})) })] }), selectedTab?.id ? (jsxRuntime.jsxs(TabInfoWrapper, { onDoubleClick: () => selectedTab?.showOptions && setIsEdit(true), children: [jsxRuntime.jsx(Tooltip$2, { content: selectedTab?.user_name, direction: "bottom", delay: 200, style: {
|
|
7915
7915
|
fontFamily: 'PT Sans',
|
|
7916
7916
|
fontWeight: 400,
|
|
7917
7917
|
fontSize: '14px',
|
|
@@ -7961,7 +7961,7 @@ function ImpedimentosTab({ maxTabs, tabsList, showAddButton, onSaveNewImpediment
|
|
|
7961
7961
|
}
|
|
7962
7962
|
]
|
|
7963
7963
|
: []),
|
|
7964
|
-
...(selectedTab?.handleDelete
|
|
7964
|
+
...(selectedTab?.handleDelete && !selectedTab?.disabledPriorize // if it's a prioritized impediment, it can't be deleted, but it can be updated
|
|
7965
7965
|
? [
|
|
7966
7966
|
{
|
|
7967
7967
|
description: 'Excluir',
|
|
@@ -8175,7 +8175,7 @@ const HypothesisAndImpediment = ({ description, variant, type, avatar, id, index
|
|
|
8175
8175
|
const isOwnerGoal = authorGoalId === authorId;
|
|
8176
8176
|
const limitCaraterers = variant === 'impediment' ? 365 : 200;
|
|
8177
8177
|
const [isLimitExceeded, setIsLimitExceeded] = React.useState(false);
|
|
8178
|
-
|
|
8178
|
+
let options = [
|
|
8179
8179
|
hasUpdownButtons &&
|
|
8180
8180
|
userLoggedId === authorGoalId && {
|
|
8181
8181
|
startIcon: jsxRuntime.jsx(StarPrioritize, { stroke: type === 'prioritize' ? '#9C9C9C' : '#222222' }),
|
|
@@ -8202,6 +8202,7 @@ const HypothesisAndImpediment = ({ description, variant, type, avatar, id, index
|
|
|
8202
8202
|
color: '#C00F00'
|
|
8203
8203
|
}
|
|
8204
8204
|
].filter((item) => item);
|
|
8205
|
+
options = type === 'prioritize' ? options.filter((item) => item.description !== 'Excluir') : options;
|
|
8205
8206
|
React.useEffect(() => {
|
|
8206
8207
|
setEditDescription(description);
|
|
8207
8208
|
}, [description]);
|
|
@@ -8231,7 +8232,8 @@ const HypothesisAndImpediment = ({ description, variant, type, avatar, id, index
|
|
|
8231
8232
|
const validHasEditHipotesisOrImpediment = React.useMemo(() => {
|
|
8232
8233
|
if (!hasEditHipotesisOrImpediment)
|
|
8233
8234
|
return false;
|
|
8234
|
-
if
|
|
8235
|
+
//author of the goal can edit but also owner of the hipotesis or impediment if it's priorized
|
|
8236
|
+
if (authorGoalId === userLoggedId || (type === 'prioritize' && hasEditHipotesisOrImpediment))
|
|
8235
8237
|
return true;
|
|
8236
8238
|
if (type !== 'prioritize') {
|
|
8237
8239
|
return authorId === userLoggedId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/DS/hypotesisAndImpediment/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iCAAiC,EAAE,MAAM,2BAA2B,CAAA;AAY7E,eAAO,MAAM,uBAAuB,wbA+BjC,iCAAiC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/DS/hypotesisAndImpediment/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iCAAiC,EAAE,MAAM,2BAA2B,CAAA;AAY7E,eAAO,MAAM,uBAAuB,wbA+BjC,iCAAiC,4CAwQnC,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ImpedimentosTabProps } from './impedimentosTab';
|
|
2
|
-
export default function ImpedimentosTab({ maxTabs, tabsList, showAddButton, onSaveNewImpedimento, onSelectedTab, idSelectedTab, currentTab, addButtonText, emptyComponent }: ImpedimentosTabProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default function ImpedimentosTab({ maxTabs, tabsList, showAddButton, onSaveNewImpedimento, onSelectedTab, idSelectedTab, currentTab, addButtonText, emptyComponent, style }: ImpedimentosTabProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/DS/impedimentosTab/index.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,oBAAoB,EAAW,MAAM,mBAAmB,CAAA;AAejE,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACpC,OAAO,EACP,QAAQ,EACR,aAAa,EACb,oBAAoB,EACpB,aAAa,EACb,aAAa,EACb,UAAU,EACV,aAAa,EACb,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/DS/impedimentosTab/index.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,oBAAoB,EAAW,MAAM,mBAAmB,CAAA;AAejE,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACpC,OAAO,EACP,QAAQ,EACR,aAAa,EACb,oBAAoB,EACpB,aAAa,EACb,aAAa,EACb,UAAU,EACV,aAAa,EACb,cAAc,EACd,KAAK,EACR,EAAE,oBAAoB,2CAqUtB"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface ImpedimentoSelectProps {
|
|
3
|
+
activeSelect?: boolean;
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
selected?: boolean;
|
|
6
|
+
}
|
|
1
7
|
export declare const ContainerImpedimentos: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
8
|
export declare const TabWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export declare const Tab: import("styled-components").StyledComponent<"div", any,
|
|
4
|
-
selected: boolean;
|
|
5
|
-
}, never>;
|
|
9
|
+
export declare const Tab: import("styled-components").StyledComponent<"div", any, ImpedimentoSelectProps, never>;
|
|
6
10
|
export declare const TabInfoWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
11
|
export declare const WrapperAddButton: import("styled-components").StyledComponent<"div", any, {
|
|
8
12
|
activeButton: boolean;
|
|
9
13
|
}, never>;
|
|
10
|
-
export declare const WrapperImpedimentoSelect: import("styled-components").StyledComponent<"div", any,
|
|
11
|
-
activeSelect: boolean;
|
|
12
|
-
}, never>;
|
|
14
|
+
export declare const WrapperImpedimentoSelect: import("styled-components").StyledComponent<"div", any, ImpedimentoSelectProps, never>;
|
|
13
15
|
export declare const WrapperSelectIcon: import("styled-components").StyledComponent<"div", any, {
|
|
14
16
|
isOpenSelect: boolean;
|
|
15
17
|
}, never>;
|
|
@@ -18,4 +20,5 @@ export declare const EditWrapper: import("styled-components").StyledComponent<"d
|
|
|
18
20
|
export declare const EditButtons: import("styled-components").StyledComponent<"div", any, {
|
|
19
21
|
buttonColor: string;
|
|
20
22
|
}, never>;
|
|
23
|
+
export {};
|
|
21
24
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/DS/impedimentosTab/styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/DS/impedimentosTab/styles.ts"],"names":[],"mappings":";AAGA,UAAU,sBAAsB;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,eAAO,MAAM,qBAAqB,oEAIjC,CAAA;AAED,eAAO,MAAM,UAAU,oEAItB,CAAA;AAED,eAAO,MAAM,GAAG,wFAoCf,CAAA;AAED,eAAO,MAAM,cAAc,oEAkB1B,CAAA;AAED,eAAO,MAAM,gBAAgB;kBAAgC,OAAO;SAgDnE,CAAA;AAED,eAAO,MAAM,wBAAwB,wFA4BpC,CAAA;AAED,eAAO,MAAM,iBAAiB;kBAAgC,OAAO;SAepE,CAAA;AAED,eAAO,MAAM,eAAe,oEAG3B,CAAA;AAED,eAAO,MAAM,WAAW,oEAKvB,CAAA;AAED,eAAO,MAAM,WAAW;iBAA+B,MAAM;SAQ5D,CAAA"}
|