frst-components 0.23.49 → 0.23.50
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 +42 -50
- package/dist/src/components/form-elements/table/index.d.ts.map +1 -1
- package/dist/src/components/form-elements/table-actions/index.d.ts.map +1 -1
- package/dist/src/components/form-elements/table-actions/parts/CollaboratorAvatar/collaboratorAvatarStyle.d.ts +3 -1
- package/dist/src/components/form-elements/table-actions/parts/CollaboratorAvatar/collaboratorAvatarStyle.d.ts.map +1 -1
- package/dist/src/components/form-elements/table-actions/parts/CollaboratorAvatar/index.d.ts +1 -1
- package/dist/src/components/form-elements/table-actions/parts/CollaboratorAvatar/index.d.ts.map +1 -1
- package/dist/src/components/form-elements/table-actions/tableActionsStyle.d.ts +3 -1
- package/dist/src/components/form-elements/table-actions/tableActionsStyle.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21032,26 +21032,6 @@ function ExpandButton({ isExpanded, onClick }) {
|
|
|
21032
21032
|
|
|
21033
21033
|
function Table({ columns, data, isLoading, lengthElSkeleton = 5, containerStyles, expandItemId, hiddeExpandItemId }) {
|
|
21034
21034
|
const [expandedRows, setExpandedRows] = React.useState([]);
|
|
21035
|
-
/*
|
|
21036
|
-
useEffect(() => {
|
|
21037
|
-
console.log('\nexpandedRows ', expandedRows)
|
|
21038
|
-
console.log('expandItemId ', expandItemId)
|
|
21039
|
-
console.log('hiddeExpandItemId ', hiddeExpandItemId)
|
|
21040
|
-
if (expandItemId !== -1) {
|
|
21041
|
-
setExpandedRows((prevExpandedRows) => ({
|
|
21042
|
-
...prevExpandedRows,
|
|
21043
|
-
[expandItemId]: true
|
|
21044
|
-
}));
|
|
21045
|
-
// setExpandItemId(-1); // Reset expandItemId after updating
|
|
21046
|
-
}
|
|
21047
|
-
if (hiddeExpandItemId !== -1) {
|
|
21048
|
-
setExpandedRows((prevExpandedRows) => ({
|
|
21049
|
-
...prevExpandedRows,
|
|
21050
|
-
[hiddeExpandItemId]: false
|
|
21051
|
-
}));
|
|
21052
|
-
// setExpandItemId(-1); // Reset expandItemId after updating
|
|
21053
|
-
}
|
|
21054
|
-
}, [expandItemId, hiddeExpandItemId, expandedRows])*/
|
|
21055
21035
|
React.useEffect(() => {
|
|
21056
21036
|
if (expandItemId !== -1) {
|
|
21057
21037
|
setExpandedRows((prevExpandedRows) => ({
|
|
@@ -21080,12 +21060,14 @@ function Table({ columns, data, isLoading, lengthElSkeleton = 5, containerStyles
|
|
|
21080
21060
|
const WrapperCollaboratorAvatar = styled__default["default"].div `
|
|
21081
21061
|
width: 100%;
|
|
21082
21062
|
display: flex;
|
|
21083
|
-
justify-content: center
|
|
21063
|
+
justify-content: ${({ align }) => align && align != 'center' ?
|
|
21064
|
+
(align == 'left' ? 'flex-start' : 'flex-end') :
|
|
21065
|
+
'center'};
|
|
21084
21066
|
align-items: center;
|
|
21085
21067
|
`;
|
|
21086
21068
|
|
|
21087
|
-
function CollaboratorAvatar({ src, onPressAvatar, labelTextVisitProfile, uuid }) {
|
|
21088
|
-
return (jsxRuntime.jsx(WrapperCollaboratorAvatar, { 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(Avatar, { size: "32px", src: src ? src : 'https://cdn-images.frstfalconi.cloud/path582.svg', onClick: onPressAvatar && uuid ? () => onPressAvatar(uuid) : null, isActiveClick: !!(onPressAvatar && uuid) }) })) : (jsxRuntime.jsx(Avatar, { size: "32px", src: src ? src : 'https://cdn-images.frstfalconi.cloud/path582.svg', onClick: null, isActiveClick: !!(onPressAvatar && uuid) })) }));
|
|
21069
|
+
function CollaboratorAvatar({ src, onPressAvatar, labelTextVisitProfile, uuid, align }) {
|
|
21070
|
+
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(Avatar, { size: "32px", src: src ? src : 'https://cdn-images.frstfalconi.cloud/path582.svg', onClick: onPressAvatar && uuid ? () => onPressAvatar(uuid) : null, isActiveClick: !!(onPressAvatar && uuid) }) })) : (jsxRuntime.jsx(Avatar, { size: "32px", src: src ? src : 'https://cdn-images.frstfalconi.cloud/path582.svg', onClick: null, isActiveClick: !!(onPressAvatar && uuid) })) }));
|
|
21089
21071
|
}
|
|
21090
21072
|
|
|
21091
21073
|
const WrapperDateLimit = styled__default["default"].div `
|
|
@@ -21293,7 +21275,7 @@ const ButtonActionInbox = styled__default["default"].div `
|
|
|
21293
21275
|
width: 35px;
|
|
21294
21276
|
height: 35px;
|
|
21295
21277
|
border-radius: 20px;
|
|
21296
|
-
background-color: ${({ theme }) => theme.colors.primary1};
|
|
21278
|
+
background-color: ${({ theme, enable }) => enable ? theme.colors.primary1 : theme.colors.neutralsGrey5};
|
|
21297
21279
|
|
|
21298
21280
|
font-family: Work Sans;
|
|
21299
21281
|
font-size: 14px;
|
|
@@ -21302,7 +21284,7 @@ const ButtonActionInbox = styled__default["default"].div `
|
|
|
21302
21284
|
text-align: center;
|
|
21303
21285
|
color: ${({ theme }) => theme.colors.shadeWhite};
|
|
21304
21286
|
|
|
21305
|
-
cursor: pointer;
|
|
21287
|
+
cursor: ${({ enable }) => enable ? "pointer" : "auto"} ;
|
|
21306
21288
|
`;
|
|
21307
21289
|
const WrapperEmptyState = styled__default["default"].div `
|
|
21308
21290
|
display: flex;
|
|
@@ -21361,31 +21343,40 @@ function TableActions({ columns, data, isLoading, lengthElSkeleton = 3, onPressA
|
|
|
21361
21343
|
const [adaptedData, setAdaptedData] = React.useState([]);
|
|
21362
21344
|
React.useEffect(() => {
|
|
21363
21345
|
const newColumns = columns.map((column, index) => {
|
|
21364
|
-
if (
|
|
21365
|
-
|
|
21366
|
-
|
|
21367
|
-
|
|
21368
|
-
|
|
21369
|
-
|
|
21370
|
-
}
|
|
21371
|
-
if (index === columns.length - 1) {
|
|
21372
|
-
width = '5%';
|
|
21373
|
-
align = 'center';
|
|
21374
|
-
}
|
|
21375
|
-
return { title: column, width: width, align: align };
|
|
21346
|
+
if (typeof column !== 'string' && column?.alignHeader) {
|
|
21347
|
+
return {
|
|
21348
|
+
title: column?.title,
|
|
21349
|
+
width: column?.width,
|
|
21350
|
+
align: column?.alignHeader
|
|
21351
|
+
};
|
|
21376
21352
|
}
|
|
21377
21353
|
else {
|
|
21378
|
-
|
|
21379
|
-
|
|
21380
|
-
|
|
21381
|
-
|
|
21382
|
-
|
|
21354
|
+
if (showButtonInbox) {
|
|
21355
|
+
let width = '15%';
|
|
21356
|
+
let align = 'center';
|
|
21357
|
+
if (index === 1) {
|
|
21358
|
+
width = '45%';
|
|
21359
|
+
align = 'left';
|
|
21360
|
+
}
|
|
21361
|
+
if (index === columns.length - 1) {
|
|
21362
|
+
width = '5%';
|
|
21363
|
+
align = 'center';
|
|
21364
|
+
}
|
|
21365
|
+
return { title: column, width: width, align: align };
|
|
21383
21366
|
}
|
|
21384
|
-
|
|
21385
|
-
width = '
|
|
21386
|
-
align = 'center';
|
|
21367
|
+
else {
|
|
21368
|
+
let width = '20%';
|
|
21369
|
+
let align = 'center';
|
|
21370
|
+
if (index === 1) {
|
|
21371
|
+
width = '40%';
|
|
21372
|
+
align = 'left';
|
|
21373
|
+
}
|
|
21374
|
+
if (index === columns.length - 1) {
|
|
21375
|
+
width = '0%';
|
|
21376
|
+
align = 'center';
|
|
21377
|
+
}
|
|
21378
|
+
return { title: column, width: width, align: align };
|
|
21387
21379
|
}
|
|
21388
|
-
return { title: column, width: width, align: align };
|
|
21389
21380
|
}
|
|
21390
21381
|
});
|
|
21391
21382
|
setAdaptedColumns(newColumns);
|
|
@@ -21394,11 +21385,12 @@ function TableActions({ columns, data, isLoading, lengthElSkeleton = 3, onPressA
|
|
|
21394
21385
|
const newData = data.map((item) => ({
|
|
21395
21386
|
id: item.id,
|
|
21396
21387
|
value: [
|
|
21397
|
-
jsxRuntime.jsx(CollaboratorAvatar, { src: item?.value?.[0]?.id ? item?.value?.[0]?.src : item?.value?.[0], onPressAvatar: onPressAvatar, uuid: item?.value?.[0]?.id, labelTextVisitProfile: labelTextVisitProfile }),
|
|
21398
|
-
|
|
21388
|
+
jsxRuntime.jsx(CollaboratorAvatar, { src: item?.value?.[0]?.id ? item?.value?.[0]?.src : item?.value?.[0], onPressAvatar: onPressAvatar, uuid: item?.value?.[0]?.id, labelTextVisitProfile: labelTextVisitProfile, align: typeof columns?.[0] !== 'string' && columns?.[0]?.alignContent }),
|
|
21389
|
+
// @ts-ignore
|
|
21390
|
+
jsxRuntime.jsx("p", { style: { color: '#222', textAlign: columns?.[1]?.alignContent }, children: item.value[1] }),
|
|
21399
21391
|
jsxRuntime.jsx(DateLimit, { date: item?.value?.[2], status: item?.value?.[3] }),
|
|
21400
21392
|
jsxRuntime.jsx(TableBody, { status: item?.value?.[3], label: labelStatus?.[item?.value?.[3]] }),
|
|
21401
|
-
item?.actionButtonInbox ? (jsxRuntime.jsx(WrapperCellButtonInbox, { children: jsxRuntime.jsx(ButtonActionInbox, { onClick: () => item?.actionButtonInbox?.(item?.value?.[0]?.id), children: jsxRuntime.jsx(BallonChatgRondedTips, {}) }) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, {}))
|
|
21393
|
+
item?.actionButtonInbox ? (jsxRuntime.jsx(WrapperCellButtonInbox, { children: jsxRuntime.jsx(ButtonActionInbox, { enable: item?.enableButtonInbox, onClick: () => item?.enableButtonInbox ? item?.actionButtonInbox?.(item?.value?.[0]?.id) : {}, children: jsxRuntime.jsx(BallonChatgRondedTips, {}) }) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, {}))
|
|
21402
21394
|
],
|
|
21403
21395
|
showButtonExpanded: item.showButtonExpanded,
|
|
21404
21396
|
children: item.children
|
|
@@ -21408,7 +21400,7 @@ function TableActions({ columns, data, isLoading, lengthElSkeleton = 3, onPressA
|
|
|
21408
21400
|
const customStyleBorderTable = buttonBottomCreateAction?.mode == 'button' || buttonBottomCreateAction?.mode == 'children' || data?.length == 0
|
|
21409
21401
|
? { borderBottomLeftRadius: '0px', borderBottomRightRadius: '0px' }
|
|
21410
21402
|
: {};
|
|
21411
|
-
return (jsxRuntime.jsxs(styled.ThemeProvider, { theme: FRSTTheme, children: [jsxRuntime.jsx(Table, { columns: adaptedColumns, data: adaptedData, isLoading: isLoading, lengthElSkeleton: lengthElSkeleton, containerStyles: customStyleBorderTable, expandItemId: expandItemId, hiddeExpandItemId: hiddeExpandItemId }), data?.length == 0 && jsxRuntime.jsx(EmptyState, { emptyState: emptyState, customImage: customImageEmptyState }), data?.length !== 0 && buttonBottomCreateAction?.mode && buttonBottomCreateAction?.mode != 'hidden' && (jsxRuntime.jsxs(WrapperEmptyState, { children: [buttonBottomCreateAction?.mode == 'button' && (jsxRuntime.jsx(WrapperEmptyStateCaseButton, { children: jsxRuntime.jsx(WrapperButtonEmpty, { children: jsxRuntime.jsxs(ButtonEmpty, { onClick: () => buttonBottomCreateAction?.handleClickButtonCreate?.(), children: [jsxRuntime.jsx(AddIcon, { fill: FRSTTheme?.colors?.primary1, width: '14', height: '14' }),
|
|
21403
|
+
return (jsxRuntime.jsxs(styled.ThemeProvider, { theme: FRSTTheme, children: [jsxRuntime.jsx(Table, { columns: adaptedColumns, data: adaptedData, isLoading: isLoading, lengthElSkeleton: lengthElSkeleton, containerStyles: customStyleBorderTable, expandItemId: expandItemId, hiddeExpandItemId: hiddeExpandItemId }), !isLoading && data?.length == 0 && jsxRuntime.jsx(EmptyState, { emptyState: emptyState, customImage: customImageEmptyState }), !isLoading && data?.length !== 0 && buttonBottomCreateAction?.mode && buttonBottomCreateAction?.mode != 'hidden' && (jsxRuntime.jsxs(WrapperEmptyState, { children: [buttonBottomCreateAction?.mode == 'button' && (jsxRuntime.jsx(WrapperEmptyStateCaseButton, { children: jsxRuntime.jsx(WrapperButtonEmpty, { children: jsxRuntime.jsxs(ButtonEmpty, { onClick: () => buttonBottomCreateAction?.handleClickButtonCreate?.(), children: [jsxRuntime.jsx(AddIcon, { fill: FRSTTheme?.colors?.primary1, width: '14', height: '14' }), buttonBottomCreateAction?.labelButtonAddAction] }) }) })), buttonBottomCreateAction?.mode == 'children' && jsxRuntime.jsx("div", { children: buttonBottomCreateAction?.children })] }))] }));
|
|
21412
21404
|
}
|
|
21413
21405
|
|
|
21414
21406
|
const pulseAnimation = styled.keyframes `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form-elements/table/index.tsx"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAOnC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAEhC,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,OAAO,EACP,IAAI,EACJ,SAAS,EACT,gBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,iBAAiB,EAClB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form-elements/table/index.tsx"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAOnC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAEhC,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,OAAO,EACP,IAAI,EACJ,SAAS,EACT,gBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,iBAAiB,EAClB,EAAE,MAAM,eAwDR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form-elements/table-actions/index.tsx"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAGnC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form-elements/table-actions/index.tsx"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAGnC,OAAO,EAAc,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAc1D,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,OAAO,EACP,IAAI,EACJ,SAAS,EACT,gBAAoB,EACpB,aAAa,EACb,WAAW,EACX,qBAAqB,EACrB,wBAAwB,EACxB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,EACtB,EAAE,aAAa,eAsHf"}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export declare const WrapperCollaboratorAvatar: import("styled-components").StyledComponent<"div", any, {
|
|
1
|
+
export declare const WrapperCollaboratorAvatar: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
align: any;
|
|
3
|
+
}, never>;
|
|
2
4
|
//# sourceMappingURL=collaboratorAvatarStyle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collaboratorAvatarStyle.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/form-elements/table-actions/parts/CollaboratorAvatar/collaboratorAvatarStyle.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"collaboratorAvatarStyle.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/form-elements/table-actions/parts/CollaboratorAvatar/collaboratorAvatarStyle.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,yBAAyB;;SASrC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ICollaboratorAvatar } from './collaborator-Avatar';
|
|
3
|
-
export default function CollaboratorAvatar({ src, onPressAvatar, labelTextVisitProfile, uuid }: ICollaboratorAvatar): JSX.Element;
|
|
3
|
+
export default function CollaboratorAvatar({ src, onPressAvatar, labelTextVisitProfile, uuid, align }: ICollaboratorAvatar): JSX.Element;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
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,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,eA6BzH"}
|
|
@@ -4,7 +4,9 @@ export declare const Label: import("styled-components").StyledComponent<"div", a
|
|
|
4
4
|
isChecked: boolean;
|
|
5
5
|
}, never>;
|
|
6
6
|
export declare const WrapperCellButtonInbox: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
-
export declare const ButtonActionInbox: import("styled-components").StyledComponent<"div", any, {
|
|
7
|
+
export declare const ButtonActionInbox: import("styled-components").StyledComponent<"div", any, {
|
|
8
|
+
enable: any;
|
|
9
|
+
}, never>;
|
|
8
10
|
export declare const WrapperEmptyState: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
11
|
export declare const WrapperEmptyStateCaseButton: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
10
12
|
export declare const WrapperButtonEmpty: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tableActionsStyle.d.ts","sourceRoot":"","sources":["../../../../../src/components/form-elements/table-actions/tableActionsStyle.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,eAAe,oEAS3B,CAAA;AAED,eAAO,MAAM,WAAW,uEAYvB,CAAA;AAED,eAAO,MAAM,KAAK;eAA2B,OAAO;SAQnD,CAAA;AAED,eAAO,MAAM,sBAAsB,oEAMlC,CAAA;AAED,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"tableActionsStyle.d.ts","sourceRoot":"","sources":["../../../../../src/components/form-elements/table-actions/tableActionsStyle.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,eAAe,oEAS3B,CAAA;AAED,eAAO,MAAM,WAAW,uEAYvB,CAAA;AAED,eAAO,MAAM,KAAK;eAA2B,OAAO;SAQnD,CAAA;AAED,eAAO,MAAM,sBAAsB,oEAMlC,CAAA;AAED,eAAO,MAAM,iBAAiB;;SAiB7B,CAAA;AAED,eAAO,MAAM,iBAAiB,oEAc7B,CAAA;AAED,eAAO,MAAM,2BAA2B,oEAQvC,CAAA;AAED,eAAO,MAAM,kBAAkB,oEAI9B,CAAA;AAED,eAAO,MAAM,WAAW,oEAqBvB,CAAA"}
|