@pega/cosmos-react-build 3.0.0-dev.2.1 → 3.0.0-dev.3.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.styles.d.ts +1 -0
- package/lib/components/AppHeader/AppHeader.styles.d.ts.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.styles.d.ts +1 -0
- package/lib/components/AppShell/AppShell.styles.d.ts.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 +6 -0
- package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts.map +1 -0
- package/lib/components/DynamicContentEditor/DynamicContentEditor.js +107 -0
- package/lib/components/DynamicContentEditor/DynamicContentEditor.js.map +1 -0
- package/lib/components/DynamicContentEditor/DynamicContentEditor.types.d.ts +17 -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 +4 -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/Node/NodeTemplate.styles.d.ts +1 -0
- package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts.map +1 -1
- package/lib/components/Workbench/Workbench.styles.d.ts +1 -0
- package/lib/components/Workbench/Workbench.styles.d.ts.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/package.json +6 -5
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { Avatar, Flex, Text, Tabs, Button } from '@pega/cosmos-react-core';
|
|
2
3
|
export declare const StyledAppHeader: import("styled-components").StyledComponent<"header", import("styled-components").DefaultTheme, {}, never>;
|
|
3
4
|
export declare const StyledTitle: typeof Text;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppHeader.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AppHeader/AppHeader.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,EAEN,IAAI,EAEJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACP,MAAM,yBAAyB,CAAC;AAIjC,eAAO,MAAM,eAAe,4GAQ1B,CAAC;AAIH,eAAO,MAAM,WAAW,EAAE,OAAO,IAU/B,CAAC;AAIH,eAAO,MAAM,oBAAoB,EAAE,OAAO,IAKxC,CAAC;AAIH,eAAO,MAAM,mBAAmB,EAAE,OAAO,IAcvC,CAAC;AAIH,eAAO,MAAM,iBAAiB,0QAM5B,CAAC;AAIH,eAAO,MAAM,UAAU,EAAE,OAAO,IAqB9B,CAAC;AAIH,eAAO,MAAM,oBAAoB,EAAE,OAAO,IAmBzC,CAAC;AAIF,eAAO,MAAM,qBAAqB,EAAE,OAAO,IAYzC,CAAC;AAIH,eAAO,MAAM,mBAAmB,EAAE,OAAO,MAExC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,OAAO,MAQnC,CAAC"}
|
|
1
|
+
{"version":3,"file":"AppHeader.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AppHeader/AppHeader.styles.ts"],"names":[],"mappings":";AAEA,OAAO,EACL,MAAM,EAEN,IAAI,EAEJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACP,MAAM,yBAAyB,CAAC;AAIjC,eAAO,MAAM,eAAe,4GAQ1B,CAAC;AAIH,eAAO,MAAM,WAAW,EAAE,OAAO,IAU/B,CAAC;AAIH,eAAO,MAAM,oBAAoB,EAAE,OAAO,IAKxC,CAAC;AAIH,eAAO,MAAM,mBAAmB,EAAE,OAAO,IAcvC,CAAC;AAIH,eAAO,MAAM,iBAAiB,0QAM5B,CAAC;AAIH,eAAO,MAAM,UAAU,EAAE,OAAO,IAqB9B,CAAC;AAIH,eAAO,MAAM,oBAAoB,EAAE,OAAO,IAmBzC,CAAC;AAIF,eAAO,MAAM,qBAAqB,EAAE,OAAO,IAYzC,CAAC;AAIH,eAAO,MAAM,mBAAmB,EAAE,OAAO,MAExC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,OAAO,MAQnC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { AppShellProps } from './AppShell.types';
|
|
2
3
|
declare const AppShell: import("react").ForwardRefExoticComponent<Pick<AppShellProps, "main" | "children" | "navigation" | "appInfo" | "appHeader" | "utils" | "hideNav"> & import("react").RefAttributes<HTMLElement>>;
|
|
3
4
|
export default AppShell;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":"AA8CA,OAAO,KAAK,EAAE,aAAa,EAA4B,MAAM,kBAAkB,CAAC;AA+FhF,QAAA,MAAM,QAAQ,iMAkIb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":";AA8CA,OAAO,KAAK,EAAE,aAAa,EAA4B,MAAM,kBAAkB,CAAC;AA+FhF,QAAA,MAAM,QAAQ,iMAkIb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const StyledNavToggle: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").ButtonProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
2
3
|
export declare const StyledHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
4
|
export declare const StyledDrawerHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.styles.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,eAAe,qOA4B1B,CAAC;AAIH,eAAO,MAAM,YAAY,yGAUvB,CAAC;AAIH,eAAO,MAAM,kBAAkB,yGAI7B,CAAC;AAIH,eAAO,MAAM,mBAAmB,mOAI9B,CAAC;AAIH,eAAO,MAAM,cAAc,mOAOzB,CAAC;AAIH,eAAO,MAAM,WAAW;iBAA6B,OAAO;SA8B1D,CAAC;AAIH,eAAO,MAAM,cAAc,wGA2BzB,CAAC;AAIH,eAAO,MAAM,gBAAgB,yGAO3B,CAAC;AAIH,eAAO,MAAM,gBAAgB,yGAmB3B,CAAC;AAIH,eAAO,MAAM,UAAU,0GAOrB,CAAC;AAIH,eAAO,MAAM,mBAAmB,yGAQ9B,CAAC;AAIH,eAAO,MAAM,qBAAqB;aAAyB,MAAM;SAY/D,CAAC;AAIH,eAAO,MAAM,uBAAuB,qOAYlC,CAAC;AAIH,eAAO,MAAM,cAAc,yGAUzB,CAAC;AAIH,eAAO,MAAM,SAAS,yGAsHpB,CAAC"}
|
|
1
|
+
{"version":3,"file":"AppShell.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.styles.ts"],"names":[],"mappings":";AA0BA,eAAO,MAAM,eAAe,qOA4B1B,CAAC;AAIH,eAAO,MAAM,YAAY,yGAUvB,CAAC;AAIH,eAAO,MAAM,kBAAkB,yGAI7B,CAAC;AAIH,eAAO,MAAM,mBAAmB,mOAI9B,CAAC;AAIH,eAAO,MAAM,cAAc,mOAOzB,CAAC;AAIH,eAAO,MAAM,WAAW;iBAA6B,OAAO;SA8B1D,CAAC;AAIH,eAAO,MAAM,cAAc,wGA2BzB,CAAC;AAIH,eAAO,MAAM,gBAAgB,yGAO3B,CAAC;AAIH,eAAO,MAAM,gBAAgB,yGAmB3B,CAAC;AAIH,eAAO,MAAM,UAAU,0GAOrB,CAAC;AAIH,eAAO,MAAM,mBAAmB,yGAQ9B,CAAC;AAIH,eAAO,MAAM,qBAAqB;aAAyB,MAAM;SAY/D,CAAC;AAIH,eAAO,MAAM,uBAAuB,qOAYlC,CAAC;AAIH,eAAO,MAAM,cAAc,yGAUzB,CAAC;AAIH,eAAO,MAAM,SAAS,yGAsHpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShellContext.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShellContext.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,QAAA,MAAM,eAAe,+CAMnB,CAAC;AAEH,eAAe,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"AppShellContext.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShellContext.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,QAAA,MAAM,eAAe,+CAMnB,CAAC;AAEH,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { ForwardProps } from '@pega/cosmos-react-core';
|
|
3
|
+
import { DynamicContentEditorProps } from './DynamicContentEditor.types';
|
|
4
|
+
declare const DynamicContentEditor: FunctionComponent<DynamicContentEditorProps & ForwardProps>;
|
|
5
|
+
export default DynamicContentEditor;
|
|
6
|
+
//# sourceMappingURL=DynamicContentEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DynamicContentEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicContentEditor/DynamicContentEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAMlB,MAAM,OAAO,CAAC;AAKf,OAAO,EAGL,YAAY,EAOb,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,yBAAyB,EAAY,MAAM,8BAA8B,CAAC;AASnF,QAAA,MAAM,oBAAoB,EAAE,iBAAiB,CAAC,yBAAyB,GAAG,YAAY,CA0InF,CAAC;AAEJ,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useContext, useRef, useEffect, useState } from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { Editor } from '@pega/cosmos-react-rte';
|
|
5
|
+
import { Button, defaultThemeProp, Modal, ModalManagerContext, useConsolidatedRef, useI18n } from '@pega/cosmos-react-core';
|
|
6
|
+
import { getKeyCommand } from '@pega/cosmos-react-rte/lib/components/RichTextEditor/Toolbar/utils';
|
|
7
|
+
import PegaCustomElement from './PegaCustomElement';
|
|
8
|
+
const StyledDynamicContentEditor = styled.div ``;
|
|
9
|
+
StyledDynamicContentEditor.defaultProps = defaultThemeProp;
|
|
10
|
+
const DynamicContentEditor = forwardRef(({ form: { dynamicContentPicker, onSubmit }, onActiveFieldChange, label, toolbar, ...restProps }, ref) => {
|
|
11
|
+
const { create } = useContext(ModalManagerContext);
|
|
12
|
+
const t = useI18n();
|
|
13
|
+
const modalMethods = useRef();
|
|
14
|
+
const [editor, setEditor] = useState({});
|
|
15
|
+
const [bookmark, setBookmark] = useState();
|
|
16
|
+
const [currentElementContent, setCurrentElementContent] = useState(null);
|
|
17
|
+
const editorRef = useConsolidatedRef(ref);
|
|
18
|
+
const tooltip = getKeyCommand(navigator.appVersion.includes('Mac'), ({ ctrl }) => `${t('rte_anchor')} (${ctrl}/)`);
|
|
19
|
+
const insertField = (field) => {
|
|
20
|
+
const fieldContent = `<pega-reference role="button" contenteditable="false" data-rule-type='field' data-rule-id=${field.id}>${field.text}</pega-reference>`;
|
|
21
|
+
if (bookmark) {
|
|
22
|
+
editor.selection.moveToBookmark(bookmark);
|
|
23
|
+
editor.selection.setContent(fieldContent);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
editor.insertContent(fieldContent);
|
|
27
|
+
}
|
|
28
|
+
modalMethods.current?.dismiss();
|
|
29
|
+
};
|
|
30
|
+
const modalProps = {
|
|
31
|
+
children: dynamicContentPicker,
|
|
32
|
+
heading: t('rte_insert_field'),
|
|
33
|
+
actions: (_jsxs(_Fragment, { children: [_jsx(Button, { variant: 'secondary', onClick: () => modalMethods.current?.dismiss(), children: t('cancel') }, void 0), _jsx(Button, { variant: 'primary', onClick: () => onSubmit(insertField), children: t('submit') }, void 0)] }, void 0)),
|
|
34
|
+
center: true,
|
|
35
|
+
onAfterClose: () => {
|
|
36
|
+
setBookmark(undefined);
|
|
37
|
+
setCurrentElementContent('');
|
|
38
|
+
onActiveFieldChange({ id: '', text: '' });
|
|
39
|
+
},
|
|
40
|
+
onBeforeOpen: () => {
|
|
41
|
+
if (currentElementContent)
|
|
42
|
+
onActiveFieldChange({ id: currentElementContent, text: currentElementContent });
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
if (currentElementContent)
|
|
47
|
+
modalMethods.current = create(Modal, modalProps);
|
|
48
|
+
}, [currentElementContent]);
|
|
49
|
+
const updateBookmarkAndCurrentElement = (editorSelection) => {
|
|
50
|
+
const targetEl = editorSelection.getNode();
|
|
51
|
+
const fieldValue = targetEl.getAttribute('data-rule-id');
|
|
52
|
+
setBookmark(editorSelection.getBookmark());
|
|
53
|
+
setCurrentElementContent(fieldValue);
|
|
54
|
+
};
|
|
55
|
+
const handleElementClick = (e) => {
|
|
56
|
+
const targetEl = e.target;
|
|
57
|
+
if (targetEl.tagName === 'PEGA-REFERENCE') {
|
|
58
|
+
updateBookmarkAndCurrentElement(editor.selection);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const onInsertField = (incEditor) => {
|
|
62
|
+
const targetEl = incEditor.selection?.getNode();
|
|
63
|
+
if (targetEl.tagName === 'PEGA-REFERENCE') {
|
|
64
|
+
updateBookmarkAndCurrentElement(incEditor.selection);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
modalMethods.current = create(Modal, modalProps);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const isPegaRefActive = (incEditor) => {
|
|
71
|
+
const targetEl = incEditor.selection?.getNode();
|
|
72
|
+
return targetEl?.tagName === 'PEGA-REFERENCE';
|
|
73
|
+
};
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
editorRef.current?.element?.addEventListener('click', handleElementClick);
|
|
76
|
+
return () => {
|
|
77
|
+
editorRef.current?.element?.removeEventListener('click', handleElementClick);
|
|
78
|
+
};
|
|
79
|
+
}, [editor, editorRef.current]);
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
if (modalMethods.current) {
|
|
82
|
+
modalMethods.current.update(modalProps);
|
|
83
|
+
}
|
|
84
|
+
}, [modalProps]);
|
|
85
|
+
return (_jsx(Editor, { ref: editorRef, ...restProps, label: label, toolbar: toolbar, customComponents: [
|
|
86
|
+
{
|
|
87
|
+
customElement: PegaCustomElement,
|
|
88
|
+
name: 'pega-reference'
|
|
89
|
+
}
|
|
90
|
+
], customActions: [
|
|
91
|
+
{
|
|
92
|
+
icon: 'code',
|
|
93
|
+
text: tooltip,
|
|
94
|
+
onMouseDown: () => {
|
|
95
|
+
modalMethods.current = create(Modal, modalProps);
|
|
96
|
+
},
|
|
97
|
+
active: isPegaRefActive,
|
|
98
|
+
shortcut: {
|
|
99
|
+
pattern: 'meta+191',
|
|
100
|
+
description: tooltip,
|
|
101
|
+
command: onInsertField
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
], onInit: initializedEditor => setEditor(initializedEditor) }, void 0));
|
|
105
|
+
});
|
|
106
|
+
export default DynamicContentEditor;
|
|
107
|
+
//# sourceMappingURL=DynamicContentEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DynamicContentEditor.js","sourceRoot":"","sources":["../../../src/components/DynamicContentEditor/DynamicContentEditor.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAGV,UAAU,EACV,MAAM,EACN,SAAS,EACT,QAAQ,EACT,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAGvC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EACL,MAAM,EACN,gBAAgB,EAEhB,KAAK,EACL,mBAAmB,EAGnB,kBAAkB,EAClB,OAAO,EACR,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,oEAAoE,CAAC;AAGnG,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAIpD,MAAM,0BAA0B,GAAG,MAAM,CAAC,GAAG,CAAuC,EAAE,CAAC;AAEvF,0BAA0B,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE3D,MAAM,oBAAoB,GACxB,UAAU,CACR,CACE,EACE,IAAI,EAAE,EAAE,oBAAoB,EAAE,QAAQ,EAAE,EACxC,mBAAmB,EACnB,KAAK,EACL,OAAO,EACP,GAAG,SAAS,EAC+B,EAC7C,GAAqC,EACrC,EAAE;IACF,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IACnD,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IAEpB,MAAM,YAAY,GAA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M;gBACZ,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,GAAG,EAAE;oBAChB,YAAY,CAAC,OAAO,GAAG,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;gBACnD,CAAC;gBACD,MAAM,EAAE,eAAe;gBACvB,QAAQ,EAAE;oBACR,OAAO,EAAE,UAAU;oBACnB,WAAW,EAAE,OAAO;oBACpB,OAAO,EAAE,aAAa;iBACvB;aACF;SACF,EACD,MAAM,EAAE,iBAAiB,CAAC,EAAE,CAAC,SAAS,CAAC,iBAAiB,CAAC,WACzD,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEJ,eAAe,oBAAoB,CAAC","sourcesContent":["import {\n forwardRef,\n FunctionComponent,\n PropsWithoutRef,\n useContext,\n useRef,\n useEffect,\n useState\n} from 'react';\nimport styled from 'styled-components';\nimport { Bookmark, Editor as TinymceEditor, EditorSelection } from 'tinymce';\n\nimport { Editor } from '@pega/cosmos-react-rte';\nimport {\n Button,\n defaultThemeProp,\n ForwardProps,\n Modal,\n ModalManagerContext,\n ModalMethods,\n PropsWithDefaults,\n useConsolidatedRef,\n useI18n\n} from '@pega/cosmos-react-core';\nimport { getKeyCommand } from '@pega/cosmos-react-rte/lib/components/RichTextEditor/Toolbar/utils';\n\nimport { DynamicContentEditorProps, ItemType } from './DynamicContentEditor.types';\nimport PegaCustomElement from './PegaCustomElement';\n\ntype DynamicContentEditorPropsWithDefaults = PropsWithDefaults<DynamicContentEditorProps>;\n\nconst StyledDynamicContentEditor = styled.div<DynamicContentEditorPropsWithDefaults>``;\n\nStyledDynamicContentEditor.defaultProps = defaultThemeProp;\n\nconst DynamicContentEditor: FunctionComponent<DynamicContentEditorProps & ForwardProps> =\n forwardRef(\n (\n {\n form: { dynamicContentPicker, onSubmit },\n onActiveFieldChange,\n label,\n toolbar,\n ...restProps\n }: PropsWithoutRef<DynamicContentEditorProps>,\n ref: DynamicContentEditorProps['ref']\n ) => {\n const { create } = useContext(ModalManagerContext);\n const t = useI18n();\n\n const modalMethods = useRef<ModalMethods>();\n const [editor, setEditor] = useState({} as TinymceEditor);\n const [bookmark, setBookmark] = useState<Bookmark | undefined>();\n const [currentElementContent, setCurrentElementContent] = useState<string | null>(null);\n const editorRef = useConsolidatedRef(ref);\n const tooltip = getKeyCommand(\n navigator.appVersion.includes('Mac'),\n ({ ctrl }) => `${t('rte_anchor')} (${ctrl}/)`\n );\n\n const insertField = (field: ItemType) => {\n const fieldContent = `<pega-reference role=\"button\" contenteditable=\"false\" data-rule-type='field' data-rule-id=${field.id}>${field.text}</pega-reference>`;\n if (bookmark) {\n editor.selection.moveToBookmark(bookmark);\n editor.selection.setContent(fieldContent);\n } else {\n editor.insertContent(fieldContent);\n }\n\n modalMethods.current?.dismiss();\n };\n\n const modalProps = {\n children: dynamicContentPicker,\n heading: t('rte_insert_field'),\n actions: (\n <>\n <Button variant='secondary' onClick={() => modalMethods.current?.dismiss()}>\n {t('cancel')}\n </Button>\n <Button variant='primary' onClick={() => onSubmit(insertField)}>\n {t('submit')}\n </Button>\n </>\n ),\n center: true,\n onAfterClose: () => {\n setBookmark(undefined);\n setCurrentElementContent('');\n onActiveFieldChange({ id: '', text: '' });\n },\n onBeforeOpen: () => {\n if (currentElementContent)\n onActiveFieldChange({ id: currentElementContent, text: currentElementContent });\n }\n };\n\n useEffect(() => {\n if (currentElementContent) modalMethods.current = create(Modal, modalProps);\n }, [currentElementContent]);\n\n const updateBookmarkAndCurrentElement = (editorSelection: EditorSelection) => {\n const targetEl = editorSelection.getNode();\n const fieldValue = targetEl.getAttribute('data-rule-id');\n setBookmark(editorSelection.getBookmark());\n setCurrentElementContent(fieldValue);\n };\n\n const handleElementClick = (e: MouseEvent) => {\n const targetEl = e.target as HTMLElement;\n if (targetEl.tagName === 'PEGA-REFERENCE') {\n updateBookmarkAndCurrentElement(editor.selection);\n }\n };\n\n const onInsertField = (incEditor: TinymceEditor) => {\n const targetEl = incEditor.selection?.getNode();\n if (targetEl.tagName === 'PEGA-REFERENCE') {\n updateBookmarkAndCurrentElement(incEditor.selection);\n } else {\n modalMethods.current = create(Modal, modalProps);\n }\n };\n\n const isPegaRefActive = (incEditor: TinymceEditor) => {\n const targetEl = incEditor.selection?.getNode();\n return targetEl?.tagName === 'PEGA-REFERENCE';\n };\n\n useEffect(() => {\n editorRef.current?.element?.addEventListener('click', handleElementClick);\n return () => {\n editorRef.current?.element?.removeEventListener('click', handleElementClick);\n };\n }, [editor, editorRef.current]);\n\n useEffect(() => {\n if (modalMethods.current) {\n modalMethods.current.update(modalProps);\n }\n }, [modalProps]);\n\n return (\n <Editor\n ref={editorRef}\n {...restProps}\n label={label}\n toolbar={toolbar}\n customComponents={[\n {\n customElement: PegaCustomElement,\n name: 'pega-reference'\n }\n ]}\n customActions={[\n {\n icon: 'code',\n text: tooltip,\n onMouseDown: () => {\n modalMethods.current = create(Modal, modalProps);\n },\n active: isPegaRefActive,\n shortcut: {\n pattern: 'meta+191',\n description: tooltip,\n command: onInsertField\n }\n }\n ]}\n onInit={initializedEditor => setEditor(initializedEditor)}\n />\n );\n }\n );\n\nexport default DynamicContentEditor;\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { EditorProps } from '@pega/cosmos-react-rte';
|
|
3
|
+
export declare type ItemType = {
|
|
4
|
+
id: string;
|
|
5
|
+
text: string;
|
|
6
|
+
};
|
|
7
|
+
export interface DynamicContentEditorProps extends EditorProps {
|
|
8
|
+
form: {
|
|
9
|
+
onSubmit: (insertField: (selectedField: ItemType) => void) => void;
|
|
10
|
+
dynamicContentPicker: ReactNode;
|
|
11
|
+
};
|
|
12
|
+
onActiveFieldChange: (field: ItemType) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface DynamicContentEditorContextProps extends DynamicContentEditorProps {
|
|
15
|
+
updateProperties?: (selectedfield: ItemType) => void;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=DynamicContentEditor.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DynamicContentEditor.types.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicContentEditor/DynamicContentEditor.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,oBAAY,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,WAAW,yBAA0B,SAAQ,WAAW;IAC5D,IAAI,EAAE;QACJ,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC,aAAa,EAAE,QAAQ,KAAK,IAAI,KAAK,IAAI,CAAC;QACnE,oBAAoB,EAAE,SAAS,CAAC;KACjC,CAAC;IACF,mBAAmB,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;CAChD;AAED,MAAM,WAAW,gCAAiC,SAAQ,yBAAyB;IACjF,gBAAgB,CAAC,EAAE,CAAC,aAAa,EAAE,QAAQ,KAAK,IAAI,CAAC;CACtD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DynamicContentEditor.types.js","sourceRoot":"","sources":["../../../src/components/DynamicContentEditor/DynamicContentEditor.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ReactNode } from 'react';\n\nimport { EditorProps } from '@pega/cosmos-react-rte';\n\nexport type ItemType = {\n id: string;\n text: string;\n};\n\nexport interface DynamicContentEditorProps extends EditorProps {\n form: {\n onSubmit: (insertField: (selectedField: ItemType) => void) => void;\n dynamicContentPicker: ReactNode;\n };\n onActiveFieldChange: (field: ItemType) => void;\n}\n\nexport interface DynamicContentEditorContextProps extends DynamicContentEditorProps {\n updateProperties?: (selectedfield: ItemType) => void;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PegaCustomElement.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicContentEditor/PegaCustomElement.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,WAAW;IACxD,iBAAiB;CAoBlB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export default class PegaCustomElement extends HTMLElement {
|
|
2
|
+
connectedCallback() {
|
|
3
|
+
const template = document.createElement('template');
|
|
4
|
+
template.innerHTML = `<style>
|
|
5
|
+
pega-reference {
|
|
6
|
+
color:#076bc9;
|
|
7
|
+
cursor:pointer;
|
|
8
|
+
}
|
|
9
|
+
pega-reference:hover{
|
|
10
|
+
text-decoration:underline;
|
|
11
|
+
}
|
|
12
|
+
pega-reference::before{
|
|
13
|
+
content: '['
|
|
14
|
+
}
|
|
15
|
+
pega-reference::after{
|
|
16
|
+
content: ']'
|
|
17
|
+
}
|
|
18
|
+
</style>`;
|
|
19
|
+
const temp = document.importNode(template.content, true);
|
|
20
|
+
this.append(temp);
|
|
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,OAAO,OAAO,iBAAkB,SAAQ,WAAW;IACxD,iBAAiB;QACf,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QACpD,QAAQ,CAAC,SAAS,GAAG;;;;;;;;;;;;;;WAcd,CAAC;QACR,MAAM,IAAI,GAAG,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACzD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;CACF","sourcesContent":["export default class PegaCustomElement extends HTMLElement {\n connectedCallback() {\n const template = document.createElement('template');\n template.innerHTML = `<style>\n pega-reference {\n color:#076bc9;\n cursor:pointer;\n }\n pega-reference:hover{\n text-decoration:underline;\n }\n pega-reference::before{\n content: '['\n }\n pega-reference::after{\n content: ']'\n }\n </style>`;\n const temp = document.importNode(template.content, true);\n this.append(temp);\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,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { NodeType } from './Node.types';
|
|
2
3
|
export declare const StyledCircle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
4
|
export declare const StyledLabel: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").TextProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeTemplate.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/FlowModeller/Node/NodeTemplate.styles.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,eAAO,MAAM,YAAY,yGAYvB,CAAC;AAIH,eAAO,MAAM,WAAW;cAA4B,QAAQ;SAW1D,CAAC;AAIH,eAAO,MAAM,UAAU,yGAWrB,CAAC;AAIH,eAAO,MAAM,gBAAgB,4GAQ3B,CAAC;AAIH,eAAO,MAAM,UAAU,mOAOrB,CAAC;AAIH,eAAO,MAAM,UAAU,mOAoBrB,CAAC;AAEH,eAAO,MAAM,gBAAgB,yOAO3B,CAAC;AAIH,eAAO,MAAM,iBAAiB,yGAa5B,CAAC;AAIH,eAAO,MAAM,oBAAoB,wGAEhC,CAAC;AAEF,eAAO,MAAM,wBAAwB,yGAMnC,CAAC;AAGH,eAAO,MAAM,sBAAsB,mOAQjC,CAAC"}
|
|
1
|
+
{"version":3,"file":"NodeTemplate.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/FlowModeller/Node/NodeTemplate.styles.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,eAAO,MAAM,YAAY,yGAYvB,CAAC;AAIH,eAAO,MAAM,WAAW;cAA4B,QAAQ;SAW1D,CAAC;AAIH,eAAO,MAAM,UAAU,yGAWrB,CAAC;AAIH,eAAO,MAAM,gBAAgB,4GAQ3B,CAAC;AAIH,eAAO,MAAM,UAAU,mOAOrB,CAAC;AAIH,eAAO,MAAM,UAAU,mOAoBrB,CAAC;AAEH,eAAO,MAAM,gBAAgB,yOAO3B,CAAC;AAIH,eAAO,MAAM,iBAAiB,yGAa5B,CAAC;AAIH,eAAO,MAAM,oBAAoB,wGAEhC,CAAC;AAEF,eAAO,MAAM,wBAAwB,yGAMnC,CAAC;AAGH,eAAO,MAAM,sBAAsB,mOAQjC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const StyledPanelToggleWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
3
|
export declare const UtilityPanelToggle: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").ButtonProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
3
4
|
export declare const StyledToolbar: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Workbench.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Workbench/Workbench.styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,wBAAwB,yGAEpC,CAAC;AAIF,eAAO,MAAM,kBAAkB,qOAqB7B,CAAC;AAIH,eAAO,MAAM,aAAa,yGA8BzB,CAAC;AAIF,eAAO,MAAM,UAAU,yGAGtB,CAAC;AAIF,eAAO,MAAM,eAAe,yGAE3B,CAAC;AAIF,eAAO,MAAM,WAAW,yGAMtB,CAAC;AAIH,eAAO,MAAM,aAAa,yGAEzB,CAAC;AAIF,eAAO,MAAM,sBAAsB,mOAIlC,CAAC"}
|
|
1
|
+
{"version":3,"file":"Workbench.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Workbench/Workbench.styles.ts"],"names":[],"mappings":";AAMA,eAAO,MAAM,wBAAwB,yGAEpC,CAAC;AAIF,eAAO,MAAM,kBAAkB,qOAqB7B,CAAC;AAIH,eAAO,MAAM,aAAa,yGA8BzB,CAAC;AAIF,eAAO,MAAM,UAAU,yGAGtB,CAAC;AAIF,eAAO,MAAM,eAAe,yGAE3B,CAAC;AAIF,eAAO,MAAM,WAAW,yGAMtB,CAAC;AAIH,eAAO,MAAM,aAAa,yGAEzB,CAAC;AAIF,eAAO,MAAM,sBAAsB,mOAIlC,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ export { default as AppHeader } from './components/AppHeader';
|
|
|
2
2
|
export * from './components/AppHeader';
|
|
3
3
|
export { default as AppShell } from './components/AppShell';
|
|
4
4
|
export * from './components/AppShell';
|
|
5
|
+
export { default as DynamicContentEditor } from './components/DynamicContentEditor';
|
|
6
|
+
export * from './components/DynamicContentEditor';
|
|
5
7
|
export { default as FlowModeller } from './components/FlowModeller';
|
|
6
8
|
export * from './components/FlowModeller';
|
|
7
9
|
export * from './components/ItemLibrary';
|
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,cAAc,0BAA0B,CAAC;AACzC,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"}
|
|
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,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACpF,cAAc,mCAAmC,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,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
|
@@ -3,6 +3,8 @@ export { default as AppHeader } from './components/AppHeader';
|
|
|
3
3
|
export * from './components/AppHeader';
|
|
4
4
|
export { default as AppShell } from './components/AppShell';
|
|
5
5
|
export * from './components/AppShell';
|
|
6
|
+
export { default as DynamicContentEditor } from './components/DynamicContentEditor';
|
|
7
|
+
export * from './components/DynamicContentEditor';
|
|
6
8
|
export { default as FlowModeller } from './components/FlowModeller';
|
|
7
9
|
export * from './components/FlowModeller';
|
|
8
10
|
export * from './components/ItemLibrary';
|
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,cAAc,0BAA0B,CAAC;AACzC,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 * from './components/ItemLibrary';\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"]}
|
|
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,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACpF,cAAc,mCAAmC,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,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 DynamicContentEditor } from './components/DynamicContentEditor';\nexport * from './components/DynamicContentEditor';\nexport { default as FlowModeller } from './components/FlowModeller';\nexport * from './components/FlowModeller';\nexport * from './components/ItemLibrary';\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": "3.0.0-dev.
|
|
3
|
+
"version": "3.0.0-dev.3.0",
|
|
4
4
|
"author": "Pegasystems",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
|
@@ -20,24 +20,25 @@
|
|
|
20
20
|
"build": "tsc -b"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@pega/cosmos-react-core": "3.0.0-dev.
|
|
24
|
-
"@pega/cosmos-react-dnd": "3.0.0-dev.
|
|
23
|
+
"@pega/cosmos-react-core": "3.0.0-dev.3.0",
|
|
24
|
+
"@pega/cosmos-react-dnd": "3.0.0-dev.3.0",
|
|
25
25
|
"dagre": "^0.8.5",
|
|
26
26
|
"polished": "^4.1.0",
|
|
27
27
|
"react": "^16.14.0 || ^17.0.0",
|
|
28
28
|
"react-dom": "^16.14.0 || ^17.0.0",
|
|
29
|
-
"styled-components": "^5.2.0"
|
|
29
|
+
"styled-components": "^5.2.0",
|
|
30
|
+
"tinymce": "^5.10.2"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
33
|
"@storybook/addon-a11y": "^6.4.12",
|
|
33
34
|
"@storybook/addon-actions": "^6.4.12",
|
|
34
|
-
"@storybook/addon-backgrounds": "^6.4.12",
|
|
35
35
|
"@storybook/addon-storysource": "^6.4.12",
|
|
36
36
|
"@storybook/addon-toolbars": "^6.4.12",
|
|
37
37
|
"@storybook/addons": "^6.4.12",
|
|
38
38
|
"@storybook/react": "^6.4.12",
|
|
39
39
|
"@storybook/testing-react": "0.0.18",
|
|
40
40
|
"@storybook/theming": "^6.4.12",
|
|
41
|
+
"@types/tinymce": "^4.6.4",
|
|
41
42
|
"enzyme": "^3.11.0",
|
|
42
43
|
"typescript": "~4.5.2"
|
|
43
44
|
}
|