@qore-project/urshipper-custom-table-component
Advanced tools
Comparing version 1.5.11 to 1.5.12
@@ -9,3 +9,3 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; | ||
var _a; | ||
const { row, type, index } = props; | ||
const { row, type, selectedRow } = props; | ||
const itemId = useEvaluate(row.id || props.source.itemId); | ||
@@ -17,3 +17,30 @@ const labelActionFour = useEvaluate(props.properties.label_action_4); | ||
const actionIntegrationOne = props.hooks.useActionTrigger(props.properties.action_4, props.data.page.row, props.pageSource); | ||
const actionIntegrationTwo = props.hooks.useActionTrigger(props.properties.action_5, props.data.page.row, props.pageSource); | ||
// fixed action example | ||
const actionIntegrationTwo = props.hooks.useActionTrigger([ | ||
{ | ||
actionName: 'gcp_xendit_invoice', | ||
notification: { | ||
onSuccess: { | ||
description: 'Your request successfully executed', | ||
title: 'Success', | ||
}, | ||
onFail: { | ||
description: 'Oops, there is something wrong!', | ||
title: 'Failed', | ||
}, | ||
}, | ||
onFail: { type: 'none' }, | ||
payload: { data: JSON.stringify(selectedRow) }, | ||
showNotification: false, | ||
type: 'trigger_action', | ||
}, | ||
{ | ||
pageID: `E_f`, | ||
rowID: `1`, | ||
type: 'jump_to_page', | ||
params: { | ||
rowId: `1`, | ||
}, | ||
}, | ||
], props.data.page.row, props.pageSource); | ||
console.log({ row }); | ||
@@ -20,0 +47,0 @@ return (_createElement(Tr, Object.assign({}, row.getRowProps(), { key: itemId }), |
@@ -92,3 +92,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 }, 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, selectedRow: selectedRow }, 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: () => { | ||
@@ -95,0 +95,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.11' }); | ||
console.log({ compName: 'Urshipper Custom Table', compVer: '1.5.12' }); | ||
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.11", | ||
"version": "1.5.12", | ||
"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
466959
6131