@pega/lists-react 8.0.0-build.44.3 → 8.0.0-build.44.5
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/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.js +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.js.map +1 -1
- package/lib/Core/Components/RenderingEngine/RenderView.d.ts.map +1 -1
- package/lib/Core/Components/RenderingEngine/RenderView.js +7 -2
- package/lib/Core/Components/RenderingEngine/RenderView.js.map +1 -1
- package/package.json +8 -8
|
@@ -39,7 +39,7 @@ function RowActionMenu({ getRsMeta, getExecutionContext }) {
|
|
|
39
39
|
if (Array.isArray(response)) {
|
|
40
40
|
const latestRowContext = getExecutionContext()?.getValue();
|
|
41
41
|
const actions = hydrateActions(response, latestRowContext, refreshRow.bind(null, latestRowContext));
|
|
42
|
-
const arr = [...
|
|
42
|
+
const arr = [...actions, ...staticActions];
|
|
43
43
|
setRowActions(arr);
|
|
44
44
|
}
|
|
45
45
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RowActionMenu.js","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/RowActionMenu.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,YAAY,MAAM,6BAA6B,CAAC;AAEvD,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;CASlC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE;IACzD,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;Q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EAAC,iBAAiB,YAC3C,KAAC,UAAU,IACT,OAAO,QACP,IAAI,EAAE,qBAAqB,EAC3B,QAAQ,QACR,OAAO,EAAC,QAAQ,EAChB,QAAQ,EAAE,CAAC,CAAC,EACZ,IAAI,EAAE;gBACJ,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;gBACvC,SAAS,EAAE,SAAS,CAAC,sBAAsB,CAAC;gBAC5C,OAAO,EAAE,CAAC,cAAc;aACzB,gBAEC,cAAc;gBACZ,CAAC,CAAC,GAAG,qBAAqB,MAAM,cAAc,EAAE;gBAChD,CAAC,CAAC,GAAG,qBAAqB,EAAE,EAEhC,OAAO,EAAE,gBAAgB,EACzB,SAAS,EAAC,YAAY,EACtB,OAAO,EAAE;gBACP,MAAM,EAAE,IAAI;aACb,EACD,IAAI,EAAC,MAAM,GACX,GACe,CACpB,CAAC;AACJ,CAAC;AAED,aAAa,CAAC,SAAS,GAAG;IACxB,SAAS,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACpC,mBAAmB,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;CAC/C,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { useState, useMemo } from 'react';\nimport styled from 'styled-components';\nimport PropTypes from 'prop-types';\n\nimport { MenuButton } from '@pega/cosmos-react-core';\n\nimport useTranslate from '../../../Hooks/useTranslate';\n\nconst StyledActionMenu = styled.div`\n button {\n /* stylelint-disable unit-allowed-list */\n height: 25px;\n min-height: 25px;\n > svg {\n height: 70%;\n }\n }\n`;\n\nconst hydrateActions = (actions, rowContext, refreshRow) => {\n return actions.map(action => ({\n ...action,\n primary: action.text,\n onClick: () => {\n action.onClick(rowContext, refreshRow);\n }\n }));\n};\n\nfunction RowActionMenu({ getRsMeta, getExecutionContext }) {\n const [translate] = useTranslate();\n const { getValue, getRowActionDetails, refreshRow } = getExecutionContext();\n const [rowActions, setRowActions] = useState([]);\n const [actionsFetched, setActionsFetched] = useState(false);\n const rowContext = getValue();\n const { rowActions: tableMetaRowActions } = getRsMeta();\n const staticActions = useMemo(\n () => hydrateActions(tableMetaRowActions ?? [], rowContext, refreshRow.bind(null, rowContext)),\n [rowContext]\n );\n\n const fetchCaseDeatils = () => {\n setActionsFetched(false);\n const currentRowContext = getExecutionContext()?.getValue();\n getRowActionDetails(currentRowContext)\n .then(response => {\n if (Array.isArray(response)) {\n const latestRowContext = getExecutionContext()?.getValue();\n const actions = hydrateActions(\n response,\n latestRowContext,\n refreshRow.bind(null, latestRowContext)\n );\n const arr = [...actions, ...staticActions];\n setRowActions(arr);\n }\n })\n .finally(() => {\n setActionsFetched(true);\n });\n };\n const rowHeaderValue = getExecutionContext().getRowHeader()?.getValue();\n const translatedActionsText = translate('Actions');\n\n return (\n <StyledActionMenu className='row-action-menu'>\n <MenuButton\n compact\n text={translatedActionsText}\n iconOnly\n variant='simple'\n tabIndex={-1}\n menu={{\n items: actionsFetched ? rowActions : [],\n emptyText: translate('No actions available'),\n loading: !actionsFetched\n }}\n aria-label={\n rowHeaderValue\n ? `${translatedActionsText} - ${rowHeaderValue}`\n : `${translatedActionsText}`\n }\n onClick={fetchCaseDeatils}\n placement='bottom-end'\n popover={{\n portal: true\n }}\n icon='more'\n />\n </StyledActionMenu>\n );\n}\n\nRowActionMenu.propTypes = {\n getRsMeta: PropTypes.func.isRequired,\n getExecutionContext: PropTypes.func.isRequired\n};\n\nexport default RowActionMenu;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderView.d.ts","sourceRoot":"","sources":["../../../../Core/Components/RenderingEngine/RenderView.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"RenderView.d.ts","sourceRoot":"","sources":["../../../../Core/Components/RenderingEngine/RenderView.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAoBlE,iBAAS,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,WAAW,CAAC,IAAI,CAAA;CAAE,kDAW3F;;AAED,wBAAgC"}
|
|
@@ -7,8 +7,13 @@ import { defaultThemeProp } from '@pega/cosmos-react-core';
|
|
|
7
7
|
import { resolveViewComponent } from './ComponentResolverFactory';
|
|
8
8
|
const StyledDiv = styled.div(({ theme }) => {
|
|
9
9
|
return `
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
// FIXME: Ideally, the meta passed to the table should reflect whether the PromotedFilters are configured or not. But, currently RS doesn't support change in meta after load.
|
|
11
|
+
// Handling it via CSS for now. Once meta update is possible in RS, the consumer of RS should make sure that correct externalFilters are set in meta.
|
|
12
|
+
// Add margin only if some content is rendered in render view. Adding span as RS by default injects a span for external renderers.
|
|
13
|
+
&:has(> span > *) {
|
|
14
|
+
margin-block: ${theme.base.spacing};
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
12
17
|
});
|
|
13
18
|
StyledDiv.defaultProps = defaultThemeProp;
|
|
14
19
|
function RenderView({ view, type }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderView.js","sourceRoot":"","sources":["../../../../Core/Components/RenderingEngine/RenderView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,qEAAqE;AACrE,aAAa;AAEb,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACzC,OAAO
|
|
1
|
+
{"version":3,"file":"RenderView.js","sourceRoot":"","sources":["../../../../Core/Components/RenderingEngine/RenderView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,qEAAqE;AACrE,aAAa;AAEb,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACzC,OAAO;;;;;sBAKa,KAAK,CAAC,IAAI,CAAC,OAAO;;GAErC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,SAAS,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAC1C,SAAS,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,EAA4D;IAC1F,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAC9D,MAAM,aAAa,GAAG;QACpB,GAAG,UAAU,EAAE;QACf,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAChE,IAAI;KACL,CAAC;IAEF,MAAM,YAAY,GAAG,oBAAoB,CAAC,IAAI,EAAE,aAAa,EAAE,aAAa,CAAC,CAAC;IAE9E,OAAO,YAAY,CAAC,CAAC,CAAC,KAAC,SAAS,oBAAe,IAAI,YAAG,YAAY,GAAa,CAAC,CAAC,CAAC,IAAI,CAAC;AACzF,CAAC;AAED,eAAe,IAAI,CAAC,UAAU,CAAC,CAAC","sourcesContent":["import { memo } from 'react';\nimport styled from 'styled-components';\n\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\nimport { defaultThemeProp } from '@pega/cosmos-react-core';\n\n// TODO remove ts-ignore once ComponentResolverFactory migrated to TS\n// @ts-ignore\n\nimport { resolveViewComponent } from './ComponentResolverFactory';\n\nconst StyledDiv = styled.div(({ theme }) => {\n return `\n // FIXME: Ideally, the meta passed to the table should reflect whether the PromotedFilters are configured or not. But, currently RS doesn't support change in meta after load.\n // Handling it via CSS for now. Once meta update is possible in RS, the consumer of RS should make sure that correct externalFilters are set in meta.\n // Add margin only if some content is rendered in render view. Adding span as RS by default injects a span for external renderers.\n &:has(> span > *) {\n margin-block: ${theme.base.spacing};\n }\n `;\n});\n\nStyledDiv.defaultProps = defaultThemeProp;\nfunction RenderView({ view, type }: { view: RsCoreTypes.View; type: keyof RsCoreTypes.Meta }) {\n const { state, meta, getContext, renderFactory, rsID } = view;\n const engineContext = {\n ...getContext(),\n [String(meta[type])]: state?.externalState?.[String(meta[type])],\n rsID\n };\n\n const resolvedView = resolveViewComponent(type, renderFactory, engineContext);\n\n return resolvedView ? <StyledDiv data-test-id={type}>{resolvedView}</StyledDiv> : null;\n}\n\nexport default memo(RenderView);\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/lists-react",
|
|
3
|
-
"version": "8.0.0-build.44.
|
|
3
|
+
"version": "8.0.0-build.44.5",
|
|
4
4
|
"description": "Repeating view structures such as Table, Gallery(Repeating layouts), Kanban etc.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Pegasystems",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"build": "tsc -b tsconfig.build.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@pega/cosmos-react-condition-builder": "8.0.0-build.44.
|
|
18
|
-
"@pega/cosmos-react-core": "8.0.0-build.44.
|
|
19
|
-
"@pega/cosmos-react-rte": "8.0.0-build.44.
|
|
20
|
-
"@pega/cosmos-react-work": "8.0.0-build.44.
|
|
17
|
+
"@pega/cosmos-react-condition-builder": "8.0.0-build.44.5",
|
|
18
|
+
"@pega/cosmos-react-core": "8.0.0-build.44.5",
|
|
19
|
+
"@pega/cosmos-react-rte": "8.0.0-build.44.5",
|
|
20
|
+
"@pega/cosmos-react-work": "8.0.0-build.44.5",
|
|
21
21
|
"@types/lodash.get": "^4.4.9",
|
|
22
22
|
"@types/react": "^17.0.62 || ^18.3.3",
|
|
23
23
|
"@types/react-dom": "^17.0.20 || ^18.3.0",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"dayjs": "^1.11.10",
|
|
26
26
|
"fast-deep-equal": "^3.1.3",
|
|
27
27
|
"lodash.get": "^4.4.2",
|
|
28
|
-
"pega-repeating-structures-core": "npm:@pega/lists-core@8.0.0-build.44.
|
|
29
|
-
"pega-ui-list-data-apis": "npm:@pega/lists-core-utils@8.0.0-build.44.
|
|
28
|
+
"pega-repeating-structures-core": "npm:@pega/lists-core@8.0.0-build.44.5",
|
|
29
|
+
"pega-ui-list-data-apis": "npm:@pega/lists-core-utils@8.0.0-build.44.5",
|
|
30
30
|
"polished": "^4.1.0",
|
|
31
31
|
"prop-types": "^15.8.1",
|
|
32
32
|
"react": "^17.0.0 || ^18.0.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@testing-library/react": "^16.0.0",
|
|
46
46
|
"@testing-library/user-event": "^14.5.1",
|
|
47
47
|
"jest-axe": "^8.0.0",
|
|
48
|
-
"srs-utils": "8.0.0-build.44.
|
|
48
|
+
"srs-utils": "8.0.0-build.44.5",
|
|
49
49
|
"typescript": "~5.5.4"
|
|
50
50
|
}
|
|
51
51
|
}
|