@eccenca/gui-elements 23.0.0-rc.5 → 23.0.0-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -1
- package/dist/cjs/cmem/markdown/Markdown.js +14 -2
- package/dist/cjs/cmem/markdown/Markdown.js.map +1 -1
- package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlow.js +0 -4
- package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlow.js.map +1 -1
- package/dist/cjs/components/Accordion/Accordion.js +7 -2
- package/dist/cjs/components/Accordion/Accordion.js.map +1 -1
- package/dist/cjs/components/Accordion/AccordionItem.js.map +1 -1
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js +59 -33
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js.map +1 -1
- package/dist/cjs/components/AutoSuggestion/AutoSuggestionList.js +10 -1
- package/dist/cjs/components/AutoSuggestion/AutoSuggestionList.js.map +1 -1
- package/dist/cjs/components/AutoSuggestion/SingleLineCodeEditor.js +10 -4
- package/dist/cjs/components/AutoSuggestion/SingleLineCodeEditor.js.map +1 -1
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.js +13 -8
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.js.map +1 -1
- package/dist/cjs/components/Button/Button.js.map +1 -1
- package/dist/cjs/components/Checkbox/Checkbox.js +1 -0
- package/dist/cjs/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/cjs/components/Form/FieldItem.js.map +1 -1
- package/dist/cjs/components/Icon/canonicalIconNames.js +12 -16
- package/dist/cjs/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/cjs/components/Menu/Menu.js +2 -2
- package/dist/cjs/components/Menu/Menu.js.map +1 -1
- package/dist/cjs/components/Menu/MenuDivider.js +2 -2
- package/dist/cjs/components/Menu/MenuDivider.js.map +1 -1
- package/dist/cjs/components/Menu/MenuItem.js +5 -3
- package/dist/cjs/components/Menu/MenuItem.js.map +1 -1
- package/dist/cjs/components/MultiSelect/MultiSelect.js +17 -4
- package/dist/cjs/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/cjs/components/Pagination/Pagination.js.map +1 -1
- package/dist/cjs/components/RadioButton/RadioButton.js +1 -0
- package/dist/cjs/components/RadioButton/RadioButton.js.map +1 -1
- package/dist/cjs/components/Separation/Spacing.js +4 -1
- package/dist/cjs/components/Separation/Spacing.js.map +1 -1
- package/dist/cjs/components/Spinner/Spinner.js +3 -3
- package/dist/cjs/components/Spinner/Spinner.js.map +1 -1
- package/dist/cjs/components/Switch/Switch.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeDefault.js.map +1 -1
- package/dist/esm/cmem/markdown/Markdown.js +13 -2
- package/dist/esm/cmem/markdown/Markdown.js.map +1 -1
- package/dist/esm/cmem/react-flow/ReactFlow/ReactFlow.js +0 -4
- package/dist/esm/cmem/react-flow/ReactFlow/ReactFlow.js.map +1 -1
- package/dist/esm/components/Accordion/Accordion.js +8 -3
- package/dist/esm/components/Accordion/Accordion.js.map +1 -1
- package/dist/esm/components/Accordion/AccordionItem.js +1 -1
- package/dist/esm/components/Accordion/AccordionItem.js.map +1 -1
- package/dist/esm/components/AutoSuggestion/AutoSuggestion.js +71 -45
- package/dist/esm/components/AutoSuggestion/AutoSuggestion.js.map +1 -1
- package/dist/esm/components/AutoSuggestion/AutoSuggestionList.js +11 -2
- package/dist/esm/components/AutoSuggestion/AutoSuggestionList.js.map +1 -1
- package/dist/esm/components/AutoSuggestion/SingleLineCodeEditor.js +11 -5
- package/dist/esm/components/AutoSuggestion/SingleLineCodeEditor.js.map +1 -1
- package/dist/esm/components/AutocompleteField/AutoCompleteField.js +19 -14
- package/dist/esm/components/AutocompleteField/AutoCompleteField.js.map +1 -1
- package/dist/esm/components/Button/Button.js.map +1 -1
- package/dist/esm/components/Checkbox/Checkbox.js +1 -0
- package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/components/Form/FieldItem.js.map +1 -1
- package/dist/esm/components/Icon/canonicalIconNames.js +12 -16
- package/dist/esm/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/esm/components/Menu/Menu.js +3 -3
- package/dist/esm/components/Menu/Menu.js.map +1 -1
- package/dist/esm/components/Menu/MenuDivider.js +3 -3
- package/dist/esm/components/Menu/MenuDivider.js.map +1 -1
- package/dist/esm/components/Menu/MenuItem.js +5 -3
- package/dist/esm/components/Menu/MenuItem.js.map +1 -1
- package/dist/esm/components/MultiSelect/MultiSelect.js +22 -9
- package/dist/esm/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/esm/components/Pagination/Pagination.js +1 -1
- package/dist/esm/components/Pagination/Pagination.js.map +1 -1
- package/dist/esm/components/RadioButton/RadioButton.js +2 -1
- package/dist/esm/components/RadioButton/RadioButton.js.map +1 -1
- package/dist/esm/components/Separation/Spacing.js +4 -1
- package/dist/esm/components/Separation/Spacing.js.map +1 -1
- package/dist/esm/components/Spinner/Spinner.js +3 -4
- package/dist/esm/components/Spinner/Spinner.js.map +1 -1
- package/dist/esm/components/Switch/Switch.js +1 -1
- package/dist/esm/components/Switch/Switch.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeDefault.js.map +1 -1
- package/dist/types/cmem/markdown/Markdown.d.ts +19 -3
- package/dist/types/cmem/react-flow/ReactFlow/ReactFlow.d.ts +1 -1
- package/dist/types/components/Accordion/Accordion.d.ts +12 -1
- package/dist/types/components/Accordion/AccordionItem.d.ts +21 -6
- package/dist/types/components/AutoSuggestion/AutoSuggestionList.d.ts +4 -2
- package/dist/types/components/AutocompleteField/AutoCompleteField.d.ts +7 -0
- package/dist/types/components/Button/Button.d.ts +1 -1
- package/dist/types/components/Checkbox/Checkbox.d.ts +4 -1
- package/dist/types/components/Form/FieldItem.d.ts +32 -2
- package/dist/types/components/Icon/canonicalIconNames.d.ts +1 -1
- package/dist/types/components/Menu/Menu.d.ts +4 -1
- package/dist/types/components/Menu/MenuDivider.d.ts +4 -1
- package/dist/types/components/Menu/MenuItem.d.ts +5 -2
- package/dist/types/components/Pagination/Pagination.d.ts +9 -5
- package/dist/types/components/RadioButton/RadioButton.d.ts +4 -1
- package/dist/types/components/Separation/Spacing.d.ts +17 -3
- package/dist/types/components/Spinner/Spinner.d.ts +38 -5
- package/dist/types/components/Switch/Switch.d.ts +6 -3
- package/dist/types/extensions/react-flow/edges/EdgeDefault.d.ts +15 -0
- package/package.json +4 -6
- package/src/cmem/markdown/Markdown.stories.tsx +55 -0
- package/src/cmem/markdown/Markdown.tsx +21 -9
- package/src/cmem/react-flow/ReactFlow/ReactFlow.stories.tsx +15 -86
- package/src/cmem/react-flow/ReactFlow/ReactFlow.tsx +1 -5
- package/src/cmem/react-flow/nodes/_stickynote.scss +1 -1
- package/src/components/Accordion/Accordion.tsx +33 -3
- package/src/components/Accordion/AccordionItem.tsx +23 -33
- package/src/components/Accordion/Stories/Accordion.stories.tsx +33 -0
- package/src/components/Accordion/Stories/AccordionItem.stories.tsx +27 -0
- package/src/components/Accordion/accordion.scss +20 -1
- package/src/components/AutoSuggestion/AutoSuggestion.tsx +73 -39
- package/src/components/AutoSuggestion/AutoSuggestionList.tsx +15 -2
- package/src/components/AutoSuggestion/SingleLineCodeEditor.tsx +17 -9
- package/src/components/AutoSuggestion/tests/AutoSuggestionList.test.tsx +9 -7
- package/src/components/AutocompleteField/AutoCompleteField.tsx +24 -6
- package/src/components/AutocompleteField/autoCompleteFieldUtils.tsx +1 -1
- package/src/components/AutocompleteField/autocompletefield.scss +1 -1
- package/src/components/AutocompleteField/stories/AutoCompleteField.stories.tsx +1 -1
- package/src/components/Button/Button.stories.tsx +1 -107
- package/src/components/Button/Button.tsx +2 -2
- package/src/components/Card/stories/Card.stories.tsx +2 -21
- package/src/components/Checkbox/Checkbox.tsx +9 -2
- package/src/components/Checkbox/Stories/Checkbox.stories.tsx +30 -0
- package/src/components/Checkbox/checkbox.scss +4 -0
- package/src/components/ContextOverlay/ContextMenu.stories.tsx +2 -2
- package/src/components/Dialog/stories/Modal.stories.tsx +1 -61
- package/src/components/Dialog/stories/SimpleDialog.stories.tsx +1 -2
- package/src/components/Form/FieldItem.tsx +32 -2
- package/src/components/Form/Stories/FieldItem.stories.tsx +27 -0
- package/src/components/Form/Stories/FieldItemRow.stories.tsx +31 -0
- package/src/components/Icon/canonicalIconNames.tsx +113 -119
- package/src/components/Label/Label.stories.tsx +1 -1
- package/src/components/Menu/Menu.tsx +21 -3
- package/src/components/Menu/MenuDivider.tsx +20 -3
- package/src/components/Menu/MenuItem.tsx +13 -10
- package/src/components/Menu/Stories/Menu.stories.tsx +31 -0
- package/src/components/Menu/Stories/MenuItem.stories.tsx +25 -0
- package/src/components/MultiSelect/MultiSelect.stories.tsx +2 -21
- package/src/components/MultiSelect/MultiSelect.tsx +22 -5
- package/src/components/Notification/Notification.stories.tsx +1 -29
- package/src/components/Pagination/Pagination.tsx +13 -6
- package/src/components/Pagination/Stories/Pagination.stories.tsx +32 -0
- package/src/components/Pagination/pagination.scss +2 -2
- package/src/components/ProgressBar/Stories/ProgressBar.stories.tsx +25 -0
- package/src/components/RadioButton/RadioButton.tsx +9 -2
- package/src/components/RadioButton/Stories/RadioButton.stories.tsx +30 -0
- package/src/components/Select/Select.stories.tsx +1 -1
- package/src/components/Separation/Spacing.tsx +17 -4
- package/src/components/Separation/Stories/Spacing.stories.tsx +25 -0
- package/src/components/Spinner/Spinner.tsx +39 -7
- package/src/components/Spinner/Stories/spinner.stories.tsx +26 -0
- package/src/components/Switch/Stories/Switch.stories.tsx +27 -0
- package/src/components/Switch/Switch.tsx +9 -3
- package/src/components/Tabs/stories/Tab.stories.tsx +1 -32
- package/src/components/Tabs/stories/Tabs.stories.tsx +1 -39
- package/src/components/Tag/Tag.stories.tsx +1 -9
- package/src/components/TextField/stories/TextArea.stories.tsx +10 -25
- package/src/components/TextField/stories/TextField.stories.tsx +2 -73
- package/src/components/Typography/typography.scss +3 -3
- package/src/extensions/react-flow/edges/EdgeDefault.tsx +19 -0
- package/src/extensions/react-flow/edges/stories/EdgeDefault.stories.tsx +121 -0
- package/src/extensions/react-flow/nodes/stories/NodeContent.stories.tsx +1 -1
- package/dist/cjs/cmem/react-flow/configuration/customLabel.js +0 -13
- package/dist/cjs/cmem/react-flow/configuration/customLabel.js.map +0 -1
- package/dist/cjs/cmem/react-flow/configuration/inverseEdge.js +0 -13
- package/dist/cjs/cmem/react-flow/configuration/inverseEdge.js.map +0 -1
- package/dist/esm/cmem/react-flow/configuration/customLabel.js +0 -10
- package/dist/esm/cmem/react-flow/configuration/customLabel.js.map +0 -1
- package/dist/esm/cmem/react-flow/configuration/inverseEdge.js +0 -10
- package/dist/esm/cmem/react-flow/configuration/inverseEdge.js.map +0 -1
- package/dist/types/cmem/react-flow/configuration/customLabel.d.ts +0 -8
- package/dist/types/cmem/react-flow/configuration/inverseEdge.d.ts +0 -8
- package/src/cmem/react-flow/configuration/customLabel.ts +0 -11
- package/src/cmem/react-flow/configuration/inverseEdge.ts +0 -11
|
@@ -2,129 +2,128 @@ import * as icons from "@carbon/icons-react";
|
|
|
2
2
|
|
|
3
3
|
/** Valid icon names. */
|
|
4
4
|
export type ValidIconName =
|
|
5
|
+
| "application-activities"
|
|
5
6
|
| "application-dataintegration"
|
|
7
|
+
| "application-explore"
|
|
6
8
|
| "application-homepage"
|
|
7
|
-
| "application-
|
|
8
|
-
| "application-warning"
|
|
9
|
+
| "application-legacygui"
|
|
9
10
|
| "application-mapping"
|
|
10
|
-
| "application-explore"
|
|
11
|
-
| "application-vocabularies"
|
|
12
11
|
| "application-queries"
|
|
13
|
-
| "application-
|
|
14
|
-
| "application-
|
|
15
|
-
| "
|
|
16
|
-
| "
|
|
17
|
-
| "
|
|
18
|
-
| "
|
|
19
|
-
| "
|
|
20
|
-
| "
|
|
21
|
-
| "
|
|
22
|
-
| "
|
|
23
|
-
| "
|
|
24
|
-
| "
|
|
25
|
-
| "
|
|
26
|
-
| "
|
|
27
|
-
| "
|
|
28
|
-
| "
|
|
29
|
-
| "
|
|
30
|
-
| "
|
|
31
|
-
| "
|
|
32
|
-
| "
|
|
33
|
-
| "
|
|
34
|
-
| "
|
|
35
|
-
| "
|
|
36
|
-
| "
|
|
37
|
-
| "
|
|
38
|
-
| "
|
|
39
|
-
| "
|
|
40
|
-
| "
|
|
41
|
-
| "
|
|
42
|
-
| "
|
|
43
|
-
| "
|
|
12
|
+
| "application-useraccount"
|
|
13
|
+
| "application-vocabularies"
|
|
14
|
+
| "application-warning"
|
|
15
|
+
| "artefact-commit"
|
|
16
|
+
| "artefact-customtask"
|
|
17
|
+
| "artefact-dataset"
|
|
18
|
+
| "artefact-dataset-csv"
|
|
19
|
+
| "artefact-dataset-eccencadataplatform"
|
|
20
|
+
| "artefact-dataset-excel"
|
|
21
|
+
| "artefact-dataset-file"
|
|
22
|
+
| "artefact-dataset-jdbc"
|
|
23
|
+
| "artefact-dataset-json"
|
|
24
|
+
| "artefact-dataset-multicsv"
|
|
25
|
+
| "artefact-dataset-neo4j"
|
|
26
|
+
| "artefact-dataset-sparkview"
|
|
27
|
+
| "artefact-dataset-sparqlendpoint"
|
|
28
|
+
| "artefact-dataset-sqlendpoint"
|
|
29
|
+
| "artefact-dataset-xml"
|
|
30
|
+
| "artefact-deprecated"
|
|
31
|
+
| "artefact-embedded"
|
|
32
|
+
| "artefact-errorlog"
|
|
33
|
+
| "artefact-file"
|
|
34
|
+
| "artefact-linking"
|
|
35
|
+
| "artefact-project"
|
|
36
|
+
| "artefact-rawdata"
|
|
37
|
+
| "artefact-remote"
|
|
38
|
+
| "artefact-report"
|
|
39
|
+
| "artefact-task"
|
|
40
|
+
| "artefact-transform"
|
|
41
|
+
| "artefact-uncategorized"
|
|
42
|
+
| "artefact-workflow"
|
|
43
|
+
| "data-sourcepath"
|
|
44
|
+
| "data-targetpath"
|
|
45
|
+
| "item-add-artefact"
|
|
44
46
|
| "item-clone"
|
|
47
|
+
| "item-comment"
|
|
48
|
+
| "item-copy"
|
|
49
|
+
| "item-download"
|
|
50
|
+
| "item-draggable"
|
|
45
51
|
| "item-edit"
|
|
46
52
|
| "item-evaluation"
|
|
47
53
|
| "item-execution"
|
|
48
54
|
| "item-info"
|
|
49
|
-
| "item-remove"
|
|
50
|
-
| "item-add-artefact"
|
|
51
55
|
| "item-launch"
|
|
52
|
-
| "item-
|
|
53
|
-
| "item-upload"
|
|
56
|
+
| "item-moremenu"
|
|
54
57
|
| "item-question"
|
|
55
|
-
| "item-comment"
|
|
56
|
-
| "item-copy"
|
|
57
|
-
| "item-save"
|
|
58
|
-
| "item-start"
|
|
59
|
-
| "item-stop"
|
|
60
58
|
| "item-reload"
|
|
59
|
+
| "item-remove"
|
|
61
60
|
| "item-reset"
|
|
62
|
-
| "item-
|
|
63
|
-
| "item-draggable"
|
|
61
|
+
| "item-save"
|
|
64
62
|
| "item-settings"
|
|
65
|
-
| "
|
|
63
|
+
| "item-shuffle"
|
|
64
|
+
| "item-start"
|
|
65
|
+
| "item-stop"
|
|
66
|
+
| "item-upload"
|
|
67
|
+
| "item-vertmenu"
|
|
68
|
+
| "item-viewdetails"
|
|
69
|
+
| "list-sort"
|
|
70
|
+
| "list-sortasc"
|
|
71
|
+
| "list-sortdesc"
|
|
72
|
+
| "module-accesscontrol"
|
|
73
|
+
| "module-annotation"
|
|
74
|
+
| "module-dashboard"
|
|
75
|
+
| "module-gdprsearch"
|
|
76
|
+
| "module-integrations"
|
|
77
|
+
| "module-linkedrules"
|
|
78
|
+
| "module-reports"
|
|
79
|
+
| "module-search"
|
|
80
|
+
| "module-thesauri"
|
|
81
|
+
| "module-timetracker"
|
|
82
|
+
| "module-visualization"
|
|
83
|
+
| "navigation-back"
|
|
84
|
+
| "navigation-close"
|
|
85
|
+
| "navigation-first"
|
|
86
|
+
| "navigation-forth"
|
|
87
|
+
| "navigation-jump"
|
|
88
|
+
| "navigation-last"
|
|
89
|
+
| "navigation-next"
|
|
90
|
+
| "navigation-previous"
|
|
91
|
+
| "operation-aggregation"
|
|
92
|
+
| "operation-autolayout"
|
|
66
93
|
| "operation-clear"
|
|
67
|
-
| "operation-
|
|
68
|
-
| "operation-
|
|
69
|
-
| "operation-logout"
|
|
94
|
+
| "operation-commit"
|
|
95
|
+
| "operation-comparison"
|
|
70
96
|
| "operation-filter"
|
|
71
97
|
| "operation-filteredit"
|
|
72
|
-
| "operation-
|
|
73
|
-
| "operation-
|
|
74
|
-
| "operation-
|
|
75
|
-
| "operation-
|
|
98
|
+
| "operation-link"
|
|
99
|
+
| "operation-logout"
|
|
100
|
+
| "operation-redo"
|
|
101
|
+
| "operation-search"
|
|
76
102
|
| "operation-sharelink"
|
|
77
|
-
| "
|
|
78
|
-
| "
|
|
79
|
-
| "
|
|
80
|
-
| "list-sortasc"
|
|
81
|
-
| "list-sortdesc"
|
|
82
|
-
| "state-info"
|
|
83
|
-
| "state-success"
|
|
84
|
-
| "state-warning"
|
|
85
|
-
| "state-danger"
|
|
86
|
-
| "state-unchecked"
|
|
103
|
+
| "operation-transform"
|
|
104
|
+
| "operation-undo"
|
|
105
|
+
| "operation-unlink"
|
|
87
106
|
| "state-checked"
|
|
88
107
|
| "state-checkedsimple"
|
|
89
|
-
| "state-partlychecked"
|
|
90
|
-
| "state-declined"
|
|
91
108
|
| "state-confirmed"
|
|
92
|
-
| "
|
|
93
|
-
| "
|
|
94
|
-
| "
|
|
95
|
-
| "
|
|
96
|
-
| "
|
|
97
|
-
| "
|
|
98
|
-
| "
|
|
99
|
-
| "
|
|
100
|
-
| "
|
|
101
|
-
| "
|
|
102
|
-
| "
|
|
103
|
-
| "
|
|
104
|
-
| "
|
|
105
|
-
| "
|
|
106
|
-
| "
|
|
107
|
-
| "
|
|
108
|
-
| "
|
|
109
|
-
| "
|
|
110
|
-
| "artefact-customtask"
|
|
111
|
-
| "artefact-file"
|
|
112
|
-
| "artefact-embedded"
|
|
113
|
-
| "artefact-remote"
|
|
114
|
-
| "artefact-deprecated"
|
|
115
|
-
| "artefact-uncategorized"
|
|
116
|
-
| "artefact-rawdata"
|
|
117
|
-
| "artefact-report"
|
|
118
|
-
| "artefact-commit"
|
|
119
|
-
| "activity-error-report"
|
|
120
|
-
| "select-caret"
|
|
121
|
-
| "linked-item"
|
|
122
|
-
| "operation-auto-graph-layout"
|
|
123
|
-
| "unlinked-item"
|
|
124
|
-
| "write-protected"
|
|
125
|
-
| "settings"
|
|
126
|
-
| "favorite-empty"
|
|
127
|
-
| "favorite-filled"
|
|
109
|
+
| "state-danger"
|
|
110
|
+
| "state-declined"
|
|
111
|
+
| "state-info"
|
|
112
|
+
| "state-partlychecked"
|
|
113
|
+
| "state-protected"
|
|
114
|
+
| "state-success"
|
|
115
|
+
| "state-unchecked"
|
|
116
|
+
| "state-warning"
|
|
117
|
+
| "toggler-caret"
|
|
118
|
+
| "toggler-maximize"
|
|
119
|
+
| "toggler-minimize"
|
|
120
|
+
| "toggler-moveleft"
|
|
121
|
+
| "toggler-moveright"
|
|
122
|
+
| "toggler-showless"
|
|
123
|
+
| "toggler-showmore"
|
|
124
|
+
| "toggler-star-empty"
|
|
125
|
+
| "toggler-star-filled"
|
|
126
|
+
| "toggler-tree"
|
|
128
127
|
| "undefined"
|
|
129
128
|
| "Undefined";
|
|
130
129
|
|
|
@@ -713,54 +712,49 @@ const canonicalIconNames: Record<ValidIconName, IconSized> = {
|
|
|
713
712
|
large: icons.Commit32
|
|
714
713
|
},
|
|
715
714
|
|
|
716
|
-
"
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
715
|
+
"artefact-errorlog": {
|
|
716
|
+
// FIXME: we may check for a better icon
|
|
717
|
+
small: icons.WarningOther16,
|
|
718
|
+
normal: icons.WarningOther20,
|
|
719
|
+
large: icons.WarningOther32,
|
|
720
720
|
},
|
|
721
721
|
|
|
722
|
-
"
|
|
722
|
+
"toggler-caret": {
|
|
723
723
|
small: icons.CaretSort16,
|
|
724
724
|
normal: icons.CaretSort20,
|
|
725
725
|
large: icons.CaretSort32,
|
|
726
726
|
},
|
|
727
727
|
|
|
728
|
-
"
|
|
728
|
+
"operation-link": {
|
|
729
729
|
small: icons.Link16,
|
|
730
730
|
normal: icons.Link20,
|
|
731
731
|
large: icons.Link32,
|
|
732
732
|
},
|
|
733
|
-
"
|
|
733
|
+
"operation-unlink": {
|
|
734
734
|
small: icons.Unlink16,
|
|
735
735
|
normal: icons.Unlink20,
|
|
736
736
|
large: icons.Unlink32,
|
|
737
737
|
},
|
|
738
738
|
|
|
739
|
-
"operation-
|
|
739
|
+
"operation-autolayout": {
|
|
740
740
|
small: icons.ChartNetwork16,
|
|
741
741
|
normal: icons.ChartNetwork20,
|
|
742
742
|
large: icons.ChartNetwork32,
|
|
743
743
|
},
|
|
744
744
|
|
|
745
|
-
"
|
|
745
|
+
"state-protected": {
|
|
746
746
|
small: icons.DocumentProtected16,
|
|
747
747
|
normal: icons.DocumentProtected20,
|
|
748
748
|
large: icons.DocumentProtected32,
|
|
749
749
|
},
|
|
750
750
|
|
|
751
|
-
"
|
|
752
|
-
small: icons.Settings16,
|
|
753
|
-
normal: icons.Settings20,
|
|
754
|
-
large: icons.Settings32
|
|
755
|
-
},
|
|
756
|
-
|
|
757
|
-
"favorite-empty": {
|
|
751
|
+
"toggler-star-empty": {
|
|
758
752
|
small: icons.Star16,
|
|
759
753
|
normal: icons.Star20,
|
|
760
754
|
large: icons.Star32
|
|
761
755
|
},
|
|
762
756
|
|
|
763
|
-
"
|
|
757
|
+
"toggler-star-filled": {
|
|
764
758
|
small: icons.StarFilled16,
|
|
765
759
|
normal: icons.StarFilled20,
|
|
766
760
|
large: icons.StarFilled32
|
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Menu as BlueprintMenu,
|
|
4
|
+
MenuProps as BlueprintMenuProps,
|
|
5
|
+
} from "@blueprintjs/core";
|
|
3
6
|
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
export interface MenuProps extends BlueprintMenuProps {
|
|
9
|
+
// we do not add own changes here currently
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function Menu({
|
|
13
|
+
children,
|
|
14
|
+
className="",
|
|
15
|
+
...restProps
|
|
16
|
+
}: MenuProps) {
|
|
17
|
+
return (
|
|
18
|
+
<BlueprintMenu
|
|
19
|
+
{...restProps}
|
|
20
|
+
className={`${eccgui}-menu__list ` + className}
|
|
21
|
+
>
|
|
22
|
+
{children}
|
|
23
|
+
</BlueprintMenu>
|
|
24
|
+
);
|
|
7
25
|
}
|
|
8
26
|
|
|
9
27
|
export default Menu;
|
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
MenuDivider as BlueprintMenuDivider,
|
|
4
|
+
MenuDividerProps as BlueprintMenuDividerProps,
|
|
5
|
+
} from "@blueprintjs/core";
|
|
3
6
|
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
export interface MenuDividerProps extends BlueprintMenuDividerProps {
|
|
9
|
+
// we do not add own changes here currently
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function MenuDivider({
|
|
13
|
+
children,
|
|
14
|
+
className="",
|
|
15
|
+
...restProps
|
|
16
|
+
}: MenuDividerProps) {
|
|
17
|
+
return (
|
|
18
|
+
<BlueprintMenuDivider
|
|
19
|
+
{...restProps}
|
|
20
|
+
className={`${eccgui}-menu__divider ` + className}>
|
|
21
|
+
{children}
|
|
22
|
+
</BlueprintMenuDivider>
|
|
23
|
+
);
|
|
7
24
|
}
|
|
8
25
|
|
|
9
26
|
export default MenuDivider;
|
|
@@ -5,22 +5,25 @@ import Icon from '../Icon/Icon';
|
|
|
5
5
|
import { openInNewTab } from '../../common/utils/openInNewTab';
|
|
6
6
|
import {ValidIconName} from "../Icon/canonicalIconNames";
|
|
7
7
|
|
|
8
|
-
export interface MenuItemProps extends Omit<BlueprintMenuItemProps, "icon">, Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "target"> {
|
|
8
|
+
export interface MenuItemProps extends Omit<BlueprintMenuItemProps, "icon" | "children">, Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "target" | "children"> {
|
|
9
9
|
/*
|
|
10
10
|
* If set the icon is diplayed on the left side of the menu item.
|
|
11
11
|
*/
|
|
12
12
|
icon?: ValidIconName | string[];
|
|
13
|
+
children?: React.ReactNode
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Single item, used as child inside `Menu`.
|
|
18
|
+
*/
|
|
16
19
|
function MenuItem({
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
children,
|
|
21
|
+
className = "",
|
|
22
|
+
icon,
|
|
23
|
+
onClick,
|
|
24
|
+
href,
|
|
25
|
+
...restProps
|
|
26
|
+
}: MenuItemProps) {
|
|
24
27
|
return (
|
|
25
28
|
<BlueprintMenuItem
|
|
26
29
|
{...restProps}
|
|
@@ -31,7 +34,7 @@ function MenuItem({
|
|
|
31
34
|
icon ? <Icon name={icon} /> : false
|
|
32
35
|
}
|
|
33
36
|
>
|
|
34
|
-
{children}
|
|
37
|
+
{children ?? null}
|
|
35
38
|
</BlueprintMenuItem>
|
|
36
39
|
);
|
|
37
40
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
import { Menu, MenuItem, MenuDivider } from "../../../../index";
|
|
4
|
+
import { Default as MenuItemStory } from '../Stories/MenuItem.stories';
|
|
5
|
+
import { Default as ContentMenuStory } from '../../ContextOverlay/ContextMenu.stories';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: "Components/Menu",
|
|
9
|
+
component: Menu,
|
|
10
|
+
subcomponents: {MenuItem, MenuDivider},
|
|
11
|
+
argTypes: {
|
|
12
|
+
children: {
|
|
13
|
+
control: "none",
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
} as ComponentMeta<typeof Menu>
|
|
17
|
+
|
|
18
|
+
const MenuExample: ComponentStory<typeof Menu> = (args) => (
|
|
19
|
+
<Menu style={{width: "200px"}} {...args} />
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
export const Default = MenuExample.bind({});
|
|
23
|
+
Default.args = {
|
|
24
|
+
children : (
|
|
25
|
+
<>
|
|
26
|
+
{ContentMenuStory.args.children}
|
|
27
|
+
<MenuDivider title ="Second menu part"/>
|
|
28
|
+
<MenuItem {...MenuItemStory.args} selected />
|
|
29
|
+
</>
|
|
30
|
+
),
|
|
31
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
import { Menu, MenuItem } from "../../../../index";
|
|
4
|
+
export default {
|
|
5
|
+
title: "Components/Menu/MenuItem",
|
|
6
|
+
component: MenuItem,
|
|
7
|
+
argTypes: {
|
|
8
|
+
}
|
|
9
|
+
} as ComponentMeta<typeof MenuItem>
|
|
10
|
+
|
|
11
|
+
const MenuExample: ComponentStory<typeof MenuItem> = (args) => (
|
|
12
|
+
<Menu style={{width: "200px"}}><MenuItem {...args} /></Menu>
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
export const Default = MenuExample.bind({});
|
|
16
|
+
Default.args = {
|
|
17
|
+
children: (
|
|
18
|
+
<>
|
|
19
|
+
<MenuItem key="m6" text={"Sub option 1"} />
|
|
20
|
+
<MenuItem key="m6" text={"Sub option 2"} />
|
|
21
|
+
</>
|
|
22
|
+
),
|
|
23
|
+
text: "Parent option",
|
|
24
|
+
key: "m4"
|
|
25
|
+
};
|
|
@@ -1,32 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
3
|
import { loremIpsum } from "react-lorem-ipsum";
|
|
4
|
-
|
|
5
|
-
import MultiSelectExample from "./MultiSelect";
|
|
4
|
+
import { MultiSelect as MultiSelectExample } from "./../../../index";
|
|
6
5
|
|
|
7
6
|
export default {
|
|
8
|
-
title: "
|
|
7
|
+
title: "Forms/MultiSelect",
|
|
9
8
|
component: MultiSelectExample,
|
|
10
9
|
argTypes: {
|
|
11
|
-
placeholder: {
|
|
12
|
-
description: "Input placeholder text",
|
|
13
|
-
control: "text",
|
|
14
|
-
table: {
|
|
15
|
-
type: { summary: "string" },
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
openOnKeyDown: {
|
|
19
|
-
description:
|
|
20
|
-
"If true, the component waits until a keydown event in the TagInput before opening its popover. If false, the popover opens immediately after a mouse click focuses the component's TagInput ",
|
|
21
|
-
control: "boolean",
|
|
22
|
-
defaultValue: false,
|
|
23
|
-
table: {
|
|
24
|
-
type: { summary: "boolean" },
|
|
25
|
-
defaultValue: { summary: false },
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
10
|
items: {
|
|
29
|
-
description: "Array of items in the list",
|
|
30
11
|
control: "none",
|
|
31
12
|
},
|
|
32
13
|
},
|
|
@@ -126,6 +126,7 @@ function MultiSelect<T>({
|
|
|
126
126
|
...otherProps
|
|
127
127
|
}: IProps<T>) {
|
|
128
128
|
const [createdItems, setCreatedItems] = React.useState<T[]>([]);
|
|
129
|
+
const [createdSelectedItems, setCreatedSelectedItems] = React.useState<T[]>([]);
|
|
129
130
|
const [itemsCopy, setItemsCopy] = React.useState<T[]>([...items]);
|
|
130
131
|
const [filteredItemList, setFilteredItemList] = React.useState<T[]>([]);
|
|
131
132
|
const [selectedItems, setSelectedItems] = React.useState<T[]>(() => (prePopulateWithItems ? [...items] : []));
|
|
@@ -165,14 +166,14 @@ function MultiSelect<T>({
|
|
|
165
166
|
onSelection &&
|
|
166
167
|
onSelection({
|
|
167
168
|
newlySelected: selectedItems.slice(-1)[0],
|
|
168
|
-
createdItems,
|
|
169
|
+
createdItems: createdSelectedItems,
|
|
169
170
|
selectedItems,
|
|
170
171
|
});
|
|
171
172
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
172
173
|
}, [
|
|
173
174
|
onSelection,
|
|
174
175
|
selectedItems.map((item) => itemId(item)).join("|"),
|
|
175
|
-
|
|
176
|
+
createdSelectedItems.map((item) => itemId(item)).join("|"),
|
|
176
177
|
]);
|
|
177
178
|
|
|
178
179
|
/**
|
|
@@ -192,18 +193,34 @@ function MultiSelect<T>({
|
|
|
192
193
|
setSelectedItems((items) => items.filter((item) => itemId(item) !== matcher));
|
|
193
194
|
};
|
|
194
195
|
|
|
196
|
+
|
|
197
|
+
|
|
195
198
|
/**
|
|
196
199
|
* selects and deselects an item from selection list
|
|
197
200
|
* if the item exists it removes it instead
|
|
198
201
|
* @param item
|
|
199
202
|
*/
|
|
200
203
|
const onItemSelect = (item: T) => {
|
|
204
|
+
|
|
201
205
|
if (itemHasBeenSelectedAlready(itemId(item))) {
|
|
202
206
|
removeItemSelection(itemId(item));
|
|
203
207
|
} else {
|
|
204
208
|
setSelectedItems((items) => [...items, item]);
|
|
205
209
|
}
|
|
206
|
-
|
|
210
|
+
|
|
211
|
+
//remove if already exist
|
|
212
|
+
if (createdSelectedItems.find((t) => itemLabel(t) === itemLabel(item))) {
|
|
213
|
+
setCreatedSelectedItems((prevItems) => prevItems.filter(prevItem => itemLabel(prevItem) !== itemLabel(item)))
|
|
214
|
+
}else {
|
|
215
|
+
const wasNewlyCreated = createdItems.find((t) => itemLabel(t) === itemLabel(item));
|
|
216
|
+
//only add to createdSelectedItems if it was previously created and not
|
|
217
|
+
// from the initial items or a possible query response
|
|
218
|
+
if(wasNewlyCreated){
|
|
219
|
+
setCreatedSelectedItems((prevItems) =>[...prevItems, item])
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
inputRef.current?.select();
|
|
207
224
|
};
|
|
208
225
|
|
|
209
226
|
/**
|
|
@@ -266,7 +283,7 @@ function MultiSelect<T>({
|
|
|
266
283
|
*/
|
|
267
284
|
const removeTagFromSelectionViaIndex = (label: React.ReactNode, index: number) => {
|
|
268
285
|
setSelectedItems([...selectedItems.slice(0, index), ...selectedItems.slice(index + 1)]);
|
|
269
|
-
|
|
286
|
+
setCreatedSelectedItems(items => items.filter(item => itemLabel(item) !== label));
|
|
270
287
|
};
|
|
271
288
|
|
|
272
289
|
/**
|
|
@@ -276,8 +293,8 @@ function MultiSelect<T>({
|
|
|
276
293
|
const newItem = createNewItemFromQuery!!(query);
|
|
277
294
|
//set new items
|
|
278
295
|
setCreatedItems((items) => [...items, newItem]);
|
|
296
|
+
setCreatedSelectedItems((items) => [...items, newItem])
|
|
279
297
|
setQuery("");
|
|
280
|
-
itemsCopy.push(newItem);
|
|
281
298
|
return newItem;
|
|
282
299
|
};
|
|
283
300
|
|
|
@@ -1,40 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
3
|
import { LoremIpsum } from 'react-lorem-ipsum';
|
|
4
|
-
|
|
5
|
-
import Notification from "./Notification";
|
|
6
|
-
import HtmlContentBlock from "./../Typography/HtmlContentBlock";
|
|
7
|
-
import Button from "./../Button/Button";
|
|
8
|
-
import Spacing from "./../Separation/Spacing";
|
|
4
|
+
import { Notification, HtmlContentBlock, Button, Spacing} from "../../../index";
|
|
9
5
|
|
|
10
6
|
export default {
|
|
11
7
|
title: "Components/Notification",
|
|
12
8
|
component: Notification,
|
|
13
9
|
argTypes: {
|
|
14
|
-
className: {
|
|
15
|
-
description: "A space-delimited list of class names.",
|
|
16
|
-
control: "text",
|
|
17
|
-
table: {
|
|
18
|
-
defaultValue: { summary: undefined },
|
|
19
|
-
type: { summary: "string" },
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
onDismiss: {
|
|
23
|
-
description: "Callback invoked when the toast is dismissed, either by the user or by the timeout.",
|
|
24
|
-
control: "none",
|
|
25
|
-
table: {
|
|
26
|
-
defaultValue: { summary: undefined },
|
|
27
|
-
type: { summary: "(didTimeoutExpire: boolean) => void" },
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
timeout: {
|
|
31
|
-
description: "Milliseconds to wait before automatically dismissing toast. Providing a value less than or equal to 0 will disable the timeout.",
|
|
32
|
-
control: "number",
|
|
33
|
-
table: {
|
|
34
|
-
defaultValue: { summary: 0 },
|
|
35
|
-
type: { summary: "number" },
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
10
|
message: {
|
|
39
11
|
control: "none",
|
|
40
12
|
},
|
|
@@ -1,22 +1,29 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Pagination as CarbonPagination,
|
|
4
|
+
PaginationProps as CarbonPaginationProps,
|
|
5
|
+
} from "carbon-components-react";
|
|
3
6
|
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
4
7
|
|
|
5
|
-
interface PaginationProps extends CarbonPaginationProps {
|
|
8
|
+
export interface PaginationProps extends CarbonPaginationProps {
|
|
6
9
|
/**
|
|
7
|
-
|
|
10
|
+
* Additional class names.
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Hide dropdown to select how many items will be shown per page.
|
|
8
15
|
*/
|
|
9
16
|
hidePageSizeConfiguration?: boolean;
|
|
10
17
|
/**
|
|
11
|
-
Hide info about the
|
|
18
|
+
* Hide info block about the section of the displayed items.
|
|
12
19
|
*/
|
|
13
20
|
hideInfoText?: boolean;
|
|
14
21
|
/**
|
|
15
|
-
Hide
|
|
22
|
+
* Hide dropdown to select page number directly.
|
|
16
23
|
*/
|
|
17
24
|
hidePageSelect?: boolean;
|
|
18
25
|
/**
|
|
19
|
-
Hide
|
|
26
|
+
* Hide prev/next arrows to navigate through the pages.
|
|
20
27
|
*/
|
|
21
28
|
hideNavigationArrows?: boolean;
|
|
22
29
|
}
|