@eccenca/gui-elements 23.1.0-easynav.1 → 23.1.0-easynav.3

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 (48) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/cjs/common/utils/CssCustomProperties.js.map +1 -1
  3. package/dist/cjs/components/Depiction/Depiction.js +13 -13
  4. package/dist/cjs/components/Depiction/Depiction.js.map +1 -1
  5. package/dist/cjs/extensions/react-flow/edges/EdgeDefault.js +20 -5
  6. package/dist/cjs/extensions/react-flow/edges/EdgeDefault.js.map +1 -1
  7. package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js +17 -1
  8. package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js.map +1 -1
  9. package/dist/cjs/extensions/react-flow/edges/edgeTypes.js +10 -9
  10. package/dist/cjs/extensions/react-flow/edges/edgeTypes.js.map +1 -1
  11. package/dist/cjs/extensions/react-flow/index.js +2 -3
  12. package/dist/cjs/extensions/react-flow/index.js.map +1 -1
  13. package/dist/cjs/extensions/react-flow/nodes/NodeContent.js +54 -6
  14. package/dist/cjs/extensions/react-flow/nodes/NodeContent.js.map +1 -1
  15. package/dist/esm/common/utils/CssCustomProperties.js.map +1 -1
  16. package/dist/esm/components/Depiction/Depiction.js +15 -14
  17. package/dist/esm/components/Depiction/Depiction.js.map +1 -1
  18. package/dist/esm/extensions/react-flow/edges/EdgeDefault.js +20 -4
  19. package/dist/esm/extensions/react-flow/edges/EdgeDefault.js.map +1 -1
  20. package/dist/esm/extensions/react-flow/edges/EdgeLabel.js +17 -1
  21. package/dist/esm/extensions/react-flow/edges/EdgeLabel.js.map +1 -1
  22. package/dist/esm/extensions/react-flow/edges/edgeTypes.js +10 -9
  23. package/dist/esm/extensions/react-flow/edges/edgeTypes.js.map +1 -1
  24. package/dist/esm/extensions/react-flow/index.js +1 -1
  25. package/dist/esm/extensions/react-flow/index.js.map +1 -1
  26. package/dist/esm/extensions/react-flow/nodes/NodeContent.js +54 -5
  27. package/dist/esm/extensions/react-flow/nodes/NodeContent.js.map +1 -1
  28. package/dist/types/common/utils/CssCustomProperties.d.ts +1 -1
  29. package/dist/types/extensions/react-flow/edges/EdgeDefault.d.ts +16 -1
  30. package/dist/types/extensions/react-flow/edges/EdgeLabel.d.ts +12 -0
  31. package/dist/types/extensions/react-flow/edges/edgeTypes.d.ts +10 -9
  32. package/dist/types/extensions/react-flow/index.d.ts +1 -2
  33. package/dist/types/extensions/react-flow/nodes/NodeContent.d.ts +26 -3
  34. package/package.json +1 -1
  35. package/src/cmem/react-flow/ReactFlow/ReactFlow.stories.tsx +2 -2
  36. package/src/cmem/react-flow/_edges.scss +3 -2
  37. package/src/common/utils/CssCustomProperties.ts +1 -1
  38. package/src/components/Depiction/Depiction.tsx +11 -10
  39. package/src/extensions/react-flow/_config.scss +7 -4
  40. package/src/extensions/react-flow/edges/EdgeDefault.tsx +60 -5
  41. package/src/extensions/react-flow/edges/EdgeLabel.tsx +45 -1
  42. package/src/extensions/react-flow/edges/_edges.scss +131 -33
  43. package/src/extensions/react-flow/edges/edgeTypes.ts +13 -9
  44. package/src/extensions/react-flow/edges/stories/EdgeDefault.stories.tsx +34 -13
  45. package/src/extensions/react-flow/index.ts +2 -2
  46. package/src/extensions/react-flow/nodes/NodeContent.tsx +93 -7
  47. package/src/extensions/react-flow/nodes/_nodes.scss +177 -50
  48. package/src/extensions/react-flow/nodes/stories/NodeContent.stories.tsx +30 -0
@@ -1,10 +1,12 @@
1
1
  import React from "react";
2
+ import Color from "color";
2
3
  import { Position, useStoreState as useStoreStateFlowLegacy } from "react-flow-renderer";
3
4
  import { useStore as useStoreStateFlowNext } from "react-flow-renderer-lts";
4
5
  import { Icon, Depiction, OverflowText } from "../../../index";
5
6
  import { CLASSPREFIX as eccgui } from "../../../configuration/constants";
6
7
  import { ValidIconName } from "../../../components/Icon/canonicalIconNames";
7
8
  import { DepictionProps } from "../../../components/Depiction/Depiction";
9
+ import { IntentTypes, intentClassName } from "../../../common/Intent";
8
10
  import { ReacFlowVersionSupportProps, useReactFlowVersion } from "../versionsupport";
9
11
  import { HandleDefault, HandleProps, HandleNextProps } from "./../handles/HandleDefault";
10
12
  import { NodeProps } from "./NodeDefault";
@@ -12,6 +14,7 @@ import { NodeContentExtensionProps } from "./NodeContentExtension";
12
14
  import { Resizable } from "re-resizable";
13
15
 
14
16
  export type HighlightingState = "success" | "warning" | "danger" | "match" | "altmatch";
17
+ export type NodeHighlightColor = "default" | "alternate" | Color | string;
15
18
 
16
19
  export interface IHandleProps extends HandleProps {
17
20
  category?: "configuration";
@@ -85,11 +88,27 @@ export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any>
85
88
  * Use this for example if you need more space for a label subline.
86
89
  * Also the depiction is displayed larger.
87
90
  */
88
- increadeHeader?: boolean;
91
+ enlargeHeader?: boolean;
89
92
  /**
93
+ * @deprecated
90
94
  * Set the type of used highlights to mark the node.
95
+ * Replaced by `intent` and `highlightColor` properties.
91
96
  */
92
97
  highlightedState?: HighlightingState | HighlightingState[];
98
+ /**
99
+ * Defines how the borders of a node are displayed.
100
+ * Use this property to overwrite default styles.
101
+ * You can use this to visuaize different states or type without depending only on color.
102
+ */
103
+ border?: "solid" | "double" | "dashed" | "dotted";
104
+ /**
105
+ * Feedback state of the node.
106
+ */
107
+ intent?: IntentTypes;
108
+ /**
109
+ * Set the type of used highlights to mark the node.
110
+ */
111
+ highlightColor?: NodeHighlightColor | [NodeHighlightColor, NodeHighlightColor];
93
112
  /**
94
113
  * Text used for tooltip used on icon and depiction.
95
114
  */
@@ -240,10 +259,14 @@ const addHandles = (handles: any, position: any, posDirection: any, isConnectabl
240
259
  });
241
260
  };
242
261
 
243
- export const gethighlightedStateClasses = (state: any, baseClassName: any) => {
262
+ export const gethighlightedStateClasses = (
263
+ state: HighlightingState | HighlightingState[],
264
+ baseClassName: string
265
+ ) => {
244
266
  let hightlights = typeof state === "string" ? [state] : state;
245
- //@ts-ignore
246
- return hightlights.map((item) => `${baseClassName}--highlight-${item}`).join(" ");
267
+ return hightlights.map(
268
+ (item : HighlightingState) => `${baseClassName}--highlight-${item}`
269
+ ).join(" ");
247
270
  };
248
271
 
249
272
  const MemoHandler = React.memo(
@@ -266,7 +289,7 @@ export function NodeContent<CONTENT_PROPS = any>({
266
289
  typeLabel,
267
290
  label,
268
291
  labelSubline,
269
- increadeHeader,
292
+ enlargeHeader,
270
293
  fullWidth,
271
294
  showExecutionButtons = true,
272
295
  executionButtons,
@@ -277,6 +300,9 @@ export function NodeContent<CONTENT_PROPS = any>({
277
300
  size = "small",
278
301
  minimalShape = "circular",
279
302
  highlightedState,
303
+ intent,
304
+ border,
305
+ highlightColor,
280
306
  handles = defaultHandles(),
281
307
  adaptHeightForHandleMinCount,
282
308
  adaptSizeIncrement = 15,
@@ -366,18 +392,29 @@ export function NodeContent<CONTENT_PROPS = any>({
366
392
  styleExpandDimensions["minHeight"] = Math.max(minHeightLeft, minHeightRight);
367
393
  }
368
394
 
395
+ const {
396
+ highlightClassNameSuffix,
397
+ highlightCustomPropertySettings
398
+ } = evaluateHighlightColors("--node-highlight", highlightColor);
399
+
369
400
  const resizableStyles = (!!onNodeResize === true && minimalShape === "none" && (width + height > 0)) ? { width, height } : {};
370
401
  const nodeContent = (
371
402
  <>
372
403
  <section
373
404
  ref={nodeContentRef}
374
405
  {...otherProps}
375
- style={{ ...style, ...styleExpandDimensions, ...resizableStyles }}
406
+ style={{ ...style, ...highlightCustomPropertySettings, ...styleExpandDimensions, ...resizableStyles }}
376
407
  className={
377
408
  `${eccgui}-graphviz__node` +
378
409
  ` ${eccgui}-graphviz__node--${size}` +
379
410
  ` ${eccgui}-graphviz__node--minimal-${minimalShape}` +
380
411
  (fullWidth ? ` ${eccgui}-graphviz__node--fullwidth` : "") +
412
+ (border ? ` ${eccgui}-graphviz__node--border-${border}` : "") +
413
+ (intent ? ` ${intentClassName(intent)}` : "") +
414
+ (highlightClassNameSuffix.length > 0
415
+ ? highlightClassNameSuffix.map(highlight => ` ${eccgui}-graphviz__node--highlight-${highlight}`).join("")
416
+ : ""
417
+ ) +
381
418
  (!!highlightedState
382
419
  ? " " + gethighlightedStateClasses(highlightedState, `${eccgui}-graphviz__node`)
383
420
  : "") +
@@ -388,7 +425,7 @@ export function NodeContent<CONTENT_PROPS = any>({
388
425
  >
389
426
  <header className={
390
427
  `${eccgui}-graphviz__node__header` +
391
- ((increadeHeader && minimalShape==="none") ? ` ${eccgui}-graphviz__node__header--large` : "")
428
+ ((enlargeHeader && minimalShape==="none") ? ` ${eccgui}-graphviz__node__header--large` : "")
392
429
  }>
393
430
  {(!!iconName || !!depiction || !!leftElement) && (
394
431
  <div className={`${eccgui}-graphviz__node__header-depiction`}>
@@ -500,3 +537,52 @@ export function NodeContent<CONTENT_PROPS = any>({
500
537
 
501
538
  return (isResizeable) ? resizableNode() : nodeContent;
502
539
  }
540
+
541
+ export const evaluateHighlightColors = (
542
+ baseCustomProperty: string,
543
+ highlightColor?: NodeHighlightColor | NodeHighlightColor[]
544
+ ) => {
545
+ let styleHighlightColors = {
546
+ [`${baseCustomProperty}-default-color`]: undefined,
547
+ [`${baseCustomProperty}-alternate-color`]: undefined,
548
+ } as React.CSSProperties;
549
+ const classesHightlightColors = [] as string[];
550
+ if (!!highlightColor) {
551
+ const highlightingColors = (typeof highlightColor === "string") ? [highlightColor] : highlightColor;
552
+ (highlightingColors as Array<string>).map((color, idx) => {
553
+ switch (color) {
554
+ case "default":
555
+ classesHightlightColors.push("default");
556
+ break;
557
+ case "alternate":
558
+ classesHightlightColors.push("alternate");
559
+ break;
560
+ default:
561
+ classesHightlightColors.push("custom");
562
+ let customColor = Color("#ffffff")
563
+ try {
564
+ customColor = Color(color);
565
+ } catch(ex) {
566
+ console.warn("Received invalid color for highlight: " + color)
567
+ }
568
+ if (idx === 0) {
569
+ styleHighlightColors = {
570
+ ...styleHighlightColors,
571
+ [`${baseCustomProperty}-default-color`]: customColor.rgb().toString(),
572
+ } as React.CSSProperties
573
+ } else {
574
+ styleHighlightColors = {
575
+ ...styleHighlightColors,
576
+ [`${baseCustomProperty}-alternate-color`]: customColor.rgb().toString(),
577
+ } as React.CSSProperties
578
+ }
579
+ break;
580
+ }
581
+ });
582
+ }
583
+
584
+ return {
585
+ highlightClassNameSuffix: classesHightlightColors,
586
+ highlightCustomPropertySettings: styleHighlightColors,
587
+ }
588
+ }
@@ -51,22 +51,6 @@
51
51
  }
52
52
  }
53
53
 
54
- .#{$eccgui}-graphviz__node--animated {
55
- animation: pumpingshadow 4 * $reactflow-transition-time linear infinite;
56
- }
57
-
58
- @keyframes pumpingshadow {
59
- 0% {
60
- box-shadow: 0 0 2 * $reactflow-node-border-width 0 rgba(#fff, 0.9), 0 0 1 * $reactflow-node-border-width 0 rgba($reactflow-edge-stroke-color-selected, 0);
61
- }
62
- 50% {
63
- box-shadow: 0 0 2 * $reactflow-node-border-width 6 * $reactflow-node-border-width rgba(#fff, 0.9), 0 0 1 * $reactflow-node-border-width 6 * $reactflow-node-border-width $reactflow-edge-stroke-color-selected;
64
- }
65
- 100% {
66
- box-shadow: 0 0 2 * $reactflow-node-border-width 0 rgba(#fff, 0.9), 0 0 1 * $reactflow-node-border-width 0 rgba($reactflow-edge-stroke-color-selected, 0);
67
- }
68
- }
69
-
70
54
  .#{$eccgui}-graphviz__node--minimal-rectangular,
71
55
  .#{$eccgui}-graphviz__node--minimal-circular {
72
56
 
@@ -264,12 +248,43 @@
264
248
  width: 100%;
265
249
  }
266
250
 
267
- // Node highlights
251
+ // Node border overwrites
268
252
 
269
- .#{$eccgui}-graphviz__node--highlight-success,
270
- .#{$eccgui}-graphviz__node--highlight-warning,
271
- .#{$eccgui}-graphviz__node--highlight-danger {
272
- &:before {
253
+ .#{$eccgui}-graphviz__node--border-solid {
254
+ border-style: solid;
255
+ }
256
+
257
+ .#{$eccgui}-graphviz__node--border-double {
258
+ border-width: 1.5 * $reactflow-node-border-width;
259
+ border-style: double;
260
+ }
261
+
262
+ .#{$eccgui}-graphviz__node--border-dashed {
263
+ border-style: dashed;
264
+ }
265
+
266
+ .#{$eccgui}-graphviz__node--border-dotted {
267
+ border-style: dotted;
268
+ }
269
+
270
+ // Node intent
271
+
272
+ @mixin node-intent-gradient {
273
+ border-image-source: conic-gradient(
274
+ from var(--node-intent-angle),
275
+ transparent,
276
+ var(--node-intent-color) 0.05turn,
277
+ var(--node-intent-color) 0.2turn,
278
+ transparent 0.25turn
279
+ );
280
+ }
281
+
282
+ .#{$eccgui}-graphviz__node[class*="#{$eccgui}-intent--"],
283
+ .#{$eccgui}-graphviz__node--animated:not([class*="#{$eccgui}-intent--"]) {
284
+ --node-intent-color: #{$eccgui-color-workspace-text};
285
+
286
+ &:after {
287
+ --node-intent-angle: #{$reactflow-transition-anglestart};
273
288
  content: " ";
274
289
  display: block;
275
290
  position: absolute;
@@ -277,15 +292,45 @@
277
292
  left: -2 * $reactflow-node-border-width;
278
293
  bottom: -2 * $reactflow-node-border-width;
279
294
  right: -2 * $reactflow-node-border-width;
280
- border-radius: inherit;
281
- box-shadow: 0 0 0 2 * $reactflow-node-border-width $eccgui-color-danger-text;
282
295
  z-index: -1;
296
+ border-style: solid;
297
+ border-width: 2 * $reactflow-node-border-width;
298
+ @include node-intent-gradient;
299
+ border-image-slice: 1;
300
+ border-image-width: 2 * $reactflow-node-border-width;
283
301
  }
284
302
  }
285
303
 
286
- .#{$eccgui}-graphviz__node--highlight-match,
287
- .#{$eccgui}-graphviz__node--highlight-altmatch {
288
- &:after {
304
+ .#{$eccgui}-graphviz__node.#{$eccgui}-intent--primary {
305
+ --node-intent-color: #{$eccgui-color-primary};
306
+ }
307
+
308
+ .#{$eccgui}-graphviz__node.#{$eccgui}-intent--accent {
309
+ --node-intent-color: #{$eccgui-color-accent};
310
+ }
311
+
312
+ .#{$eccgui}-graphviz__node.#{$eccgui}-intent--info {
313
+ --node-intent-color: #{$eccgui-color-info-text};
314
+ }
315
+
316
+ .#{$eccgui}-graphviz__node.#{$eccgui}-intent--success {
317
+ --node-intent-color: #{$eccgui-color-success-text};
318
+ }
319
+
320
+ .#{$eccgui}-graphviz__node.#{$eccgui}-intent--warning {
321
+ --node-intent-color: #{$eccgui-color-warning-text};
322
+ }
323
+
324
+ .#{$eccgui}-graphviz__node.#{$eccgui}-intent--danger {
325
+ --node-intent-color: #{$eccgui-color-danger-text};
326
+ }
327
+
328
+ // hode highlight mark
329
+
330
+ .#{$eccgui}-graphviz__node[class*="#{$eccgui}-graphviz__node--highlight-"] {
331
+
332
+ &:before {
333
+ opacity: $eccgui-opacity-disabled;
289
334
  content: " ";
290
335
  display: block;
291
336
  position: absolute;
@@ -293,38 +338,56 @@
293
338
  left: -2 * $reactflow-node-border-width;
294
339
  bottom: -2 * $reactflow-node-border-width;
295
340
  right: -2 * $reactflow-node-border-width;
296
- border-radius: inherit;
297
- box-shadow: 0 0 0 2 * $reactflow-node-border-width $eccgui-color-accent;
298
- z-index: -1;
341
+ z-index: -2;
342
+ box-shadow:
343
+ 0 0 0 2 * $reactflow-node-border-width var(--node-highlight-default-color),
344
+ 0 0 0 3.5 * $reactflow-node-border-width var(--node-highlight-alternate-color, var(--node-highlight-default-color));
345
+ border: 0.1px solid transparent; // workaround for Firefox, otherwise shadows are overlayed
299
346
  }
347
+ }
300
348
 
301
- &.#{$eccgui}-graphviz__node--highlight-success,
302
- &.#{$eccgui}-graphviz__node--highlight-warning,
303
- &.#{$eccgui}-graphviz__node--highlight-danger {
304
- &:after {
305
- top: -4 * $reactflow-node-border-width;
306
- left: -4 * $reactflow-node-border-width;
307
- bottom: -4 * $reactflow-node-border-width;
308
- right: -4 * $reactflow-node-border-width;
309
- }
310
- }
349
+ .#{$eccgui}-graphviz__node--highlight-default {
350
+ --node-highlight-default-color: #{$eccgui-color-accent};
351
+ --node-highlight-alternate-color: #{$eccgui-color-accent};
311
352
  }
312
353
 
313
- .#{$eccgui}-graphviz__node--highlight-success {
314
- &:before {
315
- box-shadow: 0 0 0 2 * $reactflow-node-border-width $eccgui-color-success-text;
316
- }
354
+ .#{$eccgui}-graphviz__node--highlight-alternate {
355
+ --node-highlight-default-color: #{$eccgui-color-primary};
356
+ --node-highlight-alternate-color: #{$eccgui-color-primary};
317
357
  }
318
358
 
319
- .#{$eccgui}-graphviz__node--highlight-warning {
320
- &:before {
321
- box-shadow: 0 0 0 2 * $reactflow-node-border-width $eccgui-color-warning-text;
322
- }
359
+ .#{$eccgui}-graphviz__node--highlight-default.#{$eccgui}-graphviz__node--highlight-alternate {
360
+ --node-highlight-default-color: #{$eccgui-color-accent};
361
+ --node-highlight-alternate-color: #{$eccgui-color-primary};
323
362
  }
324
363
 
325
- .#{$eccgui}-graphviz__node--highlight-altmatch {
326
- &:after {
327
- box-shadow: 0 0 0 2 * $reactflow-node-border-width complement($eccgui-color-primary);
364
+ // Node animation
365
+
366
+ @property --node-intent-angle {
367
+ // rule necessary, otherwise increasing --node-intent-angle for animation does not work correctly
368
+ syntax: '<angle>';
369
+ initial-value: #{$reactflow-transition-anglestart};
370
+ inherits: true;
371
+ }
372
+
373
+ .#{$eccgui}-graphviz__node--animated:after {
374
+ animation: spinningborder 8 * $reactflow-transition-time linear infinite;
375
+
376
+ @keyframes spinningborder {
377
+ to {
378
+ --node-intent-angle: #{$reactflow-transition-anglestart + 360deg};
379
+ }
380
+ @for $step from 1 through 10 {
381
+ /*
382
+ This is a fix/workaround for Firefox/Gecko.
383
+ Looks like "animation" the custom property is not enough.
384
+ It is also necessary to repeat the rule.
385
+ */
386
+ #{$step*10}#{"%"} {
387
+ --node-intent-angle: #{$reactflow-transition-anglestart + $step * 36deg};
388
+ @include node-intent-gradient;
389
+ }
390
+ }
328
391
  }
329
392
  }
330
393
 
@@ -424,3 +487,67 @@
424
487
  flex-grow: 0;
425
488
  flex-shrink: 0;
426
489
  }
490
+
491
+ // Node highlights (@deprecated) // FIXME: remove in v24.0.0
492
+
493
+ .#{$eccgui}-graphviz__node--highlight-success,
494
+ .#{$eccgui}-graphviz__node--highlight-warning,
495
+ .#{$eccgui}-graphviz__node--highlight-danger {
496
+ &:before {
497
+ content: " ";
498
+ display: block;
499
+ position: absolute;
500
+ top: -2 * $reactflow-node-border-width;
501
+ left: -2 * $reactflow-node-border-width;
502
+ bottom: -2 * $reactflow-node-border-width;
503
+ right: -2 * $reactflow-node-border-width;
504
+ border-radius: inherit;
505
+ box-shadow: 0 0 0 2 * $reactflow-node-border-width $eccgui-color-danger-text;
506
+ z-index: -1;
507
+ }
508
+ }
509
+
510
+ .#{$eccgui}-graphviz__node--highlight-match,
511
+ .#{$eccgui}-graphviz__node--highlight-altmatch {
512
+ &:after {
513
+ content: " ";
514
+ display: block;
515
+ position: absolute;
516
+ top: -2 * $reactflow-node-border-width;
517
+ left: -2 * $reactflow-node-border-width;
518
+ bottom: -2 * $reactflow-node-border-width;
519
+ right: -2 * $reactflow-node-border-width;
520
+ border-radius: inherit;
521
+ box-shadow: 0 0 0 2 * $reactflow-node-border-width $eccgui-color-accent;
522
+ z-index: -1;
523
+ }
524
+
525
+ &.#{$eccgui}-graphviz__node--highlight-success,
526
+ &.#{$eccgui}-graphviz__node--highlight-warning,
527
+ &.#{$eccgui}-graphviz__node--highlight-danger {
528
+ &:after {
529
+ top: -4 * $reactflow-node-border-width;
530
+ left: -4 * $reactflow-node-border-width;
531
+ bottom: -4 * $reactflow-node-border-width;
532
+ right: -4 * $reactflow-node-border-width;
533
+ }
534
+ }
535
+ }
536
+
537
+ .#{$eccgui}-graphviz__node--highlight-success {
538
+ &:before {
539
+ box-shadow: 0 0 0 2 * $reactflow-node-border-width $eccgui-color-success-text;
540
+ }
541
+ }
542
+
543
+ .#{$eccgui}-graphviz__node--highlight-warning {
544
+ &:before {
545
+ box-shadow: 0 0 0 2 * $reactflow-node-border-width $eccgui-color-warning-text;
546
+ }
547
+ }
548
+
549
+ .#{$eccgui}-graphviz__node--highlight-altmatch {
550
+ &:after {
551
+ box-shadow: 0 0 0 2 * $reactflow-node-border-width complement($eccgui-color-primary);
552
+ }
553
+ }
@@ -13,6 +13,7 @@ import {
13
13
  TagList,
14
14
  } from "./../../../../index";
15
15
  import canonicalIcons from "./../../../../components/Icon/canonicalIconNames";
16
+ import { Definitions } from "../../../../common/Intent";
16
17
 
17
18
  import { NodeContent } from "./../NodeContent";
18
19
  import { nodeTypes } from "./../nodeTypes";
@@ -65,6 +66,35 @@ export default {
65
66
  control: "select",
66
67
  options: [...(Object.keys(canonicalIcons))],
67
68
  },
69
+ highlightedState: {
70
+ control: "select",
71
+ options: ["Not set", "success", "warning", "danger", "match", "altmatch", "danger + match"],
72
+ mapping: {
73
+ "Not set": undefined,
74
+ "danger + match": ["danger", "match"],
75
+ },
76
+ },
77
+ border: {
78
+ control: "select",
79
+ options: [undefined, "solid", "double", "dashed", "dotted"],
80
+ },
81
+ intent: {
82
+ control: "select",
83
+ options: {"Not set": undefined, ...Definitions},
84
+ },
85
+ highlightColor: {
86
+ control: "select",
87
+ options: {
88
+ "Not set": undefined,
89
+ "Default": "default",
90
+ "Alternate": "alternate",
91
+ "Default + alternate": ["default" , "alternate"],
92
+ "Custom (red)": "red",
93
+ "Default + Custom (red)": ["default", "red"],
94
+ "Custom (green) + alternate": ["green", "alternate"],
95
+ "Custom (purple) + custom (yellow)": ["purple", "yellow"],
96
+ }
97
+ },
68
98
  content: { control: "none" },
69
99
  footerContent: { control: "none" },
70
100
  isConnectable: { table: { disable: true } },