@elyra/canvas 12.44.0 → 13.0.0-alpha.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/build.sh +2 -2
- package/dist/bucket-2-b54707f5.js +2 -0
- package/dist/bucket-2-b54707f5.js.map +1 -0
- package/dist/bucket-2-ead0e85a.js +2 -0
- package/dist/bucket-2-ead0e85a.js.map +1 -0
- package/dist/bucket-8-cc1980eb.js +8 -0
- package/dist/bucket-8-cc1980eb.js.map +1 -0
- package/dist/bucket-8-de8062b8.js +7 -0
- package/dist/bucket-8-de8062b8.js.map +1 -0
- package/dist/common-canvas-2ec9a216.js +2 -0
- package/dist/common-canvas-2ec9a216.js.map +1 -0
- package/dist/common-canvas-b1ee91b9.js +2 -0
- package/dist/common-canvas-b1ee91b9.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-bdb253ac.js +2 -0
- package/dist/common-properties-bdb253ac.js.map +1 -0
- package/dist/common-properties-bf161ba9.js +2 -0
- package/dist/common-properties-bf161ba9.js.map +1 -0
- package/dist/context-menu-wrapper-0eab6957.js +2 -0
- package/dist/context-menu-wrapper-0eab6957.js.map +1 -0
- package/dist/context-menu-wrapper-3d3215a1.js +2 -0
- package/dist/context-menu-wrapper-3d3215a1.js.map +1 -0
- package/dist/flexible-table-9c20861b.js +2 -0
- package/dist/flexible-table-9c20861b.js.map +1 -0
- package/dist/flexible-table-e7485a71.js +2 -0
- package/dist/flexible-table-e7485a71.js.map +1 -0
- package/dist/icon-0c141070.js +2 -0
- package/dist/icon-0c141070.js.map +1 -0
- package/dist/icon-594ca22f.js +2 -0
- package/dist/icon-594ca22f.js.map +1 -0
- package/dist/iconPropTypes-4cbeb95d-2c6ff14c.js +2 -0
- package/dist/iconPropTypes-4cbeb95d-2c6ff14c.js.map +1 -0
- package/dist/iconPropTypes-4cbeb95d-a0eae58e.js +2 -0
- package/dist/iconPropTypes-4cbeb95d-a0eae58e.js.map +1 -0
- package/dist/index-663171c6.js +2 -0
- package/dist/index-663171c6.js.map +1 -0
- package/dist/index-cbac5c62.js +2 -0
- package/dist/index-cbac5c62.js.map +1 -0
- 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/context-menu.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-61e2a68d.js +2 -0
- package/dist/toolbar-61e2a68d.js.map +1 -0
- package/dist/toolbar-a8104255.js +2 -0
- package/dist/toolbar-a8104255.js.map +1 -0
- package/locales/common-properties/locales/en.json +4 -1
- package/locales/common-properties/locales/eo.json +4 -1
- package/package.json +16 -23
- package/src/carbon.scss +22 -0
- package/src/color-picker/color-picker.scss +1 -3
- package/src/common-canvas/cc-contents.jsx +4 -4
- package/src/common-canvas/cc-state-tag.jsx +3 -3
- package/src/common-canvas/cc-text-toolbar.jsx +11 -11
- package/src/common-canvas/common-canvas.scss +26 -27
- package/src/common-canvas/svg-canvas-d3.scss +64 -64
- package/src/common-canvas/svg-canvas-utils-external.js +12 -6
- package/src/common-canvas/svg-canvas-utils-textarea.js +1 -1
- package/src/common-properties/actions/button/button.jsx +2 -2
- package/src/common-properties/actions/button/button.scss +0 -3
- package/src/common-properties/actions/image/image.scss +0 -3
- package/src/common-properties/components/control-item/control-item.scss +8 -8
- package/src/common-properties/components/editor-form/editor-form.jsx +22 -13
- package/src/common-properties/components/editor-form/editor-form.scss +16 -22
- package/src/common-properties/components/empty-table/empty-table.jsx +4 -4
- package/src/common-properties/components/empty-table/empty-table.scss +1 -1
- package/src/common-properties/components/field-picker/field-picker.jsx +4 -3
- package/src/common-properties/components/field-picker/field-picker.scss +3 -3
- package/src/common-properties/components/flexible-table/flexible-table.jsx +11 -10
- package/src/common-properties/components/flexible-table/flexible-table.scss +9 -8
- package/src/common-properties/components/moveable-table-rows/moveable-table-rows.jsx +10 -2
- package/src/common-properties/components/moveable-table-rows/moveable-table-rows.scss +4 -8
- package/src/common-properties/components/properties-buttons/properties-buttons.jsx +6 -7
- package/src/common-properties/components/properties-buttons/properties-buttons.scss +8 -7
- package/src/common-properties/components/properties-modal/properties-modal.jsx +1 -1
- package/src/common-properties/components/properties-modal/properties-modal.scss +4 -4
- package/src/common-properties/components/title-editor/title-editor.jsx +9 -9
- package/src/common-properties/components/title-editor/title-editor.scss +9 -9
- package/src/common-properties/components/truncated-content-tooltip/truncated-content-tooltip.jsx +1 -1
- package/src/common-properties/components/validation-message/validation-message.scss +7 -7
- package/src/common-properties/components/virtualized-table/virtualized-table.jsx +9 -9
- package/src/common-properties/components/virtualized-table/virtualized-table.scss +23 -25
- package/src/common-properties/components/wide-flyout/wide-flyout.scss +5 -5
- package/src/common-properties/constants/constants.js +5 -3
- package/src/common-properties/controls/abstract-table.jsx +9 -9
- package/src/common-properties/controls/abstract-table.scss +4 -4
- package/src/common-properties/controls/checkbox/checkbox.jsx +15 -15
- package/src/common-properties/controls/checkbox/checkbox.scss +3 -5
- package/src/common-properties/controls/checkboxset/checkboxset.jsx +4 -4
- package/src/common-properties/controls/checkboxset/checkboxset.scss +3 -2
- package/src/common-properties/controls/datefield/datefield.jsx +14 -13
- package/src/common-properties/controls/datepicker/datepicker.jsx +23 -22
- package/src/common-properties/controls/datepicker/datepicker.scss +1 -10
- package/src/common-properties/controls/datepicker-range/datepicker-range.jsx +35 -34
- package/src/common-properties/controls/datepicker-range/datepicker-range.scss +1 -1
- package/src/common-properties/controls/dropdown/dropdown.jsx +49 -40
- package/src/common-properties/controls/dropdown/dropdown.scss +9 -14
- package/src/common-properties/controls/expression/expression-builder/expression-builder.scss +3 -3
- package/src/common-properties/controls/expression/expression-builder/expression-select-field-function.jsx +5 -5
- package/src/common-properties/controls/expression/expression-builder/expression-select-operator.jsx +2 -2
- package/src/common-properties/controls/expression/expression-toggle/expression-toggle.jsx +8 -7
- package/src/common-properties/controls/expression/expression-toggle/expression-toggle.scss +1 -1
- package/src/common-properties/controls/expression/expression.jsx +4 -3
- package/src/common-properties/controls/expression/expression.scss +16 -17
- package/src/common-properties/controls/multiselect/multiselect.jsx +32 -26
- package/src/common-properties/controls/multiselect/multiselect.scss +1 -1
- package/src/common-properties/controls/numberfield/numberfield.jsx +24 -22
- package/src/common-properties/controls/numberfield/numberfield.scss +7 -14
- package/src/common-properties/controls/passwordfield/passwordfield.jsx +17 -16
- package/src/common-properties/controls/radioset/radioset.jsx +3 -3
- package/src/common-properties/controls/radioset/radioset.scss +2 -2
- package/src/common-properties/controls/slider/slider.jsx +21 -17
- package/src/common-properties/controls/slider/slider.scss +10 -6
- package/src/common-properties/controls/someofselect/someofselect.scss +3 -3
- package/src/common-properties/controls/textarea/textarea.jsx +26 -22
- package/src/common-properties/controls/textarea/textarea.scss +0 -5
- package/src/common-properties/controls/textfield/textfield.jsx +17 -14
- package/src/common-properties/controls/textfield/textfield.scss +3 -7
- package/src/common-properties/controls/timefield/timefield.jsx +14 -13
- package/src/common-properties/controls/toggle/toggle.jsx +11 -2
- package/src/common-properties/controls/toggle/toggle.scss +2 -4
- package/src/common-properties/controls/toggletext/toggletext.jsx +4 -4
- package/src/common-properties/controls/toggletext/toggletext.scss +11 -4
- package/src/common-properties/index.scss +2 -2
- package/src/common-properties/panels/control/control.scss +2 -2
- package/src/common-properties/panels/sub-panel/button.jsx +2 -2
- package/src/common-properties/panels/sub-panel/cell.jsx +3 -4
- package/src/common-properties/panels/sub-panel/sub-panel.scss +2 -2
- package/src/common-properties/panels/subtabs/subtabs.jsx +22 -13
- package/src/common-properties/panels/subtabs/subtabs.scss +28 -27
- package/src/common-properties/panels/summary/summary.jsx +4 -4
- package/src/common-properties/panels/summary/summary.scss +5 -5
- package/src/common-properties/panels/tearsheet/tearsheet.jsx +1 -1
- package/src/common-properties/panels/tearsheet/tearsheet.scss +17 -17
- package/src/common-properties/panels/text-panel/text-panel.scss +4 -4
- package/src/common-properties/panels/twisty/twisty.jsx +1 -1
- package/src/common-properties/panels/twisty/twisty.scss +5 -2
- package/src/common-properties/properties-main/properties-main.jsx +1 -1
- package/src/common-properties/properties-main/properties-main.scss +8 -8
- package/src/context-menu/common-context-menu.jsx +2 -2
- package/src/context-menu/context-menu.scss +5 -6
- package/src/icons/icon.jsx +33 -33
- package/src/icons/icon.scss +10 -10
- package/src/index.scss +2 -4
- package/src/notification-panel/notification-panel.jsx +5 -5
- package/src/notification-panel/notification-panel.scss +31 -31
- package/src/palette/palette-dialog-topbar.jsx +4 -4
- package/src/palette/palette-flyout-content-category.jsx +3 -3
- package/src/palette/palette-flyout-content-search.jsx +2 -2
- package/src/palette/palette-flyout-content.jsx +1 -1
- package/src/palette/palette.scss +45 -43
- package/src/themes/light.scss +7 -3
- package/src/toolbar/toolbar-action-item.jsx +1 -1
- package/src/toolbar/toolbar-button-item.jsx +31 -31
- package/src/toolbar/toolbar-overflow-item.jsx +3 -3
- package/src/toolbar/toolbar-sub-menu-item.jsx +4 -1
- package/src/toolbar/toolbar.scss +41 -39
- package/src/tooltip/tooltip.jsx +1 -1
- package/src/tooltip/tooltip.scss +15 -15
- package/stats.html +1 -1
- package/dist/_baseIteratee-148093b7.js +0 -7
- package/dist/_baseIteratee-148093b7.js.map +0 -1
- package/dist/_baseIteratee-2b75d27c.js +0 -8
- package/dist/_baseIteratee-2b75d27c.js.map +0 -1
- package/dist/common-canvas-6ed21ab6.js +0 -2
- package/dist/common-canvas-6ed21ab6.js.map +0 -1
- package/dist/common-canvas-8abf016c.js +0 -2
- package/dist/common-canvas-8abf016c.js.map +0 -1
- package/dist/common-properties-88377242.js +0 -2
- package/dist/common-properties-88377242.js.map +0 -1
- package/dist/common-properties-b295acc8.js +0 -2
- package/dist/common-properties-b295acc8.js.map +0 -1
- package/dist/context-menu-wrapper-949393c7.js +0 -2
- package/dist/context-menu-wrapper-949393c7.js.map +0 -1
- package/dist/context-menu-wrapper-f62dfcdb.js +0 -2
- package/dist/context-menu-wrapper-f62dfcdb.js.map +0 -1
- package/dist/flexible-table-c6a8b402.js +0 -2
- package/dist/flexible-table-c6a8b402.js.map +0 -1
- package/dist/flexible-table-f7b294a0.js +0 -2
- package/dist/flexible-table-f7b294a0.js.map +0 -1
- package/dist/icon-56b27c4f.js +0 -2
- package/dist/icon-56b27c4f.js.map +0 -1
- package/dist/icon-8ec2f0ec.js +0 -2
- package/dist/icon-8ec2f0ec.js.map +0 -1
- package/dist/index-01cbacf9.js +0 -2
- package/dist/index-01cbacf9.js.map +0 -1
- package/dist/index-79543d41.js +0 -2
- package/dist/index-79543d41.js.map +0 -1
- package/dist/toolbar-235dfb9d.js +0 -2
- package/dist/toolbar-235dfb9d.js.map +0 -1
- package/dist/toolbar-6607e35c.js +0 -2
- package/dist/toolbar-6607e35c.js.map +0 -1
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import React from "react";
|
|
18
18
|
import PropTypes from "prop-types";
|
|
19
19
|
import { connect } from "react-redux";
|
|
20
|
-
import { SelectItem, Select, Dropdown, ComboBox } from "carbon
|
|
20
|
+
import { SelectItem, Select, Dropdown, ComboBox, Layer } from "@carbon/react";
|
|
21
21
|
import { isEqual, isEmpty } from "lodash";
|
|
22
22
|
import * as ControlUtils from "./../../util/control-utils";
|
|
23
23
|
import ValidationMessage from "./../../components/validation-message";
|
|
@@ -219,47 +219,56 @@ class DropDown extends React.Component {
|
|
|
219
219
|
for (const option of dropDown.options) {
|
|
220
220
|
options.push(<SelectItem text={option.label} key={this.id + "-" + option.value} value={option.value} />);
|
|
221
221
|
}
|
|
222
|
-
dropdownComponent = (
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
222
|
+
dropdownComponent = (
|
|
223
|
+
<Layer level={this.props.controller.getLight() && this.props.control.light ? 1 : 0}>
|
|
224
|
+
<Select
|
|
225
|
+
id={this.id}
|
|
226
|
+
hideLabel
|
|
227
|
+
inline
|
|
228
|
+
labelText={this.props.control.label ? this.props.control.label.text : ""}
|
|
229
|
+
disabled={this.props.state === STATES.DISABLED || this.disableEmptyListDropdown}
|
|
230
|
+
onChange={this.handleChange}
|
|
231
|
+
value={selection}
|
|
232
|
+
>
|
|
233
|
+
{ options }
|
|
234
|
+
</Select>
|
|
235
|
+
</Layer>
|
|
236
|
+
);
|
|
234
237
|
} else if (this.props.control.customValueAllowed) { // combobox dropdown not allowed in tables
|
|
235
|
-
dropdownComponent = (
|
|
236
|
-
{
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
238
|
+
dropdownComponent = (
|
|
239
|
+
<Layer level={this.props.controller.getLight() && this.props.control.light ? 1 : 0}>
|
|
240
|
+
<ComboBox
|
|
241
|
+
{...validationProps}
|
|
242
|
+
aria-label={this.props.control.label ? this.props.control.label.text : ""}
|
|
243
|
+
id={`${ControlUtils.getDataId(this.props.propertyId)}-dropdown`}
|
|
244
|
+
disabled={this.props.state === STATES.DISABLED || this.disableEmptyListDropdown}
|
|
245
|
+
placeholder={dropDown.selectedOption.label}
|
|
246
|
+
selectedItem={dropDown.selectedOption.label}
|
|
247
|
+
items={dropDown.options}
|
|
248
|
+
onChange={this.handleComboOnChange}
|
|
249
|
+
onInputChange={this.handleOnInputChange}
|
|
250
|
+
translateWithId={(id) => listBoxMenuIconTranslationIds[id]}
|
|
251
|
+
titleText={this.props.controlItem}
|
|
252
|
+
/>
|
|
253
|
+
</Layer>
|
|
254
|
+
);
|
|
249
255
|
} else {
|
|
250
|
-
dropdownComponent = (
|
|
251
|
-
{
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
256
|
+
dropdownComponent = (
|
|
257
|
+
<Layer level={this.props.controller.getLight() && this.props.control.light ? 1 : 0}>
|
|
258
|
+
<Dropdown
|
|
259
|
+
{...validationProps}
|
|
260
|
+
id={`${ControlUtils.getDataId(this.props.propertyId)}-dropdown`}
|
|
261
|
+
disabled={this.props.state === STATES.DISABLED || this.disableEmptyListDropdown}
|
|
262
|
+
type="default"
|
|
263
|
+
items={dropDown.options}
|
|
264
|
+
onChange={this.handleChange}
|
|
265
|
+
selectedItem={dropDown.selectedOption}
|
|
266
|
+
label={this.emptyLabel}
|
|
267
|
+
translateWithId={(id) => listBoxMenuIconTranslationIds[id]}
|
|
268
|
+
titleText={this.props.controlItem}
|
|
269
|
+
/>
|
|
270
|
+
</Layer>
|
|
271
|
+
);
|
|
263
272
|
}
|
|
264
273
|
|
|
265
274
|
return (
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
.properties-dropdown {
|
|
18
|
-
.
|
|
18
|
+
.cds--list-box--expanded .cds--list-box__menu {
|
|
19
19
|
margin-bottom: 1px; // Show dropdown menu border above Save/Cancel buttons
|
|
20
20
|
}
|
|
21
21
|
&.hide {
|
|
@@ -25,37 +25,32 @@
|
|
|
25
25
|
}
|
|
26
26
|
.properties-table-cell-control {
|
|
27
27
|
>.properties-dropdown {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
width: 100%;
|
|
31
|
-
.bx--select-input--inline__wrapper {
|
|
28
|
+
.cds--select.cds--select--inline {
|
|
29
|
+
.cds--select-input--inline__wrapper {
|
|
32
30
|
width: 100%;
|
|
33
31
|
}
|
|
34
32
|
svg {
|
|
35
33
|
right: 0;
|
|
36
34
|
}
|
|
37
35
|
}
|
|
38
|
-
.
|
|
36
|
+
.cds--select-input {
|
|
39
37
|
width: inherit; // Override carbon default width: auto
|
|
40
38
|
background-color: transparent; // Override carbon default background-color: #f4f4f4;
|
|
41
39
|
padding: 0 1.25rem 0 0;
|
|
42
|
-
box-shadow: 0 2px 0 0 $
|
|
43
|
-
&:hover {
|
|
44
|
-
background: unset;
|
|
45
|
-
}
|
|
40
|
+
box-shadow: 0 2px 0 0 $button-primary;
|
|
46
41
|
&:focus {
|
|
47
42
|
outline: unset;
|
|
48
43
|
}
|
|
49
44
|
|
|
50
45
|
}
|
|
51
46
|
&.error {
|
|
52
|
-
.
|
|
53
|
-
box-shadow: 0 2px 0 0 $support-
|
|
47
|
+
.cds--select-input {
|
|
48
|
+
box-shadow: 0 2px 0 0 $support-error;
|
|
54
49
|
}
|
|
55
50
|
}
|
|
56
51
|
&.warning {
|
|
57
|
-
.
|
|
58
|
-
box-shadow: 0 2px 0 0 $support-
|
|
52
|
+
.cds--select-input {
|
|
53
|
+
box-shadow: 0 2px 0 0 $support-warning;
|
|
59
54
|
}
|
|
60
55
|
}
|
|
61
56
|
}
|
package/src/common-properties/controls/expression/expression-builder/expression-builder.scss
CHANGED
|
@@ -105,7 +105,7 @@ $operator-margin: 50%;
|
|
|
105
105
|
width: $operator-width;
|
|
106
106
|
padding: 0;
|
|
107
107
|
.properties-operator-button-label {
|
|
108
|
-
margin:
|
|
108
|
+
margin: auto;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
}
|
|
@@ -123,10 +123,10 @@ $operator-margin: 50%;
|
|
|
123
123
|
padding-bottom: $spacing-06;
|
|
124
124
|
}
|
|
125
125
|
.properties-expression-table-dropdown-header {
|
|
126
|
-
@include
|
|
126
|
+
@include type-style("label-01");
|
|
127
127
|
padding-bottom: $spacing-02;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
.properties-primaryTabs .
|
|
130
|
+
.properties-primaryTabs .cds--tabs-trigger {
|
|
131
131
|
margin-bottom: 5px;
|
|
132
132
|
}
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
import React from "react";
|
|
18
18
|
import PropTypes from "prop-types";
|
|
19
|
-
import {
|
|
20
|
-
import { Button } from "carbon
|
|
21
|
-
import { Switch, ContentSwitcher, Dropdown } from "carbon
|
|
19
|
+
import { Add } from "@carbon/react/icons";
|
|
20
|
+
import { Button } from "@carbon/react";
|
|
21
|
+
import { Switch, ContentSwitcher, Dropdown } from "@carbon/react";
|
|
22
22
|
import FlexibleTable from "./../../../components/flexible-table/flexible-table";
|
|
23
23
|
import TruncatedContentTooltip from "./../../../components/truncated-content-tooltip";
|
|
24
24
|
import { MESSAGE_KEYS, EXPRESSION_TABLE_ROWS, SORT_DIRECTION, ROW_SELECTION } from "./../../../constants/constants";
|
|
@@ -276,9 +276,9 @@ export default class ExpressionSelectFieldOrFunction extends React.Component {
|
|
|
276
276
|
className="expression-add-field-button properties-expr-table-cell"
|
|
277
277
|
onClick={this.handleAddButtonClick.bind(this, index, tableType)}
|
|
278
278
|
kind="ghost"
|
|
279
|
-
size="
|
|
279
|
+
size="sm"
|
|
280
280
|
>
|
|
281
|
-
<
|
|
281
|
+
<Add aria-label={formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_ADD_COLUMN)} />
|
|
282
282
|
</Button>
|
|
283
283
|
);
|
|
284
284
|
return addValueButtonContent;
|
package/src/common-properties/controls/expression/expression-builder/expression-select-operator.jsx
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import React from "react";
|
|
18
18
|
import PropTypes from "prop-types";
|
|
19
|
-
import { Button } from "carbon
|
|
19
|
+
import { Button } from "@carbon/react";
|
|
20
20
|
|
|
21
21
|
import Tooltip from "./../../../../tooltip/tooltip";
|
|
22
22
|
import classNames from "classnames";
|
|
@@ -50,7 +50,7 @@ export default class ExpressionSelectOperator extends React.Component {
|
|
|
50
50
|
<Button
|
|
51
51
|
className={classNames("properties-operator-button", { "first": (index % 2 === 0),
|
|
52
52
|
"second": !(index % 2 === 0) })}
|
|
53
|
-
size="
|
|
53
|
+
size="sm"
|
|
54
54
|
kind="tertiary"
|
|
55
55
|
onClick={this.onOperatorClick.bind(this, operator.value)}
|
|
56
56
|
>
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
import React from "react";
|
|
19
19
|
import PropTypes from "prop-types";
|
|
20
20
|
import { injectIntl } from "react-intl";
|
|
21
|
-
import { Button } from "carbon
|
|
22
|
-
import {
|
|
21
|
+
import { Button } from "@carbon/react";
|
|
22
|
+
import { Maximize, Minimize } from "@carbon/react/icons";
|
|
23
23
|
import { formatMessage } from "../../../util/property-utils";
|
|
24
24
|
import { MESSAGE_KEYS } from "../../../constants/constants";
|
|
25
25
|
|
|
@@ -36,9 +36,9 @@ class ExpressionToggle extends React.Component {
|
|
|
36
36
|
{this.props.enableMaximize ? (<Button
|
|
37
37
|
className="maximize"
|
|
38
38
|
type="button"
|
|
39
|
-
size="
|
|
39
|
+
size="sm"
|
|
40
40
|
kind="ghost"
|
|
41
|
-
renderIcon={
|
|
41
|
+
renderIcon={Maximize}
|
|
42
42
|
hasIconOnly
|
|
43
43
|
iconDescription={formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_MAXIMIZE_LABEL)}
|
|
44
44
|
onClick={() => {
|
|
@@ -53,16 +53,17 @@ class ExpressionToggle extends React.Component {
|
|
|
53
53
|
/>) : (<Button
|
|
54
54
|
type="button"
|
|
55
55
|
className="minimize"
|
|
56
|
-
size="
|
|
56
|
+
size="sm"
|
|
57
57
|
kind="ghost"
|
|
58
58
|
hasIconOnly
|
|
59
|
-
renderIcon={
|
|
59
|
+
renderIcon={Minimize}
|
|
60
60
|
iconDescription={formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_MINIMIZE_LABEL)}
|
|
61
61
|
onClick={() => this.props.controller.clearActiveTearsheet()}
|
|
62
62
|
/>)
|
|
63
63
|
}
|
|
64
64
|
</div>
|
|
65
|
-
</div>
|
|
65
|
+
</div>
|
|
66
|
+
);
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
ExpressionToggle.propTypes = {
|
|
@@ -20,7 +20,7 @@ import React from "react";
|
|
|
20
20
|
import PropTypes from "prop-types";
|
|
21
21
|
import { connect } from "react-redux";
|
|
22
22
|
import Icon from "./../../../icons/icon.jsx";
|
|
23
|
-
import { Button } from "carbon
|
|
23
|
+
import { Button } from "@carbon/react";
|
|
24
24
|
import classNames from "classnames";
|
|
25
25
|
import { isEqual, concat } from "lodash";
|
|
26
26
|
import ValidationMessage from "./../../components/validation-message";
|
|
@@ -28,7 +28,7 @@ import WideFlyout from "./../../components/wide-flyout";
|
|
|
28
28
|
import { formatMessage } from "./../../util/property-utils";
|
|
29
29
|
import ExpressionBuilder from "./expression-builder/expression-builder";
|
|
30
30
|
import { MESSAGE_KEYS, CONDITION_MESSAGE_TYPE, DEFAULT_VALIDATION_MESSAGE } from "./../../constants/constants";
|
|
31
|
-
import {
|
|
31
|
+
import { Calculator } from "@carbon/react/icons";
|
|
32
32
|
import * as ControlUtils from "./../../util/control-utils";
|
|
33
33
|
import { STATES } from "./../../constants/constants";
|
|
34
34
|
import { get } from "lodash";
|
|
@@ -319,9 +319,10 @@ class ExpressionControl extends React.Component {
|
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
const reactIntl = this.props.controller.getReactIntl();
|
|
322
|
+
const Calculator24 = React.forwardRef((props, ref) => <Calculator ref={ref} size={24} {...props} />);
|
|
322
323
|
|
|
323
324
|
const button = this._showBuilderButton() ? (
|
|
324
|
-
<Button kind="ghost" size="
|
|
325
|
+
<Button kind="ghost" size="sm"
|
|
325
326
|
className="properties-expression-button"
|
|
326
327
|
disabled={this.props.state === STATES.DISABLED}
|
|
327
328
|
onClick={this.showExpressionBuilder}
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
height: inherit;
|
|
23
23
|
width: 100%;
|
|
24
24
|
background: $field-02;
|
|
25
|
-
color: $text-
|
|
25
|
+
color: $text-primary;
|
|
26
26
|
|
|
27
27
|
.cm-gutters {
|
|
28
28
|
border-right: none;
|
|
@@ -32,16 +32,16 @@
|
|
|
32
32
|
.cm-content {
|
|
33
33
|
.cm-line {
|
|
34
34
|
padding-left: $spacing-03;
|
|
35
|
-
@include
|
|
35
|
+
@include type-style("code-02");
|
|
36
36
|
}
|
|
37
37
|
.cm-placeholder {
|
|
38
|
-
@include
|
|
38
|
+
@include type-style("code-02");
|
|
39
39
|
}
|
|
40
40
|
.cm-cursor {
|
|
41
|
-
border-left: 1px solid $text-
|
|
41
|
+
border-left: 1px solid $text-primary;
|
|
42
42
|
}
|
|
43
43
|
.cm-lineNumbers .cm-gutterElement {
|
|
44
|
-
@include
|
|
44
|
+
@include type-style("body-short-01");
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -53,24 +53,24 @@
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
.cm-line .cm-keyword { color: $link-
|
|
56
|
+
.cm-line .cm-keyword { color: $link-primary; }
|
|
57
57
|
|
|
58
|
-
.cm-line .cm-number { color: $text-
|
|
58
|
+
.cm-line .cm-number { color: $text-secondary; }
|
|
59
59
|
|
|
60
|
-
.cm-line .cm-def { color: $support-
|
|
60
|
+
.cm-line .cm-def { color: $support-error; }
|
|
61
61
|
|
|
62
|
-
.cm-line .cm-comment { color: $support-
|
|
62
|
+
.cm-line .cm-comment { color: $support-success; }
|
|
63
63
|
|
|
64
64
|
.cm-line .cm-variable,
|
|
65
65
|
.cm-line .cm-punctuation,
|
|
66
66
|
.cm-line .cm-property,
|
|
67
67
|
.cm-line .cm-operator {
|
|
68
|
-
color: $text-
|
|
68
|
+
color: $text-primary;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.cm-line .cm-string { color: $text-error; }
|
|
72
72
|
|
|
73
|
-
.cm-line .cm-meta { color: $
|
|
73
|
+
.cm-line .cm-meta { color: $layer-01; }
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
.elyra-CodeMirror.disabled {
|
|
@@ -81,18 +81,18 @@
|
|
|
81
81
|
|
|
82
82
|
.elyra-CodeMirror.warning {
|
|
83
83
|
.cm-editor {
|
|
84
|
-
border: $spacing-01 solid $support-
|
|
84
|
+
border: $spacing-01 solid $support-warning;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
.elyra-CodeMirror.error {
|
|
89
89
|
.cm-editor {
|
|
90
|
-
border: $spacing-01 solid $support-
|
|
90
|
+
border: $spacing-01 solid $support-error;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
.properties-expression-editor {
|
|
95
|
-
border: 1px solid $
|
|
95
|
+
border: 1px solid $layer-accent-01;
|
|
96
96
|
&.disabled {
|
|
97
97
|
opacity: 0.5;
|
|
98
98
|
}
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
position: relative;
|
|
133
133
|
height: $spacing-07;
|
|
134
134
|
.properties-expression-title {
|
|
135
|
-
@include
|
|
135
|
+
@include type-style("label-01");
|
|
136
136
|
position: absolute;
|
|
137
137
|
bottom: 5px;
|
|
138
138
|
left: 0;
|
|
@@ -144,11 +144,10 @@
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
.properties-expression-button
|
|
147
|
+
.properties-expression-button {
|
|
148
148
|
padding: $spacing-02;
|
|
149
149
|
svg {
|
|
150
150
|
height: 20px;
|
|
151
151
|
width: 20px;
|
|
152
|
-
margin-left: 0;
|
|
153
152
|
}
|
|
154
153
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import React from "react";
|
|
18
18
|
import PropTypes from "prop-types";
|
|
19
19
|
import { connect } from "react-redux";
|
|
20
|
-
import { MultiSelect, FilterableMultiSelect } from "carbon
|
|
20
|
+
import { MultiSelect, FilterableMultiSelect, Layer } from "@carbon/react";
|
|
21
21
|
import * as ControlUtils from "./../../util/control-utils";
|
|
22
22
|
import ValidationMessage from "./../../components/validation-message";
|
|
23
23
|
import classNames from "classnames";
|
|
@@ -109,7 +109,7 @@ class MultiSelectControl extends React.Component {
|
|
|
109
109
|
|
|
110
110
|
handleOnChange(evt) {
|
|
111
111
|
const controlValues = [];
|
|
112
|
-
for (let i = 0; i < evt
|
|
112
|
+
for (let i = 0; i < evt?.selectedItems?.length; i++) {
|
|
113
113
|
controlValues.push(evt.selectedItems[i].id);
|
|
114
114
|
}
|
|
115
115
|
this.props.controller.updatePropertyValue(this.props.propertyId, controlValues);
|
|
@@ -144,31 +144,37 @@ class MultiSelectControl extends React.Component {
|
|
|
144
144
|
|
|
145
145
|
let dropdownComponent = null;
|
|
146
146
|
if (this.props.control.filterable) {
|
|
147
|
-
dropdownComponent = (
|
|
148
|
-
{
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
147
|
+
dropdownComponent = (
|
|
148
|
+
<Layer level={this.props.controller.getLight() && this.props.control.light ? 1 : 0}>
|
|
149
|
+
<FilterableMultiSelect
|
|
150
|
+
{...validationProps}
|
|
151
|
+
id={`${ControlUtils.getDataId(this.props.propertyId)}-multiselect-filterable`}
|
|
152
|
+
disabled={this.props.state === STATES.DISABLED}
|
|
153
|
+
translateWithId={(id) => listBoxMenuIconTranslationIds[id]}
|
|
154
|
+
items={multiSelectDropdown.options}
|
|
155
|
+
initialSelectedItems={multiSelectDropdown.selectedOptions}
|
|
156
|
+
onChange={this.handleOnChange}
|
|
157
|
+
placeholder={label}
|
|
158
|
+
titleText={this.props.tableControl ? null : this.props.controlItem}
|
|
159
|
+
/>
|
|
160
|
+
</Layer>
|
|
161
|
+
);
|
|
159
162
|
} else {
|
|
160
|
-
dropdownComponent = (
|
|
161
|
-
{
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
163
|
+
dropdownComponent = (
|
|
164
|
+
<Layer level={this.props.controller.getLight() && this.props.control.light ? 1 : 0}>
|
|
165
|
+
<MultiSelect
|
|
166
|
+
{...validationProps}
|
|
167
|
+
id={`${ControlUtils.getDataId(this.props.propertyId)}-multiselect`}
|
|
168
|
+
disabled={this.props.state === STATES.DISABLED}
|
|
169
|
+
translateWithId={(id) => listBoxMenuIconTranslationIds[id]}
|
|
170
|
+
items={multiSelectDropdown.options}
|
|
171
|
+
selectedItems={multiSelectDropdown.selectedOptions}
|
|
172
|
+
onChange={this.handleOnChange}
|
|
173
|
+
label={label}
|
|
174
|
+
titleText={this.props.tableControl ? null : this.props.controlItem}
|
|
175
|
+
/>
|
|
176
|
+
</Layer>
|
|
177
|
+
);
|
|
172
178
|
}
|
|
173
179
|
|
|
174
180
|
return (
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
.properties-table-cell-control { // overrides when in a table cell
|
|
19
19
|
.properties-dropdown {
|
|
20
|
-
.
|
|
20
|
+
.cds--multi-select__wrapper > label { // hidden label should not take any space in table cell
|
|
21
21
|
display: none;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
import React from "react";
|
|
18
18
|
import PropTypes from "prop-types";
|
|
19
19
|
import { connect } from "react-redux";
|
|
20
|
-
import { NumberInput, Button } from "carbon
|
|
20
|
+
import { NumberInput, Button, Layer } from "@carbon/react";
|
|
21
21
|
import ValidationMessage from "./../../components/validation-message";
|
|
22
22
|
import * as ControlUtils from "./../../util/control-utils";
|
|
23
23
|
import { formatMessage } from "./../../util/property-utils";
|
|
24
24
|
import { STATES, MESSAGE_KEYS } from "./../../constants/constants.js";
|
|
25
25
|
import classNames from "classnames";
|
|
26
26
|
import { ControlType } from "./../../constants/form-constants";
|
|
27
|
-
import {
|
|
27
|
+
import { Shuffle } from "@carbon/react/icons";
|
|
28
28
|
import { has } from "lodash";
|
|
29
29
|
|
|
30
30
|
class NumberfieldControl extends React.Component {
|
|
@@ -69,8 +69,8 @@ class NumberfieldControl extends React.Component {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
handleChange(evt, direction) {
|
|
73
|
-
if (typeof direction === "string") {
|
|
72
|
+
handleChange(evt, { value, direction }) {
|
|
73
|
+
if (this.props.control.controlType !== ControlType.NUMBERFIELD && typeof direction === "string") {
|
|
74
74
|
this.onDirection(direction);
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
@@ -107,7 +107,7 @@ class NumberfieldControl extends React.Component {
|
|
|
107
107
|
this.props.controller.updateErrorMessage(this.props.propertyId, null);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
const actualValue =
|
|
110
|
+
const actualValue = value;
|
|
111
111
|
if (typeof actualValue === "undefined" || actualValue === null || actualValue === "") {
|
|
112
112
|
this.props.controller.updatePropertyValue(this.props.propertyId, null);
|
|
113
113
|
} else {
|
|
@@ -139,7 +139,8 @@ class NumberfieldControl extends React.Component {
|
|
|
139
139
|
onClick={this.generateNumber}
|
|
140
140
|
disabled={disabled}
|
|
141
141
|
kind="tertiary"
|
|
142
|
-
|
|
142
|
+
size="md"
|
|
143
|
+
renderIcon={Shuffle}
|
|
143
144
|
tooltipPosition="bottom"
|
|
144
145
|
tooltipAlignment="end"
|
|
145
146
|
iconDescription={this.props.control.label.numberGenerator.text}
|
|
@@ -155,22 +156,23 @@ class NumberfieldControl extends React.Component {
|
|
|
155
156
|
const validationProps = ControlUtils.getValidationProps(this.props.messageInfo, this.props.tableControl);
|
|
156
157
|
return (
|
|
157
158
|
<div className={className} data-id={ControlUtils.getDataId(this.props.propertyId)}>
|
|
158
|
-
<
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
159
|
+
<Layer className="properties-numberfield-layer" level={this.props.controller.getLight() && this.props.control.light ? 1 : 0}>
|
|
160
|
+
<NumberInput
|
|
161
|
+
{...validationProps}
|
|
162
|
+
ref= { (ref) => (this.numberInput = ref)}
|
|
163
|
+
id={this.id}
|
|
164
|
+
onChange={this.handleChange.bind(this)}
|
|
165
|
+
disabled={disabled}
|
|
166
|
+
step={this.props.control.increment}
|
|
167
|
+
value={controlValue}
|
|
168
|
+
placeholder={this.props.control.additionalText}
|
|
169
|
+
label={this.props.controlItem}
|
|
170
|
+
hideLabel={this.props.tableControl}
|
|
171
|
+
allowEmpty
|
|
172
|
+
hideSteppers={this.props.tableControl || (this.props.control.controlType === ControlType.NUMBERFIELD)}
|
|
173
|
+
onInput={this.onInput.bind(this)}
|
|
174
|
+
/>
|
|
175
|
+
</Layer>
|
|
174
176
|
{numberGenerator}
|
|
175
177
|
<ValidationMessage inTable={this.props.tableControl} tableOnly state={this.props.state} messageInfo={this.props.messageInfo} />
|
|
176
178
|
</div>
|
|
@@ -16,18 +16,11 @@
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
.properties-numberfield {
|
|
19
|
-
.
|
|
20
|
-
|
|
21
|
-
margin-bottom: 0;
|
|
19
|
+
.properties-numberfield-layer {
|
|
20
|
+
inline-size: 100%;
|
|
22
21
|
}
|
|
23
22
|
.properties-number-generator {
|
|
24
23
|
margin-left: $spacing-05;
|
|
25
|
-
right: $spacing-01;
|
|
26
|
-
// Button dimensions 40x40 px
|
|
27
|
-
width: $spacing-08;
|
|
28
|
-
min-height: $spacing-08;
|
|
29
|
-
padding-left: $spacing-04;
|
|
30
|
-
padding-right: $spacing-04;
|
|
31
24
|
}
|
|
32
25
|
&.numberfield-with-number-generator {
|
|
33
26
|
width: 100%;
|
|
@@ -44,19 +37,19 @@
|
|
|
44
37
|
|
|
45
38
|
.properties-table-cell-control { // overrides when in a table cell
|
|
46
39
|
.properties-numberfield {
|
|
47
|
-
.
|
|
48
|
-
.
|
|
40
|
+
.cds--number[data-invalid] { // carbon override to not display error
|
|
41
|
+
.cds--form-requirement { // carbon override to not display error
|
|
49
42
|
display: none;
|
|
50
43
|
}
|
|
51
44
|
}
|
|
52
45
|
&.error {
|
|
53
46
|
input[type="number"]:not([disabled]), input[type="number"]:focus:not([disabled]) {
|
|
54
|
-
box-shadow: 0 2px 0 0 $support-
|
|
47
|
+
box-shadow: 0 2px 0 0 $support-error;
|
|
55
48
|
}
|
|
56
49
|
}
|
|
57
50
|
&.warning {
|
|
58
51
|
input[type="number"]:not([disabled]), input[type="number"]:focus:not([disabled]) {
|
|
59
|
-
box-shadow: 0 2px 0 0 $support-
|
|
52
|
+
box-shadow: 0 2px 0 0 $support-warning;
|
|
60
53
|
}
|
|
61
54
|
}
|
|
62
55
|
input[type="number"] { //override styling from carbon
|
|
@@ -64,7 +57,7 @@
|
|
|
64
57
|
padding: 0;
|
|
65
58
|
height: 1.5rem;
|
|
66
59
|
}
|
|
67
|
-
.
|
|
60
|
+
.cds--number input[type="number"] {
|
|
68
61
|
min-width: 0;
|
|
69
62
|
}
|
|
70
63
|
}
|