@pega/cosmos-react-demos 3.0.0-dev.17.0 → 3.0.0-dev.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/jsx/build/FlowModeller/FlowModeller.mocks.d.ts +3 -2
  2. package/jsx/build/FlowModeller/FlowModeller.mocks.d.ts.map +1 -1
  3. package/jsx/build/FlowModeller/FlowModeller.mocks.jsx +62 -8
  4. package/jsx/build/FlowModeller/FlowModeller.mocks.jsx.map +1 -1
  5. package/jsx/build/FlowModeller/FlowModeller.stories.d.ts.map +1 -1
  6. package/jsx/build/FlowModeller/FlowModeller.stories.jsx +93 -16
  7. package/jsx/build/FlowModeller/FlowModeller.stories.jsx.map +1 -1
  8. package/jsx/build/ObjectSelect/ObjectSelect.mocks.d.ts +23 -8
  9. package/jsx/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +1 -1
  10. package/jsx/build/ObjectSelect/ObjectSelect.mocks.jsx +31 -27
  11. package/jsx/build/ObjectSelect/ObjectSelect.mocks.jsx.map +1 -1
  12. package/jsx/build/ObjectSelect/ObjectSelect.stories.d.ts.map +1 -1
  13. package/jsx/build/ObjectSelect/ObjectSelect.stories.jsx +60 -21
  14. package/jsx/build/ObjectSelect/ObjectSelect.stories.jsx.map +1 -1
  15. package/jsx/build/PageTemplates/PageTemplates.mocks.d.ts.map +1 -1
  16. package/jsx/build/PageTemplates/PageTemplates.mocks.jsx +17 -2
  17. package/jsx/build/PageTemplates/PageTemplates.mocks.jsx.map +1 -1
  18. package/jsx/build/Workbench/Workbench.stories.d.ts.map +1 -1
  19. package/jsx/build/Workbench/Workbench.stories.jsx +4 -1
  20. package/jsx/build/Workbench/Workbench.stories.jsx.map +1 -1
  21. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts +1 -1
  22. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts.map +1 -1
  23. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js +3 -1
  24. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js.map +1 -1
  25. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts +2 -1
  26. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts.map +1 -1
  27. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx +19 -13
  28. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx.map +1 -1
  29. package/jsx/condition-builder/ConditionBuilder/props.mock.d.ts.map +1 -1
  30. package/jsx/condition-builder/ConditionBuilder/props.mock.js +67 -15
  31. package/jsx/condition-builder/ConditionBuilder/props.mock.js.map +1 -1
  32. package/jsx/condition-builder/ConditionInput/ConditionInput.stories.jsx +4 -1
  33. package/jsx/condition-builder/ConditionInput/ConditionInput.stories.jsx.map +1 -1
  34. package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.d.ts.map +1 -1
  35. package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.js +12 -0
  36. package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.js.map +1 -1
  37. package/jsx/core/Currency/Currency.stories.d.ts.map +1 -1
  38. package/jsx/core/Currency/Currency.stories.jsx +2 -0
  39. package/jsx/core/Currency/Currency.stories.jsx.map +1 -1
  40. package/jsx/core/DateTime/DateTime.stories.d.ts.map +1 -1
  41. package/jsx/core/DateTime/DateTime.stories.jsx +74 -9
  42. package/jsx/core/DateTime/DateTime.stories.jsx.map +1 -1
  43. package/jsx/core/Form/Form.mocks.d.ts.map +1 -1
  44. package/jsx/core/Form/Form.mocks.jsx +2 -1
  45. package/jsx/core/Form/Form.mocks.jsx.map +1 -1
  46. package/jsx/core/ListToolbar/ListToolbar.stories.d.ts +5 -1
  47. package/jsx/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -1
  48. package/jsx/core/ListToolbar/ListToolbar.stories.jsx +9 -3
  49. package/jsx/core/ListToolbar/ListToolbar.stories.jsx.map +1 -1
  50. package/jsx/core/Menu/Menu.stories.d.ts.map +1 -1
  51. package/jsx/core/Menu/Menu.stories.jsx +3 -2
  52. package/jsx/core/Menu/Menu.stories.jsx.map +1 -1
  53. package/jsx/core/Number/Number.stories.jsx +3 -3
  54. package/jsx/core/Number/Number.stories.jsx.map +1 -1
  55. package/jsx/cs/ArticleList/ArticleList.stories.d.ts.map +1 -1
  56. package/jsx/cs/ArticleList/ArticleList.stories.jsx +1 -1
  57. package/jsx/cs/ArticleList/ArticleList.stories.jsx.map +1 -1
  58. package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx +1 -1
  59. package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx.map +1 -1
  60. package/jsx/social/Email/Email.stories.d.ts +3 -1
  61. package/jsx/social/Email/Email.stories.d.ts.map +1 -1
  62. package/jsx/social/Email/Email.stories.jsx +61 -35
  63. package/jsx/social/Email/Email.stories.jsx.map +1 -1
  64. package/jsx/social/Feed/Feed.mocks.d.ts +1 -1
  65. package/jsx/social/Feed/Feed.mocks.d.ts.map +1 -1
  66. package/jsx/social/Feed/Feed.mocks.jsx.map +1 -1
  67. package/jsx/social/Feed/Feed.stories.jsx +1 -1
  68. package/jsx/social/Feed/Feed.stories.jsx.map +1 -1
  69. package/jsx/social/Feed/FeedPost.stories.d.ts.map +1 -1
  70. package/jsx/social/Feed/FeedPost.stories.jsx +7 -7
  71. package/jsx/social/Feed/FeedPost.stories.jsx.map +1 -1
  72. package/jsx/social/Feed/FeedReply.stories.d.ts +1 -1
  73. package/jsx/social/Feed/FeedReply.stories.d.ts.map +1 -1
  74. package/jsx/social/Feed/FeedReply.stories.jsx +6 -6
  75. package/jsx/social/Feed/FeedReply.stories.jsx.map +1 -1
  76. package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +1 -1
  77. package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.jsx +1 -0
  78. package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.jsx.map +1 -1
  79. package/lib/build/FlowModeller/FlowModeller.mocks.d.ts +3 -2
  80. package/lib/build/FlowModeller/FlowModeller.mocks.d.ts.map +1 -1
  81. package/lib/build/FlowModeller/FlowModeller.mocks.js +62 -8
  82. package/lib/build/FlowModeller/FlowModeller.mocks.js.map +1 -1
  83. package/lib/build/FlowModeller/FlowModeller.stories.d.ts.map +1 -1
  84. package/lib/build/FlowModeller/FlowModeller.stories.js +89 -17
  85. package/lib/build/FlowModeller/FlowModeller.stories.js.map +1 -1
  86. package/lib/build/ObjectSelect/ObjectSelect.mocks.d.ts +23 -8
  87. package/lib/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +1 -1
  88. package/lib/build/ObjectSelect/ObjectSelect.mocks.js +27 -27
  89. package/lib/build/ObjectSelect/ObjectSelect.mocks.js.map +1 -1
  90. package/lib/build/ObjectSelect/ObjectSelect.stories.d.ts.map +1 -1
  91. package/lib/build/ObjectSelect/ObjectSelect.stories.js +62 -21
  92. package/lib/build/ObjectSelect/ObjectSelect.stories.js.map +1 -1
  93. package/lib/build/PageTemplates/PageTemplates.mocks.d.ts.map +1 -1
  94. package/lib/build/PageTemplates/PageTemplates.mocks.js +17 -2
  95. package/lib/build/PageTemplates/PageTemplates.mocks.js.map +1 -1
  96. package/lib/build/Workbench/Workbench.stories.d.ts.map +1 -1
  97. package/lib/build/Workbench/Workbench.stories.js +4 -1
  98. package/lib/build/Workbench/Workbench.stories.js.map +1 -1
  99. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts +1 -1
  100. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts.map +1 -1
  101. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js +3 -1
  102. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js.map +1 -1
  103. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts +2 -1
  104. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts.map +1 -1
  105. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.js +17 -15
  106. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.js.map +1 -1
  107. package/lib/condition-builder/ConditionBuilder/props.mock.d.ts.map +1 -1
  108. package/lib/condition-builder/ConditionBuilder/props.mock.js +67 -15
  109. package/lib/condition-builder/ConditionBuilder/props.mock.js.map +1 -1
  110. package/lib/condition-builder/ConditionInput/ConditionInput.stories.js +4 -1
  111. package/lib/condition-builder/ConditionInput/ConditionInput.stories.js.map +1 -1
  112. package/lib/condition-builder/PromotedFilters/PromotedFilters.mocks.d.ts.map +1 -1
  113. package/lib/condition-builder/PromotedFilters/PromotedFilters.mocks.js +12 -0
  114. package/lib/condition-builder/PromotedFilters/PromotedFilters.mocks.js.map +1 -1
  115. package/lib/core/Currency/Currency.stories.d.ts.map +1 -1
  116. package/lib/core/Currency/Currency.stories.js +2 -0
  117. package/lib/core/Currency/Currency.stories.js.map +1 -1
  118. package/lib/core/DateTime/DateTime.stories.d.ts.map +1 -1
  119. package/lib/core/DateTime/DateTime.stories.js +74 -9
  120. package/lib/core/DateTime/DateTime.stories.js.map +1 -1
  121. package/lib/core/Form/Form.mocks.d.ts.map +1 -1
  122. package/lib/core/Form/Form.mocks.js +1 -1
  123. package/lib/core/Form/Form.mocks.js.map +1 -1
  124. package/lib/core/ListToolbar/ListToolbar.stories.d.ts +5 -1
  125. package/lib/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -1
  126. package/lib/core/ListToolbar/ListToolbar.stories.js +9 -3
  127. package/lib/core/ListToolbar/ListToolbar.stories.js.map +1 -1
  128. package/lib/core/Menu/Menu.stories.d.ts.map +1 -1
  129. package/lib/core/Menu/Menu.stories.js +3 -2
  130. package/lib/core/Menu/Menu.stories.js.map +1 -1
  131. package/lib/core/Number/Number.stories.js +3 -3
  132. package/lib/core/Number/Number.stories.js.map +1 -1
  133. package/lib/cs/ArticleList/ArticleList.stories.d.ts.map +1 -1
  134. package/lib/cs/ArticleList/ArticleList.stories.js +1 -1
  135. package/lib/cs/ArticleList/ArticleList.stories.js.map +1 -1
  136. package/lib/rte/RichTextEditor/RichTextViewer.stories.js +1 -1
  137. package/lib/rte/RichTextEditor/RichTextViewer.stories.js.map +1 -1
  138. package/lib/social/Email/Email.stories.d.ts +3 -1
  139. package/lib/social/Email/Email.stories.d.ts.map +1 -1
  140. package/lib/social/Email/Email.stories.js +73 -47
  141. package/lib/social/Email/Email.stories.js.map +1 -1
  142. package/lib/social/Feed/Feed.mocks.d.ts +1 -1
  143. package/lib/social/Feed/Feed.mocks.d.ts.map +1 -1
  144. package/lib/social/Feed/Feed.mocks.js.map +1 -1
  145. package/lib/social/Feed/Feed.stories.js +1 -1
  146. package/lib/social/Feed/Feed.stories.js.map +1 -1
  147. package/lib/social/Feed/FeedPost.stories.d.ts.map +1 -1
  148. package/lib/social/Feed/FeedPost.stories.js +7 -7
  149. package/lib/social/Feed/FeedPost.stories.js.map +1 -1
  150. package/lib/social/Feed/FeedReply.stories.d.ts +1 -1
  151. package/lib/social/Feed/FeedReply.stories.d.ts.map +1 -1
  152. package/lib/social/Feed/FeedReply.stories.js +6 -6
  153. package/lib/social/Feed/FeedReply.stories.js.map +1 -1
  154. package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +1 -1
  155. package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js +1 -0
  156. package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js.map +1 -1
  157. package/package.json +9 -9
@@ -1,11 +1,11 @@
1
1
  import { FC } from 'react';
2
2
  import { Action, ForwardProps } from '@pega/cosmos-react-core';
3
- import { NodeProps, ConnectorProps, NodeLibraryItem, DeleteNodeOutcome, GraphData } from '@pega/cosmos-react-build';
3
+ import { NodeProps, ConnectorProps, NodeType, NodeLibraryItem, DeleteNodeOutcome, GraphData } from '@pega/cosmos-react-build';
4
4
  interface DecisionTableProps {
5
5
  updatedData: GraphData<NodeProps, ConnectorProps>;
6
6
  connectors: ConnectorProps[];
7
7
  node: NodeProps;
8
- onDeleteRow: (data: GraphData<NodeProps, ConnectorProps>, connector: ConnectorProps, deleteItems?: DeleteNodeOutcome['deletes'], e?: MouseEvent) => void;
8
+ onDeleteRow: (data: GraphData<NodeProps, ConnectorProps>, connector: ConnectorProps, error: string, deleteItems?: DeleteNodeOutcome['deletes'], e?: MouseEvent) => void;
9
9
  onAddRow: (data: GraphData<NodeProps, ConnectorProps>) => void;
10
10
  readOnly?: boolean;
11
11
  }
@@ -17,6 +17,7 @@ interface DeletePopoverProps {
17
17
  }
18
18
  export declare const DecisionTable: FC<DecisionTableProps & ForwardProps>;
19
19
  export declare const DeletePopover: FC<DeletePopoverProps & ForwardProps>;
20
+ export declare const FlowShapeType: Record<string, NodeType>;
20
21
  export declare const exampleCRMNodesData: NodeProps[];
21
22
  export declare const exampleCRMConnectorsData: ConnectorProps[];
22
23
  export declare const emptyNodesData: NodeProps[];
@@ -1 +1 @@
1
- {"version":3,"file":"FlowModeller.mocks.d.ts","sourceRoot":"","sources":["../../../src/build/FlowModeller/FlowModeller.mocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwC,EAAE,EAAE,MAAM,OAAO,CAAC;AAEjE,OAAO,EASL,MAAM,EACN,YAAY,EAOb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,SAAS,EACT,cAAc,EAGd,eAAe,EACf,iBAAiB,EAGjB,SAAS,EACV,MAAM,0BAA0B,CAAC;AAElC,UAAU,kBAAkB;IAC1B,WAAW,EAAE,SAAS,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAClD,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,EAAE,CACX,IAAI,EAAE,SAAS,CAAC,SAAS,EAAE,cAAc,CAAC,EAC1C,SAAS,EAAE,cAAc,EACzB,WAAW,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC,EAC1C,CAAC,CAAC,EAAE,UAAU,KACX,IAAI,C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AE,SAAS,CAAC;IAChB,WAAW,EAAE,CACX,IAAI,EAAE,SAAS,CAAC,SAAS,EAAE,cAAc,CAAC,EAC1C,SAAS,EAAE,cAAc,EACzB,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC,EAC1C,CAAC,CAAC,EAAE,UAAU,KACX,IAAI,CAAC;IACV,QAAQ,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,EAAE,cAAc,CAAC,KAAK,IAAI,CAAC;IAC/D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AACD,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,GAAG,YAAY,CA8F/D,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,GAAG,YAAY,CAsC/D,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAiHjD,CAAC;AAEH,eAAO,MAAM,mBAAmB,EAAE,SAAS,EA2J1C,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,cAAc,EA+HpD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,SAAS,EAWrC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,cAAc,EAO/C,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,MAAM,EAK/B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,EA2CxC,CAAC"}
@@ -25,11 +25,16 @@ export const DecisionTable = forwardRef(({ updatedData, connectors, onDeleteRow,
25
25
  };
26
26
  const onDeleteCondition = (connector, e) => {
27
27
  const updatedGraphData = FlowModellerHelper.deleteConnector(updatedData, connector);
28
- onDeleteRow(updatedGraphData.graphData, connector, updatedGraphData.deletes, e);
28
+ if (updatedGraphData.error) {
29
+ onDeleteRow(updatedGraphData.graphData, connector, t('delete_connector_error'), updatedGraphData.deletes, e);
30
+ }
31
+ else {
32
+ onDeleteRow(updatedGraphData.graphData, connector, '', updatedGraphData.deletes, e);
33
+ }
29
34
  };
30
35
  const columns = [
31
36
  {
32
- renderer: connector => <Input value={connector.label} readOnly/>,
37
+ renderer: ({ label }) => <Input value={label} readOnly/>,
33
38
  label: 'Label'
34
39
  },
35
40
  { renderer: () => <Text>No value</Text>, label: 'Value' },
@@ -87,7 +92,7 @@ export const DeletePopover = forwardRef(({ targetId, showPopover, onCancel, onDe
87
92
  </Popover>)}
88
93
  </>);
89
94
  });
90
- const FlowShapeType = Object.freeze({
95
+ export const FlowShapeType = Object.freeze({
91
96
  START: START_NODETYPE,
92
97
  STOP: STOP_NODETYPE,
93
98
  DECISION: {
@@ -185,18 +190,33 @@ const FlowShapeType = Object.freeze({
185
190
  },
186
191
  connector: [{ label: '' }]
187
192
  }
193
+ },
194
+ GOTO: {
195
+ id: 'goto',
196
+ name: 'Go to',
197
+ color: 'red',
198
+ icon: 'arrow-left-right',
199
+ minConnectors: 0,
200
+ defaults: {
201
+ node: {
202
+ label: 'Go to',
203
+ description: ''
204
+ },
205
+ connector: []
206
+ }
188
207
  }
189
208
  });
190
209
  export const exampleCRMNodesData = [
191
210
  {
192
211
  id: '100',
193
- label: 'Open',
212
+ label: 'START',
194
213
  type: FlowShapeType.START
195
214
  },
196
215
  {
197
216
  id: '101',
198
217
  label: 'Is B2B',
199
218
  description: '',
219
+ reference: '',
200
220
  type: FlowShapeType.DECISION,
201
221
  additionalData: [],
202
222
  error: ''
@@ -205,14 +225,25 @@ export const exampleCRMNodesData = [
205
225
  id: '102',
206
226
  label: 'Update Org Domains',
207
227
  description: '',
228
+ reference: '',
208
229
  type: FlowShapeType.ASSIGNMENT,
209
230
  additionalData: [],
210
231
  error: ''
211
232
  },
233
+ {
234
+ id: '127',
235
+ label: 'Goto',
236
+ description: '',
237
+ reference: '',
238
+ type: FlowShapeType.GOTO,
239
+ additionalData: [],
240
+ error: ''
241
+ },
212
242
  {
213
243
  id: '103',
214
244
  label: 'CreateC2OFromContact',
215
245
  description: '',
246
+ reference: '',
216
247
  type: FlowShapeType.ASSIGNMENT,
217
248
  additionalData: [],
218
249
  error: ''
@@ -221,6 +252,7 @@ export const exampleCRMNodesData = [
221
252
  id: '104',
222
253
  label: 'CreateC2AFromContact',
223
254
  description: '',
255
+ reference: '',
224
256
  type: FlowShapeType.ASSIGNMENT,
225
257
  additionalData: [],
226
258
  error: ''
@@ -229,6 +261,7 @@ export const exampleCRMNodesData = [
229
261
  id: '105',
230
262
  label: 'Is B2C',
231
263
  description: '',
264
+ reference: '',
232
265
  type: FlowShapeType.DECISION,
233
266
  additionalData: [],
234
267
  error: ''
@@ -237,6 +270,7 @@ export const exampleCRMNodesData = [
237
270
  id: '106',
238
271
  label: 'CreatePrimaryIndividualAccount',
239
272
  description: '',
273
+ reference: '',
240
274
  type: FlowShapeType.ASSIGNMENT,
241
275
  additionalData: [],
242
276
  error: ''
@@ -245,6 +279,7 @@ export const exampleCRMNodesData = [
245
279
  id: '107',
246
280
  label: 'Capture Event',
247
281
  description: '',
282
+ reference: '',
248
283
  type: FlowShapeType.ASSIGNMENT,
249
284
  additionalData: [],
250
285
  error: ''
@@ -253,6 +288,7 @@ export const exampleCRMNodesData = [
253
288
  id: '108',
254
289
  label: 'Update Private Data',
255
290
  description: '',
291
+ reference: '',
256
292
  type: FlowShapeType.ASSIGNMENT,
257
293
  additionalData: [],
258
294
  error: ''
@@ -261,6 +297,7 @@ export const exampleCRMNodesData = [
261
297
  id: '109',
262
298
  label: 'Attach Business Card',
263
299
  description: '',
300
+ reference: '',
264
301
  type: FlowShapeType.ASSIGNMENT,
265
302
  additionalData: [],
266
303
  error: ''
@@ -269,14 +306,16 @@ export const exampleCRMNodesData = [
269
306
  id: '110',
270
307
  label: 'Has Address',
271
308
  description: '',
309
+ reference: '',
272
310
  type: FlowShapeType.DECISION,
273
311
  additionalData: [],
274
312
  error: ''
275
313
  },
276
314
  {
277
315
  id: '111',
278
- label: 'RemoveWORelatedNBA',
316
+ label: 'Remove WO Related NBA',
279
317
  description: '',
318
+ reference: '',
280
319
  type: FlowShapeType.ASSIGNMENT,
281
320
  additionalData: [],
282
321
  error: ''
@@ -285,6 +324,7 @@ export const exampleCRMNodesData = [
285
324
  id: '112',
286
325
  label: 'Bulk Processing',
287
326
  description: '',
327
+ reference: '',
288
328
  type: FlowShapeType.DECISION,
289
329
  additionalData: [],
290
330
  error: ''
@@ -293,6 +333,7 @@ export const exampleCRMNodesData = [
293
333
  id: '113',
294
334
  label: 'Queue For Agent',
295
335
  description: '',
336
+ reference: '',
296
337
  type: FlowShapeType.ASSIGNMENT,
297
338
  additionalData: [],
298
339
  error: ''
@@ -301,21 +342,23 @@ export const exampleCRMNodesData = [
301
342
  id: '114',
302
343
  label: 'Retrieve Lat Long',
303
344
  description: '',
345
+ reference: '',
304
346
  type: FlowShapeType.ASSIGNMENT,
305
347
  additionalData: [],
306
348
  error: ''
307
349
  },
308
350
  {
309
351
  id: '115',
310
- label: 'RemoveWORelatedNBA',
352
+ label: 'Remove WO Related NBA',
311
353
  description: '',
354
+ reference: '',
312
355
  type: FlowShapeType.ASSIGNMENT,
313
356
  additionalData: [],
314
357
  error: ''
315
358
  },
316
359
  {
317
360
  id: '121',
318
- label: 'STOP',
361
+ label: 'END',
319
362
  type: FlowShapeType.STOP
320
363
  }
321
364
  ];
@@ -351,9 +394,15 @@ export const exampleCRMConnectorsData = [
351
394
  toNodeId: '105'
352
395
  },
353
396
  {
354
- id: '101-105',
397
+ id: '101-127',
355
398
  label: 'Else',
356
399
  fromNodeId: '101',
400
+ toNodeId: '127'
401
+ },
402
+ {
403
+ id: '127-105',
404
+ label: '',
405
+ fromNodeId: '127',
357
406
  toNodeId: '105'
358
407
  },
359
408
  {
@@ -488,6 +537,11 @@ export const nodeLibrary = [
488
537
  primary: 'Ask a question',
489
538
  type: FlowShapeType.QUESTION
490
539
  },
540
+ {
541
+ id: createUID(),
542
+ primary: 'Go to',
543
+ type: FlowShapeType.GOTO
544
+ },
491
545
  {
492
546
  id: createUID(),
493
547
  primary: 'Automations',
@@ -1 +1 @@
1
- {"version":3,"file":"FlowModeller.mocks.jsx","sourceRoot":"","sources":["../../../src/build/FlowModeller/FlowModeller.mocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAO,UAAU,EAAM,MAAM,OAAO,CAAC;AAEjE,OAAO,EACL,KAAK,EACL,KAAK,EAEL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,SAAS,EAGT,IAAI,EACJ,WAAW,EACX,UAAU,EACV,OAAO,EACP,OAAO,EACP,UAAU,EACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAGL,kBAAkB,EAIlB,cAAc,EACd,aAAa,EAEd,MAAM,0BAA0B,CAAC;AAsBlC,MAAM,CAAC,MAAM,aAAa,GAA0C,UAAU,CAC5E,CACE,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAsB,EACtF,GAA2B,EAC3B,EAAE;IACF,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAmB,UAAU,CAAC,CAAC;IACzE,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IAEpB,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,MAAM,KAAK,GAAG,WAAW,CAAC;QAC1B,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,YAAY,CACtD,WAAW,EACX,IAAI,CAAC,EAAE,EACP,KAAK,CACN,CAAC,SAAS,CAAC;QAGZ,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;YAC1B,MAAM,gBAAgB,GAAmB,SAAS,CAAC,CAAC,CAAC,CAAC;YACtD,IA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C;QACE,EAAE,EAAE,UAAU;QACd,IAAI,EAAE,UAAU;KACjB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAsB;IAC5C;QACE,EAAE,EAAE,SAAS,EAAE;QACf,OAAO,EAAE,YAAY;QACrB,IAAI,EAAE,aAAa,CAAC,UAAU;KAC/B;IACD;QACE,EAAE,EAAE,SAAS,EAAE;QACf,OAAO,EAAE,UAAU;QACnB,IAAI,EAAE,aAAa,CAAC,QAAQ;KAC7B;IACD;QACE,EAAE,EAAE,SAAS,EAAE;QACf,OAAO,EAAE,gBAAgB;QACzB,IAAI,EAAE,aAAa,CAAC,OAAO;KAC5B;IACD;QACE,EAAE,EAAE,SAAS,EAAE;QACf,OAAO,EAAE,gBAAgB;QACzB,IAAI,EAAE,aAAa,CAAC,QAAQ;KAC7B;IACD;QACE,EAAE,EAAE,SAAS,EAAE;QACf,OAAO,EAAE,aAAa;QACtB,IAAI,EAAE,aAAa,CAAC,UAAU;QAC9B,KAAK,EAAE;YACL;gBACE,EAAE,EAAE,SAAS,EAAE;gBACf,OAAO,EAAE,YAAY;gBACrB,IAAI,EAAE,aAAa,CAAC,UAAU;aAC/B;YACD;gBACE,EAAE,EAAE,SAAS,EAAE;gBACf,OAAO,EAAE,cAAc;gBACvB,IAAI,EAAE,aAAa,CAAC,YAAY;aACjC;SACF;KACF;CACF,CAAC","sourcesContent":["import { useState, useEffect, Ref, forwardRef, FC } from 'react';\n\nimport {\n Input,\n Table,\n ColumnProps,\n Text,\n Button,\n Icon,\n Flex,\n createUID,\n Action,\n ForwardProps,\n Card,\n CardContent,\n CardHeader,\n useI18n,\n Popover,\n CardFooter\n} from '@pega/cosmos-react-core';\nimport {\n NodeProps,\n ConnectorProps,\n FlowModellerHelper,\n NodeType,\n NodeLibraryItem,\n DeleteNodeOutcome,\n START_NODETYPE,\n STOP_NODETYPE,\n GraphData\n} from '@pega/cosmos-react-build';\n\ninterface DecisionTableProps {\n updatedData: GraphData<NodeProps, ConnectorProps>;\n connectors: ConnectorProps[];\n node: NodeProps;\n onDeleteRow: (\n data: GraphData<NodeProps, ConnectorProps>,\n connector: ConnectorProps,\n deleteItems?: DeleteNodeOutcome['deletes'],\n e?: MouseEvent\n ) => void;\n onAddRow: (data: GraphData<NodeProps, ConnectorProps>) => void;\n readOnly?: boolean;\n}\ninterface DeletePopoverProps {\n targetId: string | null;\n showPopover: boolean;\n onCancel: () => void;\n onDelete: () => void;\n}\n\nexport const DecisionTable: FC<DecisionTableProps & ForwardProps> = forwardRef(\n (\n { updatedData, connectors, onDeleteRow, onAddRow, node, readOnly }: DecisionTableProps,\n ref: Ref<HTMLButtonElement>\n ) => {\n const [tableData, setTableData] = useState<ConnectorProps[]>(connectors);\n const t = useI18n();\n\n const onAddCondition = () => {\n const label = 'Otherwise';\n const updatedGraphData = FlowModellerHelper.addConnector(\n updatedData,\n node.id,\n label\n ).graphData;\n\n // Add a label to the base connector when the number of connectors are more than one\n if (tableData.length === 1) {\n const defaultConnector: ConnectorProps = tableData[0];\n if (defaultConnector?.label === '') {\n defaultConnector.label = 'Default';\n }\n for (let i = 0; i < updatedGraphData.connectors.length; i += 1) {\n const connector: ConnectorProps = updatedGraphData.connectors[i];\n if (connector.id === defaultConnector.id) {\n connector.label = defaultConnector.label;\n break;\n }\n }\n }\n\n if (updatedGraphData) onAddRow(updatedGraphData);\n };\n\n const onDeleteCondition = (connector: ConnectorProps, e: MouseEvent) => {\n const updatedGraphData = FlowModellerHelper.deleteConnector(updatedData, connector);\n onDeleteRow(updatedGraphData!.graphData, connector, updatedGraphData!.deletes, e);\n };\n\n const columns: ColumnProps<ConnectorProps>[] = [\n {\n renderer: connector => <Input value={connector.label} readOnly />,\n label: 'Label'\n },\n { renderer: () => <Text>No value</Text>, label: 'Value' },\n {\n renderer: connector => {\n return (\n <Button\n variant='simple'\n ref={ref}\n disabled={\n readOnly ||\n (node.type.name === 'Decision' && connectors.length < 3) ||\n (node.type.name === 'Assignment' && connectors.length < 2)\n }\n id={connector.id}\n icon\n onClick={(e: MouseEvent) => onDeleteCondition(connector, e)}\n label={t('delete')}\n >\n <Icon name='trash' />\n </Button>\n );\n },\n label: 'Action'\n }\n ];\n\n useEffect(() => {\n setTableData(connectors);\n }, [connectors]);\n\n return (\n <>\n <Table title='Outcomes' hoverHighlight data={tableData} columns={columns} />\n <Flex container={{ pad: [1, 0] }}>\n <Button disabled={readOnly} variant='simple' onClick={onAddCondition}>\n Add Condition\n </Button>\n </Flex>\n </>\n );\n }\n);\n\nexport const DeletePopover: FC<DeletePopoverProps & ForwardProps> = forwardRef(\n ({ targetId, showPopover, onCancel, onDelete }, ref: Ref<HTMLDivElement>) => {\n const [elementTarget, setElementTarget] = useState<Element>();\n const t = useI18n();\n\n useEffect(() => {\n const element = document.querySelector(`button[id='${targetId}']`);\n if (element) {\n setElementTarget(element);\n }\n });\n\n return (\n <>\n {elementTarget && showPopover && (\n <Popover target={elementTarget} ref={ref} show={showPopover}>\n <Card>\n <CardHeader>\n <Text variant='h4'>Delete Outcome</Text>\n <Button variant='simple' icon label={t('close')} onClick={onCancel}>\n <Icon name='times' />\n </Button>\n </CardHeader>\n <CardContent>\n Are you sure you want to delete this outcome and all its steps?\n </CardContent>\n <CardFooter container={{ justify: 'between' }}>\n <Button onClick={onCancel}>Cancel</Button>\n <Button variant='primary' onClick={onDelete}>\n Delete\n </Button>\n </CardFooter>\n </Card>\n </Popover>\n )}\n </>\n );\n }\n);\n\nconst FlowShapeType: Record<string, NodeType> = Object.freeze({\n START: START_NODETYPE,\n STOP: STOP_NODETYPE,\n DECISION: {\n id: 'decision',\n name: 'Decision',\n color: 'darkYellow',\n icon: 'diamond',\n minConnectors: 2,\n defaults: {\n node: {\n label: 'Decision',\n description: 'Adjust the conditions using the property panel'\n },\n connector: [\n {\n label: 'Default'\n },\n {\n label: 'Otherwise'\n }\n ]\n }\n },\n QUESTION: {\n id: 'question',\n name: 'Question',\n color: 'japaneseLaurel',\n icon: 'chat-help',\n minConnectors: 3,\n defaults: {\n node: {\n label: 'Question'\n },\n connector: [\n {\n label: 'Question 1'\n },\n {\n label: 'Question 2'\n },\n {\n label: 'Question 3'\n }\n ]\n }\n },\n ASSIGNMENT: {\n id: 'assignment',\n name: 'Assignment',\n color: 'japaneseLaurel',\n icon: 'clipboard-data',\n minConnectors: 1,\n defaults: {\n node: {\n label: 'Assignment'\n },\n connector: [{ label: '' }]\n }\n },\n MESSAGE: {\n id: 'message',\n name: 'Message',\n color: 'orange',\n icon: 'chat',\n minConnectors: 1,\n defaults: {\n node: {\n label: 'Message'\n },\n connector: [{ label: '' }]\n }\n },\n SEND_EMAIL: {\n id: 'send_email',\n name: 'Send email',\n color: 'yellow',\n icon: 'mail',\n minConnectors: 1,\n defaults: {\n node: {\n label: 'Send email'\n },\n connector: [{ label: '' }]\n }\n },\n GENERATE_PDF: {\n id: 'generate_pdf',\n name: 'Generate PDF',\n color: 'congressBlue',\n icon: 'polaris',\n minConnectors: 1,\n defaults: {\n node: {\n label: 'Generate PDF'\n },\n connector: [{ label: '' }]\n }\n }\n});\n\nexport const exampleCRMNodesData: NodeProps[] = [\n {\n id: '100',\n label: 'Open',\n type: FlowShapeType.START\n },\n {\n id: '101',\n label: 'Is B2B',\n description: '',\n type: FlowShapeType.DECISION,\n additionalData: [],\n error: ''\n },\n {\n id: '102',\n label: 'Update Org Domains',\n description: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '103',\n label: 'CreateC2OFromContact',\n description: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '104',\n label: 'CreateC2AFromContact',\n description: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '105',\n label: 'Is B2C',\n description: '',\n type: FlowShapeType.DECISION,\n additionalData: [],\n error: ''\n },\n {\n id: '106',\n label: 'CreatePrimaryIndividualAccount',\n description: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '107',\n label: 'Capture Event',\n description: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '108',\n label: 'Update Private Data',\n description: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '109',\n label: 'Attach Business Card',\n description: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '110',\n label: 'Has Address',\n description: '',\n type: FlowShapeType.DECISION,\n additionalData: [],\n error: ''\n },\n {\n id: '111',\n label: 'RemoveWORelatedNBA',\n description: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '112',\n label: 'Bulk Processing',\n description: '',\n type: FlowShapeType.DECISION,\n additionalData: [],\n error: ''\n },\n {\n id: '113',\n label: 'Queue For Agent',\n description: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '114',\n label: 'Retrieve Lat Long',\n description: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '115',\n label: 'RemoveWORelatedNBA',\n description: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '121',\n label: 'STOP',\n type: FlowShapeType.STOP\n }\n];\n\nexport const exampleCRMConnectorsData: ConnectorProps[] = [\n {\n id: '100-101',\n label: '',\n fromNodeId: '100',\n toNodeId: '101'\n },\n {\n id: '101-102',\n label: 'isSellingModeB2BOrB2BB2C',\n fromNodeId: '101',\n toNodeId: '102'\n },\n {\n id: '102-103',\n label: '',\n fromNodeId: '102',\n toNodeId: '103'\n },\n {\n id: '103-104',\n label: '',\n fromNodeId: '103',\n toNodeId: '104'\n },\n {\n id: '104-105',\n label: '',\n fromNodeId: '104',\n toNodeId: '105'\n },\n {\n id: '101-105',\n label: 'Else',\n fromNodeId: '101',\n toNodeId: '105'\n },\n {\n id: '105-106',\n label: 'isSellingModeB2COrB2BB2C',\n fromNodeId: '105',\n toNodeId: '106'\n },\n {\n id: '106-107',\n label: '',\n fromNodeId: '106',\n toNodeId: '107'\n },\n {\n id: '105-107',\n label: 'Else',\n fromNodeId: '105',\n toNodeId: '107'\n },\n {\n id: '107-108',\n label: '',\n fromNodeId: '107',\n toNodeId: '108'\n },\n {\n id: '108-109',\n label: '',\n fromNodeId: '108',\n toNodeId: '109'\n },\n {\n id: '109-110',\n label: '',\n fromNodeId: '109',\n toNodeId: '110'\n },\n {\n id: '110-112',\n label: 'crmHasAddress',\n fromNodeId: '110',\n toNodeId: '112'\n },\n {\n id: '112-113',\n label: 'Bulk Processing',\n fromNodeId: '112',\n toNodeId: '113'\n },\n {\n id: '112-114',\n label: 'Manual',\n fromNodeId: '112',\n toNodeId: '114'\n },\n {\n id: '114-115',\n label: '',\n fromNodeId: '114',\n toNodeId: '115'\n },\n {\n id: '115-121',\n label: '',\n fromNodeId: '115',\n toNodeId: '121'\n },\n {\n id: '113-121',\n label: '',\n fromNodeId: '113',\n toNodeId: '121'\n },\n {\n id: '110-111',\n label: 'Else',\n fromNodeId: '110',\n toNodeId: '111'\n },\n {\n id: '111-121',\n label: '',\n fromNodeId: '111',\n toNodeId: '121'\n }\n];\n\nexport const emptyNodesData: NodeProps[] = [\n {\n id: '100',\n label: 'START',\n type: FlowShapeType.START\n },\n {\n id: '120',\n label: 'STOP',\n type: FlowShapeType.STOP\n }\n];\n\nexport const emptyConnectorsData: ConnectorProps[] = [\n {\n id: '100-120',\n label: 'happy path',\n fromNodeId: '100',\n toNodeId: '120'\n }\n];\n\nexport const nodeActions: Action[] = [\n {\n id: 'action-2',\n text: 'Reassign'\n }\n];\n\nexport const nodeLibrary: NodeLibraryItem[] = [\n {\n id: createUID(),\n primary: 'Assignment',\n type: FlowShapeType.ASSIGNMENT\n },\n {\n id: createUID(),\n primary: 'Decision',\n type: FlowShapeType.DECISION\n },\n {\n id: createUID(),\n primary: 'Send a message',\n type: FlowShapeType.MESSAGE\n },\n {\n id: createUID(),\n primary: 'Ask a question',\n type: FlowShapeType.QUESTION\n },\n {\n id: createUID(),\n primary: 'Automations',\n type: FlowShapeType.AUTOMATION,\n items: [\n {\n id: createUID(),\n primary: 'Send email',\n type: FlowShapeType.SEND_EMAIL\n },\n {\n id: createUID(),\n primary: 'Generate PDF',\n type: FlowShapeType.GENERATE_PDF\n }\n ]\n }\n];\n"]}
1
+ {"version":3,"file":"FlowModeller.mocks.jsx","sourceRoot":"","sources":["../../../src/build/FlowModeller/FlowModeller.mocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAO,UAAU,EAAM,MAAM,OAAO,CAAC;AAEjE,OAAO,EACL,KAAK,EACL,KAAK,EAEL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,SAAS,EAGT,IAAI,EACJ,WAAW,EACX,UAAU,EACV,OAAO,EACP,OAAO,EACP,UAAU,EACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAGL,kBAAkB,EAIlB,cAAc,EACd,aAAa,EAEd,MAAM,0BAA0B,CAAC;AAuBlC,MAAM,CAAC,MAAM,aAAa,GAA0C,UAAU,CAC5E,CACE,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAsB,EACtF,GAA2B,EAC3B,EAAE;IACF,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAmB,UAAU,CAAC,CAAC;IACzE,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IAEpB,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,MAAM,KAAK,GAAG,WAAW,CAAC;QAC1B,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,YAAY,CACtD,WAAW,EACX,IAAI,CAAC,EAAE,EACP,KAAK,CACN,CAAC,SAAS,CAAC;QAGZ,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;YAC1B,MAAM,gBAAgB,GAAmB,SAAS,C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AW,GAAsB;IAC5C;QACE,EAAE,EAAE,SAAS,EAAE;QACf,OAAO,EAAE,YAAY;QACrB,IAAI,EAAE,aAAa,CAAC,UAAU;KAC/B;IACD;QACE,EAAE,EAAE,SAAS,EAAE;QACf,OAAO,EAAE,UAAU;QACnB,IAAI,EAAE,aAAa,CAAC,QAAQ;KAC7B;IACD;QACE,EAAE,EAAE,SAAS,EAAE;QACf,OAAO,EAAE,gBAAgB;QACzB,IAAI,EAAE,aAAa,CAAC,OAAO;KAC5B;IACD;QACE,EAAE,EAAE,SAAS,EAAE;QACf,OAAO,EAAE,gBAAgB;QACzB,IAAI,EAAE,aAAa,CAAC,QAAQ;KAC7B;IACD;QACE,EAAE,EAAE,SAAS,EAAE;QACf,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,aAAa,CAAC,IAAI;KACzB;IACD;QACE,EAAE,EAAE,SAAS,EAAE;QACf,OAAO,EAAE,aAAa;QACtB,IAAI,EAAE,aAAa,CAAC,UAAU;QAC9B,KAAK,EAAE;YACL;gBACE,EAAE,EAAE,SAAS,EAAE;gBACf,OAAO,EAAE,YAAY;gBACrB,IAAI,EAAE,aAAa,CAAC,UAAU;aAC/B;YACD;gBACE,EAAE,EAAE,SAAS,EAAE;gBACf,OAAO,EAAE,cAAc;gBACvB,IAAI,EAAE,aAAa,CAAC,YAAY;aACjC;SACF;KACF;CACF,CAAC","sourcesContent":["import { useState, useEffect, Ref, forwardRef, FC } from 'react';\n\nimport {\n Input,\n Table,\n ColumnProps,\n Text,\n Button,\n Icon,\n Flex,\n createUID,\n Action,\n ForwardProps,\n Card,\n CardContent,\n CardHeader,\n useI18n,\n Popover,\n CardFooter\n} from '@pega/cosmos-react-core';\nimport {\n NodeProps,\n ConnectorProps,\n FlowModellerHelper,\n NodeType,\n NodeLibraryItem,\n DeleteNodeOutcome,\n START_NODETYPE,\n STOP_NODETYPE,\n GraphData\n} from '@pega/cosmos-react-build';\n\ninterface DecisionTableProps {\n updatedData: GraphData<NodeProps, ConnectorProps>;\n connectors: ConnectorProps[];\n node: NodeProps;\n onDeleteRow: (\n data: GraphData<NodeProps, ConnectorProps>,\n connector: ConnectorProps,\n error: string,\n deleteItems?: DeleteNodeOutcome['deletes'],\n e?: MouseEvent\n ) => void;\n onAddRow: (data: GraphData<NodeProps, ConnectorProps>) => void;\n readOnly?: boolean;\n}\ninterface DeletePopoverProps {\n targetId: string | null;\n showPopover: boolean;\n onCancel: () => void;\n onDelete: () => void;\n}\n\nexport const DecisionTable: FC<DecisionTableProps & ForwardProps> = forwardRef(\n (\n { updatedData, connectors, onDeleteRow, onAddRow, node, readOnly }: DecisionTableProps,\n ref: Ref<HTMLButtonElement>\n ) => {\n const [tableData, setTableData] = useState<ConnectorProps[]>(connectors);\n const t = useI18n();\n\n const onAddCondition = () => {\n const label = 'Otherwise';\n const updatedGraphData = FlowModellerHelper.addConnector(\n updatedData,\n node.id,\n label\n ).graphData;\n\n // Add a label to the base connector when the number of connectors are more than one\n if (tableData.length === 1) {\n const defaultConnector: ConnectorProps = tableData[0];\n if (defaultConnector?.label === '') {\n defaultConnector.label = 'Default';\n }\n for (let i = 0; i < updatedGraphData.connectors.length; i += 1) {\n const connector: ConnectorProps = updatedGraphData.connectors[i];\n if (connector.id === defaultConnector.id) {\n connector.label = defaultConnector.label;\n break;\n }\n }\n }\n\n if (updatedGraphData) onAddRow(updatedGraphData);\n };\n\n const onDeleteCondition = (connector: ConnectorProps, e: MouseEvent) => {\n const updatedGraphData = FlowModellerHelper.deleteConnector(updatedData, connector);\n if (updatedGraphData.error) {\n onDeleteRow(\n updatedGraphData!.graphData,\n connector,\n t('delete_connector_error'),\n updatedGraphData!.deletes,\n e\n );\n } else {\n onDeleteRow(updatedGraphData!.graphData, connector, '', updatedGraphData!.deletes, e);\n }\n };\n\n const columns: ColumnProps<ConnectorProps>[] = [\n {\n renderer: ({ label }) => <Input value={label} readOnly />,\n label: 'Label'\n },\n { renderer: () => <Text>No value</Text>, label: 'Value' },\n {\n renderer: connector => {\n return (\n <Button\n variant='simple'\n ref={ref}\n disabled={\n readOnly ||\n (node.type.name === 'Decision' && connectors.length < 3) ||\n (node.type.name === 'Assignment' && connectors.length < 2)\n }\n id={connector.id}\n icon\n onClick={(e: MouseEvent) => onDeleteCondition(connector, e)}\n label={t('delete')}\n >\n <Icon name='trash' />\n </Button>\n );\n },\n label: 'Action'\n }\n ];\n\n useEffect(() => {\n setTableData(connectors);\n }, [connectors]);\n\n return (\n <>\n <Table title='Outcomes' hoverHighlight data={tableData} columns={columns} />\n <Flex container={{ pad: [1, 0] }}>\n <Button disabled={readOnly} variant='simple' onClick={onAddCondition}>\n Add Condition\n </Button>\n </Flex>\n </>\n );\n }\n);\n\nexport const DeletePopover: FC<DeletePopoverProps & ForwardProps> = forwardRef(\n ({ targetId, showPopover, onCancel, onDelete }, ref: Ref<HTMLDivElement>) => {\n const [elementTarget, setElementTarget] = useState<Element>();\n const t = useI18n();\n\n useEffect(() => {\n const element = document.querySelector(`button[id='${targetId}']`);\n if (element) {\n setElementTarget(element);\n }\n });\n\n return (\n <>\n {elementTarget && showPopover && (\n <Popover target={elementTarget} ref={ref} show={showPopover}>\n <Card>\n <CardHeader>\n <Text variant='h4'>Delete Outcome</Text>\n <Button variant='simple' icon label={t('close')} onClick={onCancel}>\n <Icon name='times' />\n </Button>\n </CardHeader>\n <CardContent>\n Are you sure you want to delete this outcome and all its steps?\n </CardContent>\n <CardFooter container={{ justify: 'between' }}>\n <Button onClick={onCancel}>Cancel</Button>\n <Button variant='primary' onClick={onDelete}>\n Delete\n </Button>\n </CardFooter>\n </Card>\n </Popover>\n )}\n </>\n );\n }\n);\n\nexport const FlowShapeType: Record<string, NodeType> = Object.freeze({\n START: START_NODETYPE,\n STOP: STOP_NODETYPE,\n DECISION: {\n id: 'decision',\n name: 'Decision',\n color: 'darkYellow',\n icon: 'diamond',\n minConnectors: 2,\n defaults: {\n node: {\n label: 'Decision',\n description: 'Adjust the conditions using the property panel'\n },\n connector: [\n {\n label: 'Default'\n },\n {\n label: 'Otherwise'\n }\n ]\n }\n },\n QUESTION: {\n id: 'question',\n name: 'Question',\n color: 'japaneseLaurel',\n icon: 'chat-help',\n minConnectors: 3,\n defaults: {\n node: {\n label: 'Question'\n },\n connector: [\n {\n label: 'Question 1'\n },\n {\n label: 'Question 2'\n },\n {\n label: 'Question 3'\n }\n ]\n }\n },\n ASSIGNMENT: {\n id: 'assignment',\n name: 'Assignment',\n color: 'japaneseLaurel',\n icon: 'clipboard-data',\n minConnectors: 1,\n defaults: {\n node: {\n label: 'Assignment'\n },\n connector: [{ label: '' }]\n }\n },\n MESSAGE: {\n id: 'message',\n name: 'Message',\n color: 'orange',\n icon: 'chat',\n minConnectors: 1,\n defaults: {\n node: {\n label: 'Message'\n },\n connector: [{ label: '' }]\n }\n },\n SEND_EMAIL: {\n id: 'send_email',\n name: 'Send email',\n color: 'yellow',\n icon: 'mail',\n minConnectors: 1,\n defaults: {\n node: {\n label: 'Send email'\n },\n connector: [{ label: '' }]\n }\n },\n GENERATE_PDF: {\n id: 'generate_pdf',\n name: 'Generate PDF',\n color: 'congressBlue',\n icon: 'polaris',\n minConnectors: 1,\n defaults: {\n node: {\n label: 'Generate PDF'\n },\n connector: [{ label: '' }]\n }\n },\n GOTO: {\n id: 'goto',\n name: 'Go to',\n color: 'red',\n icon: 'arrow-left-right',\n minConnectors: 0,\n defaults: {\n node: {\n label: 'Go to',\n description: ''\n },\n connector: []\n }\n }\n});\n\nexport const exampleCRMNodesData: NodeProps[] = [\n {\n id: '100',\n label: 'START',\n type: FlowShapeType.START\n },\n {\n id: '101',\n label: 'Is B2B',\n description: '',\n reference: '',\n type: FlowShapeType.DECISION,\n additionalData: [],\n error: ''\n },\n {\n id: '102',\n label: 'Update Org Domains',\n description: '',\n reference: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '127',\n label: 'Goto',\n description: '',\n reference: '',\n type: FlowShapeType.GOTO,\n additionalData: [],\n error: ''\n },\n {\n id: '103',\n label: 'CreateC2OFromContact',\n description: '',\n reference: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '104',\n label: 'CreateC2AFromContact',\n description: '',\n reference: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '105',\n label: 'Is B2C',\n description: '',\n reference: '',\n type: FlowShapeType.DECISION,\n additionalData: [],\n error: ''\n },\n {\n id: '106',\n label: 'CreatePrimaryIndividualAccount',\n description: '',\n reference: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '107',\n label: 'Capture Event',\n description: '',\n reference: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '108',\n label: 'Update Private Data',\n description: '',\n reference: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '109',\n label: 'Attach Business Card',\n description: '',\n reference: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '110',\n label: 'Has Address',\n description: '',\n reference: '',\n type: FlowShapeType.DECISION,\n additionalData: [],\n error: ''\n },\n {\n id: '111',\n label: 'Remove WO Related NBA',\n description: '',\n reference: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '112',\n label: 'Bulk Processing',\n description: '',\n reference: '',\n type: FlowShapeType.DECISION,\n additionalData: [],\n error: ''\n },\n {\n id: '113',\n label: 'Queue For Agent',\n description: '',\n reference: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '114',\n label: 'Retrieve Lat Long',\n description: '',\n reference: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '115',\n label: 'Remove WO Related NBA',\n description: '',\n reference: '',\n type: FlowShapeType.ASSIGNMENT,\n additionalData: [],\n error: ''\n },\n {\n id: '121',\n label: 'END',\n type: FlowShapeType.STOP\n }\n];\n\nexport const exampleCRMConnectorsData: ConnectorProps[] = [\n {\n id: '100-101',\n label: '',\n fromNodeId: '100',\n toNodeId: '101'\n },\n {\n id: '101-102',\n label: 'isSellingModeB2BOrB2BB2C',\n fromNodeId: '101',\n toNodeId: '102'\n },\n {\n id: '102-103',\n label: '',\n fromNodeId: '102',\n toNodeId: '103'\n },\n {\n id: '103-104',\n label: '',\n fromNodeId: '103',\n toNodeId: '104'\n },\n {\n id: '104-105',\n label: '',\n fromNodeId: '104',\n toNodeId: '105'\n },\n {\n id: '101-127',\n label: 'Else',\n fromNodeId: '101',\n toNodeId: '127'\n },\n {\n id: '127-105',\n label: '',\n fromNodeId: '127',\n toNodeId: '105'\n },\n {\n id: '105-106',\n label: 'isSellingModeB2COrB2BB2C',\n fromNodeId: '105',\n toNodeId: '106'\n },\n {\n id: '106-107',\n label: '',\n fromNodeId: '106',\n toNodeId: '107'\n },\n {\n id: '105-107',\n label: 'Else',\n fromNodeId: '105',\n toNodeId: '107'\n },\n {\n id: '107-108',\n label: '',\n fromNodeId: '107',\n toNodeId: '108'\n },\n {\n id: '108-109',\n label: '',\n fromNodeId: '108',\n toNodeId: '109'\n },\n {\n id: '109-110',\n label: '',\n fromNodeId: '109',\n toNodeId: '110'\n },\n {\n id: '110-112',\n label: 'crmHasAddress',\n fromNodeId: '110',\n toNodeId: '112'\n },\n {\n id: '112-113',\n label: 'Bulk Processing',\n fromNodeId: '112',\n toNodeId: '113'\n },\n {\n id: '112-114',\n label: 'Manual',\n fromNodeId: '112',\n toNodeId: '114'\n },\n {\n id: '114-115',\n label: '',\n fromNodeId: '114',\n toNodeId: '115'\n },\n {\n id: '115-121',\n label: '',\n fromNodeId: '115',\n toNodeId: '121'\n },\n {\n id: '113-121',\n label: '',\n fromNodeId: '113',\n toNodeId: '121'\n },\n {\n id: '110-111',\n label: 'Else',\n fromNodeId: '110',\n toNodeId: '111'\n },\n {\n id: '111-121',\n label: '',\n fromNodeId: '111',\n toNodeId: '121'\n }\n];\n\nexport const emptyNodesData: NodeProps[] = [\n {\n id: '100',\n label: 'START',\n type: FlowShapeType.START\n },\n {\n id: '120',\n label: 'STOP',\n type: FlowShapeType.STOP\n }\n];\n\nexport const emptyConnectorsData: ConnectorProps[] = [\n {\n id: '100-120',\n label: 'happy path',\n fromNodeId: '100',\n toNodeId: '120'\n }\n];\n\nexport const nodeActions: Action[] = [\n {\n id: 'action-2',\n text: 'Reassign'\n }\n];\n\nexport const nodeLibrary: NodeLibraryItem[] = [\n {\n id: createUID(),\n primary: 'Assignment',\n type: FlowShapeType.ASSIGNMENT\n },\n {\n id: createUID(),\n primary: 'Decision',\n type: FlowShapeType.DECISION\n },\n {\n id: createUID(),\n primary: 'Send a message',\n type: FlowShapeType.MESSAGE\n },\n {\n id: createUID(),\n primary: 'Ask a question',\n type: FlowShapeType.QUESTION\n },\n {\n id: createUID(),\n primary: 'Go to',\n type: FlowShapeType.GOTO\n },\n {\n id: createUID(),\n primary: 'Automations',\n type: FlowShapeType.AUTOMATION,\n items: [\n {\n id: createUID(),\n primary: 'Send email',\n type: FlowShapeType.SEND_EMAIL\n },\n {\n id: createUID(),\n primary: 'Generate PDF',\n type: FlowShapeType.GENERATE_PDF\n }\n ]\n }\n];\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FlowModeller.stories.d.ts","sourceRoot":"","sources":["../../../src/build/FlowModeller/FlowModeller.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAaL,iBAAiB,EAClB,MAAM,0BAA0B,CAAC;;AAelC,wBAMU;AACV,UAAU,kBAAmB,SAAQ,iBAAiB;IACpD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAmKhC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,CA8K/D,CAAC"}
1
+ {"version":3,"file":"FlowModeller.stories.d.ts","sourceRoot":"","sources":["../../../src/build/FlowModeller/FlowModeller.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAaL,iBAAiB,EAClB,MAAM,0BAA0B,CAAC;;AA2BlC,wBAMU;AACV,UAAU,kBAAmB,SAAQ,iBAAiB;IACpD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAsLhC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAgQ/D,CAAC"}
@@ -1,8 +1,8 @@
1
- import { memo, useState } from 'react';
1
+ import { memo, useContext, useMemo, useState } from 'react';
2
2
  import { action } from '@storybook/addon-actions';
3
3
  import { FlowModeller, DirectedGraph, FlowModellerHelper, Workbench } from '@pega/cosmos-react-build';
4
- import { useOuterEvent, useEscape, useElement } from '@pega/cosmos-react-core';
5
- import { nodeLibrary, nodeActions, exampleCRMNodesData, exampleCRMConnectorsData, emptyNodesData, emptyConnectorsData, DecisionTable, DeletePopover } from './FlowModeller.mocks';
4
+ import { useOuterEvent, useEscape, useElement, Modal, ModalManagerContext, ComboBox, menuHelpers, Text } from '@pega/cosmos-react-core';
5
+ import { nodeLibrary, nodeActions, exampleCRMNodesData, exampleCRMConnectorsData, emptyNodesData, emptyConnectorsData, FlowShapeType, DecisionTable, DeletePopover } from './FlowModeller.mocks';
6
6
  import { StyledWrapper } from './FlowModeller.styles';
7
7
  export default {
8
8
  title: 'Build/FlowModeller',
@@ -27,6 +27,7 @@ export const EmptyFlowChartView = () => {
27
27
  const [target, setTarget] = useState(null);
28
28
  const [deletePopoverEl, setDeletePopoverEl] = useElement(null);
29
29
  const [connectorData, setConnectorData] = useState();
30
+ const { create } = useContext(ModalManagerContext);
30
31
  const selectNode = (nodeId) => {
31
32
  const graph = new DirectedGraph(graphData);
32
33
  const selectedNode = graph.getNode(nodeId);
@@ -46,16 +47,28 @@ export const EmptyFlowChartView = () => {
46
47
  }
47
48
  };
48
49
  const addNode = (nodeType, metaData) => {
50
+ const isBranchNode = nodeType.id === FlowShapeType.GOTO.id;
49
51
  const UpdatedData = FlowModellerHelper.addNode({
50
52
  nodeType,
51
53
  graphData,
54
+ isBranchNode,
52
55
  metaData
53
56
  });
54
57
  if (UpdatedData) {
55
58
  setGraphData(UpdatedData.graphData);
56
59
  }
57
60
  };
58
- const deleteNode = (params) => {
61
+ const launchModal = (errorTitle, errorMessage) => {
62
+ create(() => {
63
+ return (<Modal heading={errorTitle} center>
64
+ <Text variant='primary'>{errorMessage} </Text>
65
+ </Modal>);
66
+ });
67
+ };
68
+ const deleteNode = (params, error) => {
69
+ if (error) {
70
+ return launchModal('Delete step error', error);
71
+ }
59
72
  setGraphData(params.additionalData?.graphData);
60
73
  };
61
74
  const onAddRow = (updatedData) => {
@@ -64,7 +77,10 @@ export const EmptyFlowChartView = () => {
64
77
  setNodeData({ nodes: nodeData.nodes, connectors: outConnectors });
65
78
  setGraphData(updatedData);
66
79
  };
67
- const onDeleteRow = (updatedData, connector, highlightsData, e) => {
80
+ const onDeleteRow = (updatedData, connector, error, highlightsData, e) => {
81
+ if (error) {
82
+ return launchModal('Delete connector error', error);
83
+ }
68
84
  setHighlightItems(highlightsData);
69
85
  setPopover(prevState => !prevState);
70
86
  setConnectorData(connector);
@@ -129,9 +145,18 @@ export const CRMFlowChartView = (args) => {
129
145
  nodes: exampleCRMNodesData,
130
146
  connectors: exampleCRMConnectorsData
131
147
  });
148
+ const [nodeData, setNodeData] = useState();
149
+ const [items, setItems] = useState(graphData?.nodes
150
+ .filter(node => node.type.id !== 'start' && node.id !== nodeData?.nodes[0].id && node.type.id !== 'goto')
151
+ .map(option => {
152
+ return {
153
+ primary: option.label,
154
+ id: option.id,
155
+ selected: false
156
+ };
157
+ }));
132
158
  const [highlightItems, setHighlightItems] = useState();
133
159
  const [open, setOpen] = useState(false);
134
- const [nodeData, setNodeData] = useState();
135
160
  const [showPopover, setPopover] = useState(false);
136
161
  const [buffer, setBuffer] = useState({
137
162
  nodes: [],
@@ -140,12 +165,7 @@ export const CRMFlowChartView = (args) => {
140
165
  const [target, setTarget] = useState(null);
141
166
  const [deletePopoverEl, setDeletePopoverEl] = useElement(null);
142
167
  const [connectorData, setConnectorData] = useState();
143
- const exampleErrorNodes = exampleCRMNodesData.map((node) => {
144
- if (node.id === '101' || node.id === '105' || node.id === '110' || node.id === '112') {
145
- return { ...node, error: 'Something is wrong!' };
146
- }
147
- return node;
148
- });
168
+ const { create } = useContext(ModalManagerContext);
149
169
  const selectNode = (nodeId) => {
150
170
  const graph = new DirectedGraph(graphData);
151
171
  const selectedNode = graph.getNode(nodeId);
@@ -165,16 +185,28 @@ export const CRMFlowChartView = (args) => {
165
185
  }
166
186
  };
167
187
  const addNode = (nodeType, metaData) => {
188
+ const isBranchNode = nodeType.id === FlowShapeType.GOTO.id;
168
189
  const UpdatedData = FlowModellerHelper.addNode({
169
190
  nodeType,
170
191
  graphData,
192
+ isBranchNode,
171
193
  metaData
172
194
  });
173
195
  if (UpdatedData) {
174
196
  setGraphData(UpdatedData.graphData);
175
197
  }
176
198
  };
177
- const deleteNode = (params) => {
199
+ const launchModal = (errorTitle, errorMessage) => {
200
+ create(() => {
201
+ return (<Modal heading={errorTitle} center>
202
+ <Text variant='primary'>{errorMessage} </Text>
203
+ </Modal>);
204
+ });
205
+ };
206
+ const deleteNode = (params, error) => {
207
+ if (error) {
208
+ return launchModal('Delete step error', error);
209
+ }
178
210
  setGraphData(params.additionalData?.graphData);
179
211
  };
180
212
  const onAddRow = (updatedData) => {
@@ -183,7 +215,10 @@ export const CRMFlowChartView = (args) => {
183
215
  setNodeData({ nodes: nodeData.nodes, connectors: outConnectors });
184
216
  setGraphData(updatedData);
185
217
  };
186
- const onDeleteRow = (updatedData, connector, highlightsData, e) => {
218
+ const onDeleteRow = (updatedData, connector, error, highlightsData, e) => {
219
+ if (error) {
220
+ return launchModal('Delete connector error', error);
221
+ }
187
222
  setHighlightItems(highlightsData);
188
223
  setPopover(prevState => !prevState);
189
224
  setConnectorData(connector);
@@ -221,12 +256,54 @@ export const CRMFlowChartView = (args) => {
221
256
  setPopover(false);
222
257
  };
223
258
  const WorkbenchContent = memo(() => {
259
+ const selected = useMemo(() => menuHelpers.getSelected(items)[0], [items]);
260
+ const selectItem = (id) => {
261
+ const selectedItem = menuHelpers.getItem(items, id);
262
+ if (selectedItem && nodeData) {
263
+ const updatedNode = {
264
+ ...nodeData.nodes[0],
265
+ reference: selectedItem.id
266
+ };
267
+ const updatedNodes = [
268
+ updatedNode,
269
+ ...graphData.nodes.filter(node => nodeData?.nodes[0].id !== node.id)
270
+ ];
271
+ setNodeData({ ...nodeData, nodes: [updatedNode] });
272
+ setGraphData({ ...graphData, nodes: updatedNodes });
273
+ }
274
+ setItems(cur => menuHelpers.selectItem(cur, id, 'single-select'));
275
+ };
224
276
  return (<>
225
- {nodeData && (<DecisionTable updatedData={graphData} connectors={nodeData?.connectors} onDeleteRow={onDeleteRow} node={nodeData?.nodes[0]} onAddRow={onAddRow} readOnly={args.readOnly}/>)}
277
+ {nodeData && nodeData.nodes[0].type.id !== 'goto' && (<DecisionTable updatedData={graphData} connectors={nodeData?.connectors} onDeleteRow={onDeleteRow} node={nodeData?.nodes[0]} onAddRow={onAddRow} readOnly={args.readOnly}/>)}
278
+ {nodeData && nodeData.nodes[0].type.id === 'goto' && (<ComboBox label='Go to' placeholder='Select step' menu={{
279
+ items,
280
+ onItemClick: selectItem
281
+ }} selected={selected
282
+ ? {
283
+ items: {
284
+ id: selected.id,
285
+ text: selected.primary
286
+ }
287
+ }
288
+ : undefined}/>)}
226
289
  </>);
227
290
  });
228
291
  useEscape(onCancel);
229
292
  useOuterEvent('mousedown', [deletePopoverEl], onCancel);
293
+ const createGraphData = (showError) => {
294
+ if (showError) {
295
+ return {
296
+ ...graphData,
297
+ nodes: graphData.nodes.map((node) => {
298
+ if (node.id === '101' || node.id === '105' || node.id === '110' || node.id === '112') {
299
+ return { ...node, error: 'Something is wrong!' };
300
+ }
301
+ return node;
302
+ })
303
+ };
304
+ }
305
+ return graphData;
306
+ };
230
307
  return (<StyledWrapper>
231
308
  <Workbench initiallyVisiblePanelId={undefined} configurationPanel={{
232
309
  open,
@@ -236,7 +313,7 @@ export const CRMFlowChartView = (args) => {
236
313
  setOpen(false);
237
314
  }
238
315
  }}>
239
- <FlowModeller graphData={args.showErrorState ? { ...graphData, nodes: exampleErrorNodes } : graphData} nodeLibrary={nodeLibrary} onNodeAdd={addNode} onNodeClick={selectNode} actions={nodeActions} highlightData={highlightItems} onNodeActionClick={onNodeActionClick} onDelete={deleteNode} readOnly={args.readOnly}/>
316
+ <FlowModeller graphData={createGraphData(args.showErrorState || false)} nodeLibrary={nodeLibrary} onNodeAdd={addNode} onNodeClick={selectNode} actions={nodeActions} highlightData={highlightItems} onNodeActionClick={onNodeActionClick} onDelete={deleteNode} readOnly={args.readOnly}/>
240
317
  <DeletePopover targetId={target} ref={setDeletePopoverEl} onDelete={onDelete} onCancel={onCancel} showPopover={showPopover}/>
241
318
  </Workbench>
242
319
  </StyledWrapper>);