@elyra/canvas 12.26.0 → 12.27.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/dist/{canvas-controller-df16f0fa.js → canvas-controller-01c28c3a.js} +2 -2
- package/dist/canvas-controller-01c28c3a.js.map +1 -0
- package/dist/{canvas-controller-fefee807.js → canvas-controller-fc5bee30.js} +2 -2
- package/dist/canvas-controller-fc5bee30.js.map +1 -0
- package/dist/canvas-logger-27d3180d.js.map +1 -1
- package/dist/canvas-logger-bb537fb3.js.map +1 -1
- package/dist/{common-canvas-55d075fe.js → common-canvas-151f18c0.js} +2 -2
- package/dist/common-canvas-151f18c0.js.map +1 -0
- package/dist/{common-canvas-e8a7a840.js → common-canvas-39a5b48a.js} +2 -2
- package/dist/common-canvas-39a5b48a.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-890b3edd.js +2 -0
- package/dist/common-properties-890b3edd.js.map +1 -0
- package/dist/common-properties-d9a48d36.js +2 -0
- package/dist/common-properties-d9a48d36.js.map +1 -0
- package/dist/datarecord-metadata-v3-schema-6a3754ce.js.map +1 -1
- package/dist/datarecord-metadata-v3-schema-ba1f2849.js.map +1 -1
- package/dist/{extends-841b39ac.js → extends-17f4b844.js} +2 -2
- package/dist/extends-17f4b844.js.map +1 -0
- package/dist/{extends-a9c1b4cd.js → extends-a6ea3ccf.js} +2 -2
- package/dist/extends-a6ea3ccf.js.map +1 -0
- package/dist/flexible-table-5ca1f2b9.js +2 -0
- package/dist/flexible-table-5ca1f2b9.js.map +1 -0
- package/dist/flexible-table-a51640b9.js +2 -0
- package/dist/flexible-table-a51640b9.js.map +1 -0
- package/dist/{icon-4a6f3dad.js → icon-4bfec280.js} +2 -2
- package/dist/{icon-4a6f3dad.js.map → icon-4bfec280.js.map} +1 -1
- package/dist/{icon-f6f2bffc.js → icon-b599856a.js} +2 -2
- package/dist/{icon-f6f2bffc.js.map → icon-b599856a.js.map} +1 -1
- package/dist/{index-5d62eee8.js → index-904463a1.js} +2 -2
- package/dist/{index-5d62eee8.js.map → index-904463a1.js.map} +1 -1
- package/dist/{index-c8a96051.js → index-cf7580bf.js} +2 -2
- package/dist/{index-c8a96051.js.map → index-cf7580bf.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/command-stack.es.js.map +1 -1
- package/dist/lib/command-stack.js.map +1 -1
- package/dist/lib/context-menu.es.js +1 -1
- package/dist/lib/context-menu.es.js.map +1 -1
- package/dist/lib/context-menu.js +1 -1
- package/dist/lib/context-menu.js.map +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.map +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-96922752.js → toolbar-93657677.js} +2 -2
- package/dist/{toolbar-c8779b93.js.map → toolbar-93657677.js.map} +1 -1
- package/dist/{toolbar-c8779b93.js → toolbar-ea057c6f.js} +2 -2
- package/dist/{toolbar-96922752.js.map → toolbar-ea057c6f.js.map} +1 -1
- package/locales/command-actions/locales/de.json +1 -1
- package/locales/command-actions/locales/es.json +9 -9
- package/locales/command-actions/locales/fr.json +9 -9
- package/locales/command-actions/locales/it.json +9 -9
- package/locales/command-actions/locales/ja.json +1 -1
- package/locales/command-actions/locales/ko.json +1 -1
- package/locales/command-actions/locales/pt-br.json +9 -9
- package/locales/command-actions/locales/sv.json +1 -1
- package/locales/command-actions/locales/zh-CN.json +1 -1
- package/locales/command-actions/locales/zh-TW.json +1 -1
- package/locales/common-canvas/locales/de.json +2 -1
- package/locales/common-canvas/locales/es.json +1 -0
- package/locales/common-canvas/locales/fr.json +2 -1
- package/locales/common-canvas/locales/it.json +2 -1
- package/locales/common-canvas/locales/ja.json +2 -1
- package/locales/common-canvas/locales/ko.json +2 -1
- package/locales/common-canvas/locales/pt-br.json +4 -3
- package/locales/common-canvas/locales/sv.json +1 -0
- package/locales/common-canvas/locales/zh-CN.json +2 -1
- package/locales/common-canvas/locales/zh-TW.json +2 -1
- package/locales/common-properties/locales/de.json +11 -7
- package/locales/common-properties/locales/en.json +1 -2
- package/locales/common-properties/locales/eo.json +1 -2
- package/locales/common-properties/locales/es.json +11 -7
- package/locales/common-properties/locales/fr.json +8 -4
- package/locales/common-properties/locales/it.json +8 -4
- package/locales/common-properties/locales/ja.json +7 -3
- package/locales/common-properties/locales/ko.json +8 -4
- package/locales/common-properties/locales/pt-br.json +10 -6
- package/locales/common-properties/locales/sv.json +7 -3
- package/locales/common-properties/locales/zh-CN.json +9 -5
- package/locales/common-properties/locales/zh-TW.json +7 -3
- package/locales/notification-panel/locales/en.json +3 -0
- package/locales/notification-panel/locales/eo.json +3 -0
- package/locales/palette/locales/it.json +2 -2
- package/locales/toolbar/locales/it.json +2 -2
- package/package.json +1 -1
- package/src/common-canvas/canvas-controller.js +10 -1
- package/src/common-canvas/cc-central-items.jsx +5 -1
- package/src/common-canvas/cc-top-panel.jsx +66 -0
- package/src/common-canvas/common-canvas.jsx +6 -2
- package/src/common-canvas/common-canvas.scss +26 -7
- package/src/common-canvas/svg-canvas-d3.scss +0 -4
- package/src/common-canvas/svg-canvas-renderer.js +23 -13
- package/src/common-properties/common-properties.jsx +4 -2
- package/src/common-properties/components/control-item/control-item.jsx +4 -3
- package/src/common-properties/components/control-item/control-item.scss +1 -0
- package/src/common-properties/components/editor-form/editor-form.jsx +1 -0
- package/src/common-properties/components/virtualized-table/virtualized-table.jsx +11 -9
- package/src/common-properties/constants/constants.js +1 -2
- package/src/common-properties/controls/dropdown/dropdown.jsx +3 -3
- package/src/common-properties/form/ControlInfo.js +0 -3
- package/src/common-properties/form/EditorForm.js +2 -3
- package/src/common-properties/form/ParameterInfo.js +1 -18
- package/src/common-properties/panels/subtabs/subtabs.jsx +1 -0
- package/src/common-properties/panels/tearsheet/tearsheet.jsx +1 -0
- package/src/common-properties/properties-main/properties-main.jsx +2 -1
- package/src/notification-panel/notification-panel.jsx +19 -3
- package/src/notification-panel/notification-panel.scss +3 -5
- package/src/object-model/object-model.js +13 -1
- package/src/object-model/redux/canvas-store.js +10 -3
- package/src/object-model/redux/reducers/toppanel.js +29 -0
- package/src/tooltip/tooltip.scss +1 -0
- package/stats.html +1 -1
- package/dist/canvas-controller-df16f0fa.js.map +0 -1
- package/dist/canvas-controller-fefee807.js.map +0 -1
- package/dist/common-canvas-55d075fe.js.map +0 -1
- package/dist/common-canvas-e8a7a840.js.map +0 -1
- package/dist/common-properties-97261017.js +0 -2
- package/dist/common-properties-97261017.js.map +0 -1
- package/dist/common-properties-f596260f.js +0 -2
- package/dist/common-properties-f596260f.js.map +0 -1
- package/dist/extends-841b39ac.js.map +0 -1
- package/dist/extends-a9c1b4cd.js.map +0 -1
- package/dist/flexible-table-d4bd5c25.js +0 -2
- package/dist/flexible-table-d4bd5c25.js.map +0 -1
- package/dist/flexible-table-f7b58f99.js +0 -2
- package/dist/flexible-table-f7b58f99.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2017-
|
|
2
|
+
* Copyright 2017-2023 Elyra Authors
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
@import "carbon-components/scss/globals/scss/_vars";
|
|
18
18
|
$toolbar-button-height: 41px; // Allow one extra pixel for the toolbar border
|
|
19
|
-
$
|
|
20
|
-
$
|
|
19
|
+
$panel-border-width: 1px;
|
|
20
|
+
$panel-border-color: $ui-03;
|
|
21
21
|
|
|
22
22
|
/* Default layout for common-canvas components where the canvas appears below
|
|
23
23
|
* the toolbar and right-side flyout appears to the right of the toolbar and
|
|
@@ -55,6 +55,10 @@ $bottom-panel-border-color: $ui-03;
|
|
|
55
55
|
.common-canvas-with-bottom-panel {
|
|
56
56
|
width: 100%;
|
|
57
57
|
position: relative;
|
|
58
|
+
|
|
59
|
+
.top-panel {
|
|
60
|
+
top: 0;
|
|
61
|
+
}
|
|
58
62
|
}
|
|
59
63
|
|
|
60
64
|
.common-canvas-drop-div {
|
|
@@ -87,14 +91,14 @@ $bottom-panel-border-color: $ui-03;
|
|
|
87
91
|
display: flex;
|
|
88
92
|
flex-direction: column;
|
|
89
93
|
position: absolute;
|
|
90
|
-
left:0;
|
|
91
|
-
right:0;
|
|
94
|
+
left: 0;
|
|
95
|
+
right: 0;
|
|
92
96
|
bottom: 0;
|
|
93
|
-
border-top: $
|
|
97
|
+
border-top: $panel-border-width solid $panel-border-color;
|
|
94
98
|
}
|
|
95
99
|
|
|
96
100
|
.bottom-panel-drag {
|
|
97
|
-
border-top: $
|
|
101
|
+
border-top: $panel-border-color;
|
|
98
102
|
cursor: row-resize;
|
|
99
103
|
flex: 0 0 2px;
|
|
100
104
|
border-top-width: 1px;
|
|
@@ -112,6 +116,21 @@ $bottom-panel-border-color: $ui-03;
|
|
|
112
116
|
height: 100%;
|
|
113
117
|
}
|
|
114
118
|
|
|
119
|
+
.top-panel {
|
|
120
|
+
display: flex;
|
|
121
|
+
flex-direction: column;
|
|
122
|
+
position: absolute;
|
|
123
|
+
left: 0;
|
|
124
|
+
right: 0;
|
|
125
|
+
top: $toolbar-button-height;
|
|
126
|
+
border-bottom: $panel-border-width solid $panel-border-color;
|
|
127
|
+
|
|
128
|
+
&.common-canvas-toolbar-none {
|
|
129
|
+
top: 0;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
115
134
|
.text-toolbar {
|
|
116
135
|
position: absolute;
|
|
117
136
|
// top and left will be calculated and set for the text toolbar programmatically
|
|
@@ -906,10 +906,6 @@ g.bkg-col-cyan-50 {
|
|
|
906
906
|
stroke-width: 1;
|
|
907
907
|
stroke-dasharray: 0;
|
|
908
908
|
}
|
|
909
|
-
.d3-link-decorations-group g rect {
|
|
910
|
-
stroke: transparent;
|
|
911
|
-
stroke-width: 0px;
|
|
912
|
-
}
|
|
913
909
|
|
|
914
910
|
/* 'object link' is the historical name for an association link */
|
|
915
911
|
/* This styles is used for association links on a regular data flow canvas */
|
|
@@ -2823,22 +2823,23 @@ export default class SVGCanvasRenderer {
|
|
|
2823
2823
|
}
|
|
2824
2824
|
|
|
2825
2825
|
displayPorts(nodeGrp, d) {
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
this.displayInputPorts(nodeGrp, d);
|
|
2829
|
-
}
|
|
2830
|
-
|
|
2831
|
-
// Empty outputs arrays are allowed because some apps support that when ports are deleted.
|
|
2832
|
-
if (d.layout.outputPortDisplay && Array.isArray(d.outputs)) {
|
|
2833
|
-
this.displayOutputPorts(nodeGrp, d);
|
|
2834
|
-
}
|
|
2826
|
+
this.displayInputPorts(nodeGrp, d);
|
|
2827
|
+
this.displayOutputPorts(nodeGrp, d);
|
|
2835
2828
|
}
|
|
2836
2829
|
|
|
2837
2830
|
displayInputPorts(nodeGrp, node) {
|
|
2838
2831
|
const inSelector = "." + this.getNodeInputPortClassName();
|
|
2839
2832
|
|
|
2833
|
+
// Some applications may set inputs to undefined after inputs was
|
|
2834
|
+
// previously set to an array, so use empty array in that case so any
|
|
2835
|
+
// existing input ports are removed from the node.
|
|
2836
|
+
let inputs = node.inputs || [];
|
|
2837
|
+
|
|
2838
|
+
// Don't display input ports if config says not to.
|
|
2839
|
+
inputs = node.layout.inputPortDisplay ? inputs : [];
|
|
2840
|
+
|
|
2840
2841
|
nodeGrp.selectChildren(inSelector)
|
|
2841
|
-
.data(
|
|
2842
|
+
.data(inputs, (p) => p.id)
|
|
2842
2843
|
.join(
|
|
2843
2844
|
(enter) => this.createInputPorts(enter, node)
|
|
2844
2845
|
)
|
|
@@ -2907,9 +2908,18 @@ export default class SVGCanvasRenderer {
|
|
|
2907
2908
|
displayOutputPorts(nodeGrp, node) {
|
|
2908
2909
|
const outSelector = "." + this.getNodeOutputPortClassName();
|
|
2909
2910
|
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2911
|
+
// Some applications may set outputs to undefined after outputs was
|
|
2912
|
+
// previously set to an array, so use empty array in that case so any
|
|
2913
|
+
// existing output ports are removed from the node.
|
|
2914
|
+
let outputs = node.outputs || [];
|
|
2915
|
+
|
|
2916
|
+
// Don't display output ports if config says not to.
|
|
2917
|
+
outputs = node.layout.outputPortDisplay ? outputs : [];
|
|
2918
|
+
|
|
2919
|
+
// Only show a single output port (the last one) if config tells us to.
|
|
2920
|
+
outputs = this.config.enableSingleOutputPortDisplay && outputs.length > 1
|
|
2921
|
+
? [outputs[outputs.length - 1]]
|
|
2922
|
+
: outputs;
|
|
2913
2923
|
|
|
2914
2924
|
nodeGrp.selectChildren(outSelector)
|
|
2915
2925
|
.data(outputs, (p) => p.id)
|
|
@@ -247,7 +247,8 @@ CommonProperties.propTypes = {
|
|
|
247
247
|
conditionDisabledPropertyHandling: PropTypes.oneOf(["null", "value"]),
|
|
248
248
|
maxLengthForMultiLineControls: PropTypes.number,
|
|
249
249
|
maxLengthForSingleLineControls: PropTypes.number,
|
|
250
|
-
convertValueDataTypes: PropTypes.bool
|
|
250
|
+
convertValueDataTypes: PropTypes.bool,
|
|
251
|
+
showRequiredIndicator: PropTypes.bool
|
|
251
252
|
}),
|
|
252
253
|
callbacks: PropTypes.shape({
|
|
253
254
|
controllerHandler: PropTypes.func,
|
|
@@ -283,7 +284,8 @@ CommonProperties.defaultProps = {
|
|
|
283
284
|
applyPropertiesWithoutEdit: false,
|
|
284
285
|
maxLengthForMultiLineControls: 1024,
|
|
285
286
|
maxLengthForSingleLineControls: 128,
|
|
286
|
-
convertValueDataTypes: false
|
|
287
|
+
convertValueDataTypes: false,
|
|
288
|
+
showRequiredIndicator: true
|
|
287
289
|
},
|
|
288
290
|
callbacks: {
|
|
289
291
|
},
|
|
@@ -21,7 +21,7 @@ import classNames from "classnames";
|
|
|
21
21
|
import { STATES, CARBON_ICONS, MESSAGE_KEYS } from "./../../constants/constants.js";
|
|
22
22
|
import { ControlType } from "./../../constants/form-constants";
|
|
23
23
|
import Tooltip from "./../../../tooltip/tooltip.jsx";
|
|
24
|
-
import { isEmpty } from "lodash";
|
|
24
|
+
import { isEmpty, get } from "lodash";
|
|
25
25
|
import { v4 as uuid4 } from "uuid";
|
|
26
26
|
import Icon from "./../../../icons/icon.jsx";
|
|
27
27
|
import ActionFactory from "./../../actions/action-factory.js";
|
|
@@ -31,6 +31,7 @@ class ControlItem extends React.Component {
|
|
|
31
31
|
constructor(props) {
|
|
32
32
|
super(props);
|
|
33
33
|
this.actionFactory = new ActionFactory(this.props.controller);
|
|
34
|
+
this.showRequiredIndicator = props.controller ? get(props.controller.getPropertiesConfig(), "showRequiredIndicator", true) : true;
|
|
34
35
|
this.uuid = uuid4();
|
|
35
36
|
}
|
|
36
37
|
|
|
@@ -68,13 +69,13 @@ class ControlItem extends React.Component {
|
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
let indicator;
|
|
71
|
-
if (this.
|
|
72
|
+
if (this.showRequiredIndicator && this.props.control.required) {
|
|
72
73
|
indicator = (
|
|
73
74
|
<span className="properties-indicator">
|
|
74
75
|
{formatMessage(this.props.controller.getReactIntl(), MESSAGE_KEYS.LABEL_INDICATOR_REQUIRED)}
|
|
75
76
|
</span>
|
|
76
77
|
);
|
|
77
|
-
} else if (!this.
|
|
78
|
+
} else if (!this.showRequiredIndicator && !("required" in this.props.control)) {
|
|
78
79
|
indicator = (
|
|
79
80
|
<span className="properties-indicator">
|
|
80
81
|
{formatMessage(this.props.controller.getReactIntl(), MESSAGE_KEYS.LABEL_INDICATOR_OPTIONAL)}
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
@include carbon--type-style("helper-text-01");
|
|
68
68
|
color: $text-02;
|
|
69
69
|
padding-bottom: $spacing-03;
|
|
70
|
+
white-space: pre-wrap; // Add a line break for \n
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
// Removed padding in properties-label-container because .bx--label has margin-bottom: $spacing-03
|
|
@@ -198,15 +198,16 @@ class VirtualizedTable extends React.Component {
|
|
|
198
198
|
{ id: "virtualizedTable.header.checkbox.label", defaultMessage: defaultMessages["virtualizedTable.header.checkbox.label"] },
|
|
199
199
|
{ header_checkbox_label: headerCheckboxLabel }
|
|
200
200
|
);
|
|
201
|
-
const checkbox = this.props.selectable && this.props.rowSelection !== ROW_SELECTION.SINGLE
|
|
202
|
-
<
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
201
|
+
const checkbox = this.props.selectable && this.props.rowSelection !== ROW_SELECTION.SINGLE
|
|
202
|
+
? (<div role="checkbox" aria-checked={this.props.checkedAll} className="properties-vt-header-checkbox">
|
|
203
|
+
<Checkbox
|
|
204
|
+
id={`properties-vt-hd-cb-${scrollKey}`}
|
|
205
|
+
onChange={this.selectAll}
|
|
206
|
+
checked={this.props.checkedAll}
|
|
207
|
+
labelText={translatedHeaderCheckboxLabel}
|
|
208
|
+
hideLabel
|
|
209
|
+
/>
|
|
210
|
+
</div>)
|
|
210
211
|
: "";
|
|
211
212
|
|
|
212
213
|
return (<div className={className} data-role="properties-header-row" role="row" style={style}>
|
|
@@ -499,6 +500,7 @@ class VirtualizedTable extends React.Component {
|
|
|
499
500
|
|
|
500
501
|
sort={this.props.onSort}
|
|
501
502
|
sortDirection={this.props.sortDirection}
|
|
503
|
+
tabIndex={-1}
|
|
502
504
|
>
|
|
503
505
|
{
|
|
504
506
|
this.state.columns.map((column) => (
|
|
@@ -114,8 +114,7 @@ export const MESSAGE_KEYS = {
|
|
|
114
114
|
SHOW_PASSWORD_TOOLTIP: "passwordShow.tooltip",
|
|
115
115
|
HIDE_PASSWORD_TOOLTIP: "passwordHide.tooltip",
|
|
116
116
|
LABEL_INDICATOR_REQUIRED: "label.indicator.required",
|
|
117
|
-
LABEL_INDICATOR_OPTIONAL: "label.indicator.optional"
|
|
118
|
-
EMPTY_LIST_PLACEHOLDER: "emptyList.placeholder"
|
|
117
|
+
LABEL_INDICATOR_OPTIONAL: "label.indicator.optional"
|
|
119
118
|
};
|
|
120
119
|
|
|
121
120
|
export const TRUNCATE_LIMIT = 10000;
|
|
@@ -36,10 +36,10 @@ class DropDown extends React.Component {
|
|
|
36
36
|
if (isEmpty(props.controlOpts)) {
|
|
37
37
|
// For empty dropdown, get placeholder text from resources
|
|
38
38
|
const overrideEmptyListPlaceholder = `${this.props.control.name}.emptyList.placeholder`;
|
|
39
|
-
const
|
|
40
|
-
this.emptyLabel = props.controller.getResource(overrideEmptyListPlaceholder, defaultEmptyListPlaceholder);
|
|
39
|
+
const emptyLabelOverride = props.controller.getResource(overrideEmptyListPlaceholder);
|
|
41
40
|
// Disable empty dropdown when [property_id].emptyList.placeholder is set in resources
|
|
42
|
-
if (
|
|
41
|
+
if (emptyLabelOverride) {
|
|
42
|
+
this.emptyLabel = emptyLabelOverride;
|
|
43
43
|
this.disableEmptyListDropdown = true;
|
|
44
44
|
}
|
|
45
45
|
} else if (props.control.additionalText) {
|
|
@@ -183,9 +183,6 @@ export class Control {
|
|
|
183
183
|
if (settings.className) {
|
|
184
184
|
this.className = settings.className;
|
|
185
185
|
}
|
|
186
|
-
if (settings.showRequiredLabel) {
|
|
187
|
-
this.showRequiredLabel = settings.showRequiredLabel;
|
|
188
|
-
}
|
|
189
186
|
if (settings.buttons) {
|
|
190
187
|
this.buttons = settings.buttons;
|
|
191
188
|
}
|
|
@@ -508,7 +508,7 @@ function _makeControl(parameterMetadata, paramName, group, structureDefinition,
|
|
|
508
508
|
controlType = ControlType.TIMESTAMP;
|
|
509
509
|
break;
|
|
510
510
|
case Type.STRUCTURE: {
|
|
511
|
-
const structureDef = isSubControl ? structureMetadata.getStructure(parameter.baseType()) : structureDefinition;
|
|
511
|
+
const structureDef = isSubControl && structureMetadata ? structureMetadata.getStructure(parameter.baseType()) : structureDefinition;
|
|
512
512
|
|
|
513
513
|
if (structureDef) {
|
|
514
514
|
if (structureDef.hasSubPanel()) {
|
|
@@ -649,7 +649,6 @@ function _makeControl(parameterMetadata, paramName, group, structureDefinition,
|
|
|
649
649
|
settings.action = action;
|
|
650
650
|
settings.customValueAllowed = parameter.customValueAllowed;
|
|
651
651
|
settings.className = parameter.className;
|
|
652
|
-
settings.showRequiredLabel = parameter.showRequiredLabel;
|
|
653
652
|
settings.buttons = buttons;
|
|
654
653
|
settings.light = _isControlLight(additionalInfo.light, additionalInfo.containerType, parameter.isSubPanelEdit());
|
|
655
654
|
if (isSubControl) {
|
|
@@ -716,7 +715,7 @@ function _makeSubControl(parameter, l10nProvider, structureMetadata, additionalI
|
|
|
716
715
|
const parameterMetadata = null;
|
|
717
716
|
const paramName = null;
|
|
718
717
|
const group = null;
|
|
719
|
-
const structureDef = parameter.propType() === Type.STRUCTURE ? structureMetadata.getStructure(parameter.baseType()) : null;
|
|
718
|
+
const structureDef = parameter.propType() === Type.STRUCTURE && structureMetadata ? structureMetadata.getStructure(parameter.baseType()) : null;
|
|
720
719
|
const actionMetadata = null;
|
|
721
720
|
const subControl = parameter;
|
|
722
721
|
return _makeControl(parameterMetadata, paramName, group, structureDef, l10nProvider, actionMetadata, structureMetadata, subControl, additionalInfo);
|
|
@@ -165,9 +165,6 @@ export class ParameterDef {
|
|
|
165
165
|
if (settings.className) {
|
|
166
166
|
this.className = settings.className;
|
|
167
167
|
}
|
|
168
|
-
if (settings.showRequiredLabel) {
|
|
169
|
-
this.showRequiredLabel = settings.showRequiredLabel;
|
|
170
|
-
}
|
|
171
168
|
}
|
|
172
169
|
|
|
173
170
|
isList() {
|
|
@@ -363,8 +360,7 @@ export class ParameterDef {
|
|
|
363
360
|
"uionly": propertyOf(param)("uionly"),
|
|
364
361
|
"actionRef": propertyOf(uihint)("action_ref"),
|
|
365
362
|
"customValueAllowed": propertyOf(uihint)("custom_value_allowed"),
|
|
366
|
-
"className": propertyOf(uihint)("class_name")
|
|
367
|
-
"showRequiredLabel": propertyOf(param)("showRequiredLabel")
|
|
363
|
+
"className": propertyOf(uihint)("class_name")
|
|
368
364
|
});
|
|
369
365
|
}
|
|
370
366
|
return null;
|
|
@@ -408,19 +404,6 @@ export class ParameterMetadata {
|
|
|
408
404
|
// operation arguments
|
|
409
405
|
static makeParameterMetadata(parameters, uihintsParams, uihintsUiParams) {
|
|
410
406
|
const paramDefs = [];
|
|
411
|
-
if (parameters) {
|
|
412
|
-
// Add a new option for showing "required" or "optional" indicator in control-item
|
|
413
|
-
const requiredParameters = parameters.filter((parameter) => parameter.required === true);
|
|
414
|
-
const half = parameters.length / 2;
|
|
415
|
-
parameters.forEach((parameter) => {
|
|
416
|
-
if (requiredParameters.length <= half) {
|
|
417
|
-
parameter.showRequiredLabel = true;
|
|
418
|
-
} else {
|
|
419
|
-
parameter.showRequiredLabel = false;
|
|
420
|
-
}
|
|
421
|
-
});
|
|
422
|
-
}
|
|
423
|
-
|
|
424
407
|
if (Array.isArray(parameters)) {
|
|
425
408
|
for (const param of parameters) {
|
|
426
409
|
const paramDef = ParameterDef.makeParameterDef(param, getParamUIHint(param.id, uihintsParams));
|
|
@@ -50,6 +50,7 @@ class Subtabs extends React.Component {
|
|
|
50
50
|
|
|
51
51
|
subTabs.push(
|
|
52
52
|
<Tab
|
|
53
|
+
id={"subtabs.tab." + i}
|
|
53
54
|
key={"subtabs.tab." + i}
|
|
54
55
|
disabled={panelState === STATES.DISABLED}
|
|
55
56
|
className={classNames("properties-subtab", { "properties-leftnav-subtab-item": this.props.leftnav })}
|
|
@@ -614,7 +614,8 @@ PropertiesMain.propTypes = {
|
|
|
614
614
|
conditionDisabledPropertyHandling: PropTypes.oneOf(["null", "undefined", "value"]),
|
|
615
615
|
maxLengthForMultiLineControls: PropTypes.number,
|
|
616
616
|
maxLengthForSingleLineControls: PropTypes.number,
|
|
617
|
-
convertValueDataTypes: PropTypes.bool
|
|
617
|
+
convertValueDataTypes: PropTypes.bool,
|
|
618
|
+
showRequiredIndicator: PropTypes.bool
|
|
618
619
|
}),
|
|
619
620
|
callbacks: PropTypes.shape({
|
|
620
621
|
controllerHandler: PropTypes.func,
|
|
@@ -17,11 +17,13 @@
|
|
|
17
17
|
import React from "react";
|
|
18
18
|
import PropTypes from "prop-types";
|
|
19
19
|
import { connect } from "react-redux";
|
|
20
|
+
import { injectIntl } from "react-intl";
|
|
20
21
|
import Icon from "./../icons/icon.jsx";
|
|
21
22
|
import { Button } from "carbon-components-react";
|
|
22
23
|
import { Close16 } from "@carbon/icons-react";
|
|
23
24
|
import Logger from "../logging/canvas-logger.js";
|
|
24
25
|
import { DEFAULT_NOTIFICATION_HEADER, NOTIFICATION_ICON_CLASS } from "./../common-canvas/constants/canvas-constants.js";
|
|
26
|
+
import defaultMessages from "../../locales/notification-panel/locales/en.json";
|
|
25
27
|
|
|
26
28
|
|
|
27
29
|
class NotificationPanel extends React.Component {
|
|
@@ -212,7 +214,20 @@ class NotificationPanel extends React.Component {
|
|
|
212
214
|
<div className="notification-panel-header-container">
|
|
213
215
|
<div className="notification-panel-header">
|
|
214
216
|
{notificationHeader}
|
|
215
|
-
<
|
|
217
|
+
<Button
|
|
218
|
+
className="notification-panel-close-button"
|
|
219
|
+
size="sm"
|
|
220
|
+
kind="ghost"
|
|
221
|
+
renderIcon={Close16}
|
|
222
|
+
hasIconOnly
|
|
223
|
+
iconDescription={this.props.intl.formatMessage({
|
|
224
|
+
id: "notification.panel.close.button.description",
|
|
225
|
+
defaultMessage: defaultMessages["notification.panel.close.button.description"]
|
|
226
|
+
})}
|
|
227
|
+
onClick={this.closeNotificationPanel}
|
|
228
|
+
tooltipAlignment="end"
|
|
229
|
+
tooltipPosition="bottom"
|
|
230
|
+
/>
|
|
216
231
|
</div>
|
|
217
232
|
{notificationSubtitle}
|
|
218
233
|
</div>
|
|
@@ -263,7 +278,8 @@ NotificationPanel.propTypes = {
|
|
|
263
278
|
}),
|
|
264
279
|
secondaryButtonDisabled: PropTypes.bool,
|
|
265
280
|
isNotificationOpen: PropTypes.bool,
|
|
266
|
-
messages: PropTypes.array
|
|
281
|
+
messages: PropTypes.array,
|
|
282
|
+
intl: PropTypes.object.isRequired
|
|
267
283
|
};
|
|
268
284
|
|
|
269
285
|
const mapStateToProps = (state, ownProps) => ({
|
|
@@ -273,4 +289,4 @@ const mapStateToProps = (state, ownProps) => ({
|
|
|
273
289
|
messages: state.notifications
|
|
274
290
|
});
|
|
275
291
|
|
|
276
|
-
export default connect(mapStateToProps)(NotificationPanel);
|
|
292
|
+
export default connect(mapStateToProps)(injectIntl(NotificationPanel));
|
|
@@ -59,11 +59,9 @@ $toolbar-button-height: 41px; // Allow one extra pixel for the toolbar border
|
|
|
59
59
|
color: $text-02;
|
|
60
60
|
padding-top: $spacing-02;
|
|
61
61
|
}
|
|
62
|
-
.notification-panel-close-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
top: ($spacing-05 + $spacing-02);
|
|
66
|
-
cursor: pointer;
|
|
62
|
+
.notification-panel-close-button {
|
|
63
|
+
bottom: $spacing-02;
|
|
64
|
+
left: calc(#{$spacing-06} + #{$spacing-12});
|
|
67
65
|
}
|
|
68
66
|
}
|
|
69
67
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2017-
|
|
2
|
+
* Copyright 2017-2023 Elyra Authors
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -1446,6 +1446,18 @@ export default class ObjectModel {
|
|
|
1446
1446
|
this.store.dispatch({ type: "SET_BOTTOM_PANEL_CONFIG", data: { config: { panelHeight: ht } } });
|
|
1447
1447
|
}
|
|
1448
1448
|
|
|
1449
|
+
// ---------------------------------------------------------------------------
|
|
1450
|
+
// Top panel methods
|
|
1451
|
+
// ---------------------------------------------------------------------------
|
|
1452
|
+
|
|
1453
|
+
setTopPanelConfig(config) {
|
|
1454
|
+
this.store.dispatch({ type: "SET_TOP_PANEL_CONFIG", data: { config: config } });
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
isTopPanelOpen() {
|
|
1458
|
+
return this.store.isTopPanelOpen();
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1449
1461
|
// ---------------------------------------------------------------------------
|
|
1450
1462
|
// Clone methods
|
|
1451
1463
|
// ---------------------------------------------------------------------------
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2017-
|
|
2
|
+
* Copyright 2017-2023 Elyra Authors
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -25,6 +25,7 @@ import canvasinfo from "./reducers/canvasinfo.js";
|
|
|
25
25
|
import contextmenu from "./reducers/contextmenu.js";
|
|
26
26
|
import rightflyout from "./reducers/rightflyout.js";
|
|
27
27
|
import bottompanel from "./reducers/bottompanel.js";
|
|
28
|
+
import toppanel from "./reducers/toppanel.js";
|
|
28
29
|
import breadcrumbs from "./reducers/breadcrumbs.js";
|
|
29
30
|
import canvasconfig from "./reducers/canvasconfig.js";
|
|
30
31
|
import canvastoolbar from "./reducers/canvastoolbar.js";
|
|
@@ -54,7 +55,8 @@ export default class CanavasStore {
|
|
|
54
55
|
texttoolbar,
|
|
55
56
|
contextmenu,
|
|
56
57
|
rightflyout,
|
|
57
|
-
bottompanel
|
|
58
|
+
bottompanel,
|
|
59
|
+
toppanel
|
|
58
60
|
});
|
|
59
61
|
|
|
60
62
|
const initialState = {
|
|
@@ -71,7 +73,8 @@ export default class CanavasStore {
|
|
|
71
73
|
texttoolbar: { isOpen: false },
|
|
72
74
|
contextmenu: { menuDef: [] },
|
|
73
75
|
rightflyout: {},
|
|
74
|
-
bottompanel: { panelHeight: 393 }
|
|
76
|
+
bottompanel: { panelHeight: 393 },
|
|
77
|
+
toppanel: { }
|
|
75
78
|
};
|
|
76
79
|
|
|
77
80
|
let enableDevTools = false;
|
|
@@ -254,6 +257,10 @@ export default class CanavasStore {
|
|
|
254
257
|
return this.store.getState().bottompanel.isOpen;
|
|
255
258
|
}
|
|
256
259
|
|
|
260
|
+
isTopPanelOpen() {
|
|
261
|
+
return this.store.getState().toppanel.isOpen;
|
|
262
|
+
}
|
|
263
|
+
|
|
257
264
|
getNotificationPanel() {
|
|
258
265
|
return this.cloneData(this.store.getState().notificationpanel);
|
|
259
266
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023 Elyra Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export default (state = {}, action) => {
|
|
18
|
+
switch (action.type) {
|
|
19
|
+
case "SET_TOP_PANEL_CONFIG": {
|
|
20
|
+
if (action.data.config) {
|
|
21
|
+
return Object.assign({}, state, action.data.config);
|
|
22
|
+
}
|
|
23
|
+
return state;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
default:
|
|
27
|
+
return state;
|
|
28
|
+
}
|
|
29
|
+
};
|