@pega/cosmos-react-build 2.0.0-rc.2 → 2.0.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.
- package/lib/components/FlowModeller/{Renderer/AddNode.d.ts → AddNode.d.ts} +6 -0
- package/lib/components/FlowModeller/AddNode.d.ts.map +1 -0
- package/lib/components/FlowModeller/AddNode.js +62 -0
- package/lib/components/FlowModeller/AddNode.js.map +1 -0
- package/lib/components/FlowModeller/FlowModeller.d.ts +2 -2
- package/lib/components/FlowModeller/FlowModeller.d.ts.map +1 -1
- package/lib/components/FlowModeller/FlowModeller.js +96 -107
- package/lib/components/FlowModeller/FlowModeller.js.map +1 -1
- package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts +4 -8
- package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts.map +1 -1
- package/lib/components/FlowModeller/Node/NodeTemplate.styles.js +10 -10
- package/lib/components/FlowModeller/Node/NodeTemplate.styles.js.map +1 -1
- package/lib/components/FlowModeller/Node/NodeTemplates.d.ts.map +1 -1
- package/lib/components/FlowModeller/Node/NodeTemplates.js +12 -3
- package/lib/components/FlowModeller/Node/NodeTemplates.js.map +1 -1
- package/lib/components/FlowModeller/NodeLibrary.d.ts +2 -1
- package/lib/components/FlowModeller/NodeLibrary.d.ts.map +1 -1
- package/lib/components/FlowModeller/NodeLibrary.js +10 -8
- package/lib/components/FlowModeller/NodeLibrary.js.map +1 -1
- package/lib/components/FlowModeller/Renderer/Connectors.d.ts +13 -0
- package/lib/components/FlowModeller/Renderer/Connectors.d.ts.map +1 -0
- package/lib/components/FlowModeller/Renderer/{Connector.js → Connectors.js} +13 -16
- package/lib/components/FlowModeller/Renderer/Connectors.js.map +1 -0
- package/lib/components/FlowModeller/Renderer/Nodes.d.ts +9 -0
- package/lib/components/FlowModeller/Renderer/Nodes.d.ts.map +1 -0
- package/lib/components/FlowModeller/Renderer/Nodes.js +25 -0
- package/lib/components/FlowModeller/Renderer/Nodes.js.map +1 -0
- package/lib/components/FlowModeller/Renderer/Renderer.js +4 -4
- package/lib/components/FlowModeller/Renderer/Renderer.js.map +1 -1
- package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts +4 -4
- package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts.map +1 -1
- package/lib/components/FlowModeller/Renderer/Renderer.types.js.map +1 -1
- package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts +6 -3
- package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts.map +1 -1
- package/lib/components/FlowModeller/Renderer/Utils/Graph.js +55 -0
- package/lib/components/FlowModeller/Renderer/Utils/Graph.js.map +1 -1
- package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.d.ts.map +1 -1
- package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js +18 -15
- package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js.map +1 -1
- package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.d.ts +24 -0
- package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.d.ts.map +1 -0
- package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.js +152 -0
- package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.js.map +1 -0
- package/lib/components/FlowModeller/Utils/AddNodeUtils.d.ts +16 -0
- package/lib/components/FlowModeller/Utils/AddNodeUtils.d.ts.map +1 -0
- package/lib/components/FlowModeller/Utils/AddNodeUtils.js +118 -0
- package/lib/components/FlowModeller/Utils/AddNodeUtils.js.map +1 -0
- package/lib/components/FlowModeller/helper.d.ts +1 -0
- package/lib/components/FlowModeller/helper.d.ts.map +1 -1
- package/lib/components/FlowModeller/helper.js +38 -7
- package/lib/components/FlowModeller/helper.js.map +1 -1
- package/lib/components/FlowModeller/index.d.ts +8 -1
- package/lib/components/FlowModeller/index.d.ts.map +1 -1
- package/lib/components/FlowModeller/index.js +6 -0
- package/lib/components/FlowModeller/index.js.map +1 -1
- package/lib/components/LifeCycle/Stage.d.ts.map +1 -1
- package/lib/components/LifeCycle/Stage.js +0 -4
- package/lib/components/LifeCycle/Stage.js.map +1 -1
- package/lib/components/LifeCycle/index.d.ts +1 -1
- package/lib/components/LifeCycle/index.d.ts.map +1 -1
- package/lib/components/LifeCycle/index.js.map +1 -1
- package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
- package/lib/components/PageTemplates/PageTemplates.js +21 -1
- package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
- package/lib/components/Workbench/ConfigurationPanel.d.ts +5 -0
- package/lib/components/Workbench/ConfigurationPanel.d.ts.map +1 -0
- package/lib/components/Workbench/ConfigurationPanel.js +21 -0
- package/lib/components/Workbench/ConfigurationPanel.js.map +1 -0
- package/lib/components/Workbench/Toolbar.d.ts +14 -0
- package/lib/components/Workbench/Toolbar.d.ts.map +1 -0
- package/lib/components/Workbench/Toolbar.js +14 -0
- package/lib/components/Workbench/Toolbar.js.map +1 -0
- package/lib/components/Workbench/UtilityPanel.d.ts +7 -0
- package/lib/components/Workbench/UtilityPanel.d.ts.map +1 -0
- package/lib/components/Workbench/UtilityPanel.js +12 -0
- package/lib/components/Workbench/UtilityPanel.js.map +1 -0
- package/lib/components/Workbench/Workbench.d.ts +6 -0
- package/lib/components/Workbench/Workbench.d.ts.map +1 -0
- package/lib/components/Workbench/Workbench.js +24 -0
- package/lib/components/Workbench/Workbench.js.map +1 -0
- package/lib/components/Workbench/Workbench.styles.d.ts +10 -0
- package/lib/components/Workbench/Workbench.styles.d.ts.map +1 -0
- package/lib/components/Workbench/Workbench.styles.js +72 -0
- package/lib/components/Workbench/Workbench.styles.js.map +1 -0
- package/lib/components/Workbench/Workbench.types.d.ts +49 -0
- package/lib/components/Workbench/Workbench.types.d.ts.map +1 -0
- package/lib/components/Workbench/Workbench.types.js +2 -0
- package/lib/components/Workbench/Workbench.types.js.map +1 -0
- package/lib/components/Workbench/index.d.ts +2 -0
- package/lib/components/Workbench/index.d.ts.map +1 -0
- package/lib/components/Workbench/index.js +2 -0
- package/lib/components/Workbench/index.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
- package/lib/components/FlowModeller/Renderer/AddNode.d.ts.map +0 -1
- package/lib/components/FlowModeller/Renderer/AddNode.js +0 -42
- package/lib/components/FlowModeller/Renderer/AddNode.js.map +0 -1
- package/lib/components/FlowModeller/Renderer/Connector.d.ts +0 -5
- package/lib/components/FlowModeller/Renderer/Connector.d.ts.map +0 -1
- package/lib/components/FlowModeller/Renderer/Connector.js.map +0 -1
- package/lib/components/FlowModeller/Renderer/ConnectorsContainer.d.ts +0 -12
- package/lib/components/FlowModeller/Renderer/ConnectorsContainer.d.ts.map +0 -1
- package/lib/components/FlowModeller/Renderer/ConnectorsContainer.js +0 -15
- package/lib/components/FlowModeller/Renderer/ConnectorsContainer.js.map +0 -1
- package/lib/components/FlowModeller/Renderer/Node.d.ts +0 -5
- package/lib/components/FlowModeller/Renderer/Node.d.ts.map +0 -1
- package/lib/components/FlowModeller/Renderer/Node.js +0 -18
- package/lib/components/FlowModeller/Renderer/Node.js.map +0 -1
- package/lib/components/FlowModeller/Renderer/NodesContainer.d.ts +0 -8
- package/lib/components/FlowModeller/Renderer/NodesContainer.d.ts.map +0 -1
- package/lib/components/FlowModeller/Renderer/NodesContainer.js +0 -15
- package/lib/components/FlowModeller/Renderer/NodesContainer.js.map +0 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ReactNode, Ref } from 'react';
|
|
2
|
+
import type { Action } from '@pega/cosmos-react-core';
|
|
3
|
+
import { IconNames } from '@pega/cosmos-react-core/lib/components/Icon/iconNames';
|
|
4
|
+
export declare type ActionName = 'undo' | 'redo';
|
|
5
|
+
export declare type ToolbarAction = Pick<Action, 'id' | 'onClick' | 'disabled'>;
|
|
6
|
+
export interface UtilityPanelProps {
|
|
7
|
+
/** Utility panel id. */
|
|
8
|
+
id: string;
|
|
9
|
+
/** Utility panel title. */
|
|
10
|
+
title: string;
|
|
11
|
+
/** Icon of side panel in toolbar. */
|
|
12
|
+
icon: IconNames;
|
|
13
|
+
/** Content of the side panel. */
|
|
14
|
+
content: NonNullable<ReactNode>;
|
|
15
|
+
}
|
|
16
|
+
export interface ConfigurationPanelProps {
|
|
17
|
+
/** If true, the Configuration Panel will be visible. */
|
|
18
|
+
open: boolean;
|
|
19
|
+
/** Header inside Configuration Panel. */
|
|
20
|
+
header: string;
|
|
21
|
+
/** A region to display configuration content. */
|
|
22
|
+
content: ReactNode;
|
|
23
|
+
/** Callback fired when user wants to close the panel. */
|
|
24
|
+
onDismiss: () => void;
|
|
25
|
+
}
|
|
26
|
+
export interface ToolbarProps {
|
|
27
|
+
/** Whether zoom gadget should be available. */
|
|
28
|
+
zoom?: boolean;
|
|
29
|
+
/** Toolbar actions available. */
|
|
30
|
+
toolbarActions?: Partial<Record<ActionName, ToolbarAction>>;
|
|
31
|
+
}
|
|
32
|
+
export interface WorkbenchProps {
|
|
33
|
+
/** A region to display main content. */
|
|
34
|
+
children: NonNullable<ReactNode>;
|
|
35
|
+
/**
|
|
36
|
+
* An array of Panel data used to render the individual panels.
|
|
37
|
+
* @default []
|
|
38
|
+
*/
|
|
39
|
+
utilityPanels?: UtilityPanelProps[];
|
|
40
|
+
/** Initially opened utility panel. */
|
|
41
|
+
initiallyVisiblePanelId: UtilityPanelProps['id'] | undefined;
|
|
42
|
+
/** Configuration panel props. */
|
|
43
|
+
configurationPanel: ConfigurationPanelProps;
|
|
44
|
+
/** Toolbar configuration. */
|
|
45
|
+
toolbar?: ToolbarProps;
|
|
46
|
+
/** Ref for the wrapping element. */
|
|
47
|
+
ref?: Ref<HTMLDivElement>;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=Workbench.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Workbench.types.d.ts","sourceRoot":"","sources":["../../../src/components/Workbench/Workbench.types.ts"],"names":[],"mappings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AAO,CAAC,EAAE,YAAY,CAAC;IACvB,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Workbench.types.js","sourceRoot":"","sources":["../../../src/components/Workbench/Workbench.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ReactNode, Ref } from 'react';\n\nimport type { Action } from '@pega/cosmos-react-core';\nimport { IconNames } from '@pega/cosmos-react-core/lib/components/Icon/iconNames';\n\nexport type ActionName = 'undo' | 'redo';\nexport type ToolbarAction = Pick<Action, 'id' | 'onClick' | 'disabled'>;\n\nexport interface UtilityPanelProps {\n /** Utility panel id. */\n id: string;\n /** Utility panel title. */\n title: string;\n /** Icon of side panel in toolbar. */\n icon: IconNames;\n /** Content of the side panel. */\n content: NonNullable<ReactNode>;\n}\n\nexport interface ConfigurationPanelProps {\n /** If true, the Configuration Panel will be visible. */\n open: boolean;\n /** Header inside Configuration Panel. */\n header: string;\n /** A region to display configuration content. */\n content: ReactNode;\n /** Callback fired when user wants to close the panel. */\n onDismiss: () => void;\n}\n\nexport interface ToolbarProps {\n /** Whether zoom gadget should be available. */\n zoom?: boolean;\n /** Toolbar actions available. */\n toolbarActions?: Partial<Record<ActionName, ToolbarAction>>;\n}\n\nexport interface WorkbenchProps {\n /** A region to display main content. */\n children: NonNullable<ReactNode>;\n /**\n * An array of Panel data used to render the individual panels.\n * @default []\n */\n utilityPanels?: UtilityPanelProps[];\n /** Initially opened utility panel. */\n initiallyVisiblePanelId: UtilityPanelProps['id'] | undefined;\n /** Configuration panel props. */\n configurationPanel: ConfigurationPanelProps;\n /** Toolbar configuration. */\n toolbar?: ToolbarProps;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Workbench/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Workbench/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export { default } from './Workbench';\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -9,4 +9,5 @@ export * from './components/LifeCycle';
|
|
|
9
9
|
export * from './components/PageTemplates';
|
|
10
10
|
export * from './components/SummaryCard';
|
|
11
11
|
export * from './components/Visual';
|
|
12
|
+
export { default as Workbench } from './components/Workbench';
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -10,4 +10,5 @@ export * from './components/LifeCycle';
|
|
|
10
10
|
export * from './components/PageTemplates';
|
|
11
11
|
export * from './components/SummaryCard';
|
|
12
12
|
export * from './components/Visual';
|
|
13
|
+
export { default as Workbench } from './components/Workbench';
|
|
13
14
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC","sourcesContent":["// This file is autogenerated. Any changes will be overwritten.\nexport { default as AppHeader } from './components/AppHeader';\nexport * from './components/AppHeader';\nexport { default as AppShell } from './components/AppShell';\nexport * from './components/AppShell';\nexport { default as FlowModeller } from './components/FlowModeller';\nexport * from './components/FlowModeller';\nexport { default as LifeCycle } from './components/LifeCycle';\nexport * from './components/LifeCycle';\nexport * from './components/PageTemplates';\nexport * from './components/SummaryCard';\nexport * from './components/Visual';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC","sourcesContent":["// This file is autogenerated. Any changes will be overwritten.\nexport { default as AppHeader } from './components/AppHeader';\nexport * from './components/AppHeader';\nexport { default as AppShell } from './components/AppShell';\nexport * from './components/AppShell';\nexport { default as FlowModeller } from './components/FlowModeller';\nexport * from './components/FlowModeller';\nexport { default as LifeCycle } from './components/LifeCycle';\nexport * from './components/LifeCycle';\nexport * from './components/PageTemplates';\nexport * from './components/SummaryCard';\nexport * from './components/Visual';\nexport { default as Workbench } from './components/Workbench';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-build",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"author": "Pegasystems",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"build": "tsc -b"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@pega/cosmos-react-core": "2.0.0
|
|
24
|
-
"@pega/cosmos-react-dnd": "2.0.0
|
|
23
|
+
"@pega/cosmos-react-core": "2.0.0",
|
|
24
|
+
"@pega/cosmos-react-dnd": "2.0.0",
|
|
25
25
|
"dagre": "^0.8.5",
|
|
26
26
|
"polished": "^4.1.0",
|
|
27
27
|
"react": "^16.14.0 || ^17.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AddNode.d.ts","sourceRoot":"","sources":["../../../../src/components/FlowModeller/Renderer/AddNode.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAWvC,eAAO,MAAM,SAAS,mOAKpB,CAAC;AAIH,eAAO,MAAM,aAAa,yGASxB,CAAC;AAIH,eAAO,MAAM,YAAY,qOAcvB,CAAC;AAIH,UAAU,WAAW;IACnB,cAAc,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;CAC5D;AAED,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,WAAW,CAWrC,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import styled, { css } from 'styled-components';
|
|
3
|
-
import { Button, defaultThemeProp, Flex, Icon, useI18n, StyledTooltip } from '@pega/cosmos-react-core';
|
|
4
|
-
export const StyledDot = styled(Icon)(({ theme }) => {
|
|
5
|
-
return css `
|
|
6
|
-
position: absolute;
|
|
7
|
-
color: ${theme.base.colors.slate.dark};
|
|
8
|
-
`;
|
|
9
|
-
});
|
|
10
|
-
StyledDot.defaultProps = defaultThemeProp;
|
|
11
|
-
export const StyledWrapper = styled.div(() => {
|
|
12
|
-
return css `
|
|
13
|
-
${StyledTooltip} {
|
|
14
|
-
${css `
|
|
15
|
-
min-width: 12ch;
|
|
16
|
-
text-align: center;
|
|
17
|
-
`}
|
|
18
|
-
}
|
|
19
|
-
`;
|
|
20
|
-
});
|
|
21
|
-
StyledWrapper.defaultProps = defaultThemeProp;
|
|
22
|
-
export const StyledButton = styled(Button)(({ theme }) => {
|
|
23
|
-
return css `
|
|
24
|
-
opacity: 0;
|
|
25
|
-
top: -0.25rem;
|
|
26
|
-
border: 0;
|
|
27
|
-
color: ${theme.base.colors.black};
|
|
28
|
-
background: ${theme.base.colors.white};
|
|
29
|
-
&:hover,
|
|
30
|
-
&:active,
|
|
31
|
-
&:focus {
|
|
32
|
-
opacity: 1;
|
|
33
|
-
background: ${theme.base.colors.white};
|
|
34
|
-
}
|
|
35
|
-
`;
|
|
36
|
-
});
|
|
37
|
-
StyledButton.defaultProps = defaultThemeProp;
|
|
38
|
-
export const AddButton = ({ addNodeHandler }) => {
|
|
39
|
-
const t = useI18n();
|
|
40
|
-
return (_jsxs(Flex, { container: { justify: 'center' }, as: StyledWrapper, children: [_jsx(StyledDot, { name: 'circle-solid' }, void 0), _jsx(StyledButton, { label: t('add_node'), icon: true, onClick: addNodeHandler, children: _jsx(Icon, { name: 'plus' }, void 0) }, void 0)] }, void 0));
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=AddNode.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AddNode.js","sourceRoot":"","sources":["../../../../src/components/FlowModeller/Renderer/AddNode.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EACL,MAAM,EACN,gBAAgB,EAChB,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,aAAa,EACd,MAAM,yBAAyB,CAAC;AAEjC,M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AAC,IAAI,EAAC,MAAM,WAAG,WACP,YACV,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { FC, MouseEvent } from 'react';\n\nimport {\n Button,\n defaultThemeProp,\n Flex,\n Icon,\n useI18n,\n StyledTooltip\n} from '@pega/cosmos-react-core';\n\nexport const StyledDot = styled(Icon)(({ theme }) => {\n return css`\n position: absolute;\n color: ${theme.base.colors.slate.dark};\n `;\n});\n\nStyledDot.defaultProps = defaultThemeProp;\n\nexport const StyledWrapper = styled.div(() => {\n return css`\n ${StyledTooltip} {\n ${css`\n min-width: 12ch;\n text-align: center;\n `}\n }\n `;\n});\n\nStyledWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledButton = styled(Button)(({ theme }) => {\n return css`\n opacity: 0;\n top: -0.25rem;\n border: 0;\n color: ${theme.base.colors.black};\n background: ${theme.base.colors.white};\n &:hover,\n &:active,\n &:focus {\n opacity: 1;\n background: ${theme.base.colors.white};\n }\n `;\n});\n\nStyledButton.defaultProps = defaultThemeProp;\n\ninterface AddBtnProps {\n addNodeHandler: (e: MouseEvent<HTMLButtonElement>) => void;\n}\n\nexport const AddButton: FC<AddBtnProps> = ({ addNodeHandler }) => {\n const t = useI18n();\n\n return (\n <Flex container={{ justify: 'center' }} as={StyledWrapper}>\n <StyledDot name='circle-solid' />\n <StyledButton label={t('add_node')} icon onClick={addNodeHandler}>\n <Icon name='plus' />\n </StyledButton>\n </Flex>\n );\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Connector.d.ts","sourceRoot":"","sources":["../../../../src/components/FlowModeller/Renderer/Connector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAK3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAgE1D,QAAA,MAAM,SAAS,EAAE,EAAE,CAAC,sBAAsB,CAoBzC,CAAC;AAEF,eAAe,SAAS,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I,EAAE,WAAW,EAAC,GAAG,EAAC,IAAI,EAAC,MAAM,WAAG,EAC7F,WAAW,EAAE,KAAK,IAAI,CACrB,wBACE,CAAC,EAAE,WAAW,CAAC,CAAC,GAAG,WAAW,CAAC,KAAK,EACpC,CAAC,EAAE,WAAW,CAAC,CAAC,GAAG,EAAE,EACrB,KAAK,EAAE,WAAW,CAAC,KAAK,EACxB,MAAM,EAAE,WAAW,CAAC,MAAM,YAE1B,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,YACpC,KAAC,WAAW,cAAE,WAAW,CAAC,KAAK,WAAe,WACzC,WACO,CACjB,YACC,CACL,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["import { FC } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { defaultThemeProp, Flex, Label, useTheme } from '@pega/cosmos-react-core';\n\nimport { RendererConnectorProps } from './Renderer.types';\n\ninterface Points {\n x: number;\n y: number;\n}\n\nconst CURVE_RADIUS = 16;\nconst genLine = (points: Points[]) => {\n const lineStr: string = points\n .map((point: Points, idx: number, arr: Points[]) => {\n const { x, y } = point;\n const prev = arr[idx - 1];\n const next = arr[idx + 1];\n const line = `L${x},${y}`;\n\n // if the point is extream end, no need to add a curve\n if (!prev || !next) return line;\n\n // if point is colinear with prev and next, no need to add a curve\n if (prev.x === next.x || prev.y === next.y) return line;\n\n if (point.x > next.x)\n // BOTTOM-RIGHT ↲\n return `L${x},${\n y - CURVE_RADIUS\n }a${CURVE_RADIUS},${CURVE_RADIUS} 0 0 1 -${CURVE_RADIUS},${CURVE_RADIUS}`;\n\n // BOTTOM-LEFT ↳\n if (point.x < next.x)\n return `L${x},${\n y - CURVE_RADIUS\n }a${CURVE_RADIUS},${CURVE_RADIUS} 0 0 0 ${CURVE_RADIUS},${CURVE_RADIUS}`;\n\n // TOP-LEFT ↱\n if (point.x < prev.x)\n return `L${\n x + CURVE_RADIUS\n },${y}a${CURVE_RADIUS},${CURVE_RADIUS} 0 0 0 -${CURVE_RADIUS},${CURVE_RADIUS}`;\n\n // TOP-RIGHT ↴\n if (point.x > prev.x)\n return `L${\n x - CURVE_RADIUS\n },${y}a${CURVE_RADIUS},${CURVE_RADIUS} 0 0 1 ${CURVE_RADIUS},${CURVE_RADIUS}`;\n\n return `L${x},${y}`;\n })\n .join('');\n return `M${lineStr.substr(1)}`;\n};\n\nconst StyledLabel = styled(Label)(({ theme }) => {\n return css`\n border-radius: ${theme.base['border-radius']};\n background: ${theme.base.colors.slate.dark};\n color: ${theme.base.colors.white};\n text-align: center;\n padding: calc(0.5 * ${theme.base.spacing});\n `;\n});\n\nStyledLabel.defaultProps = defaultThemeProp;\n\nconst Connector: FC<RendererConnectorProps> = ({ points, labelLayout }) => {\n const theme = useTheme();\n\n return (\n <g>\n <path d={genLine(points)} stroke={theme.base.colors.slate.dark} strokeWidth='1' fill='none' />\n {labelLayout?.value && (\n <foreignObject\n x={labelLayout.x - labelLayout.width}\n y={labelLayout.y + 15}\n width={labelLayout.width}\n height={labelLayout.height}\n >\n <Flex container={{ justify: 'center' }}>\n <StyledLabel>{labelLayout.value}</StyledLabel>\n </Flex>\n </foreignObject>\n )}\n </g>\n );\n};\n\nexport default Connector;\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { RendererConnectorProps } from './Renderer.types';
|
|
3
|
-
export interface ConnectorsContainerProps {
|
|
4
|
-
items: RendererConnectorProps[];
|
|
5
|
-
dimensions: {
|
|
6
|
-
width: number;
|
|
7
|
-
height: number;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
declare const ConnectorsContainer: FC<ConnectorsContainerProps>;
|
|
11
|
-
export default ConnectorsContainer;
|
|
12
|
-
//# sourceMappingURL=ConnectorsContainer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectorsContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/FlowModeller/Renderer/ConnectorsContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAI3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAQ1D,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,sBAAsB,EAAE,CAAC;IAChC,UAAU,EAAE;QACV,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED,QAAA,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAerD,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import Connector from './Connector';
|
|
4
|
-
const StyledConnectorContainer = styled.div `
|
|
5
|
-
position: absolute;
|
|
6
|
-
top: 0;
|
|
7
|
-
left: 0;
|
|
8
|
-
`;
|
|
9
|
-
const ConnectorsContainer = ({ items, dimensions }) => {
|
|
10
|
-
return (_jsx(StyledConnectorContainer, { children: _jsx("svg", { width: dimensions.width, height: dimensions.height, xmlns: 'http://www.w3.org/2000/svg', viewBox: `0 0 ${dimensions.width} ${dimensions.height}`, children: items.map(item => {
|
|
11
|
-
return _jsx(Connector, { ...item }, item.id);
|
|
12
|
-
}) }, void 0) }, void 0));
|
|
13
|
-
};
|
|
14
|
-
export default ConnectorsContainer;
|
|
15
|
-
//# sourceMappingURL=ConnectorsContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectorsContainer.js","sourceRoot":"","sources":["../../../../src/components/FlowModeller/Renderer/ConnectorsContainer.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,SAAS,MAAM,aAAa,CAAC;AAGpC,MAAM,wBAAwB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAI1C,CAAC;AAUF,MAAM,mBAAmB,GAAiC,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE;IAClF,OAAO,CACL,KAAC,wBAAwB,cACvB,cACE,KAAK,EAAE,UAAU,CAAC,KAAK,EACvB,MAAM,EAAE,UAAU,CAAC,MAAM,EACzB,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAE,OAAO,UAAU,CAAC,KAAK,IAAI,UAAU,CAAC,MAAM,EAAE,YAEtD,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;gBAChB,OAAO,KAAC,SAAS,OAAmB,IAAI,IAAjB,IAAI,CAAC,EAAE,CAAc,CAAC;YAC/C,CAAC,CAAC,WACE,WACmB,CAC5B,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["import { FC } from 'react';\nimport styled from 'styled-components';\n\nimport Connector from './Connector';\nimport { RendererConnectorProps } from './Renderer.types';\n\nconst StyledConnectorContainer = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n`;\n\nexport interface ConnectorsContainerProps {\n items: RendererConnectorProps[];\n dimensions: {\n width: number;\n height: number;\n };\n}\n\nconst ConnectorsContainer: FC<ConnectorsContainerProps> = ({ items, dimensions }) => {\n return (\n <StyledConnectorContainer>\n <svg\n width={dimensions.width}\n height={dimensions.height}\n xmlns='http://www.w3.org/2000/svg'\n viewBox={`0 0 ${dimensions.width} ${dimensions.height}`}\n >\n {items.map(item => {\n return <Connector key={item.id} {...item} />;\n })}\n </svg>\n </StyledConnectorContainer>\n );\n};\n\nexport default ConnectorsContainer;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Node.d.ts","sourceRoot":"","sources":["../../../../src/components/FlowModeller/Renderer/Node.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAK3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAgBrD,QAAA,MAAM,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAM/B,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import styled, { css } from 'styled-components';
|
|
3
|
-
import { Flex } from '@pega/cosmos-react-core';
|
|
4
|
-
const StyledNodeWrapper = styled.div(({ dimensions, position }) => {
|
|
5
|
-
return css `
|
|
6
|
-
position: absolute;
|
|
7
|
-
top: 0;
|
|
8
|
-
left: 0;
|
|
9
|
-
width: ${dimensions.width}px;
|
|
10
|
-
height: ${dimensions.height}px;
|
|
11
|
-
transform: translate(${position.x}px, ${position.y}px);
|
|
12
|
-
`;
|
|
13
|
-
});
|
|
14
|
-
const Node = ({ children, ...restprops }) => {
|
|
15
|
-
return (_jsx(Flex, { as: StyledNodeWrapper, ...restprops, container: { justify: 'center' }, children: _jsx("div", { children: children }, void 0) }, void 0));
|
|
16
|
-
};
|
|
17
|
-
export default Node;
|
|
18
|
-
//# sourceMappingURL=Node.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Node.js","sourceRoot":"","sources":["../../../../src/components/FlowModeller/Renderer/Node.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAI/C,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAGjC,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC9B,OAAO,GAAG,CAAA;;;;aAIC,UAAU,CAAC,KAAK;cACf,UAAU,CAAC,MAAM;2BACJ,QAAQ,CAAC,CAAC,OAAO,QAAQ,CAAC,CAAC;GACnD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,IAAI,GAA0B,CAAC,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,EAAE,EAAE;IACjE,OAAO,CACL,KAAC,IAAI,IAAC,EAAE,EAAE,iBAAiB,KAAM,SAAS,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,YAC1E,wBAAM,QAAQ,WAAO,WAChB,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC","sourcesContent":["import { FC } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Flex } from '@pega/cosmos-react-core';\n\nimport { RendererNodeProps } from './Renderer.types';\n\nconst StyledNodeWrapper = styled.div<{\n dimensions: RendererNodeProps['dimensions'];\n position: RendererNodeProps['position'];\n}>(({ dimensions, position }) => {\n return css`\n position: absolute;\n top: 0;\n left: 0;\n width: ${dimensions.width}px;\n height: ${dimensions.height}px;\n transform: translate(${position.x}px, ${position.y}px);\n `;\n});\n\nconst Node: FC<RendererNodeProps> = ({ children, ...restprops }) => {\n return (\n <Flex as={StyledNodeWrapper} {...restprops} container={{ justify: 'center' }}>\n <div>{children}</div>\n </Flex>\n );\n};\n\nexport default Node;\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { RendererNodeProps } from './Renderer.types';
|
|
3
|
-
export interface NodesContainerProps {
|
|
4
|
-
items: RendererNodeProps[];
|
|
5
|
-
}
|
|
6
|
-
declare const NodesContainer: FC<NodesContainerProps>;
|
|
7
|
-
export default NodesContainer;
|
|
8
|
-
//# sourceMappingURL=NodesContainer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NodesContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/FlowModeller/Renderer/NodesContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAI3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAQrD,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,iBAAiB,EAAE,CAAC;CAC5B;AAED,QAAA,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAQ3C,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import Node from './Node';
|
|
4
|
-
const StyledNodeContainer = styled.div `
|
|
5
|
-
position: absolute;
|
|
6
|
-
top: 0;
|
|
7
|
-
left: 0;
|
|
8
|
-
`;
|
|
9
|
-
const NodesContainer = ({ items }) => {
|
|
10
|
-
return (_jsx(StyledNodeContainer, { children: items.map(item => {
|
|
11
|
-
return _jsx(Node, { ...item }, item.id);
|
|
12
|
-
}) }, void 0));
|
|
13
|
-
};
|
|
14
|
-
export default NodesContainer;
|
|
15
|
-
//# sourceMappingURL=NodesContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NodesContainer.js","sourceRoot":"","sources":["../../../../src/components/FlowModeller/Renderer/NodesContainer.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAG1B,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAIrC,CAAC;AAMF,MAAM,cAAc,GAA4B,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC5D,OAAO,CACL,KAAC,mBAAmB,cACjB,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YAChB,OAAO,KAAC,IAAI,OAAmB,IAAI,IAAjB,IAAI,CAAC,EAAE,CAAc,CAAC;QAC1C,CAAC,CAAC,WACkB,CACvB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { FC } from 'react';\nimport styled from 'styled-components';\n\nimport Node from './Node';\nimport { RendererNodeProps } from './Renderer.types';\n\nconst StyledNodeContainer = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n`;\n\nexport interface NodesContainerProps {\n items: RendererNodeProps[];\n}\n\nconst NodesContainer: FC<NodesContainerProps> = ({ items }) => {\n return (\n <StyledNodeContainer>\n {items.map(item => {\n return <Node key={item.id} {...item} />;\n })}\n </StyledNodeContainer>\n );\n};\n\nexport default NodesContainer;\n"]}
|