@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
|
@@ -21,9 +21,13 @@ import { Checkbox } from "carbon-components-react";
|
|
|
21
21
|
import * as ControlUtils from "./../../util/control-utils";
|
|
22
22
|
import classNames from "classnames";
|
|
23
23
|
import ValidationMessage from "./../../components/validation-message";
|
|
24
|
-
import { STATES } from "./../../constants/constants.js";
|
|
25
24
|
import { v4 as uuid4 } from "uuid";
|
|
26
25
|
import { intersection, isEqual } from "lodash";
|
|
26
|
+
import { Information16 } from "@carbon/icons-react";
|
|
27
|
+
import Tooltip from "./../../../tooltip/tooltip.jsx";
|
|
28
|
+
import { STATES } from "./../../constants/constants.js";
|
|
29
|
+
import { isEmpty } from "lodash";
|
|
30
|
+
|
|
27
31
|
|
|
28
32
|
class CheckboxsetControl extends React.Component {
|
|
29
33
|
constructor(props) {
|
|
@@ -74,27 +78,48 @@ class CheckboxsetControl extends React.Component {
|
|
|
74
78
|
}
|
|
75
79
|
|
|
76
80
|
render() {
|
|
81
|
+
|
|
82
|
+
const hidden = this.props.state === STATES.HIDDEN;
|
|
77
83
|
let controlValue = this.props.value;
|
|
78
84
|
if (typeof controlValue === "undefined" || controlValue === null) {
|
|
79
85
|
controlValue = [];
|
|
80
86
|
}
|
|
81
87
|
const checkboxes = [];
|
|
82
88
|
for (var i = 0; i < this.props.control.values.length; i++) {
|
|
89
|
+
const val = this.props.control.values[i];
|
|
90
|
+
const disabled = this.props.state === STATES.DISABLED || !this.props.controlOpts.values.includes(val);
|
|
91
|
+
let tooltipIcon = null;
|
|
92
|
+
if (Array.isArray(this.props.control.valueDescs) && !isEmpty(this.props.control.valueDescs[i]) && !this.props.tableControl) {
|
|
93
|
+
const tooltip = (
|
|
94
|
+
<span >{this.props.control.valueDescs[i]}</span>
|
|
95
|
+
);
|
|
96
|
+
tooltipIcon = (<Tooltip
|
|
97
|
+
id={`tooltip-${this.uuid}-${i}`}
|
|
98
|
+
tip={tooltip}
|
|
99
|
+
direction="bottom"
|
|
100
|
+
className="properties-tooltips"
|
|
101
|
+
showToolTipOnClick
|
|
102
|
+
disable={hidden || disabled}
|
|
103
|
+
>
|
|
104
|
+
<Information16 disabled={disabled} className="properties-control-description-icon-info" />
|
|
105
|
+
</Tooltip>);
|
|
106
|
+
}
|
|
83
107
|
const id = {
|
|
84
108
|
name: this.props.propertyId.name,
|
|
85
109
|
row: i
|
|
86
110
|
};
|
|
87
|
-
const val = this.props.control.values[i];
|
|
88
111
|
const checked = (controlValue.indexOf(val) >= 0);
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
112
|
+
checkboxes.push(<div className="properties-checkbox-tooltip-container" key={ControlUtils.getControlId(id, this.uuid)}>
|
|
113
|
+
<Checkbox
|
|
114
|
+
disabled={disabled}
|
|
115
|
+
id={ControlUtils.getControlId(id, this.uuid)}
|
|
116
|
+
key={val + i}
|
|
117
|
+
labelText={this.props.control.valueLabels[i]}
|
|
118
|
+
onChange={this.handleChange.bind(this, val)}
|
|
119
|
+
checked={checked}
|
|
120
|
+
/>
|
|
121
|
+
{tooltipIcon}
|
|
122
|
+
</div>);
|
|
98
123
|
}
|
|
99
124
|
return (
|
|
100
125
|
<fieldset>
|
|
@@ -22,6 +22,12 @@
|
|
|
22
22
|
margin-bottom: $spacing-03;
|
|
23
23
|
}
|
|
24
24
|
.properties-checkboxset-container {
|
|
25
|
+
.properties-checkbox-tooltip-container{
|
|
26
|
+
display: grid;
|
|
27
|
+
align-items: center;
|
|
28
|
+
grid-template-columns: 1fr 12fr;
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
25
31
|
&.error:not([disabled]) {
|
|
26
32
|
padding-bottom: $spacing-02;
|
|
27
33
|
}
|
|
@@ -151,6 +151,7 @@ class ListControl extends AbstractTable {
|
|
|
151
151
|
rowSelection={this.props.control.rowSelection}
|
|
152
152
|
updateRowSelections={this.updateRowSelections}
|
|
153
153
|
light={this.props.controller.getLight()}
|
|
154
|
+
emptyTablePlaceholder={this.props.control.additionalText}
|
|
154
155
|
/>);
|
|
155
156
|
|
|
156
157
|
const tableContainer = (<div>
|
|
@@ -26,6 +26,9 @@ import classNames from "classnames";
|
|
|
26
26
|
import { STATES } from "./../../constants/constants.js";
|
|
27
27
|
import { ORIENTATIONS } from "./../../constants/form-constants.js";
|
|
28
28
|
import { v4 as uuid4 } from "uuid";
|
|
29
|
+
import { Information16 } from "@carbon/icons-react";
|
|
30
|
+
import Tooltip from "./../../../tooltip/tooltip.jsx";
|
|
31
|
+
import { isEmpty } from "lodash";
|
|
29
32
|
|
|
30
33
|
class RadiosetControl extends React.Component {
|
|
31
34
|
constructor(props) {
|
|
@@ -159,6 +162,8 @@ class RadiosetControl extends React.Component {
|
|
|
159
162
|
}
|
|
160
163
|
|
|
161
164
|
render() {
|
|
165
|
+
const disabled = this.props.state === STATES.DISABLED;
|
|
166
|
+
const hidden = this.props.state === STATES.HIDDEN;
|
|
162
167
|
if (!this.props.control.values && this.props.control.controlType === "radioset") {
|
|
163
168
|
this.props.control.values = [true, false];
|
|
164
169
|
this.props.control.valueLabels = ["true", "false"];
|
|
@@ -167,6 +172,24 @@ class RadiosetControl extends React.Component {
|
|
|
167
172
|
let wasChecked = false;
|
|
168
173
|
const valueSet = this.props.controlOpts;
|
|
169
174
|
for (var i = 0; i < valueSet.values.length; i++) {
|
|
175
|
+
let tooltipIcon = null;
|
|
176
|
+
if (Array.isArray(this.props.control.valueDescs) && !isEmpty(this.props.control.valueDescs[i]) && !this.props.tableControl) {
|
|
177
|
+
const tooltip = (
|
|
178
|
+
<span>{this.props.control.valueDescs[i]}</span>
|
|
179
|
+
);
|
|
180
|
+
tooltipIcon = (
|
|
181
|
+
<Tooltip
|
|
182
|
+
id={`tooltip-${this.uuid}-${i}`}
|
|
183
|
+
tip={tooltip}
|
|
184
|
+
direction="bottom"
|
|
185
|
+
className="properties-tooltips"
|
|
186
|
+
showToolTipOnClick
|
|
187
|
+
disable={hidden || disabled}
|
|
188
|
+
>
|
|
189
|
+
<Information16 disabled={disabled} className="properties-control-description-icon-info" />
|
|
190
|
+
</Tooltip>
|
|
191
|
+
);
|
|
192
|
+
}
|
|
170
193
|
const checked = valueSet.values[i] === this.props.value;
|
|
171
194
|
// RadioButton only accepts values of type string || number
|
|
172
195
|
const val = (this.props.control.valueDef.propType === "boolean") ? String(valueSet.values[i]) : valueSet.values[i];
|
|
@@ -182,12 +205,13 @@ class RadiosetControl extends React.Component {
|
|
|
182
205
|
<RadioButton
|
|
183
206
|
key={i}
|
|
184
207
|
id={ControlUtils.getControlId(id, this.uuid)}
|
|
185
|
-
disabled={
|
|
208
|
+
disabled={disabled || itemDisabled}
|
|
186
209
|
labelText={valueSet.valueLabels[i]}
|
|
187
210
|
value={val}
|
|
188
211
|
onChange={this.handleChange}
|
|
189
212
|
checked={checked}
|
|
190
213
|
/>
|
|
214
|
+
{tooltipIcon}
|
|
191
215
|
{optionalPanel}
|
|
192
216
|
</div>
|
|
193
217
|
);
|
|
@@ -29,12 +29,31 @@
|
|
|
29
29
|
display: inline-flex;
|
|
30
30
|
flex-wrap: wrap;
|
|
31
31
|
.properties-radioset-panel {
|
|
32
|
+
display: flex;
|
|
33
|
+
height: auto;
|
|
34
|
+
align-items: center;
|
|
32
35
|
margin-bottom: 0;
|
|
33
36
|
}
|
|
34
37
|
}
|
|
35
38
|
.properties-radioset-panel {
|
|
36
39
|
margin-bottom: $spacing-02;
|
|
37
40
|
margin-right: $spacing-04;
|
|
41
|
+
display: grid;
|
|
42
|
+
grid-template-columns: 1fr 8fr;
|
|
43
|
+
grid-template-rows: auto;
|
|
44
|
+
grid-template-areas:
|
|
45
|
+
"radio tooltip"
|
|
46
|
+
"panel panel";
|
|
47
|
+
.bx--radio-button-wrapper{
|
|
48
|
+
grid-area: radio;
|
|
49
|
+
margin-right: 0; // We removed the space between radio & tooltip to position it correctly
|
|
50
|
+
}
|
|
51
|
+
.tooltip-container{
|
|
52
|
+
grid-area: tooltip;
|
|
53
|
+
}
|
|
54
|
+
.properties-control-nested-panel{
|
|
55
|
+
grid-area: panel;
|
|
56
|
+
}
|
|
38
57
|
&:last-of-type {
|
|
39
58
|
margin-bottom: 0; // don't want margin when last radio button in group
|
|
40
59
|
}
|
|
@@ -138,6 +138,7 @@ class SelectColumns extends AbstractTable {
|
|
|
138
138
|
rowSelection={this.props.control.rowSelection}
|
|
139
139
|
updateRowSelections={this.updateRowSelections}
|
|
140
140
|
light={this.props.controller.getLight()}
|
|
141
|
+
emptyTablePlaceholder={this.props.control.additionalText}
|
|
141
142
|
/>);
|
|
142
143
|
|
|
143
144
|
var content = (
|
|
@@ -110,6 +110,7 @@ class SomeofselectControl extends React.Component {
|
|
|
110
110
|
selectable
|
|
111
111
|
showHeader={false}
|
|
112
112
|
light={this.props.controller.getLight()}
|
|
113
|
+
emptyTablePlaceholder={this.props.control.additionalText}
|
|
113
114
|
/>
|
|
114
115
|
<ValidationMessage state={this.props.state} messageInfo={this.props.messageInfo} inTable={this.props.tableControl} />
|
|
115
116
|
</div>
|
|
@@ -88,7 +88,7 @@ class ControlPanel {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
class ActionPanel {
|
|
91
|
-
constructor(id, panelType, className, nestedPanel, actions) {
|
|
91
|
+
constructor(id, panelType, className, nestedPanel, actions, label, description) {
|
|
92
92
|
this.id = id;
|
|
93
93
|
this.panelType = panelType;
|
|
94
94
|
this.nestedPanel = nestedPanel;
|
|
@@ -96,6 +96,12 @@ class ActionPanel {
|
|
|
96
96
|
if (className) {
|
|
97
97
|
this.className = className;
|
|
98
98
|
}
|
|
99
|
+
if (label) {
|
|
100
|
+
this.label = label;
|
|
101
|
+
}
|
|
102
|
+
if (description) {
|
|
103
|
+
this.description = description;
|
|
104
|
+
}
|
|
99
105
|
}
|
|
100
106
|
}
|
|
101
107
|
|
|
@@ -201,12 +207,24 @@ function _makeUIItem(parameterMetadata, actionMetadata, group, structureMetadata
|
|
|
201
207
|
return UIItem.makePanel(new ControlPanel(groupName, PanelType.SUMMARY, groupClassName, nestedPanel, panSubItems, groupLabel));
|
|
202
208
|
}
|
|
203
209
|
case GroupType.ACTION_PANEL: {
|
|
210
|
+
groupLabel = l10nProvider.l10nResource(group.label);
|
|
211
|
+
let groupDesc;
|
|
212
|
+
if (group.description) {
|
|
213
|
+
groupDesc = new Description(l10nProvider.l10nResource(group.description),
|
|
214
|
+
null,
|
|
215
|
+
group.description ? group.description.link : null);
|
|
216
|
+
}
|
|
204
217
|
return UIItem.makePanel(new ActionPanel(groupName, PanelType.ACTION_PANEL, groupClassName, nestedPanel,
|
|
205
|
-
_makeActions(parameterMetadata, actionMetadata, group, structureMetadata, l10nProvider)));
|
|
218
|
+
_makeActions(parameterMetadata, actionMetadata, group, structureMetadata, l10nProvider), groupLabel, groupDesc));
|
|
206
219
|
}
|
|
207
220
|
case GroupType.TEXT_PANEL: {
|
|
208
221
|
groupLabel = l10nProvider.l10nResource(group.label);
|
|
209
|
-
|
|
222
|
+
let groupDesc;
|
|
223
|
+
if (group.description) {
|
|
224
|
+
groupDesc = new Description(l10nProvider.l10nResource(group.description),
|
|
225
|
+
group.description ? group.description.placement : null,
|
|
226
|
+
group.description ? group.description.link : null);
|
|
227
|
+
}
|
|
210
228
|
return UIItem.makeTextPanel(groupName, groupLabel, groupDesc, groupClassName, nestedPanel);
|
|
211
229
|
}
|
|
212
230
|
case GroupType.TWISTY_PANEL: {
|
|
@@ -552,6 +570,11 @@ function _makeControl(parameterMetadata, paramName, group, structureDefinition,
|
|
|
552
570
|
if (parameter.getRole() === ParamRole.ENUM) {
|
|
553
571
|
valueLabels = _parameterValueLabels(parameter, l10nProvider);
|
|
554
572
|
}
|
|
573
|
+
|
|
574
|
+
let valueDescs;
|
|
575
|
+
if (parameter.getRole() === ParamRole.ENUM) {
|
|
576
|
+
valueDescs = _parameterValueDescription(parameter, l10nProvider);
|
|
577
|
+
}
|
|
555
578
|
let action;
|
|
556
579
|
if (!isSubControl && parameter.actionRef) {
|
|
557
580
|
action = _makeAction(actionMetadata.getAction(parameter.actionRef), l10nProvider);
|
|
@@ -569,6 +592,7 @@ function _makeControl(parameterMetadata, paramName, group, structureDefinition,
|
|
|
569
592
|
settings.orientation = orientation;
|
|
570
593
|
settings.values = parameter.getValidValues();
|
|
571
594
|
settings.valueLabels = valueLabels;
|
|
595
|
+
settings.valueDescs = valueDescs;
|
|
572
596
|
settings.valueIcons = parameter.valueIcons;
|
|
573
597
|
settings.sortable = parameter.sortable;
|
|
574
598
|
settings.filterable = parameter.filterable;
|
|
@@ -743,6 +767,24 @@ function _parameterValueLabels(parameter, l10nProvider) {
|
|
|
743
767
|
return [];
|
|
744
768
|
}
|
|
745
769
|
|
|
770
|
+
function _parameterValueDescription(parameter, l10nProvider) {
|
|
771
|
+
if (Array.isArray(parameter.getValidValues())) {
|
|
772
|
+
let key;
|
|
773
|
+
if (parameter.resource_key) {
|
|
774
|
+
key = parameter.resource_key;
|
|
775
|
+
} else {
|
|
776
|
+
key = parameter.name;
|
|
777
|
+
}
|
|
778
|
+
const paramDescs = [];
|
|
779
|
+
parameter.getValidValues().forEach(function(paramValue) {
|
|
780
|
+
paramDescs.push(l10nProvider.l10nValueDesc(key, String(paramValue)));
|
|
781
|
+
});
|
|
782
|
+
return paramDescs;
|
|
783
|
+
}
|
|
784
|
+
return [];
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
|
|
746
788
|
export {
|
|
747
789
|
makePrimaryTab, _makeControl as makeControl
|
|
748
790
|
};
|
|
@@ -19,22 +19,57 @@ import PropTypes from "prop-types";
|
|
|
19
19
|
import { connect } from "react-redux";
|
|
20
20
|
import classNames from "classnames";
|
|
21
21
|
import * as ControlUtils from "./../../util/control-utils";
|
|
22
|
-
import { STATES } from "./../../constants/constants";
|
|
22
|
+
import { STATES, CARBON_ICONS } from "./../../constants/constants";
|
|
23
|
+
import { evaluateText } from "./../../util/property-utils.js";
|
|
24
|
+
import Tooltip from "./../../../tooltip/tooltip.jsx";
|
|
25
|
+
import Icon from "./../../../icons/icon.jsx";
|
|
26
|
+
import { isEmpty } from "lodash";
|
|
23
27
|
|
|
24
28
|
class ActionPanel extends Component {
|
|
25
29
|
render() {
|
|
26
30
|
const className = this.props.panel.className ? this.props.panel.className : "";
|
|
31
|
+
const hidden = this.props.panelState === STATES.HIDDEN;
|
|
32
|
+
const disabled = this.props.panelState === STATES.DISABLED;
|
|
33
|
+
let label;
|
|
34
|
+
if (this.props.panel.label) {
|
|
35
|
+
let tooltip;
|
|
36
|
+
if (this.props.panel.description && !isEmpty(this.props.panel.description.text)) {
|
|
37
|
+
const dynamicDescriptionText = evaluateText(this.props.panel.description.text, this.props.controller);
|
|
38
|
+
// If tooltip has a link, add propertyId in the link object
|
|
39
|
+
if (this.props.panel.description.link) {
|
|
40
|
+
this.props.panel.description.link.propertyId = { name: this.props.panel.id };
|
|
41
|
+
}
|
|
42
|
+
tooltip = (<Tooltip
|
|
43
|
+
id={`tooltip-label-${this.props.panel.id}`}
|
|
44
|
+
tip={dynamicDescriptionText}
|
|
45
|
+
link={this.props.panel.description.link ? this.props.panel.description.link : null}
|
|
46
|
+
tooltipLinkHandler={this.props.controller.getHandlers().tooltipLinkHandler}
|
|
47
|
+
direction="bottom"
|
|
48
|
+
disable={hidden || disabled}
|
|
49
|
+
showToolTipOnClick
|
|
50
|
+
>
|
|
51
|
+
<Icon type={CARBON_ICONS.INFORMATION} className="properties-control-description-icon-info" />
|
|
52
|
+
</Tooltip>);
|
|
53
|
+
}
|
|
54
|
+
label = (
|
|
55
|
+
<div className={classNames("properties-label-container")}>
|
|
56
|
+
<label className="properties-control-label">{this.props.panel.label}</label>
|
|
57
|
+
{tooltip}
|
|
58
|
+
</div>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
27
61
|
return (
|
|
28
62
|
<div
|
|
29
63
|
className={classNames(
|
|
30
64
|
"properties-action-panel",
|
|
31
|
-
{ "hide":
|
|
65
|
+
{ "hide": hidden },
|
|
32
66
|
{ "properties-control-nested-panel": this.props.panel.nestedPanel },
|
|
33
67
|
className
|
|
34
68
|
)}
|
|
35
69
|
data-id={ControlUtils.getDataId({ name: this.props.panel.id })}
|
|
36
|
-
disabled={
|
|
70
|
+
disabled={disabled}
|
|
37
71
|
>
|
|
72
|
+
{label}
|
|
38
73
|
{this.props.children}
|
|
39
74
|
</div>);
|
|
40
75
|
}
|
|
@@ -19,24 +19,55 @@ import PropTypes from "prop-types";
|
|
|
19
19
|
import { connect } from "react-redux";
|
|
20
20
|
import { evaluateText } from "./../../util/property-utils.js";
|
|
21
21
|
import classNames from "classnames";
|
|
22
|
-
import { STATES } from "./../../constants/constants";
|
|
22
|
+
import { STATES, CARBON_ICONS } from "./../../constants/constants";
|
|
23
|
+
import { isEmpty } from "lodash";
|
|
24
|
+
import Tooltip from "./../../../tooltip/tooltip.jsx";
|
|
25
|
+
import Icon from "./../../../icons/icon.jsx";
|
|
23
26
|
|
|
24
27
|
class TextPanel extends Component {
|
|
25
28
|
render() {
|
|
26
29
|
const className = this.props.panel.className ? this.props.panel.className : "";
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
const hidden = this.props.panelState === STATES.HIDDEN;
|
|
31
|
+
const disabled = this.props.panelState === STATES.DISABLED;
|
|
32
|
+
let label = this.props.panel.label ? (<div className="panel-label">{this.props.panel.label}</div>) : null;
|
|
33
|
+
let description;
|
|
34
|
+
if (this.props.panel.description && !isEmpty(this.props.panel.description.text)) {
|
|
35
|
+
const dynamicDescriptionText = evaluateText(this.props.panel.description.text, this.props.controller);
|
|
36
|
+
if (this.props.panel.description.placement === "as_tooltip") {
|
|
37
|
+
// If tooltip has a link, add propertyId in the link object
|
|
38
|
+
if (this.props.panel.description.link) {
|
|
39
|
+
this.props.panel.description.link.propertyId = { name: this.props.panel.id };
|
|
40
|
+
}
|
|
41
|
+
const tooltip = (<Tooltip
|
|
42
|
+
id={`tooltip-label-${this.props.panel.id}`}
|
|
43
|
+
tip={dynamicDescriptionText}
|
|
44
|
+
link={this.props.panel.description.link ? this.props.panel.description.link : null}
|
|
45
|
+
tooltipLinkHandler={this.props.controller.getHandlers().tooltipLinkHandler}
|
|
46
|
+
direction="bottom"
|
|
47
|
+
disable={hidden || disabled}
|
|
48
|
+
showToolTipOnClick
|
|
49
|
+
>
|
|
50
|
+
<Icon type={CARBON_ICONS.INFORMATION} className="properties-control-description-icon-info" />
|
|
51
|
+
</Tooltip>);
|
|
52
|
+
label = (
|
|
53
|
+
<div className={classNames("properties-label-container")}>
|
|
54
|
+
{label}
|
|
55
|
+
{tooltip}
|
|
56
|
+
</div>
|
|
57
|
+
);
|
|
58
|
+
} else {
|
|
59
|
+
description = <div className="panel-description">{dynamicDescriptionText}</div>;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
31
62
|
return (
|
|
32
63
|
<div
|
|
33
64
|
className={classNames(
|
|
34
65
|
"properties-text-panel",
|
|
35
|
-
{ "hide":
|
|
66
|
+
{ "hide": hidden },
|
|
36
67
|
{ "properties-control-nested-panel": this.props.panel.nestedPanel },
|
|
37
68
|
className
|
|
38
69
|
)}
|
|
39
|
-
disabled={
|
|
70
|
+
disabled={disabled}
|
|
40
71
|
>
|
|
41
72
|
{label}
|
|
42
73
|
{description}
|
|
@@ -15,9 +15,6 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
.properties-text-panel {
|
|
18
|
-
:not(:empty) {
|
|
19
|
-
padding-bottom: $spacing-05;
|
|
20
|
-
}
|
|
21
18
|
.panel-label {
|
|
22
19
|
@include carbon--type-style("productive-heading-01");
|
|
23
20
|
color: $text-01;
|
|
@@ -26,6 +23,10 @@
|
|
|
26
23
|
.panel-description {
|
|
27
24
|
@include carbon--type-style("body-short-01");
|
|
28
25
|
color: $text-01;
|
|
26
|
+
padding-bottom: $spacing-05;
|
|
27
|
+
}
|
|
28
|
+
.tooltip-container {
|
|
29
|
+
margin-bottom: $spacing-03;
|
|
29
30
|
}
|
|
30
31
|
&[disabled] {
|
|
31
32
|
opacity: 0.5;
|
|
@@ -1051,10 +1051,11 @@ export default class PropertiesController {
|
|
|
1051
1051
|
/*
|
|
1052
1052
|
* return the property value for the given 'inPropertyId'
|
|
1053
1053
|
* options - optional object of config options where
|
|
1054
|
-
* filterHiddenDisabled: true - filter out values from controls
|
|
1054
|
+
* filterHiddenDisabled: true - filter out values from controls having state "hidden" or "disabled"
|
|
1055
1055
|
* applyProperties: true - this function is called from PropertiesMain.applyPropertiesEditing()
|
|
1056
|
-
* filterHidden: true - filter out values from controls
|
|
1057
|
-
* filterDisabled: true - filter out values from controls
|
|
1056
|
+
* filterHidden: true - filter out values from controls having state "hidden"
|
|
1057
|
+
* filterDisabled: true - filter out values from controls having state "disabled"
|
|
1058
|
+
* filterHiddenControls: true - filter out values from controls having type "hidden"
|
|
1058
1059
|
*/
|
|
1059
1060
|
getPropertyValue(inPropertyId, options, defaultValue) {
|
|
1060
1061
|
const propertyId = this.convertPropertyId(inPropertyId);
|
|
@@ -1064,10 +1065,16 @@ export default class PropertiesController {
|
|
|
1064
1065
|
// don't return hidden/disabled values
|
|
1065
1066
|
const filterHidden = options && (options.filterHiddenDisabled || options.filterHidden);
|
|
1066
1067
|
const filterDisabled = options && (options.filterHiddenDisabled || options.filterDisabled);
|
|
1067
|
-
|
|
1068
|
+
const filterHiddenControls = options && options.filterHiddenControls;
|
|
1069
|
+
if (filterHidden || filterDisabled || filterHiddenControls) {
|
|
1068
1070
|
// top level value
|
|
1069
1071
|
const controlState = this.getControlState(propertyId);
|
|
1070
|
-
|
|
1072
|
+
const controlType = this.getControlType(propertyId);
|
|
1073
|
+
if (
|
|
1074
|
+
(controlState === STATES.DISABLED && filterDisabled) ||
|
|
1075
|
+
(controlState === STATES.HIDDEN && filterHidden) ||
|
|
1076
|
+
(controlType === ControlType.HIDDEN && filterHiddenControls)
|
|
1077
|
+
) {
|
|
1071
1078
|
return filteredValue;
|
|
1072
1079
|
}
|
|
1073
1080
|
// copy array to modify it and clear out disabled/hidden values
|
|
@@ -1083,7 +1090,12 @@ export default class PropertiesController {
|
|
|
1083
1090
|
col: colIdx
|
|
1084
1091
|
};
|
|
1085
1092
|
const valueState = this.getControlState(colPropertyId);
|
|
1086
|
-
|
|
1093
|
+
const valueType = this.getControlType(colPropertyId);
|
|
1094
|
+
if (
|
|
1095
|
+
(valueState === STATES.DISABLED && filterDisabled) ||
|
|
1096
|
+
(valueState === STATES.HIDDEN && filterHidden) ||
|
|
1097
|
+
(valueType === ControlType.HIDDEN && filterHiddenControls)
|
|
1098
|
+
) {
|
|
1087
1099
|
filteredValue[rowIdx][colIdx] = null;
|
|
1088
1100
|
}
|
|
1089
1101
|
}
|
|
@@ -1121,15 +1133,16 @@ export default class PropertiesController {
|
|
|
1121
1133
|
/*
|
|
1122
1134
|
* return the property values for all controls
|
|
1123
1135
|
* options - optional object of config options where
|
|
1124
|
-
* filterHiddenDisabled: true - filter out values from controls
|
|
1136
|
+
* filterHiddenDisabled: true - filter out values from controls having state "hidden" or "disabled"
|
|
1125
1137
|
* applyProperties: true - this function is called from PropertiesMain.applyPropertiesEditing()
|
|
1126
|
-
* filterHidden: true - filter out values from controls
|
|
1127
|
-
* filterDisabled: true - filter out values from controls
|
|
1138
|
+
* filterHidden: true - filter out values from controls having state "hidden"
|
|
1139
|
+
* filterDisabled: true - filter out values from controls having state "disabled"
|
|
1140
|
+
* filterHiddenControls: true - filter out values from controls having type "hidden"
|
|
1128
1141
|
*/
|
|
1129
1142
|
getPropertyValues(options) {
|
|
1130
1143
|
const propertyValues = this.propertiesStore.getPropertyValues();
|
|
1131
1144
|
let returnValues = propertyValues;
|
|
1132
|
-
if (options && (options.filterHiddenDisabled || options.filterHidden || options.filterDisabled)) {
|
|
1145
|
+
if (options && (options.filterHiddenDisabled || options.filterHidden || options.filterDisabled || options.filterHiddenControls)) {
|
|
1133
1146
|
const filteredValues = {};
|
|
1134
1147
|
for (const propKey in propertyValues) {
|
|
1135
1148
|
if (!has(propertyValues, propKey)) {
|
|
@@ -1346,7 +1359,8 @@ export default class PropertiesController {
|
|
|
1346
1359
|
// don't return hidden message
|
|
1347
1360
|
if (filterHiddenDisable) {
|
|
1348
1361
|
const controlState = this.getControlState(propertyId);
|
|
1349
|
-
|
|
1362
|
+
const controlType = this.getControlType(propertyId);
|
|
1363
|
+
if (controlState === STATES.DISABLED || controlState === STATES.HIDDEN || controlType === ControlType.HIDDEN) {
|
|
1350
1364
|
return null;
|
|
1351
1365
|
}
|
|
1352
1366
|
}
|
|
@@ -1444,7 +1458,8 @@ export default class PropertiesController {
|
|
|
1444
1458
|
_filterHiddenDisabledErrors(messages) {
|
|
1445
1459
|
const filterCondition = (testMessage, propertyId) => {
|
|
1446
1460
|
const controlState = this.getControlState(propertyId);
|
|
1447
|
-
|
|
1461
|
+
const controlType = this.getControlType(propertyId);
|
|
1462
|
+
return controlState !== STATES.HIDDEN && controlState !== STATES.DISABLED && controlType !== ControlType.HIDDEN;
|
|
1448
1463
|
};
|
|
1449
1464
|
const filteredMessages = this._filterErrors(messages, filterCondition);
|
|
1450
1465
|
return filteredMessages;
|
|
@@ -1632,6 +1647,9 @@ export default class PropertiesController {
|
|
|
1632
1647
|
}
|
|
1633
1648
|
|
|
1634
1649
|
getControlType(propertyId) {
|
|
1650
|
+
if (typeof propertyId === "undefined") {
|
|
1651
|
+
return null;
|
|
1652
|
+
}
|
|
1635
1653
|
const control = this.getControl(propertyId);
|
|
1636
1654
|
if (control) {
|
|
1637
1655
|
return control.controlType;
|
|
@@ -1639,6 +1657,15 @@ export default class PropertiesController {
|
|
|
1639
1657
|
return null;
|
|
1640
1658
|
}
|
|
1641
1659
|
|
|
1660
|
+
// check if given column is visible in the table
|
|
1661
|
+
getColumnVisibility(propertyId, columnIndex) {
|
|
1662
|
+
return this.controls[propertyId.name][columnIndex].visible;
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
toggleColumnVisibility(propertyId, columnIndex, value) {
|
|
1666
|
+
this.controls[propertyId.name][columnIndex].visible = value;
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1642
1669
|
/*
|
|
1643
1670
|
* Summary Panel controls Methods
|
|
1644
1671
|
*/
|
|
@@ -423,7 +423,7 @@ function updatePanelChildrenStatesForPanelIds(panelIds, controller) {
|
|
|
423
423
|
* @param {object} propertyId. required.
|
|
424
424
|
* @param {string} proposed new state value. required.
|
|
425
425
|
*/
|
|
426
|
-
function updateState(refState, propertyId, value) {
|
|
426
|
+
function updateState(refState, propertyId, value, controller) {
|
|
427
427
|
let propState = refState[propertyId.name];
|
|
428
428
|
if (!propState) {
|
|
429
429
|
propState = {};
|
|
@@ -452,6 +452,12 @@ function updateState(refState, propertyId, value) {
|
|
|
452
452
|
} else {
|
|
453
453
|
// Table column level
|
|
454
454
|
propState[colId].value = newPropState.value;
|
|
455
|
+
// if all cells are "hidden", hide an entire column
|
|
456
|
+
const hideColumn = (value === "hidden");
|
|
457
|
+
const updateColumnVisibility = controller.getColumnVisibility(propertyId, propertyId.col) !== !hideColumn;
|
|
458
|
+
if (typeof controller !== "undefined" && updateColumnVisibility) {
|
|
459
|
+
controller.toggleColumnVisibility(propertyId, propertyId.col, !hideColumn);
|
|
460
|
+
}
|
|
455
461
|
}
|
|
456
462
|
} else {
|
|
457
463
|
// Control level
|
|
@@ -841,10 +847,10 @@ function _updateRefsState(stateOn, definition, propertyId, newStates, controller
|
|
|
841
847
|
}
|
|
842
848
|
} else if (stateOn === true) { // control|panel should be visible || enabled
|
|
843
849
|
if (referenceId && currentState !== newOnState && currentState !== notAllowedState) {
|
|
844
|
-
updateState(refStates, referenceId, newOnState);
|
|
850
|
+
updateState(refStates, referenceId, newOnState, controller);
|
|
845
851
|
}
|
|
846
852
|
} else if (referenceId && (visibleControl || (!visibleControl && currentState !== notAllowedState))) {
|
|
847
|
-
_updateStateIfPanel(newStates, referenceId, newOffState, refStates);
|
|
853
|
+
_updateStateIfPanel(newStates, referenceId, newOffState, refStates, controller);
|
|
848
854
|
}
|
|
849
855
|
}
|
|
850
856
|
}
|
|
@@ -975,7 +981,7 @@ function _updateStateIfParent(newStates, panel, state, controller, referenceId)
|
|
|
975
981
|
}
|
|
976
982
|
|
|
977
983
|
// A control can only set a state to enabled if it was previously disabled. The same applies to hidden and visible
|
|
978
|
-
function _updateStateIfPanel(newStates, referenceId, state, refStates) {
|
|
984
|
+
function _updateStateIfPanel(newStates, referenceId, state, refStates, controller) {
|
|
979
985
|
const controlName = referenceId.name;
|
|
980
986
|
if (refStates[controlName]) {
|
|
981
987
|
let prevValue = refStates[controlName].value;
|
|
@@ -985,10 +991,10 @@ function _updateStateIfPanel(newStates, referenceId, state, refStates) {
|
|
|
985
991
|
if (typeof referenceId.row !== "undefined" && refStates[controlName][referenceId.col][referenceId.row]) {
|
|
986
992
|
prevValue = refStates[controlName][referenceId.col][referenceId.row].value;
|
|
987
993
|
} else { // first time setting control state for each row in the column
|
|
988
|
-
updateState(refStates, referenceId, state);
|
|
994
|
+
updateState(refStates, referenceId, state, controller);
|
|
989
995
|
}
|
|
990
996
|
} else { // first time setting control state for the column
|
|
991
|
-
updateState(refStates, referenceId, state);
|
|
997
|
+
updateState(refStates, referenceId, state, controller);
|
|
992
998
|
}
|
|
993
999
|
}
|
|
994
1000
|
// Can only set a state to enabled if it was previously disabled. The same applies to hidden and visible
|
|
@@ -996,10 +1002,10 @@ function _updateStateIfPanel(newStates, referenceId, state, refStates) {
|
|
|
996
1002
|
(prevValue === STATES.DISABLED && state === STATES.ENABLED) ||
|
|
997
1003
|
(prevValue === STATES.DISABLED && state === STATES.HIDDEN) ||
|
|
998
1004
|
(prevValue === STATES.HIDDEN && state === STATES.VISIBLE)) {
|
|
999
|
-
updateState(refStates, referenceId, state);
|
|
1005
|
+
updateState(refStates, referenceId, state, controller);
|
|
1000
1006
|
}
|
|
1001
1007
|
} else { // first time setting control state
|
|
1002
|
-
updateState(refStates, referenceId, state);
|
|
1008
|
+
updateState(refStates, referenceId, state, controller);
|
|
1003
1009
|
}
|
|
1004
1010
|
}
|
|
1005
1011
|
|
|
@@ -77,6 +77,12 @@ export class L10nProvider {
|
|
|
77
77
|
const lookupKey = baseKey + "." + value + ".label";
|
|
78
78
|
return this.l10n(lookupKey, value);
|
|
79
79
|
}
|
|
80
|
+
|
|
81
|
+
l10nValueDesc(baseKey, value) {
|
|
82
|
+
const lookupKey = baseKey + "." + value + ".desc";
|
|
83
|
+
const desc = this.l10n(lookupKey, value);
|
|
84
|
+
return (desc !== value ? desc : null);
|
|
85
|
+
}
|
|
80
86
|
}
|
|
81
87
|
|
|
82
88
|
export class ResourceDef {
|