@eccenca/gui-elements 23.2.0-rc.1 → 23.3.0-rc.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 (120) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlow.js +5 -1
  3. package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlow.js.map +1 -1
  4. package/dist/cjs/cmem/react-flow/StickyNoteModal/StickyNoteModal.js +9 -11
  5. package/dist/cjs/cmem/react-flow/StickyNoteModal/StickyNoteModal.js.map +1 -1
  6. package/dist/cjs/cmem/react-flow/extensions/ReactFlowHotkeyContext.js +12 -0
  7. package/dist/cjs/cmem/react-flow/extensions/ReactFlowHotkeyContext.js.map +1 -0
  8. package/dist/cjs/components/Application/ApplicationHeader.js +2 -3
  9. package/dist/cjs/components/Application/ApplicationHeader.js.map +1 -1
  10. package/dist/cjs/components/Dialog/Modal.js +17 -8
  11. package/dist/cjs/components/Dialog/Modal.js.map +1 -1
  12. package/dist/cjs/components/Dialog/SimpleDialog.js +19 -6
  13. package/dist/cjs/components/Dialog/SimpleDialog.js.map +1 -1
  14. package/dist/cjs/components/Icon/IconButton.js +1 -1
  15. package/dist/cjs/components/Icon/IconButton.js.map +1 -1
  16. package/dist/cjs/components/Icon/canonicalIconNames.js +1 -0
  17. package/dist/cjs/components/Icon/canonicalIconNames.js.map +1 -1
  18. package/dist/cjs/components/OverviewItem/OverviewItemDepiction.js +3 -6
  19. package/dist/cjs/components/OverviewItem/OverviewItemDepiction.js.map +1 -1
  20. package/dist/cjs/components/PropertyValuePair/PropertyName.js +3 -3
  21. package/dist/cjs/components/PropertyValuePair/PropertyName.js.map +1 -1
  22. package/dist/cjs/components/Select/Select.js +1 -0
  23. package/dist/cjs/components/Select/Select.js.map +1 -1
  24. package/dist/cjs/components/Separation/Spacing.js +18 -4
  25. package/dist/cjs/components/Separation/Spacing.js.map +1 -1
  26. package/dist/cjs/components/TextField/TextField.js +23 -3
  27. package/dist/cjs/components/TextField/TextField.js.map +1 -1
  28. package/dist/cjs/extensions/codemirror/CodeMirror.js +39 -7
  29. package/dist/cjs/extensions/codemirror/CodeMirror.js.map +1 -1
  30. package/dist/cjs/extensions/react-flow/handles/HandleDefault.js +26 -5
  31. package/dist/cjs/extensions/react-flow/handles/HandleDefault.js.map +1 -1
  32. package/dist/cjs/extensions/react-flow/handles/HandleTools.js +27 -0
  33. package/dist/cjs/extensions/react-flow/handles/HandleTools.js.map +1 -0
  34. package/dist/cjs/extensions/react-flow/index.js +2 -0
  35. package/dist/cjs/extensions/react-flow/index.js.map +1 -1
  36. package/dist/cjs/extensions/react-flow/nodes/NodeContent.js +25 -5
  37. package/dist/cjs/extensions/react-flow/nodes/NodeContent.js.map +1 -1
  38. package/dist/esm/cmem/markdown/Markdown.js +1 -1
  39. package/dist/esm/cmem/react-flow/ReactFlow/ReactFlow.js +5 -1
  40. package/dist/esm/cmem/react-flow/ReactFlow/ReactFlow.js.map +1 -1
  41. package/dist/esm/cmem/react-flow/StickyNoteModal/StickyNoteModal.js +9 -11
  42. package/dist/esm/cmem/react-flow/StickyNoteModal/StickyNoteModal.js.map +1 -1
  43. package/dist/esm/cmem/react-flow/extensions/ReactFlowHotkeyContext.js +6 -0
  44. package/dist/esm/cmem/react-flow/extensions/ReactFlowHotkeyContext.js.map +1 -0
  45. package/dist/esm/components/Application/ApplicationHeader.js +2 -3
  46. package/dist/esm/components/Application/ApplicationHeader.js.map +1 -1
  47. package/dist/esm/components/Dialog/Modal.js +18 -9
  48. package/dist/esm/components/Dialog/Modal.js.map +1 -1
  49. package/dist/esm/components/Dialog/SimpleDialog.js +20 -7
  50. package/dist/esm/components/Dialog/SimpleDialog.js.map +1 -1
  51. package/dist/esm/components/Icon/IconButton.js +1 -1
  52. package/dist/esm/components/Icon/IconButton.js.map +1 -1
  53. package/dist/esm/components/Icon/canonicalIconNames.js +1 -0
  54. package/dist/esm/components/Icon/canonicalIconNames.js.map +1 -1
  55. package/dist/esm/components/OverviewItem/OverviewItemDepiction.js +3 -6
  56. package/dist/esm/components/OverviewItem/OverviewItemDepiction.js.map +1 -1
  57. package/dist/esm/components/PropertyValuePair/PropertyName.js +3 -3
  58. package/dist/esm/components/PropertyValuePair/PropertyName.js.map +1 -1
  59. package/dist/esm/components/Select/Select.js +1 -0
  60. package/dist/esm/components/Select/Select.js.map +1 -1
  61. package/dist/esm/components/Separation/Spacing.js +28 -4
  62. package/dist/esm/components/Separation/Spacing.js.map +1 -1
  63. package/dist/esm/components/TextField/TextField.js +25 -5
  64. package/dist/esm/components/TextField/TextField.js.map +1 -1
  65. package/dist/esm/extensions/codemirror/CodeMirror.js +49 -6
  66. package/dist/esm/extensions/codemirror/CodeMirror.js.map +1 -1
  67. package/dist/esm/extensions/react-flow/handles/HandleDefault.js +45 -8
  68. package/dist/esm/extensions/react-flow/handles/HandleDefault.js.map +1 -1
  69. package/dist/esm/extensions/react-flow/handles/HandleTools.js +31 -0
  70. package/dist/esm/extensions/react-flow/handles/HandleTools.js.map +1 -0
  71. package/dist/esm/extensions/react-flow/index.js +2 -0
  72. package/dist/esm/extensions/react-flow/index.js.map +1 -1
  73. package/dist/esm/extensions/react-flow/nodes/NodeContent.js +32 -12
  74. package/dist/esm/extensions/react-flow/nodes/NodeContent.js.map +1 -1
  75. package/dist/types/cmem/react-flow/extensions/ReactFlowHotkeyContext.d.ts +8 -0
  76. package/dist/types/components/Application/ApplicationHeader.d.ts +1 -2
  77. package/dist/types/components/Dialog/Modal.d.ts +13 -6
  78. package/dist/types/components/Dialog/SimpleDialog.d.ts +14 -3
  79. package/dist/types/components/Icon/canonicalIconNames.d.ts +1 -1
  80. package/dist/types/components/PropertyValuePair/PropertyName.d.ts +7 -1
  81. package/dist/types/components/Separation/Spacing.d.ts +2 -2
  82. package/dist/types/components/TextField/TextField.d.ts +4 -2
  83. package/dist/types/extensions/codemirror/CodeMirror.d.ts +17 -3
  84. package/dist/types/extensions/react-flow/handles/HandleDefault.d.ts +2 -2
  85. package/dist/types/extensions/react-flow/handles/HandleTools.d.ts +6 -0
  86. package/dist/types/extensions/react-flow/index.d.ts +2 -0
  87. package/dist/types/extensions/react-flow/nodes/NodeContent.d.ts +21 -1
  88. package/package.json +14 -12
  89. package/scripts/compile-sass.ts +1 -1
  90. package/src/cmem/react-flow/ReactFlow/ReactFlow.tsx +10 -0
  91. package/src/cmem/react-flow/StickyNoteModal/StickyNoteModal.tsx +10 -12
  92. package/src/cmem/react-flow/extensions/ReactFlowHotkeyContext.ts +14 -0
  93. package/src/components/Application/ApplicationHeader.tsx +8 -13
  94. package/src/components/Application/_header.scss +51 -60
  95. package/src/components/Application/_toolbar.scss +22 -33
  96. package/src/components/AutoSuggestion/tests/AutoSuggestion.test.tsx +34 -21
  97. package/src/components/AutoSuggestion/tests/SingleLineCodeEditor.test.tsx +20 -9
  98. package/src/components/Dialog/Modal.tsx +62 -37
  99. package/src/components/Dialog/SimpleDialog.tsx +39 -34
  100. package/src/components/Dialog/dialog.scss +29 -17
  101. package/src/components/Icon/IconButton.tsx +1 -1
  102. package/src/components/Icon/canonicalIconNames.tsx +2 -0
  103. package/src/components/OverviewItem/OverviewItemDepiction.tsx +8 -16
  104. package/src/components/PropertyValuePair/PropertyName.tsx +15 -4
  105. package/src/components/Select/Select.tsx +3 -0
  106. package/src/components/Select/_select.scss +1 -1
  107. package/src/components/Separation/Spacing.tsx +12 -8
  108. package/src/components/TextField/TextField.tsx +32 -6
  109. package/src/components/Tooltip/tooltip.scss +15 -1
  110. package/src/extensions/codemirror/CodeMirror.tsx +62 -8
  111. package/src/extensions/codemirror/_codemirror.scss +53 -8
  112. package/src/extensions/react-flow/edges/stories/EdgeDefault.stories.tsx +43 -44
  113. package/src/extensions/react-flow/handles/HandleDefault.tsx +40 -33
  114. package/src/extensions/react-flow/handles/HandleTools.tsx +22 -0
  115. package/src/extensions/react-flow/handles/_handles.scss +64 -44
  116. package/src/extensions/react-flow/handles/stories/HandleDefault.stories.tsx +33 -27
  117. package/src/extensions/react-flow/index.ts +2 -0
  118. package/src/extensions/react-flow/nodes/NodeContent.tsx +62 -2
  119. package/src/extensions/react-flow/nodes/_nodes.scss +170 -110
  120. package/src/extensions/react-flow/nodes/stories/NodeDefault.stories.tsx +32 -34
@@ -1,15 +1,15 @@
1
- import React, { useState, useEffect, useCallback } from "react";
2
- import { ComponentStory, ComponentMeta } from "@storybook/react";
3
- import { ReactFlow } from "./../../../../cmem";
4
- import { Elements } from 'react-flow-renderer';
1
+ import React, { useCallback, useEffect, useState } from "react";
2
+ import { Elements } from "react-flow-renderer";
3
+ import { ComponentMeta, ComponentStory } from "@storybook/react";
5
4
 
6
- import { NodeDefault } from "./../NodeDefault";
5
+ import { ReactFlow } from "./../../../../cmem";
7
6
  import { NodeContent } from "./../NodeContent";
7
+ import { NodeDefault } from "./../NodeDefault";
8
8
  import { nodeTypes } from "./../nodeTypes";
9
9
  import { Default as NodeContentExample } from "./NodeContent.stories";
10
10
 
11
11
  export default {
12
- title: "Extensions/React Flow/Default Node",
12
+ title: "Extensions/React Flow/Node",
13
13
  component: NodeDefault,
14
14
  subcomponents: { NodeContent },
15
15
  argTypes: {
@@ -21,7 +21,7 @@ export default {
21
21
  type: { required: true },
22
22
  description: "Position on React-Flow canvas.",
23
23
  table: {
24
- type: { summary: "XYPosition" }
24
+ type: { summary: "XYPosition" },
25
25
  },
26
26
  },
27
27
  type: {
@@ -29,34 +29,34 @@ export default {
29
29
  description: "Key of the imported and connected `nodeTypes` to specify what node implementation is used.",
30
30
  table: {
31
31
  type: { summary: "string" },
32
- defaultValue: { summary: "default" }
32
+ defaultValue: { summary: "default" },
33
33
  },
34
34
  options: Object.keys(nodeTypes),
35
- mapping: Object.fromEntries(Object.keys(nodeTypes).map(type => [type, type])),
35
+ mapping: Object.fromEntries(Object.keys(nodeTypes).map((type) => [type, type])),
36
36
  },
37
37
  style: {
38
38
  control: "object",
39
39
  description: "css properties",
40
40
  table: {
41
- type: { summary: "React.CSSProperties" }
41
+ type: { summary: "React.CSSProperties" },
42
42
  },
43
43
  },
44
44
  className: {
45
45
  control: "text",
46
- description: "additional class name"
46
+ description: "additional class name",
47
47
  },
48
48
  targetPosition: {
49
49
  description: "'left' | 'right' | 'top' | 'bottom' handle position",
50
50
  table: {
51
51
  type: { summary: "Position" },
52
- defaultValue: { summary: "Position.Left" }
52
+ defaultValue: { summary: "Position.Left" },
53
53
  },
54
54
  },
55
55
  sourcePosition: {
56
56
  description: "'left' | 'right' | 'top' | 'bottom' handle position",
57
57
  table: {
58
58
  type: { summary: "Position" },
59
- defaultValue: { summary: "Position.Right" }
59
+ defaultValue: { summary: "Position.Right" },
60
60
  },
61
61
  },
62
62
  isHidden: {
@@ -64,7 +64,7 @@ export default {
64
64
  description: "if true, the node will not be rendered",
65
65
  table: {
66
66
  type: { summary: "boolean" },
67
- defaultValue: { summary: "false" }
67
+ defaultValue: { summary: "false" },
68
68
  },
69
69
  },
70
70
  draggable: {
@@ -72,7 +72,7 @@ export default {
72
72
  description: "if option is not set, the node is draggable (overwrites general nodesDraggable option)",
73
73
  table: {
74
74
  type: { summary: "boolean" },
75
- defaultValue: { summary: "true" }
75
+ defaultValue: { summary: "true" },
76
76
  },
77
77
  },
78
78
  connectable: {
@@ -80,7 +80,7 @@ export default {
80
80
  description: "if option is not set, the node is connectable (overwrites general nodesConnectable option)",
81
81
  table: {
82
82
  type: { summary: "boolean" },
83
- defaultValue: { summary: "true" }
83
+ defaultValue: { summary: "true" },
84
84
  },
85
85
  },
86
86
  selectable: {
@@ -88,12 +88,12 @@ export default {
88
88
  description: "if option is not set, the node is selectable (overwrites general elementsSelectable option)",
89
89
  table: {
90
90
  type: { summary: "boolean" },
91
- defaultValue: { summary: "true" }
91
+ defaultValue: { summary: "true" },
92
92
  },
93
93
  },
94
94
  dragHandle: {
95
95
  control: "text",
96
- description: "selector for specifying an element as a drag handle"
96
+ description: "selector for specifying an element as a drag handle",
97
97
  },
98
98
  },
99
99
  } as ComponentMeta<typeof NodeDefault>;
@@ -104,9 +104,7 @@ const NodeDefaultExample = (args: any) => {
104
104
  //const [edgeTools, setEdgeTools] = useState<JSX.Element>(<></>);
105
105
 
106
106
  useEffect(() => {
107
- setElements([
108
- args
109
- ] as Elements);
107
+ setElements([args] as Elements);
110
108
  }, [args]);
111
109
 
112
110
  const onLoad = useCallback(
@@ -118,23 +116,23 @@ const NodeDefaultExample = (args: any) => {
118
116
  [reactflowInstance]
119
117
  );
120
118
 
121
- return <ReactFlow
122
- elements={elements}
123
- style={{ height: '400px' }}
124
- onLoad={onLoad}
125
- nodeTypes={ nodeTypes }
126
- defaultZoom={1}
127
- />
128
- }
119
+ return (
120
+ <ReactFlow
121
+ elements={elements}
122
+ style={{ height: "400px" }}
123
+ onLoad={onLoad}
124
+ nodeTypes={nodeTypes}
125
+ defaultZoom={1}
126
+ />
127
+ );
128
+ };
129
129
 
130
- const Template: ComponentStory<typeof NodeDefault> = (args) => (
131
- <NodeDefaultExample {...args} /*some comment*/ />
132
- );
130
+ const Template: ComponentStory<typeof NodeDefault> = (args) => <NodeDefaultExample {...args} /*some comment*/ />;
133
131
 
134
132
  export const Default = Template.bind({});
135
133
  Default.args = {
136
- id: '1',
137
- type: 'default',
134
+ id: "1",
135
+ type: "default",
138
136
  data: NodeContentExample.args,
139
137
  position: { x: 50, y: 50 },
140
138
  };