frst-components 0.23.83 → 0.23.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
|
@@ -7579,6 +7579,18 @@ function ImpedimentosTab({ maxTabs, tabsList, showAddButton, onSaveNewImpediment
|
|
|
7579
7579
|
const renderTabs = (tabInfo, index) => {
|
|
7580
7580
|
return (jsxRuntime.jsx(Tab, { selected: tabInfo.id === selectedTab?.id, onClick: () => handleClickTab(tabInfo), children: jsxRuntime.jsx("p", { children: tabInfo.title }) }, index));
|
|
7581
7581
|
};
|
|
7582
|
+
const handleUpdate = () => {
|
|
7583
|
+
if (editDescription == '')
|
|
7584
|
+
return;
|
|
7585
|
+
setDisplayDescription(editDescription);
|
|
7586
|
+
let editTab = { ...selectedTab, description: editDescription };
|
|
7587
|
+
selectedTab?.handleEdit(editTab);
|
|
7588
|
+
setIsEdit(false);
|
|
7589
|
+
};
|
|
7590
|
+
const handleCancelUpdate = () => {
|
|
7591
|
+
setEditDescription(displayDescription);
|
|
7592
|
+
setIsEdit(false);
|
|
7593
|
+
};
|
|
7582
7594
|
const startEditing = () => {
|
|
7583
7595
|
setEditDescription(displayDescription);
|
|
7584
7596
|
};
|
|
@@ -7615,21 +7627,12 @@ function ImpedimentosTab({ maxTabs, tabsList, showAddButton, onSaveNewImpediment
|
|
|
7615
7627
|
}
|
|
7616
7628
|
}, onKeyDown: (event) => {
|
|
7617
7629
|
if (event.key === 'Enter') {
|
|
7618
|
-
|
|
7619
|
-
return;
|
|
7620
|
-
setDisplayDescription(editDescription);
|
|
7621
|
-
let editTab = { ...selectedTab, description: editDescription };
|
|
7622
|
-
selectedTab?.handleEdit(editTab);
|
|
7623
|
-
setIsEdit(false);
|
|
7630
|
+
handleUpdate();
|
|
7624
7631
|
}
|
|
7625
7632
|
if (event.key === 'Escape') {
|
|
7626
|
-
|
|
7627
|
-
setIsEdit(false);
|
|
7633
|
+
handleCancelUpdate();
|
|
7628
7634
|
}
|
|
7629
|
-
}, onBlur:
|
|
7630
|
-
setEditDescription(displayDescription);
|
|
7631
|
-
setIsEdit(false);
|
|
7632
|
-
} }) })
|
|
7635
|
+
}, onBlur: handleUpdate }) })
|
|
7633
7636
|
:
|
|
7634
7637
|
jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("p", { children: displayDescription }), selectedTab?.showOptions ?
|
|
7635
7638
|
jsxRuntime.jsx(WrapperMenuMore, { children: jsxRuntime.jsx(MenuMore, { options: [
|
|
@@ -21935,7 +21938,10 @@ function TableBody$1({ data, expandedRows, handleExpandClick, columns }) {
|
|
|
21935
21938
|
return (jsxRuntime.jsx("tbody", { children: data.map((row, index) => (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx(TableRow, { row: row, index: index, columns: columns, handleExpandClick: handleExpandClick, isExpanded: !!expandedRows?.[row?.id] }), jsxRuntime.jsx(ExpandableRow, { index: index, row: row, columns: columns, isExpanded: !!expandedRows?.[row?.id] })] }, row.id))) }));
|
|
21936
21939
|
}
|
|
21937
21940
|
function TableRow({ row, index, handleExpandClick, isExpanded, columns }) {
|
|
21938
|
-
return (jsxRuntime.jsxs(WrapperDataRow, { index: index, children: [row.value.map((cell, index) => (jsxRuntime.jsx(TableDataRowItem, { children: cell }, index))), row.showButtonExpanded ? (jsxRuntime.jsx("td", { children: jsxRuntime.jsx(ExpandButton, { isExpanded: isExpanded, onClick: () =>
|
|
21941
|
+
return (jsxRuntime.jsxs(WrapperDataRow, { index: index, onClick: () => row.showButtonExpanded && handleExpandClick(row.id), style: { cursor: row.showButtonExpanded ? 'pointer' : 'auto' }, children: [row.value.map((cell, index) => (jsxRuntime.jsx(TableDataRowItem, { children: cell }, index))), row.showButtonExpanded ? (jsxRuntime.jsx("td", { children: jsxRuntime.jsx(ExpandButton, { isExpanded: isExpanded, onClick: (event) => {
|
|
21942
|
+
handleExpandClick(row.id);
|
|
21943
|
+
event.stopPropagation();
|
|
21944
|
+
} }) })) : (jsxRuntime.jsx("td", {}))] }));
|
|
21939
21945
|
}
|
|
21940
21946
|
function ExpandableRow({ index, row, columns, isExpanded }) {
|
|
21941
21947
|
return (jsxRuntime.jsx(TableDataChildrenItem, { index: index, children: jsxRuntime.jsx("td", { colSpan: columns.length + 1, children: jsxRuntime.jsx(TableDataChildrenControlExpand, { index: index, isExpanded: isExpanded, children: row.children }) }) }));
|
|
@@ -21981,7 +21987,10 @@ const WrapperCollaboratorAvatar = styled__default["default"].div `
|
|
|
21981
21987
|
`;
|
|
21982
21988
|
|
|
21983
21989
|
function CollaboratorAvatar({ src, onPressAvatar, labelTextVisitProfile, uuid, align }) {
|
|
21984
|
-
return (jsxRuntime.jsx(WrapperCollaboratorAvatar, { align: align, children: onPressAvatar && uuid ? (jsxRuntime.jsx(Tooltip$2, { direction: "bottom", content: labelTextVisitProfile ? labelTextVisitProfile : 'Visitar perfil', trigger: "hover", width: "fit-content", height: "32px", style: { top: '10px', textAlign: 'center', whiteSpace: 'nowrap' }, children: jsxRuntime.jsx(
|
|
21990
|
+
return (jsxRuntime.jsx(WrapperCollaboratorAvatar, { align: align, children: onPressAvatar && uuid ? (jsxRuntime.jsx(Tooltip$2, { direction: "bottom", content: labelTextVisitProfile ? labelTextVisitProfile : 'Visitar perfil', trigger: "hover", width: "fit-content", height: "32px", style: { top: '10px', textAlign: 'center', whiteSpace: 'nowrap' }, children: jsxRuntime.jsx("div", { onClick: (event) => {
|
|
21991
|
+
event.stopPropagation();
|
|
21992
|
+
onPressAvatar?.(uuid);
|
|
21993
|
+
}, children: jsxRuntime.jsx(Avatar, { size: "32px", src: src ? src : 'https://cdn-images.frstfalconi.cloud/path582.svg', isActiveClick: !!(onPressAvatar && uuid) }) }) })) : (jsxRuntime.jsx(Avatar, { size: "32px", src: src ? src : 'https://cdn-images.frstfalconi.cloud/path582.svg', onClick: null, isActiveClick: !!(onPressAvatar && uuid) })) }));
|
|
21985
21994
|
}
|
|
21986
21995
|
|
|
21987
21996
|
const WrapperDateLimit = styled__default["default"].div `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/DS/impedimentosTab/index.tsx"],"names":[],"mappings":"AAUA,OAAO,EACH,oBAAoB,EAEvB,MAAM,mBAAmB,CAAA;AAa1B,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACpC,OAAO,EACP,QAAQ,EACR,aAAa,EACb,oBAAoB,EACpB,aAAa,EACb,aAAa,EACb,UAAU,EACb,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/DS/impedimentosTab/index.tsx"],"names":[],"mappings":"AAUA,OAAO,EACH,oBAAoB,EAEvB,MAAM,mBAAmB,CAAA;AAa1B,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACpC,OAAO,EACP,QAAQ,EACR,aAAa,EACb,oBAAoB,EACpB,aAAa,EACb,aAAa,EACb,UAAU,EACb,EAAE,oBAAoB,2CAmQtB"}
|
package/dist/src/components/form-elements/table-actions/parts/CollaboratorAvatar/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/form-elements/table-actions/parts/CollaboratorAvatar/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAI3D,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EAAE,GAAG,EAAE,aAAa,EAAE,qBAAqB,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/form-elements/table-actions/parts/CollaboratorAvatar/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAI3D,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EAAE,GAAG,EAAE,aAAa,EAAE,qBAAqB,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,mBAAmB,2CAiCzH"}
|