@pega/cosmos-react-build 2.0.0-dev.20.0 → 2.0.0-dev.21.0

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.
Files changed (92) hide show
  1. package/lib/components/AppShell/AppShell.d.ts.map +1 -1
  2. package/lib/components/AppShell/AppShell.js +41 -44
  3. package/lib/components/AppShell/AppShell.js.map +1 -1
  4. package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
  5. package/lib/components/AppShell/AppShell.styles.js +22 -17
  6. package/lib/components/AppShell/AppShell.styles.js.map +1 -1
  7. package/lib/components/AppShell/AppShell.types.d.ts +14 -9
  8. package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
  9. package/lib/components/AppShell/AppShell.types.js.map +1 -1
  10. package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
  11. package/lib/components/AppShell/AppShellContext.js +5 -3
  12. package/lib/components/AppShell/AppShellContext.js.map +1 -1
  13. package/lib/components/FlowModeller/FlowModeller.d.ts +6 -5
  14. package/lib/components/FlowModeller/FlowModeller.d.ts.map +1 -1
  15. package/lib/components/FlowModeller/FlowModeller.js +184 -61
  16. package/lib/components/FlowModeller/FlowModeller.js.map +1 -1
  17. package/lib/components/FlowModeller/Node/Node.types.d.ts +26 -16
  18. package/lib/components/FlowModeller/Node/Node.types.d.ts.map +1 -1
  19. package/lib/components/FlowModeller/Node/Node.types.js +27 -1
  20. package/lib/components/FlowModeller/Node/Node.types.js.map +1 -1
  21. package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts +10 -5
  22. package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts.map +1 -1
  23. package/lib/components/FlowModeller/Node/NodeTemplate.styles.js +38 -31
  24. package/lib/components/FlowModeller/Node/NodeTemplate.styles.js.map +1 -1
  25. package/lib/components/FlowModeller/Node/NodeTemplates.d.ts +1 -4
  26. package/lib/components/FlowModeller/Node/NodeTemplates.d.ts.map +1 -1
  27. package/lib/components/FlowModeller/Node/NodeTemplates.js +25 -19
  28. package/lib/components/FlowModeller/Node/NodeTemplates.js.map +1 -1
  29. package/lib/components/FlowModeller/NodeLibrary.d.ts +12 -0
  30. package/lib/components/FlowModeller/NodeLibrary.d.ts.map +1 -0
  31. package/lib/components/FlowModeller/NodeLibrary.js +49 -0
  32. package/lib/components/FlowModeller/NodeLibrary.js.map +1 -0
  33. package/lib/components/FlowModeller/Renderer/AddNode.d.ts +10 -0
  34. package/lib/components/FlowModeller/Renderer/AddNode.d.ts.map +1 -0
  35. package/lib/components/FlowModeller/Renderer/AddNode.js +42 -0
  36. package/lib/components/FlowModeller/Renderer/AddNode.js.map +1 -0
  37. package/lib/components/FlowModeller/Renderer/Connector.d.ts +5 -0
  38. package/lib/components/FlowModeller/Renderer/Connector.d.ts.map +1 -0
  39. package/lib/components/FlowModeller/Renderer/Connector.js +50 -0
  40. package/lib/components/FlowModeller/Renderer/Connector.js.map +1 -0
  41. package/lib/components/FlowModeller/Renderer/ConnectorsContainer.d.ts +12 -0
  42. package/lib/components/FlowModeller/Renderer/ConnectorsContainer.d.ts.map +1 -0
  43. package/lib/components/FlowModeller/Renderer/ConnectorsContainer.js +15 -0
  44. package/lib/components/FlowModeller/Renderer/ConnectorsContainer.js.map +1 -0
  45. package/lib/components/FlowModeller/Renderer/Node.d.ts +5 -0
  46. package/lib/components/FlowModeller/Renderer/Node.d.ts.map +1 -0
  47. package/lib/components/FlowModeller/Renderer/Node.js +18 -0
  48. package/lib/components/FlowModeller/Renderer/Node.js.map +1 -0
  49. package/lib/components/FlowModeller/Renderer/NodesContainer.d.ts +8 -0
  50. package/lib/components/FlowModeller/Renderer/NodesContainer.d.ts.map +1 -0
  51. package/lib/components/FlowModeller/Renderer/NodesContainer.js +15 -0
  52. package/lib/components/FlowModeller/Renderer/NodesContainer.js.map +1 -0
  53. package/lib/components/FlowModeller/Renderer/Renderer.d.ts +5 -0
  54. package/lib/components/FlowModeller/Renderer/Renderer.d.ts.map +1 -0
  55. package/lib/components/FlowModeller/Renderer/Renderer.js +17 -0
  56. package/lib/components/FlowModeller/Renderer/Renderer.js.map +1 -0
  57. package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts +18 -0
  58. package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts.map +1 -0
  59. package/lib/components/FlowModeller/Renderer/Renderer.types.js +2 -0
  60. package/lib/components/FlowModeller/Renderer/Renderer.types.js.map +1 -0
  61. package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts +51 -0
  62. package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts.map +1 -0
  63. package/lib/components/FlowModeller/Renderer/Utils/Graph.js +247 -0
  64. package/lib/components/FlowModeller/Renderer/Utils/Graph.js.map +1 -0
  65. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.d.ts +35 -0
  66. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.d.ts.map +1 -0
  67. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js +104 -0
  68. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js.map +1 -0
  69. package/lib/components/FlowModeller/helper.d.ts +22 -0
  70. package/lib/components/FlowModeller/helper.d.ts.map +1 -0
  71. package/lib/components/FlowModeller/helper.js +97 -0
  72. package/lib/components/FlowModeller/helper.js.map +1 -0
  73. package/lib/components/LifeCycle/Stage.d.ts +3 -1
  74. package/lib/components/LifeCycle/Stage.d.ts.map +1 -1
  75. package/lib/components/LifeCycle/Stage.js +9 -2
  76. package/lib/components/LifeCycle/Stage.js.map +1 -1
  77. package/lib/components/LifeCycle/Step.d.ts +4 -1
  78. package/lib/components/LifeCycle/Step.d.ts.map +1 -1
  79. package/lib/components/LifeCycle/Step.js +12 -2
  80. package/lib/components/LifeCycle/Step.js.map +1 -1
  81. package/lib/components/LifeCycle/Task.d.ts +3 -1
  82. package/lib/components/LifeCycle/Task.d.ts.map +1 -1
  83. package/lib/components/LifeCycle/Task.js +11 -2
  84. package/lib/components/LifeCycle/Task.js.map +1 -1
  85. package/lib/components/SummaryCard/SummaryCard.d.ts.map +1 -1
  86. package/lib/components/SummaryCard/SummaryCard.js +2 -1
  87. package/lib/components/SummaryCard/SummaryCard.js.map +1 -1
  88. package/package.json +4 -3
  89. package/lib/components/FlowModeller/Connector.d.ts +0 -30
  90. package/lib/components/FlowModeller/Connector.d.ts.map +0 -1
  91. package/lib/components/FlowModeller/Connector.js +0 -89
  92. package/lib/components/FlowModeller/Connector.js.map +0 -1
@@ -1,89 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { forwardRef } from 'react';
3
- import styled, { css } from 'styled-components';
4
- import { Button, defaultThemeProp, Flex, Icon, Label, useConsolidatedRef, useElement, useI18n, useTheme } from '@pega/cosmos-react-core';
5
- export const StyledWrapper = styled.div(({ withLabel }) => {
6
- return css `
7
- width: 17.5rem;
8
- ${withLabel
9
- ? css `
10
- height: 6rem;
11
- `
12
- : css `
13
- height: 4.5rem;
14
- `}
15
- align-self: center;
16
- `;
17
- });
18
- StyledWrapper.defaultProps = defaultThemeProp;
19
- export const StyledConnector = styled.div `
20
- width: 2rem;
21
- align-self: center;
22
- height: 100%;
23
- svg {
24
- width: 100%;
25
- }
26
- `;
27
- StyledConnector.defaultProps = defaultThemeProp;
28
- export const StyledButtonWrapper = styled.div `
29
- height: 0;
30
- width: 100%;
31
- display: flex;
32
- justify-content: center;
33
- position: relative;
34
- `;
35
- StyledButtonWrapper.defaultProps = defaultThemeProp;
36
- export const StyledDot = styled.div(({ theme }) => {
37
- return css `
38
- top: -3rem;
39
- position: absolute;
40
- color: ${theme.base.colors.slate.medium};
41
- `;
42
- });
43
- StyledDot.defaultProps = defaultThemeProp;
44
- export const StyledButton = styled(Button)(({ theme, active }) => {
45
- return css `
46
- opacity: 0;
47
- top: -3.25rem;
48
- border: 0;
49
- color: ${theme.base.colors.black};
50
- background: ${theme.base.colors.white};
51
- ${active &&
52
- css `
53
- box-shadow: 0 0 0.2rem 0.0625rem ${theme.base.colors.blue.medium};
54
- opacity: 1;
55
- `}
56
- &:hover,
57
- &:active,
58
- &:focus {
59
- opacity: 1;
60
- background: ${theme.base.colors.white};
61
- }
62
- `;
63
- });
64
- StyledButton.defaultProps = defaultThemeProp;
65
- export const StyledLabelWrapper = styled.div `
66
- position: relative;
67
- width: 100%;
68
- `;
69
- StyledLabelWrapper.defaultProps = defaultThemeProp;
70
- export const StyledLabel = styled(Label)(({ theme }) => {
71
- return css `
72
- padding: calc(0.5 * ${theme.base.spacing});
73
- border-radius: 0.25rem;
74
- position: absolute;
75
- bottom: -2.25rem;
76
- background: ${theme.base.colors.slate.medium};
77
- color: ${theme.base.colors.white};
78
- `;
79
- });
80
- StyledLabel.defaultProps = defaultThemeProp;
81
- const Connector = forwardRef(({ label, onAddClick, active = false }, ref) => {
82
- const theme = useTheme();
83
- const t = useI18n();
84
- const [, setButtonEl] = useElement();
85
- const buttonRef = useConsolidatedRef(ref, setButtonEl);
86
- return (_jsx(_Fragment, { children: _jsxs(Flex, { as: StyledWrapper, withLabel: !!label, container: { alignItems: 'center', direction: 'column' }, children: [label && (_jsx(Flex, { as: StyledLabelWrapper, container: { justify: 'center' }, children: _jsx(StyledLabel, { children: label }, void 0) }, void 0)), _jsx(Flex, { "aria-disabled": 'true', as: StyledConnector, children: _jsx("svg", { children: _jsx("path", { strokeWidth: '2', stroke: theme.base.colors.slate.light, d: 'M 16 0 v100' }, void 0) }, void 0) }, void 0), _jsxs(Flex, { as: StyledButtonWrapper, children: [_jsx(StyledDot, { children: _jsx(Icon, { name: 'circle-solid' }, void 0) }, void 0), _jsx(StyledButton, { label: t('add_noun', [t('node').toLowerCase()]), active: active, icon: true, onClick: onAddClick, ref: buttonRef, children: _jsx(Icon, { name: 'plus' }, void 0) }, void 0)] }, void 0)] }, void 0) }, void 0));
87
- });
88
- export default Connector;
89
- //# sourceMappingURL=Connector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Connector.js","sourceRoot":"","sources":["../../../src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,aAAa,EACjB,SAAS,EAAE,CAAC,CAAC,KAAK,EAClB,SAAS,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,aAEvD,KAAK,IAAI,CACR,KAAC,IAAI,IAAC,EAAE,EAAE,kBAAkB,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,YAC5D,KAAC,WAAW,cAAE,KAAK,WAAe,WAC7B,CACR,EACD,KAAC,IAAI,qBAAe,MAAM,EAAC,EAAE,EAAE,eAAe,YAC5C,wBACE,eAAM,WAAW,EAAC,GAAG,EAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,EAAC,aAAa,WAAG,WAC3E,WACD,EAEP,MAAC,IAAI,IAAC,EAAE,EAAE,mBAAmB,aAC3B,KAAC,SAAS,cACR,KAAC,IAAI,IAAC,IAAI,EAAC,cAAc,WAAG,WAClB,EACZ,KAAC,YAAY,IACX,KAAK,EAAE,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,EAC/C,MAAM,EAAE,MAAM,EACd,IAAI,QACJ,OAAO,EAAE,UAAU,EACnB,GAAG,EAAE,SAAS,YAEd,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,WAAG,WACP,YACV,YACF,WACN,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Button,\n defaultThemeProp,\n Flex,\n ForwardProps,\n Icon,\n Label,\n useConsolidatedRef,\n useElement,\n useI18n,\n useTheme\n} from '@pega/cosmos-react-core';\n\nexport interface ConnectorProps {\n /** Unique id of connector */\n id: string;\n /** Label for connector if there */\n label?: string;\n /** Node id which connector should connect to */\n targetNodeId?: string;\n /** Callback for adding the nodes */\n onAddClick?: () => void;\n /** Ref of the connector */\n ref?: Ref<HTMLButtonElement>;\n /** Boolean if the button on the connector is active */\n active?: boolean;\n}\n\nexport const StyledWrapper = styled.div<{ withLabel: boolean }>(({ withLabel }) => {\n return css`\n width: 17.5rem;\n ${withLabel\n ? css`\n height: 6rem;\n `\n : css`\n height: 4.5rem;\n `}\n align-self: center;\n `;\n});\n\nStyledWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledConnector = styled.div`\n width: 2rem;\n align-self: center;\n height: 100%;\n svg {\n width: 100%;\n }\n`;\n\nStyledConnector.defaultProps = defaultThemeProp;\n\nexport const StyledButtonWrapper = styled.div`\n height: 0;\n width: 100%;\n display: flex;\n justify-content: center;\n position: relative;\n`;\n\nStyledButtonWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledDot = styled.div(({ theme }) => {\n return css`\n top: -3rem;\n position: absolute;\n color: ${theme.base.colors.slate.medium};\n `;\n});\n\nStyledDot.defaultProps = defaultThemeProp;\n\nexport const StyledButton = styled(Button)<{ active: ConnectorProps }>(({ theme, active }) => {\n return css`\n opacity: 0;\n top: -3.25rem;\n border: 0;\n color: ${theme.base.colors.black};\n background: ${theme.base.colors.white};\n ${active &&\n css`\n box-shadow: 0 0 0.2rem 0.0625rem ${theme.base.colors.blue.medium};\n opacity: 1;\n `}\n &:hover,\n &:active,\n &:focus {\n opacity: 1;\n background: ${theme.base.colors.white};\n }\n `;\n});\n\nStyledButton.defaultProps = defaultThemeProp;\n\nexport const StyledLabelWrapper = styled.div`\n position: relative;\n width: 100%;\n`;\n\nStyledLabelWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledLabel = styled(Label)(({ theme }) => {\n return css`\n padding: calc(0.5 * ${theme.base.spacing});\n border-radius: 0.25rem;\n position: absolute;\n bottom: -2.25rem;\n background: ${theme.base.colors.slate.medium};\n color: ${theme.base.colors.white};\n `;\n});\n\nStyledLabel.defaultProps = defaultThemeProp;\n\nconst Connector: FunctionComponent<ConnectorProps & ForwardProps> = forwardRef(\n (\n { label, onAddClick, active = false }: PropsWithoutRef<ConnectorProps>,\n ref: ConnectorProps['ref']\n ) => {\n const theme = useTheme();\n const t = useI18n();\n const [, setButtonEl] = useElement<HTMLButtonElement>();\n const buttonRef = useConsolidatedRef(ref, setButtonEl);\n\n return (\n <>\n <Flex\n as={StyledWrapper}\n withLabel={!!label}\n container={{ alignItems: 'center', direction: 'column' }}\n >\n {label && (\n <Flex as={StyledLabelWrapper} container={{ justify: 'center' }}>\n <StyledLabel>{label}</StyledLabel>\n </Flex>\n )}\n <Flex aria-disabled='true' as={StyledConnector}>\n <svg>\n <path strokeWidth='2' stroke={theme.base.colors.slate.light} d='M 16 0 v100' />\n </svg>\n </Flex>\n\n <Flex as={StyledButtonWrapper}>\n <StyledDot>\n <Icon name='circle-solid' />\n </StyledDot>\n <StyledButton\n label={t('add_noun', [t('node').toLowerCase()])}\n active={active}\n icon\n onClick={onAddClick}\n ref={buttonRef}\n >\n <Icon name='plus' />\n </StyledButton>\n </Flex>\n </Flex>\n </>\n );\n }\n);\n\nexport default Connector;\n"]}