@qore-project/urshipper-custom-table-component
Advanced tools
Comparing version 1.5.7 to 1.5.8
@@ -8,3 +8,3 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; | ||
const RowItem = (props) => { | ||
const { row, type, status } = props; | ||
const { row, type } = props; | ||
const itemId = useEvaluate(row.id || props.source.itemId); | ||
@@ -18,3 +18,3 @@ const labelActionFour = useEvaluate(props.properties.label_action_4); | ||
return (_createElement(Tr, Object.assign({}, row.getRowProps(), { key: itemId }), | ||
_jsx(Td, Object.assign({ bgColor: "surface.900", zIndex: 0 }, { children: _jsxs(Menu, Object.assign({ isLazy: true }, { children: [_jsx(MenuButton, { as: IconButton, "aria-label": "Options", icon: _jsx(BiDotsHorizontal, {}), variant: "outline", size: "xs", isDisabled: status !== 'Completed' }), _jsx(Portal, { children: _jsxs(MenuList, Object.assign({ zIndex: 10, color: 'text.900' }, { children: [_jsx(MenuItem, Object.assign({ icon: _jsx(BiEdit, {}), onClick: () => actionOnEdit.handleClick() }, { children: "Edit" })), _jsx(MenuItem, Object.assign({ icon: _jsx(FaPrint, { color: "rgba(162, 162, 162, 1)", fontSize: "16px" }), onClick: () => actionIntegrationOne.handleClick() }, { children: labelActionFour })), type == 'admin' && (_jsx(MenuItem, Object.assign({ icon: _jsx(FaFileInvoice, { color: "rgba(162, 162, 162, 1)", fontSize: "16px" }), onClick: () => actionIntegrationTwo.handleClick() }, { children: labelActionFive })))] })) })] })) })), | ||
_jsx(Td, Object.assign({ bgColor: "surface.900", zIndex: 0 }, { children: _jsxs(Menu, Object.assign({ isLazy: true }, { children: [_jsx(MenuButton, { as: IconButton, "aria-label": "Options", icon: _jsx(BiDotsHorizontal, {}), variant: "outline", size: "xs" }), _jsx(Portal, { children: _jsxs(MenuList, Object.assign({ zIndex: 10, color: 'text.900' }, { children: [_jsx(MenuItem, Object.assign({ icon: _jsx(BiEdit, {}), onClick: () => actionOnEdit.handleClick() }, { children: "Edit" })), _jsx(MenuItem, Object.assign({ icon: _jsx(FaPrint, { color: "rgba(162, 162, 162, 1)", fontSize: "16px" }), onClick: () => actionIntegrationOne.handleClick() }, { children: labelActionFour })), type == 'admin' && (_jsx(MenuItem, Object.assign({ icon: _jsx(FaFileInvoice, { color: "rgba(162, 162, 162, 1)", fontSize: "16px" }), onClick: () => actionIntegrationTwo.handleClick() }, { children: labelActionFive })))] })) })] })) })), | ||
row.cells.map((cell, idx) => { | ||
@@ -21,0 +21,0 @@ return (_jsx(Td, Object.assign({}, cell.getCellProps(), { cursor: idx === 1 && 'pointer', onClick: () => idx === 1 && actionOnClick.handleClick() }, { children: cell.render('Cell') }), idx)); |
@@ -93,3 +93,3 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; | ||
prepareRow(row); | ||
return (_jsx(props.components.ListItemVariables, Object.assign({ variables: tableValues[i] }, { children: _jsx(RowItem, Object.assign({ row: row, index: i, type: type, status: "Completed" }, props), row.id) }), row.original.id)); | ||
return (_jsx(props.components.ListItemVariables, Object.assign({ variables: tableValues[i] }, { children: _jsx(RowItem, Object.assign({ row: row, index: i, type: type }, props), row.id) }), row.original.id)); | ||
}) }))] })) })), (selectedRow === null || selectedRow === void 0 ? void 0 : selectedRow.length) >= 1 && (_jsx(Box, Object.assign({ mt: "5" }, { children: _jsxs(Menu, { children: [_jsx(MenuButton, Object.assign({ as: Button, size: "sm", rightIcon: _jsx(BiChevronDown, {}) }, { children: "Actions" })), _jsxs(MenuList, { children: [_jsx(MenuItem, Object.assign({ onClick: () => { | ||
@@ -96,0 +96,0 @@ actionIntegrationOne.handleClick(); |
@@ -130,3 +130,3 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; | ||
}, [tableData, source]); | ||
console.log({ compName: 'Urshipper Custom Table', compVer: '1.5.7' }); | ||
console.log({ compName: 'Urshipper Custom Table', compVer: '1.5.8' }); | ||
return (_jsxs(Box, Object.assign({ w: "100%", p: "5" }, { children: [_jsx(Stack, Object.assign({ my: "5" }, { children: _jsx(Text, Object.assign({ fontWeight: 'bold', fontSize: "xl" }, { children: title })) })), _jsx(UrshipperTable, { columns: columns, data: data, tableData: tableData, type: platformType, userId: userId, props: props })] }))); | ||
@@ -133,0 +133,0 @@ }, |
{ | ||
"name": "@qore-project/urshipper-custom-table-component", | ||
"version": "1.5.7", | ||
"version": "1.5.8", | ||
"module": "lib/urshipper-custom-table.js", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
463093
6046