@pega/cosmos-react-build 3.0.0-dev.2.1 → 3.0.0-dev.20.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/AppHeader/AppHeader.d.ts +4 -2
- package/lib/components/AppHeader/AppHeader.d.ts.map +1 -1
- package/lib/components/AppHeader/AppHeader.js +10 -9
- package/lib/components/AppHeader/AppHeader.js.map +1 -1
- package/lib/components/AppHeader/AppHeader.styles.d.ts +1 -1
- package/lib/components/AppHeader/AppHeader.styles.d.ts.map +1 -1
- package/lib/components/AppHeader/AppHeader.styles.js +5 -19
- package/lib/components/AppHeader/AppHeader.styles.js.map +1 -1
- package/lib/components/AppHeader/BranchButton.d.ts.map +1 -1
- package/lib/components/AppHeader/BranchButton.js +1 -1
- package/lib/components/AppHeader/BranchButton.js.map +1 -1
- package/lib/components/AppShell/AppShell.d.ts +1 -0
- package/lib/components/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.js +15 -20
- package/lib/components/AppShell/AppShell.js.map +1 -1
- package/lib/components/AppShell/AppShell.styles.d.ts +1 -0
- package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.styles.js +17 -2
- package/lib/components/AppShell/AppShell.styles.js.map +1 -1
- package/lib/components/AppShell/AppShell.types.d.ts +6 -9
- package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.types.js.map +1 -1
- package/lib/components/AppShell/AppShellContext.d.ts +1 -0
- package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
- package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts +9 -0
- package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts.map +1 -0
- package/lib/components/DynamicContentEditor/DynamicContentEditor.js +238 -0
- package/lib/components/DynamicContentEditor/DynamicContentEditor.js.map +1 -0
- package/lib/components/DynamicContentEditor/DynamicContentEditor.types.d.ts +23 -0
- package/lib/components/DynamicContentEditor/DynamicContentEditor.types.d.ts.map +1 -0
- package/lib/components/DynamicContentEditor/DynamicContentEditor.types.js +2 -0
- package/lib/components/DynamicContentEditor/DynamicContentEditor.types.js.map +1 -0
- package/lib/components/DynamicContentEditor/PegaCustomElement.d.ts +308 -0
- package/lib/components/DynamicContentEditor/PegaCustomElement.d.ts.map +1 -0
- package/lib/components/DynamicContentEditor/PegaCustomElement.js +23 -0
- package/lib/components/DynamicContentEditor/PegaCustomElement.js.map +1 -0
- package/lib/components/DynamicContentEditor/index.d.ts +3 -0
- package/lib/components/DynamicContentEditor/index.d.ts.map +1 -0
- package/lib/components/DynamicContentEditor/index.js +2 -0
- package/lib/components/DynamicContentEditor/index.js.map +1 -0
- package/lib/components/FlowModeller/AddNode.d.ts +11 -9
- package/lib/components/FlowModeller/AddNode.d.ts.map +1 -1
- package/lib/components/FlowModeller/AddNode.js +9 -3
- package/lib/components/FlowModeller/AddNode.js.map +1 -1
- package/lib/components/FlowModeller/Connector.d.ts +7 -0
- package/lib/components/FlowModeller/Connector.d.ts.map +1 -0
- package/lib/components/FlowModeller/Connector.js +71 -0
- package/lib/components/FlowModeller/Connector.js.map +1 -0
- package/lib/components/FlowModeller/DeletePopover.d.ts +19 -0
- package/lib/components/FlowModeller/DeletePopover.d.ts.map +1 -0
- package/lib/components/FlowModeller/DeletePopover.js +136 -0
- package/lib/components/FlowModeller/DeletePopover.js.map +1 -0
- package/lib/components/FlowModeller/FlowModeller.d.ts +3 -19
- package/lib/components/FlowModeller/FlowModeller.d.ts.map +1 -1
- package/lib/components/FlowModeller/FlowModeller.js +185 -61
- package/lib/components/FlowModeller/FlowModeller.js.map +1 -1
- package/lib/components/FlowModeller/FlowModeller.types.d.ts +25 -0
- package/lib/components/FlowModeller/FlowModeller.types.d.ts.map +1 -0
- package/lib/components/FlowModeller/FlowModeller.types.js +2 -0
- package/lib/components/FlowModeller/FlowModeller.types.js.map +1 -0
- package/lib/components/FlowModeller/FlowModellerContext.d.ts +6 -0
- package/lib/components/FlowModeller/FlowModellerContext.d.ts.map +1 -0
- package/lib/components/FlowModeller/FlowModellerContext.js +7 -0
- package/lib/components/FlowModeller/FlowModellerContext.js.map +1 -0
- package/lib/components/FlowModeller/Node/Node.types.d.ts +22 -9
- package/lib/components/FlowModeller/Node/Node.types.d.ts.map +1 -1
- package/lib/components/FlowModeller/Node/Node.types.js +2 -3
- package/lib/components/FlowModeller/Node/Node.types.js.map +1 -1
- package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts +7 -4
- package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts.map +1 -1
- package/lib/components/FlowModeller/Node/NodeTemplate.styles.js +21 -11
- package/lib/components/FlowModeller/Node/NodeTemplate.styles.js.map +1 -1
- package/lib/components/FlowModeller/Node/NodeTemplates.d.ts +1 -1
- package/lib/components/FlowModeller/Node/NodeTemplates.d.ts.map +1 -1
- package/lib/components/FlowModeller/Node/NodeTemplates.js +42 -18
- package/lib/components/FlowModeller/Node/NodeTemplates.js.map +1 -1
- package/lib/components/FlowModeller/Node.d.ts +5 -0
- package/lib/components/FlowModeller/Node.d.ts.map +1 -0
- package/lib/components/FlowModeller/Node.js +22 -0
- package/lib/components/FlowModeller/Node.js.map +1 -0
- package/lib/components/FlowModeller/Renderer/Renderer.d.ts.map +1 -1
- package/lib/components/FlowModeller/Renderer/Renderer.js +37 -6
- package/lib/components/FlowModeller/Renderer/Renderer.js.map +1 -1
- package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts +9 -9
- 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 +8 -3
- package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts.map +1 -1
- package/lib/components/FlowModeller/Renderer/Utils/Graph.js +7 -1
- package/lib/components/FlowModeller/Renderer/Utils/Graph.js.map +1 -1
- package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.d.ts +2 -1
- package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.d.ts.map +1 -1
- package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js +19 -6
- package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js.map +1 -1
- package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.d.ts +9 -6
- package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.d.ts.map +1 -1
- package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.js +23 -3
- package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.js.map +1 -1
- package/lib/components/FlowModeller/Utils/addNodeUtils.d.ts +17 -0
- package/lib/components/FlowModeller/Utils/addNodeUtils.d.ts.map +1 -0
- package/lib/components/FlowModeller/Utils/{AddNodeUtils.js → addNodeUtils.js} +58 -35
- package/lib/components/FlowModeller/Utils/addNodeUtils.js.map +1 -0
- package/lib/components/FlowModeller/Utils/deleteNodeUtils.d.ts +30 -0
- package/lib/components/FlowModeller/Utils/deleteNodeUtils.d.ts.map +1 -0
- package/lib/components/FlowModeller/Utils/deleteNodeUtils.js +81 -0
- package/lib/components/FlowModeller/Utils/deleteNodeUtils.js.map +1 -0
- package/lib/components/FlowModeller/helper.d.ts +18 -8
- package/lib/components/FlowModeller/helper.d.ts.map +1 -1
- package/lib/components/FlowModeller/helper.js +114 -55
- package/lib/components/FlowModeller/helper.js.map +1 -1
- package/lib/components/FlowModeller/index.d.ts +8 -3
- package/lib/components/FlowModeller/index.d.ts.map +1 -1
- package/lib/components/FlowModeller/index.js +5 -1
- package/lib/components/FlowModeller/index.js.map +1 -1
- package/lib/components/ItemLibrary/ItemLibrary.d.ts +8 -6
- package/lib/components/ItemLibrary/ItemLibrary.d.ts.map +1 -1
- package/lib/components/ItemLibrary/ItemLibrary.js +6 -8
- package/lib/components/ItemLibrary/ItemLibrary.js.map +1 -1
- package/lib/components/LifeCycle/Category.d.ts.map +1 -1
- package/lib/components/LifeCycle/Category.js +17 -13
- package/lib/components/LifeCycle/Category.js.map +1 -1
- package/lib/components/LifeCycle/LifeCycle.d.ts.map +1 -1
- package/lib/components/LifeCycle/LifeCycle.js +2 -3
- package/lib/components/LifeCycle/LifeCycle.js.map +1 -1
- package/lib/components/LifeCycle/LifeCycle.types.d.ts +2 -4
- package/lib/components/LifeCycle/LifeCycle.types.d.ts.map +1 -1
- package/lib/components/LifeCycle/LifeCycle.types.js.map +1 -1
- package/lib/components/LifeCycle/LifeCycleList.d.ts +1 -1
- package/lib/components/LifeCycle/LifeCycleList.d.ts.map +1 -1
- package/lib/components/LifeCycle/LifeCycleList.js +3 -2
- package/lib/components/LifeCycle/LifeCycleList.js.map +1 -1
- package/lib/components/LifeCycle/Stage.d.ts.map +1 -1
- package/lib/components/LifeCycle/Stage.js +8 -17
- package/lib/components/LifeCycle/Stage.js.map +1 -1
- package/lib/components/LifeCycle/Step.d.ts +3 -6
- package/lib/components/LifeCycle/Step.d.ts.map +1 -1
- package/lib/components/LifeCycle/Step.js +20 -42
- package/lib/components/LifeCycle/Step.js.map +1 -1
- package/lib/components/LifeCycle/Task.d.ts +4 -1
- package/lib/components/LifeCycle/Task.d.ts.map +1 -1
- package/lib/components/LifeCycle/Task.js +17 -10
- package/lib/components/LifeCycle/Task.js.map +1 -1
- package/lib/components/LifeCycle/index.d.ts +1 -2
- package/lib/components/LifeCycle/index.d.ts.map +1 -1
- package/lib/components/LifeCycle/index.js.map +1 -1
- package/lib/components/ObjectPreview/ObjectPreview.d.ts +16 -0
- package/lib/components/ObjectPreview/ObjectPreview.d.ts.map +1 -0
- package/lib/components/ObjectPreview/ObjectPreview.js +25 -0
- package/lib/components/ObjectPreview/ObjectPreview.js.map +1 -0
- package/lib/components/ObjectPreview/index.d.ts +3 -0
- package/lib/components/ObjectPreview/index.d.ts.map +1 -0
- package/lib/components/ObjectPreview/index.js +3 -0
- package/lib/components/ObjectPreview/index.js.map +1 -0
- package/lib/components/ObjectSelect/ObjectPicker.d.ts +15 -0
- package/lib/components/ObjectSelect/ObjectPicker.d.ts.map +1 -0
- package/lib/components/ObjectSelect/ObjectPicker.js +36 -0
- package/lib/components/ObjectSelect/ObjectPicker.js.map +1 -0
- package/lib/components/ObjectSelect/ObjectSelect.d.ts +32 -0
- package/lib/components/ObjectSelect/ObjectSelect.d.ts.map +1 -0
- package/lib/components/ObjectSelect/ObjectSelect.js +41 -0
- package/lib/components/ObjectSelect/ObjectSelect.js.map +1 -0
- package/lib/components/ObjectSelect/ObjectSummary.d.ts +24 -0
- package/lib/components/ObjectSelect/ObjectSummary.d.ts.map +1 -0
- package/lib/components/ObjectSelect/ObjectSummary.js +45 -0
- package/lib/components/ObjectSelect/ObjectSummary.js.map +1 -0
- package/lib/components/ObjectSelect/index.d.ts +3 -0
- package/lib/components/ObjectSelect/index.d.ts.map +1 -0
- package/lib/components/ObjectSelect/index.js +2 -0
- package/lib/components/ObjectSelect/index.js.map +1 -0
- package/lib/components/ObjectSelect/useCreateModal.d.ts +34 -0
- package/lib/components/ObjectSelect/useCreateModal.d.ts.map +1 -0
- package/lib/components/ObjectSelect/useCreateModal.js +61 -0
- package/lib/components/ObjectSelect/useCreateModal.js.map +1 -0
- package/lib/components/PageTemplates/GalleryPage.js +4 -4
- package/lib/components/PageTemplates/GalleryPage.js.map +1 -1
- package/lib/components/PageTemplates/PageTemplates.d.ts +3 -3
- package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
- package/lib/components/PageTemplates/PageTemplates.js +45 -37
- package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
- package/lib/components/SummaryCard/SummaryCard.d.ts +2 -3
- package/lib/components/SummaryCard/SummaryCard.d.ts.map +1 -1
- package/lib/components/SummaryCard/SummaryCard.js +3 -4
- package/lib/components/SummaryCard/SummaryCard.js.map +1 -1
- package/lib/components/Workbench/ConfigurationPanel.d.ts.map +1 -1
- package/lib/components/Workbench/ConfigurationPanel.js +2 -3
- package/lib/components/Workbench/ConfigurationPanel.js.map +1 -1
- package/lib/components/Workbench/Toolbar.d.ts +1 -5
- package/lib/components/Workbench/Toolbar.d.ts.map +1 -1
- package/lib/components/Workbench/Toolbar.js +8 -8
- package/lib/components/Workbench/Toolbar.js.map +1 -1
- package/lib/components/Workbench/UtilityPanel.js +1 -1
- package/lib/components/Workbench/UtilityPanel.js.map +1 -1
- package/lib/components/Workbench/Workbench.d.ts.map +1 -1
- package/lib/components/Workbench/Workbench.js +3 -4
- package/lib/components/Workbench/Workbench.js.map +1 -1
- package/lib/components/Workbench/Workbench.styles.d.ts +1 -1
- package/lib/components/Workbench/Workbench.styles.d.ts.map +1 -1
- package/lib/components/Workbench/Workbench.styles.js +12 -17
- package/lib/components/Workbench/Workbench.styles.js.map +1 -1
- package/lib/components/Workbench/Workbench.types.d.ts +0 -2
- package/lib/components/Workbench/Workbench.types.d.ts.map +1 -1
- package/lib/components/Workbench/Workbench.types.js.map +1 -1
- package/lib/index.d.ts +6 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +6 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +2 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/utils.d.ts +14 -0
- package/lib/utils/utils.d.ts.map +1 -0
- package/lib/utils/utils.js +13 -0
- package/lib/utils/utils.js.map +1 -0
- package/package.json +21 -14
- package/lib/components/FlowModeller/Renderer/Connectors.d.ts +0 -13
- package/lib/components/FlowModeller/Renderer/Connectors.d.ts.map +0 -1
- package/lib/components/FlowModeller/Renderer/Connectors.js +0 -47
- package/lib/components/FlowModeller/Renderer/Connectors.js.map +0 -1
- package/lib/components/FlowModeller/Renderer/Nodes.d.ts +0 -9
- package/lib/components/FlowModeller/Renderer/Nodes.d.ts.map +0 -1
- package/lib/components/FlowModeller/Renderer/Nodes.js +0 -25
- package/lib/components/FlowModeller/Renderer/Nodes.js.map +0 -1
- package/lib/components/FlowModeller/Utils/AddNodeUtils.d.ts +0 -16
- package/lib/components/FlowModeller/Utils/AddNodeUtils.d.ts.map +0 -1
- package/lib/components/FlowModeller/Utils/AddNodeUtils.js.map +0 -1
- package/lib/components/Visual/Visual.d.ts +0 -17
- package/lib/components/Visual/Visual.d.ts.map +0 -1
- package/lib/components/Visual/Visual.js +0 -28
- package/lib/components/Visual/Visual.js.map +0 -1
- package/lib/components/Visual/index.d.ts +0 -3
- package/lib/components/Visual/index.d.ts.map +0 -1
- package/lib/components/Visual/index.js +0 -3
- package/lib/components/Visual/index.js.map +0 -1
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
export declare const pegaReferenceElementStyle = "pega-reference {\n color:#076bc9;\n cursor:pointer;\n}\npega-reference:hover{\n text-decoration:underline;\n}\npega-reference::before{\n content: '['\n}\npega-reference::after{\n content: ']'\n}";
|
|
2
|
+
export declare const createPegaReferenceElement: (win: typeof globalThis) => {
|
|
3
|
+
new (): {
|
|
4
|
+
connectedCallback(): void;
|
|
5
|
+
accessKey: string;
|
|
6
|
+
readonly accessKeyLabel: string;
|
|
7
|
+
autocapitalize: string;
|
|
8
|
+
dir: string;
|
|
9
|
+
draggable: boolean;
|
|
10
|
+
hidden: boolean;
|
|
11
|
+
innerText: string;
|
|
12
|
+
lang: string;
|
|
13
|
+
readonly offsetHeight: number;
|
|
14
|
+
readonly offsetLeft: number;
|
|
15
|
+
readonly offsetParent: Element | null;
|
|
16
|
+
readonly offsetTop: number;
|
|
17
|
+
readonly offsetWidth: number;
|
|
18
|
+
outerText: string;
|
|
19
|
+
spellcheck: boolean;
|
|
20
|
+
title: string;
|
|
21
|
+
translate: boolean;
|
|
22
|
+
attachInternals(): ElementInternals;
|
|
23
|
+
click(): void;
|
|
24
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
25
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
26
|
+
removeEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | EventListenerOptions | undefined): void;
|
|
27
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
|
|
28
|
+
readonly attributes: NamedNodeMap;
|
|
29
|
+
readonly classList: DOMTokenList;
|
|
30
|
+
className: string;
|
|
31
|
+
readonly clientHeight: number;
|
|
32
|
+
readonly clientLeft: number;
|
|
33
|
+
readonly clientTop: number;
|
|
34
|
+
readonly clientWidth: number;
|
|
35
|
+
id: string;
|
|
36
|
+
readonly localName: string;
|
|
37
|
+
readonly namespaceURI: string | null;
|
|
38
|
+
onfullscreenchange: ((this: Element, ev: Event) => any) | null;
|
|
39
|
+
onfullscreenerror: ((this: Element, ev: Event) => any) | null;
|
|
40
|
+
outerHTML: string;
|
|
41
|
+
readonly ownerDocument: Document;
|
|
42
|
+
readonly part: DOMTokenList;
|
|
43
|
+
readonly prefix: string | null;
|
|
44
|
+
readonly scrollHeight: number;
|
|
45
|
+
scrollLeft: number;
|
|
46
|
+
scrollTop: number;
|
|
47
|
+
readonly scrollWidth: number;
|
|
48
|
+
readonly shadowRoot: ShadowRoot | null;
|
|
49
|
+
slot: string;
|
|
50
|
+
readonly tagName: string;
|
|
51
|
+
attachShadow(init: ShadowRootInit): ShadowRoot;
|
|
52
|
+
closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2] | null;
|
|
53
|
+
closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3] | null;
|
|
54
|
+
closest<E extends Element = Element>(selectors: string): E | null;
|
|
55
|
+
getAttribute(qualifiedName: string): string | null;
|
|
56
|
+
getAttributeNS(namespace: string | null, localName: string): string | null;
|
|
57
|
+
getAttributeNames(): string[];
|
|
58
|
+
getAttributeNode(qualifiedName: string): Attr | null;
|
|
59
|
+
getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
|
|
60
|
+
getBoundingClientRect(): DOMRect;
|
|
61
|
+
getClientRects(): DOMRectList;
|
|
62
|
+
getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
|
|
63
|
+
getElementsByTagName<K_4 extends keyof HTMLElementTagNameMap>(qualifiedName: K_4): HTMLCollectionOf<HTMLElementTagNameMap[K_4]>;
|
|
64
|
+
getElementsByTagName<K_5 extends keyof SVGElementTagNameMap>(qualifiedName: K_5): HTMLCollectionOf<SVGElementTagNameMap[K_5]>;
|
|
65
|
+
getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
|
|
66
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
|
|
67
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
|
|
68
|
+
getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
|
|
69
|
+
hasAttribute(qualifiedName: string): boolean;
|
|
70
|
+
hasAttributeNS(namespace: string | null, localName: string): boolean;
|
|
71
|
+
hasAttributes(): boolean;
|
|
72
|
+
hasPointerCapture(pointerId: number): boolean;
|
|
73
|
+
insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
|
|
74
|
+
insertAdjacentHTML(position: InsertPosition, text: string): void;
|
|
75
|
+
insertAdjacentText(where: InsertPosition, data: string): void;
|
|
76
|
+
matches(selectors: string): boolean;
|
|
77
|
+
releasePointerCapture(pointerId: number): void;
|
|
78
|
+
removeAttribute(qualifiedName: string): void;
|
|
79
|
+
removeAttributeNS(namespace: string | null, localName: string): void;
|
|
80
|
+
removeAttributeNode(attr: Attr): Attr;
|
|
81
|
+
requestFullscreen(options?: FullscreenOptions | undefined): Promise<void>;
|
|
82
|
+
requestPointerLock(): void;
|
|
83
|
+
scroll(options?: ScrollToOptions | undefined): void;
|
|
84
|
+
scroll(x: number, y: number): void;
|
|
85
|
+
scrollBy(options?: ScrollToOptions | undefined): void;
|
|
86
|
+
scrollBy(x: number, y: number): void;
|
|
87
|
+
scrollIntoView(arg?: boolean | ScrollIntoViewOptions | undefined): void;
|
|
88
|
+
scrollTo(options?: ScrollToOptions | undefined): void;
|
|
89
|
+
scrollTo(x: number, y: number): void;
|
|
90
|
+
setAttribute(qualifiedName: string, value: string): void;
|
|
91
|
+
setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
|
|
92
|
+
setAttributeNode(attr: Attr): Attr | null;
|
|
93
|
+
setAttributeNodeNS(attr: Attr): Attr | null;
|
|
94
|
+
setPointerCapture(pointerId: number): void;
|
|
95
|
+
toggleAttribute(qualifiedName: string, force?: boolean | undefined): boolean;
|
|
96
|
+
webkitMatchesSelector(selectors: string): boolean;
|
|
97
|
+
readonly baseURI: string;
|
|
98
|
+
readonly childNodes: NodeListOf<ChildNode>;
|
|
99
|
+
readonly firstChild: ChildNode | null;
|
|
100
|
+
readonly isConnected: boolean;
|
|
101
|
+
readonly lastChild: ChildNode | null;
|
|
102
|
+
readonly nextSibling: ChildNode | null;
|
|
103
|
+
readonly nodeName: string;
|
|
104
|
+
readonly nodeType: number;
|
|
105
|
+
nodeValue: string | null;
|
|
106
|
+
readonly parentElement: HTMLElement | null;
|
|
107
|
+
readonly parentNode: ParentNode | null;
|
|
108
|
+
readonly previousSibling: ChildNode | null;
|
|
109
|
+
textContent: string | null;
|
|
110
|
+
appendChild<T extends Node>(node: T): T;
|
|
111
|
+
cloneNode(deep?: boolean | undefined): Node;
|
|
112
|
+
compareDocumentPosition(other: Node): number;
|
|
113
|
+
contains(other: Node | null): boolean;
|
|
114
|
+
getRootNode(options?: GetRootNodeOptions | undefined): Node;
|
|
115
|
+
hasChildNodes(): boolean;
|
|
116
|
+
insertBefore<T_1 extends Node>(node: T_1, child: Node | null): T_1;
|
|
117
|
+
isDefaultNamespace(namespace: string | null): boolean;
|
|
118
|
+
isEqualNode(otherNode: Node | null): boolean;
|
|
119
|
+
isSameNode(otherNode: Node | null): boolean;
|
|
120
|
+
lookupNamespaceURI(prefix: string | null): string | null;
|
|
121
|
+
lookupPrefix(namespace: string | null): string | null;
|
|
122
|
+
normalize(): void;
|
|
123
|
+
removeChild<T_2 extends Node>(child: T_2): T_2;
|
|
124
|
+
replaceChild<T_3 extends Node>(node: Node, child: T_3): T_3;
|
|
125
|
+
readonly ATTRIBUTE_NODE: number;
|
|
126
|
+
readonly CDATA_SECTION_NODE: number;
|
|
127
|
+
readonly COMMENT_NODE: number;
|
|
128
|
+
readonly DOCUMENT_FRAGMENT_NODE: number;
|
|
129
|
+
readonly DOCUMENT_NODE: number;
|
|
130
|
+
readonly DOCUMENT_POSITION_CONTAINED_BY: number;
|
|
131
|
+
readonly DOCUMENT_POSITION_CONTAINS: number;
|
|
132
|
+
readonly DOCUMENT_POSITION_DISCONNECTED: number;
|
|
133
|
+
readonly DOCUMENT_POSITION_FOLLOWING: number;
|
|
134
|
+
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
|
|
135
|
+
readonly DOCUMENT_POSITION_PRECEDING: number;
|
|
136
|
+
readonly DOCUMENT_TYPE_NODE: number;
|
|
137
|
+
readonly ELEMENT_NODE: number;
|
|
138
|
+
readonly ENTITY_NODE: number;
|
|
139
|
+
readonly ENTITY_REFERENCE_NODE: number;
|
|
140
|
+
readonly NOTATION_NODE: number;
|
|
141
|
+
readonly PROCESSING_INSTRUCTION_NODE: number;
|
|
142
|
+
readonly TEXT_NODE: number;
|
|
143
|
+
dispatchEvent(event: Event): boolean;
|
|
144
|
+
ariaAtomic: string | null;
|
|
145
|
+
ariaAutoComplete: string | null;
|
|
146
|
+
ariaBusy: string | null;
|
|
147
|
+
ariaChecked: string | null;
|
|
148
|
+
ariaColCount: string | null;
|
|
149
|
+
ariaColIndex: string | null;
|
|
150
|
+
ariaColSpan: string | null;
|
|
151
|
+
ariaCurrent: string | null;
|
|
152
|
+
ariaDisabled: string | null;
|
|
153
|
+
ariaExpanded: string | null;
|
|
154
|
+
ariaHasPopup: string | null;
|
|
155
|
+
ariaHidden: string | null;
|
|
156
|
+
ariaKeyShortcuts: string | null;
|
|
157
|
+
ariaLabel: string | null;
|
|
158
|
+
ariaLevel: string | null;
|
|
159
|
+
ariaLive: string | null;
|
|
160
|
+
ariaModal: string | null;
|
|
161
|
+
ariaMultiLine: string | null;
|
|
162
|
+
ariaMultiSelectable: string | null;
|
|
163
|
+
ariaOrientation: string | null;
|
|
164
|
+
ariaPlaceholder: string | null;
|
|
165
|
+
ariaPosInSet: string | null;
|
|
166
|
+
ariaPressed: string | null;
|
|
167
|
+
ariaReadOnly: string | null;
|
|
168
|
+
ariaRequired: string | null;
|
|
169
|
+
ariaRoleDescription: string | null;
|
|
170
|
+
ariaRowCount: string | null;
|
|
171
|
+
ariaRowIndex: string | null;
|
|
172
|
+
ariaRowSpan: string | null;
|
|
173
|
+
ariaSelected: string | null;
|
|
174
|
+
ariaSetSize: string | null;
|
|
175
|
+
ariaSort: string | null;
|
|
176
|
+
ariaValueMax: string | null;
|
|
177
|
+
ariaValueMin: string | null;
|
|
178
|
+
ariaValueNow: string | null;
|
|
179
|
+
ariaValueText: string | null;
|
|
180
|
+
animate(keyframes: PropertyIndexedKeyframes | Keyframe[] | null, options?: number | KeyframeAnimationOptions | undefined): Animation;
|
|
181
|
+
getAnimations(options?: GetAnimationsOptions | undefined): Animation[];
|
|
182
|
+
after(...nodes: (string | Node)[]): void;
|
|
183
|
+
before(...nodes: (string | Node)[]): void;
|
|
184
|
+
remove(): void;
|
|
185
|
+
replaceWith(...nodes: (string | Node)[]): void;
|
|
186
|
+
innerHTML: string;
|
|
187
|
+
readonly nextElementSibling: Element | null;
|
|
188
|
+
readonly previousElementSibling: Element | null;
|
|
189
|
+
readonly childElementCount: number;
|
|
190
|
+
readonly children: HTMLCollection;
|
|
191
|
+
readonly firstElementChild: Element | null;
|
|
192
|
+
readonly lastElementChild: Element | null;
|
|
193
|
+
append(...nodes: (string | Node)[]): void;
|
|
194
|
+
prepend(...nodes: (string | Node)[]): void;
|
|
195
|
+
querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6] | null;
|
|
196
|
+
querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7] | null;
|
|
197
|
+
querySelector<E_1 extends Element = Element>(selectors: string): E_1 | null;
|
|
198
|
+
querySelectorAll<K_8 extends keyof HTMLElementTagNameMap>(selectors: K_8): NodeListOf<HTMLElementTagNameMap[K_8]>;
|
|
199
|
+
querySelectorAll<K_9 extends keyof SVGElementTagNameMap>(selectors: K_9): NodeListOf<SVGElementTagNameMap[K_9]>;
|
|
200
|
+
querySelectorAll<E_2 extends Element = Element>(selectors: string): NodeListOf<E_2>;
|
|
201
|
+
replaceChildren(...nodes: (string | Node)[]): void;
|
|
202
|
+
readonly assignedSlot: HTMLSlotElement | null;
|
|
203
|
+
oncopy: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
204
|
+
oncut: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
205
|
+
onpaste: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
206
|
+
readonly style: CSSStyleDeclaration;
|
|
207
|
+
contentEditable: string;
|
|
208
|
+
enterKeyHint: string;
|
|
209
|
+
inputMode: string;
|
|
210
|
+
readonly isContentEditable: boolean;
|
|
211
|
+
onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
212
|
+
onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
213
|
+
onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
214
|
+
onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
215
|
+
onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
216
|
+
onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
217
|
+
onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
218
|
+
oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
219
|
+
oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
220
|
+
onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
221
|
+
onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
222
|
+
onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
223
|
+
oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
224
|
+
oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
225
|
+
ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
226
|
+
ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
227
|
+
ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
228
|
+
ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
229
|
+
ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
230
|
+
ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
231
|
+
ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
232
|
+
ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
233
|
+
ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
234
|
+
onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
235
|
+
onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
236
|
+
onerror: OnErrorEventHandler;
|
|
237
|
+
onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
238
|
+
onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
|
|
239
|
+
ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
240
|
+
oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
241
|
+
oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
242
|
+
onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
243
|
+
onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
244
|
+
onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
245
|
+
onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
246
|
+
onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
247
|
+
onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
248
|
+
onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
249
|
+
onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
250
|
+
onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
251
|
+
onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
252
|
+
onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
253
|
+
onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
254
|
+
onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
255
|
+
onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
256
|
+
onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
257
|
+
onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
258
|
+
onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
259
|
+
onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
260
|
+
onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
261
|
+
onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
262
|
+
onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
263
|
+
onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
264
|
+
onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
265
|
+
onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
266
|
+
onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
267
|
+
onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
268
|
+
onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any) | null;
|
|
269
|
+
onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
270
|
+
onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
271
|
+
onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
272
|
+
onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
273
|
+
onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
|
|
274
|
+
onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
275
|
+
onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
276
|
+
onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
277
|
+
onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
278
|
+
onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
279
|
+
onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
280
|
+
onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
281
|
+
onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
|
|
282
|
+
onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
283
|
+
ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
284
|
+
ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
285
|
+
ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
286
|
+
ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
287
|
+
ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
288
|
+
ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
289
|
+
ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
290
|
+
ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
291
|
+
ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
292
|
+
ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
293
|
+
onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
294
|
+
onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
295
|
+
onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
296
|
+
onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
297
|
+
onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
298
|
+
onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
299
|
+
onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
|
|
300
|
+
autofocus: boolean;
|
|
301
|
+
readonly dataset: DOMStringMap;
|
|
302
|
+
nonce?: string | undefined;
|
|
303
|
+
tabIndex: number;
|
|
304
|
+
blur(): void;
|
|
305
|
+
focus(options?: FocusOptions | undefined): void;
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
//# sourceMappingURL=PegaCustomElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PegaCustomElement.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicContentEditor/PegaCustomElement.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,4MAYpC,CAAC;AAEH,eAAO,MAAM,0BAA0B,QAAS,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQhE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const pegaReferenceElementStyle = `pega-reference {
|
|
2
|
+
color:#076bc9;
|
|
3
|
+
cursor:pointer;
|
|
4
|
+
}
|
|
5
|
+
pega-reference:hover{
|
|
6
|
+
text-decoration:underline;
|
|
7
|
+
}
|
|
8
|
+
pega-reference::before{
|
|
9
|
+
content: '['
|
|
10
|
+
}
|
|
11
|
+
pega-reference::after{
|
|
12
|
+
content: ']'
|
|
13
|
+
}`;
|
|
14
|
+
export const createPegaReferenceElement = (win) => {
|
|
15
|
+
return class PegaReferenceElement extends win.HTMLElement {
|
|
16
|
+
connectedCallback() {
|
|
17
|
+
const template = document.createElement('template');
|
|
18
|
+
const temp = document.importNode(template.content, true);
|
|
19
|
+
this.append(temp);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=PegaCustomElement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PegaCustomElement.js","sourceRoot":"","sources":["../../../src/components/DynamicContentEditor/PegaCustomElement.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;EAYvC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,GAAsB,EAAE,EAAE;IACnE,OAAO,MAAM,oBAAqB,SAAQ,GAAG,CAAC,WAAW;QACvD,iBAAiB;YACf,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YACpD,MAAM,IAAI,GAAG,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YACzD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["export const pegaReferenceElementStyle = `pega-reference {\n color:#076bc9;\n cursor:pointer;\n}\npega-reference:hover{\n text-decoration:underline;\n}\npega-reference::before{\n content: '['\n}\npega-reference::after{\n content: ']'\n}`;\n\nexport const createPegaReferenceElement = (win: typeof globalThis) => {\n return class PegaReferenceElement extends win.HTMLElement {\n connectedCallback() {\n const template = document.createElement('template');\n const temp = document.importNode(template.content, true);\n this.append(temp);\n }\n };\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicContentEditor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,yBAAyB,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/DynamicContentEditor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC","sourcesContent":["export { default } from './DynamicContentEditor';\nexport { DynamicContentEditorProps, ItemType } from './DynamicContentEditor.types';\n"]}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { FC, MouseEvent } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export declare const StyledDot: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").IconProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {
|
|
2
|
+
import { PlottedGraphNode } from './Renderer/Utils/GraphLayout';
|
|
3
|
+
export declare const StyledDot: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").IconProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {
|
|
4
|
+
highlight: boolean;
|
|
5
|
+
}, never>;
|
|
4
6
|
export declare const StyledPlus: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").IconProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
5
7
|
export declare const StyledWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
6
8
|
export declare const StyledButton: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").ButtonProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
7
|
-
interface
|
|
8
|
-
addNodeHandler: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
9
|
-
}
|
|
10
|
-
export interface AddNodeProps extends RendererNodeProps {
|
|
9
|
+
export interface AddNodeProps extends PlottedGraphNode {
|
|
11
10
|
onClick?: (ev: Event) => void;
|
|
11
|
+
addNodeHandler: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
12
|
+
highlight?: boolean;
|
|
12
13
|
}
|
|
13
|
-
export declare const StyledConnectorLabel: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").TextProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
export declare const StyledConnectorLabel: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").TextProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {
|
|
15
|
+
highlight: boolean;
|
|
16
|
+
}, never>;
|
|
17
|
+
export declare const AddButton: FC<Pick<AddNodeProps, 'addNodeHandler' | 'highlight'>>;
|
|
16
18
|
//# sourceMappingURL=AddNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddNode.d.ts","sourceRoot":"","sources":["../../../src/components/FlowModeller/AddNode.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAYvC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"AddNode.d.ts","sourceRoot":"","sources":["../../../src/components/FlowModeller/AddNode.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAYvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,eAAO,MAAM,SAAS;eAA6B,OAAO;SAWxD,CAAC;AAIH,eAAO,MAAM,UAAU,mOAAiB,CAAC;AACzC,eAAO,MAAM,aAAa,yGAUxB,CAAC;AAIH,eAAO,MAAM,YAAY,qOAsBvB,CAAC;AAIH,MAAM,WAAW,YAAa,SAAQ,gBAAgB;IACpD,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,KAAK,IAAI,CAAC;IAC9B,cAAc,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC3D,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,oBAAoB;eAA6B,OAAO;SAQnE,CAAC;AAIH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,gBAAgB,GAAG,WAAW,CAAC,CAc5E,CAAC"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
import { Button, defaultThemeProp, Flex, Icon, useI18n, StyledTooltip, Text } from '@pega/cosmos-react-core';
|
|
4
|
-
export const StyledDot = styled(Icon)(({ theme }) => {
|
|
4
|
+
export const StyledDot = styled(Icon)(({ theme, highlight }) => {
|
|
5
5
|
return css `
|
|
6
6
|
position: absolute;
|
|
7
7
|
color: ${theme.base.colors.slate.dark};
|
|
8
|
+
${highlight &&
|
|
9
|
+
css `
|
|
10
|
+
{
|
|
11
|
+
color: ${theme.base.colors.red.dark};
|
|
12
|
+
}
|
|
13
|
+
`}
|
|
8
14
|
`;
|
|
9
15
|
});
|
|
10
16
|
StyledDot.defaultProps = defaultThemeProp;
|
|
@@ -55,8 +61,8 @@ export const StyledConnectorLabel = styled(Text)(({ theme }) => {
|
|
|
55
61
|
`;
|
|
56
62
|
});
|
|
57
63
|
StyledConnectorLabel.defaultProps = defaultThemeProp;
|
|
58
|
-
export const AddButton = ({ addNodeHandler }) => {
|
|
64
|
+
export const AddButton = ({ addNodeHandler, highlight }) => {
|
|
59
65
|
const t = useI18n();
|
|
60
|
-
return (_jsx(Flex, { container: { justify: 'center' }, as: StyledWrapper, children: _jsxs(StyledButton, { label: t('add_node'), icon: true, onClick: addNodeHandler, children: [_jsx(StyledDot, { name: 'circle-solid'
|
|
66
|
+
return (_jsx(Flex, { container: { justify: 'center' }, as: StyledWrapper, children: _jsxs(StyledButton, { label: t('add_node'), icon: true, onClick: addNodeHandler, children: [_jsx(StyledDot, { name: 'circle-solid', highlight: highlight }), _jsx(StyledPlus, { name: 'plus' })] }) }));
|
|
61
67
|
};
|
|
62
68
|
//# sourceMappingURL=AddNode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddNode.js","sourceRoot":"","sources":["../../../src/components/FlowModeller/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,EACb,IAAI,EACL,MAAM,yBAAyB,CAAC;AAIjC,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"AddNode.js","sourceRoot":"","sources":["../../../src/components/FlowModeller/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,EACb,IAAI,EACL,MAAM,yBAAyB,CAAC;AAIjC,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,CAAyB,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE;IACrF,OAAO,GAAG,CAAA;;aAEC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI;MACnC,SAAS;QACX,GAAG,CAAA;;iBAEU,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI;;KAEtC;GACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,SAAS,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE1C,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA,EAAE,CAAC;AACzC,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACpD,OAAO,GAAG,CAAA;0BACc,KAAK,CAAC,IAAI,CAAC,OAAO;MACtC,aAAa;QACX,GAAG,CAAA;;;OAGJ;;GAEJ,CAAC;AACJ,CAAC,C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AAU,IAAC,IAAI,EAAC,MAAM,GAAG,IACb,GACV,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 Text\n} from '@pega/cosmos-react-core';\n\nimport { PlottedGraphNode } from './Renderer/Utils/GraphLayout';\n\nexport const StyledDot = styled(Icon)<{ highlight: boolean }>(({ theme, highlight }) => {\n return css`\n position: absolute;\n color: ${theme.base.colors.slate.dark};\n ${highlight &&\n css`\n {\n color: ${theme.base.colors.red.dark};\n }\n `}\n `;\n});\n\nStyledDot.defaultProps = defaultThemeProp;\n\nexport const StyledPlus = styled(Icon)``;\nexport const StyledWrapper = styled.div(({ theme }) => {\n return css`\n margin-block-start: ${theme.base.spacing};\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 top: -0.25rem;\n border: 0;\n background: transparent;\n color: ${theme.base.colors.black};\n ${StyledPlus} {\n opacity: 0;\n }\n &:hover,\n &:active,\n &:focus {\n opacity: 1;\n background: ${theme.base.colors.white};\n ${StyledDot} {\n opacity: 0;\n }\n ${StyledPlus} {\n opacity: 1;\n }\n }\n `;\n});\n\nStyledButton.defaultProps = defaultThemeProp;\n\nexport interface AddNodeProps extends PlottedGraphNode {\n onClick?: (ev: Event) => void;\n addNodeHandler: (e: MouseEvent<HTMLButtonElement>) => void;\n highlight?: boolean;\n}\n\nexport const StyledConnectorLabel = styled(Text)<{ highlight: boolean }>(({ 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\nStyledConnectorLabel.defaultProps = defaultThemeProp;\n\nexport const AddButton: FC<Pick<AddNodeProps, 'addNodeHandler' | 'highlight'>> = ({\n addNodeHandler,\n highlight\n}) => {\n const t = useI18n();\n\n return (\n <Flex container={{ justify: 'center' }} as={StyledWrapper}>\n <StyledButton label={t('add_node')} icon onClick={addNodeHandler}>\n <StyledDot name='circle-solid' highlight={highlight} />\n <StyledPlus name='plus' />\n </StyledButton>\n </Flex>\n );\n};\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PlaceHolderConnector } from './Utils/addNodeUtils';
|
|
3
|
+
import { PlottedGraphConnector } from './Renderer/Utils/GraphLayout';
|
|
4
|
+
declare type ConnectorProps = Pick<PlottedGraphConnector, 'id' | 'data' | 'labelLayout' | 'points'> & Partial<Pick<PlaceHolderConnector, 'realConnectors'>>;
|
|
5
|
+
declare const Connector: ({ id, labelLayout, data, realConnectors, points }: ConnectorProps) => JSX.Element;
|
|
6
|
+
export default Connector;
|
|
7
|
+
//# sourceMappingURL=Connector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Connector.d.ts","sourceRoot":"","sources":["../../../src/components/FlowModeller/Connector.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AA0ErE,aAAK,cAAc,GAAG,IAAI,CAAC,qBAAqB,EAAE,IAAI,GAAG,MAAM,GAAG,aAAa,GAAG,QAAQ,CAAC,GACzF,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAExD,QAAA,MAAM,SAAS,sDAAuD,cAAc,gBAoDnF,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useContext } from 'react';
|
|
3
|
+
import styled, { css } from 'styled-components';
|
|
4
|
+
import { defaultThemeProp, Flex, Text, useTheme } from '@pega/cosmos-react-core';
|
|
5
|
+
import { AddButton } from './AddNode';
|
|
6
|
+
import FlowModellerContext from './FlowModellerContext';
|
|
7
|
+
const StyledLabel = styled(Text)(({ theme, highlight }) => {
|
|
8
|
+
return css `
|
|
9
|
+
border-radius: ${theme.base['border-radius']};
|
|
10
|
+
background: ${theme.base.colors.slate.dark};
|
|
11
|
+
${highlight &&
|
|
12
|
+
css `
|
|
13
|
+
{
|
|
14
|
+
background-color: ${theme.base.colors.red.dark};
|
|
15
|
+
}
|
|
16
|
+
`}
|
|
17
|
+
color: ${theme.base.colors.white};
|
|
18
|
+
text-align: center;
|
|
19
|
+
padding: calc(0.5 * ${theme.base.spacing}) ${theme.base.spacing};
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
text-overflow: ellipsis;
|
|
22
|
+
max-width: 32ch;
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
`;
|
|
25
|
+
});
|
|
26
|
+
StyledLabel.defaultProps = defaultThemeProp;
|
|
27
|
+
const curveRadius = 12;
|
|
28
|
+
const genLine = (points) => {
|
|
29
|
+
const lineStr = points
|
|
30
|
+
.map((point, idx, arr) => {
|
|
31
|
+
const { x, y } = point;
|
|
32
|
+
const prev = arr[idx - 1];
|
|
33
|
+
const next = arr[idx + 1];
|
|
34
|
+
const line = `L${x},${y}`;
|
|
35
|
+
// if the point is extreme end, no need to add a curve
|
|
36
|
+
if (!prev || !next)
|
|
37
|
+
return line;
|
|
38
|
+
// if point is colinear with prev and next, no need to add a curve
|
|
39
|
+
if (prev.x === next.x || prev.y === next.y)
|
|
40
|
+
return line;
|
|
41
|
+
if (point.x > next.x)
|
|
42
|
+
// BOTTOM-RIGHT ↲
|
|
43
|
+
return `L${x},${y - curveRadius}a${curveRadius},${curveRadius} 0 0 1 -${curveRadius},${curveRadius}`;
|
|
44
|
+
// BOTTOM-LEFT ↳
|
|
45
|
+
if (point.x < next.x)
|
|
46
|
+
return `L${x},${y - curveRadius}a${curveRadius},${curveRadius} 0 0 0 ${curveRadius},${curveRadius}`;
|
|
47
|
+
// TOP-LEFT ↱
|
|
48
|
+
if (point.x < prev.x)
|
|
49
|
+
return `L${x + curveRadius},${y}a${curveRadius},${curveRadius} 0 0 0 -${curveRadius},${curveRadius}`;
|
|
50
|
+
// TOP-RIGHT ↴
|
|
51
|
+
if (point.x > prev.x)
|
|
52
|
+
return `L${x - curveRadius},${y}a${curveRadius},${curveRadius} 0 0 1 ${curveRadius},${curveRadius}`;
|
|
53
|
+
return `L${x},${y}`;
|
|
54
|
+
})
|
|
55
|
+
.join('');
|
|
56
|
+
return `M${lineStr.substr(1)}`;
|
|
57
|
+
};
|
|
58
|
+
const Connector = ({ id, labelLayout, data, realConnectors, points }) => {
|
|
59
|
+
const refId = realConnectors || id;
|
|
60
|
+
const { readOnly, highlights } = useContext(FlowModellerContext);
|
|
61
|
+
const theme = useTheme();
|
|
62
|
+
const metaData = {
|
|
63
|
+
refType: 'connector',
|
|
64
|
+
refId
|
|
65
|
+
};
|
|
66
|
+
return (_jsx(_Fragment, { children: data.type === 'default' && (_jsxs("g", { children: [_jsx("path", { id: id, d: genLine(points), stroke: highlights?.connectors?.[id]
|
|
67
|
+
? theme.base.colors.red.medium
|
|
68
|
+
: theme.base.colors.slate.dark, strokeWidth: highlights?.connectors?.[id] ? 2 : 1, fill: 'none' }), labelLayout && (_jsxs("foreignObject", { x: labelLayout.x - labelLayout.width, y: points[3].y - 20, width: labelLayout.width, height: labelLayout.height, children: [labelLayout?.value && (_jsx(Flex, { container: { justify: 'center' }, children: _jsx(StyledLabel, { highlight: !!highlights?.connectors?.[id], children: labelLayout.value }) })), !readOnly && (_jsx(AddButton, { highlight: !!highlights?.connectors?.[id], addNodeHandler: (e) => data?.onNodeCreate(e.currentTarget, metaData) }))] }))] }, id)) }));
|
|
69
|
+
};
|
|
70
|
+
export default Connector;
|
|
71
|
+
//# sourceMappingURL=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CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,YACnD,WAAW,CAAC,KAAK,GACN,GACT,CACR,EACA,CAAC,QAAQ,IAAI,CACZ,KAAC,SAAS,IACR,SAAS,EAAE,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,EACzC,cAAc,EAAE,CAAC,CAAgC,EAAE,EAAE,CACnD,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,aAAa,EAAE,QAAQ,CAAC,GAE/C,CACH,IACa,CACjB,KAnCK,EAAE,CAoCN,CACL,GACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["import { MouseEvent, useContext } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { defaultThemeProp, Flex, Text, useTheme } from '@pega/cosmos-react-core';\n\nimport { AddButton } from './AddNode';\nimport { AddNodeHandlerParams } from './Renderer/Renderer.types';\nimport { PlaceHolderConnector } from './Utils/addNodeUtils';\nimport FlowModellerContext from './FlowModellerContext';\nimport { PlottedGraphConnector } from './Renderer/Utils/GraphLayout';\n\nconst StyledLabel = styled(Text)<{ highlight: boolean }>(({ theme, highlight }) => {\n return css`\n border-radius: ${theme.base['border-radius']};\n background: ${theme.base.colors.slate.dark};\n ${highlight &&\n css`\n {\n background-color: ${theme.base.colors.red.dark};\n }\n `}\n color: ${theme.base.colors.white};\n text-align: center;\n padding: calc(0.5 * ${theme.base.spacing}) ${theme.base.spacing};\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 32ch;\n white-space: nowrap;\n `;\n});\n\nStyledLabel.defaultProps = defaultThemeProp;\n\ninterface Points {\n x: number;\n y: number;\n}\n\nconst curveRadius = 12;\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 extreme 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 - curveRadius\n }a${curveRadius},${curveRadius} 0 0 1 -${curveRadius},${curveRadius}`;\n\n // BOTTOM-LEFT ↳\n if (point.x < next.x)\n return `L${x},${\n y - curveRadius\n }a${curveRadius},${curveRadius} 0 0 0 ${curveRadius},${curveRadius}`;\n\n // TOP-LEFT ↱\n if (point.x < prev.x)\n return `L${\n x + curveRadius\n },${y}a${curveRadius},${curveRadius} 0 0 0 -${curveRadius},${curveRadius}`;\n\n // TOP-RIGHT ↴\n if (point.x > prev.x)\n return `L${\n x - curveRadius\n },${y}a${curveRadius},${curveRadius} 0 0 1 ${curveRadius},${curveRadius}`;\n\n return `L${x},${y}`;\n })\n .join('');\n return `M${lineStr.substr(1)}`;\n};\n\ntype ConnectorProps = Pick<PlottedGraphConnector, 'id' | 'data' | 'labelLayout' | 'points'> &\n Partial<Pick<PlaceHolderConnector, 'realConnectors'>>;\n\nconst Connector = ({ id, labelLayout, data, realConnectors, points }: ConnectorProps) => {\n const refId = realConnectors || id;\n const { readOnly, highlights } = useContext(FlowModellerContext);\n const theme = useTheme();\n\n const metaData: AddNodeHandlerParams = {\n refType: 'connector',\n refId\n };\n return (\n <>\n {data.type === 'default' && (\n <g key={id}>\n <path\n id={id}\n d={genLine(points)}\n stroke={\n highlights?.connectors?.[id]\n ? theme.base.colors.red.medium\n : theme.base.colors.slate.dark\n }\n strokeWidth={highlights?.connectors?.[id] ? 2 : 1}\n fill='none'\n />\n {labelLayout && (\n <foreignObject\n x={labelLayout.x - labelLayout.width}\n y={points[3].y - 20}\n width={labelLayout.width}\n height={labelLayout.height}\n >\n {labelLayout?.value && (\n <Flex container={{ justify: 'center' }}>\n <StyledLabel highlight={!!highlights?.connectors?.[id]}>\n {labelLayout.value}\n </StyledLabel>\n </Flex>\n )}\n {!readOnly && (\n <AddButton\n highlight={!!highlights?.connectors?.[id]}\n addNodeHandler={(e: MouseEvent<HTMLButtonElement>) =>\n data?.onNodeCreate(e.currentTarget, metaData)\n }\n />\n )}\n </foreignObject>\n )}\n </g>\n )}\n </>\n );\n};\n\nexport default Connector;\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ChangeEvent, Ref } from 'react';
|
|
2
|
+
import { PopoverProps } from '@pega/cosmos-react-core';
|
|
3
|
+
import { GraphData } from './Renderer/Utils/Graph';
|
|
4
|
+
import { GraphDataAsMap, DeleteNodeOutcome } from './Utils/deleteNodeUtils';
|
|
5
|
+
export interface DeleteNodePopoverProps {
|
|
6
|
+
show: boolean;
|
|
7
|
+
target: PopoverProps['target'];
|
|
8
|
+
flowGraphData: GraphData;
|
|
9
|
+
rendererGraphData: GraphData;
|
|
10
|
+
nodeId: string;
|
|
11
|
+
onChange?: (itemsToDelete: GraphDataAsMap, itemsToRetain: GraphDataAsMap | undefined, ev?: ChangeEvent) => void;
|
|
12
|
+
ref?: Ref<HTMLDivElement>;
|
|
13
|
+
onSubmit?: (outcome: DeleteNodeOutcome, ev: Event) => void;
|
|
14
|
+
onCancel?: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const StyledDeletePopover: import("styled-components").StyledComponent<(<Modifiers extends string = string>(props: PopoverProps<Modifiers> & import("@pega/cosmos-react-core").ForwardProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null), import("styled-components").DefaultTheme, {}, never>;
|
|
17
|
+
declare const DeletePopover: import("react").ForwardRefExoticComponent<Pick<DeleteNodePopoverProps, "show" | "target" | "onChange" | "onSubmit" | "onCancel" | "flowGraphData" | "rendererGraphData" | "nodeId"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export default DeletePopover;
|
|
19
|
+
//# sourceMappingURL=DeletePopover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeletePopover.d.ts","sourceRoot":"","sources":["../../../src/components/FlowModeller/DeletePopover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,WAAW,EAAyB,GAAG,EAAE,MAAM,OAAO,CAAC;AAG9F,OAAO,EASL,YAAY,EACb,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAiB,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAwB,EACtB,cAAc,EACd,iBAAiB,EAElB,MAAM,yBAAyB,CAAC;AAGjC,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC/B,aAAa,EAAE,SAAS,CAAC;IACzB,iBAAiB,EAAE,SAAS,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CACT,aAAa,EAAE,cAAc,EAC7B,aAAa,EAAE,cAAc,GAAG,SAAS,EACzC,EAAE,CAAC,EAAE,WAAW,KACb,IAAI,CAAC;IACV,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,EAAE,EAAE,EAAE,KAAK,KAAK,IAAI,CAAC;IAC3D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,mBAAmB,2TAE/B,CAAC;AAEF,QAAA,MAAM,aAAa,sOA+NlB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|