@elyra/canvas 12.12.3 → 12.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.stylelintrc.json +17 -16
- package/README.md +1 -1
- package/dist/_baseForOwn-7d4e8506.js.map +1 -1
- package/dist/_baseForOwn-d38b560e.js.map +1 -1
- package/dist/canvas-constants-34cdb7df.js.map +1 -1
- package/dist/canvas-constants-3c09c7f6.js.map +1 -1
- package/dist/{canvas-controller-e91d037b.js → canvas-controller-720a509c.js} +2 -2
- package/dist/canvas-controller-720a509c.js.map +1 -0
- package/dist/canvas-controller-73113a1b.js +2 -0
- package/dist/canvas-controller-73113a1b.js.map +1 -0
- package/dist/common-canvas-21b6ab50.js +2 -0
- package/dist/common-canvas-21b6ab50.js.map +1 -0
- package/dist/common-canvas-baef2726.js +2 -0
- package/dist/common-canvas-baef2726.js.map +1 -0
- package/dist/common-canvas.es.js +1 -1
- package/dist/common-canvas.es.js.map +1 -1
- package/dist/common-canvas.js +1 -1
- package/dist/common-canvas.js.map +1 -1
- package/dist/common-properties-86de4c9f.js +2 -0
- package/dist/common-properties-86de4c9f.js.map +1 -0
- package/dist/common-properties-9e579309.js +2 -0
- package/dist/common-properties-9e579309.js.map +1 -0
- package/dist/createClass-32a0cf0f.js.map +1 -1
- package/dist/createClass-6db89a23.js.map +1 -1
- package/dist/datarecord-metadata-v3-schema-6b6384ff.js.map +1 -1
- package/dist/datarecord-metadata-v3-schema-81228a9a.js.map +1 -1
- package/dist/en-7a0f1db1.js.map +1 -1
- package/dist/en-8647c347.js.map +1 -1
- package/dist/{extends-7fdcdc52.js → extends-1139e06f.js} +2 -2
- package/dist/{extends-7fdcdc52.js.map → extends-1139e06f.js.map} +1 -1
- package/dist/extends-8d17c85c.js.map +1 -1
- package/dist/{flexible-table-a13cb7d0.js → flexible-table-d3598aa8.js} +2 -2
- package/dist/flexible-table-d3598aa8.js.map +1 -0
- package/dist/{flexible-table-50ce600a.js → flexible-table-fe7fbc13.js} +2 -2
- package/dist/flexible-table-fe7fbc13.js.map +1 -0
- package/dist/getPrototypeOf-a1c3fe64.js.map +1 -1
- package/dist/getPrototypeOf-bf88242f.js.map +1 -1
- package/dist/{icon-bf77b2aa.js → icon-918d2dd3.js} +2 -2
- package/dist/{icon-bf77b2aa.js.map → icon-918d2dd3.js.map} +1 -1
- package/dist/{index-f2c306ba.js → index-669f95a7.js} +2 -2
- package/dist/{index-f2c306ba.js.map → index-669f95a7.js.map} +1 -1
- package/dist/{index-0e6c8b9c.js → index-6d3404e1.js} +2 -2
- package/dist/{index-0e6c8b9c.js.map → index-6d3404e1.js.map} +1 -1
- package/dist/isArrayLikeObject-a9c7973b.js.map +1 -1
- package/dist/isArrayLikeObject-f3b27f64.js.map +1 -1
- package/dist/lib/canvas-controller.es.js +1 -1
- package/dist/lib/canvas-controller.js +1 -1
- package/dist/lib/canvas.es.js +1 -1
- package/dist/lib/canvas.js +1 -1
- package/dist/lib/context-menu.es.js +1 -1
- package/dist/lib/properties/field-picker.es.js +1 -1
- package/dist/lib/properties/field-picker.js +1 -1
- package/dist/lib/properties/flexible-table.es.js +1 -1
- package/dist/lib/properties/flexible-table.js +1 -1
- package/dist/lib/properties.es.js +1 -1
- package/dist/lib/properties.js +1 -1
- package/dist/lib/tooltip.es.js +1 -1
- package/dist/lib/tooltip.es.js.map +1 -1
- package/dist/lib/tooltip.js +1 -1
- package/dist/lib/tooltip.js.map +1 -1
- package/dist/styles/common-canvas.min.css +1 -1
- package/dist/styles/common-canvas.min.css.map +1 -1
- package/dist/toolbar-29ec7983.js +2 -0
- package/dist/toolbar-29ec7983.js.map +1 -0
- package/dist/toolbar-3f4b173f.js +2 -0
- package/dist/toolbar-3f4b173f.js.map +1 -0
- package/locales/command-actions/locales/de.json +50 -8
- package/locales/command-actions/locales/en.json +1 -1
- package/locales/command-actions/locales/es.json +50 -8
- package/locales/command-actions/locales/fr.json +50 -8
- package/locales/command-actions/locales/index.js +2 -2
- package/locales/command-actions/locales/it.json +50 -8
- package/locales/command-actions/locales/ja.json +50 -8
- package/locales/command-actions/locales/ko.json +42 -0
- package/locales/command-actions/locales/pt-br.json +50 -8
- package/locales/command-actions/locales/zh-CN.json +51 -0
- package/locales/command-actions/locales/zh-TW.json +51 -0
- package/locales/common-canvas/locales/de.json +36 -26
- package/locales/common-canvas/locales/en.json +14 -1
- package/locales/common-canvas/locales/eo.json +14 -1
- package/locales/common-canvas/locales/es.json +36 -26
- package/locales/common-canvas/locales/fr.json +36 -26
- package/locales/common-canvas/locales/index.js +2 -2
- package/locales/common-canvas/locales/it.json +36 -26
- package/locales/common-canvas/locales/ja.json +36 -26
- package/locales/common-canvas/locales/ko.json +7 -2
- package/locales/common-canvas/locales/pt-br.json +36 -26
- package/locales/common-canvas/locales/zh-CN.json +37 -0
- package/locales/common-canvas/locales/zh-TW.json +37 -0
- package/locales/common-properties/locales/de.json +92 -92
- package/locales/common-properties/locales/en.json +1 -1
- package/locales/common-properties/locales/es.json +92 -92
- package/locales/common-properties/locales/fr.json +92 -92
- package/locales/common-properties/locales/index.js +2 -2
- package/locales/common-properties/locales/it.json +92 -92
- package/locales/common-properties/locales/ja.json +92 -92
- package/locales/common-properties/locales/ko.json +1 -1
- package/locales/common-properties/locales/pt-br.json +92 -92
- package/locales/common-properties/locales/zh-CN.json +93 -0
- package/locales/common-properties/locales/zh-TW.json +93 -0
- package/locales/palette/locales/de.json +9 -9
- package/locales/palette/locales/en.json +6 -6
- package/locales/palette/locales/es.json +9 -9
- package/locales/palette/locales/fr.json +9 -9
- package/locales/palette/locales/index.js +2 -2
- package/locales/palette/locales/it.json +9 -9
- package/locales/palette/locales/ja.json +9 -9
- package/locales/palette/locales/pt-br.json +9 -9
- package/locales/palette/locales/zh-CN.json +10 -0
- package/locales/palette/locales/zh-TW.json +10 -0
- package/locales/toolbar/locales/de.json +7 -7
- package/locales/toolbar/locales/en.json +1 -1
- package/locales/toolbar/locales/es.json +7 -7
- package/locales/toolbar/locales/fr.json +7 -7
- package/locales/toolbar/locales/index.js +2 -2
- package/locales/toolbar/locales/it.json +7 -7
- package/locales/toolbar/locales/ja.json +7 -7
- package/locales/toolbar/locales/pt-br.json +7 -7
- package/locales/toolbar/locales/zh-CN.json +8 -0
- package/locales/toolbar/locales/zh-TW.json +8 -0
- package/package.json +3 -2
- package/src/common-canvas/canvas-controller.js +19 -3
- package/src/common-canvas/cc-bottom-panel.jsx +37 -21
- package/src/common-canvas/cc-central-items.jsx +1 -1
- package/src/common-canvas/cc-contents.jsx +10 -3
- package/src/common-canvas/cc-text-toolbar.jsx +141 -0
- package/src/common-canvas/cc-toolbar.jsx +8 -6
- package/src/common-canvas/common-canvas-utils.js +37 -4
- package/src/common-canvas/common-canvas.scss +52 -5
- package/src/common-canvas/svg-canvas-d3.scss +172 -23
- package/src/common-canvas/svg-canvas-pipeline.js +10 -3
- package/src/common-canvas/svg-canvas-renderer.js +93 -341
- package/src/common-canvas/svg-canvas-utils-decs.js +0 -5
- package/src/common-canvas/svg-canvas-utils-markdown.js +515 -0
- package/src/common-canvas/svg-canvas-utils-nodes.js +0 -5
- package/src/common-canvas/svg-canvas-utils-textarea.js +472 -0
- package/src/common-properties/components/control-item/control-item.scss +1 -1
- package/src/common-properties/components/flexible-table/flexible-table.jsx +14 -3
- package/src/common-properties/components/flexible-table/flexible-table.scss +20 -0
- package/src/common-properties/components/title-editor/title-editor.jsx +2 -2
- package/src/common-properties/components/title-editor/title-editor.scss +1 -16
- package/src/common-properties/controls/abstract-table.jsx +2 -0
- package/src/common-properties/controls/checkbox/checkbox.jsx +1 -1
- package/src/common-properties/controls/checkboxset/checkboxset.jsx +36 -11
- package/src/common-properties/controls/checkboxset/checkboxset.scss +6 -0
- package/src/common-properties/controls/list/list.jsx +1 -0
- package/src/common-properties/controls/radioset/radioset.jsx +25 -1
- package/src/common-properties/controls/radioset/radioset.scss +19 -0
- package/src/common-properties/controls/selectcolumns/selectcolumns.jsx +1 -0
- package/src/common-properties/controls/someofselect/someofselect.jsx +1 -0
- package/src/common-properties/form/ControlInfo.js +3 -0
- package/src/common-properties/form/EditorForm.js +45 -3
- package/src/common-properties/panels/action-panel/action-panel.jsx +38 -3
- package/src/common-properties/panels/action-panel/action-panel.scss +3 -0
- package/src/common-properties/panels/text-panel/text-panel.jsx +38 -7
- package/src/common-properties/panels/text-panel/text-panel.scss +4 -3
- package/src/common-properties/properties-controller.js +39 -12
- package/src/common-properties/ui-conditions/conditions-utils.js +14 -8
- package/src/common-properties/util/L10nProvider.js +6 -0
- package/src/object-model/config-utils.js +1 -0
- package/src/object-model/layout-dimensions.js +14 -2
- package/src/object-model/object-model.js +12 -0
- package/src/object-model/redux/canvas-store.js +4 -1
- package/src/object-model/redux/reducers/bottompanel.js +1 -3
- package/src/object-model/redux/reducers/texttoolbar.js +29 -0
- package/src/palette/palette-content-list-item.jsx +12 -2
- package/src/palette/palette-content-list.jsx +11 -19
- package/src/palette/palette-dialog-content-grid.jsx +1 -6
- package/src/palette/palette-dialog-content.jsx +13 -11
- package/src/palette/palette-flyout-content-category.jsx +90 -57
- package/src/palette/palette-flyout-content.jsx +4 -24
- package/src/palette/palette.scss +72 -44
- package/src/toolbar/toolbar-action-item.jsx +9 -6
- package/src/toolbar/toolbar-overflow-item.jsx +1 -0
- package/src/toolbar/toolbar.jsx +12 -15
- package/src/tooltip/tooltip.jsx +14 -5
- package/stats.html +1 -1
- package/dist/canvas-controller-de76a796.js +0 -2
- package/dist/canvas-controller-de76a796.js.map +0 -1
- package/dist/canvas-controller-e91d037b.js.map +0 -1
- package/dist/common-canvas-522f6263.js +0 -2
- package/dist/common-canvas-522f6263.js.map +0 -1
- package/dist/common-canvas-90539c97.js +0 -2
- package/dist/common-canvas-90539c97.js.map +0 -1
- package/dist/common-properties-245c4711.js +0 -2
- package/dist/common-properties-245c4711.js.map +0 -1
- package/dist/common-properties-49e6bb67.js +0 -2
- package/dist/common-properties-49e6bb67.js.map +0 -1
- package/dist/flexible-table-50ce600a.js.map +0 -1
- package/dist/flexible-table-a13cb7d0.js.map +0 -1
- package/dist/toolbar-1c181339.js +0 -2
- package/dist/toolbar-1c181339.js.map +0 -1
- package/dist/toolbar-c6fa3cdb.js +0 -2
- package/dist/toolbar-c6fa3cdb.js.map +0 -1
- package/locales/command-actions/locales/zh-cn.json +0 -9
- package/locales/command-actions/locales/zh-tw.json +0 -9
- package/locales/common-canvas/locales/zh-cn.json +0 -27
- package/locales/common-canvas/locales/zh-tw.json +0 -27
- package/locales/common-properties/locales/zh-cn.json +0 -93
- package/locales/common-properties/locales/zh-tw.json +0 -93
- package/locales/palette/locales/zh-cn.json +0 -10
- package/locales/palette/locales/zh-tw.json +0 -10
- package/locales/toolbar/locales/zh-cn.json +0 -8
- package/locales/toolbar/locales/zh-tw.json +0 -8
package/src/palette/palette.scss
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
$palette-border-width: 1px;
|
|
18
18
|
$palette-border-color: $ui-03;
|
|
19
|
+
$palette-search-container-height: 41px;
|
|
19
20
|
|
|
20
21
|
//--------------------------------------------------------
|
|
21
22
|
// Classes used by Flyout palette
|
|
@@ -53,14 +54,12 @@ $palette-border-color: $ui-03;
|
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
.palette-flyout-content {
|
|
56
|
-
height: 41px;
|
|
57
|
-
|
|
58
57
|
.palette-scroll {
|
|
59
58
|
overflow-y: hidden; /*prevents multiple scroll bars in flyout*/
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
.palette-content-list {
|
|
63
|
-
border-bottom:
|
|
62
|
+
border-bottom: 0;
|
|
64
63
|
}
|
|
65
64
|
|
|
66
65
|
.palette-no-results-title {
|
|
@@ -95,9 +94,11 @@ $palette-border-color: $ui-03;
|
|
|
95
94
|
display: flex;
|
|
96
95
|
flex-direction: column;
|
|
97
96
|
align-items: center;
|
|
97
|
+
padding: 9px 10px;
|
|
98
98
|
/* Prevent elements from being selectable */
|
|
99
99
|
/* This stops it being dragged incorrectly.*/
|
|
100
100
|
user-select: none;
|
|
101
|
+
width: 100%;
|
|
101
102
|
|
|
102
103
|
&:hover {
|
|
103
104
|
background-color: $ui-03;
|
|
@@ -119,13 +120,13 @@ $palette-border-color: $ui-03;
|
|
|
119
120
|
display: flex;
|
|
120
121
|
flex-direction: row;
|
|
121
122
|
width: 100%;
|
|
122
|
-
min-height: 46px;
|
|
123
123
|
align-items: center;
|
|
124
|
+
height: 100%;
|
|
125
|
+
margin-left: 20px;
|
|
124
126
|
}
|
|
125
127
|
|
|
126
128
|
.palette-list-item-icon {
|
|
127
129
|
width: 28px; /* Not specifying height preserves the image's aspect ratio. */
|
|
128
|
-
margin-left: 20px;
|
|
129
130
|
color: $text-02;
|
|
130
131
|
}
|
|
131
132
|
|
|
@@ -134,7 +135,7 @@ $palette-border-color: $ui-03;
|
|
|
134
135
|
font-weight: 400;
|
|
135
136
|
padding: 0 10px;
|
|
136
137
|
width: calc(100% - 68px);
|
|
137
|
-
|
|
138
|
+
line-height: 1;
|
|
138
139
|
& mark {
|
|
139
140
|
color: $interactive-01;
|
|
140
141
|
background-color: $highlight;
|
|
@@ -168,57 +169,88 @@ $palette-border-color: $ui-03;
|
|
|
168
169
|
min-height: 46px;
|
|
169
170
|
height: fit-content;
|
|
170
171
|
padding-bottom: $spacing-05;
|
|
172
|
+
padding-top: 0px;
|
|
173
|
+
padding-left: 0px;
|
|
171
174
|
border-bottom: $palette-border-width solid $palette-border-color;
|
|
172
|
-
|
|
175
|
+
padding-right: 6px;
|
|
173
176
|
.palette-list-item-icon-and-text {
|
|
174
177
|
min-height: 30px;
|
|
178
|
+
padding-left: 10px;
|
|
175
179
|
}
|
|
176
180
|
}
|
|
177
181
|
}
|
|
182
|
+
}
|
|
178
183
|
|
|
184
|
+
.palette-flyout-categories {
|
|
185
|
+
height: calc(100% - $palette-search-container-height);
|
|
186
|
+
width: 100%;
|
|
187
|
+
position: absolute;
|
|
188
|
+
overflow-x: hidden;
|
|
189
|
+
overflow-y: overlay;
|
|
190
|
+
li .bx--accordion__arrow {
|
|
191
|
+
margin-top: 15px;
|
|
192
|
+
}
|
|
193
|
+
.bx--accordion__item--active {
|
|
194
|
+
button {
|
|
195
|
+
border-bottom: $palette-border-width solid $palette-border-color;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
.bx--accordion__item {
|
|
199
|
+
border-top: 0;
|
|
200
|
+
|
|
201
|
+
.bx--accordion__heading {
|
|
202
|
+
padding: 0;
|
|
203
|
+
.bx--accordion__title {
|
|
204
|
+
margin: 0;
|
|
205
|
+
padding: 0 0 0 11px;
|
|
206
|
+
height: 45px;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
li .bx--accordion__content {
|
|
211
|
+
padding: 0;
|
|
212
|
+
}
|
|
179
213
|
}
|
|
180
214
|
|
|
181
215
|
.palette-flyout-category {
|
|
182
216
|
cursor: pointer;
|
|
183
217
|
border-width: 0 0 0 $palette-border-width;
|
|
184
|
-
height:
|
|
185
|
-
min-height: 46px;
|
|
218
|
+
height: 100%;
|
|
186
219
|
align-items: center;
|
|
187
220
|
justify-content: space-between;
|
|
188
221
|
display: flex;
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
.palette-flyout-category-caret {
|
|
193
|
-
height: 16px;
|
|
194
|
-
width: 16px;
|
|
195
|
-
position: relative;
|
|
196
|
-
right: 16px;
|
|
197
|
-
background-color: $ui-01;
|
|
198
|
-
fill: $icon-01;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.palette-flyout-category-caret-closed {
|
|
222
|
+
// Absolute position is needed to get the category tooltip to display correctly.
|
|
223
|
+
position: absolute;
|
|
202
224
|
top: 0;
|
|
203
|
-
|
|
225
|
+
left: 0;
|
|
226
|
+
right: 0;
|
|
227
|
+
bottom: 0;
|
|
204
228
|
}
|
|
205
229
|
|
|
206
230
|
.palette-flyout-category-item {
|
|
207
231
|
display: flex;
|
|
208
232
|
align-items: center;
|
|
233
|
+
min-height: 44px;
|
|
234
|
+
padding-left: 11px;
|
|
209
235
|
/* Prevent elements from being selectable */
|
|
210
236
|
/* This stops it being dragged incorrectly.*/
|
|
211
237
|
user-select: none;
|
|
212
238
|
}
|
|
213
239
|
|
|
214
240
|
.palette-flyout-category-item-loading {
|
|
241
|
+
display: flex;
|
|
215
242
|
margin-left: 16px;
|
|
243
|
+
width: 100%;
|
|
244
|
+
height: 100%;
|
|
245
|
+
justify-content: center;
|
|
246
|
+
max-height: 60px;
|
|
216
247
|
}
|
|
217
248
|
|
|
218
249
|
.palette-flyout-category-item-icon {
|
|
219
250
|
width: 20px; /* Not specifying height preserves the image's aspect ratio. */
|
|
220
|
-
margin-left:
|
|
251
|
+
margin-left: 5px;
|
|
221
252
|
fill: $icon-01;
|
|
253
|
+
padding-top: 4px;
|
|
222
254
|
}
|
|
223
255
|
|
|
224
256
|
.palette-flyout-text-container {
|
|
@@ -232,14 +264,16 @@ $palette-border-color: $ui-03;
|
|
|
232
264
|
.palette-flyout-category-text {
|
|
233
265
|
width: 165px;
|
|
234
266
|
overflow-wrap: break-word;
|
|
235
|
-
line-height: 1.
|
|
236
|
-
|
|
267
|
+
line-height: 1.2;
|
|
268
|
+
padding-left: 16px;
|
|
269
|
+
align-items: center;
|
|
270
|
+
height: 100%;
|
|
271
|
+
max-height: 59px;
|
|
237
272
|
}
|
|
238
273
|
|
|
239
274
|
.palette-flyout-category-text-abbr {
|
|
240
275
|
line-height: 46px; /* Must be same as containing div height */
|
|
241
|
-
margin-left:
|
|
242
|
-
width: 35px;
|
|
276
|
+
margin-left: 0;
|
|
243
277
|
}
|
|
244
278
|
|
|
245
279
|
.palette-flyout-category-text-no-image {
|
|
@@ -253,16 +287,11 @@ $palette-border-color: $ui-03;
|
|
|
253
287
|
padding-left: 5px;
|
|
254
288
|
}
|
|
255
289
|
|
|
256
|
-
.palette-flyout-category:hover {
|
|
257
|
-
font-weight: 600;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
290
|
.palette-flyout-search-container {
|
|
261
|
-
height:
|
|
291
|
+
height: $palette-search-container-height;
|
|
262
292
|
.palette-flyout-search {
|
|
263
293
|
height: 100%;
|
|
264
294
|
overflow: hidden;
|
|
265
|
-
|
|
266
295
|
// Move the magnifying glass icon to be positioned over the category icons
|
|
267
296
|
// in the palette, as required from DUX review.
|
|
268
297
|
.bx--search-magnifier svg {
|
|
@@ -300,12 +329,8 @@ $palette-border-color: $ui-03;
|
|
|
300
329
|
}
|
|
301
330
|
}
|
|
302
331
|
|
|
303
|
-
.palette-
|
|
304
|
-
|
|
305
|
-
width: 100%;
|
|
306
|
-
position: absolute;
|
|
307
|
-
overflow-x: hidden;
|
|
308
|
-
overflow-y: overlay;
|
|
332
|
+
.palette-loading-category .bx--accordion__arrow {
|
|
333
|
+
display: none;
|
|
309
334
|
}
|
|
310
335
|
|
|
311
336
|
//--------------------------------------------------------
|
|
@@ -326,7 +351,7 @@ $palette-border-color: $ui-03;
|
|
|
326
351
|
/* Prevent elements from being selectable */
|
|
327
352
|
/* This stops it being dragged incorrectly.*/
|
|
328
353
|
user-select: none;
|
|
329
|
-
|
|
354
|
+
display: block;
|
|
330
355
|
|
|
331
356
|
.palette-list-item {
|
|
332
357
|
height: 46px;
|
|
@@ -339,6 +364,7 @@ $palette-border-color: $ui-03;
|
|
|
339
364
|
/* Prevent elements from being selectable */
|
|
340
365
|
/* This stops it being dragged incorrectly.*/
|
|
341
366
|
user-select: none;
|
|
367
|
+
padding-left: 19px;
|
|
342
368
|
|
|
343
369
|
&:hover {
|
|
344
370
|
background-color: $ui-03;
|
|
@@ -354,13 +380,15 @@ $palette-border-color: $ui-03;
|
|
|
354
380
|
|
|
355
381
|
.palette-list-item-icon {
|
|
356
382
|
width: 28px; /* Not specifying height preserves the image's aspect ratio. */
|
|
357
|
-
margin-left: 20px;
|
|
358
383
|
line-height: 46px; /* Must be same as containing div height */
|
|
359
384
|
color: $text-02;
|
|
385
|
+
margin-left: 0;
|
|
386
|
+
margin-right: 10px;
|
|
360
387
|
}
|
|
361
388
|
|
|
362
389
|
.palette-list-item-text-div {
|
|
363
|
-
|
|
390
|
+
width: 100%;
|
|
391
|
+
display: block;
|
|
364
392
|
}
|
|
365
393
|
|
|
366
394
|
.palette-list-item-text-span {
|
|
@@ -515,7 +543,7 @@ $palette-border-color: $ui-03;
|
|
|
515
543
|
}
|
|
516
544
|
|
|
517
545
|
//--------------------------------------------------------
|
|
518
|
-
// Common
|
|
546
|
+
// Common classes used by Flyout and Dialog palette
|
|
519
547
|
//--------------------------------------------------------
|
|
520
548
|
.palette-scroll {
|
|
521
549
|
overflow-y: auto;
|
|
@@ -138,8 +138,8 @@ class ToolbarActionItem extends React.Component {
|
|
|
138
138
|
return null;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
actionClickHandler() {
|
|
142
|
-
this.props.toolbarActionHandler(this.props.actionObj.action);
|
|
141
|
+
actionClickHandler(evt) {
|
|
142
|
+
this.props.toolbarActionHandler(this.props.actionObj.action, evt);
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
generateButton(actionObj) {
|
|
@@ -199,12 +199,13 @@ class ToolbarActionItem extends React.Component {
|
|
|
199
199
|
wrapInTooltip(content) {
|
|
200
200
|
if (!this.props.overflow && (this.showLabelAsTip(this.props.actionObj) || this.props.actionObj.tooltip)) {
|
|
201
201
|
const actionName = this.generateActionName();
|
|
202
|
-
const
|
|
202
|
+
const tip = this.props.actionObj.tooltip ? this.props.actionObj.tooltip : this.props.actionObj.label;
|
|
203
203
|
const tooltipId = actionName + "-" + this.props.instanceId + "-tooltip";
|
|
204
|
-
const enableTooltip = this.props.actionObj.enable
|
|
204
|
+
const enableTooltip = this.props.actionObj.enable || this.props.actionObj.jsx; // JSX 'tools' don't have enable attr so always display a tooltip for them.
|
|
205
|
+
const direction = this.props.tooltipDirection ? this.props.tooltipDirection : "bottom";
|
|
205
206
|
|
|
206
207
|
return (
|
|
207
|
-
<Tooltip id={tooltipId} tip={
|
|
208
|
+
<Tooltip id={tooltipId} tip={tip} disable={!enableTooltip} className="icon-tooltip" direction={direction}>
|
|
208
209
|
{content}
|
|
209
210
|
</Tooltip>
|
|
210
211
|
);
|
|
@@ -282,9 +283,11 @@ ToolbarActionItem.propTypes = {
|
|
|
282
283
|
jsx: PropTypes.object,
|
|
283
284
|
tooltip: PropTypes.oneOfType([
|
|
284
285
|
PropTypes.string,
|
|
285
|
-
PropTypes.object
|
|
286
|
+
PropTypes.object,
|
|
287
|
+
PropTypes.func
|
|
286
288
|
])
|
|
287
289
|
}),
|
|
290
|
+
tooltipDirection: PropTypes.oneOf(["top", "bottom"]),
|
|
288
291
|
toolbarActionHandler: PropTypes.func.isRequired,
|
|
289
292
|
instanceId: PropTypes.number.isRequired,
|
|
290
293
|
overflow: PropTypes.bool,
|
|
@@ -49,6 +49,7 @@ class ToolbarOverflowItem extends React.Component {
|
|
|
49
49
|
<div className={className} >
|
|
50
50
|
<div className={"toolbar-overflow-item"}>
|
|
51
51
|
<Button kind="ghost"
|
|
52
|
+
tabIndex={-1}
|
|
52
53
|
onClick={this.toggleExtendedMenu}
|
|
53
54
|
onFocus={this.props.onFocus}
|
|
54
55
|
aria-label={this.props.label}
|
package/src/toolbar/toolbar.jsx
CHANGED
|
@@ -15,9 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import React from "react";
|
|
18
|
-
import { injectIntl } from "react-intl";
|
|
19
18
|
import PropTypes from "prop-types";
|
|
20
|
-
import defaultMessages from "../../locales/toolbar/locales/en.json";
|
|
21
19
|
import ReactResizeDetector from "react-resize-detector";
|
|
22
20
|
|
|
23
21
|
import ToolbarActionItem from "./toolbar-action-item.jsx";
|
|
@@ -205,6 +203,7 @@ class Toolbar extends React.Component {
|
|
|
205
203
|
<ToolbarActionItem
|
|
206
204
|
key={"toolbar-item-key-" + i}
|
|
207
205
|
actionObj={actionObj}
|
|
206
|
+
tooltipDirection={this.props.tooltipDirection}
|
|
208
207
|
toolbarActionHandler={this.props.toolbarActionHandler}
|
|
209
208
|
overflow={overflow}
|
|
210
209
|
instanceId={this.props.instanceId}
|
|
@@ -282,29 +281,27 @@ class Toolbar extends React.Component {
|
|
|
282
281
|
const rightItems = this.generateToolbarItems(this.rightBar, false, false);
|
|
283
282
|
|
|
284
283
|
const canvasToolbar = (
|
|
285
|
-
<
|
|
286
|
-
<
|
|
287
|
-
<div className="toolbar-
|
|
288
|
-
|
|
289
|
-
{leftItems}
|
|
290
|
-
</div>
|
|
291
|
-
<div className="toolbar-right-bar">
|
|
292
|
-
{rightItems}
|
|
293
|
-
</div>
|
|
284
|
+
<ReactResizeDetector handleWidth onResize={this.onToolbarResize}>
|
|
285
|
+
<div className="toolbar-div" instanceid={this.props.instanceId}>
|
|
286
|
+
<div className="toolbar-left-bar" onScroll={this.onScroll}>
|
|
287
|
+
{leftItems}
|
|
294
288
|
</div>
|
|
295
|
-
|
|
296
|
-
|
|
289
|
+
<div className="toolbar-right-bar">
|
|
290
|
+
{rightItems}
|
|
291
|
+
</div>
|
|
292
|
+
</div>
|
|
293
|
+
</ReactResizeDetector>
|
|
297
294
|
);
|
|
298
295
|
return canvasToolbar;
|
|
299
296
|
}
|
|
300
297
|
}
|
|
301
298
|
|
|
302
299
|
Toolbar.propTypes = {
|
|
303
|
-
intl: PropTypes.object.isRequired,
|
|
304
300
|
config: PropTypes.object.isRequired,
|
|
305
301
|
instanceId: PropTypes.number,
|
|
306
302
|
toolbarActionHandler: PropTypes.func,
|
|
303
|
+
tooltipDirection: PropTypes.string,
|
|
307
304
|
additionalText: PropTypes.object
|
|
308
305
|
};
|
|
309
306
|
|
|
310
|
-
export default
|
|
307
|
+
export default Toolbar;
|
package/src/tooltip/tooltip.jsx
CHANGED
|
@@ -177,7 +177,7 @@ class ToolTip extends React.Component {
|
|
|
177
177
|
}
|
|
178
178
|
} else if (tooltipDirection === "left") {
|
|
179
179
|
// For long tooltips, tooltip.offsetWidth is updated after setting tooltip.style.left. Ensure tooltip doesn't overlap tooltipTrigger element.
|
|
180
|
-
while ((tooltip.offsetLeft + tooltip.offsetWidth + pointerLayout.width) > triggerLayout.left) {
|
|
180
|
+
while ((tooltip.offsetLeft + tooltip.offsetWidth + pointerLayout.width) > Math.round(triggerLayout.left)) {
|
|
181
181
|
tooltip.style.left = this.getStyleValue(triggerLayout.left - tooltip.offsetWidth - pointerLayout.width);
|
|
182
182
|
}
|
|
183
183
|
} else if (tooltipDirection === "right") {
|
|
@@ -378,6 +378,8 @@ class ToolTip extends React.Component {
|
|
|
378
378
|
{this.props.tip}
|
|
379
379
|
</div>
|
|
380
380
|
);
|
|
381
|
+
} else if ((typeof this.props.tip) === "function") {
|
|
382
|
+
tooltipContent = this.props.tip();
|
|
381
383
|
}
|
|
382
384
|
|
|
383
385
|
let tipClass = "common-canvas-tooltip";
|
|
@@ -400,9 +402,9 @@ class ToolTip extends React.Component {
|
|
|
400
402
|
}
|
|
401
403
|
}
|
|
402
404
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
405
|
+
let tooltip = null;
|
|
406
|
+
if (tooltipContent || link) {
|
|
407
|
+
tooltip = (
|
|
406
408
|
<Portal>
|
|
407
409
|
<div data-id={this.props.id} className={tipClass} aria-hidden={!this.state.isTooltipVisible} direction={this.props.direction}>
|
|
408
410
|
<svg id="tipArrow" x="0px" y="0px" viewBox="0 0 9.1 16.1">
|
|
@@ -413,13 +415,20 @@ class ToolTip extends React.Component {
|
|
|
413
415
|
{link}
|
|
414
416
|
</div>
|
|
415
417
|
</Portal>
|
|
418
|
+
);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
return (
|
|
422
|
+
<div className="tooltip-container">
|
|
423
|
+
{triggerContent}
|
|
424
|
+
{tooltip}
|
|
416
425
|
</div>
|
|
417
426
|
);
|
|
418
427
|
}
|
|
419
428
|
}
|
|
420
429
|
|
|
421
430
|
ToolTip.propTypes = {
|
|
422
|
-
tip: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,
|
|
431
|
+
tip: PropTypes.oneOfType([PropTypes.string, PropTypes.element, PropTypes.func]).isRequired,
|
|
423
432
|
link: PropTypes.object,
|
|
424
433
|
tooltipLinkHandler: PropTypes.func,
|
|
425
434
|
direction: PropTypes.oneOf(["left", "right", "top", "bottom"]),
|