@elyra/canvas 13.41.0 → 13.41.1

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.
Files changed (44) hide show
  1. package/dist/{common-canvas-faa1c8f9.js → common-canvas-614f599a.js} +2 -2
  2. package/dist/{common-canvas-faa1c8f9.js.map → common-canvas-614f599a.js.map} +1 -1
  3. package/dist/{common-canvas-91cd796c.js → common-canvas-63cf169d.js} +2 -2
  4. package/dist/{common-canvas-91cd796c.js.map → common-canvas-63cf169d.js.map} +1 -1
  5. package/dist/common-canvas.es.js +1 -1
  6. package/dist/common-canvas.js +1 -1
  7. package/dist/common-properties-9cf649aa.js +2 -0
  8. package/dist/common-properties-9cf649aa.js.map +1 -0
  9. package/dist/common-properties-dcfb5ebe.js +2 -0
  10. package/dist/common-properties-dcfb5ebe.js.map +1 -0
  11. package/dist/flexible-table-4463a683.js +2 -0
  12. package/dist/flexible-table-4463a683.js.map +1 -0
  13. package/dist/{flexible-table-2cf782bc.js → flexible-table-e75a6d5b.js} +2 -2
  14. package/dist/flexible-table-e75a6d5b.js.map +1 -0
  15. package/dist/{index-0b2515f9.js → index-355fd3e1.js} +2 -2
  16. package/dist/{index-0b2515f9.js.map → index-355fd3e1.js.map} +1 -1
  17. package/dist/{index-27371669.js → index-4f11af02.js} +2 -2
  18. package/dist/{index-27371669.js.map → index-4f11af02.js.map} +1 -1
  19. package/dist/lib/canvas.es.js +1 -1
  20. package/dist/lib/canvas.js +1 -1
  21. package/dist/lib/properties/field-picker.es.js +1 -1
  22. package/dist/lib/properties/field-picker.js +1 -1
  23. package/dist/lib/properties/flexible-table.es.js +1 -1
  24. package/dist/lib/properties/flexible-table.js +1 -1
  25. package/dist/lib/properties.es.js +1 -1
  26. package/dist/lib/properties.js +1 -1
  27. package/dist/styles/common-canvas.min.css +1 -1
  28. package/dist/{toolbar-cd90b048.js → toolbar-23100028.js} +2 -2
  29. package/dist/{toolbar-cd90b048.js.map → toolbar-23100028.js.map} +1 -1
  30. package/dist/{toolbar-43e63291.js → toolbar-9f98432a.js} +2 -2
  31. package/dist/{toolbar-43e63291.js.map → toolbar-9f98432a.js.map} +1 -1
  32. package/package.json +2 -2
  33. package/src/command-actions/commonPropertiesAction.js +10 -4
  34. package/src/common-properties/components/virtualized-grid/virtualized-grid.jsx +16 -8
  35. package/src/toolbar/toolbar-sub-menu-item.jsx +11 -13
  36. package/src/toolbar/toolbar.scss +1 -1
  37. package/stats.html +1 -1
  38. package/dist/common-properties-02756e6a.js +0 -2
  39. package/dist/common-properties-02756e6a.js.map +0 -1
  40. package/dist/common-properties-d054dfb5.js +0 -2
  41. package/dist/common-properties-d054dfb5.js.map +0 -1
  42. package/dist/flexible-table-1cf1378f.js +0 -2
  43. package/dist/flexible-table-1cf1378f.js.map +0 -1
  44. package/dist/flexible-table-2cf782bc.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common-properties-9cf649aa.js","sources":["../node_modules/lodash/_basePickBy.js","../node_modules/lodash/_basePick.js","../node_modules/lodash/pick.js","../src/common-properties/components/properties-modal/properties-modal.jsx","../src/common-properties/components/properties-modal/index.js","../src/common-properties/components/properties-editor/properties-editor.jsx","../src/common-properties/components/properties-editor/index.js","../src/common-properties/components/main-editor-properties-buttons/main-editor-properties-buttons.jsx","../src/common-properties/panels/tearsheet/tearsheet.jsx","../node_modules/lodash/_baseFilter.js","../node_modules/lodash/filter.js","../src/common-properties/actions.js","../src/common-properties/panels/selector/selector.jsx","../src/common-properties/components/wide-flyout/wide-flyout.jsx","../src/common-properties/components/wide-flyout/index.js","../src/common-properties/util/control-utils.js","../src/common-properties/panels/summary/summary.jsx","../src/common-properties/panels/twisty/twisty.jsx","../src/common-properties/panels/sub-panel/invoker.jsx","../src/common-properties/panels/sub-panel/button.jsx","../src/common-properties/panels/column/column.jsx","../src/common-properties/panels/control/control.jsx","../src/common-properties/panels/subtabs/subtabs.jsx","../src/common-properties/panels/text-panel/text-panel.jsx","../src/common-properties/panels/action-panel/action-panel.jsx","../src/common-properties/actions/button/button.jsx","../src/common-properties/actions/image/image.jsx","../src/common-properties/actions/action-factory.js","../src/common-properties/components/editor-form/editor-form.jsx","../node_modules/lodash/propertyOf.js","../src/common-properties/form/TitleInfo.js","../src/common-properties/util/L10nProvider.js","../src/common-properties/form/GroupInfo.js","../src/common-properties/form/ActionInfo.js","../src/common-properties/form/ParameterInfo.js","../src/common-properties/form/ButtonInfo.js","../src/common-properties/form/StructureInfo.js","../src/common-properties/form/PropertyDef.js","../src/common-properties/form/ControlInfo.js","../src/common-properties/form/UIItem.js","../src/common-properties/form/EditorForm.js","../src/common-properties/form/Conditions.js","../src/common-properties/form/Form.js","../src/command-actions/commonPropertiesAction.js","../node_modules/lodash/_assignMergeValue.js","../node_modules/lodash/_safeGet.js","../node_modules/lodash/toPlainObject.js","../node_modules/lodash/_baseMergeDeep.js","../node_modules/lodash/_baseMerge.js","../node_modules/lodash/_createAssigner.js","../node_modules/lodash/merge.js","../node_modules/lodash/difference.js","../node_modules/lodash/assign.js","../src/common-properties/reducers/properties.js","../src/common-properties/reducers/control-states.js","../src/common-properties/reducers/panel-states.js","../src/common-properties/reducers/action-states.js","../src/common-properties/reducers/error-messages.js","../src/common-properties/reducers/dataset-metadata.js","../src/common-properties/reducers/row-selections.js","../src/common-properties/reducers/row-static.js","../src/common-properties/reducers/component-metadata.js","../src/common-properties/reducers/disable-row-move-buttons.js","../src/common-properties/reducers/save-button-disable.js","../src/common-properties/reducers/wide-flyout-primary-button-disable.js","../src/common-properties/reducers/properties-settings.js","../src/common-properties/reducers/tearsheet-states.js","../src/common-properties/properties-store.js","../src/common-properties/ui-conditions/ui-conditions-parser.js","../src/common-properties/controls/expression/expressionInfo-parser.js","../src/common-properties/ui-conditions/ui-groups-parser.js","../node_modules/lodash/unionWith.js","../node_modules/lodash/_baseIntersection.js","../node_modules/lodash/_castArrayLikeObject.js","../node_modules/lodash/intersectionWith.js","../src/common-properties/ui-conditions/ui-conditions.js","../src/common-properties/ui-conditions/conditions-utils.js","../node_modules/lodash/intersection.js","../src/common-properties/components/validation-message/validation-message.jsx","../src/common-properties/components/validation-message/index.js","../src/common-properties/util/date-utils.js","../src/common-properties/controls/readonly/readonly.jsx","../src/common-properties/controls/textfield/textfield.jsx","../src/common-properties/controls/toggletext/toggletext.jsx","../src/common-properties/controls/textarea/textarea.jsx","../src/common-properties/controls/numberfield/numberfield.jsx","../node_modules/lodash/findIndex.js","../src/common-properties/components/table-buttons/table-buttons.jsx","../src/common-properties/panels/sub-panel/cell.jsx","../src/common-properties/components/table-toolbar/table-toolbar.jsx","../src/common-properties/controls/abstract-table.jsx","../src/common-properties/components/empty-table/empty-table.jsx","../src/common-properties/controls/list/list.jsx","../node_modules/lodash/concat.js","../src/common-properties/controls/expression/expression-builder/expression-select-field-function.jsx","../src/common-properties/controls/expression/expression-builder/expression-select-operator.jsx","../src/common-properties/controls/expression/expression-builder/expression-selection-panel.jsx","../src/common-properties/controls/expression/expression-builder/expression-builder.jsx","../src/common-properties/controls/expression/expression-toggle/expression-toggle.jsx","../node_modules/crelt/index.js","../node_modules/@codemirror/lint/dist/index.js","../node_modules/@lezer/common/dist/index.js","../node_modules/@lezer/highlight/dist/index.js","../node_modules/@codemirror/legacy-modes/mode/r.js","../src/common-properties/controls/expression/languages/r-hint.js","../src/common-properties/controls/expression/expression.jsx","../src/common-properties/controls/passwordfield/passwordfield.jsx","../src/common-properties/controls/datefield/datefield.jsx","../src/common-properties/controls/datepicker/datepicker.jsx","../src/common-properties/controls/datepicker-range/datepicker-range.jsx","../src/common-properties/controls/timefield/timefield.jsx","../src/common-properties/controls/checkbox/checkbox.jsx","../src/common-properties/controls/toggle/toggle.jsx","../src/common-properties/controls/checkboxset/checkboxset.jsx","../src/common-properties/controls/radioset/radioset.jsx","../src/common-properties/controls/dropdown/dropdown.jsx","../src/common-properties/controls/multiselect/multiselect.jsx","../src/common-properties/controls/someofselect/someofselect.jsx","../src/common-properties/controls/selectcolumns/selectcolumns.jsx","../src/common-properties/controls/structureeditor/structureeditor.jsx","../node_modules/lodash/negate.js","../node_modules/lodash/reject.js","../src/common-properties/controls/structuretable/structuretable.jsx","../src/common-properties/controls/structurelisteditor/structurelisteditor.jsx","../src/common-properties/controls/readonlytable/readonlytable.jsx","../src/common-properties/controls/slider/slider.jsx","../src/common-properties/components/control-item/control-item.jsx","../src/common-properties/controls/control-factory.js","../src/common-properties/ui-conditions/condition-ops/cellNotEmpty.js","../src/common-properties/ui-conditions/condition-ops/colNotExists.js","../src/common-properties/ui-conditions/condition-ops/colDoesExists.js","../src/common-properties/ui-conditions/condition-ops/contains.js","../src/common-properties/ui-conditions/condition-ops/equals.js","../src/common-properties/ui-conditions/condition-ops/greaterThan.js","../src/common-properties/ui-conditions/condition-ops/isEmpty.js","../src/common-properties/ui-conditions/condition-ops/isNotEmpty.js","../src/common-properties/ui-conditions/condition-ops/lessThan.js","../src/common-properties/ui-conditions/condition-ops/matches.js","../src/common-properties/ui-conditions/condition-ops/notContains.js","../src/common-properties/ui-conditions/condition-ops/notEquals.js","../src/common-properties/ui-conditions/condition-ops/notMatches.js","../src/common-properties/ui-conditions/condition-ops/isDateTime.js","../src/common-properties/ui-conditions/condition-ops/dmTypeEquals.js","../src/common-properties/ui-conditions/condition-ops/dmTypeNotEquals.js","../src/common-properties/ui-conditions/condition-ops/dmMeasurementEquals.js","../src/common-properties/ui-conditions/condition-ops/dmMeasurementNotEquals.js","../src/common-properties/ui-conditions/condition-ops/dmRoleEquals.js","../src/common-properties/ui-conditions/condition-ops/dmRoleNotEquals.js","../src/common-properties/ui-conditions/condition-ops/lengthEquals.js","../src/common-properties/ui-conditions/condition-ops/lengthLessThan.js","../src/common-properties/ui-conditions/condition-ops/lengthGreaterThan.js","../src/common-properties/ui-conditions/condition-ops/condition-ops.js","../src/common-properties/properties-controller.js","../src/common-properties/schema-validator/properties-schema-validator.js","../src/common-properties/components/title-editor/title-editor.jsx","../src/common-properties/properties-main/properties-main.jsx","../src/common-properties/common-properties.jsx"],"sourcesContent":["var baseGet = require('./_baseGet'),\n baseSet = require('./_baseSet'),\n castPath = require('./_castPath');\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n}\n\nmodule.exports = basePickBy;\n","var basePickBy = require('./_basePickBy'),\n hasIn = require('./hasIn');\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n}\n\nmodule.exports = basePick;\n","var basePick = require('./_basePick'),\n flatRest = require('./_flatRest');\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\n\nmodule.exports = pick;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Modal } from \"@carbon/react\";\nimport classNames from \"classnames\";\nimport { Portal } from \"react-portal\";\nimport { Size } from \"./../../constants/form-constants\";\nimport { CARBON_MODAL_SIZE_XSMALL, CARBON_MODAL_SIZE_SMALL, CARBON_MODAL_SIZE_LARGE } from \"./../../constants/constants\";\n\nexport default class PropertiesModal extends Component {\n\n\t// Map the editor_size in paramDef to the Carbon modal sizes\n\tgetCarbonModalSize() {\n\t\tswitch (this.props.bsSize) {\n\t\tcase Size.SMALL: return CARBON_MODAL_SIZE_XSMALL;\n\t\tcase Size.LARGE: return CARBON_MODAL_SIZE_LARGE;\n\t\tcase Size.MAX: return CARBON_MODAL_SIZE_LARGE;\n\t\tcase Size.MEDIUM:\n\t\tdefault: return CARBON_MODAL_SIZE_SMALL;\n\t\t}\n\t}\n\n\trender() {\n\t\tconst modalSize = this.getCarbonModalSize();\n\n\t\treturn (\n\t\t\t<Portal>\n\t\t\t\t<Modal\n\t\t\t\t\tclassName={classNames(\"properties-modal\", { \"noButtons\": this.props.showPropertiesButtons === false }, this.props.classNames)}\n\t\t\t\t\topen\n\t\t\t\t\tmodalHeading={this.props.title}\n\t\t\t\t\tprimaryButtonText={this.props.applyLabel}\n\t\t\t\t\tsecondaryButtonText={this.props.rejectLabel}\n\t\t\t\t\tonRequestSubmit={this.props.okHandler}\n\t\t\t\t\tonSecondarySubmit={this.props.cancelHandler}\n\t\t\t\t\taria-label=\"\"\n\t\t\t\t\tsize={modalSize}\n\t\t\t\t>\n\t\t\t\t\t<div className=\"properties-modal-children\">\n\t\t\t\t\t\t{this.props.children}\n\t\t\t\t\t</div>\n\t\t\t\t</Modal>\n\t\t\t</Portal>\n\t\t);\n\t}\n}\n\nPropertiesModal.propTypes = {\n\tcancelHandler: PropTypes.func,\n\tokHandler: PropTypes.func,\n\tbsSize: PropTypes.string,\n\ttitle: PropTypes.string,\n\tchildren: PropTypes.element,\n\tshowPropertiesButtons: PropTypes.bool,\n\tapplyLabel: PropTypes.string,\n\trejectLabel: PropTypes.string,\n\tclassNames: PropTypes.string\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport PropertiesModal from \"./properties-modal.jsx\";\nexport default PropertiesModal;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport PropertiesButtons from \"./../properties-buttons\";\n\nexport default class PropertiesEditor extends Component {\n\n\trender() {\n\t\tconst classSize = (typeof this.props.bsSize === \"undefined\") ? \"large\" : this.props.bsSize;\n\t\tconst propertyEditingClass = \"properties-editing properties-\" + classSize;\n\t\tconst buttons = (<PropertiesButtons\n\t\t\tokHandler={this.props.okHandler}\n\t\t\tcancelHandler={this.props.cancelHandler}\n\t\t\tapplyLabel={this.props.applyLabel}\n\t\t\trejectLabel={this.props.rejectLabel}\n\t\t\tshowPropertiesButtons={this.props.showPropertiesButtons}\n\t\t/>);\n\n\t\treturn (\n\t\t\t<div className={propertyEditingClass} >\n\t\t\t\t<h2>{this.props.title}</h2>\n\t\t\t\t<div className=\"properties-body\">\n\t\t\t\t\t{this.props.children}\n\t\t\t\t</div>\n\t\t\t\t{buttons}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nPropertiesEditor.propTypes = {\n\tcancelHandler: PropTypes.func,\n\tokHandler: PropTypes.func,\n\tbsSize: PropTypes.string,\n\ttitle: PropTypes.string,\n\tapplyLabel: PropTypes.string,\n\trejectLabel: PropTypes.string,\n\tchildren: PropTypes.element,\n\tshowPropertiesButtons: PropTypes.bool\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport PropertiesEditor from \"./properties-editor.jsx\";\nexport default PropertiesEditor;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport PropertiesButtons from \"../properties-buttons\";\n\n\nclass MainEditorPropertiesButtons extends Component {\n\n\tshouldEnabledSaveButton() {\n\t\tif (this.props.saveButtonEnabled) {\n\t\t\tif (this.props.disableSaveOnRequiredErrors) {\n\t\t\t\t// Return false if any required fields are not filled in\n\t\t\t\treturn Object.keys(this.props.requiredErrorMessages).length === 0;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\trender() {\n\t\tconst saveButtonEnabled = this.shouldEnabledSaveButton();\n\t\treturn (<PropertiesButtons\n\t\t\tokHandler={this.props.okHandler}\n\t\t\tcancelHandler={this.props.cancelHandler}\n\t\t\tapplyLabel={this.props.applyLabel}\n\t\t\trejectLabel={this.props.rejectLabel}\n\t\t\tshowPropertiesButtons={this.props.showPropertiesButtons}\n\t\t\tapplyButtonEnabled={saveButtonEnabled}\n\t\t/>);\n\t}\n}\n\nMainEditorPropertiesButtons.propTypes = {\n\tcontroller: PropTypes.object.isRequired,\n\tokHandler: PropTypes.func,\n\tcancelHandler: PropTypes.func,\n\tapplyLabel: PropTypes.string,\n\trejectLabel: PropTypes.string,\n\tshowPropertiesButtons: PropTypes.bool,\n\tdisableSaveOnRequiredErrors: PropTypes.bool,\n\tsaveButtonEnabled: PropTypes.bool, // pass in by redux\n\trequiredErrorMessages: PropTypes.object // pass in by redux\n};\n\nMainEditorPropertiesButtons.defaultProps = {\n\tsaveButtonEnabled: true\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tsaveButtonEnabled: !ownProps.controller?.getSaveButtonDisable(),\n\trequiredErrorMessages: ownProps.controller?.getRequiredErrorMessages()\n});\n\nexport default connect(mapStateToProps, null)(MainEditorPropertiesButtons);\n","/*\n * Copyright 2017-2025 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { injectIntl } from \"react-intl\";\nimport classNames from \"classnames\";\nimport { formatMessage } from \"./../../util/property-utils\";\nimport { ComposedModal, ModalHeader, ModalBody } from \"@carbon/react\";\nimport { Portal } from \"react-portal\";\nimport { MESSAGE_KEYS } from \"./../../constants/constants\";\nimport MainEditorPropertiesButtons from \"./../../components/main-editor-properties-buttons\";\n\nclass TearSheet extends Component {\n\trender() {\n\t\tconst title = this.props.tearsheet ? this.props.tearsheet.title : null;\n\t\tconst description = this.props.tearsheet ? this.props.tearsheet.description : null;\n\t\tconst content = this.props.tearsheet ? this.props.tearsheet.content : null;\n\t\tconst displayFooterButtons = this.props.showPropertiesButtons && !this.props.applyOnBlur;\n\t\tconst displayTabs = !Array.isArray(content);\n\n\t\tconst buttons = this.props.applyOnBlur\n\t\t\t? null\n\t\t\t: (\n\t\t\t\t<MainEditorPropertiesButtons\n\t\t\t\t\tokHandler={this.props.okHandler}\n\t\t\t\t\tcancelHandler={this.props.cancelHandler}\n\t\t\t\t\tapplyLabel={this.props.applyLabel}\n\t\t\t\t\trejectLabel={this.props.rejectLabel}\n\t\t\t\t\tshowPropertiesButtons={this.props.showPropertiesButtons}\n\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\tdisableSaveOnRequiredErrors={this.props.disableSaveOnRequiredErrors}\n\t\t\t\t/>);\n\n\t\treturn (\n\t\t\t<Portal>\n\t\t\t\t<ComposedModal\n\t\t\t\t\tclassName={classNames(\"properties-tearsheet-panel\", { \"properties-tearsheet-stacked\": this.props.stacked })}\n\t\t\t\t\topen={this.props.open}\n\t\t\t\t\tsize=\"lg\"\n\t\t\t\t\taria-label={formatMessage(this.props.intl, MESSAGE_KEYS.PROPERTIES_LABEL, { label: title })}\n\t\t\t\t\tpreventCloseOnClickOutside\n\t\t\t\t\tonClose={this.props.cancelHandler} // for case where user closes the modal by pressing ESC\n\t\t\t\t>\n\t\t\t\t\t{title === null\n\t\t\t\t\t\t? null\n\t\t\t\t\t\t: (\n\t\t\t\t\t\t\t<ModalHeader\n\t\t\t\t\t\t\t\tclassName={classNames(\"properties-tearsheet-header\",\n\t\t\t\t\t\t\t\t\t{ \"with-buttons\": displayFooterButtons },\n\t\t\t\t\t\t\t\t\t{ \"with-tabs\": displayTabs },\n\t\t\t\t\t\t\t\t\t{ \"hide-close-button\": typeof this.props.onCloseCallback !== \"function\" })}\n\t\t\t\t\t\t\t\ttitle={title}\n\t\t\t\t\t\t\t\tbuttonOnClick={this.props.onCloseCallback}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{description ? (<p>{description}</p>) : null}\n\t\t\t\t\t\t\t</ModalHeader>)\n\t\t\t\t\t}\n\t\t\t\t\t<ModalBody className={classNames(\"properties-tearsheet-body\",\n\t\t\t\t\t\t{ \"with-buttons\": displayFooterButtons },\n\t\t\t\t\t\t{ \"with-tabs\": displayTabs })}\n\t\t\t\t\t>\n\t\t\t\t\t\t{content}\n\t\t\t\t\t</ModalBody>\n\t\t\t\t\t{buttons}\n\t\t\t\t</ComposedModal>\n\t\t\t</Portal>);\n\t}\n}\nTearSheet.propTypes = {\n\topen: PropTypes.bool,\n\tstacked: PropTypes.bool,\n\tonCloseCallback: PropTypes.func,\n\ttearsheet: PropTypes.shape({\n\t\ttitle: PropTypes.string,\n\t\tdescription: PropTypes.string,\n\t\tcontent: PropTypes.oneOfType([\n\t\t\tPropTypes.array,\n\t\t\tPropTypes.object\n\t\t])\n\t}),\n\tshowPropertiesButtons: PropTypes.bool,\n\tapplyLabel: PropTypes.string, // Required if showPropertiesButtons is true\n\trejectLabel: PropTypes.string, // Required if showPropertiesButtons is true\n\tokHandler: PropTypes.func, // Required if showPropertiesButtons is true\n\tcancelHandler: PropTypes.func.isRequired,\n\tapplyOnBlur: PropTypes.bool.isRequired,\n\tintl: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tdisableSaveOnRequiredErrors: PropTypes.bool.isRequired\n};\n\nTearSheet.defaultProps = {\n\topen: false,\n\tshowPropertiesButtons: false,\n\tapplyOnBlur: false,\n\tstacked: false\n};\n\nexport default injectIntl(TearSheet);\n","var baseEach = require('./_baseEach');\n\n/**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n}\n\nmodule.exports = baseFilter;\n","var arrayFilter = require('./_arrayFilter'),\n baseFilter = require('./_baseFilter'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray');\n\n/**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\nfunction filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, baseIteratee(predicate, 3));\n}\n\nmodule.exports = filter;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * action types\n */\n\nexport const SET_PROPERTY_VALUES = \"SET_PROPERTY_VALUES\";\nexport const UPDATE_PROPERTY_VALUE = \"UPDATE_PROPERTY_VALUE\";\nexport const REMOVE_PROPERTY_VALUE = \"REMOVE_PROPERTY_VALUE\";\nexport const SET_CONTROL_STATES = \"SET_CONTROL_STATES\";\nexport const UPDATE_CONTROL_STATE = \"UPDATE_CONTROL_STATE\";\nexport const SET_PANEL_STATES = \"SET_PANEL_STATES\";\nexport const UPDATE_PANEL_STATE = \"UPDATE_PANEL_STATE\";\nexport const SET_ACTION_STATES = \"SET_ACTION_STATES\";\nexport const UPDATE_ACTION_STATE = \"UPDATE_ACTION_STATE\";\nexport const SET_ERROR_MESSAGES = \"SET_ERROR_MESSAGES\";\nexport const UPDATE_ERROR_MESSAGE = \"UPDATE_ERROR_MESSAGE\";\nexport const CLEAR_ERROR_MESSAGE = \"CLEAR_ERROR_MESSAGE\";\nexport const SET_DATASET_METADATA = \"SET_DATASET_METADATA\";\nexport const UPDATE_SELECTED_ROWS = \"UPDATE_SELECTED_ROWS\";\nexport const CLEAR_SELECTED_ROWS = \"CLEAR_SELECTED_ROWS\";\nexport const SET_TITLE = \"SET_TITLE\";\nexport const SET_ACTIVE_TAB = \"SET_ACTIVE_TAB\";\nexport const DISABLE_ROW_MOVE_BUTTONS = \"DISABLE_ROW_MOVE_BUTTONS\";\nexport const SET_SAVE_BUTTON_DISABLE = \"SET_SAVE_BUTTON_DISABLE\";\nexport const SET_WIDE_FLYOUT_PRIMARY_BUTTON_DISABLED = \"SET_WIDE_FLYOUT_PRIMARY_BUTTON_DISABLED\";\nexport const SET_ADD_REMOVE_ROWS = \"SET_ADD_REMOVE_ROWS\";\nexport const UPDATE_STATIC_ROWS = \"UPDATE_STATIC_ROWS\";\nexport const CLEAR_STATIC_ROWS = \"CLEAR_STATIC_ROWS\";\nexport const SET_TABLE_BUTTON_ENABLED = \"SET_TABLE_BUTTON_ENABLED\";\nexport const SET_HIDE_EDIT_BUTTON = \"SET_HIDE_EDIT_BUTTON\";\nexport const SET_ACTIVE_TEARSHEET = \"SET_ACTIVE_TEARSHEET\";\n\n\n/*\n * action creators\n */\nexport function setHideEditButton(disableState) {\n\treturn { type: SET_HIDE_EDIT_BUTTON, info: disableState };\n}\n\nexport function setPropertyValues(properties) {\n\treturn { type: SET_PROPERTY_VALUES, properties };\n}\n\nexport function updatePropertyValue(property) {\n\treturn { type: UPDATE_PROPERTY_VALUE, property };\n}\n\nexport function removePropertyValue(property) {\n\treturn { type: REMOVE_PROPERTY_VALUE, property };\n}\n\n\nexport function setControlStates(states) {\n\treturn { type: SET_CONTROL_STATES, states };\n}\n\nexport function updateControlState(state) {\n\treturn { type: UPDATE_CONTROL_STATE, state };\n}\n\nexport function setPanelStates(states) {\n\treturn { type: SET_PANEL_STATES, states };\n}\n\nexport function updatePanelState(state) {\n\treturn { type: UPDATE_PANEL_STATE, state };\n}\n\nexport function setActionStates(states) {\n\treturn { type: SET_ACTION_STATES, states };\n}\n\nexport function updateActionState(state) {\n\treturn { type: UPDATE_ACTION_STATE, state };\n}\n\n\nexport function setErrorMessages(messages) {\n\treturn { type: SET_ERROR_MESSAGES, messages };\n}\n\nexport function updateErrorMessage(message) {\n\treturn { type: UPDATE_ERROR_MESSAGE, message };\n}\n\nexport function clearErrorMessage(message) {\n\treturn { type: CLEAR_ERROR_MESSAGE, message };\n}\n\nexport function setDatasetMetadata(datasetMetadata) {\n\treturn { type: SET_DATASET_METADATA, datasetMetadata };\n}\n\nexport function updateSelectedRows(info) {\n\treturn { type: UPDATE_SELECTED_ROWS, info };\n}\n\nexport function clearSelectedRows(info) {\n\treturn { type: CLEAR_SELECTED_ROWS, info };\n}\n\nexport function setTitle(title) {\n\treturn { type: SET_TITLE, title };\n}\n\nexport function setActiveTab(activeTab) {\n\treturn { type: SET_ACTIVE_TAB, activeTab };\n}\n\nexport function disableRowMoveButtons(propertyIds) {\n\treturn { type: DISABLE_ROW_MOVE_BUTTONS, propertyIds };\n}\n\nexport function setSaveButtonDisable(disableState) {\n\treturn { type: SET_SAVE_BUTTON_DISABLE, disableState };\n}\n\nexport function setWideFlyoutPrimaryButtonDisabled(info) {\n\treturn { type: SET_WIDE_FLYOUT_PRIMARY_BUTTON_DISABLED, info };\n}\n\nexport function setAddRemoveRows(info) {\n\treturn { type: SET_ADD_REMOVE_ROWS, info };\n}\n\nexport function updateStaticRows(info) {\n\treturn { type: UPDATE_STATIC_ROWS, info };\n}\n\nexport function clearStaticRows(info) {\n\treturn { type: CLEAR_STATIC_ROWS, info };\n}\n\nexport function setTableButtonEnabled(info) {\n\treturn { type: SET_TABLE_BUTTON_ENABLED, info };\n}\n\nexport function setTearsheetState(tearsheetId) {\n\treturn { type: SET_ACTIVE_TEARSHEET, tearsheetId };\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\n\nclass SelectorPanel extends React.Component {\n\n\trender() {\n\t\tlet panel = this.props.panel;\n\t\tif (typeof panel === \"undefined\") {\n\t\t\tpanel = <div className=\"properties-control-panel\" />;\n\t\t}\n\t\treturn (panel);\n\t}\n}\n\nSelectorPanel.propTypes = {\n\tpanels: PropTypes.object,\n\tdependsOn: PropTypes.string,\n\tcontroller: PropTypes.object.isRequired,\n\tpanel: PropTypes.object // set by redux\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tpanel: ownProps.panels[ownProps.controller.getPropertyValue({ name: ownProps.dependsOn })]\n});\n\nexport default connect(mapStateToProps, null)(SelectorPanel);\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport PropertiesButtons from \"./../properties-buttons\";\nimport classNames from \"classnames\";\nimport { Portal } from \"react-portal\";\n\nexport default class WideFlyout extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.modalRef = React.createRef();\n\t\tthis.state = {\n\t\t\tstyle: {\n\t\t\t\theight: 0\n\t\t\t}\n\t\t};\n\t\tthis.updateDimensions = this.updateDimensions.bind(this);\n\t\tthis.handleTabKey = this.handleTabKey.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.updateDimensions();\n\t\twindow.addEventListener(\"resize\", this.updateDimensions);\n\t\tdocument.addEventListener(\"keydown\", this.handleTabKey);\n\t\tthis.focusOnFirstFocusable(); // Set initial focus inside the modal.\n\t}\n\tcomponentDidUpdate(prevProps) {\n\t\t// If modal is still open, and new item added.\n\t\tconst modal = this.getActiveModal();\n\t\tif (!prevProps.show && this.props.show && modal) {\n\t\t\t// If focus is outside modal, move it to first focusable\n\t\t\tthis.focusOnFirstFocusable();\n\t\t\treturn;\n\t\t}\n\t\tif (this.props.show && modal) {\n\t\t\tconst active = document.activeElement;\n\t\t\t// Restore focus if lost due to modal content changes like typing or adding new fields\n\t\t\tif (active === document.body || !modal.contains(active)) {\n\t\t\t\tthis.focusOnFirstFocusable();\n\t\t\t}\n\t\t}\n\t}\n\tcomponentWillUnmount() {\n\t\twindow.removeEventListener(\"resize\", this.updateDimensions);\n\t\tdocument.removeEventListener(\"keydown\", this.handleTabKey);\n\t}\n\t// Returns an array of focusable elements inside the modal.\n\tgetFocusables() {\n\t\tconst modal = this.getActiveModal();\n\t\tif (!modal) {\n\t\t\treturn [];\n\t\t}\n\t\treturn Array.from(\n\t\t\tmodal.querySelectorAll(\n\t\t\t\t\"button, a[href], input, select, textarea, [tabindex]:not([tabindex='-1'])\"\n\t\t\t)).filter((el) => el.offsetParent !== null); // Filter out hidden/disabled elements.\n\t}\n\t// Focus on the first focusable element once modal opens.\n\tgetActiveModal() {\n\t\tconst modals = Array.from(document.querySelectorAll(\"div[role='dialog'].properties-wf-content.show\"));\n\t\t// Pick the last one — it's the top-most modal (deepest in DOM)\n\t\treturn modals.length > 0 ? modals[modals.length - 1] : null;\n\t}\n\tfocusOnFirstFocusable() {\n\t\tconst focusables = this.getFocusables();\n\t\tif (focusables.length > 0) {\n\t\t\tfocusables[0].focus();\n\t\t}\n\t}\n\tupdateDimensions() {\n\t\tif (this.wideFlyout) {\n\t\t\t// used to find correct parent\n\t\t\tif (!this.commonPropertiesParent) {\n\t\t\t\tthis.commonPropertiesParent = this.findPropertyWrapper(this.wideFlyout);\n\t\t\t}\n\t\t\tif (this.commonPropertiesParent) {\n\t\t\t\tconst commonProperties = this.commonPropertiesParent.getBoundingClientRect();\n\t\t\t\tthis.setState({\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\theight: commonProperties.height + \"px\",\n\t\t\t\t\t\ttop: commonProperties.top + \"px\",\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\tfindPropertyWrapper(node) {\n\t\tif (node && node.parentNode && node.parentNode.className && node.parentNode.className.includes(\"properties-right-flyout\")) {\n\t\t\treturn node.parentNode;\n\t\t} else if (node && node.parentNode) {\n\t\t\treturn this.findPropertyWrapper(node.parentNode);\n\t\t}\n\t\treturn null;\n\t}\n\t// Handles focus trap inside the modal when using Tab or Shift+tab key.\n\thandleTabKey(e) {\n\t\tif (e.key !== \"Tab\") {\n\t\t\treturn;\n\t\t}\n\t\tconst modal = this.getActiveModal();\n\t\tif (!modal || !this.props.show) {\n\t\t\treturn;\n\t\t}\n\t\tconst focusables = this.getFocusables();\n\t\tif (focusables.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tconst first = focusables[0];\n\t\tconst last = focusables[focusables.length - 1];\n\t\tconst active = document.activeElement;\n\t\t// If focus is outside modal or on <body>,Then bring back to the first element inside modal.\n\t\tif (this.props.show && (!modal.contains(active) || active === document.body)) {\n\t\t\te.preventDefault();\n\t\t\t// If \"Shift+Tab\" then focus should be on last element inside the modal else first.\n\t\t\t(e.shiftKey ? last : first).focus();\n\t\t\treturn;\n\t\t}\n\t\tif (e.shiftKey) {\n\t\t\tif (active === first) {\n\t\t\t\te.preventDefault();\n\t\t\t\tlast.focus();\n\t\t\t}\n\t\t} else if (active === last) {\n\t\t\te.preventDefault();\n\t\t\tfirst.focus();\n\t\t}\n\t}\n\n\trender() {\n\t\tconst overlay = (<div className={classNames(\"properties-wf-overlay\", { \"show\": this.props.show })} />);\n\t\tlet title;\n\t\tlet buttons;\n\t\tlet children;\n\t\tif (this.props.show) {\n\t\t\tif (this.props.title) {\n\t\t\t\ttitle = (<div className=\"properties-wf-title\">{this.props.title}</div>);\n\t\t\t}\n\t\t\tbuttons = (<PropertiesButtons\n\t\t\t\tokHandler={this.props.okHandler}\n\t\t\t\tcancelHandler={this.props.cancelHandler}\n\t\t\t\tshowPropertiesButtons={this.props.showPropertiesButtons}\n\t\t\t\tapplyLabel={this.props.applyLabel}\n\t\t\t\trejectLabel={this.props.rejectLabel}\n\t\t\t\tapplyButtonEnabled={this.props.okButtonEnabled}\n\t\t\t/>);\n\t\t\tchildren = (<div className=\"properties-wf-children\"> {this.props.children} </div>);\n\t\t}\n\t\treturn (\n\t\t\t<div className=\"properties-wf-modal\" ref={(ref) => (this.wideFlyout = ref)}>\n\t\t\t\t<Portal node={this.commonPropertiesParent}>\n\t\t\t\t\t{overlay}\n\t\t\t\t\t<div\n\t\t\t\t\t\tref={this.modalRef}\n\t\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\t\tclassName={classNames(\"properties-wf-content\", { \"show\": this.props.show, \"properties-light-disabled\": !this.props.light })}\n\t\t\t\t\t\tstyle={this.state.style}\n\t\t\t\t\t>\n\t\t\t\t\t\t{title}\n\t\t\t\t\t\t{children}\n\t\t\t\t\t\t{buttons}\n\t\t\t\t\t</div>\n\t\t\t\t</Portal>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nWideFlyout.propTypes = {\n\tchildren: PropTypes.element,\n\tcancelHandler: PropTypes.func,\n\tokHandler: PropTypes.func,\n\tshow: PropTypes.bool,\n\tshowPropertiesButtons: PropTypes.bool,\n\tapplyLabel: PropTypes.string,\n\trejectLabel: PropTypes.string,\n\ttitle: PropTypes.string,\n\tlight: PropTypes.bool,\n\tokButtonEnabled: PropTypes.bool\n};\n\nWideFlyout.defaultProps = {\n\tshow: false,\n\tokButtonEnabled: true\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport WideFlyout from \"./wide-flyout.jsx\";\nexport default WideFlyout;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { v4 as uuid4 } from \"uuid\";\nimport { TRUNCATE_LIMIT, DEFAULT_DATEPICKER_FORMAT, DEFAULT_DATE_FORMAT, DEFAULT_TIME_FORMAT } from \"../constants/constants\";\nimport { ControlType } from \"../constants/form-constants\";\n\n/**\n* Used to return a unique id for a control that requires an html id\n* @param propertyId (required)\n* @param id (optional)\n* @return returns a unique id used for control DOM ids\n*/\nfunction getControlId(propertyId, id) {\n\tconst uuid = id ? id : uuid4();\n\treturn `${getDataId(propertyId)}-${uuid}`;\n}\n\nfunction getDataId(propertyId) {\n\tlet id = propertyId.name;\n\tif (typeof propertyId.row !== \"undefined\") {\n\t\tid += \"_\" + propertyId.row;\n\t\tif (typeof propertyId.col !== \"undefined\") {\n\t\t\tid += \"_\" + propertyId.col;\n\t\t}\n\t} else if (typeof propertyId.col !== \"undefined\") {\n\t\tid += \"_\" + propertyId.col;\n\t}\n\treturn \"properties-\" + id;\n}\n\nfunction\tgetCharLimit(control, defaultLimit) {\n\tlet limit = defaultLimit;\n\tif (control.charLimit) {\n\t\tlimit = control.charLimit;\n\t}\n\treturn limit;\n}\n\nfunction splitNewlines(text, splitValue) {\n\tif (text.length > 0) {\n\t\tconst split = text.split(splitValue);\n\t\tif (Array.isArray(split)) {\n\t\t\treturn split;\n\t\t}\n\t\treturn [split];\n\t}\n\treturn [];\n}\n\n// returns an object\n//\tvalue = string: the concatenated string\n//\ttruncated = boolean: indicating if any value was too long and had to be truncated\nfunction joinNewlines(list, joinValue) {\n\tlet truncated = false;\n\tif (Array.isArray(list)) {\n\t\tif (list.length === 0) {\n\t\t\treturn { value: \"\", truncated };\n\t\t}\n\n\t\tlet concatenatedValue = \"\";\n\t\tlist.forEach((value, index) => {\n\t\t\tconst truncatedValue = truncateDisplayValue(value);\n\t\t\tconst join = index === list.length - 1 ? \"\" : joinValue; // Do not add joinValue to last value in array\n\t\t\tconcatenatedValue += truncatedValue + join;\n\t\t\tif (!truncated) { // we only need this to be set true once\n\t\t\t\ttruncated = truncatedValue.length !== value.length;\n\t\t\t}\n\t\t});\n\t\treturn {\n\t\t\tvalue: concatenatedValue,\n\t\t\ttruncated\n\t\t};\n\t}\n\treturn { value: list, truncated };\n}\n\n// truncate the value that gets displayed if its too long\nfunction truncateDisplayValue(value) {\n\tif (value.length > TRUNCATE_LIMIT) {\n\t\treturn value.substring(0, TRUNCATE_LIMIT) + \"...\";\n\t}\n\treturn value;\n}\n\nfunction getValidationProps(messageInfo, inTable) {\n\tconst validationProps = {};\n\t// inline in tables don't show carbon error/warn\n\tif (!messageInfo || inTable) {\n\t\treturn validationProps;\n\t}\n\tif (messageInfo.type === \"error\") {\n\t\tvalidationProps.invalid = true;\n\t\tvalidationProps.invalidText = messageInfo.text;\n\t} else if (messageInfo.type === \"warning\") {\n\t\tvalidationProps.warn = true;\n\t\tvalidationProps.warnText = messageInfo.text;\n\t}\n\treturn validationProps;\n}\n\n// Get the format of the date/time control\nfunction getDateTimeFormat(control) {\n\tlet dtFormat;\n\tif (control.controlType === ControlType.DATEPICKER || control.controlType === ControlType.DATEPICKERRANGE) {\n\t\tdtFormat = (control.dateFormat) ? control.dateFormat : DEFAULT_DATEPICKER_FORMAT;\n\t} else if (control.controlType === ControlType.DATEFIELD) {\n\t\tdtFormat = (control.dateFormat) ? control.dateFormat : DEFAULT_DATE_FORMAT;\n\t} else { // time\n\t\tdtFormat = (control.timeFormat) ? control.timeFormat : DEFAULT_TIME_FORMAT;\n\t}\n\treturn dtFormat;\n}\n\nexport {\n\tgetCharLimit,\n\tgetControlId,\n\tgetDataId,\n\tsplitNewlines,\n\tjoinNewlines,\n\ttruncateDisplayValue,\n\tgetValidationProps,\n\tgetDateTimeFormat\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* eslint max-depth: [\"error\", 6] */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { Button } from \"@carbon/react\";\nimport { Add } from \"@carbon/react/icons\";\nimport WideFlyout from \"./../../components/wide-flyout\";\nimport Icon from \"./../../../icons/icon.jsx\";\n\nimport { isEmpty } from \"lodash\";\nimport * as PropertyUtils from \"./../../util/property-utils\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport { MESSAGE_KEYS, CONDITION_MESSAGE_TYPE } from \"./../../constants/constants\";\nimport { STATES } from \"./../../constants/constants.js\";\nimport { Type, ParamRole } from \"./../../constants/form-constants.js\";\nimport classNames from \"classnames\";\n\nimport Tooltip from \"./../../../tooltip/tooltip.jsx\";\nimport TruncatedContentTooltip from \"../../components/truncated-content-tooltip\";\n\nclass SummaryPanel extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tshowWideFlyout: false\n\t\t};\n\t\tthis.handleLinkClicked = this.handleLinkClicked.bind(this);\n\t\tthis.hideWideFlyout = this.hideWideFlyout.bind(this);\n\t\tthis.cancelWideFlyout = this.cancelWideFlyout.bind(this);\n\t\tthis._getSummaryTables = this._getSummaryTables.bind(this);\n\t}\n\n\thideWideFlyout() {\n\t\tthis.props.controller.setIsSummaryPanelShowing(false);\n\t\tthis.setState({ showWideFlyout: false });\n\t\t// on close clear *all* selected rows\n\t\tthis.props.controller.clearSelectedRows();\n\t}\n\tcancelWideFlyout() {\n\t\t// on cancel reset back to original value\n\t\tthis.props.controller.setPropertyValues(this.initialControlValues);\n\t\tthis.props.controller.setErrorMessages(this.initialMessages);\n\t\tthis.props.controller.setControlStates(this.initialStates);\n\t\tthis.hideWideFlyout();\n\t}\n\n\thandleLinkClicked() {\n\t\tif (this.props.children) {\n\t\t\tthis.props.controller.setIsSummaryPanelShowing(true);\n\t\t\tthis.setState({ showWideFlyout: true });\n\t\t}\n\t\t// sets the current value for parameter. Used on cancel\n\t\tthis.initialControlValues = this.props.controller.getPropertyValues();\n\t\tthis.initialMessages = this.props.controller.getAllErrorMessages();\n\t\tthis.initialStates = this.props.controller.getControlStates();\n\t}\n\n\t/*\n\t* Returns summary tables to be displayed in summary panel\n\t*/\n\t_getSummaryTables() {\n\t\tconst summaryTables = [];\n\t\tconst summaryControls = this.props.controller.getSummaryPanelControls(this.props.panel.id);\n\t\t// no controls in summary panel\n\t\tif (!Array.isArray(summaryControls)) {\n\t\t\treturn summaryTables;\n\t\t}\n\t\tfor (const controlName of summaryControls) {\n\t\t\tconst propertyId = { name: controlName };\n\t\t\tconst summaryControl = this.props.controller.getControl(propertyId);\n\t\t\t// get filtered controlValue (filters out hidden and disabled values)\n\t\t\tlet controlValue = this.props.controller.getPropertyValue(propertyId, { filterHiddenDisabled: true });\n\n\t\t\t// let custom control set their own value to be displayed\n\t\t\tconst customValue = this.props.controller.getCustPropSumPanelValue(propertyId);\n\t\t\tlet showCustom = false;\n\t\t\tif (typeof customValue !== \"undefined\" && customValue !== null) {\n\t\t\t\tcontrolValue = customValue.value;\n\t\t\t\tsummaryControl.summaryLabel = customValue.label;\n\t\t\t\tshowCustom = true;\n\t\t\t}\n\t\t\tconst summaryValues = [];\n\t\t\tif (Array.isArray(controlValue)) {\n\t\t\t\tlet summaryColumns = 0;\n\t\t\t\tif (summaryControl.subControls) {\n\t\t\t\t\tfor (let idx = 0; idx < summaryControl.subControls.length; idx++) {\n\t\t\t\t\t\tconst colPropertyId = {\n\t\t\t\t\t\t\tname: propertyId.name,\n\t\t\t\t\t\t\tcol: idx\n\t\t\t\t\t\t};\n\t\t\t\t\t\tif (this.props.controller.isSummary(colPropertyId) || showCustom) {\n\t\t\t\t\t\t\tsummaryColumns++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (summaryControl.summary) {\n\t\t\t\t\tsummaryColumns = 1;\n\t\t\t\t}\n\t\t\t\t// subtract 2 px for some buffer between columns\n\t\t\t\tconst colWidth = summaryColumns !== 0 ? \"calc((100% / \" + summaryColumns + \") - 2px)\" : \"100%\";\n\n\t\t\t\tfor (let rowIdx = 0; rowIdx < controlValue.length; rowIdx++) {\n\t\t\t\t\tconst rowValue = controlValue[rowIdx];\n\t\t\t\t\tconst rowData = [];\n\t\t\t\t\t// table value\n\t\t\t\t\tif (Array.isArray(rowValue)) {\n\t\t\t\t\t\tfor (let colIdx = 0; colIdx < rowValue.length; colIdx++) {\n\t\t\t\t\t\t\tconst colPropertyId = {\n\t\t\t\t\t\t\t\tname: propertyId.name,\n\t\t\t\t\t\t\t\tcol: colIdx\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tif (this.props.controller.isSummary(colPropertyId) || showCustom) {\n\t\t\t\t\t\t\t\t// This allows array cell content to look acceptable\n\t\t\t\t\t\t\t\tconst displayValue = this._getSummaryDisplayValue(rowValue[colIdx], colPropertyId);\n\t\t\t\t\t\t\t\tconst contentValue = typeof displayValue === \"undefined\" ? \"\"\n\t\t\t\t\t\t\t\t\t: JSON.stringify(displayValue).replace(\"\\\"\", \"\")\n\t\t\t\t\t\t\t\t\t\t.replace(new RegExp(\"\\\"\", \"g\"), \"\") + \" \";\n\t\t\t\t\t\t\t\trowData.push(\n\t\t\t\t\t\t\t\t\t<td key={\"summary-table-data-\" + colIdx}\n\t\t\t\t\t\t\t\t\t\tclassName={\"properties-summary-row-data \"}\n\t\t\t\t\t\t\t\t\t\tstyle={{ width: colWidth }}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<TruncatedContentTooltip\n\t\t\t\t\t\t\t\t\t\t\tcontent={<span>{contentValue}</span>}\n\t\t\t\t\t\t\t\t\t\t\ttooltipText={contentValue}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={false}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</td>);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (this.props.controller.isSummary(propertyId) || showCustom) { // only push row data if control is in summary\n\t\t\t\t\t\tconst displayValue = this._getSummaryDisplayValue(rowValue, propertyId);\n\t\t\t\t\t\trowData.push(\n\t\t\t\t\t\t\t<td key={\"summary-table-row-data-\" + rowIdx} className={\"properties-summary-row-data \"}>\n\t\t\t\t\t\t\t\t<TruncatedContentTooltip\n\t\t\t\t\t\t\t\t\tcontent={<span>{displayValue}</span>}\n\t\t\t\t\t\t\t\t\ttooltipText={displayValue}\n\t\t\t\t\t\t\t\t\tdisabled={false}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</td>);\n\t\t\t\t\t}\n\t\t\t\t\tif (rowData.length > 0) {\n\t\t\t\t\t\tsummaryValues.push(\n\t\t\t\t\t\t\t<tr key={\"summary-table-row-\" + rowIdx} className={\"properties-summary-row\"}>\n\t\t\t\t\t\t\t\t{rowData}\n\t\t\t\t\t\t\t</tr>);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (controlValue) {\n\t\t\t\t// assume simple parameter\n\t\t\t\tif (this.props.controller.isSummary(propertyId) || showCustom) {\n\t\t\t\t\tconst displayValue = this._getSummaryDisplayValue(controlValue, propertyId);\n\t\t\t\t\tsummaryValues.push(\n\t\t\t\t\t\t<tr key={\"summary-row-\" + controlName} className=\"properties-summary-row\">\n\t\t\t\t\t\t\t<td key={\"summary-table-row-data-\" + controlName} className={\"properties-summary-rows-data\"}>\n\t\t\t\t\t\t\t\t{ displayValue }\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (summaryValues.length > 0) {\n\t\t\t\t// Added role presentation to fix a11y violation - no headers in the table\n\t\t\t\tlet summaryBody = (<table role=\"presentation\" key={\"summary-table-\" + controlName} className=\"properties-summary-table\">\n\t\t\t\t\t<tbody key={\"summary-body-\" + controlName}>\n\t\t\t\t\t\t{summaryValues}\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>);\n\t\t\t\tif (summaryValues.length > 10) {\n\t\t\t\t\tconst largeTableLabel = PropertyUtils.formatMessage(this.props.controller.getReactIntl(),\n\t\t\t\t\t\tMESSAGE_KEYS.LONG_TABLE_SUMMARY_PLACEHOLDER);\n\t\t\t\t\tsummaryBody = (<div className={\"properties-summary-table\"}><span>{largeTableLabel}</span></div>);\n\t\t\t\t}\n\t\t\t\tsummaryTables.push(\n\t\t\t\t\t<div key={\"summary-container-\" + controlName} className={\"properties-summary-values\"}>\n\t\t\t\t\t\t<span key={\"summary-text-\" + controlName} className={\"properties-summary-label\"}>{summaryControl.summaryLabel}</span>\n\t\t\t\t\t\t{summaryBody}\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn summaryTables;\n\t}\n\n\t/**\n\t * Retrieves a properly formatted summary display value.\n\t *\n\t * @param displayValue The default value to display\n\t * @param propertyId The id of the property to display\n\t * @return A formatted display value\n\t */\n\t_getSummaryDisplayValue(displayValue, propertyId) {\n\t\tlet returnValue = displayValue;\n\t\tconst control = this.props.controller.getControl(propertyId);\n\n\t\t// Use label for controlValue if possible\n\t\tif (control.values && control.valueLabels) {\n\t\t\tconst displayIndex = control.values.indexOf(displayValue);\n\t\t\tif (displayIndex > -1 && control.valueLabels[displayIndex]) {\n\t\t\t\treturnValue = control.valueLabels[displayIndex];\n\t\t\t}\n\t\t}\n\t\tif (PropertyUtils.toType(returnValue) === \"object\") {\n\t\t\tif (control.valueDef.propType === Type.STRUCTURE && control.role === ParamRole.COLUMN) {\n\t\t\t\treturnValue = PropertyUtils.stringifyFieldValue(displayValue, control);\n\t\t\t} else {\n\t\t\t\t// We don't know what this object is, but we know we can't display it as an object\n\t\t\t\treturnValue = JSON.stringify(returnValue);\n\t\t\t}\n\t\t}\n\n\t\treturn returnValue;\n\t}\n\n\t_getSummaryIconState() {\n\t\tconst controls = this.props.controller.getSummaryPanelControls(this.props.panel.id);\n\t\tlet msg = {};\n\t\tlet errorCount = 0;\n\t\tlet warningCount = 0;\n\t\tif (Array.isArray(controls)) {\n\t\t\tcontrols.forEach((controlId) => {\n\t\t\t\tconst controlMsg = this.props.controller.getErrorMessage({ name: controlId }, true);\n\t\t\t\tif (!isEmpty(controlMsg)) {\n\t\t\t\t\tif (controlMsg.type === CONDITION_MESSAGE_TYPE.WARNING) {\n\t\t\t\t\t\twarningCount += 1;\n\t\t\t\t\t}\n\t\t\t\t\tif (controlMsg.type === CONDITION_MESSAGE_TYPE.ERROR) {\n\t\t\t\t\t\terrorCount += 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!isEmpty(controlMsg) && (!isEmpty(msg) || msg.type !== \"error\")) {\n\t\t\t\t\tmsg = controlMsg;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tif (!isEmpty(msg)) {\n\t\t\tlet descriptionText = \"\";\n\t\t\tif (errorCount > 0 && warningCount === 0) {\n\t\t\t\tdescriptionText = PropertyUtils.formatMessage(this.props.controller.getReactIntl(),\n\t\t\t\t\tMESSAGE_KEYS.CONTROL_SUMMARY_ERROR, { errorMsgCount: errorCount });\n\t\t\t} else if (errorCount > 0 && warningCount > 0) {\n\t\t\t\tdescriptionText = PropertyUtils.formatMessage(this.props.controller.getReactIntl(),\n\t\t\t\t\tMESSAGE_KEYS.CONTROL_SUMMARY_ERROR_WARNING,\n\t\t\t\t\t{ errorMsgCount: errorCount, warningMsgCount: warningCount });\n\t\t\t} else if (errorCount === 0 && warningCount > 0) {\n\t\t\t\tdescriptionText = PropertyUtils.formatMessage(this.props.controller.getReactIntl(),\n\t\t\t\t\tMESSAGE_KEYS.CONTROL_SUMMARY_WARNING, { warningMsgCount: warningCount });\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<Tooltip\n\t\t\t\t\tid= \"summary-icon\"\n\t\t\t\t\ttip={descriptionText}\n\t\t\t\t\tclassName=\"properties-tooltips\"\n\t\t\t\t>\n\t\t\t\t\t{<Icon type={msg.type} className={`properties-summary-link-icon ${msg.type}`} />}\n\t\t\t\t</Tooltip>\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}\n\n\trender() {\n\t\tconst icon = this._getSummaryIconState();\n\t\tconst link = (<div className=\"properties-summary-link-container\">\n\t\t\t<Button\n\t\t\t\tclassName=\"properties-summary-link-button\"\n\t\t\t\tonClick={this.handleLinkClicked}\n\t\t\t\tsize=\"sm\"\n\t\t\t\tkind=\"ghost\"\n\t\t\t\trenderIcon={Add}\n\t\t\t>\n\t\t\t\t{this.props.panel.label}\n\t\t\t</Button>\n\t\t\t{icon}\n\t\t</div>);\n\t\tconst applyLabel = PropertyUtils.formatMessage(this.props.controller.getReactIntl(), MESSAGE_KEYS.APPLYBUTTON_LABEL);\n\t\tconst rejectLabel = PropertyUtils.formatMessage(this.props.controller.getReactIntl(), MESSAGE_KEYS.REJECTBUTTON_LABEL);\n\t\tconst flyout = this.state.showWideFlyout ? (<WideFlyout\n\t\t\tcancelHandler={this.cancelWideFlyout}\n\t\t\tokHandler={this.hideWideFlyout}\n\t\t\tshow\n\t\t\tapplyLabel={applyLabel}\n\t\t\trejectLabel={rejectLabel}\n\t\t\ttitle={this.props.panel.label}\n\t\t\tlight={this.props.controller.getLight()}\n\t\t\tokButtonEnabled={this.props.okButtonEnabled}\n\t\t>\n\t\t\t<div>\n\t\t\t\t{this.props.children}\n\t\t\t</div>\n\t\t</WideFlyout>) : <div />;\n\t\tconst panelClassName = this.props.panel.className ? this.props.panel.className : \"\";\n\t\tconst className = classNames(\n\t\t\t\"properties-summary-panel\",\n\t\t\t\"properties-control-panel\",\n\t\t\t{ \"hide\": this.props.panelState === STATES.HIDDEN },\n\t\t\t{ \"properties-control-nested-panel\": this.props.panel.nestedPanel },\n\t\t\tpanelClassName\n\t\t);\n\t\treturn (\n\t\t\t<div className={className} disabled={this.props.panelState === STATES.DISABLED} data-id={ControlUtils.getDataId({ name: this.props.panel.id })}>\n\t\t\t\t{flyout}\n\t\t\t\t{link}\n\t\t\t\t{this._getSummaryTables()}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nSummaryPanel.propTypes = {\n\tcontroller: PropTypes.object.isRequired,\n\tchildren: PropTypes.array,\n\tpanel: PropTypes.object.isRequired,\n\tpanelState: PropTypes.string, // set by redux\n\tokButtonEnabled: PropTypes.bool // set by redux\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tpanelState: ownProps.controller.getPanelState({ name: ownProps.panel.id }),\n\tokButtonEnabled: !ownProps.controller.getWideFlyoutPrimaryButtonDisabled({ name: ownProps.panel.id })\n});\n\nexport default connect(mapStateToProps, null)(SummaryPanel);\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport classNames from \"classnames\";\nimport { Accordion, AccordionItem } from \"@carbon/react\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport { STATES } from \"./../../constants/constants.js\";\n\n\nclass TwistyPanel extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.panelTitleHandler = props.controller.getHandlers().panelTitleHandler ?? null;\n\t}\n\n\trender() {\n\t\tconst className = this.props.panel.className ? this.props.panel.className : \"\";\n\t\tconst disabled = this.props.panelState === STATES.DISABLED;\n\t\tconst title = this.panelTitleHandler?.({ panelId: this.props.panel.id, label: this.props.panel.label }) || this.props.panel.label;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t\"properties-twisty-panel\",\n\t\t\t\t\t{ \"hide\": this.props.panelState === STATES.HIDDEN },\n\t\t\t\t\t{ \"properties-control-nested-panel\": this.props.panel.nestedPanel },\n\t\t\t\t\t{ \"properties-twisty-custom-title\": this.props.panel.label !== title },\n\t\t\t\t\tclassName\n\t\t\t\t)} data-id={ControlUtils.getDataId({ name: this.props.panel.id })}\n\t\t\t>\n\t\t\t\t<Accordion disabled={disabled}>\n\t\t\t\t\t<AccordionItem disabled={disabled} open={this.props.panel.open} title={title} className=\"properties-twisty-accordion-item\">\n\t\t\t\t\t\t{this.props.children}\n\t\t\t\t\t</AccordionItem>\n\t\t\t\t</Accordion>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nTwistyPanel.propTypes = {\n\tpanel: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tchildren: PropTypes.array,\n\tpanelState: PropTypes.string // set by redux\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tpanelState: ownProps.controller.getPanelState({ name: ownProps.panel.id })\n});\n\nexport default connect(mapStateToProps, null)(TwistyPanel);\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport PropertiesModal from \"./../../components/properties-modal\";\nimport WideFlyout from \"./../../components/wide-flyout\";\n\nexport default class SubPanelInvoker extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tpanel: null,\n\t\t\ttitle: null,\n\t\t\thideHandler: null,\n\t\t\tsubPanelVisible: false\n\t\t};\n\t\tthis.showSubDialog = this.showSubDialog.bind(this);\n\t\tthis.hideSubDialog = this.hideSubDialog.bind(this);\n\t}\n\n\tshowSubDialog(title, panel, hideHandler) {\n\t\tthis.props.controller.increaseVisibleSubPanelCounter();\n\t\tthis.setState({\n\t\t\tpanel: panel,\n\t\t\ttitle: title,\n\t\t\thideHandler: hideHandler,\n\t\t\tsubPanelVisible: true\n\t\t});\n\t}\n\n\thideSubDialog(applyChanges) {\n\t\tthis.props.controller.decreaseVisibleSubPanelCounter();\n\t\tthis.state.hideHandler(applyChanges);\n\t\tthis.setState({\n\t\t\tpanel: null,\n\t\t\ttitle: null,\n\t\t\thideHandler: null,\n\t\t\tsubPanelVisible: false\n\t\t});\n\t}\n\n\trender() {\n\t\tlet propertiesDialog = [];\n\t\tif (this.state.subPanelVisible && !this.props.rightFlyout) {\n\t\t\tconst className = this.props.controller.isTearsheetContainer() ? \"properties-subpanel-modal-in-tearsheet\" : \"\";\n\t\t\tpropertiesDialog = (<PropertiesModal\n\t\t\t\ttitle={this.state.title}\n\t\t\t\tokHandler={this.hideSubDialog.bind(this, true)}\n\t\t\t\tcancelHandler={this.hideSubDialog.bind(this, false)}\n\t\t\t\tapplyLabel={this.props.applyLabel}\n\t\t\t\trejectLabel={this.props.rejectLabel}\n\t\t\t\tclassNames={className}\n\t\t\t>\n\t\t\t\t{this.state.panel}\n\t\t\t</PropertiesModal>);\n\t\t} else if (this.props.rightFlyout && this.state.subPanelVisible) {\n\t\t\tpropertiesDialog = (<WideFlyout\n\t\t\t\tcancelHandler={this.hideSubDialog.bind(this, false)}\n\t\t\t\tokHandler={this.hideSubDialog.bind(this, true)}\n\t\t\t\tshow\n\t\t\t\tapplyLabel={this.props.applyLabel}\n\t\t\t\trejectLabel={this.props.rejectLabel}\n\t\t\t\ttitle={this.state.title}\n\t\t\t\tlight={this.props.controller.getLight()}\n\t\t\t>\n\t\t\t\t<div>\n\t\t\t\t\t{this.state.panel}\n\t\t\t\t</div>\n\t\t\t</WideFlyout>);\n\t\t}\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{propertiesDialog}\n\t\t\t\t{this.props.children}\n\t\t\t</>\n\t\t);\n\t}\n}\n\nSubPanelInvoker.propTypes = {\n\tchildren: PropTypes.element,\n\tapplyLabel: PropTypes.string,\n\trejectLabel: PropTypes.string,\n\trightFlyout: PropTypes.bool,\n\tcontroller: PropTypes.object.isRequired\n};\n\nSubPanelInvoker.defaultProps = {\n\trightFlyout: false\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport logger from \"./../../../../utils/logger\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Button } from \"@carbon/react\";\nimport { formatMessage } from \"./../../util/property-utils\";\nimport { MESSAGE_KEYS } from \"./../../constants/constants\";\n\n\nimport SubPanelInvoker from \"./invoker.jsx\";\n\nexport default class SubPanelButton extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.showSubPanel = this.showSubPanel.bind(this);\n\t\tthis.onSubPanelHidden = this.onSubPanelHidden.bind(this);\n\t}\n\n\n\tonSubPanelHidden(applyChanges) {\n\t\tlogger.info(\"onSubPanelHidden(): applyChanges=\" + applyChanges);\n\t}\n\n\tshowSubPanel() {\n\t\tthis.subPanelInvoker.showSubDialog(this.props.title, this.props.panel, this.onSubPanelHidden);\n\t}\n\n\trender() {\n\t\tconst applyLabel = formatMessage(this.props.controller.getReactIntl(), MESSAGE_KEYS.APPLYBUTTON_LABEL);\n\t\tconst rejectLabel = formatMessage(this.props.controller.getReactIntl(), MESSAGE_KEYS.REJECTBUTTON_LABEL);\n\n\t\tconst button = (<Button\n\t\t\tclassName=\"properties-subpanel-button\"\n\t\t\ttype=\"button\"\n\t\t\tsize=\"sm\"\n\t\t\tkind=\"secondary\"\n\t\t\tonClick={this.showSubPanel}\n\t\t>\n\t\t\t{this.props.label || \"\"}\n\t\t</Button>);\n\t\treturn (\n\t\t\t<SubPanelInvoker ref={ (ref) => (this.subPanelInvoker = ref) }\n\t\t\t\trightFlyout={this.props.rightFlyout}\n\t\t\t\tapplyLabel={applyLabel}\n\t\t\t\trejectLabel={rejectLabel}\n\t\t\t\tcontroller={this.props.controller}\n\t\t\t>\n\t\t\t\t{button}\n\t\t\t</SubPanelInvoker>\n\t\t);\n\t}\n}\n\nSubPanelButton.propTypes = {\n\tlabel: PropTypes.string,\n\ttitle: PropTypes.string.isRequired,\n\tpanel: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\trightFlyout: PropTypes.bool,\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport classNames from \"classnames\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport { STATES } from \"./../../constants/constants.js\";\n\n\nclass ColumnPanel extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tlet gridColumns = \"\";\n\t\tprops.children.forEach((item, idx) => {\n\t\t\tif (idx === 0) {\n\t\t\t\tgridColumns = \"1fr\";\n\t\t\t} else {\n\t\t\t\tgridColumns += \" 1fr\";\n\t\t\t}\n\t\t});\n\t\tthis.style = {\n\t\t\t\"gridTemplateColumns\": gridColumns\n\t\t};\n\t}\n\n\trender() {\n\t\tconst className = this.props.panel.className ? this.props.panel.className : \"\";\n\t\t// grid-template-columns\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t\"properties-column-panel\",\n\t\t\t\t\t{ \"hide\": this.props.panelState === STATES.HIDDEN },\n\t\t\t\t\t{ \"properties-control-nested-panel\": this.props.panel.nestedPanel },\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t\tdisabled={this.props.panelState === STATES.DISABLED} data-id={ControlUtils.getDataId({ name: this.props.panel.id })}\n\t\t\t\tstyle={this.style}\n\t\t\t>\n\t\t\t\t{this.props.children}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nColumnPanel.propTypes = {\n\tpanel: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tchildren: PropTypes.array.isRequired,\n\tpanelState: PropTypes.string // set by redux\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tpanelState: ownProps.controller.getPanelState({ name: ownProps.panel.id })\n});\n\nexport default connect(mapStateToProps, null)(ColumnPanel);\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport classNames from \"classnames\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport { STATES } from \"./../../constants/constants.js\";\n\n\nclass ControlPanel extends React.Component {\n\n\trender() {\n\t\tconst className = this.props.panel.className ? this.props.panel.className : \"\";\n\t\tconst controlPanel = this.props.children.length > 0\n\t\t\t? (\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\"properties-control-panel\",\n\t\t\t\t\t\t{ \"hide\": this.props.panelState === STATES.HIDDEN },\n\t\t\t\t\t\t{ \"properties-control-nested-panel\": this.props.panel.nestedPanel },\n\t\t\t\t\t\t{ \"tearsheet-container\": this.props.controller.isTearsheetContainer() },\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t\tdisabled={this.props.panelState === STATES.DISABLED} data-id={ControlUtils.getDataId({ name: this.props.panel.id })}\n\t\t\t\t>\n\t\t\t\t\t{this.props.children}\n\t\t\t\t</div>\n\t\t\t)\n\t\t\t: null;\n\t\treturn controlPanel;\n\t}\n}\n\nControlPanel.propTypes = {\n\tpanel: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tchildren: PropTypes.array.isRequired,\n\tpanelState: PropTypes.string // set by redux\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tpanelState: ownProps.controller.getPanelState({ name: ownProps.panel.id })\n});\n\nexport default connect(mapStateToProps, null)(ControlPanel);\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport classNames from \"classnames\";\nimport { Tabs, Tab, TabList, TabPanel, TabPanels } from \"@carbon/react\";\nimport { getDataId } from \"./../../util/control-utils\";\nimport { STATES, MESSAGE_KEYS } from \"./../../constants/constants.js\";\nimport { v4 as uuid4 } from \"uuid\";\nimport { formatMessage } from \"./../../util/property-utils\";\n\nclass Subtabs extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tactiveTabId: \"\"\n\t\t};\n\t\tthis.uuid = uuid4();\n\t}\n\n\tonClick(tabId) {\n\t\tthis.setState({ activeTabId: tabId });\n\t}\n\n\trender() {\n\t\tconst subTabLists = [];\n\t\tconst subTabPanels = [];\n\t\tlet activeTab = 0;\n\t\tlet tabIdx = 0;\n\t\tconst className = this.props.className ? this.props.className : \"\";\n\t\tconst tabListAriaLabel = formatMessage(this.props.controller.getReactIntl(), MESSAGE_KEYS.SUBTABS_TABLIST_LABEL);\n\t\tfor (let i = 0; i < this.props.tabs.length; i++) {\n\t\t\tconst tab = this.props.tabs[i];\n\t\t\t// TODO this might not work once we don't rerender on each change\n\t\t\tconst panelState = this.props.controller.getPanelState({ name: tab.group });\n\t\t\tif (panelState !== STATES.HIDDEN) {\n\t\t\t\tconst subPanelItems = this.props.genUIItem(i, tab.content);\n\t\t\t\tif (this.state.activeTabId === tab.group && panelState !== STATES.DISABLED) {\n\t\t\t\t\tactiveTab = tabIdx;\n\t\t\t\t}\n\n\t\t\t\tsubTabLists.push(\n\t\t\t\t\t<Tab\n\t\t\t\t\t\tkey={`subtabs.tab.${i}-${this.uuid}`}\n\t\t\t\t\t\tdisabled={panelState === STATES.DISABLED}\n\t\t\t\t\t\tclassName={classNames(\"properties-subtab\", { \"properties-leftnav-subtab-item\": this.props.leftnav })}\n\t\t\t\t\t\ttitle={tab.text}\n\t\t\t\t\t\tonClick={this.onClick.bind(this, tab.group)}\n\t\t\t\t\t\tdata-id={getDataId({ name: tab.group })}\n\t\t\t\t\t>\n\t\t\t\t\t\t{tab.text}\n\t\t\t\t\t</Tab>\n\t\t\t\t);\n\n\t\t\t\tsubTabPanels.push(\n\t\t\t\t\t<TabPanel key={`subtabs.tab.${i}-${this.uuid}`} className=\"properties-subtab-panel\">\n\t\t\t\t\t\t{subPanelItems}\n\t\t\t\t\t</TabPanel>\n\t\t\t\t);\n\t\t\t\ttabIdx++;\n\t\t\t}\n\t\t}\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t\"properties-sub-tab-container\",\n\t\t\t\t\t{ vertical: !this.props.rightFlyout },\n\t\t\t\t\t{ \"properties-control-nested-panel\": this.props.nestedPanel },\n\t\t\t\t\t{ \"properties-leftnav-container\": this.props.leftnav },\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<Tabs\n\t\t\t\t\tselectedIndex={activeTab}\n\t\t\t\t>\n\t\t\t\t\t<TabList className={classNames(\"properties-subtabs\", { \"properties-leftnav-subtabs\": this.props.leftnav })} aria-label={tabListAriaLabel}>\n\t\t\t\t\t\t{subTabLists}\n\t\t\t\t\t</TabList>\n\t\t\t\t\t<TabPanels>\n\t\t\t\t\t\t{subTabPanels}\n\t\t\t\t\t</TabPanels>\n\t\t\t\t</Tabs>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nSubtabs.propTypes = {\n\ttabs: PropTypes.array.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\trightFlyout: PropTypes.bool,\n\tgenUIItem: PropTypes.func.isRequired,\n\tclassName: PropTypes.string,\n\tnestedPanel: PropTypes.bool,\n\tleftnav: PropTypes.bool\n};\n\nSubtabs.defaultProps = {\n\tleftnav: false\n};\n\nexport default Subtabs;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { evaluateText } from \"./../../util/property-utils.js\";\nimport classNames from \"classnames\";\nimport { STATES, CARBON_ICONS } from \"./../../constants/constants\";\nimport { isEmpty } from \"lodash\";\nimport Tooltip from \"./../../../tooltip/tooltip.jsx\";\nimport Icon from \"./../../../icons/icon.jsx\";\n\nclass TextPanel extends Component {\n\trender() {\n\t\tconst className = this.props.panel.className ? this.props.panel.className : \"\";\n\t\tconst hidden = this.props.panelState === STATES.HIDDEN;\n\t\tconst disabled = this.props.panelState === STATES.DISABLED;\n\t\tlet label = this.props.panel.label ? (<div className=\"panel-label\">{this.props.panel.label}</div>) : null;\n\t\tlet description;\n\t\tif (this.props.panel.description && !isEmpty(this.props.panel.description.text)) {\n\t\t\tconst dynamicDescriptionText = evaluateText(this.props.panel.description.text, this.props.controller);\n\t\t\tif (this.props.panel.description.placement === \"as_tooltip\") {\n\t\t\t\t// If tooltip has a link, add propertyId in the link object\n\t\t\t\tif (this.props.panel.description.link) {\n\t\t\t\t\tthis.props.panel.description.link.propertyId = { name: this.props.panel.id };\n\t\t\t\t}\n\t\t\t\tconst tooltip = (<Tooltip\n\t\t\t\t\tid={`tooltip-label-${this.props.panel.id}`}\n\t\t\t\t\ttip={dynamicDescriptionText}\n\t\t\t\t\tlink={this.props.panel.description.link ? this.props.panel.description.link : null}\n\t\t\t\t\ttooltipLinkHandler={this.props.controller.getHandlers().tooltipLinkHandler}\n\t\t\t\t\tdirection=\"bottom\"\n\t\t\t\t\tdisable={hidden || disabled}\n\t\t\t\t\tshowToolTipOnClick\n\t\t\t\t>\n\t\t\t\t\t<Icon type={CARBON_ICONS.INFORMATION} className=\"properties-control-description-icon-info\" />\n\t\t\t\t</Tooltip>);\n\t\t\t\tlabel = (\n\t\t\t\t\t<div className={classNames(\"properties-label-container\")}>\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t{tooltip}\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tdescription = <div className=\"panel-description\" aria-disabled={disabled}>{dynamicDescriptionText}</div>;\n\t\t\t}\n\t\t}\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t\"properties-text-panel\",\n\t\t\t\t\t{ \"hide\": hidden },\n\t\t\t\t\t{ \"properties-control-nested-panel\": this.props.panel.nestedPanel },\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t\tdisabled={disabled}\n\t\t\t>\n\t\t\t\t{label}\n\t\t\t\t{description}\n\t\t\t</div>);\n\t}\n}\n\nTextPanel.propTypes = {\n\tpanel: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tpanelState: PropTypes.string // set by redux\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tpanelState: ownProps.controller.getPanelState({ name: ownProps.panel.id }),\n\tpropertyValues: ownProps.controller.getPropertyValues() // not used locally but needed to cause a rerender to evaluate text with a property value\n});\n\nexport default connect(mapStateToProps, null)(TextPanel);\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport classNames from \"classnames\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport { STATES, CARBON_ICONS } from \"./../../constants/constants\";\nimport { evaluateText } from \"./../../util/property-utils.js\";\nimport Tooltip from \"./../../../tooltip/tooltip.jsx\";\nimport Icon from \"./../../../icons/icon.jsx\";\nimport { isEmpty } from \"lodash\";\n\nclass ActionPanel extends Component {\n\trender() {\n\t\tconst className = this.props.panel.className ? this.props.panel.className : \"\";\n\t\tconst hidden = this.props.panelState === STATES.HIDDEN;\n\t\tconst disabled = this.props.panelState === STATES.DISABLED;\n\t\tlet label;\n\t\tif (this.props.panel.label) {\n\t\t\tlet tooltip;\n\t\t\tif (this.props.panel.description && !isEmpty(this.props.panel.description.text)) {\n\t\t\t\tconst dynamicDescriptionText = evaluateText(this.props.panel.description.text, this.props.controller);\n\t\t\t\t// If tooltip has a link, add propertyId in the link object\n\t\t\t\tif (this.props.panel.description.link) {\n\t\t\t\t\tthis.props.panel.description.link.propertyId = { name: this.props.panel.id };\n\t\t\t\t}\n\t\t\t\ttooltip = (<Tooltip\n\t\t\t\t\tid={`tooltip-label-${this.props.panel.id}`}\n\t\t\t\t\ttip={dynamicDescriptionText}\n\t\t\t\t\tlink={this.props.panel.description.link ? this.props.panel.description.link : null}\n\t\t\t\t\ttooltipLinkHandler={this.props.controller.getHandlers().tooltipLinkHandler}\n\t\t\t\t\tdirection=\"bottom\"\n\t\t\t\t\tdisable={hidden || disabled}\n\t\t\t\t\tshowToolTipOnClick\n\t\t\t\t>\n\t\t\t\t\t<Icon type={CARBON_ICONS.INFORMATION} className=\"properties-control-description-icon-info\" />\n\t\t\t\t</Tooltip>);\n\t\t\t}\n\t\t\tlabel = (\n\t\t\t\t<div className={classNames(\"properties-label-container\")}>\n\t\t\t\t\t<label className=\"properties-control-label\">{this.props.panel.label}</label>\n\t\t\t\t\t{tooltip}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t\"properties-action-panel\",\n\t\t\t\t\t{ \"hide\": hidden },\n\t\t\t\t\t{ \"properties-control-nested-panel\": this.props.panel.nestedPanel },\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t\tdata-id={ControlUtils.getDataId({ name: this.props.panel.id })}\n\t\t\t\tdisabled={disabled}\n\t\t\t>\n\t\t\t\t{label}\n\t\t\t\t{this.props.children}\n\t\t\t</div>);\n\t}\n}\n\nActionPanel.propTypes = {\n\tpanel: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tchildren: PropTypes.oneOfType([\n\t\tPropTypes.element,\n\t\tPropTypes.array\n\t]),\n\tpanelState: PropTypes.string // set by redux\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tpanelState: ownProps.controller.getPanelState({ name: ownProps.panel.id })\n});\n\nexport default connect(mapStateToProps, null)(ActionPanel);\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { Button } from \"@carbon/react\";\nimport { STATES, CARBON_BUTTON_KIND, CARBON_BUTTON_SIZE } from \"./../../constants/constants.js\";\nimport Tooltip from \"./../../../tooltip/tooltip.jsx\";\nimport classNames from \"classnames\";\nimport { has } from \"lodash\";\nimport { injectIntl } from \"react-intl\";\nimport defaultMessages from \"../../../../locales/common-properties/locales/en.json\";\n\nclass ButtonAction extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.icon = null;\n\t\tconst { controller, action } = this.props;\n\t\tconst buttonIconHandler = controller.getHandlers().buttonIconHandler;\n\t\tif (buttonIconHandler && action) {\n\t\t\tconst iconData = {\n\t\t\t\ttype: \"actionButtonIcon\",\n\t\t\t\tbuttonId: action.name,\n\t\t\t\tdata: action.data\n\t\t\t};\n\t\t\tbuttonIconHandler(iconData, (appIcon) => {\n\t\t\t\tif (React.isValidElement(appIcon)) {\n\t\t\t\t\tthis.icon = appIcon.type; // Extract component type from JSX element\n\t\t\t\t} else {\n\t\t\t\t\tthis.icon = appIcon;\n\t\t\t\t}\n\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tthis.applyAction = this.applyAction.bind(this);\n\t}\n\n\tgetActionButtonKind() {\n\t\tif (!has(this.props, \"action.button.kind\")) {\n\t\t\treturn CARBON_BUTTON_KIND.TERTIARY;\n\t\t}\n\t\tswitch (this.props.action.button.kind) {\n\t\tcase CARBON_BUTTON_KIND.PRIMARY: return CARBON_BUTTON_KIND.PRIMARY;\n\t\tcase CARBON_BUTTON_KIND.SECONDARY: return CARBON_BUTTON_KIND.SECONDARY;\n\t\tcase CARBON_BUTTON_KIND.TERTIARY: return CARBON_BUTTON_KIND.TERTIARY;\n\t\tcase CARBON_BUTTON_KIND.GHOST: return CARBON_BUTTON_KIND.GHOST;\n\t\tcase CARBON_BUTTON_KIND.DANGER: return CARBON_BUTTON_KIND.DANGER;\n\t\tcase CARBON_BUTTON_KIND.DANGER_TERTIARY: return CARBON_BUTTON_KIND.DANGER_TERTIARY;\n\t\tcase CARBON_BUTTON_KIND.DANGER_GHOST: return CARBON_BUTTON_KIND.DANGER_GHOST;\n\t\tdefault: return CARBON_BUTTON_KIND.TERTIARY;\n\t\t}\n\t}\n\n\tgetActionButtonSize() {\n\t\tif (!has(this.props, \"action.button.size\")) {\n\t\t\treturn CARBON_BUTTON_SIZE.SMALL;\n\t\t}\n\t\tswitch (this.props.action.button.size) {\n\t\tcase CARBON_BUTTON_SIZE.SMALL: return CARBON_BUTTON_SIZE.SMALL;\n\t\tcase CARBON_BUTTON_SIZE.MEDIUM: return CARBON_BUTTON_SIZE.MEDIUM;\n\t\tcase CARBON_BUTTON_SIZE.LARGE: return CARBON_BUTTON_SIZE.LARGE;\n\t\tcase CARBON_BUTTON_SIZE.EXTRA_LARGE: return CARBON_BUTTON_SIZE.EXTRA_LARGE;\n\t\tdefault: return CARBON_BUTTON_SIZE.SMALL;\n\t\t}\n\t}\n\n\tapplyAction() {\n\t\t// fire event and let the application determine how to handle the action\n\t\tconst actionHandler = this.props.controller.getHandlers().actionHandler;\n\t\tif (typeof actionHandler === \"function\") {\n\t\t\tactionHandler(this.props.action.name,\n\t\t\t\tthis.props.controller.getAppData(), this.props.action.data);\n\t\t}\n\t}\n\trender() {\n\t\tconst customClassName = this.props.action.className ? this.props.action.className : \"\";\n\t\tconst className = classNames(\"properties-action-button\", { \"hide\": this.props.state === STATES.HIDDEN }, customClassName);\n\t\tconst disabled = this.props.state === STATES.DISABLED;\n\t\tconst actionButtonKind = this.getActionButtonKind();\n\t\tconst actionButtonSize = this.getActionButtonSize();\n\t\tconst iconDescription = this.props.action?.description?.text ||\n\t\t\tthis.props.intl.formatMessage({\n\t\t\t\tid: \"action.button.icon\",\n\t\t\t\tdefaultMessage: defaultMessages[\"action.button.icon\"]\n\t\t\t});\n\n\t\t// Add icon related props only when an icon is defined.\n\t\tconst iconProps = {};\n\t\tif (this.icon) {\n\t\t\ticonProps.renderIcon = this.icon;\n\t\t\ticonProps.iconDescription = iconDescription; // This avoids React warning by ensuring \"iconDescription\" is provided with \"renderIcon\"\n\t\t}\n\t\tconst button = (\n\t\t\t<Button\n\t\t\t\ttype=\"button\"\n\t\t\t\tsize={actionButtonSize}\n\t\t\t\tkind={actionButtonKind}\n\t\t\t\tonClick={this.applyAction}\n\t\t\t\tdisabled={disabled}\n\t\t\t\ttitle={this.props.action.label.text}\n\t\t\t\t{...iconProps}\n\t\t\t>\n\t\t\t\t{this.props.action.label.text}\n\t\t\t</Button>\n\t\t);\n\n\t\tlet display = button;\n\t\tif (this.props.action.description) {\n\t\t\tconst tooltipId = \"tooltip-action-\" + this.props.action.name;\n\t\t\tconst tooltip = (\n\t\t\t\t<div className=\"properties-tooltips\">\n\t\t\t\t\t{this.props.action.description.text}\n\t\t\t\t</div>\n\t\t\t);\n\n\t\t\tdisplay = (<Tooltip\n\t\t\t\tid={tooltipId}\n\t\t\t\ttip={tooltip}\n\t\t\t\tdirection={this.props.action.data?.tooltipDirection || \"bottom\"}\n\t\t\t\tclassName=\"properties-tooltips\"\n\t\t\t\tdisable={disabled}\n\t\t\t>\n\t\t\t\t{button}\n\t\t\t</Tooltip>);\n\t\t}\n\n\t\treturn (\n\t\t\t<div className={className} data-id={this.props.action.name}>\n\t\t\t\t{display}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nButtonAction.propTypes = {\n\taction: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tstate: PropTypes.string, // pass in by redux,\n\tintl: PropTypes.object.isRequired\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tstate: ownProps.controller.getActionState(ownProps.controller.convertPropertyId(ownProps.action.name)),\n});\n\nexport default connect(mapStateToProps, null)(injectIntl(ButtonAction));\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { Button } from \"@carbon/react\";\nimport SVG from \"react-inlinesvg\";\nimport { STATES } from \"./../../constants/constants.js\";\nimport classNames from \"classnames\";\n\nclass ImageAction extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t};\n\t\tthis.applyAction = this.applyAction.bind(this);\n\t\tthis.renderIcon = this.renderIcon.bind(this);\n\t\tthis.getIcon = this.getIcon.bind(this);\n\n\t\tthis.imageDimensions = this.props.action?.image?.size\n\t\t\t? {\n\t\t\t\theight: `${this.props.action.image.size.height}px`,\n\t\t\t\twidth: `${this.props.action.image.size.width}px`\n\t\t\t}\n\t\t\t: {};\n\t}\n\n\tgetIcon(filePath) {\n\t\tconst extension = filePath.split(\".\").pop()\n\t\t\t.toLowerCase();\n\t\tif (extension === \"svg\") {\n\t\t\treturn (<SVG\n\t\t\t\tsrc={filePath}\n\t\t\t\taria-label={this.props.action.name}\n\t\t\t\t{...this.imageDimensions}\n\t\t\t/>);\n\t\t}\n\t\treturn (<img\n\t\t\tsrc={filePath}\n\t\t\taria-label={this.props.action.name}\n\t\t\t{...this.imageDimensions}\n\t\t/>);\n\t}\n\tapplyAction() {\n\t\tif (this.props.state !== STATES.DISABLED) { // this is needed to mimic disabled action button\n\t\t\t// fire event and let the application determine how to handle the action\n\t\t\tconst actionHandler = this.props.controller.getHandlers().actionHandler;\n\t\t\tif (typeof actionHandler === \"function\") {\n\t\t\t\tactionHandler(this.props.action.name,\n\t\t\t\t\tthis.props.controller.getAppData(), this.props.action.data);\n\t\t\t}\n\t\t}\n\t}\n\n\trenderIcon() {\n\t\tconst icon = this.getIcon(this.props.action.image.url);\n\t\treturn icon;\n\t}\n\n\trender() {\n\n\t\tconst disabled = this.props.state === STATES.DISABLED;\n\t\tconst customClassName = this.props.action.className ? this.props.action.className : \"\";\n\t\tconst className = classNames(\"properties-action-image\", { \"left\": this.props.action.image.placement === \"left\" },\n\t\t\t{ \"right\": this.props.action.image.placement === \"right\" }, { \"hide\": this.props.state === STATES.HIDDEN },\n\t\t\t{ \"disabled\": disabled }, customClassName);\n\n\t\tconst image = (\n\t\t\t<Button\n\t\t\t\tdata-id={this.props.action.name}\n\t\t\t\trenderIcon={this.renderIcon}\n\t\t\t\tclassName=\"properties-action-image-button\"\n\t\t\t\tonClick={this.applyAction}\n\t\t\t\tkind=\"ghost\"\n\t\t\t\ticonDescription={this.props.action?.description?.text} // Text to appear in Tooltip\n\t\t\t\tautoAlign\n\t\t\t\tstyle={this.imageDimensions}\n\t\t\t\tdisabled={disabled}\n\t\t\t\t// Ensures the button is treated as icon-only when a description is present,\n\t\t\t\t// preventing an empty tooltip from appearing.\n\t\t\t\thasIconOnly={Boolean(this.props.action.description?.text)}\n\t\t\t/>\n\t\t);\n\n\n\t\treturn (\n\t\t\t<div className={className}>\n\t\t\t\t{image}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nImageAction.propTypes = {\n\taction: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tstate: PropTypes.string, // pass in by redux\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tstate: ownProps.controller.getActionState(ownProps.controller.convertPropertyId(ownProps.action.name)),\n});\n\nexport default connect(mapStateToProps, null)(ImageAction);\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\n\nimport ButtonAction from \"./button\";\nimport ImageAction from \"./image\";\nimport { ActionType } from \"./../constants/form-constants\";\nimport classNames from \"classnames\";\nimport { getDataId } from \"./../util/control-utils\";\n\n\nexport default class ActionFactory {\n\n\tconstructor(controller) {\n\t\tthis.controller = controller;\n\t}\n\tgenerateAction(key, action) {\n\t\tif (action) {\n\t\t\tif (action.actionType === ActionType.BUTTON) {\n\t\t\t\treturn (\n\t\t\t\t\t<ButtonAction\n\t\t\t\t\t\tkey={\"action.\" + key}\n\t\t\t\t\t\taction={action}\n\t\t\t\t\t\tcontroller={this.controller}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\t} else if (action.actionType === ActionType.IMAGE) {\n\t\t\t\treturn (\n\t\t\t\t\t<ImageAction\n\t\t\t\t\t\tkey={\"action.\" + key}\n\t\t\t\t\t\taction={action}\n\t\t\t\t\t\tcontroller={this.controller}\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} else if (action.actionType === ActionType.CUSTOM) {\n\t\t\t\tconst propertyId = this.controller.convertPropertyId(action.name);\n\t\t\t\treturn (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\"properties-custom-action\", action.className)}\n\t\t\t\t\t\tdata-id={getDataId(propertyId)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.controller.getCustomAction(action)}\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { setActiveTab } from \"./../../actions\";\nimport { Tab, Tabs, TabList, TabPanel, Link, TabPanels, Accordion, AccordionItem } from \"@carbon/react\";\nimport * as PropertyUtil from \"./../../util/property-utils\";\nimport { MESSAGE_KEYS, CARBON_ICONS, CONDITION_MESSAGE_TYPE, STATES, CATEGORY_VIEW } from \"./../../constants/constants\";\nimport { cloneDeep, isEmpty, sortBy, get, filter } from \"lodash\";\nimport logger from \"./../../../../utils/logger\";\nimport classNames from \"classnames\";\n\nimport SelectorPanel from \"./../../panels/selector\";\nimport SummaryPanel from \"./../../panels/summary\";\nimport TwistyPanel from \"./../../panels/twisty\";\nimport SubPanelButton from \"./../../panels/sub-panel/button\";\nimport ColumnPanel from \"./../../panels/column\";\nimport ControlPanel from \"./../../panels/control\";\nimport Subtabs from \"./../../panels/subtabs\";\n\nimport WideFlyout from \"./../wide-flyout\";\nimport TearSheet from \"../../panels/tearsheet\";\nimport FieldPicker from \"./../field-picker\";\nimport TextPanel from \"./../../panels/text-panel\";\nimport ActionPanel from \"./../../panels/action-panel\";\n\nimport ActionFactory from \"./../../actions/action-factory\";\nimport Icon from \"./../../../icons/icon\";\nimport { ItemType } from \"../../constants/form-constants\";\n\nconst ALERT_TAB_GROUP = \"alertMsgs\";\nclass EditorForm extends React.Component {\n\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tshowFieldPicker: false\n\t\t};\n\n\t\tthis.genPanel = this.genPanel.bind(this);\n\t\tthis.genUIContent = this.genUIContent.bind(this);\n\t\tthis.genUIItem = this.genUIItem.bind(this);\n\t\tthis._getGroupedMessages = this._getGroupedMessages.bind(this);\n\n\t\tthis.closeFieldPicker = this.closeFieldPicker.bind(this);\n\t\tthis.openFieldPicker = this.openFieldPicker.bind(this);\n\t\tthis.generateSharedControlNames = this.generateSharedControlNames.bind(this);\n\n\t\tthis.messages = this._getGroupedMessages(props.messages);\n\n\t\t// initialize ControlFactory with correct values\n\t\tthis.ControlFactory = props.controller.getControlFactory();\n\t\tthis.ControlFactory.setFunctions(this.openFieldPicker, this.genUIItem);\n\t\tthis.ControlFactory.setRightFlyout(props.rightFlyout);\n\n\t\tthis.actionFactory = new ActionFactory(this.props.controller);\n\n\t\tthis.FIRST_TEARSHEET_ID = null;\n\t\tthis.TEARSHEETS = {};\n\t\tthis.visibleTearsheet = null;\n\t\tthis.defaultOpenTab = props.activeTab;\n\t\tthis.alertOpenTab = null;\n\t\tthis.scrollToAlert = false;\n\t}\n\n\n\tshouldComponentUpdate(nextProps, nextState) {\n\t\tif (!this.props.controller.isSummaryPanelShowing() && !this.props.controller.isSubPanelsShowing()) {\n\t\t\t// only update list of error messages when no summary panel or sub-panel is shown,\n\t\t\t// otherwise changes in the summary/sub panel might trigger a re-render and the\n\t\t\t// summary/sub panel to disappear because the alerts tab is added/removed\n\t\t\tthis.messages = this._getGroupedMessages(nextProps.messages);\n\t\t}\n\t\treturn true;\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\t// Scroll to the selected accordion even when clicked from Alerts tab\n\t\tif (this.scrollToAlert || prevProps.activeTab !== this.props.activeTab) {\n\t\t\tconst activeTabId = this.props.activeTab;\n\t\t\tconst activeTabElement = document.getElementsByClassName(`${activeTabId}`);\n\t\t\tif (activeTabId && activeTabElement.length > 0) {\n\t\t\t\tactiveTabElement[0].scrollIntoView({ behavior: \"smooth\", block: \"nearest\", inline: \"start\" });\n\t\t\t}\n\t\t\tthis.scrollToAlert = false;\n\t\t}\n\t}\n\n\t_getMessageCountForCategory(tab) {\n\t\tif (!this.props.showAlertsTab) {\n\t\t\treturn null;\n\t\t}\n\t\tif (tab.group === ALERT_TAB_GROUP) {\n\t\t\treturn \" (\" + this.messages.length + \")\";\n\t\t}\n\t\tlet result = 0;\n\t\tthis.messages.forEach((msg) => {\n\t\t\tconst ctrl = this.props.controller.getControl({ \"name\": msg.id_ref });\n\t\t\tif (ctrl && ctrl.parentCategoryId === tab.group) {\n\t\t\t\tresult++;\n\t\t\t}\n\t\t});\n\t\treturn result > 0 ? \" (\" + result + \")\" : null;\n\t}\n\n\t_getGroupedMessages(messages) {\n\t\t// returns messages grouped by type, first errors, then warnings\n\t\tif (!isEmpty(messages)) {\n\t\t\treturn sortBy(messages, [\"type\"]);\n\t\t}\n\t\treturn [];\n\t}\n\n\t_getTabId(tab) {\n\t\treturn tab.group;\n\t}\n\n\t_showCategoryPanel(panelId) {\n\t\tlet activeTab = panelId;\n\t\tif (this.props.activeTab === panelId) {\n\t\t\tactiveTab = \"\";\n\t\t}\n\t\tif (this.alertOpenTab === panelId) {\n\t\t\tthis.alertOpenTab = null;\n\t\t}\n\t\tif (this.defaultOpenTab === panelId) {\n\t\t\tthis.defaultOpenTab = null;\n\t\t}\n\t\tthis.props.setActiveTab(activeTab);\n\t}\n\n\t_handleMessageClick(controlId, ev) {\n\t\tconst control = this.props.controller.getControl(controlId);\n\t\tthis.alertOpenTab = control.parentCategoryId;\n\t\tif (this.defaultOpenTab === this.alertOpenTab) {\n\t\t\tthis.defaultOpenTab = null;\n\t\t}\n\t\tthis.scrollToAlert = true;\n\t\tthis.props.setActiveTab(control.parentCategoryId);\n\t}\n\n\t_modalTabsOnClick(tabId) {\n\t\tthis.props.setActiveTab(tabId);\n\t}\n\n\tgenPrimaryTabs(key, tabs, propertyId, indexof) {\n\t\tconst tabContent = [];\n\t\tconst tabContentAcc = [];\n\t\tconst tabLists = [];\n\t\tconst tabPanels = [];\n\t\tlet hasAlertsTab = false;\n\t\tlet modalSelected = 0;\n\t\tlet hiddenTabs = 0;\n\t\tconst nonTearsheetTabs = tabs.filter((t) => t.content.itemType !== ItemType.TEARSHEET);\n\t\tconst tearsheetTabs = tabs.filter((t) => t.content.itemType === ItemType.TEARSHEET);\n\t\tconst totalTabs = tearsheetTabs.concat(nonTearsheetTabs);\n\t\tconst tabListAriaLabel = PropertyUtil.formatMessage(this.props.controller.getReactIntl(), MESSAGE_KEYS.EDITORFORM_TABLIST_LABEL);\n\n\t\tfor (let i = 0; i < totalTabs.length; i++) {\n\t\t\tconst tab = totalTabs[i];\n\t\t\tconst tabState = this.props.controller.getPanelState({ name: tab.group });\n\t\t\tif (tabState === STATES.HIDDEN) {\n\t\t\t\thiddenTabs++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (i === 0 && tab.group === ALERT_TAB_GROUP) {\n\t\t\t\thasAlertsTab = true;\n\t\t\t}\n\t\t\tconst panelItems = this.genUIItem(this._getContainerIndex(hasAlertsTab, i), tab.content, propertyId, indexof);\n\t\t\tlet additionalComponent = null;\n\t\t\tif (this.props.additionalComponents) {\n\t\t\t\tadditionalComponent = this.props.additionalComponents[tab.group];\n\t\t\t}\n\t\t\t// if only 1 tab AND\n\t\t\t// if total non-tearsheet tabs is 1; don't show any tabs\n\t\t\tif (totalTabs.length === 1 && nonTearsheetTabs.length === 1) {\n\t\t\t\treturn (\n\t\t\t\t\t<div key={\"cat.\" + key} className=\"properties-single-category\">\n\t\t\t\t\t\t{panelItems}\n\t\t\t\t\t\t{additionalComponent}\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (this.props.rightFlyout && this.props.categoryView !== CATEGORY_VIEW.TABS) {\n\t\t\t\tlet categoryOpen = false;\n\t\t\t\tif (this.props.activeTab === tab.group) {\n\t\t\t\t\tcategoryOpen = true;\n\t\t\t\t}\n\t\t\t\tif (tab.content.itemType !== ItemType.TEARSHEET && nonTearsheetTabs.length === 1) {\n\t\t\t\t\ttabContent.push(\n\t\t\t\t\t\t<div key={\"cat.\" + key} className=\"properties-single-category\">\n\t\t\t\t\t\t\t{panelItems}\n\t\t\t\t\t\t\t{additionalComponent}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\ttabContentAcc.push(\n\t\t\t\t\t\t<div key={this._getContainerIndex(hasAlertsTab, i) + \"-\" + key}\n\t\t\t\t\t\t\tclassName={classNames(\"properties-category-container\", { \"properties-hidden-container\": tab.content.itemType === ItemType.TEARSHEET })}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<AccordionItem title={`${tab.text}${this._getMessageCountForCategory(tab) ? this._getMessageCountForCategory(tab) : \"\"}`}\n\t\t\t\t\t\t\t\t// Open Tab with Alert Message when from Alerts Tab or a open Default Tab\n\t\t\t\t\t\t\t\topen={ this.defaultOpenTab === tab.group || this.alertOpenTab === tab.group }\n\t\t\t\t\t\t\t\tonHeadingClick={this._showCategoryPanel.bind(this, tab.group)}\n\t\t\t\t\t\t\t\tclassName={`${classNames(\"properties-category-content\",\n\t\t\t\t\t\t\t\t\t{ \"show\": categoryOpen }, tab.group)}`}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{panelItems}\n\t\t\t\t\t\t\t\t{additionalComponent}\n\t\t\t\t\t\t\t</AccordionItem>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (this.props.activeTab === tab.group) {\n\t\t\t\t\tmodalSelected = i - hiddenTabs; // Adjust the Carbon Tabs index to accomodate hidden tabs\n\t\t\t\t}\n\t\t\t\ttabLists.push(\n\t\t\t\t\t<Tab\n\t\t\t\t\t\tkey={tab.group}\n\t\t\t\t\t\ttitle={filter([tab.text, this._getMessageCountForCategory(tab)]).join(\"\")}\n\t\t\t\t\t\tclassName={classNames({ \"properties-hidden-container\": tab.content.itemType === ItemType.TEARSHEET })}\n\t\t\t\t\t\tonClick={this._modalTabsOnClick.bind(this, tab.group)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{filter([tab.text, this._getMessageCountForCategory(tab)]).join(\"\")}\n\t\t\t\t\t</Tab>\n\t\t\t\t);\n\n\t\t\t\ttabPanels.push(\n\t\t\t\t\t<TabPanel key={tab.group} className={classNames(\"properties-primary-tab-panel\",\n\t\t\t\t\t\t{ \"tearsheet-container\": this.props.controller.isTearsheetContainer() },\n\t\t\t\t\t\t{ \"right-flyout-tabs-view\": this.props.rightFlyout && this.props.categoryView === CATEGORY_VIEW.TABS })}\n\t\t\t\t\t>\n\t\t\t\t\t\t{panelItems}\n\t\t\t\t\t\t{additionalComponent}\n\t\t\t\t\t</TabPanel>\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tif (this.props.rightFlyout && this.props.categoryView !== CATEGORY_VIEW.TABS) {\n\t\t\treturn (\n\t\t\t\t<React.Fragment key={\"tabContent.\" + key} >\n\t\t\t\t\t{tabContent.length ? (<div key={\"cat.\" + key} className=\"properties-categories\">\n\t\t\t\t\t\t{tabContent}\n\t\t\t\t\t</div>) : null}\n\t\t\t\t\t{tabContentAcc.length ? (<Accordion size=\"lg\">\n\t\t\t\t\t\t<div key={\"cat.\" + key} className=\"properties-categories\">\n\t\t\t\t\t\t\t{tabContentAcc}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Accordion>) : null}\n\t\t\t\t</React.Fragment>\n\t\t\t);\n\t\t}\n\t\treturn (\n\t\t\t<Tabs key={\"tab.\" + key}\n\t\t\t\tselectedIndex={modalSelected}\n\t\t\t>\n\t\t\t\t<TabList className=\"properties-primaryTabs\" aria-label={tabListAriaLabel}>\n\t\t\t\t\t{tabLists}\n\t\t\t\t</TabList>\n\t\t\t\t<TabPanels>\n\t\t\t\t\t{tabPanels}\n\t\t\t\t</TabPanels>\n\t\t\t</Tabs>\n\t\t);\n\t}\n\n\t_getContainerIndex(hasAlertsTab, index) {\n\t\t// need to ensure that when alert tab is rendered, the existing tabs get the same id\n\t\t// otherwise re-render will cause controls to lose focus\n\t\tif (hasAlertsTab && index === 0) {\n\t\t\treturn \"alerts\";\n\t\t}\n\t\tif (hasAlertsTab) {\n\t\t\treturn index - 1;\n\t\t}\n\t\treturn index;\n\t}\n\n\tgenPanelSelector(key, tabs, dependsOn, propertyId, indexof, panelId, className) {\n\t\tconst subPanels = this.generateAdditionalPanels(tabs, key, propertyId, indexof, false, className);\n\t\treturn (\n\t\t\t<SelectorPanel\n\t\t\t\tkey={\"selectorPanel\" + key}\n\t\t\t\tpanels={subPanels}\n\t\t\t\tdependsOn={dependsOn}\n\t\t\t\tcontroller={this.props.controller}\n\t\t\t/>\n\t\t);\n\t}\n\n\tgenerateAdditionalPanels(tabs, key, propertyId, indexof, indent, groupClassName) {\n\t\tconst subPanels = {};\n\t\tfor (let i = 0; i < tabs.length; i++) {\n\t\t\tconst tab = tabs[i];\n\t\t\tlet className = \"properties-control-panel\";\n\t\t\tif (tab.content && tab.content.itemType === \"textPanel\") {\n\t\t\t\tclassName = \"\";\n\t\t\t}\n\t\t\t// Always show indentation when insert_panels set to true\n\t\t\tif (indent) {\n\t\t\t\tclassName += \" properties-control-nested-panel\";\n\t\t\t}\n\t\t\tsubPanels[tab.group] = (\n\t\t\t\t<div className={classNames(className, groupClassName)} key={tab.group + key}>\n\t\t\t\t\t{this.genUIItem(i, tab.content, propertyId, indexof)}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn subPanels;\n\t}\n\n\tgenUIContent(uiItems, propertyId, indexof) {\n\t\tvar uiContent = [];\n\t\tfor (var i = 0; i < uiItems.length; i++) {\n\t\t\tuiContent.push(this.genUIItem(i, uiItems[i], propertyId, indexof));\n\t\t}\n\t\treturn uiContent;\n\t}\n\n\t/*\n\t* inPropertyId and indexOf only used for subpanel in tables\n\t*/\n\tgenUIItem(key, uiItem, inPropertyId, indexof) {\n\t\tlet textClass = \"\";\n\t\tlet icon = null;\n\t\tlet text = \"\";\n\t\tswitch (uiItem.itemType) {\n\t\tcase (\"control\"): {\n\t\t\t// If the uiItem has additonalPanels, this indicates that the uiItem is\n\t\t\t// a vertical radio button set followed by a SelectorPanel which has the\n\t\t\t// insert_panels boolean set to true.\n\t\t\tif (uiItem.additionalItems && uiItem.additionalItems.length > 0) {\n\t\t\t\tuiItem.control.additionalItems = uiItem.additionalItems;\n\t\t\t\tuiItem.control.optionalPanels =\n\t\t\t\t\tthis.generateAdditionalPanels(uiItem.additionalItems, key, null, indexof, true);\n\t\t\t}\n\n\t\t\tconst propertyId = { name: uiItem.control.name };\n\n\t\t\t// Used for subpanels in tables\n\t\t\tif (inPropertyId) {\n\t\t\t\tconst parentPropertyId = cloneDeep(inPropertyId);\n\t\t\t\t// This control is the last child in parentPropertyId, need to update the child's col index\n\t\t\t\tthis.props.controller.updateLastChildPropertyId(parentPropertyId, { col: indexof(uiItem.control.name) });\n\t\t\t\treturn this.ControlFactory.createControlItem(uiItem.control, parentPropertyId);\n\t\t\t}\n\n\t\t\treturn this.ControlFactory.createControlItem(uiItem.control, propertyId);\n\t\t}\n\t\tcase (\"additionalLink\"):\n\t\t\tvar subPanel = this.genPanel(key, uiItem.panel, inPropertyId, indexof);\n\t\t\treturn (<SubPanelButton key={\"sub-panel-button.\" + key}\n\t\t\t\tlabel={uiItem.text}\n\t\t\t\ttitle={uiItem.secondaryText}\n\t\t\t\tpanel={subPanel}\n\t\t\t\tcontroller={this.props.controller}\n\t\t\t\trightFlyout={this.props.rightFlyout}\n\t\t\t/>);\n\t\tcase (\"staticText\"):\n\t\t\ttextClass = classNames(\"properties-static-text\", uiItem.textType);\n\t\t\ticon = uiItem.textType === \"info\" ? <div><Icon type={CARBON_ICONS.INFORMATION} className=\"properties-static-text-icon-info\" /></div> : null;\n\t\t\ttext = <div className={textClass}>{PropertyUtil.evaluateText(uiItem.text, this.props.controller)}</div>;\n\t\t\treturn <div key={\"static-text.\" + key} className=\"properties-static-text-container\">{icon}{text}</div>;\n\t\tcase (\"linkText\"): // linkText used for Alerts tab. Only used internally\n\t\t\ttextClass = classNames(\"properties-link-text-container\", uiItem.textType);\n\t\t\tif (uiItem.textType === \"warning\") {\n\t\t\t\ticon = <Icon type={CONDITION_MESSAGE_TYPE.WARNING} />;\n\t\t\t} else if (uiItem.textType === \"error\") {\n\t\t\t\ticon = <Icon type={CONDITION_MESSAGE_TYPE.ERROR} />;\n\t\t\t}\n\t\t\ttext = (\n\t\t\t\t<Link className=\"properties-link-text\" onClick={this._handleMessageClick.bind(this, uiItem.controlId)} >\n\t\t\t\t\t{PropertyUtil.evaluateText(uiItem.text, this.props.controller)}\n\t\t\t\t</Link>);\n\t\t\treturn (\n\t\t\t\t<div key={\"link-text.\" + key} className={textClass} >\n\t\t\t\t <div className=\"properties-alerts-icon\">{icon}</div>\n\t\t\t\t {text}\n\t\t\t\t</div>\n\t\t\t);\n\t\tcase (\"hSeparator\"):\n\t\t\treturn <hr key={\"h-separator.\" + key} className=\"properties-h-separator\" />;\n\t\tcase (\"panel\"):\n\t\tcase (\"tearsheet\"):\n\t\t\treturn this.genPanel(key, uiItem.panel, inPropertyId, indexof);\n\t\tcase (\"subTabs\"):\n\t\t\t// All Subtabs will become a LeftNav if displayed inside a Tearsheet container\n\t\t\treturn (<Subtabs key={\"subtabs.\" + key}\n\t\t\t\ttabs={uiItem.tabs}\n\t\t\t\tclassName={uiItem.className}\n\t\t\t\tcontroller={this.props.controller}\n\t\t\t\trightFlyout={this.props.rightFlyout}\n\t\t\t\tgenUIItem={this.genUIItem}\n\t\t\t\tnestedPanel={uiItem.nestedPanel}\n\t\t\t\tleftnav={this.props.controller.isTearsheetContainer()}\n\t\t\t/>);\n\t\tcase (\"primaryTabs\"):\n\t\t\treturn this.genPrimaryTabs(key, uiItem.tabs, inPropertyId, indexof);\n\t\tcase (\"panelSelector\"):\n\t\t\treturn this.genPanelSelector(key, uiItem.tabs, uiItem.dependsOn, inPropertyId, indexof, uiItem.id, uiItem.className);\n\t\tcase (\"checkboxSelector\"):\n\t\t\treturn this.genPanel(key, uiItem.panel, inPropertyId, indexof);\n\t\tcase (\"customPanel\"):\n\t\t\treturn this.generateCustomPanel(key, uiItem.panel);\n\t\t\t// only generate summary panel for right side flyout\n\t\tcase (\"action\"):\n\t\t\treturn this.actionFactory.generateAction(key, uiItem.action);\n\t\tcase (\"textPanel\"):\n\t\t\tif (uiItem.panel) {\n\t\t\t\treturn (<TextPanel key={\"text-panel-\" + key} panel={uiItem.panel} controller={this.props.controller} />);\n\t\t\t}\n\t\t\treturn <div key={\"unknown.\" + key}>Unknown: {uiItem.itemType}</div>;\n\t\tdefault:\n\t\t\treturn <div key={\"unknown.\" + key}>Unknown: {uiItem.itemType}</div>;\n\t\t}\n\t}\n\n\tgenerateCustomPanel(key, panel) {\n\t\tif (this.props.customPanels) {\n\t\t\tfor (const custPanel of this.props.customPanels) {\n\t\t\t\tif (custPanel.id() === panel.id) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={classNames(\"properties-custom-panel\", { \"properties-control-nested-panel\": get(panel, \"nestedPanel\", false) }) }\n\t\t\t\t\t\t\t\tkey={\"custom.\" + key}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{new custPanel(panel.parameters, this.props.controller, panel.data).renderPanel()}\n\t\t\t\t\t\t\t</div>);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tlogger.warn(\"Error thrown creating custom panel: \" + error);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn <div key={\"custom.\" + key}>Panel Not Found: {panel.id}</div>;\n\t}\n\n\tgenerateSharedControlNames(panel) {\n\t\tfor (const info of this.props.controller.getSharedCtrlInfo()) {\n\t\t\tif (typeof info.id !== \"undefined\" && info.id === panel.id) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tconst sharedCtrlNames = [];\n\t\tfor (const panelItem of panel.uiItems) {\n\t\t\t// only push uiItems with controls. Some uiItems are for display only and shouldn't be added.\n\t\t\tif (panelItem.control && panelItem.control.name) {\n\t\t\t\tconst controlName = panelItem.control.name;\n\t\t\t\tsharedCtrlNames.push({\n\t\t\t\t\t\"controlName\": controlName\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tthis.props.controller.addSharedControls(panel.id, sharedCtrlNames);\n\t}\n\n\tgenPanel(key, panel, propertyId, indexof) {\n\t\tlet content = this.genUIContent(panel.uiItems, propertyId, indexof);\n\t\tconst id = \"panel.\" + key;\n\t\tswitch (panel.panelType) {\n\t\tcase (\"columnSelection\"):\n\t\t\tthis.generateSharedControlNames(panel);\n\t\t\t// needs to be ran after setting shared controls to get correct fields in shared controls\n\t\t\tcontent = this.genUIContent(panel.uiItems, propertyId, indexof);\n\t\t\treturn (<ControlPanel\n\t\t\t\tkey={id}\n\t\t\t\tcontroller={this.props.controller}\n\t\t\t\tpanel={panel}\n\t\t\t>\n\t\t\t\t{content}\n\t\t\t</ControlPanel>);\n\t\tcase (\"summary\"):\n\t\t\tif (this.props.rightFlyout) {\n\t\t\t\treturn (\n\t\t\t\t\t<SummaryPanel\n\t\t\t\t\t\tkey={\"summary-panel-\" + id}\n\t\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\t\tpanel={panel}\n\t\t\t\t\t>\n\t\t\t\t\t\t{content}\n\t\t\t\t\t</SummaryPanel>);\n\t\t\t}\n\t\t\treturn content;\n\t\tcase (\"actionPanel\"):\n\t\t\treturn (\n\t\t\t\t<ActionPanel key={\"action-panel-\" + key} controller={this.props.controller} panel={panel}>\n\t\t\t\t\t{content}\n\t\t\t\t</ActionPanel>);\n\t\tcase (\"twisty\"):\n\t\t\treturn (\n\t\t\t\t<TwistyPanel\n\t\t\t\t\tkey={id}\n\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\tpanel={panel}\n\t\t\t\t>\n\t\t\t\t\t{content}\n\t\t\t\t</TwistyPanel>);\n\t\tcase (\"tearsheet\"):\n\t\t\tthis.TEARSHEETS[panel.id] = {\n\t\t\t\tpanel: panel,\n\t\t\t\ttitle: panel.label,\n\t\t\t\tdescription: panel.description ? panel.description.text : null,\n\t\t\t\tcontent: content\n\t\t\t};\n\t\t\tif (this.props.controller.getActiveTearsheet() !== null) {\n\t\t\t\tthis.visibleTearsheet = this.TEARSHEETS[this.props.controller.getActiveTearsheet()];\n\t\t\t} else {\n\t\t\t\tthis.visibleTearsheet = null;\n\t\t\t}\n\t\t\tif (!this.FIRST_TEARSHEET_ID || this.FIRST_TEARSHEET_ID === panel.id) {\n\t\t\t\tthis.FIRST_TEARSHEET_ID = panel.id;\n\t\t\t\tconst onCloseCallback = () => {\n\t\t\t\t\tthis.props.controller.clearActiveTearsheet();\n\t\t\t\t};\n\t\t\t\treturn (\n\t\t\t\t\t<TearSheet\n\t\t\t\t\t\topen={this.props.controller.getActiveTearsheet() !== null}\n\t\t\t\t\t\tonCloseCallback={onCloseCallback}\n\t\t\t\t\t\tcancelHandler={onCloseCallback}\n\t\t\t\t\t\tkey={panel.id}\n\t\t\t\t\t\ttearsheet={this.visibleTearsheet}\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn null;\n\t\tcase (\"column\"):\n\t\t\treturn (\n\t\t\t\t<ColumnPanel\n\t\t\t\t\tkey={id}\n\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\tpanel={panel}\n\t\t\t\t>\n\t\t\t\t\t{content}\n\t\t\t\t</ColumnPanel>);\n\t\tdefault:\n\t\t\treturn (<ControlPanel\n\t\t\t\tkey={id}\n\t\t\t\tcontroller={this.props.controller}\n\t\t\t\tpanel={panel}\n\t\t\t>\n\t\t\t\t{content}\n\t\t\t</ControlPanel>);\n\t\t}\n\t}\n\n\t/**\n\t* Close the field picker and invoke callback function\n\t* @param newSelectedFields all fields selected, includes newSelections\n\t* @param newSelections the newly selected rows\n\t*/\n\tcloseFieldPicker(newSelectedFields, newSelections) {\n\t\tif (this.closeFieldPickerCallback) {\n\t\t\tthis.closeFieldPickerCallback(newSelectedFields, newSelections);\n\t\t\tthis.closeFieldPickerCallback = null;\n\t\t}\n\t\tthis.props.showPropertiesButtons(true);\n\t\tthis.fieldPickerPropertyId = null;\n\t\tthis.setState({\n\t\t\tshowFieldPicker: false\n\t\t});\n\t}\n\n\t/**\n\t* Opens the field picker\n\t* @param propertyId of the control opening the field picker\n\t* @param callback function to invoke when closing the field picker\n\t*/\n\topenFieldPicker(propertyId, callback) {\n\t\tthis.props.showPropertiesButtons(false);\n\t\tthis.fieldPickerPropertyId = propertyId;\n\t\tthis.closeFieldPickerCallback = callback;\n\t\tthis.setState({\n\t\t\tshowFieldPicker: true\n\t\t});\n\t}\n\n\t/**\n\t* Renders the field picker with the control's current selected values and fields\n\t* @param title string to display as the field picker's title\n\t*/\n\tfieldPicker(title) {\n\t\tif (this.fieldPickerPropertyId && this.fieldPickerPropertyId.name) {\n\t\t\tconst currentControlValues = this.props.controller.getPropertyValue(this.fieldPickerPropertyId);\n\t\t\t// if in columnSelectionPanel, filter out fields that are in the other controls\n\t\t\tconst fields = this.props.controller.getFilteredDatasetMetadata(this.fieldPickerPropertyId);\n\n\t\t\t// create a list of field names to be passed into the field picker\n\t\t\tconst control = this.props.controller.getControl(this.fieldPickerPropertyId);\n\t\t\tlet dmImage;\n\t\t\tconst tableFieldIndex = PropertyUtil.getTableFieldIndex(control);\n\t\t\tconst subControls = control.subControls;\n\t\t\tif (tableFieldIndex !== -1) {\n\t\t\t\tif (!subControls) {\n\t\t\t\t\tdmImage = control.dmImage;\n\t\t\t\t} else {\n\t\t\t\t\tdmImage = subControls[tableFieldIndex].dmImage;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst formattedFieldsList = PropertyUtil.getFieldsFromControlValues(control, currentControlValues, fields);\n\n\t\t\treturn (<div className=\"properties-fp-table\">\n\t\t\t\t<FieldPicker\n\t\t\t\t\tkey=\"field-picker-control\"\n\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\tcloseFieldPicker={this.closeFieldPicker}\n\t\t\t\t\tcurrentFields={formattedFieldsList}\n\t\t\t\t\tfields={fields}\n\t\t\t\t\ttitle={title}\n\t\t\t\t\trightFlyout={this.props.rightFlyout}\n\t\t\t\t\tdmIcon={dmImage}\n\t\t\t\t/>\n\t\t\t</div>);\n\t\t}\n\t\treturn <div />;\n\t}\n\n\tgenAlertsTab(messages) {\n\t\tconst msgUIItems = messages.map((msg) => (\n\t\t\t{\n\t\t\t\t\"itemType\": \"linkText\",\n\t\t\t\t\"text\": msg.text,\n\t\t\t\t\"textType\": msg.type,\n\t\t\t\t\"controlId\": { \"name\": msg.id_ref }\n\t\t\t}));\n\n\t\treturn {\n\t\t\t\"text\": PropertyUtil.formatMessage(\n\t\t\t\tthis.props.controller.getReactIntl(),\n\t\t\t\tMESSAGE_KEYS.ALERTS_TAB_TITLE),\n\t\t\t\"group\": ALERT_TAB_GROUP,\n\t\t\t\"content\":\n\t\t\t\t{ \"itemType\": \"panel\",\n\t\t\t\t\t\"panel\": {\n\t\t\t\t\t\t\"id\": \"alerts-panel\",\n\t\t\t\t\t\t\"panelType\": \"general\",\n\t\t\t\t\t\t\"uiItems\": msgUIItems\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t};\n\t}\n\n\trender() {\n\t\tlet uiItems = this.props.controller.getUiItems();\n\t\tif (this.props.showAlertsTab && !isEmpty(this.messages) && uiItems[0].itemType === \"primaryTabs\" && uiItems[0].tabs && uiItems[0].tabs.length > 1) {\n\t\t\t// create a new copy for uiItems object so that alerts are not added multiple times\n\t\t\tuiItems = cloneDeep(uiItems);\n\t\t\tuiItems[0].tabs.unshift(this.genAlertsTab(this.messages)); // add alerts tab to the beginning of the tabs array\n\t\t}\n\n\t\tlet content = this.genUIContent(uiItems);\n\t\tlet wideFly = <div />;\n\t\tlet stackedTearsheet;\n\n\t\tconst form = this.props.controller.getForm();\n\t\tconst title = PropertyUtil.formatMessage(this.props.controller.getReactIntl(),\n\t\t\tMESSAGE_KEYS.FIELDPICKER_SAVEBUTTON_LABEL) + \" \" + form.label;\n\n\t\tif (this.state.showFieldPicker) {\n\t\t\tif (this.props.rightFlyout) {\n\t\t\t\twideFly = (<WideFlyout\n\t\t\t\t\tshowPropertiesButtons={false}\n\t\t\t\t\tshow\n\t\t\t\t\ttitle={title}\n\t\t\t\t\tlight={this.props.controller.getLight()}\n\t\t\t\t>\n\t\t\t\t\t{this.fieldPicker(title)}\n\t\t\t\t</WideFlyout>);\n\t\t\t} else if (this.props.controller.isTearsheetContainer()) {\n\t\t\t\tstackedTearsheet = (<TearSheet\n\t\t\t\t\topen\n\t\t\t\t\tstacked\n\t\t\t\t\tcancelHandler={this.closeFieldPicker}\n\t\t\t\t\ttearsheet={{\n\t\t\t\t\t\ttitle: title,\n\t\t\t\t\t\tcontent: this.fieldPicker()\n\t\t\t\t\t}}\n\t\t\t\t/>);\n\t\t\t} else {\n\t\t\t\tcontent = this.fieldPicker(title);\n\t\t\t}\n\t\t}\n\n\t\treturn (\n\t\t\t<div className={classNames(\"properties-editor-form\",\n\t\t\t\t{ \"tearsheet-container\": this.props.controller.isTearsheetContainer() },\n\t\t\t\t{ \"right-flyout-tabs-view\": this.props.rightFlyout && this.props.categoryView === CATEGORY_VIEW.TABS },\n\t\t\t\t{ \"field-picker\": this.state.showFieldPicker })}\n\t\t\t>\n\t\t\t\t{content}\n\t\t\t\t{wideFly}\n\t\t\t\t{stackedTearsheet}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nEditorForm.propTypes = {\n\tcontroller: PropTypes.object.isRequired,\n\tadditionalComponents: PropTypes.object,\n\tshowPropertiesButtons: PropTypes.func,\n\tcustomPanels: PropTypes.array,\n\trightFlyout: PropTypes.bool,\n\tcategoryView: PropTypes.oneOf([CATEGORY_VIEW.ACCORDIONS, CATEGORY_VIEW.TABS]),\n\tshowAlertsTab: PropTypes.bool,\n\tactiveTab: PropTypes.string, // set by redux\n\tsetActiveTab: PropTypes.func, // set by redux\n\tmessages: PropTypes.array // set by redux\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tactiveTab: state.componentMetadataReducer.activeTab,\n\tmessages: ownProps.controller.getErrorMessages(true, true, true)\n});\n\nconst mapDispatchToProps = (dispatch, ownProps) => ({\n\tsetActiveTab: (tabId) => {\n\t\tdispatch(setActiveTab(tabId));\n\t}\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(EditorForm);\n","var baseGet = require('./_baseGet');\n\n/**\n * The opposite of `_.property`; this method creates a function that returns\n * the value at a given path of `object`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var array = [0, 1, 2],\n * object = { 'a': array, 'b': array, 'c': array };\n *\n * _.map(['a[2]', 'c[0]'], _.propertyOf(object));\n * // => [2, 0]\n *\n * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));\n * // => [2, 0]\n */\nfunction propertyOf(object) {\n return function(path) {\n return object == null ? undefined : baseGet(object, path);\n };\n}\n\nmodule.exports = propertyOf;\n","/*\n * Copyright 2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { propertyOf } from \"lodash\";\n\nclass Title {\n\tconstructor(title) {\n\t\tthis.actions = title.action_refs || [];\n\t}\n\n\tstatic makeTitle(uiGroup) {\n\t\tif (uiGroup) {\n\t\t\treturn new Title(\n\t\t\t\tpropertyOf(uiGroup)(\"action_refs\")\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}\n\n\tactionIds() {\n\t\treturn this.actions;\n\t}\n}\n\nexport class TitleMetadata {\n\tconstructor(title) {\n\t\tthis.Title = title;\n\t}\n\n\tstatic makeTitleMetadata(title) {\n\t\tif (title) {\n\t\t\treturn new TitleMetadata(new Title(title));\n\t\t}\n\t\treturn null;\n\t}\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { propertyOf } from \"lodash\";\n\nexport class L10nProvider {\n\tconstructor(resources) {\n\t\tthis.resources = resources;\n\t}\n\n\t/**\n\t * Look up a localised resource using the supplied key.\n\t */\n\tl10n(key, defaultVal) {\n\t\tif (this.resources) {\n\t\t\tconst value = propertyOf(this.resources)(key);\n\t\t\tif (value || value === \"\") {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t\tif (defaultVal) {\n\t\t\treturn defaultVal;\n\t\t}\n\t\treturn key;\n\t}\n\n\t/**\n\t * Look up a localised resource. Check for resource first, then fall back to default value\n\t */\n\tl10nResource(resourceObj) {\n\t\tlet text;\n\t\tif (resourceObj) {\n\t\t\tif (resourceObj.resource_key) {\n\t\t\t\ttext = this.l10n(resourceObj.resource_key);\n\t\t\t\tif ((!text || text === resourceObj.resource_key) && resourceObj.default) {\n\t\t\t\t\ttext = resourceObj.default;\n\t\t\t\t}\n\t\t\t} else if (resourceObj.default) {\n\t\t\t\ttext = resourceObj.default;\n\t\t\t}\n\t\t}\n\t\treturn text;\n\t}\n\n\t/**\n\t * Look up a localised resource label using the supplied base key with \".label\" appended.\n\t */\n\tl10nLabel(uiObject, key) {\n\t\treturn this.l10nResource(uiObject.label) ? this.l10nResource(uiObject.label) : this.l10n(key + \".label\", key);\n\t}\n\n\t/**\n\t * Look up a localised resource description/tooltip using the supplied base key with \".desc\" appended.\n\t */\n\tl10nDesc(uiObject, key) {\n\t\treturn this.l10nResource(uiObject.description) ? this.l10nResource(uiObject.description) : this.l10n(key + \".desc\", key);\n\t}\n\n\t/**\n\t * Look up a localised resource label for an enumerated value using the supplied\n\t * base key with the value and \".label\" appended e.g. \"measurement.continous.label\".\n\t */\n\tl10nValueLabel(baseKey, value) {\n\t\tconst lookupKey = baseKey + \".\" + value + \".label\";\n\t\treturn this.l10n(lookupKey, value);\n\t}\n\n\tl10nValueDesc(baseKey, value) {\n\t\tconst lookupKey = baseKey + \".\" + value + \".desc\";\n\t\tconst desc = this.l10n(lookupKey, value);\n\t\treturn (desc !== value ? desc : null);\n\t}\n}\n\nexport class ResourceDef {\n\tstatic make(resourceObj) {\n\t\tlet resource;\n\t\tif (resourceObj) {\n\t\t\tresource = new ResourceDef();\n\t\t\tresource.default = resourceObj.default;\n\t\t\tresource.resource_key = resourceObj.resource_key;\n\t\t\tif (resourceObj.placement) {\n\t\t\t\tresource.placement = resourceObj.placement;\n\t\t\t}\n\t\t\tif (resourceObj.type) {\n\t\t\t\tresource.type = resourceObj.type;\n\t\t\t}\n\t\t\tif (resourceObj.link) {\n\t\t\t\tresource.link = resourceObj.link;\n\t\t\t}\n\t\t}\n\t\treturn resource;\n\t}\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { GroupType } from \"../constants/form-constants\";\nimport { ResourceDef } from \"../util/L10nProvider\";\nimport { has, propertyOf } from \"lodash\";\nimport { v4 as uuid4 } from \"uuid\";\n\nclass Group {\n\tconstructor(cname, parameters, actions, type, label, dependsOn, insertPanels, nestedPanel, subGroups, description, data, className, copen) {\n\t\tthis.name = cname;\n\t\tthis.parameters = parameters;\n\t\tthis.actions = actions;\n\t\tthis.type = type;\n\t\tthis.label = ResourceDef.make(label);\n\t\tthis.dependsOn = dependsOn;\n\t\tthis.insertPanels = insertPanels;\n\t\tthis.nestedPanel = nestedPanel;\n\t\tthis.subGroups = subGroups;\n\t\tthis.description = ResourceDef.make(description);\n\t\tthis.data = data;\n\t\tthis.className = className;\n\t\tthis.open = copen;\n\t}\n\n\tparameterNames() {\n\t\treturn this.parameters;\n\t}\n\n\tactionIds() {\n\t\treturn this.actions;\n\t}\n\n\tgroupType() {\n\t\treturn (this.type ? this.type : GroupType.CONTROLS);\n\t}\n\n\tstatic makeGroup(uiGroup) {\n\t\tif (uiGroup) {\n\t\t\tlet subGroups;\n\t\t\tif (has(uiGroup, \"group_info\")) {\n\t\t\t\tsubGroups = [];\n\t\t\t\tfor (const group of uiGroup.group_info) {\n\t\t\t\t\tconst newGroup = Group.makeGroup(group);\n\t\t\t\t\tif (newGroup !== null) {\n\t\t\t\t\t\tsubGroups.push(newGroup);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn new Group(\n\t\t\t\tpropertyOf(uiGroup)(\"id\"),\n\t\t\t\tpropertyOf(uiGroup)(\"parameter_refs\"),\n\t\t\t\tpropertyOf(uiGroup)(\"action_refs\"),\n\t\t\t\tpropertyOf(uiGroup)(\"type\"),\n\t\t\t\tpropertyOf(uiGroup)(\"label\"),\n\t\t\t\tpropertyOf(uiGroup)(\"depends_on_ref\"),\n\t\t\t\tpropertyOf(uiGroup)(\"insert_panels\"),\n\t\t\t\tpropertyOf(uiGroup)(\"nested_panel\"),\n\t\t\t\tsubGroups,\n\t\t\t\tpropertyOf(uiGroup)(\"description\"),\n\t\t\t\tpropertyOf(uiGroup)(\"data\"),\n\t\t\t\tpropertyOf(uiGroup)(\"class_name\"),\n\t\t\t\tpropertyOf(uiGroup)(\"open\")\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}\n}\n\nexport class GroupMetadata {\n\tconstructor(groups) {\n\t\tthis.groups = groups;\n\t}\n\n\tstatic makeGroupMetadata(uiGroups, parameters) {\n\t\tconst groups = [];\n\t\tif (uiGroups) {\n\t\t\tfor (const group of uiGroups) {\n\t\t\t\tconst newGroup = Group.makeGroup(group);\n\t\t\t\tif (newGroup !== null) {\n\t\t\t\t\tgroups.push(newGroup);\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\t// if no group create a default group with controls\n\t\t\tgroups.push(new Group(uuid4(), parameters, null, GroupType.CONTROLS));\n\t\t}\n\t\treturn new GroupMetadata(groups);\n\t}\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nimport { ResourceDef } from \"../util/L10nProvider\";\n\nexport class Action {\n\tconstructor(actionName, label, description, control, data, image, button, className, customActionId) {\n\t\tthis.name = actionName;\n\t\tthis.label = label;\n\t\tthis.description = description;\n\t\tthis.actionType = control;\n\t\tthis.data = data;\n\t\tthis.image = image;\n\t\tthis.button = button;\n\t\tthis.className = className;\n\t\tthis.customActionId = customActionId;\n\t}\n}\n\nclass ActionDef {\n\tstatic makeActionDef(action) {\n\t\tif (action) {\n\t\t\tconst actionDef = new ActionDef();\n\t\t\tactionDef.id = action.id;\n\t\t\tactionDef.label = ResourceDef.make(action.label);\n\t\t\tactionDef.description = ResourceDef.make(action.description);\n\t\t\tactionDef.control = action.control;\n\t\t\tactionDef.data = action.data;\n\t\t\tactionDef.image = action.image;\n\t\t\tactionDef.button = action.button;\n\t\t\tactionDef.className = action.class_name;\n\t\t\tactionDef.customActionId = action.custom_action_id;\n\t\t\treturn actionDef;\n\t\t}\n\t\treturn null;\n\t}\n}\n\nexport class ActionMetadata {\n\tconstructor(actionDefs) {\n\t\tthis.actionDefs = actionDefs;\n\t}\n\n\t// Return a single action\n\tgetAction(actionId) {\n\t\tlet actionDef;\n\t\tthis.actionDefs.forEach(function(action) {\n\t\t\tif (action.id === actionId) {\n\t\t\t\tactionDef = action;\n\t\t\t}\n\t\t});\n\t\treturn actionDef;\n\t}\n\n\tstatic makeActionMetadata(uihintsActions) {\n\t\tif (uihintsActions) {\n\t\t\tconst actionsDefs = [];\n\t\t\tfor (const action of uihintsActions) {\n\t\t\t\tconst actionDef = ActionDef.makeActionDef(action);\n\t\t\t\tif (actionDef) {\n\t\t\t\t\tactionsDefs.push(actionDef);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn new ActionMetadata(actionsDefs);\n\t\t}\n\t\treturn null;\n\t}\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Separator } from \"../constants/form-constants\";\nimport { Type, ParamRole, EditStyle, ControlType } from \"../constants/form-constants\";\nimport { ResourceDef } from \"../util/L10nProvider\";\nimport { propertyOf } from \"lodash\";\nimport { toType } from \"../util/property-utils\";\n\nexport class ParameterDef {\n\tconstructor(settings) {\n\t\tif (settings.id) {\n\t\t\tthis.name = settings.id;\n\t\t}\n\t\tif (settings.label) {\n\t\t\tthis.label = ResourceDef.make(settings.label);\n\t\t}\n\t\tif (settings.description) {\n\t\t\tthis.description = ResourceDef.make(settings.description);\n\t\t}\n\t\tif (settings.type) {\n\t\t\tthis.type = settings.type;\n\t\t}\n\t\tif (settings.role) {\n\t\t\tthis.role = settings.role;\n\t\t}\n\t\tif (settings.valueRestriction) {\n\t\t\tthis.valueRestriction = settings.valueRestriction;\n\t\t}\n\t\tif (settings.defaultValue !== null && toType(settings.defaultValue) !== \"undefined\") {\n\t\t\tif (settings.defaultValue.parameter_ref) {\n\t\t\t\tthis.defaultValue = {};\n\t\t\t\tthis.defaultValue.parameterRef = settings.defaultValue.parameter_ref;\n\t\t\t} else {\n\t\t\t\tthis.defaultValue = settings.defaultValue;\n\t\t\t}\n\t\t} else if (typeof settings.defaultValue === \"undefined\" && (this.isList() || this.isMapValue())) {\n\t\t\tthis.defaultValue = []; // This is a nested structure\n\t\t}\n\t\tif (typeof settings.labelVisible === \"boolean\") {\n\t\t\tthis.labelVisible = settings.labelVisible;\n\t\t}\n\t\tif (settings.control) {\n\t\t\tthis.control = settings.control;\n\t\t}\n\t\tif (settings.orientation) {\n\t\t\tthis.orientation = settings.orientation;\n\t\t}\n\t\tif (settings.width) {\n\t\t\tthis.width = settings.width;\n\t\t}\n\t\tif (settings.charLimit) {\n\t\t\tthis.charLimit = settings.charLimit;\n\t\t}\n\t\tif (settings.minValue) {\n\t\t\tthis.minValue = settings.minValue;\n\t\t}\n\t\tif (settings.maxValue) {\n\t\t\tthis.maxValue = settings.maxValue;\n\t\t}\n\t\tif (settings.placeHolderText) {\n\t\t\tthis.placeHolderText = ResourceDef.make(settings.placeHolderText);\n\t\t}\n\t\tif (settings.separator) {\n\t\t\tthis.separator = settings.separator;\n\t\t}\n\t\tif (settings.resource_key) {\n\t\t\tthis.resource_key = settings.resource_key;\n\t\t}\n\t\tif (toType(settings.visible) === \"boolean\") {\n\t\t\tthis.visible = settings.visible;\n\t\t} else {\n\t\t\tthis.visible = true;\n\t\t}\n\t\tif (settings.valueIcons) {\n\t\t\tthis.valueIcons = settings.valueIcons;\n\t\t}\n\t\tif (toType(settings.sortable) === \"boolean\") {\n\t\t\tthis.sortable = settings.sortable;\n\t\t}\n\t\tif (toType(settings.filterable) === \"boolean\") {\n\t\t\tthis.filterable = settings.filterable;\n\t\t}\n\t\tif (toType(settings.resizable) === \"boolean\") {\n\t\t\tthis.resizable = settings.resizable;\n\t\t}\n\t\tif (settings.editStyle) {\n\t\t\tthis.editStyle = settings.editStyle;\n\t\t}\n\t\tif (toType(settings.required) === \"boolean\") {\n\t\t\tthis.required = settings.required;\n\t\t}\n\t\tif (settings.numberGenerator) {\n\t\t\tsettings.numberGenerator.label = ResourceDef.make(settings.numberGenerator.label);\n\t\t\tthis.numberGenerator = settings.numberGenerator;\n\t\t}\n\t\tif (settings.isKey) {\n\t\t\tthis.isKey = settings.isKey;\n\t\t}\n\t\tif (settings.dmDefault) {\n\t\t\tthis.dmDefault = settings.dmDefault;\n\t\t}\n\t\tif (settings.dmImage) {\n\t\t\tthis.dmImage = settings.dmImage;\n\t\t}\n\t\tif (settings.language) {\n\t\t\tthis.language = settings.language;\n\t\t}\n\t\tif (settings.enableMaximize) {\n\t\t\tthis.enableMaximize = settings.enableMaximize;\n\t\t}\n\n\t\tif (toType(settings.summary) === \"boolean\") {\n\t\t\tthis.summary = settings.summary;\n\t\t}\n\t\tif (settings.increment) {\n\t\t\tthis.increment = settings.increment;\n\t\t}\n\t\tif (settings.textAfter) {\n\t\t\tthis.textAfter = ResourceDef.make(settings.textAfter);\n\t\t}\n\t\tif (settings.textBefore) {\n\t\t\tthis.textBefore = ResourceDef.make(settings.textBefore);\n\t\t}\n\t\tif (toType(settings.moveableRows) === \"boolean\") {\n\t\t\tthis.moveableRows = settings.moveableRows;\n\t\t}\n\t\tif (settings.generatedValues) {\n\t\t\tthis.generatedValues = settings.generatedValues;\n\t\t}\n\t\tif (settings.dateFormat) {\n\t\t\tthis.dateFormat = settings.dateFormat;\n\t\t}\n\t\tif (settings.timeFormat) {\n\t\t\tthis.timeFormat = settings.timeFormat;\n\t\t}\n\t\tif (settings.customControlId) {\n\t\t\tthis.customControlId = settings.customControlId;\n\t\t}\n\t\tif (settings.data) {\n\t\t\tthis.data = settings.data;\n\t\t}\n\t\tif (settings.rows) {\n\t\t\tthis.rows = settings.rows;\n\t\t}\n\t\tif (settings.displayChars) {\n\t\t\tthis.displayChars = settings.displayChars;\n\t\t}\n\t\tif (settings.uionly) {\n\t\t\tthis.uionly = settings.uionly;\n\t\t}\n\t\tif (settings.actionRef) {\n\t\t\tthis.actionRef = settings.actionRef;\n\t\t}\n\t\tif (toType(settings.customValueAllowed) === \"boolean\") {\n\t\t\tthis.customValueAllowed = settings.customValueAllowed;\n\t\t}\n\t\tif (toType(settings.shouldFilterItem) === \"boolean\") {\n\t\t\tthis.shouldFilterItem = settings.shouldFilterItem;\n\t\t}\n\t\tif (settings.className) {\n\t\t\tthis.className = settings.className;\n\t\t}\n\t\tif (settings.helperText) {\n\t\t\tthis.helperText = ResourceDef.make(settings.helperText);\n\t\t}\n\t\tif (settings.readOnly) {\n\t\t\tthis.readOnly = settings.readOnly;\n\t\t}\n\t}\n\n\tisList() {\n\t\tif (this.type) {\n\t\t\treturn this.type.startsWith(\"array[\");\n\t\t}\n\t\treturn false;\n\t}\n\n\tisMapValue() {\n\t\tif (this.type) {\n\t\t\treturn this.type.startsWith(\"map[\");\n\t\t}\n\t\treturn false;\n\t}\n\n\tisSubPanelEdit() {\n\t\tif (this.editStyle === EditStyle.SUBPANEL) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t// For multi select edit subpanel, fields having editStyle \"inline\" and undefined can be edited in the subpanel\n\tisInlineEdit() {\n\t\tif ((this.editStyle === EditStyle.INLINE || typeof this.editStyle === \"undefined\") && this.control !== ControlType.READONLY) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Determines if the given parameter object represents a compound field.\n\t *\n\t * @return True if the parameter represents a compound field\n\t */\n\tisCompoundField() {\n\t\tif (this.role && this.type) {\n\t\t\tconst isObject = this.type === Type.OBJECT || this.baseType() === Type.OBJECT;\n\t\t\treturn isObject && this.role === ParamRole.COLUMN;\n\t\t}\n\t\treturn false;\n\t}\n\n\tpropType() {\n\t\t// If we don't recognize the base type as one of the built-in types, assume it's a structure\n\t\tlet value;\n\t\tfor (const key in Type) {\n\t\t\tif (this.baseType() === Type[key]) {\n\t\t\t\tvalue = Type[key];\n\t\t\t}\n\t\t}\n\t\tif (!value) {\n\t\t\tvalue = Type.STRUCTURE;\n\t\t}\n\t\treturn value;\n\t}\n\n\tgetRole() {\n\t\tif (this.role) {\n\t\t\treturn this.role;\n\t\t} else if (this.getValidValues()) {\n\t\t\t// Assume valueRestriction implies ENUM\n\t\t\treturn ParamRole.ENUM;\n\t\t}\n\t\treturn ParamRole.UNSPECIFIED;\n\t}\n\n\t/**\n\t * Returns the type of a parameter.\n\t */\n\tbaseType() {\n\t\tconst typ = this.type;\n\t\tif (this.isList()) {\n\t\t\t// \"array[<value-type>]\" so remove the leading \"array[\" and trailing \"]\"\n\t\t\treturn typ.substring(6, this.type.length - 1);\n\t\t} else if (this.isMapValue()) {\n\t\t\t// \"map[<key-type>,<value-type>]\" so remove everything up to and including \",\" and drop the trailing \"]\"\n\t\t\treturn typ.substring(typ.indexOf(\",\") + 1, this.type.length - 1).trim();\n\t\t} else if (this.valueRestriction && !this.type) { // assume String for enums\n\t\t\treturn Type.STRING;\n\t\t}\n\t\treturn typ;\n\t}\n\n\tgetValidValues() {\n\t\tvar undef;\n\t\tif (this.valueRestriction) {\n\t\t\treturn this.valueRestriction;\n\t\t} else if (this.type === Type.BOOLEAN) {\n\t\t\treturn [true, false];\n\t\t}\n\t\treturn undef;\n\t}\n\n\tgetValidValueCount() {\n\t\treturn (this.getValidValues() ? this.getValidValues().length : 0);\n\t}\n\n\t/**\n\t * Returns the \"additionalText\" attribute which can be used to include additional\n\t * text associated with the property control on the UI.\n\t */\n\tgetAdditionalText(l10nProvider) {\n\t\treturn l10nProvider.l10nResource(this.placeHolderText);\n\t}\n\n\t/**\n\t * Returns the \"additionalHelperText\" attribute which can be used to include additional\n\t * helper text associated with the property control on the UI.\n\t*/\n\tgetAdditionalHelperText(l10nProvider) {\n\t\treturn l10nProvider.l10nResource(this.helperText);\n\t}\n\n\tgetTextAfter(l10nProvider) {\n\t\treturn l10nProvider.l10nResource(this.textAfter);\n\t}\n\tgetTextAfterType() {\n\t\treturn this.textAfter ? this.textAfter.type : null;\n\t}\n\tgetTextBefore(l10nProvider) {\n\t\treturn l10nProvider.l10nResource(this.textBefore);\n\t}\n\tgetTextBeforeType() {\n\t\treturn this.textBefore ? this.textBefore.type : null;\n\t}\n\n\t/**\n\t * Returns the \"control\" attribute which can be used to define which control should be used\n\t * for editing a property. The control should be valid for the associated property.\n\t */\n\tgetControl(defaultControl) {\n\t\treturn (this.control ? this.control : defaultControl);\n\t}\n\n\t/**\n\t * Returns the \"columns\" uihint or the default value if a \"columns\" hint has not been supplied.\n\t */\n\tcolumns(defaultCol) {\n\t\treturn (this.width ? this.width : defaultCol);\n\t}\n\n\t/**\n\t * Returns the \"separatorAfter\" attribute which can be used to insert a horizontal\n\t * separator before the control in the UI.\n\t */\n\tseparatorAfter() {\n\t\tif (this.separator === Separator.AFTER) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Returns the \"separatorBefore\" attribute which can be used to insert a horizontal\n\t * separator before the control in the UI.\n\t */\n\tseparatorBefore() {\n\t\tif (this.separator === Separator.BEFORE) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tstatic makeParameterDef(param, uihint, isKey) {\n\t\tif (param) {\n\t\t\treturn new ParameterDef({\n\t\t\t\t\"id\": propertyOf(param)(\"id\"),\n\t\t\t\t\"enableMaximize\": propertyOf(uihint)(\"enable_maximize\"),\n\t\t\t\t\"label\": propertyOf(uihint)(\"label\"),\n\t\t\t\t\"description\": propertyOf(uihint)(\"description\"),\n\t\t\t\t\"type\": propertyOf(param)(\"type\"),\n\t\t\t\t\"role\": propertyOf(param)(\"role\"),\n\t\t\t\t\"valueRestriction\": propertyOf(param)(\"enum\"),\n\t\t\t\t\"defaultValue\": propertyOf(param)(\"default\"),\n\t\t\t\t\"labelVisible\": propertyOf(uihint)(\"label_visible\"),\n\t\t\t\t\"control\": propertyOf(uihint)(\"control\"),\n\t\t\t\t\"orientation\": propertyOf(uihint)(\"orientation\"),\n\t\t\t\t\"width\": propertyOf(uihint)(\"width\"),\n\t\t\t\t\"charLimit\": propertyOf(uihint)(\"char_limit\"),\n\t\t\t\t\"minValue\": propertyOf(uihint)(\"min_value\"),\n\t\t\t\t\"maxValue\": propertyOf(uihint)(\"max_value\"),\n\t\t\t\t\"placeHolderText\": propertyOf(uihint)(\"place_holder_text\"),\n\t\t\t\t\"separator\": propertyOf(uihint)(\"separator\"),\n\t\t\t\t\"resource_key\": propertyOf(uihint)(\"resource_key\"),\n\t\t\t\t\"visible\": propertyOf(uihint)(\"visible\"),\n\t\t\t\t\"valueIcons\": propertyOf(uihint)(\"value_icons\"),\n\t\t\t\t\"sortable\": propertyOf(uihint)(\"sortable\"),\n\t\t\t\t\"filterable\": propertyOf(uihint)(\"filterable\"),\n\t\t\t\t\"resizable\": propertyOf(uihint)(\"resizable\"),\n\t\t\t\t\"editStyle\": propertyOf(uihint)(\"edit_style\"),\n\t\t\t\t\"required\": propertyOf(param)(\"required\"),\n\t\t\t\t\"numberGenerator\": propertyOf(uihint)(\"number_generator\"),\n\t\t\t\t\"isKey\": isKey,\n\t\t\t\t\"dmDefault\": propertyOf(uihint)(\"dm_default\"),\n\t\t\t\t\"dmImage\": propertyOf(uihint)(\"dm_image\"),\n\t\t\t\t\"language\": propertyOf(uihint)(\"language\"),\n\t\t\t\t\"summary\": propertyOf(uihint)(\"summary\"),\n\t\t\t\t\"increment\": propertyOf(uihint)(\"increment\"),\n\t\t\t\t\"textAfter\": propertyOf(uihint)(\"text_after\"),\n\t\t\t\t\"textBefore\": propertyOf(uihint)(\"text_before\"),\n\t\t\t\t\"moveableRows\": propertyOf(uihint)(\"moveable_rows\"),\n\t\t\t\t\"generatedValues\": propertyOf(uihint)(\"generated_values\"),\n\t\t\t\t\"dateFormat\": propertyOf(uihint)(\"date_format\"),\n\t\t\t\t\"timeFormat\": propertyOf(uihint)(\"time_format\"),\n\t\t\t\t\"customControlId\": propertyOf(uihint)(\"custom_control_id\"),\n\t\t\t\t\"data\": propertyOf(uihint)(\"data\"),\n\t\t\t\t\"rows\": propertyOf(uihint)(\"rows\"),\n\t\t\t\t\"displayChars\": propertyOf(uihint)(\"display_chars\"),\n\t\t\t\t\"uionly\": propertyOf(param)(\"uionly\"),\n\t\t\t\t\"actionRef\": propertyOf(uihint)(\"action_ref\"),\n\t\t\t\t\"customValueAllowed\": propertyOf(uihint)(\"custom_value_allowed\"),\n\t\t\t\t\"shouldFilterItem\": propertyOf(uihint)(\"should_filter_item\"),\n\t\t\t\t\"className\": propertyOf(uihint)(\"class_name\"),\n\t\t\t\t\"helperText\": propertyOf(uihint)(\"helper_text\"),\n\t\t\t\t\"readOnly\": propertyOf(uihint)(\"read_only\")\n\t\t\t});\n\t\t}\n\t\treturn null;\n\t}\n}\n\n// searches uihints to match up with parameter\nfunction getParamUIHint(paramName, uihints) {\n\tif (uihints) {\n\t\tfor (const uihint of uihints) {\n\t\t\tif (paramName === uihint.parameter_ref) {\n\t\t\t\treturn uihint;\n\t\t\t}\n\t\t}\n\t}\n\treturn null;\n}\n\n// PropertyProvider\nexport class ParameterMetadata {\n\tconstructor(paramDefs) {\n\t\tthis.paramDefs = paramDefs;\n\t}\n\n\t// Return a single parameter\n\tgetParameter(paramName) {\n\t\tlet paramDef;\n\t\tthis.paramDefs.forEach(function(param) {\n\t\t\tif (param.name === paramName) {\n\t\t\t\tparamDef = param;\n\t\t\t}\n\t\t});\n\t\treturn paramDef;\n\t}\n\n\t// Return a single parameter\n\tgetParameters() {\n\t\treturn this.paramDefs.map((param) => param.name);\n\t}\n\n\t// operation arguments\n\tstatic makeParameterMetadata(parameters, uihintsParams, uihintsUiParams) {\n\t\tconst paramDefs = [];\n\t\tif (Array.isArray(parameters)) {\n\t\t\tfor (const param of parameters) {\n\t\t\t\tconst paramDef = ParameterDef.makeParameterDef(param, getParamUIHint(param.id, uihintsParams));\n\t\t\t\tif (paramDef) {\n\t\t\t\t\tparamDefs.push(paramDef);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Add any ui_parameters\n\t\tif (Array.isArray(uihintsUiParams)) {\n\t\t\tfor (const param of uihintsUiParams) {\n\t\t\t\tconst paramDef = ParameterDef.makeParameterDef(param, getParamUIHint(param.id, uihintsParams));\n\t\t\t\tif (paramDef) {\n\t\t\t\t\tparamDef.uionly = true;\n\t\t\t\t\tparamDefs.push(paramDef);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new ParameterMetadata(paramDefs);\n\t}\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nimport { ResourceDef } from \"../util/L10nProvider\";\n\nexport class Button {\n\tconstructor(id, label, description, icon, carbonIcon, enabled, kind, divider) {\n\t\tthis.id = id;\n\t\tthis.label = label;\n\t\tthis.description = description;\n\t\tthis.icon = icon;\n\t\tthis.carbonIcon = carbonIcon;\n\t\tthis.enabled = enabled;\n\t\tthis.kind = kind;\n\t\tthis.divider = divider;\n\t}\n}\n\nclass ButtonDef {\n\tstatic makeButtonDef(button) {\n\t\tif (button) {\n\t\t\tconst buttonDef = new ButtonDef();\n\t\t\tbuttonDef.id = button.id;\n\t\t\tbuttonDef.label = ResourceDef.make(button.label);\n\t\t\tbuttonDef.description = ResourceDef.make(button.description);\n\t\t\tbuttonDef.icon = button.icon;\n\t\t\tbuttonDef.carbonIcon = button.carbon_icon;\n\t\t\tbuttonDef.enabled = button.enabled;\n\t\t\tbuttonDef.kind = button.kind;\n\t\t\tbuttonDef.divider = button.divider;\n\t\t\treturn buttonDef;\n\t\t}\n\t\treturn null;\n\t}\n}\n\nexport class ButtonMetadata {\n\tconstructor(buttonDefs) {\n\t\tthis.buttonDefs = buttonDefs;\n\t}\n\n\tgetButton(buttonId) {\n\t\tlet buttonDef;\n\t\tthis.buttonDefs.forEach(function(button) {\n\t\t\tif (button.id === buttonId) {\n\t\t\t\tbuttonDef = button;\n\t\t\t}\n\t\t});\n\t\treturn buttonDef;\n\t}\n\n\tstatic makeButtonMetadata(uihintsButtons) {\n\t\tif (uihintsButtons) {\n\t\t\tconst buttonDefs = [];\n\t\t\tfor (const button of uihintsButtons) {\n\t\t\t\tconst buttonDef = ButtonDef.makeButtonDef(button);\n\t\t\t\tif (buttonDef) {\n\t\t\t\t\tbuttonDefs.push(buttonDef);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn new ButtonMetadata(buttonDefs);\n\t\t}\n\t\treturn null;\n\t}\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ParameterDef, ParameterMetadata } from \"./ParameterInfo\";\nimport { ButtonMetadata } from \"./ButtonInfo\";\nimport { propertyOf } from \"lodash\";\nimport { ResourceDef } from \"../util/L10nProvider\";\n\nexport class StructureDef {\n\tconstructor(cname, keyDefinition, parameterMetadata, moveableRows, label,\n\t\trowSelection, addRemoveRows, header, includeAllFields, layout, buttons, type) {\n\t\tthis.name = cname;\n\t\tthis.keyDefinition = keyDefinition;\n\t\tthis.parameterMetadata = parameterMetadata;\n\t\tthis.moveableRows = moveableRows;\n\t\tthis.label = ResourceDef.make(label);\n\t\tthis.rowSelection = rowSelection;\n\t\tthis.buttons = buttons;\n\t\tif (typeof addRemoveRows === \"boolean\") {\n\t\t\tthis.addRemoveRows = addRemoveRows;\n\t\t} else {\n\t\t\tthis.addRemoveRows = true; // set the default value\n\t\t}\n\t\tif (typeof header === \"boolean\") {\n\t\t\tthis.header = header;\n\t\t} else {\n\t\t\tthis.header = true; // set the default value\n\t\t}\n\t\tif (typeof includeAllFields === \"boolean\") {\n\t\t\tthis.includeAllFields = includeAllFields;\n\t\t}\n\t\tif (Array.isArray(layout)) {\n\t\t\tthis.layout = layout;\n\t\t}\n\t\tif (typeof type === \"undefined\") {\n\t\t\tthis.type = \"array\"; // set the default value\n\t\t} else {\n\t\t\tthis.type = type;\n\t\t}\n\t}\n\n\t/**\n\t * Returns a array of parameter names\n\t */\n\tparameterNames() {\n\t\tconst params = [];\n\t\tif (this.parameterMetadata) {\n\t\t\tfor (const param of this.parameterMetadata.paramDefs) {\n\t\t\t\tparams.push(param.name);\n\t\t\t}\n\t\t}\n\t\treturn params;\n\t}\n\thasSubPanel() {\n\t\tif (this.parameterMetadata) {\n\t\t\tfor (const param of this.parameterMetadata.paramDefs) {\n\t\t\t\tif (param.isSubPanelEdit()) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\thasInlinePanel() {\n\t\tif (this.parameterMetadata) {\n\t\t\tfor (const param of this.parameterMetadata.paramDefs) {\n\t\t\t\tif (param.isInlineEdit()) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\tkeyAttributeIndex() {\n\t\tif (this.keyDefinition) {\n\t\t\t// Assume the key is always in the first column\n\t\t\treturn 0;\n\t\t}\n\t\treturn -1;\n\t}\n\n\tdefaultStructure() {\n\t\tconst defaults = [];\n\t\tthis.parameterMetadata.paramDefs.forEach(function(param) {\n\t\t\tdefaults.push(param.defaultValue);\n\t\t});\n\t\tif (this.keyDefinition) {\n\t\t\t// Assume the key is always in the first column\n\t\t\tdefaults.unshift(this.keyDefinition.defaultValue);\n\t\t}\n\t\treturn defaults;\n\t}\n\n\tstatic makeStructure(structure, uihints) {\n\t\tif (structure) {\n\t\t\treturn new StructureDef(\n\t\t\t\tpropertyOf(structure)(\"id\"),\n\t\t\t\tParameterDef.makeParameterDef(propertyOf(structure)(\"key_definition\"), propertyOf(uihints)(\"key_definition\"), true),\n\t\t\t\tParameterMetadata.makeParameterMetadata(propertyOf(structure)(\"parameters\"), propertyOf(uihints)(\"parameters\")),\n\t\t\t\tpropertyOf(uihints)(\"moveable_rows\"),\n\t\t\t\tpropertyOf(uihints)(\"label\"),\n\t\t\t\tpropertyOf(uihints)(\"row_selection\"),\n\t\t\t\tpropertyOf(uihints)(\"add_remove_rows\"),\n\t\t\t\tpropertyOf(uihints)(\"header\"),\n\t\t\t\tpropertyOf(uihints)(\"include_all_fields\"),\n\t\t\t\tpropertyOf(uihints)(\"layout\"),\n\t\t\t\tButtonMetadata.makeButtonMetadata(propertyOf(uihints)(\"buttons\")),\n\t\t\t\tpropertyOf(structure)(\"type\")\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}\n}\n\n// searches uihints to match up with parameter\nfunction getStructureUIHint(structureName, uihints) {\n\tif (uihints) {\n\t\tfor (const uihint of uihints) {\n\t\t\tif (structureName === uihint.complex_type_ref) {\n\t\t\t\treturn uihint;\n\t\t\t}\n\t\t}\n\t}\n\treturn null;\n}\n\nexport class StructureMetadata {\n\tconstructor(structures) {\n\t\tthis.structures = structures;\n\t}\n\n\tgetStructure(structName) {\n\t\tlet structureDef;\n\t\tthis.structures.forEach(function(structure) {\n\t\t\tif (structure.name === structName) {\n\t\t\t\tstructureDef = structure;\n\t\t\t}\n\t\t});\n\t\treturn structureDef;\n\t}\n\n\n\tstatic makeStructureMetadata(structures, uihintsStructures) {\n\t\tif (structures) {\n\t\t\tconst structureDefs = [];\n\t\t\tfor (const structure of structures) {\n\t\t\t\tconst struct = StructureDef.makeStructure(structure, getStructureUIHint(structure.id, uihintsStructures));\n\t\t\t\tif (struct !== null) {\n\t\t\t\t\tstructureDefs.push(struct);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn new StructureMetadata(structureDefs);\n\t\t}\n\t\treturn null;\n\t}\n\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TitleMetadata } from \"./TitleInfo\";\nimport { GroupMetadata } from \"./GroupInfo\";\nimport { ActionMetadata } from \"./ActionInfo\";\nimport { ParameterMetadata } from \"./ParameterInfo\";\nimport { StructureMetadata } from \"./StructureInfo\";\nimport { DEFAULT_LABEL_EDITABLE } from \"../constants/constants\";\nimport { Size } from \"../constants/form-constants\";\nimport { ResourceDef } from \"../util/L10nProvider\";\nimport { propertyOf } from \"lodash\";\n\nexport class PropertyDef {\n\tconstructor(cname, icon, editorSize, pixelWidth, label, labelEditable, help,\n\t\tdescription, structureMetadata, parameterMetadata, groupMetadata,\n\t\tactionMetadata, heading, titleMetadata) {\n\t\tthis.name = cname;\n\t\tthis.icon = icon;\n\t\tthis.editorSize = editorSize;\n\t\tthis.pixelWidth = pixelWidth;\n\t\tthis.label = label;\n\t\tthis.labelEditable = labelEditable;\n\t\tthis.help = help;\n\t\tthis.description = ResourceDef.make(description);\n\t\tthis.structureMetadata = structureMetadata;\n\t\tthis.parameterMetadata = parameterMetadata;\n\t\tthis.groupMetadata = groupMetadata;\n\t\tthis.actionMetadata = actionMetadata;\n\t\tthis.heading = heading;\n\t\tthis.titleMetadata = titleMetadata;\n\t}\n\n\t/**\n\t * Returns the \"editorSize\" attribute which can be used to define how large\n\t * a node editor should be in the UI. Default to small editor unless defaultValue is set.\n\t */\n\teditorSizeHint(defaultValue) {\n\t\tif (this.editorSize) {\n\t\t\treturn this.editorSize;\n\t\t}\n\t\tif (defaultValue) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\treturn Size.SMALL;\n\t}\n\n\n\tstatic makePropertyDef(titleDefinition, parameters, structures, uihints) {\n\t\tconst structureMetadata = StructureMetadata.makeStructureMetadata(structures, propertyOf(uihints)(\"complex_type_info\"));\n\t\tconst parameterMetadata = ParameterMetadata.makeParameterMetadata(parameters,\n\t\t\tpropertyOf(uihints)(\"parameter_info\"), propertyOf(uihints)(\"ui_parameters\"));\n\t\tconst actionMetadata = ActionMetadata.makeActionMetadata(propertyOf(uihints)(\"action_info\"));\n\t\tconst groupMetadata = GroupMetadata.makeGroupMetadata(propertyOf(uihints)(\"group_info\"), parameterMetadata.getParameters());\n\t\tconst titleMetadata = TitleMetadata.makeTitleMetadata(propertyOf(uihints)(\"title_info\"));\n\n\t\tconst label = titleDefinition && titleDefinition.title ? titleDefinition.title : null;\n\t\tconst labelEditable = titleDefinition && typeof titleDefinition.editable !== \"undefined\" ? titleDefinition.editable : DEFAULT_LABEL_EDITABLE;\n\n\t\treturn new PropertyDef(\n\t\t\tpropertyOf(uihints)(\"id\"),\n\t\t\tpropertyOf(uihints)(\"icon\"),\n\t\t\tpropertyOf(uihints)(\"editor_size\"),\n\t\t\tpropertyOf(uihints)(\"pixel_width\"),\n\t\t\tlabel,\n\t\t\tlabelEditable,\n\t\t\tpropertyOf(uihints)(\"help\"),\n\t\t\tpropertyOf(uihints)(\"description\"),\n\t\t\tstructureMetadata,\n\t\t\tparameterMetadata,\n\t\t\tgroupMetadata,\n\t\t\tactionMetadata,\n\t\t\tpropertyOf(uihints)(\"label\"),\n\t\t\ttitleMetadata\n\t\t);\n\t}\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { get } from \"lodash\";\n\nimport { EditStyle } from \"../constants/form-constants\";\n\n\nexport class Control {\n\tconstructor(settings) {\n\t\tthis.name = settings.name;\n\t\tif (settings.label) {\n\t\t\tthis.label = settings.label;\n\t\t}\n\t\tif (settings.description) {\n\t\t\tthis.description = settings.description;\n\t\t}\n\t\tif (typeof settings.labelVisible === \"boolean\") {\n\t\t\tthis.labelVisible = settings.labelVisible;\n\t\t}\n\t\tif (settings.controlType) {\n\t\t\tthis.controlType = settings.controlType;\n\t\t}\n\t\tif (settings.valueDef) {\n\t\t\tthis.valueDef = settings.valueDef;\n\t\t}\n\t\tif (settings.role) {\n\t\t\tthis.role = settings.role;\n\t\t}\n\t\tif (settings.additionalText) {\n\t\t\tthis.additionalText = settings.additionalText;\n\t\t}\n\t\tif (settings.orientation) {\n\t\t\tthis.orientation = settings.orientation;\n\t\t}\n\t\tif (settings.values) {\n\t\t\tthis.values = settings.values;\n\t\t}\n\t\tif (settings.valueLabels) {\n\t\t\tthis.valueLabels = settings.valueLabels;\n\t\t}\n\t\tif (settings.valueDescs) {\n\t\t\tthis.valueDescs = settings.valueDescs;\n\t\t}\n\t\tif (settings.valueIcons) {\n\t\t\tthis.valueIcons = settings.valueIcons;\n\t\t}\n\t\tif (typeof settings.sortable === \"boolean\") {\n\t\t\tthis.sortable = settings.sortable;\n\t\t}\n\t\tif (typeof settings.filterable === \"boolean\") {\n\t\t\tthis.filterable = settings.filterable;\n\t\t}\n\t\tif (typeof settings.resizable === \"boolean\") {\n\t\t\tthis.resizable = settings.resizable;\n\t\t}\n\t\tif (settings.language) {\n\t\t\tthis.language = settings.language;\n\t\t}\n\t\tif (settings.enableMaximize) {\n\t\t\tthis.enableMaximize = settings.enableMaximize;\n\t\t}\n\t\tif (settings.charLimit) {\n\t\t\tthis.charLimit = settings.charLimit;\n\t\t}\n\t\tif (settings.summary) {\n\t\t\tthis.summary = settings.summary;\n\t\t}\n\t\tif (settings.increment) {\n\t\t\tthis.increment = settings.increment;\n\t\t}\n\t\tif (settings.minValue) {\n\t\t\tthis.minValue = settings.minValue;\n\t\t}\n\t\tif (settings.maxValue) {\n\t\t\tthis.maxValue = settings.maxValue;\n\t\t}\n\t\tif (settings.generatedValues) {\n\t\t\tthis.generatedValues = {};\n\t\t\tif (settings.generatedValues.operation) {\n\t\t\t\tthis.generatedValues.operation = settings.generatedValues.operation;\n\t\t\t}\n\t\t\tif (isFinite(settings.generatedValues.start_value)) {\n\t\t\t\tthis.generatedValues.startValue = settings.generatedValues.start_value;\n\t\t\t}\n\t\t}\n\t\tif (settings.dateFormat) {\n\t\t\tthis.dateFormat = settings.dateFormat;\n\t\t}\n\t\tif (settings.timeFormat) {\n\t\t\tthis.timeFormat = settings.timeFormat;\n\t\t}\n\t\tif (settings.customControlId) {\n\t\t\tthis.customControlId = settings.customControlId;\n\t\t}\n\t\tif (settings.data) {\n\t\t\tthis.data = settings.data;\n\t\t}\n\t\tif (settings.rows) {\n\t\t\tthis.rows = settings.rows;\n\t\t}\n\t\tif (settings.displayChars) {\n\t\t\tthis.displayChars = settings.displayChars;\n\t\t}\n\t\tif (settings.action) {\n\t\t\tthis.action = settings.action;\n\t\t}\n\t\tif (settings.structureType) {\n\t\t\tthis.structureType = settings.structureType;\n\t\t}\n\t\tif (settings.subControls) {\n\t\t\tthis.subControls = settings.subControls;\n\t\t}\n\t\tif (settings.childItem) {\n\t\t\tthis.childItem = settings.childItem;\n\t\t}\n\t\tif (settings.multiSelectEditChildItem) {\n\t\t\tthis.multiSelectEditChildItem = settings.multiSelectEditChildItem;\n\t\t}\n\t\tif (settings.layout) {\n\t\t\tthis.layout = settings.layout;\n\t\t}\n\t\tif (typeof settings.keyIndex === \"number\") {\n\t\t\tthis.keyIndex = settings.keyIndex;\n\t\t}\n\t\tif (settings.defaultRow) {\n\t\t\tthis.defaultRow = settings.defaultRow;\n\t\t}\n\t\tif (typeof settings.moveableRows === \"boolean\") {\n\t\t\tthis.moveableRows = settings.moveableRows;\n\t\t}\n\t\tif (typeof settings.required === \"boolean\") {\n\t\t\tthis.required = settings.required;\n\t\t}\n\t\tif (settings.rowSelection) {\n\t\t\tthis.rowSelection = settings.rowSelection;\n\t\t}\n\t\tif (typeof settings.addRemoveRows === \"boolean\") {\n\t\t\tthis.addRemoveRows = settings.addRemoveRows;\n\t\t}\n\n\t\tif (typeof settings.hideEditButton === \"boolean\") {\n\t\t\tthis.hideEditButton = settings.hideEditButton;\n\t\t}\n\n\t\tif (typeof settings.header === \"boolean\") {\n\t\t\tthis.header = settings.header;\n\t\t}\n\t\tif (typeof settings.uionly === \"boolean\") {\n\t\t\tthis.uionly = settings.uionly;\n\t\t}\n\t\tif (typeof settings.includeAllFields === \"boolean\") {\n\t\t\tthis.includeAllFields = settings.includeAllFields;\n\t\t}\n\t\tif (settings.dmImage) {\n\t\t\tthis.dmImage = settings.dmImage;\n\t\t}\n\n\t\tif (typeof settings.visible === \"boolean\") {\n\t\t\tthis.visible = settings.visible;\n\t\t}\n\t\tif (typeof settings.width === \"number\" || (!isNaN(parseInt(settings.width, 10)) && settings.width?.endsWith(\"px\"))) {\n\t\t\tthis.width = settings.width;\n\t\t}\n\t\tif (settings.editStyle) {\n\t\t\tthis.editStyle = settings.editStyle;\n\t\t} else if (!settings.isKeyField && typeof settings.structureType !== \"undefined\") {\n\t\t\tthis.editStyle = EditStyle.INLINE; // Should only be set for structure controls\n\t\t}\n\t\tif (settings.dmDefault) {\n\t\t\tthis.dmDefault = settings.dmDefault;\n\t\t}\n\t\tif (settings.dmImage) {\n\t\t\tthis.dmImage = settings.dmImage;\n\t\t}\n\t\tif (settings.customValueAllowed) {\n\t\t\tthis.customValueAllowed = settings.customValueAllowed;\n\t\t}\n\t\tif (settings.shouldFilterItem) {\n\t\t\tthis.shouldFilterItem = settings.shouldFilterItem;\n\t\t}\n\t\tif (settings.className) {\n\t\t\tthis.className = settings.className;\n\t\t}\n\t\tif (settings.buttons) {\n\t\t\tthis.buttons = settings.buttons;\n\t\t}\n\t\tif (settings.helperText) {\n\t\t\tthis.helperText = settings.helperText;\n\t\t}\n\t\tif (settings.readOnly) {\n\t\t\tthis.readOnly = settings.readOnly;\n\t\t}\n\t\tthis.light = get(settings, \"light\", true);\n\t}\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ItemType } from \"../constants/form-constants\";\nimport { propertyOf } from \"lodash\";\n\nexport class UIItem {\n\tconstructor(elements) {\n\t\tthis.id = propertyOf(elements)(\"id\");\n\t\tthis.itemType = propertyOf(elements)(\"itemType\");\n\t\tthis.tabs = propertyOf(elements)(\"tabs\"); // when PRIMARY_TABS, SUB_TABS or PANEL_SELECTOR\n\t\tthis.panel = propertyOf(elements)(\"panel\"); // when PANEL or ADDITIONAL_LINK\n\t\tthis.control = propertyOf(elements)(\"control\"); // when CONTROL\n\t\tthis.text = propertyOf(elements)(\"text\"); // when ADDITIONAL_LINK (link label) or STATIC_TEXT\n\t\tthis.textType = propertyOf(elements)(\"textType\"); // when STATIC_TEXT\n\t\tthis.secondaryText = propertyOf(elements)(\"secondaryText\"); // when ADDITIONAL_LINK (subpanel label)\n\t\tthis.dependsOn = propertyOf(elements)(\"dependsOn\"); // when PANEL_SELECTOR (control to obtain value from)\n\t\tthis.action = propertyOf(elements)(\"action\"); // when ACTION\n\t\tthis.className = propertyOf(elements)(\"className\");\n\t\tthis.nestedPanel = propertyOf(elements)(\"nestedPanel\"); // when SUB_TABS\n\t}\n\n\tstatic makePrimaryTabs(tabs) {\n\t\treturn new UIItem({\n\t\t\titemType: ItemType.PRIMARY_TABS,\n\t\t\ttabs: tabs\n\t\t});\n\t}\n\n\tstatic makeSubTabs(tabs, className, nestedPanel) {\n\t\treturn new UIItem({\n\t\t\titemType: ItemType.SUB_TABS,\n\t\t\ttabs: tabs,\n\t\t\tclassName: className,\n\t\t\tnestedPanel: nestedPanel\n\t\t});\n\t}\n\n\tstatic makePanelSelector(groupName, tabs, dependsOn, className) {\n\t\treturn new UIItem({\n\t\t\tid: groupName,\n\t\t\titemType: ItemType.PANEL_SELECTOR,\n\t\t\ttabs: tabs,\n\t\t\tdependsOn: dependsOn,\n\t\t\tclassName: className\n\t\t});\n\t}\n\n\tstatic makePanel(panel) {\n\t\treturn new UIItem({\n\t\t\titemType: ItemType.PANEL,\n\t\t\tpanel: panel\n\t\t});\n\t}\n\n\tstatic makeAdditionalLink(text, dialogText, panel) {\n\t\treturn new UIItem({\n\t\t\titemType: ItemType.ADDITIONAL_LINK,\n\t\t\tpanel: panel,\n\t\t\ttext: text,\n\t\t\tsecondaryText: dialogText\n\t\t});\n\t}\n\n\tstatic makeControl(control) {\n\t\treturn new UIItem({\n\t\t\titemType: ItemType.CONTROL,\n\t\t\tcontrol: control\n\t\t});\n\t}\n\n\tstatic makeAction(action) {\n\t\treturn new UIItem({\n\t\t\titemType: ItemType.ACTION,\n\t\t\taction: action\n\t\t});\n\t}\n\n\tstatic makeHSeparator() {\n\t\treturn new UIItem({\n\t\t\titemType: ItemType.HORIZONTAL_SEPARATOR\n\t\t});\n\t}\n\n\tstatic makeStaticText(text, textType) {\n\t\treturn new UIItem({\n\t\t\titemType: ItemType.STATIC_TEXT,\n\t\t\ttext: text,\n\t\t\ttextType: textType\n\t\t});\n\t}\n\n\tstatic makeTextPanel(groupName, label, description, className, nestedPanel) {\n\t\treturn new UIItem({\n\t\t\titemType: ItemType.TEXT_PANEL,\n\t\t\tpanel: {\n\t\t\t\tid: groupName,\n\t\t\t\tlabel: label,\n\t\t\t\tdescription: description,\n\t\t\t\tclassName: className,\n\t\t\t\tnestedPanel: nestedPanel\n\t\t\t}\n\t\t});\n\t}\n\n\tstatic makeCustomPanel(panel, className) {\n\t\treturn new UIItem({\n\t\t\titemType: ItemType.CUSTOM_PANEL,\n\t\t\tpanel: panel,\n\t\t\tclassName: className\n\t\t});\n\t}\n\n\tstatic makeTearsheetPanel(control, description) {\n\t\treturn new UIItem({\n\t\t\titemType: ItemType.TEARSHEET,\n\t\t\tpanel: {\n\t\t\t\t...control,\n\t\t\t\tdescription\n\t\t\t}\n\t\t});\n\t}\n}\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* eslint max-depth: [\"error\", 5] */\n\nimport { Control } from \"./ControlInfo\";\nimport { UIItem } from \"./UIItem\";\nimport { GroupType, PanelType, Type, ControlType, ParamRole, ORIENTATIONS, EditStyle } from \"../constants/form-constants\";\nimport { CONTAINER_TYPE, ROW_SELECTION } from \"../constants/constants\";\nimport logger from \"../../../utils/logger\";\nimport { StructureDef } from \"./StructureInfo\";\nimport { Action } from \"./ActionInfo\";\nimport { Button } from \"./ButtonInfo\";\nimport { get } from \"lodash\";\n\n/**\n * The Editor is the primary container for the editing controls. It defines the tabs within the\n * form which themselves contain the controls and other UI artifacts.\n */\nexport class EditorTab {\n\tconstructor(label, cname, uiItem) {\n\t\tthis.text = label;\n\t\tthis.group = cname;\n\t\tthis.content = uiItem;\n\t}\n}\n\nclass ValueDef {\n\tconstructor(propType, isList, isMap, defaultValue) {\n\t\tthis.propType = propType === Type.OBJECT ? Type.STRUCTURE : propType;\n\t\tthis.isList = isList;\n\t\tthis.isMap = isMap;\n\t\tthis.defaultValue = defaultValue;\n\t}\n\tstatic make(parameter) {\n\t\treturn new ValueDef(parameter.propType(), parameter.isList(),\n\t\t\tparameter.isMapValue(), parameter.defaultValue);\n\t}\n}\n\nclass Label {\n\tconstructor(text, numberGenerator) {\n\t\tthis.text = text;\n\t\tif (numberGenerator) {\n\t\t\tthis.numberGenerator = numberGenerator;\n\t\t}\n\t}\n}\n\nclass Description {\n\tconstructor(text, placement, link) {\n\t\tthis.text = text;\n\t\tif (placement) {\n\t\t\tthis.placement = placement;\n\t\t}\n\t\tif (link) {\n\t\t\tthis.link = link;\n\t\t}\n\t}\n}\n\nclass ControlPanel {\n\tconstructor(id, panelType, className, nestedPanel, controls, label, copen = false) {\n\t\tthis.id = id;\n\t\tthis.panelType = panelType;\n\t\tthis.nestedPanel = nestedPanel;\n\t\tthis.uiItems = controls;\n\t\tthis.open = copen;\n\t\tif (label) {\n\t\t\tthis.label = label;\n\t\t}\n\t\tif (className) {\n\t\t\tthis.className = className;\n\t\t}\n\t}\n}\n\nclass ActionPanel {\n\tconstructor(id, panelType, className, nestedPanel, actions, label, description) {\n\t\tthis.id = id;\n\t\tthis.panelType = panelType;\n\t\tthis.nestedPanel = nestedPanel;\n\t\tthis.uiItems = actions;\n\t\tif (className) {\n\t\t\tthis.className = className;\n\t\t}\n\t\tif (label) {\n\t\t\tthis.label = label;\n\t\t}\n\t\tif (description) {\n\t\t\tthis.description = description;\n\t\t}\n\t}\n}\n\nclass CustomControlPanel {\n\tconstructor(id, panelType, className, nestedPanel, parameters, data) {\n\t\tthis.id = id;\n\t\tthis.panelType = panelType;\n\t\tthis.nestedPanel = nestedPanel;\n\t\tthis.parameters = parameters;\n\t\tthis.data = data;\n\t\tif (className) {\n\t\t\tthis.className = className;\n\t\t}\n\t}\n}\n\nclass NumberGenerator {\n\tconstructor(text, numberGenerator) {\n\t\tthis.text = text;\n\t\tif (numberGenerator.range) {\n\t\t\tthis.range = numberGenerator.range;\n\t\t}\n\t}\n}\n\n/**\n * Creates tab based on parameter definition\n */\nfunction makePrimaryTab(propertyDef, group, l10nProvider, containerType) {\n\tconst label = l10nProvider.l10nLabel(group, group.name);\n\tconst additionalInfo = {\n\t\tlight: true,\n\t\tcontainerType\n\t};\n\treturn new EditorTab(label, group.name,\n\t\t_makeUIItem(propertyDef.parameterMetadata, propertyDef.actionMetadata, group, propertyDef.structureMetadata, l10nProvider, additionalInfo));\n}\n\nfunction _makeUIItem(parameterMetadata, actionMetadata, group, structureMetadata, l10nProvider, additionalInfo) {\n\tconst groupName = group.name;\n\tlet groupItem = null;\n\tlet groupLabel = null;\n\tconst groupClassName = group.className;\n\tconst nestedPanel = get(group, \"nestedPanel\", false);\n\tswitch (group.groupType()) {\n\tcase GroupType.CONTROLS:\n\t\treturn UIItem.makePanel(new ControlPanel(groupName, PanelType.GENERAL, groupClassName, nestedPanel,\n\t\t\t_makeControls(parameterMetadata, actionMetadata, group, structureMetadata, l10nProvider, additionalInfo, EditStyle.SUBPANEL)));\n\tcase GroupType.COLUMN_SELECTION:\n\t\treturn UIItem.makePanel(new ControlPanel(groupName, PanelType.COLUMN_SELECTION, groupClassName, nestedPanel,\n\t\t\t_makeControls(parameterMetadata, actionMetadata, group, structureMetadata, l10nProvider, additionalInfo, EditStyle.SUBPANEL)));\n\tcase GroupType.ADDITIONAL: {\n\t\tconst panel = new ControlPanel(groupName, PanelType.GENERAL, groupClassName, nestedPanel,\n\t\t\t_makeControls(parameterMetadata, actionMetadata, group, structureMetadata, l10nProvider, additionalInfo, EditStyle.SUBPANEL));\n\t\tgroupLabel = l10nProvider.l10nLabel(group, group.name);\n\t\treturn UIItem.makeAdditionalLink(groupLabel, groupLabel, panel);\n\t}\n\tcase GroupType.SUB_TABS: {\n\t\t// Defines a sub-tab group where each child group represents a sub-tab.\n\t\tconst subTabItems = [];\n\t\tif (Array.isArray(group.subGroups)) {\n\t\t\tgroup.subGroups.forEach(function(subGroup) {\n\t\t\t\tconst subGroupName = subGroup.name;\n\t\t\t\tgroupItem = _makeUIItem(parameterMetadata, actionMetadata, subGroup, structureMetadata, l10nProvider, additionalInfo);\n\t\t\t\tgroupLabel = l10nProvider.l10nLabel(subGroup, subGroup.name);\n\t\t\t\tsubTabItems.push(new EditorTab(groupLabel, subGroupName, groupItem));\n\t\t\t});\n\t\t}\n\t\treturn UIItem.makeSubTabs(subTabItems, groupClassName, nestedPanel);\n\t}\n\tcase GroupType.PANEL_SELECTOR: {\n\t\t// Defines a sub-tab group where each child group represents a sub-tab.\n\t\tconst panSelSubItems = _genPanelSelectorPanels(group, parameterMetadata, actionMetadata, structureMetadata, l10nProvider, additionalInfo);\n\t\treturn UIItem.makePanelSelector(groupName, panSelSubItems, group.dependsOn, groupClassName);\n\t}\n\tcase GroupType.PANELS: {\n\t\tconst panSubItems = [];\n\t\tif (Array.isArray(group.subGroups)) {\n\t\t\tgroup.subGroups.forEach(function(subGroup) {\n\t\t\t\tgroupItem = _makeUIItem(parameterMetadata, actionMetadata, subGroup, structureMetadata, l10nProvider, additionalInfo);\n\t\t\t\tpanSubItems.push(groupItem);\n\t\t\t});\n\t\t}\n\t\treturn UIItem.makePanel(new ControlPanel(groupName, PanelType.GENERAL, groupClassName, nestedPanel, panSubItems));\n\t}\n\tcase GroupType.COLUMN_PANEL: {\n\t\tconst panSubItems = [];\n\t\tif (Array.isArray(group.subGroups)) {\n\t\t\tgroup.subGroups.forEach(function(subGroup) {\n\t\t\t\tgroupItem = _makeUIItem(parameterMetadata, actionMetadata, subGroup, structureMetadata, l10nProvider, additionalInfo);\n\t\t\t\tpanSubItems.push(groupItem);\n\t\t\t});\n\t\t}\n\t\treturn UIItem.makePanel(new ControlPanel(groupName, PanelType.COLUMN_PANEL, groupClassName, nestedPanel, panSubItems));\n\t}\n\tcase GroupType.CUSTOM_PANEL: {\n\t\treturn UIItem.makeCustomPanel(new CustomControlPanel(groupName, PanelType.CUSTOM, groupClassName, nestedPanel, group.parameterNames(), group.data));\n\t}\n\tcase GroupType.SUMMARY_PANEL: {\n\t\tgroupLabel = l10nProvider.l10nLabel(group, group.name);\n\t\tconst panSubItems = [];\n\t\tif (Array.isArray(group.subGroups)) {\n\t\t\tgroup.subGroups.forEach(function(subGroup) {\n\t\t\t\tgroupItem = _makeUIItem(parameterMetadata, actionMetadata, subGroup, structureMetadata, l10nProvider, additionalInfo);\n\t\t\t\tpanSubItems.push(groupItem);\n\t\t\t});\n\t\t}\n\t\treturn UIItem.makePanel(new ControlPanel(groupName, PanelType.SUMMARY, groupClassName, nestedPanel, panSubItems, groupLabel));\n\t}\n\tcase GroupType.ACTION_PANEL: {\n\t\tgroupLabel = l10nProvider.l10nResource(group.label);\n\t\tlet groupDesc;\n\t\tif (group.description) {\n\t\t\tgroupDesc = new Description(l10nProvider.l10nResource(group.description),\n\t\t\t\tnull,\n\t\t\t\tgroup.description ? group.description.link : null);\n\t\t}\n\t\treturn UIItem.makePanel(new ActionPanel(groupName, PanelType.ACTION_PANEL, groupClassName, nestedPanel,\n\t\t\t_makeActions(parameterMetadata, actionMetadata, group, structureMetadata, l10nProvider), groupLabel, groupDesc));\n\t}\n\tcase GroupType.TEXT_PANEL: {\n\t\tgroupLabel = l10nProvider.l10nResource(group.label);\n\t\tlet groupDesc;\n\t\tif (group.description) {\n\t\t\tgroupDesc = new Description(l10nProvider.l10nResource(group.description),\n\t\t\t\tgroup.description ? group.description.placement : null,\n\t\t\t\tgroup.description ? group.description.link : null);\n\t\t}\n\t\treturn UIItem.makeTextPanel(groupName, groupLabel, groupDesc, groupClassName, nestedPanel);\n\t}\n\tcase GroupType.TWISTY_PANEL: {\n\t\tgroupLabel = l10nProvider.l10nLabel(group, group.name);\n\t\tconst panSubItems = [];\n\t\tif (Array.isArray(group.subGroups)) {\n\t\t\tgroup.subGroups.forEach(function(subGroup) {\n\t\t\t\tgroupItem = _makeUIItem(parameterMetadata, actionMetadata, subGroup, structureMetadata, l10nProvider, additionalInfo);\n\t\t\t\tpanSubItems.push(groupItem);\n\t\t\t});\n\t\t}\n\t\treturn UIItem.makePanel(new ControlPanel(groupName, PanelType.TWISTY_PANEL, groupClassName, nestedPanel, panSubItems, groupLabel, group.open));\n\t}\n\tcase GroupType.TEARSHEET_PANEL: {\n\t\tgroupLabel = l10nProvider.l10nLabel(group, group.name);\n\t\tlet groupDesc;\n\t\tif (group.description) {\n\t\t\tgroupDesc = new Description(l10nProvider.l10nResource(group.description));\n\t\t}\n\t\tconst panSubItems = [];\n\t\tif (Array.isArray(group.subGroups)) {\n\t\t\tgroup.subGroups.forEach(function(subGroup) {\n\t\t\t\tconst additionalInfoUpdated = Object.assign({}, additionalInfo, { light: false });\n\t\t\t\tgroupItem = _makeUIItem(parameterMetadata, actionMetadata, subGroup, structureMetadata, l10nProvider, additionalInfoUpdated);\n\t\t\t\tpanSubItems.push(groupItem);\n\t\t\t});\n\t\t}\n\t\treturn UIItem.makeTearsheetPanel(new ControlPanel(groupName, PanelType.TEARSHEET, groupClassName, nestedPanel, panSubItems, groupLabel, false), groupDesc);\n\t}\n\tdefault:\n\t\tlogger.warn(\"(Unknown group type '\" + group.groupType() + \"')\");\n\t\treturn null;\n\t}\n}\n\n/**\n * Called on a base property group.\n */\nfunction _makeControls(parameterMetadata, actionMetadata, group, structureMetadata, l10nProvider, additionalInfo, editStyle) {\n\tconst uiItems = [];\n\tconst panelInsertedFor = [];\n\tif (!Array.isArray(group.parameterNames())) {\n\t\treturn uiItems;\n\t}\n\tgroup.parameterNames().forEach(function(paramName) {\n\t\t// Assume property definition exists\n\t\tconst prop = parameterMetadata.getParameter(paramName);\n\t\t// Edit attributes in subpanel when edit_style = \"subpanel\" or multi select edit rows having edit_style = \"inline\"\n\t\tconst parameterEditStyle = (editStyle === EditStyle.SUBPANEL) ? prop.isSubPanelEdit() : prop.isInlineEdit();\n\t\tlet structureDef;\n\t\tif (prop.propType() === Type.STRUCTURE && structureMetadata) {\n\t\t\tstructureDef = structureMetadata.getStructure(prop.baseType());\n\t\t}\n\t\tif (!(group instanceof StructureDef) || (group instanceof StructureDef && parameterEditStyle)) {\n\t\t\tconst ctrl = _makeControl(parameterMetadata, paramName, group, structureDef, l10nProvider, actionMetadata, structureMetadata, null, additionalInfo);\n\t\t\tconst control = UIItem.makeControl(ctrl);\n\t\t\tif (prop.separatorBefore()) {\n\t\t\t\tuiItems.push(UIItem.makeHSeparator());\n\t\t\t}\n\t\t\tif (prop.textBefore) {\n\t\t\t\tuiItems.push(UIItem.makeStaticText(prop.getTextBefore(l10nProvider), prop.getTextBeforeType()));\n\t\t\t}\n\t\t\tuiItems.push(control);\n\t\t\tif (prop.textAfter) {\n\t\t\t\tuiItems.push(UIItem.makeStaticText(prop.getTextAfter(l10nProvider), prop.getTextAfterType()));\n\t\t\t}\n\t\t\tif (prop.separatorAfter()) {\n\t\t\t\tuiItems.push(UIItem.makeHSeparator());\n\t\t\t}\n\n\t\t\t// If this control is a vertical radio button set and any element of\n\t\t\t// the associated subgroups is a panel of type panelSelector which has\n\t\t\t// the insertPanels boolean set to true and has its 'depends on' field\n\t\t\t// set to the name of the parameter being displayed by this radio\n\t\t\t// button control, then process the subgroup in the usual way but add\n\t\t\t// each to the additionalItems in the control. This allows them to be\n\t\t\t// inserted into the radio button set at display time.\n\t\t\tif (group.subGroups && group.subGroups.length > 0) {\n\t\t\t\tfor (var i = 0; i < group.subGroups.length; i++) {\n\t\t\t\t\tif (control.control.controlType === ControlType.RADIOSET &&\n\t\t\t\t\t\t\tcontrol.control.orientation === ORIENTATIONS.VERTICAL &&\n\t\t\t\t\t\t\tgroup.subGroups[i].type === GroupType.PANEL_SELECTOR &&\n\t\t\t\t\t\t\tgroup.subGroups[i].insertPanels === true &&\n\t\t\t\t\t\t\tgroup.subGroups[i].dependsOn === control.control.name) {\n\t\t\t\t\t\tpanelInsertedFor.push(group.subGroups[i].dependsOn);\n\t\t\t\t\t\tcontrol.additionalItems =\n\t\t\t\t\t\t\t_genPanelSelectorPanels(group.subGroups[i], parameterMetadata, actionMetadata, structureMetadata, l10nProvider, additionalInfo);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\t// Process any subgroups which have not already been inserted into a\n\t// radio button set (see code in loop above).\n\tif (Array.isArray(group.subGroups)) {\n\t\tgroup.subGroups.forEach(function(subGroup) {\n\t\t\tif (!_hasPanelBeenInserted(panelInsertedFor, subGroup.dependsOn)) {\n\t\t\t\tconst uiItem = _makeUIItem(parameterMetadata, actionMetadata, subGroup, structureMetadata, l10nProvider, additionalInfo);\n\t\t\t\tuiItems.push(uiItem);\n\t\t\t}\n\t\t});\n\t}\n\treturn uiItems;\n}\n\n/* Returns true if the panelInsertedFor array contains the dependsOn\n * value passed in.\n */\nfunction _hasPanelBeenInserted(panelInsertedFor, dependsOn) {\n\tif (dependsOn) {\n\t\tfor (var i = 0; i < panelInsertedFor.length; i++) {\n\t\t\tif (panelInsertedFor[i] === dependsOn) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}\n\n/* Creates a set of panel objects for a panelSelector panel. The UIItem for\n * each panel is wrapped in an EditorTab object which pairs together the UIItem\n * and its ID. The ID is subsequently used by the radioset control to decide\n * which panel is displayed with which radio button.\n */\nfunction _genPanelSelectorPanels(group, parameterMetadata, actionMetadata, structureMetadata, l10nProvider, additionalInfo) {\n\tconst panSelSubItems = [];\n\tif (Array.isArray(group.subGroups)) {\n\t\tgroup.subGroups.forEach(function(subGroup) {\n\t\t\tconst subGroupName = subGroup.name;\n\t\t\tconst groupItem = _makeUIItem(parameterMetadata, actionMetadata, subGroup, structureMetadata, l10nProvider, additionalInfo);\n\t\t\tconst groupLabel = l10nProvider.l10nLabel(subGroup, subGroup.name);\n\t\t\tpanSelSubItems.push(new EditorTab(groupLabel, subGroupName, groupItem));\n\t\t});\n\t}\n\treturn panSelSubItems;\n}\n\nfunction _makeStringControl(parameter, isSubControl) {\n\tlet controlType;\n\tlet role = parameter.getRole();\n\tif (parameter.isList()) {\n\t\tconst controlObj = _processListParameter(parameter);\n\t\tcontrolType = controlObj.controlType;\n\t\tif (controlObj.role) {\n\t\t\trole = controlObj.role;\n\t\t}\n\t} else {\n\t\tswitch (parameter.getRole()) {\n\t\tcase ParamRole.TEXT:\n\t\t\tcontrolType = ControlType.TEXTAREA;\n\t\t\tbreak;\n\t\tcase ParamRole.ENUM:\n\t\t\t// show oneofselect when inside a table cell\n\t\t\tif (parameter.getValidValueCount() > 4 || (isSubControl && !_isEmbeddedOption(parameter))) {\n\t\t\t\tcontrolType = ControlType.ONEOFSELECT;\n\t\t\t} else {\n\t\t\t\tcontrolType = ControlType.RADIOSET;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase ParamRole.COLUMN:\n\t\t\trole = ParamRole.COLUMN;\n\t\t\tif (isSubControl && _isEmbeddedMultiOption(parameter)) {\n\t\t\t\tcontrolType = ControlType.SELECTCOLUMNS;\n\t\t\t} else {\n\t\t\t\tcontrolType = ControlType.SELECTCOLUMN;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase ParamRole.EXPRESSION:\n\t\t\tcontrolType = ControlType.EXPRESSION;\n\t\t\tbreak;\n\t\tcase ParamRole.EMAIL:\n\t\t\trole = ParamRole.EMAIL;\n\t\t\tcontrolType = ControlType.TEXTFIELD;\n\t\t\tbreak;\n\t\tcase ParamRole.URL:\n\t\t\trole = ParamRole.URL;\n\t\t\tcontrolType = ControlType.TEXTFIELD;\n\t\t\tbreak;\n\t\tcase ParamRole.COLOR:\n\t\t\trole = ParamRole.COLOR;\n\t\t\tcontrolType = ControlType.TEXTFIELD;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tcontrolType = ControlType.TEXTFIELD;\n\t\t}\n\t}\n\treturn { controlType: controlType, role: role };\n}\n\n/**\n * Creates a control for the supplied property.\n */\nfunction _makeControl(parameterMetadata, paramName, group, structureDefinition, l10nProvider, actionMetadata, structureMetadata, subControl, additionalInfo) {\n\tconst isSubControl = typeof subControl !== \"undefined\" && subControl;\n\n\t// Assume the property is defined\n\tconst parameter = isSubControl ? subControl : parameterMetadata.getParameter(paramName);\n\n\tconst additionalText = parameter.getAdditionalText(l10nProvider);\n\tconst additionalHelperText = parameter.getAdditionalHelperText(l10nProvider);\n\tconst orientation = parameter.orientation;\n\tconst required = parameter.required;\n\tif (parameter.numberGenerator) {\n\t\tparameter.numberGenerator = new NumberGenerator(l10nProvider.l10nLabel(parameter.numberGenerator, parameter.name), parameter.numberGenerator);\n\t}\n\tconst controlLabel = new Label(l10nProvider.l10nLabel(parameter, parameter.name), parameter.numberGenerator);\n\tlet controlDesc;\n\tif (parameter.description) {\n\t\tcontrolDesc = new Description(l10nProvider.l10nDesc(parameter, parameter.name),\n\t\t\tparameter.description ? parameter.description.placement : null,\n\t\t\tparameter.description ? parameter.description.link : null);\n\t}\n\n\t// The role is used to modify the behaviour of certain controls\n\tlet labelVisible = true;\n\tlet role;\n\tlet controlType;\n\tlet subControls;\n\tlet keyIndex;\n\tlet defaultRow;\n\tlet childItem;\n\tlet multiSelectEditChildItem;\n\tlet moveableRows = parameter.moveableRows;\n\tlet rowSelection;\n\tlet addRemoveRows;\n\tlet header;\n\tlet includeAllFields;\n\tlet layout;\n\tlet buttons;\n\tlet structureType = parameter.structureType;\n\n\t// The control type defines the basic UI element that should be used to edit the property\n\tif (!isSubControl && parameter.getRole() === ParamRole.CUSTOM) {\n\t\tcontrolType = ControlType.CUSTOM;\n\t} else {\n\t\tswitch (parameter.propType()) {\n\t\tcase Type.STRING: {\n\t\t\tconst returnObject = _makeStringControl(parameter, isSubControl);\n\t\t\tcontrolType = returnObject.controlType;\n\t\t\trole = returnObject.role;\n\t\t\tbreak;\n\t\t}\n\t\tcase Type.PASSWORD:\n\t\t\tcontrolType = ControlType.PASSWORDFIELD;\n\t\t\tbreak;\n\t\tcase Type.BOOLEAN:\n\t\t\tif (!parameter.control || parameter.control === ControlType.CHECKBOX) {\n\t\t\t\tlabelVisible = false;\n\t\t\t\tcontrolType = ControlType.CHECKBOX;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase Type.INTEGER:\n\t\tcase Type.LONG:\n\t\tcase Type.DOUBLE:\n\t\t\tif (parameter.isList()) {\n\t\t\t\tcontrolType = ControlType.TEXTAREA;\n\t\t\t} else {\n\t\t\t\tcontrolType = ControlType.NUMBERFIELD;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase Type.DATE:\n\t\t\trole = Type.DATE;\n\t\t\tif (parameter.control === ControlType.DATEPICKER) {\n\t\t\t\tcontrolType = ControlType.DATEPICKER;\n\t\t\t} else if (parameter.control === ControlType.DATEPICKERRANGE) {\n\t\t\t\tcontrolType = ControlType.DATEPICKERRANGE;\n\t\t\t} else if (parameter.isList()) {\n\t\t\t\tcontrolType = ControlType.TEXTAREA;\n\t\t\t} else {\n\t\t\t\tcontrolType = ControlType.DATEFIELD;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase Type.TIME:\n\t\t\trole = Type.TIME;\n\t\t\tif (parameter.isList()) {\n\t\t\t\tcontrolType = ControlType.TEXTAREA;\n\t\t\t} else {\n\t\t\t\tcontrolType = ControlType.TIMEFIELD;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase Type.TIMESTAMP:\n\t\t\tcontrolType = ControlType.TIMESTAMP;\n\t\t\tbreak;\n\t\tcase Type.STRUCTURE: {\n\t\t\tconst structureDef = isSubControl && structureMetadata ? structureMetadata.getStructure(parameter.baseType()) : structureDefinition;\n\n\t\t\tif (structureDef) {\n\t\t\t\t// Subpanel for editing attributes having editStyle: subpanel\n\t\t\t\tif (structureDef.hasSubPanel()) {\n\t\t\t\t\tchildItem = _makeEditStyleSubPanel(structureDef, l10nProvider, structureMetadata, additionalInfo);\n\t\t\t\t}\n\t\t\t\t// Multi select edit Subpanel for editing attributes having editStyle: inline\n\t\t\t\tif (structureDef.rowSelection === ROW_SELECTION.MULTIPLE && structureDef.hasInlinePanel()) {\n\t\t\t\t\tmultiSelectEditChildItem = _makeInlineEditStyleSubPanel(structureDef, l10nProvider, structureMetadata, additionalInfo);\n\t\t\t\t}\n\t\t\t\tkeyIndex = structureDef.keyAttributeIndex();\n\t\t\t\t// The defaultRow allows the UI to create a new row with sensible settings\n\t\t\t\t// when needed\n\t\t\t\tdefaultRow = structureDef.defaultStructure();\n\t\t\t\t// For inline/row editing, create definitions for all the columns that can be edited\n\t\t\t\tsubControls = [];\n\t\t\t\tif (structureDef.parameterMetadata && Array.isArray(structureDef.parameterMetadata.paramDefs)) {\n\t\t\t\t\tstructureDef.parameterMetadata.paramDefs.forEach(function(param) {\n\t\t\t\t\t\tconst newSubControl = _makeSubControl(param, l10nProvider, structureMetadata, additionalInfo);\n\t\t\t\t\t\tsubControls.push(newSubControl);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t// If the property is a keyed property or a structure list then the key should not be included in the\n\t\t\t\t// structure definition. However it will still need to be included in the table column definitions.\n\t\t\t\tif ((parameter.isMapValue() || parameter.isList()) && structureDef.keyDefinition) {\n\t\t\t\t\tconst newSubControl = _makeSubControl(structureDef.keyDefinition, l10nProvider, structureMetadata, additionalInfo);\n\t\t\t\t\tsubControls.unshift(newSubControl);\n\t\t\t\t}\n\t\t\t\tif (parameter.isList() || parameter.isMapValue()) {\n\t\t\t\t\tif ((!isSubControl && group && typeof group.groupType !== \"undefined\" && group.groupType() === GroupType.COLUMN_SELECTION) ||\n\t\t\t\t\t\t\tparameter.control === ControlType.STRUCTURETABLE ||\n\t\t\t\t\t\t\tparameter.getRole() === ParamRole.COLUMN) {\n\t\t\t\t\t\tcontrolType = ControlType.STRUCTURETABLE;\n\t\t\t\t\t\tmoveableRows = structureDef.moveableRows;\n\t\t\t\t\t\trowSelection = structureDef.rowSelection;\n\t\t\t\t\t\taddRemoveRows = structureDef.addRemoveRows;\n\t\t\t\t\t\theader = structureDef.header;\n\t\t\t\t\t\tincludeAllFields = structureDef.includeAllFields;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontrolType = ControlType.STRUCTURELISTEDITOR;\n\t\t\t\t\t\tmoveableRows = structureDef.moveableRows;\n\t\t\t\t\t\trowSelection = structureDef.rowSelection;\n\t\t\t\t\t\taddRemoveRows = structureDef.addRemoveRows;\n\t\t\t\t\t\theader = structureDef.header;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (structureDef.buttons) {\n\t\t\t\t\t\tbuttons = _makeButtons(structureDef.buttons, l10nProvider);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tcontrolType = ControlType.STRUCTUREEDITOR;\n\t\t\t\t\tif (structureDef.layout) {\n\t\t\t\t\t\tlayout = structureDef.layout;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tstructureType = structureDef.type;\n\t\t\t} else {\n\t\t\t\tcontrolType = ControlType.TEXTFIELD;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase Type.OBJECT:\n\t\t\tif (isSubControl) {\n\t\t\t\trole = parameter.getRole();\n\t\t\t\tif (role === ParamRole.COLUMN) {\n\t\t\t\t\tcontrolType = ControlType.SELECTCOLUMN;\n\t\t\t\t} else {\n\t\t\t\t\tlogger.warn(\"Complex subControl type that is not a field! Name: \" + parameter.name);\n\t\t\t\t\tcontrolType = ControlType.READONLY;\n\t\t\t\t}\n\t\t\t} else if (parameter.isCompoundField()) {\n\t\t\t\tconst returnObject = _makeStringControl(parameter, isSubControl);\n\t\t\t\tcontrolType = returnObject.controlType;\n\t\t\t\trole = returnObject.role;\n\t\t\t} else {\n\t\t\t\tlogger.warn(\"Complex parameter type that is not a field! Name: \" + parameter.name);\n\t\t\t\tcontrolType = ControlType.READONLY;\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\trole = \"???\" + parameter.propType() + \"???\";\n\t\t\tcontrolType = ControlType.TEXTAREA;\n\t\t\tbreak;\n\t\t}\n\t}\n\tlet valueLabels;\n\tif (parameter.getRole() === ParamRole.ENUM) {\n\t\tvalueLabels = _parameterValueLabels(parameter, l10nProvider);\n\t}\n\n\tlet valueDescs;\n\tif (parameter.getRole() === ParamRole.ENUM) {\n\t\tvalueDescs = _parameterValueDescription(parameter, l10nProvider);\n\t}\n\tlet action;\n\tif (!isSubControl && parameter.actionRef) {\n\t\taction = _makeAction(actionMetadata.getAction(parameter.actionRef), l10nProvider);\n\t}\n\tconst settings = {};\n\tsettings.name = parameter.name;\n\tsettings.label = controlLabel;\n\tsettings.description = controlDesc;\n\tsettings.labelVisible = typeof parameter.labelVisible === \"boolean\" ? parameter.labelVisible : labelVisible;\n\tsettings.controlType = parameter.getControl(controlType);\n\tsettings.valueDef = ValueDef.make(parameter);\n\tsettings.structureType = structureType;\n\tsettings.role = role;\n\tsettings.additionalText = additionalText;\n\tsettings.orientation = orientation;\n\tsettings.values = parameter.getValidValues();\n\tsettings.valueLabels = valueLabels;\n\tsettings.valueDescs = valueDescs;\n\tsettings.valueIcons = parameter.valueIcons;\n\tsettings.sortable = parameter.sortable;\n\tsettings.filterable = parameter.filterable;\n\tsettings.resizable = parameter.resizable;\n\tsettings.charLimit = parameter.charLimit;\n\tsettings.subControls = subControls;\n\tsettings.keyIndex = keyIndex;\n\tsettings.defaultRow = defaultRow;\n\tsettings.childItem = childItem;\n\tsettings.multiSelectEditChildItem = multiSelectEditChildItem;\n\tsettings.moveableRows = moveableRows;\n\tsettings.required = required;\n\tsettings.language = parameter.language;\n\tsettings.enableMaximize = parameter.enableMaximize;\n\tsettings.summary = parameter.summary;\n\tsettings.increment = parameter.increment;\n\tsettings.minValue = parameter.minValue;\n\tsettings.maxValue = parameter.maxValue;\n\tsettings.rowSelection = rowSelection;\n\tsettings.generatedValues = parameter.generatedValues;\n\tsettings.addRemoveRows = addRemoveRows;\n\tsettings.dateFormat = parameter.dateFormat;\n\tsettings.timeFormat = parameter.timeFormat;\n\tsettings.customControlId = parameter.customControlId;\n\tsettings.data = parameter.data;\n\tsettings.rows = parameter.rows;\n\tsettings.displayChars = parameter.displayChars;\n\tsettings.header = header;\n\tsettings.uionly = parameter.uionly;\n\tsettings.includeAllFields = includeAllFields;\n\tsettings.layout = layout;\n\tsettings.dmImage = parameter.dmImage;\n\tsettings.action = action;\n\tsettings.customValueAllowed = parameter.customValueAllowed;\n\tsettings.shouldFilterItem = parameter.shouldFilterItem;\n\tsettings.className = parameter.className;\n\tsettings.buttons = buttons;\n\tsettings.helperText = additionalHelperText;\n\tsettings.readOnly = parameter.readOnly;\n\tsettings.light = _isControlLight(additionalInfo.light, additionalInfo.containerType, parameter.isSubPanelEdit());\n\tsettings.editStyle = parameter.editStyle;\n\tif (isSubControl) {\n\t\tsettings.visible = parameter.visible;\n\t\tsettings.width = parameter.columns(8);\n\t\tsettings.isKeyField = parameter.isKey;\n\t\tsettings.dmDefault = parameter.dmDefault;\n\t}\n\treturn new Control(settings);\n}\n\nfunction _isControlLight(light, containerType, isSubPanelEdit) {\n\treturn light &&\n\t\t(containerType !== CONTAINER_TYPE.TEARSHEET || // Controls displayed in a Tearsheet are not light themed\n\t\t(containerType === CONTAINER_TYPE.TEARSHEET && isSubPanelEdit)); // Controls inside a subpanel of tearsheet container are light themed\n}\n\nfunction _processListParameter(parameter) {\n\tconst controlObj = {};\n\tswitch (parameter.getRole()) {\n\tcase ParamRole.TEXT:\n\t\tcontrolObj.controlType = ControlType.TEXTAREA;\n\t\tbreak;\n\tcase ParamRole.ENUM:\n\t\tif (parameter.getValidValueCount() < 5) {\n\t\t\tcontrolObj.controlType = ControlType.CHECKBOXSET;\n\t\t} else {\n\t\t\tcontrolObj.controlType = ControlType.SOMEOFSELECT;\n\t\t}\n\t\tbreak;\n\tcase ParamRole.COLUMN:\n\t\tcontrolObj.role = ParamRole.COLUMN;\n\t\tcontrolObj.controlType = ControlType.SELECTCOLUMNS;\n\t\tbreak;\n\tdefault:\n\t\tcontrolObj.controlType = ControlType.TEXTAREA;\n\t}\n\treturn controlObj;\n}\n\nfunction _makeEditStyleSubPanel(structureDef, l10nProvider, structureMetadata, additionalInfo) {\n\t// If we\"re not editing in-line then create a sub-panel that can be used to edit the attributes\n\tconst panel = new ControlPanel(\n\t\tstructureDef.name,\n\t\tPanelType.GENERAL,\n\t\t\"properties-editstyle-sub-panel\",\n\t\tfalse,\n\t\t_makeControls(structureDef.parameterMetadata,\n\t\t\tstructureDef.actionMetadata,\n\t\t\tstructureDef,\n\t\t\tstructureMetadata,\n\t\t\tl10nProvider,\n\t\t\tadditionalInfo,\n\t\t\tEditStyle.SUBPANEL)\n\t);\n\tconst groupLabel = l10nProvider.l10nLabel(structureDef, structureDef.name);\n\treturn UIItem.makeAdditionalLink(\"...\", groupLabel, panel);\n}\n\nfunction _makeInlineEditStyleSubPanel(structureDef, l10nProvider, structureMetadata, additionalInfo) {\n\t// For multi select edit, create a subpanel that can be used to update the inline attributes affecting selected rows\n\tconst panel = new ControlPanel(\n\t\tstructureDef.name,\n\t\tPanelType.GENERAL,\n\t\t\"properties-editstyle-inline\",\n\t\tfalse,\n\t\t_makeControls(structureDef.parameterMetadata,\n\t\t\tstructureDef.actionMetadata,\n\t\t\tstructureDef,\n\t\t\tstructureMetadata,\n\t\t\tl10nProvider,\n\t\t\tadditionalInfo,\n\t\t\tEditStyle.INLINE)\n\t);\n\tconst groupLabel = l10nProvider.l10nLabel(structureDef, structureDef.name);\n\treturn UIItem.makeAdditionalLink(\"...\", groupLabel, panel);\n}\n\n/**\n * Creates a column control for the supplied property/attribute.\n */\nfunction _makeSubControl(parameter, l10nProvider, structureMetadata, additionalInfo) {\n\tconst parameterMetadata = null;\n\tconst paramName = null;\n\tconst group = null;\n\tconst structureDef = parameter.propType() === Type.STRUCTURE && structureMetadata ? structureMetadata.getStructure(parameter.baseType()) : null;\n\tconst actionMetadata = null;\n\tconst subControl = parameter;\n\treturn _makeControl(parameterMetadata, paramName, group, structureDef, l10nProvider, actionMetadata, structureMetadata, subControl, additionalInfo);\n}\n\n/**\n * Returns true if the given parameter is a multi-option type that can be embedded within a table cell.\n */\nfunction _isEmbeddedMultiOption(parameter) {\n\tif (parameter.isList() || parameter.isMapValue()) {\n\t\treturn _isEmbeddedOption(parameter);\n\t}\n\treturn false;\n}\n\n/**\n * Returns true if the given parameter is a multi-option type that can be embedded within a table cell.\n */\nfunction _isEmbeddedOption(parameter) {\n\treturn parameter.editStyle === \"on_panel\" || parameter.editStyle === \"subpanel\";\n}\n\n/**\n * Called on a base property group.\n */\nfunction _makeActions(parameterMetadata, actionMetadata, group, structureMetadata, l10nProvider) {\n\tconst uiItems = [];\n\tif (Array.isArray(group.actionIds())) {\n\t\tgroup.actionIds().forEach(function(actionId) {\n\t\t\t// Assume property definition exists\n\t\t\tconst action = UIItem.makeAction(_makeAction(actionMetadata.getAction(actionId), l10nProvider));\n\t\t\tuiItems.push(action);\n\t\t});\n\t}\n\treturn uiItems;\n}\n\nfunction _makeAction(action, l10nProvider) {\n\tconst actionLabel = new Label(l10nProvider.l10nLabel(action, action.id));\n\tlet actionDesc;\n\tif (action.description) {\n\t\tactionDesc = new Description(l10nProvider.l10nDesc(action, action.id));\n\t}\n\treturn new Action(action.id, actionLabel, actionDesc, action.control, action.data, action.image, action.button, action.className, action.customActionId);\n}\n\nfunction _makeButtons(buttonMetadata, l10nProvider) {\n\tconst buttons = [];\n\tbuttonMetadata.buttonDefs.forEach((buttonDef) => {\n\t\tbuttons.push(_makeButton(buttonMetadata.getButton(buttonDef.id), l10nProvider));\n\t});\n\treturn buttons;\n}\n\nfunction _makeButton(button, l10nProvider) {\n\tlet buttonLabel;\n\tif (button.label) {\n\t\tbuttonLabel = new Label(l10nProvider.l10nLabel(button, button.id));\n\t}\n\tlet buttonDescription;\n\tif (button.description) {\n\t\tbuttonDescription = new Description(l10nProvider.l10nDesc(button, button.description));\n\t}\n\treturn new Button(button.id, buttonLabel, buttonDescription, button.icon, button.carbonIcon, button.enabled, button.kind, button.divider);\n}\n\nfunction _parameterValueLabels(parameter, l10nProvider) {\n\tif (Array.isArray(parameter.getValidValues())) {\n\t\tlet key;\n\t\tif (parameter.resource_key) {\n\t\t\tkey = parameter.resource_key;\n\t\t} else {\n\t\t\tkey = parameter.name;\n\t\t}\n\t\tconst paramLabels = [];\n\t\tparameter.getValidValues().forEach(function(paramValue) {\n\t\t\tparamLabels.push(l10nProvider.l10nValueLabel(key, String(paramValue)));\n\t\t});\n\t\treturn paramLabels;\n\t}\n\treturn [];\n}\n\nfunction _parameterValueDescription(parameter, l10nProvider) {\n\tif (Array.isArray(parameter.getValidValues())) {\n\t\tlet key;\n\t\tif (parameter.resource_key) {\n\t\t\tkey = parameter.resource_key;\n\t\t} else {\n\t\t\tkey = parameter.name;\n\t\t}\n\t\tconst paramDescs = [];\n\t\tparameter.getValidValues().forEach(function(paramValue) {\n\t\t\tparamDescs.push(l10nProvider.l10nValueDesc(key, String(paramValue)));\n\t\t});\n\t\treturn paramDescs;\n\t}\n\treturn [];\n}\n\n\nexport {\n\tmakePrimaryTab, _makeControl as makeControl, _makeActions as makeActions\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { has } from \"lodash\";\n\n/*\n* Iterates over the conditions and replaces the default message with translated message\n*/\nfunction translateMessages(conditions, l10nProvider) {\n\tif (conditions && Array.isArray(conditions)) {\n\t\tfor (var condition of conditions) {\n\t\t\tsearchMessage(condition, l10nProvider);\n\t\t}\n\t}\n\treturn conditions;\n}\n\nfunction searchMessage(object, l10nProvider) {\n\tfor (var x in object) {\n\t\tif (has(object, x)) {\n\t\t\tif (typeof object[x] === \"object\" && object[x] !== null) {\n\t\t\t\tif (object[x].message) {\n\t\t\t\t\tobject[x].message.default = l10nProvider.l10nResource(object[x].message);\n\t\t\t\t} else {\n\t\t\t\t\tsearchMessage(object[x], l10nProvider);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport { translateMessages };\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { PropertyDef } from \"./PropertyDef\";\nimport { propertyOf } from \"lodash\";\nimport { makePrimaryTab, makeActions } from \"./EditorForm\";\nimport { UIItem } from \"./UIItem\";\nimport { L10nProvider } from \"../util/L10nProvider\";\nimport { translateMessages } from \"./Conditions\";\nimport { Size } from \"../constants/form-constants\";\nimport { CONTAINER_TYPE } from \"../constants/constants\";\n\nexport default class Form {\n\tconstructor(componentId, label, labelEditable, help, description, editorSize, pixelWidth, uiItems, buttons, data, conditions, resources, icon, heading, title, titleUiItems) {\n\t\tthis.componentId = componentId;\n\t\tthis.label = label;\n\t\tthis.labelEditable = labelEditable;\n\t\tthis.help = help;\n\t\tthis.description = description;\n\t\tthis.editorSize = editorSize;\n\t\tthis.pixelWidth = pixelWidth;\n\t\tthis.uiItems = uiItems;\n\t\tthis.buttons = buttons;\n\t\tthis.data = data;\n\t\tthis.conditions = conditions;\n\t\tthis.resources = resources;\n\t\tthis.icon = icon;\n\t\tthis.heading = heading;\n\t\tif (title) {\n\t\t\tthis.title = title;\n\t\t}\n\t\tif (titleUiItems?.length > 0) {\n\t\t\tthis.titleUiItems = titleUiItems;\n\t\t}\n\t}\n\n\t/**\n\t* Returns a new Form\n\t* @param paramDef Parameter definition\n\t* @param containerType Type of container common properties will be displayed in, set in propertiesConfig\n\t*/\n\tstatic makeForm(paramDef, containerType) {\n\t\tconst propDef = PropertyDef.makePropertyDef(propertyOf(paramDef)(\"titleDefinition\"), propertyOf(paramDef)(\"parameters\"), propertyOf(paramDef)(\"complex_types\"),\n\t\t\tpropertyOf(paramDef)(\"uihints\"));\n\t\tconst resources = propertyOf(paramDef)(\"resources\");\n\t\tconst conditions = propertyOf(paramDef)(\"conditions\");\n\t\tif (propDef) {\n\t\t\tconst l10nProvider = new L10nProvider(resources);\n\t\t\tconst tabs = [];\n\t\t\tif (propDef.groupMetadata && propDef.groupMetadata.groups) {\n\t\t\t\tfor (const group of propDef.groupMetadata.groups) {\n\t\t\t\t\ttabs.push(makePrimaryTab(propDef, group, l10nProvider, containerType));\n\t\t\t\t}\n\t\t\t}\n\t\t\tlet titleUiItems = [];\n\t\t\tif (propDef.titleMetadata && propDef.actionMetadata) {\n\t\t\t\ttitleUiItems = makeActions(null, propDef.actionMetadata, propDef.titleMetadata.Title, null, l10nProvider);\n\t\t\t}\n\n\t\t\tconst currentParameters = propertyOf(paramDef)(\"current_parameters\");\n\t\t\tconst data = {\n\t\t\t\tcurrentParameters: currentParameters,\n\t\t\t\tuiCurrentParameters: propertyOf(paramDef)(\"current_ui_parameters\"),\n\t\t\t\tdatasetMetadata: propertyOf(paramDef)(\"dataset_metadata\")\n\t\t\t};\n\t\t\tconst isModal = containerType === CONTAINER_TYPE.TEARSHEET || containerType === CONTAINER_TYPE.MODAL;\n\t\t\tconst editorSizeDefault = isModal ? Size.LARGE : Size.SMALL;\n\t\t\treturn new Form(propDef.name,\n\t\t\t\tpropDef.label,\n\t\t\t\tpropDef.labelEditable,\n\t\t\t\tpropDef.help,\n\t\t\t\tl10nProvider.l10nResource(propDef.description),\n\t\t\t\tpropDef.editorSizeHint(editorSizeDefault),\n\t\t\t\tpropDef.pixelWidth,\n\t\t\t\t[UIItem.makePrimaryTabs(tabs)],\n\t\t\t\t_defaultButtons(),\n\t\t\t\tdata,\n\t\t\t\ttranslateMessages(conditions, l10nProvider),\n\t\t\t\tresources,\n\t\t\t\tpropDef.icon,\n\t\t\t\tl10nProvider.l10nResource(propDef.heading),\n\t\t\t\tpropDef.titleMetadata,\n\t\t\t\ttitleUiItems\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}\n}\n\nfunction _defaultButtons() {\n\tconst okBtn = new Button(\"ok\", \"OK\", true, \"\");\n\tconst cancelBtn = new Button(\"cancel\", \"Cancel\", false, \"\");\n\treturn [okBtn, cancelBtn];\n}\n\nclass Button {\n\tconstructor(id, text, isPrimary, url) {\n\t\tthis.id = id;\n\t\tthis.text = text;\n\t\tthis.isPrimary = isPrimary;\n\t\tthis.url = url;\n\t}\n}\n","/*\n * Copyright 2017-2026 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Action from \"../command-stack/action.js\";\n\nexport default class CommonPropertiesAction extends Action {\n\tconstructor(newValues, initialValues, appData, applyPropertyChanges, propertiesActionLabel) {\n\t\tsuper(newValues);\n\t\tthis.newValues = newValues;\n\t\tthis.initialValues = initialValues;\n\t\tthis.appData = appData;\n\t\tthis.applyPropertyChanges = applyPropertyChanges;\n\t\tthis.propertiesActionLabel = propertiesActionLabel;\n\t}\n\n\t// Standard methods\n\tdo() {\n\t\tif (this.applyPropertyChanges) {\n\t\t\tthis.applyPropertyChanges(this.newValues.properties, this.appData, this.newValues.additionalInfo, this.newValues.undoInfo, this.newValues.uiProperties);\n\t\t}\n\t}\n\n\tundo() {\n\t\tif (this.applyPropertyChanges) {\n\t\t\tthis.applyPropertyChanges(this.initialValues.properties, this.appData, this.initialValues.additionalInfo, this.initialValues.undoInfo, this.initialValues.uiProperties);\n\t\t}\n\t}\n\n\tredo() {\n\t\tif (this.applyPropertyChanges) {\n\t\t\tthis.applyPropertyChanges(this.newValues.properties, this.appData, this.newValues.additionalInfo, this.newValues.undoInfo, this.newValues.uiProperties);\n\t\t}\n\t}\n\n\tgetLabel() {\n\t\treturn this.propertiesActionLabel;\n\t}\n}\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignMergeValue;\n","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nmodule.exports = safeGet;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nmodule.exports = toPlainObject;\n","var assignMergeValue = require('./_assignMergeValue'),\n cloneBuffer = require('./_cloneBuffer'),\n cloneTypedArray = require('./_cloneTypedArray'),\n copyArray = require('./_copyArray'),\n initCloneObject = require('./_initCloneObject'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isArrayLikeObject = require('./isArrayLikeObject'),\n isBuffer = require('./isBuffer'),\n isFunction = require('./isFunction'),\n isObject = require('./isObject'),\n isPlainObject = require('./isPlainObject'),\n isTypedArray = require('./isTypedArray'),\n safeGet = require('./_safeGet'),\n toPlainObject = require('./toPlainObject');\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\nmodule.exports = baseMergeDeep;\n","var Stack = require('./_Stack'),\n assignMergeValue = require('./_assignMergeValue'),\n baseFor = require('./_baseFor'),\n baseMergeDeep = require('./_baseMergeDeep'),\n isObject = require('./isObject'),\n keysIn = require('./keysIn'),\n safeGet = require('./_safeGet');\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nmodule.exports = baseMerge;\n","var baseRest = require('./_baseRest'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nmodule.exports = createAssigner;\n","var baseMerge = require('./_baseMerge'),\n createAssigner = require('./_createAssigner');\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\nmodule.exports = merge;\n","var baseDifference = require('./_baseDifference'),\n baseFlatten = require('./_baseFlatten'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\nvar difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n});\n\nmodule.exports = difference;\n","var assignValue = require('./_assignValue'),\n copyObject = require('./_copyObject'),\n createAssigner = require('./_createAssigner'),\n isArrayLike = require('./isArrayLike'),\n isPrototype = require('./_isPrototype'),\n keys = require('./keys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\nvar assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n});\n\nmodule.exports = assign;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { UPDATE_PROPERTY_VALUE, SET_PROPERTY_VALUES, REMOVE_PROPERTY_VALUE } from \"../actions\";\n\nfunction properties(state = {}, action) {\n\tconst propertyId = action.property && action.property.propertyId ? action.property.propertyId : null;\n\tswitch (action.type) {\n\tcase UPDATE_PROPERTY_VALUE: {\n\t\tif (propertyId === null) {\n\t\t\treturn state;\n\t\t}\n\t\tvar newState = state;\n\t\tif (typeof propertyId.row !== \"undefined\") {\n\t\t\tif (typeof newState[propertyId.name] === \"undefined\") {\n\t\t\t\tnewState[propertyId.name] = [];\n\t\t\t}\n\t\t\tif (typeof propertyId.col !== \"undefined\") {\n\t\t\t\tif (typeof newState[propertyId.name][propertyId.row] === \"undefined\") {\n\t\t\t\t\tnewState[propertyId.name][propertyId.row] = [];\n\t\t\t\t}\n\n\t\t\t\tif (typeof propertyId.propertyId !== \"undefined\") {\n\t\t\t\t\tupdateNestedPropertyValue(propertyId.propertyId, newState[propertyId.name][propertyId.row][propertyId.col], action.property.value);\n\t\t\t\t} else {\n\t\t\t\t\tnewState[propertyId.name][propertyId.row][propertyId.col] = action.property.value;\n\t\t\t\t}\n\t\t\t} else if (typeof propertyId.propertyId !== \"undefined\") { // nested structureeditor\n\t\t\t\tupdateNestedPropertyValue(propertyId.propertyId, newState[propertyId.name][propertyId.row], action.property.value);\n\t\t\t} else {\n\t\t\t\tnewState[propertyId.name][propertyId.row] = action.property.value;\n\t\t\t}\n\t\t} else {\n\t\t\tnewState[propertyId.name] = action.property.value;\n\t\t}\n\t\treturn Object.assign({}, state, newState);\n\t}\n\tcase SET_PROPERTY_VALUES: {\n\t\treturn Object.assign({}, action.properties);\n\t}\n\tcase REMOVE_PROPERTY_VALUE: {\n\t\tconst nextState = state;\n\t\tif (propertyId !== null && typeof propertyId.name !== \"undefined\") {\n\t\t\tdelete nextState[propertyId.name];\n\t\t}\n\t\treturn Object.assign({}, state, nextState);\n\t}\n\tdefault:\n\t\treturn state;\n\t}\n}\n\nfunction updateNestedPropertyValue(propertyId, newState, value) {\n\tif (typeof propertyId.row !== \"undefined\") {\n\t\tif (typeof propertyId.col !== \"undefined\") {\n\t\t\tif (typeof newState[propertyId.row] === \"undefined\") {\n\t\t\t\tnewState[propertyId.row] = [];\n\t\t\t}\n\n\t\t\tif (typeof propertyId.propertyId !== \"undefined\") {\n\t\t\t\tupdateNestedPropertyValue(propertyId.propertyId, newState[propertyId.row][propertyId.col], value);\n\t\t\t} else {\n\t\t\t\tnewState[propertyId.row][propertyId.col] = value;\n\t\t\t}\n\t\t} else {\n\t\t\tnewState[propertyId.row] = value;\n\t\t}\n\t}\n}\n\nexport default properties;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { UPDATE_CONTROL_STATE, SET_CONTROL_STATES } from \"../actions\";\n\n/*\n* Stores the state information for all controls. States are stored as objects with keys being name, row, col.\n* All keys need to be strings\n*/\nfunction states(state = {}, action) {\n\tswitch (action.type) {\n\tcase UPDATE_CONTROL_STATE: {\n\t\tconst newState = state;\n\t\tconst propertyId = action.state.propertyId;\n\t\tif (typeof newState[propertyId.name] === \"undefined\") {\n\t\t\tnewState[propertyId.name] = {};\n\t\t}\n\t\tif (typeof propertyId.row !== \"undefined\") {\n\t\t\tconst strRow = propertyId.row.toString();\n\t\t\tif (typeof newState[propertyId.name][strRow] === \"undefined\") {\n\t\t\t\tnewState[propertyId.name][strRow] = {};\n\t\t\t}\n\t\t\tif (typeof propertyId.col !== \"undefined\") {\n\t\t\t\tconst strCol = propertyId.col.toString();\n\t\t\t\tif (typeof newState[propertyId.name][strRow][strCol] === \"undefined\") {\n\t\t\t\t\tnewState[propertyId.name][strRow][strCol] = {};\n\t\t\t\t}\n\t\t\t\tnewState[propertyId.name][strRow][strCol] = {\n\t\t\t\t\tvalue: action.state.value\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tnewState[propertyId.name][strRow] = {\n\t\t\t\t\tvalue: action.state.value\n\t\t\t\t};\n\t\t\t}\n\t\t} else {\n\t\t\tnewState[propertyId.name] = {\n\t\t\t\tvalue: action.state.value\n\t\t\t};\n\t\t}\n\t\treturn Object.assign({}, state, newState);\n\t}\n\tcase SET_CONTROL_STATES: {\n\t\treturn Object.assign({}, action.states);\n\t}\n\tdefault: {\n\t\treturn state;\n\t}\n\t}\n}\n\nexport default states;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { UPDATE_PANEL_STATE, SET_PANEL_STATES } from \"../actions\";\n\n/*\n* Stores the state information for all controls. States are stored as objects with keys being name, row, col.\n* All keys need to be strings\n*/\nfunction states(state = {}, action) {\n\tswitch (action.type) {\n\tcase UPDATE_PANEL_STATE: {\n\t\tconst newState = state;\n\t\tnewState[action.state.panelId.name] = {\n\t\t\tvalue: action.state.value\n\t\t};\n\t\treturn Object.assign({}, state, newState);\n\t}\n\tcase SET_PANEL_STATES: {\n\t\treturn Object.assign({}, action.states);\n\t}\n\tdefault: {\n\t\treturn state;\n\t}\n\t}\n}\n\nexport default states;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { UPDATE_ACTION_STATE, SET_ACTION_STATES } from \"../actions\";\n\n/*\n* Stores the state information for all controls. States are stored as objects with keys being name, row, col.\n* All keys need to be strings\n*/\nfunction states(state = {}, action) {\n\tswitch (action.type) {\n\tcase UPDATE_ACTION_STATE: {\n\t\tconst newState = state;\n\t\tnewState[action.state.actionId.name] = {\n\t\t\tvalue: action.state.value\n\t\t};\n\t\treturn Object.assign({}, state, newState);\n\t}\n\tcase SET_ACTION_STATES: {\n\t\treturn Object.assign({}, action.states);\n\t}\n\tdefault: {\n\t\treturn state;\n\t}\n\t}\n}\n\nexport default states;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { UPDATE_ERROR_MESSAGE, SET_ERROR_MESSAGES, CLEAR_ERROR_MESSAGE } from \"../actions\";\nimport { isEmpty } from \"lodash\";\n/* eslint max-depth: [\"error\", 6] */\n\n/*\n* Stores the state information for all controls. States are stored as objects with keys being name, row, col.\n* All keys need to be strings\n*/\nfunction messages(state = {}, action) {\n\tswitch (action.type) {\n\tcase UPDATE_ERROR_MESSAGE: {\n\t\tconst newState = state;\n\t\tconst propertyId = action.message.propertyId;\n\t\tif (typeof newState[propertyId.name] === \"undefined\") {\n\t\t\tnewState[propertyId.name] = {};\n\t\t}\n\t\tif (typeof propertyId.row !== \"undefined\") {\n\t\t\tconst strRow = propertyId.row.toString();\n\t\t\tif (typeof newState[propertyId.name][strRow] === \"undefined\") {\n\t\t\t\tnewState[propertyId.name][strRow] = {};\n\t\t\t}\n\t\t\tif (typeof propertyId.col !== \"undefined\") {\n\t\t\t\tconst strCol = propertyId.col.toString();\n\t\t\t\tif (typeof newState[propertyId.name][strRow][strCol] === \"undefined\") {\n\t\t\t\t\tnewState[propertyId.name][strRow][strCol] = {};\n\t\t\t\t}\n\t\t\t\tnewState[propertyId.name][strRow][strCol] = action.message.value;\n\t\t\t} else {\n\t\t\t\tnewState[propertyId.name][strRow] = Object.assign({}, action.message.value);\n\t\t\t}\n\t\t} else {\n\t\t\tnewState[propertyId.name] = Object.assign({}, action.message.value);\n\t\t}\n\t\treturn Object.assign({}, state, newState);\n\t}\n\tcase CLEAR_ERROR_MESSAGE: {\n\t\tconst newState = state;\n\t\tif (newState[action.message.propertyId.name]) {\n\t\t\tif (typeof action.message.propertyId.row !== \"undefined\") {\n\t\t\t\tif (typeof action.message.propertyId.col !== \"undefined\") {\n\t\t\t\t\tdelete newState[action.message.propertyId.name][action.message.propertyId.row][action.message.propertyId.col];\n\t\t\t\t} else {\n\t\t\t\t\tdelete newState[action.message.propertyId.name][action.message.propertyId.row];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdelete newState[action.message.propertyId.name].type;\n\t\t\t\tdelete newState[action.message.propertyId.name].text;\n\t\t\t\tdelete newState[action.message.propertyId.name].validation_id;\n\t\t\t\tdelete newState[action.message.propertyId.name].required;\n\t\t\t\tdelete newState[action.message.propertyId.name].propertyId;\n\t\t\t\tdelete newState[action.message.propertyId.name].displayError;\n\t\t\t\tif (isEmpty(newState[action.message.propertyId.name])) {\n\t\t\t\t\tdelete newState[action.message.propertyId.name];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn Object.assign({}, state, newState);\n\t}\n\tcase SET_ERROR_MESSAGES: {\n\t\treturn Object.assign({}, action.messages);\n\t}\n\tdefault: {\n\t\treturn state;\n\t}\n\t}\n}\n\nexport default messages;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SET_DATASET_METADATA } from \"../actions\";\n\nfunction datasetMetadata(state = [], action) {\n\tswitch (action.type) {\n\tcase SET_DATASET_METADATA:\n\t\treturn Object.assign({}, state, action.datasetMetadata);\n\tdefault:\n\t\treturn state;\n\t}\n}\n\nexport default datasetMetadata;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { UPDATE_SELECTED_ROWS, CLEAR_SELECTED_ROWS } from \"../actions\";\n/* eslint max-depth: [\"error\", 6] */\n\n/*\n* Stores the state information for all controls. States are stored as objects with keys being name, row, col.\n* All keys need to be strings\n*/\nfunction states(state = {}, action) {\n\tswitch (action.type) {\n\tcase UPDATE_SELECTED_ROWS: {\n\t\tconst newState = state;\n\t\tconst propertyId = action.info.propertyId;\n\t\tif (!newState[propertyId.name]) {\n\t\t\tnewState[propertyId.name] = {};\n\t\t}\n\t\tif (Number.isInteger(propertyId.row)) {\n\t\t\tconst strRow = String(propertyId.row);\n\t\t\tif (!newState[propertyId.name][strRow]) {\n\t\t\t\tnewState[propertyId.name][strRow] = {};\n\t\t\t}\n\t\t\tif (Number.isInteger(propertyId.col)) {\n\t\t\t\tconst strCol = String(propertyId.col);\n\t\t\t\tif (!newState[propertyId.name][strRow][strCol]) {\n\t\t\t\t\tnewState[propertyId.name][strRow][strCol] = {};\n\t\t\t\t}\n\t\t\t\tnewState[propertyId.name][strRow][strCol].selectedRows = action.info.selectedRows;\n\t\t\t} else {\n\t\t\t\tnewState[propertyId.name][strRow].selectedRows = action.info.selectedRows;\n\t\t\t}\n\t\t} else {\n\t\t\tnewState[propertyId.name].selectedRows = action.info.selectedRows;\n\t\t}\n\t\treturn Object.assign({}, state, newState);\n\t}\n\tcase CLEAR_SELECTED_ROWS: {\n\t\tconst newState = state;\n\t\tconst propertyId = action.info.propertyId;\n\t\tif (action.info.propertyId) {\n\t\t\tif (newState[propertyId.name]) {\n\t\t\t\tif (Number.isInteger(propertyId.row) && newState[propertyId.name][String(propertyId.row)]) {\n\t\t\t\t\tconst strRow = String(propertyId.row);\n\t\t\t\t\tif (Number.isInteger(propertyId.col) && newState[propertyId.name][strRow][String(propertyId.col)]) {\n\t\t\t\t\t\tnewState[propertyId.name][strRow][String(propertyId.col)].selectedRows = [];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnewState[propertyId.name][strRow].selectedRows = [];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tnewState[propertyId.name].selectedRows = [];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn Object.assign({}, state, newState);\n\t\t}\n\t\treturn {};\n\t}\n\tdefault: {\n\t\treturn state;\n\t}\n\t}\n}\n\nexport default states;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { UPDATE_STATIC_ROWS, CLEAR_STATIC_ROWS } from \"../actions\";\n/* eslint max-depth: [\"error\", 6] */\n\n/*\n* Stores the state information for all controls. States are stored as objects with keys being name, row, col.\n* All keys need to be strings\n*/\nfunction states(state = {}, action) {\n\tswitch (action.type) {\n\tcase UPDATE_STATIC_ROWS: {\n\t\tconst newState = state;\n\t\tconst propertyId = action.info.propertyId;\n\t\tif (!newState[propertyId.name]) {\n\t\t\tnewState[propertyId.name] = {};\n\t\t}\n\t\tif (Number.isInteger(propertyId.row)) {\n\t\t\tconst strRow = String(propertyId.row);\n\t\t\tif (!newState[propertyId.name][strRow]) {\n\t\t\t\tnewState[propertyId.name][strRow] = {};\n\t\t\t}\n\t\t\tif (Number.isInteger(propertyId.col)) {\n\t\t\t\tconst strCol = String(propertyId.col);\n\t\t\t\tif (!newState[propertyId.name][strRow][strCol]) {\n\t\t\t\t\tnewState[propertyId.name][strRow][strCol] = {};\n\t\t\t\t}\n\t\t\t\tnewState[propertyId.name][strRow][strCol].staticRows = action.info.staticRows;\n\t\t\t} else {\n\t\t\t\tnewState[propertyId.name][strRow].staticRows = action.info.staticRows;\n\t\t\t}\n\t\t} else {\n\t\t\tnewState[propertyId.name].staticRows = action.info.staticRows;\n\t\t}\n\t\treturn Object.assign({}, state, newState);\n\t}\n\tcase CLEAR_STATIC_ROWS: {\n\t\tconst newState = state;\n\t\tconst propertyId = action.info.propertyId;\n\t\tif (action.info.propertyId) {\n\t\t\tif (newState[propertyId.name]) {\n\t\t\t\tif (Number.isInteger(propertyId.row) && newState[propertyId.name][String(propertyId.row)]) {\n\t\t\t\t\tconst strRow = String(propertyId.row);\n\t\t\t\t\tif (Number.isInteger(propertyId.col) && newState[propertyId.name][strRow][String(propertyId.col)]) {\n\t\t\t\t\t\tnewState[propertyId.name][strRow][String(propertyId.col)].staticRows = [];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnewState[propertyId.name][strRow].staticRows = [];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tnewState[propertyId.name].staticRows = [];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn Object.assign({}, state, newState);\n\t\t}\n\t\treturn {};\n\t}\n\tdefault: {\n\t\treturn state;\n\t}\n\t}\n}\n\nexport default states;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SET_TITLE, SET_ACTIVE_TAB } from \"../actions\";\n\n\nfunction componentMetadata(state = [], action) {\n\tswitch (action.type) {\n\tcase SET_TITLE: {\n\t\tconst newState = state;\n\t\tnewState.title = action.title;\n\t\treturn Object.assign({}, state, newState);\n\t}\n\tcase SET_ACTIVE_TAB: {\n\t\tconst newState = state;\n\t\tnewState.activeTab = action.activeTab;\n\t\treturn Object.assign({}, state, newState);\n\t}\n\tdefault:\n\t\treturn state;\n\t}\n}\n\nexport default componentMetadata;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DISABLE_ROW_MOVE_BUTTONS } from \"../actions\";\n\nfunction disableRowMoveButtons(state = [], action) {\n\tswitch (action.type) {\n\tcase DISABLE_ROW_MOVE_BUTTONS: {\n\t\tconst newState = state;\n\t\tnewState.propertyIds = action.propertyIds;\n\t\treturn Object.assign({}, state, newState);\n\t}\n\tdefault:\n\t\treturn state;\n\t}\n}\n\nexport default disableRowMoveButtons;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SET_SAVE_BUTTON_DISABLE } from \"../actions\";\n\nfunction setSaveButtonDisable(state = [], action) {\n\tswitch (action.type) {\n\tcase SET_SAVE_BUTTON_DISABLE: {\n\t\tconst newState = state;\n\t\tnewState.disable = action.disableState;\n\t\treturn Object.assign({}, state, newState);\n\t}\n\tdefault:\n\t\treturn state;\n\t}\n}\n\nexport default setSaveButtonDisable;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SET_WIDE_FLYOUT_PRIMARY_BUTTON_DISABLED } from \"../actions\";\n\nfunction setWideFlyoutPrimaryButtonDisabled(state = [], action) {\n\tswitch (action.type) {\n\tcase SET_WIDE_FLYOUT_PRIMARY_BUTTON_DISABLED: {\n\t\tconst newState = state;\n\t\tnewState[action.info.panelId.name] = action.info.disableState;\n\t\treturn Object.assign({}, state, newState);\n\t}\n\tdefault:\n\t\treturn state;\n\t}\n}\n\nexport default setWideFlyoutPrimaryButtonDisabled;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { set } from \"lodash\";\nimport { SET_ADD_REMOVE_ROWS, SET_TABLE_BUTTON_ENABLED, SET_HIDE_EDIT_BUTTON } from \"../actions\";\n\n/*\n* Stores the state information for all controls. States are stored as objects with keys being name, row, col.\n* All keys need to be strings\n*/\nfunction states(state = {}, action) {\n\tconst propertyId = action.info && action.info.propertyId ? action.info.propertyId : null;\n\tswitch (action.type) {\n\tcase SET_ADD_REMOVE_ROWS: {\n\t\tif (propertyId === null) {\n\t\t\treturn state;\n\t\t}\n\t\tconst newState = state;\n\t\tif (typeof newState[propertyId.name] === \"undefined\") {\n\t\t\tnewState[propertyId.name] = {};\n\t\t}\n\n\t\tif (typeof propertyId.row !== \"undefined\") {\n\t\t\tupdateNestedPropertySetting(propertyId, newState[propertyId.name], \"addRemoveRows\", action.info.value);\n\t\t} else {\n\t\t\tnewState[propertyId.name].addRemoveRows = action.info.value;\n\t\t}\n\t\treturn Object.assign({}, state, newState);\n\t}\n\tcase SET_TABLE_BUTTON_ENABLED: {\n\t\tif (propertyId === null) {\n\t\t\treturn state;\n\t\t}\n\t\tconst newState = state;\n\t\tif (typeof newState[propertyId.name] === \"undefined\") {\n\t\t\tnewState[propertyId.name] = { };\n\t\t}\n\n\t\tif (typeof propertyId.row !== \"undefined\") {\n\t\t\tupdateNestedPropertySetting(propertyId, newState[propertyId.name], `tableButtons.${action.info.buttonId}`, action.info.value);\n\t\t} else {\n\t\t\tset(newState[propertyId.name], `tableButtons.${action.info.buttonId}`, action.info.value);\n\t\t}\n\t\treturn Object.assign({}, state, newState);\n\t}\n\tcase SET_HIDE_EDIT_BUTTON: {\n\t\tif (propertyId === null) {\n\t\t\treturn state;\n\t\t}\n\t\tconst newState = state;\n\t\tif (typeof newState[propertyId.name] === \"undefined\") {\n\t\t\tnewState[propertyId.name] = {};\n\t\t}\n\n\t\tif (typeof propertyId.row !== \"undefined\") {\n\t\t\tupdateNestedPropertySetting(propertyId, newState[propertyId.name], \"hideEditButton\", action.info.value);\n\t\t} else {\n\t\t\tnewState[propertyId.name].hideEditButton = action.info.value;\n\t\t}\n\t\treturn Object.assign({}, state, newState);\n\t}\n\tdefault: {\n\t\treturn state;\n\t}\n\t}\n}\n\nfunction updateNestedPropertySetting(propertyId, newState, setting, value) {\n\tif (typeof propertyId.row !== \"undefined\") {\n\t\tif (typeof newState[propertyId.row] === \"undefined\") {\n\t\t\tnewState[propertyId.row] = {};\n\t\t}\n\t\tif (typeof propertyId.col !== \"undefined\") {\n\t\t\tif (typeof newState[propertyId.row][propertyId.col] === \"undefined\") {\n\t\t\t\tnewState[propertyId.row][propertyId.col] = {};\n\t\t\t}\n\t\t\tif (typeof propertyId.propertyId !== \"undefined\") {\n\t\t\t\tupdateNestedPropertySetting(propertyId.propertyId, newState[propertyId.row][propertyId.col], setting, value);\n\t\t\t} else {\n\t\t\t\tset(newState[propertyId.row][propertyId.col], setting, value);\n\t\t\t}\n\t\t} else if (typeof propertyId.propertyId !== \"undefined\") { // nested structureeditor\n\t\t\tupdateNestedPropertySetting(propertyId.propertyId, newState[propertyId.row], setting, value);\n\t\t} else {\n\t\t\tset(newState[propertyId.row], setting, value);\n\t\t}\n\t}\n}\n\nexport default states;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SET_ACTIVE_TEARSHEET } from \"../actions\";\n\nfunction states(state = [], action) {\n\tswitch (action.type) {\n\tcase SET_ACTIVE_TEARSHEET: {\n\t\treturn Object.assign({}, state, action.tearsheetId);\n\t}\n\tdefault:\n\t\treturn state;\n\t}\n}\n\nexport default states;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createStore, combineReducers } from \"redux\";\nimport { has, get, isEqual, cloneDeep } from \"lodash\";\nimport { setTearsheetState } from \"./actions\";\nimport { setPropertyValues, updatePropertyValue, removePropertyValue } from \"./actions\";\nimport { setControlStates, updateControlState } from \"./actions\";\nimport { setPanelStates, updatePanelState } from \"./actions\";\nimport { setActionStates, updateActionState } from \"./actions\";\n\nimport { clearSelectedRows, updateSelectedRows, disableRowMoveButtons } from \"./actions\";\nimport { clearStaticRows, updateStaticRows } from \"./actions\";\nimport { setErrorMessages, updateErrorMessage, clearErrorMessage } from \"./actions\";\nimport { setDatasetMetadata, setSaveButtonDisable, setWideFlyoutPrimaryButtonDisabled, setAddRemoveRows, setTableButtonEnabled, setHideEditButton } from \"./actions\";\nimport { setTitle, setActiveTab } from \"./actions\";\nimport propertiesReducer from \"./reducers/properties\";\nimport controlStatesReducer from \"./reducers/control-states\";\nimport panelStatesReducer from \"./reducers/panel-states\";\nimport actionStatesReducer from \"./reducers/action-states\";\nimport errorMessagesReducer from \"./reducers/error-messages\";\nimport datasetMetadataReducer from \"./reducers/dataset-metadata\";\nimport rowSelectionsReducer from \"./reducers/row-selections\";\nimport rowFreezeReducer from \"./reducers/row-static\";\nimport componentMetadataReducer from \"./reducers/component-metadata\";\nimport disableRowMoveButtonsReducer from \"./reducers/disable-row-move-buttons\";\nimport saveButtonDisableReducer from \"./reducers/save-button-disable\";\nimport wideFlyoutPrimaryButtonDisableReducer from \"./reducers/wide-flyout-primary-button-disable\";\nimport propertiesSettingsReducer from \"./reducers/properties-settings\";\nimport tearsheetStatesReducer from \"./reducers/tearsheet-states\";\nimport * as PropertyUtils from \"./util/property-utils.js\";\nimport { CONDITION_MESSAGE_TYPE, MESSAGE_KEYS } from \"./constants/constants.js\";\n\n/* eslint max-depth: [\"error\", 6] */\n\nexport default class PropertiesStore {\n\tconstructor() {\n\t\tthis.combinedReducer = combineReducers({ propertiesReducer, controlStatesReducer, panelStatesReducer,\n\t\t\terrorMessagesReducer, datasetMetadataReducer, rowSelectionsReducer, componentMetadataReducer,\n\t\t\tdisableRowMoveButtonsReducer, actionStatesReducer, wideFlyoutPrimaryButtonDisableReducer, tearsheetStatesReducer,\n\t\t\tsaveButtonDisableReducer, propertiesSettingsReducer, rowFreezeReducer });\n\t\tlet enableDevTools = false;\n\t\tif (typeof window !== \"undefined\") {\n\t\t\tenableDevTools = window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__();\n\t\t}\n\t\tthis.store = createStore(this.combinedReducer, enableDevTools);\n\t}\n\n\tdispatch(action) {\n\t\tthis.store.dispatch(action);\n\t}\n\n\tgetStore() {\n\t\treturn this.store;\n\t}\n\tsubscribe(callback) {\n\t\tthis.store.subscribe(callback);\n\t}\n\n\tgetPropertyValue(propertyId) {\n\t\tconst state = this.store.getState();\n\t\tconst propValue = state.propertiesReducer[propertyId.name];\n\t\treturn this.getNestedPropertyValue(propertyId, propValue);\n\t}\n\n\tgetNestedPropertyValue(propertyId, propValue) {\n\t\tif (typeof propertyId.row !== \"undefined\" && (typeof propValue !== \"undefined\" && propValue !== null)) {\n\t\t\tconst rowValue = propValue[propertyId.row];\n\t\t\tif (typeof propertyId.col !== \"undefined\" && (typeof rowValue !== \"undefined\" && rowValue !== null) && Array.isArray(rowValue)) {\n\t\t\t\tif (typeof propertyId.index !== \"undefined\") {\n\t\t\t\t\treturn rowValue[propertyId.col][propertyId.index];\n\t\t\t\t}\n\n\t\t\t\tif (typeof propertyId.propertyId !== \"undefined\") {\n\t\t\t\t\treturn this.getNestedPropertyValue(propertyId.propertyId, rowValue[propertyId.col]);\n\t\t\t\t}\n\t\t\t\treturn rowValue[propertyId.col];\n\t\t\t}\n\t\t\tif (typeof propertyId.propertyId !== \"undefined\") { // nested structureeditor\n\t\t\t\treturn this.getNestedPropertyValue(propertyId.propertyId, rowValue);\n\t\t\t}\n\t\t\treturn rowValue;\n\t\t}\n\t\treturn propValue;\n\t}\n\tgetPropertyValues() {\n\t\tconst state = this.store.getState();\n\t\treturn PropertyUtils.copy(state.propertiesReducer);\n\t}\n\tsetPropertyValues(values) {\n\t\tthis.store.dispatch(setPropertyValues(values));\n\t}\n\n\tupdatePropertyValue(propertyId, value) {\n\t\tthis.store.dispatch(updatePropertyValue({ propertyId: propertyId, value: value }));\n\t}\n\n\tremovePropertyValue(propertyId) {\n\t\tthis.store.dispatch(removePropertyValue({ propertyId: propertyId }));\n\t}\n\n\tgetControlState(propertyId) {\n\t\tif (typeof propertyId === \"undefined\") {\n\t\t\treturn null;\n\t\t}\n\t\tconst state = this.store.getState();\n\t\tlet locState = state.controlStatesReducer[propertyId.name];\n\t\t// in a table return state of parent if set.\n\t\tif (locState && (locState.value === \"hidden\" || locState.value === \"disabled\")) {\n\t\t\treturn locState;\n\t\t}\n\n\t\t// First check for control-level, then column level, and finally cell level property addressing\n\t\tconst colId = typeof propertyId.col !== \"undefined\" ? propertyId.col.toString() : null;\n\t\tconst rowId = typeof propertyId.row !== \"undefined\" ? propertyId.row.toString() : null;\n\t\tif (colId !== null && locState && locState[colId] &&\n\t\t\t\t(typeof locState[colId].value !== \"undefined\" || (locState[colId][rowId] &&\n\t\t\t\t\t(typeof locState[colId][rowId].value !== \"undefined\" ||\n\t\t\t\t\t\ttypeof locState[colId][rowId].values !== \"undefined\")))) {\n\t\t\t// Column level state\n\t\t\tlocState = locState[colId];\n\t\t\tif (rowId !== null && locState && locState[rowId] &&\n\t\t\t\t(typeof locState[rowId].value !== \"undefined\" || typeof locState[rowId].values !== \"undefined\")) {\n\t\t\t\t// Cell level state\n\t\t\t\tlocState = locState[rowId];\n\t\t\t}\n\t\t}\n\t\tif (locState) {\n\t\t\treturn locState;\n\t\t}\n\t\treturn null;\n\t}\n\n\tgetControlStates() {\n\t\tconst state = this.store.getState();\n\t\t// get a copy and not direct reference\n\t\treturn PropertyUtils.copy(state.controlStatesReducer);\n\t}\n\n\tsetControlStates(values) {\n\t\t// check to see if values are equal before firing event\n\t\tif (!isEqual(this.getControlStates(), values)) {\n\t\t\tthis.store.dispatch(setControlStates(values));\n\t\t}\n\t}\n\n\tupdateControlState(propertyId, value) {\n\t\tthis.store.dispatch(updateControlState({ propertyId: propertyId, value: value }));\n\t}\n\n\tgetPanelState(panelId) {\n\t\tif (typeof panelId === \"undefined\") {\n\t\t\treturn null;\n\t\t}\n\t\tconst state = this.store.getState();\n\t\tconst locState = state.panelStatesReducer[panelId.name];\n\t\tif (locState && locState.value) {\n\t\t\treturn locState.value;\n\t\t}\n\t\treturn null;\n\t}\n\tgetPanelStates() {\n\t\tconst state = this.store.getState();\n\t\t// get a copy and not direct reference\n\t\treturn PropertyUtils.copy(state.panelStatesReducer);\n\t}\n\tsetPanelStates(values) {\n\t\t// check to see if values are equal before firing event\n\t\tif (!isEqual(this.getPanelStates(), values)) {\n\t\t\tthis.store.dispatch(setPanelStates(values));\n\t\t}\n\t}\n\tupdatePanelState(panelId, value) {\n\t\tthis.store.dispatch(updatePanelState({ panelId: panelId, value: value }));\n\t}\n\n\tgetActionState(actionId) {\n\t\tif (typeof actionId === \"undefined\") {\n\t\t\treturn null;\n\t\t}\n\t\tconst state = this.store.getState();\n\t\tconst locState = state.actionStatesReducer[actionId.name];\n\t\tif (locState && locState.value) {\n\t\t\treturn locState.value;\n\t\t}\n\t\treturn null;\n\t}\n\tgetActionStates() {\n\t\tconst state = this.store.getState();\n\t\t// get a copy and not direct reference\n\t\treturn PropertyUtils.copy(state.actionStatesReducer);\n\t}\n\tsetActionStates(values) {\n\t\t// check to see if values are equal before firing event\n\t\tif (!isEqual(this.getActionStates(), values)) {\n\t\t\tthis.store.dispatch(setActionStates(values));\n\t\t}\n\t}\n\tupdateActionState(actionId, value) {\n\t\tthis.store.dispatch(updateActionState({ actionId: actionId, value: value }));\n\t}\n\n\tsetSaveButtonDisable(disableState) {\n\t\tthis.store.dispatch(setSaveButtonDisable(disableState));\n\t}\n\n\tgetSaveButtonDisable() {\n\t\tconst state = this.store.getState();\n\t\treturn state.saveButtonDisableReducer.disable;\n\t}\n\n\tsetWideFlyoutPrimaryButtonDisabled(panelId, disableState) {\n\t\tthis.store.dispatch(setWideFlyoutPrimaryButtonDisabled({ panelId: panelId, disableState: disableState }));\n\t}\n\n\tgetWideFlyoutPrimaryButtonDisabled(panelId) {\n\t\tif (typeof panelId === \"undefined\") {\n\t\t\treturn null;\n\t\t}\n\t\tconst state = this.store.getState();\n\t\tconst disablePrimaryButtonForPanel = state.wideFlyoutPrimaryButtonDisableReducer[panelId.name];\n\t\tif (typeof disablePrimaryButtonForPanel !== \"undefined\") {\n\t\t\treturn disablePrimaryButtonForPanel;\n\t\t}\n\t\treturn null;\n\t}\n\n\t/*\n\t* Retrieves filtered enumeration values for the given propertyId.\n\t*/\n\tgetFilteredEnumItems(propertyId) {\n\t\tif (typeof propertyId === \"undefined\") {\n\t\t\treturn null;\n\t\t}\n\t\t// First check for control-level, then column level, and finally cell level property addressing\n\t\tconst state = this.store.getState();\n\t\tlet locState = state.controlStatesReducer[propertyId.name];\n\t\tif (typeof propertyId.col !== \"undefined\" && locState && locState[propertyId.col.toString()]) {\n\t\t\t// Column level filtering\n\t\t\tlocState = locState[propertyId.col.toString()];\n\t\t\tif (typeof propertyId.row !== \"undefined\" && locState[propertyId.row.toString()]) {\n\t\t\t\t// Cell level filtering\n\t\t\t\tlocState = locState[propertyId.row.toString()];\n\t\t\t}\n\t\t}\n\t\tif (locState) {\n\t\t\treturn locState.enumFilter;\n\t\t}\n\t\treturn null;\n\t}\n\n\t/*\n\t* Returns the message for a propertyId. Iterates over row and cell level messages\n\t* and returns an error message summary for all cell level errors.\n\t*/\n\tgetErrorMessage(propertyId, intl) {\n\t\tif (typeof propertyId === \"undefined\") {\n\t\t\treturn null;\n\t\t}\n\t\tconst state = this.store.getState();\n\t\tlet controlMsg = state.errorMessagesReducer[propertyId.name];\n\t\tif (typeof propertyId.row !== \"undefined\" && controlMsg) {\n\t\t\tcontrolMsg = controlMsg[propertyId.row.toString()];\n\t\t\tif (typeof propertyId.col !== \"undefined\" && controlMsg) {\n\t\t\t\treturn controlMsg[propertyId.col.toString()]; // return cell message\n\t\t\t}\n\t\t\tif (controlMsg && controlMsg.text) {\n\t\t\t\treturn controlMsg;\n\t\t\t}\n\t\t}\n\t\tlet controlMessage = null;\n\t\tlet returnMessage = null;\n\t\tif (controlMsg && controlMsg.text) { // save the control level message\n\t\t\tcontrolMessage = controlMsg;\n\t\t}\n\t\tif (controlMsg) {\n\t\t\tconst clonedControlMsg = cloneDeep(controlMsg); // Prevent modifying state directly\n\t\t\treturnMessage = this._getTableCellErrors(clonedControlMsg, intl);\n\t\t}\n\t\tif (controlMessage !== null && returnMessage !== null) {\n\t\t\tcontrolMessage.text = controlMessage.text + \" \" + returnMessage.text;\n\t\t} else if (controlMessage === null) {\n\t\t\tcontrolMessage = returnMessage;\n\t\t}\n\t\treturn controlMessage;\n\t}\n\n\t// get the table cell level error messages. if more than one cell is in error, return summary message;\n\t_getTableCellErrors(controlMsg, intl) {\n\t\tlet returnMessage = null;\n\t\tlet errorMsgCount = 0;\n\t\tlet warningMsgCount = 0;\n\t\t// search message for param and return first error message found, else first warning\n\t\tfor (const rowKey in controlMsg) {\n\t\t\tif (!has(controlMsg, rowKey)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (rowKey === \"text\") {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst rowMessage = controlMsg[rowKey];\n\t\t\tif (rowMessage && rowMessage.text) {\n\t\t\t\treturnMessage = rowMessage;\n\t\t\t\terrorMsgCount += (rowMessage.type === CONDITION_MESSAGE_TYPE.ERROR) ? 1 : 0;\n\t\t\t\twarningMsgCount += (rowMessage.type === CONDITION_MESSAGE_TYPE.WARNING) ? 1 : 0;\n\t\t\t}\n\t\t\tif (rowMessage) { // table cell\n\t\t\t\tfor (const colKey in rowMessage) {\n\t\t\t\t\tif (!has(rowMessage, colKey)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (colKey === \"text\") {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tconst colMessage = rowMessage[colKey];\n\t\t\t\t\tif (colMessage && colMessage.text) {\n\t\t\t\t\t\treturnMessage = colMessage;\n\t\t\t\t\t\terrorMsgCount += (colMessage.type === CONDITION_MESSAGE_TYPE.ERROR) ? 1 : 0;\n\t\t\t\t\t\twarningMsgCount += (colMessage.type === CONDITION_MESSAGE_TYPE.WARNING) ? 1 : 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ((errorMsgCount + warningMsgCount) !== 1 && returnMessage) {\n\t\t\treturnMessage.type = (errorMsgCount > 0) ? CONDITION_MESSAGE_TYPE.ERROR : CONDITION_MESSAGE_TYPE.WARNING;\n\t\t\treturnMessage.text = (errorMsgCount > 0)\n\t\t\t\t? PropertyUtils.formatMessage(intl,\n\t\t\t\t\tMESSAGE_KEYS.TABLE_SUMMARY_ERROR, { errorMsgCount: errorMsgCount })\n\t\t\t\t: \"\";\n\t\t\treturnMessage.text += (warningMsgCount > 0)\n\t\t\t\t? PropertyUtils.formatMessage(intl,\n\t\t\t\t\tMESSAGE_KEYS.TABLE_SUMMARY_WARNING, { warningMsgCount: warningMsgCount })\n\t\t\t\t: \"\";\n\t\t}\n\t\treturn returnMessage;\n\t}\n\n\tgetErrorMessages() {\n\t\tconst state = this.store.getState();\n\t\treturn PropertyUtils.copy(state.errorMessagesReducer);\n\t}\n\tsetErrorMessages(values) {\n\t\t// check to see if values are equal before firing event\n\t\tif (!isEqual(this.getErrorMessages(), values)) {\n\t\t\tthis.store.dispatch(setErrorMessages(values));\n\t\t}\n\t}\n\tupdateErrorMessage(propertyId, value) {\n\t\tif (!isEqual(this.getErrorMessage(propertyId), value)) {\n\t\t\tthis.store.dispatch(updateErrorMessage({ propertyId: propertyId, value: value }));\n\t\t}\n\t}\n\tclearErrorMessage(propertyId) {\n\t\tif (this.getErrorMessage(propertyId) !== null) {\n\t\t\tthis.store.dispatch(clearErrorMessage({ propertyId: propertyId }));\n\t\t}\n\t}\n\n\t/*\n\t* DataModel methods\n\t*/\n\tsetDatasetMetadata(datasetMetadata) {\n\t\tthis.store.dispatch(setDatasetMetadata(datasetMetadata));\n\t}\n\tgetDatasetMetadata() {\n\t\tconst state = this.store.getState();\n\t\treturn state.datasetMetadataReducer;\n\t}\n\n\t/*\n\t* Row Selection Methods\n\t*/\n\tgetSelectedRows(propertyId) {\n\t\tif (typeof propertyId === \"undefined\") {\n\t\t\treturn [];\n\t\t}\n\t\tconst state = this.store.getState();\n\t\tlet rowSelections = state.rowSelectionsReducer[propertyId.name];\n\t\tif (Number.isInteger(propertyId.row) && rowSelections) {\n\t\t\trowSelections = rowSelections[String(propertyId.row)]; // row selection\n\t\t\tif (Number.isInteger(propertyId.col) && rowSelections) {\n\t\t\t\trowSelections = rowSelections[String(propertyId.col)]; // cell selection\n\t\t\t}\n\t\t}\n\t\treturn rowSelections && rowSelections.selectedRows ? rowSelections.selectedRows : [];\n\t}\n\n\tupdateSelectedRows(propertyId, selection) {\n\t\tthis.store.dispatch(updateSelectedRows({ propertyId: propertyId, selectedRows: selection }));\n\t}\n\n\tclearSelectedRows(propertyId) {\n\t\tthis.store.dispatch(clearSelectedRows({ propertyId: propertyId }));\n\t}\n\n\tgetStaticRows(propertyId) {\n\t\tif (typeof propertyId === \"undefined\") {\n\t\t\treturn [];\n\t\t}\n\t\tconst state = this.store.getState();\n\t\tlet rowStatic = state.rowFreezeReducer[propertyId.name];\n\t\tif (Number.isInteger(propertyId.row) && rowStatic) {\n\t\t\trowStatic = rowStatic[String(propertyId.row)]; // row selection\n\t\t\tif (Number.isInteger(propertyId.col) && rowStatic) {\n\t\t\t\trowStatic = rowStatic[String(propertyId.col)]; // cell selection\n\t\t\t}\n\t\t}\n\t\treturn rowStatic && rowStatic.staticRows ? rowStatic.staticRows : [];\n\t}\n\n\tupdateStaticRows(propertyId, staticRows) {\n\t\tthis.store.dispatch(updateStaticRows({ propertyId: propertyId, staticRows: staticRows }));\n\t}\n\n\tclearStaticRows(propertyId) {\n\t\tthis.store.dispatch(clearStaticRows({ propertyId: propertyId }));\n\t}\n\n\t/**\n\t * Disable table row move buttons for all propertyIds in given array\n\t * @param propertyIds Array of propertyIds\n\t */\n\tsetDisableRowMoveButtons(propertyIds) {\n\t\tthis.store.dispatch(disableRowMoveButtons(propertyIds));\n\t}\n\n\tgetDisableRowMoveButtons() {\n\t\tconst state = this.store.getState();\n\t\treturn state.disableRowMoveButtonsReducer.propertyIds;\n\t}\n\n\tsetTitle(title) {\n\t\tthis.store.dispatch(setTitle(title));\n\t}\n\n\tgetTitle() {\n\t\tconst state = this.store.getState();\n\t\treturn state.componentMetadataReducer.title;\n\t}\n\n\tsetActiveTab(activeTab) {\n\t\tthis.store.dispatch(setActiveTab(activeTab));\n\t}\n\n\tgetActiveTab() {\n\t\tconst state = this.store.getState();\n\t\treturn state.componentMetadataReducer.activeTab;\n\t}\n\n\t/**\n\t* Set the addRemoveRows attribute to 'enabled' for the given propertyId\n\t* @param propertyId The unique property identifier\n\t* @param enabled boolean value to enable or disable addRemoveRows\n\t*/\n\tsetAddRemoveRows(propertyId, enabled) {\n\t\tthis.store.dispatch(setAddRemoveRows({ propertyId: propertyId, value: enabled }));\n\t}\n\n\t/**\n\t* Returns true if addRemoveRows is enabled for the given propertyID\n\t* @param propertyId The unique property identifier\n\t* @return boolean\n\t*/\n\tgetAddRemoveRows(propertyId) {\n\t\tconst state = this.store.getState();\n\t\tconst defaultValue = true; // Default to true to show the addRemoveRows buttons\n\t\tif (state.propertiesSettingsReducer[propertyId.name]) {\n\t\t\tif (typeof propertyId.row !== \"undefined\") {\n\t\t\t\treturn getNestedPropertySetting(propertyId, state.propertiesSettingsReducer[propertyId.name], \"addRemoveRows\", defaultValue);\n\t\t\t}\n\t\t\treturn state.propertiesSettingsReducer[propertyId.name].addRemoveRows;\n\t\t}\n\t\treturn defaultValue;\n\t}\n\n\tsetTableButtonEnabled(propertyId, buttonId, enabled) {\n\t\tthis.store.dispatch(setTableButtonEnabled({ propertyId: propertyId, buttonId: buttonId, value: enabled }));\n\t}\n\n\tgetTableButtons(propertyId) {\n\t\tconst state = this.store.getState();\n\t\tconst defaultValue = {};\n\t\tif (state.propertiesSettingsReducer[propertyId.name]) {\n\t\t\tif (typeof propertyId.row !== \"undefined\") {\n\t\t\t\treturn getNestedPropertySetting(propertyId, state.propertiesSettingsReducer[propertyId.name], \"tableButtons\", defaultValue);\n\t\t\t}\n\t\t\treturn state.propertiesSettingsReducer[propertyId.name].tableButtons || defaultValue;\n\t\t}\n\t\treturn defaultValue;\n\t}\n\n\tgetTableButtonEnabled(propertyId, buttonId) {\n\t\tconst state = this.store.getState();\n\t\tconst defaultValue = false; // Disable button by default\n\t\tif (state.propertiesSettingsReducer[propertyId.name]) {\n\t\t\tif (typeof propertyId.row !== \"undefined\") {\n\t\t\t\treturn getNestedPropertySetting(propertyId, state.propertiesSettingsReducer[propertyId.name], `tableButtons.${buttonId}`, defaultValue);\n\t\t\t}\n\t\t\treturn state.propertiesSettingsReducer[propertyId.name].tableButtons[buttonId];\n\t\t}\n\t\treturn defaultValue;\n\t}\n\n\t/**\n\t* Set the hideEditButton attribute to 'true' for the given propertyId\n\t* @param propertyId The unique property identifier\n\t* @param enabled boolean value for disable or enable edit button by state hideEditButton\n\t*/\n\tsetHideEditButton(propertyId, enabled) {\n\t\tthis.store.dispatch(setHideEditButton({ propertyId: propertyId, value: enabled }));\n\t}\n\n\t/**\n\t* Returns true if hideEditButton is true for the given propertyID\n\t* @param propertyId The unique property identifier\n\t* @return boolean\n\t*/\n\tgetHideEditButton(propertyId) {\n\t\tconst state = this.store.getState();\n\t\tconst defaultValue = false; // Default to false to show disable edit buttons\n\t\tif (state.propertiesSettingsReducer[propertyId.name]) {\n\t\t\tif (typeof propertyId.row !== \"undefined\") {\n\t\t\t\treturn getNestedPropertySetting(propertyId, state.propertiesSettingsReducer[propertyId.name], \"hideEditButton\", defaultValue);\n\t\t\t}\n\t\t\treturn state.propertiesSettingsReducer[propertyId.name].hideEditButton;\n\t\t}\n\t\treturn defaultValue;\n\t}\n\n\tsetActiveTearsheetId(tearsheetId) {\n\t\tthis.store.dispatch(setTearsheetState({ tearsheetId: tearsheetId }));\n\t}\n\n\tgetActiveTearsheetId() {\n\t\tconst state = this.store.getState();\n\t\tconst tearsheetId = state.tearsheetStatesReducer.tearsheetId;\n\t\tif (typeof tearsheetId !== \"undefined\") {\n\t\t\treturn tearsheetId;\n\t\t}\n\t\treturn null;\n\t}\n}\n\nfunction getNestedPropertySetting(propertyId, state, setting, defaultValue) {\n\tif (typeof propertyId.row !== \"undefined\" && state[propertyId.row]) {\n\t\tif (typeof propertyId.col !== \"undefined\" && state[propertyId.row][propertyId.col]) {\n\t\t\tif (typeof propertyId.propertyId !== \"undefined\") {\n\t\t\t\treturn getNestedPropertySetting(propertyId.propertyId, state[propertyId.row][propertyId.col], setting, defaultValue);\n\t\t\t}\n\t\t\treturn get(state[propertyId.row][propertyId.col], setting);\n\t\t} else if (typeof propertyId.propertyId !== \"undefined\") { // nested structureeditor\n\t\t\treturn getNestedPropertySetting(propertyId.propertyId, state[propertyId.row], setting, defaultValue);\n\t\t}\n\t\treturn get(state[propertyId.row], setting);\n\t}\n\treturn defaultValue;\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport logger from \"../../../utils/logger\";\nimport { ItemType, PanelType } from \"../constants/form-constants\";\n\n\nfunction parseInput(definition) {\n\tvar data = definition;\n\tif (data.evaluate) {\n\t\tvar paramsList = [];\n\t\tif (data.parameter_refs) {\n\t\t\tevaluate(data.evaluate, paramsList, data.parameter_refs);\n\t\t} else {\n\t\t\tevaluate(data.evaluate, paramsList, data.parameter_ref);\n\t\t}\n\t\t// remove duplicates in paramsList array\n\t\tvar uniqueList = Array.from(new Set(paramsList));\n\t\tif (uniqueList.length > 1) {\n\t\t\treturn uniqueList;\n\t\t}\n\t\t// return single control; this will never be an empty list\n\t\tvar controlName = uniqueList[0];\n\t\treturn controlName;\n\t}\n\tthrow new Error(\"Invalid validation schema\");\n}\n\n\n/**\n * Evaluate Definition\n */\nfunction evaluate(data, paramsList, defaultParameter) {\n\tif (data.or) {\n\t\tor(data.or, paramsList, defaultParameter);\n\t} else if (data.and) {\n\t\tand(data.and, paramsList, defaultParameter);\n\t} else if (data.condition) { // condition\n\t\tcondition(data.condition, paramsList, defaultParameter);\n\t} else {\n\t\tthrow new Error(\"Failed to parse definition\");\n\t}\n}\n\n/**\n * The 'or' condition.\n */\nfunction or(data, paramsList, defaultParameter) {\n\tfor (let i = 0; i < data.length; i++) {\n\t\tevaluate(data[i], paramsList, defaultParameter);\n\t}\n}\n\n/**\n * The 'and' condition. All sub-conditions evaluate to true.\n * Can nest any number of additional conditional types.\n * @param {Object} data an array of items\n * @return {boolean}\n */\nfunction and(data, paramsList, defaultParameter) {\n\tfor (let i = 0; i < data.length; i++) {\n\t\tevaluate(data[i], paramsList, defaultParameter);\n\t}\n}\n\n/**\n * A parameter condition.\n */\nfunction condition(data, paramsList, defaultParameter) {\n\tif (data.parameter_ref) {\n\t\tparamsList.push(data.parameter_ref);\n\t\tif (data.parameter_2_ref) {\n\t\t\tparamsList.push(data.parameter_2_ref);\n\t\t}\n\t} else {\n\t\t// needed for filtering of dm fields\n\t\tparamsList.push(defaultParameter);\n\t}\n}\n\n// Parse the set of Controls from the form data\nfunction parseControls(controls, actions, formData) {\n\tif (formData.uiItems) {\n\t\tfor (const uiItem of formData.uiItems) {\n\t\t\tparseUiItem(controls, actions, uiItem);\n\t\t}\n\t}\n}\n\nfunction parseControl(controls, control, parentCategoryId) {\n\tif (control.label) {\n\t\tcontrol.summaryLabel = control.label.text;\n\t}\n\tif (parentCategoryId) {\n\t\tcontrol.parentCategoryId = parentCategoryId;\n\t}\n\tcontrols.push(control);\n\tif (control.subControls) {\n\t\tfor (let idx = 0; idx < control.subControls.length; idx++) {\n\t\t\tconst subControl = control.subControls[idx];\n\t\t\tsubControl.parameterName = control.name;\n\t\t\tsubControl.columnIndex = idx;\n\t\t\tif (parentCategoryId) {\n\t\t\t\tsubControl.parentCategoryId = parentCategoryId;\n\t\t\t}\n\t\t\tcontrols.push(subControl);\n\t\t}\n\t}\n}\n\nfunction parseUiItem(controls, actions, uiItem, panelId, parentCategoryId) {\n\tswitch (uiItem.itemType) {\n\tcase ItemType.CONTROL: {\n\t\tconst control = uiItem.control;\n\t\tif (panelId) {\n\t\t\tcontrol.summaryPanelId = panelId;\n\t\t}\n\t\tif (parentCategoryId) {\n\t\t\tcontrol.parentCategoryId = parentCategoryId;\n\t\t}\n\t\tparseControl(controls, control, parentCategoryId);\n\t\t// If some panels from a Selector Panel have been inserted in a\n\t\t// radio set control the control will have additionalItems which need\n\t\t// to be parsed.\n\t\tif (uiItem.additionalItems) {\n\t\t\tfor (const additionalItem of uiItem.additionalItems) {\n\t\t\t\tparseUiItem(controls, actions, additionalItem.content, panelId, parentCategoryId);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\tcase ItemType.ADDITIONAL_LINK:\n\tcase ItemType.CHECKBOX_SELECTOR:\n\tcase ItemType.TEARSHEET:\n\tcase ItemType.PANEL: {\n\t\tif (uiItem.panel && uiItem.panel.uiItems) {\n\t\t\tlet locPanelId = panelId;\n\t\t\tif (uiItem.panel.panelType === PanelType.SUMMARY) {\n\t\t\t\tlocPanelId = uiItem.panel.id;\n\t\t\t}\n\t\t\tfor (const panelUiItem of uiItem.panel.uiItems) {\n\t\t\t\tparseUiItem(controls, actions, panelUiItem, locPanelId, parentCategoryId);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\tcase ItemType.PRIMARY_TABS:\n\tcase ItemType.PANEL_SELECTOR:\n\tcase ItemType.SUB_TABS: {\n\t\tif (uiItem.tabs) {\n\t\t\tfor (const tab of uiItem.tabs) {\n\t\t\t\tparseUiItem(controls, actions, tab.content, panelId,\n\t\t\t\t\tuiItem.itemType === ItemType.PANEL_SELECTOR || uiItem.itemType === ItemType.SUB_TABS\n\t\t\t\t\t\t? parentCategoryId\n\t\t\t\t\t\t: tab.group);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\tcase ItemType.CUSTOM_PANEL:\n\t\tif (uiItem.panel && uiItem.panel.parameters) {\n\t\t\tfor (const param of uiItem.panel.parameters) {\n\t\t\t\tconst control = {\n\t\t\t\t\tname: param,\n\t\t\t\t\tcontrolType: \"custom\"\n\t\t\t\t};\n\t\t\t\tif (panelId) {\n\t\t\t\t\tcontrol.summaryPanelId = panelId;\n\t\t\t\t}\n\t\t\t\tif (parentCategoryId) {\n\t\t\t\t\tcontrol.parentCategoryId = parentCategoryId;\n\t\t\t\t}\n\t\t\t\tcontrols.push(control);\n\t\t\t}\n\t\t}\n\t\tbreak; // required parameters are handled by panel\n\tcase ItemType.ACTION:\n\t\tif (uiItem.action && uiItem.action.name) {\n\t\t\tactions[uiItem.action.name] = uiItem.action;\n\t\t}\n\t\tbreak;\n\tcase ItemType.STATIC_TEXT:\n\tcase ItemType.TEXT_PANEL:\n\tcase ItemType.HORIZONTAL_SEPARATOR: {\n\t\tbreak;\n\t}\n\tdefault:\n\t\tlogger.warn(\"Unknown UiItem type when parsing ui conditions: \" + uiItem.itemType);\n\t\tbreak;\n\n\t}\n\treturn controls;\n\n}\n\n// Parse the condition section of the form data\nfunction parseConditions(container, uiCondition, conditionType) {\n\ttry {\n\t\tvar controls = parseInput(uiCondition[conditionType]);\n\t\tvar groupDef = {\n\t\t\t\"params\": controls,\n\t\t\t\"definition\": uiCondition\n\t\t};\n\t\t_setDefinitions(container.controls, controls, groupDef);\n\t\tlet refs = uiCondition[conditionType].parameter_refs;\n\t\tif (uiCondition[conditionType].group_refs) {\n\t\t\trefs = uiCondition[conditionType].group_refs;\n\t\t} else if (uiCondition[conditionType].action_refs) {\n\t\t\trefs = uiCondition[conditionType].action_refs;\n\t\t} else if (uiCondition[conditionType].target && uiCondition[conditionType].target.parameter_ref) {\n\t\t\trefs = [uiCondition[conditionType].target.parameter_ref];\n\t\t}\n\t\tif (refs) {\n\t\t\t_setDefinitions(container.refs, refs, groupDef);\n\t\t}\n\t} catch (error) { // invalid\n\t\tlogger.info(\"Error parsing ui conditions: \" + error);\n\t}\n\treturn container;\n}\n\nfunction _setDefinitions(container, controls, groupDef) {\n\tif (Array.isArray(controls) === true) {\n\t\tfor (let j = 0; j < controls.length; j++) {\n\t\t\tif (typeof container[controls[j]] === \"undefined\") {\n\t\t\t\tcontainer[controls[j]] = [];\n\t\t\t}\n\t\t\tcontainer[controls[j]].push(groupDef);\n\t\t}\n\t} else { // single control\n\t\tif (typeof container[controls] === \"undefined\") {\n\t\t\tcontainer[controls] = [];\n\t\t}\n\t\tcontainer[controls].push(groupDef);\n\t}\n}\n\nexport {\n\tparseInput,\n\tparseControls,\n\tparseConditions,\n\tparseControl\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport logger from \"../../../../utils/logger\";\nimport { L10nProvider, ResourceDef } from \"../../util/L10nProvider\";\nimport { cloneDeep, propertyOf } from \"lodash\";\n\nfunction setExpressionInfo(inExpressionInfo) {\n\tconst expressionFunctionInfo = {};\n\tif (inExpressionInfo && inExpressionInfo.functions) {\n\t\tconst l10nProvider = new L10nProvider(propertyOf(inExpressionInfo)(\"resources\"));\n\t\tconst expressionInfo = cloneDeep(inExpressionInfo.functions);\n\t\tif (Array.isArray(expressionInfo.function_info) && Array.isArray(expressionInfo.function_categories)) {\n\t\t\t// build up the visible function labels from the input label and the parameter information.\n\t\t\tconst functionInfoList = expressionInfo.parmsSet ? expressionInfo.function_info : _genFunctionParameters(expressionInfo.function_info, l10nProvider);\n\t\t\texpressionInfo.parmsSet = true;\n\n\t\t\t// build up the categories for the functions and associate the category with the function info detail.\n\t\t\texpressionFunctionInfo.functionCategories = [];\n\t\t\texpressionInfo.function_categories.forEach((category) => {\n\t\t\t\texpressionFunctionInfo.functionCategories[category.id] = {};\n\t\t\t\texpressionFunctionInfo.functionCategories[category.id].locLabel = l10nProvider.l10nLabel(category, category.id);\n\t\t\t\texpressionFunctionInfo.functionCategories[category.id].functionList = [];\n\t\t\t\tcategory.function_refs.forEach((functionId) => {\n\t\t\t\t\tconst functionInfo = _getFunctionInfo(functionId, functionInfoList);\n\t\t\t\t\tif (functionInfo) {\n\t\t\t\t\t\texpressionFunctionInfo.functionCategories[category.id].functionList.push(functionInfo);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t// build up the operator buttons list with the operator function info detail.\n\t\t\texpressionFunctionInfo.operators = [];\n\t\t\tif (expressionInfo.operator_refs) {\n\t\t\t\texpressionInfo.operator_refs.forEach((functionId) => {\n\t\t\t\t\tconst functionInfo = _getFunctionInfo(functionId, functionInfoList);\n\t\t\t\t\tif (functionInfo) {\n\t\t\t\t\t\texpressionFunctionInfo.operators.push(functionInfo);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\texpressionFunctionInfo.fields = { \"field_categories\": [], \"field_table_info\": [] };\n\t\t\tif (inExpressionInfo.fields) {\n\t\t\t\tif (inExpressionInfo.fields.field_categories) {\n\t\t\t\t\tinExpressionInfo.fields.field_categories.forEach((fieldCat) => {\n\t\t\t\t\t\tfieldCat.locLabel = l10nProvider.l10nLabel(fieldCat, fieldCat.id);\n\t\t\t\t\t\tfieldCat.field_columns.field_column_info.locLabel = l10nProvider.l10nLabel(fieldCat.field_columns.field_column_info, fieldCat.id + \".field_column_info\");\n\t\t\t\t\t\tfieldCat.field_columns.value_column_info.locLabel = l10nProvider.l10nLabel(fieldCat.field_columns.value_column_info, fieldCat.id + \".value_column_info\");\n\n\t\t\t\t\t\tconst fieldColInfoDesc = l10nProvider.l10nDesc(fieldCat.field_columns.field_column_info, fieldCat.id + \".field_column_info\");\n\t\t\t\t\t\tif (fieldColInfoDesc !== fieldCat.id + \".field_column_info\") {\n\t\t\t\t\t\t\tfieldCat.field_columns.field_column_info.descLabel = fieldColInfoDesc;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst valueColInfoDesc = l10nProvider.l10nDesc(fieldCat.field_columns.value_column_info, fieldCat.id + \".value_column_info\");\n\t\t\t\t\t\tif (valueColInfoDesc !== fieldCat.id + \".value_column_info\") {\n\t\t\t\t\t\t\tfieldCat.field_columns.value_column_info.descLabel = valueColInfoDesc;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (fieldCat.field_columns.additional_column_info) {\n\t\t\t\t\t\t\tfieldCat.field_columns.additional_column_info.forEach((col) => {\n\t\t\t\t\t\t\t\tcol.locLabel = l10nProvider.l10nLabel(col, fieldCat.id + \".additional_column_info.\" + col.id);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\texpressionFunctionInfo.fields.field_categories.push(fieldCat);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (inExpressionInfo.fields.field_table_info) {\n\t\t\t\t\tinExpressionInfo.fields.field_table_info.forEach((fieldInfo) => {\n\t\t\t\t\t\texpressionFunctionInfo.fields.field_table_info.push(fieldInfo);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (inExpressionInfo && inExpressionInfo.resources) {\n\t\texpressionFunctionInfo.resources = inExpressionInfo.resources;\n\t}\n\n\treturn expressionFunctionInfo;\n}\n\n// build up the visible function labels from the label and the parameter information.\nfunction _genFunctionParameters(functionInfoList, l10nProvider) {\n\treturn functionInfoList.map((functionInfo) => {\n\t\tconst newEntry = functionInfo;\n\t\tnewEntry.locLabel = l10nProvider.l10nLabel(newEntry, newEntry.id);\n\t\tnewEntry.help = l10nProvider.l10nDesc(newEntry, newEntry.locLabel);\n\t\tnewEntry.value = newEntry.locLabel;\n\t\t// Translatable return type of function\n\t\tif (newEntry.return_type_label) {\n\t\t\tconst returnTypeLabel = ResourceDef.make(newEntry.return_type_label);\n\t\t\tnewEntry.locReturnType = l10nProvider.l10nResource(returnTypeLabel);\n\t\t}\n\t\tif (Array.isArray(functionInfo.parameters)) {\n\t\t\t// if the function label has any parameter substituion char '?' then replace with parameter label\n\t\t\tif (newEntry.locLabel && newEntry.locLabel.indexOf(\"?\") !== -1) {\n\t\t\t\tfunctionInfo.parameters.forEach((parameter) => {\n\t\t\t\t\tconst paramIndex = newEntry.locLabel.indexOf(\"?\");\n\t\t\t\t\tif (paramIndex !== -1) {\n\t\t\t\t\t\tnewEntry.locLabel = newEntry.locLabel.replace(\"?\", \" \" + l10nProvider.l10nLabel(parameter, parameter.id) + \" \");\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t// build up function label as a function call with parameters.\n\t\t\t\tnewEntry.value += \"(\";\n\t\t\t\tnewEntry.locLabel += \"(\";\n\t\t\t\tfunctionInfo.parameters.forEach((parameter, index) => {\n\t\t\t\t\tconst separator = (index > 0) ? \", \" : \"\";\n\t\t\t\t\tnewEntry.locLabel += separator + l10nProvider.l10nLabel(parameter, parameter.id);\n\t\t\t\t\tnewEntry.value += separator + \"?\";\n\t\t\t\t});\n\t\t\t\tnewEntry.locLabel += \")\";\n\t\t\t\tnewEntry.value += \")\";\n\t\t\t}\n\t\t}\n\t\treturn newEntry;\n\t});\n\n}\n\nfunction _getFunctionInfo(functionId, functionInfoList) {\n\tconst functionInfo = functionInfoList.find((functionElem) => functionElem.id === functionId);\n\tif (!functionInfo) {\n\t\tlogger.warn(\"Expression function information list, no function information found for \" + functionId);\n\t\treturn null;\n\t}\n\treturn functionInfo;\n}\n\n\nexport default setExpressionInfo;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { has } from \"lodash\";\n\nimport logger from \"../../../utils/logger\";\nimport { ItemType } from \"../constants/form-constants\";\n\n// Parse the set of panelTree from the form data\nfunction parseUiContent(panelTree, formData, panelTreeRoot) {\n\tif (formData.uiItems) {\n\t\tfor (const uiItem of formData.uiItems) {\n\t\t\tparseUiItem(panelTree, uiItem, panelTreeRoot);\n\t\t}\n\t}\n\treturn panelTree;\n}\n\nfunction parseUiItem(panelTree, uiItem, currentPanel) {\n\tswitch (uiItem.itemType) {\n\tcase ItemType.PRIMARY_TABS:\n\tcase ItemType.SUB_TABS: {\n\t\tif (uiItem.tabs) {\n\t\t\tfor (const tab of uiItem.tabs) {\n\t\t\t\tparseUiItem(panelTree, tab.content, currentPanel);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\tcase ItemType.TEXT_PANEL:\n\tcase ItemType.PANEL:\n\tcase ItemType.CUSTOM_PANEL:\n\tcase ItemType.ADDITIONAL_LINK:\n\tcase ItemType.TEARSHEET:\n\tcase ItemType.CHECKBOX_SELECTOR: {\n\t\tif (uiItem.panel && uiItem.panel.id) {\n\t\t\tpanelTree[currentPanel].panels.push(uiItem.panel.id);\n\t\t\t_newPanelTreeObject(panelTree, uiItem.panel.id);\n\t\t\tif (uiItem.panel.uiItems) {\n\t\t\t\tfor (const panelUiItem of uiItem.panel.uiItems) {\n\t\t\t\t\tparseUiItem(panelTree, panelUiItem, uiItem.panel.id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\tcase ItemType.CONTROL: {\n\t\tpanelTree[currentPanel].controls.push(uiItem.control.name);\n\t\t// a control item may have an action ref associated with it.\n\t\tif (uiItem.control.action) {\n\t\t\tpanelTree[currentPanel].actions.push(uiItem.control.action.name);\n\t\t}\n\t\t// This is a special case for the radio button set which has panels\n\t\t// inserted after each radio button. Those panels are provided in the\n\t\t// additionalItems array which is an array of EditorTab objects.\n\t\tif (uiItem.control.additionalItems) {\n\t\t\tfor (const editorTab of uiItem.control.additionalItems) {\n\t\t\t\tparseUiItem(panelTree, editorTab.content, currentPanel);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\tcase ItemType.PANEL_SELECTOR: {\n\t\tpanelTree[currentPanel].panels.push(uiItem.id);\n\t\t_newPanelTreeObject(panelTree, uiItem.id);\n\t\tif (uiItem.dependsOn) {\n\t\t\tpanelTree[uiItem.id].controls.push(uiItem.dependsOn);\n\t\t}\n\t\tif (uiItem.tabs) {\n\t\t\tfor (const tab of uiItem.tabs) {\n\t\t\t\tparseUiItem(panelTree, tab.content, uiItem.id);\n\t\t\t}\n\t\t}\n\n\t\tbreak;\n\t}\n\n\tcase ItemType.ACTION:\n\t{\n\t\tpanelTree[currentPanel].actions.push(uiItem.action.name);\n\t\tbreak;\n\t}\n\tcase ItemType.STATIC_TEXT:\n\tcase ItemType.HORIZONTAL_SEPARATOR: {\n\t\tbreak;\n\t}\n\tdefault:\n\t\tlogger.warn(\"Unknown UiItem type when parsing ui conditions: \" + uiItem.itemType);\n\t\tbreak;\n\t}\n}\n\nfunction _newPanelTreeObject(panelTree, panelId) {\n\tif (has(panelTree, panelId)) {\n\t\tlogger.warn(\"Duplicate panel ids, each panel id must be unique. Panel id = \" + panelId);\n\t}\n\tpanelTree[panelId] = { controls: [], panels: [], actions: [] };\n}\n\nexport { parseUiContent };\n","var baseFlatten = require('./_baseFlatten'),\n baseRest = require('./_baseRest'),\n baseUniq = require('./_baseUniq'),\n isArrayLikeObject = require('./isArrayLikeObject'),\n last = require('./last');\n\n/**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. Result values are chosen from\n * the first array in which the value occurs. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\nvar unionWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n});\n\nmodule.exports = unionWith;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n arrayMap = require('./_arrayMap'),\n baseUnary = require('./_baseUnary'),\n cacheHas = require('./_cacheHas');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\nfunction baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseIntersection;\n","var isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\nfunction castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n}\n\nmodule.exports = castArrayLikeObject;\n","var arrayMap = require('./_arrayMap'),\n baseIntersection = require('./_baseIntersection'),\n baseRest = require('./_baseRest'),\n castArrayLikeObject = require('./_castArrayLikeObject'),\n last = require('./last');\n\n/**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\nvar intersectionWith = baseRest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n comparator = typeof comparator == 'function' ? comparator : undefined;\n if (comparator) {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n});\n\nmodule.exports = intersectionWith;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* eslint max-depth: [\"error\", 7] */\n\nimport logger from \"./../../../utils/logger\";\nimport { cloneDeep, intersectionWith, unionWith, isEqual } from \"lodash\";\n\n/**\n* @param {Object} definition Condition definition\n* @param {Any} userInput Contains the control value entered by the user\n* @param {Object} fields Optional datasetMetadata fields\n* @param {Object} cellCoordinates Cell coordinates for tables\n*/\n\nfunction validateInput(definition, propertyId, controller) {\n\tconst data = definition;\n\tif (data.validation) {\n\t\treturn validation(data.validation, propertyId, controller);\n\t} else if (data.enabled) {\n\t\treturn enabled(data.enabled, propertyId, controller);\n\t} else if (data.visible) {\n\t\treturn visible(data.visible, propertyId, controller);\n\t} else if (data.enum_filter) {\n\t\treturn filteredEnum(data.enum_filter, propertyId, controller);\n\t} else if (data.allow_change) {\n\t\treturn allowChange(data.allow_change, propertyId, controller);\n\t} else if (data.default_value) {\n\t\treturn conditionalDefault(data.default_value, propertyId, controller);\n\t}\n\tthrow new Error(\"Invalid user input validation definition schema\");\n}\n\n/**\n * A single validation. The fail_message is displayed upon validation failure.\n * @param {Object} validationData contains an object that adheres to the validation_definition\n * @param {Any} userInput Contains the control value entered by the user\n * @param {Object} info optional dataset fields and cell coordinates info\n * @return {boolean} true if valid, failMessage {Object} if false.\n */\nfunction validation(data, propertyId, controller) {\n\tif (data.fail_message && data.evaluate) {\n\t\tconst evaluateData = data.evaluate;\n\t\tevaluateData.isValidation = true;\n\t\tconst result = evaluate(evaluateData, propertyId, controller);\n\t\tif (typeof result === \"object\") {\n\t\t\treturn result;\n\t\t}\n\t\treturn result || failedMessage(data.fail_message);\n\t}\n\tthrow new Error(\"Invalid validation schema\");\n}\n\n/**\n * Enablement test. Disables controls if evaluate is false.\n * @param {Object} enabledData contains an object that adheres to the enabled_definition\n * @return {boolean} true if valid.\n */\nfunction enabled(data, propertyId, controller) {\n\tif ((data.parameter_refs || data.group_refs || data.action_refs) && data.evaluate) {\n\t\treturn evaluate(data.evaluate, propertyId, controller);\n\t}\n\tthrow new Error(\"Invalid enabled schema\");\n}\n\n/**\n * Visibility test. Hides controls if evaluate is false.\n * @param {Object} data contains an object that adheres to the visible_definition\n * @return {boolean} true if valid.\n */\nfunction visible(data, propertyId, controller) {\n\tif ((data.parameter_refs || data.group_refs || data.action_refs) && data.evaluate) {\n\t\treturn evaluate(data.evaluate, propertyId, controller);\n\t}\n\tthrow new Error(\"Invalid visible schema\");\n}\n\n/**\n * Filters fields based on conditions.\n *\n * @param propertyId Id of the control being filtered\n * @param filterDef A filter definition for this item\n * @param controller Properties controller\n * @param fields Fields to filter\n * @return Array of filtered fields\n */\nfunction filter(propertyId, filterDef, controller, fields) {\n\tif (filterDef && filterDef.filter && filterDef.filter.evaluate) {\n\t\treturn evaluateFilter(propertyId, filterDef.filter, filterDef.filter.evaluate, controller, fields);\n\t}\n\treturn fields;\n}\n\nfunction filteredEnum(data, propertyId, controller) {\n\tif (data.target && data.evaluate) {\n\t\treturn evaluate(data.evaluate, propertyId, controller);\n\t}\n\tthrow new Error(\"Invalid filteredEnum schema\");\n}\n\nfunction allowChange(data, propertyId, controller) {\n\tif ((data.parameter_refs || data.group_refs) && data.evaluate) {\n\t\treturn evaluate(data.evaluate, propertyId, controller);\n\t}\n\tthrow new Error(\"Invalid allow change schema\");\n}\n\n/**\n * Set default value for a field if conditions evaluate to true.\n *\n * @param data conditional default definition\n * @param propertyId Id of the control\n * @param controller Properties controller\n * @return {boolean} true if conditions are met.\n */\nfunction conditionalDefault(data, propertyId, controller) {\n\tif (data.parameter_ref && data.value && data.evaluate) {\n\t\treturn evaluate(data.evaluate, propertyId, controller);\n\t}\n\tthrow new Error(\"Invalid conditional default schema\");\n}\n\n/**\n * Evaluate Definition\n */\nfunction evaluate(data, propertyId, controller) {\n\tif (data.or) {\n\t\treturn or(data.or, propertyId, controller);\n\t} else if (data.and) {\n\t\treturn and(data.and, propertyId, controller);\n\t} else if (data.condition) { // condition\n\t\treturn condition(data.condition, propertyId, controller, data.isValidation);\n\t}\n\tthrow new Error(\"Failed to parse definition\");\n}\n\n/**\n * Evaluate Definition.\n */\nfunction evaluateFilter(propertyId, filterItem, conditionItem, controller, fields) {\n\tif (conditionItem.or) {\n\t\treturn orFilter(propertyId, filterItem, conditionItem.or, controller, fields);\n\t} else if (conditionItem.and) {\n\t\treturn andFilter(propertyId, filterItem, conditionItem.and, controller, fields);\n\t} else if (conditionItem.condition) { // condition\n\t\treturn conditionFilter(propertyId, filterItem, conditionItem.condition, controller, fields);\n\t}\n\tthrow new Error(\"Failed to parse filter definition\");\n}\n\n/**\n * The 'or' condition. Any sub-condition evaluates to true.\n * Can nest any number of additional conditional types.\n * @param {Object} data an array of items\n * @param {string} userInput User-entered value to evaluate\n * @param {Object} info optional dataset fields and cell coordinates info\n * @return {boolean}\n */\nfunction or(data, propertyId, controller) {\n\tfor (let i = 0; i < data.length; i++) {\n\t\tconst evaluated = evaluate(data[i], propertyId, controller);\n\t\tif (evaluated === true) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction orFilter(propertyId, filterItem, conditionItems, controller, inFields) {\n\tlet fields = [];\n\tfor (const item of conditionItems) {\n\t\tconst newFields = evaluateFilter(propertyId, filterItem, item, controller, inFields);\n\t\tfields = unionWith(fields, newFields, isEqual);\n\t}\n\treturn fields;\n}\n\n/**\n * The 'and' condition. All sub-conditions evaluate to true.\n * Can nest any number of additional conditional types.\n * @param {Object} data an array of items\n * @param {string} userInput User-entered value to evaluate\n * @param {Object} info optional dataset fields and cell coordinates info\n * @return {boolean}\n */\nfunction and(data, propertyId, controller) {\n\tfor (let i = 0; i < data.length; i++) {\n\t\tconst evaluated = evaluate(data[i], propertyId, controller);\n\t\tif (evaluated === false) {\n\t\t\treturn false;\n\t\t} else if (typeof evaluated === \"object\") {\n\t\t\treturn evaluated;\n\t\t}\n\t}\n\treturn true;\n}\n\nfunction andFilter(propertyId, filterItem, conditionItems, controller, inFields) {\n\tlet fields = cloneDeep(inFields);\n\tfor (const item of conditionItems) {\n\t\tconst newFields = evaluateFilter(propertyId, filterItem, item, controller, fields);\n\t\tfields = intersectionWith(fields, newFields, isEqual);\n\t}\n\treturn fields;\n}\n\n/**\n * A parameter condition. Evaluates to true or false.\n * @param {Object} data.op A single operator for the properties of the condition.\n * @param {Object} data.parameter_ref required parameter the condition checks for\n * @param {Object} data.parameter_2_ref optional parameter the condition checks for\n * @param {Object} data.value optional value the condition checks for\n * @param {Object} info optional dataset fields and cell coordinates info\n * @param {boolean} isValidation optional parameter used to determine type of condition\n * @return {boolean} true if the parameter(s) satisfy the condition\n */\nfunction condition(data, propertyId, controller, isValidation) {\n\tconst op = data.op;\n\tconst param = data.parameter_ref;\n\tconst param2 = data.parameter_2_ref;\n\tconst value = data.value;\n\n\t// get configuration options to determine how properties values are handled in condition logic\n\t// get actual value for input validation (isValidation)\n\tconst options = {};\n\tconst propertiesConfig = controller.getPropertiesConfig();\n\tif (!isValidation && propertiesConfig.conditionDisabledPropertyHandling === \"null\") {\n\t\toptions.filterDisabled = true;\n\t}\n\tif (!isValidation && propertiesConfig.conditionHiddenPropertyHandling === \"null\") {\n\t\toptions.filterHidden = true;\n\t}\n\n\tconst paramInfo = { param: param, id: _getPropertyIdFromParam(propertyId, param) };\n\n\tparamInfo.value = controller.getPropertyValue(paramInfo.id, options, null);\n\tparamInfo.control = controller.getControl(paramInfo.id);\n\n\tif (typeof paramInfo.control === \"undefined\") {\n\t\tlogger.warn(\"Control not found when validating condition for \" + param);\n\t}\n\n\tlet param2Info;\n\n\tif (typeof param2 !== \"undefined\") {\n\t\tparam2Info = {\n\t\t\tparam: param2,\n\t\t\tid: _getPropertyIdFromParam(propertyId, param2),\n\t\t};\n\t\tparam2Info.value = controller.getPropertyValue(param2Info.id, options, null);\n\t\tparam2Info.control = controller.getControl(param2Info.id);\n\t}\n\tconst operation = controller.getConditionOp(op);\n\tif (operation) {\n\t\treturn operation(paramInfo, param2Info, value, controller);\n\t}\n\tlogger.warn(\"Ignoring unknown condition operation '\" + op + \"' for parameter_ref \" + param);\n\treturn true;\n}\n\n/**\n * A filter parameter condition. Evaluates to an array of field names.\n *\n * @param {Object} propertyId Id of the property being operated upon\n * @param {Object} filterItem Top level filter entry for the property\n * @param {Object} conditionItem A single condition to evaluate\n * @param {Object} controller The properties controller\n * @param {Object} fields Array of fields to filter\n * @return {Object} Array of filtered field names\n */\nfunction conditionFilter(propertyId, filterItem, conditionItem, controller, fields) {\n\tconst op = conditionItem.op;\n\tconst values = [];\n\tif (typeof conditionItem.value !== \"undefined\" && conditionItem.value !== null) {\n\t\tvalues.push(conditionItem.value);\n\t} else if (Array.isArray(conditionItem.values)) {\n\t\tvalues.push(...conditionItem.values); // add all values into array\n\t}\n\tswitch (op) {\n\tcase \"dmMeasurement\":\n\t\treturn _handleDmMeasurement(fields, values);\n\tcase \"dmType\":\n\t\treturn _handleDmType(fields, values);\n\tcase \"dmModelingRole\":\n\t\treturn _handleDmModelingRole(fields, values);\n\tcase \"dmSharedFields\":\n\t\treturn _handleSharedFields(propertyId, filterItem, controller, fields);\n\tdefault: {\n\t\tconst operation = controller.getConditionOp(op);\n\t\tif (operation && propertyId.name === filterItem.parameter_ref) { // Custom filter condition\n\t\t\treturn operation(propertyId, conditionItem, controller, fields);\n\t\t}\n\t\tlogger.warn(\"Ignoring unknown condition operation '\" + op + \"'\");\n\t\treturn fields;\n\t}\n\t}\n}\n\nfunction _handleDmMeasurement(inFields, measurementValues) {\n\tlet fields = cloneDeep(inFields);\n\tif (fields) {\n\t\tfields = fields.filter(function(field) {\n\t\t\tfor (const measurementValue of measurementValues) {\n\t\t\t\tif (field.metadata && field.metadata.measure === measurementValue) {\n\t\t\t\t\t// return true of any value meets condition\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t});\n\t}\n\treturn fields;\n}\n\nfunction _handleDmType(inFields, typeValues) {\n\tlet fields = cloneDeep(inFields);\n\tif (fields) {\n\t\tfields = fields.filter(function(field) {\n\t\t\tfor (const typeValue of typeValues) {\n\t\t\t\tif (field.type === typeValue) {\n\t\t\t\t\t// return true of any value meets condition\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t});\n\t}\n\treturn fields;\n}\n\nfunction _handleDmModelingRole(inFields, roleValues) {\n\tlet fields = cloneDeep(inFields);\n\tif (fields) {\n\t\tfields = fields.filter(function(field) {\n\t\t\tfor (const roleValue of roleValues) {\n\t\t\t\tif (field.metadata && field.metadata.modeling_role === roleValue) {\n\t\t\t\t\t// return true of any value meets condition\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t});\n\t}\n\treturn fields;\n}\n\nfunction _handleSharedFields(propertyId, filterItem, controller, fields) {\n\tlet returnFields = fields;\n\tif (filterItem.parameter_refs) {\n\t\treturnFields = controller.filterFieldsFromSharedProps(fields, filterItem.parameter_refs, propertyId.name);\n\t}\n\treturn returnFields;\n}\n\n/**\n *\n * @param {Object} failed message object with \"focus_parameter_ref\" and \"message\"\n * @return {String} failed message\n */\nfunction failedMessage(failedErrorMessage) {\n\tif (failedErrorMessage.focus_parameter_ref && failedErrorMessage.message) {\n\t\treturn {\n\t\t\t\"text\": failedErrorMessage.message.default,\n\t\t\t\"type\": failedErrorMessage.type\n\t\t};\n\t}\n\treturn \"Failed to parse failedMessage\";\n}\n\nfunction _getPropertyIdFromParam(propertyId, param) {\n\tlet paramPropertyID = {};\n\tconst offset = param.indexOf(\"[\");\n\tif (offset > -1) {\n\t\tparamPropertyID = cloneDeep(propertyId);\n\t\tparamPropertyID.name = param.substring(0, offset);\n\t\tparamPropertyID.col = _getColumnNumber(param);\n\t} else {\n\t\tparamPropertyID.name = param;\n\t}\n\treturn paramPropertyID;\n}\n\n// returns -1 if no column specified in parameter\nfunction _getColumnNumber(param) {\n\tconst startCol = param.indexOf(\"[\");\n\tif (startCol > -1) {\n\t\tconst endCol = param.indexOf(\"]\");\n\t\tif (endCol > -1) {\n\t\t\treturn parseInt(param.substring(startCol + 1, endCol), 10);\n\t\t}\n\t\treturn -1;\n\t}\n\treturn -1;\n}\n\nexport {\n\tvalidateInput,\n\tfilter\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/*\teslint max-depth: [\"error\", 10]*/\n\nimport logger from \"../../../utils/logger\";\nimport * as UiConditions from \"./ui-conditions\";\nimport { formatMessage } from \"../util/property-utils\";\nimport { DEFAULT_VALIDATION_MESSAGE, STATES, PANEL_TREE_ROOT,\n\tCONDITION_TYPE, CONDITION_DEFINITION_INDEX,\n\tMESSAGE_KEYS\n} from \"../constants/constants\";\nimport { isEmpty, cloneDeep, has, union, isEqual } from \"lodash\";\nimport seedrandom from \"seedrandom\";\nimport { getDateTimeFormat } from \"../util/control-utils\";\n\n\n// ========= APIs ==================\n// ========= Validate all properties\n\n/**\n* This function will get all controls and validate each properties value.\n*\n* @param {object} properties controller. required\n* @param {boolean} showErrors. optional. Set to false to run conditions without displaying errors in the UI\n*/\nfunction validatePropertiesValues(controller, showErrors = true) {\n\tconst controls = controller.getControls();\n\tvalidatePropertiesListValues(controller, controls, showErrors);\n}\n\n/**\n* This function will get all controls and validate each one for visible,\n* enables and filteredEnum.\n*\n* @param {object} properties controller. required\n*/\nfunction validatePropertiesConditions(controller) {\n\tconst newStates = {\n\t\tcontrols: controller.getControlStates(),\n\t\tpanels: controller.getPanelStates(),\n\t\tactions: controller.getActionStates()\n\t};\n\n\tconst controls = controller.getControls();\n\tvalidatePropertiesListConditions(controller, controls, newStates);\n\t// propagate parent panel states\n\t_propagateParentPanelStates(controller.panelTree, newStates, PANEL_TREE_ROOT);\n\n\t// get property values before any states have been updated\n\tconst prevPropertyValues = _getConditionPropertyValues(controller);\n\n\tcontroller.setControlStates(newStates.controls);\n\tcontroller.setPanelStates(newStates.panels);\n\tcontroller.setActionStates(newStates.actions);\n\t// get property values before any states have been updated\n\tconst newPropertyValues = _getConditionPropertyValues(controller);\n\t// compared values to see if any values change based on state updates\n\tconst updatedPropertyIds = _comparePropertyValues(prevPropertyValues, newPropertyValues);\n\tfor (const updatePropertyId of updatedPropertyIds) {\n\t\tvalidateConditions(updatePropertyId, controller, 1);\n\t}\n}\n\n// ========= Validate a list of properties\n\n/**\n* This function will take a list of controls or properties names\n* and validate each properties value.\n*\n* @param {object} properties controller. required\n* @param {object} list of control objects or properties. required\n* @param {boolean} showErrors. optional. Set to false to run conditions without displaying errors in the UI\n*/\nfunction validatePropertiesListValues(controller, controls, showErrors) {\n\tif (Object.keys(controls).length > 0) {\n\t\tfor (const controlKey in controls) {\n\t\t\tif (!has(controls, controlKey)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst control = controls[controlKey];\n\t\t\t// control is a subcontrol\n\t\t\tif (control.parameterName) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst propertyId = control.name ? { name: control.name } : { name: control };\n\t\t\tvalidateInput(propertyId, controller, showErrors);\n\t\t}\n\t}\n}\n\n/**\n* This function will take a list of controls or properties names\n* and validate each properties for visible, enabled or filteredEnum.\n*\n* @param {object} properties controller. required\n* @param {object} list of control objects or properties. required\n* @param {object} list of states for controls and panels. required\n*/\nfunction validatePropertiesListConditions(controller, controls, newStates) {\n\tif (Object.keys(controls).length > 0) {\n\t\tfor (const controlKey in controls) {\n\t\t\tif (!has(controls, controlKey)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst control = controls[controlKey];\n\t\t\t// control is a subcontrol\n\t\t\tif (control.parameterName) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst propertyId = control.name ? { name: control.name } : { name: control };\n\t\t\tconst controlValue = controller.getPropertyValue(propertyId);\n\t\t\tif (control.subControls) {\n\t\t\t\tif (control.valueDef.isList || control.valueDef.isMap) {\n\t\t\t\t\t// validate the table as a whole\n\t\t\t\t\t_validateConditionsByType(propertyId, newStates, controller);\n\t\t\t\t\t// validate each cell\n\t\t\t\t\tif (Array.isArray(controlValue)) {\n\t\t\t\t\t\tfor (let rowIndex = 0; rowIndex < controlValue.length; rowIndex++) {\n\t\t\t\t\t\t\tfor (let colIndex = 0; colIndex < control.subControls.length; colIndex++) {\n\t\t\t\t\t\t\t\tpropertyId.row = rowIndex;\n\t\t\t\t\t\t\t\tpropertyId.col = colIndex;\n\t\t\t\t\t\t\t\t_validateConditionsByType(propertyId, newStates, controller);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// An 'unrolled' structure not within a table\n\t\t\t\t\tconst subPropId = {\n\t\t\t\t\t\tname: propertyId.name\n\t\t\t\t\t};\n\t\t\t\t\tfor (let colIndex = 0; colIndex < control.subControls.length; colIndex++) {\n\t\t\t\t\t\tsubPropId.col = colIndex;\n\t\t\t\t\t\t_validateConditionsByType(subPropId, newStates, controller);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t_validateConditionsByType(propertyId, newStates, controller);\n\t\t\t}\n\t\t}\n\t}\n}\n\n// ========= Validate a single property\n\n/**\n* This function will validate a single properties value.\n* If the propertyId is a table it will also validate each cell in the table\n*\n* @param {object} propertyId. required\n* @param {object} properties controller. required\n* @param {boolean} showErrors. optional. Set to false to run conditions without displaying errors in the UI\n*/\nfunction validateInput(inPropertyId, controller, showErrors = true) {\n\tconst control = controller.getControl(inPropertyId);\n\tif (!control) {\n\t\tlogger.warn(\"Control not found for \" + inPropertyId.name);\n\t\treturn;\n\t}\n\tconst propertyId = cloneDeep(inPropertyId);\n\tconst controlValue = controller.getPropertyValue(propertyId);\n\tif (Array.isArray(controlValue)) {\n\t// validate the table as a whole\n\t\t_validateInput(propertyId, controller, control, showErrors);\n\t\t// validate each cell\n\t\tif (control.subControls) {\n\t\t\tif (control.valueDef.isList || control.valueDef.isMap) {\n\t\t\t\t// Handle tables\n\t\t\t\tfor (let rowIndex = 0; rowIndex < controlValue.length; rowIndex++) {\n\t\t\t\t\tfor (let colIndex = 0; colIndex < control.subControls.length; colIndex++) {\n\t\t\t\t\t\tpropertyId.row = rowIndex;\n\t\t\t\t\t\tpropertyId.col = colIndex;\n\t\t\t\t\t\t_validateInput(propertyId, controller, control.subControls[colIndex], showErrors);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Handle 'unrolled' structs outside of tables\n\t\t\t\tfor (let colIndex = 0; colIndex < control.subControls.length; colIndex++) {\n\t\t\t\t\tconst subPropId = {\n\t\t\t\t\t\tname: inPropertyId.name,\n\t\t\t\t\t\tcol: colIndex\n\t\t\t\t\t};\n\t\t\t\t\t_validateInput(subPropId, controller, control.subControls[colIndex], showErrors);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (typeof propertyId.row === \"undefined\") { // validate each row in array for controls that are not within a table.\n\t\t\tfor (let rowIndex = 0; rowIndex < controlValue.length; rowIndex++) {\n\t\t\t\tpropertyId.row = rowIndex;\n\t\t\t\tpropertyId.col = 0;\n\t\t\t\t_validateInput(propertyId, controller, control, showErrors);\n\t\t\t}\n\t\t}\n\n\t} else {\n\t\t_validateInput(propertyId, controller, control, showErrors);\n\t}\n}\n\n/**\n* This function will validate a single properties for visible, enabled and\n* filteredEnum.\n*\n* @param {object} propertyId. required\n* @param {object} properties controller. required\n* @param {int} runCount. Used to prevent an infinite loop of rerun conditions\n*/\nfunction validateConditions(inPropertyId, controller, runCount = 0) {\n\tconst control = controller.getControl(inPropertyId);\n\tif (!control) {\n\t\tlogger.warn(\"Control not found for \" + inPropertyId.name);\n\t\treturn;\n\t}\n\tconst newStates = {\n\t\tcontrols: controller.getControlStates(),\n\t\tpanels: controller.getPanelStates(),\n\t\tactions: controller.getActionStates()\n\t};\n\tconst propertyId = cloneDeep(inPropertyId);\n\tconst controlValue = controller.getPropertyValue(propertyId);\n\tif (Array.isArray(controlValue) && control.subControls) {\n\t\tif (!(control.valueDef.isList || control.valueDef.isMap)) {\n\t\t\t// An unrolled structure on a panel (e.g. not a row in a table)\n\t\t\tfor (let colIndex = 0; colIndex < control.subControls.length; colIndex++) {\n\t\t\t\tpropertyId.col = colIndex;\n\t\t\t\t_validateConditionsByType(propertyId, newStates, controller);\n\t\t\t}\n\t\t} else {\n\t\t\t// validate the table as a whole\n\t\t\t_validateConditionsByType(propertyId, newStates, controller);\n\t\t\t// validate each cell\n\t\t\tfor (let rowIndex = 0; rowIndex < controlValue.length; rowIndex++) {\n\t\t\t\tfor (let colIndex = 0; colIndex < control.subControls.length; colIndex++) {\n\t\t\t\t\tpropertyId.row = rowIndex;\n\t\t\t\t\tpropertyId.col = colIndex;\n\t\t\t\t\t_validateConditionsByType(propertyId, newStates, controller);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\t_validateConditionsByType(propertyId, newStates, controller);\n\t}\n\t// get property values before any states have been updated\n\tconst prevPropertyValues = _getConditionPropertyValues(controller);\n\n\tcontroller.setControlStates(newStates.controls);\n\tcontroller.setPanelStates(newStates.panels);\n\tcontroller.setActionStates(newStates.actions);\n\n\t// get property values before any states have been updated\n\tconst newPropertyValues = _getConditionPropertyValues(controller);\n\t// compared values to see if any values change based on state updates\n\tconst updatedPropertyIds = _comparePropertyValues(prevPropertyValues, newPropertyValues, runCount);\n\t// rerun validation on controls where value changes based on state updates\n\tfor (const updatePropertyId of updatedPropertyIds) {\n\t\tvalidateConditions(updatePropertyId, controller, runCount + 1);\n\t}\n\tif (runCount > 0) {\n\t\t// need to make sure all children of panels get correct states after rerun\n\t\t_propagateParentPanelStates(controller.panelTree, newStates, PANEL_TREE_ROOT);\n\t}\n}\n\nfunction _comparePropertyValues(prevPropertyValues, newPropertyValues, runCount) {\n\tconst updatePropertyIds = [];\n\tif (runCount > 10) { // stop at top reruns. After this it's most likely an infinite loop\n\t\tlogger.warn(\"More than 10 iteration of processing conditions found. Check your conditions for loops. Updated properties: \" + JSON.stringify(newPropertyValues));\n\t\treturn [];\n\t}\n\tconst keys = union(Object.keys(prevPropertyValues), Object.keys(newPropertyValues));\n\tfor (const key of keys) {\n\t\tconst prevPropertyValue = prevPropertyValues[key];\n\t\tconst newPropertyValue = newPropertyValues[key];\n\t\tif (!isEqual(prevPropertyValue, newPropertyValue)) {\n\t\t\tupdatePropertyIds.push({ name: key });\n\t\t}\n\t}\n\treturn updatePropertyIds;\n}\n\nfunction _getConditionPropertyValues(controller) {\n\tconst propertiesConfig = controller.getPropertiesConfig();\n\tconst options = {};\n\tif (propertiesConfig.conditionDisabledPropertyHandling === \"null\") {\n\t\toptions.filterDisabled = true;\n\t}\n\tif (propertiesConfig.conditionHiddenPropertyHandling === \"null\") {\n\t\toptions.filterHidden = true;\n\t}\n\tif (isEmpty(options)) {\n\t\treturn {};\n\t}\n\treturn controller.getPropertyValues(options);\n}\n\n/**\n* This function will validate a single properties for allow_change.\n*\n* @param {object} propertyId. required\n* @param {object} properties controller. required\n*/\nfunction allowConditions(inPropertyId, controller) {\n\tlet result = true;\n\tconst control = controller.getControl(inPropertyId);\n\tif (!control) {\n\t\tlogger.warn(\"Control not found for \" + inPropertyId.name);\n\t\treturn result;\n\t}\n\tconst allowValidations = controller.getDefinitions(inPropertyId, CONDITION_TYPE.ALLOWCHANGE, CONDITION_DEFINITION_INDEX.CONTROLS);\n\tif (allowValidations.length > 0) {\n\t\ttry {\n\t\t\tfor (const validation of allowValidations) {\n\t\t\t\tresult = UiConditions.validateInput(validation.definition, inPropertyId, controller);\n\t\t\t\tif (!result) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tlogger.warn(\"Error thrown in validation: \" + error);\n\t\t}\n\t}\n\treturn result;\n}\n\n/**\n* Set default value for a field if conditions evaluate to true.\n* This function sets parameter_ref and default value in conditionalDefaultValues object using pass-by-reference.\n* Return value is never used anywhere. Calling function works on the updated conditionalDefaultValues object.\n*\n* @param {object} propertyId. required\n* @param {object} properties controller. required\n* @param {object} conditionalDefaultValues. required\n*/\nfunction setConditionalDefaultValue(inPropertyId, controller, conditionalDefaultValues) {\n\tconst control = controller.getControl(inPropertyId);\n\tif (!control) {\n\t\tlogger.warn(\"Control not found for \" + inPropertyId.name);\n\t\treturn null;\n\t}\n\tconst validations = controller.getDefinitions(inPropertyId, CONDITION_TYPE.CONDITIONALDEFAULT, CONDITION_DEFINITION_INDEX.CONTROLS);\n\tif (validations.length > 0) {\n\t\ttry {\n\t\t\tfor (const validation of validations) {\n\t\t\t\tconst parameterRef = validation.definition.default_value.parameter_ref;\n\t\t\t\t// For a given parameter_ref, only the first default_value condition is used.\n\t\t\t\tif (!(parameterRef in conditionalDefaultValues)) {\n\t\t\t\t\tconst result = UiConditions.validateInput(validation.definition, inPropertyId, controller);\n\t\t\t\t\tif (result) {\n\t\t\t\t\t\t// Condition evaluate to true\n\t\t\t\t\t\tconditionalDefaultValues[parameterRef] = validation.definition.default_value.value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tlogger.warn(\"Error thrown in validation: \" + error);\n\t\t}\n\t}\n\treturn null;\n}\n\n/**\n* Filters the datamodel fields for the given parameter.\n*\n* @param {object} propertyId. required\n* @param {object} list of filter definitions. required.\n* @param {object} properties controller. required\n* @param {object} list of fields to filter. required\n* @return {object} list of filtered fields\n*/\nfunction filterConditions(propertyId, filterDefinitions, controller, fields) {\n\t// Check each definition\n\tlet returnFields = fields;\n\tif (filterDefinitions && Array.isArray(filterDefinitions[propertyId.name])) {\n\t\ttry {\n\t\t\tconst defs = filterDefinitions[propertyId.name];\n\t\t\tfor (let i = 0; i < defs.length; i++) {\n\t\t\t\treturnFields = UiConditions.filter(propertyId, filterDefinitions[propertyId.name][i].definition, controller, returnFields);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tlogger.warn(\"Error thrown in filter for propertyId (\" + propertyId.name + \"): \" + error);\n\t\t}\n\t}\n\treturn returnFields;\n}\n\n// ========= miscellanious APIs\n\n/**\n* Takes an array of panel IDs and updates the states of the children of\n* the panels identified by those IDs to be the same as the states of the panels.\n*/\nfunction updatePanelChildrenStatesForPanelIds(panelIds, controller) {\n\tconst newStates = {\n\t\tcontrols: controller.getControlStates(),\n\t\tpanels: controller.getPanelStates(),\n\t\tactions: controller.getActionStates()\n\t};\n\n\tfor (let i = 0; i < panelIds.length; i++) {\n\t\tconst state = controller.getPanelState({ \"name\": panelIds[i] });\n\t\t_updatePanelChildrenState(newStates, { \"name\": panelIds[i] }, state, controller);\n\t}\n\n\tcontroller.setControlStates(newStates.controls);\n\tcontroller.setPanelStates(newStates.panels);\n\tcontroller.setActionStates(newStates.actions);\n\n}\n\n/**\n* Update the stated of a property\n*\n* @param {object} a list of controls and panels states. This will be modified to contain\n* the updated state. required.\n* @param {object} propertyId. required.\n* @param {string} proposed new state value. required.\n*/\nfunction updateState(refState, propertyId, value, controller) {\n\tlet propState = refState[propertyId.name];\n\tif (!propState) {\n\t\tpropState = {};\n\t}\n\tconst newPropState = Object.assign({}, propState);\n\tconst topLevelId = typeof propertyId.row === \"undefined\" && typeof propertyId.col === \"undefined\";\n\tif (topLevelId && newPropState.value === STATES.HIDDEN && (value === STATES.DISABLED || value === STATES.ENABLED)) {\n\t\tnewPropState.value = STATES.HIDDEN;\n\t} else {\n\t\tnewPropState.value = value;\n\t}\n\n\t// First allow for table level state, then column level state, and finally cell level state\n\tif (typeof propertyId.col !== \"undefined\") {\n\t\tconst colId = propertyId.col.toString();\n\t\tif (!propState[colId]) {\n\t\t\tpropState[colId] = {};\n\t\t}\n\t\tif (typeof propertyId.row !== \"undefined\") {\n\t\t\tconst rowId = propertyId.row.toString();\n\t\t\tif (!propState[colId][rowId]) {\n\t\t\t\tpropState[colId][rowId] = {};\n\t\t\t}\n\t\t\t// Table cell level\n\t\t\tpropState[colId][rowId].value = newPropState.value;\n\t\t} else {\n\t\t\t// Table column level\n\t\t\tpropState[colId].value = newPropState.value;\n\t\t\t// if all cells are \"hidden\", hide an entire column\n\t\t\tconst hideColumn = (value === \"hidden\");\n\t\t\tconst updateColumnVisibility = controller.getColumnVisibility(propertyId, propertyId.col) !== !hideColumn;\n\t\t\tif (typeof controller !== \"undefined\" && updateColumnVisibility) {\n\t\t\t\tcontroller.toggleColumnVisibility(propertyId, propertyId.col, !hideColumn);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// Control level\n\t\tpropState.value = newPropState.value;\n\t}\n\trefState[propertyId.name] = propState;\n}\n\n/**\n* Update the state of a value in an enumeration property.\n*\n* @param {object} a list of controls and panels states. This will be modified to contain\n* the updated state. required.\n* @param {object} propertyId. required.\n* @param {string} enumValue The enumeration value to operate upon. required.\n* @param {string} proposed new state value. required.\n*/\nfunction updateEnumerationState(refState, propertyId, enumValue, value) {\n\tlet propState = refState[propertyId.name];\n\tif (!propState) {\n\t\tpropState = {};\n\t}\n\tif (!propState.values) {\n\t\tpropState.values = {};\n\t}\n\tif (!propState.values[enumValue]) {\n\t\tpropState.values[enumValue] = {};\n\t}\n\tconst newPropState = Object.assign({}, propState);\n\tconst topLevelId = typeof propertyId.row === \"undefined\" && typeof propertyId.col === \"undefined\";\n\tif (topLevelId && newPropState.values[enumValue].value === STATES.HIDDEN && (value === STATES.DISABLED || value === STATES.ENABLED)) {\n\t\tnewPropState.values[enumValue].value = STATES.HIDDEN;\n\t} else {\n\t\tnewPropState.values[enumValue].value = value;\n\t}\n\n\t// First allow for table level state, then column level state, and finally cell level state\n\tif (typeof propertyId.col !== \"undefined\") {\n\t\tconst colId = propertyId.col.toString();\n\t\tif (!propState[colId]) {\n\t\t\tpropState[colId] = {};\n\t\t}\n\t\tif (typeof propertyId.row !== \"undefined\") {\n\t\t\tconst rowId = propertyId.row.toString();\n\t\t\tif (!propState[colId][rowId]) {\n\t\t\t\tpropState[colId][rowId] = {};\n\t\t\t}\n\t\t\tif (!propState[colId][rowId].values) {\n\t\t\t\tpropState[colId][rowId].values = {};\n\t\t\t}\n\t\t\tif (!propState[colId][rowId].values[enumValue]) {\n\t\t\t\tpropState[colId][rowId].values[enumValue] = {};\n\t\t\t}\n\t\t\t// Table cell level\n\t\t\tpropState[colId][rowId].values[enumValue].value = newPropState.values[enumValue].value;\n\t\t} else {\n\t\t\t// Table column level\n\t\t\tif (!propState[colId].values) {\n\t\t\t\tpropState[colId].values = {};\n\t\t\t}\n\t\t\tif (!propState[colId].values[enumValue]) {\n\t\t\t\tpropState[colId].values[enumValue] = {};\n\t\t\t}\n\t\t\tpropState[colId].values[enumValue].value = newPropState.values[enumValue].value;\n\t\t}\n\t} else {\n\t\t// Control level\n\t\tpropState.values[enumValue] = newPropState.values[enumValue];\n\t}\n\trefState[propertyId.name] = propState;\n}\n\n/**\n* Generate a propertyId from a parameter_ref. The new propertyId will include the row\n* value from the control propertyId. If the controlPropertyId is a member of an\n* unrolled structure, that propertyId will be returned.\n*\n* @param {string} parameter_ref value. required.\n* @param {object} control propertyId. optional.\n* @return {object} generated propertyId.\n*/\nfunction getParamRefPropertyId(paramRef, controlPropertyId) {\n\tconst baseParam = {\n\t\tname: paramRef\n\t};\n\tconst offset = paramRef.indexOf(\"[\");\n\tif (offset > -1) {\n\t\tbaseParam.name = paramRef.substring(0, offset);\n\t\tbaseParam.col = parseInt(paramRef.substring(offset + 1, paramRef.indexOf(\"]\")), 10);\n\t}\n\tif (controlPropertyId) {\n\t\tbaseParam.row = controlPropertyId.row;\n\t}\n\treturn baseParam;\n}\n\n/**\n* This function will inject validation definitions for controls with the following attributes.\n* Required: validation definition to ensure that the required parameter is not is not empty.\n* Date format: validation definition to ensure parameter has a proper date format.\n* Time format: validation definition to ensure parameter has a propert time format.\n*\n* @param {object} a list of control objects. required.\n* @param {object} a list of validation definition objects. required.\n* @return {object} a modified validation defintion object with any injected definitions.\n*/\nfunction injectDefaultValidations(controls, validationDefinitions, requiredDefinitionsIds, intl) {\n\tfor (const keyName in controls) {\n\t\tif (!has(controls, keyName)) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst control = controls[keyName];\n\t\t// for the validation id we need a repeatable random number to ensure uniqueness within the form.\n\t\tconst rng = seedrandom(keyName);\n\t\tconst controlValId = 1000 * rng();\n\n\t\tif (control.required === true) {\n\t\t\t_injectRequiredDefinition(control, validationDefinitions, requiredDefinitionsIds, keyName, controlValId, intl);\n\t\t}\n\t\tif (control.role === \"date\" || control.role === \"time\") {\n\t\t\t_injectDateTimeDefinition(control, validationDefinitions, keyName, controlValId, intl);\n\t\t}\n\t\tif (control.role === \"column\") {\n\t\t\t// used for selectcolumns control\n\t\t\tlet locKeyName = keyName;\n\t\t\tif (control.valueDef.isList) {\n\t\t\t\tlocKeyName += \"[0]\";\n\t\t\t}\n\t\t\t_injectInvalidFieldDefinition(control, validationDefinitions, locKeyName, controlValId, intl);\n\t\t}\n\n\t\tif (control.subControls) {\n\t\t\tconst subControls = {};\n\t\t\tfor (let idx = 0; idx < control.subControls.length; idx++) {\n\t\t\t\tconst subKeyName = keyName + \"[\" + idx + \"]\";\n\t\t\t\tsubControls[subKeyName] = control.subControls[idx];\n\t\t\t}\n\t\t\tinjectDefaultValidations(subControls, validationDefinitions, requiredDefinitionsIds, intl);\n\t\t}\n\t}\n}\n\n\n// ========= internal functions\n\n// This function will traverse the panel tree and propogate the state so that a higher order\n// panel state will be set for lower order panels. The disableOnly flag will only propagate the\n// disable state.\nfunction \t_propagateParentPanelStates(panelTree, newStates, currentPanel, disabledOnly) {\n\tconst currentPanelState = newStates.panels[currentPanel];\n\tconst allowUpdate = (disabledOnly) ? (currentPanelState && (currentPanelState.value === STATES.DISABLED))\n\t\t: (currentPanelState && (currentPanelState.value === STATES.HIDDEN || currentPanelState.value === STATES.DISABLED));\n\t\t// only propagate if parent panel is hidden or disabled\n\tif (allowUpdate && panelTree[currentPanel]) {\n\t\t// propagate panel state to children controls\n\t\tif (panelTree[currentPanel].controls) {\n\t\t\tfor (const control of panelTree[currentPanel].controls) {\n\t\t\t\tif (disabledOnly) {\n\t\t\t\t\tif (newStates.controls[control].value !== STATES.HIDDEN) {\n\t\t\t\t\t\tupdateState(newStates.controls, { name: control }, currentPanelState.value);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tupdateState(newStates.controls, { name: control }, currentPanelState.value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// propagate panel state to children actions\n\t\tif (panelTree[currentPanel].actions) {\n\t\t\tfor (const action of panelTree[currentPanel].actions) {\n\t\t\t\tif (disabledOnly) {\n\t\t\t\t\tif (newStates.actions[action].value !== STATES.HIDDEN) {\n\t\t\t\t\t\tupdateState(newStates.actions, { name: action }, currentPanelState.value);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tupdateState(newStates.actions, { name: action }, currentPanelState.value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// check all children panels\n\tif (panelTree[currentPanel] && panelTree[currentPanel].panels) {\n\t\tfor (const panel of panelTree[currentPanel].panels) {\n\t\t\tif (allowUpdate) {\n\t\t\t\tif (disabledOnly) {\n\t\t\t\t\tif (newStates.panels[panel].value !== STATES.HIDDEN) {\n\t\t\t\t\t\tupdateState(newStates.panels, { name: panel }, currentPanelState.value);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tupdateState(newStates.panels, { name: panel }, currentPanelState.value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t_propagateParentPanelStates(panelTree, newStates, panel, disabledOnly);\n\t\t}\n\t}\n}\n\n// This will validate a single propertyID value\nfunction _validateInput(propertyId, controller, control, showErrors) {\n\tlet errorSet = false;\n\tconst validations = controller.getDefinitions(propertyId, CONDITION_TYPE.VALIDATION, CONDITION_DEFINITION_INDEX.CONTROLS);\n\tif (validations.length > 0) {\n\t\tconst requiredDefinitionsIds = controller.getRequiredDefinitionIds();\n\t\ttry {\n\t\t\tlet output = false;\n\t\t\tfor (const validation of validations) {\n\t\t\t\tlet errorMessage = DEFAULT_VALIDATION_MESSAGE;\n\t\t\t\toutput = UiConditions.validateInput(validation.definition, propertyId, controller);\n\t\t\t\tlet isError = false;\n\t\t\t\tif (typeof output === \"object\") {\n\t\t\t\t\tisError = true;\n\t\t\t\t\terrorMessage = {\n\t\t\t\t\t\ttype: output.type,\n\t\t\t\t\t\ttext: output.text\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\t// msgPropertyId is where the message should be set\n\t\t\t\tlet msgPropertyId = cloneDeep(propertyId);\n\t\t\t\tif (validation.definition.validation &&\n\t\t\t\t\tvalidation.definition.validation.fail_message &&\n\t\t\t\t\tvalidation.definition.validation.fail_message.focus_parameter_ref) {\n\t\t\t\t\tmsgPropertyId = getParamRefPropertyId(validation.definition.validation.fail_message.focus_parameter_ref, msgPropertyId);\n\t\t\t\t}\n\t\t\t\t// don't set column if not a subcontrol\n\t\t\t\tif (typeof msgPropertyId.col !== \"undefined\" && typeof control.columnIndex === \"undefined\") {\n\t\t\t\t\tdelete msgPropertyId.col;\n\t\t\t\t}\n\t\t\t\terrorMessage.validation_id = msgPropertyId.name;\n\t\t\t\tif (validation.definition.validation &&\n\t\t\t\t\tvalidation.definition.validation.id) {\n\t\t\t\t\terrorMessage.validation_id = validation.definition.validation.id;\n\t\t\t\t}\n\n\t\t\t\tif (typeof msgPropertyId.row === \"undefined\") {\n\t\t\t\t\tdelete msgPropertyId.row;\n\t\t\t\t}\n\t\t\t\terrorMessage.propertyId = msgPropertyId;\n\n\t\t\t\t// Determine if this condition is for required parameters\n\t\t\t\terrorMessage.required = requiredDefinitionsIds.indexOf(validation.definition.validation.id) > -1;\n\t\t\t\t// Only show warning messages for \"colDoesExists\" condition\n\t\t\t\tif (!showErrors && !validation.alwaysShow) {\n\t\t\t\t\terrorMessage.displayError = false;\n\t\t\t\t}\n\n\t\t\t\t// if error message has not been set for this msgPropertyId/focus_parameter_ref, clear errorSet\n\t\t\t\tif (!controller.getErrorMessage(msgPropertyId, true, true, false)) {\n\t\t\t\t\terrorSet = false;\n\t\t\t\t}\n\t\t\t\t// Before setting an error message for table cell, clear the error message for table (if any)\n\t\t\t\tif (typeof msgPropertyId.row !== \"undefined\" || typeof msgPropertyId.col !== \"undefined\") {\n\t\t\t\t\tconst tablePropertyId = controller.convertPropertyId(msgPropertyId.name);\n\t\t\t\t\tconst tableErrorMessage = controller.getErrorMessage(tablePropertyId);\n\t\t\t\t\tif (tableErrorMessage !== null) {\n\t\t\t\t\t\tcontroller.updateErrorMessage(tablePropertyId, null);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (isError && !errorSet) {\n\t\t\t\t\tcontroller.updateErrorMessage(msgPropertyId, errorMessage);\n\t\t\t\t\tif (isError) {\n\t\t\t\t\t\terrorSet = true;\n\t\t\t\t\t}\n\t\t\t\t} else if ((!isError && !errorSet) || (!isError && errorSet)) {\n\t\t\t\t\tconst msg = controller.getErrorMessage(msgPropertyId, false, false, false);\n\t\t\t\t\tif (!isEmpty(msg) && (msg.validation_id === errorMessage.validation_id)) {\n\t\t\t\t\t\tcontroller.updateErrorMessage(msgPropertyId, DEFAULT_VALIDATION_MESSAGE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tlogger.warn(\"Error thrown in validation: \" + error);\n\t\t}\n\t}\n}\n\n// This function allows a single interface to perform all conditions validation.\n// It enables common code for the various APIs by delaying the exapnsion of all three\n// conditions test until this point.\nfunction _validateConditionsByType(propertyId, newStates, controller) {\n\t_validateDefinitionsByType(propertyId, newStates, controller, CONDITION_TYPE.VISIBLE);\n\t_validateDefinitionsByType(propertyId, newStates, controller, CONDITION_TYPE.ENABLED);\n\t_validateDefinitionsByType(propertyId, newStates, controller, CONDITION_TYPE.FILTEREDENUM);\n}\n\n// This is a common routine that will get the appropriate definitions for the property id\n// by type and validate that set of definitions.\nfunction _validateDefinitionsByType(propertyId, newStates, controller, condType) {\n\tconst definitions = controller.getDefinitions(propertyId, condType, CONDITION_DEFINITION_INDEX.CONTROLS);\n\t_validateByType(definitions, propertyId, newStates, controller, condType);\n}\n\n// This function will validate a set of definitions for the propertyId. This is needed because\n// it is invoked in various places in the code where we have a set of definitions that need to be validated.\nfunction _validateByType(definitions, propertyId, newStates, controller, condType) {\n\tif (definitions.length > 0) {\n\t\ttry {\n\t\t\tdefinitions.forEach((definition, idx) => {\n\t\t\t\tconst evalState = UiConditions.validateInput(definition.definition, propertyId, controller);\n\t\t\t\t// After the evalution, there is different processing of the result based on the condition type.\n\t\t\t\tswitch (condType) {\n\t\t\t\tcase CONDITION_TYPE.VISIBLE:\n\t\t\t\t\t_updateControlState(evalState, definition.definition.visible, propertyId, newStates, controller, true);\n\t\t\t\t\tbreak;\n\t\t\t\tcase CONDITION_TYPE.ENABLED:\n\t\t\t\t\t_updateControlState(evalState, definition.definition.enabled, propertyId, newStates, controller, false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase CONDITION_TYPE.FILTEREDENUM: {\n\t\t\t\t\tconst lastDefinition = _isLastDefintiionForParameter(definitions, idx);\n\t\t\t\t\t_updateFilteredState(definition.definition, propertyId, newStates, evalState, lastDefinition);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tlogger.warn(\"Error thrown in validation: \" + error);\n\t\t}\n\t}\n}\n\n// Returns true if the defintion is the last definition for the target.parameter_ref from the list of 'definitions'\n// This is only used for 'enum_filter' conditions\nfunction _isLastDefintiionForParameter(definitions, index) {\n\tconst currentDefinition = definitions[index];\n\tconst currentParameter = currentDefinition.definition.enum_filter.target.parameter_ref;\n\n\tlet lastDefinition = true;\n\tdefinitions.forEach((definition, idx) => {\n\t\t// definitions are evaluated in order, so assume any defition before 'idx' are already evaluated\n\t\tif (idx > index && definition.definition.enum_filter.target.parameter_ref === currentParameter) {\n\t\t\tlastDefinition = false;\n\t\t}\n\t});\n\treturn lastDefinition;\n}\n\n// This function will update the control state of the control and all it children panels and controls.\nfunction _updateControlState(stateOn, definition, propertyId, newStates, controller, visibleControl) {\n\tif (definition.parameter_refs) {\n\t\t_updateRefsState(stateOn, definition, propertyId, newStates, controller, visibleControl, definition.parameter_refs, \"control\");\n\t}\n\tif (definition.action_refs) {\n\t\t_updateRefsState(stateOn, definition, propertyId, newStates, controller, visibleControl, definition.action_refs, \"action\");\n\t}\n\tif (definition.group_refs) {\n\t\t_updateGroupRefsControlState(stateOn, definition, propertyId, newStates, controller, visibleControl);\n\t}\n}\n\n// This function will update the control state of the refs in the condition and all it children panels and controls.\nfunction _updateGroupRefsControlState(stateOn, definition, propertyId, newStates, controller, visibleControl) {\n\tconst newOnState = (visibleControl) ? STATES.VISIBLE : STATES.ENABLED;\n\tconst newOffState = (visibleControl) ? STATES.HIDDEN : STATES.DISABLED;\n\tconst notAllowedState = (visibleControl) ? STATES.ENABLED : STATES.HIDDEN;\n\n\tfor (const groupRef of definition.group_refs) {\n\t\tconst groupReferenceId = getParamRefPropertyId(groupRef);\n\t\tconst currentState = _getState(newStates.panels, groupReferenceId);\n\t\t// check for visible or enabled so we aren't resetting the state all the time\n\t\tif (stateOn === true) { // control|panel should be visible || enabled\n\t\t\tif (groupReferenceId && currentState !== newOnState && currentState !== notAllowedState) {\n\t\t\t\tconst updated = _updateStateIfParent(newStates, groupReferenceId, newOnState, controller);\n\t\t\t\t// only update the children if parent's state changed or is set for the first time\n\t\t\t\tif (updated) {\n\t\t\t\t\t_updatePanelChildrenState(newStates, groupReferenceId, newOnState, controller);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (groupReferenceId && (visibleControl || (!visibleControl && currentState !== notAllowedState))) {\n\t\t\tconst updated = _updateStateIfParent(newStates, groupReferenceId, newOffState, controller);\n\t\t\t// only update the children if parent's state changed or is set for the first time\n\t\t\tif (updated) {\n\t\t\t\t_updatePanelChildrenState(newStates, groupReferenceId, newOffState, controller);\n\t\t\t}\n\t\t}\n\t}\n}\n\n// This function will update the control state of the refs in the condition and all it children panels and controls.\nfunction _updateRefsState(stateOn, definition, propertyId, newStates, controller, visibleControl, refsList, refsType) {\n\tconst newOnState = (visibleControl) ? STATES.VISIBLE : STATES.ENABLED;\n\tconst newOffState = (visibleControl) ? STATES.HIDDEN : STATES.DISABLED;\n\tconst notAllowedState = (visibleControl) ? STATES.ENABLED : STATES.HIDDEN;\n\tconst refStates = (refsType === \"control\") ? newStates.controls : newStates.actions;\n\tfor (const ref of refsList) {\n\t\tconst referenceId = getParamRefPropertyId(ref, propertyId);\n\t\tconst currentState = _getState(refStates, referenceId);\n\t\t// check for visible or enabled so we aren't resetting the state all the time\n\t\tif (Array.isArray(definition.values)) {\n\t\t\t// Short-circuit for disabling individual enumeration items\n\t\t\tfor (const value of definition.values) {\n\t\t\t\tif (stateOn === true) { // control|panel should be visible || enabled\n\t\t\t\t\tupdateEnumerationState(refStates, referenceId, value, newOnState);\n\t\t\t\t} else { // control|panel should be hidden || disabled\n\t\t\t\t\tupdateEnumerationState(refStates, referenceId, value, newOffState);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (stateOn === true) { // control|panel should be visible || enabled\n\t\t\tif (referenceId && currentState !== newOnState && currentState !== notAllowedState) {\n\t\t\t\tupdateState(refStates, referenceId, newOnState, controller);\n\t\t\t}\n\t\t} else if (referenceId && (visibleControl || (!visibleControl && currentState !== notAllowedState))) {\n\t\t\t_updateStateIfPanel(newStates, referenceId, newOffState, refStates, controller);\n\t\t}\n\t}\n}\n\n// Filtered state is stored in objects rather than arrays\nfunction _updateFilteredState(definition, inPropertyId, newStates, filtered, lastDefinition) {\n\tif (definition.enum_filter.target && definition.enum_filter.target.parameter_ref) {\n\t\tconst refState = newStates.controls;\n\t\tconst propertyId = getParamRefPropertyId(definition.enum_filter.target.parameter_ref, inPropertyId);\n\t\tlet propState = refState[propertyId.name];\n\t\tif (!propState) {\n\t\t\tpropState = {};\n\t\t}\n\t\t// First allow for table level state, then column level state, and finally cell level state\n\t\tif (typeof propertyId.col !== \"undefined\") {\n\t\t\tconst colId = propertyId.col.toString();\n\t\t\tif (!propState[colId]) {\n\t\t\t\tpropState[colId] = {};\n\t\t\t}\n\t\t\tif (typeof propertyId.row !== \"undefined\") {\n\t\t\t\tconst rowId = propertyId.row.toString();\n\t\t\t\tif (!propState[colId][rowId]) {\n\t\t\t\t\tpropState[colId][rowId] = {};\n\t\t\t\t}\n\t\t\t\t// Cells\n\t\t\t\tconst enumFilters = _getFilteredEnumItems(definition, filtered, propState[colId][rowId].enumFilter, propState[colId][rowId].enumFilterApplied, lastDefinition);\n\t\t\t\tpropState[colId][rowId].enumFilter = enumFilters.values;\n\t\t\t\tpropState[colId][rowId].enumFilterApplied = enumFilters.filterApplied;\n\t\t\t} else {\n\t\t\t\t// Columns\n\t\t\t\tconst enumFilters = _getFilteredEnumItems(definition, filtered, propState[colId].enumFilter, propState[colId].enumFilterApplied, lastDefinition);\n\t\t\t\tpropState[colId].enumFilter = enumFilters.values;\n\t\t\t\tpropState[colId].enumFilterApplied = enumFilters.filterApplied;\n\t\t\t}\n\t\t} else {\n\t\t\t// Control-level state\n\t\t\tconst enumFilters = _getFilteredEnumItems(definition, filtered, propState.enumFilter, propState.enumFilterApplied, lastDefinition);\n\t\t\tpropState.enumFilter = enumFilters.values;\n\t\t\tpropState.enumFilterApplied = enumFilters.filterApplied;\n\t\t}\n\t\trefState[propertyId.name] = propState;\n\t}\n}\n\n// This function will updatethe state all the children of a panel when that parent panel state\n// has changed. It will update the state of the child. If the state is transitioning to\n// enabled or visible, then the child state may need to be set by other conditions or panels states.\nfunction _updatePanelChildrenState(newStates, referenceId, state, controller) {\n\tif (controller.panelTree[referenceId.name]) {\n\t\tconst panelTree = controller.panelTree[referenceId.name];\n\t\tfor (const panel of panelTree.panels) {\n\t\t\tconst panelPropertyId = { name: panel };\n\t\t\tupdateState(newStates.panels, panelPropertyId, state);\n\t\t\t// recurse to get the children of the panel\n\t\t\t_updatePanelChildrenState(newStates, panelPropertyId, state, controller);\n\t\t\t// after recursing down the panelTree, re-run defintions to ensure the panel is in the proper state.\n\t\t\tif (state === STATES.ENABLED) {\n\t\t\t\t_runRefsValidateDefinitions(panelPropertyId, controller, CONDITION_TYPE.ENABLED, newStates);\n\t\t\t} else if (state === STATES.VISIBLE) {\n\t\t\t\t// if the current panel is in disable state.\n\t\t\t\tif (newStates.panels[referenceId.name].disabled) {\n\t\t\t\t\t// propagate the state to all the children in the panel.\n\t\t\t\t\t_propagateParentPanelStates(controller.panelTree, newStates, referenceId.name, true);\n\t\t\t\t}\n\t\t\t\t_runRefsValidateDefinitions(panelPropertyId, controller, CONDITION_TYPE.ENABLED, newStates);\n\t\t\t\t_runRefsValidateDefinitions(panelPropertyId, controller, CONDITION_TYPE.VISIBLE, newStates);\n\t\t\t}\n\t\t}\n\t\tfor (const control of panelTree.controls) {\n\t\t\tconst ctrlPropertyId = { name: control };\n\t\t\t_updatePanelChildrenObjectState(newStates, referenceId, state, controller, ctrlPropertyId, newStates.controls);\n\t\t}\n\t\tfor (const action of panelTree.actions) {\n\t\t\tconst ctrlPropertyId = { name: action };\n\t\t\t_updatePanelChildrenObjectState(newStates, referenceId, state, controller, ctrlPropertyId, newStates.actions);\n\t\t}\n\n\t}\n}\n\n// In this context \"Object\" menas either a control or an action.\nfunction _updatePanelChildrenObjectState(newStates, referenceId, state, controller, objectId, objectStates) {\n\tupdateState(objectStates, objectId, state);\n\t// re-run ref conditions to see if they should override this new state.\n\tif (state === STATES.ENABLED) {\n\t\t_runRefsValidateDefinitions(objectId, controller, CONDITION_TYPE.ENABLED, newStates);\n\t\t_runRefsValidateDefinitions(objectId, controller, CONDITION_TYPE.VISIBLE, newStates);\n\t} else if (state === STATES.VISIBLE) {\n\t\t// need to run the controls visible conditions in case a higher level panel changed the state.\n\t\t_validateDefinitionsByType(objectId, newStates, controller, CONDITION_TYPE.VISIBLE);\n\t\t_runRefsValidateDefinitions(objectId, controller, CONDITION_TYPE.VISIBLE, newStates);\n\t\t// if parent panel is disable then set control to disabled.\n\t\tif (newStates.panels[referenceId.name].value === STATES.DISABLED) {\n\t\t\tupdateState(objectStates, objectId, STATES.DISABLED);\n\t\t} else {\n\t\t\t// otherwise run any enable definition that would set the control.\n\t\t\t_runRefsValidateDefinitions(objectId, controller, CONDITION_TYPE.ENABLED, newStates);\n\t\t}\n\t}\n}\n\n// validate all conditions of the type that set the propertyID state as a result of the condition.\nfunction _runRefsValidateDefinitions(propertyId, controller, dfnType, newStates) {\n\tconst refsDefinitions = controller.getDefinitions(propertyId, dfnType, CONDITION_DEFINITION_INDEX.REFS);\n\tif (refsDefinitions.length > 0) {\n\t\t_validateByType(refsDefinitions, propertyId, newStates, controller, dfnType);\n\t}\n\n}\n\n// Only parent panels can override state of its children\nfunction _updateStateIfParent(newStates, panel, state, controller, referenceId) {\n\tconst panelName = panel.name;\n\tif (newStates.panels[panelName]) {\n\t\tconst prevValue = newStates.panels[panelName].value;\n\t\t// if prevState is disabled, cannot set newState to visible. if prevState is hidden, cannot set newState to enabled\n\t\tif (((prevValue === STATES.ENABLED || prevValue === STATES.VISIBLE) && (state === STATES.DISABLED || state === STATES.HIDDEN)) ||\n\t\t\t\t(prevValue === STATES.DISABLED && state === STATES.ENABLED) ||\n\t\t\t\t(prevValue === STATES.HIDDEN && state === STATES.VISIBLE)) {\n\t\t\tupdateState(newStates.panels, panel, state);\n\t\t\treturn true;\n\t\t}\n\t} else {\n\t\tupdateState(newStates.panels, panel, state);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n// A control can only set a state to enabled if it was previously disabled. The same applies to hidden and visible\nfunction _updateStateIfPanel(newStates, referenceId, state, refStates, controller) {\n\tconst controlName = referenceId.name;\n\tif (refStates[controlName]) {\n\t\tlet prevValue = refStates[controlName].value;\n\t\tif (typeof referenceId.col !== \"undefined\") {\n\t\t\t// control is in a table\n\t\t\tif (refStates[controlName][referenceId.col]) {\n\t\t\t\tif (typeof referenceId.row !== \"undefined\" && refStates[controlName][referenceId.col][referenceId.row]) {\n\t\t\t\t\tprevValue = refStates[controlName][referenceId.col][referenceId.row].value;\n\t\t\t\t} else { // first time setting control state for each row in the column\n\t\t\t\t\tupdateState(refStates, referenceId, state, controller);\n\t\t\t\t}\n\t\t\t} else { // first time setting control state for the column\n\t\t\t\tupdateState(refStates, referenceId, state, controller);\n\t\t\t}\n\t\t}\n\t\t// Can only set a state to enabled if it was previously disabled. The same applies to hidden and visible\n\t\tif (((prevValue === STATES.ENABLED || prevValue === STATES.VISIBLE) && (state === STATES.DISABLED || state === STATES.HIDDEN)) ||\n\t\t\t\t(prevValue === STATES.DISABLED && state === STATES.ENABLED) ||\n\t\t\t\t(prevValue === STATES.DISABLED && state === STATES.HIDDEN) ||\n\t\t\t\t(prevValue === STATES.HIDDEN && state === STATES.VISIBLE)) {\n\t\t\tupdateState(refStates, referenceId, state, controller);\n\t\t}\n\t} else { // first time setting control state\n\t\tupdateState(refStates, referenceId, state, controller);\n\t}\n}\n\nfunction _getFilteredEnumItems(definition, filtered, previousValues, filterApplied, lastDefinition) {\n\tconst enumFilter = {\n\t\tvalues: previousValues,\n\t\tfilterApplied: lastDefinition ? false : filterApplied || true // default to true if null\n\t};\n\n\tlet filterValues = null; // original values\n\tif (filtered) {\n\t\tfilterValues = definition.enum_filter.target.values;\n\t}\n\n\t// values should be null if there are no other definitions that already modified this parameter\n\tif (filterValues || !filterApplied) {\n\t\tenumFilter.values = filterValues;\n\t\tenumFilter.filterApplied = true;\n\t}\n\n\t// reset the filters for the next validation cycle\n\tif (lastDefinition) {\n\t\tenumFilter.filterApplied = false;\n\t}\n\n\treturn enumFilter;\n}\n\n// state is stored in objects rather than arrays\nfunction _getState(refState, propertyId) {\n\tlet propState = refState[propertyId.name];\n\tif (typeof propertyId.col !== \"undefined\" && propState) {\n\t\tpropState = propState[propertyId.col.toString()];\n\t\tif (typeof propertyId.row !== \"undefined\" && propState) {\n\t\t\tpropState = propState[propertyId.row.toString()];\n\t\t}\n\t}\n\tif (propState) {\n\t\treturn propState.value;\n\t}\n\treturn null;\n}\n\nfunction _injectRequiredDefinition(control, valDefinitions, requiredDefinitionsIds, keyName, controlValId, intl) {\n\t// inject required validation definition\n\tconst label = (control.label && control.label.text) ? control.label.text : keyName;\n\tconst errorMsg = formatMessage(intl,\n\t\tMESSAGE_KEYS.REQUIRED_ERROR, { label: label });\n\tconst definitionId = \"required_\" + keyName + \"_\" + controlValId;\n\tconst injectedDefinition = {\n\t\tparams: keyName,\n\t\tdefinition: {\n\t\t\tvalidation: {\n\t\t\t\tid: definitionId,\n\t\t\t\tfail_message: {\n\t\t\t\t\ttype: \"error\",\n\t\t\t\t\tmessage: {\n\t\t\t\t\t\tdefault: errorMsg\n\t\t\t\t\t},\n\t\t\t\t\tfocus_parameter_ref: keyName\n\t\t\t\t},\n\t\t\t\tevaluate: {\n\t\t\t\t\tcondition: {\n\t\t\t\t\t\tparameter_ref: keyName,\n\t\t\t\t\t\top: \"isNotEmpty\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\t\t// add the new definition to the set of validation definitions for this control.\n\tif (valDefinitions.controls[keyName]) {\n\t\tvalDefinitions.controls[keyName].push(injectedDefinition);\n\t} else {\n\t\tvalDefinitions.controls[keyName] = [injectedDefinition];\n\t}\n\trequiredDefinitionsIds.push(definitionId); // Save to list of required definition IDs\n}\n\nfunction _injectDateTimeDefinition(control, valDefinitions, keyName, controlValId, intl) {\n\t// inject date format validation definition\n\tconst dtFormat = getDateTimeFormat(control);\n\tconst errorMsg = formatMessage(intl,\n\t\tMESSAGE_KEYS.DATETIME_FORMAT_ERROR, { role: control.role, format: dtFormat });\n\tconst injectedDefinition = {\n\t\tparams: keyName,\n\t\tdefinition: {\n\t\t\tvalidation: {\n\t\t\t\tid: \"Format_\" + keyName + \"_\" + controlValId,\n\t\t\t\tfail_message: {\n\t\t\t\t\ttype: \"error\",\n\t\t\t\t\tmessage: {\n\t\t\t\t\t\tdefault: errorMsg\n\t\t\t\t\t},\n\t\t\t\t\tfocus_parameter_ref: keyName\n\t\t\t\t},\n\t\t\t\tevaluate: {\n\t\t\t\t\tcondition: {\n\t\t\t\t\t\tparameter_ref: keyName,\n\t\t\t\t\t\top: \"isDateTime\",\n\t\t\t\t\t\tvalue: control.role\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\t// add the new definition to the set of validation definitions for this control.\n\tif (valDefinitions.controls[keyName]) {\n\t\tvalDefinitions.controls[keyName].push(injectedDefinition);\n\t} else {\n\t\tvalDefinitions.controls[keyName] = [injectedDefinition];\n\t}\n}\n\nfunction _injectInvalidFieldDefinition(control, valDefinitions, keyName, controlValId, intl) {\n\t// inject invalid field validation definition\n\tconst label = (control.label && control.label.text) ? control.label.text : keyName;\n\tconst errorMsg = formatMessage(intl,\n\t\tMESSAGE_KEYS.INVALID_FIELD_ERROR, { label: label });\n\t// Note: Please don't update \"validField_\" in validation id. It is used as identifier in another condition.\n\tconst injectedDefinition = {\n\t\tparams: keyName,\n\t\tdefinition: {\n\t\t\tvalidation: {\n\t\t\t\tid: \"validField_\" + keyName + \"_\" + controlValId,\n\t\t\t\tfail_message: {\n\t\t\t\t\ttype: \"warning\",\n\t\t\t\t\tmessage: {\n\t\t\t\t\t\tdefault: errorMsg\n\t\t\t\t\t},\n\t\t\t\t\tfocus_parameter_ref: keyName\n\t\t\t\t},\n\t\t\t\tevaluate: {\n\t\t\t\t\tcondition: {\n\t\t\t\t\t\tparameter_ref: keyName,\n\t\t\t\t\t\top: \"colDoesExists\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\talwaysShow: true\n\t};\n\t\t// add the new definition to the set of validation definitions for this control.\n\tif (valDefinitions.controls[keyName]) {\n\t\tvalDefinitions.controls[keyName].push(injectedDefinition);\n\t} else {\n\t\tvalDefinitions.controls[keyName] = [injectedDefinition];\n\t}\n}\n\n// key should be 'type', 'measure', or 'modeling_role'. Return the matching metadata given the paramInfo\nfunction getMetadataFieldMatch(paramInfo, metadata, key) {\n\tif (paramInfo.value) {\n\t\tif (typeof paramInfo.value === \"string\") {\n\t\t\tfor (let i = 0; i < metadata.length; i++) {\n\t\t\t\tvar field = metadata[i];\n\t\t\t\tif (field.name === paramInfo.value) {\n\t\t\t\t\tif (key === \"type\") {\n\t\t\t\t\t\treturn field.type;\n\t\t\t\t\t}\n\t\t\t\t\treturn field.metadata[key];\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (typeof paramInfo.value === \"object\") {\n\t\t\tfor (var j = 0; j < metadata.length; j++) {\n\t\t\t\tvar field2 = metadata[j];\n\t\t\t\tif (field2.origName === paramInfo.value.field_name && field2.schema === paramInfo.value.link_ref) {\n\t\t\t\t\tif (key === \"type\") {\n\t\t\t\t\t\treturn field2.type;\n\t\t\t\t\t}\n\t\t\t\t\treturn field2.metadata[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn null;\n}\n\nexport {\n\tvalidatePropertiesValues,\n\tvalidateConditions,\n\tvalidatePropertiesConditions,\n\tvalidateInput,\n\tfilterConditions,\n\tallowConditions,\n\tsetConditionalDefaultValue,\n\tupdateState,\n\tgetParamRefPropertyId,\n\tinjectDefaultValidations,\n\tupdatePanelChildrenStatesForPanelIds,\n\tgetMetadataFieldMatch\n};\n","var arrayMap = require('./_arrayMap'),\n baseIntersection = require('./_baseIntersection'),\n baseRest = require('./_baseRest'),\n castArrayLikeObject = require('./_castArrayLikeObject');\n\n/**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\nvar intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n});\n\nmodule.exports = intersection;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport Icon from \"./../../../icons/icon.jsx\";\nimport Tooltip from \"./../../../tooltip/tooltip.jsx\";\nimport { STATES } from \"./../../constants/constants.js\";\nimport classNames from \"classnames\";\n\nexport default class ValidationMessage extends React.Component {\n\n\trender() {\n\t\t// some controls use carbon's error/warnings instead of this component\n\t\tif (!this.props.messageInfo || (this.props.tableOnly && !this.props.inTable)) {\n\t\t\treturn null;\n\t\t}\n\t\tconst msgText = this.props.inTable ? null : <span>{this.props.messageInfo.text}</span>;\n\t\tconst icon = (<div className=\"icon\">\n\t\t\t{<Icon type={this.props.messageInfo.type} />}\n\t\t</div>);\n\t\tconst msgIcon = this.props.inTable\n\t\t\t? (<div className=\"properties-tooltips-container table-cell-msg-icon\">\n\t\t\t\t<Tooltip\n\t\t\t\t\tid=\"table-cell-msg-icon\"\n\t\t\t\t\ttip={this.props.messageInfo.text}\n\t\t\t\t\tdirection=\"bottom\"\n\t\t\t\t\tclassName=\"properties-tooltips\"\n\t\t\t\t>\n\t\t\t\t\t{icon}\n\t\t\t\t</Tooltip>\n\t\t\t</div>)\n\t\t\t: null;\n\t\tconst className = classNames(\"properties-validation-message\", this.props.messageInfo.type,\n\t\t\t{ \"hide\": this.props.state === STATES.HIDDEN || this.props.state === STATES.DISABLED, \"inTable\": this.props.inTable });\n\t\treturn (\n\t\t\t<div className={className}>\n\t\t\t\t{msgIcon}\n\t\t\t\t{msgText}\n\t\t\t</div>);\n\t}\n}\n\nValidationMessage.propTypes = {\n\tmessageInfo: PropTypes.shape({\n\t\ttext: PropTypes.string,\n\t\ttype: PropTypes.string\n\t}),\n\tstate: PropTypes.string,\n\tinTable: PropTypes.bool,\n\ttableOnly: PropTypes.bool\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport ValidationMessage from \"./validation-message.jsx\";\nexport default ValidationMessage;\n","/*\n * Copyright 2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Don't use 'd' in regex to avoid problems with replacing date token 'd'\nconst FLATPICKR_DATE_TOKENS_REGEX = {\n\tY: \"([1-9][0-9][0-9][0-9])\", // 4 digit year\n\ty: \"([0-9][0-9])\", // 2 digit year\n\tm: \"([0][1-9]|[1][0-2])\", // 2 digit month\n\tn: \"([1-9]|[1-2][0-2])\", // month without leading 0\n\td: \"([0][1-9]|[1-2][0-9]|3[01])\", // 2 digit day\n\tj: \"([1-9]|[1-2][0-9]|3[01])\" // day without leading 0\n};\n\nfunction getDateFormatRegex(dateFormat) {\n\tlet dateRegex = dateFormat;\n\tdateRegex = dateRegex.replace(\"Y\", FLATPICKR_DATE_TOKENS_REGEX.Y);\n\tdateRegex = dateRegex.replace(\"y\", FLATPICKR_DATE_TOKENS_REGEX.y);\n\tdateRegex = dateRegex.replace(\"m\", FLATPICKR_DATE_TOKENS_REGEX.m);\n\tdateRegex = dateRegex.replace(\"n\", FLATPICKR_DATE_TOKENS_REGEX.n);\n\tdateRegex = dateRegex.replace(\"d\", FLATPICKR_DATE_TOKENS_REGEX.d);\n\tdateRegex = dateRegex.replace(\"j\", FLATPICKR_DATE_TOKENS_REGEX.j);\n\tdateRegex = dateRegex.replaceAll(\".\", \"[.]\"); // escape decimals\n\tdateRegex = \"^\" + dateRegex + \"$\";\n\treturn dateRegex;\n}\n\n// 'datepicker' and 'datepickerRange' uses flatpickr internally through Carbon\n// dateFormat tokens: https://flatpickr.js.org/formatting/#date-formatting-tokens\n// Gets the formatted date to display in the control\nfunction getFormattedDate(inDate, dateFormat) {\n\tconst date = new Date(inDate);\n\tif (!isNaN(date)) {\n\t\tconst year = date.getFullYear().toString();\n\t\tlet month = (date.getMonth() + 1).toString(); // month is 0 indexed\n\t\tif (month.length === 1) {\n\t\t\tmonth = \"0\" + month;\n\t\t}\n\t\tlet day = date.getDate().toString();\n\t\tif (day.length === 1) {\n\t\t\tday = \"0\" + day;\n\t\t}\n\n\t\tlet formattedDate = dateFormat;\n\t\tformattedDate = formattedDate.replace(\"Y\", year); // 4 digit year\n\t\tformattedDate = formattedDate.replace(\"y\", year.substring(2)); // 2 digit year\n\t\tformattedDate = formattedDate.replace(\"m\", month); // 2 digit month\n\t\tformattedDate = formattedDate.replace(\"n\", parseInt(month, 10)); // month without leading 0\n\t\tformattedDate = formattedDate.replace(\"d\", day); // 2 digit day\n\t\tformattedDate = formattedDate.replace(\"j\", parseInt(day, 10)); // day without leading 0\n\t\treturn formattedDate;\n\t}\n\treturn inDate;\n}\n\n// Get the ISO date format that is stored internally\nfunction getISODate(inDate, dateFormat) {\n\tconst date = new Date(inDate);\n\tif (!isNaN(date)) {\n\t\tif (inDate instanceof Date) {\n\t\t\treturn date.toISOString();\n\t\t} else if (typeof inDate === \"string\" && inDate.trim().length > 0 && dateFormat) {\n\t\t\tconst dateRegex = getDateFormatRegex(dateFormat);\n\t\t\tconst { year, month, day } = getYearMonthDay(inDate, dateRegex, dateFormat);\n\t\t\treturn new Date(`${year}-${month}-${day}T00:00:00.00`).toISOString();\n\t\t}\n\t}\n\treturn inDate;\n}\n\n// Date libraries are able to parse dates such as 2023-02-31 into an actual Date object: Jan 31 2023\n// Given a date string (internal ISO format) and dateFormat,\n// test to see if the date is valid byt first parsing the given date for the year, month, and day\n// then compare the values of the created Date object to see if it matches\nfunction isValidDate(dateString, dateFormat) {\n\tconst date = new Date(dateString);\n\tif (isNaN(date)) {\n\t\treturn false;\n\t}\n\n\tconst dateRegex = getDateFormatRegex(dateFormat);\n\tconst validRegex = new RegExp(dateRegex).test(dateString);\n\tif (validRegex) {\n\t\tconst { year, month, day } = getYearMonthDay(dateString, dateRegex, dateFormat);\n\t\tconst newDate = new Date(`${year}-${month}-${day}T00:00:00`); // ISO format\n\t\tconst newYear = newDate.getFullYear();\n\t\tconst newMonth = newDate.getMonth() + 1;\n\t\tconst newDay = newDate.getDate();\n\t\treturn newYear === parseInt(year, 10) && newMonth === parseInt(month, 10) && newDay === parseInt(day, 10);\n\t}\n\treturn false;\n}\n\n// Given the date in string format \"03-22-2023\" and corresponding dateFormat m-d-Y,\n// return the year, month, and day as separate fields\nfunction getYearMonthDay(dateString, dateRegex, dateFormat) {\n\tlet year = \"\";\n\tlet month = \"\";\n\tlet day = \"\";\n\n\tconst groups = dateString.match(dateRegex);\n\tif (groups) {\n\t\tlet groupIdx = 1; // Index 0 is the entire match\n\t\tfor (let formatIdx = 0; formatIdx < dateFormat.length; formatIdx++) {\n\t\t\tconst formatToken = dateFormat.charAt(formatIdx);\n\t\t\tswitch (formatToken) {\n\t\t\tcase \"Y\":\n\t\t\tcase \"y\": {\n\t\t\t\tyear = groups[groupIdx];\n\t\t\t\tgroupIdx++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"m\":\n\t\t\tcase \"n\": {\n\t\t\t\tmonth = groups[groupIdx];\n\t\t\t\tgroupIdx++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"d\":\n\t\t\tcase \"j\": {\n\t\t\t\tday = groups[groupIdx];\n\t\t\t\tgroupIdx++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn { year, month, day };\n\t}\n\treturn null;\n}\n\nexport {\n\tgetDateFormatRegex,\n\tgetFormattedDate,\n\tgetISODate,\n\tisValidDate,\n\tgetYearMonthDay\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { FormattedDate } from \"react-intl\";\nimport { isValid } from \"date-fns\";\nimport { isEqual, intersection } from \"lodash\";\nimport classNames from \"classnames\";\n\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport ValidationMessage from \"./../../components/validation-message\";\nimport TruncatedContentTooltip from \"./../../components/truncated-content-tooltip\";\nimport { STATES, DATA_TYPE } from \"./../../constants/constants\";\nimport Icon from \"./../../../icons/icon\";\n\nimport { ControlType } from \"./../../constants/form-constants\";\nimport { stringifyFieldValue } from \"./../../util/property-utils\";\nimport { getFormattedDate } from \"./../../util/date-utils\";\n\nclass ReadonlyControl extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.updateValueFromFilterEnum = this.updateValueFromFilterEnum.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.updateValueFromFilterEnum(true);\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\t// only update if filter options have changed. Fixes issue where filter options are updated after value in setProperties\n\t\tif (!isEqual(this.props.controlOpts, prevProps.controlOpts)) {\n\t\t\tthis.updateValueFromFilterEnum();\n\t\t}\n\t}\n\n\t// this is needed in order to reset the property value when a value is filtered out.\n\tupdateValueFromFilterEnum(skipValidateInput) {\n\t\t// update property value if value isn't in current enum value. Don't filter custom control values.\n\t\tif (Array.isArray(this.props.value) && Array.isArray(this.props.controlOpts.values) && this.props.control.controlType !== ControlType.CUSTOM) {\n\t\t\tconst newValue = intersection(this.props.value, this.props.controlOpts.values);\n\t\t\tif (!isEqual(this.props.value, newValue)) {\n\t\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, newValue, skipValidateInput);\n\t\t\t}\n\t\t}\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tlet controlValue = this.props.value;\n\n\t\t// Use label for controlValue if possible\n\t\tif (this.props.control.values && this.props.control.valueLabels) {\n\t\t\tconst controlIndex = this.props.control.values.indexOf(this.props.value);\n\t\t\tif (controlIndex > -1 && this.props.control.valueLabels[controlIndex]) {\n\t\t\t\tcontrolValue = this.props.control.valueLabels[controlIndex];\n\t\t\t}\n\t\t}\n\t\tif (typeof controlValue === \"undefined\" || controlValue === null) {\n\t\t\tcontrolValue = \"\";\n\t\t} else if (typeof controlValue === \"object\" && controlValue.link_ref) {\n\t\t\tcontrolValue = stringifyFieldValue(controlValue, this.props.control);\n\t\t} else if (Array.isArray(controlValue)) {\n\t\t\t// this is needed to comma separate an array of readonly strings.\n\t\t\tcontrolValue = controlValue.join(\", \");\n\t\t} else if (typeof controlValue === \"boolean\") {\n\t\t\tcontrolValue = controlValue.toString();\n\t\t}\n\n\t\tcontrolValue = ControlUtils.truncateDisplayValue(controlValue);\n\n\t\tif (this.props.control.controlType === ControlType.CUSTOM) {\n\t\t\tcontrolValue = this.props.controller.getCustomControl(this.props.propertyId, this.props.control, { table: true, editStyle: \"summary\" });\n\t\t} else if (this.props.control.controlType === ControlType.TIMESTAMP ||\n\t\t\t(this.props.control.valueDef && this.props.control.valueDef.propType === DATA_TYPE.TIMESTAMP)) {\n\t\t\tconst date = new Date(controlValue);\n\t\t\tif (isValid(date)) {\n\t\t\t\tif (this.props.tableControl) {\n\t\t\t\t\tcontrolValue = <FormattedDate value={date} day=\"numeric\" month=\"long\" year=\"numeric\" hour=\"numeric\" minute=\"numeric\" />;\n\t\t\t\t} else {\n\t\t\t\t\tcontrolValue = <FormattedDate value={date} day=\"numeric\" month=\"long\" year=\"numeric\" hour=\"numeric\" minute=\"numeric\" weekday=\"long\" />;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcontrolValue = \"\"; // invalid timestamp\n\t\t\t}\n\t\t} else if (this.props.control.controlType === ControlType.DATEPICKER) {\n\t\t\tcontrolValue = controlValue ? getFormattedDate(controlValue, this.props.control.dateFormat) : \"\";\n\t\t} else if (this.props.control.controlType === ControlType.DATEPICKERRANGE) {\n\t\t\tconst startDate = this.props.value && this.props.value[0] ? getFormattedDate(this.props.value[0], this.props.control.dateFormat) : \"\";\n\t\t\tconst endDate = this.props.value && this.props.value[1] ? getFormattedDate(this.props.value[1], this.props.control.dateFormat) : \"\";\n\t\t\tcontrolValue = [startDate, endDate].toString();\n\t\t}\n\t\tconst readOnly = (<span\n\t\t\tclassName=\"properties-field-type\"\n\t\t\tdisabled={this.props.state === STATES.DISABLED}\n\t\t\taria-disabled={this.props.state === STATES.DISABLED}\n\t\t>{controlValue}</span>);\n\t\tlet display = readOnly;\n\t\tif (this.props.tableControl && controlValue.length > 0) {\n\t\t\tlet disabled = true;\n\t\t\tif (controlValue) {\n\t\t\t\tdisabled = false;\n\t\t\t}\n\t\t\tlet content = readOnly;\n\t\t\tif (this.props.control.icon) {\n\t\t\t\tcontent = (\n\t\t\t\t\t<div className={\"properties-field-readonly\"}>\n\t\t\t\t\t\t<div className={\"properties-field-type-icon\"}>\n\t\t\t\t\t\t\t<Icon type={this.props.control.icon} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{readOnly}\n\t\t\t\t\t</div>);\n\t\t\t}\n\t\t\tdisplay = (\n\t\t\t\t<TruncatedContentTooltip\n\t\t\t\t\tcontent={content}\n\t\t\t\t\ttooltipText={controlValue}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={classNames(\"properties-readonly\", { \"hide\": hidden })}\n\t\t\t\tdata-id={ControlUtils.getDataId(this.props.propertyId)}\n\t\t\t>\n\t\t\t\t{this.props.tableControl ? null : this.props.controlItem}\n\t\t\t\t{display}\n\t\t\t\t<ValidationMessage inTable={this.props.tableControl} state={this.props.state} messageInfo={this.props.messageInfo} />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nReadonlyControl.propTypes = {\n\ticon: PropTypes.string,\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrolItem: PropTypes.element,\n\ttableControl: PropTypes.bool,\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.any, // pass in by redux\n\tcontrolOpts: PropTypes.oneOfType([\n\t\tPropTypes.object,\n\t\tPropTypes.array\n\t]), // pass in by redux\n\tmessageInfo: PropTypes.object // pass in by redux\n};\n\nconst mapStateToProps = (state, ownProps) => {\n\tconst props = {\n\t\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\t\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\t\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId)\n\t};\n\tprops.controlOpts = ownProps.controller.getFilteredEnumItems(ownProps.propertyId, ownProps.control);\n\treturn props;\n};\n\nexport default connect(mapStateToProps, null)(ReadonlyControl);\n","/*\n * Copyright 2017-2026 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { TextInput } from \"@carbon/react\";\nimport ReadonlyControl from \"./../readonly\";\nimport ValidationMessage from \"./../../components/validation-message\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport { formatMessage } from \"./../../util/property-utils\";\nimport { STATES } from \"./../../constants/constants.js\";\nimport { CONDITION_MESSAGE_TYPE, MESSAGE_KEYS, TRUNCATE_LIMIT } from \"./../../constants/constants.js\";\nimport classNames from \"classnames\";\nimport { v4 as uuid4 } from \"uuid\";\n\n\nconst arrayValueDelimiter = \", \";\n\nclass TextfieldControl extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.reactIntl = props.controller.getReactIntl();\n\t\tthis.charLimit = ControlUtils.getCharLimit(props.control, props.controller.getMaxLengthForSingleLineControls());\n\t\tthis.uuid = uuid4();\n\t\tthis.id = ControlUtils.getControlId(props.propertyId, this.uuid);\n\t\tthis.isList = false;\n\t\tif (this.props.control.valueDef) {\n\t\t\tif (this.props.control.valueDef.isList) {\n\t\t\t\tthis.isList = true;\n\t\t\t}\n\t\t\tthis.defaultValue = this.props.control.valueDef.defaultValue;\n\t\t}\n\n\t\tthis.textInputRef = React.createRef();\n\t}\n\n\thandleChange(evt) {\n\t\tlet value = evt.target.value;\n\t\tif (this.isList) {\n\t\t\tvalue = ControlUtils.splitNewlines(value, arrayValueDelimiter);\n\t\t}\n\t\tif (value.length === 0 && (typeof this.defaultValue === \"undefined\" || this.defaultValue === null)) {\n\t\t\tvalue = null;\n\t\t}\n\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, value);\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tlet value = this.props.value ? this.props.value : \"\";\n\t\tlet truncated = false;\n\t\tif (this.isList) {\n\t\t\tconst joined = ControlUtils.joinNewlines(value, arrayValueDelimiter);\n\t\t\tvalue = joined.value;\n\t\t\ttruncated = joined.truncated;\n\t\t} else {\n\t\t\tvalue = ControlUtils.truncateDisplayValue(value);\n\t\t\ttruncated = value.length !== 0 && value.length !== this.props.value.length;\n\t\t}\n\t\tconst className = classNames(\"properties-textfield\", \"properties-input-control\", { \"hide\": hidden },\n\t\t\tthis.props.messageInfo ? this.props.messageInfo.type : null);\n\n\t\tlet textInput = null;\n\t\tif (truncated) {\n\t\t\tconst errorMessage = {\n\t\t\t\ttext: formatMessage(this.reactIntl, MESSAGE_KEYS.TRUNCATE_LONG_STRING_ERROR, { truncate_limit: TRUNCATE_LIMIT }),\n\t\t\t\ttype: CONDITION_MESSAGE_TYPE.ERROR,\n\t\t\t\tvalidation_id: this.props.control.name\n\t\t\t};\n\t\t\ttextInput = (<div className=\"properties-textinput-readonly\">\n\t\t\t\t{this.props.tableControl ? null : this.props.controlItem}\n\t\t\t\t<ReadonlyControl\n\t\t\t\t\tcontrol={this.props.control}\n\t\t\t\t\tpropertyId={this.props.propertyId}\n\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\ttableControl={this.props.tableControl}\n\t\t\t\t/>\n\t\t\t\t{/* // TODO this could conflict with the below ValidationMessage. */}\n\t\t\t\t<ValidationMessage inTable={this.props.tableControl} state={\"\"} messageInfo={errorMessage} />\n\t\t\t</div>);\n\t\t} else {\n\t\t\tconst validationProps = ControlUtils.getValidationProps(this.props.messageInfo, this.props.tableControl);\n\t\t\ttextInput = (\n\t\t\t\t<TextInput\n\t\t\t\t\t{...validationProps}\n\t\t\t\t\tautoComplete={this.props.tableControl === true ? \"off\" : \"on\"}\n\t\t\t\t\tid={this.id}\n\t\t\t\t\tdisabled={ this.props.state === STATES.DISABLED}\n\t\t\t\t\tplaceholder={this.props.control.additionalText}\n\t\t\t\t\thelperText={this.props.control.helperText}\n\t\t\t\t\tonChange={this.handleChange.bind(this)}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\ttitle={value}\n\t\t\t\t\tlabelText={this.props.controlItem}\n\t\t\t\t\thideLabel={this.props.tableControl}\n\t\t\t\t\taria-label={this.props.control.labelVisible ? null : this.props.control?.label?.text}\n\t\t\t\t\tref={this.textInputRef}\n\t\t\t\t\treadOnly={this.props.readOnly}\n\t\t\t\t\tenableCounter={this.charLimit !== -1}\n\t\t\t\t\tmaxCount={this.charLimit}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<div className={className} data-id={ControlUtils.getDataId(this.props.propertyId)}>\n\t\t\t\t{textInput}\n\t\t\t\t<ValidationMessage inTable={this.props.tableControl} tableOnly state={this.props.state} messageInfo={this.props.messageInfo} />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nTextfieldControl.propTypes = {\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrolItem: PropTypes.oneOfType([\n\t\tPropTypes.string,\n\t\tPropTypes.element\n\t]), // list control passes string\n\ttableControl: PropTypes.bool,\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.oneOfType([\n\t\tPropTypes.string,\n\t\tPropTypes.array\n\t]), // pass in by redux\n\tmessageInfo: PropTypes.object, // pass in by redux\n\treadOnly: PropTypes.bool\n};\n\n\nconst mapStateToProps = (state, ownProps) => ({\n\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId)\n});\n\nexport default connect(mapStateToProps, null)(TextfieldControl);\n","/*\n * Copyright 2017-2025 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { Button } from \"@carbon/react\";\nimport ValidationMessage from \"./../../components/validation-message\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport { formatMessage } from \"./../../util/property-utils\";\nimport { STATES, MESSAGE_KEYS } from \"./../../constants/constants.js\";\nimport classNames from \"classnames\";\nimport Isvg from \"react-inlinesvg\";\n\nclass ToggletextControl extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.reactIntl = props.controller.getReactIntl();\n\t\tthis.valuesMap = {};\n\t\tthis.iconsMap = {};\n\t\tfor (let i = 0; i < props.control.values.length; ++i) {\n\t\t\tthis.valuesMap[props.control.values[i]] = props.control.valueLabels[i];\n\t\t\tif (typeof props.control.valueIcons !== \"undefined\") {\n\t\t\t\tthis.iconsMap[props.control.values[i]] = props.control.valueIcons[i];\n\t\t\t}\n\t\t}\n\t}\n\n\tonClick(evt) {\n\t\tconst renderValue = this.props.controller.getPropertyValue(this.props.propertyId);\n\t\tconst newValue = (renderValue === this.props.control.values[0]) ? this.props.control.values[1] : this.props.control.values[0];\n\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, newValue);\n\n\t}\n\n\trenderIcon(label) {\n\t\tlet icon = null;\n\t\tif (typeof this.iconsMap[this.props.value] !== \"undefined\") {\n\t\t\tconst imgSource = this.iconsMap[this.props.value];\n\t\t\tif (typeof imgSource === \"string\" && imgSource.slice(imgSource.length - 4) === \".svg\") {\n\t\t\t\t// svg image\n\t\t\t\ticon = <Isvg className=\"cds--btn__icon\" src={imgSource} aria-label={label} />;\n\t\t\t} else {\n\t\t\t\ticon = (<img\n\t\t\t\t\tclassName=\"cds--btn__icon\"\n\t\t\t\t\tsrc={imgSource}\n\t\t\t\t\talt=\"\"\n\t\t\t\t/>);\n\t\t\t}\n\t\t}\n\t\treturn icon;\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tlet rendered = this.valuesMap[this.props.value];\n\t\tif (typeof rendered === \"undefined\") {\n\t\t\trendered = this.props.value;\n\t\t}\n\t\tlet button = null;\n\t\tconst buttonType = this.props.tableControl ? \"ghost\" : \"tertiary\";\n\t\tif (typeof rendered !== \"undefined\") {\n\t\t\tbutton = (\n\t\t\t\t<Button\n\t\t\t\t\tkind={buttonType}\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\tonClick={this.onClick.bind(this)}\n\t\t\t\t\trenderIcon={this.renderIcon.bind(this, rendered)}\n\t\t\t\t\ticonDescription={formatMessage(this.reactIntl, MESSAGE_KEYS.TOGGLETEXT_ICON_DESCRIPTION, { toggletext_label: this.props.value })}\n\t\t\t\t\tdisabled={this.props.state === STATES.DISABLED}\n\t\t\t\t>\n\t\t\t\t\t{rendered}\n\t\t\t\t</Button>\n\t\t\t);\n\t\t}\n\n\t\tconst className = classNames(\"properties-toggletext\", { \"hide\": hidden }, this.props.messageInfo ? this.props.messageInfo.type : null);\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={className}\n\t\t\t\tdisabled={this.props.state === STATES.DISABLED}\n\t\t\t\tdata-id={ControlUtils.getDataId(this.props.propertyId)}\n\t\t\t>\n\t\t\t\t{this.props.tableControl ? null : this.props.controlItem}\n\t\t\t\t{button}\n\t\t\t\t<ValidationMessage inTable={this.props.tableControl} state={this.props.state} messageInfo={this.props.messageInfo} />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nToggletextControl.propTypes = {\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrol: PropTypes.object.isRequired,\n\tcontrolItem: PropTypes.element,\n\ttableControl: PropTypes.bool,\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.string, // pass in by redux\n\tmessageInfo: PropTypes.object // pass in by redux\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId)\n});\n\nexport default connect(mapStateToProps, null)(ToggletextControl);\n","/*\n * Copyright 2017-2026 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { TextArea } from \"@carbon/react\";\nimport ValidationMessage from \"./../../components/validation-message\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport { formatMessage } from \"./../../util/property-utils\";\nimport { STATES } from \"./../../constants/constants.js\";\nimport { CONDITION_MESSAGE_TYPE, MESSAGE_KEYS, TRUNCATE_LIMIT } from \"./../../constants/constants.js\";\nimport classNames from \"classnames\";\nimport Tooltip from \"./../../../tooltip/tooltip.jsx\";\nimport { v4 as uuid4 } from \"uuid\";\n\nconst newLine = \"\\n\";\n\nclass TextareaControl extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.reactIntl = props.controller.getReactIntl();\n\t\tthis.charLimit = ControlUtils.getCharLimit(props.control, props.controller.getMaxLengthForMultiLineControls());\n\t\tthis.uuid = uuid4();\n\t\tthis.id = ControlUtils.getControlId(this.props.propertyId, this.uuid);\n\t}\n\n\thandleChange(evt) {\n\t\tlet value = evt.target.value;\n\t\tif (this.props.control.valueDef && this.props.control.valueDef.isList) { // array\n\t\t\tvalue = ControlUtils.splitNewlines(value, newLine);\n\t\t}\n\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, value);\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tlet value = this.props.value ? this.props.value : \"\";\n\t\tconst joined = ControlUtils.joinNewlines(value, newLine);\n\t\tvalue = joined.value;\n\t\tconst truncated = joined.truncated;\n\n\t\tlet textArea = null;\n\t\tlet validationProps = ControlUtils.getValidationProps(this.props.messageInfo, this.props.tableControl);\n\t\tlet showValidationMessage = false;\n\t\t// carbon textarea doesn't support warn yet\n\t\tif (validationProps.warn) {\n\t\t\tshowValidationMessage = true;\n\t\t\tvalidationProps = {};\n\t\t}\n\t\tif (truncated) { // A value is too long to show for editing, display as readonly\n\t\t\tconst errorMessage = {\n\t\t\t\ttext: formatMessage(this.reactIntl, MESSAGE_KEYS.TRUNCATE_LONG_STRING_ERROR, { truncate_limit: TRUNCATE_LIMIT }),\n\t\t\t\ttype: CONDITION_MESSAGE_TYPE.ERROR,\n\t\t\t\tvalidation_id: this.props.control.name\n\t\t\t};\n\t\t\tvalidationProps = ControlUtils.getValidationProps(errorMessage, this.props.tableControl);\n\t\t\ttextArea = (<div>\n\t\t\t\t<TextArea\n\t\t\t\t\t{...validationProps}\n\t\t\t\t\tid={this.id}\n\t\t\t\t\tdisabled\n\t\t\t\t\tplaceholder={this.props.control.additionalText}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tlabelText={this.props.controlItem}\n\t\t\t\t\thideLabel={this.props.tableControl}\n\t\t\t\t\thelperText={this.props.control.helperText}\n\t\t\t\t\treadOnly={this.props.readOnly}\n\t\t\t\t\taria-label={this.props.control.labelVisible ? null : this.props.control?.label?.text}\n\t\t\t\t\tenableCounter={this.charLimit !== -1}\n\t\t\t\t\tmaxCount={this.charLimit}\n\t\t\t\t/>\n\t\t\t\t<ValidationMessage inTable={this.props.tableControl} tableOnly={!showValidationMessage} state={\"\"} messageInfo={errorMessage} />\n\t\t\t</div>);\n\t\t} else {\n\t\t\ttextArea = (\n\t\t\t\t<TextArea\n\t\t\t\t\t{...validationProps}\n\t\t\t\t\tid={this.id}\n\t\t\t\t\tdisabled={this.props.state === STATES.DISABLED}\n\t\t\t\t\tplaceholder={this.props.control.additionalText}\n\t\t\t\t\tonChange={this.handleChange.bind(this)}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tlabelText={this.props.controlItem}\n\t\t\t\t\thideLabel={this.props.tableControl}\n\t\t\t\t\thelperText={this.props.control.helperText}\n\t\t\t\t\treadOnly={this.props.readOnly}\n\t\t\t\t\taria-label={this.props.control.labelVisible ? null : this.props.control?.label?.text}\n\t\t\t\t\tenableCounter={this.charLimit !== -1}\n\t\t\t\t\tmaxCount={this.charLimit}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\tlet display = textArea;\n\t\tif (this.props.tableControl) {\n\t\t\tconst tooltipId = \"tooltip-column-textarea\";\n\t\t\tlet disabled = true;\n\t\t\tif (value && this.props.state !== STATES.DISABLED) {\n\t\t\t\tdisabled = false;\n\t\t\t}\n\t\t\tconst tooltip = (\n\t\t\t\t<div className=\"properties-tooltips\">\n\t\t\t\t\t{String(value)}\n\t\t\t\t</div>\n\t\t\t);\n\t\t\tdisplay = (<Tooltip\n\t\t\t\tid={tooltipId}\n\t\t\t\ttip={tooltip}\n\t\t\t\tdirection=\"bottom\"\n\t\t\t\tclassName=\"properties-tooltips\"\n\t\t\t\tdisable={disabled}\n\t\t\t>\n\t\t\t\t{textArea}\n\t\t\t</Tooltip>);\n\t\t}\n\t\tconst className = classNames(\"properties-textarea\", { \"hide\": hidden }, this.props.messageInfo ? this.props.messageInfo.type : null);\n\t\treturn (\n\t\t\t<div className={className} data-id={ControlUtils.getDataId(this.props.propertyId)}>\n\t\t\t\t{display}\n\t\t\t\t<ValidationMessage inTable={this.props.tableControl} tableOnly={!showValidationMessage} state={this.props.state} messageInfo={this.props.messageInfo} />\n\t\t\t</div>\n\n\t\t);\n\t}\n}\n\nTextareaControl.propTypes = {\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrolItem: PropTypes.element,\n\ttableControl: PropTypes.bool,\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.oneOfType([\n\t\tPropTypes.string,\n\t\tPropTypes.array\n\t]), // pass in by redux\n\tmessageInfo: PropTypes.object, // pass in by redux\n\treadOnly: PropTypes.bool\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId)\n});\n\nexport default connect(mapStateToProps, null)(TextareaControl);\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { NumberInput, Button } from \"@carbon/react\";\nimport ValidationMessage from \"./../../components/validation-message\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport { formatMessage } from \"./../../util/property-utils\";\nimport { STATES, MESSAGE_KEYS } from \"./../../constants/constants.js\";\nimport classNames from \"classnames\";\nimport { ControlType } from \"./../../constants/form-constants\";\nimport { Shuffle } from \"@carbon/react/icons\";\nimport { has } from \"lodash\";\n\nclass NumberfieldControl extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tinvalidNumber: false\n\t\t};\n\t\tthis.numberInput = React.createRef();\n\t\tthis.onDirection = this.onDirection.bind(this);\n\t\tthis.generateNumber = this.generateNumber.bind(this);\n\t\tthis.onKeyUp = this.onKeyUp.bind(this);\n\t\tthis.id = ControlUtils.getControlId(this.props.propertyId);\n\t\tthis.reactIntl = props.controller.getReactIntl();\n\t}\n\n\tonDirection(direction) {\n\t\tlet originalValue = this.props.controller.getPropertyValue(this.props.propertyId);\n\t\tif (typeof originalValue === \"undefined\" || originalValue === null) {\n\t\t\toriginalValue = 0;\n\t\t}\n\t\tconst decimalsInOriginalValue = (originalValue.toString()).split(\".\")[1];\n\t\tthis.props.control.increment = this.props.control.increment ? this.props.control.increment : 1;\n\t\tconst decimalsInIncrement = (this.props.control.increment.toString()).split(\".\")[1];\n\t\tconst numValue = direction === \"up\" ? Number(originalValue) + this.props.control.increment : Number(originalValue) - this.props.control.increment;\n\t\tif (decimalsInIncrement) {\n\t\t\tlet decimalPrecision = decimalsInIncrement.length;\n\t\t\tif (decimalsInOriginalValue) {\n\t\t\t\tdecimalPrecision = decimalsInOriginalValue.length >= decimalsInIncrement.length ? decimalsInOriginalValue.length : decimalsInIncrement.length;\n\t\t\t}\n\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, Number(numValue.toFixed(decimalPrecision)));\n\t\t} else {\n\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, numValue);\n\t\t}\n\t}\n\n\tonKeyUp(evt) {\n\t\t// When user enters any non numeric characters in an empty numberfied control, show invalid number error\n\t\tif (\n\t\t\tevt.target.validity && evt.target.validity.badInput ||\n\t\t\t(!isFinite(this.numberInput.current.value))\n\t\t) {\n\t\t\tthis.showInvalidNumberError();\n\t\t\treturn;\n\t\t}\n\t\t// Number is valid, clear invalid number error if it exists\n\t\tthis.clearInvalidNumberError();\n\t}\n\n\thandleChange(evt, { value, direction }) {\n\t\t// When stepper buttons are clicked, evt.type = click\n\t\t// When user changes the value manually without clicking stepper buttons, evt.type = change\n\t\tif (evt?.type === \"click\" && typeof direction === \"string\") {\n\t\t\tthis.onDirection(direction);\n\t\t\treturn;\n\t\t}\n\n\t\tif (\n\t\t\tevt.target.validity && evt.target.validity.badInput ||\n\t\t\t(!isFinite(value))\n\t\t) {\n\t\t\t// Note - When user enters an invalid number, value is set to \"\".\n\t\t\t// It is difficult to differentiate between empty value and invalid input because both return \"\".\n\t\t\t// It's not possible to add a seaparte condition for invalid input because we never get the actual invalid number entered by the user.\n\t\t\t// So, setting error message for invalid input here instead of using conditions.\n\t\t\tthis.showInvalidNumberError();\n\t\t\t// Return without updating property value\n\t\t\treturn;\n\t\t}\n\t\t// Number is valid, clear invalid number error if it exists\n\t\tthis.clearInvalidNumberError();\n\n\t\tconst actualValue = value;\n\t\tif (typeof actualValue === \"undefined\" || actualValue === null || actualValue === \"\") {\n\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, null);\n\t\t} else {\n\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, Number(actualValue));\n\t\t}\n\t\t// TODO need to check for integer in validations\n\t}\n\n\tshowInvalidNumberError() {\n\t\tif (this.props.controller.getErrorMessage(this.props.propertyId) === null) {\n\t\t\tconst errorMessage = {\n\t\t\t\ttype: \"error\",\n\t\t\t\ttext: formatMessage(this.reactIntl, MESSAGE_KEYS.INVALID_NUMBER_ERROR),\n\t\t\t\tpropertyId: this.props.propertyId,\n\t\t\t\tvalidation_id: \"invalid_number\"\n\t\t\t};\n\t\t\tthis.props.controller.updateErrorMessage(this.props.propertyId, errorMessage);\n\t\t}\n\t\tthis.setState({ invalidNumber: true });\n\t}\n\n\tclearInvalidNumberError() {\n\t\tif (this.state.invalidNumber) {\n\t\t\tthis.setState({ invalidNumber: false });\n\t\t}\n\n\t\tconst invalidNumberError = this.props.controller.getErrorMessage(this.props.propertyId) &&\n\t\tthis.props.controller.getErrorMessage(this.props.propertyId).validation_id === \"invalid_number\";\n\t\tif (invalidNumberError) {\n\t\t\tthis.props.controller.updateErrorMessage(this.props.propertyId, null);\n\t\t}\n\t}\n\n\tgenerateNumber() {\n\t\tconst generator = this.props.control.label.numberGenerator;\n\t\tconst min = generator.range && generator.range.min ? generator.range.min : 10000;\n\t\tconst max = generator.range && generator.range.max ? generator.range.max : 99999;\n\t\tconst newValue = Math.floor(Math.random() * (max - min + 1) + min);\n\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, newValue);\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tlet controlValue = \"\"; // Default to empty string to avoid '0' appearing when value is 'null'\n\t\tif (this.props.value !== null && typeof this.props.value !== \"undefined\") {\n\t\t\tcontrolValue = this.props.value;\n\t\t}\n\n\t\tconst disabled = this.props.state === STATES.DISABLED;\n\t\tlet numberGenerator;\n\t\tif (has(this.props.control, \"label.numberGenerator\")) {\n\t\t\tnumberGenerator = (<Button\n\t\t\t\tclassName={classNames(\"properties-number-generator\", { \"hide\": hidden })}\n\t\t\t\tonClick={this.generateNumber}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tkind=\"tertiary\"\n\t\t\t\tsize=\"md\"\n\t\t\t\trenderIcon={Shuffle}\n\t\t\t\ttooltipPosition=\"bottom\"\n\t\t\t\ttooltipAlignment=\"end\"\n\t\t\t\ticonDescription={this.props.control.label.numberGenerator.text}\n\t\t\t\thasIconOnly\n\t\t\t/>);\n\t\t}\n\t\tconst className = classNames(\n\t\t\t\"properties-numberfield\",\n\t\t\t{ \"numberfield-with-number-generator\": has(this.props.control, \"label.numberGenerator\") ? this.props.control.label.numberGenerator : null },\n\t\t\t{ \"hide\": hidden },\n\t\t\tthis.props.messageInfo ? this.props.messageInfo.type : null\n\t\t);\n\t\tconst validationProps = ControlUtils.getValidationProps(this.props.messageInfo, this.props.tableControl);\n\t\treturn (\n\t\t\t<div className={className} data-id={ControlUtils.getDataId(this.props.propertyId)}>\n\t\t\t\t<NumberInput\n\t\t\t\t\t{...validationProps}\n\t\t\t\t\tref={this.numberInput}\n\t\t\t\t\tid={this.id}\n\t\t\t\t\tonChange={this.handleChange.bind(this)}\n\t\t\t\t\tonKeyUp={this.onKeyUp}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tstep={this.props.control.increment}\n\t\t\t\t\tvalue={controlValue}\n\t\t\t\t\tplaceholder={this.props.control.additionalText}\n\t\t\t\t\tlabel={this.props.controlItem}\n\t\t\t\t\thideLabel={this.props.tableControl}\n\t\t\t\t\tallowEmpty\n\t\t\t\t\thideSteppers={this.props.tableControl || (this.props.control.controlType === ControlType.NUMBERFIELD)}\n\t\t\t\t\thelperText={this.props.control.helperText}\n\t\t\t\t\treadOnly={this.props.readOnly}\n\t\t\t\t\tdisableWheel\n\t\t\t\t\taria-label={this.props.control.labelVisible ? null : this.props.control?.label?.text}\n\t\t\t\t/>\n\t\t\t\t{numberGenerator}\n\t\t\t\t<ValidationMessage inTable={this.props.tableControl} tableOnly state={this.props.state} messageInfo={this.props.messageInfo} />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nNumberfieldControl.propTypes = {\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrolItem: PropTypes.oneOfType([\n\t\tPropTypes.string,\n\t\tPropTypes.element\n\t]), // list control passes string\n\ttableControl: PropTypes.bool,\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.number, // pass in by redux\n\tmessageInfo: PropTypes.object, // pass in by redux,\n\treadOnly: PropTypes.bool\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId, true) // Filter error messages for hidden/disabled controls\n});\n\nexport default connect(mapStateToProps, null)(NumberfieldControl);\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIteratee = require('./_baseIteratee'),\n toInteger = require('./toInteger');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nmodule.exports = findIndex;\n","/*\n * Copyright 2017-2026 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Base class for table controls\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport Toolbar from \"../../../toolbar/toolbar\";\n\nimport { formatMessage } from \"../../util/property-utils\";\nimport { MESSAGE_KEYS, STATES } from \"./../../constants/constants\";\n\nclass TableButtons extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.reactIntl = this.props.controller.getReactIntl();\n\t\tthis.getCustomButtonEnabled = this.getCustomButtonEnabled.bind(this);\n\t\tthis.customButtonIconCallback = this.customButtonIconCallback.bind(this);\n\t\tthis.customButtonOnClick = this.customButtonOnClick.bind(this);\n\t\tthis.convertToolbarConfig = this.convertToolbarConfig.bind(this);\n\t}\n\n\tgetCustomButtonEnabled(tableState, buttonConfig) {\n\t\tconst tableDisabled = typeof tableState !== \"undefined\" && tableState === STATES.DISABLED;\n\t\tconst buttonEnabled = this.props.customButtonsState && typeof this.props.customButtonsState[buttonConfig.id] !== \"undefined\"\n\t\t\t? this.props.customButtonsState[buttonConfig.id] // set to true in redux if enabled, override the default from uihints\n\t\t\t: buttonConfig.enabled || false; // fallback to default value\n\t\treturn !tableDisabled && buttonEnabled;\n\t}\n\n\tcustomButtonIconCallback(buttonId, carbonIcon) {\n\t\tconst buttonIconHandler = this.props.controller.getHandlers().buttonIconHandler;\n\t\tlet icon;\n\t\tif (buttonIconHandler) {\n\t\t\tbuttonIconHandler({\n\t\t\t\ttype: \"customButtonIcon\",\n\t\t\t\tpropertyId: this.props.propertyId,\n\t\t\t\tbuttonId: buttonId,\n\t\t\t\tcarbonIcon: carbonIcon\n\t\t\t}, (appIcon) => {\n\t\t\t\ticon = appIcon;\n\t\t\t});\n\t\t}\n\t\treturn icon;\n\t}\n\n\tcustomButtonOnClick(buttonId) {\n\t\tconst buttonHandler = this.props.controller.getHandlers().buttonHandler;\n\t\tif (buttonHandler) {\n\t\t\tbuttonHandler({\n\t\t\t\ttype: \"custom_button\",\n\t\t\t\tpropertyId: this.props.propertyId,\n\t\t\t\tbuttonId: buttonId\n\t\t\t});\n\t\t}\n\t}\n\n\tconvertToolbarConfig(tableState, customButtons = []) {\n\t\tconst toolbarConfig = [];\n\t\tcustomButtons.forEach((buttonConfig) => {\n\t\t\tconst buttonEnabled = this.getCustomButtonEnabled(tableState, buttonConfig);\n\t\t\tconst buttonDef = {\n\t\t\t\taction: buttonConfig.id,\n\t\t\t\tenable: buttonEnabled\n\t\t\t};\n\n\t\t\tif (buttonConfig.icon) {\n\t\t\t\tbuttonDef.iconEnabled = buttonConfig.icon;\n\t\t\t} else if (buttonConfig.carbonIcon) {\n\t\t\t\tbuttonDef.iconEnabled = this.customButtonIconCallback(buttonConfig.id, buttonConfig.carbonIcon);\n\t\t\t}\n\n\t\t\tif (buttonConfig.label) {\n\t\t\t\tbuttonDef.label = buttonConfig.label.text;\n\t\t\t\tbuttonDef.incLabelWithIcon = \"before\";\n\t\t\t\tbuttonDef.kind = \"ghost\";\n\t\t\t} else {\n\t\t\t\tbuttonDef.label = buttonConfig.description?.text;\n\t\t\t\tbuttonDef.incLabelWithIcon = null; // Display aria-label for this icon only button\n\t\t\t}\n\n\t\t\tif (buttonConfig.kind) {\n\t\t\t\tbuttonDef.kind = buttonConfig.kind;\n\t\t\t}\n\n\t\t\tif (buttonConfig.description) {\n\t\t\t\tbuttonDef.tooltip = buttonConfig.description.text;\n\t\t\t}\n\n\t\t\tif (buttonConfig.divider && buttonConfig.divider === \"before\") {\n\t\t\t\ttoolbarConfig.push({ divider: true });\n\t\t\t}\n\t\t\ttoolbarConfig.push(buttonDef);\n\t\t\tif (buttonConfig.divider && buttonConfig.divider === \"after\") {\n\t\t\t\ttoolbarConfig.push({ divider: true });\n\t\t\t}\n\t\t});\n\t\treturn toolbarConfig;\n\t}\n\n\trender() {\n\t\tconst toolbarConfig = {\n\t\t\tleftBar: this.convertToolbarConfig(this.props.tableState, this.props.customButtons)\n\t\t};\n\t\treturn (<div className=\"properties-custom-table-buttons\">\n\t\t\t<Toolbar\n\t\t\t\tconfig={toolbarConfig}\n\t\t\t\tinstanceId={0}\n\t\t\t\tsize=\"sm\"\n\t\t\t\ttoolbarActionHandler={this.customButtonOnClick}\n\t\t\t\tadditionalText={{\n\t\t\t\t\toverflowMenuLabel: this.props.toolbarOverflowLabel,\n\t\t\t\t\tariaLabel: formatMessage(this.reactIntl, MESSAGE_KEYS.TABLE_TOOLBAR_LABEL, { table_label: this.props.tableLabel })\n\t\t\t\t}}\n\t\t\t/>\n\t\t</div>);\n\t}\n}\n\nTableButtons.propTypes = {\n\tcontroller: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcustomButtons: PropTypes.array.isRequired,\n\ttableLabel: PropTypes.string.isRequired,\n\ttableState: PropTypes.string,\n\ttoolbarOverflowLabel: PropTypes.string,\n\tcustomButtonsState: PropTypes.object // set in by redux\n};\n\nexport default TableButtons;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Button } from \"@carbon/react\";\nimport { Edit } from \"@carbon/react/icons\";\nimport { formatMessage } from \"./../../util/property-utils\";\nimport Tooltip from \"./../../../tooltip/tooltip.jsx\";\nimport { cloneDeep } from \"lodash\";\n\nimport { MESSAGE_KEYS } from \"./../../constants/constants\";\n\n\nimport SubPanelInvoker from \"./invoker.jsx\";\n\nexport default class SubPanelCell extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.showSubPanel = this.showSubPanel.bind(this);\n\t\tthis.onSubPanelHidden = this.onSubPanelHidden.bind(this);\n\t}\n\n\tonSubPanelHidden(applyChanges) {\n\t\t// on cancel reset back to original value\n\t\tif (!applyChanges) {\n\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, this.initialControlValue);\n\t\t\tthis.props.controller.setErrorMessages(this.initialMessages);\n\t\t\tthis.props.controller.setControlStates(this.initialStates);\n\t\t}\n\t}\n\n\tshowSubPanel() {\n\t\t// sets the current value for parameter. Used on cancel\n\t\tthis.initialControlValue = cloneDeep(this.props.controller.getPropertyValue(this.props.propertyId));\n\t\tthis.initialMessages = this.props.controller.getAllErrorMessages();\n\t\tthis.initialStates = this.props.controller.getControlStates();\n\t\tthis.subPanelInvoker.showSubDialog(this.props.title, this.props.panel, this.onSubPanelHidden);\n\t}\n\n\trender() {\n\t\tconst tooltipId = \"tooltip-subpanel-cell\";\n\t\tconst disabled = typeof this.props.disabled !== \"undefined\" ? this.props.disabled : false;\n\t\tconst subPanelToolTip = formatMessage(this.props.controller.getReactIntl(),\n\t\t\tMESSAGE_KEYS.SUBPANEL_BUTTON_TOOLTIP);\n\t\tconst applyLabel = formatMessage(this.props.controller.getReactIntl(), MESSAGE_KEYS.APPLYBUTTON_LABEL);\n\t\tconst rejectLabel = formatMessage(this.props.controller.getReactIntl(), MESSAGE_KEYS.REJECTBUTTON_LABEL);\n\t\treturn (\n\t\t\t<SubPanelInvoker ref={ (ref) => (this.subPanelInvoker = ref) }\n\t\t\t\trightFlyout={this.props.rightFlyout}\n\t\t\t\tapplyLabel={applyLabel}\n\t\t\t\trejectLabel={rejectLabel}\n\t\t\t\tcontroller={this.props.controller}\n\t\t\t>\n\t\t\t\t<Tooltip\n\t\t\t\t\tid={tooltipId}\n\t\t\t\t\ttip={subPanelToolTip}\n\t\t\t\t\tdirection=\"left\"\n\t\t\t\t\tclassName=\"properties-tooltips icon-tooltip\"\n\t\t\t\t>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"properties-subpanel-button\"\n\t\t\t\t\t\tkind=\"ghost\"\n\t\t\t\t\t\trenderIcon={Edit}\n\t\t\t\t\t\tonClick={this.showSubPanel}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\ticonDescription={subPanelToolTip}\n\t\t\t\t\t\thasIconOnly\n\t\t\t\t\t/>\n\t\t\t\t</Tooltip>\n\t\t\t</SubPanelInvoker>\n\t\t);\n\t}\n}\n\nSubPanelCell.propTypes = {\n\tlabel: PropTypes.string,\n\ttitle: PropTypes.string,\n\tpanel: PropTypes.object.isRequired,\n\tdisabled: PropTypes.bool,\n\tcontroller: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object,\n\trightFlyout: PropTypes.bool\n};\n","/*\n * Copyright 2024-2026 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { TrashCan, Edit, UpToTop, ChevronUp, ChevronDown, DownToBottom } from \"@carbon/react/icons\";\nimport { MESSAGE_KEYS, STATES } from \"../../constants/constants\";\nimport Toolbar from \"../../../toolbar/toolbar\";\n\nimport { formatMessage } from \"../../util/property-utils\";\nimport SubPanelInvoker from \"./../../panels/sub-panel/invoker\";\nimport { cloneDeep } from \"lodash\";\n\nclass TableToolbar extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.reactIntl = this.props.controller.getReactIntl();\n\t\tthis.handleCancel = this.handleCancel.bind(this);\n\t\tthis.showSubPanel = this.showSubPanel.bind(this);\n\t\tthis.onSubPanelHidden = this.onSubPanelHidden.bind(this);\n\t\tthis.getTableRowMoveButtons = this.getTableRowMoveButtons.bind(this);\n\t\tthis.topMoveRow = this.topMoveRow.bind(this);\n\t\tthis.upMoveRow = this.upMoveRow.bind(this);\n\t\tthis.downMoveRow = this.downMoveRow.bind(this);\n\t\tthis.bottomMoveRow = this.bottomMoveRow.bind(this);\n\t\tthis.getLeastValue = this.getLeastValue.bind(this);\n\t\tthis.getMaxValue = this.getMaxValue.bind(this);\n\t\tthis.toolbarActionHandler = this.toolbarActionHandler.bind(this);\n\t}\n\n\tonSubPanelHidden(applyChanges) {\n\t\t// on cancel reset back to original value\n\t\tif (!applyChanges) {\n\t\t\tthis.props.controller.updatePropertyValue(this.props?.multiSelectEditRowPropertyId, this.initialMultiSelectEditRowValue);\n\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, this.initialControlValue);\n\t\t\tthis.props.controller.setErrorMessages(this.initialMessages);\n\t\t\tthis.props.controller.setControlStates(this.initialStates);\n\t\t}\n\t}\n\n\tgetLeastValue() {\n\t\tlet leastValue = 0;\n\t\tconst staticRows = this.props.controller.getStaticRows(this.props.propertyId).sort();\n\t\tif (staticRows && staticRows.length > 0 && staticRows.includes(0)) {\n\t\t\tleastValue = staticRows[staticRows.length - 1];\n\t\t}\n\t\treturn leastValue;\n\t}\n\n\tgetMaxValue() {\n\t\tconst controlValue = this.props.controller.getPropertyValue(this.props.propertyId);\n\t\tlet maxValue = controlValue.length - 1;\n\t\tconst staticRows = this.props.controller.getStaticRows(this.props.propertyId).sort();\n\t\tif (staticRows && staticRows.length > 0 && staticRows.includes(controlValue.length - 1)) {\n\t\t\tmaxValue = staticRows[0] - 1;\n\t\t}\n\t\treturn maxValue;\n\t}\n\n\n\tgetLeftBarConfig() {\n\t\tconst editLabel = formatMessage(this.reactIntl, MESSAGE_KEYS.TABLE_TOOLBAR_BUTTON_EDIT);\n\t\tconst deleteLabel = formatMessage(this.reactIntl, MESSAGE_KEYS.TABLE_TOOLBAR_BUTTON_DELETE);\n\t\tconst cancelLabel = formatMessage(this.reactIntl, MESSAGE_KEYS.TABLE_TOOLBAR_BUTTON_CANCEL);\n\n\t\tconst editBtn = { action: \"multiSelectEdit\", label: editLabel, iconEnabled: (<Edit />), enable: true, kind: \"primary\" };\n\t\tconst deleteBtn = (this.props.addRemoveRows && !this.props.isReadonlyTable && !this.props.isSingleSelectTable)\n\t\t\t? { action: \"delete\", label: deleteLabel, iconEnabled: (<TrashCan />), enable: true, kind: \"primary\" } : null;\n\t\tconst cancelBtn = { action: \"cancel\", label: cancelLabel, enable: true, incLabelWithIcon: \"label-only\", kind: \"primary\" };\n\n\t\t// For delete, edit, show its divider only if those icons are present\n\t\tconst toolbarConfig = [\n\t\t\t...(this.props.moveableRows ? this.getTableRowMoveButtons() : []),\n\t\t\tdeleteBtn,\n\t\t\tthis.props.multiSelectEdit ? editBtn : null,\n\t\t\t{ divider: true },\n\t\t\tcancelBtn\n\t\t];\n\t\treturn toolbarConfig;\n\t}\n\n\n\t// enabled the move up and down arrows based on which row is selected\n\tgetTableRowMoveButtons() {\n\t\tconst selected = this.props.controller.getSelectedRows(this.props.propertyId).sort();\n\t\tconst controlValue = this.props.controller.getPropertyValue(this.props.propertyId);\n\t\tconst tableDisabled = this.props.tableState === STATES.DISABLED;\n\t\tlet topEnabled = (\n\t\t\t!this.props.disableRowMoveButtons &&\n\t\t\t(selected.length !== 0 && selected[0] !== 0) &&\n\t\t\t!tableDisabled\n\t\t);\n\t\tlet bottomEnabled = (\n\t\t\t!this.props.disableRowMoveButtons &&\n\t\t\t(selected.length !== 0 && selected[selected.length - 1] !== controlValue.length - 1) &&\n\t\t\t!tableDisabled\n\t\t);\n\t\tconst staticRows = this.props.controller.getStaticRows(this.props.propertyId).sort();\n\t\tif (selected.length > 0 && staticRows.length > 0 && staticRows.includes(selected[0])) {\n\t\t\ttopEnabled = false;\n\t\t\tbottomEnabled = false;\n\t\t} else if (selected[0] === staticRows[staticRows.length - 1] + 1) {\n\t\t\ttopEnabled = false;\n\t\t\tbottomEnabled = (\n\t\t\t\t!this.props.disableRowMoveButtons &&\n\t\t\t\t(selected.length !== 0 && selected[selected.length - 1] !== controlValue.length - 1) &&\n\t\t\t\t!tableDisabled\n\t\t\t);\n\t\t} else if (selected[0] === staticRows[0] - 1) {\n\t\t\tbottomEnabled = false;\n\t\t}\n\n\n\t\tconst moveTopLabel = formatMessage(this.reactIntl, MESSAGE_KEYS.TABLE_TOOLBAR_BUTTON_TOP);\n\t\tconst moveUpLabel = formatMessage(this.reactIntl, MESSAGE_KEYS.TABLE_TOOLBAR_BUTTON_UP);\n\t\tconst moveDownLabel = formatMessage(this.reactIntl, MESSAGE_KEYS.TABLE_TOOLBAR_BUTTON_DOWN);\n\t\tconst moveBottomLabel = formatMessage(this.reactIntl, MESSAGE_KEYS.TABLE_TOOLBAR_BUTTON_BOTTOM);\n\t\tconst moveTopBtn = { action: \"topMoveRow\", label: moveTopLabel, iconEnabled: (<UpToTop />), enable: topEnabled, kind: \"primary\" };\n\t\tconst moveUpBtn = { action: \"upMoveRow\", label: moveUpLabel, iconEnabled: (<ChevronUp />), enable: topEnabled, kind: \"primary\" };\n\t\tconst moveDownBtn = { action: \"downMoveRow\", label: moveDownLabel, iconEnabled: (<ChevronDown />), enable: bottomEnabled, kind: \"primary\" };\n\t\tconst moveBottomBtn = { action: \"bottomMoveRow\", label: moveBottomLabel, iconEnabled: (<DownToBottom />), enable: bottomEnabled, kind: \"primary\" };\n\n\t\treturn (\n\t\t\t[moveTopBtn, moveUpBtn, moveDownBtn, moveBottomBtn]\n\t\t);\n\t}\n\n\tgetLeftTitleContents() {\n\t\tconst singleRowSelectedLabel = (this.props.smallFlyout)\n\t\t\t? formatMessage(this.reactIntl, MESSAGE_KEYS.SINGLE_SELECTED_ROW_LABEL_SMALL_FLYOUT) // item\n\t\t\t: formatMessage(this.reactIntl, MESSAGE_KEYS.SINGLE_SELECTED_ROW_LABEL); // item selected\n\t\tconst multiRowsSelectedLabel = (this.props.smallFlyout)\n\t\t\t? formatMessage(this.reactIntl, MESSAGE_KEYS.MULTI_SELECTED_ROW_LABEL_SMALL_FLYOUT) // items\n\t\t\t: formatMessage(this.reactIntl, MESSAGE_KEYS.MULTI_SELECTED_ROW_LABEL); // items selected\n\t\tconst title = (this.props.selectedRows.length === 1)\n\t\t\t? `${this.props.selectedRows.length} ${singleRowSelectedLabel}`\n\t\t\t: `${this.props.selectedRows.length} ${multiRowsSelectedLabel}`;\n\t\treturn (<div className=\"properties-batch-summary\" role=\"button\" aria-roledescription=\"text\">\n\t\t\t<span >{title}</span>\n\t\t</div>);\n\t}\n\n\ttoolbarActionHandler(action) {\n\t\tif (action === \"topMoveRow\") {\n\t\t\tthis.topMoveRow();\n\t\t} else if (action === \"upMoveRow\") {\n\t\t\tthis.upMoveRow();\n\t\t} else if (action === \"downMoveRow\") {\n\t\t\tthis.downMoveRow();\n\t\t} else if (action === \"bottomMoveRow\") {\n\t\t\tthis.bottomMoveRow();\n\t\t} else if (action === \"cancel\") {\n\t\t\tthis.handleCancel();\n\t\t} else if (action === \"delete\") {\n\t\t\tthis.props.removeSelectedRows();\n\t\t} else if (action === \"multiSelectEdit\") {\n\t\t\tthis.showSubPanel();\n\t\t}\n\t}\n\n\ttopMoveRow() {\n\t\tvar selected = this.props.controller.getSelectedRows(this.props.propertyId).sort(function(a, b) {\n\t\t\treturn a - b;\n\t\t});\n\t\tconst controlValue = this.props.controller.getPropertyValue(this.props.propertyId);\n\t\tconst leastValue = this.getLeastValue();\n\t\tconst staticRows = this.props.controller.getStaticRows(this.props.propertyId).sort();\n\t\tfor (var firstRow = selected[0]; firstRow > leastValue; firstRow--) {\n\t\t\tfor (var i = 0; i <= selected.length - 1; i++) {\n\t\t\t\tif ((staticRows.length > 0 && selected[0] > leastValue + 1) || staticRows.length === 0) {\n\t\t\t\t\tconst selectedRow = selected.shift();\n\t\t\t\t\tconst tmpRow = controlValue[selectedRow - 1];\n\t\t\t\t\tcontrolValue[selectedRow - 1] = controlValue[selectedRow];\n\t\t\t\t\tcontrolValue[selectedRow] = tmpRow;\n\t\t\t\t\tselected.push(selectedRow - 1);\n\t\t\t\t\tthis.props.controller.moveErrorMessageRows(this.props.propertyId.name, selectedRow, selectedRow - 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (selected.length > 0) {\n\t\t\tthis.props.setScrollToRow(selected[0]);\n\t\t}\n\t\tthis.props.setCurrentControlValueSelected(controlValue, selected);\n\t}\n\n\tupMoveRow() {\n\t\tconst selected = this.props.controller.getSelectedRows(this.props.propertyId).sort(function(a, b) {\n\t\t\treturn a - b;\n\t\t});\n\t\tconst leastValue = this.getLeastValue();\n\t\tconst staticRows = this.props.controller.getStaticRows(this.props.propertyId).sort();\n\t\t// only move up if not already at the top especially for multiple selected\n\t\t// Move up only till the static rows index\n\t\tif (selected.length !== 0 && selected[0] > leastValue) {\n\t\t\tconst controlValue = this.props.controller.getPropertyValue(this.props.propertyId);\n\t\t\tfor (var i = 0; i <= selected.length - 1; i++) {\n\t\t\t\tif (staticRows.length > 0 && selected[0] > leastValue + 1) {\n\t\t\t\t\tconst selectedRow = selected.shift();\n\t\t\t\t\tconst tmpRow = controlValue[selectedRow - 1];\n\t\t\t\t\tcontrolValue[selectedRow - 1] = controlValue[selectedRow];\n\t\t\t\t\tcontrolValue[selectedRow] = tmpRow;\n\t\t\t\t\tselected.push(selectedRow - 1);\n\t\t\t\t\tthis.props.controller.moveErrorMessageRows(this.props.propertyId.name, selectedRow, selectedRow - 1);\n\t\t\t\t} else if (staticRows.length === 0) {\n\t\t\t\t\tconst selectedRow = selected.shift();\n\t\t\t\t\tif (selectedRow !== 0) {\n\t\t\t\t\t\tconst tmpRow = controlValue[selectedRow - 1];\n\t\t\t\t\t\tcontrolValue[selectedRow - 1] = controlValue[selectedRow];\n\t\t\t\t\t\tcontrolValue[selectedRow] = tmpRow;\n\t\t\t\t\t\tselected.push(selectedRow - 1);\n\t\t\t\t\t\tthis.props.controller.moveErrorMessageRows(this.props.propertyId.name, selectedRow, selectedRow - 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.props.setScrollToRow(selected[0]);\n\t\t\tthis.props.setCurrentControlValueSelected(controlValue, selected);\n\t\t}\n\t}\n\n\tdownMoveRow() {\n\t\tconst selected = this.props.controller.getSelectedRows(this.props.propertyId).sort(function(a, b) {\n\t\t\treturn a - b;\n\t\t});\n\t\tconst controlValue = this.props.controller.getPropertyValue(this.props.propertyId);\n\t\tconst maxValue = this.getMaxValue();\n\t\t// only move down if not already at the end especially for multiple selected\n\t\tif (selected.length !== 0 && selected[selected.length - 1] !== controlValue.length - 1) {\n\t\t\tfor (var i = selected.length - 1; i >= 0; i--) {\n\t\t\t\tconst selectedRow = selected.pop();\n\t\t\t\tif (selectedRow !== maxValue) {\n\t\t\t\t\tconst tmpRow = controlValue[selectedRow + 1];\n\t\t\t\t\tcontrolValue[selectedRow + 1] = controlValue[selectedRow];\n\t\t\t\t\tcontrolValue[selectedRow] = tmpRow;\n\t\t\t\t\tselected.unshift(selectedRow + 1);\n\t\t\t\t\tthis.props.controller.moveErrorMessageRows(this.props.propertyId.name, selectedRow, selectedRow + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (selected.length > 1) {\n\t\t\t\tthis.props.setScrollToRow(selected[selected.length - 1]);\n\t\t\t} else {\n\t\t\t\tthis.props.setScrollToRow(selected[0]);\n\t\t\t}\n\t\t\tthis.props.setCurrentControlValueSelected(controlValue, selected);\n\t\t}\n\t}\n\n\tbottomMoveRow() {\n\t\tvar selected = this.props.controller.getSelectedRows(this.props.propertyId).sort(function(a, b) {\n\t\t\treturn a - b;\n\t\t});\n\t\tconst controlValue = this.props.controller.getPropertyValue(this.props.propertyId);\n\t\tconst maxValue = this.getMaxValue();\n\t\tfor (var lastRow = selected[selected.length - 1]; lastRow < maxValue; lastRow++) {\n\t\t\tfor (var i = selected.length - 1; i >= 0; i--) {\n\t\t\t\tconst selectedRow = selected.pop();\n\t\t\t\tconst tmpRow = controlValue[selectedRow + 1];\n\t\t\t\tcontrolValue[selectedRow + 1] = controlValue[selectedRow];\n\t\t\t\tcontrolValue[selectedRow] = tmpRow;\n\t\t\t\tselected.unshift(selectedRow + 1);\n\t\t\t\tthis.props.controller.moveErrorMessageRows(this.props.propertyId.name, selectedRow, selectedRow + 1);\n\t\t\t}\n\t\t}\n\t\tif (selected.length > 0) {\n\t\t\tthis.props.setScrollToRow(selected[selected.length - 1]);\n\t\t}\n\t\tthis.props.setCurrentControlValueSelected(controlValue, selected);\n\t}\n\n\thandleCancel() {\n\t\t// Clear row selection\n\t\tthis.props.controller.updateSelectedRows(this.props.propertyId, []);\n\t}\n\n\tshowSubPanel() {\n\t\t// sets the current value for parameter. Used on cancel\n\t\tthis.initialMultiSelectEditRowValue = cloneDeep(this.props.controller.getPropertyValue(this.props?.multiSelectEditRowPropertyId));\n\t\tthis.initialControlValue = cloneDeep(this.props.controller.getPropertyValue(this.props.propertyId));\n\t\tthis.initialMessages = this.props.controller.getAllErrorMessages();\n\t\tthis.initialStates = this.props.controller.getControlStates();\n\t\tconst multiSelectEditSubPanelTitle = formatMessage(this.reactIntl, MESSAGE_KEYS.MULTI_SELECT_EDIT_SUBPANEL_TITLE);\n\t\tthis.subPanelInvoker.showSubDialog(multiSelectEditSubPanelTitle, this.props?.multiSelectEditSubPanel, this.onSubPanelHidden);\n\t}\n\n\trender() {\n\t\tif ((this.props.addRemoveRows || this.props.moveableRows || this.props.multiSelectEdit) && this.props.selectedRows.length > 0) {\n\t\t\tconst toolbarConfig = {\n\t\t\t\tleftBar: this.getLeftBarConfig()\n\t\t\t};\n\t\t\tconst multiSelectInvoker = this.props.multiSelectEdit\n\t\t\t\t? (\n\t\t\t\t\t<SubPanelInvoker ref={(ref) => (this.subPanelInvoker = ref)}\n\t\t\t\t\t\trightFlyout={this.props.rightFlyout}\n\t\t\t\t\t\tapplyLabel={formatMessage(this.reactIntl, MESSAGE_KEYS.APPLYBUTTON_LABEL)}\n\t\t\t\t\t\trejectLabel={formatMessage(this.reactIntl, MESSAGE_KEYS.REJECTBUTTON_LABEL)}\n\t\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\t/>\n\t\t\t\t) : null;\n\n\t\t\treturn (\n\t\t\t\t<div className={\"properties-table-toolbar\"}>\n\t\t\t\t\t{this.getLeftTitleContents()}\n\t\t\t\t\t{multiSelectInvoker}\n\t\t\t\t\t<div className=\"properties-toolbar-items floating-toolbar\">\n\t\t\t\t\t\t<Toolbar\n\t\t\t\t\t\t\tconfig={toolbarConfig}\n\t\t\t\t\t\t\tinstanceId={0}\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\ttoolbarActionHandler={this.toolbarActionHandler}\n\t\t\t\t\t\t\tadditionalText={{\n\t\t\t\t\t\t\t\toverflowMenuLabel: formatMessage(this.reactIntl, MESSAGE_KEYS.TABLE_TOOLBAR_OVERFLOW_LABEL),\n\t\t\t\t\t\t\t\tariaLabel: formatMessage(this.reactIntl, MESSAGE_KEYS.TABLE_TOOLBAR_LABEL, { table_label: this.props.tableLabel })\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tcontainingDivId={this.props.containingDivId}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}\n\n}\n\nTableToolbar.propTypes = {\n\tcontroller: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tselectedRows: PropTypes.array.isRequired,\n\tremoveSelectedRows: PropTypes.func.isRequired,\n\tsetScrollToRow: PropTypes.func.isRequired,\n\tsetCurrentControlValueSelected: PropTypes.func.isRequired,\n\trightFlyout: PropTypes.bool,\n\tsmallFlyout: PropTypes.bool, // list control in right flyout having editor size small\n\ttableState: PropTypes.string,\n\ttableLabel: PropTypes.string.isRequired,\n\tisReadonlyTable: PropTypes.bool,\n\tisSingleSelectTable: PropTypes.bool,\n\taddRemoveRows: PropTypes.bool,\n\tmoveableRows: PropTypes.bool,\n\tmultiSelectEdit: PropTypes.bool,\n\tmultiSelectEditSubPanel: PropTypes.element,\n\tmultiSelectEditRowPropertyId: PropTypes.object,\n\tdisableRowMoveButtons: PropTypes.bool, // set by redux\n\tcontainingDivId: PropTypes.string\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\t// check if row move buttons should be disabled for given propertyId\n\tdisableRowMoveButtons: ownProps.controller.isDisableRowMoveButtons(ownProps.propertyId)\n});\n\nexport default connect(mapStateToProps)(TableToolbar);\n","/*\n * Copyright 2017-2026 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Base class for table controls\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Button, Checkbox } from \"@carbon/react\";\nimport { TrashCan } from \"@carbon/react/icons\";\nimport FlexibleTable from \"./../components/flexible-table\";\nimport TableButtons from \"./../components/table-buttons\";\nimport SubPanelCell from \"./../panels/sub-panel/cell.jsx\";\nimport Tooltip from \"../../tooltip/tooltip.jsx\";\nimport ReadonlyControl from \"./readonly\";\nimport * as PropertyUtils from \"./../util/property-utils\";\nimport classNames from \"classnames\";\nimport { Add, Edit } from \"@carbon/react/icons\";\nimport { ControlType, EditStyle } from \"./../constants/form-constants\";\nimport { v4 as uuid4 } from \"uuid\";\n\nimport { MESSAGE_KEYS, STATES, TABLE_SUBPANEL_BUTTON_WIDTH, SORT_DIRECTION, ROW_SELECTION, UPDATE_TYPE } from \"./../constants/constants\";\n\nimport { isEqual, findIndex, sortBy, cloneDeep } from \"lodash\";\nimport TableToolbar from \"../components/table-toolbar/table-toolbar.jsx\";\n\n/* eslint max-depth: [\"error\", 5] */\n\nexport default class AbstractTable extends React.Component {\n\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tfilterText: null\n\t\t};\n\t\tthis.onPanelContainer = [];\n\t\t// used to determine if column controls can be inline or if field picker is used\n\t\tthis.allowColumnControls = false;\n\n\t\tthis.isReadonlyTable = this.isReadonlyTable.bind(this);\n\t\tthis.indexOfColumn = this.indexOfColumn.bind(this);\n\t\tthis.setCurrentControlValueSelected = this.setCurrentControlValueSelected.bind(this);\n\t\tthis.setReadOnlyColumnValue = this.setReadOnlyColumnValue.bind(this);\n\t\tthis.removeSelected = this.removeSelected.bind(this);\n\t\tthis.updateRowSelections = this.updateRowSelections.bind(this);\n\t\tthis.handleRowClick = this.handleRowClick.bind(this);\n\t\tthis.createTable = this.createTable.bind(this);\n\t\tthis.onFilter = this.onFilter.bind(this);\n\t\tthis.onSort = this.onSort.bind(this);\n\t\tthis.setScrollToRow = this.setScrollToRow.bind(this);\n\t\tthis.includeInFilter = this.includeInFilter.bind(this);\n\t\tthis.makeAddButtonPanel = this.makeAddButtonPanel.bind(this);\n\t\tthis.makeEditButtonPanel = this.makeEditButtonPanel.bind(this);\n\t\tthis.makeCustomButtonsPanel = this.makeCustomButtonsPanel.bind(this);\n\t\tthis.buildChildItem = this.buildChildItem.bind(this);\n\t\tthis.buildMultiSelectEditChildItem = this.buildMultiSelectEditChildItem.bind(this);\n\t\tthis.makeCells = this.makeCells.bind(this);\n\t\tthis.areAllRowsChecked = this.areAllRowsChecked.bind(this);\n\t\tthis.isLightTheme = this.isLightTheme.bind(this);\n\n\t\tif (props.selectedRows && props.selectedRows.length > 0) {\n\t\t\tthis.scrollToRow = props.selectedRows[props.selectedRows.length - 1];\n\t\t}\n\n\t\tthis.selectSummaryPropertyName = \"table-multi-select-edit-property-\" + props.control?.name;\n\t\tprops.controller.saveControls([{ name: this.selectSummaryPropertyName }]);\n\t\tthis.setSelectedSummaryRowValue(props.selectedRows);\n\t\tthis.uuid = uuid4();\n\t}\n\n\tcomponentDidMount() {\n\t\tif (this.props.control.subControls) {\n\t\t\tconst updatedControlValues = this.setReadOnlyColumnValue();\n\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, updatedControlValues, true, UPDATE_TYPE.INITIAL_LOAD);\n\t\t}\n\t}\n\n\tcomponentDidUpdate() {\n\t\tif (this.isSelectSummaryEdit(this.props.selectedRows)) {\n\t\t\tthis.updateSelectedRowsValues();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.props.controller.removePropertyValue({ name: this.selectSummaryPropertyName });\n\t}\n\n\tonFilter(filterString) {\n\t\tthis.setState({ filterText: filterString });\n\t}\n\n\tonSort(spec) {\n\t\tlet controlValue = this.props.value;\n\t\tlet col = -1;\n\t\tfor (var colIndex = 0; colIndex < this.props.control.subControls.length; colIndex++) {\n\t\t\tif (this.props.control.subControls[colIndex].name === spec.column) {\n\t\t\t\tcol = colIndex;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (col > -1) {\n\t\t\tcontrolValue = sortBy(controlValue, function(row) {\n\t\t\t\treturn row[col];\n\t\t\t});\n\t\t\tif (spec.direction === SORT_DIRECTION.DESC) {\n\t\t\t\tcontrolValue.reverse();\n\t\t\t}\n\t\t\tthis.setCurrentControlValueSelected(controlValue, []);\n\t\t}\n\t}\n\n\tgetOnPanelContainer(selectedRows) {\n\t\tif (this.onPanelContainer.length === 0 || selectedRows.length === 0 ||\n\t\t\tthis.isSelectSummaryEdit(selectedRows)) {\n\t\t\treturn (<div />);\n\t\t}\n\n\t\treturn (<div className=\"properties-onpanel-container\">{this.onPanelContainer[selectedRows[0]]}</div>);\n\t}\n\n\tgetDefaultRow() {\n\t\tconst row = [];\n\t\tif (this.props.control.defaultRow) {\n\t\t\tfor (const colValue of this.props.control.defaultRow) {\n\t\t\t\tif (typeof colValue !== \"undefined\" && colValue !== null && colValue.parameterRef) {\n\t\t\t\t\trow.push(this.props.controller.getPropertyValue({ name: colValue.parameterRef }));\n\t\t\t\t} else {\n\t\t\t\t\trow.push(colValue);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn row;\n\t}\n\n\t// Returns the label for the overflow menu in the table toolbar\n\tgetTableToolbarOverflowLabel() {\n\t\treturn PropertyUtils.formatMessage(this.props.controller.getReactIntl(), MESSAGE_KEYS.TABLE_TOOLBAR_OVERFLOW_LABEL);\n\t}\n\n\tsetScrollToRow(row) {\n\t\tthis.scrollToRow = row;\n\t}\n\n\tsetCurrentControlValueSelected(controlValue, inSelectedRows) {\n\t\tlet updatedControlValues = controlValue;\n\t\tif (this.props.control.subControls) {\n\t\t\tupdatedControlValues = this.setReadOnlyColumnValue(controlValue);\n\t\t}\n\n\t\t// Here we convert any compound field strings into compound values for storage\n\t\tif (Array.isArray(updatedControlValues)) {\n\t\t\tfor (let idx = 0; idx < updatedControlValues.length; idx++) {\n\t\t\t\tconst value = updatedControlValues[idx];\n\t\t\t\tif (Array.isArray(value)) {\n\t\t\t\t\tfor (let idx2 = 0; idx2 < this.props.control.subControls.length; idx2++) {\n\t\t\t\t\t\tconst subControl = this.props.control.subControls[idx2];\n\t\t\t\t\t\tif (subControl.role === \"column\" && subControl.valueDef.propType === \"structure\") {\n\t\t\t\t\t\t\tupdatedControlValues[idx][idx2] = PropertyUtils.fieldStringToValue(\n\t\t\t\t\t\t\t\tvalue[idx2], subControl, this.props.controller);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (this.props.control.role === \"column\" && this.props.control.valueDef.propType === \"structure\") {\n\t\t\t\t\tupdatedControlValues[idx] = PropertyUtils.fieldStringToValue(\n\t\t\t\t\t\tvalue, this.props.control, this.props.controller);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Update the property value\n\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, updatedControlValues);\n\t\tconst selectedRows = Array.isArray(inSelectedRows) ? inSelectedRows : [];\n\t\tthis.updateRowSelections(selectedRows);\n\t}\n\n\tsetReadOnlyColumnValue(controlValue) {\n\t\tconst controlValues = controlValue ? controlValue : this.props.value;\n\t\tif (!Array.isArray(controlValues)) {\n\t\t\treturn controlValues;\n\t\t}\n\t\tfor (var rowIndex = 0; rowIndex < controlValues.length; rowIndex++) {\n\t\t\tfor (var colIndex = 0; colIndex < this.props.control.subControls.length; colIndex++) {\n\t\t\t\tconst columnDef = this.props.control.subControls[colIndex];\n\t\t\t\tif (columnDef.controlType === ControlType.READONLY && columnDef.generatedValues && columnDef.generatedValues.operation === \"index\") {\n\t\t\t\t\tconst index = typeof columnDef.generatedValues.startValue !== \"undefined\" ? columnDef.generatedValues.startValue + rowIndex : rowIndex + 1;\n\t\t\t\t\tcontrolValues[rowIndex][colIndex] = index;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn controlValues;\n\t}\n\n\t// This will set the select summary row values either from the property value or the default values.\n\tsetSelectedSummaryRowValue(selection) {\n\t\tif (this.isSelectSummaryEdit(selection)) {\n\t\t\tconst summaryPropertyId = {\n\t\t\t\tname: this.selectSummaryPropertyName\n\t\t\t};\n\t\t\tlet value = this.props.controller.getPropertyValue(summaryPropertyId);\n\t\t\tif (!value) {\n\t\t\t\tvalue = [this.getDefaultRow()];\n\t\t\t\tthis.props.controller.updatePropertyValue(summaryPropertyId, value, true);\n\t\t\t}\n\t\t\tthis.selectedSummaryRowValue = cloneDeep(value);\n\t\t}\n\t}\n\n\tisSelectSummaryEdit(selectedRows) {\n\t\treturn (this.props.control.rowSelection === ROW_SELECTION.MULTIPLE && selectedRows.length > 1);\n\t}\n\n\tisReadonlyTable() {\n\t\treturn this.props.control.controlType === ControlType.READONLYTABLE || this.props.readOnly;\n\t}\n\n\tindexOfColumn(controlId) {\n\t\treturn findIndex(this.props.control.subControls, function(columnControl) {\n\t\t\treturn columnControl.name === controlId;\n\t\t});\n\t}\n\n\thandleRowClick(rowIndex, evt) {\n\t\tlet selectedRows = this.props.selectedRows;\n\t\tif (this.props.control.rowSelection === ROW_SELECTION.SINGLE) {\n\t\t\tselectedRows = [rowIndex];\n\t\t} else if (evt.metaKey === true || evt.ctrlKey === true) {\n\t\t\t// If already selected then remove otherwise add\n\t\t\tconst index = selectedRows.indexOf(rowIndex);\n\t\t\tif (index >= 0) {\n\t\t\t\tselectedRows.splice(index, 1);\n\t\t\t} else {\n\t\t\t\tselectedRows = selectedRows.concat(rowIndex);\n\t\t\t}\n\t\t} else if (evt.shiftKey === true) {\n\t\t\tconst anchor = selectedRows.length > 0 ? selectedRows[0] : rowIndex;\n\t\t\tconst start = anchor > rowIndex ? rowIndex : anchor;\n\t\t\tconst end = (anchor > rowIndex ? anchor : rowIndex) + 1;\n\t\t\tconst newSelns = [];\n\t\t\tfor (let i = start; i < end; i++) {\n\t\t\t\tnewSelns.push(i);\n\t\t\t}\n\t\t\tselectedRows = newSelns;\n\t\t}\n\t\tthis.updateRowSelections(selectedRows);\n\t}\n\n\t// this will got through all selected rows and update any column value in the row with the\n\t// column value in the selected summary row that has changed.\n\tupdateSelectedRowsValues() {\n\t\tconst summaryPropertyId = {\n\t\t\tname: this.selectSummaryPropertyName\n\t\t};\n\t\tconst tableControl = this.props.controller.getControl({ name: this.props.control.name });\n\t\tconst newSelectedSummaryRow = this.props.controller.getPropertyValue(summaryPropertyId);\n\t\tif (newSelectedSummaryRow && Array.isArray(newSelectedSummaryRow)) {\n\t\t\tnewSelectedSummaryRow[0].forEach((cellValue, colIndex) => {\n\t\t\t\tif (!isEqual(cellValue, this.selectedSummaryRowValue[0][colIndex])) {\n\t\t\t\t\t// if a column does not have a value, the default value is null and the value returned\n\t\t\t\t\t// from getPropertyValue is undefined causing unneccessary updates and an infinite loop during intialization\n\t\t\t\t\tconst testCell = (typeof cellValue === \"undefined\") ? null : cellValue;\n\t\t\t\t\tthis.props.selectedRows.forEach((rowIndex) => {\n\t\t\t\t\t\tthis.props.controller.updatePropertyValue({ name: this.props.control.name, row: rowIndex, col: colIndex }, testCell, true);\n\t\t\t\t\t});\n\t\t\t\t\tif (tableControl.subControls[colIndex].controlType === ControlType.ONEOFSELECT) {\n\t\t\t\t\t\tthis.props.controller.updatePropertyValue({ name: this.selectSummaryPropertyName, row: 0, col: colIndex }, testCell);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.selectedSummaryRowValue = cloneDeep(newSelectedSummaryRow);\n\t\t}\n\t}\n\n\tupdateRowSelections(selection) {\n\t\tthis.props.controller.updateSelectedRows(this.props.propertyId, selection);\n\t\tthis.setSelectedSummaryRowValue(selection);\n\t}\n\n\tremoveSelected() {\n\t\tconst rows = this.props.value;\n\t\t// Sort descending to ensure lower indices don\"t get\n\t\t// changed when values are deleted\n\t\tconst selected = this.props.selectedRows.sort(function(a, b) {\n\t\t\treturn b - a;\n\t\t});\n\t\tfor (let i = 0; i < selected.length; i++) {\n\t\t\trows.splice(selected[i], 1);\n\t\t\t// this will remove any error messages associate with row.\n\t\t\tthis.props.controller.removeErrorMessageRow({ name: this.props.propertyId.name, row: selected[i] });\n\t\t}\n\n\t\tthis.setCurrentControlValueSelected(rows);\n\t}\n\n\t// selectSummaryRow is true if creating the makeSelectedEditRow header row\n\t_makeCell(columnDef, controlValue, propertyName, rowIndex, colIndex, tableState, selectSummaryRow) {\n\t\tconst childPropertyId = {\n\t\t\tname: propertyName,\n\t\t\trow: rowIndex,\n\t\t\tcol: colIndex\n\t\t};\n\n\t\tconst parentPropertyId = cloneDeep(this.props.propertyId);\n\t\tlet propertyId = childPropertyId;\n\t\t// Do not use parentPropertyId if creating the makeSelectedEditRow\n\t\tif (!selectSummaryRow && parentPropertyId.name !== childPropertyId.name) {\n\t\t\tpropertyId = this.props.controller.setChildPropertyId(parentPropertyId, childPropertyId);\n\t\t}\n\n\t\tconst tableInfo = { table: true, allowColumnControls: this.allowColumnControls };\n\t\tconst ControlFactory = this.props.controller.getControlFactory();\n\t\tlet cellContent;\n\t\tconst columnDefObj = Object.assign({}, columnDef); // clone columnDef\n\t\tconst cellClassName = columnDefObj.className ? columnDefObj.className : \"\";\n\t\tif (columnDef.dmImage) {\n\t\t\tconst fields = this.props.controller.getDatasetMetadataFields();\n\t\t\tconst stringValue = PropertyUtils.stringifyFieldValue(this.props.controller.getPropertyValue(propertyId), columnDef, true);\n\t\t\tcolumnDefObj.icon = PropertyUtils.getDMFieldIcon(fields,\n\t\t\t\tstringValue, columnDef.dmImage);\n\t\t}\n\t\tif (this.isReadonlyTable()) {\n\t\t\tcellContent = (<div className={classNames(\"properties-table-cell-control\", cellClassName)}>\n\t\t\t\t<ReadonlyControl\n\t\t\t\t\tcontrol={this.props.controller.getControl(propertyId)}\n\t\t\t\t\tpropertyId={propertyId}\n\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\ttableControl\n\t\t\t\t/>\n\t\t\t</div>);\n\t\t} else if (columnDef.editStyle === EditStyle.SUBPANEL || columnDef.editStyle === EditStyle.ON_PANEL) {\n\t\t\tif (selectSummaryRow) {\n\t\t\t\tcellContent = <div />;\n\t\t\t} else {\n\t\t\t\tcellContent = (<div className={classNames(\"properties-table-cell-control\", cellClassName)}>\n\t\t\t\t\t<ReadonlyControl\n\t\t\t\t\t\tcontrol={this.props.controller.getControl(propertyId)}\n\t\t\t\t\t\tpropertyId={propertyId}\n\t\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\t\ttableControl\n\t\t\t\t\t/>\n\t\t\t\t</div>);\n\t\t\t\tif (columnDef.editStyle === EditStyle.ON_PANEL) {\n\t\t\t\t// save the cell content in an object\n\t\t\t\t\tthis.onPanelContainer[rowIndex].push(<div key={colIndex}><br />{ControlFactory.createControlItem(columnDef, propertyId)}</div>);\n\t\t\t\t}\n\t\t\t}\n\t\t} else { // defaults to inline control\n\t\t\ttableInfo.editStyle = EditStyle.INLINE;\n\t\t\tcellContent = (<div className={classNames(\"properties-table-cell-control\", cellClassName)}>\n\t\t\t\t{ControlFactory.createControl(columnDefObj, propertyId, tableInfo)}\n\t\t\t</div>);\n\n\t\t}\n\t\treturn {\n\t\t\tcolumn: columnDef.name,\n\t\t\twidth: columnDef.width,\n\t\t\tcontent: cellContent,\n\t\t\tclassName: cellClassName,\n\t\t\tvalue: this.props.controller.getPropertyValue(propertyId),\n\t\t\tresizable: columnDef.resizable\n\t\t};\n\t}\n\t_getCustomCtrlContent(propertyId, columnDef, defaultContent, tableInfo) {\n\t\tlet cellContent = defaultContent;\n\t\t// allow the custom control to set the cell content\n\t\tif (columnDef.controlType === ControlType.CUSTOM) {\n\t\t\ttableInfo.editStyle = \"summary\";\n\t\t\tcellContent = this.props.controller.getCustomControl(propertyId, columnDef, tableInfo);\n\t\t}\n\t\treturn cellContent;\n\t}\n\n\t_getDisabledStatus(cellPropertyId, tableState) {\n\t\tif (typeof tableState !== \"undefined\" && tableState === STATES.DISABLED) {\n\t\t\treturn true;\n\t\t}\n\t\tconst cellState = this.props.controller.getControlState(cellPropertyId);\n\t\treturn cellState === STATES.DISABLED;\n\t}\n\n\t/**\n\t * Returns true if the given row should be included\n\t * in the current filter output.\n\t */\n\tincludeInFilter(rowIndex) {\n\t\t// If no search text, include all\n\t\tif (!this.state.filterText || this.state.filterText.length === 0) {\n\t\t\treturn true;\n\t\t}\n\t\tconst controlValue = this.props.value;\n\t\tfor (let i = 0; i < this.filterFields.length; i++) {\n\t\t\tfor (var colIndex = 0; colIndex < this.props.control.subControls.length; colIndex++) {\n\t\t\t\tconst columnDef = this.props.control.subControls[colIndex];\n\t\t\t\tif (columnDef.name === this.filterFields[i]) {\n\t\t\t\t\tconst value = controlValue[rowIndex][colIndex];\n\t\t\t\t\tif (typeof value === \"string\" && value.toLowerCase().indexOf(this.state.filterText.toLowerCase()) > -1) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\thasFilter() {\n\t\tlet hasFilter = false;\n\t\tif (this.props.control.subControls) {\n\t\t\tfor (const subControl of this.props.control.subControls) {\n\t\t\t\tif (subControl.filterable) {\n\t\t\t\t\thasFilter = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn hasFilter;\n\t}\n\n\taddOnClick(propertyId) {\n\t\tif (this.addOnClickCallback) {\n\t\t\tthis.addOnClickCallback(propertyId, this.onFieldPickerCloseCallback);\n\t\t}\n\t}\n\n\tisLightTheme() {\n\t\treturn this.props.controller.getLight() && this.props.control.light;\n\t}\n\n\tmakeTableToolbar(selectedRows, tableLabel) {\n\t\t// For single select tables, table toolbar doesn't show delete icon because it is added at row level\n\t\tconst singleSelectTable = this.props.control.rowSelection === ROW_SELECTION.SINGLE;\n\t\tif (\n\t\t\t((this.props.addRemoveRows && !singleSelectTable) || this.props.control?.moveableRows || this.isSelectSummaryEdit(selectedRows)) &&\n\t\t\tselectedRows?.length > 0\n\t\t) {\n\t\t\tconst multiSelectEditRowPropertyId = {\n\t\t\t\tname: this.selectSummaryPropertyName,\n\t\t\t\trow: 0\n\t\t\t};\n\t\t\tlet multiSelectEditSubPanel = null;\n\t\t\tif (this.isSelectSummaryEdit(selectedRows)) {\n\t\t\t\tmultiSelectEditSubPanel = this.buildMultiSelectEditChildItem(multiSelectEditRowPropertyId);\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t<TableToolbar\n\t\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\t\tpropertyId={this.props.propertyId}\n\t\t\t\t\t\tselectedRows={selectedRows}\n\t\t\t\t\t\taddRemoveRows={this.props.addRemoveRows}\n\t\t\t\t\t\tmoveableRows={this.props.control?.moveableRows}\n\t\t\t\t\t\tmultiSelectEdit={this.isSelectSummaryEdit(selectedRows)}\n\t\t\t\t\t\tremoveSelectedRows={this.removeSelected}\n\t\t\t\t\t\tsetScrollToRow={this.setScrollToRow}\n\t\t\t\t\t\tsetCurrentControlValueSelected={this.setCurrentControlValueSelected}\n\t\t\t\t\t\trightFlyout={this.props.rightFlyout}\n\t\t\t\t\t\tmultiSelectEditSubPanel={multiSelectEditSubPanel}\n\t\t\t\t\t\tmultiSelectEditRowPropertyId={multiSelectEditRowPropertyId}\n\t\t\t\t\t\tisReadonlyTable={this.isReadonlyTable()}\n\t\t\t\t\t\tisSingleSelectTable={singleSelectTable}\n\t\t\t\t\t\tsmallFlyout={false}\n\t\t\t\t\t\ttableLabel={tableLabel}\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}\n\n\tmakeAddButtonPanel(tableState, tableButtonConfig) {\n\t\tthis.onFieldPickerCloseCallback = (tableButtonConfig && tableButtonConfig.fieldPickerCloseFunction)\n\t\t\t? tableButtonConfig.fieldPickerCloseFunction.bind(this)\n\t\t\t: null;\n\n\t\tlet addButtonDisabled = false;\n\t\tthis.addOnClickCallback = (tableButtonConfig && tableButtonConfig.addButtonFunction)\n\t\t\t? tableButtonConfig.addButtonFunction\n\t\t\t: this.props.openFieldPicker;\n\t\tconst addButtonLabel = (tableButtonConfig && tableButtonConfig.addButtonLabel) ? tableButtonConfig.addButtonLabel\n\t\t\t: PropertyUtils.formatMessage(this.props.controller.getReactIntl(), MESSAGE_KEYS.STRUCTURETABLE_ADDBUTTON_LABEL);\n\t\tif (tableState === STATES.DISABLED) {\n\t\t\taddButtonDisabled = true;\n\t\t\tthis.addOnClickCallback = null;\n\t\t}\n\n\t\treturn (\n\t\t\t<div className=\"properties-at-buttons-container\">\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"properties-add-fields-button\"\n\t\t\t\t\tdisabled={addButtonDisabled || this.props.readOnly}\n\t\t\t\t\tonClick={this.addOnClick.bind(this, this.props.propertyId)}\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\tkind=\"ghost\"\n\t\t\t\t\trenderIcon={Add}\n\t\t\t\t>\n\t\t\t\t\t{addButtonLabel}\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tmakeEditButtonPanel(tableState, tableButtonConfig) {\n\t\tlet editButton = null;\n\n\t\tif (tableButtonConfig && tableButtonConfig.editCallback) {\n\t\t\tthis.editOnClickCallback = tableButtonConfig.editCallback;\n\t\t\teditButton = (<div className=\"properties-at-buttons-container\">\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"properties-edit-button\"\n\t\t\t\t\tonClick={this.editOnClick.bind(this, this.props.propertyId)}\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\tkind=\"ghost\"\n\t\t\t\t\trenderIcon={Edit}\n\t\t\t\t\tdisabled={this.props.readOnly}\n\t\t\t\t>\n\t\t\t\t\t{tableButtonConfig.label}\n\t\t\t\t</Button>\n\t\t\t</div>);\n\t\t}\n\n\t\treturn editButton;\n\t}\n\n\tmakeCustomButtonsPanel(tableState, customButtons, tableLabel) {\n\t\tlet customTableButtons = null;\n\t\tif (customButtons) {\n\t\t\tcustomTableButtons = (<div className=\"properties-at-buttons-container\">\n\t\t\t\t<TableButtons\n\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\tpropertyId={this.props.propertyId}\n\t\t\t\t\ttableState={tableState}\n\t\t\t\t\tcustomButtons={customButtons}\n\t\t\t\t\tcustomButtonsState={this.props.tableButtons}\n\t\t\t\t\ttoolbarOverflowLabel={this.getTableToolbarOverflowLabel()}\n\t\t\t\t\ttableLabel={tableLabel}\n\t\t\t\t/>\n\t\t\t</div>);\n\t\t}\n\t\treturn customTableButtons;\n\t}\n\n\teditOnClick(propertyId) {\n\t\tif (this.editOnClickCallback) {\n\t\t\tthis.editOnClickCallback(propertyId);\n\t\t}\n\t}\n\n\t// Toggle the checked state checkboxes in the column,\n\t// ensuring that only enabled and visible controls are updated\n\tselectAllRows(colIndex, evt, { checked, id }) {\n\t\tconst controlValue = this.props.value;\n\t\tif (Array.isArray(controlValue)) {\n\t\t\tfor (let i = 0; i < controlValue.length; i++) {\n\t\t\t\tconst propertyId = {\n\t\t\t\t\tname: this.props.control.name,\n\t\t\t\t\trow: i,\n\t\t\t\t\tcol: colIndex\n\t\t\t\t};\n\t\t\t\tif (this.props.controller.getControlState(propertyId) !== STATES.DISABLED && this.props.controller.getControlState(propertyId) !== STATES.HIDDEN) {\n\t\t\t\t\tthis.props.controller.updatePropertyValue(propertyId, checked);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Returns true if all checkboxes in a given column are in the checked state,\n\t// excluding any disabled or hidden checkboxes.\n\tareAllRowsChecked(colIndex) {\n\t\tconst controlValue = this.props.value;\n\t\tif (Array.isArray(controlValue)) {\n\t\t\tif (controlValue.length === 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor (let i = 0; i < controlValue.length; i++) {\n\t\t\t\tconst propertyId = {\n\t\t\t\t\tname: this.props.control.name,\n\t\t\t\t\trow: i,\n\t\t\t\t\tcol: colIndex\n\t\t\t\t};\n\t\t\t\tif (this.props.controller.getControlState(propertyId) !== STATES.DISABLED &&\n\t\t\t\t\tthis.props.controller.getControlState(propertyId) !== STATES.HIDDEN &&\n\t\t\t\t\t!controlValue[i][colIndex]) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tdisabledAll(colIndex) {\n\t\tconst controlValue = this.props.value;\n\t\tif (Array.isArray(controlValue)) {\n\t\t\tif (controlValue.length === 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor (const rowValue of controlValue) {\n\t\t\t\tif (rowValue[colIndex] === false) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tcreateTable(tableState, tableButtonConfig, customButtons) {\n\t\tconst rows = [];\n\t\tconst sortFields = [];\n\t\tconst filterFields = [];\n\t\tthis.filterFields = filterFields;\n\n\t\tconst headers = this.makeHeader(sortFields, filterFields);\n\t\tconst showHeader = this.props.control.header !== false;\n\n\t\tconst controlValue = this.props.value;\n\t\tthis.makeCells(rows, controlValue, tableState);\n\n\t\tconst tableLabel = this.props.control?.label?.text || \"\";\n\t\tconst tableToolbar = this.makeTableToolbar(this.props.selectedRows, tableLabel);\n\t\tlet topRightPanel = null;\n\t\tif (this.props.selectedRows.length > 0 && tableToolbar) {\n\t\t\ttopRightPanel = tableToolbar;\n\t\t} else if (customButtons) {\n\t\t\ttopRightPanel = this.makeCustomButtonsPanel(tableState, customButtons, tableLabel);\n\t\t} else if (this.isReadonlyTable()) {\n\t\t\tif (!this.props.hideEditButton) {\n\t\t\t\ttopRightPanel = this.makeEditButtonPanel(tableState, tableButtonConfig);\n\t\t\t}\n\t\t} else if (this.props.addRemoveRows) {\n\t\t\ttopRightPanel = this.makeAddButtonPanel(tableState, tableButtonConfig);\n\t\t}\n\n\t\tlet rowToScrollTo;\n\t\tif (Number.isInteger(this.scrollToRow) && rows.length > this.scrollToRow) {\n\t\t\trowToScrollTo = this.scrollToRow;\n\t\t\tdelete this.scrollToRow;\n\t\t}\n\n\t\t// ReadonlyTable with single row selection is non-interactive. rowClickCallback should be undefined.\n\t\tlet rowClickCallback;\n\t\tconst singleRowSelectionReadonlyTable = this.isReadonlyTable() && this.props.control.rowSelection === ROW_SELECTION.SINGLE;\n\t\tif (!singleRowSelectionReadonlyTable) {\n\t\t\trowClickCallback = this.props.control.rowSelection === ROW_SELECTION.SINGLE ? this.handleRowClick : this.updateRowSelections;\n\t\t}\n\n\t\tconst table =\t(\n\t\t\t<FlexibleTable\n\t\t\t\tenableTanstackTable={this.props.controller.getPropertiesConfig().enableTanstackTable}\n\t\t\t\tsortable={sortFields}\n\t\t\t\tfilterable={filterFields}\n\t\t\t\tcolumns={headers}\n\t\t\t\tdata={rows}\n\t\t\t\tshowHeader={showHeader}\n\t\t\t\tscrollToRow={rowToScrollTo}\n\t\t\t\tonFilter={this.onFilter}\n\t\t\t\tonSort={this.onSort}\n\t\t\t\ttopRightPanel={topRightPanel}\n\t\t\t\tscrollKey={this.props.control.name}\n\t\t\t\ttableState={tableState}\n\t\t\t\tmessageInfo={this.props.controller.getErrorMessage(this.props.propertyId)}\n\t\t\t\trows={this.props.control.rows}\n\t\t\t\ttableLabel={tableLabel}\n\t\t\t\tupdateRowSelections={rowClickCallback}\n\t\t\t\tselectedRows= {this.props.selectedRows}\n\t\t\t\trowSelection={this.props.control.rowSelection}\n\t\t\t\tlight={this.isLightTheme()}\n\t\t\t\temptyTablePlaceholder={this.props.control.additionalText}\n\t\t\t/>);\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t{table}\n\t\t\t</div>\n\t\t);\n\t}\n\n\tmakeHeader(sortFields, filterFields) {\n\t\tconst headers = [];\n\t\tfor (let j = 0; j < this.props.control.subControls.length; j++) {\n\t\t\tconst columnDef = this.props.control.subControls[j];\n\t\t\t// See if the entire column is disabled\n\t\t\tconst colState = this.props.controller.getControlState({ name: this.props.control.name, col: j });\n\t\t\tconst disabled = colState === STATES.DISABLED || colState === STATES.HIDDEN;\n\t\t\tconst columnLabel = (columnDef.controlType === ControlType.CHECKBOX)\n\t\t\t\t? (\n\t\t\t\t\t<Checkbox\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tid={`properties-at-header-cb-${this.uuid}-${this.props.control.name}=${j}`}\n\t\t\t\t\t\tchecked={this.areAllRowsChecked(j)}\n\t\t\t\t\t\tonChange={this.selectAllRows.bind(this, j)}\n\t\t\t\t\t\tlabelText={columnDef.label.text}\n\t\t\t\t\t/>) : columnDef.label.text;\n\t\t\tif (columnDef.visible && columnDef.controlType !== ControlType.HIDDEN) {\n\t\t\t\tif (columnDef.sortable) {\n\t\t\t\t\tsortFields.push(columnDef.name);\n\t\t\t\t}\n\t\t\t\theaders.push({\n\t\t\t\t\t\"key\": columnDef.name,\n\t\t\t\t\t\"label\": columnLabel,\n\t\t\t\t\t\"width\": columnDef.width,\n\t\t\t\t\t\"description\": (columnDef.description ? columnDef.description.text : null),\n\t\t\t\t\t\"resizable\": columnDef.resizable ? columnDef.resizable : false,\n\t\t\t\t\t\"operation\": (columnDef.generatedValues && columnDef.generatedValues.operation ? columnDef.generatedValues.operation : null),\n\t\t\t\t\t\"disabled\": disabled\n\t\t\t\t});\n\t\t\t\tif (columnDef.filterable) {\n\t\t\t\t\tfilterFields.push(columnDef.name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// subpanel column will always be empty for ReadonlyTable control based on condition in makeCells()\n\t\tif (this.props.control.childItem && !this.isReadonlyTable()) {\n\t\t\t// set to specific size. Exclude this column from resizing.\n\t\t\theaders.push({ \"key\": \"subpanel\", \"label\": \"\", \"width\": TABLE_SUBPANEL_BUTTON_WIDTH, \"staticWidth\": true });\n\t\t}\n\t\tif (this.props.control.rowSelection === ROW_SELECTION.SINGLE) {\n\t\t\theaders.push({ \"key\": \"deleteRow\", \"label\": \"\", \"width\": TABLE_SUBPANEL_BUTTON_WIDTH, \"staticWidth\": true });\n\t\t}\n\t\treturn headers;\n\t}\n\n\tmakeCells(rows, controlValue, tableState, propName, selectSummaryRow) {\n\t\tif (!Array.isArray(controlValue)) {\n\t\t\treturn;\n\t\t}\n\t\tconst propertyName = propName ? propName : this.props.control.name;\n\t\tfor (let rowIndex = 0; rowIndex < controlValue.length; rowIndex++) {\n\t\t\tconst columns = [];\n\t\t\tthis.onPanelContainer[rowIndex] = [];\n\t\t\tif (this.includeInFilter(rowIndex) || selectSummaryRow) {\n\t\t\t\tfor (var colIndex = 0; colIndex < this.props.control.subControls.length; colIndex++) {\n\t\t\t\t\tconst columnDef = this.props.control.subControls[colIndex];\n\t\t\t\t\t// we need to build the on-panel container so that when the row is selected and a not visible column is on-panel\n\t\t\t\t\t// the on-panel container will be available for display.\n\t\t\t\t\tif (columnDef.visible || columnDef.editStyle === EditStyle.ON_PANEL) {\n\t\t\t\t\t\tconst content = this._makeCell(columnDef, controlValue, propertyName, rowIndex,\n\t\t\t\t\t\t\tcolIndex, tableState, selectSummaryRow);\n\t\t\t\t\t\t// only add content if column is visible\n\t\t\t\t\t\tif (columnDef.visible) {\n\t\t\t\t\t\t\tcolumns.push(content);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (this.props.control.childItem && !selectSummaryRow && !this.isReadonlyTable()) {\n\t\t\t\t\tconst cell = this.buildChildItem(propertyName, rowIndex, tableState);\n\t\t\t\t\tcolumns.push(cell);\n\t\t\t\t}\n\t\t\t\t// Do not show delete icon if add_remove_rows is false (default is true)\n\t\t\t\tif (this.props.control.rowSelection === ROW_SELECTION.SINGLE && !this.isReadonlyTable() && this.props.addRemoveRows) {\n\t\t\t\t\tconst toolTip = PropertyUtils.formatMessage(this.reactIntl, MESSAGE_KEYS.TABLE_DELETEICON_TOOLTIP);\n\t\t\t\t\tconst tooltipId = \"tooltip-delete-row\";\n\t\t\t\t\tconst deleteOption = (\n\t\t\t\t\t\t<Tooltip\n\t\t\t\t\t\t\tid={tooltipId}\n\t\t\t\t\t\t\ttip={toolTip}\n\t\t\t\t\t\t\tdirection=\"left\"\n\t\t\t\t\t\t\tclassName=\"properties-tooltips icon-tooltip\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tkind=\"ghost\"\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tclassName=\"delete-button\"\n\t\t\t\t\t\t\t\thasIconOnly\n\t\t\t\t\t\t\t\tonClick={this.removeSelected}\n\t\t\t\t\t\t\t\trenderIcon={TrashCan}\n\t\t\t\t\t\t\t\ticonDescription={toolTip}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t);\n\t\t\t\t\tconst deleteRow = {\n\t\t\t\t\t\tcolumn: \"deleteRow\",\n\t\t\t\t\t\twidth: TABLE_SUBPANEL_BUTTON_WIDTH,\n\t\t\t\t\t\tcontent: deleteOption\n\t\t\t\t\t};\n\t\t\t\t\tcolumns.push(deleteRow);\n\t\t\t\t}\n\t\t\t\trows.push({\n\t\t\t\t\tcolumns: columns\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tbuildChildItem(propName, rowIndex, tableState) {\n\t\t// Assumes the child item is an \"ADDITIONAL_LINK\" object.\n\t\t// However, we will extract information from the and will create our own Cell-based invoker.\n\t\tconst childPropertyId = { name: propName, row: rowIndex };\n\t\tconst parentPropertyId = cloneDeep(this.props.propertyId);\n\n\t\tlet propertyId = childPropertyId;\n\t\t// If childPropertyId name does not match the parent, then this is a subControl\n\t\tif (parentPropertyId.name !== childPropertyId.name) {\n\t\t\tpropertyId = this.props.controller.setChildPropertyId(parentPropertyId, childPropertyId);\n\t\t}\n\n\t\tconst subItemButton = this.props.buildUIItem(rowIndex, this.props.control.childItem, propertyId, this.indexOfColumn);\n\t\t// When 2+ rows are selected, disable edit icon in the selected rows to prompt the users to click on Edit icon in the table toolbar\n\t\tconst disableSubPanelCell = (tableState === STATES.DISABLED || (this.isSelectSummaryEdit(this.props.selectedRows) && this.props.selectedRows.includes(rowIndex)));\n\t\t// Hack to decompose the button into our own in-table link\n\t\tconst subCell = (\n\t\t\t<div className=\"properties-table-subcell\">\n\t\t\t\t<SubPanelCell\n\t\t\t\t\tlabel={subItemButton.props.label}\n\t\t\t\t\ttitle={subItemButton.props.title}\n\t\t\t\t\tpanel={subItemButton.props.panel}\n\t\t\t\t\tdisabled={disableSubPanelCell}\n\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\tpropertyId={this.props.propertyId}\n\t\t\t\t\trightFlyout={this.props.rightFlyout}\n\t\t\t\t/>\n\t\t\t</div>);\n\t\treturn {\n\t\t\tcolumn: \"subpanel\",\n\t\t\twidth: TABLE_SUBPANEL_BUTTON_WIDTH,\n\t\t\tcontent: subCell\n\t\t};\n\t}\n\n\t// Multi select edit subpanel to update all selected rows\n\tbuildMultiSelectEditChildItem(multiSelectEditRowPropertyId) {\n\t\tconst multiSelectEditSubItemButton = this.props.buildUIItem(0, this.props.control.multiSelectEditChildItem, multiSelectEditRowPropertyId, this.indexOfColumn);\n\t\treturn multiSelectEditSubItemButton.props.panel;\n\t}\n}\n\nAbstractTable.propTypes = {\n\tbuildUIItem: PropTypes.func,\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\topenFieldPicker: PropTypes.func.isRequired,\n\trightFlyout: PropTypes.bool,\n\tvalue: PropTypes.array, // pass in by redux\n\tselectedRows: PropTypes.array, // set by redux\n\taddRemoveRows: PropTypes.bool, // set by redux\n\ttableButtons: PropTypes.object, // set in by redux\n\thideEditButton: PropTypes.bool, // set by redux\n\treadOnly: PropTypes.bool\n};\n\nAbstractTable.defaultProps = {\n\taddRemoveRows: true,\n\thideEditButton: false,\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { formatMessage } from \"./../../util/property-utils\";\nimport { MESSAGE_KEYS } from \"./../../constants/constants\";\nimport { ControlType } from \"./../../constants/form-constants\";\nimport { Add, Edit } from \"@carbon/react/icons\";\nimport { Button } from \"@carbon/react\";\n\nexport default class EmptyTable extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.getEmptyTableText = this.getEmptyTableText.bind(this);\n\t\tthis.isReadonlyTable = this.isReadonlyTable.bind(this);\n\t}\n\n\tgetEmptyTableText() {\n\t\t// Empty table text can be customized\n\t\tconst overrideEmptyTableTextKey = `${this.props.control.name}.empty.table.text`;\n\t\tconst defaultEmptyTableText = formatMessage(\n\t\t\tthis.props.controller.getReactIntl(),\n\t\t\tMESSAGE_KEYS.PROPERTIES_EMPTY_TABLE_TEXT,\n\t\t\t{ button_label: this.props.emptyTableButtonLabel }\n\t\t);\n\t\treturn this.props.controller.getResource(overrideEmptyTableTextKey, defaultEmptyTableText);\n\t}\n\n\tisReadonlyTable() {\n\t\treturn this.props.control.controlType === ControlType.READONLYTABLE;\n\t}\n\n\trender() {\n\t\tconst emptyTableText = this.getEmptyTableText();\n\t\tconst emptyTableContent = (\n\t\t\t<div className=\"properties-empty-table\" disabled={this.props.disabled}>\n\t\t\t\t<span aria-disabled={this.props.disabled}>{emptyTableText}</span>\n\t\t\t\t<br />\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"properties-empty-table-button\"\n\t\t\t\t\tkind=\"tertiary\"\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\trenderIcon={this.isReadonlyTable() ? Edit : Add}\n\t\t\t\t\tonClick={this.props.emptyTableButtonClickHandler}\n\t\t\t\t\tdisabled={this.props.disabled}\n\t\t\t\t>\n\t\t\t\t\t{this.props.emptyTableButtonLabel}\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t);\n\t\treturn emptyTableContent;\n\t}\n}\n\nEmptyTable.propTypes = {\n\tcontrol: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\temptyTableButtonLabel: PropTypes.string,\n\temptyTableButtonClickHandler: PropTypes.func,\n\tdisabled: PropTypes.bool,\n};\n","/*\n * Copyright 2017-2026 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport NumberfieldControl from \"./../numberfield\";\nimport TextfieldControl from \"./../textfield\";\nimport AbstractTable from \"./../abstract-table.jsx\";\nimport FlexibleTable from \"./../../components/flexible-table\";\nimport EmptyTable from \"../../components/empty-table/empty-table.jsx\";\nimport TableToolbar from \"./../../components/table-toolbar\";\nimport ValidationMessage from \"./../../components/validation-message\";\nimport { formatMessage } from \"./../../util/property-utils\";\nimport { getDataId } from \"./../../util/control-utils\";\nimport { MESSAGE_KEYS, STATES } from \"./../../constants/constants.js\";\nimport { Type } from \"./../../constants/form-constants.js\";\nimport { isEmpty } from \"lodash\";\nimport classNames from \"classnames\";\n\nconst NUMBER_TYPES = [Type.INTEGER, Type.DOUBLE, Type.LONG];\nclass ListControl extends AbstractTable {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.addRow = this.addRow.bind(this);\n\t\tthis.reactIntl = props.controller.getReactIntl();\n\t}\n\n\taddRow() {\n\t\tconst controlPropType = this.props.controller.getControlPropType(this.props.propertyId);\n\t\tconst newRow = NUMBER_TYPES.indexOf(controlPropType) > -1 ? null : \"\";\n\n\t\t// Handle case where no currentValue or default is defined.\n\t\tlet currentValue = this.props.controller.getPropertyValue(this.props.propertyId);\n\t\tif (typeof currentValue === \"undefined\") {\n\t\t\tcurrentValue = [];\n\t\t}\n\n\t\tconst rows = currentValue.concat([newRow]);\n\t\tthis.setCurrentControlValueSelected(rows);\n\t}\n\n\tmakeCell(control, propertyId, controlPropType, listHeader) {\n\t\tif (NUMBER_TYPES.indexOf(controlPropType) > -1) {\n\t\t\treturn (<div className=\"properties-table-cell-control\">\n\t\t\t\t<NumberfieldControl\n\t\t\t\t\tcontrol={control}\n\t\t\t\t\tpropertyId={propertyId}\n\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\tcontrolItem={listHeader}\n\t\t\t\t\ttableControl\n\t\t\t\t\treadOnly={this.props.readOnly}\n\t\t\t\t/>\n\t\t\t</div>);\n\t\t}\n\t\treturn (<div className=\"properties-table-cell-control\">\n\t\t\t<TextfieldControl\n\t\t\t\tcontrol={control}\n\t\t\t\tpropertyId={propertyId}\n\t\t\t\tcontroller={this.props.controller}\n\t\t\t\tcontrolItem={listHeader}\n\t\t\t\ttableControl\n\t\t\t\treadOnly={this.props.readOnly}\n\t\t\t/>\n\t\t</div>);\n\t}\n\n\tmakeRows(controlValue, tableState, tableHeaders) {\n\t\tconst rows = [];\n\t\tif (controlValue) {\n\t\t\tfor (var rowIndex = 0; rowIndex < controlValue.length; rowIndex++) {\n\t\t\t\tconst columns = [];\n\n\t\t\t\tlet propertyId = { name: this.props.control.name, row: rowIndex };\n\t\t\t\t// If props propertyId name is different, then this list is in a structure\n\t\t\t\tif (this.props.propertyId.name !== propertyId.name) {\n\t\t\t\t\tconst parentPropertyId = Object.assign({}, this.props.propertyId);\n\t\t\t\t\tpropertyId = this.props.controller.setChildPropertyId(parentPropertyId, { name: this.props.control.name, row: rowIndex });\n\t\t\t\t}\n\n\t\t\t\tconst controlPropType = this.props.controller.getControlPropType(propertyId);\n\t\t\t\tconst control = {};\n\t\t\t\t// Assuming list control has only 2 columns\n\t\t\t\tconst listHeader = (typeof tableHeaders === \"undefined\" || tableHeaders.length === 0) ? \"\" : tableHeaders[0].label;\n\t\t\t\tconst cellContent = this.makeCell(control, propertyId, controlPropType, listHeader);\n\t\t\t\tcolumns.push({\n\t\t\t\t\tkey: rowIndex + \"-0-value\",\n\t\t\t\t\tcolumn: \"value\",\n\t\t\t\t\tcontent: cellContent\n\t\t\t\t});\n\t\t\t\trows.push({\n\t\t\t\t\tkey: rowIndex,\n\t\t\t\t\tonClickCallback: this.handleRowClick.bind(this, rowIndex, false),\n\t\t\t\t\tcolumns: columns,\n\t\t\t\t\tclassName: \"list-table-row\"\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn rows;\n\t}\n\n\tmakeHeader() {\n\t\tconst headers = [];\n\t\theaders.push({\n\t\t\t\"key\": \"value\",\n\t\t\t\"label\": formatMessage(this.reactIntl, MESSAGE_KEYS.LIST_TABLE_LABEL),\n\t\t\t\"description\": (null) });\n\t\treturn headers;\n\t}\n\n\tmakeTableToolbar(tableLabel) {\n\t\tif (this.props.addRemoveRows || this.props.control?.moveableRows) {\n\t\t\treturn (\n\t\t\t\t<TableToolbar\n\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\tpropertyId={this.props.propertyId}\n\t\t\t\t\tselectedRows={this.props.selectedRows}\n\t\t\t\t\ttableState={this.props.state}\n\t\t\t\t\ttableLabel={tableLabel}\n\t\t\t\t\taddRemoveRows={this.props.addRemoveRows}\n\t\t\t\t\tmoveableRows={this.props.control?.moveableRows}\n\t\t\t\t\tremoveSelectedRows={this.removeSelected}\n\t\t\t\t\tsetScrollToRow={this.setScrollToRow}\n\t\t\t\t\tsetCurrentControlValueSelected={this.setCurrentControlValueSelected}\n\t\t\t\t\tisReadonlyTable={false}\n\t\t\t\t\tisSingleSelectTable={false}\n\t\t\t\t\tsmallFlyout={this.props.rightFlyout && this.props.controller.getEditorSize() === \"small\"}\n\t\t\t\t\tcontainingDivId={getDataId(this.props.propertyId)}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tconst headers = this.makeHeader();\n\n\t\tconst tableButtonConfig = {\n\t\t\taddButtonLabel: formatMessage(this.props.controller.getReactIntl(),\n\t\t\t\tMESSAGE_KEYS.STRUCTURELISTEDITOR_ADDBUTTON_LABEL),\n\t\t\taddButtonFunction: this.addRow\n\t\t};\n\n\t\tconst rows = this.makeRows(this.props.value, this.props.state, headers);\n\t\tconst tableLabel = this.props.control?.label?.text || \"\";\n\t\tconst tableToolbar = this.makeTableToolbar(tableLabel);\n\t\tconst topRightPanel = (this.props.selectedRows.length > 0 && tableToolbar) ? tableToolbar : this.makeAddButtonPanel(this.props.state, tableButtonConfig);\n\t\tlet rowToScrollTo;\n\t\tif (Number.isInteger(this.scrollToRow) && rows.length > this.scrollToRow) {\n\t\t\trowToScrollTo = this.scrollToRow;\n\t\t\tdelete this.scrollToRow;\n\t\t}\n\t\tconst tableClassName = classNames(\"properties-list-table\", { \"disabled\": this.props.state === STATES.DISABLED });\n\n\t\tconst table =\t(\n\t\t\t<FlexibleTable\n\t\t\t\tenableTanstackTable={this.props.controller.getPropertiesConfig().enableTanstackTable}\n\t\t\t\tcolumns={headers}\n\t\t\t\tdata={rows}\n\t\t\t\tscrollToRow={rowToScrollTo}\n\t\t\t\ttopRightPanel={topRightPanel}\n\t\t\t\tscrollKey={this.props.control.name}\n\t\t\t\ttableState={this.props.state}\n\t\t\t\tmessageInfo={this.props.messageInfo}\n\t\t\t\trows={this.props.control.rows}\n\t\t\t\ttableLabel={tableLabel}\n\t\t\t\tselectedRows={this.props.selectedRows}\n\t\t\t\trowSelection={this.props.control.rowSelection}\n\t\t\t\tupdateRowSelections={this.updateRowSelections}\n\t\t\t\tlight={this.props.controller.getLight() && this.props.control.light}\n\t\t\t\temptyTablePlaceholder={this.props.control.additionalText}\n\t\t\t\treadOnly={this.props.readOnly}\n\t\t\t/>);\n\n\t\tconst tableContainer = (<div>\n\t\t\t<div className={tableClassName}>\n\t\t\t\t{table}\n\t\t\t</div>\n\t\t\t<ValidationMessage state={this.props.state} messageInfo={this.props.messageInfo} />\n\t\t</div>);\n\n\t\treturn (\n\t\t\t<div data-id={getDataId(this.props.propertyId)} id={getDataId(this.props.propertyId)} className=\"properties-list-control\" >\n\t\t\t\t{this.props.controlItem}\n\t\t\t\t{\n\t\t\t\t\tisEmpty(this.props.value) && this.props.addRemoveRows\n\t\t\t\t\t\t? (\n\t\t\t\t\t\t\t<EmptyTable\n\t\t\t\t\t\t\t\tcontrol={this.props.control}\n\t\t\t\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\t\t\t\temptyTableButtonLabel={tableButtonConfig.addButtonLabel}\n\t\t\t\t\t\t\t\temptyTableButtonClickHandler={this.addRow}\n\t\t\t\t\t\t\t\tdisabled={this.props.state === STATES.DISABLED}\n\t\t\t\t\t\t\t/>)\n\t\t\t\t\t\t: tableContainer\n\t\t\t\t}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nListControl.propTypes = {\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrolItem: PropTypes.element,\n\trightFlyout: PropTypes.bool,\n\tselectedRows: PropTypes.array, // set by redux\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.array, // pass in by redux\n\tmessageInfo: PropTypes.object, // pass in by redux\n\taddRemoveRows: PropTypes.bool, // set by redux\n\ttableButtons: PropTypes.object, // set in by redux\n\treadOnly: PropTypes.bool\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId),\n\tselectedRows: ownProps.controller.getSelectedRows(ownProps.propertyId),\n\taddRemoveRows: ownProps.controller.getAddRemoveRows(ownProps.propertyId),\n\ttableButtons: ownProps.controller.getTableButtons(ownProps.propertyId)\n});\n\nexport default connect(mapStateToProps)(ListControl);\n","var arrayPush = require('./_arrayPush'),\n baseFlatten = require('./_baseFlatten'),\n copyArray = require('./_copyArray'),\n isArray = require('./isArray');\n\n/**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\nfunction concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n}\n\nmodule.exports = concat;\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Add } from \"@carbon/react/icons\";\nimport { Button } from \"@carbon/react\";\nimport { Switch, ContentSwitcher, Dropdown, Layer } from \"@carbon/react\";\nimport FlexibleTable from \"./../../../components/flexible-table/flexible-table\";\nimport TruncatedContentTooltip from \"./../../../components/truncated-content-tooltip\";\nimport { MESSAGE_KEYS, EXPRESSION_TABLE_ROWS, SORT_DIRECTION, ROW_SELECTION } from \"./../../../constants/constants\";\nimport { formatMessage } from \"./../../../util/property-utils\";\nimport { sortBy, get } from \"lodash\";\nimport { v4 as uuid4 } from \"uuid\";\n\nconst FIELDS_SPECIAL_CHARACTERS_REGEX = new RegExp(\"[0-9- _$]\", \"g\");\n\nexport default class ExpressionSelectFieldOrFunction extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.uuid = uuid4();\n\t\tthis.reactIntl = props.controller.getReactIntl();\n\t\tthis.valueColumn = formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_VALUE_COLUMN);\n\t\tthis.valueColumnDesc = formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_VALUE_COLUMN_DESCRIPTION);\n\t\tthis.recentUseCat = formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_RECENTLY_USED);\n\t\tthis.recentUseCatInfo = {\n\t\t\tid: this.recentUseCat,\n\t\t\tlocLabel: this.recentUseCat,\n\t\t\tfield_columns: {\n\t\t\t\tadd_column_info: {\n\t\t\t\t\tlocLabel: formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_ADD_COLUMN)\n\t\t\t\t},\n\t\t\t\tfield_column_info: {\n\t\t\t\t\tlocLabel: formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_RECENTLY_USED_COLUMN)\n\t\t\t\t},\n\t\t\t\tvalue_column_info: {\n\t\t\t\t\tlocLabel: this.valueColumn,\n\t\t\t\t\tdescLabel: this.valueColumnDesc\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tthis.inCategories = Object.keys(props.functionList);\n\t\tthis.fields = this._makeDatasetFields(props.controller.getDatasetMetadataFields(), props.controller.getExpressionInfo().fields);\n\t\tthis.resources = get(props.controller.getExpressionInfo(), \"resources\", {});\n\t\tthis.state = {\n\t\t\tfieldSelected: 0,\n\t\t\tvalueSelected: 0,\n\t\t\tfunctionSelected: 0,\n\t\t\tfieldTableSortSpec: null,\n\t\t\tvaluesTableSortSpec: null,\n\t\t\tfunctionTableSortSpec: null,\n\t\t\tfunctionCategory: this.inCategories[0], // set the initial function category to the first one in the list.\n\t\t\tselectedIndex: 0,\n\t\t\tfieldCategory: \"fields\",\n\t\t\tcurrentFieldDataset: this.fields.field_table_info[0].field_value_groups\n\t\t};\n\t\tthis.controller = props.controller;\n\t\tthis.onFunctionCatChange = this.onFunctionCatChange.bind(this);\n\t\tthis.onFieldCatChange = this.onFieldCatChange.bind(this);\n\t\tthis.onFieldFilter = this.onFieldFilter.bind(this);\n\t\tthis.onValueFilter = this.onValueFilter.bind(this);\n\t\tthis.onFunctionFilter = this.onFunctionFilter.bind(this);\n\t\tthis.language = props.language;\n\n\t\tthis.onFieldTableClick = this.onFieldTableClick.bind(this);\n\t\tthis.onAddFieldClick = this.onAddFieldClick.bind(this);\n\t\tthis.onFunctionTableClick = this.onFunctionTableClick.bind(this);\n\t\tthis.onAddFunctionClick = this.onAddFunctionClick.bind(this);\n\t\tthis.onValueTableClick = this.onValueTableClick.bind(this);\n\t\tthis.onAddValueClick = this.onAddValueClick.bind(this);\n\n\t\tthis.sortTableRows = this.sortTableRows.bind(this);\n\t\tthis.shouldQuoteField = this.shouldQuoteField.bind(this);\n\t}\n\n\tonSwitch(switchName, evt) {\n\t\tthis.setState({\n\t\t\tselectedIndex: switchName.index\n\t\t});\n\t}\n\n\tonFunctionCatChange(evt) {\n\t\tthis.setState({\n\t\t\tfunctionCategory: evt.selectedItem.value,\n\t\t\tfunctionSelected: 0\n\t\t});\n\t}\n\n\tonFieldCatChange(evt) {\n\t\tlet currentData = [];\n\t\tif (evt.selectedItem.value === this.recentUseCat) {\n\t\t\tcurrentData = this.props.controller.getExpressionFieldsRecentlyUsed();\n\t\t} else {\n\t\t\tfor (let index = 0; index < this.fields.field_table_info.length; index++) {\n\t\t\t\tif (evt.selectedItem.value === this.fields.field_table_info[index].id) {\n\t\t\t\t\tcurrentData = this.fields.field_table_info[index].field_value_groups;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.setState({\n\t\t\tfieldCategory: evt.selectedItem.value,\n\t\t\tfieldSelected: 0,\n\t\t\tcurrentFieldDataset: currentData\n\t\t});\n\t}\n\n\tonFieldTableClick(row, evt, rowKey) {\n\t\tthis.setState({\n\t\t\tfieldSelected: rowKey,\n\t\t\tvalueSelected: 0\n\t\t});\n\n\t}\n\t// field table - called on row doubleclick & also Add btn click.\n\tonAddFieldClick(evt, rowKey, index) {\n\t\tconst field = this.state.currentFieldDataset[rowKey];\n\t\tlet value = field.id;\n\t\tif (this.state.fieldCategory !== this.recentUseCat) {\n\t\t\tthis.props.controller.updateExpressionFieldsRecentlyUsed(field);\n\t\t}\n\t\tif (this.props.onChange) {\n\t\t\tconst quote = (this.language === \"CLEM\" && this.state.fieldCategory !== \"globals\") ? \"'\" : \"\";\n\t\t\tif (this.shouldQuoteField(field.id)) {\n\t\t\t\tvalue = quote + field.id + quote;\n\t\t\t}\n\t\t\tthis.props.onChange(value);\n\t\t}\n\t}\n\n\tonFieldFilter(filterString) {\n\t\tthis.setState({ fieldFilterText: filterString });\n\t}\n\n\tonValueTableClick(row, evt, rowKey) {\n\t\tthis.setState({\n\t\t\tvalueSelected: rowKey\n\t\t});\n\t}\n\n\t// value table - called on row doubleclick & also Add btn click.\n\tonAddValueClick(evt, rowKey, index) {\n\t\tif (this.props.onChange) {\n\t\t\tconst field = this.state.currentFieldDataset[this.state.fieldSelected];\n\t\t\tconst quote = \"\\\"\";\n\t\t\tif (field.values) {\n\t\t\t\tconst value = field.values[rowKey].value;\n\t\t\t\tconst fieldValue = (typeof value === \"string\") ? quote + value + quote : value;\n\t\t\t\tthis.props.onChange(fieldValue);\n\t\t\t} else if (field.range) {\n\t\t\t\tconst minValue = (typeof field.range.min.value === \"string\") ? (quote + field.range.min.value + quote) : field.range.min.value;\n\t\t\t\tconst maxValue = (typeof field.range.max.value === \"string\") ? (quote + field.range.max.value + quote) : field.range.max.value;\n\t\t\t\tthis.props.onChange(rowKey === 0 ? minValue : maxValue);\n\t\t\t}\n\t\t}\n\t\tthis.setState({\n\t\t\tvalueSelected: rowKey\n\t\t});\n\t}\n\n\tonValueFilter(filterString) {\n\t\tthis.setState({ valueFilterText: filterString });\n\t}\n\n\tonFunctionTableClick(row, evt, rowKey) {\n\t\tthis.setState({\n\t\t\tfunctionSelected: rowKey\n\t\t});\n\t}\n\n\t// function table - called on row doubleclick & also Add btn click.\n\tonAddFunctionClick(evt, rowKey, index) {\n\t\tlet field;\n\t\tif (this.state.functionCategory === this.recentUseCat) {\n\t\t\tfield = this.props.controller.getExpressionRecentlyUsed()[rowKey];\n\t\t} else {\n\t\t\tfield = this.props.functionList[this.state.functionCategory].functionList[rowKey];\n\t\t\tthis.props.controller.updateExpressionRecentlyUsed(field);\n\t\t}\n\t\tconst value = field.value;\n\t\tif (this.props.onChange) {\n\t\t\tthis.props.onChange(value);\n\t\t}\n\t}\n\n\tonFunctionFilter(filterString) {\n\t\tthis.setState({ functionFilterText: filterString });\n\t}\n\n\tsetSortColumn(table, spec) {\n\t\tswitch (table) {\n\t\tcase \"fieldTable\": {\n\t\t\t// const sortedData = this.sortTableRows(this.state.currentFieldDataset, spec);\n\t\t\tthis.setState({ fieldTableSortSpec: spec }); // , currentFieldDataset: sortedData });\n\t\t\tbreak;\n\t\t}\n\t\tcase \"valuesTable\": {\n\t\t\tthis.setState({ valuesTableSortSpec: spec });\n\t\t\tbreak;\n\t\t}\n\t\tcase \"functionTable\": {\n\t\t\tthis.setState({ functionTableSortSpec: spec });\n\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t\t}\n\t}\n\n\tsortTableRows(data, spec) {\n\t\tlet colIdx = 0;\n\n\t\tif (data.length > 0) {\n\t\t\tconst tableColumns = data[0].columns;\n\t\t\tfor (let idx = 0; idx < tableColumns.length; idx++) {\n\t\t\t\tif (tableColumns[idx].column === spec.column) {\n\t\t\t\t\tcolIdx = idx;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst sortedData = sortBy(data, function(row) {\n\t\t\t\treturn row.columns[colIdx].value;\n\t\t\t});\n\t\t\tif (spec.direction === SORT_DIRECTION.DESC) {\n\t\t\t\tsortedData.reverse();\n\t\t\t}\n\t\t\treturn sortedData;\n\t\t}\n\t\treturn data;\n\t}\n\n\t// Determine if field should be quoted - quote if the field name contains special characters\n\tshouldQuoteField(field) {\n\t\treturn field.match(FIELDS_SPECIAL_CHARACTERS_REGEX) !== null;\n\t}\n\n\tcreateContentObject(label) {\n\t\tlet disabled = true;\n\t\tif (label) {\n\t\t\tdisabled = false;\n\t\t}\n\t\tconst expressionTableCellContent = (\n\t\t\t<span className=\"properties-expr-table-cell\">\n\t\t\t\t{label}\n\t\t\t</span>\n\t\t);\n\t\tconst expressionTableCellContentWithTooltip = (\n\t\t\t<TruncatedContentTooltip\n\t\t\t\tcontent={expressionTableCellContent}\n\t\t\t\ttooltipText={label}\n\t\t\t\tdisabled={disabled}\n\t\t\t/>\n\t\t);\n\t\tconst contentObject = (\n\t\t\t<div className=\"properties-table-cell-control\">\n\t\t\t\t{expressionTableCellContentWithTooltip}\n\t\t\t</div>\n\t\t);\n\n\t\treturn contentObject;\n\t}\n\n\tcreateAddButtonContent(index, tableType) {\n\t\tconst addValueButtonContent = (\n\t\t\t<Button\n\t\t\t\tclassName=\"expression-add-field-button properties-expr-table-cell\"\n\t\t\t\tonClick={this.handleAddButtonClick.bind(this, index, tableType)}\n\t\t\t\tkind=\"ghost\"\n\t\t\t\tsize=\"sm\"\n\t\t\t>\n\t\t\t\t{<Add className=\"add-btn-svg\" aria-label={formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_ADD_COLUMN)} />}\n\t\t\t</Button>\n\t\t);\n\t\treturn addValueButtonContent;\n\t}\n\n\thandleAddButtonClick(index, tableType, evt) {\n\t\tswitch (tableType) {\n\t\tcase \"value\": {\n\t\t\tthis.onAddValueClick(evt, index);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"field\": {\n\t\t\tthis.onAddFieldClick(evt, index);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"function\": {\n\t\t\tthis.onAddFunctionClick(evt, index);\n\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t\t}\n\t}\n\n\t_makeDatasetFields(dataset, fieldDataset) {\n\t\tconst addNewColumn = formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_ADD_COLUMN);\n\t\tconst fieldColumn = formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_FIELD_COLUMN);\n\t\tconst fieldColumnDesc = formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_FIELD_COLUMN_DESCRIPTION);\n\t\tconst storageColumn = formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_STORAGE_COLUMN);\n\t\tconst dropdownLabel = formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_FIELDS_DROPDOWN_TITLE);\n\t\tconst fieldsCatInfo = {\n\t\t\tid: \"fields\",\n\t\t\tlocLabel: dropdownLabel,\n\t\t\tfield_columns: {\n\t\t\t\tadd_column_info: {\n\t\t\t\t\tlocLabel: addNewColumn\n\t\t\t\t},\n\t\t\t\tfield_column_info: {\n\t\t\t\t\tlocLabel: fieldColumn,\n\t\t\t\t\tdescLabel: fieldColumnDesc\n\t\t\t\t},\n\t\t\t\tvalue_column_info: {\n\t\t\t\t\tlocLabel: this.valueColumn,\n\t\t\t\t\tdescLabel: this.valueColumnDesc\n\t\t\t\t},\n\t\t\t\tadditional_column_info: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"storage\",\n\t\t\t\t\t\tlocLabel: storageColumn\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t};\n\n\t\tconst fieldsTableInfo = {\n\t\t\tid: \"fields\",\n\t\t\tfield_value_groups: []\n\t\t};\n\t\tdataset.forEach((field) => {\n\t\t\tvar entry = {\n\t\t\t\tid: field.name,\n\t\t\t\tadditional_column_entries: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"storage\",\n\t\t\t\t\t\tvalue: field.type\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t};\n\t\t\tif (field.metadata.values) {\n\t\t\t\tentry.values = [];\n\t\t\t\tfield.metadata.values.forEach((val) => {\n\t\t\t\t\tentry.values.push({ value: val });\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (field.metadata.range) {\n\t\t\t\tentry.range = {};\n\t\t\t\tif (field.metadata.range.min) {\n\t\t\t\t\tentry.range.min = { value: field.metadata.range.min };\n\t\t\t\t}\n\t\t\t\tif (field.metadata.range.max) {\n\t\t\t\t\tentry.range.max = { value: field.metadata.range.max };\n\t\t\t\t}\n\t\t\t}\n\t\t\tfieldsTableInfo.field_value_groups.push(entry);\n\t\t});\n\t\t// if fields already exists in metadata, update it instead of adding it to the front\n\t\tlet catIndex;\n\t\tlet infoIndex;\n\t\tfor (let index = 0; index < fieldDataset.field_categories.length; index++) {\n\t\t\tif (fieldDataset.field_categories[index].id === \"fields\") {\n\t\t\t\tcatIndex = index;\n\t\t\t}\n\t\t}\n\t\tfor (let index = 0; index < fieldDataset.field_table_info.length; index++) {\n\t\t\tif (fieldDataset.field_table_info[index].id === \"fields\") {\n\t\t\t\tinfoIndex = index;\n\t\t\t}\n\t\t}\n\t\tif (typeof catIndex !== \"undefined\") {\n\t\t\tfieldDataset.field_categories[catIndex] = fieldsCatInfo;\n\t\t} else {\n\t\t\tfieldDataset.field_categories.unshift(fieldsCatInfo);\n\t\t}\n\t\tif (typeof infoIndex !== \"undefined\") {\n\t\t\tfieldDataset.field_table_info[infoIndex] = fieldsTableInfo;\n\t\t} else {\n\t\t\tfieldDataset.field_table_info.unshift(fieldsTableInfo);\n\t\t}\n\t\treturn fieldDataset;\n\t}\n\n\n\t_makeFieldAndValuesContent() {\n\t\t// Make field and value tables headers.\n\t\tconst fieldCategory = this._makeFieldDropdown();\n\t\tconst fieldHeaders = [];\n\t\tconst valueHeader = [];\n\t\tconst sortable = [\"fieldName\"];\n\n\t\tlet categoryInfo = null;\n\t\tlet tableContents = null;\n\t\tif (this.state.fieldCategory === this.recentUseCat) {\n\t\t\t// get recently used category info and table contents\n\t\t\tcategoryInfo = this.recentUseCatInfo;\n\t\t\ttableContents = { id: this.recentUseCat, field_value_groups: this.props.controller.getExpressionFieldsRecentlyUsed() };\n\t\t} else {\n\t\t\t// get category info and table contents\n\t\t\tfor (let index = 0; index < this.fields.field_categories.length; index++) {\n\t\t\t\tif (this.state.fieldCategory === this.fields.field_categories[index].id) {\n\t\t\t\t\tcategoryInfo = this.fields.field_categories[index];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (let index = 0; index < this.fields.field_table_info.length; index++) {\n\t\t\t\tif (this.state.fieldCategory === this.fields.field_table_info[index].id) {\n\t\t\t\t\ttableContents = this.fields.field_table_info[index];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (categoryInfo) {\n\t\t\tfieldHeaders.push(\n\t\t\t\t{\n\t\t\t\t\tkey: \"addColumn\",\n\t\t\t\t\tlabel: formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_ADD_COLUMN),\n\t\t\t\t\twidth: \"60px\",\n\t\t\t\t\tstaticWidth: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkey: \"fieldName\",\n\t\t\t\t\tlabel: categoryInfo.field_columns.field_column_info.locLabel,\n\t\t\t\t\tdescription: categoryInfo.field_columns.field_column_info.descLabel,\n\t\t\t\t\tresizable: true\n\t\t\t\t});\n\t\t\tvalueHeader.push(\n\t\t\t\t{\n\t\t\t\t\tkey: \"addColumn\",\n\t\t\t\t\tlabel: formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_ADD_COLUMN),\n\t\t\t\t\twidth: \"60px\",\n\t\t\t\t\tstaticWidth: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkey: \"values\",\n\t\t\t\t\tlabel: categoryInfo.field_columns.value_column_info.locLabel,\n\t\t\t\t\tdescription: categoryInfo.field_columns.value_column_info.descLabel\n\t\t\t\t});\n\t\t\tif (categoryInfo.field_columns.additional_column_info) {\n\t\t\t\tfor (let i = 0; i < categoryInfo.field_columns.additional_column_info.length; i++) {\n\t\t\t\t\tsortable.push(categoryInfo.field_columns.additional_column_info[i].id);\n\t\t\t\t\tfieldHeaders.push({ key: categoryInfo.field_columns.additional_column_info[i].id, label: categoryInfo.field_columns.additional_column_info[i].locLabel });\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\tlet tableData = [];\n\t\tlet valuesTableData = [];\n\t\tif (tableContents && tableContents.field_value_groups) {\n\t\t\tfor (let index = 0; index < tableContents.field_value_groups.length; index++) {\n\t\t\t\tconst field = tableContents.field_value_groups[index];\n\t\t\t\tconst fieldColumns = [];\n\t\t\t\tif (!this.state.fieldFilterText || this.state.fieldFilterText.length === 0 ||\n\t\t\t\t\t(field.id.toLowerCase().indexOf(this.state.fieldFilterText.toLowerCase()) > -1)) {\n\t\t\t\t\tfieldColumns.push({ column: \"addColumn\", content: this.createAddButtonContent(index, \"field\"), value: field.id },\n\t\t\t\t\t\t{ column: \"fieldName\", content: this.createContentObject(field.id), value: field.id });\n\t\t\t\t\tif (field.additional_column_entries) {\n\t\t\t\t\t\tthis._makeAdditionalColumnsContent(field, fieldColumns);\n\t\t\t\t\t}\n\t\t\t\t\ttableData.push({ columns: fieldColumns, rowKey: index });\n\t\t\t\t\tif (index === this.state.fieldSelected) {\n\t\t\t\t\t\tvaluesTableData = this._makeValuesContent(field, valuesTableData);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// set the selected row and adjust if the table is sorted.\n\t\tlet selectedField = this.state.fieldSelected;\n\t\tif (this.state.fieldTableSortSpec !== null) {\n\t\t\ttableData = this.sortTableRows(tableData, this.state.fieldTableSortSpec);\n\t\t\tselectedField = tableData.findIndex((row) => row.rowKey === this.state.fieldSelected);\n\t\t}\n\n\t\t// set the selected row and adjust if the table is sorted.\n\t\tlet selectedValue = this.state.valueSelected;\n\t\tif (this.state.valuesTableSortSpec !== null) {\n\t\t\tvaluesTableData = this.sortTableRows(valuesTableData, this.state.valuesTableSortSpec);\n\t\t\tselectedValue = valuesTableData.findIndex((row) => row.rowKey === this.state.valueSelected);\n\t\t}\n\n\t\tconst fieldsTableLabel = formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_FIELDS_TABLE_LABEL);\n\t\tconst valuesTableLabel = formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_VALUES_TABLE_LABEL);\n\t\tconst emptyFieldsLabel = get(this.resources, MESSAGE_KEYS.EXPRESSION_FIELDS_EMPTY_TABLE_LABEL,\n\t\t\tformatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_FIELDS_EMPTY_TABLE_LABEL));\n\t\tconst emptyValuesLabel = get(this.resources, MESSAGE_KEYS.EXPRESSION_VALUES_EMPTY_TABLE_LABEL,\n\t\t\tformatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_VALUES_EMPTY_TABLE_LABEL));\n\n\t\treturn (\n\t\t\t<div className=\"properties-field-and-values-table-container\" >\n\t\t\t\t{fieldCategory}\n\t\t\t\t<div className=\"properties-field-table-container expression-builder-table\" >\n\t\t\t\t\t<FlexibleTable\n\t\t\t\t\t\tenableTanstackTable={this.props.controller.getPropertiesConfig().enableTanstackTable}\n\t\t\t\t\t\tcolumns={fieldHeaders}\n\t\t\t\t\t\tdata={tableData}\n\t\t\t\t\t\tsortable={sortable}\n\t\t\t\t\t\tfilterable={[\"fieldName\"]}\n\t\t\t\t\t\tonFilter={this.onFieldFilter}\n\t\t\t\t\t\trows={EXPRESSION_TABLE_ROWS}\n\t\t\t\t\t\ttableLabel={fieldsTableLabel}\n\t\t\t\t\t\trowSelection={ROW_SELECTION.SINGLE}\n\t\t\t\t\t\tupdateRowSelections={this.onFieldTableClick}\n\t\t\t\t\t\tonRowDoubleClick={this.onAddFieldClick}\n\t\t\t\t\t\tselectedRows={[selectedField]}\n\t\t\t\t\t\tonSort={this.setSortColumn.bind(this, \"fieldTable\")}\n\t\t\t\t\t\tlight={!this.props.controller.getLight()}\n\t\t\t\t\t\temptyTablePlaceholder={emptyFieldsLabel}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"properties-value-table-container expression-builder-table\" >\n\t\t\t\t\t<FlexibleTable\n\t\t\t\t\t\tenableTanstackTable={this.props.controller.getPropertiesConfig().enableTanstackTable}\n\t\t\t\t\t\tcolumns={valueHeader}\n\t\t\t\t\t\tdata={valuesTableData}\n\t\t\t\t\t\tsortable={[\"values\"]}\n\t\t\t\t\t\tfilterable={[\"values\"]}\n\t\t\t\t\t\tonFilter={this.onValueFilter}\n\t\t\t\t\t\trows={EXPRESSION_TABLE_ROWS}\n\t\t\t\t\t\ttableLabel={valuesTableLabel}\n\t\t\t\t\t\trowSelection={ROW_SELECTION.SINGLE}\n\t\t\t\t\t\tupdateRowSelections={this.onValueTableClick}\n\t\t\t\t\t\tonRowDoubleClick={this.onAddValueClick}\n\t\t\t\t\t\tselectedRows={[selectedValue]}\n\t\t\t\t\t\tonSort={this.setSortColumn.bind(this, \"valuesTable\")}\n\t\t\t\t\t\tlight={!this.props.controller.getLight()}\n\t\t\t\t\t\temptyTablePlaceholder={emptyValuesLabel}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\n\t}\n\n\t_makeValuesContent(field, valuesTableData) {\n\t\tconst minLabel = formatMessage(this.reactIntl,\n\t\t\tMESSAGE_KEYS.EXPRESSION_MIN_LABEL);\n\t\tconst maxLabel = formatMessage(this.reactIntl,\n\t\t\tMESSAGE_KEYS.EXPRESSION_MAX_LABEL);\n\t\tif (field.values) {\n\t\t\tfor (let idx = 0; idx < field.values.length; idx++) {\n\t\t\t\tthis._addValueRow(field.values[idx].value, idx, valuesTableData);\n\t\t\t}\n\t\t} else if (field.range) {\n\t\t\tif (field.range.min) {\n\t\t\t\tthis._addValueRow(minLabel + \": \" + field.range.min.value, 0, valuesTableData);\n\t\t\t}\n\t\t\tif (field.range.max) {\n\t\t\t\tthis._addValueRow(maxLabel + \": \" + field.range.max.value, 1, valuesTableData);\n\t\t\t}\n\t\t}\n\t\treturn valuesTableData;\n\t}\n\n\t_addValueRow(content, index, valuesTableData) {\n\t\tif (!this.state.valueFilterText || this.state.valueFilterText.length === 0 ||\n\t\t\t(String(content).toLowerCase()\n\t\t\t\t.indexOf(this.state.valueFilterText.toLowerCase()) > -1)) {\n\t\t\tconst valueColumns = [\n\t\t\t\t{ column: \"addColumn\", content: this.createAddButtonContent(index, \"value\"), value: content },\n\t\t\t\t{ column: \"values\", content: this.createContentObject(content), value: content }];\n\t\t\tvaluesTableData.push({ columns: valueColumns, rowKey: index });\n\t\t}\n\t}\n\n\t_makeFunctionsContent() {\n\t\tif (this.props.functionList) {\n\t\t\tconst categories = Object.keys(this.props.functionList);\n\t\t\tconst selectCategory = this._makeFunctionDropdown(categories);\n\t\t\tconst functionsTable = this._makeFunctionsTable(categories);\n\t\t\treturn (\n\t\t\t\t<div className=\"properties-expression-function-table-container\" >\n\t\t\t\t\t{selectCategory}\n\t\t\t\t\t{functionsTable}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\t\treturn (<span>formatMessage(this.reactIntl,\n\t\t\tMESSAGE_KEYS.EXPRESSION_NO_FUNCTIONS);</span>);\n\t}\n\n\t_makeAdditionalColumnsContent(field, fieldColumns) {\n\t\tfor (let i = 0; i < field.additional_column_entries.length; i++) {\n\t\t\tfieldColumns.push({ column: field.additional_column_entries[i].id,\n\t\t\t\tcontent: this.createContentObject(field.additional_column_entries[i].value), value: field.additional_column_entries[i].value });\n\t\t}\n\t}\n\n\t_makeFunctionDropdown(categories) {\n\t\tlet items = categories.map((val, index) => ({ value: val, label: this.props.functionList[val].locLabel }));\n\t\t// Add \"Recently Used\" category as second category\n\t\tconst first = items.slice(0, 1);\n\t\tconst last = items.slice(1);\n\t\titems = first.concat({ value: this.recentUseCat, label: this.recentUseCat }, last);\n\t\tconst selectedFunctionItem = (this.state.functionCategory === this.recentUseCat) ? this.recentUseCat : this.props.functionList[this.state.functionCategory].locLabel;\n\t\tconst header = formatMessage(this.reactIntl,\n\t\t\tMESSAGE_KEYS.TABLE_SEARCH_HEADER);\n\t\tconst listBoxMenuIconTranslationIds = {\n\t\t\t\"close.menu\": formatMessage(this.reactIntl, MESSAGE_KEYS.DROPDOWN_TOOLTIP_CLOSEMENU),\n\t\t\t\"open.menu\": formatMessage(this.reactIntl, MESSAGE_KEYS.DROPDOWN_TOOLTIP_OPENMENU)\n\t\t};\n\t\treturn (\n\t\t\t<div className=\"properties-expression-function-select\">\n\t\t\t\t<Layer level={this.props.controller.getLight() ? 1 : 0}>\n\t\t\t\t\t<Dropdown\n\t\t\t\t\t\tid={\"properties-expression-function-select-dropdown-\" + this.uuid}\n\t\t\t\t\t\tlabel={formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_FUNCTIONS_DROPDOWN_TITLE)}\n\t\t\t\t\t\tselectedItem={selectedFunctionItem}\n\t\t\t\t\t\titems={items}\n\t\t\t\t\t\tonChange={this.onFunctionCatChange}\n\t\t\t\t\t\ttranslateWithId={(id) => listBoxMenuIconTranslationIds[id]}\n\t\t\t\t\t\ttitleText={header}\n\t\t\t\t\t/>\n\t\t\t\t</Layer>\n\t\t\t</div>);\n\t}\n\n\t_makeFieldDropdown() {\n\t\tconst items = [];\n\t\tlet selectedFieldItemLabel = \"\";\n\t\tconst selectedField = this.fields.field_categories.find((category) => category.id === this.state.fieldCategory);\n\t\tif (selectedField) {\n\t\t\tselectedFieldItemLabel = selectedField.locLabel;\n\t\t}\n\t\tfor (let i = 0; i < this.fields.field_categories.length; i++) {\n\t\t\titems.push({ value: this.fields.field_categories[i].id, label: this.fields.field_categories[i].locLabel });\n\t\t}\n\t\tconst first = items.slice(0, 1);\n\t\tconst last = items.slice(1);\n\t\tconst newItems = first.concat({ value: this.recentUseCat, label: this.recentUseCat }, last);\n\t\tconst selectedFieldItem = (this.state.fieldCategory === this.recentUseCat) ? this.recentUseCat : selectedFieldItemLabel;\n\t\tconst header = formatMessage(this.reactIntl,\n\t\t\tMESSAGE_KEYS.TABLE_SEARCH_HEADER);\n\t\tconst listBoxMenuIconTranslationIds = {\n\t\t\t\"close.menu\": formatMessage(this.reactIntl, MESSAGE_KEYS.DROPDOWN_TOOLTIP_CLOSEMENU),\n\t\t\t\"open.menu\": formatMessage(this.reactIntl, MESSAGE_KEYS.DROPDOWN_TOOLTIP_OPENMENU)\n\t\t};\n\t\treturn (\n\t\t\t<div className=\"properties-expression-field-select\">\n\t\t\t\t<Layer level={this.props.controller.getLight() ? 1 : 0}>\n\t\t\t\t\t<Dropdown\n\t\t\t\t\t\tid={\"properties-expression-field-select-dropdown-\" + this.uuid}\n\t\t\t\t\t\tlabel={formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_FIELDS_DROPDOWN_TITLE)}\n\t\t\t\t\t\tselectedItem={selectedFieldItem}\n\t\t\t\t\t\titems={newItems}\n\t\t\t\t\t\tonChange={this.onFieldCatChange}\n\t\t\t\t\t\ttranslateWithId={(id) => listBoxMenuIconTranslationIds[id]}\n\t\t\t\t\t\ttitleText={header}\n\t\t\t\t\t/>\n\t\t\t\t</Layer>\n\t\t\t</div>);\n\t}\n\n\n\t_makeFunctionsTable(categories) {\n\t\tconst headers = [];\n\t\tconst functionColumn = formatMessage(this.reactIntl,\n\t\t\tMESSAGE_KEYS.EXPRESSION_FUNCTION_COLUMN);\n\t\tconst returnColumn = formatMessage(this.reactIntl,\n\t\t\tMESSAGE_KEYS.EXPRESSION_RETURN_COLUMN);\n\t\tconst addNewColumn = formatMessage(this.reactIntl,\n\t\t\tMESSAGE_KEYS.EXPRESSION_ADD_COLUMN);\n\n\t\theaders.push({ key: \"addColumn\", label: addNewColumn, width: \"60px\", staticWidth: true });\n\t\theaders.push({ key: \"function\", label: functionColumn, width: 50, resizable: true });\n\t\theaders.push({ key: \"return\", label: returnColumn, width: 30 });\n\t\tconst table = this._buildFunctionTable(this.state.functionCategory);\n\n\t\tlet data = table.rows;\n\t\tlet selectedFunction = this.state.functionSelected;\n\t\tif (this.state.functionTableSortSpec !== null) {\n\t\t\tdata = this.sortTableRows(data, this.state.functionTableSortSpec);\n\t\t\tselectedFunction = data.findIndex((row) => row.rowKey === this.state.functionSelected);\n\t\t}\n\t\tconst functionsTableLabel = formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_FUNCTIONS_TABLE_LABEL);\n\t\tconst functionsEmptyLabel = get(this.resources, MESSAGE_KEYS.EXPRESSION_NO_FUNCTIONS,\n\t\t\tformatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_NO_FUNCTIONS));\n\n\t\treturn (\n\t\t\t<div className=\"properties-functions-table-helper-container\">\n\t\t\t\t<div className=\"properties-functions-table-container expression-builder-table\">\n\t\t\t\t\t<div className=\"properties-functions-table\" >\n\t\t\t\t\t\t<FlexibleTable\n\t\t\t\t\t\t\tenableTanstackTable={this.props.controller.getPropertiesConfig().enableTanstackTable}\n\t\t\t\t\t\t\tcolumns={headers}\n\t\t\t\t\t\t\tdata={data}\n\t\t\t\t\t\t\tsortable={[\"function\", \"return\"]}\n\t\t\t\t\t\t\tfilterable={[\"function\"]}\n\t\t\t\t\t\t\tonFilter={this.onFunctionFilter}\n\t\t\t\t\t\t\trows={EXPRESSION_TABLE_ROWS}\n\t\t\t\t\t\t\ttableLabel={functionsTableLabel}\n\t\t\t\t\t\t\trowSelection={ROW_SELECTION.SINGLE}\n\t\t\t\t\t\t\tupdateRowSelections={this.onFunctionTableClick}\n\t\t\t\t\t\t\tonRowDoubleClick={this.onAddFunctionClick}\n\t\t\t\t\t\t\tselectedRows={[selectedFunction]}\n\t\t\t\t\t\t\tonSort={this.setSortColumn.bind(this, \"functionTable\")}\n\t\t\t\t\t\t\tlight={!this.props.controller.getLight()}\n\t\t\t\t\t\t\temptyTablePlaceholder={functionsEmptyLabel}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"properties-help-table-container\" >\n\t\t\t\t\t{table.helpContainer}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t_buildFunctionTable(category) {\n\t\tconst table = { rows: [], helpContainer: (<div />) };\n\t\tconst categoryFunctions = (category === this.recentUseCat) ? this.props.controller.getExpressionRecentlyUsed() : this.props.functionList[category].functionList;\n\t\tif (categoryFunctions) {\n\t\t\tfor (let index = 0; index < categoryFunctions.length; index++) {\n\t\t\t\tconst catFunction = categoryFunctions[index];\n\t\t\t\tconst columns = [];\n\t\t\t\tif (!this.state.functionFilterText || this.state.functionFilterText.length === 0 ||\n\t\t\t\t\t(catFunction.locLabel.toLowerCase().indexOf(this.state.functionFilterText.toLowerCase()) > -1)) {\n\t\t\t\t\tconst returnType = catFunction.locReturnType ? catFunction.locReturnType : catFunction.return_type;\n\t\t\t\t\tcolumns.push({ column: \"addColumn\", content: this.createAddButtonContent(index, \"function\"), value: catFunction.id });\n\t\t\t\t\tcolumns.push({ column: \"function\", content: this.createContentObject(catFunction.locLabel), value: catFunction.locLabel });\n\t\t\t\t\tcolumns.push({ column: \"return\", content: this.createContentObject(returnType), value: returnType });\n\t\t\t\t\ttable.rows.push({ columns: columns, rowKey: index });\n\t\t\t\t\tif (index === this.state.functionSelected) {\n\t\t\t\t\t\ttable.helpContainer = (\n\t\t\t\t\t\t\t<div className=\"properties-function-help-text\" >\n\t\t\t\t\t\t\t\t<span className=\"properties-function-help-command\">{catFunction.locLabel}:</span>\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t<span>{catFunction.help}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn table;\n\t}\n\n\trender() {\n\t\tconst fieldAndValueTable = this._makeFieldAndValuesContent();\n\t\tconst functionsTable = this._makeFunctionsContent();\n\t\tconst fieldsTab = formatMessage(this.reactIntl,\n\t\t\tMESSAGE_KEYS.EXPRESSION_FIELD_TAB);\n\t\tconst functionsTab = formatMessage(this.reactIntl,\n\t\t\tMESSAGE_KEYS.EXPRESSION_FUNCTIONS_TAB);\n\t\tlet content = null;\n\n\t\tif (this.state.selectedIndex === 0) {\n\t\t\tcontent = fieldAndValueTable;\n\t\t} else if (this.state.selectedIndex === 1) {\n\t\t\tcontent = functionsTable;\n\t\t}\n\n\n\t\treturn (\n\t\t\t<div className=\"properties-expression-selection-fieldOrFunction\" >\n\t\t\t\t<div className=\"properties-expression-selection-content-switcher\" >\n\t\t\t\t\t<ContentSwitcher onChange={this.onSwitch.bind(this)} selectedIndex={this.state.selectedIndex}>\n\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\tkey={0}\n\t\t\t\t\t\t\tname={\"expresson-builder-fields-tab\"}\n\t\t\t\t\t\t\tclassName={\"expresson-builder-fields-tab\"}\n\t\t\t\t\t\t\ttext={fieldsTab}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\tkey={1}\n\t\t\t\t\t\t\tname={\"expresson-builder-function-tab\"}\n\t\t\t\t\t\t\tclassName={\"expresson-builder-function-tab\"}\n\t\t\t\t\t\t\ttext={functionsTab}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ContentSwitcher>\n\t\t\t\t</div>\n\t\t\t\t{content}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nExpressionSelectFieldOrFunction.propTypes = {\n\tcontroller: PropTypes.object.isRequired,\n\tonChange: PropTypes.func,\n\tfunctionList: PropTypes.array,\n\tlanguage: PropTypes.string\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Button } from \"@carbon/react\";\n\nimport Tooltip from \"./../../../../tooltip/tooltip\";\nimport classNames from \"classnames\";\n\n\nexport default class ExpressionSelectOperator extends React.Component {\n\tonOperatorClick(value, evt) {\n\t\tif (this.props.onChange) {\n\t\t\tthis.props.onChange(value);\n\t\t}\n\t}\n\n\t_makeOperatorContent() {\n\t\tif (this.props.operatorList) {\n\t\t\tconst operatorButtons = [];\n\t\t\tthis.props.operatorList.forEach((operator, index) => {\n\t\t\t\tconst tooltipId = `tooltip-expression-operator-${index}`;\n\t\t\t\tconst tooltip = (\n\t\t\t\t\t<div className=\"properties-tooltips\">\n\t\t\t\t\t\t{operator.help}\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t\toperatorButtons.push(\n\t\t\t\t\t<div className=\"properties-operator-tooltip-container\" key={\"expression-operator-\" + index}>\n\t\t\t\t\t\t<Tooltip\n\t\t\t\t\t\t\tid={tooltipId}\n\t\t\t\t\t\t\ttip={tooltip}\n\t\t\t\t\t\t\tdirection=\"bottom\"\n\t\t\t\t\t\t\tclassName=\"properties-tooltips\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName={classNames(\"properties-operator-button\", { \"first\": (index % 2 === 0),\n\t\t\t\t\t\t\t\t\t\"second\": !(index % 2 === 0) })}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tkind=\"tertiary\"\n\t\t\t\t\t\t\t\tonClick={this.onOperatorClick.bind(this, operator.value)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"properties-operator-button-label\">\n\t\t\t\t\t\t\t\t\t{operator.locLabel}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t});\n\n\t\t\treturn (\n\t\t\t\t<div className=\"properties-operator-container\" >\n\t\t\t\t\t{operatorButtons}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\t\treturn (<div />);\n\t}\n\trender() {\n\t\tconst operatorDiv = this._makeOperatorContent();\n\t\treturn (\n\t\t\t<div className=\"properties-expression-selection-operator\" >\n\t\t\t\t{operatorDiv}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nExpressionSelectOperator.propTypes = {\n\tcontroller: PropTypes.object.isRequired,\n\tonChange: PropTypes.func,\n\toperatorList: PropTypes.array\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport ExpressionSelectFieldOrFunction from \"./expression-select-field-function.jsx\";\n\nimport ExpressionSelectOperator from \"./expression-select-operator.jsx\";\n\nexport default class ExpressionSelectionPanel extends React.Component {\n\trender() {\n\t\tconst fieldsOrFunction = (\n\t\t\t<ExpressionSelectFieldOrFunction\n\t\t\t\tcontroller= {this.props.controller}\n\t\t\t\tonChange={this.props.onChange}\n\t\t\t\tfunctionList={this.props.functionList}\n\t\t\t\tlanguage={this.props.language}\n\t\t\t/>\n\t\t);\n\t\tconst operators = (\n\t\t\t<ExpressionSelectOperator\n\t\t\t\tcontroller= {this.props.controller}\n\t\t\t\tonChange={this.props.onChange}\n\t\t\t\toperatorList={this.props.operatorList}\n\t\t\t/>\n\t\t);\n\n\t\treturn (\n\t\t\t<div className=\"properties-expression-selection-container\" >\n\t\t\t\t{operators}\n\t\t\t\t{fieldsOrFunction}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nExpressionSelectionPanel.propTypes = {\n\tcontroller: PropTypes.object.isRequired,\n\tonChange: PropTypes.func.isRequired,\n\tfunctionList: PropTypes.array.isRequired,\n\toperatorList: PropTypes.array.isRequired,\n\tlanguage: PropTypes.string\n};\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport ExpressionControl from \"./../expression\";\nimport ExpressionSelectionPanel from \"./expression-selection-panel\";\nimport { MESSAGE_KEYS } from \"./../../../constants/constants\";\nimport { formatMessage } from \"./../../../util/property-utils\";\nimport { isEqual } from \"lodash\";\n\nexport default class ExpressionBuilder extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.selection = [];\n\t\tthis.expressionInfo = props.controller.getExpressionInfo();\n\t\tthis.editorDidMount = this.editorDidMount.bind(this);\n\t\tthis.onChange = this.onChange.bind(this);\n\t\tthis.onBlur = this.onBlur.bind(this);\n\t\tthis.onSelectionChange = this.onSelectionChange.bind(this);\n\t\tthis.getCodemirrorState = this.getCodemirrorState.bind(this);\n\t}\n\n\tonChange(newValue) {\n\t\tconst value = (typeof newValue === \"string\") ? newValue : newValue.toString();\n\t\tconst somethingSelected = this.getCodemirrorState()?.selection.ranges.some((r) => !r.empty);\n\t\tlet cursor = this.getCodemirrorState()?.selection.main.head;\n\t\tif (isNaN(cursor) && !somethingSelected) {\n\t\t\t// When nothing selected, set cursor at the end of the line\n\t\t\tthis.editor.dispatch({ selection: { anchor: this.getCodemirrorState()?.doc.length } });\n\t\t\tcursor = this.getCodemirrorState()?.selection.main.head;\n\t\t\tthis.editor.focus();\n\t\t}\n\t\tlet selectionOffset = 1;\n\t\tif (somethingSelected) {\n\t\t\tselectionOffset = 0;\n\t\t\tthis.editor.dispatch(this.getCodemirrorState()?.replaceSelection(value), { scrollIntoView: true });\n\t\t\tthis.editor.focus();\n\t\t} else {\n\t\t\tlet buffer = \" \";\n\t\t\t// if adding to a parenth/bracket/brace expression, no need for space\n\t\t\tconst currentLineNumber = this.getCodemirrorState()?.doc.lineAt(this.getCodemirrorState()?.selection.main.head).number;\n\t\t\tconst charBefore = this.getCodemirrorState()?.doc.line(currentLineNumber).text[cursor - 1];\n\t\t\t// edge case of cursor being at line 0, char 0 is still handled here\n\t\t\tif ([\"(\", \"[\", \"{\"].indexOf(charBefore) !== -1) {\n\t\t\t\tbuffer = \"\";\n\t\t\t}\n\t\t\tthis.editor.dispatch(this.getCodemirrorState()?.replaceSelection(buffer + value), { scrollIntoView: true });\n\t\t\tthis.editor.focus();\n\t\t}\n\t\tthis._setSelection(value, cursor, selectionOffset);\n\t\t// This is needed to generate a render so that the selection will appear.\n\t\tconst exprValue = this.getCodemirrorState()?.doc.toString();\n\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, exprValue, true);\n\t}\n\n\tonSelectionChange(selection) {\n\t\tthis.selection = selection;\n\t}\n\n\tonBlur(editor, evt) {\n\t\tconst currentValue = this.props.controller.getPropertyValue(this.props.propertyId);\n\t\tconst newValue = editor?.viewState?.state?.doc.toString();\n\t\tconst skipValidate = this.expressionSelectionPanel && evt && this.expressionSelectionPanel.contains(evt.relatedTarget);\n\t\t// update property value when value is updated OR value is to be validated\n\t\tif (!isEqual(currentValue, newValue) || !skipValidate) {\n\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, newValue, skipValidate);\n\t\t}\n\t}\n\n\tgetCodemirrorState() {\n\t\treturn this.editor?.viewState?.state;\n\t}\n\n\teditorDidMount(editor) {\n\t\tthis.editor = editor;\n\t}\n\n\t_setSelection(value, cursor, selectionOffset) {\n\t\t// first set the selection to the first param holder of new value\n\t\tif (typeof value === \"string\") {\n\t\t\tconst firstParam = value.indexOf(\"?\");\n\t\t\tif (firstParam !== -1) {\n\t\t\t\tconst selection = { anchor: cursor + firstParam + selectionOffset + 1, head: cursor + firstParam + selectionOffset };\n\t\t\t\tthis.editor.dispatch({ selection: selection });\n\t\t\t\tthis.onSelectionChange([selection]);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// if the newValue doesn't have a param holder\n\t\t// set it to the first param holder found in the expression\n\t\tconst lineCount = this.getCodemirrorState()?.doc.lines;\n\t\tfor (let index = 0; index < lineCount; index++) {\n\t\t\tconst line = this.getCodemirrorState()?.doc.line(index + 1).text;\n\t\t\tconst paramOffset = line.indexOf(\"?\");\n\t\t\tif (paramOffset !== -1) {\n\t\t\t\tconst selection = { anchor: paramOffset + 1, head: paramOffset };\n\t\t\t\tthis.editor.dispatch({ selection: selection });\n\t\t\t\tthis.onSelectionChange([selection]);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// if no parameter holders found then set it to end of insert string\n\t\tconst insertSelection = { anchor: this.getCodemirrorState()?.selection.main.anchor,\n\t\t\thead: this.getCodemirrorState()?.selection.main.head };\n\t\tthis.onSelectionChange([insertSelection]);\n\t\treturn;\n\t}\n\n\trender() {\n\t\tconst expressionLabel = formatMessage(this.props.controller.getReactIntl(),\n\t\t\tMESSAGE_KEYS.EXPRESSION_BUILDER_LABEL);\n\n\t\treturn (\n\t\t\t<div className=\"properties-expression-builder\">\n\t\t\t\t<ExpressionControl\n\t\t\t\t\tcontrol={this.props.control}\n\t\t\t\t\tpropertyId={this.props.propertyId}\n\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\tbuilder={false}\n\t\t\t\t\teditorDidMount={this.editorDidMount}\n\t\t\t\t\tselectionRange={this.selection}\n\t\t\t\t\tonSelectionChange={this.onSelectionChange}\n\t\t\t\t\tonBlur={this.onBlur}\n\t\t\t\t\theight={96}\n\t\t\t\t\texpressionLabel={expressionLabel}\n\t\t\t\t/>\n\t\t\t\t<div ref={ (ref) => (this.expressionSelectionPanel = ref) }>\n\t\t\t\t\t<ExpressionSelectionPanel\n\t\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\t\tonChange={this.onChange}\n\t\t\t\t\t\tfunctionList={this.expressionInfo.functionCategories}\n\t\t\t\t\t\toperatorList={this.expressionInfo.operators}\n\t\t\t\t\t\tlanguage={this.props.control.language}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nExpressionBuilder.propTypes = {\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired\n};\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Base class for table controls\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { injectIntl } from \"react-intl\";\nimport { Button } from \"@carbon/react\";\nimport { Maximize, Minimize } from \"@carbon/react/icons\";\nimport { formatMessage } from \"../../../util/property-utils\";\nimport { MESSAGE_KEYS } from \"../../../constants/constants\";\n\nclass ExpressionToggle extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.buttonHandler = props.controller.getHandlers().buttonHandler || (() => null);\n\t\tthis.reactIntl = props.controller.getReactIntl();\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<div className=\"properties-expression-toggle\">\n\t\t\t\t<div className=\"properties-expression-toggle-absolute\">\n\t\t\t\t\t{this.props.enableMaximize ? (<Button\n\t\t\t\t\t\tclassName=\"maximize\"\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\tkind=\"ghost\"\n\t\t\t\t\t\trenderIcon={Maximize}\n\t\t\t\t\t\thasIconOnly\n\t\t\t\t\t\ticonDescription={formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_MAXIMIZE_LABEL)}\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tconst handlerStatus = this.buttonHandler({\n\t\t\t\t\t\t\t\ttype: \"maximize_tearsheet\",\n\t\t\t\t\t\t\t\tpropertyId: this.props.control.data || {}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tif (!handlerStatus && this.props.control.data && this.props.control.data.tearsheet_ref) {\n\t\t\t\t\t\t\t\tthis.props.controller.setActiveTearsheet(this.props.control.data.tearsheet_ref);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>) : (<Button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclassName=\"minimize\"\n\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\tkind=\"ghost\"\n\t\t\t\t\t\thasIconOnly\n\t\t\t\t\t\trenderIcon={Minimize}\n\t\t\t\t\t\ticonDescription={formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_MINIMIZE_LABEL)}\n\t\t\t\t\t\tonClick={() => this.props.controller.clearActiveTearsheet()}\n\t\t\t\t\t/>)\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\nExpressionToggle.propTypes = {\n\tcontrol: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tenableMaximize: PropTypes.bool\n};\nexport default injectIntl(ExpressionToggle);\n","export default function crelt() {\n var elt = arguments[0]\n if (typeof elt == \"string\") elt = document.createElement(elt)\n var i = 1, next = arguments[1]\n if (next && typeof next == \"object\" && next.nodeType == null && !Array.isArray(next)) {\n for (var name in next) if (Object.prototype.hasOwnProperty.call(next, name)) {\n var value = next[name]\n if (typeof value == \"string\") elt.setAttribute(name, value)\n else if (value != null) elt[name] = value\n }\n i++\n }\n for (; i < arguments.length; i++) add(elt, arguments[i])\n return elt\n}\n\nfunction add(elt, child) {\n if (typeof child == \"string\") {\n elt.appendChild(document.createTextNode(child))\n } else if (child == null) {\n } else if (child.nodeType != null) {\n elt.appendChild(child)\n } else if (Array.isArray(child)) {\n for (var i = 0; i < child.length; i++) add(elt, child[i])\n } else {\n throw new RangeError(\"Unsupported child node: \" + child)\n }\n}\n","import { Decoration, showPanel, EditorView, ViewPlugin, gutter, showTooltip, hoverTooltip, getPanel, logException, WidgetType, GutterMarker } from '@codemirror/view';\nimport { StateEffect, StateField, Facet, combineConfig, RangeSet, RangeSetBuilder } from '@codemirror/state';\nimport elt from 'crelt';\n\nclass SelectedDiagnostic {\n constructor(from, to, diagnostic) {\n this.from = from;\n this.to = to;\n this.diagnostic = diagnostic;\n }\n}\nclass LintState {\n constructor(diagnostics, panel, selected) {\n this.diagnostics = diagnostics;\n this.panel = panel;\n this.selected = selected;\n }\n static init(diagnostics, panel, state) {\n // Filter the list of diagnostics for which to create markers\n let diagnosticFilter = state.facet(lintConfig).markerFilter;\n if (diagnosticFilter)\n diagnostics = diagnosticFilter(diagnostics, state);\n let sorted = diagnostics.slice().sort((a, b) => a.from - b.from || a.to - b.to);\n let deco = new RangeSetBuilder(), active = [], pos = 0;\n let scan = state.doc.iter(), scanPos = 0, docLen = state.doc.length;\n for (let i = 0;;) {\n let next = i == sorted.length ? null : sorted[i];\n if (!next && !active.length)\n break;\n let from, to;\n if (active.length) {\n from = pos;\n to = active.reduce((p, d) => Math.min(p, d.to), next && next.from > from ? next.from : 1e8);\n }\n else {\n from = next.from;\n if (from > docLen)\n break;\n to = next.to;\n active.push(next);\n i++;\n }\n while (i < sorted.length) {\n let next = sorted[i];\n if (next.from == from && (next.to > next.from || next.to == from)) {\n active.push(next);\n i++;\n to = Math.min(next.to, to);\n }\n else {\n to = Math.min(next.from, to);\n break;\n }\n }\n to = Math.min(to, docLen);\n let widget = false;\n if (active.some(d => d.from == from && (d.to == to || to == docLen))) {\n widget = from == to;\n if (!widget && to - from < 10) {\n let behind = from - (scanPos + scan.value.length);\n if (behind > 0) {\n scan.next(behind);\n scanPos = from;\n }\n for (let check = from;;) {\n if (check >= to) {\n widget = true;\n break;\n }\n if (!scan.lineBreak && scanPos + scan.value.length > check)\n break;\n check = scanPos + scan.value.length;\n scanPos += scan.value.length;\n scan.next();\n }\n }\n }\n let sev = maxSeverity(active);\n if (widget) {\n deco.add(from, from, Decoration.widget({\n widget: new DiagnosticWidget(sev),\n diagnostics: active.slice()\n }));\n }\n else {\n let markClass = active.reduce((c, d) => d.markClass ? c + \" \" + d.markClass : c, \"\");\n deco.add(from, to, Decoration.mark({\n class: \"cm-lintRange cm-lintRange-\" + sev + markClass,\n diagnostics: active.slice(),\n inclusiveEnd: active.some(a => a.to > to)\n }));\n }\n pos = to;\n if (pos == docLen)\n break;\n for (let i = 0; i < active.length; i++)\n if (active[i].to <= pos)\n active.splice(i--, 1);\n }\n let set = deco.finish();\n return new LintState(set, panel, findDiagnostic(set));\n }\n}\nfunction findDiagnostic(diagnostics, diagnostic = null, after = 0) {\n let found = null;\n diagnostics.between(after, 1e9, (from, to, { spec }) => {\n if (diagnostic && spec.diagnostics.indexOf(diagnostic) < 0)\n return;\n if (!found)\n found = new SelectedDiagnostic(from, to, diagnostic || spec.diagnostics[0]);\n else if (spec.diagnostics.indexOf(found.diagnostic) < 0)\n return false;\n else\n found = new SelectedDiagnostic(found.from, to, found.diagnostic);\n });\n return found;\n}\nfunction hideTooltip(tr, tooltip) {\n let from = tooltip.pos, to = tooltip.end || from;\n let result = tr.state.facet(lintConfig).hideOn(tr, from, to);\n if (result != null)\n return result;\n let line = tr.startState.doc.lineAt(tooltip.pos);\n return !!(tr.effects.some(e => e.is(setDiagnosticsEffect)) || tr.changes.touchesRange(line.from, Math.max(line.to, to)));\n}\nfunction maybeEnableLint(state, effects) {\n return state.field(lintState, false) ? effects : effects.concat(StateEffect.appendConfig.of(lintExtensions));\n}\n/**\nReturns a transaction spec which updates the current set of\ndiagnostics, and enables the lint extension if if wasn't already\nactive.\n*/\nfunction setDiagnostics(state, diagnostics) {\n return {\n effects: maybeEnableLint(state, [setDiagnosticsEffect.of(diagnostics)])\n };\n}\n/**\nThe state effect that updates the set of active diagnostics. Can\nbe useful when writing an extension that needs to track these.\n*/\nconst setDiagnosticsEffect = /*@__PURE__*/StateEffect.define();\nconst togglePanel = /*@__PURE__*/StateEffect.define();\nconst movePanelSelection = /*@__PURE__*/StateEffect.define();\nconst lintState = /*@__PURE__*/StateField.define({\n create() {\n return new LintState(Decoration.none, null, null);\n },\n update(value, tr) {\n if (tr.docChanged && value.diagnostics.size) {\n let mapped = value.diagnostics.map(tr.changes), selected = null, panel = value.panel;\n if (value.selected) {\n let selPos = tr.changes.mapPos(value.selected.from, 1);\n selected = findDiagnostic(mapped, value.selected.diagnostic, selPos) || findDiagnostic(mapped, null, selPos);\n }\n if (!mapped.size && panel && tr.state.facet(lintConfig).autoPanel)\n panel = null;\n value = new LintState(mapped, panel, selected);\n }\n for (let effect of tr.effects) {\n if (effect.is(setDiagnosticsEffect)) {\n let panel = !tr.state.facet(lintConfig).autoPanel ? value.panel : effect.value.length ? LintPanel.open : null;\n value = LintState.init(effect.value, panel, tr.state);\n }\n else if (effect.is(togglePanel)) {\n value = new LintState(value.diagnostics, effect.value ? LintPanel.open : null, value.selected);\n }\n else if (effect.is(movePanelSelection)) {\n value = new LintState(value.diagnostics, value.panel, effect.value);\n }\n }\n return value;\n },\n provide: f => [showPanel.from(f, val => val.panel),\n EditorView.decorations.from(f, s => s.diagnostics)]\n});\n/**\nReturns the number of active lint diagnostics in the given state.\n*/\nfunction diagnosticCount(state) {\n let lint = state.field(lintState, false);\n return lint ? lint.diagnostics.size : 0;\n}\nconst activeMark = /*@__PURE__*/Decoration.mark({ class: \"cm-lintRange cm-lintRange-active\" });\nfunction lintTooltip(view, pos, side) {\n let { diagnostics } = view.state.field(lintState);\n let found, start = -1, end = -1;\n diagnostics.between(pos - (side < 0 ? 1 : 0), pos + (side > 0 ? 1 : 0), (from, to, { spec }) => {\n if (pos >= from && pos <= to &&\n (from == to || ((pos > from || side > 0) && (pos < to || side < 0)))) {\n found = spec.diagnostics;\n start = from;\n end = to;\n return false;\n }\n });\n let diagnosticFilter = view.state.facet(lintConfig).tooltipFilter;\n if (found && diagnosticFilter)\n found = diagnosticFilter(found, view.state);\n if (!found)\n return null;\n return {\n pos: start,\n end: end,\n above: view.state.doc.lineAt(start).to < end,\n create() {\n return { dom: diagnosticsTooltip(view, found) };\n }\n };\n}\nfunction diagnosticsTooltip(view, diagnostics) {\n return elt(\"ul\", { class: \"cm-tooltip-lint\" }, diagnostics.map(d => renderDiagnostic(view, d, false)));\n}\n/**\nCommand to open and focus the lint panel.\n*/\nconst openLintPanel = (view) => {\n let field = view.state.field(lintState, false);\n if (!field || !field.panel)\n view.dispatch({ effects: maybeEnableLint(view.state, [togglePanel.of(true)]) });\n let panel = getPanel(view, LintPanel.open);\n if (panel)\n panel.dom.querySelector(\".cm-panel-lint ul\").focus();\n return true;\n};\n/**\nCommand to close the lint panel, when open.\n*/\nconst closeLintPanel = (view) => {\n let field = view.state.field(lintState, false);\n if (!field || !field.panel)\n return false;\n view.dispatch({ effects: togglePanel.of(false) });\n return true;\n};\n/**\nMove the selection to the next diagnostic.\n*/\nconst nextDiagnostic = (view) => {\n let field = view.state.field(lintState, false);\n if (!field)\n return false;\n let sel = view.state.selection.main, next = findDiagnostic(field.diagnostics, null, sel.to + 1);\n if (!next) {\n next = findDiagnostic(field.diagnostics, null, 0);\n if (!next || next.from == sel.from && next.to == sel.to)\n return false;\n }\n view.dispatch({ selection: { anchor: next.from, head: next.to }, scrollIntoView: true });\n return true;\n};\n/**\nMove the selection to the previous diagnostic.\n*/\nconst previousDiagnostic = (view) => {\n let { state } = view, field = state.field(lintState, false);\n if (!field)\n return false;\n let sel = state.selection.main;\n let prevFrom, prevTo, lastFrom, lastTo;\n field.diagnostics.between(0, state.doc.length, (from, to) => {\n if (to < sel.to && (prevFrom == null || prevFrom < from)) {\n prevFrom = from;\n prevTo = to;\n }\n if (lastFrom == null || from > lastFrom) {\n lastFrom = from;\n lastTo = to;\n }\n });\n if (lastFrom == null || prevFrom == null && lastFrom == sel.from)\n return false;\n view.dispatch({ selection: { anchor: prevFrom !== null && prevFrom !== void 0 ? prevFrom : lastFrom, head: prevTo !== null && prevTo !== void 0 ? prevTo : lastTo }, scrollIntoView: true });\n return true;\n};\n/**\nA set of default key bindings for the lint functionality.\n\n- Ctrl-Shift-m (Cmd-Shift-m on macOS): [`openLintPanel`](https://codemirror.net/6/docs/ref/#lint.openLintPanel)\n- F8: [`nextDiagnostic`](https://codemirror.net/6/docs/ref/#lint.nextDiagnostic)\n*/\nconst lintKeymap = [\n { key: \"Mod-Shift-m\", run: openLintPanel, preventDefault: true },\n { key: \"F8\", run: nextDiagnostic }\n];\nconst lintPlugin = /*@__PURE__*/ViewPlugin.fromClass(class {\n constructor(view) {\n this.view = view;\n this.timeout = -1;\n this.set = true;\n let { delay } = view.state.facet(lintConfig);\n this.lintTime = Date.now() + delay;\n this.run = this.run.bind(this);\n this.timeout = setTimeout(this.run, delay);\n }\n run() {\n clearTimeout(this.timeout);\n let now = Date.now();\n if (now < this.lintTime - 10) {\n this.timeout = setTimeout(this.run, this.lintTime - now);\n }\n else {\n this.set = false;\n let { state } = this.view, { sources } = state.facet(lintConfig);\n if (sources.length)\n batchResults(sources.map(s => Promise.resolve(s(this.view))), annotations => {\n if (this.view.state.doc == state.doc)\n this.view.dispatch(setDiagnostics(this.view.state, annotations.reduce((a, b) => a.concat(b))));\n }, error => { logException(this.view.state, error); });\n }\n }\n update(update) {\n let config = update.state.facet(lintConfig);\n if (update.docChanged || config != update.startState.facet(lintConfig) ||\n config.needsRefresh && config.needsRefresh(update)) {\n this.lintTime = Date.now() + config.delay;\n if (!this.set) {\n this.set = true;\n this.timeout = setTimeout(this.run, config.delay);\n }\n }\n }\n force() {\n if (this.set) {\n this.lintTime = Date.now();\n this.run();\n }\n }\n destroy() {\n clearTimeout(this.timeout);\n }\n});\nfunction batchResults(promises, sink, error) {\n let collected = [], timeout = -1;\n for (let p of promises)\n p.then(value => {\n collected.push(value);\n clearTimeout(timeout);\n if (collected.length == promises.length)\n sink(collected);\n else\n timeout = setTimeout(() => sink(collected), 200);\n }, error);\n}\nconst lintConfig = /*@__PURE__*/Facet.define({\n combine(input) {\n return {\n sources: input.map(i => i.source).filter(x => x != null),\n ...combineConfig(input.map(i => i.config), {\n delay: 750,\n markerFilter: null,\n tooltipFilter: null,\n needsRefresh: null,\n hideOn: () => null,\n }, {\n delay: Math.max,\n markerFilter: combineFilter,\n tooltipFilter: combineFilter,\n needsRefresh: (a, b) => !a ? b : !b ? a : u => a(u) || b(u),\n hideOn: (a, b) => !a ? b : !b ? a : (t, x, y) => a(t, x, y) || b(t, x, y),\n autoPanel: (a, b) => a || b\n })\n };\n }\n});\nfunction combineFilter(a, b) {\n return !a ? b : !b ? a : (d, s) => b(a(d, s), s);\n}\n/**\nGiven a diagnostic source, this function returns an extension that\nenables linting with that source. It will be called whenever the\neditor is idle (after its content changed).\n\nNote that settings given here will apply to all linters active in\nthe editor. If `null` is given as source, this only configures the\nlint extension.\n*/\nfunction linter(source, config = {}) {\n return [\n lintConfig.of({ source, config }),\n lintPlugin,\n lintExtensions\n ];\n}\n/**\nForces any linters [configured](https://codemirror.net/6/docs/ref/#lint.linter) to run when the\neditor is idle to run right away.\n*/\nfunction forceLinting(view) {\n let plugin = view.plugin(lintPlugin);\n if (plugin)\n plugin.force();\n}\nfunction assignKeys(actions) {\n let assigned = [];\n if (actions)\n actions: for (let { name } of actions) {\n for (let i = 0; i < name.length; i++) {\n let ch = name[i];\n if (/[a-zA-Z]/.test(ch) && !assigned.some(c => c.toLowerCase() == ch.toLowerCase())) {\n assigned.push(ch);\n continue actions;\n }\n }\n assigned.push(\"\");\n }\n return assigned;\n}\nfunction renderDiagnostic(view, diagnostic, inPanel) {\n var _a;\n let keys = inPanel ? assignKeys(diagnostic.actions) : [];\n return elt(\"li\", { class: \"cm-diagnostic cm-diagnostic-\" + diagnostic.severity }, elt(\"span\", { class: \"cm-diagnosticText\" }, diagnostic.renderMessage ? diagnostic.renderMessage(view) : diagnostic.message), (_a = diagnostic.actions) === null || _a === void 0 ? void 0 : _a.map((action, i) => {\n let fired = false, click = (e) => {\n e.preventDefault();\n if (fired)\n return;\n fired = true;\n let found = findDiagnostic(view.state.field(lintState).diagnostics, diagnostic);\n if (found)\n action.apply(view, found.from, found.to);\n };\n let { name } = action, keyIndex = keys[i] ? name.indexOf(keys[i]) : -1;\n let nameElt = keyIndex < 0 ? name : [name.slice(0, keyIndex),\n elt(\"u\", name.slice(keyIndex, keyIndex + 1)),\n name.slice(keyIndex + 1)];\n let markClass = action.markClass ? \" \" + action.markClass : \"\";\n return elt(\"button\", {\n type: \"button\",\n class: \"cm-diagnosticAction\" + markClass,\n onclick: click,\n onmousedown: click,\n \"aria-label\": ` Action: ${name}${keyIndex < 0 ? \"\" : ` (access key \"${keys[i]})\"`}.`\n }, nameElt);\n }), diagnostic.source && elt(\"div\", { class: \"cm-diagnosticSource\" }, diagnostic.source));\n}\nclass DiagnosticWidget extends WidgetType {\n constructor(sev) {\n super();\n this.sev = sev;\n }\n eq(other) { return other.sev == this.sev; }\n toDOM() {\n return elt(\"span\", { class: \"cm-lintPoint cm-lintPoint-\" + this.sev });\n }\n}\nclass PanelItem {\n constructor(view, diagnostic) {\n this.diagnostic = diagnostic;\n this.id = \"item_\" + Math.floor(Math.random() * 0xffffffff).toString(16);\n this.dom = renderDiagnostic(view, diagnostic, true);\n this.dom.id = this.id;\n this.dom.setAttribute(\"role\", \"option\");\n }\n}\nclass LintPanel {\n constructor(view) {\n this.view = view;\n this.items = [];\n let onkeydown = (event) => {\n if (event.ctrlKey || event.altKey || event.metaKey)\n return;\n if (event.keyCode == 27) { // Escape\n closeLintPanel(this.view);\n this.view.focus();\n }\n else if (event.keyCode == 38 || event.keyCode == 33) { // ArrowUp, PageUp\n this.moveSelection((this.selectedIndex - 1 + this.items.length) % this.items.length);\n }\n else if (event.keyCode == 40 || event.keyCode == 34) { // ArrowDown, PageDown\n this.moveSelection((this.selectedIndex + 1) % this.items.length);\n }\n else if (event.keyCode == 36) { // Home\n this.moveSelection(0);\n }\n else if (event.keyCode == 35) { // End\n this.moveSelection(this.items.length - 1);\n }\n else if (event.keyCode == 13) { // Enter\n this.view.focus();\n }\n else if (event.keyCode >= 65 && event.keyCode <= 90 && this.selectedIndex >= 0) { // A-Z\n let { diagnostic } = this.items[this.selectedIndex], keys = assignKeys(diagnostic.actions);\n for (let i = 0; i < keys.length; i++)\n if (keys[i].toUpperCase().charCodeAt(0) == event.keyCode) {\n let found = findDiagnostic(this.view.state.field(lintState).diagnostics, diagnostic);\n if (found)\n diagnostic.actions[i].apply(view, found.from, found.to);\n }\n }\n else {\n return;\n }\n event.preventDefault();\n };\n let onclick = (event) => {\n for (let i = 0; i < this.items.length; i++) {\n if (this.items[i].dom.contains(event.target))\n this.moveSelection(i);\n }\n };\n this.list = elt(\"ul\", {\n tabIndex: 0,\n role: \"listbox\",\n \"aria-label\": this.view.state.phrase(\"Diagnostics\"),\n onkeydown,\n onclick\n });\n this.dom = elt(\"div\", { class: \"cm-panel-lint\" }, this.list, elt(\"button\", {\n type: \"button\",\n name: \"close\",\n \"aria-label\": this.view.state.phrase(\"close\"),\n onclick: () => closeLintPanel(this.view)\n }, \"×\"));\n this.update();\n }\n get selectedIndex() {\n let selected = this.view.state.field(lintState).selected;\n if (!selected)\n return -1;\n for (let i = 0; i < this.items.length; i++)\n if (this.items[i].diagnostic == selected.diagnostic)\n return i;\n return -1;\n }\n update() {\n let { diagnostics, selected } = this.view.state.field(lintState);\n let i = 0, needsSync = false, newSelectedItem = null;\n let seen = new Set();\n diagnostics.between(0, this.view.state.doc.length, (_start, _end, { spec }) => {\n for (let diagnostic of spec.diagnostics) {\n if (seen.has(diagnostic))\n continue;\n seen.add(diagnostic);\n let found = -1, item;\n for (let j = i; j < this.items.length; j++)\n if (this.items[j].diagnostic == diagnostic) {\n found = j;\n break;\n }\n if (found < 0) {\n item = new PanelItem(this.view, diagnostic);\n this.items.splice(i, 0, item);\n needsSync = true;\n }\n else {\n item = this.items[found];\n if (found > i) {\n this.items.splice(i, found - i);\n needsSync = true;\n }\n }\n if (selected && item.diagnostic == selected.diagnostic) {\n if (!item.dom.hasAttribute(\"aria-selected\")) {\n item.dom.setAttribute(\"aria-selected\", \"true\");\n newSelectedItem = item;\n }\n }\n else if (item.dom.hasAttribute(\"aria-selected\")) {\n item.dom.removeAttribute(\"aria-selected\");\n }\n i++;\n }\n });\n while (i < this.items.length && !(this.items.length == 1 && this.items[0].diagnostic.from < 0)) {\n needsSync = true;\n this.items.pop();\n }\n if (this.items.length == 0) {\n this.items.push(new PanelItem(this.view, {\n from: -1, to: -1,\n severity: \"info\",\n message: this.view.state.phrase(\"No diagnostics\")\n }));\n needsSync = true;\n }\n if (newSelectedItem) {\n this.list.setAttribute(\"aria-activedescendant\", newSelectedItem.id);\n this.view.requestMeasure({\n key: this,\n read: () => ({ sel: newSelectedItem.dom.getBoundingClientRect(), panel: this.list.getBoundingClientRect() }),\n write: ({ sel, panel }) => {\n let scaleY = panel.height / this.list.offsetHeight;\n if (sel.top < panel.top)\n this.list.scrollTop -= (panel.top - sel.top) / scaleY;\n else if (sel.bottom > panel.bottom)\n this.list.scrollTop += (sel.bottom - panel.bottom) / scaleY;\n }\n });\n }\n else if (this.selectedIndex < 0) {\n this.list.removeAttribute(\"aria-activedescendant\");\n }\n if (needsSync)\n this.sync();\n }\n sync() {\n let domPos = this.list.firstChild;\n function rm() {\n let prev = domPos;\n domPos = prev.nextSibling;\n prev.remove();\n }\n for (let item of this.items) {\n if (item.dom.parentNode == this.list) {\n while (domPos != item.dom)\n rm();\n domPos = item.dom.nextSibling;\n }\n else {\n this.list.insertBefore(item.dom, domPos);\n }\n }\n while (domPos)\n rm();\n }\n moveSelection(selectedIndex) {\n if (this.selectedIndex < 0)\n return;\n let field = this.view.state.field(lintState);\n let selection = findDiagnostic(field.diagnostics, this.items[selectedIndex].diagnostic);\n if (!selection)\n return;\n this.view.dispatch({\n selection: { anchor: selection.from, head: selection.to },\n scrollIntoView: true,\n effects: movePanelSelection.of(selection)\n });\n }\n static open(view) { return new LintPanel(view); }\n}\nfunction svg(content, attrs = `viewBox=\"0 0 40 40\"`) {\n return `url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" ${attrs}>${encodeURIComponent(content)}</svg>')`;\n}\nfunction underline(color) {\n return svg(`<path d=\"m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0\" stroke=\"${color}\" fill=\"none\" stroke-width=\".7\"/>`, `width=\"6\" height=\"3\"`);\n}\nconst baseTheme = /*@__PURE__*/EditorView.baseTheme({\n \".cm-diagnostic\": {\n padding: \"3px 6px 3px 8px\",\n marginLeft: \"-1px\",\n display: \"block\",\n whiteSpace: \"pre-wrap\"\n },\n \".cm-diagnostic-error\": { borderLeft: \"5px solid #d11\" },\n \".cm-diagnostic-warning\": { borderLeft: \"5px solid orange\" },\n \".cm-diagnostic-info\": { borderLeft: \"5px solid #999\" },\n \".cm-diagnostic-hint\": { borderLeft: \"5px solid #66d\" },\n \".cm-diagnosticAction\": {\n font: \"inherit\",\n border: \"none\",\n padding: \"2px 4px\",\n backgroundColor: \"#444\",\n color: \"white\",\n borderRadius: \"3px\",\n marginLeft: \"8px\",\n cursor: \"pointer\"\n },\n \".cm-diagnosticSource\": {\n fontSize: \"70%\",\n opacity: .7\n },\n \".cm-lintRange\": {\n backgroundPosition: \"left bottom\",\n backgroundRepeat: \"repeat-x\",\n paddingBottom: \"0.7px\",\n },\n \".cm-lintRange-error\": { backgroundImage: /*@__PURE__*/underline(\"#d11\") },\n \".cm-lintRange-warning\": { backgroundImage: /*@__PURE__*/underline(\"orange\") },\n \".cm-lintRange-info\": { backgroundImage: /*@__PURE__*/underline(\"#999\") },\n \".cm-lintRange-hint\": { backgroundImage: /*@__PURE__*/underline(\"#66d\") },\n \".cm-lintRange-active\": { backgroundColor: \"#ffdd9980\" },\n \".cm-tooltip-lint\": {\n padding: 0,\n margin: 0\n },\n \".cm-lintPoint\": {\n position: \"relative\",\n \"&:after\": {\n content: '\"\"',\n position: \"absolute\",\n bottom: 0,\n left: \"-2px\",\n borderLeft: \"3px solid transparent\",\n borderRight: \"3px solid transparent\",\n borderBottom: \"4px solid #d11\"\n }\n },\n \".cm-lintPoint-warning\": {\n \"&:after\": { borderBottomColor: \"orange\" }\n },\n \".cm-lintPoint-info\": {\n \"&:after\": { borderBottomColor: \"#999\" }\n },\n \".cm-lintPoint-hint\": {\n \"&:after\": { borderBottomColor: \"#66d\" }\n },\n \".cm-panel.cm-panel-lint\": {\n position: \"relative\",\n \"& ul\": {\n maxHeight: \"100px\",\n overflowY: \"auto\",\n \"& [aria-selected]\": {\n backgroundColor: \"#ddd\",\n \"& u\": { textDecoration: \"underline\" }\n },\n \"&:focus [aria-selected]\": {\n background_fallback: \"#bdf\",\n backgroundColor: \"Highlight\",\n color_fallback: \"white\",\n color: \"HighlightText\"\n },\n \"& u\": { textDecoration: \"none\" },\n padding: 0,\n margin: 0\n },\n \"& [name=close]\": {\n position: \"absolute\",\n top: \"0\",\n right: \"2px\",\n background: \"inherit\",\n border: \"none\",\n font: \"inherit\",\n padding: 0,\n margin: 0\n }\n },\n \"&dark .cm-lintRange-active\": { backgroundColor: \"#86714a80\" },\n \"&dark .cm-panel.cm-panel-lint ul\": {\n \"& [aria-selected]\": {\n backgroundColor: \"#2e343e\",\n },\n }\n});\nfunction severityWeight(sev) {\n return sev == \"error\" ? 4 : sev == \"warning\" ? 3 : sev == \"info\" ? 2 : 1;\n}\nfunction maxSeverity(diagnostics) {\n let sev = \"hint\", weight = 1;\n for (let d of diagnostics) {\n let w = severityWeight(d.severity);\n if (w > weight) {\n weight = w;\n sev = d.severity;\n }\n }\n return sev;\n}\nclass LintGutterMarker extends GutterMarker {\n constructor(diagnostics) {\n super();\n this.diagnostics = diagnostics;\n this.severity = maxSeverity(diagnostics);\n }\n toDOM(view) {\n let elt = document.createElement(\"div\");\n elt.className = \"cm-lint-marker cm-lint-marker-\" + this.severity;\n let diagnostics = this.diagnostics;\n let diagnosticsFilter = view.state.facet(lintGutterConfig).tooltipFilter;\n if (diagnosticsFilter)\n diagnostics = diagnosticsFilter(diagnostics, view.state);\n if (diagnostics.length)\n elt.onmouseover = () => gutterMarkerMouseOver(view, elt, diagnostics);\n return elt;\n }\n}\nfunction trackHoverOn(view, marker) {\n let mousemove = (event) => {\n let rect = marker.getBoundingClientRect();\n if (event.clientX > rect.left - 10 /* Hover.Margin */ && event.clientX < rect.right + 10 /* Hover.Margin */ &&\n event.clientY > rect.top - 10 /* Hover.Margin */ && event.clientY < rect.bottom + 10 /* Hover.Margin */)\n return;\n for (let target = event.target; target; target = target.parentNode) {\n if (target.nodeType == 1 && target.classList.contains(\"cm-tooltip-lint\"))\n return;\n }\n window.removeEventListener(\"mousemove\", mousemove);\n if (view.state.field(lintGutterTooltip))\n view.dispatch({ effects: setLintGutterTooltip.of(null) });\n };\n window.addEventListener(\"mousemove\", mousemove);\n}\nfunction gutterMarkerMouseOver(view, marker, diagnostics) {\n function hovered() {\n let line = view.elementAtHeight(marker.getBoundingClientRect().top + 5 - view.documentTop);\n const linePos = view.coordsAtPos(line.from);\n if (linePos) {\n view.dispatch({ effects: setLintGutterTooltip.of({\n pos: line.from,\n above: false,\n clip: false,\n create() {\n return {\n dom: diagnosticsTooltip(view, diagnostics),\n getCoords: () => marker.getBoundingClientRect()\n };\n }\n }) });\n }\n marker.onmouseout = marker.onmousemove = null;\n trackHoverOn(view, marker);\n }\n let { hoverTime } = view.state.facet(lintGutterConfig);\n let hoverTimeout = setTimeout(hovered, hoverTime);\n marker.onmouseout = () => {\n clearTimeout(hoverTimeout);\n marker.onmouseout = marker.onmousemove = null;\n };\n marker.onmousemove = () => {\n clearTimeout(hoverTimeout);\n hoverTimeout = setTimeout(hovered, hoverTime);\n };\n}\nfunction markersForDiagnostics(doc, diagnostics) {\n let byLine = Object.create(null);\n for (let diagnostic of diagnostics) {\n let line = doc.lineAt(diagnostic.from);\n (byLine[line.from] || (byLine[line.from] = [])).push(diagnostic);\n }\n let markers = [];\n for (let line in byLine) {\n markers.push(new LintGutterMarker(byLine[line]).range(+line));\n }\n return RangeSet.of(markers, true);\n}\nconst lintGutterExtension = /*@__PURE__*/gutter({\n class: \"cm-gutter-lint\",\n markers: view => view.state.field(lintGutterMarkers),\n widgetMarker: (view, widget, block) => {\n let diagnostics = [];\n view.state.field(lintGutterMarkers).between(block.from, block.to, (from, to, value) => {\n if (from > block.from && from < block.to)\n diagnostics.push(...value.diagnostics);\n });\n return diagnostics.length ? new LintGutterMarker(diagnostics) : null;\n }\n});\nconst lintGutterMarkers = /*@__PURE__*/StateField.define({\n create() {\n return RangeSet.empty;\n },\n update(markers, tr) {\n markers = markers.map(tr.changes);\n let diagnosticFilter = tr.state.facet(lintGutterConfig).markerFilter;\n for (let effect of tr.effects) {\n if (effect.is(setDiagnosticsEffect)) {\n let diagnostics = effect.value;\n if (diagnosticFilter)\n diagnostics = diagnosticFilter(diagnostics || [], tr.state);\n markers = markersForDiagnostics(tr.state.doc, diagnostics.slice(0));\n }\n }\n return markers;\n }\n});\nconst setLintGutterTooltip = /*@__PURE__*/StateEffect.define();\nconst lintGutterTooltip = /*@__PURE__*/StateField.define({\n create() { return null; },\n update(tooltip, tr) {\n if (tooltip && tr.docChanged)\n tooltip = hideTooltip(tr, tooltip) ? null : { ...tooltip, pos: tr.changes.mapPos(tooltip.pos) };\n return tr.effects.reduce((t, e) => e.is(setLintGutterTooltip) ? e.value : t, tooltip);\n },\n provide: field => showTooltip.from(field)\n});\nconst lintGutterTheme = /*@__PURE__*/EditorView.baseTheme({\n \".cm-gutter-lint\": {\n width: \"1.4em\",\n \"& .cm-gutterElement\": {\n padding: \".2em\"\n }\n },\n \".cm-lint-marker\": {\n width: \"1em\",\n height: \"1em\"\n },\n \".cm-lint-marker-info\": {\n content: /*@__PURE__*/svg(`<path fill=\"#aaf\" stroke=\"#77e\" stroke-width=\"6\" stroke-linejoin=\"round\" d=\"M5 5L35 5L35 35L5 35Z\"/>`)\n },\n \".cm-lint-marker-warning\": {\n content: /*@__PURE__*/svg(`<path fill=\"#fe8\" stroke=\"#fd7\" stroke-width=\"6\" stroke-linejoin=\"round\" d=\"M20 6L37 35L3 35Z\"/>`),\n },\n \".cm-lint-marker-error\": {\n content: /*@__PURE__*/svg(`<circle cx=\"20\" cy=\"20\" r=\"15\" fill=\"#f87\" stroke=\"#f43\" stroke-width=\"6\"/>`)\n },\n});\nconst lintExtensions = [\n lintState,\n /*@__PURE__*/EditorView.decorations.compute([lintState], state => {\n let { selected, panel } = state.field(lintState);\n return !selected || !panel || selected.from == selected.to ? Decoration.none : Decoration.set([\n activeMark.range(selected.from, selected.to)\n ]);\n }),\n /*@__PURE__*/hoverTooltip(lintTooltip, { hideOn: hideTooltip }),\n baseTheme\n];\nconst lintGutterConfig = /*@__PURE__*/Facet.define({\n combine(configs) {\n return combineConfig(configs, {\n hoverTime: 300 /* Hover.Time */,\n markerFilter: null,\n tooltipFilter: null\n });\n }\n});\n/**\nReturns an extension that installs a gutter showing markers for\neach line that has diagnostics, which can be hovered over to see\nthe diagnostics.\n*/\nfunction lintGutter(config = {}) {\n return [lintGutterConfig.of(config), lintGutterMarkers, lintGutterExtension, lintGutterTheme, lintGutterTooltip];\n}\n/**\nIterate over the marked diagnostics for the given editor state,\ncalling `f` for each of them. Note that, if the document changed\nsince the diagnostics were created, the `Diagnostic` object will\nhold the original outdated position, whereas the `to` and `from`\narguments hold the diagnostic's current position.\n*/\nfunction forEachDiagnostic(state, f) {\n let lState = state.field(lintState, false);\n if (lState && lState.diagnostics.size) {\n let pending = [], pendingStart = [], lastEnd = -1;\n for (let iter = RangeSet.iter([lState.diagnostics]);; iter.next()) {\n for (let i = 0; i < pending.length; i++)\n if (!iter.value || iter.value.spec.diagnostics.indexOf(pending[i]) < 0) {\n f(pending[i], pendingStart[i], lastEnd);\n pending.splice(i, 1);\n pendingStart.splice(i--, 1);\n }\n if (!iter.value)\n break;\n for (let d of iter.value.spec.diagnostics)\n if (pending.indexOf(d) < 0) {\n pending.push(d);\n pendingStart.push(iter.from);\n }\n lastEnd = iter.to;\n }\n }\n}\n\nexport { closeLintPanel, diagnosticCount, forEachDiagnostic, forceLinting, lintGutter, lintKeymap, linter, nextDiagnostic, openLintPanel, previousDiagnostic, setDiagnostics, setDiagnosticsEffect };\n","/**\nThe default maximum length of a `TreeBuffer` node.\n*/\nconst DefaultBufferLength = 1024;\nlet nextPropID = 0;\nclass Range {\n constructor(from, to) {\n this.from = from;\n this.to = to;\n }\n}\n/**\nEach [node type](#common.NodeType) or [individual tree](#common.Tree)\ncan have metadata associated with it in props. Instances of this\nclass represent prop names.\n*/\nclass NodeProp {\n /**\n Create a new node prop type.\n */\n constructor(config = {}) {\n this.id = nextPropID++;\n this.perNode = !!config.perNode;\n this.deserialize = config.deserialize || (() => {\n throw new Error(\"This node type doesn't define a deserialize function\");\n });\n this.combine = config.combine || null;\n }\n /**\n This is meant to be used with\n [`NodeSet.extend`](#common.NodeSet.extend) or\n [`LRParser.configure`](#lr.ParserConfig.props) to compute\n prop values for each node type in the set. Takes a [match\n object](#common.NodeType^match) or function that returns undefined\n if the node type doesn't get this prop, and the prop's value if\n it does.\n */\n add(match) {\n if (this.perNode)\n throw new RangeError(\"Can't add per-node props to node types\");\n if (typeof match != \"function\")\n match = NodeType.match(match);\n return (type) => {\n let result = match(type);\n return result === undefined ? null : [this, result];\n };\n }\n}\n/**\nProp that is used to describe matching delimiters. For opening\ndelimiters, this holds an array of node names (written as a\nspace-separated string when declaring this prop in a grammar)\nfor the node types of closing delimiters that match it.\n*/\nNodeProp.closedBy = new NodeProp({ deserialize: str => str.split(\" \") });\n/**\nThe inverse of [`closedBy`](#common.NodeProp^closedBy). This is\nattached to closing delimiters, holding an array of node names\nof types of matching opening delimiters.\n*/\nNodeProp.openedBy = new NodeProp({ deserialize: str => str.split(\" \") });\n/**\nUsed to assign node types to groups (for example, all node\ntypes that represent an expression could be tagged with an\n`\"Expression\"` group).\n*/\nNodeProp.group = new NodeProp({ deserialize: str => str.split(\" \") });\n/**\nAttached to nodes to indicate these should be\n[displayed](https://codemirror.net/docs/ref/#language.syntaxTree)\nin a bidirectional text isolate, so that direction-neutral\ncharacters on their sides don't incorrectly get associated with\nsurrounding text. You'll generally want to set this for nodes\nthat contain arbitrary text, like strings and comments, and for\nnodes that appear _inside_ arbitrary text, like HTML tags. When\nnot given a value, in a grammar declaration, defaults to\n`\"auto\"`.\n*/\nNodeProp.isolate = new NodeProp({ deserialize: value => {\n if (value && value != \"rtl\" && value != \"ltr\" && value != \"auto\")\n throw new RangeError(\"Invalid value for isolate: \" + value);\n return value || \"auto\";\n } });\n/**\nThe hash of the [context](#lr.ContextTracker.constructor)\nthat the node was parsed in, if any. Used to limit reuse of\ncontextual nodes.\n*/\nNodeProp.contextHash = new NodeProp({ perNode: true });\n/**\nThe distance beyond the end of the node that the tokenizer\nlooked ahead for any of the tokens inside the node. (The LR\nparser only stores this when it is larger than 25, for\nefficiency reasons.)\n*/\nNodeProp.lookAhead = new NodeProp({ perNode: true });\n/**\nThis per-node prop is used to replace a given node, or part of a\nnode, with another tree. This is useful to include trees from\ndifferent languages in mixed-language parsers.\n*/\nNodeProp.mounted = new NodeProp({ perNode: true });\n/**\nA mounted tree, which can be [stored](#common.NodeProp^mounted) on\na tree node to indicate that parts of its content are\nrepresented by another tree.\n*/\nclass MountedTree {\n constructor(\n /**\n The inner tree.\n */\n tree, \n /**\n If this is null, this tree replaces the entire node (it will\n be included in the regular iteration instead of its host\n node). If not, only the given ranges are considered to be\n covered by this tree. This is used for trees that are mixed in\n a way that isn't strictly hierarchical. Such mounted trees are\n only entered by [`resolveInner`](#common.Tree.resolveInner)\n and [`enter`](#common.SyntaxNode.enter).\n */\n overlay, \n /**\n The parser used to create this subtree.\n */\n parser, \n /**\n [Indicates](#common.IterMode.EnterBracketed) that the nested\n content is delineated with some kind\n of bracket token.\n */\n bracketed = false) {\n this.tree = tree;\n this.overlay = overlay;\n this.parser = parser;\n this.bracketed = bracketed;\n }\n /**\n @internal\n */\n static get(tree) {\n return tree && tree.props && tree.props[NodeProp.mounted.id];\n }\n}\nconst noProps = Object.create(null);\n/**\nEach node in a syntax tree has a node type associated with it.\n*/\nclass NodeType {\n /**\n @internal\n */\n constructor(\n /**\n The name of the node type. Not necessarily unique, but if the\n grammar was written properly, different node types with the\n same name within a node set should play the same semantic\n role.\n */\n name, \n /**\n @internal\n */\n props, \n /**\n The id of this node in its set. Corresponds to the term ids\n used in the parser.\n */\n id, \n /**\n @internal\n */\n flags = 0) {\n this.name = name;\n this.props = props;\n this.id = id;\n this.flags = flags;\n }\n /**\n Define a node type.\n */\n static define(spec) {\n let props = spec.props && spec.props.length ? Object.create(null) : noProps;\n let flags = (spec.top ? 1 /* NodeFlag.Top */ : 0) | (spec.skipped ? 2 /* NodeFlag.Skipped */ : 0) |\n (spec.error ? 4 /* NodeFlag.Error */ : 0) | (spec.name == null ? 8 /* NodeFlag.Anonymous */ : 0);\n let type = new NodeType(spec.name || \"\", props, spec.id, flags);\n if (spec.props)\n for (let src of spec.props) {\n if (!Array.isArray(src))\n src = src(type);\n if (src) {\n if (src[0].perNode)\n throw new RangeError(\"Can't store a per-node prop on a node type\");\n props[src[0].id] = src[1];\n }\n }\n return type;\n }\n /**\n Retrieves a node prop for this type. Will return `undefined` if\n the prop isn't present on this node.\n */\n prop(prop) { return this.props[prop.id]; }\n /**\n True when this is the top node of a grammar.\n */\n get isTop() { return (this.flags & 1 /* NodeFlag.Top */) > 0; }\n /**\n True when this node is produced by a skip rule.\n */\n get isSkipped() { return (this.flags & 2 /* NodeFlag.Skipped */) > 0; }\n /**\n Indicates whether this is an error node.\n */\n get isError() { return (this.flags & 4 /* NodeFlag.Error */) > 0; }\n /**\n When true, this node type doesn't correspond to a user-declared\n named node, for example because it is used to cache repetition.\n */\n get isAnonymous() { return (this.flags & 8 /* NodeFlag.Anonymous */) > 0; }\n /**\n Returns true when this node's name or one of its\n [groups](#common.NodeProp^group) matches the given string.\n */\n is(name) {\n if (typeof name == 'string') {\n if (this.name == name)\n return true;\n let group = this.prop(NodeProp.group);\n return group ? group.indexOf(name) > -1 : false;\n }\n return this.id == name;\n }\n /**\n Create a function from node types to arbitrary values by\n specifying an object whose property names are node or\n [group](#common.NodeProp^group) names. Often useful with\n [`NodeProp.add`](#common.NodeProp.add). You can put multiple\n names, separated by spaces, in a single property name to map\n multiple node names to a single value.\n */\n static match(map) {\n let direct = Object.create(null);\n for (let prop in map)\n for (let name of prop.split(\" \"))\n direct[name] = map[prop];\n return (node) => {\n for (let groups = node.prop(NodeProp.group), i = -1; i < (groups ? groups.length : 0); i++) {\n let found = direct[i < 0 ? node.name : groups[i]];\n if (found)\n return found;\n }\n };\n }\n}\n/**\nAn empty dummy node type to use when no actual type is available.\n*/\nNodeType.none = new NodeType(\"\", Object.create(null), 0, 8 /* NodeFlag.Anonymous */);\n/**\nA node set holds a collection of node types. It is used to\ncompactly represent trees by storing their type ids, rather than a\nfull pointer to the type object, in a numeric array. Each parser\n[has](#lr.LRParser.nodeSet) a node set, and [tree\nbuffers](#common.TreeBuffer) can only store collections of nodes\nfrom the same set. A set can have a maximum of 2**16 (65536) node\ntypes in it, so that the ids fit into 16-bit typed array slots.\n*/\nclass NodeSet {\n /**\n Create a set with the given types. The `id` property of each\n type should correspond to its position within the array.\n */\n constructor(\n /**\n The node types in this set, by id.\n */\n types) {\n this.types = types;\n for (let i = 0; i < types.length; i++)\n if (types[i].id != i)\n throw new RangeError(\"Node type ids should correspond to array positions when creating a node set\");\n }\n /**\n Create a copy of this set with some node properties added. The\n arguments to this method can be created with\n [`NodeProp.add`](#common.NodeProp.add).\n */\n extend(...props) {\n let newTypes = [];\n for (let type of this.types) {\n let newProps = null;\n for (let source of props) {\n let add = source(type);\n if (add) {\n if (!newProps)\n newProps = Object.assign({}, type.props);\n let value = add[1], prop = add[0];\n if (prop.combine && prop.id in newProps)\n value = prop.combine(newProps[prop.id], value);\n newProps[prop.id] = value;\n }\n }\n newTypes.push(newProps ? new NodeType(type.name, newProps, type.id, type.flags) : type);\n }\n return new NodeSet(newTypes);\n }\n}\nconst CachedNode = new WeakMap(), CachedInnerNode = new WeakMap();\n/**\nOptions that control iteration. Can be combined with the `|`\noperator to enable multiple ones.\n*/\nvar IterMode;\n(function (IterMode) {\n /**\n When enabled, iteration will only visit [`Tree`](#common.Tree)\n objects, not nodes packed into\n [`TreeBuffer`](#common.TreeBuffer)s.\n */\n IterMode[IterMode[\"ExcludeBuffers\"] = 1] = \"ExcludeBuffers\";\n /**\n Enable this to make iteration include anonymous nodes (such as\n the nodes that wrap repeated grammar constructs into a balanced\n tree).\n */\n IterMode[IterMode[\"IncludeAnonymous\"] = 2] = \"IncludeAnonymous\";\n /**\n By default, regular [mounted](#common.NodeProp^mounted) nodes\n replace their base node in iteration. Enable this to ignore them\n instead.\n */\n IterMode[IterMode[\"IgnoreMounts\"] = 4] = \"IgnoreMounts\";\n /**\n This option only applies in\n [`enter`](#common.SyntaxNode.enter)-style methods. It tells the\n library to not enter mounted overlays if one covers the given\n position.\n */\n IterMode[IterMode[\"IgnoreOverlays\"] = 8] = \"IgnoreOverlays\";\n /**\n When set, positions on the boundary of a mounted overlay tree\n that has its [`bracketed`](#common.NestedParse.bracketed) flag\n set will enter that tree regardless of side. Only supported in\n [`enter`](#common.SyntaxNode.enter), not in cursors.\n */\n IterMode[IterMode[\"EnterBracketed\"] = 16] = \"EnterBracketed\";\n})(IterMode || (IterMode = {}));\n/**\nA piece of syntax tree. There are two ways to approach these\ntrees: the way they are actually stored in memory, and the\nconvenient way.\n\nSyntax trees are stored as a tree of `Tree` and `TreeBuffer`\nobjects. By packing detail information into `TreeBuffer` leaf\nnodes, the representation is made a lot more memory-efficient.\n\nHowever, when you want to actually work with tree nodes, this\nrepresentation is very awkward, so most client code will want to\nuse the [`TreeCursor`](#common.TreeCursor) or\n[`SyntaxNode`](#common.SyntaxNode) interface instead, which provides\na view on some part of this data structure, and can be used to\nmove around to adjacent nodes.\n*/\nclass Tree {\n /**\n Construct a new tree. See also [`Tree.build`](#common.Tree^build).\n */\n constructor(\n /**\n The type of the top node.\n */\n type, \n /**\n This node's child nodes.\n */\n children, \n /**\n The positions (offsets relative to the start of this tree) of\n the children.\n */\n positions, \n /**\n The total length of this tree\n */\n length, \n /**\n Per-node [node props](#common.NodeProp) to associate with this node.\n */\n props) {\n this.type = type;\n this.children = children;\n this.positions = positions;\n this.length = length;\n /**\n @internal\n */\n this.props = null;\n if (props && props.length) {\n this.props = Object.create(null);\n for (let [prop, value] of props)\n this.props[typeof prop == \"number\" ? prop : prop.id] = value;\n }\n }\n /**\n @internal\n */\n toString() {\n let mounted = MountedTree.get(this);\n if (mounted && !mounted.overlay)\n return mounted.tree.toString();\n let children = \"\";\n for (let ch of this.children) {\n let str = ch.toString();\n if (str) {\n if (children)\n children += \",\";\n children += str;\n }\n }\n return !this.type.name ? children :\n (/\\W/.test(this.type.name) && !this.type.isError ? JSON.stringify(this.type.name) : this.type.name) +\n (children.length ? \"(\" + children + \")\" : \"\");\n }\n /**\n Get a [tree cursor](#common.TreeCursor) positioned at the top of\n the tree. Mode can be used to [control](#common.IterMode) which\n nodes the cursor visits.\n */\n cursor(mode = 0) {\n return new TreeCursor(this.topNode, mode);\n }\n /**\n Get a [tree cursor](#common.TreeCursor) pointing into this tree\n at the given position and side (see\n [`moveTo`](#common.TreeCursor.moveTo).\n */\n cursorAt(pos, side = 0, mode = 0) {\n let scope = CachedNode.get(this) || this.topNode;\n let cursor = new TreeCursor(scope);\n cursor.moveTo(pos, side);\n CachedNode.set(this, cursor._tree);\n return cursor;\n }\n /**\n Get a [syntax node](#common.SyntaxNode) object for the top of the\n tree.\n */\n get topNode() {\n return new TreeNode(this, 0, 0, null);\n }\n /**\n Get the [syntax node](#common.SyntaxNode) at the given position.\n If `side` is -1, this will move into nodes that end at the\n position. If 1, it'll move into nodes that start at the\n position. With 0, it'll only enter nodes that cover the position\n from both sides.\n \n Note that this will not enter\n [overlays](#common.MountedTree.overlay), and you often want\n [`resolveInner`](#common.Tree.resolveInner) instead.\n */\n resolve(pos, side = 0) {\n let node = resolveNode(CachedNode.get(this) || this.topNode, pos, side, false);\n CachedNode.set(this, node);\n return node;\n }\n /**\n Like [`resolve`](#common.Tree.resolve), but will enter\n [overlaid](#common.MountedTree.overlay) nodes, producing a syntax node\n pointing into the innermost overlaid tree at the given position\n (with parent links going through all parent structure, including\n the host trees).\n */\n resolveInner(pos, side = 0) {\n let node = resolveNode(CachedInnerNode.get(this) || this.topNode, pos, side, true);\n CachedInnerNode.set(this, node);\n return node;\n }\n /**\n In some situations, it can be useful to iterate through all\n nodes around a position, including those in overlays that don't\n directly cover the position. This method gives you an iterator\n that will produce all nodes, from small to big, around the given\n position.\n */\n resolveStack(pos, side = 0) {\n return stackIterator(this, pos, side);\n }\n /**\n Iterate over the tree and its children, calling `enter` for any\n node that touches the `from`/`to` region (if given) before\n running over such a node's children, and `leave` (if given) when\n leaving the node. When `enter` returns `false`, that node will\n not have its children iterated over (or `leave` called).\n */\n iterate(spec) {\n let { enter, leave, from = 0, to = this.length } = spec;\n let mode = spec.mode || 0, anon = (mode & IterMode.IncludeAnonymous) > 0;\n for (let c = this.cursor(mode | IterMode.IncludeAnonymous);;) {\n let entered = false;\n if (c.from <= to && c.to >= from && (!anon && c.type.isAnonymous || enter(c) !== false)) {\n if (c.firstChild())\n continue;\n entered = true;\n }\n for (;;) {\n if (entered && leave && (anon || !c.type.isAnonymous))\n leave(c);\n if (c.nextSibling())\n break;\n if (!c.parent())\n return;\n entered = true;\n }\n }\n }\n /**\n Get the value of the given [node prop](#common.NodeProp) for this\n node. Works with both per-node and per-type props.\n */\n prop(prop) {\n return !prop.perNode ? this.type.prop(prop) : this.props ? this.props[prop.id] : undefined;\n }\n /**\n Returns the node's [per-node props](#common.NodeProp.perNode) in a\n format that can be passed to the [`Tree`](#common.Tree)\n constructor.\n */\n get propValues() {\n let result = [];\n if (this.props)\n for (let id in this.props)\n result.push([+id, this.props[id]]);\n return result;\n }\n /**\n Balance the direct children of this tree, producing a copy of\n which may have children grouped into subtrees with type\n [`NodeType.none`](#common.NodeType^none).\n */\n balance(config = {}) {\n return this.children.length <= 8 /* Balance.BranchFactor */ ? this :\n balanceRange(NodeType.none, this.children, this.positions, 0, this.children.length, 0, this.length, (children, positions, length) => new Tree(this.type, children, positions, length, this.propValues), config.makeTree || ((children, positions, length) => new Tree(NodeType.none, children, positions, length)));\n }\n /**\n Build a tree from a postfix-ordered buffer of node information,\n or a cursor over such a buffer.\n */\n static build(data) { return buildTree(data); }\n}\n/**\nThe empty tree\n*/\nTree.empty = new Tree(NodeType.none, [], [], 0);\nclass FlatBufferCursor {\n constructor(buffer, index) {\n this.buffer = buffer;\n this.index = index;\n }\n get id() { return this.buffer[this.index - 4]; }\n get start() { return this.buffer[this.index - 3]; }\n get end() { return this.buffer[this.index - 2]; }\n get size() { return this.buffer[this.index - 1]; }\n get pos() { return this.index; }\n next() { this.index -= 4; }\n fork() { return new FlatBufferCursor(this.buffer, this.index); }\n}\n/**\nTree buffers contain (type, start, end, endIndex) quads for each\nnode. In such a buffer, nodes are stored in prefix order (parents\nbefore children, with the endIndex of the parent indicating which\nchildren belong to it).\n*/\nclass TreeBuffer {\n /**\n Create a tree buffer.\n */\n constructor(\n /**\n The buffer's content.\n */\n buffer, \n /**\n The total length of the group of nodes in the buffer.\n */\n length, \n /**\n The node set used in this buffer.\n */\n set) {\n this.buffer = buffer;\n this.length = length;\n this.set = set;\n }\n /**\n @internal\n */\n get type() { return NodeType.none; }\n /**\n @internal\n */\n toString() {\n let result = [];\n for (let index = 0; index < this.buffer.length;) {\n result.push(this.childString(index));\n index = this.buffer[index + 3];\n }\n return result.join(\",\");\n }\n /**\n @internal\n */\n childString(index) {\n let id = this.buffer[index], endIndex = this.buffer[index + 3];\n let type = this.set.types[id], result = type.name;\n if (/\\W/.test(result) && !type.isError)\n result = JSON.stringify(result);\n index += 4;\n if (endIndex == index)\n return result;\n let children = [];\n while (index < endIndex) {\n children.push(this.childString(index));\n index = this.buffer[index + 3];\n }\n return result + \"(\" + children.join(\",\") + \")\";\n }\n /**\n @internal\n */\n findChild(startIndex, endIndex, dir, pos, side) {\n let { buffer } = this, pick = -1;\n for (let i = startIndex; i != endIndex; i = buffer[i + 3]) {\n if (checkSide(side, pos, buffer[i + 1], buffer[i + 2])) {\n pick = i;\n if (dir > 0)\n break;\n }\n }\n return pick;\n }\n /**\n @internal\n */\n slice(startI, endI, from) {\n let b = this.buffer;\n let copy = new Uint16Array(endI - startI), len = 0;\n for (let i = startI, j = 0; i < endI;) {\n copy[j++] = b[i++];\n copy[j++] = b[i++] - from;\n let to = copy[j++] = b[i++] - from;\n copy[j++] = b[i++] - startI;\n len = Math.max(len, to);\n }\n return new TreeBuffer(copy, len, this.set);\n }\n}\nfunction checkSide(side, pos, from, to) {\n switch (side) {\n case -2 /* Side.Before */: return from < pos;\n case -1 /* Side.AtOrBefore */: return to >= pos && from < pos;\n case 0 /* Side.Around */: return from < pos && to > pos;\n case 1 /* Side.AtOrAfter */: return from <= pos && to > pos;\n case 2 /* Side.After */: return to > pos;\n case 4 /* Side.DontCare */: return true;\n }\n}\nfunction resolveNode(node, pos, side, overlays) {\n var _a;\n // Move up to a node that actually holds the position, if possible\n while (node.from == node.to ||\n (side < 1 ? node.from >= pos : node.from > pos) ||\n (side > -1 ? node.to <= pos : node.to < pos)) {\n let parent = !overlays && node instanceof TreeNode && node.index < 0 ? null : node.parent;\n if (!parent)\n return node;\n node = parent;\n }\n let mode = overlays ? 0 : IterMode.IgnoreOverlays;\n // Must go up out of overlays when those do not overlap with pos\n if (overlays)\n for (let scan = node, parent = scan.parent; parent; scan = parent, parent = scan.parent) {\n if (scan instanceof TreeNode && scan.index < 0 && ((_a = parent.enter(pos, side, mode)) === null || _a === void 0 ? void 0 : _a.from) != scan.from)\n node = parent;\n }\n for (;;) {\n let inner = node.enter(pos, side, mode);\n if (!inner)\n return node;\n node = inner;\n }\n}\nclass BaseNode {\n cursor(mode = 0) { return new TreeCursor(this, mode); }\n getChild(type, before = null, after = null) {\n let r = getChildren(this, type, before, after);\n return r.length ? r[0] : null;\n }\n getChildren(type, before = null, after = null) {\n return getChildren(this, type, before, after);\n }\n resolve(pos, side = 0) {\n return resolveNode(this, pos, side, false);\n }\n resolveInner(pos, side = 0) {\n return resolveNode(this, pos, side, true);\n }\n matchContext(context) {\n return matchNodeContext(this.parent, context);\n }\n enterUnfinishedNodesBefore(pos) {\n let scan = this.childBefore(pos), node = this;\n while (scan) {\n let last = scan.lastChild;\n if (!last || last.to != scan.to)\n break;\n if (last.type.isError && last.from == last.to) {\n node = scan;\n scan = last.prevSibling;\n }\n else {\n scan = last;\n }\n }\n return node;\n }\n get node() { return this; }\n get next() { return this.parent; }\n}\nclass TreeNode extends BaseNode {\n constructor(_tree, from, \n // Index in parent node, set to -1 if the node is not a direct child of _parent.node (overlay)\n index, _parent) {\n super();\n this._tree = _tree;\n this.from = from;\n this.index = index;\n this._parent = _parent;\n }\n get type() { return this._tree.type; }\n get name() { return this._tree.type.name; }\n get to() { return this.from + this._tree.length; }\n nextChild(i, dir, pos, side, mode = 0) {\n for (let parent = this;;) {\n for (let { children, positions } = parent._tree, e = dir > 0 ? children.length : -1; i != e; i += dir) {\n let next = children[i], start = positions[i] + parent.from, mounted;\n if (!((mode & IterMode.EnterBracketed) && next instanceof Tree &&\n (mounted = MountedTree.get(next)) && !mounted.overlay && mounted.bracketed &&\n pos >= start && pos <= start + next.length) &&\n !checkSide(side, pos, start, start + next.length))\n continue;\n if (next instanceof TreeBuffer) {\n if (mode & IterMode.ExcludeBuffers)\n continue;\n let index = next.findChild(0, next.buffer.length, dir, pos - start, side);\n if (index > -1)\n return new BufferNode(new BufferContext(parent, next, i, start), null, index);\n }\n else if ((mode & IterMode.IncludeAnonymous) || (!next.type.isAnonymous || hasChild(next))) {\n let mounted;\n if (!(mode & IterMode.IgnoreMounts) && (mounted = MountedTree.get(next)) && !mounted.overlay)\n return new TreeNode(mounted.tree, start, i, parent);\n let inner = new TreeNode(next, start, i, parent);\n return (mode & IterMode.IncludeAnonymous) || !inner.type.isAnonymous ? inner\n : inner.nextChild(dir < 0 ? next.children.length - 1 : 0, dir, pos, side, mode);\n }\n }\n if ((mode & IterMode.IncludeAnonymous) || !parent.type.isAnonymous)\n return null;\n if (parent.index >= 0)\n i = parent.index + dir;\n else\n i = dir < 0 ? -1 : parent._parent._tree.children.length;\n parent = parent._parent;\n if (!parent)\n return null;\n }\n }\n get firstChild() { return this.nextChild(0, 1, 0, 4 /* Side.DontCare */); }\n get lastChild() { return this.nextChild(this._tree.children.length - 1, -1, 0, 4 /* Side.DontCare */); }\n childAfter(pos) { return this.nextChild(0, 1, pos, 2 /* Side.After */); }\n childBefore(pos) { return this.nextChild(this._tree.children.length - 1, -1, pos, -2 /* Side.Before */); }\n prop(prop) { return this._tree.prop(prop); }\n enter(pos, side, mode = 0) {\n let mounted;\n if (!(mode & IterMode.IgnoreOverlays) && (mounted = MountedTree.get(this._tree)) && mounted.overlay) {\n let rPos = pos - this.from, enterBracketed = (mode & IterMode.EnterBracketed) && mounted.bracketed;\n for (let { from, to } of mounted.overlay) {\n if ((side > 0 || enterBracketed ? from <= rPos : from < rPos) &&\n (side < 0 || enterBracketed ? to >= rPos : to > rPos))\n return new TreeNode(mounted.tree, mounted.overlay[0].from + this.from, -1, this);\n }\n }\n return this.nextChild(0, 1, pos, side, mode);\n }\n nextSignificantParent() {\n let val = this;\n while (val.type.isAnonymous && val._parent)\n val = val._parent;\n return val;\n }\n get parent() {\n return this._parent ? this._parent.nextSignificantParent() : null;\n }\n get nextSibling() {\n return this._parent && this.index >= 0 ? this._parent.nextChild(this.index + 1, 1, 0, 4 /* Side.DontCare */) : null;\n }\n get prevSibling() {\n return this._parent && this.index >= 0 ? this._parent.nextChild(this.index - 1, -1, 0, 4 /* Side.DontCare */) : null;\n }\n get tree() { return this._tree; }\n toTree() { return this._tree; }\n /**\n @internal\n */\n toString() { return this._tree.toString(); }\n}\nfunction getChildren(node, type, before, after) {\n let cur = node.cursor(), result = [];\n if (!cur.firstChild())\n return result;\n if (before != null)\n for (let found = false; !found;) {\n found = cur.type.is(before);\n if (!cur.nextSibling())\n return result;\n }\n for (;;) {\n if (after != null && cur.type.is(after))\n return result;\n if (cur.type.is(type))\n result.push(cur.node);\n if (!cur.nextSibling())\n return after == null ? result : [];\n }\n}\nfunction matchNodeContext(node, context, i = context.length - 1) {\n for (let p = node; i >= 0; p = p.parent) {\n if (!p)\n return false;\n if (!p.type.isAnonymous) {\n if (context[i] && context[i] != p.name)\n return false;\n i--;\n }\n }\n return true;\n}\nclass BufferContext {\n constructor(parent, buffer, index, start) {\n this.parent = parent;\n this.buffer = buffer;\n this.index = index;\n this.start = start;\n }\n}\nclass BufferNode extends BaseNode {\n get name() { return this.type.name; }\n get from() { return this.context.start + this.context.buffer.buffer[this.index + 1]; }\n get to() { return this.context.start + this.context.buffer.buffer[this.index + 2]; }\n constructor(context, _parent, index) {\n super();\n this.context = context;\n this._parent = _parent;\n this.index = index;\n this.type = context.buffer.set.types[context.buffer.buffer[index]];\n }\n child(dir, pos, side) {\n let { buffer } = this.context;\n let index = buffer.findChild(this.index + 4, buffer.buffer[this.index + 3], dir, pos - this.context.start, side);\n return index < 0 ? null : new BufferNode(this.context, this, index);\n }\n get firstChild() { return this.child(1, 0, 4 /* Side.DontCare */); }\n get lastChild() { return this.child(-1, 0, 4 /* Side.DontCare */); }\n childAfter(pos) { return this.child(1, pos, 2 /* Side.After */); }\n childBefore(pos) { return this.child(-1, pos, -2 /* Side.Before */); }\n prop(prop) { return this.type.prop(prop); }\n enter(pos, side, mode = 0) {\n if (mode & IterMode.ExcludeBuffers)\n return null;\n let { buffer } = this.context;\n let index = buffer.findChild(this.index + 4, buffer.buffer[this.index + 3], side > 0 ? 1 : -1, pos - this.context.start, side);\n return index < 0 ? null : new BufferNode(this.context, this, index);\n }\n get parent() {\n return this._parent || this.context.parent.nextSignificantParent();\n }\n externalSibling(dir) {\n return this._parent ? null : this.context.parent.nextChild(this.context.index + dir, dir, 0, 4 /* Side.DontCare */);\n }\n get nextSibling() {\n let { buffer } = this.context;\n let after = buffer.buffer[this.index + 3];\n if (after < (this._parent ? buffer.buffer[this._parent.index + 3] : buffer.buffer.length))\n return new BufferNode(this.context, this._parent, after);\n return this.externalSibling(1);\n }\n get prevSibling() {\n let { buffer } = this.context;\n let parentStart = this._parent ? this._parent.index + 4 : 0;\n if (this.index == parentStart)\n return this.externalSibling(-1);\n return new BufferNode(this.context, this._parent, buffer.findChild(parentStart, this.index, -1, 0, 4 /* Side.DontCare */));\n }\n get tree() { return null; }\n toTree() {\n let children = [], positions = [];\n let { buffer } = this.context;\n let startI = this.index + 4, endI = buffer.buffer[this.index + 3];\n if (endI > startI) {\n let from = buffer.buffer[this.index + 1];\n children.push(buffer.slice(startI, endI, from));\n positions.push(0);\n }\n return new Tree(this.type, children, positions, this.to - this.from);\n }\n /**\n @internal\n */\n toString() { return this.context.buffer.childString(this.index); }\n}\nfunction iterStack(heads) {\n if (!heads.length)\n return null;\n let pick = 0, picked = heads[0];\n for (let i = 1; i < heads.length; i++) {\n let node = heads[i];\n if (node.from > picked.from || node.to < picked.to) {\n picked = node;\n pick = i;\n }\n }\n let next = picked instanceof TreeNode && picked.index < 0 ? null : picked.parent;\n let newHeads = heads.slice();\n if (next)\n newHeads[pick] = next;\n else\n newHeads.splice(pick, 1);\n return new StackIterator(newHeads, picked);\n}\nclass StackIterator {\n constructor(heads, node) {\n this.heads = heads;\n this.node = node;\n }\n get next() { return iterStack(this.heads); }\n}\nfunction stackIterator(tree, pos, side) {\n let inner = tree.resolveInner(pos, side), layers = null;\n for (let scan = inner instanceof TreeNode ? inner : inner.context.parent; scan; scan = scan.parent) {\n if (scan.index < 0) { // This is an overlay root\n let parent = scan.parent;\n (layers || (layers = [inner])).push(parent.resolve(pos, side));\n scan = parent;\n }\n else {\n let mount = MountedTree.get(scan.tree);\n // Relevant overlay branching off\n if (mount && mount.overlay && mount.overlay[0].from <= pos && mount.overlay[mount.overlay.length - 1].to >= pos) {\n let root = new TreeNode(mount.tree, mount.overlay[0].from + scan.from, -1, scan);\n (layers || (layers = [inner])).push(resolveNode(root, pos, side, false));\n }\n }\n }\n return layers ? iterStack(layers) : inner;\n}\n/**\nA tree cursor object focuses on a given node in a syntax tree, and\nallows you to move to adjacent nodes.\n*/\nclass TreeCursor {\n /**\n Shorthand for `.type.name`.\n */\n get name() { return this.type.name; }\n /**\n @internal\n */\n constructor(node, mode = 0) {\n /**\n @internal\n */\n this.buffer = null;\n this.stack = [];\n /**\n @internal\n */\n this.index = 0;\n this.bufferNode = null;\n this.mode = mode & ~IterMode.EnterBracketed;\n if (node instanceof TreeNode) {\n this.yieldNode(node);\n }\n else {\n this._tree = node.context.parent;\n this.buffer = node.context;\n for (let n = node._parent; n; n = n._parent)\n this.stack.unshift(n.index);\n this.bufferNode = node;\n this.yieldBuf(node.index);\n }\n }\n yieldNode(node) {\n if (!node)\n return false;\n this._tree = node;\n this.type = node.type;\n this.from = node.from;\n this.to = node.to;\n return true;\n }\n yieldBuf(index, type) {\n this.index = index;\n let { start, buffer } = this.buffer;\n this.type = type || buffer.set.types[buffer.buffer[index]];\n this.from = start + buffer.buffer[index + 1];\n this.to = start + buffer.buffer[index + 2];\n return true;\n }\n /**\n @internal\n */\n yield(node) {\n if (!node)\n return false;\n if (node instanceof TreeNode) {\n this.buffer = null;\n return this.yieldNode(node);\n }\n this.buffer = node.context;\n return this.yieldBuf(node.index, node.type);\n }\n /**\n @internal\n */\n toString() {\n return this.buffer ? this.buffer.buffer.childString(this.index) : this._tree.toString();\n }\n /**\n @internal\n */\n enterChild(dir, pos, side) {\n if (!this.buffer)\n return this.yield(this._tree.nextChild(dir < 0 ? this._tree._tree.children.length - 1 : 0, dir, pos, side, this.mode));\n let { buffer } = this.buffer;\n let index = buffer.findChild(this.index + 4, buffer.buffer[this.index + 3], dir, pos - this.buffer.start, side);\n if (index < 0)\n return false;\n this.stack.push(this.index);\n return this.yieldBuf(index);\n }\n /**\n Move the cursor to this node's first child. When this returns\n false, the node has no child, and the cursor has not been moved.\n */\n firstChild() { return this.enterChild(1, 0, 4 /* Side.DontCare */); }\n /**\n Move the cursor to this node's last child.\n */\n lastChild() { return this.enterChild(-1, 0, 4 /* Side.DontCare */); }\n /**\n Move the cursor to the first child that ends after `pos`.\n */\n childAfter(pos) { return this.enterChild(1, pos, 2 /* Side.After */); }\n /**\n Move to the last child that starts before `pos`.\n */\n childBefore(pos) { return this.enterChild(-1, pos, -2 /* Side.Before */); }\n /**\n Move the cursor to the child around `pos`. If side is -1 the\n child may end at that position, when 1 it may start there. This\n will also enter [overlaid](#common.MountedTree.overlay)\n [mounted](#common.NodeProp^mounted) trees unless `overlays` is\n set to false.\n */\n enter(pos, side, mode = this.mode) {\n if (!this.buffer)\n return this.yield(this._tree.enter(pos, side, mode));\n return mode & IterMode.ExcludeBuffers ? false : this.enterChild(1, pos, side);\n }\n /**\n Move to the node's parent node, if this isn't the top node.\n */\n parent() {\n if (!this.buffer)\n return this.yieldNode((this.mode & IterMode.IncludeAnonymous) ? this._tree._parent : this._tree.parent);\n if (this.stack.length)\n return this.yieldBuf(this.stack.pop());\n let parent = (this.mode & IterMode.IncludeAnonymous) ? this.buffer.parent : this.buffer.parent.nextSignificantParent();\n this.buffer = null;\n return this.yieldNode(parent);\n }\n /**\n @internal\n */\n sibling(dir) {\n if (!this.buffer)\n return !this._tree._parent ? false\n : this.yield(this._tree.index < 0 ? null\n : this._tree._parent.nextChild(this._tree.index + dir, dir, 0, 4 /* Side.DontCare */, this.mode));\n let { buffer } = this.buffer, d = this.stack.length - 1;\n if (dir < 0) {\n let parentStart = d < 0 ? 0 : this.stack[d] + 4;\n if (this.index != parentStart)\n return this.yieldBuf(buffer.findChild(parentStart, this.index, -1, 0, 4 /* Side.DontCare */));\n }\n else {\n let after = buffer.buffer[this.index + 3];\n if (after < (d < 0 ? buffer.buffer.length : buffer.buffer[this.stack[d] + 3]))\n return this.yieldBuf(after);\n }\n return d < 0 ? this.yield(this.buffer.parent.nextChild(this.buffer.index + dir, dir, 0, 4 /* Side.DontCare */, this.mode)) : false;\n }\n /**\n Move to this node's next sibling, if any.\n */\n nextSibling() { return this.sibling(1); }\n /**\n Move to this node's previous sibling, if any.\n */\n prevSibling() { return this.sibling(-1); }\n atLastNode(dir) {\n let index, parent, { buffer } = this;\n if (buffer) {\n if (dir > 0) {\n if (this.index < buffer.buffer.buffer.length)\n return false;\n }\n else {\n for (let i = 0; i < this.index; i++)\n if (buffer.buffer.buffer[i + 3] < this.index)\n return false;\n }\n ({ index, parent } = buffer);\n }\n else {\n ({ index, _parent: parent } = this._tree);\n }\n for (; parent; { index, _parent: parent } = parent) {\n if (index > -1)\n for (let i = index + dir, e = dir < 0 ? -1 : parent._tree.children.length; i != e; i += dir) {\n let child = parent._tree.children[i];\n if ((this.mode & IterMode.IncludeAnonymous) ||\n child instanceof TreeBuffer ||\n !child.type.isAnonymous ||\n hasChild(child))\n return false;\n }\n }\n return true;\n }\n move(dir, enter) {\n if (enter && this.enterChild(dir, 0, 4 /* Side.DontCare */))\n return true;\n for (;;) {\n if (this.sibling(dir))\n return true;\n if (this.atLastNode(dir) || !this.parent())\n return false;\n }\n }\n /**\n Move to the next node in a\n [pre-order](https://en.wikipedia.org/wiki/Tree_traversal#Pre-order,_NLR)\n traversal, going from a node to its first child or, if the\n current node is empty or `enter` is false, its next sibling or\n the next sibling of the first parent node that has one.\n */\n next(enter = true) { return this.move(1, enter); }\n /**\n Move to the next node in a last-to-first pre-order traversal. A\n node is followed by its last child or, if it has none, its\n previous sibling or the previous sibling of the first parent\n node that has one.\n */\n prev(enter = true) { return this.move(-1, enter); }\n /**\n Move the cursor to the innermost node that covers `pos`. If\n `side` is -1, it will enter nodes that end at `pos`. If it is 1,\n it will enter nodes that start at `pos`.\n */\n moveTo(pos, side = 0) {\n // Move up to a node that actually holds the position, if possible\n while (this.from == this.to ||\n (side < 1 ? this.from >= pos : this.from > pos) ||\n (side > -1 ? this.to <= pos : this.to < pos))\n if (!this.parent())\n break;\n // Then scan down into child nodes as far as possible\n while (this.enterChild(1, pos, side)) { }\n return this;\n }\n /**\n Get a [syntax node](#common.SyntaxNode) at the cursor's current\n position.\n */\n get node() {\n if (!this.buffer)\n return this._tree;\n let cache = this.bufferNode, result = null, depth = 0;\n if (cache && cache.context == this.buffer) {\n scan: for (let index = this.index, d = this.stack.length; d >= 0;) {\n for (let c = cache; c; c = c._parent)\n if (c.index == index) {\n if (index == this.index)\n return c;\n result = c;\n depth = d + 1;\n break scan;\n }\n index = this.stack[--d];\n }\n }\n for (let i = depth; i < this.stack.length; i++)\n result = new BufferNode(this.buffer, result, this.stack[i]);\n return this.bufferNode = new BufferNode(this.buffer, result, this.index);\n }\n /**\n Get the [tree](#common.Tree) that represents the current node, if\n any. Will return null when the node is in a [tree\n buffer](#common.TreeBuffer).\n */\n get tree() {\n return this.buffer ? null : this._tree._tree;\n }\n /**\n Iterate over the current node and all its descendants, calling\n `enter` when entering a node and `leave`, if given, when leaving\n one. When `enter` returns `false`, any children of that node are\n skipped, and `leave` isn't called for it.\n */\n iterate(enter, leave) {\n for (let depth = 0;;) {\n let mustLeave = false;\n if (this.type.isAnonymous || enter(this) !== false) {\n if (this.firstChild()) {\n depth++;\n continue;\n }\n if (!this.type.isAnonymous)\n mustLeave = true;\n }\n for (;;) {\n if (mustLeave && leave)\n leave(this);\n mustLeave = this.type.isAnonymous;\n if (!depth)\n return;\n if (this.nextSibling())\n break;\n this.parent();\n depth--;\n mustLeave = true;\n }\n }\n }\n /**\n Test whether the current node matches a given context—a sequence\n of direct parent node names. Empty strings in the context array\n are treated as wildcards.\n */\n matchContext(context) {\n if (!this.buffer)\n return matchNodeContext(this.node.parent, context);\n let { buffer } = this.buffer, { types } = buffer.set;\n for (let i = context.length - 1, d = this.stack.length - 1; i >= 0; d--) {\n if (d < 0)\n return matchNodeContext(this._tree, context, i);\n let type = types[buffer.buffer[this.stack[d]]];\n if (!type.isAnonymous) {\n if (context[i] && context[i] != type.name)\n return false;\n i--;\n }\n }\n return true;\n }\n}\nfunction hasChild(tree) {\n return tree.children.some(ch => ch instanceof TreeBuffer || !ch.type.isAnonymous || hasChild(ch));\n}\nfunction buildTree(data) {\n var _a;\n let { buffer, nodeSet, maxBufferLength = DefaultBufferLength, reused = [], minRepeatType = nodeSet.types.length } = data;\n let cursor = Array.isArray(buffer) ? new FlatBufferCursor(buffer, buffer.length) : buffer;\n let types = nodeSet.types;\n let contextHash = 0, lookAhead = 0;\n function takeNode(parentStart, minPos, children, positions, inRepeat, depth) {\n let { id, start, end, size } = cursor;\n let lookAheadAtStart = lookAhead, contextAtStart = contextHash;\n if (size < 0) {\n cursor.next();\n if (size == -1 /* SpecialRecord.Reuse */) {\n let node = reused[id];\n children.push(node);\n positions.push(start - parentStart);\n return;\n }\n else if (size == -3 /* SpecialRecord.ContextChange */) { // Context change\n contextHash = id;\n return;\n }\n else if (size == -4 /* SpecialRecord.LookAhead */) {\n lookAhead = id;\n return;\n }\n else {\n throw new RangeError(`Unrecognized record size: ${size}`);\n }\n }\n let type = types[id], node, buffer;\n let startPos = start - parentStart;\n if (end - start <= maxBufferLength && (buffer = findBufferSize(cursor.pos - minPos, inRepeat))) {\n // Small enough for a buffer, and no reused nodes inside\n let data = new Uint16Array(buffer.size - buffer.skip);\n let endPos = cursor.pos - buffer.size, index = data.length;\n while (cursor.pos > endPos)\n index = copyToBuffer(buffer.start, data, index);\n node = new TreeBuffer(data, end - buffer.start, nodeSet);\n startPos = buffer.start - parentStart;\n }\n else { // Make it a node\n let endPos = cursor.pos - size;\n cursor.next();\n let localChildren = [], localPositions = [];\n let localInRepeat = id >= minRepeatType ? id : -1;\n let lastGroup = 0, lastEnd = end;\n while (cursor.pos > endPos) {\n if (localInRepeat >= 0 && cursor.id == localInRepeat && cursor.size >= 0) {\n if (cursor.end <= lastEnd - maxBufferLength) {\n makeRepeatLeaf(localChildren, localPositions, start, lastGroup, cursor.end, lastEnd, localInRepeat, lookAheadAtStart, contextAtStart);\n lastGroup = localChildren.length;\n lastEnd = cursor.end;\n }\n cursor.next();\n }\n else if (depth > 2500 /* CutOff.Depth */) {\n takeFlatNode(start, endPos, localChildren, localPositions);\n }\n else {\n takeNode(start, endPos, localChildren, localPositions, localInRepeat, depth + 1);\n }\n }\n if (localInRepeat >= 0 && lastGroup > 0 && lastGroup < localChildren.length)\n makeRepeatLeaf(localChildren, localPositions, start, lastGroup, start, lastEnd, localInRepeat, lookAheadAtStart, contextAtStart);\n localChildren.reverse();\n localPositions.reverse();\n if (localInRepeat > -1 && lastGroup > 0) {\n let make = makeBalanced(type, contextAtStart);\n node = balanceRange(type, localChildren, localPositions, 0, localChildren.length, 0, end - start, make, make);\n }\n else {\n node = makeTree(type, localChildren, localPositions, end - start, lookAheadAtStart - end, contextAtStart);\n }\n }\n children.push(node);\n positions.push(startPos);\n }\n function takeFlatNode(parentStart, minPos, children, positions) {\n let nodes = []; // Temporary, inverted array of leaf nodes found, with absolute positions\n let nodeCount = 0, stopAt = -1;\n while (cursor.pos > minPos) {\n let { id, start, end, size } = cursor;\n if (size > 4) { // Not a leaf\n cursor.next();\n }\n else if (stopAt > -1 && start < stopAt) {\n break;\n }\n else {\n if (stopAt < 0)\n stopAt = end - maxBufferLength;\n nodes.push(id, start, end);\n nodeCount++;\n cursor.next();\n }\n }\n if (nodeCount) {\n let buffer = new Uint16Array(nodeCount * 4);\n let start = nodes[nodes.length - 2];\n for (let i = nodes.length - 3, j = 0; i >= 0; i -= 3) {\n buffer[j++] = nodes[i];\n buffer[j++] = nodes[i + 1] - start;\n buffer[j++] = nodes[i + 2] - start;\n buffer[j++] = j;\n }\n children.push(new TreeBuffer(buffer, nodes[2] - start, nodeSet));\n positions.push(start - parentStart);\n }\n }\n function makeBalanced(type, contextHash) {\n return (children, positions, length) => {\n let lookAhead = 0, lastI = children.length - 1, last, lookAheadProp;\n if (lastI >= 0 && (last = children[lastI]) instanceof Tree) {\n if (!lastI && last.type == type && last.length == length)\n return last;\n if (lookAheadProp = last.prop(NodeProp.lookAhead))\n lookAhead = positions[lastI] + last.length + lookAheadProp;\n }\n return makeTree(type, children, positions, length, lookAhead, contextHash);\n };\n }\n function makeRepeatLeaf(children, positions, base, i, from, to, type, lookAhead, contextHash) {\n let localChildren = [], localPositions = [];\n while (children.length > i) {\n localChildren.push(children.pop());\n localPositions.push(positions.pop() + base - from);\n }\n children.push(makeTree(nodeSet.types[type], localChildren, localPositions, to - from, lookAhead - to, contextHash));\n positions.push(from - base);\n }\n function makeTree(type, children, positions, length, lookAhead, contextHash, props) {\n if (contextHash) {\n let pair = [NodeProp.contextHash, contextHash];\n props = props ? [pair].concat(props) : [pair];\n }\n if (lookAhead > 25) {\n let pair = [NodeProp.lookAhead, lookAhead];\n props = props ? [pair].concat(props) : [pair];\n }\n return new Tree(type, children, positions, length, props);\n }\n function findBufferSize(maxSize, inRepeat) {\n // Scan through the buffer to find previous siblings that fit\n // together in a TreeBuffer, and don't contain any reused nodes\n // (which can't be stored in a buffer).\n // If `inRepeat` is > -1, ignore node boundaries of that type for\n // nesting, but make sure the end falls either at the start\n // (`maxSize`) or before such a node.\n let fork = cursor.fork();\n let size = 0, start = 0, skip = 0, minStart = fork.end - maxBufferLength;\n let result = { size: 0, start: 0, skip: 0 };\n scan: for (let minPos = fork.pos - maxSize; fork.pos > minPos;) {\n let nodeSize = fork.size;\n // Pretend nested repeat nodes of the same type don't exist\n if (fork.id == inRepeat && nodeSize >= 0) {\n // Except that we store the current state as a valid return\n // value.\n result.size = size;\n result.start = start;\n result.skip = skip;\n skip += 4;\n size += 4;\n fork.next();\n continue;\n }\n let startPos = fork.pos - nodeSize;\n if (nodeSize < 0 || startPos < minPos || fork.start < minStart)\n break;\n let localSkipped = fork.id >= minRepeatType ? 4 : 0;\n let nodeStart = fork.start;\n fork.next();\n while (fork.pos > startPos) {\n if (fork.size < 0) {\n if (fork.size == -3 /* SpecialRecord.ContextChange */ || fork.size == -4 /* SpecialRecord.LookAhead */)\n localSkipped += 4;\n else\n break scan;\n }\n else if (fork.id >= minRepeatType) {\n localSkipped += 4;\n }\n fork.next();\n }\n start = nodeStart;\n size += nodeSize;\n skip += localSkipped;\n }\n if (inRepeat < 0 || size == maxSize) {\n result.size = size;\n result.start = start;\n result.skip = skip;\n }\n return result.size > 4 ? result : undefined;\n }\n function copyToBuffer(bufferStart, buffer, index) {\n let { id, start, end, size } = cursor;\n cursor.next();\n if (size >= 0 && id < minRepeatType) {\n let startIndex = index;\n if (size > 4) {\n let endPos = cursor.pos - (size - 4);\n while (cursor.pos > endPos)\n index = copyToBuffer(bufferStart, buffer, index);\n }\n buffer[--index] = startIndex;\n buffer[--index] = end - bufferStart;\n buffer[--index] = start - bufferStart;\n buffer[--index] = id;\n }\n else if (size == -3 /* SpecialRecord.ContextChange */) {\n contextHash = id;\n }\n else if (size == -4 /* SpecialRecord.LookAhead */) {\n lookAhead = id;\n }\n return index;\n }\n let children = [], positions = [];\n while (cursor.pos > 0)\n takeNode(data.start || 0, data.bufferStart || 0, children, positions, -1, 0);\n let length = (_a = data.length) !== null && _a !== void 0 ? _a : (children.length ? positions[0] + children[0].length : 0);\n return new Tree(types[data.topID], children.reverse(), positions.reverse(), length);\n}\nconst nodeSizeCache = new WeakMap;\nfunction nodeSize(balanceType, node) {\n if (!balanceType.isAnonymous || node instanceof TreeBuffer || node.type != balanceType)\n return 1;\n let size = nodeSizeCache.get(node);\n if (size == null) {\n size = 1;\n for (let child of node.children) {\n if (child.type != balanceType || !(child instanceof Tree)) {\n size = 1;\n break;\n }\n size += nodeSize(balanceType, child);\n }\n nodeSizeCache.set(node, size);\n }\n return size;\n}\nfunction balanceRange(\n// The type the balanced tree's inner nodes.\nbalanceType, \n// The direct children and their positions\nchildren, positions, \n// The index range in children/positions to use\nfrom, to, \n// The start position of the nodes, relative to their parent.\nstart, \n// Length of the outer node\nlength, \n// Function to build the top node of the balanced tree\nmkTop, \n// Function to build internal nodes for the balanced tree\nmkTree) {\n let total = 0;\n for (let i = from; i < to; i++)\n total += nodeSize(balanceType, children[i]);\n let maxChild = Math.ceil((total * 1.5) / 8 /* Balance.BranchFactor */);\n let localChildren = [], localPositions = [];\n function divide(children, positions, from, to, offset) {\n for (let i = from; i < to;) {\n let groupFrom = i, groupStart = positions[i], groupSize = nodeSize(balanceType, children[i]);\n i++;\n for (; i < to; i++) {\n let nextSize = nodeSize(balanceType, children[i]);\n if (groupSize + nextSize >= maxChild)\n break;\n groupSize += nextSize;\n }\n if (i == groupFrom + 1) {\n if (groupSize > maxChild) {\n let only = children[groupFrom]; // Only trees can have a size > 1\n divide(only.children, only.positions, 0, only.children.length, positions[groupFrom] + offset);\n continue;\n }\n localChildren.push(children[groupFrom]);\n }\n else {\n let length = positions[i - 1] + children[i - 1].length - groupStart;\n localChildren.push(balanceRange(balanceType, children, positions, groupFrom, i, groupStart, length, null, mkTree));\n }\n localPositions.push(groupStart + offset - start);\n }\n }\n divide(children, positions, from, to, 0);\n return (mkTop || mkTree)(localChildren, localPositions, length);\n}\n/**\nProvides a way to associate values with pieces of trees. As long\nas that part of the tree is reused, the associated values can be\nretrieved from an updated tree.\n*/\nclass NodeWeakMap {\n constructor() {\n this.map = new WeakMap();\n }\n setBuffer(buffer, index, value) {\n let inner = this.map.get(buffer);\n if (!inner)\n this.map.set(buffer, inner = new Map);\n inner.set(index, value);\n }\n getBuffer(buffer, index) {\n let inner = this.map.get(buffer);\n return inner && inner.get(index);\n }\n /**\n Set the value for this syntax node.\n */\n set(node, value) {\n if (node instanceof BufferNode)\n this.setBuffer(node.context.buffer, node.index, value);\n else if (node instanceof TreeNode)\n this.map.set(node.tree, value);\n }\n /**\n Retrieve value for this syntax node, if it exists in the map.\n */\n get(node) {\n return node instanceof BufferNode ? this.getBuffer(node.context.buffer, node.index)\n : node instanceof TreeNode ? this.map.get(node.tree) : undefined;\n }\n /**\n Set the value for the node that a cursor currently points to.\n */\n cursorSet(cursor, value) {\n if (cursor.buffer)\n this.setBuffer(cursor.buffer.buffer, cursor.index, value);\n else\n this.map.set(cursor.tree, value);\n }\n /**\n Retrieve the value for the node that a cursor currently points\n to.\n */\n cursorGet(cursor) {\n return cursor.buffer ? this.getBuffer(cursor.buffer.buffer, cursor.index) : this.map.get(cursor.tree);\n }\n}\n\n/**\nTree fragments are used during [incremental\nparsing](#common.Parser.startParse) to track parts of old trees\nthat can be reused in a new parse. An array of fragments is used\nto track regions of an old tree whose nodes might be reused in new\nparses. Use the static\n[`applyChanges`](#common.TreeFragment^applyChanges) method to\nupdate fragments for document changes.\n*/\nclass TreeFragment {\n /**\n Construct a tree fragment. You'll usually want to use\n [`addTree`](#common.TreeFragment^addTree) and\n [`applyChanges`](#common.TreeFragment^applyChanges) instead of\n calling this directly.\n */\n constructor(\n /**\n The start of the unchanged range pointed to by this fragment.\n This refers to an offset in the _updated_ document (as opposed\n to the original tree).\n */\n from, \n /**\n The end of the unchanged range.\n */\n to, \n /**\n The tree that this fragment is based on.\n */\n tree, \n /**\n The offset between the fragment's tree and the document that\n this fragment can be used against. Add this when going from\n document to tree positions, subtract it to go from tree to\n document positions.\n */\n offset, openStart = false, openEnd = false) {\n this.from = from;\n this.to = to;\n this.tree = tree;\n this.offset = offset;\n this.open = (openStart ? 1 /* Open.Start */ : 0) | (openEnd ? 2 /* Open.End */ : 0);\n }\n /**\n Whether the start of the fragment represents the start of a\n parse, or the end of a change. (In the second case, it may not\n be safe to reuse some nodes at the start, depending on the\n parsing algorithm.)\n */\n get openStart() { return (this.open & 1 /* Open.Start */) > 0; }\n /**\n Whether the end of the fragment represents the end of a\n full-document parse, or the start of a change.\n */\n get openEnd() { return (this.open & 2 /* Open.End */) > 0; }\n /**\n Create a set of fragments from a freshly parsed tree, or update\n an existing set of fragments by replacing the ones that overlap\n with a tree with content from the new tree. When `partial` is\n true, the parse is treated as incomplete, and the resulting\n fragment has [`openEnd`](#common.TreeFragment.openEnd) set to\n true.\n */\n static addTree(tree, fragments = [], partial = false) {\n let result = [new TreeFragment(0, tree.length, tree, 0, false, partial)];\n for (let f of fragments)\n if (f.to > tree.length)\n result.push(f);\n return result;\n }\n /**\n Apply a set of edits to an array of fragments, removing or\n splitting fragments as necessary to remove edited ranges, and\n adjusting offsets for fragments that moved.\n */\n static applyChanges(fragments, changes, minGap = 128) {\n if (!changes.length)\n return fragments;\n let result = [];\n let fI = 1, nextF = fragments.length ? fragments[0] : null;\n for (let cI = 0, pos = 0, off = 0;; cI++) {\n let nextC = cI < changes.length ? changes[cI] : null;\n let nextPos = nextC ? nextC.fromA : 1e9;\n if (nextPos - pos >= minGap)\n while (nextF && nextF.from < nextPos) {\n let cut = nextF;\n if (pos >= cut.from || nextPos <= cut.to || off) {\n let fFrom = Math.max(cut.from, pos) - off, fTo = Math.min(cut.to, nextPos) - off;\n cut = fFrom >= fTo ? null : new TreeFragment(fFrom, fTo, cut.tree, cut.offset + off, cI > 0, !!nextC);\n }\n if (cut)\n result.push(cut);\n if (nextF.to > nextPos)\n break;\n nextF = fI < fragments.length ? fragments[fI++] : null;\n }\n if (!nextC)\n break;\n pos = nextC.toA;\n off = nextC.toA - nextC.toB;\n }\n return result;\n }\n}\n/**\nA superclass that parsers should extend.\n*/\nclass Parser {\n /**\n Start a parse, returning a [partial parse](#common.PartialParse)\n object. [`fragments`](#common.TreeFragment) can be passed in to\n make the parse incremental.\n \n By default, the entire input is parsed. You can pass `ranges`,\n which should be a sorted array of non-empty, non-overlapping\n ranges, to parse only those ranges. The tree returned in that\n case will start at `ranges[0].from`.\n */\n startParse(input, fragments, ranges) {\n if (typeof input == \"string\")\n input = new StringInput(input);\n ranges = !ranges ? [new Range(0, input.length)] : ranges.length ? ranges.map(r => new Range(r.from, r.to)) : [new Range(0, 0)];\n return this.createParse(input, fragments || [], ranges);\n }\n /**\n Run a full parse, returning the resulting tree.\n */\n parse(input, fragments, ranges) {\n let parse = this.startParse(input, fragments, ranges);\n for (;;) {\n let done = parse.advance();\n if (done)\n return done;\n }\n }\n}\nclass StringInput {\n constructor(string) {\n this.string = string;\n }\n get length() { return this.string.length; }\n chunk(from) { return this.string.slice(from); }\n get lineChunks() { return false; }\n read(from, to) { return this.string.slice(from, to); }\n}\n\n/**\nCreate a parse wrapper that, after the inner parse completes,\nscans its tree for mixed language regions with the `nest`\nfunction, runs the resulting [inner parses](#common.NestedParse),\nand then [mounts](#common.NodeProp^mounted) their results onto the\ntree.\n*/\nfunction parseMixed(nest) {\n return (parse, input, fragments, ranges) => new MixedParse(parse, nest, input, fragments, ranges);\n}\nclass InnerParse {\n constructor(parser, parse, overlay, bracketed, target, from) {\n this.parser = parser;\n this.parse = parse;\n this.overlay = overlay;\n this.bracketed = bracketed;\n this.target = target;\n this.from = from;\n }\n}\nfunction checkRanges(ranges) {\n if (!ranges.length || ranges.some(r => r.from >= r.to))\n throw new RangeError(\"Invalid inner parse ranges given: \" + JSON.stringify(ranges));\n}\nclass ActiveOverlay {\n constructor(parser, predicate, mounts, index, start, bracketed, target, prev) {\n this.parser = parser;\n this.predicate = predicate;\n this.mounts = mounts;\n this.index = index;\n this.start = start;\n this.bracketed = bracketed;\n this.target = target;\n this.prev = prev;\n this.depth = 0;\n this.ranges = [];\n }\n}\nconst stoppedInner = new NodeProp({ perNode: true });\nclass MixedParse {\n constructor(base, nest, input, fragments, ranges) {\n this.nest = nest;\n this.input = input;\n this.fragments = fragments;\n this.ranges = ranges;\n this.inner = [];\n this.innerDone = 0;\n this.baseTree = null;\n this.stoppedAt = null;\n this.baseParse = base;\n }\n advance() {\n if (this.baseParse) {\n let done = this.baseParse.advance();\n if (!done)\n return null;\n this.baseParse = null;\n this.baseTree = done;\n this.startInner();\n if (this.stoppedAt != null)\n for (let inner of this.inner)\n inner.parse.stopAt(this.stoppedAt);\n }\n if (this.innerDone == this.inner.length) {\n let result = this.baseTree;\n if (this.stoppedAt != null)\n result = new Tree(result.type, result.children, result.positions, result.length, result.propValues.concat([[stoppedInner, this.stoppedAt]]));\n return result;\n }\n let inner = this.inner[this.innerDone], done = inner.parse.advance();\n if (done) {\n this.innerDone++;\n // This is a somewhat dodgy but super helpful hack where we\n // patch up nodes created by the inner parse (and thus\n // presumably not aliased anywhere else) to hold the information\n // about the inner parse.\n let props = Object.assign(Object.create(null), inner.target.props);\n props[NodeProp.mounted.id] = new MountedTree(done, inner.overlay, inner.parser, inner.bracketed);\n inner.target.props = props;\n }\n return null;\n }\n get parsedPos() {\n if (this.baseParse)\n return 0;\n let pos = this.input.length;\n for (let i = this.innerDone; i < this.inner.length; i++) {\n if (this.inner[i].from < pos)\n pos = Math.min(pos, this.inner[i].parse.parsedPos);\n }\n return pos;\n }\n stopAt(pos) {\n this.stoppedAt = pos;\n if (this.baseParse)\n this.baseParse.stopAt(pos);\n else\n for (let i = this.innerDone; i < this.inner.length; i++)\n this.inner[i].parse.stopAt(pos);\n }\n startInner() {\n let fragmentCursor = new FragmentCursor(this.fragments);\n let overlay = null;\n let covered = null;\n let cursor = new TreeCursor(new TreeNode(this.baseTree, this.ranges[0].from, 0, null), IterMode.IncludeAnonymous | IterMode.IgnoreMounts);\n scan: for (let nest, isCovered;;) {\n let enter = true, range;\n if (this.stoppedAt != null && cursor.from >= this.stoppedAt) {\n enter = false;\n }\n else if (fragmentCursor.hasNode(cursor)) {\n if (overlay) {\n let match = overlay.mounts.find(m => m.frag.from <= cursor.from && m.frag.to >= cursor.to && m.mount.overlay);\n if (match)\n for (let r of match.mount.overlay) {\n let from = r.from + match.pos, to = r.to + match.pos;\n if (from >= cursor.from && to <= cursor.to && !overlay.ranges.some(r => r.from < to && r.to > from))\n overlay.ranges.push({ from, to });\n }\n }\n enter = false;\n }\n else if (covered && (isCovered = checkCover(covered.ranges, cursor.from, cursor.to))) {\n enter = isCovered != 2 /* Cover.Full */;\n }\n else if (!cursor.type.isAnonymous && (nest = this.nest(cursor, this.input)) &&\n (cursor.from < cursor.to || !nest.overlay)) {\n if (!cursor.tree) {\n materialize(cursor);\n // materialize create one more level of nesting\n // we need to add depth to active overlay for going backwards\n if (overlay)\n overlay.depth++;\n if (covered)\n covered.depth++;\n }\n let oldMounts = fragmentCursor.findMounts(cursor.from, nest.parser);\n if (typeof nest.overlay == \"function\") {\n overlay = new ActiveOverlay(nest.parser, nest.overlay, oldMounts, this.inner.length, cursor.from, !!nest.bracketed, cursor.tree, overlay);\n }\n else {\n let ranges = punchRanges(this.ranges, nest.overlay ||\n (cursor.from < cursor.to ? [new Range(cursor.from, cursor.to)] : []));\n if (ranges.length)\n checkRanges(ranges);\n if (ranges.length || !nest.overlay)\n this.inner.push(new InnerParse(nest.parser, ranges.length ? nest.parser.startParse(this.input, enterFragments(oldMounts, ranges), ranges)\n : nest.parser.startParse(\"\"), nest.overlay ? nest.overlay.map(r => new Range(r.from - cursor.from, r.to - cursor.from)) : null, !!nest.bracketed, cursor.tree, ranges.length ? ranges[0].from : cursor.from));\n if (!nest.overlay)\n enter = false;\n else if (ranges.length)\n covered = { ranges, depth: 0, prev: covered };\n }\n }\n else if (overlay && (range = overlay.predicate(cursor))) {\n if (range === true)\n range = new Range(cursor.from, cursor.to);\n if (range.from < range.to) {\n let last = overlay.ranges.length - 1;\n if (last >= 0 && overlay.ranges[last].to == range.from)\n overlay.ranges[last] = { from: overlay.ranges[last].from, to: range.to };\n else\n overlay.ranges.push(range);\n }\n }\n if (enter && cursor.firstChild()) {\n if (overlay)\n overlay.depth++;\n if (covered)\n covered.depth++;\n }\n else {\n for (;;) {\n if (cursor.nextSibling())\n break;\n if (!cursor.parent())\n break scan;\n if (overlay && !--overlay.depth) {\n let ranges = punchRanges(this.ranges, overlay.ranges);\n if (ranges.length) {\n checkRanges(ranges);\n this.inner.splice(overlay.index, 0, new InnerParse(overlay.parser, overlay.parser.startParse(this.input, enterFragments(overlay.mounts, ranges), ranges), overlay.ranges.map(r => new Range(r.from - overlay.start, r.to - overlay.start)), overlay.bracketed, overlay.target, ranges[0].from));\n }\n overlay = overlay.prev;\n }\n if (covered && !--covered.depth)\n covered = covered.prev;\n }\n }\n }\n }\n}\nfunction checkCover(covered, from, to) {\n for (let range of covered) {\n if (range.from >= to)\n break;\n if (range.to > from)\n return range.from <= from && range.to >= to ? 2 /* Cover.Full */ : 1 /* Cover.Partial */;\n }\n return 0 /* Cover.None */;\n}\n// Take a piece of buffer and convert it into a stand-alone\n// TreeBuffer.\nfunction sliceBuf(buf, startI, endI, nodes, positions, off) {\n if (startI < endI) {\n let from = buf.buffer[startI + 1];\n nodes.push(buf.slice(startI, endI, from));\n positions.push(from - off);\n }\n}\n// This function takes a node that's in a buffer, and converts it, and\n// its parent buffer nodes, into a Tree. This is again acting on the\n// assumption that the trees and buffers have been constructed by the\n// parse that was ran via the mix parser, and thus aren't shared with\n// any other code, making violations of the immutability safe.\nfunction materialize(cursor) {\n let { node } = cursor, stack = [];\n let buffer = node.context.buffer;\n // Scan up to the nearest tree\n do {\n stack.push(cursor.index);\n cursor.parent();\n } while (!cursor.tree);\n // Find the index of the buffer in that tree\n let base = cursor.tree, i = base.children.indexOf(buffer);\n let buf = base.children[i], b = buf.buffer, newStack = [i];\n // Split a level in the buffer, putting the nodes before and after\n // the child that contains `node` into new buffers.\n function split(startI, endI, type, innerOffset, length, stackPos) {\n let targetI = stack[stackPos];\n let children = [], positions = [];\n sliceBuf(buf, startI, targetI, children, positions, innerOffset);\n let from = b[targetI + 1], to = b[targetI + 2];\n newStack.push(children.length);\n let child = stackPos\n ? split(targetI + 4, b[targetI + 3], buf.set.types[b[targetI]], from, to - from, stackPos - 1)\n : node.toTree();\n children.push(child);\n positions.push(from - innerOffset);\n sliceBuf(buf, b[targetI + 3], endI, children, positions, innerOffset);\n return new Tree(type, children, positions, length);\n }\n base.children[i] = split(0, b.length, NodeType.none, 0, buf.length, stack.length - 1);\n // Move the cursor back to the target node\n for (let index of newStack) {\n let tree = cursor.tree.children[index], pos = cursor.tree.positions[index];\n cursor.yield(new TreeNode(tree, pos + cursor.from, index, cursor._tree));\n }\n}\nclass StructureCursor {\n constructor(root, offset) {\n this.offset = offset;\n this.done = false;\n this.cursor = root.cursor(IterMode.IncludeAnonymous | IterMode.IgnoreMounts);\n }\n // Move to the first node (in pre-order) that starts at or after `pos`.\n moveTo(pos) {\n let { cursor } = this, p = pos - this.offset;\n while (!this.done && cursor.from < p) {\n if (cursor.to >= pos && cursor.enter(p, 1, IterMode.IgnoreOverlays | IterMode.ExcludeBuffers)) ;\n else if (!cursor.next(false))\n this.done = true;\n }\n }\n hasNode(cursor) {\n this.moveTo(cursor.from);\n if (!this.done && this.cursor.from + this.offset == cursor.from && this.cursor.tree) {\n for (let tree = this.cursor.tree;;) {\n if (tree == cursor.tree)\n return true;\n if (tree.children.length && tree.positions[0] == 0 && tree.children[0] instanceof Tree)\n tree = tree.children[0];\n else\n break;\n }\n }\n return false;\n }\n}\nclass FragmentCursor {\n constructor(fragments) {\n var _a;\n this.fragments = fragments;\n this.curTo = 0;\n this.fragI = 0;\n if (fragments.length) {\n let first = this.curFrag = fragments[0];\n this.curTo = (_a = first.tree.prop(stoppedInner)) !== null && _a !== void 0 ? _a : first.to;\n this.inner = new StructureCursor(first.tree, -first.offset);\n }\n else {\n this.curFrag = this.inner = null;\n }\n }\n hasNode(node) {\n while (this.curFrag && node.from >= this.curTo)\n this.nextFrag();\n return this.curFrag && this.curFrag.from <= node.from && this.curTo >= node.to && this.inner.hasNode(node);\n }\n nextFrag() {\n var _a;\n this.fragI++;\n if (this.fragI == this.fragments.length) {\n this.curFrag = this.inner = null;\n }\n else {\n let frag = this.curFrag = this.fragments[this.fragI];\n this.curTo = (_a = frag.tree.prop(stoppedInner)) !== null && _a !== void 0 ? _a : frag.to;\n this.inner = new StructureCursor(frag.tree, -frag.offset);\n }\n }\n findMounts(pos, parser) {\n var _a;\n let result = [];\n if (this.inner) {\n this.inner.cursor.moveTo(pos, 1);\n for (let pos = this.inner.cursor.node; pos; pos = pos.parent) {\n let mount = (_a = pos.tree) === null || _a === void 0 ? void 0 : _a.prop(NodeProp.mounted);\n if (mount && mount.parser == parser) {\n for (let i = this.fragI; i < this.fragments.length; i++) {\n let frag = this.fragments[i];\n if (frag.from >= pos.to)\n break;\n if (frag.tree == this.curFrag.tree)\n result.push({\n frag,\n pos: pos.from - frag.offset,\n mount\n });\n }\n }\n }\n }\n return result;\n }\n}\nfunction punchRanges(outer, ranges) {\n let copy = null, current = ranges;\n for (let i = 1, j = 0; i < outer.length; i++) {\n let gapFrom = outer[i - 1].to, gapTo = outer[i].from;\n for (; j < current.length; j++) {\n let r = current[j];\n if (r.from >= gapTo)\n break;\n if (r.to <= gapFrom)\n continue;\n if (!copy)\n current = copy = ranges.slice();\n if (r.from < gapFrom) {\n copy[j] = new Range(r.from, gapFrom);\n if (r.to > gapTo)\n copy.splice(j + 1, 0, new Range(gapTo, r.to));\n }\n else if (r.to > gapTo) {\n copy[j--] = new Range(gapTo, r.to);\n }\n else {\n copy.splice(j--, 1);\n }\n }\n }\n return current;\n}\nfunction findCoverChanges(a, b, from, to) {\n let iA = 0, iB = 0, inA = false, inB = false, pos = -1e9;\n let result = [];\n for (;;) {\n let nextA = iA == a.length ? 1e9 : inA ? a[iA].to : a[iA].from;\n let nextB = iB == b.length ? 1e9 : inB ? b[iB].to : b[iB].from;\n if (inA != inB) {\n let start = Math.max(pos, from), end = Math.min(nextA, nextB, to);\n if (start < end)\n result.push(new Range(start, end));\n }\n pos = Math.min(nextA, nextB);\n if (pos == 1e9)\n break;\n if (nextA == pos) {\n if (!inA)\n inA = true;\n else {\n inA = false;\n iA++;\n }\n }\n if (nextB == pos) {\n if (!inB)\n inB = true;\n else {\n inB = false;\n iB++;\n }\n }\n }\n return result;\n}\n// Given a number of fragments for the outer tree, and a set of ranges\n// to parse, find fragments for inner trees mounted around those\n// ranges, if any.\nfunction enterFragments(mounts, ranges) {\n let result = [];\n for (let { pos, mount, frag } of mounts) {\n let startPos = pos + (mount.overlay ? mount.overlay[0].from : 0), endPos = startPos + mount.tree.length;\n let from = Math.max(frag.from, startPos), to = Math.min(frag.to, endPos);\n if (mount.overlay) {\n let overlay = mount.overlay.map(r => new Range(r.from + pos, r.to + pos));\n let changes = findCoverChanges(ranges, overlay, from, to);\n for (let i = 0, pos = from;; i++) {\n let last = i == changes.length, end = last ? to : changes[i].from;\n if (end > pos)\n result.push(new TreeFragment(pos, end, mount.tree, -startPos, frag.from >= pos || frag.openStart, frag.to <= end || frag.openEnd));\n if (last)\n break;\n pos = changes[i].to;\n }\n }\n else {\n result.push(new TreeFragment(from, to, mount.tree, -startPos, frag.from >= startPos || frag.openStart, frag.to <= endPos || frag.openEnd));\n }\n }\n return result;\n}\n\nexport { DefaultBufferLength, IterMode, MountedTree, NodeProp, NodeSet, NodeType, NodeWeakMap, Parser, Tree, TreeBuffer, TreeCursor, TreeFragment, parseMixed };\n","import { NodeProp } from '@lezer/common';\n\nlet nextTagID = 0;\n/**\nHighlighting tags are markers that denote a highlighting category.\nThey are [associated](#highlight.styleTags) with parts of a syntax\ntree by a language mode, and then mapped to an actual CSS style by\na [highlighter](#highlight.Highlighter).\n\nBecause syntax tree node types and highlight styles have to be\nable to talk the same language, CodeMirror uses a mostly _closed_\n[vocabulary](#highlight.tags) of syntax tags (as opposed to\ntraditional open string-based systems, which make it hard for\nhighlighting themes to cover all the tokens produced by the\nvarious languages).\n\nIt _is_ possible to [define](#highlight.Tag^define) your own\nhighlighting tags for system-internal use (where you control both\nthe language package and the highlighter), but such tags will not\nbe picked up by regular highlighters (though you can derive them\nfrom standard tags to allow highlighters to fall back to those).\n*/\nclass Tag {\n /**\n @internal\n */\n constructor(\n /**\n The optional name of the base tag @internal\n */\n name, \n /**\n The set of this tag and all its parent tags, starting with\n this one itself and sorted in order of decreasing specificity.\n */\n set, \n /**\n The base unmodified tag that this one is based on, if it's\n modified @internal\n */\n base, \n /**\n The modifiers applied to this.base @internal\n */\n modified) {\n this.name = name;\n this.set = set;\n this.base = base;\n this.modified = modified;\n /**\n @internal\n */\n this.id = nextTagID++;\n }\n toString() {\n let { name } = this;\n for (let mod of this.modified)\n if (mod.name)\n name = `${mod.name}(${name})`;\n return name;\n }\n static define(nameOrParent, parent) {\n let name = typeof nameOrParent == \"string\" ? nameOrParent : \"?\";\n if (nameOrParent instanceof Tag)\n parent = nameOrParent;\n if (parent === null || parent === void 0 ? void 0 : parent.base)\n throw new Error(\"Can not derive from a modified tag\");\n let tag = new Tag(name, [], null, []);\n tag.set.push(tag);\n if (parent)\n for (let t of parent.set)\n tag.set.push(t);\n return tag;\n }\n /**\n Define a tag _modifier_, which is a function that, given a tag,\n will return a tag that is a subtag of the original. Applying the\n same modifier to a twice tag will return the same value (`m1(t1)\n == m1(t1)`) and applying multiple modifiers will, regardless or\n order, produce the same tag (`m1(m2(t1)) == m2(m1(t1))`).\n \n When multiple modifiers are applied to a given base tag, each\n smaller set of modifiers is registered as a parent, so that for\n example `m1(m2(m3(t1)))` is a subtype of `m1(m2(t1))`,\n `m1(m3(t1)`, and so on.\n */\n static defineModifier(name) {\n let mod = new Modifier(name);\n return (tag) => {\n if (tag.modified.indexOf(mod) > -1)\n return tag;\n return Modifier.get(tag.base || tag, tag.modified.concat(mod).sort((a, b) => a.id - b.id));\n };\n }\n}\nlet nextModifierID = 0;\nclass Modifier {\n constructor(name) {\n this.name = name;\n this.instances = [];\n this.id = nextModifierID++;\n }\n static get(base, mods) {\n if (!mods.length)\n return base;\n let exists = mods[0].instances.find(t => t.base == base && sameArray(mods, t.modified));\n if (exists)\n return exists;\n let set = [], tag = new Tag(base.name, set, base, mods);\n for (let m of mods)\n m.instances.push(tag);\n let configs = powerSet(mods);\n for (let parent of base.set)\n if (!parent.modified.length)\n for (let config of configs)\n set.push(Modifier.get(parent, config));\n return tag;\n }\n}\nfunction sameArray(a, b) {\n return a.length == b.length && a.every((x, i) => x == b[i]);\n}\nfunction powerSet(array) {\n let sets = [[]];\n for (let i = 0; i < array.length; i++) {\n for (let j = 0, e = sets.length; j < e; j++) {\n sets.push(sets[j].concat(array[i]));\n }\n }\n return sets.sort((a, b) => b.length - a.length);\n}\n/**\nThis function is used to add a set of tags to a language syntax\nvia [`NodeSet.extend`](#common.NodeSet.extend) or\n[`LRParser.configure`](#lr.LRParser.configure).\n\nThe argument object maps node selectors to [highlighting\ntags](#highlight.Tag) or arrays of tags.\n\nNode selectors may hold one or more (space-separated) node paths.\nSuch a path can be a [node name](#common.NodeType.name), or\nmultiple node names (or `*` wildcards) separated by slash\ncharacters, as in `\"Block/Declaration/VariableName\"`. Such a path\nmatches the final node but only if its direct parent nodes are the\nother nodes mentioned. A `*` in such a path matches any parent,\nbut only a single level—wildcards that match multiple parents\naren't supported, both for efficiency reasons and because Lezer\ntrees make it rather hard to reason about what they would match.)\n\nA path can be ended with `/...` to indicate that the tag assigned\nto the node should also apply to all child nodes, even if they\nmatch their own style (by default, only the innermost style is\nused).\n\nWhen a path ends in `!`, as in `Attribute!`, no further matching\nhappens for the node's child nodes, and the entire node gets the\ngiven style.\n\nIn this notation, node names that contain `/`, `!`, `*`, or `...`\nmust be quoted as JSON strings.\n\nFor example:\n\n```javascript\nparser.configure({props: [\n styleTags({\n // Style Number and BigNumber nodes\n \"Number BigNumber\": tags.number,\n // Style Escape nodes whose parent is String\n \"String/Escape\": tags.escape,\n // Style anything inside Attributes nodes\n \"Attributes!\": tags.meta,\n // Add a style to all content inside Italic nodes\n \"Italic/...\": tags.emphasis,\n // Style InvalidString nodes as both `string` and `invalid`\n \"InvalidString\": [tags.string, tags.invalid],\n // Style the node named \"/\" as punctuation\n '\"/\"': tags.punctuation\n })\n]})\n```\n*/\nfunction styleTags(spec) {\n let byName = Object.create(null);\n for (let prop in spec) {\n let tags = spec[prop];\n if (!Array.isArray(tags))\n tags = [tags];\n for (let part of prop.split(\" \"))\n if (part) {\n let pieces = [], mode = 2 /* Mode.Normal */, rest = part;\n for (let pos = 0;;) {\n if (rest == \"...\" && pos > 0 && pos + 3 == part.length) {\n mode = 1 /* Mode.Inherit */;\n break;\n }\n let m = /^\"(?:[^\"\\\\]|\\\\.)*?\"|[^\\/!]+/.exec(rest);\n if (!m)\n throw new RangeError(\"Invalid path: \" + part);\n pieces.push(m[0] == \"*\" ? \"\" : m[0][0] == '\"' ? JSON.parse(m[0]) : m[0]);\n pos += m[0].length;\n if (pos == part.length)\n break;\n let next = part[pos++];\n if (pos == part.length && next == \"!\") {\n mode = 0 /* Mode.Opaque */;\n break;\n }\n if (next != \"/\")\n throw new RangeError(\"Invalid path: \" + part);\n rest = part.slice(pos);\n }\n let last = pieces.length - 1, inner = pieces[last];\n if (!inner)\n throw new RangeError(\"Invalid path: \" + part);\n let rule = new Rule(tags, mode, last > 0 ? pieces.slice(0, last) : null);\n byName[inner] = rule.sort(byName[inner]);\n }\n }\n return ruleNodeProp.add(byName);\n}\nconst ruleNodeProp = new NodeProp({\n combine(a, b) {\n let cur, root, take;\n while (a || b) {\n if (!a || b && a.depth >= b.depth) {\n take = b;\n b = b.next;\n }\n else {\n take = a;\n a = a.next;\n }\n if (cur && cur.mode == take.mode && !take.context && !cur.context)\n continue;\n let copy = new Rule(take.tags, take.mode, take.context);\n if (cur)\n cur.next = copy;\n else\n root = copy;\n cur = copy;\n }\n return root;\n }\n});\nclass Rule {\n constructor(tags, mode, context, next) {\n this.tags = tags;\n this.mode = mode;\n this.context = context;\n this.next = next;\n }\n get opaque() { return this.mode == 0 /* Mode.Opaque */; }\n get inherit() { return this.mode == 1 /* Mode.Inherit */; }\n sort(other) {\n if (!other || other.depth < this.depth) {\n this.next = other;\n return this;\n }\n other.next = this.sort(other.next);\n return other;\n }\n get depth() { return this.context ? this.context.length : 0; }\n}\nRule.empty = new Rule([], 2 /* Mode.Normal */, null);\n/**\nDefine a [highlighter](#highlight.Highlighter) from an array of\ntag/class pairs. Classes associated with more specific tags will\ntake precedence.\n*/\nfunction tagHighlighter(tags, options) {\n let map = Object.create(null);\n for (let style of tags) {\n if (!Array.isArray(style.tag))\n map[style.tag.id] = style.class;\n else\n for (let tag of style.tag)\n map[tag.id] = style.class;\n }\n let { scope, all = null } = options || {};\n return {\n style: (tags) => {\n let cls = all;\n for (let tag of tags) {\n for (let sub of tag.set) {\n let tagClass = map[sub.id];\n if (tagClass) {\n cls = cls ? cls + \" \" + tagClass : tagClass;\n break;\n }\n }\n }\n return cls;\n },\n scope\n };\n}\nfunction highlightTags(highlighters, tags) {\n let result = null;\n for (let highlighter of highlighters) {\n let value = highlighter.style(tags);\n if (value)\n result = result ? result + \" \" + value : value;\n }\n return result;\n}\n/**\nHighlight the given [tree](#common.Tree) with the given\n[highlighter](#highlight.Highlighter). Often, the higher-level\n[`highlightCode`](#highlight.highlightCode) function is easier to\nuse.\n*/\nfunction highlightTree(tree, highlighter, \n/**\nAssign styling to a region of the text. Will be called, in order\nof position, for any ranges where more than zero classes apply.\n`classes` is a space separated string of CSS classes.\n*/\nputStyle, \n/**\nThe start of the range to highlight.\n*/\nfrom = 0, \n/**\nThe end of the range.\n*/\nto = tree.length) {\n let builder = new HighlightBuilder(from, Array.isArray(highlighter) ? highlighter : [highlighter], putStyle);\n builder.highlightRange(tree.cursor(), from, to, \"\", builder.highlighters);\n builder.flush(to);\n}\n/**\nHighlight the given tree with the given highlighter, calling\n`putText` for every piece of text, either with a set of classes or\nwith the empty string when unstyled, and `putBreak` for every line\nbreak.\n*/\nfunction highlightCode(code, tree, highlighter, putText, putBreak, from = 0, to = code.length) {\n let pos = from;\n function writeTo(p, classes) {\n if (p <= pos)\n return;\n for (let text = code.slice(pos, p), i = 0;;) {\n let nextBreak = text.indexOf(\"\\n\", i);\n let upto = nextBreak < 0 ? text.length : nextBreak;\n if (upto > i)\n putText(text.slice(i, upto), classes);\n if (nextBreak < 0)\n break;\n putBreak();\n i = nextBreak + 1;\n }\n pos = p;\n }\n highlightTree(tree, highlighter, (from, to, classes) => {\n writeTo(from, \"\");\n writeTo(to, classes);\n }, from, to);\n writeTo(to, \"\");\n}\nclass HighlightBuilder {\n constructor(at, highlighters, span) {\n this.at = at;\n this.highlighters = highlighters;\n this.span = span;\n this.class = \"\";\n }\n startSpan(at, cls) {\n if (cls != this.class) {\n this.flush(at);\n if (at > this.at)\n this.at = at;\n this.class = cls;\n }\n }\n flush(to) {\n if (to > this.at && this.class)\n this.span(this.at, to, this.class);\n }\n highlightRange(cursor, from, to, inheritedClass, highlighters) {\n let { type, from: start, to: end } = cursor;\n if (start >= to || end <= from)\n return;\n if (type.isTop)\n highlighters = this.highlighters.filter(h => !h.scope || h.scope(type));\n let cls = inheritedClass;\n let rule = getStyleTags(cursor) || Rule.empty;\n let tagCls = highlightTags(highlighters, rule.tags);\n if (tagCls) {\n if (cls)\n cls += \" \";\n cls += tagCls;\n if (rule.mode == 1 /* Mode.Inherit */)\n inheritedClass += (inheritedClass ? \" \" : \"\") + tagCls;\n }\n this.startSpan(Math.max(from, start), cls);\n if (rule.opaque)\n return;\n let mounted = cursor.tree && cursor.tree.prop(NodeProp.mounted);\n if (mounted && mounted.overlay) {\n let inner = cursor.node.enter(mounted.overlay[0].from + start, 1);\n let innerHighlighters = this.highlighters.filter(h => !h.scope || h.scope(mounted.tree.type));\n let hasChild = cursor.firstChild();\n for (let i = 0, pos = start;; i++) {\n let next = i < mounted.overlay.length ? mounted.overlay[i] : null;\n let nextPos = next ? next.from + start : end;\n let rangeFrom = Math.max(from, pos), rangeTo = Math.min(to, nextPos);\n if (rangeFrom < rangeTo && hasChild) {\n while (cursor.from < rangeTo) {\n this.highlightRange(cursor, rangeFrom, rangeTo, inheritedClass, highlighters);\n this.startSpan(Math.min(rangeTo, cursor.to), cls);\n if (cursor.to >= nextPos || !cursor.nextSibling())\n break;\n }\n }\n if (!next || nextPos > to)\n break;\n pos = next.to + start;\n if (pos > from) {\n this.highlightRange(inner.cursor(), Math.max(from, next.from + start), Math.min(to, pos), \"\", innerHighlighters);\n this.startSpan(Math.min(to, pos), cls);\n }\n }\n if (hasChild)\n cursor.parent();\n }\n else if (cursor.firstChild()) {\n if (mounted)\n inheritedClass = \"\";\n do {\n if (cursor.to <= from)\n continue;\n if (cursor.from >= to)\n break;\n this.highlightRange(cursor, from, to, inheritedClass, highlighters);\n this.startSpan(Math.min(to, cursor.to), cls);\n } while (cursor.nextSibling());\n cursor.parent();\n }\n }\n}\n/**\nMatch a syntax node's [highlight rules](#highlight.styleTags). If\nthere's a match, return its set of tags, and whether it is\nopaque (uses a `!`) or applies to all child nodes (`/...`).\n*/\nfunction getStyleTags(node) {\n let rule = node.type.prop(ruleNodeProp);\n while (rule && rule.context && !node.matchContext(rule.context))\n rule = rule.next;\n return rule || null;\n}\nconst t = Tag.define;\nconst comment = t(), name = t(), typeName = t(name), propertyName = t(name), literal = t(), string = t(literal), number = t(literal), content = t(), heading = t(content), keyword = t(), operator = t(), punctuation = t(), bracket = t(punctuation), meta = t();\n/**\nThe default set of highlighting [tags](#highlight.Tag).\n\nThis collection is heavily biased towards programming languages,\nand necessarily incomplete. A full ontology of syntactic\nconstructs would fill a stack of books, and be impractical to\nwrite themes for. So try to make do with this set. If all else\nfails, [open an\nissue](https://github.com/codemirror/codemirror.next) to propose a\nnew tag, or [define](#highlight.Tag^define) a local custom tag for\nyour use case.\n\nNote that it is not obligatory to always attach the most specific\ntag possible to an element—if your grammar can't easily\ndistinguish a certain type of element (such as a local variable),\nit is okay to style it as its more general variant (a variable).\n\nFor tags that extend some parent tag, the documentation links to\nthe parent.\n*/\nconst tags = {\n /**\n A comment.\n */\n comment,\n /**\n A line [comment](#highlight.tags.comment).\n */\n lineComment: t(comment),\n /**\n A block [comment](#highlight.tags.comment).\n */\n blockComment: t(comment),\n /**\n A documentation [comment](#highlight.tags.comment).\n */\n docComment: t(comment),\n /**\n Any kind of identifier.\n */\n name,\n /**\n The [name](#highlight.tags.name) of a variable.\n */\n variableName: t(name),\n /**\n A type [name](#highlight.tags.name).\n */\n typeName: typeName,\n /**\n A tag name (subtag of [`typeName`](#highlight.tags.typeName)).\n */\n tagName: t(typeName),\n /**\n A property or field [name](#highlight.tags.name).\n */\n propertyName: propertyName,\n /**\n An attribute name (subtag of [`propertyName`](#highlight.tags.propertyName)).\n */\n attributeName: t(propertyName),\n /**\n The [name](#highlight.tags.name) of a class.\n */\n className: t(name),\n /**\n A label [name](#highlight.tags.name).\n */\n labelName: t(name),\n /**\n A namespace [name](#highlight.tags.name).\n */\n namespace: t(name),\n /**\n The [name](#highlight.tags.name) of a macro.\n */\n macroName: t(name),\n /**\n A literal value.\n */\n literal,\n /**\n A string [literal](#highlight.tags.literal).\n */\n string,\n /**\n A documentation [string](#highlight.tags.string).\n */\n docString: t(string),\n /**\n A character literal (subtag of [string](#highlight.tags.string)).\n */\n character: t(string),\n /**\n An attribute value (subtag of [string](#highlight.tags.string)).\n */\n attributeValue: t(string),\n /**\n A number [literal](#highlight.tags.literal).\n */\n number,\n /**\n An integer [number](#highlight.tags.number) literal.\n */\n integer: t(number),\n /**\n A floating-point [number](#highlight.tags.number) literal.\n */\n float: t(number),\n /**\n A boolean [literal](#highlight.tags.literal).\n */\n bool: t(literal),\n /**\n Regular expression [literal](#highlight.tags.literal).\n */\n regexp: t(literal),\n /**\n An escape [literal](#highlight.tags.literal), for example a\n backslash escape in a string.\n */\n escape: t(literal),\n /**\n A color [literal](#highlight.tags.literal).\n */\n color: t(literal),\n /**\n A URL [literal](#highlight.tags.literal).\n */\n url: t(literal),\n /**\n A language keyword.\n */\n keyword,\n /**\n The [keyword](#highlight.tags.keyword) for the self or this\n object.\n */\n self: t(keyword),\n /**\n The [keyword](#highlight.tags.keyword) for null.\n */\n null: t(keyword),\n /**\n A [keyword](#highlight.tags.keyword) denoting some atomic value.\n */\n atom: t(keyword),\n /**\n A [keyword](#highlight.tags.keyword) that represents a unit.\n */\n unit: t(keyword),\n /**\n A modifier [keyword](#highlight.tags.keyword).\n */\n modifier: t(keyword),\n /**\n A [keyword](#highlight.tags.keyword) that acts as an operator.\n */\n operatorKeyword: t(keyword),\n /**\n A control-flow related [keyword](#highlight.tags.keyword).\n */\n controlKeyword: t(keyword),\n /**\n A [keyword](#highlight.tags.keyword) that defines something.\n */\n definitionKeyword: t(keyword),\n /**\n A [keyword](#highlight.tags.keyword) related to defining or\n interfacing with modules.\n */\n moduleKeyword: t(keyword),\n /**\n An operator.\n */\n operator,\n /**\n An [operator](#highlight.tags.operator) that dereferences something.\n */\n derefOperator: t(operator),\n /**\n Arithmetic-related [operator](#highlight.tags.operator).\n */\n arithmeticOperator: t(operator),\n /**\n Logical [operator](#highlight.tags.operator).\n */\n logicOperator: t(operator),\n /**\n Bit [operator](#highlight.tags.operator).\n */\n bitwiseOperator: t(operator),\n /**\n Comparison [operator](#highlight.tags.operator).\n */\n compareOperator: t(operator),\n /**\n [Operator](#highlight.tags.operator) that updates its operand.\n */\n updateOperator: t(operator),\n /**\n [Operator](#highlight.tags.operator) that defines something.\n */\n definitionOperator: t(operator),\n /**\n Type-related [operator](#highlight.tags.operator).\n */\n typeOperator: t(operator),\n /**\n Control-flow [operator](#highlight.tags.operator).\n */\n controlOperator: t(operator),\n /**\n Program or markup punctuation.\n */\n punctuation,\n /**\n [Punctuation](#highlight.tags.punctuation) that separates\n things.\n */\n separator: t(punctuation),\n /**\n Bracket-style [punctuation](#highlight.tags.punctuation).\n */\n bracket,\n /**\n Angle [brackets](#highlight.tags.bracket) (usually `<` and `>`\n tokens).\n */\n angleBracket: t(bracket),\n /**\n Square [brackets](#highlight.tags.bracket) (usually `[` and `]`\n tokens).\n */\n squareBracket: t(bracket),\n /**\n Parentheses (usually `(` and `)` tokens). Subtag of\n [bracket](#highlight.tags.bracket).\n */\n paren: t(bracket),\n /**\n Braces (usually `{` and `}` tokens). Subtag of\n [bracket](#highlight.tags.bracket).\n */\n brace: t(bracket),\n /**\n Content, for example plain text in XML or markup documents.\n */\n content,\n /**\n [Content](#highlight.tags.content) that represents a heading.\n */\n heading,\n /**\n A level 1 [heading](#highlight.tags.heading).\n */\n heading1: t(heading),\n /**\n A level 2 [heading](#highlight.tags.heading).\n */\n heading2: t(heading),\n /**\n A level 3 [heading](#highlight.tags.heading).\n */\n heading3: t(heading),\n /**\n A level 4 [heading](#highlight.tags.heading).\n */\n heading4: t(heading),\n /**\n A level 5 [heading](#highlight.tags.heading).\n */\n heading5: t(heading),\n /**\n A level 6 [heading](#highlight.tags.heading).\n */\n heading6: t(heading),\n /**\n A prose [content](#highlight.tags.content) separator (such as a horizontal rule).\n */\n contentSeparator: t(content),\n /**\n [Content](#highlight.tags.content) that represents a list.\n */\n list: t(content),\n /**\n [Content](#highlight.tags.content) that represents a quote.\n */\n quote: t(content),\n /**\n [Content](#highlight.tags.content) that is emphasized.\n */\n emphasis: t(content),\n /**\n [Content](#highlight.tags.content) that is styled strong.\n */\n strong: t(content),\n /**\n [Content](#highlight.tags.content) that is part of a link.\n */\n link: t(content),\n /**\n [Content](#highlight.tags.content) that is styled as code or\n monospace.\n */\n monospace: t(content),\n /**\n [Content](#highlight.tags.content) that has a strike-through\n style.\n */\n strikethrough: t(content),\n /**\n Inserted text in a change-tracking format.\n */\n inserted: t(),\n /**\n Deleted text.\n */\n deleted: t(),\n /**\n Changed text.\n */\n changed: t(),\n /**\n An invalid or unsyntactic element.\n */\n invalid: t(),\n /**\n Metadata or meta-instruction.\n */\n meta,\n /**\n [Metadata](#highlight.tags.meta) that applies to the entire\n document.\n */\n documentMeta: t(meta),\n /**\n [Metadata](#highlight.tags.meta) that annotates or adds\n attributes to a given syntactic element.\n */\n annotation: t(meta),\n /**\n Processing instruction or preprocessor directive. Subtag of\n [meta](#highlight.tags.meta).\n */\n processingInstruction: t(meta),\n /**\n [Modifier](#highlight.Tag^defineModifier) that indicates that a\n given element is being defined. Expected to be used with the\n various [name](#highlight.tags.name) tags.\n */\n definition: Tag.defineModifier(\"definition\"),\n /**\n [Modifier](#highlight.Tag^defineModifier) that indicates that\n something is constant. Mostly expected to be used with\n [variable names](#highlight.tags.variableName).\n */\n constant: Tag.defineModifier(\"constant\"),\n /**\n [Modifier](#highlight.Tag^defineModifier) used to indicate that\n a [variable](#highlight.tags.variableName) or [property\n name](#highlight.tags.propertyName) is being called or defined\n as a function.\n */\n function: Tag.defineModifier(\"function\"),\n /**\n [Modifier](#highlight.Tag^defineModifier) that can be applied to\n [names](#highlight.tags.name) to indicate that they belong to\n the language's standard environment.\n */\n standard: Tag.defineModifier(\"standard\"),\n /**\n [Modifier](#highlight.Tag^defineModifier) that indicates a given\n [names](#highlight.tags.name) is local to some scope.\n */\n local: Tag.defineModifier(\"local\"),\n /**\n A generic variant [modifier](#highlight.Tag^defineModifier) that\n can be used to tag language-specific alternative variants of\n some common tag. It is recommended for themes to define special\n forms of at least the [string](#highlight.tags.string) and\n [variable name](#highlight.tags.variableName) tags, since those\n come up a lot.\n */\n special: Tag.defineModifier(\"special\")\n};\nfor (let name in tags) {\n let val = tags[name];\n if (val instanceof Tag)\n val.name = name;\n}\n/**\nThis is a highlighter that adds stable, predictable classes to\ntokens, for styling with external CSS.\n\nThe following tags are mapped to their name prefixed with `\"tok-\"`\n(for example `\"tok-comment\"`):\n\n* [`link`](#highlight.tags.link)\n* [`heading`](#highlight.tags.heading)\n* [`emphasis`](#highlight.tags.emphasis)\n* [`strong`](#highlight.tags.strong)\n* [`keyword`](#highlight.tags.keyword)\n* [`atom`](#highlight.tags.atom)\n* [`bool`](#highlight.tags.bool)\n* [`url`](#highlight.tags.url)\n* [`labelName`](#highlight.tags.labelName)\n* [`inserted`](#highlight.tags.inserted)\n* [`deleted`](#highlight.tags.deleted)\n* [`literal`](#highlight.tags.literal)\n* [`string`](#highlight.tags.string)\n* [`number`](#highlight.tags.number)\n* [`variableName`](#highlight.tags.variableName)\n* [`typeName`](#highlight.tags.typeName)\n* [`namespace`](#highlight.tags.namespace)\n* [`className`](#highlight.tags.className)\n* [`macroName`](#highlight.tags.macroName)\n* [`propertyName`](#highlight.tags.propertyName)\n* [`operator`](#highlight.tags.operator)\n* [`comment`](#highlight.tags.comment)\n* [`meta`](#highlight.tags.meta)\n* [`punctuation`](#highlight.tags.punctuation)\n* [`invalid`](#highlight.tags.invalid)\n\nIn addition, these mappings are provided:\n\n* [`regexp`](#highlight.tags.regexp),\n [`escape`](#highlight.tags.escape), and\n [`special`](#highlight.tags.special)[`(string)`](#highlight.tags.string)\n are mapped to `\"tok-string2\"`\n* [`special`](#highlight.tags.special)[`(variableName)`](#highlight.tags.variableName)\n to `\"tok-variableName2\"`\n* [`local`](#highlight.tags.local)[`(variableName)`](#highlight.tags.variableName)\n to `\"tok-variableName tok-local\"`\n* [`definition`](#highlight.tags.definition)[`(variableName)`](#highlight.tags.variableName)\n to `\"tok-variableName tok-definition\"`\n* [`definition`](#highlight.tags.definition)[`(propertyName)`](#highlight.tags.propertyName)\n to `\"tok-propertyName tok-definition\"`\n*/\nconst classHighlighter = tagHighlighter([\n { tag: tags.link, class: \"tok-link\" },\n { tag: tags.heading, class: \"tok-heading\" },\n { tag: tags.emphasis, class: \"tok-emphasis\" },\n { tag: tags.strong, class: \"tok-strong\" },\n { tag: tags.keyword, class: \"tok-keyword\" },\n { tag: tags.atom, class: \"tok-atom\" },\n { tag: tags.bool, class: \"tok-bool\" },\n { tag: tags.url, class: \"tok-url\" },\n { tag: tags.labelName, class: \"tok-labelName\" },\n { tag: tags.inserted, class: \"tok-inserted\" },\n { tag: tags.deleted, class: \"tok-deleted\" },\n { tag: tags.literal, class: \"tok-literal\" },\n { tag: tags.string, class: \"tok-string\" },\n { tag: tags.number, class: \"tok-number\" },\n { tag: [tags.regexp, tags.escape, tags.special(tags.string)], class: \"tok-string2\" },\n { tag: tags.variableName, class: \"tok-variableName\" },\n { tag: tags.local(tags.variableName), class: \"tok-variableName tok-local\" },\n { tag: tags.definition(tags.variableName), class: \"tok-variableName tok-definition\" },\n { tag: tags.special(tags.variableName), class: \"tok-variableName2\" },\n { tag: tags.definition(tags.propertyName), class: \"tok-propertyName tok-definition\" },\n { tag: tags.typeName, class: \"tok-typeName\" },\n { tag: tags.namespace, class: \"tok-namespace\" },\n { tag: tags.className, class: \"tok-className\" },\n { tag: tags.macroName, class: \"tok-macroName\" },\n { tag: tags.propertyName, class: \"tok-propertyName\" },\n { tag: tags.operator, class: \"tok-operator\" },\n { tag: tags.comment, class: \"tok-comment\" },\n { tag: tags.meta, class: \"tok-meta\" },\n { tag: tags.invalid, class: \"tok-invalid\" },\n { tag: tags.punctuation, class: \"tok-punctuation\" }\n]);\n\nexport { Tag, classHighlighter, getStyleTags, highlightCode, highlightTree, styleTags, tagHighlighter, tags };\n","function wordObj(words) {\n var res = {};\n for (var i = 0; i < words.length; ++i) res[words[i]] = true;\n return res;\n}\nvar commonAtoms = [\"NULL\", \"NA\", \"Inf\", \"NaN\", \"NA_integer_\", \"NA_real_\", \"NA_complex_\", \"NA_character_\", \"TRUE\", \"FALSE\"];\nvar commonBuiltins = [\"list\", \"quote\", \"bquote\", \"eval\", \"return\", \"call\", \"parse\", \"deparse\"];\nvar commonKeywords = [\"if\", \"else\", \"repeat\", \"while\", \"function\", \"for\", \"in\", \"next\", \"break\"];\nvar commonBlockKeywords = [\"if\", \"else\", \"repeat\", \"while\", \"function\", \"for\"];\n\nvar atoms = wordObj(commonAtoms);\nvar builtins = wordObj(commonBuiltins);\nvar keywords = wordObj(commonKeywords);\nvar blockkeywords = wordObj(commonBlockKeywords);\nvar opChars = /[+\\-*\\/^<>=!&|~$:]/;\nvar curPunc;\n\nfunction tokenBase(stream, state) {\n curPunc = null;\n var ch = stream.next();\n if (ch == \"#\") {\n stream.skipToEnd();\n return \"comment\";\n } else if (ch == \"0\" && stream.eat(\"x\")) {\n stream.eatWhile(/[\\da-f]/i);\n return \"number\";\n } else if (ch == \".\" && stream.eat(/\\d/)) {\n stream.match(/\\d*(?:e[+\\-]?\\d+)?/);\n return \"number\";\n } else if (/\\d/.test(ch)) {\n stream.match(/\\d*(?:\\.\\d+)?(?:e[+\\-]\\d+)?L?/);\n return \"number\";\n } else if (ch == \"'\" || ch == '\"') {\n state.tokenize = tokenString(ch);\n return \"string\";\n } else if (ch == \"`\") {\n stream.match(/[^`]+`/);\n return \"string.special\";\n } else if (ch == \".\" && stream.match(/.(?:[.]|\\d+)/)) {\n return \"keyword\";\n } else if (/[a-zA-Z\\.]/.test(ch)) {\n stream.eatWhile(/[\\w\\.]/);\n var word = stream.current();\n if (atoms.propertyIsEnumerable(word)) return \"atom\";\n if (keywords.propertyIsEnumerable(word)) {\n // Block keywords start new blocks, except 'else if', which only starts\n // one new block for the 'if', no block for the 'else'.\n if (blockkeywords.propertyIsEnumerable(word) &&\n !stream.match(/\\s*if(\\s+|$)/, false))\n curPunc = \"block\";\n return \"keyword\";\n }\n if (builtins.propertyIsEnumerable(word)) return \"builtin\";\n return \"variable\";\n } else if (ch == \"%\") {\n if (stream.skipTo(\"%\")) stream.next();\n return \"variableName.special\";\n } else if (\n (ch == \"<\" && stream.eat(\"-\")) ||\n (ch == \"<\" && stream.match(\"<-\")) ||\n (ch == \"-\" && stream.match(/>>?/))\n ) {\n return \"operator\";\n } else if (ch == \"=\" && state.ctx.argList) {\n return \"operator\";\n } else if (opChars.test(ch)) {\n if (ch == \"$\") return \"operator\";\n stream.eatWhile(opChars);\n return \"operator\";\n } else if (/[\\(\\){}\\[\\];]/.test(ch)) {\n curPunc = ch;\n if (ch == \";\") return \"punctuation\";\n return null;\n } else {\n return null;\n }\n}\n\nfunction tokenString(quote) {\n return function(stream, state) {\n if (stream.eat(\"\\\\\")) {\n var ch = stream.next();\n if (ch == \"x\") stream.match(/^[a-f0-9]{2}/i);\n else if ((ch == \"u\" || ch == \"U\") && stream.eat(\"{\") && stream.skipTo(\"}\")) stream.next();\n else if (ch == \"u\") stream.match(/^[a-f0-9]{4}/i);\n else if (ch == \"U\") stream.match(/^[a-f0-9]{8}/i);\n else if (/[0-7]/.test(ch)) stream.match(/^[0-7]{1,2}/);\n return \"string.special\";\n } else {\n var next;\n while ((next = stream.next()) != null) {\n if (next == quote) { state.tokenize = tokenBase; break; }\n if (next == \"\\\\\") { stream.backUp(1); break; }\n }\n return \"string\";\n }\n };\n}\n\nvar ALIGN_YES = 1, ALIGN_NO = 2, BRACELESS = 4\n\nfunction push(state, type, stream) {\n state.ctx = {type: type,\n indent: state.indent,\n flags: 0,\n column: stream.column(),\n prev: state.ctx};\n}\nfunction setFlag(state, flag) {\n var ctx = state.ctx\n state.ctx = {type: ctx.type,\n indent: ctx.indent,\n flags: ctx.flags | flag,\n column: ctx.column,\n prev: ctx.prev}\n}\nfunction pop(state) {\n state.indent = state.ctx.indent;\n state.ctx = state.ctx.prev;\n}\n\nexport const r = {\n name: \"r\",\n startState: function(indentUnit) {\n return {tokenize: tokenBase,\n ctx: {type: \"top\",\n indent: -indentUnit,\n flags: ALIGN_NO},\n indent: 0,\n afterIdent: false};\n },\n\n token: function(stream, state) {\n if (stream.sol()) {\n if ((state.ctx.flags & 3) == 0) state.ctx.flags |= ALIGN_NO\n if (state.ctx.flags & BRACELESS) pop(state)\n state.indent = stream.indentation();\n }\n if (stream.eatSpace()) return null;\n var style = state.tokenize(stream, state);\n if (style != \"comment\" && (state.ctx.flags & ALIGN_NO) == 0) setFlag(state, ALIGN_YES)\n\n if ((curPunc == \";\" || curPunc == \"{\" || curPunc == \"}\") && state.ctx.type == \"block\") pop(state);\n if (curPunc == \"{\") push(state, \"}\", stream);\n else if (curPunc == \"(\") {\n push(state, \")\", stream);\n if (state.afterIdent) state.ctx.argList = true;\n }\n else if (curPunc == \"[\") push(state, \"]\", stream);\n else if (curPunc == \"block\") push(state, \"block\", stream);\n else if (curPunc == state.ctx.type) pop(state);\n else if (state.ctx.type == \"block\" && style != \"comment\") setFlag(state, BRACELESS)\n state.afterIdent = style == \"variable\" || style == \"keyword\";\n return style;\n },\n\n indent: function(state, textAfter, cx) {\n if (state.tokenize != tokenBase) return 0;\n var firstChar = textAfter && textAfter.charAt(0), ctx = state.ctx,\n closing = firstChar == ctx.type;\n if (ctx.flags & BRACELESS) ctx = ctx.prev\n if (ctx.type == \"block\") return ctx.indent + (firstChar == \"{\" ? 0 : cx.unit);\n else if (ctx.flags & ALIGN_YES) return ctx.column + (closing ? 0 : 1);\n else return ctx.indent + (closing ? 0 : cx.unit);\n },\n\n languageData: {\n wordChars: \".\",\n commentTokens: {line: \"#\"},\n autocomplete: commonAtoms.concat(commonBuiltins, commonKeywords)\n }\n};\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { LanguageSupport, StreamLanguage } from \"@codemirror/language\";\nimport { completeFromList } from \"@codemirror/autocomplete\";\nimport { r } from \"@codemirror/legacy-modes/mode/r\";\n\nconst builtIns = \"zapsmall xzfile xtfrm xor writeLines writeChar writeBin write withVisible withRestarts within\" +\n\t\" withCallingHandlers withAutoprint with while which weekdays warnings warning version Vectorize vector vapply\" +\n\t\" validUTF8 validEnc utf8ToInt UseMethod url unz untracemem untrace unsplit unserialize unname unlockBinding unloadNamespace\" +\n\t\" unlist unlink unique union undebug unclass typeof tryCatch try truncate trunc trimws trigamma\" +\n\t\" transform tracingState tracemem traceback trace toupper toString topenv tolower textConnectionValue textConnection\" +\n\t\" testPlatformEquivalence tempfile tempdir tcrossprod taskCallbackManager tapply tanpi tanh tan tabulate table T t system2 system\" +\n\t\" switch sweep svd suspendInterrupts suppressWarnings suppressPackageStartupMessages suppressMessages summary sum\" +\n\t\" substring substr substitute subset sub strwrap structure strtrim strtoi strsplit strrep strptime strftime\" +\n\t\" stopifnot stop stdout stdin stderr startsWith standardGeneric srcref srcfilecopy srcfilealias srcfile sQuote sqrt sprintf split\" +\n\t\" source sort solve socketSelect socketConnection sinpi sink sinh single sin simplify2array simpleWarning simpleMessage simpleError\" +\n\t\" simpleCondition signif signalCondition sign shQuote showConnections setwd setTimeLimit setSessionTimeLimit setNamespaceInfo setHook\" +\n\t\" setequal setdiff serialize sequence seq_len seq_along seq seek searchpaths search scan scale saveRDS save sapply sample rowSums\" +\n\t\" rowsum rownames rowMeans row round RNGversion length lchoose lbeta lazyLoadDBfetch lazyLoadDBexec\" +\n\t\" RNGkind rm rle rev returnValue return retracemem restartFormals restartDescription requireNamespace require replicate replace repeat\" +\n\t\" rep_len rep removeTaskCallback remove regmatches registerS3methods registerS3method regexpr regexec Reduce Recall\" +\n\t\" readRenviron readRDS readLines readline readChar readBin Re rcond rbind rawToChar rawToBits rawShift rawConnectionValue rawConnection\" +\n\t\" raw rapply rank range R_system_version quote quit quarters qr q pushBackLength pushBack psigamma provideDimnames prod prmatrix print\" +\n\t\" prettyNum pretty Position polyroot pmin pmax pmatch pipe pi pcre_config paste0 paste parseNamespaceFile parse\" +\n\t\" packBits packageStartupMessage packageHasNamespace packageEvent package_version outer ordered order options open OlsonNames\" +\n\t\" oldClass objects nzchar numeric_version numeric NROW nrow normalizePath norm noquote nlevels ngettext NextMethod next Negate NCOL ncol\" +\n\t\" nchar nargs namespaceImportMethods namespaceImportFrom namespaceImportClasses namespaceImport namespaceExport\" +\n\t\" months mode Mod missing min mget message merge memDecompress memCompress mean max matrix match mapply Map\" +\n\t\" makeActiveBinding ls logical logb log2 log1p log10 log lockEnvironment lockBinding local loadNamespace loadingNamespaceInfo loadedNamespaces\" +\n\t\" load list2env list license licence library libcurlVersion lgamma lfactorial levels LETTERS letters lengths\" +\n\t\" lazyLoad lapply labels La_version La_library l10n_info kronecker kappa julian jitter isTRUE isSymmetric isSeekable isS4 isRestart isOpen\" +\n\t\" ISOdatetime ISOdate isNamespaceLoaded isNamespace isIncomplete isFALSE isdebugged isBaseNamespace isatty\" +\n\t\" invokeRestartInteractively invokeRestart invisible intToUtf8 intToBits intersect acosh acos abs abbreviate\" +\n\t\" interactive interaction integer inherits importIntoEnv Im ifelse if identity identical icuSetCollate icuGetCollate iconvlist iconv I\" +\n\t\" gzfile gzcon gsub grouping grepRaw grepl grep gregexpr globalenv gl getwd gettextf gettext getTaskCallbackNames getSrcLines getRversion\" +\n\t\" getOption getNativeSymbolInfo getNamespaceVersion getNamespaceUsers getNamespaceName getNamespaceInfo getNamespaceImports getNamespaceExports\" +\n\t\" getNamespace getLoadedDLLs getHook getExportedValue geterrmessage getElement getDLLRegisteredRoutines getConnection getCallingDLLe\" +\n\t\" getCallingDLL getAllConnections get0 get gctorture2 gctorture gcinfo gc gamma function forwardsolve formatDL formatC format\" +\n\t\" formals forceAndCall force for flush floor findRestart findPackageEnv findInterval Find Filter file fifo factorial factor F extSoftVersion\" +\n\t\" expression expm1 exp exists evalq eval environmentName environmentIsLocked environment enquote endsWith Encoding\" +\n\t\" encodeString enc2utf8 enc2native emptyenv eigen eapply dynGet duplicated dump droplevels drop dQuote dput double dontCheck dirname dir\" +\n\t\" digamma difftime diff dget determinant detach det deparse delayedAssign asNamespace asinh asin\" +\n\t\" debugonce debuggingState debug date cut curlGetHeaders cumsum cumprod cummin cummax Cstack_info crossprod cospi cosh cos contributors Conj\" +\n\t\" conflicts conditionMessage conditionCall computeRestarts complex comment commandArgs colSums colnames colMeans col\" +\n\t\" closeAllConnections close clearPushBack class choose chol2inv chol chkDots check_tzones chartr charToRaw charmatch character ceiling\" +\n\t\" cbind cat casefold capabilities callCC call c bzfile by builtins browserText browserSetDebug browserCondition browser break bquote body\" +\n\t\" bitwXor bitwShiftR bitwShiftL bitwOr bitwNot bitwAnd bindtextdomain bindingIsLocked bindingIsActive beta besselY besselK besselJ besselI\" +\n\t\" basename baseenv backsolve autoloader autoload attributes attr attachNamespace attach atanh atan2 atan assign asS4 asS3\" +\n\t\" arrayInd array args Arg apply append aperm anyNA anyDuplicated any allowInterrupts all alist agrepl agrep addTaskCallback addNA\";\n\nconst rBuiltIns = builtIns.split(\" \");\n\nfunction getRHints() {\n\tconst rHints = [];\n\n\trBuiltIns.forEach((builtIn) => rHints.push({ label: builtIn, type: \"keyword\" }));\n\n\treturn rHints;\n}\n\n// Define R language\nconst rLan = StreamLanguage.define(r);\n\n// Autocompletions\nconst rCompletion = rLan.data.of({\n\tautocomplete: completeFromList(getRHints())\n});\n\nfunction rLanguage() {\n\treturn new LanguageSupport(rLan, [rCompletion]);\n}\n\nexport {\n\trLanguage\n};\n","/*\n * Copyright 2017-2024 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* eslint global-require: 0 */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport Icon from \"./../../../icons/icon.jsx\";\nimport { Button } from \"@carbon/react\";\nimport classNames from \"classnames\";\nimport { isEqual, concat } from \"lodash\";\nimport ValidationMessage from \"./../../components/validation-message\";\nimport TearSheet from \"../../panels/tearsheet/index.js\";\nimport { formatMessage } from \"./../../util/property-utils\";\nimport ExpressionBuilder from \"./expression-builder/expression-builder\";\nimport { MESSAGE_KEYS, CONDITION_MESSAGE_TYPE, DEFAULT_VALIDATION_MESSAGE, STATES } from \"./../../constants/constants\";\nimport { ControlType } from \"./../../constants/form-constants\";\nimport { Calculator } from \"@carbon/react/icons\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport { get } from \"lodash\";\nimport ExpressionToggle from \"./expression-toggle/expression-toggle\";\n\nimport {\n\tkeymap,\n\tplaceholder,\n\tEditorView,\n\thighlightSpecialChars,\n\tdrawSelection,\n\thighlightActiveLine,\n\tdropCursor,\n\trectangularSelection,\n\tcrosshairCursor,\n\tlineNumbers,\n\thighlightActiveLineGutter\n} from \"@codemirror/view\";\nimport { defaultKeymap, indentWithTab, insertNewline, history, historyKeymap } from \"@codemirror/commands\"; // eslint-disable-line no-shadow\nimport { searchKeymap, highlightSelectionMatches } from \"@codemirror/search\";\nimport { autocompletion, completionKeymap, closeBrackets, closeBracketsKeymap } from \"@codemirror/autocomplete\";\nimport { lintKeymap } from \"@codemirror/lint\";\nimport { Compartment, EditorState } from \"@codemirror/state\";\nimport { tags } from \"@lezer/highlight\";\nimport { HighlightStyle, syntaxHighlighting, indentOnInput, bracketMatching, foldGutter, foldKeymap } from \"@codemirror/language\";\nimport { python } from \"@codemirror/lang-python\";\nimport { sql } from \"@codemirror/lang-sql\";\nimport { javascript } from \"@codemirror/lang-javascript\";\nimport { json, jsonParseLinter } from \"@codemirror/lang-json\";\nimport { linter } from \"@codemirror/lint\";\n\nimport { getPythonHints } from \"./languages/python-hint\";\nimport { rLanguage } from \"./languages/r-hint\";\nimport { clem } from \"./languages/CLEM-hint\";\n\nconst pxPerChar = 8.5;\nconst pxPerLine = 26;\nconst defaultCharPerLine = 30;\nconst maxLineHeight = 15 * pxPerLine; // 20 lines\nconst minLineHeight = 4 * pxPerLine; // 4 lines\nclass ExpressionControl extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tshowExpressionBuilder: false,\n\t\t\tvalidationInProgress: false,\n\t\t\texpressionEditorHeight: 0\n\t\t};\n\t\tthis.editable = new Compartment; // eslint-disable-line new-parens\n\t\tthis.editorRef = React.createRef();\n\t\tthis.origHint = [];\n\t\tthis.expressionInfo = this.props.controller.getExpressionInfo();\n\t\tthis.handleValidate = this.handleValidate.bind(this);\n\t\tthis.hasValidate = this.hasValidate.bind(this);\n\t\tthis.cancelExpressionBuilder = this.cancelExpressionBuilder.bind(this);\n\t\tthis.hideExpressionBuilder = this.hideExpressionBuilder.bind(this);\n\t\tthis.showExpressionBuilder = this.showExpressionBuilder.bind(this);\n\t\tthis.addonHints = this.addonHints.bind(this);\n\t\tthis.getDatasetFields = this.getDatasetFields.bind(this);\n\t\tthis.handleBlur = this.handleBlur.bind(this);\n\t\tthis.createCodeMirrorEditor = this.createCodeMirrorEditor.bind(this);\n\t\tthis.events = this.events.bind(this);\n\t\tthis.handleUpdate = this.handleUpdate.bind(this);\n\t\tthis.setCodeMirrorEditable = this.setCodeMirrorEditable.bind(this);\n\t\tthis.getCodemirrorState = this.getCodemirrorState.bind(this);\n\t\tthis.focusSet = false;\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.createCodeMirrorEditor();\n\t}\n\n\t// this is needed to ensure expression builder selection works.\n\tcomponentDidUpdate(prevProps) {\n\t\t// When code is edited in expression builder, reflect changes in expression flyout\n\t\t// Toggle editable mode in Codemirror editor\n\t\tif (!isEqual(prevProps.state, this.props.state)) {\n\t\t\tif (prevProps.state === STATES.HIDDEN) {\n\t\t\t\tthis.createCodeMirrorEditor();\n\t\t\t}\n\t\t\tthis.setCodeMirrorEditable(!(this.props.state === STATES.DISABLED) || !this.props.readOnly);\n\t\t}\n\t\tif (\n\t\t\tthis.props.selectionRange &&\n\t\t\tthis.props.selectionRange.length > 0 &&\n\t\t\t!isEqual(prevProps.selectionRange, this.props.selectionRange) &&\n\t\t\tthis.editor\n\t\t) {\n\t\t\tthis.props.selectionRange.forEach((selected) => {\n\t\t\t\tthis.editor.dispatch({ selection: selected });\n\t\t\t});\n\t\t}\n\t\tif (!isEqual(prevProps.value, this.props.value)) {\n\t\t\tconst selection = this.editor.state.selection.main;\n\t\t\tthis.editor.dispatch({\n\t\t\t\tchanges: {\n\t\t\t\t\tfrom: 0,\n\t\t\t\t\tto: this.getCodemirrorState()?.doc?.length,\n\t\t\t\t\tinsert: this.props.value },\n\t\t\t\tselection: {\n\t\t\t\t\tanchor: selection.anchor,\n\t\t\t\t\thead: selection.head } });\n\t\t}\n\t}\n\n\tgetCodemirrorState() {\n\t\treturn this.editor?.viewState?.state;\n\t}\n\n\t// Set codemirror editor non-editable when disabled\n\tsetCodeMirrorEditable(value) {\n\t\tthis.editor.dispatch({\n\t\t\teffects: this.editable.reconfigure(EditorView.editable.of(value))\n\t\t});\n\t}\n\n\t// get the set of dataset field names\n\tgetDatasetFields() {\n\t\tconst results = [];\n\t\tconst fields = this.props.controller.getDatasetMetadataFields();\n\t\tfor (const field of fields) {\n\t\t\tresults.push({ label: field.name, type: \"variable\" });\n\t\t}\n\t\treturn results;\n\t}\n\n\t// Add the dataset field names to the autocomplete list\n\taddonHints(context) {\n\t\tconst word = context.matchBefore(/\\w*/);\n\t\tif (word.from === word.to && !context.explicit) {\n\t\t\treturn null;\n\t\t}\n\t\treturn {\n\t\t\tfrom: word.from,\n\t\t\toptions: concat(this.origHint, this.getDatasetFields())\n\t\t};\n\t}\n\n\tcreateCodeMirrorEditor() {\n\t\t// set the default height, should be between 4 and 20 lines\n\t\tconst controlWidth = (this.expressionEditorDiv) ? this.expressionEditorDiv.clientWidth : 0;\n\t\tconst charPerLine = (controlWidth > 0) ? controlWidth / pxPerChar : defaultCharPerLine;\n\t\t// charlimit in the control sets the height within a min and max\n\t\tlet height = (this.props.control.charLimit)\n\t\t\t? Math.min((this.props.control.charLimit / charPerLine) * pxPerLine, maxLineHeight) : minLineHeight;\n\t\t// let an explicit prop override the calculated height\n\t\theight = this.props.control.rows ? pxPerLine * this.props.control.rows : height;\n\t\theight = this.props.height ? this.props.height : height;\n\t\tthis.setState({ expressionEditorHeight: Math.max(Math.floor(height), minLineHeight) });\n\n\t\t// this next line is a hack to overcome a Codemirror problem. To support SparkSQL, a subset of SQL,\n\t\t// we need to register with Codemirror the language as the value of \"text/x-hive\". When Codemirror\n\t\t// registers the autocomplete addon it registers is as \"sql\" not the subset \"text/x-hive\"\n\t\t// This hack allows use to capture the \"sql\" autocomplete handler and subsitute our custom handler\n\t\t// Same has been done for Python and R\n\t\tlet language = this.props.control.language;\n\t\tswitch (this.props.control.language) {\n\t\tcase \"text/x-hive\":\n\t\t\tlanguage = sql();\n\t\t\tbreak;\n\t\tcase \"text/x-python\":\n\t\t\tlanguage = python();\n\t\t\tthis.origHint = getPythonHints();\n\t\t\tbreak;\n\t\tcase \"text/x-rsrc\":\n\t\t\tlanguage = rLanguage(); // custom language\n\t\t\tbreak;\n\t\tcase \"javascript\":\n\t\t\tlanguage = javascript();\n\t\t\tbreak;\n\t\tcase \"json\":\n\t\t\tlanguage = json();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tlanguage = clem(); // custom language\n\t\t}\n\n\t\t// Custom completions add to the language completions\n\t\tconst customCompletions = language.language.data.of({\n\t\t\tautocomplete: this.addonHints\n\t\t});\n\n\t\t// Syntax highlighting\n\t\tconst myHighlightStyle = HighlightStyle.define([\n\t\t\t{ tag: tags.keyword, class: \"cm-keyword\" },\n\t\t\t{ tag: tags.number, class: \"cm-number\" },\n\t\t\t{ tag: tags.definition(tags.name), class: \"cm-def\" },\n\t\t\t{ tag: tags.comment, class: \"cm-comment\" },\n\t\t\t{ tag: tags.variableName, class: \"cm-variable\" },\n\t\t\t{ tag: tags.punctuation, class: \"cm-punctuation\" },\n\t\t\t{ tag: tags.propertyName, class: \"cm-property\" },\n\t\t\t{ tag: tags.operator, class: \"cm-operator\" },\n\t\t\t{ tag: tags.string, class: \"cm-string\" },\n\t\t\t{ tag: tags.meta, class: \"cm-meta\" }\n\t\t]);\n\n\t\tconst linterExtension = this.props.control.language === \"json\" ? linter(jsonParseLinter()) : [];\n\n\t\tthis.editor = new EditorView({\n\t\t\tdoc: this.props.value,\n\t\t\textensions: [\n\t\t\t\tkeymap.of([{ key: \"Enter\", run: insertNewline }, indentWithTab, defaultKeymap]), // This should be before basicSetup to insertNewLine on \"Enter\"\n\t\t\t\tcustomCompletions,\n\t\t\t\tsyntaxHighlighting(myHighlightStyle),\n\t\t\t\tlineNumbers(), // basicSetup start\n\t\t\t\thighlightActiveLineGutter(),\n\t\t\t\thighlightSpecialChars(),\n\t\t\t\thistory(),\n\t\t\t\tfoldGutter(),\n\t\t\t\tdrawSelection(),\n\t\t\t\tdropCursor(),\n\t\t\t\tEditorState.allowMultipleSelections.of(true),\n\t\t\t\tindentOnInput(),\n\t\t\t\tbracketMatching(),\n\t\t\t\tcloseBrackets(),\n\t\t\t\tautocompletion(),\n\t\t\t\trectangularSelection(),\n\t\t\t\tcrosshairCursor(),\n\t\t\t\thighlightActiveLine(),\n\t\t\t\thighlightSelectionMatches(),\n\t\t\t\tlinterExtension,\n\t\t\t\tkeymap.of([\n\t\t\t\t\t...closeBracketsKeymap,\n\t\t\t\t\t...defaultKeymap,\n\t\t\t\t\t...searchKeymap,\n\t\t\t\t\t...historyKeymap,\n\t\t\t\t\t...foldKeymap,\n\t\t\t\t\t...completionKeymap,\n\t\t\t\t\t...lintKeymap\n\t\t\t\t]), // basicSetup end\n\t\t\t\tthis.events(),\n\t\t\t\tlanguage,\n\t\t\t\tplaceholder(this.props.control.additionalText),\n\t\t\t\tthis.handleUpdate(),\n\t\t\t\tthis.editable.of(EditorView.editable.of(!(this.props.state === STATES.DISABLED || this.props.readOnly))),\n\t\t\t\tEditorView.contentAttributes.of({ \"aria-label\": this.props.control?.label?.text })\n\t\t\t],\n\t\t\tparent: this.editorRef.current\n\t\t});\n\n\t\t// Set editor in the expression-builder\n\t\tif (this.props.editorDidMount) {\n\t\t\tthis.props.editorDidMount(this.editor);\n\n\t\t\tif (!this.focusSet && !(this.props.state === STATES.DISABLED) && !this.props.readOnly) {\n\t\t\t\tthis.focusSet = true;\n\t\t\t\t// Set focus on the editor instead of the modal's close button\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.editor.focus();\n\t\t\t\t}, 0);\n\t\t\t}\n\t\t}\n\t}\n\n\tshowExpressionBuilder() {\n\t\t// save the state from the expression builder so if enter and cancel again it will revert\n\t\tthis.initialControlValue = this.props.controller.getPropertyValue(this.props.propertyId);\n\t\tthis.initialMessage = this.props.controller.getErrorMessage(this.props.propertyId);\n\t\tthis.initialState = this.props.controller.getControlState(this.props.propertyId);\n\t\tthis.setState({ showExpressionBuilder: true });\n\t}\n\thideExpressionBuilder() {\n\t\tthis.setState({ showExpressionBuilder: false });\n\t}\n\tcancelExpressionBuilder() {\n\t\t// on cancel reset back to original value\n\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, this.initialControlValue);\n\t\tthis.props.controller.updateErrorMessage(this.props.propertyId, this.initialMessage);\n\t\tthis.props.controller.updateControlState(this.props.propertyId, this.initialState);\n\t\tthis.hideExpressionBuilder();\n\t}\n\n\thandleValidate() {\n\t\tthis.setState({\n\t\t\tvalidateIcon: null,\n\t\t\tvalidationInProgress: true\n\t\t});\n\t\tconst appData = this.props.controller.getAppData();\n\t\tthis.props.controller.getHandlers().validationHandler(this.props.controller, this.props.propertyId, this.props.value, appData, (response) => {\n\t\t\tthis.props.controller.updateErrorMessage(this.props.propertyId, response); // expects \"text\" and \"type\" in response\n\t\t\tthis.setState({\n\t\t\t\tvalidateIcon: response.type,\n\t\t\t\tvalidationInProgress: false\n\t\t\t});\n\t\t});\n\t}\n\n\thasValidate() {\n\t\treturn typeof this.props.controller.getHandlers().validationHandler === \"function\";\n\t}\n\n\t// Event handlers for CM6\n\tevents() {\n\t\tconst that = this;\n\t\tconst eventHandlers = EditorView.domEventHandlers({\n\t\t\tblur(evt, view) {\n\t\t\t\tthat.handleBlur(view, evt);\n\t\t\t}\n\t\t});\n\t\treturn eventHandlers;\n\t}\n\n\thandleBlur(editor, evt) {\n\t\tconst cancelButtonClicked = evt && evt.relatedTarget && evt.relatedTarget.classList.contains(\"properties-cancel-button\");\n\t\tif (this.props.onBlur && !cancelButtonClicked) {\n\t\t\t// this will ensure the expression builder can save values onBlur\n\t\t\tthis.props.onBlur(editor, evt);\n\t\t} else {\n\t\t\tconst newValue = editor?.viewState?.state?.doc.toString();\n\t\t\t// don't validate when opening the expression builder\n\t\t\tconst skipValidate = evt && evt.relatedTarget && evt.relatedTarget.classList.contains(\"properties-expression-button\");\n\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, newValue, skipValidate);\n\t\t}\n\t}\n\n\thandleUpdate() {\n\t\tconst onUpdate = EditorView.updateListener.of((viewUpdate) => {\n\t\t\tif (viewUpdate.docChanged) {\n\t\t\t\t// this is needed when a single character is added into the expression builder because\n\t\t\t\t// entering chars does not go through onChange() in expression builder.\n\t\t\t\t// This is needed to adjust the selection position in code mirror.\n\t\t\t\tif (\n\t\t\t\t\tArray.isArray(viewUpdate.changedRanges) &&\n\t\t\t\t\tviewUpdate.changedRanges.length === 1 &&\n\t\t\t\t\tMath.abs(viewUpdate.changes.newLength - viewUpdate.changes.length) === 1 &&\n\t\t\t\t\tthis.props.onSelectionChange\n\t\t\t\t) {\n\t\t\t\t\tconst newPos = viewUpdate.changedRanges[0].toB;\n\t\t\t\t\tthis.props.onSelectionChange([{ anchor: newPos, head: newPos }]);\n\t\t\t\t}\n\t\t\t\tif (this.state.validateIcon) {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tvalidateIcon: null\n\t\t\t\t\t});\n\t\t\t\t\tthis.props.controller.updateErrorMessage(this.props.propertyId, DEFAULT_VALIDATION_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn onUpdate;\n\t}\n\n\t_showBuilderButton() {\n\t\t// only show the button if there are function lists available and\n\t\t// not explicitly told not to by the this.props.builder\n\t\t// TODO: Design: how to display builder outside of right flyout?\n\t\treturn this.props.builder && this.props.rightFlyout && this.expressionInfo.functionCategories && Object.keys(this.expressionInfo.functionCategories).length > 0;\n\t}\n\n\t_getCodeHeader() {\n\t\tconst customHeaderHandler = this.props.controller.getHandlers().customHeaderHandler;\n\t\tlet header = null;\n\t\tif (customHeaderHandler && typeof customHeaderHandler(this.props.propertyId) !== \"undefined\") {\n\t\t\theader = customHeaderHandler(this.props.propertyId);\n\t\t}\n\t\treturn header;\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tlet messageInfo = this.props.messageInfo;\n\t\tconst messageType = (messageInfo) ? messageInfo.type : CONDITION_MESSAGE_TYPE.INFO;\n\t\tif (messageType === CONDITION_MESSAGE_TYPE.SUCCESS) {\n\t\t\tmessageInfo = null;\n\t\t}\n\n\t\tconst reactIntl = this.props.controller.getReactIntl();\n\n\t\tconst button = this._showBuilderButton() ? (\n\t\t\t<Button kind=\"ghost\" size=\"sm\"\n\t\t\t\tclassName=\"properties-expression-button\"\n\t\t\t\tdisabled={this.props.state === STATES.DISABLED || this.props.readOnly}\n\t\t\t\tonClick={this.showExpressionBuilder}\n\t\t\t\trenderIcon={Calculator}\n\t\t\t\ticonDescription={formatMessage(reactIntl, MESSAGE_KEYS.EXPRESSION_BUILDER_ICON_DESCRIPTION)}\n\t\t\t\ttooltipPosition=\"right\"\n\t\t\t\thasIconOnly\n\t\t\t/>)\n\t\t\t: null;\n\n\t\tconst codeHeaderContent = this._getCodeHeader();\n\n\t\tlet validateIcon = null;\n\t\tif (this.state.validateIcon) {\n\t\t\tvalidateIcon = (\n\t\t\t\t<div className=\"icon validateIcon\">\n\t\t\t\t\t<Icon type={this.state.validateIcon} className={`properties-validation-icon-${this.state.validateIcon}`} />\n\t\t\t\t</div>);\n\t\t}\n\n\t\tconst validateLabel = this.state.validationInProgress ? formatMessage(reactIntl, MESSAGE_KEYS.EXPRESSION_VALIDATING_LABEL)\n\t\t\t: formatMessage(reactIntl, MESSAGE_KEYS.EXPRESSION_VALIDATE_LABEL);\n\t\tconst validateLink = this.hasValidate() && this.props.validateLink ? (\n\t\t\t<div className=\"properties-expression-validate\" disabled={this.props.state === STATES.DISABLED}>\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"validateLink\"\n\t\t\t\t\tkind=\"ghost\"\n\t\t\t\t\tonClick={this.handleValidate}\n\t\t\t\t\tdisabled={this.props.state === STATES.DISABLED || this.state.validationInProgress || this.props.readOnly}\n\t\t\t\t>\n\t\t\t\t\t{validateLabel}\n\t\t\t\t</Button>\n\t\t\t\t{validateIcon}\n\t\t\t</div>)\n\t\t\t: null;\n\n\t\tconst applyLabel = formatMessage(reactIntl, MESSAGE_KEYS.APPLYBUTTON_LABEL);\n\t\tconst rejectLabel = formatMessage(reactIntl, MESSAGE_KEYS.REJECTBUTTON_LABEL);\n\t\tconst expressonTitle = formatMessage(reactIntl, MESSAGE_KEYS.EXPRESSION_BUILDER_TITLE);\n\n\t\tconst expBuilder = (\n\t\t\t<div>\n\t\t\t\t<ExpressionBuilder\n\t\t\t\t\tcontrol={this.props.control}\n\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\tpropertyId={this.props.propertyId}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\n\t\tconst flyout = this.state.showExpressionBuilder ? (<TearSheet\n\t\t\topen\n\t\t\tonCloseCallback={this.cancelExpressionBuilder}\n\t\t\tokHandler={this.hideExpressionBuilder}\n\t\t\tcancelHandler={this.cancelExpressionBuilder}\n\t\t\tshowPropertiesButtons\n\t\t\tapplyLabel={applyLabel}\n\t\t\trejectLabel={rejectLabel}\n\t\t\ttearsheet={{\n\t\t\t\ttitle: expressonTitle,\n\t\t\t\tcontent: expBuilder\n\t\t\t}}\n\t\t/>) : null;\n\n\t\tconst className = classNames(`properties-expression-editor ${messageType}`,\n\t\t\t{ \"properties-light-disabled\": !this.props.control.light || !this.props.controller.getLight() });\n\n\t\tconst expressionLink = (<div className=\"properties-expression-link-container\" >\n\t\t\t{button}\n\t\t\t{validateLink}\n\t\t</div>);\n\n\t\tconst codeHeader = this._getCodeHeader() !== null\n\t\t\t? (<div className=\"properties-code-header\">\n\t\t\t\t{codeHeaderContent}\n\t\t\t</div>)\n\t\t\t: null;\n\n\t\tlet header = (this.props.control.controlType === ControlType.CODE) ? codeHeader : expressionLink;\n\n\t\tif (this.props.expressionLabel) {\n\t\t\theader = (<div className=\"properties-expression-header\">\n\t\t\t\t<div className=\"properties-expression-title\">{this.props.expressionLabel}</div>\n\t\t\t\t{expressionLink}\n\t\t\t</div>);\n\t\t}\n\n\t\tlet toggleMaxMin = null;\n\t\tif (this.props.control.enableMaximize) {\n\t\t\tconst isTearsheetOpen = this.props.controller.getActiveTearsheet() === get(this, \"props.control.data.tearsheet_ref\");\n\t\t\ttoggleMaxMin = (<ExpressionToggle\n\t\t\t\tcontrol={this.props.control}\n\t\t\t\tcontroller={this.props.controller}\n\t\t\t\tenableMaximize={!isTearsheetOpen}\n\t\t\t/>);\n\t\t}\n\n\t\tconst codemirrorClassName = classNames(`elyra-CodeMirror ${messageType} ${this.props.state}`);\n\n\t\treturn (\n\t\t\t<div className=\"properties-expression-editor-wrapper\" >\n\t\t\t\t{this.props.controlItem}\n\t\t\t\t{flyout}\n\t\t\t\t<div className=\"properties-editor-container\">\n\t\t\t\t\t{header}\n\t\t\t\t\t{toggleMaxMin}\n\t\t\t\t\t<div ref={ (ref) => (this.expressionEditorDiv = ref) } data-id={ControlUtils.getDataId(this.props.propertyId)}\n\t\t\t\t\t\tclassName={className}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={codemirrorClassName}\n\t\t\t\t\t\t\tref={this.editorRef}\n\t\t\t\t\t\t\tstyle={{ height: this.state.expressionEditorHeight, minHeight: minLineHeight }}\n\t\t\t\t\t\t\taria-disabled={this.props.state === STATES.DISABLED || !this.props.readOnly}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ValidationMessage state={this.props.state} messageInfo={messageInfo} inTable={this.props.tableControl} />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nExpressionControl.propTypes = {\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrolItem: PropTypes.element,\n\ttableControl: PropTypes.bool,\n\teditorDidMount: PropTypes.func,\n\tbuilder: PropTypes.bool,\n\tvalidateLink: PropTypes.bool,\n\trightFlyout: PropTypes.bool,\n\tselectionRange: PropTypes.array,\n\tonSelectionChange: PropTypes.func,\n\tonBlur: PropTypes.func,\n\texpressionLabel: PropTypes.oneOfType([\n\t\tPropTypes.object,\n\t\tPropTypes.string\n\t]),\n\theight: PropTypes.number, // height in px\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.string, // pass in by redux\n\tmessageInfo: PropTypes.object, // pass in by redux\n\treadOnly: PropTypes.bool\n};\n\nExpressionControl.defaultProps = {\n\tbuilder: true,\n\tvalidateLink: true\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId)\n});\n\nexport default connect(mapStateToProps, null)(ExpressionControl);\n","/*\n * Copyright 2017-2025 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { PasswordInput } from \"@carbon/react\";\nimport ValidationMessage from \"./../../components/validation-message\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport { STATES, MESSAGE_KEYS } from \"./../../constants/constants.js\";\nimport classNames from \"classnames\";\nimport { formatMessage } from \"./../../util/property-utils\";\n\nclass PasswordControl extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.reactIntl = props.controller.getReactIntl();\n\t\tthis.id = ControlUtils.getControlId(this.props.propertyId);\n\t}\n\n\thandleChange(evt) {\n\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, evt.target.value);\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tconst overrideShowPasswordLabel = `${this.props.control.name}.passwordShow.tooltip`;\n\t\tconst overrideHidePasswordLabel = `${this.props.control.name}.passwordHide.tooltip`;\n\n\t\tconst defaultShowPasswordLabel = formatMessage(this.reactIntl, MESSAGE_KEYS.SHOW_PASSWORD_TOOLTIP);\n\t\tconst defaultHidePasswordLabel = formatMessage(this.reactIntl, MESSAGE_KEYS.HIDE_PASSWORD_TOOLTIP);\n\n\t\tconst showPasswordLabel = this.props.controller.getResource(overrideShowPasswordLabel, defaultShowPasswordLabel);\n\t\tconst hidePasswordLabel = this.props.controller.getResource(overrideHidePasswordLabel, defaultHidePasswordLabel);\n\t\tconst value = this.props.value ? this.props.value : \"\";\n\t\tconst className = classNames(\"properties-pwdfield\", \"properties-input-control\", { \"hide\": hidden },\n\t\t\tthis.props.messageInfo ? this.props.messageInfo.type : null);\n\t\tconst validationProps = ControlUtils.getValidationProps(this.props.messageInfo, this.props.tableControl);\n\t\treturn (\n\t\t\t<div className={className} data-id={ControlUtils.getDataId(this.props.propertyId)}>\n\t\t\t\t<PasswordInput\n\t\t\t\t\t{...validationProps}\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tid={this.id}\n\t\t\t\t\tdisabled={this.props.state === STATES.DISABLED}\n\t\t\t\t\tplaceholder={this.props.control.additionalText}\n\t\t\t\t\tonChange={this.handleChange.bind(this)}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tlabelText={this.props.controlItem}\n\t\t\t\t\thideLabel={this.props.tableControl}\n\t\t\t\t\ttooltipAlignment=\"end\"\n\t\t\t\t\tshowPasswordLabel={showPasswordLabel}\n\t\t\t\t\thidePasswordLabel={hidePasswordLabel}\n\t\t\t\t\thelperText={this.props.control.helperText}\n\t\t\t\t\taria-label={this.props.control.labelVisible ? null : this.props.control?.label?.text}\n\t\t\t\t/>\n\t\t\t\t<ValidationMessage inTable={this.props.tableControl} tableOnly state={this.props.state} messageInfo={this.props.messageInfo} />\n\t\t\t</div>);\n\t}\n}\n\nPasswordControl.propTypes = {\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrolItem: PropTypes.element,\n\ttableControl: PropTypes.bool,\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.string, // pass in by redux\n\tmessageInfo: PropTypes.object // pass in by redux\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId)\n});\n\nexport default connect(mapStateToProps, null)(PasswordControl);\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { TextInput } from \"@carbon/react\";\nimport ValidationMessage from \"./../../components/validation-message\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport { parse, format, isValid } from \"date-fns\";\nimport { DEFAULT_DATE_FORMAT, STATES } from \"./../../constants/constants.js\";\nimport classNames from \"classnames\";\n\nclass DatefieldControl extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.id = ControlUtils.getControlId(this.props.propertyId);\n\t\tthis.getDateFormat = this.getDateFormat.bind(this);\n\t\tthis.handleChange = this.handleChange.bind(this);\n\n\t\tthis.value = props.value;\n\t\tif (!this.value) {\n\t\t\tthis.value = \"\";\n\t\t} else {\n\t\t\tconst date = parse(this.value, DEFAULT_DATE_FORMAT, new Date());\n\t\t\tif (isValid(date)) {\n\t\t\t\tthis.value = format(date, this.getDateFormat());\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t* date-fns date format\n\t*/\n\tgetDateFormat() {\n\t\tlet dateFormat = this.props.control.dateFormat || DEFAULT_DATE_FORMAT;\n\t\tdateFormat = dateFormat.replace(/Y/g, \"y\").replace(/D/g, \"d\");\n\t\treturn dateFormat;\n\t}\n\n\thandleChange(evt) {\n\t\tlet formattedValue = null;\n\t\tthis.value = \"\";\n\n\t\tif (evt.target.value) {\n\t\t\tthis.value = evt.target.value;\n\t\t\tconst date = parse(evt.target.value, this.getDateFormat(), new Date());\n\t\t\tif (isValid(date)) {\n\t\t\t\tformattedValue = format(date, DEFAULT_DATE_FORMAT); // save as ISO format\n\t\t\t} else {\n\t\t\t\tformattedValue = evt.target.value; // Otherwise just save as invalid entered string\n\t\t\t}\n\t\t}\n\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, formattedValue);\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tconst className = classNames(\"properties-datefield\", \"properties-input-control\", { \"hide\": hidden },\n\t\t\tthis.props.messageInfo ? this.props.messageInfo.type : null);\n\t\tconst validationProps = ControlUtils.getValidationProps(this.props.messageInfo, this.props.tableControl);\n\t\treturn (\n\t\t\t<div className={className} data-id={ControlUtils.getDataId(this.props.propertyId)}>\n\t\t\t\t<TextInput\n\t\t\t\t\t{...validationProps}\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tid={this.id}\n\t\t\t\t\tdisabled={this.props.state === STATES.DISABLED}\n\t\t\t\t\tplaceholder={this.props.control.additionalText}\n\t\t\t\t\thelperText={this.props.control.helperText}\n\t\t\t\t\tonChange={this.handleChange.bind(this)}\n\t\t\t\t\tvalue={this.value}\n\t\t\t\t\tlabelText={this.props.controlItem}\n\t\t\t\t\thideLabel={this.props.tableControl}\n\t\t\t\t\treadOnly={this.props.readOnly}\n\t\t\t\t\taria-label={this.props.control.labelVisible ? null : this.props.control?.label?.text}\n\t\t\t\t/>\n\t\t\t\t<ValidationMessage inTable={this.props.tableControl} tableOnly state={this.props.state} messageInfo={this.props.messageInfo} />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nDatefieldControl.propTypes = {\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrolItem: PropTypes.element,\n\ttableControl: PropTypes.bool,\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.string, // pass in by redux\n\tmessageInfo: PropTypes.object, // pass in by redux\n\treadOnly: PropTypes.bool\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId)\n});\n\nexport default connect(mapStateToProps, null)(DatefieldControl);\n","/*\n * Copyright 2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { DatePicker, DatePickerInput } from \"@carbon/react\";\nimport classNames from \"classnames\";\n\nimport ValidationMessage from \"../../components/validation-message\";\nimport * as ControlUtils from \"../../util/control-utils\";\nimport { getFormattedDate, getISODate } from \"../../util/date-utils\";\nimport { STATES, DATEPICKER_TYPE } from \"../../constants/constants.js\";\n\nclass DatepickerControl extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.id = ControlUtils.getControlId(props.propertyId);\n\t\tthis.locale = props.controller.getLocale();\n\n\t\tthis.dateFormat = ControlUtils.getDateTimeFormat(props.control);\n\n\t\tthis.state = {\n\t\t\tvalue: props.value ? getFormattedDate(props.value, this.dateFormat) : \"\"\n\t\t};\n\n\t\tthis.getDatepickerSize = this.getDatepickerSize.bind(this);\n\t}\n\n\tgetDatepickerSize() {\n\t\treturn this.props.tableControl ? \"sm\" : \"md\";\n\t}\n\n\thandleChange(evt) {\n\t\tif (evt.length > 0) {\n\t\t\tconst isoDate = getISODate(evt[0]);\n\t\t\tconst value = getFormattedDate(evt[0], this.dateFormat); // display value\n\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, isoDate); // internal format\n\t\t\tthis.setState({ value });\n\t\t} else {\n\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, \"\");\n\t\t\tthis.setState({ value: \"\" });\n\t\t}\n\t}\n\n\t// Allows user to manually type in the input\n\t// Once the calendar closes, it will trigger an onChange evt that will correct any invalid dates\n\thandleInputChange(evt) {\n\t\tconst value = evt.target.value; // Display value as what user enters\n\t\tthis.setState({ value });\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tconst helperText = this.props.controller.getResource(`${this.props.control.name}.helper`, null);\n\t\tconst className = classNames(\"properties-datepicker\", \"properties-input-control\", { \"hide\": hidden },\n\t\t\tthis.props.messageInfo ? this.props.messageInfo.type : null);\n\t\tconst validationProps = ControlUtils.getValidationProps(this.props.messageInfo, this.props.tableControl);\n\n\t\treturn (\n\t\t\t<div className={className} data-id={ControlUtils.getDataId(this.props.propertyId)}>\n\t\t\t\t<DatePicker\n\t\t\t\t\tclassName=\"properties-datepicker-wrapper-parent\"\n\t\t\t\t\tdatePickerType={DATEPICKER_TYPE.SINGLE}\n\t\t\t\t\tdateFormat={this.dateFormat}\n\t\t\t\t\tonChange={this.handleChange.bind(this)}\n\t\t\t\t\tlocale={this.locale}\n\t\t\t\t\treadOnly={this.props.readOnly}\n\t\t\t\t\tvalue={this.state.value}\n\t\t\t\t>\n\t\t\t\t\t<DatePickerInput\n\t\t\t\t\t\t{...validationProps}\n\t\t\t\t\t\tid={this.id}\n\t\t\t\t\t\tclassName=\"properties-datepicker-wrapper-input\"\n\t\t\t\t\t\tplaceholder={this.props.control.additionalText}\n\t\t\t\t\t\tlabelText={!this.props.tableControl && this.props.controlItem}\n\t\t\t\t\t\tdisabled={this.props.state === STATES.DISABLED}\n\t\t\t\t\t\tsize={this.getDatepickerSize()}\n\t\t\t\t\t\tonChange={this.handleInputChange.bind(this)}\n\t\t\t\t\t\tvalue={this.state.value}\n\t\t\t\t\t\thelperText={(!this.props.tableControl && helperText) || this.props.control.helperText}\n\t\t\t\t\t/>\n\t\t\t\t</DatePicker>\n\t\t\t\t<ValidationMessage inTable={this.props.tableControl} tableOnly state={this.props.state} messageInfo={this.props.messageInfo} />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nDatepickerControl.propTypes = {\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrolItem: PropTypes.element,\n\ttableControl: PropTypes.bool,\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.string, // pass in by redux\n\tmessageInfo: PropTypes.object, // pass in by redux\n\treadOnly: PropTypes.bool\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId)\n});\n\nexport default connect(mapStateToProps, null)(DatepickerControl);\n","/*\n * Copyright 2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { DatePicker, DatePickerInput } from \"@carbon/react\";\nimport classNames from \"classnames\";\nimport { v4 as uuid4 } from \"uuid\";\n\nimport Tooltip from \"./../../../tooltip/tooltip.jsx\";\nimport Icon from \"./../../../icons/icon.jsx\";\nimport ValidationMessage from \"../../components/validation-message\";\nimport * as ControlUtils from \"../../util/control-utils\";\nimport { getFormattedDate, getISODate } from \"../../util/date-utils\";\nimport { STATES, DATEPICKER_TYPE, MESSAGE_KEYS, CARBON_ICONS } from \"../../constants/constants.js\";\nimport { formatMessage } from \"./../../util/property-utils\";\n\nclass DatepickerRangeControl extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.reactIntl = props.controller.getReactIntl();\n\t\tthis.id = ControlUtils.getControlId(this.props.propertyId);\n\t\tthis.locale = props.controller.getLocale();\n\t\tthis.uuid = uuid4();\n\n\t\tthis.dateFormat = ControlUtils.getDateTimeFormat(props.control);\n\n\t\tthis.state = {\n\t\t\tvalueStart: props.value && props.value[0] ? getFormattedDate(props.value[0], this.dateFormat) : \"\",\n\t\t\tvalueEnd: props.value && props.value[1] ? getFormattedDate(props.value[1], this.dateFormat) : \"\"\n\t\t};\n\n\t\tthis.getDatepickerSize = this.getDatepickerSize.bind(this);\n\t\tthis.createInfoDesc = this.createInfoDesc.bind(this);\n\t}\n\n\tonStartBlur(evt) {\n\t\tconst isoStartDate = getISODate(evt.target.value, this.dateFormat);\n\t\tconst isoEndDate = getISODate(this.state.valueEnd, this.dateFormat);\n\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, [isoStartDate, isoEndDate]);\n\t}\n\n\tonEndBlur(evt) {\n\t\tconst isoStartDate = getISODate(evt.target.value, this.dateFormat);\n\t\tconst isoEndDate = getISODate(this.state.valueEnd, this.dateFormat);\n\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, [isoStartDate, isoEndDate]);\n\t}\n\n\tgetDatepickerSize() {\n\t\treturn this.props.tableControl ? \"sm\" : \"md\";\n\t}\n\n\t// This handles changes for simple, single, and the start range date\n\thandleDateRangeChange(evt) {\n\t\tif (evt[0]) {\n\t\t\tconst isoStartDate = getISODate(evt[0]); // internal format\n\t\t\tconst valueStart = getFormattedDate(evt[0], this.dateFormat); // display value\n\t\t\tlet isoEndDate = \"\";\n\t\t\tlet valueEnd = \"\";\n\n\t\t\tif (evt[1]) { // Cannot enter end date without specifying start date\n\t\t\t\tisoEndDate = getISODate(evt[1]); // internal format\n\t\t\t\tvalueEnd = getFormattedDate(evt[1], this.dateFormat); // display value\n\t\t\t}\n\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, [isoStartDate, isoEndDate]);\n\t\t\tthis.setState({ valueStart, valueEnd });\n\t\t}\n\t}\n\n\t// Allows user to manually type in the input\n\t// Once the calendar closes, it will trigger an onChange evt that will correct any invalid dates\n\thandleInputStartChange(evt) {\n\t\tthis.setState({ valueStart: evt.target.value }); // Display value as what user enters\n\t}\n\thandleInputEndChange(evt) {\n\t\tthis.setState({ valueEnd: evt.target.value }); // Display value as what user enters\n\t}\n\n\tcreateInfoDesc(label, description, range) {\n\t\treturn description\n\t\t\t? (<div className=\"properties-label-container\">\n\t\t\t\t{label}\n\t\t\t\t<Tooltip\n\t\t\t\t\tid={`${this.uuid}-tooltip-label-${this.props.control.name}-${range}`}\n\t\t\t\t\ttip={description}\n\t\t\t\t\ttooltipLinkHandler={this.props.controller.getHandlers().tooltipLinkHandler}\n\t\t\t\t\tdirection=\"bottom\"\n\t\t\t\t\tdisable={this.props.state === STATES.DISABLED}\n\t\t\t\t\tshowToolTipOnClick\n\t\t\t\t>\n\t\t\t\t\t<Icon type={CARBON_ICONS.INFORMATION} className=\"properties-control-description-icon-info\" />\n\t\t\t\t</Tooltip>\n\t\t\t</div>)\n\t\t\t: label;\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tconst datepickerRangeStartLabel = `${this.props.control.name}.range.start.label`;\n\t\tconst datepickerRangeStartDesc = `${this.props.control.name}.range.start.desc`;\n\t\tconst datepickerRangeStartHelper = `${this.props.control.name}.range.start.helper`;\n\t\tconst datepickerRangeEndLabel = `${this.props.control.name}.range.end.label`;\n\t\tconst datepickerRangeEndDesc = `${this.props.control.name}.range.end.desc`;\n\t\tconst datepickerRangeEndHelper = `${this.props.control.name}.range.end.helper`;\n\n\t\tconst defaultDatepickerRangeStartLabel = formatMessage(this.reactIntl, MESSAGE_KEYS.DATEPICKER_RANGE_START_LABEL);\n\t\tconst defaultDatepickerRangeEndLabel = formatMessage(this.reactIntl, MESSAGE_KEYS.DATEPICKER_RANGE_END_LABEL);\n\n\t\tlet startLabel = this.props.controller.getResource(datepickerRangeStartLabel, defaultDatepickerRangeStartLabel);\n\t\tconst startDesc = this.props.controller.getResource(datepickerRangeStartDesc, null);\n\t\tconst startHelperText = this.props.controller.getResource(datepickerRangeStartHelper, null);\n\t\tlet endLabel = this.props.controller.getResource(datepickerRangeEndLabel, defaultDatepickerRangeEndLabel);\n\t\tconst endDesc = this.props.controller.getResource(datepickerRangeEndDesc, null);\n\t\tconst endHelperText = this.props.controller.getResource(datepickerRangeEndHelper, null);\n\n\t\tstartLabel = this.createInfoDesc(startLabel, startDesc, \"start\");\n\t\tendLabel = this.createInfoDesc(endLabel, endDesc, \"end\");\n\n\t\tconst className = classNames(\"properties-datepicker-range\", \"properties-input-control\", { \"hide\": hidden },\n\t\t\tthis.props.messageInfo ? this.props.messageInfo.type : null);\n\t\tconst validationProps = ControlUtils.getValidationProps(this.props.messageInfo, this.props.tableControl);\n\n\t\treturn (\n\t\t\t<div className={className} data-id={ControlUtils.getDataId(this.props.propertyId)}>\n\t\t\t\t<DatePicker\n\t\t\t\t\tdatePickerType={DATEPICKER_TYPE.RANGE}\n\t\t\t\t\tdateFormat={this.dateFormat}\n\t\t\t\t\tonChange={this.handleDateRangeChange.bind(this)}\n\t\t\t\t\tlocale={this.locale}\n\t\t\t\t\tallowInput\n\t\t\t\t\treadOnly={this.props.readOnly}\n\t\t\t\t>\n\t\t\t\t\t<DatePickerInput\n\t\t\t\t\t\t{...validationProps}\n\t\t\t\t\t\tid={`${this.id}-start`}\n\t\t\t\t\t\tplaceholder={this.props.control.additionalText}\n\t\t\t\t\t\tlabelText={!this.props.tableControl && startLabel}\n\t\t\t\t\t\tdisabled={this.props.state === STATES.DISABLED}\n\t\t\t\t\t\tsize={this.getDatepickerSize()}\n\t\t\t\t\t\tonChange={this.handleInputStartChange.bind(this)}\n\t\t\t\t\t\tvalue={this.state.valueStart}\n\t\t\t\t\t\tonBlur={this.onStartBlur.bind(this)}\n\t\t\t\t\t\thelperText={!this.props.tableControl && startHelperText}\n\t\t\t\t\t/>\n\t\t\t\t\t<DatePickerInput\n\t\t\t\t\t\t{...validationProps}\n\t\t\t\t\t\tid={`${this.id}-end`}\n\t\t\t\t\t\tplaceholder={this.props.control.additionalText}\n\t\t\t\t\t\tlabelText={!this.props.tableControl && endLabel}\n\t\t\t\t\t\tdisabled={this.props.state === STATES.DISABLED}\n\t\t\t\t\t\tsize={this.getDatepickerSize()}\n\t\t\t\t\t\tonChange={this.handleInputEndChange.bind(this)}\n\t\t\t\t\t\tvalue={this.state.valueEnd}\n\t\t\t\t\t\tonBlur={this.onEndBlur.bind(this)}\n\t\t\t\t\t\thelperText={!this.props.tableControl && endHelperText}\n\t\t\t\t\t/>\n\t\t\t\t</DatePicker>\n\t\t\t\t<ValidationMessage inTable={this.props.tableControl} tableOnly state={this.props.state} messageInfo={this.props.messageInfo} />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nDatepickerRangeControl.propTypes = {\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrolItem: PropTypes.element,\n\ttableControl: PropTypes.bool,\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.array, // pass in by redux\n\tmessageInfo: PropTypes.object, // pass in by redux\n\treadOnly: PropTypes.bool\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId)\n});\n\nexport default connect(mapStateToProps, null)(DatepickerRangeControl);\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { TextInput } from \"@carbon/react\";\nimport { parse, format, isValid } from \"date-fns\";\nimport classNames from \"classnames\";\n\nimport ValidationMessage from \"./../../components/validation-message\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport { DEFAULT_TIME_FORMAT, STATES } from \"./../../constants/constants\";\n\nclass TimefieldControl extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.id = ControlUtils.getControlId(props.propertyId);\n\n\t\tthis.value = props.value;\n\t\tif (!this.value) {\n\t\t\tthis.value = \"\";\n\t\t} else {\n\t\t\tconst date = parse(this.value, \"HH:mm:ss:xxx\", new Date());\n\t\t\tif (isValid(date)) {\n\t\t\t\tthis.value = format(date, this.getTimeFormat());\n\t\t\t}\n\t\t}\n\n\t\tthis.getTimeFormat = this.getTimeFormat.bind(this);\n\t\tthis.handleChange = this.handleChange.bind(this);\n\t}\n\n\tgetTimeFormat() {\n\t\tconst timeFormat = this.props.control.timeFormat || DEFAULT_TIME_FORMAT;\n\t\treturn timeFormat;\n\t}\n\n\thandleChange(evt) {\n\t\tlet formattedValue = null;\n\t\tthis.value = \"\";\n\n\t\tif (evt.target.value) {\n\t\t\tthis.value = evt.target.value;\n\t\t\tconst time = parse(evt.target.value, this.getTimeFormat(), new Date());\n\t\t\tif (isValid(time)) {\n\t\t\t\tformattedValue = format(time, \"HH:mm:ss:xxx\"); // If moment is valid save as ISO format\n\t\t\t} else {\n\t\t\t\tformattedValue = evt.target.value; // Otherwise just save as invalid entered string\n\t\t\t}\n\t\t}\n\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, formattedValue);\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tconst className = classNames(\"properties-timefield\", \"properties-input-control\", { \"hide\": hidden },\n\t\t\tthis.props.messageInfo ? this.props.messageInfo.type : null);\n\t\tconst validationProps = ControlUtils.getValidationProps(this.props.messageInfo, this.props.tableControl);\n\t\treturn (\n\t\t\t<div className={className} data-id={ControlUtils.getDataId(this.props.propertyId)}>\n\t\t\t\t<TextInput\n\t\t\t\t\t{...validationProps}\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tid={this.id}\n\t\t\t\t\tdisabled={this.props.state === STATES.DISABLED}\n\t\t\t\t\tplaceholder={this.props.control.additionalText}\n\t\t\t\t\tonChange={this.handleChange.bind(this)}\n\t\t\t\t\tvalue={this.value}\n\t\t\t\t\tlabelText={this.props.controlItem}\n\t\t\t\t\thideLabel={this.props.tableControl}\n\t\t\t\t\thelperText={this.props.control.helperText}\n\t\t\t\t\treadOnly={this.props.readOnly}\n\t\t\t\t\taria-label={this.props.control.labelVisible ? null : this.props.control?.label?.text}\n\t\t\t\t/>\n\t\t\t\t<ValidationMessage inTable={this.props.tableControl} tableOnly state={this.props.state} messageInfo={this.props.messageInfo} />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nTimefieldControl.propTypes = {\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrolItem: PropTypes.element,\n\ttableControl: PropTypes.bool,\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.string, // pass in by redux\n\tmessageInfo: PropTypes.object, // pass in by redux\n\treadOnly: PropTypes.bool\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId)\n});\n\nexport default connect(mapStateToProps, null)(TimefieldControl);\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { isEmpty } from \"lodash\";\nimport { Checkbox } from \"@carbon/react\";\nimport ValidationMessage from \"./../../components/validation-message\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport { STATES, CARBON_ICONS } from \"./../../constants/constants.js\";\nimport Tooltip from \"./../../../tooltip/tooltip.jsx\";\nimport classNames from \"classnames\";\nimport Icon from \"./../../../icons/icon\";\n\nclass CheckboxControl extends React.Component {\n\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.id = ControlUtils.getControlId(this.props.propertyId);\n\t}\n\n\thandleChange(evt, { checked, id }) {\n\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, checked);\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tconst label = this.props.control.label ? this.props.control.label.text : \"\";\n\t\tconst tooltipId = \"tooltip-\" + this.props.control.name;\n\t\tlet tooltip = \"\";\n\t\tif (this.props.control.description && !(this.props.state === STATES.DISABLED || hidden) && !this.props.tableControl) {\n\t\t\ttooltip = (\n\t\t\t\t<span >{this.props.control.description.text}</span>\n\t\t\t);\n\t\t\t// If tooltip has a link, add propertyId in the link object\n\t\t\tif (this.props.control.description.link) {\n\t\t\t\tthis.props.control.description.link.propertyId = this.props.propertyId;\n\t\t\t}\n\t\t}\n\t\tconst tooltipIcon = isEmpty(tooltip) ? \"\" : (\n\t\t\t<Tooltip\n\t\t\t\tid={tooltipId}\n\t\t\t\ttip={tooltip}\n\t\t\t\tlink={this.props.control.description.link ? this.props.control.description.link : null}\n\t\t\t\ttooltipLinkHandler={this.props.controller.getHandlers().tooltipLinkHandler}\n\t\t\t\tdirection=\"bottom\"\n\t\t\t\tclassName=\"properties-tooltips\"\n\t\t\t\tshowToolTipOnClick\n\t\t\t>\n\t\t\t\t<Icon type={CARBON_ICONS.INFORMATION} className=\"properties-control-description-icon-info\" />\n\t\t\t</Tooltip>\n\t\t);\n\t\tconst checkboxLabel = (\n\t\t\t<span className=\"properties-checkbox-label\">\n\t\t\t\t{label}\n\t\t\t</span>\n\t\t);\n\t\treturn (\n\t\t\t<div data-id={ControlUtils.getDataId(this.props.propertyId)}>\n\t\t\t\t<div className={classNames(\"properties-checkbox\", { \"hide\": hidden }, this.props.messageInfo ? this.props.messageInfo.type : null)}>\n\t\t\t\t\t<Checkbox\n\t\t\t\t\t\tdisabled={this.props.state === STATES.DISABLED}\n\t\t\t\t\t\tid={this.id}\n\t\t\t\t\t\tlabelText={checkboxLabel}\n\t\t\t\t\t\tonChange={this.handleChange.bind(this)}\n\t\t\t\t\t\tchecked={Boolean(this.props.value)}\n\t\t\t\t\t\thideLabel={this.props.tableControl}\n\t\t\t\t\t\thelperText={this.props.control.helperText}\n\t\t\t\t\t\treadOnly={this.props.readOnly}\n\t\t\t\t\t\taria-label={this.props.control.labelVisible ? null : this.props.control?.label?.text}\n\t\t\t\t\t/>\n\t\t\t\t\t{tooltipIcon}\n\t\t\t\t</div>\n\t\t\t\t<ValidationMessage inTable={this.props.tableControl} state={this.props.state} messageInfo={this.props.controller.getErrorMessage(this.props.propertyId)} />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nCheckboxControl.propTypes = {\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\ttableControl: PropTypes.bool,\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.bool, // pass in by redux\n\tmessageInfo: PropTypes.object, // pass in by redux\n\treadOnly: PropTypes.bool\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId)\n});\n\nexport default connect(mapStateToProps, null)(CheckboxControl);\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { Toggle } from \"@carbon/react\";\nimport ValidationMessage from \"./../../components/validation-message\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport { STATES, MESSAGE_KEYS } from \"./../../constants/constants.js\";\nimport classNames from \"classnames\";\nimport { formatMessage } from \"./../../util/property-utils\";\n\n\nclass ToggleControl extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.id = ControlUtils.getControlId(this.props.propertyId);\n\t}\n\n\n\thandleChange(value) {\n\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, value);\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tconst overrideLabelKeyOn = `${this.props.control.name}.toggle.on.label`;\n\t\tconst overrideLabelKeyOff = `${this.props.control.name}.toggle.off.label`;\n\n\t\tconst defaultOnEditLabel = formatMessage(this.reactIntl, MESSAGE_KEYS.TOGGLE_ON_LABEL);\n\t\tconst defaultOffEditLabel = formatMessage(this.reactIntl, MESSAGE_KEYS.TOGGLE_OFF_LABEL);\n\n\t\tconst labelOn = this.props.controller.getResource(overrideLabelKeyOn, defaultOnEditLabel);\n\t\tconst labelOff = this.props.controller.getResource(overrideLabelKeyOff, defaultOffEditLabel);\n\t\tconst size = this.props.tableControl ? \"sm\" : \"md\";\n\t\tconst toggleControl = (<Toggle\n\t\t\tid={this.id}\n\t\t\tsize={size}\n\t\t\tdisabled={this.props.state === STATES.DISABLED}\n\t\t\ttoggled={Boolean(this.props.value)}\n\t\t\tlabelB={labelOn}\n\t\t\tlabelA={labelOff}\n\t\t\tonToggle={this.handleChange.bind(this)}\n\t\t\taria-labelledby={`${this.props.propertyId?.name}-toggle-label`}\n\t\t\treadOnly={this.props.readOnly}\n\t\t/>);\n\t\tconst className = classNames(\"properties-toggle\", { \"hide\": hidden }, this.props.messageInfo ? this.props.messageInfo.type : null);\n\t\treturn (\n\t\t\t<div className={className} data-id={ControlUtils.getDataId(this.props.propertyId)}>\n\t\t\t\t{\n\t\t\t\t\tthis.props.tableControl\n\t\t\t\t\t\t? null\n\t\t\t\t\t\t: (\n\t\t\t\t\t\t\t<div id={`${this.props.propertyId?.name}-toggle-label`} className=\"properties-toggle-label\">\n\t\t\t\t\t\t\t\t{this.props.tableControl ? null : this.props.controlItem}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\t{toggleControl}\n\t\t\t\t<ValidationMessage inTable={this.props.tableControl} state={this.props.state} messageInfo={this.props.messageInfo} />\n\t\t\t</div>\n\n\t\t);\n\t}\n}\n\nToggleControl.propTypes = {\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrolItem: PropTypes.element,\n\ttableControl: PropTypes.bool,\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.bool, // pass in by redux\n\tmessageInfo: PropTypes.object, // pass in by redux\n\treadOnly: PropTypes.bool\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId)\n});\n\nexport default connect(mapStateToProps, null)(ToggleControl);\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { Checkbox, CheckboxGroup } from \"@carbon/react\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport classNames from \"classnames\";\nimport ValidationMessage from \"./../../components/validation-message\";\nimport { v4 as uuid4 } from \"uuid\";\nimport { intersection, isEqual } from \"lodash\";\nimport { Information } from \"@carbon/react/icons\";\nimport Tooltip from \"./../../../tooltip/tooltip.jsx\";\nimport { STATES } from \"./../../constants/constants.js\";\nimport { isEmpty } from \"lodash\";\n\n\nclass CheckboxsetControl extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.uuid = uuid4();\n\t\tthis.handleChange = this.handleChange.bind(this);\n\t\tthis.updateValueFromFilterEnum = this.updateValueFromFilterEnum.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.updateValueFromFilterEnum(true);\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\t// only update if filter options have changed. Fixes issue where filter options are updated after value in setProperties\n\t\tif (!isEqual(this.props.controlOpts, prevProps.controlOpts)) {\n\t\t\tthis.updateValueFromFilterEnum();\n\t\t}\n\t}\n\n\t// this is needed in order to reset the property value when a value is filtered out.\n\tupdateValueFromFilterEnum(skipValidateInput) {\n\t\t// update property value if value isn't in current enum value.\n\t\tif (Array.isArray(this.props.value)) {\n\t\t\tconst newValue = intersection(this.props.value, this.props.controlOpts.values);\n\t\t\tif (!isEqual(this.props.value, newValue)) {\n\t\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, newValue, skipValidateInput);\n\t\t\t}\n\t\t}\n\t}\n\n\thandleChange(val, evt, { checked, id }) {\n\t\tlet values = this.props.controller.getPropertyValue(this.props.propertyId);\n\t\tif (typeof values === \"undefined\" || values === null) {\n\t\t\tvalues = [];\n\t\t}\n\t\tconst index = values.indexOf(val);\n\t\tif (checked && index < 0) {\n\t\t\t// Add to values\n\t\t\tvalues = values.concat([val]);\n\t\t}\n\t\tif (!(checked) && index >= 0) {\n\t\t\t// Remove from values\n\t\t\tvalues.splice(index, 1);\n\t\t}\n\t\tconst newValues = values.concat();\n\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, newValues);\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tlet controlValue = this.props.value;\n\t\tif (typeof controlValue === \"undefined\" || controlValue === null) {\n\t\t\tcontrolValue = [];\n\t\t}\n\t\tconst checkboxes = [];\n\t\tfor (var i = 0; i < this.props.control.values.length; i++) {\n\t\t\tconst val = this.props.control.values[i];\n\t\t\tconst disabled = this.props.state === STATES.DISABLED || !this.props.controlOpts.values.includes(val);\n\t\t\tlet tooltipIcon = null;\n\t\t\tif (Array.isArray(this.props.control.valueDescs) && !isEmpty(this.props.control.valueDescs[i]) && !this.props.tableControl) {\n\t\t\t\tconst tooltip = (\n\t\t\t\t\t<span >{this.props.control.valueDescs[i]}</span>\n\t\t\t\t);\n\t\t\t\ttooltipIcon = (<Tooltip\n\t\t\t\t\tid={`tooltip-${i}`}\n\t\t\t\t\ttip={tooltip}\n\t\t\t\t\tdirection=\"bottom\"\n\t\t\t\t\tclassName=\"properties-tooltips\"\n\t\t\t\t\tshowToolTipOnClick\n\t\t\t\t\tdisable={hidden || disabled}\n\t\t\t\t>\n\t\t\t\t\t<Information disabled={disabled} className=\"properties-control-description-icon-info\" />\n\t\t\t\t</Tooltip>);\n\t\t\t}\n\t\t\tconst id = {\n\t\t\t\tname: this.props.propertyId.name,\n\t\t\t\trow: i\n\t\t\t};\n\t\t\tconst checked = (controlValue.indexOf(val) >= 0);\n\t\t\tcheckboxes.push(<div className=\"properties-checkbox-tooltip-container\" key={ControlUtils.getControlId(id, this.uuid)}>\n\t\t\t\t<Checkbox\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tid={ControlUtils.getControlId(id, this.uuid)}\n\t\t\t\t\tkey={val + i}\n\t\t\t\t\tlabelText={this.props.control.valueLabels[i]}\n\t\t\t\t\tonChange={this.handleChange.bind(this, val)}\n\t\t\t\t\tchecked={checked}\n\t\t\t\t\treadOnly={this.props.readOnly}\n\t\t\t\t/>\n\t\t\t\t{tooltipIcon}\n\t\t\t</div>);\n\t\t}\n\t\treturn (\n\t\t\t<div className={classNames(\"properties-checkboxset\", { \"hide\": hidden })} data-id={ControlUtils.getDataId(this.props.propertyId)}>\n\t\t\t\t<CheckboxGroup\n\t\t\t\t\tlegendText={this.props.controlItem}\n\t\t\t\t\thelperText={this.props.control.helperText}\n\t\t\t\t\treadOnly={this.props.readOnly}\n\t\t\t\t\taria-label={this.props.control.labelVisible ? null : this.props.control?.label?.text}\n\t\t\t\t>\n\t\t\t\t\t<div className={classNames(\"properties-checkboxset-container\", this.props.messageInfo ? this.props.messageInfo.type : null)}>\n\t\t\t\t\t\t{checkboxes}\n\t\t\t\t\t</div>\n\t\t\t\t</CheckboxGroup>\n\t\t\t\t<ValidationMessage inTable={this.props.tableControl} state={this.props.state} messageInfo={this.props.messageInfo} />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nCheckboxsetControl.propTypes = {\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrolItem: PropTypes.element,\n\ttableControl: PropTypes.bool,\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.array, // pass in by redux\n\tcontrolOpts: PropTypes.oneOfType([\n\t\tPropTypes.object,\n\t\tPropTypes.array\n\t]), // pass in by redux\n\tmessageInfo: PropTypes.object, // pass in by redux\n\treadOnly: PropTypes.bool\n};\n\nconst mapStateToProps = (state, ownProps) => {\n\tconst props = {\n\t\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\t\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\t\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId)\n\t};\n\tprops.controlOpts = ownProps.controller.getFilteredEnumItems(ownProps.propertyId, ownProps.control);\n\treturn props;\n};\n\nexport default connect(mapStateToProps, null)(CheckboxsetControl);\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { isEqual } from \"lodash\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport * as PropertyUtils from \"./../../util/property-utils\";\nimport * as ConditionsUtils from \"./../../ui-conditions/conditions-utils.js\";\nimport ValidationMessage from \"./../../components/validation-message\";\nimport { RadioButton, RadioButtonGroup } from \"@carbon/react\";\nimport classNames from \"classnames\";\nimport { MESSAGE_KEYS, STATES, UPDATE_TYPE } from \"./../../constants/constants.js\";\nimport { v4 as uuid4 } from \"uuid\";\nimport { Information } from \"@carbon/react/icons\";\nimport Tooltip from \"./../../../tooltip/tooltip.jsx\";\nimport { isEmpty } from \"lodash\";\n\nclass RadiosetControl extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.uuid = uuid4();\n\t\tthis.handleChange = this.handleChange.bind(this);\n\t\tthis.updateValueFromFilterEnum = this.updateValueFromFilterEnum.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.updateValueFromFilterEnum(true, UPDATE_TYPE.INITIAL_LOAD);\n\t\tconst val = this.props.controller.getPropertyValue(this.props.propertyId);\n\t\tthis.setEnabledStateOfOptionalPanels(val);\n\t\tif (typeof this.props.value !== \"undefined\" && this.props.value !== null) {\n\t\t\tthis.handleCheckedDisabled(this.props.value, this.isRadioButtonDisabled(String(this.props.value)));\n\t\t}\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\t// only update if filter options have changed. Fixes issue where filter options are updated after value in setProperties\n\t\tif (!isEqual(this.props.controlOpts, prevProps.controlOpts)) {\n\t\t\tthis.updateValueFromFilterEnum();\n\t\t}\n\t\tif (typeof this.props.value !== \"undefined\" && this.props.value !== null) {\n\t\t\tthis.handleCheckedDisabled(this.props.value, this.isRadioButtonDisabled(String(this.props.value)));\n\t\t}\n\t}\n\n\t/*\n\t* Sets the enabled and disabled states of the optional panels so the\n\t* selected button's panel is enabled and the others are disabled. This\n\t* will only do anything if there are some optional panels to insert\n\t* after each radio button provided by a SelectorPanel with its insert_panels\n\t* field set to true.\n\t*/\n\tsetEnabledStateOfOptionalPanels(targetValue) {\n\t\tif (this.props.control.optionalPanels) {\n\t\t\tconst valueSet = this.props.controlOpts;\n\t\t\tconst refState = this.props.controller.getPanelStates();\n\n\t\t\t// This populates the control.panelTree with the panels passed in and\n\t\t\t// associates them with any children they have.\n\t\t\tthis.props.controller.parsePanelTree();\n\n\t\t\tfor (let i = 0; i < valueSet.values.length; i++) {\n\t\t\t\tconst val = valueSet.values[i];\n\t\t\t\tconst state = valueSet.values[i] === targetValue ? STATES.ENABLED : STATES.DISABLED;\n\t\t\t\tConditionsUtils.updateState(refState, { \"name\": val }, state, val);\n\t\t\t}\n\n\t\t\tthis.props.controller.setPanelStates(refState);\n\n\t\t\t// Pass values as panel Ids to updatePanelChildrenStatesForPanelIds()\n\t\t\t// becuase each radio button value must be the same as the ID of its inserted panel.\n\t\t\tConditionsUtils.updatePanelChildrenStatesForPanelIds(valueSet.values, this.props.controller);\n\t\t}\n\t}\n\n\tgetOptionalPanel(val) {\n\t\treturn this.props.control.optionalPanels ? this.props.control.optionalPanels[val] : null;\n\t}\n\n\t// this is needed in order to reset the property value when a value is filtered out.\n\tupdateValueFromFilterEnum(skipValidateInput, updateType) {\n\t\tif (this.props.value !== null && typeof this.props.value !== \"undefined\" &&\n\t\t\t!this.props.controlOpts.values.includes(this.props.value)) {\n\t\t\tlet defaultValue = null;\n\t\t\t// set to default value if default value is in filtered enum list\n\t\t\tif (this.props.control.valueDef && this.props.control.valueDef.defaultValue && this.props.controlOpts.values.includes(this.props.control.valueDef.defaultValue)) {\n\t\t\t\tdefaultValue = this.props.control.valueDef.defaultValue;\n\t\t\t}\n\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, defaultValue, skipValidateInput, updateType);\n\t\t}\n\t}\n\n\tconvertTargetValue(targetValue) {\n\t\tif (this.props.control.valueDef.propType === \"boolean\") {\n\t\t\treturn (targetValue === \"true\");\n\t\t} else if (this.props.control.valueDef.propType === \"integer\" ||\n\t\t\t\t\t\t\t\tthis.props.control.valueDef.propType === \"long\"\t||\n\t\t\t\t\t\t\t\tthis.props.control.valueDef.propType === \"double\") {\n\t\t\treturn Number(targetValue);\n\t\t}\n\t\treturn targetValue;\n\t}\n\n\thandleChange(evt) {\n\t\t// Disable radio button switch if it is readOnly\n\t\tif (!this.props.readOnly) {\n\t\t\tconst oldVal = this.props.controller.getPropertyValue(this.props.propertyId);\n\t\t\tconst newVal = this.convertTargetValue(evt);\n\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, newVal);\n\n\t\t\tif (oldVal !== newVal) {\n\t\t\t\tthis.setEnabledStateOfOptionalPanels(newVal);\n\t\t\t}\n\t\t}\n\t}\n\n\tisRadioButtonDisabled(radioValue) {\n\t\tconst propState = this.props.valueStates;\n\t\tif (propState && propState[radioValue] && propState[radioValue].value) {\n\t\t\treturn propState[radioValue].value === STATES.DISABLED;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Handles those cases where a radio button is both checked and disabled -\n\t * Will attempt to select another enabled radio button if possible.\n\t *\n\t * @param val A radio button enumeration value that is selected\n\t * @param itemDisabled True if the radio button is disabled\n\t */\n\thandleCheckedDisabled(val, itemDisabled) {\n\t\tif (typeof val !== \"undefined\" && val !== null && itemDisabled && this.props.state !== STATES.DISABLED) {\n\t\t\tconst control = this.props.controller.getControl(this.props.propertyId);\n\t\t\tlet newRadioSelection;\n\t\t\tconst defaultValue = this.props.control.valueDef.defaultValue;\n\t\t\tif (defaultValue && !this.isRadioButtonDisabled(defaultValue)) {\n\t\t\t\tnewRadioSelection = defaultValue;\n\t\t\t} else {\n\t\t\t\tfor (const radioValue of control.values) {\n\t\t\t\t\tif (radioValue !== val && !this.isRadioButtonDisabled(radioValue)) {\n\t\t\t\t\t\tnewRadioSelection = radioValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (newRadioSelection) {\n\t\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, newRadioSelection);\n\t\t\t}\n\t\t}\n\t}\n\n\trender() {\n\t\tconst disabled = this.props.state === STATES.DISABLED;\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tif (!this.props.control.values && this.props.control.controlType === \"radioset\") {\n\t\t\tthis.props.control.values = [true, false];\n\t\t\tthis.props.control.valueLabels = [\"true\", \"false\"];\n\t\t}\n\t\tconst buttons = [];\n\t\tlet wasChecked = false;\n\t\tconst valueSet = this.props.controlOpts;\n\t\tfor (var i = 0; i < valueSet.values.length; i++) {\n\t\t\tlet tooltipIcon = null;\n\t\t\tif (Array.isArray(this.props.control.valueDescs) && !isEmpty(this.props.control.valueDescs[i]) && !this.props.tableControl) {\n\t\t\t\tconst tooltip = (\n\t\t\t\t\t<span>{this.props.control.valueDescs[i]}</span>\n\t\t\t\t);\n\t\t\t\ttooltipIcon = (\n\t\t\t\t\t<Tooltip\n\t\t\t\t\t\tid={`tooltip-${i}`}\n\t\t\t\t\t\ttip={tooltip}\n\t\t\t\t\t\tdirection=\"bottom\"\n\t\t\t\t\t\tclassName=\"properties-tooltips\"\n\t\t\t\t\t\tshowToolTipOnClick\n\t\t\t\t\t\tdisable={hidden || disabled}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Information disabled={disabled} className=\"properties-control-description-icon-info\" />\n\t\t\t\t\t</Tooltip>\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst checked = valueSet.values[i] === this.props.value;\n\t\t\t// RadioButton only accepts values of type string || number\n\t\t\tconst val = (this.props.control.valueDef.propType === \"boolean\") ? String(valueSet.values[i]) : valueSet.values[i];\n\t\t\twasChecked = wasChecked || checked;\n\t\t\tconst itemDisabled = this.isRadioButtonDisabled(val);\n\t\t\tconst optionalPanel = this.getOptionalPanel(val);\n\t\t\tconst id = {\n\t\t\t\tname: this.props.propertyId.name,\n\t\t\t\trow: i\n\t\t\t};\n\t\t\tconst labelWithInfo = (<div className=\"label-tooltip-container\">\n\t\t\t\t{valueSet.valueLabels[i]}\n\t\t\t\t{tooltipIcon}\n\t\t\t</div>);\n\t\t\tbuttons.push(\n\t\t\t\t<div key={i} className=\"properties-radioset-panel\">\n\t\t\t\t\t<div className=\"properties-radioset-tooltip\">\n\t\t\t\t\t\t<RadioButton\n\t\t\t\t\t\t\tkey={i}\n\t\t\t\t\t\t\tid={ControlUtils.getControlId(id, this.uuid)}\n\t\t\t\t\t\t\tdisabled={disabled || itemDisabled}\n\t\t\t\t\t\t\tlabelText={labelWithInfo}\n\t\t\t\t\t\t\tvalue={val}\n\t\t\t\t\t\t\tonChange={this.handleChange}\n\t\t\t\t\t\t\tchecked={checked}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t{optionalPanel}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\tconst radioBtnGroupAriaLabel = PropertyUtils.formatMessage(this.props.controller.getReactIntl(), MESSAGE_KEYS.RADIO_BUTTON_GROUP_ARIA_LABEL);\n\n\t\treturn (\n\t\t\t<div data-id={ControlUtils.getDataId(this.props.control, this.props.propertyId)}\n\t\t\t\tclassName={classNames(\"properties-radioset \", { \"hide\": hidden })}\n\t\t\t>\n\t\t\t\t<RadioButtonGroup className={classNames(\"properties-radio-button-group\", this.props.messageInfo ? this.props.messageInfo.type : null)}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tname=\"radio-button-group\"\n\t\t\t\t\torientation={this.props.control.orientation}\n\t\t\t\t\thelperText={this.props.control.helperText}\n\t\t\t\t\treadOnly={this.props.readOnly}\n\t\t\t\t\t// Provide unique aria-label for each radio button group\n\t\t\t\t\taria-label={`${radioBtnGroupAriaLabel} (${ControlUtils.getDataId(this.props.control, this.props.propertyId)})`}\n\t\t\t\t>\n\t\t\t\t\t{buttons}\n\t\t\t\t</RadioButtonGroup>\n\t\t\t\t<ValidationMessage state={this.props.state} messageInfo={this.props.messageInfo} inTable={this.props.tableControl} />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nRadiosetControl.propTypes = {\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrol: PropTypes.object.isRequired,\n\ttableControl: PropTypes.bool,\n\tstate: PropTypes.string, // pass in by redux\n\tvalueStates: PropTypes.object, // pass in by redux\n\tvalue: PropTypes.oneOfType([\n\t\tPropTypes.string,\n\t\tPropTypes.number,\n\t\tPropTypes.bool\n\t]), // pass in by redux\n\tmessageInfo: PropTypes.object, // pass in by redux\n\tcontrolOpts: PropTypes.object, // pass in by redux\n\treadOnly: PropTypes.bool\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\tvalueStates: ownProps.controller.getControlValueStates(ownProps.propertyId),\n\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId),\n\tcontrolOpts: ownProps.controller.getFilteredEnumItems(ownProps.propertyId, ownProps.control)\n});\n\nexport default connect(mapStateToProps, null)(RadiosetControl);\n","/*\n * Copyright 2017-2025 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { SelectItem, Select, Dropdown, ComboBox } from \"@carbon/react\";\nimport { isEqual, isEmpty } from \"lodash\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport ValidationMessage from \"./../../components/validation-message\";\nimport classNames from \"classnames\";\nimport * as PropertyUtils from \"./../../util/property-utils.js\";\nimport { ControlType } from \"./../../constants/form-constants\";\nimport { MESSAGE_KEYS, STATES, UPDATE_TYPE } from \"./../../constants/constants.js\";\nimport { formatMessage } from \"./../../util/property-utils\";\n\nclass DropDown extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.reactIntl = props.controller.getReactIntl();\n\t\tthis.emptyLabel = \"...\";\n\t\tthis.disableEmptyListDropdown = false;\n\t\tif (isEmpty(props.controlOpts)) {\n\t\t\t// For empty dropdown, get placeholder text from resources\n\t\t\tconst overrideEmptyListPlaceholder = `${this.props.control.name}.emptyList.placeholder`;\n\t\t\tconst emptyLabelOverride = props.controller.getResource(overrideEmptyListPlaceholder);\n\t\t\t// Disable empty dropdown when [property_id].emptyList.placeholder is set in resources\n\t\t\tif (emptyLabelOverride) {\n\t\t\t\tthis.emptyLabel = emptyLabelOverride;\n\t\t\t\tthis.disableEmptyListDropdown = true;\n\t\t\t}\n\t\t} else if (props.control.additionalText) {\n\t\t\t// For non-empty dropdown, get placeholder text from place_holder_text in parameter_info\n\t\t\tthis.emptyLabel = props.control.additionalText;\n\t\t}\n\t\tthis.id = ControlUtils.getControlId(this.props.propertyId);\n\t\tthis.handleChange = this.handleChange.bind(this);\n\t\tthis.handleComboOnChange = this.handleComboOnChange.bind(this);\n\t\tthis.handleOnInputChange = this.handleOnInputChange.bind(this);\n\t\tthis.genSchemaSelectOptions = this.genSchemaSelectOptions.bind(this);\n\t\tthis.genSelectOptions = this.genSelectOptions.bind(this);\n\t\tthis.genFieldSelectOptions = this.genFieldSelectOptions.bind(this);\n\t\tthis.updateValueFromFilterEnum = this.updateValueFromFilterEnum.bind(this);\n\t\tthis.getItemIcon = this.getItemIcon.bind(this);\n\t\tthis.renderItem = this.renderItem.bind(this);\n\t\tthis.filterItems = this.filterItems.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.updateValueFromFilterEnum(true, UPDATE_TYPE.INITIAL_LOAD);\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\t// only update if filter options have changed. Fixes issue where filter options are updated after value in setProperties\n\t\tif (!isEqual(this.props.controlOpts, prevProps.controlOpts)) {\n\t\t\tthis.updateValueFromFilterEnum();\n\t\t}\n\t}\n\n\tgetSelectedOption(options, selectedValue) {\n\t\tconst value = PropertyUtils.stringifyFieldValue(selectedValue, this.props.control);\n\t\tlet selectedOption = options.find(function(option) {\n\t\t\treturn option.value === value;\n\t\t});\n\t\tselectedOption = typeof selectedOption === \"undefined\" ? null : selectedOption;\n\n\t\t// Show the existing value but with a warning instead of filtering it out.\n\t\tconst showExistingValue = (selectedOption === null && value);\n\t\t// user defined value\n\t\tif (showExistingValue || this.props.control.customValueAllowed) {\n\t\t\tselectedOption = {\n\t\t\t\tvalue: value,\n\t\t\t\tlabel: value\n\t\t\t};\n\t\t}\n\n\t\treturn selectedOption;\n\t}\n\n\tgetItemIcon(enumValue) {\n\t\tconst propertyIconHandler = this.props.controller.getHandlers().propertyIconHandler;\n\t\tlet callbackIcon;\n\t\tif (propertyIconHandler) {\n\t\t\tpropertyIconHandler({\n\t\t\t\tpropertyId: this.props.propertyId,\n\t\t\t\tenumValue: enumValue\n\t\t\t}, (appIcon) => {\n\t\t\t\tcallbackIcon = appIcon;\n\t\t\t});\n\t\t}\n\t\treturn callbackIcon;\n\t}\n\n\tgenSchemaSelectOptions(selectedValue) {\n\t\tconst options = [];\n\t\t// allow for user to not select a schema\n\t\toptions.push({\n\t\t\tvalue: \"\",\n\t\t\tlabel: this.emptyLabel\n\t\t});\n\t\tif (Array.isArray(this.props.controlOpts)) {\n\t\t\tfor (const schemaName of this.props.controlOpts) {\n\t\t\t\toptions.push({\n\t\t\t\t\tvalue: schemaName,\n\t\t\t\t\tlabel: schemaName\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tconst selectedOption = this.getSelectedOption(options, selectedValue);\n\t\treturn {\n\t\t\toptions: options,\n\t\t\tselectedOption: selectedOption\n\t\t};\n\t}\n\n\tgenFieldSelectOptions(selectedValue) {\n\t\tconst options = [];\n\t\t// allow for user to not select a field\n\t\toptions.push({\n\t\t\tvalue: \"\",\n\t\t\tlabel: this.emptyLabel\n\t\t});\n\t\tfor (const field of this.props.controlOpts) {\n\t\t\toptions.push({\n\t\t\t\tvalue: field.name,\n\t\t\t\tlabel: field.name\n\t\t\t});\n\t\t}\n\t\tconst selectedOption = this.getSelectedOption(options, selectedValue);\n\t\treturn {\n\t\t\toptions: options,\n\t\t\tselectedOption: selectedOption\n\t\t};\n\t}\n\n\tgenSelectOptions(selectedValue) {\n\t\tconst options = [];\n\t\t// Allow for enumeration replacement\n\t\tfor (let j = 0; j < this.props.controlOpts.values.length; j++) {\n\t\t\toptions.push({\n\t\t\t\tvalue: this.props.controlOpts.values[j],\n\t\t\t\tlabel: this.props.controlOpts.valueLabels[j]\n\t\t\t});\n\t\t}\n\t\tconst selectedOption = this.getSelectedOption(options, selectedValue);\n\t\treturn {\n\t\t\toptions: options,\n\t\t\tselectedOption: selectedOption\n\t\t};\n\t}\n\t// this is needed in order to reset the property value when a value is filtered out.\n\tupdateValueFromFilterEnum(skipValidateInput, updateType) {\n\t\t// update property value if value isn't in current enum value. Should only be used for oneofselect\n\t\tif (this.props.control.controlType === ControlType.ONEOFSELECT && this.props.value !== null && typeof this.props.value !== \"undefined\" &&\n\t\t\t!this.props.controlOpts.values.includes(this.props.value)) {\n\t\t\tlet defaultValue = null;\n\t\t\t// set to default value if default value is in filtered enum list\n\t\t\tif (this.props.control.valueDef && this.props.control.valueDef.defaultValue && this.props.controlOpts.values.includes(this.props.control.valueDef.defaultValue)) {\n\t\t\t\tdefaultValue = this.props.control.valueDef.defaultValue;\n\t\t\t} else if (this.props.control.customValueAllowed && this.props.value) {\n\t\t\t\tdefaultValue = this.props.value;\n\t\t\t}\n\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, defaultValue, skipValidateInput, updateType);\n\t\t}\n\t}\n\n\thandleChange(evt) {\n\t\tlet value = this.props.tableControl ? evt.target.value : evt.selectedItem.value;\n\t\tif (this.props.control.controlType === ControlType.SELECTCOLUMN) {\n\t\t\tvalue = PropertyUtils.fieldStringToValue(value, this.props.control, this.props.controller);\n\t\t}\n\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, value);\n\t}\n\n\thandleComboOnChange(evt) {\n\t\tlet value = evt.selectedItem && evt.selectedItem.value ? evt.selectedItem.value : evt.selectedItem;\n\t\tif (this.props.control.controlType === ControlType.SELECTCOLUMN) {\n\t\t\tvalue = PropertyUtils.fieldStringToValue(value, this.props.control, this.props.controller);\n\t\t}\n\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, value);\n\t}\n\n\n\thandleOnInputChange(evt, options) {\n\t\tconst currentValue = this.props.controller.getPropertyValue(this.props.propertyId);\n\n\t\t// Don't update property value during initial render\n\t\tif ((typeof currentValue === \"undefined\" || currentValue === null) && evt === \"\") {\n\t\t\treturn;\n\t\t}\n\t\tconst value = evt;\n\t\tif (this.props.control.customValueAllowed) {\n\t\t\tif (evt !== null && evt !== currentValue) {\n\t\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, value);\n\t\t\t}\n\t\t} else { // check and update only if input is present in options when customValueAllowed=false\n\t\t\tconst isValidInput = options.some((opt) => opt.label === evt);\n\t\t\tif (isValidInput && evt !== null && evt !== currentValue) {\n\t\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, value);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Filter Oneofselect items as per entered input.\n\tfilterItems(list) {\n\t\tconst filterItemsHandler = this.props.controller.getHandlers().filterItemsHandler;\n\t\tif (filterItemsHandler) {\n\t\t\treturn filterItemsHandler({\n\t\t\t\ttype: \"customFilterItems\",\n\t\t\t\tpropertyId: this.props.propertyId\n\t\t\t}, list);\n\t\t}\n\t\treturn list?.item?.label?.toLowerCase().includes(list?.inputValue?.toLowerCase());\n\t}\n\n\trenderItem(item) {\n\t\treturn item ? (\n\t\t\t<div className=\"properties-dropdown-label\">\n\t\t\t\t<div className=\"custom-icon-label\">{ item.label }</div>\n\t\t\t\t{ this.getItemIcon(item.value) }\n\t\t\t</div>\n\t\t) : \"\";\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tlet dropDown;\n\t\tif (this.props.control.controlType === ControlType.SELECTSCHEMA) {\n\t\t\tdropDown = this.genSchemaSelectOptions(this.props.value);\n\t\t} else if (this.props.control.controlType === ControlType.SELECTCOLUMN) {\n\t\t\tdropDown = this.genFieldSelectOptions(this.props.value);\n\t\t} else {\n\t\t\tdropDown = this.genSelectOptions(this.props.value);\n\t\t}\n\n\t\tconst listBoxMenuIconTranslationIds = {\n\t\t\t\"close.menu\": formatMessage(this.reactIntl, MESSAGE_KEYS.DROPDOWN_TOOLTIP_CLOSEMENU),\n\t\t\t\"open.menu\": formatMessage(this.reactIntl, MESSAGE_KEYS.DROPDOWN_TOOLTIP_OPENMENU),\n\t\t\t\"clear.selection\": formatMessage(this.reactIntl, MESSAGE_KEYS.DROPDOWN_TOOLTIP_CLEARSELECTION)\n\t\t};\n\n\t\tlet dropdownComponent = null;\n\t\tconst validationProps = ControlUtils.getValidationProps(this.props.messageInfo, this.props.tableControl);\n\t\tif (this.props.tableControl) {\n\t\t\tconst options = [];\n\t\t\tconst selection = dropDown.selectedOption && dropDown.selectedOption.value ? dropDown.selectedOption.value : \"\";\n\t\t\tif (!dropDown.selectedOption) {\n\t\t\t\t// need to add null option when no value set. Shouldn't be an option for the user to select otherwise\n\t\t\t\toptions.push(<SelectItem text={this.emptyLabel} key={this.id} value=\"\" />);\n\t\t\t}\n\t\t\tfor (const option of dropDown.options) {\n\t\t\t\toptions.push(<SelectItem text={option.label} key={this.id + \"-\" + option.value} value={option.value} />);\n\t\t\t}\n\t\t\tdropdownComponent = (\n\t\t\t\t<Select\n\t\t\t\t\tid={this.id}\n\t\t\t\t\thideLabel\n\t\t\t\t\tinline\n\t\t\t\t\tlabelText={this.props.control.label ? this.props.control.label.text : \"\"}\n\t\t\t\t\tdisabled={this.props.state === STATES.DISABLED || this.disableEmptyListDropdown}\n\t\t\t\t\tonChange={this.handleChange}\n\t\t\t\t\tvalue={selection}\n\t\t\t\t\thelperText={this.props.control.helperText}\n\t\t\t\t\treadOnly={this.props.readOnly}\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\taria-label={this.props.control.labelVisible ? null : this.props.control?.label?.text}\n\t\t\t\t>\n\t\t\t\t\t{ options }\n\t\t\t\t</Select>\n\t\t\t);\n\t\t} else if (this.props.control.customValueAllowed || this.props.control.shouldFilterItem) { // combobox dropdown not allowed in tables\n\t\t\tconst shouldFilterItem = this.props.control.shouldFilterItem === true ? { shouldFilterItem: this.filterItems } : {};\n\t\t\tdropdownComponent = (\n\t\t\t\t<ComboBox\n\t\t\t\t\t{...validationProps}\n\t\t\t\t\taria-label={this.props.control.label ? this.props.control.label.text : \"\"}\n\t\t\t\t\tid={`${ControlUtils.getDataId(this.props.propertyId)}-dropdown`}\n\t\t\t\t\tdisabled={this.props.state === STATES.DISABLED || this.disableEmptyListDropdown}\n\t\t\t\t\tplaceholder={dropDown.selectedOption?.label}\n\t\t\t\t\tselectedItem={dropDown.selectedOption?.label}\n\t\t\t\t\titems={dropDown.options}\n\t\t\t\t\tonChange={this.handleComboOnChange}\n\t\t\t\t\tonInputChange={(evt) => this.handleOnInputChange(evt, dropDown.options)}\n\t\t\t\t\ttranslateWithId={(id) => listBoxMenuIconTranslationIds[id]}\n\t\t\t\t\ttitleText={this.props.controlItem}\n\t\t\t\t\thelperText={this.props.control.helperText}\n\t\t\t\t\tallowCustomValue={this.props.control.customValueAllowed}\n\t\t\t\t\t{...shouldFilterItem}\n\t\t\t\t/>\n\t\t\t);\n\t\t} else {\n\t\t\tdropdownComponent = (\n\t\t\t\t<Dropdown\n\t\t\t\t\t{...validationProps}\n\t\t\t\t\tid={`${ControlUtils.getDataId(this.props.propertyId)}-dropdown`}\n\t\t\t\t\tdisabled={this.props.state === STATES.DISABLED || this.disableEmptyListDropdown}\n\t\t\t\t\ttype=\"default\"\n\t\t\t\t\titems={dropDown.options}\n\t\t\t\t\titemToString={(item) => (item ? item.label : \"\")}\n\t\t\t\t\titemToElement={this.renderItem}\n\t\t\t\t\trenderSelectedItem={this.renderItem}\n\t\t\t\t\tonChange={this.handleChange}\n\t\t\t\t\tselectedItem={dropDown.selectedOption}\n\t\t\t\t\tlabel={this.emptyLabel}\n\t\t\t\t\ttranslateWithId={(id) => listBoxMenuIconTranslationIds[id]}\n\t\t\t\t\ttitleText={this.props.controlItem}\n\t\t\t\t\thelperText={this.props.control.helperText}\n\t\t\t\t\treadOnly={this.props.readOnly}\n\t\t\t\t\taria-label={this.props.control.labelVisible ? null : this.props.control?.label?.text}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<div data-id={ControlUtils.getDataId(this.props.propertyId)}\n\t\t\t\tclassName={classNames(\"properties-dropdown\", { \"hide\": hidden }, this.props.messageInfo ? this.props.messageInfo.type : null)}\n\t\t\t>\n\t\t\t\t{dropdownComponent}\n\t\t\t\t<ValidationMessage state={this.props.state} messageInfo={this.props.messageInfo} inTable={this.props.tableControl} tableOnly />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nDropDown.propTypes = {\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrolItem: PropTypes.element,\n\ttableControl: PropTypes.bool,\n\tcontrolOpts: PropTypes.oneOfType([\n\t\tPropTypes.object,\n\t\tPropTypes.array\n\t]), // pass in by redux\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.oneOfType([\n\t\tPropTypes.string,\n\t\tPropTypes.object\n\t]), // pass in by redux\n\tmessageInfo: PropTypes.object, // pass in by redux\n\treadOnly: PropTypes.bool\n};\n\nconst mapStateToProps = (state, ownProps) => {\n\tconst props = {\n\t\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\t\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\t\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId),\n\t};\n\tif (ownProps.control.controlType === ControlType.SELECTSCHEMA) {\n\t\tprops.controlOpts = ownProps.controller.getDatasetMetadataSchemas();\n\t} else if (ownProps.control.controlType === ControlType.SELECTCOLUMN) {\n\t\tprops.controlOpts = ownProps.controller.getFilteredDatasetMetadata(ownProps.propertyId);\n\t} else {\n\t\tprops.controlOpts = ownProps.controller.getFilteredEnumItems(ownProps.propertyId, ownProps.control);\n\t}\n\treturn props;\n};\n\nexport default connect(mapStateToProps, null)(DropDown);\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport { MultiSelect, FilterableMultiSelect } from \"@carbon/react\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport ValidationMessage from \"./../../components/validation-message\";\nimport classNames from \"classnames\";\nimport * as PropertyUtils from \"./../../util/property-utils.js\";\nimport { MESSAGE_KEYS, STATES } from \"./../../constants/constants.js\";\nimport { formatMessage } from \"./../../util/property-utils\";\nimport { isEqual, intersection, isEmpty } from \"lodash\";\n\nclass MultiSelectControl extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.reactIntl = props.controller.getReactIntl();\n\t\tthis.getSelectedOption = this.getSelectedOption.bind(this);\n\t\tthis.genSelectOptions = this.genSelectOptions.bind(this);\n\t\tthis.handleOnChange = this.handleOnChange.bind(this);\n\t\tthis.updateValueFromFilterEnum = this.updateValueFromFilterEnum.bind(this);\n\t\tthis.setShouldRender = this.setShouldRender.bind(this);\n\t\tthis.state = {\n\t\t\tshouldRender: true\n\t\t};\n\t\tthis.multiSelectDropdown = this.genSelectOptions(props.value);\n\t\tthis.selectedOptions = props.value;\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.updateValueFromFilterEnum(true);\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\tif (!isEqual(this.props.value, prevProps.value)) {\n\t\t\tthis.multiSelectDropdown = this.genSelectOptions(this.props.value);\n\t\t}\n\t\t// only update if filter options have changed. Fixes issue where filter options are updated after value in setProperties\n\t\tif (!isEqual(this.props.controlOpts, prevProps.controlOpts)) {\n\t\t\tthis.multiSelectDropdown = this.genSelectOptions(this.props.value);\n\t\t\tthis.updateValueFromFilterEnum();\n\t\t}\n\t\tthis.setShouldRender(prevProps);\n\t}\n\n\t/*\n\t* workaround for https://github.com/elyra-ai/canvas/issues/510\n\t*/\n\tsetShouldRender(prevProps) {\n\t\tif (!isEqual(this.props.controlOpts.values, prevProps.controlOpts.values) && this.state.shouldRender) {\n\t\t\tthis.setState({\n\t\t\t\tshouldRender: false\n\t\t\t});\n\t\t} else if (!this.state.shouldRender) {\n\t\t\tthis.setState({\n\t\t\t\tshouldRender: true\n\t\t\t});\n\t\t}\n\t}\n\n\tgetSelectedOption(options, selectedValues) {\n\t\tconst values = PropertyUtils.stringifyFieldValue(selectedValues, this.props.control);\n\t\tconst selectedOptions = [];\n\t\tif (values) {\n\t\t\tvalues.forEach((value) => selectedOptions.push(options.find(function(option) {\n\t\t\t\treturn option.id === value;\n\t\t\t})));\n\t\t}\n\t\treturn selectedOptions;\n\t}\n\n\tgenSelectOptions(selectedValues) {\n\t\tconst options = [];\n\t\tfor (let j = 0; j < this.props.controlOpts.values.length; j++) {\n\t\t\toptions.push({\n\t\t\t\tid: this.props.controlOpts.values[j],\n\t\t\t\tlabel: this.props.controlOpts.valueLabels[j]\n\t\t\t});\n\t\t}\n\t\tconst selectedOptions = this.getSelectedOption(options, selectedValues);\n\t\treturn {\n\t\t\toptions: options,\n\t\t\tselectedOptions: selectedOptions\n\t\t};\n\t}\n\n\t// this is needed in order to reset the property value when a value is filtered out.\n\tupdateValueFromFilterEnum(skipValidateInput) {\n\t\tlet newValues = intersection(this.props.value, this.props.controlOpts.values);\n\t\tif (!isEqual(newValues, this.props.value)) {\n\t\t\t// set back to default values if default values is in filtered enum list\n\t\t\tif (isEmpty(newValues)) {\n\t\t\t\tif (this.props.control.valueDef && this.props.control.valueDef.defaultValue) {\n\t\t\t\t\tnewValues = intersection(this.props.control.valueDef.defaultValue, this.props.controlOpts.values);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, newValues, skipValidateInput);\n\t\t}\n\t}\n\n\thandleOnChange(evt) {\n\t\tconst controlValues = [];\n\t\tfor (let i = 0; i < evt?.selectedItems?.length; i++) {\n\t\t\tcontrolValues.push(evt.selectedItems[i].id);\n\t\t}\n\t\tif (!isEqual(this.selectedOptions, controlValues)) {\n\t\t\t// Selected options changed from UI\n\t\t\tthis.selectedOptions = controlValues;\n\t\t\tthis.multiSelectDropdown = this.genSelectOptions(controlValues);\n\t\t}\n\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, controlValues);\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\t// workaround to recreate react component on filter_enum\n\t\tif (!this.state.shouldRender) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst listBoxMenuIconTranslationIds = {\n\t\t\t\"close.menu\": formatMessage(this.reactIntl, MESSAGE_KEYS.DROPDOWN_TOOLTIP_CLOSEMENU),\n\t\t\t\"open.menu\": formatMessage(this.reactIntl, MESSAGE_KEYS.DROPDOWN_TOOLTIP_OPENMENU),\n\t\t\t\"clear.all\": formatMessage(this.reactIntl, MESSAGE_KEYS.DROPDOWN_TOOLTIP_CLEARALL),\n\t\t\t\"clear.selection\": formatMessage(this.reactIntl, MESSAGE_KEYS.DROPDOWN_TOOLTIP_CLEARSELECTION)\n\t\t};\n\n\t\tconst overrideEmptyLabelKey = `${this.props.control.name}.multiselect.dropdown.empty.label`;\n\t\tconst defaultEmptyLabel = formatMessage(this.reactIntl, MESSAGE_KEYS.MULTISELECT_DROPDOWN_EMPTY_LABEL);\n\t\tconst overrideOptionsSelectedLabelKey = `${this.props.control.name}.multiselect.dropdown.options.selected.label`;\n\t\tconst defaultOptionsSelectedLabel = formatMessage(this.reactIntl, MESSAGE_KEYS.MULTISELECT_DROPDOWN_OPTIONS_SELECTED_LABEL);\n\n\t\tlet label = \"\";\n\t\tif (this.multiSelectDropdown.selectedOptions.length === 0) { // Display message for no options selected\n\t\t\tlabel = this.props.controller.getResource(overrideEmptyLabelKey, defaultEmptyLabel);\n\t\t} else { // Display message for multiple options selected\n\t\t\tlabel = this.props.controller.getResource(overrideOptionsSelectedLabelKey, defaultOptionsSelectedLabel);\n\t\t}\n\t\tconst validationProps = ControlUtils.getValidationProps(this.props.messageInfo, this.props.tableControl);\n\n\t\tlet dropdownComponent = null;\n\t\tif (this.props.control.filterable) {\n\t\t\tdropdownComponent = (\n\t\t\t\t<FilterableMultiSelect\n\t\t\t\t\t{...validationProps}\n\t\t\t\t\tid={`${ControlUtils.getDataId(this.props.propertyId)}-multiselect-filterable`}\n\t\t\t\t\tdisabled={this.props.state === STATES.DISABLED}\n\t\t\t\t\ttranslateWithId={(id) => listBoxMenuIconTranslationIds[id]}\n\t\t\t\t\titems={this.multiSelectDropdown.options}\n\t\t\t\t\tinitialSelectedItems={this.multiSelectDropdown.selectedOptions}\n\t\t\t\t\tonChange={this.handleOnChange}\n\t\t\t\t\tplaceholder={label}\n\t\t\t\t\ttitleText={this.props.tableControl ? null : this.props.controlItem}\n\t\t\t\t\thelperText={this.props.control.helperText}\n\t\t\t\t\treadOnly={this.props.readOnly}\n\t\t\t\t/>\n\t\t\t);\n\t\t} else {\n\t\t\tdropdownComponent = (\n\t\t\t\t<MultiSelect\n\t\t\t\t\t{...validationProps}\n\t\t\t\t\tid={`${ControlUtils.getDataId(this.props.propertyId)}-multiselect`}\n\t\t\t\t\tdisabled={this.props.state === STATES.DISABLED}\n\t\t\t\t\ttranslateWithId={(id) => listBoxMenuIconTranslationIds[id]}\n\t\t\t\t\titems={this.multiSelectDropdown.options}\n\t\t\t\t\tselectedItems={this.multiSelectDropdown.selectedOptions}\n\t\t\t\t\tonChange={this.handleOnChange}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\ttitleText={this.props.tableControl ? null : this.props.controlItem}\n\t\t\t\t\thelperText={this.props.control.helperText}\n\t\t\t\t\treadOnly={this.props.readOnly}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<div data-id={ControlUtils.getDataId(this.props.propertyId)}\n\t\t\t\tclassName={classNames(\"properties-dropdown\", { \"hide\": hidden }, this.props.messageInfo ? this.props.messageInfo.type : null)}\n\t\t\t>\n\t\t\t\t{dropdownComponent}\n\t\t\t\t<ValidationMessage state={this.props.state} tableOnly messageInfo={this.props.messageInfo} inTable={this.props.tableControl} />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nMultiSelectControl.propTypes = {\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrolItem: PropTypes.element,\n\ttableControl: PropTypes.bool,\n\tcontrolOpts: PropTypes.object, // pass in by redux\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.array, // pass in by redux\n\tmessageInfo: PropTypes.object, // pass in by redux\n\treadOnly: PropTypes.bool\n};\n\nconst mapStateToProps = (state, ownProps) => {\n\tconst props = {\n\t\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\t\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\t\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId),\n\t\tcontrolOpts: ownProps.controller.getFilteredEnumItems(ownProps.propertyId, ownProps.control)\n\t};\n\treturn props;\n};\n\nexport default connect(mapStateToProps, null)(MultiSelectControl);\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport FlexibleTable from \"../../components/flexible-table\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport ValidationMessage from \"./../../components/validation-message\";\nimport classNames from \"classnames\";\nimport { isEqual, intersection } from \"lodash\";\n\nimport { STATES, UPDATE_TYPE } from \"../../constants/constants\";\n\nclass SomeofselectControl extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.genSelectOptions = this.genSelectOptions.bind(this);\n\t\tthis.updateValueFromFilterEnum = this.updateValueFromFilterEnum.bind(this);\n\t\tthis.updateSelections = this.updateSelections.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.updateValueFromFilterEnum(true, UPDATE_TYPE.INITIAL_LOAD);\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\t// only update if filter options have changed. Fixes issue where filter options are updated after value in setProperties\n\t\tif (!isEqual(this.props.controlOpts, prevProps.controlOpts)) {\n\t\t\tthis.updateValueFromFilterEnum();\n\t\t}\n\t}\n\n\t// this is needed in order to reset the property value when a value is filtered out.\n\tupdateValueFromFilterEnum(skipValidateInput, updateType) {\n\t\tconst newValues = intersection(this.props.value, this.props.controlOpts.values);\n\t\tif (!isEqual(newValues, this.props.value)) {\n\t\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, newValues, skipValidateInput, updateType);\n\t\t}\n\t}\n\n\tupdateSelections(selected) {\n\t\tconst controlValues = [];\n\t\tfor (let i = 0; i < selected.length; i++) {\n\t\t\tconst value = this.props.controlOpts.values[selected[i]];\n\t\t\tcontrolValues.push(value);\n\t\t}\n\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, controlValues);\n\t}\n\n\tgenSelectOptions(selectedValues) {\n\t\tconst tableOptions = {\n\t\t\toptions: [],\n\t\t\tselected: []\n\t\t};\n\t\t// Allow for enumeration replacement\n\t\tfor (let i = 0; i < this.props.controlOpts.values.length; i++) {\n\t\t\tconst checked = selectedValues.indexOf(this.props.controlOpts.values[i]) !== -1;\n\t\t\tif (checked) {\n\t\t\t\ttableOptions.selected.push(i);\n\t\t\t}\n\t\t\tconst columns = [];\n\t\t\tcolumns.push({\n\t\t\t\tcolumn: \"someofselect\",\n\t\t\t\tstate: this.props.state,\n\t\t\t\tcontent: this.props.controlOpts.valueLabels[i],\n\t\t\t}\n\t\t\t);\n\t\t\ttableOptions.options.push({ className: \"table-row\", columns: columns, disabled: this.props.state === STATES.DISABLED }); // add state in obj\n\t\t}\n\t\treturn tableOptions;\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tlet controlValue = this.props.value;\n\t\tif (typeof controlValue === \"undefined\" || controlValue === null) {\n\t\t\tcontrolValue = [];\n\t\t}\n\t\tconst tableOptions = this.genSelectOptions(controlValue);\n\t\tconst rows = this.props.control.rows ? this.props.control.rows : 5.5;\n\t\tconst tableLabel = (this.props.control.label && this.props.control.label.text) ? this.props.control.label.text : \"\";\n\n\t\treturn (\n\t\t\t<div data-id={ControlUtils.getDataId(this.props.control, this.props.propertyId)}\n\t\t\t\tclassName={classNames(\"properties-someofselect \", { \"hide\": hidden },\n\t\t\t\t\tthis.props.messageInfo ? this.props.messageInfo.type : null)}\n\t\t\t>\n\t\t\t\t{this.props.controlItem}\n\t\t\t\t<FlexibleTable\n\t\t\t\t\tenableTanstackTable={this.props.controller.getPropertiesConfig().enableTanstackTable}\n\t\t\t\t\tcolumns={[{ \"key\": \"someofselect\", \"label\": \"\" }]}\n\t\t\t\t\trows={rows}\n\t\t\t\t\tdata={tableOptions.options}\n\t\t\t\t\tscrollKey={this.props.control.name}\n\t\t\t\t\ttableLabel={tableLabel}\n\t\t\t\t\tselectedRows={tableOptions.selected}\n\t\t\t\t\tupdateRowSelections={this.updateSelections}\n\t\t\t\t\tselectable\n\t\t\t\t\tshowHeader={false}\n\t\t\t\t\tlight={this.props.controller.getLight() && this.props.control.light}\n\t\t\t\t\temptyTablePlaceholder={this.props.control.additionalText}\n\t\t\t\t\treadOnly={this.props.readOnly}\n\t\t\t\t/>\n\t\t\t\t<ValidationMessage state={this.props.state} messageInfo={this.props.messageInfo} inTable={this.props.tableControl} />\n\t\t\t</div>\n\n\t\t);\n\t}\n}\n\nSomeofselectControl.propTypes = {\n\tcontrol: PropTypes.object,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrolItem: PropTypes.element,\n\ttableControl: PropTypes.bool,\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.array, // pass in by redux\n\tmessageInfo: PropTypes.object, // pass in by redux\n\tcontrolOpts: PropTypes.object, // pass in by redux\n\treadOnly: PropTypes.bool\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId),\n\tcontrolOpts: ownProps.controller.getFilteredEnumItems(ownProps.propertyId, ownProps.control)\n});\n\nexport default connect(mapStateToProps, null)(SomeofselectControl);\n","/*\n * Copyright 2017-2026 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport FlexibleTable from \"./../../components/flexible-table\";\nimport EmptyTable from \"../../components/empty-table/empty-table.jsx\";\nimport TableToolbar from \"./../../components/table-toolbar\";\nimport AbstractTable from \"./../abstract-table.jsx\";\nimport ValidationMessage from \"./../../components/validation-message\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport * as PropertyUtils from \"./../../util/property-utils\";\nimport { isEmpty } from \"lodash\";\nimport classNames from \"classnames\";\nimport { STATES, MESSAGE_KEYS } from \"./../../constants/constants\";\n\nimport ReadonlyControl from \"./../readonly\";\n\n/* eslint max-depth: [\"error\", 6] */\n\nclass SelectColumnsControl extends AbstractTable {\n\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.reactIntl = props.controller.getReactIntl();\n\t\tthis.emptyTableButtonClickHandler = this.addOnClick.bind(this, this.props.propertyId);\n\t\tthis.emptyTableButtonLabel = PropertyUtils.formatMessage(this.reactIntl, MESSAGE_KEYS.STRUCTURETABLE_ADDBUTTON_LABEL);\n\t}\n\n\tmakeRows(controlValue, tableState) {\n\t\tconst rows = [];\n\t\tif (controlValue) {\n\t\t\tfor (let rowIndex = 0; rowIndex < controlValue.length; rowIndex++) {\n\t\t\t\tconst columns = [];\n\t\t\t\t// If the propertyId contains 'row' then this selectcolumns control is part of a table.\n\t\t\t\t// Need to add an additional 'index' to retrieve the correct value from the control within a table.\n\t\t\t\tconst row = typeof this.props.propertyId.row !== \"undefined\"\n\t\t\t\t\t? { row: this.props.propertyId.row, index: rowIndex }\n\t\t\t\t\t: { row: rowIndex };\n\t\t\t\tconst propertyId = Object.assign({}, this.props.propertyId, row);\n\t\t\t\tconst control = Object.assign({}, this.props.control);\n\t\t\t\tif (control.dmImage) {\n\t\t\t\t\tconst fields = this.props.controller.getDatasetMetadataFields();\n\t\t\t\t\tconst value = PropertyUtils.stringifyFieldValue(this.props.controller.getPropertyValue(propertyId), control, true);\n\t\t\t\t\tconst icon = PropertyUtils.getDMFieldIcon(fields,\n\t\t\t\t\t\tvalue, control.dmImage);\n\t\t\t\t\tcontrol.icon = icon;\n\t\t\t\t}\n\t\t\t\tconst cellContent = (\n\t\t\t\t\t<div className=\"properties-table-cell-control\">\n\t\t\t\t\t\t<ReadonlyControl\n\t\t\t\t\t\t\tcontrol={control}\n\t\t\t\t\t\t\tpropertyId={propertyId}\n\t\t\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\t\t\ttableControl\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t\tcolumns.push({\n\t\t\t\t\tkey: rowIndex + \"-0-field\",\n\t\t\t\t\tcolumn: \"field\",\n\t\t\t\t\tcontent: cellContent\n\t\t\t\t});\n\t\t\t\trows.push({\n\t\t\t\t\tkey: rowIndex,\n\t\t\t\t\tonClickCallback: this.handleRowClick.bind(this, rowIndex, false),\n\t\t\t\t\tcolumns: columns,\n\t\t\t\t\tclassName: \"column-select-table-row\"\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn rows;\n\t}\n\n\t/**\n\t* Callback function invoked when closing field picker\n\t* @param allSelectedFields all fields selected, includes newSelections\n\t* @param newSelections the newly selected rows\n\t*/\n\tonFieldPickerClose(allSelectedFields, newSelections) {\n\t\tif (allSelectedFields && newSelections) {\n\t\t\tthis.setCurrentControlValueSelected(allSelectedFields, newSelections);\n\t\t\tconst scrollToRow = newSelections[newSelections.length - 1];\n\t\t\tthis.setScrollToRow(scrollToRow);\n\t\t}\n\t}\n\n\tmakeHeader() {\n\t\tconst headers = [];\n\t\theaders.push({\n\t\t\t\"key\": \"field\",\n\t\t\t\"label\": PropertyUtils.formatMessage(this.reactIntl,\n\t\t\t\tMESSAGE_KEYS.FIELDPICKER_FIELDCOLUMN_LABEL),\n\t\t\t\"description\": (null) });\n\t\treturn headers;\n\t}\n\n\tmakeTableToolbar(tableLabel) {\n\t\tif (this.props.addRemoveRows || this.props.control?.moveableRows) {\n\t\t\treturn (\n\t\t\t\t<TableToolbar\n\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\tpropertyId={this.props.propertyId}\n\t\t\t\t\tselectedRows={this.props.selectedRows}\n\t\t\t\t\ttableState={this.props.state}\n\t\t\t\t\ttableLabel={tableLabel}\n\t\t\t\t\taddRemoveRows={this.props.addRemoveRows}\n\t\t\t\t\tmoveableRows={this.props.control?.moveableRows}\n\t\t\t\t\tremoveSelectedRows={this.removeSelected}\n\t\t\t\t\tsetScrollToRow={this.setScrollToRow}\n\t\t\t\t\tsetCurrentControlValueSelected={this.setCurrentControlValueSelected}\n\t\t\t\t\tisReadonlyTable={false}\n\t\t\t\t\tisSingleSelectTable={false}\n\t\t\t\t\tsmallFlyout={false}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tconst headers = this.makeHeader();\n\n\t\tconst tableButtonConfig = {\n\t\t\tfieldPickerCloseFunction: this.onFieldPickerClose\n\t\t};\n\n\t\tconst rows = this.makeRows(this.props.value, this.props.state);\n\t\tconst tableLabel = this.props.control?.label?.text || \"\";\n\t\tconst tableToolbar = this.makeTableToolbar(tableLabel);\n\t\tconst topRightPanel = (this.props.selectedRows.length > 0 && tableToolbar) ? tableToolbar : this.makeAddButtonPanel(this.props.state, tableButtonConfig);\n\t\tlet rowToScrollTo;\n\t\tif (Number.isInteger(this.scrollToRow) && rows.length > this.scrollToRow) {\n\t\t\trowToScrollTo = this.scrollToRow;\n\t\t\tdelete this.scrollToRow;\n\t\t}\n\t\tconst tableClassName = classNames(\"properties-column-select-table\", { \"disabled\": this.props.state === STATES.DISABLED });\n\n\t\tconst table =\t(\n\t\t\t<FlexibleTable\n\t\t\t\tenableTanstackTable={this.props.controller.getPropertiesConfig().enableTanstackTable}\n\t\t\t\tcolumns={headers}\n\t\t\t\tdata={rows}\n\t\t\t\tscrollToRow={rowToScrollTo}\n\t\t\t\ttopRightPanel={topRightPanel}\n\t\t\t\tscrollKey={this.props.control.name}\n\t\t\t\ttableState={this.props.state}\n\t\t\t\tmessageInfo={this.props.messageInfo}\n\t\t\t\trows={this.props.control.rows}\n\t\t\t\ttableLabel={tableLabel}\n\t\t\t\tselectedRows={this.props.selectedRows}\n\t\t\t\trowSelection={this.props.control.rowSelection}\n\t\t\t\tupdateRowSelections={this.updateRowSelections}\n\t\t\t\tlight={this.props.controller.getLight() && this.props.control.light}\n\t\t\t\temptyTablePlaceholder={this.props.control.additionalText}\n\t\t\t/>);\n\n\t\tconst content = (\n\t\t\t<div>\n\t\t\t\t<div className={tableClassName}>\n\t\t\t\t\t{table}\n\t\t\t\t</div>\n\t\t\t\t<ValidationMessage state={this.props.state} messageInfo={this.props.messageInfo} />\n\t\t\t</div>\n\t\t);\n\n\t\treturn (\n\t\t\t<div data-id={ControlUtils.getDataId(this.props.propertyId)} className=\"properties-column-select\" >\n\t\t\t\t{this.props.controlItem}\n\t\t\t\t{\n\t\t\t\t\tisEmpty(this.props.value) && this.props.addRemoveRows\n\t\t\t\t\t\t? (\n\t\t\t\t\t\t\t<EmptyTable\n\t\t\t\t\t\t\t\tcontrol={this.props.control}\n\t\t\t\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\t\t\t\temptyTableButtonLabel={this.emptyTableButtonLabel}\n\t\t\t\t\t\t\t\temptyTableButtonClickHandler={this.emptyTableButtonClickHandler}\n\t\t\t\t\t\t\t\tdisabled={this.props.state === STATES.DISABLED}\n\t\t\t\t\t\t\t/>)\n\t\t\t\t\t\t: content\n\t\t\t\t}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nSelectColumnsControl.propTypes = {\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrolItem: PropTypes.element,\n\topenFieldPicker: PropTypes.func.isRequired,\n\tselectedRows: PropTypes.array, // set by redux\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.array, // pass in by redux\n\tmessageInfo: PropTypes.object, // pass in by redux\n\taddRemoveRows: PropTypes.bool, // set by redux\n\ttableButtons: PropTypes.object // set in by redux\n};\n\n\nconst mapStateToProps = (state, ownProps) => ({\n\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId),\n\tselectedRows: ownProps.controller.getSelectedRows(ownProps.propertyId),\n\taddRemoveRows: ownProps.controller.getAddRemoveRows(ownProps.propertyId),\n\ttableButtons: ownProps.controller.getTableButtons(ownProps.propertyId)\n});\n\nexport default connect(mapStateToProps, null)(SelectColumnsControl);\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport ControlFactory from \"../control-factory\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport ValidationMessage from \"./../../components/validation-message\";\nimport classNames from \"classnames\";\nimport { STATES } from \"./../../constants/constants.js\";\nimport { cloneDeep } from \"lodash\";\n\n\nclass StructureEditorControl extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.controlFactory = new ControlFactory(this.props.controller);\n\t\tthis.controlFactory.setFunctions(this.props.openFieldPicker, this.props.buildUIItem);\n\t}\n\n\t/**\n\t * Retrieves a sub-control definition by name.\n\t *\n\t * @param subCtrlName Name of the sub-control def to retrieve\n\t * @param a SubControl structure for the given item\n\t */\n\t_getSubControlDef(subCtrlName) {\n\t\tfor (let i = 0; i < this.props.control.subControls.length; i++) {\n\t\t\tif (this.props.control.subControls[i].name === subCtrlName) {\n\t\t\t\treturn this.props.control.subControls[i];\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t * Retrieves a sub-control index in it's parent structure.\n\t *\n\t * @param subCtrlName Name of the sub-control index to retrieve\n\t * @param The parent index for the given item\n\t */\n\t_getColumnIndex(subCtrlName) {\n\t\tfor (let i = 0; i < this.props.control.subControls.length; i++) {\n\t\t\tif (this.props.control.subControls[i].name === subCtrlName) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t * Creates a layout row of controls.\n\t *\n\t * @param rowCtrlNames String array of sub-control names\n\t * @return An array of controls for rendering\n\t */\n\t_makeRow(rowCtrlNames) {\n\t\tconst row = [];\n\t\tfor (let y = 0; y < rowCtrlNames.length; y++) {\n\t\t\tconst control = this._getSubControlDef(rowCtrlNames[y]);\n\t\t\tif (control && control.visible) {\n\t\t\t\tconst childPropertyId = {\n\t\t\t\t\tname: this.props.control.name,\n\t\t\t\t\tcol: this._getColumnIndex(rowCtrlNames[y])\n\t\t\t\t};\n\t\t\t\tconst parentPropertyId = cloneDeep(this.props.propertyId);\n\n\t\t\t\tlet propertyId = childPropertyId;\n\t\t\t\tif (parentPropertyId.name !== childPropertyId.name) {\n\t\t\t\t\tpropertyId = this.props.controller.setChildPropertyId(parentPropertyId, childPropertyId);\n\t\t\t\t}\n\t\t\t\tconst isReadOnly = this.props.readOnly;\n\t\t\t\trow.push(this.controlFactory.createControlItem(control, propertyId, null, isReadOnly));\n\t\t\t}\n\t\t}\n\t\treturn row;\n\t}\n\n\t/**\n\t * Creates the sub-controls for rendering.\n\t *\n\t * @return An array of arrays, each of which contains a row of controls\n\t */\n\t_makeControls() {\n\t\tconst controls = [];\n\t\t// If there is a layout, use that to determine control ordering\n\t\tif (Array.isArray(this.props.control.layout)) {\n\t\t\tconst layout = this.props.control.layout;\n\t\t\tfor (let i = 0; i < layout.length; i++) {\n\t\t\t\tif (Array.isArray(layout[i])) {\n\t\t\t\t\tcontrols.push(this._makeRow(layout[i]));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// If there is no layout, just arrange the controls in a single ordered column\n\t\t\tfor (let i = 0; i < this.props.control.subControls.length; i++) {\n\t\t\t\tif (this.props.control.subControls[i].visible) {\n\t\t\t\t\tconst childPropertyId = {\n\t\t\t\t\t\tname: this.props.control.name,\n\t\t\t\t\t\tcol: this._getColumnIndex(this.props.control.subControls[i].name)\n\t\t\t\t\t};\n\t\t\t\t\tconst parentPropertyId = cloneDeep(this.props.propertyId);\n\n\t\t\t\t\tlet propertyId = childPropertyId;\n\t\t\t\t\tif (parentPropertyId.name !== childPropertyId.name) {\n\t\t\t\t\t\tpropertyId = this.props.controller.setChildPropertyId(parentPropertyId, childPropertyId);\n\t\t\t\t\t}\n\t\t\t\t\tcontrols.push([this.controlFactory.createControlItem(this.props.control.subControls[i], propertyId)]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn controls;\n\t}\n\n\t_makeControlTable(controls) {\n\t\tconst rows = [];\n\t\tfor (let i = 0; i < controls.length; i++) {\n\t\t\tconst row = [];\n\t\t\tfor (let j = 0; j < controls[i].length; j++) {\n\t\t\t\trow.push(<td key={(1 + i) * j} className=\"properties-structureeditor-cell\"><div>{controls[i][j]}</div></td>);\n\t\t\t}\n\t\t\trows.push(<tr key={1 + i}>{row}</tr>);\n\t\t}\n\t\t// Added role presentation to fix a11y violation - no headers in the table\n\t\treturn (<table role=\"presentation\"><tbody>{rows}</tbody></table>);\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tconst controls = this._makeControlTable(this._makeControls());\n\n\t\treturn (\n\t\t\t<div data-id={ControlUtils.getDataId(this.props.control, this.props.propertyId)}\n\t\t\t\tclassName={classNames(\"properties-structureeditor \", { \"hide\": hidden },\n\t\t\t\t\tthis.props.messageInfo ? this.props.messageInfo.type : null)}\n\t\t\t>\n\t\t\t\t{controls}\n\t\t\t\t<ValidationMessage state={this.props.state} messageInfo={this.props.messageInfo} inTable={false} />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nStructureEditorControl.propTypes = {\n\tbuildUIItem: PropTypes.func,\n\tcontrol: PropTypes.object,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\topenFieldPicker: PropTypes.func,\n\trightFlyout: PropTypes.bool,\n\tstate: PropTypes.string, // passed in by redux\n\tvalue: PropTypes.array, // passed in by redux\n\tmessageInfo: PropTypes.object, // passed in by redux\n\treadOnly: PropTypes.bool\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId)\n});\n\nexport default connect(mapStateToProps, null)(StructureEditorControl);\n","/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\nfunction negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n}\n\nmodule.exports = negate;\n","var arrayFilter = require('./_arrayFilter'),\n baseFilter = require('./_baseFilter'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray'),\n negate = require('./negate');\n\n/**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\nfunction reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(baseIteratee(predicate, 3)));\n}\n\nmodule.exports = reject;\n","/*\n * Copyright 2017-2025 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// CONTROL structuretable\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport AbstractTable from \"./../abstract-table.jsx\";\nimport EmptyTable from \"../../components/empty-table/empty-table.jsx\";\nimport * as PropertyUtils from \"./../../util/property-utils\";\nimport { Type, ParamRole } from \"./../../constants/form-constants\";\nimport { STATES, MESSAGE_KEYS } from \"./../../constants/constants\";\nimport classNames from \"classnames\";\nimport ValidationMessage from \"./../../components/validation-message\";\nimport { reject, findIndex, cloneDeep, isEmpty } from \"lodash\";\nimport * as ControlUtils from \"./../../util/control-utils\";\n\nclass StructureTableControl extends AbstractTable {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.reactIntl = props.controller.getReactIntl();\n\t\tthis.addColumns = this.addColumns.bind(this);\n\t\tthis.removeColumns = this.removeColumns.bind(this);\n\t\tthis.getDefaultRow = this.getDefaultRow.bind(this);\n\t\tthis.indexOfRow = this.indexOfRow.bind(this);\n\t\tthis.emptyTableButtonClickHandler = this.addOnClick.bind(this, this.props.propertyId);\n\t\tthis.emptyTableButtonLabel = PropertyUtils.formatMessage(this.reactIntl, MESSAGE_KEYS.STRUCTURETABLE_ADDBUTTON_LABEL);\n\t}\n\n\tindexOfRow(columnName) {\n\t\tconst keyIndex = this.props.control.keyIndex;\n\t\treturn findIndex(this.props.controller.getPropertyValue(this.props.propertyId), function(row) {\n\t\t\treturn row[keyIndex] === columnName;\n\t\t});\n\t}\n\n\taddColumns(columnNames, callback) {\n\t\tconst newRows = [];\n\t\tconst isMap = this.props.control.valueDef.isMap;\n\t\tfor (var i = 0; i < columnNames.length; i++) {\n\t\t\tconst columnName = columnNames[i];\n\n\t\t\t// Sometimes the source list selection hasn\"t changed so do an\n\t\t\t// explicit check for whether an entry for this column exists\n\t\t\tif (this.indexOfRow(columnName) < 0) {\n\t\t\t\tconst newRow = cloneDeep(this.props.control.defaultRow);\n\n\t\t\t\t// Set the column name.\n\t\t\t\tif (isMap) {\n\t\t\t\t\t// For maps, this means adding the column name to the start of the cloned list.\n\t\t\t\t\tnewRow.unshift(columnName);\n\t\t\t\t} else {\n\t\t\t\t\t// For lists, this means assigning the column name to the correct location in the cloned list.\n\t\t\t\t\tnewRow[this.props.control.keyIndex] = columnName;\n\t\t\t\t}\n\t\t\t\tnewRows.push(newRow);\n\t\t\t}\n\t\t}\n\n\t\tconst rows = this.props.controller.getPropertyValue(this.props.propertyId).concat(newRows);\n\t\tthis.setCurrentControlValueSelected(rows);\n\t}\n\n\tremoveColumns(columnNames, callback) {\n\n\t\tconst rows = this.props.controller.getPropertyValue(this.props.propertyId);\n\t\tconst keyIndex = this.props.control.keyIndex;\n\n\t\tconst newRows = reject(rows, function(val) {\n\t\t\treturn columnNames.indexOf(val[keyIndex]) >= 0;\n\t\t});\n\t\tthis.setCurrentControlValueSelected(newRows);\n\t}\n\n\t/**\n\t* returns the default row for the control\n\t* @param field optional field to construct the defaultRow for where the parameter has role===COLUMN\n\t*/\n\tgetDefaultRow(field) {\n\t\tconst row = [];\n\t\t// if value is already in propertyValues, return that row\n\t\tif (this.props.value && field) {\n\t\t\tconst dataColumnIndex = PropertyUtils.getTableFieldIndex(this.props.control);\n\t\t\tfor (let i = 0; i < this.props.value.length; i++) {\n\t\t\t\tconst fieldValue = this.props.value[i][dataColumnIndex];\n\t\t\t\tif (fieldValue === field || this.props.value[i] === field) {\n\t\t\t\t\treturn this.props.value[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (let idx = 0; idx < this.props.control.subControls.length; idx++) {\n\t\t\tconst subControl = this.props.control.subControls[idx];\n\t\t\tif (subControl.role === ParamRole.COLUMN) {\n\t\t\t\trow.push(field);\n\t\t\t} else if (subControl.role === ParamRole.NEW_COLUMN) {\n\t\t\t\trow.push(PropertyUtils.stringifyFieldValue(field, subControl).replace(\".\", \"_\"));\n\t\t\t} else if (typeof subControl.dmDefault !== \"undefined\") {\n\t\t\t\trow.push(PropertyUtils.getDMDefault(subControl, field, this.props.controller.getDatasetMetadataFields()));\n\t\t\t} else if (typeof this.props.control.defaultRow !== \"undefined\") {\n\t\t\t\tlet defaultRowIndex = idx;\n\t\t\t\t// defaultRow does not contain the first column field, ex: aggregate.json\n\t\t\t\tif (this.props.control.subControls.length !== this.props.control.defaultRow.length) {\n\t\t\t\t\tdefaultRowIndex -= 1;\n\t\t\t\t}\n\t\t\t\tconst defaultRowValue = this.props.control.defaultRow[defaultRowIndex];\n\t\t\t\tif (this.props.control.subControls[defaultRowIndex].valueDef.propType === Type.STRUCTURE) {\n\t\t\t\t\trow.push([]); // nested structure will default to an empty array\n\t\t\t\t} else if (defaultRowValue && defaultRowValue.parameterRef) {\n\t\t\t\t\t// if the defaultRow value is a parameterRef, get the property value\n\t\t\t\t\trow.push(this.props.controller.getPropertyValue({ name: defaultRowValue.parameterRef }));\n\t\t\t\t} else {\n\t\t\t\t\trow.push(defaultRowValue);\n\t\t\t\t}\n\t\t\t} else if (subControl.valueDef && subControl.valueDef.defaultValue) {\n\t\t\t\t// get the defaultValue from the parameter\n\t\t\t\tif (subControl.valueDef.defaultValue.parameterRef) {\n\t\t\t\t\trow.push(this.props.controller.getPropertyValue({ name: subControl.valueDef.defaultValue.parameterRef }));\n\t\t\t\t} else {\n\t\t\t\t\trow.push(subControl.valueDef.defaultValue);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\trow.push(null);\n\t\t\t}\n\t\t}\n\t\treturn row;\n\t}\n\n\t/**\n\t* Callback function invoked when closing field picker for structures\n\t* @param allSelectedFields all fields selected, includes newSelections\n\t* @param newSelections the newly selected rows\n\t*/\n\tonFieldPickerClose(allSelectedFields, newSelections) {\n\t\tif (allSelectedFields && newSelections) {\n\t\t\tconst newControlValues = [];\n\t\t\tfor (const field of allSelectedFields) {\n\t\t\t\tnewControlValues.push(this.getDefaultRow(field));\n\t\t\t}\n\t\t\tthis.setCurrentControlValueSelected(newControlValues, newSelections);\n\t\t\tconst scrollToRow = newSelections[newSelections.length - 1];\n\t\t\tthis.setScrollToRow(scrollToRow);\n\t\t}\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tconst tableButtonConfig = {\n\t\t\tfieldPickerCloseFunction: this.onFieldPickerClose\n\t\t};\n\n\t\tconst customButtons = this.props.control && this.props.control.buttons;\n\t\tconst table = this.createTable(this.props.state, tableButtonConfig, customButtons);\n\t\tconst tableClassName = classNames(\"properties-st properties-st-buttons\", { \"disabled\": this.props.state === STATES.DISABLED });\n\t\tconst content = (\n\t\t\t<div>\n\t\t\t\t<div className={tableClassName}>\n\t\t\t\t\t{table}\n\t\t\t\t</div>\n\t\t\t\t<ValidationMessage state={this.props.state} messageInfo={this.props.messageInfo} />\n\t\t\t</div>);\n\n\t\tconst onPanelContainer = this.getOnPanelContainer(this.props.selectedRows);\n\n\t\treturn (\n\t\t\t<div data-id={ControlUtils.getDataId(this.props.control, this.props.propertyId)}\n\t\t\t\tclassName=\"properties-column-structure-wrapper\"\n\t\t\t>\n\t\t\t\t<div className=\"properties-column-structure\">\n\t\t\t\t\t{\n\t\t\t\t\t\tisEmpty(this.props.value) && this.props.addRemoveRows\n\t\t\t\t\t\t\t? (\n\t\t\t\t\t\t\t\t<EmptyTable\n\t\t\t\t\t\t\t\t\tcontrol={this.props.control}\n\t\t\t\t\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\t\t\t\t\temptyTableButtonLabel={this.emptyTableButtonLabel}\n\t\t\t\t\t\t\t\t\temptyTableButtonClickHandler={this.emptyTableButtonClickHandler}\n\t\t\t\t\t\t\t\t\tdisabled={this.props.state === STATES.DISABLED}\n\t\t\t\t\t\t\t\t/>)\n\t\t\t\t\t\t\t: content\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t\t<div>\n\t\t\t\t\t{onPanelContainer}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nStructureTableControl.propTypes = {\n\tbuildUIItem: PropTypes.func,\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\topenFieldPicker: PropTypes.func.isRequired,\n\trightFlyout: PropTypes.bool,\n\tselectedRows: PropTypes.array, // set by redux\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.array, // pass in by redux\n\tmessageInfo: PropTypes.object, // pass in by redux\n\taddRemoveRows: PropTypes.bool, // set by redux\n\ttableButtons: PropTypes.object // set in by redux\n};\n\n\nconst mapStateToProps = (state, ownProps) => ({\n\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId),\n\tselectedRows: ownProps.controller.getSelectedRows(ownProps.propertyId),\n\taddRemoveRows: ownProps.controller.getAddRemoveRows(ownProps.propertyId),\n\ttableButtons: ownProps.controller.getTableButtons(ownProps.propertyId)\n});\n\nexport default connect(mapStateToProps, null)(StructureTableControl);\n","/*\n * Copyright 2017-2025 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport AbstractTable from \"./../abstract-table.jsx\";\nimport EmptyTable from \"../../components/empty-table/empty-table.jsx\";\nimport { formatMessage } from \"./../../util/property-utils\";\nimport ValidationMessage from \"./../../components/validation-message\";\nimport { MESSAGE_KEYS, STATES } from \"./../../constants/constants\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport { isEmpty } from \"lodash\";\nimport classNames from \"classnames\";\n\nclass StructurelisteditorControl extends AbstractTable {\n\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.addRow = this.addRow.bind(this);\n\t\tthis.allowColumnControls = true;\n\t}\n\n\taddRow() {\n\t\tconst newRow = this.getDefaultRow();\n\t\tconst rows = this.props.controller.getPropertyValue(this.props.propertyId).concat([newRow]);\n\t\tthis.setCurrentControlValueSelected(rows);\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tconst tableButtonConfig = {\n\t\t\taddButtonLabel: formatMessage(this.props.controller.getReactIntl(),\n\t\t\t\tMESSAGE_KEYS.STRUCTURELISTEDITOR_ADDBUTTON_LABEL),\n\t\t\taddButtonFunction: this.addRow\n\t\t};\n\n\t\tconst customButtons = this.props.control && this.props.control.buttons;\n\t\tconst table = this.createTable(this.props.state, tableButtonConfig, customButtons);\n\t\tconst tableClassName = classNames(\"properties-sle properties-sle-buttons\", { \"disabled\": this.props.state === STATES.DISABLED });\n\n\t\tconst tableContainer = (<div>\n\t\t\t<div className={tableClassName}>\n\t\t\t\t{table}\n\t\t\t</div>\n\t\t\t<ValidationMessage state={this.props.state} messageInfo={this.props.messageInfo} />\n\t\t</div>);\n\n\t\tconst onPanelContainer = this.getOnPanelContainer(this.props.selectedRows);\n\t\treturn (\n\t\t\t<div data-id={ControlUtils.getDataId(this.props.control, this.props.propertyId)}\n\t\t\t\tclassName=\"properties-sle-wrapper\"\n\t\t\t>\n\t\t\t\t<div data-id={ControlUtils.getDataId(this.props.control, this.props.propertyId)}\n\t\t\t\t\tclassName=\"properties-sle-container\"\n\t\t\t\t>\n\t\t\t\t\t{\n\t\t\t\t\t\tisEmpty(this.props.value) && this.props.addRemoveRows\n\t\t\t\t\t\t\t? (\n\t\t\t\t\t\t\t\t<EmptyTable\n\t\t\t\t\t\t\t\t\tcontrol={this.props.control}\n\t\t\t\t\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\t\t\t\t\temptyTableButtonLabel={tableButtonConfig.addButtonLabel}\n\t\t\t\t\t\t\t\t\temptyTableButtonClickHandler={this.addRow}\n\t\t\t\t\t\t\t\t\tdisabled={this.props.state === STATES.DISABLED}\n\t\t\t\t\t\t\t\t/>)\n\t\t\t\t\t\t\t: tableContainer\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t\t<div>\n\t\t\t\t\t{onPanelContainer}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nStructurelisteditorControl.propTypes = {\n\tbuildUIItem: PropTypes.func,\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\trightFlyout: PropTypes.bool,\n\tselectedRows: PropTypes.array, // set by redux\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.array, // pass in by redux\n\tmessageInfo: PropTypes.object, // pass in by redux\n\taddRemoveRows: PropTypes.bool, // set by redux\n\ttableButtons: PropTypes.object // set in by redux\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId),\n\tselectedRows: ownProps.controller.getSelectedRows(ownProps.propertyId),\n\taddRemoveRows: ownProps.controller.getAddRemoveRows(ownProps.propertyId),\n\ttableButtons: ownProps.controller.getTableButtons(ownProps.propertyId)\n});\n\nexport default connect(mapStateToProps, null)(StructurelisteditorControl);\n","/*\n * Copyright 2017-2025 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// CONTROL readonlytable\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport AbstractTable from \"./../abstract-table.jsx\";\nimport EmptyTable from \"../../components/empty-table/empty-table.jsx\";\nimport { formatMessage } from \"./../../util/property-utils\";\nimport { STATES, MESSAGE_KEYS } from \"./../../constants/constants\";\nimport classNames from \"classnames\";\nimport ValidationMessage from \"./../../components/validation-message\";\nimport * as ControlUtils from \"./../../util/control-utils\";\nimport { isEmpty } from \"lodash\";\n\nclass ReadonlyTableControl extends AbstractTable {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.reactIntl = props.controller.getReactIntl();\n\t\tthis.editCallback = this.editCallback.bind(this);\n\t\tthis.buttonHandler = this.props.controller.getHandlers().buttonHandler;\n\t}\n\n\teditCallback() {\n\t\tif (this.buttonHandler) {\n\t\t\tthis.buttonHandler({\n\t\t\t\ttype: \"edit\",\n\t\t\t\tpropertyId: this.props.propertyId\n\t\t\t});\n\t\t}\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tconst overrideLabelKey = `${this.props.control.name}.edit.button.label`;\n\t\tconst defaultEditLabel = formatMessage(this.reactIntl, MESSAGE_KEYS.READONLYTABLE_EDIT_BUTTON_LABEL);\n\t\tconst buttonLabel = this.props.controller.getResource(overrideLabelKey, defaultEditLabel);\n\n\t\tconst tableButtonConfig = this.buttonHandler ? {\n\t\t\teditCallback: this.editCallback,\n\t\t\tlabel: buttonLabel\n\t\t} : null;\n\n\t\tconst customButtons = this.props.control && this.props.control.buttons;\n\t\tconst table = this.createTable(this.props.state, tableButtonConfig, customButtons);\n\t\tconst tableClassName = classNames(\"properties-rt properties-rt-buttons\", { \"disabled\": this.props.state === STATES.DISABLED });\n\t\tconst content = (\n\t\t\t<div>\n\t\t\t\t<div className={tableClassName}>\n\t\t\t\t\t{table}\n\t\t\t\t</div>\n\t\t\t\t<ValidationMessage state={this.props.state} messageInfo={this.props.messageInfo} />\n\t\t\t</div>);\n\n\t\treturn (\n\t\t\t<div data-id={ControlUtils.getDataId(this.props.control, this.props.propertyId)}\n\t\t\t\tclassName=\"properties-readonly-table-wrapper\"\n\t\t\t>\n\t\t\t\t{this.props.controlItem}\n\t\t\t\t<div className=\"properties-readonly-table\">\n\t\t\t\t\t{\n\t\t\t\t\t\tisEmpty(this.props.value) && this.props.addRemoveRows\n\t\t\t\t\t\t\t? (\n\t\t\t\t\t\t\t\t<EmptyTable\n\t\t\t\t\t\t\t\t\tcontrol={this.props.control}\n\t\t\t\t\t\t\t\t\tcontroller={this.props.controller}\n\t\t\t\t\t\t\t\t\temptyTableButtonLabel={buttonLabel}\n\t\t\t\t\t\t\t\t\temptyTableButtonClickHandler={this.editCallback}\n\t\t\t\t\t\t\t\t\tdisabled={this.props.state === STATES.DISABLED}\n\t\t\t\t\t\t\t\t/>)\n\t\t\t\t\t\t\t: content\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nReadonlyTableControl.propTypes = {\n\tbuildUIItem: PropTypes.func,\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrolItem: PropTypes.element,\n\trightFlyout: PropTypes.bool,\n\tselectedRows: PropTypes.array, // set by redux\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.array, // pass in by redux\n\tmessageInfo: PropTypes.object, // pass in by redux\n\taddRemoveRows: PropTypes.bool, // set by redux\n\ttableButtons: PropTypes.object, // set in by redux\n\thideEditButton: PropTypes.bool // set by redux\n};\n\n\nconst mapStateToProps = (state, ownProps) => ({\n\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId),\n\tselectedRows: ownProps.controller.getSelectedRows(ownProps.propertyId),\n\taddRemoveRows: ownProps.controller.getAddRemoveRows(ownProps.propertyId),\n\ttableButtons: ownProps.controller.getTableButtons(ownProps.propertyId),\n\thideEditButton: ownProps.controller.getHideEditButton(ownProps.propertyId)\n});\n\nexport default connect(mapStateToProps, null)(ReadonlyTableControl);\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Slider } from \"@carbon/react\";\nimport { connect } from \"react-redux\";\nimport classNames from \"classnames\";\nimport { v4 as uuid4 } from \"uuid\";\n\nimport * as ControlUtils from \"../../util/control-utils\";\nimport ValidationMessage from \"../../components/validation-message\";\nimport { STATES, MESSAGE_KEYS } from \"../../constants/constants\";\nimport { formatMessage } from \"./../../util/property-utils\";\n\n\nclass SliderControl extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.reactIntl = props.controller.getReactIntl();\n\t\tthis.handleChange = this.handleChange.bind(this);\n\t\tthis.uuid = uuid4();\n\t}\n\n\thandleChange(e) {\n\t\tthis.props.controller.updatePropertyValue(this.props.propertyId, e.value);\n\t}\n\n\trender() {\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tconst minLabel = this.props.controller.getResource(`${this.props.control.name}.min.label`, null);\n\t\tconst maxLabel = this.props.controller.getResource(`${this.props.control.name}.max.label`, null);\n\t\tconst minValue = this.props.control.minValue ? this.props.control.minValue : 0;\n\t\tconst maxValue = this.props.control.maxValue ? this.props.control.maxValue : 10;\n\t\tconst step = this.props.control.increment ? this.props.control.increment : 1;\n\n\t\treturn (\n\t\t\t<div className={classNames(\"properties-slider \", { \"hide\": hidden },\n\t\t\t\tthis.props.messageInfo ? this.props.messageInfo.type : null)} data-id={ControlUtils.getDataId(this.props.propertyId)}\n\t\t\t>\n\t\t\t\t<Slider\n\t\t\t\t\tvalue={this.props.value !== null && typeof this.props.value !== \"undefined\" ? this.props.value : minValue}\n\t\t\t\t\tmin={minValue}\n\t\t\t\t\tmax={maxValue}\n\t\t\t\t\tminLabel={minLabel}\n\t\t\t\t\tmaxLabel={maxLabel}\n\t\t\t\t\tstep={step}\n\t\t\t\t\tlabelText={this.props.controlItem}\n\t\t\t\t\tonChange={this.handleChange}\n\t\t\t\t\tdisabled={this.props.state === STATES.DISABLED}\n\t\t\t\t\tariaLabelInput={formatMessage(this.reactIntl, MESSAGE_KEYS.SLIDER_NUMBER_INPUT_LABEL)}\n\t\t\t\t\tformatLabel={\n\t\t\t\t\t\t(val, label) => label || val\n\t\t\t\t\t}\n\t\t\t\t\treadOnly={this.props.readOnly}\n\t\t\t\t/>\n\t\t\t\t<ValidationMessage state={this.props.state} messageInfo={this.props.messageInfo} inTable={this.props.tableControl} />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nSliderControl.propTypes = {\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrolItem: PropTypes.oneOfType([\n\t\tPropTypes.string,\n\t\tPropTypes.element\n\t]), // list control passes string\n\ttableControl: PropTypes.bool,\n\tstate: PropTypes.string, // pass in by redux\n\tvalue: PropTypes.number, // pass in by redux\n\tmessageInfo: PropTypes.object, // pass in by redux\n\treadOnly: PropTypes.bool\n};\n\n\nconst mapStateToProps = (state, ownProps) => ({\n\tvalue: ownProps.controller.getPropertyValue(ownProps.propertyId),\n\tstate: ownProps.controller.getControlState(ownProps.propertyId),\n\tvalueStates: ownProps.controller.getControlValueStates(ownProps.propertyId),\n\tmessageInfo: ownProps.controller.getErrorMessage(ownProps.propertyId),\n\tcontrolOpts: ownProps.controller.getFilteredEnumItems(ownProps.propertyId, ownProps.control)\n});\n\nexport default connect(mapStateToProps, null)(SliderControl);\n\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport classNames from \"classnames\";\nimport { STATES, CARBON_ICONS, MESSAGE_KEYS } from \"./../../constants/constants.js\";\nimport { ControlType, ActionType } from \"./../../constants/form-constants\";\nimport Tooltip from \"./../../../tooltip/tooltip.jsx\";\nimport { isEmpty, get } from \"lodash\";\nimport Icon from \"./../../../icons/icon.jsx\";\nimport ActionFactory from \"./../../actions/action-factory.js\";\nimport { formatMessage } from \"./../../util/property-utils\";\n\nclass ControlItem extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.actionFactory = new ActionFactory(this.props.controller);\n\t\tthis.showRequiredIndicator = props.controller ? get(props.controller.getPropertiesConfig(), \"showRequiredIndicator\", true) : true;\n\t}\n\n\trender() {\n\t\tif (this.props.control.controlType === ControlType.HIDDEN) {\n\t\t\treturn null;\n\t\t}\n\t\tconst hidden = this.props.state === STATES.HIDDEN;\n\t\tif (hidden) {\n\t\t\treturn null; // Do not render hidden controls\n\t\t}\n\t\tconst disabled = this.props.state === STATES.DISABLED;\n\n\t\tlet label;\n\t\tlet description;\n\t\tif (this.props.control.label && this.props.control.labelVisible !== false) {\n\t\t\tlet tooltip;\n\t\t\tif (this.props.control.description && !isEmpty(this.props.control.description.text)) {\n\t\t\t\tif (this.props.control.description.placement === \"on_panel\") {\n\t\t\t\t\tdescription = <div className=\"properties-control-description\">{this.props.control.description.text}</div>;\n\t\t\t\t// only show tooltip when control enabled and visible\n\t\t\t\t} else {\n\t\t\t\t\t// If tooltip has a link, add propertyId in the link object\n\t\t\t\t\tif (this.props.control.description.link) {\n\t\t\t\t\t\tthis.props.control.description.link.propertyId = this.props.propertyId;\n\t\t\t\t\t}\n\t\t\t\t\ttooltip = (<Tooltip\n\t\t\t\t\t\tid={`tooltip-label-${this.props.control.name}`}\n\t\t\t\t\t\ttip={this.props.control.description.text}\n\t\t\t\t\t\tlink={this.props.control.description.link ? this.props.control.description.link : null}\n\t\t\t\t\t\ttooltipLinkHandler={this.props.controller.getHandlers().tooltipLinkHandler}\n\t\t\t\t\t\tdirection=\"bottom\"\n\t\t\t\t\t\tdisable={hidden || disabled}\n\t\t\t\t\t\tshowToolTipOnClick\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon type={CARBON_ICONS.INFORMATION} className=\"properties-control-description-icon-info\" />\n\t\t\t\t\t</Tooltip>);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlet indicator;\n\t\t\tif (this.showRequiredIndicator && this.props.control.required) {\n\t\t\t\tindicator = (\n\t\t\t\t\t<span className=\"properties-indicator\" aria-disabled={disabled}>\n\t\t\t\t\t\t{formatMessage(this.props.controller.getReactIntl(), MESSAGE_KEYS.LABEL_INDICATOR_REQUIRED)}\n\t\t\t\t\t</span>\n\t\t\t\t);\n\t\t\t} else if (!this.showRequiredIndicator && !(\"required\" in this.props.control)) {\n\t\t\t\tindicator = (\n\t\t\t\t\t<span className=\"properties-indicator\" aria-disabled={disabled}>\n\t\t\t\t\t\t{formatMessage(this.props.controller.getReactIntl(), MESSAGE_KEYS.LABEL_INDICATOR_OPTIONAL)}\n\t\t\t\t\t</span>\n\t\t\t\t);\n\t\t\t}\n\t\t\tlabel = (\n\t\t\t\t<div className={classNames(\"properties-label-container\", { \"table-control\": this.props.tableControl === true })}>\n\t\t\t\t\t<label className=\"properties-control-label\" aria-disabled={disabled}>{this.props.control.label.text}</label>\n\t\t\t\t\t{indicator}\n\t\t\t\t\t{tooltip}\n\t\t\t\t</div>);\n\t\t} else {\n\t\t\t// Provide a label for controls with hidden labels to support accessibility\n\t\t\tlabel = (\n\t\t\t\t<div className={classNames(\"properties-label-container-hidden\")}>\n\t\t\t\t\t<label className=\"properties-control-label-hidden\">{this.props.control?.label?.text}</label>\n\t\t\t\t</div>);\n\t\t}\n\n\t\tconst action = this.actionFactory.generateAction(0, this.props.control.action);\n\n\t\tconst className = classNames(\n\t\t\t\"properties-control-item\",\n\t\t\t{ \"hide\": hidden },\n\t\t\t{ \"properties-ci-action-item image\": action && this.props.control.action.actionType === ActionType.IMAGE }\n\t\t);\n\n\t\t/*\n\t\t* <ControlItem /> should be called from every control.\n\t\t* Adding this temporary condition so that we can change one control at a time.\n\t\t* After all controls are updated, remove if condition and delete return statement after if condition\n\t\t*/\n\t\tif (this.props.accessibleControls.includes(this.props.control.controlType)) {\n\t\t\treturn (\n\t\t\t\t<div data-id={\"properties-ci-\" + this.props.control.name}\n\t\t\t\t\tclassName={className} disabled={disabled}\n\t\t\t\t>\n\t\t\t\t\t{label}\n\t\t\t\t\t{description}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\t\treturn (\n\t\t\t<div data-id={\"properties-ci-\" + this.props.control.name}\n\t\t\t\tclassName={className} disabled={disabled}\n\t\t\t>\n\t\t\t\t<div className=\"properties-ci-content-container\">\n\t\t\t\t\t{label}\n\t\t\t\t\t{description}\n\t\t\t\t\t{this.props.controlObj}\n\t\t\t\t</div>\n\t\t\t\t{action}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nControlItem.propTypes = {\n\tcontrol: PropTypes.object.isRequired,\n\tpropertyId: PropTypes.object.isRequired,\n\tcontroller: PropTypes.object.isRequired,\n\tcontrolObj: PropTypes.object,\n\taccessibleControls: PropTypes.array, // TODO: Remove this after all controls are accessible\n\ttableControl: PropTypes.bool,\n\tstate: PropTypes.string // passed by redux\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\tstate: ownProps.controller.getControlState(ownProps.propertyId)\n});\n\nexport default connect(mapStateToProps, null)(ControlItem);\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\n\nimport { Type, ControlType, EditStyle } from \"./../constants/form-constants\";\nimport { STATES, CONTAINER_TYPE } from \"./../constants/constants\";\nimport classNames from \"classnames\";\nimport { PropertyDef } from \"./../form/PropertyDef\";\nimport { makeControl } from \"./../form/EditorForm\";\nimport { L10nProvider } from \"./../util/L10nProvider\";\nimport * as ControlUtils from \"./../util/control-utils\";\nimport { Layer } from \"@carbon/react\";\n\nimport TextfieldControl from \"./textfield\";\nimport ReadonlyControl from \"./readonly\";\nimport ToggletextControl from \"./toggletext\";\nimport TextareaControl from \"./textarea\";\nimport ListControl from \"./list\";\nimport ExpressionControl from \"./expression\";\nimport PasswordControl from \"./passwordfield\";\nimport NumberfieldControl from \"./numberfield\";\nimport DatefieldControl from \"./datefield\";\nimport DatepickerControl from \"./datepicker\";\nimport DatepickerRangeControl from \"./datepicker-range\";\nimport TimefieldControl from \"./timefield\";\nimport CheckboxControl from \"./checkbox\";\nimport ToggleControl from \"./toggle\";\nimport CheckboxsetControl from \"./checkboxset\";\nimport RadiosetControl from \"./radioset\";\nimport Dropdown from \"./dropdown\";\nimport MultiSelectControl from \"./multiselect\";\nimport SomeofselectControl from \"./someofselect\";\nimport SelectColumnsControl from \"./selectcolumns\";\nimport StructureEditorControl from \"./structureeditor\";\nimport StructureTableControl from \"./structuretable\";\nimport StructurelisteditorControl from \"./structurelisteditor\";\nimport ReadonlyTableControl from \"./readonlytable\";\nimport Slider from \"./slider\";\n\nimport ControlItem from \"./../components/control-item\";\nimport ActionFactory from \"./../actions/action-factory.js\";\nimport { has, get, isUndefined } from \"lodash\";\n\n/*\n* <ControlItem /> should be called from every control.\n* After all controls are updated, delete accessibleControls array.\n*/\nconst accessibleControls = [\n\tControlType.CHECKBOXSET,\n\tControlType.CODE,\n\tControlType.DATEFIELD,\n\tControlType.DATEPICKER,\n\tControlType.DATEPICKERRANGE,\n\tControlType.EXPRESSION,\n\tControlType.HIDDEN,\n\tControlType.LIST,\n\tControlType.MULTISELECT,\n\tControlType.NUMBERFIELD,\n\tControlType.ONEOFSELECT,\n\tControlType.PASSWORDFIELD,\n\tControlType.READONLY,\n\tControlType.READONLYTABLE,\n\tControlType.SELECTCOLUMN,\n\tControlType.SELECTCOLUMNS,\n\tControlType.SELECTSCHEMA,\n\tControlType.SLIDER,\n\tControlType.SOMEOFSELECT,\n\tControlType.SPINNER,\n\tControlType.TEXTAREA,\n\tControlType.TEXTFIELD,\n\tControlType.TIMEFIELD,\n\tControlType.TIMESTAMP,\n\tControlType.TOGGLE,\n\tControlType.TOGGLETEXT\n];\n\nconst tableControls = [\n\tControlType.LIST,\n\tControlType.READONLYTABLE,\n\tControlType.SOMEOFSELECT,\n\tControlType.SELECTCOLUMNS,\n\tControlType.STRUCTURETABLE,\n\tControlType.STRUCTURELISTEDITOR\n];\n\nexport default class ControlFactory {\n\n\tconstructor(controller) {\n\t\tthis.rightFlyout = controller ? get(controller.getPropertiesConfig(), \"rightFlyout\", false) : false;\n\t\tthis.controller = controller;\n\t\tthis.actionFactory = new ActionFactory(this.controller);\n\t}\n\n\tsetFunctions(openFieldPicker, genUIItem) {\n\t\tthis.genUIItem = genUIItem;\n\t\tthis.openFieldPicker = openFieldPicker;\n\t}\n\n\tsetRightFlyout(rightFlyout) {\n\t\tthis.rightFlyout = rightFlyout;\n\t}\n\n\t/*\n\t* @param control\n\t* @param propertyId\n\t* @param tableInfo\n\t*/\n\tcreateControlItem(control, propertyId, tableInfo, readOnly = false) {\n\t\tconst controlObj = this.createControl(control, propertyId, tableInfo, readOnly);\n\t\tconst className = control.className ? control.className : \"\";\n\n\t\t/*\n\t\t* <ControlItem /> should be called from every control.\n\t\t* Adding this temporary condition so that we can change one control at a time.\n\t\t* After all controls are updated, remove if condition and delete return statement after if condition\n\t\t*/\n\t\tif (accessibleControls.includes(control.controlType)) {\n\t\t\treturn controlObj;\n\t\t}\n\t\t// When control-item displays other controls, add padding on control-item\n\t\t// Don't add \"hide\" class for subpanel properties because \"hide\" class isn't removed after a property becomes visible in the already opened subpanel\n\t\tconst hidden = this.controller.getControlState(propertyId) === STATES.HIDDEN && control.editStyle !== EditStyle.SUBPANEL;\n\t\treturn (\n\t\t\t<div key={\"properties-ctrl-\" + control.name} data-id={\"properties-ctrl-\" + control.name}\n\t\t\t\tclassName={classNames(\"properties-ctrl-wrapper\", { \"hide\": hidden }, className)}\n\t\t\t>\n\t\t\t\t<ControlItem\n\t\t\t\t\tkey={\"ctrl-item-\" + control.name}\n\t\t\t\t\tcontroller={this.controller}\n\t\t\t\t\tpropertyId={propertyId}\n\t\t\t\t\tcontrol={control}\n\t\t\t\t\tcontrolObj={controlObj}\n\t\t\t\t\taccessibleControls={accessibleControls}\n\t\t\t\t\ttableControl = {tableControls.includes(control.controlType)}\n\t\t\t\t/>\n\t\t\t</div>);\n\t}\n\n\t// Creates all controls that can be standalone or in tables\n\tcreateControl(control, propertyId, tableInfo, isReadOnly = false) {\n\t\tif (!control || !propertyId) {\n\t\t\treturn null;\n\t\t}\n\t\t// setup common properties used by all controls\n\t\tconst controlKey = ControlUtils.getDataId(propertyId);\n\t\t// Don't add \"hide\" class for subpanel properties because \"hide\" class isn't removed after a property becomes visible in the already opened subpanel\n\t\tconst hidden = this.controller.getControlState(propertyId) === STATES.HIDDEN && control.editStyle !== EditStyle.SUBPANEL;\n\t\tconst action = this.actionFactory.generateAction(0, control.action);\n\t\tconst props = {};\n\t\tprops.key = controlKey;\n\t\tprops.control = control;\n\t\tprops.controller = this.controller;\n\t\tprops.propertyId = propertyId;\n\t\tprops.readOnly = isReadOnly || control.readOnly;\n\t\tprops.controlItem = (\n\t\t\t<ControlItem\n\t\t\t\tkey={\"ctrl-item-\" + control.name}\n\t\t\t\tcontroller={this.controller}\n\t\t\t\tpropertyId={propertyId}\n\t\t\t\tcontrol={control}\n\t\t\t\taccessibleControls={accessibleControls}\n\t\t\t\ttableControl = {tableControls.includes(control.controlType)}\n\t\t\t/>\n\t\t);\n\t\tif (tableInfo) {\n\t\t\tprops.tableControl = tableInfo.table;\n\t\t}\n\t\tlet createdControl;\n\t\tswitch (control.controlType) {\n\t\tcase (ControlType.HIDDEN):\n\t\t\treturn null;\n\t\tcase (ControlType.TEXTFIELD):\n\t\t\tcreatedControl = (<TextfieldControl {...props} />);\n\t\t\tbreak;\n\t\tcase (ControlType.READONLY):\n\t\t\tcreatedControl = (<ReadonlyControl {...props} />);\n\t\t\tbreak;\n\t\tcase (ControlType.TIMESTAMP):\n\t\t\tcreatedControl = (<ReadonlyControl {...props} />);\n\t\t\tbreak;\n\t\tcase (ControlType.TEXTAREA):\n\t\t\tcreatedControl = (<TextareaControl {...props} />);\n\t\t\tbreak;\n\t\tcase (ControlType.TOGGLE):\n\t\t\tcreatedControl = (<ToggleControl {...props} />);\n\t\t\tbreak;\n\t\tcase (ControlType.LIST):\n\t\t\tcreatedControl = (<ListControl\n\t\t\t\t{...props}\n\t\t\t\trightFlyout={this.rightFlyout}\n\t\t\t/>);\n\t\t\tbreak;\n\t\tcase (ControlType.EXPRESSION):\n\t\t\tcreatedControl = (<ExpressionControl\n\t\t\t\t{...props}\n\t\t\t\trightFlyout={this.rightFlyout}\n\t\t\t/>);\n\t\t\tbreak;\n\t\tcase (ControlType.CODE):\n\t\t\tcreatedControl = (<ExpressionControl\n\t\t\t\t{...props}\n\t\t\t\tbuilder={false}\n\t\t\t\tvalidateLink={false}\n\t\t\t\trightFlyout={this.rightFlyout}\n\t\t\t/>);\n\t\t\tbreak;\n\t\tcase (ControlType.TOGGLETEXT):\n\t\t\tcreatedControl = (<ToggletextControl\n\t\t\t\t{...props}\n\t\t\t/>);\n\t\t\tbreak;\n\t\tcase (ControlType.PASSWORDFIELD):\n\t\t\tcreatedControl = (<PasswordControl {...props} />);\n\t\t\tbreak;\n\t\tcase (ControlType.NUMBERFIELD):\n\t\tcase (ControlType.SPINNER):\n\t\t\tcreatedControl = (<NumberfieldControl {...props} />);\n\t\t\tbreak;\n\t\tcase (ControlType.DATEFIELD):\n\t\t\tcreatedControl = (<DatefieldControl {...props} />);\n\t\t\tbreak;\n\t\tcase (ControlType.DATEPICKER):\n\t\t\tcreatedControl = (<DatepickerControl {...props} />);\n\t\t\tbreak;\n\t\tcase (ControlType.DATEPICKERRANGE):\n\t\t\tcreatedControl = (<DatepickerRangeControl {...props} />);\n\t\t\tbreak;\n\t\tcase (ControlType.TIMEFIELD):\n\t\t\tcreatedControl = (<TimefieldControl {...props} />);\n\t\t\tbreak;\n\t\tcase (ControlType.CHECKBOX):\n\t\t\tcreatedControl = (<CheckboxControl {...props} />);\n\t\t\tbreak;\n\t\tcase (ControlType.CHECKBOXSET):\n\t\t\tif (!tableInfo) {\n\t\t\t\tcreatedControl = (<CheckboxsetControl {...props} />);\n\t\t\t} else {\n\t\t\t\tcreatedControl = (<ReadonlyControl {...props} />);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase (ControlType.RADIOSET):\n\t\t\tcreatedControl = (<RadiosetControl {...props} />);\n\t\t\tbreak;\n\t\tcase (ControlType.ONEOFSELECT):\n\t\tcase (ControlType.SELECTSCHEMA):\n\t\t\tcreatedControl = (<Dropdown\n\t\t\t\t{...props}\n\t\t\t\trightFlyout={this.rightFlyout}\n\t\t\t/>);\n\t\t\tbreak;\n\t\tcase (ControlType.MULTISELECT):\n\t\t\tcreatedControl = (<MultiSelectControl {...props} />);\n\t\t\tbreak;\n\t\tcase (ControlType.SELECTCOLUMN):\n\t\t\tif (!tableInfo || (tableInfo && tableInfo.allowColumnControls)) {\n\t\t\t\tcreatedControl = (<Dropdown\n\t\t\t\t\t{...props}\n\t\t\t\t\trightFlyout={this.rightFlyout}\n\t\t\t\t/>);\n\t\t\t} else {\n\t\t\t\tcreatedControl = (<ReadonlyControl {...props} />);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase (ControlType.SOMEOFSELECT):\n\t\t\tif (!tableInfo) {\n\t\t\t\tcreatedControl = (<SomeofselectControl {...props} />);\n\t\t\t} else {\n\t\t\t\tcreatedControl = (<ReadonlyControl {...props} />);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase (ControlType.SELECTCOLUMNS):\n\t\t\tif (!tableInfo) {\n\t\t\t\tcreatedControl = (<SelectColumnsControl\n\t\t\t\t\t{...props}\n\t\t\t\t\topenFieldPicker={this.openFieldPicker}\n\t\t\t\t\trightFlyout={this.rightFlyout}\n\t\t\t\t/>);\n\t\t\t} else {\n\t\t\t\tcreatedControl = (<ReadonlyControl {...props} />);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase (ControlType.STRUCTURETABLE):\n\t\t\tif (!tableInfo) {\n\t\t\t\tcreatedControl = (<StructureTableControl\n\t\t\t\t\t{...props}\n\t\t\t\t\tbuildUIItem={this.genUIItem}\n\t\t\t\t\topenFieldPicker={this.openFieldPicker}\n\t\t\t\t\trightFlyout={this.rightFlyout}\n\t\t\t\t/>);\n\t\t\t} else {\n\t\t\t\tcreatedControl = (<ReadonlyControl {...props} />);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase (ControlType.STRUCTURELISTEDITOR):\n\t\t\tif (!tableInfo) {\n\t\t\t\tcreatedControl = (<StructurelisteditorControl\n\t\t\t\t\t{...props}\n\t\t\t\t\tbuildUIItem={this.genUIItem}\n\t\t\t\t\trightFlyout={this.rightFlyout}\n\t\t\t\t/>);\n\t\t\t} else {\n\t\t\t\tcreatedControl = (<ReadonlyControl {...props} />);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase (ControlType.READONLYTABLE):\n\t\t\tif (!tableInfo) {\n\t\t\t\tcreatedControl = (<ReadonlyTableControl\n\t\t\t\t\t{...props}\n\t\t\t\t\tbuildUIItem={this.genUIItem}\n\t\t\t\t\trightFlyout={this.rightFlyout}\n\t\t\t\t/>);\n\t\t\t} else {\n\t\t\t\tcreatedControl = (<ReadonlyControl {...props} />);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase (ControlType.CUSTOM):\n\t\t\tcreatedControl = (\n\t\t\t\t<div className=\"properties-custom-ctrl\" key={controlKey}>\n\t\t\t\t\t{this.controller.getCustomControl(propertyId, control, tableInfo)}\n\t\t\t\t</div>\n\t\t\t);\n\t\t\tbreak;\n\t\tcase (ControlType.STRUCTUREEDITOR):\n\t\t\tcreatedControl = (<StructureEditorControl\n\t\t\t\t{...props}\n\t\t\t\tbuildUIItem={this.genUIItem}\n\t\t\t\topenFieldPicker={this.openFieldPicker}\n\t\t\t\trightFlyout={this.rightFlyout}\n\t\t\t/>);\n\t\t\tbreak;\n\t\tcase (ControlType.SLIDER):\n\t\t\tcreatedControl = (<Slider {...props} />);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tcreatedControl = (<ReadonlyControl {...props} />);\n\t\t}\n\n\t\tconst createdControlLayered = (\n\t\t\t<Layer level={this.controller.getLight() && control.light ? 1 : 0} className=\"properties-control-layer\">\n\t\t\t\t{createdControl}\n\t\t\t</Layer>\n\t\t);\n\n\t\t/*\n\t\t* <ControlItem /> should be called from every control.\n\t\t* Adding this temporary condition so that we can change one control at a time.\n\t\t* After all controls are updated, remove if condition and delete return statement after if condition\n\t\t*/\n\t\t// When other controls display control-item for a11y, add padding on controls\n\t\tif (accessibleControls.includes(control.controlType)) {\n\t\t\tif (tableInfo) {\n\t\t\t\t// Don't add padding when controls are displayed in a table\n\t\t\t\treturn createdControl;\n\t\t\t}\n\t\t\tconst className = control.className ? control.className : \"\";\n\t\t\t// Add \"action\" class for \"image\" and \"custom\" actions\n\t\t\treturn (\n\t\t\t\t<div key={\"properties-ctrl-\" + control.name} data-id={\"properties-ctrl-\" + control.name}\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\"properties-ctrl-wrapper\",\n\t\t\t\t\t\t{ \"hide\": hidden, \"action\": has(control, \"action.image.placement\") || !isUndefined(control?.action?.customActionId) },\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{createdControlLayered}\n\t\t\t\t\t{action}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\t\treturn createdControlLayered;\n\t}\n\n\t/**\n\t* Used to create a control from a passed in paramDef.\n\t* Allows users to user a standard control in a custom control/panel\n\t* @param paramDef - see parameter-def schema\n\t* @param parameter - name of the parameter to pull from paramDef\n\t* @param light - if this control is light themed\n\t* @param containerType - the type of container common properties is rendering in\n\t* @return control object (form schema) used to create standard react controls\n\t*/\n\tcreateFormControl(paramDef, parameter, light = true, containerType = CONTAINER_TYPE.CUSTOM) {\n\t\tif (!paramDef) {\n\t\t\treturn null;\n\t\t}\n\t\tconst propDef = PropertyDef.makePropertyDef(null, paramDef.parameters, paramDef.complex_types, paramDef.uihints);\n\t\tif (propDef && propDef.parameterMetadata) {\n\t\t\tconst l10nProvider = new L10nProvider(paramDef.resources);\n\t\t\tconst prop = propDef.parameterMetadata.getParameter(parameter);\n\t\t\tlet structureDef;\n\t\t\tif (prop.propType() === Type.STRUCTURE && propDef.structureMetadata) {\n\t\t\t\tstructureDef = propDef.structureMetadata.getStructure(prop.baseType());\n\t\t\t}\n\t\t\tconst additionalInfo = {\n\t\t\t\tlight: light,\n\t\t\t\tcontainerType: containerType\n\t\t\t};\n\t\t\tconst control = makeControl(propDef.parameterMetadata, parameter, null, structureDef, l10nProvider, null, null, null, additionalInfo);\n\t\t\treturn control;\n\t\t}\n\t\treturn null;\n\t}\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport logger from \"./../../../../utils/logger\";\nimport { toType } from \"./../../util/property-utils.js\";\n\nfunction op() {\n\treturn \"cellNotEmpty\";\n}\n\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tconst supportedControls = [\"structuretable\", \"structureeditor\", \"structurelisteditor\"];\n\tif (supportedControls.indexOf(paramInfo.control.controlType) >= 0) {\n\t\tconst type = toType(paramInfo.value);\n\t\treturn type !== \"undefined\" && type !== \"null\" && String(paramInfo.value).length > 0;\n\t}\n\tlogger.warn(\"Ignoring unsupported condition operation 'cellNotEmpty' for control type \" + paramInfo.control.controlType);\n\treturn true;\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport logger from \"./../../../../utils/logger\";\nimport { fieldValueMatchesProto } from \"./../../util/property-utils\";\nimport { isEqual } from \"lodash\";\nimport { ParamRole } from \"./../../constants/form-constants\";\n\nfunction op() {\n\treturn \"colNotExists\";\n}\n\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tconst supportedControls = [\"textfield\"];\n\tif (supportedControls.indexOf(paramInfo.control.controlType) >= 0) {\n\t\tconst dataModelFields = controller.getDatasetMetadataFields();\n\t\tif (!dataModelFields) {\n\t\t\treturn true;\n\t\t}\n\t\tlet columnExists = true;\n\t\t// check if there are any matching values in dataModel\n\t\tfor (const field of dataModelFields) {\n\t\t\tif (fieldValueMatchesProto(paramInfo.value, field)) {\n\t\t\t\tcolumnExists = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// check other columns in row and allow value to be same as `paramInfo` value. Allows consumers to rename a field without showing an error.\n\t\tif (!columnExists) {\n\t\t\tconst fieldColumnValues = _findFieldColumnValues(paramInfo, controller);\n\t\t\tfor (const columnValue of fieldColumnValues) {\n\t\t\t\tif (isEqual(paramInfo.value, columnValue)) {\n\t\t\t\t\tcolumnExists = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn columnExists;\n\t}\n\tlogger.warn(\"Ignoring unsupported condition operation 'colNotExists' for control type \" + paramInfo.control.controlType);\n\treturn true;\n}\n\n/*\n* Finds all values in the same row as paramInfo and returns any with the role=column.\n* An empty array is returned if not a table control.\n*/\nfunction _findFieldColumnValues(paramInfo, controller) {\n\tconst fieldColumnValues = [];\n\t// If a cell value, check to see if any other columns have role=column\n\tif (typeof paramInfo.control.columnIndex !== \"undefined\") {\n\t\tconst rowValue = controller.getPropertyValue({ name: paramInfo.id.name, row: paramInfo.id.row });\n\t\tif (Array.isArray(rowValue)) {\n\t\t\trowValue.forEach((value, idx) => {\n\t\t\t\tif (idx !== paramInfo.control.columnIndex) { // skip paramInfo value\n\t\t\t\t\tconst colControl = controller.getControl({ name: paramInfo.id.name, col: idx });\n\t\t\t\t\tif (colControl.role === ParamRole.COLUMN) {\n\t\t\t\t\t\tfieldColumnValues.push(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\treturn fieldColumnValues;\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport logger from \"./../../../../utils/logger\";\nimport { fieldValueMatchesProto } from \"./../../util/property-utils.js\";\nimport { isEmpty } from \"lodash\";\n\nfunction op() {\n\treturn \"colDoesExists\";\n}\n\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tconst dataModelFields = controller.getDatasetMetadataFields();\n\tif (!dataModelFields) {\n\t\treturn false;\n\t}\n\n\tconst controlType = paramInfo.control.controlType;\n\tswitch (controlType) {\n\tcase \"selectcolumns\":\n\tcase \"selectcolumn\": {\n\t\tif (Array.isArray(paramInfo.value) && typeof paramInfo.control.editStyle !== \"undefined\") { // Control is inside a table.\n\t\t\tif (paramInfo.value.length > 0) {\n\t\t\t\tlet allValid = true;\n\t\t\t\tparamInfo.value.forEach((paramValue) => {\n\t\t\t\t\tallValid = allValid && typeof valueInDataset(dataModelFields, paramValue) !== \"undefined\";\n\t\t\t\t});\n\t\t\t\treturn allValid;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn typeof valueInDataset(dataModelFields, paramInfo.value) !== \"undefined\";\n\t}\n\tdefault:\n\t\tlogger.warn(\"Ignoring unsupported condition operation 'colDoesExists' for control type \" + controlType);\n\t\treturn true;\n\t}\n}\n\n// Return the field if found in dataset, else undefined\nfunction valueInDataset(dataset, field) {\n\t// Don't validate empty, null or undefined value\n\treturn (\n\t\t(typeof field === \"undefined\" || field === null || isEmpty(field))\n\t\t\t? true\n\t\t\t: dataset.find(function(dataModelField) {\n\t\t\t\treturn fieldValueMatchesProto(field, dataModelField);\n\t\t\t})\n\t);\n}\n\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport logger from \"./../../../../utils/logger\";\nimport { includes } from \"lodash\";\n\nfunction op() {\n\treturn \"contains\";\n}\n\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tconst unsupportedControls = [\"checkbox\", \"numberfield\", \"passwordfield\", \"datepicker\", \"datepickerRange\"];\n\tif (unsupportedControls.indexOf(paramInfo.control.controlType) < 0) {\n\t\tconst dataType = typeof paramInfo.value;\n\t\tif (typeof param2Info !== \"undefined\") {\n\t\t\tswitch (dataType) {\n\t\t\tcase \"undefined\":\n\t\t\t\treturn false;\n\t\t\tcase \"string\":\n\t\t\tcase \"object\":\n\t\t\t\treturn includes(paramInfo.value, param2Info.value);\n\t\t\tdefault:\n\t\t\t\tlogger.warn(\"Ignoring condition operation 'contains' for parameter_ref \" + paramInfo.param + \" with input data type \" + dataType);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else if (typeof value !== \"undefined\") {\n\t\t\tswitch (dataType) {\n\t\t\tcase \"undefined\":\n\t\t\t\treturn false;\n\t\t\tcase \"string\":\n\t\t\tcase \"object\":\n\t\t\t\treturn includes(paramInfo.value, value);\n\t\t\tdefault:\n\t\t\t\tlogger.warn(\"Ignoring condition operation 'contains' for parameter_ref \" + paramInfo.param + \" with input data type \" + dataType);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tthrow new Error(\"Insufficient parameter for condition operation contains\");\n\t}\n\tlogger.warn(\"Ignoring unsupported condition operation 'contains' for control type \" + paramInfo.control.controlType);\n\treturn true;\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport logger from \"./../../../../utils/logger\";\n\nfunction op() {\n\treturn \"equals\";\n}\n\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tif (paramInfo.control.controlType !== \"passwordfield\") {\n\t\tconst dataType = typeof paramInfo.value;\n\t\tif (param2Info) {\n\t\t\tif (paramInfo.value === null || param2Info.value === null) {\n\t\t\t\treturn paramInfo.value === param2Info.value;\n\t\t\t}\n\t\t\tswitch (dataType) {\n\t\t\tcase \"undefined\":\n\t\t\tcase \"boolean\":\n\t\t\tcase \"number\":\n\t\t\t\treturn paramInfo.value === param2Info.value;\n\t\t\tcase \"string\":\n\t\t\t\treturn paramInfo.value.trim() === param2Info.value.trim();\n\t\t\tcase \"object\":\n\t\t\t\treturn JSON.stringify(paramInfo.value) === JSON.stringify(param2Info.value);\n\t\t\tdefault:\n\t\t\t\tlogger.warn(\"Ignoring condition operation 'equals' for parameter_ref \" + paramInfo.param + \" with input data type \" + dataType);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else if (typeof value !== \"undefined\") {\n\t\t\tif (paramInfo.value === null || value === null) {\n\t\t\t\treturn paramInfo.value === value;\n\t\t\t}\n\t\t\tswitch (dataType) {\n\t\t\tcase \"undefined\":\n\t\t\tcase \"boolean\":\n\t\t\tcase \"number\":\n\t\t\t\treturn paramInfo.value === value;\n\t\t\tcase \"string\":\n\t\t\t\treturn paramInfo.value.trim() === value.toString().trim();\n\t\t\tcase \"object\":\n\t\t\t\treturn JSON.stringify(paramInfo.value) === JSON.stringify(value);\n\t\t\tdefault:\n\t\t\t\tlogger.warn(\"Ignoring condition operation 'equals' for parameter_ref \" + paramInfo.param + \" with input data type \" + dataType);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tthrow new Error(\"Insufficient parameter for condition operation equals\");\n\t}\n\tlogger.warn(\"Ignoring unsupported condition operation 'equals' for control type \" + paramInfo.control.controlType);\n\treturn true;\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ControlType } from \"../../constants/form-constants\";\nimport logger from \"./../../../../utils/logger\";\n\nfunction op() {\n\treturn \"greaterThan\";\n}\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tconst dataType = typeof paramInfo.value;\n\tswitch (dataType) {\n\tcase \"undefined\":\n\tcase \"number\":\n\t\tif (typeof param2Info !== \"undefined\") {\n\t\t\tif (typeof param2Info.value !== \"number\") {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn paramInfo.value > param2Info.value;\n\t\t} else if (typeof value !== \"undefined\") {\n\t\t\tif (value === null) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn paramInfo.value > value;\n\t\t}\n\t\tthrow new Error(\"Insufficient parameter for condition operation 'greaterThan'\");\n\tcase \"object\":\n\t\tif (paramInfo.value === null || param2Info.value === null || value === null) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\tcase \"string\": {\n\t\tif (paramInfo.control && paramInfo.control.controlType === ControlType.DATEPICKER) {\n\t\t\tconst param1Date = new Date(paramInfo.value);\n\t\t\tif (!isNaN(param1Date) && param2Info) {\n\t\t\t\tconst param2Date = new Date(param2Info.value);\n\t\t\t\tif (!isNaN(param2Date)) {\n\t\t\t\t\treturn param1Date.getTime() > param2Date.getTime();\n\t\t\t\t}\n\t\t\t\tthrow new Error(\"Insufficient parameter for condition operation 'greaterThan'\");\n\t\t\t} else if (!isNaN(param1Date) && value) {\n\t\t\t\tconst valueDate = new Date(value);\n\t\t\t\tif (!isNaN(valueDate)) {\n\t\t\t\t\treturn param1Date.getTime() > valueDate.getTime();\n\t\t\t\t}\n\t\t\t\tthrow new Error(\"Insufficient parameter for condition operation 'greaterThan'\");\n\t\t\t}\n\t\t\tthrow new Error(\"Insufficient parameter for condition operation 'greaterThan'\");\n\t\t}\n\t\treturn true;\n\t}\n\tdefault:\n\t\tlogger.warn(\"Ignoring condition operation 'greaterThan' for parameter_ref \" + paramInfo.param + \" with input data type \" + dataType);\n\t\treturn true;\n\t}\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ControlType } from \"../../constants/form-constants\";\nimport logger from \"./../../../../utils/logger\";\n\nfunction op() {\n\treturn \"isEmpty\";\n}\n\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tconst propertiesConfig = controller.getPropertiesConfig();\n\tconst dataType = typeof paramInfo.value;\n\tswitch (dataType) {\n\tcase \"undefined\":\n\t\treturn true;\n\tcase \"boolean\":\n\t\treturn false;\n\tcase \"string\":\n\t\treturn propertiesConfig.trimSpaces ? paramInfo.value.trim().length === 0 : paramInfo.value.length === 0;\n\tcase \"number\":\n\t\treturn paramInfo.value === null;\n\tcase \"object\":\n\t\tif (paramInfo.control && paramInfo.control.controlType === ControlType.DATEPICKERRANGE) {\n\t\t\tconst startDate = paramInfo.value[0].trim();\n\t\t\tconst endDate = paramInfo.value[1].trim();\n\t\t\treturn startDate === \"\" && endDate === \"\"; // DATEPICKERRANGE is empty if both start and end dates are empty\n\t\t}\n\t\treturn paramInfo.value === null ? true : paramInfo.value.length === 0;\n\tdefault:\n\t\tlogger.warn(\"Ignoring condition operation 'isEmpty' for parameter_ref \" + paramInfo.param + \" with input data type \" + dataType);\n\t\treturn true;\n\t}\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ControlType } from \"../../constants/form-constants\";\nimport logger from \"./../../../../utils/logger\";\n\nfunction op() {\n\treturn \"isNotEmpty\";\n}\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tconst propertiesConfig = controller.getPropertiesConfig();\n\tconst dataType = typeof paramInfo.value;\n\tswitch (dataType) {\n\tcase \"undefined\":\n\t\treturn false;\n\tcase \"boolean\":\n\t\treturn true;\n\tcase \"string\":\n\t\treturn propertiesConfig.trimSpaces ? paramInfo.value.trim().length !== 0 : paramInfo.value.length !== 0;\n\tcase \"number\":\n\t\treturn paramInfo.value !== null;\n\tcase \"object\":\n\t\tif (paramInfo.control && paramInfo.control.controlType === ControlType.DATEPICKERRANGE) {\n\t\t\treturn paramInfo.value[0].trim() !== \"\" || paramInfo.value[1].trim() !== \"\";\n\t\t}\n\t\treturn paramInfo.value === null ? false : paramInfo.value.length !== 0;\n\tdefault:\n\t\tlogger.warn(\"Ignoring condition operation 'isNotEmpty' for parameter_ref \" + paramInfo.param + \" with input data type \" + dataType);\n\t\treturn true;\n\t}\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ControlType } from \"../../constants/form-constants\";\nimport logger from \"./../../../../utils/logger\";\n\nfunction op() {\n\treturn \"lessThan\";\n}\n\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tconst dataType = typeof paramInfo.value;\n\tswitch (dataType) {\n\tcase \"undefined\":\n\tcase \"number\":\n\t\tif (typeof param2Info !== \"undefined\") {\n\t\t\tif (typeof param2Info.value !== \"number\") {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn paramInfo.value < param2Info.value;\n\t\t} else if (typeof value !== \"undefined\") {\n\t\t\tif (value === null) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn paramInfo.value < value;\n\t\t}\n\t\tthrow new Error(\"Insufficient parameter for condition operation 'lessThan'\");\n\tcase \"object\":\n\t\tif (paramInfo.value === null || param2Info.value === null || value === null) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\tcase \"string\": {\n\t\tif (paramInfo.control && paramInfo.control.controlType === ControlType.DATEPICKER) {\n\t\t\tconst param1Date = new Date(paramInfo.value);\n\t\t\tif (!isNaN(param1Date) && param2Info) {\n\t\t\t\tconst param2Date = new Date(param2Info.value);\n\t\t\t\tif (!isNaN(param2Date)) {\n\t\t\t\t\treturn param1Date.getTime() < param2Date.getTime();\n\t\t\t\t}\n\t\t\t\tthrow new Error(\"Insufficient parameter for condition operation 'lessThan'\");\n\t\t\t} else if (!isNaN(param1Date) && value) {\n\t\t\t\tconst valueDate = new Date(value);\n\t\t\t\tif (!isNaN(valueDate)) {\n\t\t\t\t\treturn param1Date.getTime() < valueDate.getTime();\n\t\t\t\t}\n\t\t\t\tthrow new Error(\"Insufficient parameter for condition operation 'lessThan'\");\n\t\t\t}\n\t\t\tthrow new Error(\"Insufficient parameter for condition operation 'lessThan'\");\n\t\t}\n\t\treturn true;\n\t}\n\tdefault:\n\t\tlogger.warn(\"Ignoring condition operation 'lessThan' for parameter_ref \" + paramInfo.param + \" with input data type \" + dataType);\n\t\treturn true;\n\t}\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport logger from \"./../../../../utils/logger\";\n\nfunction op() {\n\treturn \"matches\";\n}\n\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tconst dataType = typeof paramInfo.value;\n\tvar regExp = \"\";\n\tif (typeof param2Info !== \"undefined\" && param2Info !== null) {\n\t\tregExp = param2Info.value;\n\t} else if (typeof value !== \"undefined\" && value !== null) {\n\t\tregExp = value;\n\t} else {\n\t\tlogger.warn(\"Ignoring condition operation 'matches' for parameter_ref \" + paramInfo.param + \" no regular expression specified in condition.\");\n\t\treturn true;\n\t}\n\tif (dataType === \"string\" || dataType === \"undefined\") {\n\t\t// the added regexp before and after the value strips out whitespace or positions at the start and end of the string.\n\t\tconst regex = new RegExp(regExp);\n\t\treturn regex.test(paramInfo.value);\n\t}\n\tlogger.warn(\"Ignoring condition operation 'matches' for parameter_ref \" + paramInfo.param + \" with input data type \" + dataType);\n\treturn true;\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport logger from \"./../../../../utils/logger\";\nimport { includes } from \"lodash\";\n\nfunction op() {\n\treturn \"notContains\";\n}\n\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tconst unsupportedControls = [\"checkbox\", \"numberfield\", \"passwordfield\", \"datepicker\", \"datepickerRange\"];\n\tif (unsupportedControls.indexOf(paramInfo.control.controlType) < 0) {\n\t\tconst dataType = typeof paramInfo.value;\n\t\tif (typeof param2Info !== \"undefined\") {\n\t\t\tswitch (dataType) {\n\t\t\tcase \"undefined\":\n\t\t\t\treturn true;\n\t\t\tcase \"string\":\n\t\t\tcase \"object\":\n\t\t\t\treturn !includes(paramInfo.value, param2Info.value);\n\t\t\tdefault:\n\t\t\t\tlogger.warn(\"Ignoring condition operation 'notContains' for parameter_ref \" + paramInfo.param + \" with input data type \" + dataType);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else if (typeof value !== \"undefined\") {\n\t\t\tswitch (dataType) {\n\t\t\tcase \"undefined\":\n\t\t\t\treturn true;\n\t\t\tcase \"string\":\n\t\t\tcase \"object\":\n\t\t\t\treturn !includes(paramInfo.value, value);\n\t\t\tdefault:\n\t\t\t\tlogger.warn(\"Ignoring condition operation 'notContains' for parameter_ref \" + paramInfo.param + \" with input data type \" + dataType);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tthrow new Error(\"Insufficient parameter for condition operation notContains\");\n\t}\n\tlogger.warn(\"Ignoring unsupported condition operation 'notContains' for control type \" + paramInfo.control.controlType);\n\treturn true;\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport logger from \"./../../../../utils/logger\";\n\nfunction op() {\n\treturn \"notEquals\";\n}\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tif (paramInfo.control.controlType !== \"passwordfield\") {\n\t\tconst dataType = typeof paramInfo.value;\n\t\tif (param2Info) {\n\t\t\tif (paramInfo.value === null || param2Info.value === null) {\n\t\t\t\treturn paramInfo.value !== param2Info.value;\n\t\t\t}\n\t\t\tswitch (dataType) {\n\t\t\tcase \"undefined\":\n\t\t\tcase \"boolean\":\n\t\t\tcase \"number\":\n\t\t\t\treturn paramInfo.value !== param2Info.value;\n\t\t\tcase \"string\":\n\t\t\t\treturn paramInfo.value.trim() !== param2Info.value.trim();\n\t\t\tcase \"object\":\n\t\t\t\treturn JSON.stringify(paramInfo.value) !== JSON.stringify(param2Info.value);\n\t\t\tdefault:\n\t\t\t\tlogger.warn(\"Ignoring condition operation 'notEquals' for parameter_ref \" + paramInfo.param + \" with input data type \" + dataType);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else if (typeof value !== \"undefined\") {\n\t\t\tif (paramInfo.value === null || value === null) {\n\t\t\t\treturn paramInfo.value !== value;\n\t\t\t}\n\t\t\tswitch (dataType) {\n\t\t\tcase \"undefined\":\n\t\t\tcase \"boolean\":\n\t\t\tcase \"number\":\n\t\t\t\treturn paramInfo.value !== value;\n\t\t\tcase \"string\":\n\t\t\t\treturn paramInfo.value.trim() !== value.trim();\n\t\t\tcase \"object\":\n\t\t\t\treturn JSON.stringify(paramInfo.value) !== JSON.stringify(value);\n\t\t\tdefault:\n\t\t\t\tlogger.warn(\"Ignoring condition operation 'notEquals' for parameter_ref \" + paramInfo.param + \" with input data type \" + dataType);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tthrow new Error(\"Insufficient parameter for condition operation notEquals\");\n\t}\n\tlogger.warn(\"Ignoring unsupported condition operation 'notEquals' for control type \" + paramInfo.control.controlType);\n\treturn true;\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport logger from \"./../../../../utils/logger\";\n\nfunction op() {\n\treturn \"notMatches\";\n}\n\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tconst dataType = typeof paramInfo.value;\n\tvar regExp = \"\";\n\tif (typeof param2Info !== \"undefined\" && param2Info !== null) {\n\t\tregExp = param2Info.value;\n\t} else if (typeof value !== \"undefined\" && value !== null) {\n\t\tregExp = value;\n\t} else {\n\t\tlogger.warn(\"Ignoring condition operation 'notMatches' for parameter_ref \" + paramInfo.param + \" no regular expression specified in condition.\");\n\t\treturn true;\n\t}\n\tif (dataType === \"string\" || dataType === \"undefined\") {\n\t\t// the added regexp before and after the value strips out whitespace or positions at the start and end of the string.\n\t\tconst regex = new RegExp(regExp);\n\t\treturn !regex.test(paramInfo.value);\n\t}\n\tlogger.warn(\"Ignoring condition operation 'notMatches' for parameter_ref \" + paramInfo.param + \" with input data type \" + dataType);\n\treturn true;\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { isValid, parse } from \"date-fns\";\nimport { DEFAULT_DATE_FORMAT } from \"../../constants/constants\";\nimport { ControlType } from \"../../constants/form-constants\";\n\nfunction op() {\n\treturn \"isDateTime\";\n}\n\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tif (paramInfo.value) { // only check if there is a value.\n\t\tif (paramInfo.control && paramInfo.control.controlType !== ControlType.DATEPICKER && paramInfo.control.controlType !== ControlType.DATEPICKERRANGE) {\n\t\t\t// always use iso format for time\n\t\t\tconst timeDateFormat = (value === \"time\") ? \"HH:mm:ss:xxx\" : DEFAULT_DATE_FORMAT;\n\t\t\tconst date = parse(paramInfo.value, timeDateFormat, new Date());\n\t\t\treturn isValid(date);\n\t\t}\n\t\treturn true;\n\t}\n\treturn true;\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport logger from \"./../../../../utils/logger\";\nimport { getMetadataFieldMatch } from \"./../conditions-utils.js\";\nfunction op() {\n\treturn \"dmTypeEquals\";\n}\n\n\n/**\n * Find the metadata for the given field and return if it matches the given data type\n * @param {Object} paramInfo first entry in the globals row, and the name of the desired field is a string attribute\n * @param {Object} paramInfo2 alternate parameter for the target data type. Use value instead if possible.\n * @param {Object} value the target data type we are comparing the field to\n * @param {Object} controller properties controller\n */\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tif (paramInfo.control.role !== \"column\") {\n\t\tlogger.warn(\"Condition Operator dmTypeEquals only intended for use on columns\");\n\t}\n\tconst metadata = controller.getDatasetMetadataFields();\n\tvar target = null;\n\tif (param2Info !== null && typeof param2Info !== \"undefined\" && param2Info.value !== null) {\n\t\tif (param2Info.control.role === \"column\") {\n\t\t\ttarget = getMetadataFieldMatch(param2Info, metadata, \"type\");\n\t\t}\n\t\tif (target === null) {\n\t\t\ttarget = param2Info.value;\n\t\t}\n\t} else if (value !== null && typeof value !== \"undefined\") {\n\t\ttarget = value;\n\t} else {\n\t\treturn false;\n\t}\n\tif (!metadata) {\n\t\treturn false;\n\t}\n\tif (typeof paramInfo.value === \"string\" || typeof paramInfo.value === \"object\") {\n\t\tvar fieldType = getMetadataFieldMatch(paramInfo, metadata, \"type\");\n\t\treturn fieldType === target;\n\t} else if (typeof paramInfo.value !== \"undefined\") {\n\t\tlogger.warn(\"dmTypeEquals cannot handle the given type: \" + typeof paramInfo.value);\n\t}\n\treturn false;\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport logger from \"./../../../../utils/logger\";\nimport { getMetadataFieldMatch } from \"./../conditions-utils.js\";\n\nfunction op() {\n\treturn \"dmTypeNotEquals\";\n}\n\n\n/**\n * Find the metadata for the given field and return if it matches the given data type\n * @param {Object} paramInfo first entry in the globals row, and the name of the desired field is a string attribute\n * @param {Object} paramInfo2 alternate parameter for the target data type. Use value instead if possible.\n * @param {Object} value the target data type we are comparing the field to\n * @param {Object} controller properties controller\n */\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tif (paramInfo.control.role !== \"column\") {\n\t\tlogger.warn(\"Condition Operator dmTypeNotEquals only intended for use on columns\");\n\t}\n\tconst metadata = controller.getDatasetMetadataFields();\n\tvar target = null;\n\tif (param2Info !== null && typeof param2Info !== \"undefined\" && param2Info.value !== null) {\n\t\tif (param2Info.control.role === \"column\") {\n\t\t\ttarget = getMetadataFieldMatch(param2Info, metadata, \"type\");\n\t\t}\n\t\tif (target === null) {\n\t\t\ttarget = param2Info.value;\n\t\t}\n\t} else if (value !== null && typeof value !== \"undefined\") {\n\t\ttarget = value;\n\t} else {\n\t\treturn false;\n\t}\n\tif (!metadata) {\n\t\treturn false;\n\t}\n\tif (typeof paramInfo.value === \"string\" || typeof paramInfo.value === \"object\") {\n\t\tvar fieldType = getMetadataFieldMatch(paramInfo, metadata, \"type\");\n\t\treturn fieldType !== target;\n\t} else if (typeof paramInfo.value !== \"undefined\") {\n\t\tlogger.warn(\"dmTypeNotEquals cannot handle the given type: \" + typeof paramInfo.value);\n\t}\n\treturn false;\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport logger from \"./../../../../utils/logger\";\nimport { getMetadataFieldMatch } from \"./../conditions-utils.js\";\n\nfunction op() {\n\treturn \"dmMeasurementEquals\";\n}\n\n\n/**\n * Find the metadata for the given field and return if it matches the given data measurement\n * @param {Object} paramInfo first entry in the globals row, and the name of the desired field is a string attribute\n * @param {Object} paramInfo2 alternate parameter for the target data measurement. Use value instead if possible.\n * @param {Object} value the target measurement type we are comparing the field to\n * @param {Object} controller properties controller\n */\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tif (paramInfo.control.role !== \"column\") {\n\t\tlogger.warn(\"Condition Operator dmMeasurementEquals only intended for use on columns\");\n\t}\n\tconst metadata = controller.getDatasetMetadataFields();\n\tvar target = null;\n\tif (param2Info !== null && typeof param2Info !== \"undefined\" && param2Info.value !== null) {\n\t\tif (param2Info.control.role === \"column\") {\n\t\t\ttarget = getMetadataFieldMatch(param2Info, metadata, \"measure\");\n\t\t}\n\t\tif (target === null) {\n\t\t\ttarget = param2Info.value;\n\t\t}\n\t} else if (value !== null && typeof value !== \"undefined\") {\n\t\ttarget = value;\n\t} else {\n\t\treturn false;\n\t}\n\tif (!metadata) {\n\t\treturn false;\n\t}\n\tif (typeof paramInfo.value === \"string\" || typeof paramInfo.value === \"object\") {\n\t\tvar fieldRole = getMetadataFieldMatch(paramInfo, metadata, \"measure\");\n\t\treturn fieldRole === target;\n\t} else if (typeof paramInfo.value !== \"undefined\") {\n\t\tlogger.warn(\"dmMeasurementEquals cannot handle the given type: \" + typeof paramInfo.value);\n\t}\n\treturn false;\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport logger from \"./../../../../utils/logger\";\nimport { getMetadataFieldMatch } from \"./../conditions-utils.js\";\n\nfunction op() {\n\treturn \"dmMeasurementNotEquals\";\n}\n\n\n/**\n * Find the metadata for the given field and return if it matches the given data type\n * @param {Object} paramInfo first entry in the globals row, and the name of the desired field is a string attribute\n * @param {Object} paramInfo2 alternate parameter for the target data type. Use value instead if possible.\n * @param {Object} value the target data type we are comparing the field to\n * @param {Object} controller properties controller\n */\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tif (paramInfo.control.role !== \"column\") {\n\t\tlogger.warn(\"Condition Operator dmMeasurementNotEquals only intended for use on columns\");\n\t}\n\tconst metadata = controller.getDatasetMetadataFields();\n\tvar target = null;\n\tif (param2Info !== null && typeof param2Info !== \"undefined\" && param2Info.value !== null) {\n\t\tif (param2Info.control.role === \"column\") {\n\t\t\ttarget = getMetadataFieldMatch(param2Info, metadata, \"measure\");\n\t\t}\n\t\tif (target === null) {\n\t\t\ttarget = param2Info.value;\n\t\t}\n\t} else if (value !== null && typeof value !== \"undefined\") {\n\t\ttarget = value;\n\t} else {\n\t\treturn false;\n\t}\n\tif (!metadata) {\n\t\treturn false;\n\t}\n\tif (typeof paramInfo.value === \"string\" || typeof paramInfo.value === \"object\") {\n\t\tvar fieldRole = getMetadataFieldMatch(paramInfo, metadata, \"measure\");\n\t\treturn fieldRole !== target;\n\t} else if (typeof paramInfo.value !== \"undefined\") {\n\t\tlogger.warn(\"dmMeasurementNotEquals cannot handle the given type: \" + typeof paramInfo.value);\n\t}\n\treturn false;\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport logger from \"./../../../../utils/logger\";\nimport { getMetadataFieldMatch } from \"./../conditions-utils.js\";\n\nfunction op() {\n\treturn \"dmRoleEquals\";\n}\n\n\n/**\n * Find the metadata for the given field and return if it matches the given data role\n * @param {Object} paramInfo first entry in the globals row, and the name of the desired field is a string attribute\n * @param {Object} paramInfo2 alternate parameter for the target data role. Use value instead if possible.\n * @param {Object} value the target role type we are comparing the field to\n * @param {Object} controller properties controller\n */\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tif (paramInfo.control.role !== \"column\") {\n\t\tlogger.warn(\"Condition Operator dmRoleEquals only intended for use on columns\");\n\t}\n\tconst metadata = controller.getDatasetMetadataFields();\n\tvar target = null;\n\tif (param2Info !== null && typeof param2Info !== \"undefined\" && param2Info.value !== null) {\n\t\tif (param2Info.control.role === \"column\") {\n\t\t\ttarget = getMetadataFieldMatch(param2Info, metadata, \"modeling_role\");\n\t\t}\n\t\tif (target === null) {\n\t\t\ttarget = param2Info.value;\n\t\t}\n\t} else if (value !== null && typeof value !== \"undefined\") {\n\t\ttarget = value;\n\t} else {\n\t\treturn false;\n\t}\n\tif (!metadata) {\n\t\treturn false;\n\t}\n\tif (typeof paramInfo.value === \"string\" || typeof paramInfo.value === \"object\") {\n\t\tvar fieldRole = getMetadataFieldMatch(paramInfo, metadata, \"modeling_role\");\n\t\treturn fieldRole === target;\n\n\t} else if (typeof paramInfo.value !== \"undefined\") {\n\t\tlogger.warn(\"dmRoleEquals cannot handle the given type: \" + typeof paramInfo.value);\n\t}\n\treturn false;\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport logger from \"./../../../../utils/logger\";\nimport { getMetadataFieldMatch } from \"./../conditions-utils.js\";\n\nfunction op() {\n\treturn \"dmRoleNotEquals\";\n}\n\n\n/**\n * Find the metadata for the given field and return if it matches the given data role\n * @param {Object} paramInfo first entry in the globals row, and the name of the desired field is a string attribute\n * @param {Object} paramInfo2 alternate parameter for the target data role. Use value instead if possible.\n * @param {Object} value the target role type we are comparing the field to\n * @param {Object} controller properties controller\n */\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tif (paramInfo.control.role !== \"column\") {\n\t\tlogger.warn(\"Condition Operator dmRoleEquals only intended for use on columns\");\n\t}\n\tconst metadata = controller.getDatasetMetadataFields();\n\tvar target = null;\n\tif (param2Info !== null && typeof param2Info !== \"undefined\" && param2Info.value !== null) {\n\t\tif (param2Info.control.role === \"column\") {\n\t\t\ttarget = getMetadataFieldMatch(param2Info, metadata, \"modeling_role\");\n\t\t}\n\t\tif (target === null) {\n\t\t\ttarget = param2Info.value;\n\t\t}\n\t} else if (value !== null && typeof value !== \"undefined\") {\n\t\ttarget = value;\n\t} else {\n\t\treturn false;\n\t}\n\tif (!metadata) {\n\t\treturn false;\n\t}\n\tif (typeof paramInfo.value === \"string\" || typeof paramInfo.value === \"object\") {\n\t\tvar fieldRole = getMetadataFieldMatch(paramInfo, metadata, \"modeling_role\");\n\t\treturn fieldRole !== target;\n\t} else if (typeof paramInfo.value !== \"undefined\") {\n\t\tlogger.warn(\"dmRoleEquals cannot handle the given type: \" + typeof paramInfo.value);\n\t}\n\treturn false;\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport logger from \"./../../../../utils/logger\";\n\nfunction op() {\n\treturn \"lengthEquals\";\n}\n\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tlet compareValue = value;\n\tlet valueLength;\n\tif (param2Info) {\n\t\tcompareValue = param2Info.value;\n\t}\n\tif (typeof paramInfo.value === \"string\" || Array.isArray(paramInfo.value)) {\n\t\tvalueLength = paramInfo.value.length;\n\t} else if (typeof paramInfo.value === \"undefined\" || paramInfo.value === null) {\n\t\tvalueLength = 0;\n\t}\n\tif (typeof compareValue === \"number\" && typeof valueLength === \"number\") {\n\t\treturn valueLength === compareValue;\n\t}\n\tlogger.warn(\"Ignoring condition operation 'lengthEquals' for parameter_ref \" + paramInfo.param);\n\treturn true;\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport logger from \"./../../../../utils/logger\";\n\nfunction op() {\n\treturn \"lengthLessThan\";\n}\n\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tlet compareValue = value;\n\tlet valueLength;\n\tif (param2Info) {\n\t\tcompareValue = param2Info.value;\n\t}\n\tif (typeof paramInfo.value === \"string\" || Array.isArray(paramInfo.value)) {\n\t\tvalueLength = paramInfo.value.length;\n\t} else if (typeof paramInfo.value === \"undefined\" || paramInfo.value === null) {\n\t\tvalueLength = 0;\n\t}\n\tif (typeof compareValue === \"number\" && typeof valueLength === \"number\") {\n\t\treturn valueLength < compareValue;\n\t}\n\tlogger.warn(\"Ignoring condition operation 'lengthLessThan' for parameter_ref \" + paramInfo.param);\n\treturn true;\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport logger from \"./../../../../utils/logger\";\n\nfunction op() {\n\treturn \"lengthGreaterThan\";\n}\n\nfunction evaluate(paramInfo, param2Info, value, controller) {\n\tlet compareValue = value;\n\tlet valueLength;\n\tif (param2Info) {\n\t\tcompareValue = param2Info.value;\n\t}\n\tif (typeof paramInfo.value === \"string\" || Array.isArray(paramInfo.value)) {\n\t\tvalueLength = paramInfo.value.length;\n\t} else if (typeof paramInfo.value === \"undefined\" || paramInfo.value === null) {\n\t\tvalueLength = 0;\n\t}\n\tif (typeof compareValue === \"number\" && typeof valueLength === \"number\") {\n\t\treturn valueLength > compareValue;\n\t}\n\tlogger.warn(\"Ignoring condition operation 'lengthGreaterThan' for parameter_ref \" + paramInfo.param);\n\treturn true;\n}\n\n// Public Methods ------------------------------------------------------------->\n\nexport { op, evaluate };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport logger from \"./../../../../utils/logger\";\n\nimport * as cellNotEmpty from \"./cellNotEmpty\";\nimport * as colNotExists from \"./colNotExists\";\nimport * as colDoesExists from \"./colDoesExists\";\nimport * as contains from \"./contains\";\nimport * as equals from \"./equals\";\nimport * as greaterThan from \"./greaterThan\";\nimport * as isEmpty from \"./isEmpty\";\nimport * as isNotEmpty from \"./isNotEmpty\";\nimport * as lessThan from \"./lessThan\";\nimport * as matches from \"./matches\";\nimport * as notContains from \"./notContains\";\nimport * as notEquals from \"./notEquals\";\nimport * as notMatches from \"./notMatches\";\nimport * as isDateTime from \"./isDateTime\";\nimport * as dmTypeEquals from \"./dmTypeEquals\";\nimport * as dmTypeNotEquals from \"./dmTypeNotEquals\";\nimport * as dmMeasurementEquals from \"./dmMeasurementEquals\";\nimport * as dmMeasurementNotEquals from \"./dmMeasurementNotEquals\";\nimport * as dmRoleEquals from \"./dmRoleEquals\";\nimport * as dmRoleNotEquals from \"./dmRoleNotEquals\";\nimport * as lengthEquals from \"./lengthEquals\";\nimport * as lengthLessThan from \"./lengthLessThan\";\nimport * as lengthGreaterThan from \"./lengthGreaterThan\";\n\n\n/**\n* @param customOps - Array of custom operators to be added to standard operators\n*/\nfunction getConditionOps(customOps) {\n\tconst ops = {};\n\tops[cellNotEmpty.op()] = cellNotEmpty.evaluate;\n\tops[colNotExists.op()] = colNotExists.evaluate;\n\tops[colDoesExists.op()] = colDoesExists.evaluate;\n\tops[contains.op()] = contains.evaluate;\n\tops[equals.op()] = equals.evaluate;\n\tops[greaterThan.op()] = greaterThan.evaluate;\n\tops[isEmpty.op()] = isEmpty.evaluate;\n\tops[isNotEmpty.op()] = isNotEmpty.evaluate;\n\tops[lessThan.op()] = lessThan.evaluate;\n\tops[matches.op()] = matches.evaluate;\n\tops[notContains.op()] = notContains.evaluate;\n\tops[notEquals.op()] = notEquals.evaluate;\n\tops[notMatches.op()] = notMatches.evaluate;\n\tops[isDateTime.op()] = isDateTime.evaluate;\n\tops[dmTypeEquals.op()] = dmTypeEquals.evaluate;\n\tops[dmTypeNotEquals.op()] = dmTypeNotEquals.evaluate;\n\tops[dmMeasurementEquals.op()] = dmMeasurementEquals.evaluate;\n\tops[dmMeasurementNotEquals.op()] = dmMeasurementNotEquals.evaluate;\n\tops[dmRoleEquals.op()] = dmRoleEquals.evaluate;\n\tops[dmRoleNotEquals.op()] = dmRoleNotEquals.evaluate;\n\tops[lengthEquals.op()] = lengthEquals.evaluate;\n\tops[lengthLessThan.op()] = lengthLessThan.evaluate;\n\tops[lengthGreaterThan.op()] = lengthGreaterThan.evaluate;\n\n\n\tif (Array.isArray(customOps)) {\n\t\tfor (const custOp of customOps) {\n\t\t\tif (custOp && typeof custOp.op === \"function\" && typeof custOp.evaluate === \"function\") {\n\t\t\t\tops[custOp.op()] = custOp.evaluate;\n\t\t\t} else {\n\t\t\t\tlogger.warn(\"Custom operator missing require function of `op` or `evaluate`\");\n\t\t\t}\n\t\t}\n\t}\n\treturn ops;\n}\n\nexport { getConditionOps };\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* eslint max-depth: [\"error\", 7]*/\n\nimport PropertiesStore from \"./properties-store.js\";\nimport logger from \"../../utils/logger\";\nimport * as UiConditionsParser from \"./ui-conditions/ui-conditions-parser.js\";\nimport setExpressionInfo from \"./controls/expression/expressionInfo-parser.js\";\n\nimport { parseUiContent } from \"./ui-conditions/ui-groups-parser.js\";\nimport * as conditionsUtil from \"./ui-conditions/conditions-utils\";\nimport * as PropertyUtils from \"./util/property-utils.js\";\n\nimport { STATES, ACTIONS, CONDITION_TYPE, PANEL_TREE_ROOT, CONDITION_MESSAGE_TYPE, UPDATE_TYPE } from \"./constants/constants.js\";\nimport CommandStack from \"../command-stack/command-stack.js\";\nimport ControlFactory from \"./controls/control-factory\";\nimport { Type, ParamRole, ControlType, ItemType } from \"./constants/form-constants\";\nimport { has, cloneDeep, assign, isEmpty, isEqual, isUndefined, get, difference, merge } from \"lodash\";\nimport Form from \"./form/Form\";\nimport { getConditionOps } from \"./ui-conditions/condition-ops/condition-ops\";\nimport { DEFAULT_LOCALE } from \"./constants/constants\";\nexport default class PropertiesController {\n\n\tconstructor() {\n\t\tthis.propertiesStore = new PropertiesStore();\n\t\tthis.handlers = {\n\t\t\tpropertyListener: null,\n\t\t\tcontrollerHandler: null,\n\t\t\tactionHandler: null,\n\t\t\tcustomHeaderHandler: null,\n\t\t\tbuttonHandler: null,\n\t\t\tbuttonIconHandler: null,\n\t\t\ttitleChangeHandler: null,\n\t\t\ttooltipLinkHandler: null,\n\t\t\tpropertyIconHandler: null,\n\t\t\tfilterItemsHandler: null,\n\t\t\tpanelTitleHandler: null\n\t\t};\n\t\tthis.propertiesConfig = {};\n\t\tthis.visibleDefinitions = {};\n\t\tthis.enabledDefinitions = {};\n\t\tthis.validationDefinitions = {};\n\t\tthis.requiredDefinitionsIds = [];\n\t\tthis.filterDefinitions = {};\n\t\tthis.filteredEnumDefinitions = {};\n\t\tthis.allowChangeDefinitions = {};\n\t\tthis.conditionalDefaultDefinitions = {};\n\t\tthis.panelTree = {};\n\t\tthis.prevControls = {};\n\t\tthis.controls = {};\n\t\tthis.actions = {};\n\t\tthis.customControls = [];\n\t\tthis.customActions = [];\n\t\tthis.summaryPanelControls = {};\n\t\tthis.controllerHandlerCalled = false;\n\t\tthis.commandStack = new CommandStack();\n\t\tthis.custPropSumPanelValues = {};\n\t\tthis.controlFactory = new ControlFactory(this);\n\t\tthis.sharedCtrlInfo = [];\n\t\tthis.isSummaryPanel = false;\n\t\tthis.visibleSubPanelCounter = 0;\n\t\tthis.conditionOps = getConditionOps();\n\t\tthis.expressionFunctionInfo = {};\n\t\tthis.expressionRecentlyUsed = [];\n\t\tthis.expressionFieldsRecentlyUsed = [];\n\t\tthis.selectionListeners = {};\n\t}\n\n\tgetStore() {\n\t\treturn this.propertiesStore.getStore();\n\t}\n\n\tsubscribe(callback) {\n\t\tthis.propertiesStore.subscribe(callback);\n\t}\n\n\tgetHandlers() {\n\t\treturn this.handlers;\n\t}\n\n\tsetHandlers(inHandlers) {\n\t\tthis.handlers = Object.assign(this.handlers, inHandlers);\n\t\tif (this.handlers.controllerHandler && !this.controllerHandlerCalled) {\n\t\t\tthis.handlers.controllerHandler(this); // one time call to return controller\n\t\t\t// probably isn't needed but seems like it can cause infinite loops\n\t\t\tthis.controllerHandlerCalled = true;\n\t\t}\n\t}\n\n\tsetCommandStack(commandStack) {\n\t\tthis.commandStack = commandStack;\n\t}\n\n\tgetCommandStack() {\n\t\treturn this.commandStack;\n\t}\n\n\tsetEditorSize(editorSize) {\n\t\tthis.editorSize = editorSize;\n\t}\n\n\tgetEditorSize() {\n\t\treturn this.editorSize;\n\t}\n\n\tsetLight(light) {\n\t\tthis.light = light;\n\t}\n\n\tgetLight() {\n\t\treturn this.light;\n\t}\n\n\tsetPropertiesConfig(config) {\n\t\tthis.propertiesConfig = config;\n\t}\n\n\tgetPropertiesConfig() {\n\t\treturn this.propertiesConfig;\n\t}\n\n\tgetLocale() {\n\t\treturn get(this.propertiesConfig, \"locale\", DEFAULT_LOCALE);\n\t}\n\n\t// Return the id of top-level active tab or accordion\n\tgetTopLevelActiveGroupId() {\n\t\treturn this.propertiesStore.getActiveTab();\n\t}\n\n\t// Set the top-level active tab using tabId\n\tsetTopLevelActiveGroupId(tabId) {\n\t\tthis.propertiesStore.setActiveTab(tabId);\n\t}\n\n\tisTearsheetContainer() {\n\t\treturn this.propertiesConfig.containerType === \"Tearsheet\";\n\t}\n\n\tsetParamDef(paramDef) {\n\t\tconst containerType = get(this.getPropertiesConfig(), \"containerType\");\n\t\tconst convertTypes = get(this.getPropertiesConfig(), \"convertTypes\");\n\t\tconst formData = Form.makeForm(paramDef, containerType, convertTypes);\n\t\tthis.setForm(formData);\n\t}\n\n\t//\n\t// Form and parsing Methods\n\t//\n\tsetForm(form, intl, sameParameterDefRendered) {\n\t\tthis.form = form;\n\t\t// console.log(JSON.stringify(form, null, 2));\n\t\tthis.reactIntl = intl;\n\t\t// set initial property values\n\t\tif (this.form) {\n\t\t\tthis.prevControls = this.controls;\n\t\t\tthis.controls = {};\n\t\t\tthis.setControlStates({}); // clear state\n\t\t\tthis.setErrorMessages({}); // clear messages\n\t\t\tthis.isSummaryPanel = false; // when new form is set, summary panel is gone\n\t\t\tthis.visibleSubPanelCounter = 0;\n\t\t\tthis._parseUiConditions();\n\t\t\t// should be done before running any validations\n\t\t\tconst controls = [];\n\t\t\tUiConditionsParser.parseControls(controls, this.actions, this.form); // parse form uiItems\n\t\t\tUiConditionsParser.parseControls(null, this.actions, { uiItems: this.form.titleUiItems }); // parse title_info uiItems\n\t\t\tthis.saveControls(controls); // saves controls without the subcontrols\n\t\t\tthis._parseSummaryControls(controls);\n\t\t\tthis.parsePanelTree();\n\t\t\tconditionsUtil.injectDefaultValidations(this.controls, this.validationDefinitions, this.requiredDefinitionsIds, intl);\n\t\t\tlet datasetMetadata;\n\t\t\tlet propertyValues = {};\n\t\t\tif (this.form.data) {\n\t\t\t\tdatasetMetadata = this.form.data.datasetMetadata;\n\t\t\t\tpropertyValues = this.form.data.uiCurrentParameters ? assign({}, this.form.data.currentParameters, this.form.data.uiCurrentParameters)\n\t\t\t\t\t: this.form.data.currentParameters;\n\t\t\t}\n\t\t\t// Set the opening dataset(s), during which multiples are flattened and compound names generated if necessary\n\t\t\tthis.setDatasetMetadata(datasetMetadata);\n\t\t\tthis.setPropertyValues(propertyValues, { isInitProps: true }); // needs to be after setDatasetMetadata to run conditions\n\t\t\tthis.differentProperties = [];\n\t\t\tif (sameParameterDefRendered) {\n\t\t\t\t// When a parameterDef is dynamically updated, set difference between old and new controls\n\t\t\t\tthis.differentProperties = difference(Object.keys(this.controls), Object.keys(this.prevControls));\n\t\t\t}\n\t\t\t// for control.type of structuretable that do not use FieldPicker, we need to add to\n\t\t\t// the controlValue any missing data model fields. We need to do it here so that\n\t\t\t// validate can run against the added fields\n\t\t\tthis._addToControlValues(sameParameterDefRendered);\n\t\t\t// we need to take another pass through to resolve any default values that are parameterRefs.\n\t\t\t// we need to do it here because the parameter that is referenced in the parameterRef may need to have a\n\t\t\t// default value set in the above loop.\n\t\t\tthis._addToControlValues(sameParameterDefRendered, true);\n\n\t\t\t// set initial values for addRemoveRows, tableButtons in redux\n\t\t\tthis.setInitialAddRemoveRows();\n\t\t\tthis.setInitialTableButtonState();\n\n\t\t\tthis.uiItems = this.form.uiItems; // set last so properties dialog doesn't render too early\n\t\t\t// set initial tab to first tab\n\t\t\tif (!isEmpty(this.uiItems) && !isEmpty(this.uiItems[0].tabs)) {\n\t\t\t\t// active tab is the first non-tearsheet\n\t\t\t\tconst filteredTearsheets = this.uiItems[0].tabs.filter((tab) => tab.content.itemType !== ItemType.TEARSHEET);\n\t\t\t\tif (filteredTearsheets.length) {\n\t\t\t\t\tthis.propertiesStore.setActiveTab(filteredTearsheets[0].group);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// set title\n\t\t\tthis.setTitle(this.form.label);\n\t\t}\n\t}\n\n\tgetForm() {\n\t\treturn this.form;\n\t}\n\n\tgetResource(key, defaultValue) {\n\t\tif (this.form && this.form.resources) {\n\t\t\treturn this.form.resources[key] ? this.form.resources[key] : defaultValue;\n\t\t}\n\t\treturn defaultValue;\n\t}\n\n\tsetAppData(appData) {\n\t\tthis.appData = appData;\n\t}\n\n\tgetAppData() {\n\t\treturn this.appData;\n\t}\n\n\t_parseUiConditions() {\n\t\tthis.visibleDefinitions = { controls: {}, refs: {} };\n\t\tthis.enabledDefinitions = { controls: {}, refs: {} };\n\t\tthis.validationDefinitions = { controls: {}, refs: {} };\n\t\tthis.filterDefinitions = { controls: {}, refs: {} };\n\t\tthis.filteredEnumDefinitions = { controls: {}, refs: {} };\n\t\tthis.allowChangeDefinitions = { controls: {}, refs: {} };\n\t\tthis.conditionalDefaultDefinitions = { controls: {}, refs: {} };\n\n\t\tif (this.form.conditions) {\n\t\t\tfor (const condition of this.form.conditions) {\n\t\t\t\tif (condition.visible) {\n\t\t\t\t\tUiConditionsParser.parseConditions(this.visibleDefinitions, condition, CONDITION_TYPE.VISIBLE);\n\t\t\t\t} else if (condition.enabled) {\n\t\t\t\t\tUiConditionsParser.parseConditions(this.enabledDefinitions, condition, CONDITION_TYPE.ENABLED);\n\t\t\t\t} else if (condition.validation) {\n\t\t\t\t\tUiConditionsParser.parseConditions(this.validationDefinitions, condition, CONDITION_TYPE.VALIDATION);\n\t\t\t\t} else if (condition.filter) {\n\t\t\t\t\tUiConditionsParser.parseConditions(this.filterDefinitions, condition, CONDITION_TYPE.FILTER);\n\t\t\t\t} else if (condition.enum_filter) {\n\t\t\t\t\tUiConditionsParser.parseConditions(this.filteredEnumDefinitions, condition, CONDITION_TYPE.FILTEREDENUM);\n\t\t\t\t} else if (condition.allow_change) {\n\t\t\t\t\tUiConditionsParser.parseConditions(this.allowChangeDefinitions, condition, CONDITION_TYPE.ALLOWCHANGE);\n\t\t\t\t} else if (condition.default_value) {\n\t\t\t\t\tUiConditionsParser.parseConditions(this.conditionalDefaultDefinitions, condition, CONDITION_TYPE.CONDITIONALDEFAULT);\n\t\t\t\t} else { // invalid\n\t\t\t\t\tlogger.info(\"Invalid definition: \" + JSON.stringify(condition));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t* This function will get all definitions of the input definition type (visible, enabled,\n\t* filteredEnum and validation) and the definition index (controls, refs) that are\n\t* referenced by the propertyId. The definition types visible and enabled have two indices.\n\t* Controls indices are all definitions that have the propertyId as an operand in the evaluate.\n\t* Refs are all definitions that have the propertyId as something that is set as a result of the evaluate.\n\t*/\n\tgetDefinitions(propertyId, dfnType, dfnIndex) {\n\t\tlet conditionDefinitions;\n\t\tswitch (dfnType) {\n\t\tcase CONDITION_TYPE.VISIBLE:\n\t\t\tconditionDefinitions = this.visibleDefinitions[dfnIndex];\n\t\t\tbreak;\n\t\tcase CONDITION_TYPE.ENABLED:\n\t\t\tconditionDefinitions = this.enabledDefinitions[dfnIndex];\n\t\t\tbreak;\n\t\tcase CONDITION_TYPE.FILTEREDENUM:\n\t\t\tconditionDefinitions = this.filteredEnumDefinitions[dfnIndex];\n\t\t\tbreak;\n\t\tcase CONDITION_TYPE.ALLOWCHANGE:\n\t\t\tconditionDefinitions = this.allowChangeDefinitions[dfnIndex];\n\t\t\tbreak;\n\t\tcase CONDITION_TYPE.CONDITIONALDEFAULT:\n\t\t\tconditionDefinitions = this.conditionalDefaultDefinitions[dfnIndex];\n\t\t\tbreak;\n\t\tcase CONDITION_TYPE.VALIDATION:\n\t\t\tconditionDefinitions = this.validationDefinitions[dfnIndex];\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t\t// only return definitions that reference the propertyId\n\t\tlet retCond = [];\n\t\tfor (const conditionKey in conditionDefinitions) {\n\t\t\tif (!has(conditionDefinitions, conditionKey)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// the definition may have a column indicator, build a propertyID\n\t\t\t// with the the name and col set from the definition ref.\n\t\t\tconst baseId = conditionsUtil.getParamRefPropertyId(conditionKey);\n\t\t\t// baseId.col and propertyId.col can be undefined\n\t\t\tif (baseId.name === propertyId.name && baseId.col === propertyId.col) {\n\t\t\t\tretCond = retCond.concat(conditionDefinitions[conditionKey]);\n\t\t\t}\n\t\t}\n\t\treturn retCond;\n\t}\n\n\tgetRequiredDefinitionIds() {\n\t\treturn this.requiredDefinitionsIds;\n\t}\n\n\t/*\n\t* Used to convert a propertyId to a propertyId that always has a row.\n\t* Used in complex types that aren't tables and don't have rows. Returns original\n\t* propertyId or a propertyId where col is converted to row. Used in messages and property values since they\n\t* are stored name -> row -> col\n\t* @param propertyId\n\t* @return propertyId\n\t*/\n\tconvertPropertyId(propertyId) {\n\t\t// used for backward compatibility when a controlName is passed in\n\t\tif (typeof propertyId === \"string\") {\n\t\t\treturn {\n\t\t\t\tname: propertyId\n\t\t\t};\n\t\t}\n\t\t// used for complex types that aren't tables\n\t\treturn this.convertNestedPropertyId(propertyId);\n\t}\n\n\tconvertNestedPropertyId(propertyId) {\n\t\tif (propertyId && typeof propertyId.col !== \"undefined\" && typeof propertyId.row === \"undefined\") {\n\n\t\t\tlet childPropertyId;\n\t\t\tif (typeof propertyId.propertyId !== \"undefined\") {\n\t\t\t\tchildPropertyId = this.convertNestedPropertyId(propertyId.propertyId);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tname: propertyId.name,\n\t\t\t\trow: propertyId.col,\n\t\t\t\tpropertyId: childPropertyId\n\t\t\t};\n\t\t} else if (propertyId &&\n\t\t\ttypeof propertyId.col !== \"undefined\" &&\n\t\t\ttypeof propertyId.row !== \"undefined\" &&\n\t\t\ttypeof propertyId.propertyId !== \"undefined\") { // handle nested complex types that aren't tables\n\t\t\treturn {\n\t\t\t\tname: propertyId.name,\n\t\t\t\trow: propertyId.row,\n\t\t\t\tcol: propertyId.col,\n\t\t\t\tpropertyId: this.convertNestedPropertyId(propertyId.propertyId)\n\t\t\t};\n\t\t}\n\t\treturn propertyId;\n\t}\n\n\t// Given the parent's \"propertyId\", find the \"propertyId\" of the last child\n\t// and update the \"row\" and \"col\" properties defined in \"childProperties\"\n\tupdateLastChildPropertyId(propertyId, childProperties) {\n\t\tif (typeof propertyId.propertyId !== \"undefined\") {\n\t\t\treturn this.updateLastChildPropertyId(propertyId.propertyId, childProperties);\n\t\t}\n\t\tif (typeof childProperties.row !== \"undefined\") {\n\t\t\tpropertyId.row = childProperties.row;\n\t\t}\n\t\tif (typeof childProperties.col !== \"undefined\") {\n\t\t\tpropertyId.col = childProperties.col;\n\t\t}\n\t\treturn propertyId;\n\t}\n\n\t// Given the parent's \"propertyId\", set the \"childPropertyId\" as the last child of \"propertyId\"\n\t// The \"childPropertyId\" is a control of a nested structure\n\tsetChildPropertyId(propertyId, childPropertyId) {\n\t\tif (typeof propertyId.propertyId !== \"undefined\") {\n\t\t\treturn this.setChildPropertyId(propertyId.propertyId, childPropertyId);\n\t\t}\n\t\tpropertyId.propertyId = childPropertyId;\n\t\treturn propertyId;\n\t}\n\n\t// This function will traverse the form and build a tree representation of panels.\n\t// Each panel entry will have an array of children controls and children panels.\n\tparsePanelTree() {\n\t\tthis.panelTree = {};\n\t\tthis.panelTree[PANEL_TREE_ROOT] = { controls: [], panels: [], actions: [] };\n\t\tparseUiContent(this.panelTree, this.form, PANEL_TREE_ROOT);\n\t}\n\n\t_addToControlValues(sameParameterDefRendered, resolveParameterRefs, setDefaults) {\n\t\tconst defaultControlValues = {};\n\t\tfor (const keyName in this.controls) {\n\t\t\tif (!has(this.controls, keyName)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst control = this.controls[keyName];\n\t\t\tconst propertyId = { name: control.name };\n\t\t\tlet controlValue;\n\t\t\tif (setDefaults?.values) {\n\t\t\t\tcontrolValue = setDefaults.values[control.name];\n\t\t\t} else {\n\t\t\t\tcontrolValue = this.getPropertyValue(propertyId);\n\t\t\t}\n\n\t\t\tif (resolveParameterRefs) {\n\t\t\t\tif (typeof controlValue !== \"undefined\" && controlValue !== null && typeof controlValue.parameterRef !== \"undefined\") {\n\t\t\t\t\tcontrolValue = this.getPropertyValue({ name: controlValue.parameterRef });\n\t\t\t\t\tthis.updatePropertyValue(propertyId, controlValue, true, UPDATE_TYPE.INITIAL_LOAD);\n\t\t\t\t}\n\t\t\t} else if (control.controlType === \"structuretable\" && control.addRemoveRows === false && control.includeAllFields === true) {\n\t\t\t\tcontrolValue = this._populateFieldData(controlValue, control);\n\t\t\t\tthis.updatePropertyValue(propertyId, controlValue, true, UPDATE_TYPE.INITIAL_LOAD);\n\t\t\t} else if (typeof control.valueDef !== \"undefined\" && typeof control.valueDef.defaultValue !== \"undefined\" &&\n\t\t\t\t(typeof controlValue === \"undefined\")) {\n\t\t\t\tcontrolValue = control.valueDef.defaultValue;\n\n\t\t\t\t// convert values of type:object to the internal format array values\n\t\t\t\tif (PropertyUtils.isSubControlStructureObjectType(control)) {\n\t\t\t\t\tcontrolValue = PropertyUtils.convertObjectStructureToArray(control.valueDef.isList, control.subControls, controlValue);\n\t\t\t\t}\n\n\t\t\t\tif (setDefaults?.setDefaultValues) {\n\t\t\t\t\t// When setDefaultValues is set, update all default values in a single call\n\t\t\t\t\tdefaultControlValues[control.name] = controlValue;\n\t\t\t\t} else if (sameParameterDefRendered && !this.differentProperties.includes(control.name)) {\n\t\t\t\t\t// When parameterDef is dynamically updated, don't set INITIAL_LOAD on pre-existing properties\n\t\t\t\t\tthis.updatePropertyValue(propertyId, controlValue, true);\n\t\t\t\t} else {\n\t\t\t\t\tthis.updatePropertyValue(propertyId, controlValue, true, UPDATE_TYPE.INITIAL_LOAD);\n\t\t\t\t}\n\t\t\t} else if (control.controlType === \"structureeditor\") {\n\t\t\t\tif (!controlValue || (Array.isArray(controlValue) && controlValue.length === 0)) {\n\t\t\t\t\tif (Array.isArray(control.defaultRow)) {\n\t\t\t\t\t\tthis.updatePropertyValue(propertyId, control.defaultRow, true, UPDATE_TYPE.INITIAL_LOAD);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (setDefaults?.setDefaultValues) {\n\t\t\treturn defaultControlValues;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t_populateFieldData(controlValue, control) {\n\t\tconst fields = this.getDatasetMetadataFields();\n\t\tconst multiSchema = this._isMultiSchemaControl(control);\n\t\t// Start with the values stored in current_parameters\n\t\tconst rowData = [].concat(controlValue);\n\t\t// Add in any rows containing fields not present in the current parameters\n\t\tfor (let i = 0; i < fields.length; i++) {\n\t\t\tconst row = [];\n\t\t\tconst fieldIndex = this._indexOfField(fields[i].name, controlValue);\n\t\t\tif (fieldIndex === -1) {\n\t\t\t\tfor (let k = 0; k < control.subControls.length; k++) {\n\t\t\t\t\tif (k === control.keyIndex) {\n\t\t\t\t\t\tconst fieldValue = multiSchema ? { link_ref: fields[i].schema, field_name: fields[i].origName } : fields[i].name;\n\t\t\t\t\t\trow.push(fieldValue);\n\t\t\t\t\t} else {\n\t\t\t\t\t\trow.push(this._getDefaultSubControlValue(k, fields[i].name, fields, control));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trowData.push(row);\n\t\t\t}\n\t\t}\n\t\treturn rowData;\n\t}\n\n\t/**\n\t * Determines if the given control supports multiple input schemas.\n\t *\n\t * @param control A control structure\n\t * @return True if the control supports multiple input schemas\n\t */\n\t_isMultiSchemaControl(control) {\n\t\tif (control.role === ParamRole.COLUMN && control.valueDef.propType === Type.STRUCTURE) {\n\t\t\treturn true;\n\t\t}\n\t\tif (PropertyUtils.toType(control.subControls) === \"array\") {\n\t\t\tfor (const keyName in control.subControls) {\n\t\t\t\tif (has(control.subControls, keyName)) {\n\t\t\t\t\tconst subControl = control.subControls[keyName];\n\t\t\t\t\tif (subControl.role === ParamRole.COLUMN && subControl.valueDef.propType === Type.STRUCTURE) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Determines if the current form can accept multiple input schemas.\n\t *\n\t * @return True if multiple input datasets are supported in this node\n\t */\n\t_canHaveMultipleSchemas() {\n\t\tfor (const keyName in this.controls) {\n\t\t\tif (has(this.controls, keyName)) {\n\t\t\t\tconst control = this.controls[keyName];\n\t\t\t\tif (this._isMultiSchemaControl(control)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\t_getDefaultSubControlValue(col, fieldName, fields, control) {\n\t\tlet val;\n\t\tconst subControl = control.subControls[col];\n\t\tif (PropertyUtils.toType(subControl.dmDefault) !== \"undefined\") {\n\t\t\tval = PropertyUtils.getDMDefault(subControl, fieldName, fields);\n\t\t} else if (PropertyUtils.toType(subControl.valueDef.defaultValue) !== \"undefined\") {\n\t\t\tval = subControl.valueDef.defaultValue;\n\t\t\tif (val.parameterRef) {\n\t\t\t\tval = this.getPropertyValue({ name: val.parameterRef });\n\t\t\t}\n\t\t} else if (subControl.values) {\n\t\t\tval = subControl.values[0];\n\t\t} else if (subControl.valueDef.propType === \"string\") {\n\t\t\tval = \"\";\n\t\t} else if (subControl.valueDef.propType === \"boolean\") {\n\t\t\tval = false;\n\t\t} else if (subControl.valueDef.propType === \"enum\") {\n\t\t\tval = subControl.values[0];\n\t\t} else if (subControl.valueDef.propType === \"integer\" ||\n\t\t\tsubControl.valueDef.propType === \"long\" ||\n\t\t\tsubControl.valueDef.propType === \"double\") {\n\t\t\tval = 0;\n\t\t} else if (subControl.valueDef.propType === \"structure\") {\n\t\t\tval = {};\n\t\t} else {\n\t\t\tval = null;\n\t\t}\n\t\treturn val;\n\t}\n\n\t_indexOfField(fieldName, controlValue) {\n\t\tfor (let i = 0; i < controlValue.length; i++) {\n\t\t\tif (controlValue[i][0] === fieldName) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}\n\n\tgetUiItems() {\n\t\treturn this.uiItems;\n\t}\n\n\tgetReactIntl() {\n\t\treturn this.reactIntl;\n\t}\n\n\taddSharedControls(id, controlsNames) {\n\t\tthis.sharedCtrlInfo.push({ \"id\": id, \"controlNames\": controlsNames });\n\t}\n\n\tgetSharedCtrlInfo() {\n\t\treturn this.sharedCtrlInfo;\n\t}\n\n\tisSummaryPanelShowing() {\n\t\treturn this.isSummaryPanel;\n\t}\n\n\tsetIsSummaryPanelShowing(isSummaryPanelShowing) {\n\t\tthis.isSummaryPanel = isSummaryPanelShowing;\n\t}\n\n\tincreaseVisibleSubPanelCounter() {\n\t\tthis.visibleSubPanelCounter++;\n\t}\n\n\tdecreaseVisibleSubPanelCounter() {\n\t\tthis.visibleSubPanelCounter--;\n\t}\n\n\tisSubPanelsShowing() {\n\t\treturn this.visibleSubPanelCounter > 0;\n\t}\n\n\t/**\n\t* Returns title\n\t*\t@return string\n\t*/\n\tgetTitle() {\n\t\treturn this.propertiesStore.getTitle();\n\t}\n\n\t/**\n\t* Sets title for common-properties\n\t*\t@param title string\n\t*/\n\tsetTitle(title) {\n\t\treturn this.propertiesStore.setTitle(title);\n\t}\n\n\t/**\n\t* Sets all ops supported in common-properties. Both standard and custom\n\t*\t@param custOps object\n\t*/\n\tsetConditionOps(custOps) {\n\t\tthis.conditionOps = getConditionOps(custOps);\n\t}\n\n\t/**\n\t* Returns the op to run.\n\t*\t@param op string\n\t* @return op method to run\n\t*/\n\tgetConditionOp(op) {\n\t\tif (this.conditionOps) {\n\t\t\treturn this.conditionOps[op];\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t*\t@return a map of condition ops\n\t*/\n\tgetConditionOps() {\n\t\treturn this.conditionOps;\n\t}\n\n\t/**\n\t* Returns datasetMetadata passed into common-properties.\n\t*\t@return passed in value\n\t*/\n\tgetDatasetMetadata() {\n\t\treturn this.propertiesStore.getDatasetMetadata().schemas;\n\t}\n\n\t/**\n\t* Returns a list field objects. Based on datasetMetadata passed into common-properties.\n\t*\t@return array[field]\n\t*/\n\tgetDatasetMetadataFields() {\n\t\treturn this.propertiesStore.getDatasetMetadata().fields;\n\t}\n\n\t/**\n\t* Returns a list of schema names.\n\t*\t@return array[string]\n\t*/\n\tgetDatasetMetadataSchemas() {\n\t\treturn this.propertiesStore.getDatasetMetadata().schemaNames;\n\t}\n\n\t/**\n\t* Returns a list field objects filtered. These are filterd by conditions and\n\t* by shared controls\n\t* @param propertyId Propertied id of the control requesting the fields\n\t* @return array[field]\n\t*/\n\tgetFilteredDatasetMetadata(propertyId) {\n\t\tlet fields = this.getDatasetMetadataFields();\n\t\tif (propertyId) {\n\t\t\tfields = this._filterSharedDataset(propertyId, fields);\n\t\t\tfields = conditionsUtil.filterConditions(propertyId, this.filterDefinitions.controls, this, fields);\n\t\t}\n\t\treturn fields;\n\t}\n\n\t/**\n\t * Retrieves a filtered data model in which all fields that are already\n\t * in use by other controls are already filtered out.\n\t *\n\t * @param propertyId Name of control to skip when checking field controls\n\t * @param fields array of available fields to be filtered\n\t * @return Filtered fields with fields in use removed\n\t */\n\t_filterSharedDataset(propertyId, fields) {\n\t\tif (!this.sharedCtrlInfo || !propertyId) {\n\t\t\treturn fields;\n\t\t}\n\t\tconst skipControlName = propertyId.name;\n\t\t// gets all the controls that are shared with this property\n\t\tlet sharedCtrlNames = [];\n\t\tfor (const sharedCtrlList of this.sharedCtrlInfo) {\n\t\t\tfor (const sharedCtrl of sharedCtrlList.controlNames) {\n\t\t\t\tif (skipControlName === sharedCtrl.controlName) {\n\t\t\t\t\tsharedCtrlNames = sharedCtrlList.controlNames;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// get all the fields that are used by other controls\n\t\tconst propNames = sharedCtrlNames.map(function(item) {\n\t\t\treturn item.controlName;\n\t\t});\n\t\treturn this.filterFieldsFromSharedProps(fields, propNames, skipControlName);\n\t}\n\n\t/**\n\t * Filters field names that are already in use from the given list.\n\t *\n\t * @param fieldNames - Array of field names to filter\n\t * @param propNames - Array of property names that share a single source field list\n\t * @param skipName - Name of a property to skip from the list\n\t * @return An array of filtered field names that are not in use\n\t */\n\tfilterFieldsFromSharedProps(fieldNames, propNames, skipName) {\n\t\ttry {\n\t\t\tconst usedFields = [];\n\t\t\tfor (const sharedProp of propNames) {\n\t\t\t\tif (sharedProp !== skipName) {\n\t\t\t\t\tconst control = this.getControl({ name: sharedProp });\n\t\t\t\t\t// only remove from the main list the values that are in other controls\n\t\t\t\t\tconst propValue = this.getPropertyValue({ name: sharedProp });\n\t\t\t\t\tif (Array.isArray(propValue)) {\n\t\t\t\t\t\tfor (const arrayValue of propValue) {\n\t\t\t\t\t\t\tif (Array.isArray(arrayValue)) {\n\t\t\t\t\t\t\t\t// Two dimensional arrays\n\t\t\t\t\t\t\t\tconst fieldIdx = PropertyUtils.getTableFieldIndex(control);\n\t\t\t\t\t\t\t\tif (fieldIdx >= 0 && fieldIdx < arrayValue.length) {\n\t\t\t\t\t\t\t\t\tusedFields.push(PropertyUtils.stringifyFieldValue(arrayValue[fieldIdx], control));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// Single dimensional arrays\n\t\t\t\t\t\t\t\tusedFields.push(PropertyUtils.stringifyFieldValue(arrayValue, control));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Plain properties\n\t\t\t\t\t\tusedFields.push(PropertyUtils.stringifyFieldValue(propValue, control));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst usedFieldsList = Array.from(new Set(usedFields)); // make all values unique\n\t\t\tconst filteredFields = fieldNames.filter(function(field) {\n\t\t\t\treturn usedFieldsList.indexOf(field.name) === -1;\n\t\t\t});\n\t\t\treturn filteredFields;\n\t\t} catch (error) {\n\t\t\tlogger.warn(\"Error filtering shared controls \" + error);\n\t\t}\n\t\treturn fieldNames;\n\t}\n\n\t/**\n\t * This method parses the inDatasetMetadata into fields and schemaNames to be\n\t * used throughout common-properties.\n\t *\n\t * @param inDatasetMetadata Array of datasetMetadata schemata\n\t */\n\tsetDatasetMetadata(inDatasetMetadata) {\n\t\tconst schemaNames = [];\n\t\tconst fields = [];\n\t\tif (inDatasetMetadata) {\n\t\t\tlet schemas = cloneDeep(inDatasetMetadata);\n\t\t\t// in the 2.0 schema only arrays are support but we want to support both for now. Internally everything should be an array\n\t\t\tif (!Array.isArray(schemas)) {\n\t\t\t\tschemas = [schemas];\n\t\t\t}\n\t\t\t// make sure all schemas have a name\n\t\t\tfor (let j = 0; j < schemas.length; j++) {\n\t\t\t\tif (!schemas[j].name) {\n\t\t\t\t\tschemas[j].name = j.toString();\n\t\t\t\t}\n\t\t\t\tschemas[j].idx = j; // used to set dup names\n\t\t\t}\n\t\t\t// make sure all schemas have a unique names\n\t\t\tfor (const schema of schemas) {\n\t\t\t\tconst dupNamedSchemas = schemas.filter(function(filterSchema) {\n\t\t\t\t\treturn filterSchema.name === schema.name;\n\t\t\t\t});\n\t\t\t\tif (dupNamedSchemas && dupNamedSchemas.length > 1) {\n\t\t\t\t\tfor (let j = 0; j < dupNamedSchemas.length; j++) {\n\t\t\t\t\t\tdupNamedSchemas[j].name = dupNamedSchemas[j].name + \"_\" + dupNamedSchemas[j].idx;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// process all fields into single array\n\t\t\tfor (const schema of schemas) {\n\t\t\t\tschemaNames.push(schema.name);\n\t\t\t\tif (schema.fields) {\n\t\t\t\t\tfor (const field of schema.fields) {\n\t\t\t\t\t\tfield.schema = schema.name;\n\t\t\t\t\t\tfield.origName = field.name; // original name\n\t\t\t\t\t\tfields.push(field);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Adjust field names for multi-schema scenarios in which setForm is not called\n\t\tif (typeof this.multipleSchemas === \"undefined\") {\n\t\t\t// Determine from the current control set whether or not there can be multiple input datasets\n\t\t\tthis.multipleSchemas = this._canHaveMultipleSchemas();\n\t\t}\n\t\tif (this.multipleSchemas) {\n\t\t\tfor (const field of fields) {\n\t\t\t\tfield.name = field.schema + \".\" + field.origName;\n\t\t\t}\n\t\t}\n\n\t\t// store values in redux\n\t\tthis.propertiesStore.setDatasetMetadata({ schemas: inDatasetMetadata, fields: fields, schemaNames: schemaNames });\n\t}\n\n\t/**\n\t* This public API will validate a single property input value.\n\t*\n\t* @param {object} propertyId. required.\n\t* @param {boolean} showErrors. optional. Set to false to run conditions without displaying errors in the UI\n\t* Defaults to true to always display errors\n\t*/\n\tvalidateInput(propertyId, showErrors = true) {\n\t\tconditionsUtil.validateInput(propertyId, this, showErrors);\n\t}\n\n\t/**\n\t* This public API will validate all properties input values.\n\t* @param {boolean} showErrors. optional. Set to false to run conditions without displaying errors in the UI\n\t* Defaults to true to always display errors\n\t*/\n\tvalidatePropertiesValues(showErrors = true) {\n\t\tconditionsUtil.validatePropertiesValues(this, showErrors);\n\t}\n\n\t//\n\t// Table row selections\n\t//\n\tgetSelectedRows(inPropertyId) {\n\t\tconst propertyId = this.convertPropertyId(inPropertyId);\n\t\treturn this.propertiesStore.getSelectedRows(propertyId);\n\t}\n\n\tupdateSelectedRows(inPropertyId, selection) {\n\t\tconst propertyId = this.convertPropertyId(inPropertyId);\n\t\tthis.propertiesStore.updateSelectedRows(propertyId, selection);\n\t\tthis._notifySelectionListener(propertyId, selection);\n\t}\n\n\tclearSelectedRows(inPropertyId) {\n\t\tconst propertyId = this.convertPropertyId(inPropertyId);\n\t\tthis.propertiesStore.clearSelectedRows(propertyId);\n\t}\n\n\t/**\n\t * Disable table row move buttons for all propertyIds in given array\n\t * @param propertyIds Array of propertyIds\n\t *\n\t */\n\tsetDisableRowMoveButtons(propertyIds) {\n\t\t// Verify that input is an array of objects\n\t\tif (Array.isArray(propertyIds)) {\n\t\t\tthis.propertiesStore.setDisableRowMoveButtons(propertyIds);\n\t\t}\n\t}\n\n\t/**\n\t* Returns array of propertyIds for which row move buttons will be disabled\n\t*\t@return Array of propertyIds\n\t*/\n\tgetDisableRowMoveButtons() {\n\t\treturn this.propertiesStore.getDisableRowMoveButtons();\n\t}\n\n\t/**\n\t * Check if row move buttons should be disabled for given propertyId\n\t * @param propertyId The unique property identifier\n\t * @return boolean\n\t */\n\tisDisableRowMoveButtons(propertyId) {\n\t\tconst propertyIds = this.getDisableRowMoveButtons();\n\t\treturn (\n\t\t\tArray.isArray(propertyIds)\n\t\t\t\t? propertyIds.some((el) => isEqual(el, propertyId))\n\t\t\t\t: false\n\t\t);\n\t}\n\n\t//\n\t// Table row selection listeners\n\t//\n\n\t/**\n\t * Adds a row selection listener for a table or list.\n\t *\n\t * @param inPropertyId Property id for a table or list control\n\t * @param listener A callback function that contains a parameter that is\n\t *\tan array of row selection indices. The callback is fired whenever\n\t *\trow selections change for the given (row-based) control.\n\t */\n\taddRowSelectionListener(inPropertyId, listener) {\n\t\tconst propertyId = this.convertPropertyId(inPropertyId);\n\t\tconst controlName = propertyId.name;\n\t\tif (!this.selectionListeners[controlName]) {\n\t\t\tthis.selectionListeners[controlName] = {};\n\t\t}\n\t\tif (Number.isInteger(propertyId.row)) {\n\t\t\tthrow new Error(\"Listening for row selection changes on controls within table cells is not currently supported\");\n\n\t\t\t// TODO: Add this back if we ever get a request for listening to row changes on embedded tables.\n\n\t\t\t/*\n\t\t\tconst row = String(propertyId.row);\n\t\t\tif (!this.selectionListeners[propertyId.name][row]) {\n\t\t\t\tthis.selectionListeners[propertyId.name][row] = {};\n\t\t\t}\n\t\t\tif (Number.isInteger(propertyId.col)) {\n\t\t\t\tconst col = String(propertyId.col);\n\t\t\t\tif (!this.selectionListeners[propertyId.name][row][col]) {\n\t\t\t\t\tthis.selectionListeners[propertyId.name][row][col] = {};\n\t\t\t\t}\n\t\t\t\tthis.selectionListeners[controlName][row][col] = listener;\n\t\t\t} else {\n\t\t\t\tthis.selectionListeners[controlName][row] = listener;\n\t\t\t}\n\t\t\t*/\n\t\t} else {\n\t\t\tthis.selectionListeners[controlName].listener = listener;\n\t\t}\n\t}\n\n\t/**\n\t * Removes the row selection listener from a control.\n\t *\n\t * @param inPropertyId Property id for a table or list control\n\t */\n\tremoveRowSelectionListener(inPropertyId) {\n\t\tconst propertyId = this.convertPropertyId(inPropertyId);\n\t\tconst controlName = propertyId.name;\n\t\tif (Number.isInteger(propertyId.row)) {\n\t\t\tthrow new Error(\"Listening for row selection changes on controls within table cells is not currently supported\");\n\n\t\t\t// TODO: Add this back if we ever get a request for listening to row changes on embedded tables.\n\n\t\t\t/*\n\t\t\tconst row = propertyId.row;\n\t\t\tif (Number.isInteger(propertyId.col)) {\n\t\t\t\tconst col = propertyId.col;\n\t\t\t\tif (this.selectionListeners[controlName][row][col]) {\n\t\t\t\t\tdelete this.selectionListeners[controlName][row][col];\n\t\t\t\t}\n\t\t\t} else if (this.selectionListeners[controlName][row]) {\n\t\t\t\tdelete this.selectionListeners[controlName][row];\n\t\t\t}\n\t\t\t*/\n\t\t} else if (this.selectionListeners[controlName]) {\n\t\t\tdelete this.selectionListeners[controlName];\n\t\t}\n\t}\n\n\t_notifySelectionListener(inPropertyId, selections) {\n\t\tconst propertyId = this.convertPropertyId(inPropertyId);\n\t\tconst controlName = propertyId.name;\n\t\tif (this.selectionListeners[controlName]) {\n\n\t\t\t// TODO: Add this back if we ever get a request for listening to row changes on embedded tables.\n\n\t\t\t/*\n\t\t\tconst row = propertyId.row;\n\t\t\tif (Number.isInteger(propertyId.row)) {\n\t\t\t\tconst col = propertyId.col;\n\t\t\t\tif (Number.isInteger(propertyId.col)) {\n\t\t\t\t\tif (this.selectionListeners[controlName][row][col].listener) {\n\t\t\t\t\t\tthis.selectionListeners[controlName][row][col].listener(selections);\n\t\t\t\t\t}\n\t\t\t\t} else if (this.selectionListeners[controlName][row].listener) {\n\t\t\t\t\tthis.selectionListeners[controlName][row].listener(selections);\n\t\t\t\t}\n\t\t\t}\n\t\t\t*/\n\t\t\tthis.selectionListeners[controlName].listener(selections);\n\t\t}\n\t}\n\n\t//\n\t// A set of APIs for Expression Builder\n\t//\n\n\tsetExpressionInfo(expressionInfo) {\n\t\tthis.expressionFunctionInfo = setExpressionInfo(expressionInfo);\n\t}\n\n\tgetExpressionInfo() {\n\t\treturn this.expressionFunctionInfo;\n\t}\n\n\t// recently used of all categories under functions tab\n\tgetExpressionRecentlyUsed() {\n\t\treturn this.expressionRecentlyUsed;\n\t}\n\n\tupdateExpressionRecentlyUsed(functionInfo) {\n\t\tconst index = this.expressionRecentlyUsed.indexOf(functionInfo);\n\t\tif (index === -1) {\n\t\t\tthis.expressionRecentlyUsed.splice(0, 0, functionInfo);\n\t\t} else {\n\t\t\t// if already in the list, move it to the front\n\t\t\tthis.expressionRecentlyUsed.splice(index, 1);\n\t\t\tthis.expressionRecentlyUsed.unshift(functionInfo);\n\t\t}\n\t}\n\n\t// recently used of all categories under fields/values tab\n\tclearExpressionRecentlyUsed() {\n\t\tthis.expressionRecentlyUsed = [];\n\t}\n\n\tgetExpressionFieldsRecentlyUsed() {\n\t\treturn this.expressionFieldsRecentlyUsed;\n\t}\n\n\tupdateExpressionFieldsRecentlyUsed(fieldInfo) {\n\t\tconst index = this.expressionFieldsRecentlyUsed.indexOf(fieldInfo);\n\t\tif (index === -1) {\n\t\t\tthis.expressionFieldsRecentlyUsed.splice(0, 0, fieldInfo);\n\t\t} else {\n\t\t\t// if already in the list, move it to the front\n\t\t\tthis.expressionFieldsRecentlyUsed.splice(index, 1);\n\t\t\tthis.expressionFieldsRecentlyUsed.unshift(fieldInfo);\n\t\t}\n\t}\n\n\tclearExpressionFieldsRecentlyUsed() {\n\t\tthis.expressionFieldsRecentlyUsed = [];\n\t}\n\n\t/**\n\t* Retrieve filtered enumeration items.\n\t*\n\t* @param propertyId The unique property identifier\n\t* @param enumSet An object containing equal sized values and valueLabels arrays\n\t* @return Either the input object or a new object containing filtered items\n\t*/\n\tgetFilteredEnumItems(propertyId, enumSet) {\n\t\tconst replacementItems = this.propertiesStore.getFilteredEnumItems(propertyId);\n\t\tif (Array.isArray(replacementItems)) {\n\t\t\tconst newControl = {};\n\t\t\tnewControl.values = [];\n\t\t\tnewControl.valueLabels = [];\n\t\t\tfor (let idx = 0; idx < replacementItems.length; idx++) {\n\t\t\t\tnewControl.values.push(replacementItems[idx]);\n\t\t\t\tlet label = replacementItems[idx];\n\t\t\t\tconst index = enumSet.values.findIndex(function(value) {\n\t\t\t\t\treturn value === replacementItems[idx];\n\t\t\t\t});\n\t\t\t\tif (index > -1) {\n\t\t\t\t\tlabel = enumSet.valueLabels[index];\n\t\t\t\t}\n\t\t\t\tnewControl.valueLabels.push(label);\n\t\t\t}\n\t\t\treturn newControl;\n\t\t}\n\t\treturn enumSet;\n\t}\n\n\t/*\n\t* Property Values Methods\n\t*/\n\tupdatePropertyValue(inPropertyId, value, skipValidateInput, type) {\n\t\tconst propertyId = this.convertPropertyId(inPropertyId);\n\t\tconst initialValue = this.getPropertyValue(propertyId);\n\t\tif (typeof value === \"undefined\") {\n\t\t\tthis.removePropertyValue(propertyId);\n\t\t} else {\n\t\t\tthis.propertiesStore.updatePropertyValue(propertyId, value);\n\t\t}\n\t\tif (!conditionsUtil.allowConditions(inPropertyId, this)) {\n\t\t\tthis.propertiesStore.updatePropertyValue(propertyId, initialValue);\n\t\t\treturn;\n\t\t}\n\t\tconditionsUtil.validateConditions(inPropertyId, this);\n\t\tif (!skipValidateInput) {\n\t\t\tconditionsUtil.validateInput(inPropertyId, this, true);\n\t\t}\n\n\t\tif (this.handlers.propertyListener) {\n\t\t\tconst convertedValue = this._convertObjectStructure(propertyId, value);\n\t\t\tconst data = {\n\t\t\t\taction: ACTIONS.UPDATE_PROPERTY,\n\t\t\t\tproperty: propertyId,\n\t\t\t\tvalue: convertedValue,\n\t\t\t\tpreviousValue: initialValue\n\t\t\t};\n\t\t\tif (typeof type !== \"undefined\") {\n\t\t\t\tdata.type = type;\n\t\t\t}\n\t\t\tthis.handlers.propertyListener(data);\n\t\t}\n\t}\n\n\t/*\n\t* return the property value for the given 'inPropertyId'\n\t* options - optional object of config options where\n\t* filterHiddenDisabled: true - filter out values from controls having state \"hidden\" or \"disabled\"\n\t* applyProperties: true - this function is called from PropertiesMain.applyPropertiesEditing()\n\t* filterHidden: true - filter out values from controls having state \"hidden\"\n\t* filterDisabled: true - filter out values from controls having state \"disabled\"\n\t* filterHiddenControls: true - filter out values from controls having type \"hidden\"\n\t*/\n\tgetPropertyValue(inPropertyId, options, defaultValue) {\n\t\tconst propertyId = this.convertPropertyId(inPropertyId);\n\t\tconst propertyValue = this.propertiesStore.getPropertyValue(propertyId);\n\t\tlet parsedValue;\n\t\tif (Array.isArray(propertyValue)) {\n\t\t\tparsedValue = propertyValue.map((itm) => itm);\n\t\t} else if (propertyValue && typeof propertyValue === \"object\") {\n\t\t\t// Shallow copy for objects\n\t\t\tparsedValue = { ...propertyValue };\n\t\t} else {\n\t\t\tparsedValue = propertyValue;\n\t\t}\n\t\tlet filteredValue = defaultValue;\n\n\t\t// don't return hidden/disabled values\n\t\tconst filterHidden = options && (options.filterHiddenDisabled || options.filterHidden);\n\t\tconst filterDisabled = options && (options.filterHiddenDisabled || options.filterDisabled);\n\t\tconst filterHiddenControls = options && options.filterHiddenControls;\n\t\tif (filterHidden || filterDisabled || filterHiddenControls) {\n\t\t\t// top level value\n\t\t\tconst controlState = this.getControlState(propertyId);\n\t\t\tconst controlType = this.getControlType(propertyId);\n\t\t\tif (\n\t\t\t\t(controlState === STATES.DISABLED && filterDisabled) ||\n\t\t\t\t(controlState === STATES.HIDDEN && filterHidden) ||\n\t\t\t\t(controlType === ControlType.HIDDEN && filterHiddenControls)\n\t\t\t) {\n\t\t\t\treturn filteredValue;\n\t\t\t}\n\t\t\t// copy array to modify it and clear out disabled/hidden values\n\t\t\tfilteredValue = PropertyUtils.copy(propertyValue);\n\t\t\tif (Array.isArray(filteredValue)) {\n\t\t\t\tfor (let rowIdx = 0; rowIdx < filteredValue.length; rowIdx++) {\n\t\t\t\t\tconst rowValue = filteredValue[rowIdx];\n\t\t\t\t\tif (Array.isArray(rowValue)) {\n\t\t\t\t\t\tfor (let colIdx = 0; colIdx < rowValue.length; colIdx++) {\n\t\t\t\t\t\t\tconst colPropertyId = {\n\t\t\t\t\t\t\t\tname: propertyId.name,\n\t\t\t\t\t\t\t\trow: rowIdx,\n\t\t\t\t\t\t\t\tcol: colIdx\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tconst valueState = this.getControlState(colPropertyId);\n\t\t\t\t\t\t\tconst valueType = this.getControlType(colPropertyId);\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t(valueState === STATES.DISABLED && filterDisabled) ||\n\t\t\t\t\t\t\t\t(valueState === STATES.HIDDEN && filterHidden) ||\n\t\t\t\t\t\t\t\t(valueType === ControlType.HIDDEN && filterHiddenControls)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tfilteredValue[rowIdx][colIdx] = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (options && options.applyProperties === true) {\n\t\t\t\treturn this._convertObjectStructure(propertyId, filteredValue);\n\t\t\t}\n\t\t\treturn filteredValue;\n\t\t}\n\n\t\tif (options && options.applyProperties === true) {\n\t\t\treturn this._convertObjectStructure(propertyId, propertyValue);\n\t\t}\n\t\treturn parsedValue;\n\t}\n\n\tremovePropertyValue(inPropertyId) {\n\t\tconst propertyId = this.convertPropertyId(inPropertyId);\n\t\tthis.propertiesStore.removePropertyValue(propertyId);\n\t}\n\n\t// convert currentParameters of structureType:object to object values\n\t_convertObjectStructure(propertyId, propertyValue) {\n\t\tconst control = this.getControl(propertyId);\n\t\tif (PropertyUtils.isSubControlStructureObjectType(control)) {\n\t\t\tconst convert = control.structureType && control.structureType === \"object\";\n\t\t\tconst convertedValues = PropertyUtils.convertArrayStructureToObject(control.valueDef.isList, control.subControls, propertyValue, convert);\n\t\t\treturn convertedValues;\n\t\t}\n\t\treturn propertyValue;\n\t}\n\n\t/*\n\t* return the property values for all controls\n\t* options - optional object of config options where\n\t* filterHiddenDisabled: true - filter out values from controls having state \"hidden\" or \"disabled\"\n\t* applyProperties: true - this function is called from PropertiesMain.applyPropertiesEditing()\n\t* filterHidden: true - filter out values from controls having state \"hidden\"\n\t* filterDisabled: true - filter out values from controls having state \"disabled\"\n\t* filterHiddenControls: true - filter out values from controls having type \"hidden\"\n\t*/\n\tgetPropertyValues(options) {\n\t\tconst propertyValues = this.propertiesStore.getPropertyValues();\n\t\tlet returnValues = propertyValues;\n\t\tif (options && (options.filterHiddenDisabled || options.filterHidden || options.filterDisabled || options.filterHiddenControls || options.valueFilters)) {\n\t\t\tconst filteredValues = {};\n\t\t\tfor (const propKey in propertyValues) {\n\t\t\t\tif (!has(propertyValues, propKey)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst filteredValue = this.getPropertyValue({ name: propKey }, options);\n\t\t\t\t// only set parameters with values or filter out values specified in config\n\t\t\t\tconst valueFilters = Array.isArray(options.valueFilters) ? options.valueFilters : [];\n\t\t\t\tif (typeof filteredValue !== \"undefined\" && !valueFilters.includes(filteredValue)) {\n\t\t\t\t\tfilteredValues[propKey] = filteredValue;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturnValues = filteredValues;\n\t\t}\n\n\t\t// convert currentParameters of structureType:object to object values\n\t\tif (options && options.applyProperties === true) {\n\t\t\tfor (const controlId in returnValues) {\n\t\t\t\tif (!has(returnValues, controlId)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst propertyId = this.convertPropertyId(controlId);\n\t\t\t\tconst propertyValue = this.propertiesStore.getPropertyValue(propertyId);\n\t\t\t\treturnValues[controlId] = this._convertObjectStructure(propertyId, propertyValue);\n\t\t\t}\n\t\t}\n\n\t\treturn returnValues;\n\t}\n\n\t/*\n\t* options - optional object of config options where\n\t* setDefaultValues: true - set default values from parameter definition\n\t* isInitProps: true - Function is called during initial load. This is only used internally in setForm().\n\t*/\n\tsetPropertyValues(values, options) {\n\t\tlet inValues = cloneDeep(values);\n\n\t\t// convert currentParameters of type:object to array values\n\t\tif (values) {\n\t\t\tconst controls = this.getControls();\n\t\t\tObject.keys(inValues).forEach((propertyName) => {\n\t\t\t\tif (PropertyUtils.isSubControlStructureObjectType(controls[propertyName])) {\n\t\t\t\t\tconst currentValues = values[propertyName];\n\t\t\t\t\tconst control = controls[propertyName];\n\t\t\t\t\tconst convertedValues = PropertyUtils.convertObjectStructureToArray(control.valueDef.isList, control.subControls, currentValues);\n\t\t\t\t\tinValues[propertyName] = convertedValues;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (get(this.getPropertiesConfig(), \"convertValueDataTypes\")) {\n\t\t\t\tinValues = PropertyUtils.convertValueDataTypes(inValues, controls);\n\t\t\t}\n\t\t}\n\n\t\tif (options && options.setDefaultValues) {\n\t\t\tconst setDefaults = { values: inValues, setDefaultValues: true };\n\t\t\tconst defaultValues = this._addToControlValues(false, false, setDefaults);\n\t\t\tinValues = merge(defaultValues, inValues);\n\t\t}\n\n\t\tthis.propertiesStore.setPropertyValues(inValues);\n\n\t\tif (options?.isInitProps || options?.setDefaultValues) {\n\t\t\t// Evaluate conditional defaults based on current_parameters upon loading of view\n\t\t\t// For a given parameter_ref, if multiple conditions evaluate to true only the first one is used.\n\t\t\tconst conditionalDefaultValues = {};\n\t\t\tif (!isEmpty(inValues)) {\n\t\t\t\tObject.keys(inValues).forEach((propertyName) => {\n\t\t\t\t\tconst propertyId = { name: propertyName };\n\t\t\t\t\t// Update conditionalDefaultValues object using pass-by-reference\n\t\t\t\t\tconditionsUtil.setConditionalDefaultValue(propertyId, this, conditionalDefaultValues);\n\t\t\t\t});\n\t\t\t\tif (!isEmpty(conditionalDefaultValues)) {\n\t\t\t\t\tObject.keys(conditionalDefaultValues).forEach((parameterRef) => {\n\t\t\t\t\t\tif (!(parameterRef in inValues)) {\n\t\t\t\t\t\t\t// convert values of type:object to the internal format array values\n\t\t\t\t\t\t\tconst control = this.getControl({ name: parameterRef });\n\t\t\t\t\t\t\tif (PropertyUtils.isSubControlStructureObjectType(control)) {\n\t\t\t\t\t\t\t\tconditionalDefaultValues[parameterRef] =\n\t\t\t\t\t\t\t\t\tPropertyUtils.convertObjectStructureToArray(control.valueDef.isList, control.subControls, conditionalDefaultValues[parameterRef]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis.propertiesStore.updatePropertyValue({ name: parameterRef }, conditionalDefaultValues[parameterRef]);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Validate other conditions after evaluating conditional defaults (default_value conditions)\n\t\tconditionsUtil.validatePropertiesConditions(this);\n\t\tif (this.handlers.propertyListener) {\n\t\t\tthis.handlers.propertyListener(\n\t\t\t\t{\n\t\t\t\t\taction: ACTIONS.SET_PROPERTIES // Setting the properties in current_parameters\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Control States Methods\n\t * Sets the control state. Supported states are:\n\t * \"disabled\", \"enabled\", \"hidden\", \"visible\".\n\t */\n\tsetControlStates(states) {\n\t\tthis.propertiesStore.setControlStates(states);\n\t}\n\n\t/**\n\t* Updates the enabled/visible state of a control.\n\t*\n\t* @param inPropertyId Id of the property for the control to operate upon\n\t* @param state string (\"disabled\", \"enabled\", \"hidden\", \"visible\")\n\t*/\n\tupdateControlState(inPropertyId, state) {\n\t\tconst propertyId = this.convertPropertyId(inPropertyId);\n\t\tthis.propertiesStore.updateControlState(propertyId, state);\n\t}\n\tgetControlState(propertyId) {\n\t\tconst state = this.propertiesStore.getControlState(propertyId);\n\t\treturn state ? state.value : \"\";\n\t}\n\tgetControlStates() {\n\t\treturn this.propertiesStore.getControlStates();\n\t}\n\n\t/**\n\t * Retrieves the enumeration value states for the given propertyId.\n\t *\n\t * @param propertyId The of an enumeration property\n\t * @return An object containing state settings for those enumeration values\n\t * that have previously been set\n\t */\n\tgetControlValueStates(propertyId) {\n\t\tconst state = this.propertiesStore.getControlState(propertyId);\n\t\treturn state ? state.values : {};\n\t}\n\n\t/**\n\t * Retrieves the enumeration value states for the given propertyId.\n\t *\n\t * @param propertyId The of an enumeration property\n\t * @return An object containing state enumFilter\n\t */\n\tgetControlEnumFilterStates(propertyId) {\n\t\tconst state = this.propertiesStore.getControlState(propertyId);\n\t\treturn state ? state.enumFilter : {};\n\t}\n\n\t/**\n\t\t * Panel States Methods\n\t\t * Sets the panel state. Supported states are:\n\t\t * \"disabled\", \"enabled\", \"hidden\", \"visible\".\n\t\t */\n\tsetPanelStates(states) {\n\t\tthis.propertiesStore.setPanelStates(states);\n\t}\n\n\t/**\n\t\t* @param panelId {name: panel.id}\n\t * @param state string (\"disabled\", \"enabled\", \"hidden\", \"visible\")\n\t\t*/\n\tupdatePanelState(panelId, state) {\n\t\tthis.propertiesStore.updatePanelState(panelId, state);\n\t}\n\tgetPanelState(panelId) {\n\t\treturn this.propertiesStore.getPanelState(panelId);\n\t}\n\tgetPanelStates() {\n\t\treturn this.propertiesStore.getPanelStates();\n\t}\n\tclearActiveTearsheet() {\n\t\tthis.propertiesStore.setActiveTearsheetId(null);\n\t}\n\tsetActiveTearsheet(tearsheetId) {\n\t\tthis.propertiesStore.setActiveTearsheetId(tearsheetId);\n\t}\n\tgetActiveTearsheet() {\n\t\treturn this.propertiesStore.getActiveTearsheetId() || null;\n\t}\n\n\n\t/**\n\t * Action States Methods\n\t * Sets the panel state. Supported states are:\n\t * \"disabled\", \"enabled\", \"hidden\", \"visible\".\n\t */\n\tsetActionStates(states) {\n\t\tthis.propertiesStore.setActionStates(states);\n\t}\n\n\t/**\n\t* @param actionId {name: action.id}\n * @param state string (\"disabled\", \"enabled\", \"hidden\", \"visible\")\n\t*/\n\tupdateActionState(actionId, state) {\n\t\tthis.propertiesStore.updateActionState(actionId, state);\n\t}\n\n\t/**\n\t* @param actionId {name: action.id}\n\t*/\n\tgetActionState(actionId) {\n\t\treturn this.propertiesStore.getActionState(actionId);\n\t}\n\n\tgetActionStates() {\n\t\treturn this.propertiesStore.getActionStates();\n\t}\n\n\t/**\n\t* @param actionId {name: action.id}\n\t*/\n\tgetAction(actionId) {\n\t\treturn this.actions[actionId.name];\n\t}\n\n\t/**\n\t* Sets the custom actions available to common-properties\n\t* @param customActions\n\t*/\n\tsetCustomActions(customActions) {\n\t\tthis.customActions = customActions;\n\t}\n\n\t/**\n\t* Returns a rendered custom action\n\t* @param action\n\t*/\n\tgetCustomAction(action) {\n\t\tconst propertyId = this.convertPropertyId(action.name);\n\t\tif (action.customActionId && Array.isArray(this.customActions)) {\n\t\t\tfor (const customAction of this.customActions) {\n\t\t\t\tif (customAction.id() === action.customActionId) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn new customAction(propertyId, this, action.data).renderAction();\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tlogger.warn(\"Error thrown creating custom action: \" + error);\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"Custom action not found: \" + action.customActionId;\n\t}\n\n\t/**\n\t* Error Messages Methods\n\t* @param messages object with keys being property name\n\t*/\n\tsetErrorMessages(messages) {\n\t\tthis.propertiesStore.setErrorMessages(messages);\n\t}\n\n\t/**\n\t* Returns a single error message for a propertyId.\n\t*\n\t* @param inPropertyId Target propertyId\n\t* @param filterHiddenDisable True to leave out hidden and disabled properties\n\t* @param filterSuccess If true, leave out success messages\n\t* @param filterDisplayError If true, leave out messages that are not displayed in the UI\n\t* @return error message object\n\t*/\n\tgetErrorMessage(inPropertyId, filterHiddenDisable = false, filterSuccess = false, filterDisplayError = true) {\n\t\tconst propertyId = this.convertPropertyId(inPropertyId);\n\t\t// don't return hidden message\n\t\tif (filterHiddenDisable) {\n\t\t\tconst controlState = this.getControlState(propertyId);\n\t\t\tconst controlType = this.getControlType(propertyId);\n\t\t\tif (controlState === STATES.DISABLED || controlState === STATES.HIDDEN || controlType === ControlType.HIDDEN) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\tconst message = this.propertiesStore.getErrorMessage(propertyId, this.reactIntl);\n\t\tif (filterSuccess) {\n\t\t\tif (message && message.type === CONDITION_MESSAGE_TYPE.SUCCESS) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\tif (filterDisplayError) {\n\t\t\tif (message && !isUndefined(message.displayError) && !message.displayError) { // This is only set if false\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\treturn message;\n\t}\n\n\t/**\n\t*\tUsed to return all error messages. Will either return internally stored messages\n\t* or formatted list to store in pipeline-flow\n\t* @param filteredPipeline boolean\n\t* @param filterHiddenDisable True to leave out hidden and disabled properties\n\t* @param filterSuccess If true, leave out success messages\n\t* @param filterDisplayError If true, leave out messages that are not displayed in the UI\n\t* @return object when filteredPipeline=false or array when filteredPipeline=true\n\t*/\n\tgetErrorMessages(filteredPipeline, filterHiddenDisable, filterSuccess, filterDisplayError = true) {\n\t\tlet messages = this.propertiesStore.getErrorMessages();\n\n\t\tif (filterDisplayError) {\n\t\t\tmessages = this._filterDisplayErrors(messages);\n\t\t}\n\t\tif (filteredPipeline || filterHiddenDisable) {\n\t\t\tmessages = this._filterMessages(messages, filteredPipeline, filterHiddenDisable, filterSuccess);\n\t\t}\n\t\treturn messages;\n\t}\n\n\tgetAllErrorMessages() {\n\t\treturn this.getErrorMessages(false, false, false, false);\n\t}\n\n\tgetRequiredErrorMessages() {\n\t\tconst messages = this.propertiesStore.getErrorMessages();\n\t\tconst requiredMessages = this._filterNonRequiredErrors(messages);\n\t\tconst filtered = this._filterHiddenDisabledErrors(requiredMessages); // Exclude errors for controls that are hidden or disabled\n\t\treturn filtered;\n\t}\n\n\t_filterMessages(messages, filteredPipeline, filterHiddenDisable, filterSuccess) {\n\t\tconst filteredMessages = {};\n\t\tconst pipelineMessages = [];\n\t\tfor (const paramKey in messages) {\n\t\t\tif (!has(messages, paramKey)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// This returns top-level message for tables\n\t\t\tconst paramMessage = this.getErrorMessage({ name: paramKey }, filterHiddenDisable, filterSuccess);\n\t\t\tif (paramMessage && paramMessage.text) {\n\t\t\t\tif (filteredPipeline) {\n\t\t\t\t\tpipelineMessages.push({\n\t\t\t\t\t\tid_ref: paramKey,\n\t\t\t\t\t\tvalidation_id: paramMessage.validation_id,\n\t\t\t\t\t\ttype: paramMessage.type,\n\t\t\t\t\t\ttext: paramMessage.text\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tfilteredMessages[paramKey] = paramMessage;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (filteredPipeline) {\n\t\t\treturn pipelineMessages;\n\t\t}\n\t\treturn filteredMessages;\n\t}\n\n\t// Remove error messages that will not be displayed in the UI\n\t_filterDisplayErrors(messages) {\n\t\tconst filterCondition = (testMessage) => (isUndefined(testMessage.displayError) || testMessage.displayError);\n\t\tconst filteredMessages = this._filterErrors(messages, filterCondition);\n\t\treturn filteredMessages;\n\t}\n\n\t// Remove error messages that are not from a required parameters\n\t_filterNonRequiredErrors(messages) {\n\t\tconst filterCondition = (testMessage) => testMessage.required === true;\n\t\tconst filteredMessages = this._filterErrors(messages, filterCondition);\n\t\treturn filteredMessages;\n\t}\n\n\t// Remove error messages that are disabled or hidden\n\t_filterHiddenDisabledErrors(messages) {\n\t\tconst filterCondition = (testMessage, propertyId) => {\n\t\t\tconst controlState = this.getControlState(propertyId);\n\t\t\tconst controlType = this.getControlType(propertyId);\n\t\t\treturn controlState !== STATES.HIDDEN && controlState !== STATES.DISABLED && controlType !== ControlType.HIDDEN;\n\t\t};\n\t\tconst filteredMessages = this._filterErrors(messages, filterCondition);\n\t\treturn filteredMessages;\n\t}\n\n\n\t// Remove error messages that do not satisfy the given condition\n\t_filterErrors(messages, condition) {\n\t\tconst filteredMessages = {};\n\t\tconst parameterNames = Object.keys(messages);\n\t\tparameterNames.forEach((paramKey) => {\n\t\t\tconst parameterError = messages[paramKey];\n\t\t\tif (parameterError.text && condition(parameterError, parameterError.propertyId)) { // not table\n\t\t\t\tfilteredMessages[paramKey] = parameterError;\n\t\t\t} else { // table cell\n\t\t\t\tfor (const rowKey in parameterError) {\n\t\t\t\t\tif (!has(parameterError, rowKey)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tconst rowMessage = parameterError[rowKey];\n\t\t\t\t\tif (rowMessage && rowMessage.text && condition(rowMessage, rowMessage.propertyId)) {\n\t\t\t\t\t\tif (typeof filteredMessages[paramKey] === \"undefined\") {\n\t\t\t\t\t\t\tfilteredMessages[paramKey] = {};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfilteredMessages[paramKey][rowKey] = rowMessage;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (const colKey in rowMessage) {\n\t\t\t\t\t\t\tif (!has(rowMessage, colKey)) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst colMessage = rowMessage[colKey];\n\t\t\t\t\t\t\tif (colMessage && colMessage.text && condition(colMessage, colMessage.propertyId)) {\n\t\t\t\t\t\t\t\tif (typeof filteredMessages[paramKey] === \"undefined\") {\n\t\t\t\t\t\t\t\t\tfilteredMessages[paramKey] = {};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (typeof filteredMessages[paramKey][rowKey] === \"undefined\") {\n\t\t\t\t\t\t\t\t\tfilteredMessages[paramKey][rowKey] = {};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfilteredMessages[paramKey][rowKey][colKey] = colMessage;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn filteredMessages;\n\t}\n\n\tupdateErrorMessage(inPropertyId, message) {\n\t\tconst propertyId = this.convertPropertyId(inPropertyId);\n\t\tif (message && message.type !== \"info\") {\n\t\t\tthis.propertiesStore.updateErrorMessage(propertyId, message);\n\t\t} else {\n\t\t\tthis.propertiesStore.clearErrorMessage(propertyId);\n\t\t}\n\t}\n\n\tremoveErrorMessageRow(inPropertyId) {\n\t\tconst propertyId = this.convertPropertyId(inPropertyId);\n\t\tlet messages = this.propertiesStore.getErrorMessages();\n\t\tconst controlMsg = messages[propertyId.name];\n\t\tif (typeof controlMsg !== \"undefined\") {\n\t\t\tfor (const rowIndex of Object.keys(controlMsg)) {\n\t\t\t\tconst rowNumber = parseInt(rowIndex, 10);\n\t\t\t\tif (rowNumber === propertyId.row) {\n\t\t\t\t\tdelete messages[propertyId.name][rowNumber];\n\t\t\t\t} else if (rowNumber > propertyId.row) {\n\t\t\t\t\tmessages = this._moveMessageRows(messages, propertyId.name, rowNumber, rowNumber - 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.setErrorMessages(messages);\n\t\t}\n\t}\n\n\tmoveErrorMessageRows(controlName, firstRow, secondRow) {\n\t\tlet messages = this.propertiesStore.getErrorMessages();\n\t\tconst controlMsg = messages[controlName];\n\t\tif (typeof controlMsg !== \"undefined\") {\n\t\t\tconst firstRowErrorMsg = controlMsg[firstRow];\n\t\t\tconst secondRowErrorMsg = controlMsg[secondRow];\n\t\t\tif (typeof firstRowErrorMsg !== \"undefined\" && typeof secondRowErrorMsg !== \"undefined\") {\n\t\t\t\tmessages = this._moveMessageRows(messages, controlName, firstRow, secondRow);\n\t\t\t\t// create second message because it is deleted in the changeErrorMessageRow, set it to first row number\n\t\t\t\tmessages[controlName][firstRow] = {};\n\t\t\t\tfor (const colNumber of Object.keys(secondRowErrorMsg)) {\n\t\t\t\t\tmessages[controlName][firstRow][colNumber] = secondRowErrorMsg[colNumber];\n\t\t\t\t}\n\t\t\t} else if (typeof firstRowErrorMsg !== \"undefined\") {\n\t\t\t\tmessages = this._moveMessageRows(messages, controlName, firstRow, secondRow);\n\t\t\t} else if (typeof secondRowErrorMsg !== \"undefined\") {\n\t\t\t\tmessages = this._moveMessageRows(messages, controlName, secondRow, firstRow);\n\t\t\t}\n\t\t\tthis.setErrorMessages(messages);\n\t\t}\n\t}\n\n\t_moveMessageRows(messages, controlName, fromRow, toRow) {\n\t\tmessages[controlName][toRow] = messages[controlName][fromRow];\n\t\tdelete messages[controlName][fromRow];\n\t\treturn messages;\n\t}\n\n\t/*\n\t* Controls Methods\n\t*/\n\n\t// Saves controls in a state that get be used to retrieve them using a propertyId\n\tsaveControls(controls) {\n\t\tcontrols.forEach((control) => {\n\t\t\tif (typeof control.columnIndex === \"undefined\") {\n\t\t\t\t// only add to map if control hasn't already been added or override if set to custom.\n\t\t\t\t// This is needed if a parameter is referenced from multiple groups and one is a custom panel\n\t\t\t\tif (!has(this.controls, control.name) || (has(this.controls, control.name) && control.controlType !== ControlType.CUSTOM)) {\n\t\t\t\t\tthis.controls[control.name] = control;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.controls[control.parameterName][control.columnIndex] = control;\n\t\t\t}\n\t\t});\n\t}\n\n\tgetControl(propertyId) {\n\t\tconst control = this.controls[propertyId.name];\n\t\t// if no subcontrol return parent control\n\t\tif (typeof propertyId.col !== \"undefined\" && control) {\n\t\t\tconst subControl = this.controls[propertyId.name][propertyId.col.toString()];\n\t\t\tif (subControl) {\n\t\t\t\treturn subControl;\n\t\t\t}\n\t\t}\n\t\treturn control;\n\t}\n\n\tgetControlPropType(propertyId) {\n\t\tconst control = this.getControl(propertyId);\n\t\tif (typeof control.valueDef !== \"undefined\") {\n\t\t\treturn control.valueDef.propType;\n\t\t}\n\t\treturn null;\n\t}\n\n\tupdateControlEnumValues(propertyId, valuesObj) {\n\t\tconst control = this.getControl(propertyId);\n\t\tif (!Array.isArray(valuesObj) || !control) {\n\t\t\tlogger.warn(\"properties-controller\", new Error(\"updateControlEnumValues - control not found or valuesObj not valid\"));\n\t\t\treturn;\n\t\t}\n\t\tcontrol.values = valuesObj.map((valueObj) => valueObj.value);\n\t\tcontrol.valueLabels = valuesObj.map((valueObj) => {\n\t\t\tif (!valueObj.label) {\n\t\t\t\treturn valueObj.value;\n\t\t\t}\n\t\t\treturn valueObj.label;\n\t\t});\n\t}\n\n\tgetControls() {\n\t\treturn this.controls;\n\t}\n\n\tsetSaveButtonDisable(saveDisable) {\n\t\tthis.propertiesStore.setSaveButtonDisable(saveDisable);\n\t}\n\n\tgetSaveButtonDisable() {\n\t\treturn this.propertiesStore.getSaveButtonDisable();\n\t}\n\n\t/**\n\t* Enable/disable OK button for given summary panel\n\t* @param panelId {name: panel.id}\n\t* @param wideFlyoutPrimaryButtonDisable boolean\n\t*/\n\tsetWideFlyoutPrimaryButtonDisabled(panelId, wideFlyoutPrimaryButtonDisable) {\n\t\tthis.propertiesStore.setWideFlyoutPrimaryButtonDisabled(panelId, wideFlyoutPrimaryButtonDisable);\n\t}\n\n\t/**\n\t* @param panelId {name: panel.id}\n\t*/\n\tgetWideFlyoutPrimaryButtonDisabled(panelId) {\n\t\treturn this.propertiesStore.getWideFlyoutPrimaryButtonDisabled(panelId);\n\t}\n\n\tisRequired(propertyId) {\n\t\tconst control = this.getControl(propertyId);\n\t\tif (control) {\n\t\t\tconst required = control.required;\n\t\t\treturn (required) ? required : false;\n\t\t}\n\t\treturn false;\n\t}\n\n\tisSummary(propertyId) {\n\t\tconst control = this.getControl(propertyId);\n\t\tif (control) {\n\t\t\tconst summary = control.summary;\n\t\t\treturn (summary) ? summary : false;\n\t\t}\n\t\treturn false;\n\t}\n\n\tgetControlType(propertyId) {\n\t\tif (typeof propertyId === \"undefined\") {\n\t\t\treturn null;\n\t\t}\n\t\tconst control = this.getControl(propertyId);\n\t\tif (control) {\n\t\t\treturn control.controlType;\n\t\t}\n\t\treturn null;\n\t}\n\n\t// check if given column is visible in the table\n\tgetColumnVisibility(propertyId, columnIndex) {\n\t\treturn this.controls[propertyId.name][columnIndex].visible;\n\t}\n\n\ttoggleColumnVisibility(propertyId, columnIndex, value) {\n\t\tthis.controls[propertyId.name][columnIndex].visible = value;\n\t}\n\n\t/*\n\t* Summary Panel controls Methods\n\t*/\n\t_parseSummaryControls(controls) {\n\t\tconst summaryControls = {};\n\t\tcontrols.forEach((control) => {\n\t\t\tif (control.summaryPanelId) {\n\t\t\t\tif (typeof summaryControls[control.summaryPanelId] === \"undefined\") {\n\t\t\t\t\tsummaryControls[control.summaryPanelId] = [];\n\t\t\t\t}\n\t\t\t\tif (typeof control.columnIndex === \"undefined\") {\n\t\t\t\t\tsummaryControls[control.summaryPanelId].push(control.name);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tthis.setSummaryPanelControls(summaryControls);\n\t}\n\tsetSummaryPanelControls(summaryPanelControls) {\n\t\tthis.summaryPanelControls = summaryPanelControls;\n\t}\n\tgetSummaryPanelControls(panelId) {\n\t\treturn this.summaryPanelControls[panelId];\n\t}\n\t// Sets the value to be displayed in the summaryPanel for a customPanel property\n\tupdateCustPropSumPanelValue(propertyId, content) {\n\t\tif (typeof propertyId.name !== \"undefined\") {\n\t\t\tthis.custPropSumPanelValues[propertyId.name] = content;\n\t\t}\n\t}\n\tgetCustPropSumPanelValue(propertyId) {\n\t\t// don't display hidden or disabled parameters\n\t\tconst controlState = this.getControlState(propertyId);\n\t\tif (controlState === STATES.DISABLED || controlState === STATES.HIDDEN) {\n\t\t\treturn null;\n\t\t}\n\t\treturn this.custPropSumPanelValues[propertyId.name];\n\t}\n\t// Only used in custom panel to allow for custom property summary values to be displayed\n\tsetControlInSummary(propertyId, label, inSummary) {\n\t\tconst control = this.getControl(propertyId);\n\t\tif (control) {\n\t\t\tcontrol.summary = true;\n\t\t\tcontrol.summaryLabel = label;\n\t\t}\n\t}\n\n\t/**\n\t* Used to create standard controls in customPanels\n\t* @param propertyId - Property id of the controls\n\t* @param paramDef - schema definition. See paramDef schema\n\t* @param parameter (string) - name of the parameter to pull out of paramDef\n\t*/\n\tcreateControl(propertyId, paramDef, parameter) {\n\t\tconst containerType = get(this.getPropertiesConfig(), \"containerType\");\n\t\tconst control = this.controlFactory.createFormControl(paramDef, parameter, this.getLight(), containerType);\n\t\tconst controls = [];\n\t\t// need to preserve parentCategoryId which is set during initial parsing of all controls\n\t\tconst parentCategoryId = this.getControl(propertyId).parentCategoryId;\n\t\tUiConditionsParser.parseControl(controls, control, parentCategoryId);\n\t\tthis.saveControls(controls);\n\t\treturn this.controlFactory.createControlItem(control, propertyId);\n\t}\n\n\t/**\n\t* Used to create controls\n\t* @return the controlFactory instance\n\t*/\n\tgetControlFactory() {\n\t\treturn this.controlFactory;\n\t}\n\n\t/**\n\t* Sets the custom controls available to common-properties\n\t* @param customControls\n\t*/\n\tsetCustomControls(customControls) {\n\t\tthis.customControls = customControls;\n\t}\n\n\t/**\n\t* Returns a rendered custom control\n\t* @param propertyId\n\t* @param control\n\t* @param tableInfo\n\t*/\n\tgetCustomControl(propertyId, control, tableInfo) {\n\t\tif (control.customControlId) {\n\t\t\tfor (const customCtrl of this.customControls) {\n\t\t\t\tif (customCtrl.id() === control.customControlId) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn new customCtrl(propertyId, this, control.data, tableInfo).renderControl();\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tlogger.warn(\"Error thrown creating custom control: \" + error);\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"Custom control not found: \" + control.customControlId;\n\t}\n\n\t/*\n\t* maxLength for single-line and multi-line control methods\n\t*/\n\n\t/**\n\t* Returns the maximum characters allowed for multi-line string controls like textarea\n\t* Default value is 1024\n\t*/\n\tgetMaxLengthForMultiLineControls() {\n\t\tconst maxLengthForMultiLineControls = (typeof this.getPropertiesConfig().maxLengthForMultiLineControls !== \"undefined\")\n\t\t\t? this.getPropertiesConfig().maxLengthForMultiLineControls\n\t\t\t: 1024;\n\t\treturn maxLengthForMultiLineControls;\n\t}\n\n\t/**\n\t* Returns the maximum characters allowed for single-line string controls like textfield\n\t* Default value is 128\n\t*/\n\tgetMaxLengthForSingleLineControls() {\n\t\tconst maxLengthForSingleLineControls = (typeof this.getPropertiesConfig().maxLengthForSingleLineControls !== \"undefined\")\n\t\t\t? this.getPropertiesConfig().maxLengthForSingleLineControls\n\t\t\t: 128;\n\t\treturn maxLengthForSingleLineControls;\n\t}\n\n\t/**\n\t* Set the initial values of addRemoveRows for all structure controls\n\t*/\n\tsetInitialAddRemoveRows() {\n\t\tconst parameterNames = Object.keys(this.controls);\n\t\tparameterNames.forEach((parameterName) => {\n\t\t\tconst control = this.controls[parameterName];\n\t\t\tif (control.valueDef && control.valueDef.propType === Type.STRUCTURE && !isUndefined(control.addRemoveRows)) {\n\t\t\t\tconst propertyId = { name: control.name };\n\t\t\t\tthis.setAddRemoveRows(propertyId, control.addRemoveRows);\n\t\t\t}\n\t\t});\n\n\t}\n\n\t/**\n\t* Set the addRemoveRows attribute to 'enabled' for the given propertyId\n\t* @param propertyId The unique property identifier\n\t* @param enabled boolean value to enable or disable addRemoveRows\n\t*/\n\tsetAddRemoveRows(propertyId, enabled) {\n\t\tthis.propertiesStore.setAddRemoveRows(propertyId, enabled);\n\t}\n\n\t/**\n\t* Returns the true if addRemoveRows is enabled for the given propertyID\n\t* @param propertyId The unique property identifier\n\t* @return boolean\n\t*/\n\tgetAddRemoveRows(propertyId) {\n\t\treturn this.propertiesStore.getAddRemoveRows(propertyId);\n\t}\n\n\t/**\n\t* Set the hideEditButton attribute to 'enabled' for the given propertyId\n\t* @param propertyId The unique property identifier\n\t* @param enabled boolean value to enable or disable hideditButton\n\t*/\n\tsetHideEditButton(propertyId, enabled) {\n\t\tthis.propertiesStore.setHideEditButton(propertyId, enabled);\n\t}\n\n\t/**\n\t* Returns the true if hideEditButton is enabled for the given propertyID\n\t* @param propertyId The unique property identifier\n\t* @return boolean\n\t*/\n\tgetHideEditButton(propertyId) {\n\t\treturn this.propertiesStore.getHideEditButton(propertyId);\n\t}\n\n\t/**\n\t * Freeze row move buttons for row indexes in given array\n\t * @param propertyId The unique property identifier\n\t * @param rowIndexes Array of row indexes\n\t */\n\n\tgetStaticRows(inPropertyId) {\n\t\tconst propertyId = this.convertPropertyId(inPropertyId);\n\t\treturn this.propertiesStore.getStaticRows(propertyId);\n\t}\n\n\tupdateStaticRows(inPropertyId, staticRowsArr) {\n\t\tconst propertyId = this.convertPropertyId(inPropertyId);\n\t\tconst controlValue = this.getPropertyValue(inPropertyId);\n\t\tconst staticRows = staticRowsArr.sort();\n\t\tconst isValidSlection = this.validateSelectionValues(staticRows, controlValue);\n\t\tif (isValidSlection) {\n\t\t\tthis.propertiesStore.updateStaticRows(propertyId, staticRows);\n\t\t}\n\t}\n\n\tclearStaticRows(inPropertyId) {\n\t\tconst propertyId = this.convertPropertyId(inPropertyId);\n\t\tthis.propertiesStore.clearStaticRows(propertyId);\n\t}\n\n\t/**\n\t* Set the initial values of table buttons for all table controls\n\t*/\n\tsetInitialTableButtonState() {\n\t\tconst parameterNames = Object.keys(this.controls);\n\t\tparameterNames.forEach((parameterName) => {\n\t\t\tconst control = this.controls[parameterName];\n\t\t\tconst propertyId = { name: control.name };\n\t\t\tif (!isUndefined(control.buttons)) {\n\t\t\t\tcontrol.buttons.forEach((button) => {\n\t\t\t\t\tthis.setTableButtonEnabled(propertyId, button.id, button.enabled || false);\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (control.subControls) {\n\t\t\t\tthis.setInitialTableButtonSubControlState(propertyId, control.subControls);\n\t\t\t}\n\t\t});\n\t}\n\n\t// This only handles 1 level of nesting, will need to make this recusrive if there is a need for deeper nesting\n\tsetInitialTableButtonSubControlState(parentPropertyId, subControls) {\n\t\tsubControls.forEach((control) => {\n\t\t\tconst propertyValues = this.getPropertyValue(parentPropertyId);\n\n\t\t\tif (!isUndefined(control.buttons)) {\n\t\t\t\tpropertyValues.forEach((value, valueIdx) => {\n\t\t\t\t\tconst propertyId = { name: parentPropertyId.name, row: valueIdx, col: control.columnIndex };\n\t\t\t\t\tcontrol.buttons.forEach((button) => {\n\t\t\t\t\t\tthis.setTableButtonEnabled(propertyId, button.id, button.enabled || false);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t* Set the table button to 'enabled' for the given propertyId\n\t* @param propertyId The unique property identifier\n\t* @param buttonId The unique button identifier\n\t* @param enabled boolean value to enable or disable the button\n\t*/\n\tsetTableButtonEnabled(propertyId, buttonId, enabled) {\n\t\tthis.propertiesStore.setTableButtonEnabled(propertyId, buttonId, enabled);\n\t}\n\n\t/**\n\t* Returns the table button states for the given propertyID\n\t* @param propertyId The unique property identifier\n\t* @return boolean\n\t*/\n\tgetTableButtons(propertyId) {\n\t\treturn this.propertiesStore.getTableButtons(propertyId);\n\t}\n\n\t/**\n\t* Returns the true if the table button is enabled for the given propertyID\n\t* @param propertyId The unique property identifier\n\t* @param buttonId The unique button identifier\n\t* @return boolean\n\t*/\n\tgetTableButtonEnabled(propertyId, buttonId) {\n\t\treturn this.propertiesStore.getTableButtonEnabled(propertyId, buttonId);\n\t}\n\n\t/**\n\t * Validate if the array for freeze rows is correct. Should only have continuous value of row indexes\n\t * Must not contain first and last row index together in the array ever. you can only freeze either first n row or the last n row\n\t * @param staticRows Array of rows you want to freeze\n\t * @param controlValue the property values for the property Id\n\t * @returns\n\t */\n\tvalidateSelectionValues(staticRows, controlValue) {\n\t\tlet isValid = false;\n\t\tif (staticRows && controlValue.length > 0) {\n\t\t\tconst consecutiveAry = staticRows.slice(1).map(function(n, i) {\n\t\t\t\treturn n - staticRows[i];\n\t\t\t});\n\t\t\tconst isDifference = consecutiveAry.every((value) => value === 1);\n\t\t\tif (isDifference && ((staticRows.includes(0) && !staticRows.includes(controlValue.length - 1)) ||\n\t\t\t\t(!staticRows.includes(0) && staticRows.includes(controlValue.length - 1)))) {\n\t\t\t\tisValid = true;\n\t\t\t} else {\n\t\t\t\tisValid = false;\n\t\t\t}\n\t\t} else {\n\t\t\tisValid = false;\n\t\t}\n\t\treturn isValid;\n\t}\n}\n","/*\n * Copyright 2017-2023 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport parameterDefsV3Schema from \"@elyra/pipeline-schemas/common-canvas/parameter-defs/parameter-defs-v3-schema.json\";\n\nimport uihintsV3Schema from \"@elyra/pipeline-schemas/common-pipeline/operators/uihints-v3-schema.json\";\nimport conditionsV3Schema from \"@elyra/pipeline-schemas/common-pipeline/operators/conditions-v3-schema.json\";\nimport operatorsV3Schema from \"@elyra/pipeline-schemas/common-pipeline/operators/operator-v3-schema.json\";\nimport dataRecordMetadataV3Schema from \"@elyra/pipeline-schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v3-schema.json\";\n\nimport { Validator as SchemaValidator } from \"jsonschema\";\n\nfunction validateParameterDefAgainstSchema(parameterDef) {\n\tconst validator = getValidator();\n\tvalidateAgainstSchema(parameterDef, parameterDefsV3Schema, \"pipelineFlow\", validator);\n}\n\n// Validates the data provided, against the schema provided, using the validator\n// provided and throws an error if any schema validation errors are found.\nfunction validateAgainstSchema(data, schema, type, validator) {\n\tconst valResult = validator.validate(data, schema, { \"nestedErrors\": true });\n\n\tif (valResult && valResult.errors && valResult.errors.length > 0) {\n\t\tconsole.error(valResult);\n\t}\n}\n\nfunction getValidator() {\n\tconst validator = new SchemaValidator();\n\tconst canvasPrefix = \"https://api.dataplatform.ibm.com/schemas/common-canvas/\";\n\tconst pipelinePrefix = \"https://api.dataplatform.ibm.com/schemas/common-pipeline/\";\n\tvalidator.addSchema(parameterDefsV3Schema, canvasPrefix + \"parameter-defs/pipeline-flow-v3-schema.json\");\n\tvalidator.addSchema(uihintsV3Schema, pipelinePrefix + \"operators/uihints-v3-schema.json\");\n\tvalidator.addSchema(conditionsV3Schema, pipelinePrefix + \"operators/conditions-v3-schema.json\");\n\tvalidator.addSchema(operatorsV3Schema, pipelinePrefix + \"operators/operator-v3-schema.json\");\n\tvalidator.addSchema(dataRecordMetadataV3Schema, pipelinePrefix + \"datarecord-metadata/datarecord-metadata-v3-schema.json\");\n\treturn validator;\n}\n\nexport {\n\tvalidateParameterDefAgainstSchema\n};\n","/*\n * Copyright 2017-2025 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { connect } from \"react-redux\";\nimport Isvg from \"react-inlinesvg\";\nimport { get } from \"lodash\";\nimport classNames from \"classnames\";\nimport { Help, Edit, Close, Information } from \"@carbon/react/icons\";\nimport { TextInput, Button, Layer, Link } from \"@carbon/react\";\nimport { Toggletip, ToggletipButton, ToggletipContent, ToggletipActions } from \"@carbon/react\";\n\nimport { setTitle } from \"./../../actions\";\nimport { MESSAGE_KEYS, CONDITION_MESSAGE_TYPE } from \"./../../constants/constants\";\nimport * as PropertyUtils from \"./../../util/property-utils\";\nimport ActionFactory from \"../../actions/action-factory.js\";\n\nclass TitleEditor extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tfocused: false,\n\t\t\ttitleValidation: null\n\t\t};\n\t\tthis.editTitleClickHandler = this.editTitleClickHandler.bind(this);\n\t\tthis.helpClickHandler = this.helpClickHandler.bind(this);\n\t\tthis.id = PropertyUtils.generateId();\n\t\tthis.textInputRef = React.createRef();\n\t\tthis.labelText = PropertyUtils.formatMessage(props.controller.getReactIntl(),\n\t\t\tMESSAGE_KEYS.TITLE_EDITOR_LABEL);\n\t\tthis.textInputOnFocus = this.textInputOnFocus.bind(this);\n\t\tthis.textInputOnBlur = this.textInputOnBlur.bind(this);\n\t\tthis.headingEnabled = this.props.showHeading && (this.props.heading || this.props.icon);\n\t\tthis.handleTitleChange = this.handleTitleChange.bind(this);\n\t\tthis.titleChangeHandler = this.props.controller.getHandlers().titleChangeHandler;\n\t}\n\n\t_handleKeyPress(e) {\n\t\tif (e.key === \"Enter\") {\n\t\t\tthis.textInputRef.current.blur();\n\t\t}\n\t}\n\n\teditTitleClickHandler() {\n\t\tthis.textInputRef.current.focus();\n\t}\n\n\thelpClickHandler() {\n\t\tif (this.props.helpClickHandler) {\n\t\t\tthis.props.helpClickHandler(\n\t\t\t\tthis.props.controller.getForm().componentId,\n\t\t\t\tthis.props.help.data,\n\t\t\t\tthis.props.controller.getAppData());\n\t\t}\n\t}\n\ttextInputOnFocus() {\n\t\tthis.setState({ focused: true });\n\t}\n\n\ttextInputOnBlur() {\n\t\tthis.setState({ focused: false });\n\t}\n\n\thandleTitleChange(evt) {\n\t\t// Clear warning/error message on change.\n\t\tif (this.state.titleValidation !== null) {\n\t\t\tthis.setState({ titleValidation: null });\n\t\t}\n\t\tconst newTitle = evt.target.value;\n\t\tif (typeof this.titleChangeHandler === \"function\") {\n\t\t\tthis.titleChangeHandler(newTitle, (titleValidation) => {\n\t\t\t\tif (titleValidation && (typeof titleValidation === \"object\") && titleValidation.type && titleValidation.message) {\n\t\t\t\t\tthis.setState({ titleValidation: titleValidation });\n\t\t\t\t} else {\n\t\t\t\t\t// titleChangeHandler response is invalid. Don't show error/warning for title.\n\t\t\t\t\tthis.setState({ titleValidation: null });\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tthis.props.setTitle(newTitle);\n\t}\n\n\tcreateTitleActions() {\n\t\tif (this.props.titleInfo && this.props.titleInfo.Title.actionIds().length > 0) {\n\t\t\tthis.actionFactory = new ActionFactory(this.props.controller);\n\t\t\tconst actions = [];\n\t\t\tthis.props.titleInfo.Title.actionIds().forEach((actionRef, idx) => {\n\t\t\t\tconst actionMetadata = this.props.controller.getAction({ name: actionRef });\n\t\t\t\tconst action = this.actionFactory.generateAction(`${actionRef}-${idx}`, actionMetadata);\n\t\t\t\tactions.push(<div className=\"properties-title-editor-action-btn\" key={`${actionRef}-${idx}`}>\n\t\t\t\t\t{action}\n\t\t\t\t</div>);\n\t\t\t});\n\t\t\treturn (<div className=\"properties-title-editor-actions\">\n\t\t\t\t{actions}\n\t\t\t</div>);\n\t\t}\n\t\treturn null;\n\t}\n\n\trender() {\n\t\tif (this.props.title === null) {\n\t\t\treturn null;\n\t\t}\n\t\tconst propertiesTitleEditButtonLabel = PropertyUtils.formatMessage(this.props.controller.getReactIntl(), MESSAGE_KEYS.TITLE_EDITOR_LABEL);\n\t\tconst helpButtonLabel = PropertyUtils.formatMessage(this.props.controller.getReactIntl(), MESSAGE_KEYS.TITLE_EDITOR_HELPBUTTON_LABEL);\n\t\tconst descButtonLabel = PropertyUtils.formatMessage(this.props.controller.getReactIntl(), MESSAGE_KEYS.TITLE_EDITOR_DESCBUTTON_LABEL);\n\t\tconst closeButtonLabel = PropertyUtils.formatMessage(this.props.controller.getReactIntl(), MESSAGE_KEYS.PROPERTIESEDIT_CLOSEBUTTON_LABEL);\n\t\tconst titleValidationTypes = [CONDITION_MESSAGE_TYPE.ERROR, CONDITION_MESSAGE_TYPE.WARNING];\n\t\tconst titleWithWarning = get(this.state.titleValidation, \"type\", null) === CONDITION_MESSAGE_TYPE.WARNING;\n\t\tconst titleWithErrror = get(this.state.titleValidation, \"type\", null) === CONDITION_MESSAGE_TYPE.ERROR;\n\n\t\tconst propertiesTitleEdit = this.props.labelEditable === false || this.state.focused ? <div />\n\t\t\t: (\n\t\t\t\t<Button\n\t\t\t\t\tkind=\"ghost\"\n\t\t\t\t\tclassName=\"properties-title-editor-btn edit\"\n\t\t\t\t\tdata-id=\"edit\"\n\t\t\t\t\tonClick={this.editTitleClickHandler}\n\t\t\t\t\ttooltipPosition=\"bottom\"\n\t\t\t\t\ttooltipAlignment=\"end\"\n\t\t\t\t\trenderIcon={Edit}\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\ticonDescription={propertiesTitleEditButtonLabel}\n\t\t\t\t\thasIconOnly\n\t\t\t\t/>);\n\n\t\tconst renderTooltip = (isDescWithLink) => {\n\t\t\tconst { description } = this.props;\n\t\t\t// If description is present and has a link, show help button\n\t\t\tconst tooltipButton = isDescWithLink ? (\n\t\t\t\t<ToggletipActions>\n\t\t\t\t\t<Link\n\t\t\t\t\t\tclassName=\"properties-title-editor-desc-btn desc-help\"\n\t\t\t\t\t\tonClick={this.helpClickHandler}\n\t\t\t\t\t\tdata-id=\"desc-help\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{helpButtonLabel}\n\t\t\t\t\t</Link>\n\t\t\t\t</ToggletipActions>\n\t\t\t) : null;\n\n\t\t\treturn (\n\t\t\t\t<Toggletip className=\"properties-title-desc-tooltip\" align=\"bottom\" autoAlign>\n\t\t\t\t\t<ToggletipButton label={descButtonLabel}>\n\t\t\t\t\t\t<Information />\n\t\t\t\t\t</ToggletipButton>\n\t\t\t\t\t<ToggletipContent>\n\t\t\t\t\t\t<p className=\"properties-title-editor-desc\">{description}</p>\n\t\t\t\t\t\t{tooltipButton}\n\t\t\t\t\t</ToggletipContent>\n\t\t\t\t</Toggletip>\n\t\t\t);\n\t\t};\n\n\t\tconst renderHelpButton = () => {\n\t\t\tconst { help } = this.props;\n\n\t\t\treturn help ? (\n\t\t\t\t<Button\n\t\t\t\t\tkind=\"ghost\"\n\t\t\t\t\tclassName=\"properties-title-editor-btn help\"\n\t\t\t\t\tdata-id=\"help\"\n\t\t\t\t\tonClick={this.helpClickHandler}\n\t\t\t\t\ttooltipPosition=\"bottom\"\n\t\t\t\t\trenderIcon={Help}\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\ticonDescription={helpButtonLabel}\n\t\t\t\t\thasIconOnly\n\t\t\t\t/>\n\t\t\t) : null;\n\t\t};\n\n\t\tconst renderHelpOrTooltipButton = () => {\n\t\t\tconst { showHeadingDesc, description, help } = this.props;\n\n\t\t\t// If showHeadingDesc is true and description is present, show tooltip\n\t\t\tif (showHeadingDesc && description) {\n\t\t\t\treturn renderTooltip(help);\n\t\t\t}\n\n\t\t\t// If description is not present, show help button\n\t\t\treturn renderHelpButton();\n\t\t};\n\n\t\tconst helpButton = renderHelpOrTooltipButton();\n\n\t\tconst closeButton = this.props.closeHandler\n\t\t\t? (<div className=\"properties-close-button\">\n\t\t\t\t<Button\n\t\t\t\t\tkind=\"ghost\"\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\tdata-id=\"close\"\n\t\t\t\t\tonClick={this.props.closeHandler}\n\t\t\t\t\ttooltipPosition=\"left\"\n\t\t\t\t\trenderIcon={Close}\n\t\t\t\t\ticonDescription={closeButtonLabel}\n\t\t\t\t\thasIconOnly\n\t\t\t\t/>\n\t\t\t</div>)\n\t\t\t: null;\n\n\t\tlet heading = null;\n\t\tif (this.headingEnabled) {\n\t\t\tconst label = this.props.heading\n\t\t\t\t? (<div className=\"properties-title-heading-label\">\n\t\t\t\t\t{this.props.heading}\n\t\t\t\t</div>)\n\t\t\t\t: null;\n\t\t\tconst icon = this.props.icon && typeof this.props.icon === \"string\"\n\t\t\t\t? <Isvg className=\"properties-title-heading-icon\" src={this.props.icon} aria-hidden=\"true\" />\n\t\t\t\t: null;\n\t\t\tif (label || icon) {\n\t\t\t\theading = (<div className=\"properties-title-heading\">\n\t\t\t\t\t{icon}\n\t\t\t\t\t{label}\n\t\t\t\t\t{helpButton}\n\t\t\t\t</div>);\n\t\t\t}\n\t\t}\n\n\t\treturn (\n\t\t\t<div className={classNames(\"properties-title-editor\",\n\t\t\t\t{ \"properties-title-with-heading\": this.headingEnabled },\n\t\t\t\t{ \"properties-title-right-flyout-tabs-view\": this.props.rightFlyoutTabsView })}\n\t\t\t>\n\t\t\t\t{closeButton}\n\t\t\t\t{heading}\n\t\t\t\t<div className={classNames(\n\t\t\t\t\t\"properties-title-editor-input\",\n\t\t\t\t\t{\n\t\t\t\t\t\t\"properties-title-editor-with-help\": (this.props.help || this.props.description) &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!this.headingEnabled && !titleValidationTypes.includes(get(this.state.titleValidation, \"type\")),\n\t\t\t\t\t\t\"properties-title-editor-with-warning\": titleWithWarning,\n\t\t\t\t\t\t\"properties-title-editor-with-error\": titleWithErrror\n\t\t\t\t\t}\n\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<Layer level={this.props.controller.getLight() ? 1 : 0} className=\"properties-title-editor-layer\">\n\t\t\t\t\t\t<TextInput\n\t\t\t\t\t\t\tid={this.id}\n\t\t\t\t\t\t\tref={this.textInputRef}\n\t\t\t\t\t\t\tvalue={this.props.title}\n\t\t\t\t\t\t\tonChange={this.handleTitleChange}\n\t\t\t\t\t\t\tonKeyDown={(e) => this._handleKeyPress(e)}\n\t\t\t\t\t\t\treadOnly={this.props.labelEditable === false} // shows a non editable icon\n\t\t\t\t\t\t\tlabelText={this.labelText}\n\t\t\t\t\t\t\thideLabel\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\tonFocus={this.textInputOnFocus}\n\t\t\t\t\t\t\tonBlur={this.textInputOnBlur}\n\t\t\t\t\t\t\tinvalid={titleWithErrror}\n\t\t\t\t\t\t\tinvalidText={get(this.state.titleValidation, \"message\")}\n\t\t\t\t\t\t\twarn={titleWithWarning}\n\t\t\t\t\t\t\twarnText={get(this.state.titleValidation, \"message\")}\n\t\t\t\t\t\t\t{... this.state.focused && { className: \"properties-title-editor-focused\" }}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Layer>\n\t\t\t\t\t{titleValidationTypes.includes(get(this.state.titleValidation, \"type\")) ? null : propertiesTitleEdit}\n\t\t\t\t</div>\n\t\t\t\t{!this.headingEnabled && !titleValidationTypes.includes(get(this.state.titleValidation, \"type\")) ? helpButton : null}\n\t\t\t\t{this.createTitleActions()}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nTitleEditor.propTypes = {\n\thelpClickHandler: PropTypes.func,\n\tcloseHandler: PropTypes.func,\n\tcontroller: PropTypes.object.isRequired,\n\tlabelEditable: PropTypes.bool,\n\thelp: PropTypes.object,\n\ticon: PropTypes.string,\n\theading: PropTypes.string,\n\tshowHeading: PropTypes.bool,\n\tshowHeadingDesc: PropTypes.bool,\n\trightFlyoutTabsView: PropTypes.bool,\n\ttitleInfo: PropTypes.object,\n\tdescription: PropTypes.object,\n\ttitle: PropTypes.string, // set by redux\n\tsetTitle: PropTypes.func // set by redux\n};\n\nconst mapStateToProps = (state, ownProps) => ({\n\ttitle: state.componentMetadataReducer.title\n});\n\nconst mapDispatchToProps = (dispatch, ownProps) => ({\n\tsetTitle: (title) => {\n\t\tdispatch(setTitle(title));\n\t}\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(TitleEditor);\n","/*\n * Copyright 2017-2026 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport PropertiesModal from \"./../components/properties-modal\";\nimport PropertiesEditor from \"./../components/properties-editor\";\nimport TearSheet from \"../panels/tearsheet\";\nimport MainEditorPropertiesButtons from \"./../components/main-editor-properties-buttons\";\nimport EditorForm from \"./../components/editor-form\";\nimport Form from \"./../form/Form\";\nimport CommonPropertiesAction from \"./../../command-actions/commonPropertiesAction\";\nimport PropertiesController from \"./../properties-controller\";\nimport * as PropertyUtils from \"./../util/property-utils\";\nimport { MESSAGE_KEYS, CONDITION_RETURN_VALUE_HANDLING, CARBON_ICONS, APPLY, CANCEL, ACTIONS, CATEGORY_VIEW } from \"./../constants/constants\";\nimport { Size } from \"./../constants/form-constants\";\nimport { validateParameterDefAgainstSchema } from \"../schema-validator/properties-schema-validator.js\";\nimport { has, isEqual, omit, pick, cloneDeep, debounce } from \"lodash\";\nimport Icon from \"./../../icons/icon.jsx\";\nimport { Button } from \"@carbon/react\";\nimport { Provider } from \"react-redux\";\nimport logger from \"../../../utils/logger\";\nimport TitleEditor from \"./../components/title-editor\";\nimport classNames from \"classnames\";\n\nimport { injectIntl } from \"react-intl\";\nimport styles from \"./properties-main-widths.module.scss\";\n\nconst FLYOUT_WIDTH_SMALL = parseInt(styles.flyoutWidthSmall, 10);\nconst FLYOUT_WIDTH_MEDIUM = parseInt(styles.flyoutWidthMedium, 10);\nconst FLYOUT_WIDTH_LARGE = parseInt(styles.flyoutWidthLarge, 10);\nconst FLYOUT_WIDTH_MAX = parseInt(styles.flyoutWidthMax, 10);\n\nclass PropertiesMain extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.commonProperties = React.createRef();\n\t\tthis.propertiesController = new PropertiesController();\n\t\tthis.propertiesController.setPropertiesConfig(this.props.propertiesConfig);\n\t\t// Persist editorSize when resize() is not called\n\t\tif (this.props.propertiesInfo.initialEditorSize) {\n\t\t\tthis.propertiesController.setEditorSize(this.props.propertiesInfo.initialEditorSize);\n\t\t}\n\t\tif (typeof props.customControls !== \"undefined\") {\n\t\t\tthis.propertiesController.setCustomControls(props.customControls);\n\t\t}\n\t\tthis.propertiesController.setCustomActions(props.customActions);\n\t\tthis.propertiesController.setConditionOps(props.customConditionOps);\n\t\tthis.propertiesController.setLight(props.light);\n\t\tthis.propertiesController.setAppData(props.propertiesInfo.appData);\n\t\tthis.propertiesController.setExpressionInfo(props.propertiesInfo.expressionInfo);\n\t\tthis.setCallbacks();\n\t\tthis.setForm(props.propertiesInfo, false);\n\t\tthis.previousErrorMessages = {};\n\t\t// this has to be after setForm because setForm clears all error messages.\n\t\t// Validate all validationDefinitions but show warning messages for \"colDoesExists\" condition only\n\t\tthis.propertiesController.validatePropertiesValues(false);\n\t\tif (props.propertiesInfo.messages) {\n\t\t\tthis.propertiesController.validatePropertiesValues(true);\n\t\t\tthis.previousErrorMessages = this.propertiesController.getAllErrorMessages();\n\t\t}\n\t\t// Callback after all values and messages are set\n\t\tif (this.props.callbacks.propertyListener) {\n\t\t\tthis.props.callbacks.propertyListener({ action: ACTIONS.PROPERTIES_LOADED });\n\t\t}\n\t\tthis.currentParameters = this.propertiesController.getPropertyValues();\n\t\tconst editorSize = this.getEditorSize();\n\t\tthis.state = {\n\t\t\tshowPropertiesButtons: true,\n\t\t\teditorSize: editorSize,\n\t\t\tshowResizeBtn: true\n\t\t};\n\t\tthis.applyPropertiesEditing = this.applyPropertiesEditing.bind(this);\n\t\tthis.showPropertiesButtons = this.showPropertiesButtons.bind(this);\n\t\tthis.updateEditorSize = this.updateEditorSize.bind(this);\n\t\tthis.cancelHandler = this.cancelHandler.bind(this);\n\t\tthis._getOverrideSize = this._getOverrideSize.bind(this);\n\t\tthis._getResizeButton = this._getResizeButton.bind(this);\n\t\tthis._isResizeButtonRequired = this._isResizeButtonRequired.bind(this);\n\t\tthis.onBlur = this.onBlur.bind(this);\n\t\tthis.detectResize = this.detectResize.bind(this);\n\t\t// Rate limit how often the panel rerenders on size change\n\t\tthis.detectResizeThrottled = debounce(this.detectResize, 500);\n\t\t// used to tracked when the resize button is clicked and ignore detectResize\n\t\tthis.resizeClicked = false;\n\t\t// Track panel height to avoid resize calls whenever height changes\n\t\tthis.lastPanelHeight = 0;\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.resizeObserver = new ResizeObserver((entries) => {\n\t\t\tfor (const entry of entries) {\n\t\t\t\tthis.detectResizeThrottled(entry.contentRect, entry.target);\n\t\t\t}\n\t\t});\n\t\tif (this.commonProperties.current) {\n\t\t\tthis.resizeObserver.observe(this.commonProperties.current);\n\t\t}\n\n\t\tthis.props.callbacks.setPropertiesHasMounted();\n\t}\n\n\tUNSAFE_componentWillReceiveProps(newProps) {\n\t\tif (this.props.light !== newProps.light) { // set the new light prop in controller\n\t\t\tthis.propertiesController.setLight(newProps.light);\n\t\t}\n\t\tif (newProps.propertiesInfo) {\n\t\t\tif (!isEqual(Object.keys(newProps.propertiesInfo), Object.keys(this.props.propertiesInfo)) ||\n\t\t\t\t(newProps.propertiesInfo.parameterDef && !isEqual(newProps.propertiesInfo.parameterDef, this.props.propertiesInfo.parameterDef)) ||\n\t\t\t\t(newProps.propertiesInfo.appData && !isEqual(newProps.propertiesInfo.appData, this.props.propertiesInfo.appData))) {\n\t\t\t\tconst sameParameterDefRendered = newProps.propertiesInfo.id === this.props.propertiesInfo.id;\n\t\t\t\tthis.setForm(newProps.propertiesInfo, sameParameterDefRendered);\n\t\t\t\tconst newEditorSize = this.propertiesController.getForm().editorSize;\n\t\t\t\tif (this.state.editorSize !== newEditorSize) {\n\t\t\t\t\tthis.setState({ editorSize: newEditorSize });\n\t\t\t\t}\n\t\t\t\t// Reset property values for new parameterDef\n\t\t\t\tif (newProps.propertiesInfo.id && !sameParameterDefRendered) {\n\t\t\t\t\tthis.currentParameters = this.propertiesController.getPropertyValues();\n\t\t\t\t}\n\t\t\t\tthis.propertiesController.setAppData(newProps.propertiesInfo.appData);\n\t\t\t\tif (typeof newProps.customControls !== \"undefined\") {\n\t\t\t\t\tthis.propertiesController.setCustomControls(newProps.customControls);\n\t\t\t\t}\n\t\t\t\tthis.propertiesController.setCustomActions(newProps.customActions);\n\t\t\t\tthis.propertiesController.setConditionOps(newProps.customConditionOps);\n\t\t\t\tthis.previousErrorMessages = {};\n\t\t\t\tif (newProps.propertiesInfo.messages) {\n\t\t\t\t\tthis.propertiesController.validatePropertiesValues();\n\t\t\t\t\tthis.previousErrorMessages = this.propertiesController.getAllErrorMessages();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (newProps.propertiesConfig && !isEqual(newProps.propertiesConfig, this.propertiesController.getPropertiesConfig())) {\n\t\t\tthis.propertiesController.setPropertiesConfig(newProps.propertiesConfig);\n\t\t}\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\tif (!isEqual(prevProps.callbacks, this.props.callbacks)) {\n\t\t\tthis.setCallbacks();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.resizeObserver?.disconnect();\n\t}\n\n\tonBlur(e) {\n\t\t// apply properties when focus leave common properties.\n\t\t// subdialogs and summary panel causes focus to leave but shouldn't apply settings\n\t\tif (this.props.propertiesConfig.applyOnBlur &&\n\t\t\t!this.commonProperties?.current?.contains(e.relatedTarget) &&\n\t\t\t!this.propertiesController.isSummaryPanelShowing() && !this.propertiesController.isSubPanelsShowing()) {\n\t\t\tthis.applyPropertiesEditing(false);\n\t\t}\n\t}\n\n\tsetCallbacks() {\n\t\tthis.propertiesController.setHandlers({\n\t\t\tcontrollerHandler: this.props.callbacks.controllerHandler,\n\t\t\tpropertyListener: this.props.callbacks.propertyListener,\n\t\t\tactionHandler: this.props.callbacks.actionHandler,\n\t\t\tcustomHeaderHandler: this.props.callbacks.customHeaderHandler,\n\t\t\tbuttonHandler: this.props.callbacks.buttonHandler,\n\t\t\tbuttonIconHandler: this.props.callbacks.buttonIconHandler,\n\t\t\tvalidationHandler: this.props.callbacks.validationHandler,\n\t\t\ttitleChangeHandler: this.props.callbacks.titleChangeHandler,\n\t\t\ttooltipLinkHandler: this.props.callbacks.tooltipLinkHandler,\n\t\t\tpropertyIconHandler: this.props.callbacks.propertyIconHandler,\n\t\t\tfilterItemsHandler: this.props.callbacks.filterItemsHandler,\n\t\t\tpanelTitleHandler: this.props.callbacks.panelTitleHandler\n\t\t});\n\t}\n\n\tsetForm(propertiesInfo, sameParameterDefRendered) {\n\t\tlet formData = null;\n\n\t\tif (propertiesInfo.parameterDef) {\n\t\t\tif (this.props.propertiesConfig.schemaValidation) {\n\t\t\t\tvalidateParameterDefAgainstSchema(propertiesInfo.parameterDef);\n\t\t\t}\n\t\t\tformData = Form.makeForm(propertiesInfo.parameterDef, this.props.propertiesConfig.containerType);\n\t\t}\n\n\t\tthis.propertiesController.setForm(formData, this.props.intl, sameParameterDefRendered);\n\t\tif (formData) {\n\t\t\tthis.originalTitle = formData.label;\n\t\t}\n\n\t\t// set initial values for undo\n\t\tthis.initialValueInfo = { additionalInfo: { messages: [] }, undoInfo: {} };\n\t\tthis.uiParameterKeys = this._getUiOnlyKeys();\n\t\tthis.initialValueInfo = this._setValueInforProperties(this.initialValueInfo);\n\t\tif (propertiesInfo.messages) {\n\t\t\tthis.initialValueInfo.additionalInfo.messages = cloneDeep(propertiesInfo.messages);\n\t\t}\n\t\tthis.initialValueInfo.undoInfo.properties = this.propertiesController.getPropertyValues(); // used for undoing when node editor open\n\t\tthis.initialValueInfo.undoInfo.messages = this.propertiesController.getAllErrorMessages(); // used for undoing when node editor open\n\t\tthis.initialValueInfo.additionalInfo.title = this.propertiesController.getTitle();\n\t}\n\n\tgetApplyButtonLabel() {\n\t\tif (this.props.propertiesConfig.buttonLabels && this.props.propertiesConfig.buttonLabels.primary) {\n\t\t\treturn this.props.propertiesConfig.buttonLabels.primary;\n\t\t}\n\t\treturn PropertyUtils.formatMessage(this.props.intl, MESSAGE_KEYS.PROPERTIESEDIT_APPLYBUTTON_LABEL);\n\t}\n\n\tgetRejectButtonLabel() {\n\t\tif (this.props.propertiesConfig.buttonLabels && this.props.propertiesConfig.buttonLabels.secondary) {\n\t\t\treturn this.props.propertiesConfig.buttonLabels.secondary;\n\t\t}\n\t\treturn PropertyUtils.formatMessage(this.props.intl, MESSAGE_KEYS.PROPERTIESEDIT_REJECTBUTTON_LABEL);\n\t}\n\n\tgetPropertiesActionLabel() {\n\t\tif (this.props.callbacks.propertiesActionLabelHandler) {\n\t\t\tconst label = this.props.callbacks.propertiesActionLabelHandler();\n\t\t\tif (label) {\n\t\t\t\treturn label;\n\t\t\t}\n\t\t}\n\t\treturn PropertyUtils.formatMessage(this.props.intl, MESSAGE_KEYS.PROPERTIES_ACTION_LABEL, { node_label: this.propertiesController.getTitle() });\n\t}\n\n\tgetEditorSize() {\n\t\t// Determine whether to persist initialEditorSize or set the defaultEditorSize in certain cases\n\t\tconst defaultEditorSize = this.propertiesController.getForm().editorSize;\n\t\tconst initialEditorSize = this.props.propertiesInfo.initialEditorSize;\n\t\t// When defaultEditorSize=\"small\", initialEditorSize can be \"small\" or \"medium\". For any other value, return defaultEditorSize.\n\t\t// When defaultEditorSize=\"medium\", initialEditorSize can be \"medium\" or \"large\". For any other value, return defaultEditorSize.\n\t\t// When defaultEditorSize=\"large\", initialEditorSize can be \"large\" or \"max\". For any other value, return defaultEditorSize.\n\t\tif (defaultEditorSize === Size.SMALL && (initialEditorSize === Size.LARGE || initialEditorSize === Size.MAX)) {\n\t\t\treturn defaultEditorSize;\n\t\t} else if (defaultEditorSize === Size.MEDIUM && (initialEditorSize === Size.SMALL || initialEditorSize === Size.MAX)) {\n\t\t\treturn defaultEditorSize;\n\t\t} else if (defaultEditorSize === Size.LARGE && (initialEditorSize === Size.SMALL || initialEditorSize === Size.MEDIUM)) {\n\t\t\treturn defaultEditorSize;\n\t\t} else if (defaultEditorSize === Size.MAX) {\n\t\t\treturn defaultEditorSize;\n\t\t}\n\t\treturn (initialEditorSize ? initialEditorSize : defaultEditorSize);\n\t}\n\n\t_getOverrideSize() {\n\t\tconst pixelWidth = this.propertiesController.getForm().pixelWidth;\n\t\tconst editorSizeInForm = this.propertiesController.getForm().editorSize;\n\t\tlet overrideSize = null;\n\n\t\tif (pixelWidth) {\n\t\t\tif (editorSizeInForm === Size.SMALL) {\n\t\t\t\tif (this.state.editorSize === Size.SMALL && pixelWidth.min) {\n\t\t\t\t\toverrideSize = pixelWidth.min;\n\n\t\t\t\t} else if (this.state.editorSize === Size.MEDIUM && pixelWidth.max) {\n\t\t\t\t\toverrideSize = pixelWidth.max;\n\t\t\t\t}\n\n\t\t\t} else if (editorSizeInForm === Size.MEDIUM) {\n\t\t\t\tif (this.state.editorSize === Size.MEDIUM && pixelWidth.min) {\n\t\t\t\t\toverrideSize = pixelWidth.min;\n\n\t\t\t\t} else if (this.state.editorSize === Size.LARGE && pixelWidth.max) {\n\t\t\t\t\toverrideSize = pixelWidth.max;\n\t\t\t\t}\n\n\t\t\t} else if (editorSizeInForm === Size.LARGE) {\n\t\t\t\tif (this.state.editorSize === Size.LARGE && pixelWidth.min) {\n\t\t\t\t\toverrideSize = pixelWidth.min;\n\n\t\t\t\t} else if (this.state.editorSize === Size.MAX && pixelWidth.max) {\n\t\t\t\t\toverrideSize = pixelWidth.max;\n\t\t\t\t}\n\n\t\t\t} else if (editorSizeInForm === Size.MAX && pixelWidth.max) {\n\t\t\t\toverrideSize = pixelWidth.max;\n\t\t\t}\n\t\t}\n\t\treturn overrideSize;\n\t}\n\n\t_getResizeButton() {\n\t\tlet resizeButton = <Icon type={CARBON_ICONS.CHEVRONARROWS.LEFT} className=\"properties-resize-caret-left\" />;\n\t\tif (this.propertiesController.getForm().editorSize === Size.SMALL) {\n\t\t\tif (this.state.editorSize === Size.MEDIUM) {\n\t\t\t\tresizeButton = <Icon type={CARBON_ICONS.CHEVRONARROWS.RIGHT} className=\"properties-resize-caret-right\" />;\n\t\t\t}\n\t\t} else if (this.propertiesController.getForm().editorSize === Size.MEDIUM) {\n\t\t\tif (this.state.editorSize === Size.LARGE) {\n\t\t\t\tresizeButton = <Icon type={CARBON_ICONS.CHEVRONARROWS.RIGHT} className=\"properties-resize-caret-right\" />;\n\t\t\t}\n\t\t} else if (this.propertiesController.getForm().editorSize === Size.LARGE) {\n\t\t\tif (this.state.editorSize === Size.MAX) {\n\t\t\t\tresizeButton = <Icon type={CARBON_ICONS.CHEVRONARROWS.RIGHT} className=\"properties-resize-caret-right\" />;\n\t\t\t}\n\t\t}\n\t\treturn resizeButton;\n\t}\n\n\t_isResizeButtonRequired() {\n\t\tconst pixelWidth = this.propertiesController.getForm().pixelWidth;\n\n\t\tif (this.props.propertiesConfig.enableResize !== false) {\n\t\t\tif (pixelWidth) {\n\t\t\t\tif (!pixelWidth.min && !pixelWidth.max) {\n\t\t\t\t\tlogger.warn(\"Pixel width was provided but no min or max property was found in it.\");\n\t\t\t\t\treturn true;\n\n\t\t\t\t} else if (this.propertiesController.getForm().editorSize === Size.SMALL) {\n\t\t\t\t\tif (pixelWidth.min && !pixelWidth.max && pixelWidth.min >= FLYOUT_WIDTH_MEDIUM) {\n\t\t\t\t\t\tlogger.warn(\"No resize button shown. Pixel width min size is greater than or equal to default max size: \" + FLYOUT_WIDTH_MEDIUM);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else if (!pixelWidth.min && pixelWidth.max && pixelWidth.max <= FLYOUT_WIDTH_SMALL) {\n\t\t\t\t\t\tlogger.warn(\"No resize button shown. Pixel width max size is less than or equal to default min size: \" + FLYOUT_WIDTH_SMALL);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else if (pixelWidth.min >= pixelWidth.max) {\n\t\t\t\t\t\tlogger.warn(\"No resize button shown. Pixel width min size is greater than or equal to pixel width max size.\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t} else if (this.propertiesController.getForm().editorSize === Size.MEDIUM) {\n\t\t\t\t\tif (pixelWidth.min && !pixelWidth.max && pixelWidth.min >= FLYOUT_WIDTH_LARGE) {\n\t\t\t\t\t\tlogger.warn(\"No resize button shown. Pixel width min size is greater than or equal to default max size: \" + FLYOUT_WIDTH_LARGE);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else if (!pixelWidth.min && pixelWidth.max && pixelWidth.max <= FLYOUT_WIDTH_MEDIUM) {\n\t\t\t\t\t\tlogger.warn(\"No resize button shown. Pixel width max size is less than or equal to default min size: \" + FLYOUT_WIDTH_MEDIUM);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else if (pixelWidth.min >= pixelWidth.max) {\n\t\t\t\t\t\tlogger.warn(\"No resize button shown. Pixel width min size is greater than or equal to default max size.\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t} else if (this.propertiesController.getForm().editorSize === Size.LARGE) {\n\t\t\t\t\tif (pixelWidth.min && !pixelWidth.max && pixelWidth.min >= FLYOUT_WIDTH_MAX) {\n\t\t\t\t\t\tlogger.warn(\"No resize button shown. Pixel width min size is greater than or equal to default max size: \" + FLYOUT_WIDTH_MAX);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else if (!pixelWidth.min && pixelWidth.max && pixelWidth.max <= FLYOUT_WIDTH_LARGE) {\n\t\t\t\t\t\tlogger.warn(\"No resize button shown. Pixel width max size is less than or equal to default min size: \" + FLYOUT_WIDTH_LARGE);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else if (pixelWidth.min >= pixelWidth.max) {\n\t\t\t\t\t\tlogger.warn(\"No resize button shown. Pixel width min size is greater than or equal to default max size.\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t} else if (this.propertiesController.getForm().editorSize === Size.MAX) {\n\t\t\t\t\tif (pixelWidth.min) {\n\t\t\t\t\t\tlogger.warn(\"No resize button shown. Pixel width min size ignored.\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t} else if (this.propertiesController.getForm().editorSize === Size.MAX) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t// options is an object of config options where\n\t// applyProperties: true - this function is called from applyPropertiesEditing\n\t_setValueInforProperties(valueInfo, options) {\n\t\tconst applyProperties = options && options.applyProperties === true;\n\t\tconst filterHiddenDisabled = this.props.propertiesConfig.conditionReturnValueHandling === CONDITION_RETURN_VALUE_HANDLING.NULL;\n\n\t\tconst properties = this.propertiesController.getPropertyValues({ filterHiddenDisabled: filterHiddenDisabled, applyProperties: applyProperties,\n\t\t\tvalueFilters: this.props.propertiesConfig.returnValueFiltering });\n\t\tif (this.uiParameterKeys.length > 0) {\n\t\t\tvalueInfo.properties = omit(properties, this.uiParameterKeys);\n\t\t\tvalueInfo.uiProperties = pick(properties, this.uiParameterKeys);\n\t\t} else {\n\t\t\tvalueInfo.properties = properties;\n\t\t}\n\t\treturn valueInfo;\n\t}\n\n\t// this will return an array of control names that are ui only controls.\n\t_getUiOnlyKeys() {\n\t\tconst uiOnlyKeys = [];\n\t\tconst controls = this.propertiesController.getControls();\n\t\tif (Object.keys(controls).length > 0) {\n\t\t\tfor (const controlKey in controls) {\n\t\t\t\tif (!has(controls, controlKey)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst control = controls[controlKey];\n\t\t\t\tif (control.uionly) {\n\t\t\t\t\tuiOnlyKeys.push(controlKey);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn uiOnlyKeys;\n\t}\n\n\t// cancelSource is \"apply\" if called from applyPropertiesEditing(), else \"cancel\"\n\tcancelHandler(cancelSource) {\n\t\tif (this.props.callbacks.closePropertiesDialog) {\n\t\t\tthis.props.callbacks.closePropertiesDialog(cancelSource);\n\t\t}\n\t}\n\n\tapplyPropertiesEditing(closeProperties) {\n\t\t// validate all the input values.\n\t\tthis.propertiesController.validatePropertiesValues();\n\t\tconst newErrorMessages = this.propertiesController.getAllErrorMessages();\n\n\t\t// only save if title or parameters have changed or new error messages\n\t\tif (this.originalTitle !== this.propertiesController.getTitle() ||\n\t\t\t\t(this.currentParameters && JSON.stringify(this.currentParameters) !==\n\t\t\t\tJSON.stringify(this.propertiesController.getPropertyValues())) ||\n\t\t\t\t(JSON.stringify(this.previousErrorMessages) !== JSON.stringify(newErrorMessages)) ||\n\t\t\t\tthis.props.propertiesConfig.applyPropertiesWithoutEdit) {\n\n\t\t\t// set current values\n\t\t\tlet valueInfo = { additionalInfo: {}, undoInfo: {} };\n\t\t\tvalueInfo = this._setValueInforProperties(valueInfo, { applyProperties: true });\n\t\t\tvalueInfo.undoInfo.properties = this.propertiesController.getPropertyValues();\n\t\t\tconst errorMessages = this.propertiesController.getErrorMessages(true, true, true, false);\n\t\t\tif (errorMessages) {\n\t\t\t\tvalueInfo.additionalInfo.messages = errorMessages;\n\t\t\t}\n\t\t\tvalueInfo.undoInfo.messages = this.propertiesController.getAllErrorMessages();\n\t\t\tif (this.propertiesController.getTitle()) {\n\t\t\t\tvalueInfo.additionalInfo.title = this.propertiesController.getTitle();\n\t\t\t}\n\t\t\tconst propertiesActionLabel = this.getPropertiesActionLabel();\n\t\t\tconst command = new CommonPropertiesAction(valueInfo, this.initialValueInfo,\n\t\t\t\tthis.props.propertiesInfo.appData, this.props.callbacks.applyPropertyChanges, propertiesActionLabel);\n\t\t\tthis.propertiesController.getCommandStack().do(command);\n\n\t\t\t// if we don't close the dialog, set the currentParameters to the new parameters\n\t\t\t// so we don't save again unnecessarily when clicking save but no additional changes happened\n\t\t\tthis.currentParameters = this.propertiesController.getPropertyValues();\n\t\t\t// reset undo values\n\t\t\tthis.initialValueInfo = cloneDeep(valueInfo);\n\t\t\tthis.previousErrorMessages = this.propertiesController.getAllErrorMessages();\n\t\t}\n\t\tif (closeProperties) {\n\t\t\tthis.cancelHandler(APPLY); // close property editor\n\t\t}\n\t}\n\n\tshowPropertiesButtons(state) {\n\t\tthis.setState({ showPropertiesButtons: state });\n\t}\n\n\tupdateEditorSize(newEditorSize) {\n\t\tthis.setState({\n\t\t\teditorSize: newEditorSize\n\t\t});\n\t\tthis.propertiesController.setEditorSize(newEditorSize);\n\t}\n\n\tresize() {\n\t\tthis.resizeClicked = true;\n\t\tif (this.propertiesController.getForm().editorSize === Size.SMALL) {\n\t\t\tif (this.state.editorSize === Size.SMALL) {\n\t\t\t\tthis.updateEditorSize(Size.MEDIUM);\n\t\t\t} else {\n\t\t\t\tthis.updateEditorSize(Size.SMALL);\n\t\t\t}\n\t\t} else if (this.propertiesController.getForm().editorSize === Size.MEDIUM) {\n\t\t\tif (this.state.editorSize === Size.MEDIUM) {\n\t\t\t\tthis.updateEditorSize(Size.LARGE);\n\t\t\t} else {\n\t\t\t\tthis.updateEditorSize(Size.MEDIUM);\n\t\t\t}\n\t\t} else if (this.propertiesController.getForm().editorSize === Size.LARGE) {\n\t\t\tif (this.state.editorSize === Size.LARGE) {\n\t\t\t\tthis.updateEditorSize(Size.MAX);\n\t\t\t} else {\n\t\t\t\tthis.updateEditorSize(Size.LARGE);\n\t\t\t}\n\t\t}\n\t}\n\n\tdetectResize(contentRect, target) {\n\t\tif (contentRect.height === this.lastPanelHeight) {\n\t\t\t// only hide resize button if resize wasn't from clicking resize button\n\t\t\tif (!this.resizeClicked) {\n\t\t\t\tthis.setState({ showResizeBtn: false });\n\t\t\t}\n\t\t\tthis.resizeClicked = false;\n\t\t}\n\t\tthis.lastPanelHeight = contentRect.height;\n\t}\n\n\trender() {\n\t\tconst applyOnBlurEnabled = this.props.propertiesConfig.applyOnBlur && this.props.propertiesConfig.rightFlyout;\n\t\tlet cancelHandler = this.cancelHandler.bind(this, CANCEL);\n\t\t// when onBlur cancel shouldn't be rendered.\n\t\tif (applyOnBlurEnabled) {\n\t\t\tcancelHandler = null;\n\t\t}\n\t\tconst applyLabel = this.getApplyButtonLabel();\n\t\tconst rejectLabel = this.getRejectButtonLabel();\n\t\tconst propertiesLabel = this.propertiesController.getTitle();\n\n\t\tconst formData = this.propertiesController.getForm();\n\t\tif (formData !== null) {\n\t\t\tlet propertiesDialog = [];\n\t\t\tlet propertiesTitle = <div />;\n\t\t\tlet buttonsContainer = <div />;\n\t\t\tlet resizeBtn = null;\n\t\t\tlet hasHeading = false;\n\n\t\t\tif (this.props.propertiesConfig.rightFlyout) {\n\t\t\t\tpropertiesTitle = (<TitleEditor\n\t\t\t\t\tlabelEditable={formData.labelEditable}\n\t\t\t\t\thelp={formData.help}\n\t\t\t\t\tdescription={formData.description}\n\t\t\t\t\tcontroller={this.propertiesController}\n\t\t\t\t\thelpClickHandler={this.props.callbacks.helpClickHandler}\n\t\t\t\t\tcloseHandler={applyOnBlurEnabled ? this.applyPropertiesEditing.bind(this, true) : null}\n\t\t\t\t\ticon={formData.icon}\n\t\t\t\t\theading={formData.heading}\n\t\t\t\t\tshowHeading={this.props.propertiesConfig.heading}\n\t\t\t\t\tshowHeadingDesc={this.props.propertiesConfig.showHeadingDesc}\n\t\t\t\t\ttitleInfo={formData.title}\n\t\t\t\t\trightFlyoutTabsView={this.props.propertiesConfig.categoryView === CATEGORY_VIEW.TABS}\n\t\t\t\t/>);\n\n\t\t\t\thasHeading = this.props.propertiesConfig.heading && (formData.icon || formData.heading);\n\n\t\t\t\tbuttonsContainer = (<MainEditorPropertiesButtons\n\t\t\t\t\tcontroller={this.propertiesController}\n\t\t\t\t\tokHandler={!applyOnBlurEnabled ? this.applyPropertiesEditing.bind(this, true) : null}\n\t\t\t\t\tcancelHandler={cancelHandler}\n\t\t\t\t\tapplyLabel={applyLabel}\n\t\t\t\t\trejectLabel={rejectLabel}\n\t\t\t\t\tshowPropertiesButtons={this.state.showPropertiesButtons}\n\t\t\t\t\tdisableSaveOnRequiredErrors={this.props.propertiesConfig.disableSaveOnRequiredErrors}\n\t\t\t\t/>);\n\t\t\t\t// Show Resize Button only under below conditions\n\t\t\t\t// 1. Flyout is not dragged to resize its width.\n\t\t\t\t// 2. If pixel_width is set include that to test if button should be shown.\n\t\t\t\tif (this._isResizeButtonRequired() && this.state.showResizeBtn) {\n\t\t\t\t\tconst resizeIcon = this._getResizeButton();\n\t\t\t\t\t// Resize button label can be \"Expand\" or \"Contract\"\n\t\t\t\t\tconst resizeBtnLabel = (resizeIcon.props && resizeIcon.props.className === \"properties-resize-caret-left\")\n\t\t\t\t\t\t? PropertyUtils.formatMessage(this.props.intl, MESSAGE_KEYS.PROPERTIESEDIT_RESIZEBUTTON_EXPAND_LABEL)\n\t\t\t\t\t\t: PropertyUtils.formatMessage(this.props.intl, MESSAGE_KEYS.PROPERTIESEDIT_RESIZEBUTTON_CONTRACT_LABEL);\n\t\t\t\t\tresizeBtn = (\n\t\t\t\t\t\t<Button kind=\"ghost\" className=\"properties-btn-resize\" onClick={this.resize.bind(this)} aria-label={resizeBtnLabel} >\n\t\t\t\t\t\t\t{resizeIcon}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst editorForm = (<EditorForm\n\t\t\t\tkey=\"editor-form-key\"\n\t\t\t\tcontroller={this.propertiesController}\n\t\t\t\tadditionalComponents={this.props.propertiesInfo.additionalComponents}\n\t\t\t\tshowPropertiesButtons={this.showPropertiesButtons}\n\t\t\t\tcustomPanels={this.props.customPanels}\n\t\t\t\trightFlyout={this.props.propertiesConfig.rightFlyout}\n\t\t\t\tcategoryView={this.props.propertiesConfig.categoryView}\n\t\t\t\tshowAlertsTab={this.props.propertiesConfig.showAlertsTab !== false}\n\t\t\t/>);\n\n\t\t\tif (this.props.propertiesConfig.containerType === \"Editing\") {\n\t\t\t\tpropertiesDialog = (<PropertiesEditor\n\t\t\t\t\tapplyLabel={applyLabel}\n\t\t\t\t\trejectLabel={rejectLabel}\n\t\t\t\t\tbsSize={this.state.editorSize}\n\t\t\t\t\ttitle={propertiesLabel}\n\t\t\t\t\tokHandler={this.applyPropertiesEditing.bind(this, true)}\n\t\t\t\t\tcancelHandler={cancelHandler}\n\t\t\t\t\tshowPropertiesButtons={this.state.showPropertiesButtons}\n\t\t\t\t>\n\t\t\t\t\t{editorForm}\n\t\t\t\t</PropertiesEditor>);\n\t\t\t} else if (this.props.propertiesConfig.containerType === \"Custom\") {\n\t\t\t\tpropertiesDialog = (\n\t\t\t\t\t<div className={classNames(\"properties-custom-container\",\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"properties-custom-container-with-heading\": !applyOnBlurEnabled && hasHeading,\n\t\t\t\t\t\t\t\"properties-custom-container-applyOnBlur\": applyOnBlurEnabled && !hasHeading,\n\t\t\t\t\t\t\t\"properties-custom-container-applyOnBlur-with-heading\": applyOnBlurEnabled && hasHeading\n\t\t\t\t\t\t}\n\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{editorForm}\n\t\t\t\t\t</div>);\n\t\t\t} else if (this.props.propertiesConfig.containerType === \"Tearsheet\") {\n\t\t\t\tpropertiesDialog = (<TearSheet\n\t\t\t\t\topen\n\t\t\t\t\tonCloseCallback={this.props.propertiesConfig.applyOnBlur ? this.applyPropertiesEditing.bind(this, true) : null}\n\t\t\t\t\ttearsheet={{\n\t\t\t\t\t\ttitle: propertiesLabel,\n\t\t\t\t\t\tcontent: editorForm\n\t\t\t\t\t}}\n\t\t\t\t\tapplyLabel={applyLabel}\n\t\t\t\t\trejectLabel={rejectLabel}\n\t\t\t\t\tokHandler={this.applyPropertiesEditing.bind(this, true)}\n\t\t\t\t\tcancelHandler={cancelHandler}\n\t\t\t\t\tshowPropertiesButtons={this.state.showPropertiesButtons}\n\t\t\t\t\tapplyOnBlur={this.props.propertiesConfig.applyOnBlur}\n\t\t\t\t\tcontroller={this.propertiesController}\n\t\t\t\t\tdisableSaveOnRequiredErrors={this.props.propertiesConfig.disableSaveOnRequiredErrors}\n\t\t\t\t/>);\n\t\t\t} else { // Modal\n\t\t\t\tpropertiesDialog = (<PropertiesModal\n\t\t\t\t\tonHide={this.props.callbacks.closePropertiesDialog}\n\t\t\t\t\ttitle={propertiesLabel}\n\t\t\t\t\tbsSize={this.state.editorSize}\n\t\t\t\t\tokHandler={this.applyPropertiesEditing.bind(this, true)}\n\t\t\t\t\tcancelHandler={cancelHandler}\n\t\t\t\t\tshowPropertiesButtons={this.state.showPropertiesButtons}\n\t\t\t\t\tapplyLabel={applyLabel}\n\t\t\t\t\trejectLabel={rejectLabel}\n\t\t\t\t>\n\t\t\t\t\t{editorForm}\n\t\t\t\t</PropertiesModal>);\n\t\t\t}\n\n\t\t\tlet propertiesSizeClassname = `properties-${this.state.editorSize}`;\n\n\t\t\tconst overrideSize = this._getOverrideSize();\n\t\t\tlet overrideStyle = null;\n\t\t\tif (overrideSize !== null) {\n\t\t\t\t// Add custom classname when custom editor size is set\n\t\t\t\tpropertiesSizeClassname = \"properties-custom-size\";\n\t\t\t\toverrideStyle = { width: overrideSize + \"px\" };\n\t\t\t}\n\n\t\t\tconst className = classNames(\"properties-wrapper\",\n\t\t\t\t{\n\t\t\t\t\t\"properties-right-flyout\": this.props.propertiesConfig.rightFlyout,\n\t\t\t\t\t\"properties-light-enabled\": this.props.light,\n\t\t\t\t\t\"properties-light-disabled\": !this.props.light\n\t\t\t\t},\n\t\t\t\tpropertiesSizeClassname);\n\t\t\treturn (\n\t\t\t\t<Provider store={this.propertiesController.getStore()}>\n\t\t\t\t\t<div className=\"properties-right-flyout-container\">\n\t\t\t\t\t\t<aside\n\t\t\t\t\t\t\taria-label={PropertyUtils.formatMessage(this.props.intl, MESSAGE_KEYS.PROPERTIES_LABEL, { label: propertiesLabel })}\n\t\t\t\t\t\t\trole=\"region\"\n\t\t\t\t\t\t\tref={this.commonProperties}\n\t\t\t\t\t\t\tclassName={className}\n\t\t\t\t\t\t\tonBlur={this.onBlur}\n\t\t\t\t\t\t\tstyle={overrideStyle}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{propertiesTitle}\n\t\t\t\t\t\t\t{propertiesDialog}\n\t\t\t\t\t\t\t{buttonsContainer}\n\t\t\t\t\t\t</aside>\n\t\t\t\t\t\t{resizeBtn}\n\t\t\t\t\t</div>\n\t\t\t\t</Provider>\n\t\t\t);\n\t\t}\n\t\treturn <div />;\n\t}\n}\n\nPropertiesMain.propTypes = {\n\tpropertiesInfo: PropTypes.object.isRequired,\n\tpropertiesConfig: PropTypes.shape({\n\t\tapplyOnBlur: PropTypes.bool,\n\t\tdisableSaveOnRequiredErrors: PropTypes.bool,\n\t\trightFlyout: PropTypes.bool,\n\t\tcategoryView: PropTypes.oneOf([CATEGORY_VIEW.ACCORDIONS, CATEGORY_VIEW.TABS]),\n\t\tcontainerType: PropTypes.string,\n\t\tenableResize: PropTypes.bool,\n\t\tconditionReturnValueHandling: PropTypes.string,\n\t\treturnValueFiltering: PropTypes.array,\n\t\theading: PropTypes.bool,\n\t\tshowHeadingDesc: PropTypes.bool,\n\t\tbuttonLabels: PropTypes.shape({\n\t\t\tprimary: PropTypes.string,\n\t\t\tsecondary: PropTypes.string\n\t\t}),\n\t\tschemaValidation: PropTypes.bool,\n\t\tapplyPropertiesWithoutEdit: PropTypes.bool,\n\t\tconditionHiddenPropertyHandling: PropTypes.oneOf([\"null\", \"undefined\", \"value\"]),\n\t\tconditionDisabledPropertyHandling: PropTypes.oneOf([\"null\", \"undefined\", \"value\"]),\n\t\tmaxLengthForMultiLineControls: PropTypes.number,\n\t\tmaxLengthForSingleLineControls: PropTypes.number,\n\t\tconvertValueDataTypes: PropTypes.bool,\n\t\tshowRequiredIndicator: PropTypes.bool,\n\t\tshowAlertsTab: PropTypes.bool,\n\t\tlocale: PropTypes.string,\n\t\tenableTanstackTable: PropTypes.bool\n\t}),\n\tcallbacks: PropTypes.shape({\n\t\tcontrollerHandler: PropTypes.func,\n\t\tpropertyListener: PropTypes.func,\n\t\tactionHandler: PropTypes.func,\n\t\tclosePropertiesDialog: PropTypes.func,\n\t\tapplyPropertyChanges: PropTypes.func,\n\t\thelpClickHandler: PropTypes.func,\n\t\tsetPropertiesHasMounted: PropTypes.func,\n\t\tcustomHeaderHandler: PropTypes.func,\n\t\tbuttonHandler: PropTypes.func,\n\t\tbuttonIconHandler: PropTypes.func,\n\t\tvalidationHandler: PropTypes.func,\n\t\ttitleChangeHandler: PropTypes.func,\n\t\tpropertiesActionLabelHandler: PropTypes.func,\n\t\ttooltipLinkHandler: PropTypes.func,\n\t\tpropertyIconHandler: PropTypes.func,\n\t\tfilterItemsHandler: PropTypes.func,\n\t\tpanelTitleHandler: PropTypes.func\n\t}),\n\tcustomPanels: PropTypes.array, // array of custom panels\n\tcustomControls: PropTypes.array, // array of custom controls\n\tcustomActions: PropTypes.array, // array of custom actions\n\tcustomConditionOps: PropTypes.array, // array of custom condition ops\n\tlight: PropTypes.bool,\n\tintl: PropTypes.object.isRequired\n};\n\nexport default injectIntl(PropertiesMain, { forwardRef: true });\n","/*\n * Copyright 2017-2026 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport PropertiesButtons from \"./components/properties-buttons\";\nimport PropertiesMain from \"./properties-main\";\nimport PropertiesModal from \"./components/properties-modal\";\nimport ValidationMessage from \"./components/validation-message\";\nimport { formatMessage } from \"./util/property-utils\";\nimport { MESSAGE_KEYS, DEFAULT_LOCALE, CATEGORY_VIEW } from \"./constants/constants\";\n\nimport { injectIntl } from \"react-intl\";\n\n\nclass CommonProperties extends React.Component {\n\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\thasError: false,\n\t\t\terror: null,\n\t\t\tinfo: null,\n\t\t};\n\t\tthis.createPropertiesMainComponent = this.createPropertiesMainComponent.bind(this);\n\t\tthis.revertState = this.revertState.bind(this);\n\t\tthis.propertiesMainHasMounted = false;\n\t\tthis.setPropertiesHasMounted = this.setPropertiesHasMounted.bind(this);\n\t\tthis.applyPropertiesEditing = this.applyPropertiesEditing.bind(this);\n\t}\n\n\tcomponentDidCatch(error, info) {\n\t\tconsole.error(error);\n\t\tthis.setState({\n\t\t\thasError: true,\n\t\t\terror: error,\n\t\t\tinfo: info\n\t\t});\n\t}\n\n\tsetPropertiesHasMounted() {\n\t\tthis.propertiesMainHasMounted = true;\n\t}\n\n\tapplyPropertiesEditing(closeEditor) {\n\t\tthis.PropertiesMain.applyPropertiesEditing(closeEditor);\n\t}\n\n\tcreatePropertiesMainComponent() {\n\t\tObject.assign(this.props.callbacks, { \"setPropertiesHasMounted\": this.setPropertiesHasMounted });\n\t\tconst propertiesMain = (\n\t\t\t<PropertiesMain\n\t\t\t\tref={\n\t\t\t\t\t(instance) => {\n\t\t\t\t\t\tthis.PropertiesMain = instance;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpropertiesInfo={this.props.propertiesInfo}\n\t\t\t\tpropertiesConfig={this.props.propertiesConfig}\n\t\t\t\tcustomPanels={this.props.customPanels}\n\t\t\t\tcallbacks= {this.props.callbacks}\n\t\t\t\tcustomControls={this.props.customControls}\n\t\t\t\tcustomActions={this.props.customActions}\n\t\t\t\tcustomConditionOps={this.props.customConditionOps}\n\t\t\t\tlight={this.props.light}\n\t\t\t/>);\n\t\treturn propertiesMain;\n\t}\n\n\trevertState() {\n\t\tthis.setState({\n\t\t\thasError: false,\n\t\t\terror: null,\n\t\t\tinfo: null\n\t\t});\n\t}\n\n\tdisplayAppropriateUIFallback() {\n\t\tconst errorInfo = {\n\t\t\ttext: formatMessage(this.props.intl, MESSAGE_KEYS.PROPERTIES_UNEXPECTED_MESSAGE),\n\t\t\ttype: \"error\"\n\t\t};\n\t\tconst errorHeading = (\n\t\t\t<div className=\"properties-error-heading\">\n\t\t\t\t<ValidationMessage messageInfo={errorInfo} />\n\t\t\t</div>\n\t\t);\n\t\tlet errorMessage;\n\t\tconst supportMessage = formatMessage(this.props.intl, MESSAGE_KEYS.PROPERTIES_SUPPORT_MESSAGE);\n\t\tconst closeText = formatMessage(this.props.intl, MESSAGE_KEYS.PROPERTIESEDIT_CLOSEBUTTON_LABEL);\n\t\tconst closeFunction = this.props.callbacks.closePropertiesDialog;\n\t\tconst revertText = formatMessage(this.props.intl, MESSAGE_KEYS.PROPERTIESEDIT_REVERTBUTTON_LABEL);\n\t\tconst revertFunction = this.revertState;\n\t\tconst propertiesLandmarkRoleLabel = formatMessage(this.props.intl, MESSAGE_KEYS.PROPERTIES_ERROR_LABEL);\n\t\tlet closeAndRevertContainer;\n\t\tif (this.props.propertiesConfig.containerType === \"Custom\") { // Right flyout view or Custom\n\t\t\tif (this.propertiesMainHasMounted === true) {\n\t\t\t\terrorMessage = formatMessage(this.props.intl, MESSAGE_KEYS.PROPERTIES_REVERT_MESSAGE);\n\t\t\t\tcloseAndRevertContainer = ( // Close and Revert Button\n\t\t\t\t\t<div className=\"properties-modal-buttons\">\n\t\t\t\t\t\t<PropertiesButtons\n\t\t\t\t\t\t\tclassName=\"properties-error-display-close-button\"\n\t\t\t\t\t\t\tokHandler={closeFunction}\n\t\t\t\t\t\t\tcancelHandler={revertFunction}\n\t\t\t\t\t\t\tshowPropertiesButtons\n\t\t\t\t\t\t\tapplyLabel={closeText}\n\t\t\t\t\t\t\trejectLabel={revertText}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\terrorMessage = formatMessage(this.props.intl, MESSAGE_KEYS.PROPERTIES_CLOSE_MESSAGE);\n\t\t\t\tcloseAndRevertContainer = ( // Close Button only\n\t\t\t\t\t<div className=\"properties-modal-buttons\">\n\t\t\t\t\t\t<PropertiesButtons\n\t\t\t\t\t\t\tclassName=\"properties-error-display-close-button\"\n\t\t\t\t\t\t\tokHandler={closeFunction}\n\t\t\t\t\t\t\tshowPropertiesButtons\n\t\t\t\t\t\t\tapplyLabel={closeText}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (this.props.propertiesConfig.rightFlyout) { // Right Flyout View\n\t\t\t\treturn (\n\t\t\t\t\t<aside\n\t\t\t\t\t\taria-label={propertiesLandmarkRoleLabel}\n\t\t\t\t\t\trole=\"region\"\n\t\t\t\t\t\tclassName=\"properties-wrapper properties-right-flyout properties-small\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"properties-flyout-error-container\">\n\t\t\t\t\t\t\t{errorHeading}\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t<div className=\"properties-error-content\" >\n\t\t\t\t\t\t\t\t{errorMessage}\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t{supportMessage}\n\t\t\t\t\t\t\t</div >\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{closeAndRevertContainer}\n\t\t\t\t\t</aside>\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn ( // Non Right Flyout Custom\n\t\t\t\t<aside\n\t\t\t\t\taria-label={propertiesLandmarkRoleLabel}\n\t\t\t\t\trole=\"region\"\n\t\t\t\t\tclassName=\"properties-wrapper properties-custom-container\"\n\t\t\t\t>\n\t\t\t\t\t<div className= \"properties-flyout-error-container\">\n\t\t\t\t\t\t{ errorHeading }\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t<div className=\"properties-error-content\" >\n\t\t\t\t\t\t\t{errorMessage}\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t{supportMessage}\n\t\t\t\t\t\t</div >\n\t\t\t\t\t</div>\n\t\t\t\t\t{closeAndRevertContainer}\n\t\t\t\t</aside>\n\t\t\t);\n\t\t}\n\t\t// Modal View\n\t\tif (this.propertiesMainHasMounted === true) { // Revert and Close Button\n\t\t\terrorMessage = formatMessage(this.props.intl, MESSAGE_KEYS.PROPERTIES_REVERT_MESSAGE);\n\t\t\tcloseAndRevertContainer = (\n\t\t\t\t<PropertiesModal\n\t\t\t\t\tbsSize=\"large\"\n\t\t\t\t\tshowPropertiesButtons\n\t\t\t\t\tapplyLabel={closeText}\n\t\t\t\t\trejectLabel={revertText}\n\t\t\t\t\tokHandler={closeFunction}\n\t\t\t\t\tcancelHandler={revertFunction}\n\t\t\t\t\ttitle ={errorHeading}\n\t\t\t\t>\n\t\t\t\t\t<div className=\"properties-modal-container properties-error-content\">\n\t\t\t\t\t\t{errorMessage}\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t{supportMessage}\n\t\t\t\t\t</div>\n\t\t\t\t</PropertiesModal>\n\t\t\t);\n\t\t} else {\t// Close Button Only\n\t\t\terrorMessage = formatMessage(this.props.intl, MESSAGE_KEYS.PROPERTIES_CLOSE_MESSAGE);\n\t\t\tcloseAndRevertContainer = (\n\t\t\t\t<div className = \"properties-modal-error\">\n\t\t\t\t\t<PropertiesModal\n\t\t\t\t\t\tokHandler={closeFunction}\n\t\t\t\t\t\tbsSize=\"large\"\n\t\t\t\t\t\tshowPropertiesButtons\n\t\t\t\t\t\tapplyLabel={closeText}\n\t\t\t\t\t\trejectLabel=\"null\"\n\t\t\t\t\t\ttitle ={errorHeading}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"properties-modal-container properties-error-content\">\n\t\t\t\t\t\t\t{errorMessage}\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t{supportMessage}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</PropertiesModal>\n\t\t\t\t</div>);\n\t\t}\n\t\treturn ( // Modal flyout vew\n\t\t\tcloseAndRevertContainer\n\t\t);\n\t}\n\n\trender() {\n\t\tif (this.state.hasError) {\n\t\t\treturn this.displayAppropriateUIFallback();\n\t\t}\n\t\treturn this.createPropertiesMainComponent();\n\t}\n\n}\n\nCommonProperties.propTypes = {\n\tpropertiesInfo: PropTypes.object.isRequired,\n\tpropertiesConfig: PropTypes.shape({\n\t\tapplyOnBlur: PropTypes.bool,\n\t\ttrimSpaces: PropTypes.bool,\n\t\tdisableSaveOnRequiredErrors: PropTypes.bool,\n\t\trightFlyout: PropTypes.bool,\n\t\tcategoryView: PropTypes.oneOf([CATEGORY_VIEW.ACCORDIONS, CATEGORY_VIEW.TABS]),\n\t\tcontainerType: PropTypes.string,\n\t\tenableResize: PropTypes.bool,\n\t\tconditionReturnValueHandling: PropTypes.oneOf([\"null\", \"value\"]),\n\t\treturnValueFiltering: PropTypes.array,\n\t\tbuttonLabels: PropTypes.shape({\n\t\t\tprimary: PropTypes.string,\n\t\t\tsecondary: PropTypes.string\n\t\t}),\n\t\tschemaValidation: PropTypes.bool,\n\t\tapplyPropertiesWithoutEdit: PropTypes.bool,\n\t\tconditionHiddenPropertyHandling: PropTypes.oneOf([\"null\", \"undefined\", \"value\"]),\n\t\tconditionDisabledPropertyHandling: PropTypes.oneOf([\"null\", \"undefined\", \"value\"]),\n\t\tmaxLengthForMultiLineControls: PropTypes.number,\n\t\tmaxLengthForSingleLineControls: PropTypes.number,\n\t\tconvertValueDataTypes: PropTypes.bool,\n\t\tshowRequiredIndicator: PropTypes.bool,\n\t\tshowAlertsTab: PropTypes.bool,\n\t\tlocale: PropTypes.string,\n\t\tenableTanstackTable: PropTypes.bool\n\t}),\n\tcallbacks: PropTypes.shape({\n\t\tcontrollerHandler: PropTypes.func,\n\t\tpropertyListener: PropTypes.func,\n\t\tactionHandler: PropTypes.func,\n\t\tclosePropertiesDialog: PropTypes.func,\n\t\tapplyPropertyChanges: PropTypes.func,\n\t\thelpClickHandler: PropTypes.func,\n\t\tcustomHeaderHandler: PropTypes.func,\n\t\tbuttonHandler: PropTypes.func,\n\t\tbuttonIconHandler: PropTypes.func,\n\t\tvalidationHandler: PropTypes.func,\n\t\ttitleChangeHandler: PropTypes.func,\n\t\tpropertiesActionLabelHandler: PropTypes.func,\n\t\ttooltipLinkHandler: PropTypes.func,\n\t\tpropertyIconHandler: PropTypes.func,\n\t\tfilterItemsHandler: PropTypes.func\n\t}),\n\tcustomPanels: PropTypes.array,\n\tcustomControls: PropTypes.array,\n\tcustomActions: PropTypes.array,\n\tcustomConditionOps: PropTypes.array,\n\tlight: PropTypes.bool,\n\tintl: PropTypes.object.isRequired\n};\n\nCommonProperties.defaultProps = {\n\tpropertiesConfig: {\n\t\tcontainerType: \"Custom\",\n\t\trightFlyout: true,\n\t\tcategoryView: CATEGORY_VIEW.ACCORDIONS,\n\t\tapplyOnBlur: false,\n\t\ttrimSpaces: true,\n\t\tdisableSaveOnRequiredErrors: false,\n\t\tenableResize: true,\n\t\tconditionReturnValueHandling: \"value\",\n\t\tschemaValidation: false,\n\t\tapplyPropertiesWithoutEdit: false,\n\t\tmaxLengthForMultiLineControls: 1024,\n\t\tmaxLengthForSingleLineControls: 128,\n\t\tconvertValueDataTypes: false,\n\t\tshowRequiredIndicator: true,\n\t\tshowAlertsTab: true,\n\t\tlocale: DEFAULT_LOCALE,\n\t\tenableTanstackTable: false\n\t},\n\tcallbacks: {\n\t},\n\tlight: true // Enable light option by default\n};\n\nexport default injectIntl(CommonProperties, { forwardRef: true });\n"],"names":["baseGet","require$$0","_baseGet","baseSet","require$$1","_baseSet","castPath","require$$2","basePickBy","object","paths","predicate","index","length","result","path","value","hasIn","basePick","pick_1","flatRest","PropertiesModal","_Component","_classCallCheck","_callSuper","this","arguments","_inherits","_createClass","key","props","bsSize","Size","SMALL","CARBON_MODAL_SIZE_XSMALL","LARGE","MAX","CARBON_MODAL_SIZE_LARGE","MEDIUM","CARBON_MODAL_SIZE_SMALL","modalSize","getCarbonModalSize","React","createElement","Portal","Modal","className","classNames","noButtons","showPropertiesButtons","open","modalHeading","title","primaryButtonText","applyLabel","secondaryButtonText","rejectLabel","onRequestSubmit","okHandler","onSecondarySubmit","cancelHandler","size","children","Component","PropertiesEditor","propertyEditingClass","buttons","PropertiesButtons","MainEditorPropertiesButtons","saveButtonEnabled","disableSaveOnRequiredErrors","Object","keys","requiredErrorMessages","shouldEnabledSaveButton","applyButtonEnabled","defaultProps","connect","state","ownProps","_ownProps$controller","_ownProps$controller2","controller","getSaveButtonDisable","getRequiredErrorMessages","TearSheet","tearsheet","description","content","displayFooterButtons","applyOnBlur","displayTabs","Array","isArray","ComposedModal","stacked","formatMessage","intl","MESSAGE_KEYS","PROPERTIES_LABEL","label","preventCloseOnClickOutside","onClose","ModalHeader","onCloseCallback","buttonOnClick","ModalBody","injectIntl","baseEach","_baseFilter","collection","push","arrayFilter","_arrayFilter","baseFilter","baseIteratee","_baseIteratee","require$$3","filter_1","SET_PROPERTY_VALUES","UPDATE_PROPERTY_VALUE","REMOVE_PROPERTY_VALUE","SET_CONTROL_STATES","UPDATE_CONTROL_STATE","SET_PANEL_STATES","UPDATE_PANEL_STATE","SET_ACTION_STATES","UPDATE_ACTION_STATE","SET_ERROR_MESSAGES","UPDATE_ERROR_MESSAGE","CLEAR_ERROR_MESSAGE","SET_DATASET_METADATA","UPDATE_SELECTED_ROWS","CLEAR_SELECTED_ROWS","SET_TITLE","SET_ACTIVE_TAB","DISABLE_ROW_MOVE_BUTTONS","SET_SAVE_BUTTON_DISABLE","SET_WIDE_FLYOUT_PRIMARY_BUTTON_DISABLED","SET_ADD_REMOVE_ROWS","UPDATE_STATIC_ROWS","CLEAR_STATIC_ROWS","SET_TABLE_BUTTON_ENABLED","SET_HIDE_EDIT_BUTTON","SET_ACTIVE_TEARSHEET","setTitle","type","setActiveTab","activeTab","SelectorPanel","_React$Component","panel","panels","getPropertyValue","name","dependsOn","WideFlyout","_this","modalRef","createRef","style","height","updateDimensions","bind","handleTabKey","window","addEventListener","document","focusOnFirstFocusable","prevProps","modal","getActiveModal","show","active","activeElement","body","contains","removeEventListener","from","querySelectorAll","filter","el","offsetParent","modals","focusables","getFocusables","focus","wideFlyout","commonPropertiesParent","findPropertyWrapper","commonProperties","getBoundingClientRect","setState","top","node","parentNode","includes","e","first","last","preventDefault","shiftKey","_this2","overlay","okButtonEnabled","ref","role","light","getControlId","propertyId","id","uuid","uuid4","v4","concat","getDataId","row","col","getCharLimit","control","defaultLimit","limit","charLimit","splitNewlines","text","splitValue","split","joinNewlines","list","joinValue","truncated","concatenatedValue","forEach","truncatedValue","truncateDisplayValue","join","TRUNCATE_LIMIT","substring","getValidationProps","messageInfo","inTable","validationProps","invalid","invalidText","warn","warnText","getDateTimeFormat","controlType","ControlType","DATEPICKER","DATEPICKERRANGE","dateFormat","DEFAULT_DATEPICKER_FORMAT","DATEFIELD","DEFAULT_DATE_FORMAT","timeFormat","DEFAULT_TIME_FORMAT","SummaryPanel","showWideFlyout","handleLinkClicked","hideWideFlyout","cancelWideFlyout","_getSummaryTables","setIsSummaryPanelShowing","clearSelectedRows","setPropertyValues","initialControlValues","setErrorMessages","initialMessages","setControlStates","initialStates","getPropertyValues","getAllErrorMessages","getControlStates","summaryTables","summaryControls","getSummaryPanelControls","_step","_iterator","_createForOfIteratorHelper","s","n","done","controlName","summaryControl","getControl","controlValue","filterHiddenDisabled","customValue","getCustPropSumPanelValue","showCustom","summaryLabel","summaryValues","summaryColumns","subControls","idx","colPropertyId","isSummary","summary","colWidth","rowIdx","rowValue","rowData","colIdx","displayValue","_getSummaryDisplayValue","contentValue","JSON","stringify","replace","RegExp","width","TruncatedContentTooltip","tooltipText","disabled","summaryBody","largeTableLabel","PropertyUtils","getReactIntl","LONG_TABLE_SUMMARY_PLACEHOLDER","err","f","returnValue","values","valueLabels","displayIndex","indexOf","toType","valueDef","propType","Type","STRUCTURE","ParamRole","COLUMN","stringifyFieldValue","controls","msg","errorCount","warningCount","controlId","controlMsg","getErrorMessage","_isEmpty","CONDITION_MESSAGE_TYPE","WARNING","ERROR","descriptionText","CONTROL_SUMMARY_ERROR","errorMsgCount","CONTROL_SUMMARY_ERROR_WARNING","warningMsgCount","CONTROL_SUMMARY_WARNING","Tooltip","tip","Icon","icon","_getSummaryIconState","link","Button","onClick","kind","renderIcon","Add","APPLYBUTTON_LABEL","REJECTBUTTON_LABEL","flyout","getLight","panelClassName","hide","panelState","STATES","HIDDEN","nestedPanel","DISABLED","ControlUtils","getPanelState","getWideFlyoutPrimaryButtonDisabled","TwistyPanel","_props$controller$get","panelTitleHandler","getHandlers","_this$panelTitleHandl","call","panelId","Accordion","AccordionItem","SubPanelInvoker","hideHandler","subPanelVisible","showSubDialog","hideSubDialog","increaseVisibleSubPanelCounter","applyChanges","decreaseVisibleSubPanelCounter","propertiesDialog","rightFlyout","isTearsheetContainer","Fragment","SubPanelButton","showSubPanel","onSubPanelHidden","logger","info","subPanelInvoker","button","ColumnPanel","gridColumns","item","gridTemplateColumns","ControlPanel","Subtabs","activeTabId","tabId","subTabLists","subTabPanels","tabIdx","tabListAriaLabel","SUBTABS_TABLIST_LABEL","i","tabs","tab","group","subPanelItems","genUIItem","Tab","leftnav","TabPanel","vertical","Tabs","selectedIndex","TabList","TabPanels","Subtabs$1","TextPanel","hidden","dynamicDescriptionText","evaluateText","placement","tooltip","tooltipLinkHandler","direction","disable","showToolTipOnClick","CARBON_ICONS","INFORMATION","propertyValues","ActionPanel","ButtonAction","_this$props","action","buttonIconHandler","buttonId","data","appIcon","isValidElement","applyAction","_has","CARBON_BUTTON_KIND","TERTIARY","PRIMARY","SECONDARY","GHOST","DANGER","DANGER_TERTIARY","DANGER_GHOST","CARBON_BUTTON_SIZE","EXTRA_LARGE","actionHandler","getAppData","_this$props$action","customClassName","actionButtonKind","getActionButtonKind","actionButtonSize","getActionButtonSize","iconDescription","defaultMessage","defaultMessages","iconProps","_extends","display","_this$props$action$da","tooltipId","tooltipDirection","getActionState","convertPropertyId","ImageAction","getIcon","imageDimensions","image","filePath","pop","toLowerCase","SVG","src","url","_this$props$action2","_this$props$action$de","left","right","autoAlign","hasIconOnly","Boolean","ActionFactory","actionType","ActionType","BUTTON","IMAGE","CUSTOM","getCustomAction","ALERT_TAB_GROUP","EditorForm","showFieldPicker","genPanel","genUIContent","_getGroupedMessages","closeFieldPicker","openFieldPicker","generateSharedControlNames","messages","ControlFactory","getControlFactory","setFunctions","setRightFlyout","actionFactory","FIRST_TEARSHEET_ID","TEARSHEETS","visibleTearsheet","defaultOpenTab","alertOpenTab","scrollToAlert","nextProps","nextState","isSummaryPanelShowing","isSubPanelsShowing","activeTabElement","getElementsByClassName","scrollIntoView","behavior","block","inline","showAlertsTab","ctrl","id_ref","parentCategoryId","_sortBy","ev","indexof","tabContent","tabContentAcc","tabLists","tabPanels","hasAlertsTab","modalSelected","hiddenTabs","nonTearsheetTabs","t","itemType","ItemType","TEARSHEET","tearsheetTabs","totalTabs","PropertyUtil","EDITORFORM_TABLIST_LABEL","panelItems","_getContainerIndex","additionalComponent","additionalComponents","categoryView","CATEGORY_VIEW","TABS","categoryOpen","_getMessageCountForCategory","onHeadingClick","_showCategoryPanel","_filter","_modalTabsOnClick","subPanels","generateAdditionalPanels","indent","groupClassName","uiItems","uiContent","uiItem","inPropertyId","textClass","additionalItems","optionalPanels","parentPropertyId","_cloneDeep","updateLastChildPropertyId","createControlItem","subPanel","secondaryText","textType","Link","_handleMessageClick","genPrimaryTabs","genPanelSelector","generateCustomPanel","generateAction","customPanels","custPanel","_get","get_1","parameters","renderPanel","error","_step2","_iterator2","getSharedCtrlInfo","_step3","sharedCtrlNames","_iterator3","panelItem","addSharedControls","_this3","panelType","getActiveTearsheet","clearActiveTearsheet","newSelectedFields","newSelections","closeFieldPickerCallback","fieldPickerPropertyId","callback","dmImage","currentControlValues","fields","getFilteredDatasetMetadata","tableFieldIndex","formattedFieldsList","FieldPicker","currentFields","dmIcon","msgUIItems","map","ALERTS_TAB_TITLE","getUiItems","unshift","genAlertsTab","stackedTearsheet","wideFly","form","getForm","FIELDPICKER_SAVEBUTTON_LABEL","fieldPicker","componentMetadataReducer","getErrorMessages","dispatch","propertyOf_1","undefined","Title","actions","action_refs","uiGroup","_propertyOf","TitleMetadata","L10nProvider","resources","defaultVal","resourceObj","resource_key","l10n","uiObject","l10nResource","baseKey","lookupKey","desc","ResourceDef","resource","Group","cname","insertPanels","subGroups","copen","make","GroupType","CONTROLS","has_1","group_info","newGroup","makeGroup","GroupMetadata","groups","uiGroups","Action","actionName","customActionId","ActionDef","actionDef","class_name","custom_action_id","ActionMetadata","actionDefs","actionId","uihintsActions","actionsDefs","makeActionDef","ParameterDef","settings","valueRestriction","defaultValue","parameter_ref","parameterRef","isList","isMapValue","labelVisible","orientation","minValue","maxValue","placeHolderText","separator","visible","valueIcons","sortable","filterable","resizable","editStyle","required","numberGenerator","isKey","dmDefault","language","enableMaximize","increment","textAfter","textBefore","moveableRows","generatedValues","customControlId","rows","displayChars","uionly","actionRef","customValueAllowed","shouldFilterItem","helperText","readOnly","startsWith","EditStyle","SUBPANEL","INLINE","READONLY","OBJECT","baseType","getValidValues","ENUM","UNSPECIFIED","typ","trim","STRING","BOOLEAN","l10nProvider","defaultControl","defaultCol","Separator","AFTER","BEFORE","param","uihint","getParamUIHint","paramName","uihints","ParameterMetadata","paramDefs","paramDef","uihintsParams","uihintsUiParams","makeParameterDef","carbonIcon","enabled","divider","ButtonDef","buttonDef","carbon_icon","ButtonMetadata","buttonDefs","uihintsButtons","makeButtonDef","StructureDef","keyDefinition","parameterMetadata","rowSelection","addRemoveRows","header","includeAllFields","layout","params","isSubPanelEdit","isInlineEdit","defaults","structure","makeParameterMetadata","makeButtonMetadata","getStructureUIHint","structureName","_step4","_iterator4","complex_type_ref","StructureMetadata","structures","structName","structureDef","uihintsStructures","_step5","structureDefs","_iterator5","struct","makeStructure","PropertyDef","editorSize","pixelWidth","labelEditable","help","structureMetadata","groupMetadata","actionMetadata","heading","titleMetadata","titleDefinition","makeStructureMetadata","makeActionMetadata","makeGroupMetadata","getParameters","makeTitleMetadata","editable","DEFAULT_LABEL_EDITABLE","Control","_settings$width","additionalText","valueDescs","operation","isFinite","start_value","startValue","structureType","childItem","multiSelectEditChildItem","keyIndex","defaultRow","hideEditButton","isNaN","parseInt","endsWith","isKeyField","UIItem","elements","PRIMARY_TABS","SUB_TABS","groupName","PANEL_SELECTOR","PANEL","dialogText","ADDITIONAL_LINK","CONTROL","ACTION","HORIZONTAL_SEPARATOR","STATIC_TEXT","TEXT_PANEL","CUSTOM_PANEL","_objectSpread","EditorTab","ValueDef","isMap","parameter","Label","Description","CustomControlPanel","NumberGenerator","range","makePrimaryTab","propertyDef","containerType","l10nLabel","additionalInfo","_makeUIItem","groupItem","groupLabel","groupType","makePanel","PanelType","GENERAL","_makeControls","COLUMN_SELECTION","ADDITIONAL","makeAdditionalLink","subTabItems","subGroup","subGroupName","makeSubTabs","panSelSubItems","_genPanelSelectorPanels","makePanelSelector","PANELS","panSubItems","COLUMN_PANEL","makeCustomPanel","parameterNames","SUMMARY_PANEL","SUMMARY","ACTION_PANEL","groupDesc","_makeActions","makeTextPanel","TWISTY_PANEL","TEARSHEET_PANEL","additionalInfoUpdated","assign","makeTearsheetPanel","panelInsertedFor","prop","getParameter","parameterEditStyle","getStructure","_makeControl","makeControl","separatorBefore","makeHSeparator","makeStaticText","getTextBefore","getTextBeforeType","getTextAfter","getTextAfterType","separatorAfter","RADIOSET","ORIENTATIONS","VERTICAL","_hasPanelBeenInserted","_makeStringControl","isSubControl","getRole","controlObj","TEXT","TEXTAREA","getValidValueCount","CHECKBOXSET","SOMEOFSELECT","SELECTCOLUMNS","_processListParameter","_isEmbeddedOption","ONEOFSELECT","_isEmbeddedMultiOption","SELECTCOLUMN","EXPRESSION","EMAIL","TEXTFIELD","URL","COLOR","structureDefinition","subControl","getAdditionalText","additionalHelperText","getAdditionalHelperText","controlDesc","controlLabel","l10nDesc","returnObject","PASSWORD","PASSWORDFIELD","CHECKBOX","INTEGER","LONG","DOUBLE","NUMBERFIELD","DATE","TIME","TIMEFIELD","TIMESTAMP","hasSubPanel","_makeEditStyleSubPanel","ROW_SELECTION","MULTIPLE","hasInlinePanel","_makeInlineEditStyleSubPanel","keyAttributeIndex","defaultStructure","newSubControl","_makeSubControl","STRUCTURETABLE","STRUCTURELISTEDITOR","buttonMetadata","buttonLabel","buttonDescription","_makeButton","getButton","_makeButtons","STRUCTUREEDITOR","isCompoundField","paramLabels","paramValue","l10nValueLabel","String","_parameterValueLabels","paramDescs","l10nValueDesc","_parameterValueDescription","_makeAction","getAction","CONTAINER_TYPE","columns","actionIds","makeAction","actionDesc","actionLabel","r","Symbol","iterator","a","_arrayLikeToArray","toString","slice","constructor","test","_unsupportedIterableToArray","_n","F","TypeError","o","u","next","searchMessage","x","_typeof","message","Form","componentId","conditions","titleUiItems","okBtn","cancelBtn","propDef","makePropertyDef","makeActions","currentParameters","uiCurrentParameters","datasetMetadata","editorSizeDefault","MODAL","editorSizeHint","makePrimaryTabs","translateMessages","isPrimary","CommonPropertiesAction","_Action","newValues","initialValues","appData","applyPropertyChanges","propertiesActionLabel","properties","undoInfo","uiProperties","baseAssignValue","_baseAssignValue","eq","_assignMergeValue","_safeGet","copyObject","_copyObject","keysIn","toPlainObject_1","assignMergeValue","cloneBuffer","_cloneBuffer","exports","cloneTypedArray","_cloneTypedArray","copyArray","_copyArray","initCloneObject","require$$4","_initCloneObject","isArguments","require$$5","isArguments_1","require$$6","isArray_1","isArrayLikeObject","require$$7","isArrayLikeObject_1","isBuffer","require$$8","isFunction","require$$9","isFunction_1","isObject","require$$10","isObject_1","isPlainObject","require$$11","isPlainObject_1","isTypedArray","require$$12","isTypedArray_1","safeGet","require$$13","toPlainObject","require$$14","_baseMergeDeep","source","srcIndex","mergeFunc","customizer","stack","objValue","srcValue","get","newValue","isCommon","isArr","isBuff","isTyped","set","Stack","_Stack","baseFor","_baseFor","baseMergeDeep","keysIn_1","_baseMerge","baseMerge","baseRest","_baseRest","isIterateeCall","_createAssigner","assigner","sources","guard","merge_1","baseDifference","_baseDifference","baseFlatten","_baseFlatten","difference_1","array","assignValue","_assignValue","createAssigner","isArrayLike","isArrayLike_1","isPrototype","_isPrototype","hasOwnProperty","prototype","assign_1","property","newState","updateNestedPropertyValue","states","strRow","strCol","validation_id","displayError","Number","isInteger","selectedRows","staticRows","componentMetadata","disableRowMoveButtons","propertyIds","setSaveButtonDisable","disableState","setWideFlyoutPrimaryButtonDisabled","updateNestedPropertySetting","_set","setting","set_1","tearsheetId","PropertiesStore","combinedReducer","combineReducers","propertiesReducer","controlStatesReducer","panelStatesReducer","errorMessagesReducer","datasetMetadataReducer","rowSelectionsReducer","disableRowMoveButtonsReducer","actionStatesReducer","wideFlyoutPrimaryButtonDisableReducer","tearsheetStatesReducer","saveButtonDisableReducer","propertiesSettingsReducer","rowFreezeReducer","enableDevTools","__REDUX_DEVTOOLS_EXTENSION__","store","createStore","subscribe","propValue","getState","getNestedPropertyValue","copy","locState","colId","rowId","_isEqual","updateControlState","getPanelStates","setPanelStates","updatePanelState","getActionStates","setActionStates","updateActionState","disablePrimaryButtonForPanel","enumFilter","controlMessage","returnMessage","clonedControlMsg","_getTableCellErrors","rowKey","rowMessage","colKey","colMessage","TABLE_SUMMARY_ERROR","TABLE_SUMMARY_WARNING","isEqual_1","setDatasetMetadata","rowSelections","selection","rowStatic","getNestedPropertySetting","tableButtons","setTearsheetState","evaluate","paramsList","defaultParameter","or","and","condition","Error","parameter_2_ref","parseControls","formData","parseUiItem","parseControl","parameterName","columnIndex","summaryPanelId","CHECKBOX_SELECTOR","locPanelId","parseConditions","container","uiCondition","conditionType","definition","parameter_refs","uniqueList","Set","parseInput","groupDef","_setDefinitions","refs","group_refs","target","j","setExpressionInfo","inExpressionInfo","expressionFunctionInfo","functions","expressionInfo","function_info","function_categories","functionInfoList","parmsSet","functionInfo","newEntry","locLabel","return_type_label","returnTypeLabel","locReturnType","_genFunctionParameters","functionCategories","category","functionList","function_refs","functionId","_getFunctionInfo","operators","operator_refs","field_categories","field_table_info","fieldCat","field_columns","field_column_info","value_column_info","fieldColInfoDesc","descLabel","valueColInfoDesc","additional_column_info","fieldInfo","find","functionElem","panelTree","currentPanel","_newPanelTreeObject","baseUniq","_baseUniq","unionWith_1","arrays","comparator","SetCache","_SetCache","arrayIncludes","_arrayIncludes","arrayIncludesWith","_arrayIncludesWith","arrayMap","_arrayMap","baseUnary","_baseUnary","cacheHas","nativeMin","Math","min","_baseIntersection","iteratee","othLength","othIndex","caches","maxLength","Infinity","seen","outer","computed","cache","_castArrayLikeObject","baseIntersection","castArrayLikeObject","intersectionWith_1","mapped","validateInput","validation","fail_message","evaluateData","isValidation","failedErrorMessage","focus_parameter_ref","failedMessage","enum_filter","filteredEnum","allow_change","allowChange","default_value","conditionalDefault","filterDef","evaluateFilter","evaluated","op","param2","options","propertiesConfig","getPropertiesConfig","conditionDisabledPropertyHandling","filterDisabled","conditionHiddenPropertyHandling","filterHidden","param2Info","paramInfo","_getPropertyIdFromParam","getConditionOp","filterItem","conditionItem","conditionItems","inFields","newFields","_unionWith","orFilter","_intersectionWith","andFilter","apply","_toConsumableArray","measurementValues","field","measurementValue","metadata","measure","_handleDmMeasurement","typeValues","typeValue","_handleDmType","roleValues","roleValue","modeling_role","_handleDmModelingRole","returnFields","filterFieldsFromSharedProps","_handleSharedFields","conditionFilter","paramPropertyID","offset","startCol","endCol","_getColumnNumber","validatePropertiesValues","showErrors","getControls","controlKey","validatePropertiesListValues","validatePropertiesConditions","newStates","_validateConditionsByType","rowIndex","colIndex","subPropId","validatePropertiesListConditions","_propagateParentPanelStates","PANEL_TREE_ROOT","prevPropertyValues","_getConditionPropertyValues","_comparePropertyValues","validateConditions","_validateInput","runCount","newPropertyValues","updatePropertyIds","_union","prevPropertyValue","newPropertyValue","updateState","refState","propState","newPropState","ENABLED","hideColumn","updateColumnVisibility","getColumnVisibility","toggleColumnVisibility","updateEnumerationState","enumValue","getParamRefPropertyId","paramRef","controlPropertyId","baseParam","injectDefaultValidations","validationDefinitions","requiredDefinitionsIds","keyName","controlValId","seedrandom","rng","_injectRequiredDefinition","_injectDateTimeDefinition","locKeyName","_injectInvalidFieldDefinition","disabledOnly","currentPanelState","allowUpdate","_step6","_iterator6","_step7","_iterator7","_step8","_iterator8","errorSet","validations","getDefinitions","CONDITION_TYPE","VALIDATION","CONDITION_DEFINITION_INDEX","getRequiredDefinitionIds","_step9","output","_iterator9","errorMessage","DEFAULT_VALIDATION_MESSAGE","UiConditions","isError","msgPropertyId","alwaysShow","tablePropertyId","updateErrorMessage","isEmpty_1","_validateDefinitionsByType","VISIBLE","FILTEREDENUM","condType","_validateByType","definitions","evalState","_updateControlState","lastDefinition","currentDefinition","currentParameter","_isLastDefintiionForParameter","filtered","enumFilters","_getFilteredEnumItems","enumFilterApplied","filterApplied","_updateFilteredState","stateOn","visibleControl","_updateRefsState","_step0","newOnState","newOffState","notAllowedState","_iterator0","groupReferenceId","currentState","_getState","_updateStateIfParent","_updatePanelChildrenState","_updateGroupRefsControlState","refsList","refsType","_step1","refStates","_iterator1","referenceId","_step10","_iterator10","_updateStateIfPanel","_step11","_iterator11","panelPropertyId","_runRefsValidateDefinitions","_step12","_iterator12","_updatePanelChildrenObjectState","_step13","_iterator13","objectId","objectStates","dfnType","refsDefinitions","REFS","panelName","prevValue","previousValues","filterValues","valDefinitions","definitionId","injectedDefinition","default","REQUIRED_ERROR","dtFormat","DATETIME_FORMAT_ERROR","format","INVALID_FIELD_ERROR","getMetadataFieldMatch","field2","origName","field_name","schema","link_ref","intersection_1","ValidationMessage","tableOnly","msgText","msgIcon","FLATPICKR_DATE_TOKENS_REGEX","getFormattedDate","inDate","date","Date","year","getFullYear","month","getMonth","day","getDate","formattedDate","getISODate","toISOString","dateRegex","replaceAll","getDateFormatRegex","_getYearMonthDay","dateString","match","groupIdx","formatIdx","charAt","getYearMonthDay","ReadonlyControl","updateValueFromFilterEnum","controlOpts","skipValidateInput","_intersection","updatePropertyValue","controlIndex","getCustomControl","table","DATA_TYPE","isValid","tableControl","FormattedDate","hour","minute","weekday","controlItem","getControlState","getFilteredEnumItems","TextfieldControl","reactIntl","getMaxLengthForSingleLineControls","textInputRef","evt","joined","textInput","TRUNCATE_LONG_STRING_ERROR","truncate_limit","_this$props$control","TextInput","autoComplete","placeholder","onChange","handleChange","labelText","hideLabel","enableCounter","maxCount","ToggletextControl","valuesMap","iconsMap","imgSource","Isvg","alt","rendered","buttonType","TOGGLETEXT_ICON_DESCRIPTION","toggletext_label","TextareaControl","getMaxLengthForMultiLineControls","textArea","showValidationMessage","TextArea","_this$props$control2","NumberfieldControl","invalidNumber","numberInput","onDirection","generateNumber","onKeyUp","originalValue","decimalsInOriginalValue","decimalsInIncrement","numValue","decimalPrecision","toFixed","validity","badInput","current","showInvalidNumberError","clearInvalidNumberError","_ref","actualValue","INVALID_NUMBER_ERROR","generator","max","floor","random","Shuffle","tooltipPosition","tooltipAlignment","NumberInput","step","allowEmpty","hideSteppers","disableWheel","baseFindIndex","_baseFindIndex","toInteger","nativeMax","findIndex_1","fromIndex","TableButtons","getCustomButtonEnabled","customButtonIconCallback","customButtonOnClick","convertToolbarConfig","tableState","buttonConfig","tableDisabled","buttonEnabled","customButtonsState","buttonHandler","toolbarConfig","_buttonConfig$descrip","enable","iconEnabled","incLabelWithIcon","leftBar","customButtons","Toolbar","config","instanceId","toolbarActionHandler","overflowMenuLabel","toolbarOverflowLabel","ariaLabel","TABLE_TOOLBAR_LABEL","table_label","tableLabel","TableButtons$1","SubPanelCell","initialControlValue","subPanelToolTip","SUBPANEL_BUTTON_TOOLTIP","Edit","TableToolbar","handleCancel","getTableRowMoveButtons","topMoveRow","upMoveRow","downMoveRow","bottomMoveRow","getLeastValue","getMaxValue","multiSelectEditRowPropertyId","initialMultiSelectEditRowValue","leastValue","getStaticRows","sort","editLabel","TABLE_TOOLBAR_BUTTON_EDIT","deleteLabel","TABLE_TOOLBAR_BUTTON_DELETE","cancelLabel","TABLE_TOOLBAR_BUTTON_CANCEL","editBtn","deleteBtn","isReadonlyTable","isSingleSelectTable","TrashCan","multiSelectEdit","selected","getSelectedRows","topEnabled","bottomEnabled","moveTopLabel","TABLE_TOOLBAR_BUTTON_TOP","moveUpLabel","TABLE_TOOLBAR_BUTTON_UP","moveDownLabel","TABLE_TOOLBAR_BUTTON_DOWN","moveBottomLabel","TABLE_TOOLBAR_BUTTON_BOTTOM","UpToTop","ChevronUp","ChevronDown","DownToBottom","singleRowSelectedLabel","smallFlyout","SINGLE_SELECTED_ROW_LABEL_SMALL_FLYOUT","SINGLE_SELECTED_ROW_LABEL","multiRowsSelectedLabel","MULTI_SELECTED_ROW_LABEL_SMALL_FLYOUT","MULTI_SELECTED_ROW_LABEL","removeSelectedRows","b","firstRow","selectedRow","shift","tmpRow","moveErrorMessageRows","setScrollToRow","setCurrentControlValueSelected","lastRow","updateSelectedRows","_this$props2","_this$props3","multiSelectEditSubPanelTitle","MULTI_SELECT_EDIT_SUBPANEL_TITLE","multiSelectEditSubPanel","getLeftBarConfig","multiSelectInvoker","getLeftTitleContents","TABLE_TOOLBAR_OVERFLOW_LABEL","containingDivId","TableToolbar$1","isDisableRowMoveButtons","AbstractTable","_props$control","filterText","onPanelContainer","allowColumnControls","indexOfColumn","setReadOnlyColumnValue","removeSelected","updateRowSelections","handleRowClick","createTable","onFilter","onSort","includeInFilter","makeAddButtonPanel","makeEditButtonPanel","makeCustomButtonsPanel","buildChildItem","buildMultiSelectEditChildItem","makeCells","areAllRowsChecked","isLightTheme","scrollToRow","selectSummaryPropertyName","saveControls","setSelectedSummaryRowValue","updatedControlValues","UPDATE_TYPE","INITIAL_LOAD","isSelectSummaryEdit","updateSelectedRowsValues","removePropertyValue","filterString","spec","column","sortBy_1","SORT_DIRECTION","DESC","reverse","colValue","inSelectedRows","idx2","fieldStringToValue","controlValues","columnDef","summaryPropertyId","getDefaultRow","selectedSummaryRowValue","READONLYTABLE","_findIndex","columnControl","SINGLE","metaKey","ctrlKey","splice","anchor","end","newSelns","newSelectedSummaryRow","cellValue","testCell","removeErrorMessageRow","propertyName","selectSummaryRow","childPropertyId","cloneDeep_1","setChildPropertyId","cellContent","tableInfo","columnDefObj","cellClassName","getDatasetMetadataFields","stringValue","ON_PANEL","createControl","defaultContent","cellPropertyId","filterFields","hasFilter","addOnClickCallback","onFieldPickerCloseCallback","singleSelectTable","tableButtonConfig","fieldPickerCloseFunction","addButtonDisabled","addButtonFunction","addButtonLabel","STRUCTURETABLE_ADDBUTTON_LABEL","addOnClick","editButton","editCallback","editOnClickCallback","editOnClick","customTableButtons","getTableToolbarOverflowLabel","checked","_this$props$control3","sortFields","headers","makeHeader","showHeader","rowToScrollTo","rowClickCallback","tableToolbar","makeTableToolbar","topRightPanel","FlexibleTable","enableTanstackTable","scrollKey","emptyTablePlaceholder","colState","columnLabel","Checkbox","selectAllRows","TABLE_SUBPANEL_BUTTON_WIDTH","staticWidth","propName","_makeCell","cell","toolTip","TABLE_DELETEICON_TOOLTIP","deleteOption","deleteRow","subItemButton","buildUIItem","disableSubPanelCell","subCell","EmptyTable","getEmptyTableText","overrideEmptyTableTextKey","defaultEmptyTableText","PROPERTIES_EMPTY_TABLE_TEXT","button_label","emptyTableButtonLabel","getResource","emptyTableText","emptyTableButtonClickHandler","NUMBER_TYPES","ListControl","_AbstractTable","addRow","controlPropType","getControlPropType","newRow","currentValue","listHeader","tableHeaders","makeCell","onClickCallback","LIST_TABLE_LABEL","getEditorSize","STRUCTURELISTEDITOR_ADDBUTTON_LABEL","makeRows","tableClassName","tableContainer","propTypes","PropTypes","isRequired","element","bool","string","List","getAddRemoveRows","getTableButtons","arrayPush","_arrayPush","concat_1","args","FIELDS_SPECIAL_CHARACTERS_REGEX","ExpressionSelectFieldOrFunction","valueColumn","EXPRESSION_VALUE_COLUMN","valueColumnDesc","EXPRESSION_VALUE_COLUMN_DESCRIPTION","recentUseCat","EXPRESSION_RECENTLY_USED","recentUseCatInfo","add_column_info","EXPRESSION_ADD_COLUMN","EXPRESSION_RECENTLY_USED_COLUMN","inCategories","_makeDatasetFields","getExpressionInfo","fieldSelected","valueSelected","functionSelected","fieldTableSortSpec","valuesTableSortSpec","functionTableSortSpec","functionCategory","fieldCategory","currentFieldDataset","field_value_groups","onFunctionCatChange","onFieldCatChange","onFieldFilter","onValueFilter","onFunctionFilter","onFieldTableClick","onAddFieldClick","onFunctionTableClick","onAddFunctionClick","onValueTableClick","onAddValueClick","sortTableRows","shouldQuoteField","switchName","selectedItem","currentData","getExpressionFieldsRecentlyUsed","updateExpressionFieldsRecentlyUsed","quote","fieldFilterText","fieldValue","valueFilterText","getExpressionRecentlyUsed","updateExpressionRecentlyUsed","functionFilterText","tableColumns","sortedData","expressionTableCellContent","expressionTableCellContentWithTooltip","tableType","handleAddButtonClick","dataset","fieldDataset","catIndex","infoIndex","addNewColumn","fieldColumn","EXPRESSION_FIELD_COLUMN","fieldColumnDesc","EXPRESSION_FIELD_COLUMN_DESCRIPTION","storageColumn","EXPRESSION_STORAGE_COLUMN","fieldsCatInfo","EXPRESSION_FIELDS_DROPDOWN_TITLE","fieldsTableInfo","entry","additional_column_entries","val","_makeFieldDropdown","fieldHeaders","valueHeader","categoryInfo","tableContents","tableData","valuesTableData","fieldColumns","createAddButtonContent","createContentObject","_makeAdditionalColumnsContent","_makeValuesContent","selectedField","findIndex","selectedValue","fieldsTableLabel","EXPRESSION_FIELDS_TABLE_LABEL","valuesTableLabel","EXPRESSION_VALUES_TABLE_LABEL","emptyFieldsLabel","EXPRESSION_FIELDS_EMPTY_TABLE_LABEL","emptyValuesLabel","EXPRESSION_VALUES_EMPTY_TABLE_LABEL","EXPRESSION_TABLE_ROWS","onRowDoubleClick","setSortColumn","minLabel","EXPRESSION_MIN_LABEL","maxLabel","EXPRESSION_MAX_LABEL","_addValueRow","valueColumns","categories","selectCategory","_makeFunctionDropdown","functionsTable","_makeFunctionsTable","items","selectedFunctionItem","TABLE_SEARCH_HEADER","listBoxMenuIconTranslationIds","DROPDOWN_TOOLTIP_CLOSEMENU","DROPDOWN_TOOLTIP_OPENMENU","Layer","level","Dropdown","EXPRESSION_FUNCTIONS_DROPDOWN_TITLE","translateWithId","titleText","_this4","selectedFieldItemLabel","newItems","selectedFieldItem","_this5","functionColumn","EXPRESSION_FUNCTION_COLUMN","returnColumn","EXPRESSION_RETURN_COLUMN","_buildFunctionTable","selectedFunction","functionsTableLabel","EXPRESSION_FUNCTIONS_TABLE_LABEL","functionsEmptyLabel","EXPRESSION_NO_FUNCTIONS","helpContainer","categoryFunctions","catFunction","returnType","return_type","fieldAndValueTable","_makeFieldAndValuesContent","_makeFunctionsContent","fieldsTab","EXPRESSION_FIELD_TAB","functionsTab","EXPRESSION_FUNCTIONS_TAB","ContentSwitcher","onSwitch","Switch","ExpressionSelectOperator","operatorList","operatorButtons","operator","second","onOperatorClick","operatorDiv","_makeOperatorContent","ExpressionSelectionPanel","fieldsOrFunction","ExpressionBuilder","editorDidMount","onBlur","onSelectionChange","getCodemirrorState","_this$getCodemirrorSt","_this$getCodemirrorSt2","_this$getCodemirrorSt0","_this$getCodemirrorSt3","_this$getCodemirrorSt4","somethingSelected","ranges","some","empty","cursor","main","head","editor","doc","selectionOffset","_this$getCodemirrorSt5","replaceSelection","_this$getCodemirrorSt6","_this$getCodemirrorSt7","_this$getCodemirrorSt8","_this$getCodemirrorSt9","buffer","currentLineNumber","lineAt","number","charBefore","line","_setSelection","exprValue","_editor$viewState","viewState","skipValidate","expressionSelectionPanel","relatedTarget","_this$editor","_this$getCodemirrorSt1","_this$getCodemirrorSt11","_this$getCodemirrorSt12","firstParam","lineCount","lines","_this$getCodemirrorSt10","paramOffset","insertSelection","expressionLabel","EXPRESSION_BUILDER_LABEL","ExpressionControl","builder","selectionRange","ExpressionToggle","Maximize","EXPRESSION_MAXIMIZE_LABEL","tearsheet_ref","setActiveTearsheet","Minimize","EXPRESSION_MINIMIZE_LABEL","crelt","elt","nodeType","setAttribute","add","child","appendChild","createTextNode","RangeError","SelectedDiagnostic","to","diagnostic","LintState","diagnostics","init","diagnosticFilter","facet","lintConfig","markerFilter","sorted","deco","RangeSetBuilder","pos","scan","iter","scanPos","docLen","reduce","p","d","widget","behind","check","lineBreak","sev","maxSeverity","Decoration","DiagnosticWidget","markClass","c","mark","class","inclusiveEnd","finish","findDiagnostic","after","found","between","maybeEnableLint","effects","lintState","StateEffect","appendConfig","of","lintExtensions","setDiagnosticsEffect","define","togglePanel","movePanelSelection","StateField","create","none","update","tr","docChanged","changes","selPos","mapPos","autoPanel","effect","is","LintPanel","provide","showPanel","EditorView","decorations","activeMark","lintTooltip","view","side","start","tooltipFilter","above","dom","diagnosticsTooltip","renderDiagnostic","closeLintPanel","lintKeymap","run","getPanel","querySelector","sel","lintPlugin","ViewPlugin","fromClass","timeout","delay","lintTime","now","setTimeout","clearTimeout","promises","sink","collected","then","batchResults","Promise","resolve","annotations","setDiagnostics","logException","startState","needsRefresh","force","destroy","Facet","combine","input","combineConfig","hideOn","combineFilter","y","assignKeys","assigned","ch","inPanel","_a","severity","renderMessage","fired","click","nameElt","onclick","onmousedown","WidgetType","super","other","toDOM","PanelItem","tabIndex","phrase","onkeydown","event","altKey","keyCode","moveSelection","toUpperCase","charCodeAt","needsSync","newSelectedItem","_start","_end","has","hasAttribute","removeAttribute","requestMeasure","read","write","scaleY","offsetHeight","scrollTop","bottom","sync","domPos","firstChild","rm","prev","nextSibling","remove","insertBefore","underline","color","attrs","encodeURIComponent","svg","baseTheme","padding","marginLeft","whiteSpace","borderLeft","font","border","backgroundColor","borderRadius","fontSize","opacity","backgroundPosition","backgroundRepeat","paddingBottom","backgroundImage","margin","position","borderRight","borderBottom","borderBottomColor","maxHeight","overflowY","textDecoration","background_fallback","color_fallback","background","severityWeight","weight","w","compute","hoverTooltip","touchesRange","DefaultBufferLength","nextPropID","NodeProp","perNode","deserialize","NodeType","closedBy","str","openedBy","isolate","contextHash","lookAhead","mounted","MountedTree","tree","parser","bracketed","noProps","flags","skipped","isTop","isSkipped","isAnonymous","direct","CachedNode","WeakMap","CachedInnerNode","IterMode","Tree","positions","mode","TreeCursor","topNode","cursorAt","scope","moveTo","_tree","TreeNode","resolveNode","resolveInner","resolveStack","inner","layers","context","parent","mount","root","iterStack","stackIterator","iterate","enter","leave","anon","IncludeAnonymous","entered","propValues","balance","balanceRange","makeTree","build","nodeSet","maxBufferLength","reused","minRepeatType","types","FlatBufferCursor","takeNode","parentStart","minPos","inRepeat","depth","lookAheadAtStart","contextAtStart","startPos","findBufferSize","Uint16Array","skip","endPos","copyToBuffer","TreeBuffer","localChildren","localPositions","localInRepeat","lastGroup","lastEnd","makeRepeatLeaf","takeFlatNode","makeBalanced","nodes","nodeCount","stopAt","lookAheadProp","lastI","base","pair","maxSize","fork","minStart","nodeSize","localSkipped","nodeStart","bufferStart","startIndex","topID","buildTree","childString","endIndex","findChild","dir","pick","checkSide","startI","endI","len","overlays","IgnoreOverlays","BaseNode","getChild","before","getChildren","matchContext","matchNodeContext","enterUnfinishedNodesBefore","childBefore","lastChild","prevSibling","_parent","nextChild","EnterBracketed","ExcludeBuffers","BufferNode","BufferContext","hasChild","IgnoreMounts","childAfter","rPos","enterBracketed","nextSignificantParent","toTree","cur","externalSibling","heads","picked","newHeads","StackIterator","bufferNode","yieldNode","yieldBuf","yield","enterChild","sibling","atLastNode","move","mustLeave","nodeSizeCache","balanceType","mkTop","mkTree","total","maxChild","ceil","divide","groupFrom","groupStart","groupSize","nextSize","only","nextTagID","Tag","modified","mod","nameOrParent","tag","defineModifier","Modifier","nextModifierID","instances","mods","exists","every","m","configs","sets","powerSet","take","Rule","tags","opaque","inherit","comment","typeName","literal","keyword","punctuation","bracket","meta","lineComment","blockComment","docComment","variableName","tagName","attributeName","labelName","namespace","macroName","docString","character","attributeValue","integer","float","regexp","escape","self","null","atom","unit","modifier","operatorKeyword","controlKeyword","definitionKeyword","moduleKeyword","derefOperator","arithmeticOperator","logicOperator","bitwiseOperator","compareOperator","updateOperator","definitionOperator","typeOperator","controlOperator","angleBracket","squareBracket","paren","brace","heading1","heading2","heading3","heading4","heading5","heading6","contentSeparator","emphasis","strong","monospace","strikethrough","inserted","deleted","changed","documentMeta","annotation","processingInstruction","constant","function","standard","local","special","wordObj","words","res","all","tagHighlighter","curPunc","commonAtoms","commonBuiltins","commonKeywords","atoms","builtins","keywords","blockkeywords","opChars","tokenBase","stream","skipToEnd","eat","eatWhile","tokenize","skipTo","backUp","word","propertyIsEnumerable","ctx","argList","setFlag","flag","indentUnit","afterIdent","token","sol","indentation","eatSpace","cx","firstChar","closing","languageData","wordChars","commentTokens","autocomplete","rBuiltIns","rHints","rLan","StreamLanguage","rCompletion","completeFromList","builtIn","showExpressionBuilder","validationInProgress","expressionEditorHeight","Compartment","editorRef","origHint","handleValidate","hasValidate","cancelExpressionBuilder","hideExpressionBuilder","addonHints","getDatasetFields","handleBlur","createCodeMirrorEditor","events","handleUpdate","setCodeMirrorEditable","focusSet","insert","reconfigure","results","matchBefore","explicit","_concat","controlWidth","expressionEditorDiv","clientWidth","charPerLine","sql","python","getPythonHints","LanguageSupport","javascript","json","clem","customCompletions","myHighlightStyle","HighlightStyle","linterExtension","linter","jsonParseLinter","extensions","keymap","insertNewline","indentWithTab","defaultKeymap","syntaxHighlighting","lineNumbers","highlightActiveLineGutter","highlightSpecialChars","history","foldGutter","drawSelection","dropCursor","EditorState","allowMultipleSelections","indentOnInput","bracketMatching","closeBrackets","autocompletion","rectangularSelection","crosshairCursor","highlightActiveLine","highlightSelectionMatches","closeBracketsKeymap","searchKeymap","historyKeymap","foldKeymap","completionKeymap","contentAttributes","initialMessage","initialState","validateIcon","validationHandler","response","that","domEventHandlers","blur","cancelButtonClicked","classList","updateListener","viewUpdate","changedRanges","abs","newLength","newPos","toB","customHeaderHandler","_this6","messageType","INFO","SUCCESS","_showBuilderButton","Calculator","EXPRESSION_BUILDER_ICON_DESCRIPTION","codeHeaderContent","_getCodeHeader","validateLabel","EXPRESSION_VALIDATING_LABEL","EXPRESSION_VALIDATE_LABEL","validateLink","expressonTitle","EXPRESSION_BUILDER_TITLE","expBuilder","expressionLink","codeHeader","CODE","toggleMaxMin","isTearsheetOpen","codemirrorClassName","minHeight","PasswordControl","overrideShowPasswordLabel","overrideHidePasswordLabel","defaultShowPasswordLabel","SHOW_PASSWORD_TOOLTIP","defaultHidePasswordLabel","HIDE_PASSWORD_TOOLTIP","showPasswordLabel","hidePasswordLabel","PasswordInput","DatefieldControl","getDateFormat","parse","formattedValue","DatepickerControl","locale","getLocale","getDatepickerSize","isoDate","DatePicker","datePickerType","DATEPICKER_TYPE","DatePickerInput","handleInputChange","DatepickerRangeControl","valueStart","valueEnd","createInfoDesc","isoStartDate","isoEndDate","datepickerRangeStartLabel","datepickerRangeStartDesc","datepickerRangeStartHelper","datepickerRangeEndLabel","datepickerRangeEndDesc","datepickerRangeEndHelper","defaultDatepickerRangeStartLabel","DATEPICKER_RANGE_START_LABEL","defaultDatepickerRangeEndLabel","DATEPICKER_RANGE_END_LABEL","startLabel","startDesc","startHelperText","endLabel","endDesc","endHelperText","RANGE","handleDateRangeChange","allowInput","handleInputStartChange","onStartBlur","handleInputEndChange","onEndBlur","TimefieldControl","getTimeFormat","time","CheckboxControl","tooltipIcon","checkboxLabel","ToggleControl","_this$props$propertyI","_this$props$propertyI2","overrideLabelKeyOn","overrideLabelKeyOff","defaultOnEditLabel","TOGGLE_ON_LABEL","defaultOffEditLabel","TOGGLE_OFF_LABEL","labelOn","labelOff","toggleControl","Toggle","toggled","labelB","labelA","onToggle","CheckboxsetControl","checkboxes","Information","CheckboxGroup","legendText","RadiosetControl","setEnabledStateOfOptionalPanels","handleCheckedDisabled","isRadioButtonDisabled","targetValue","valueSet","parsePanelTree","ConditionsUtils","panelIds","updateType","oldVal","newVal","convertTargetValue","radioValue","valueStates","itemDisabled","newRadioSelection","optionalPanel","getOptionalPanel","labelWithInfo","RadioButton","radioBtnGroupAriaLabel","RADIO_BUTTON_GROUP_ARIA_LABEL","RadioButtonGroup","getControlValueStates","DropDown","emptyLabel","disableEmptyListDropdown","overrideEmptyListPlaceholder","emptyLabelOverride","handleComboOnChange","handleOnInputChange","genSchemaSelectOptions","genSelectOptions","genFieldSelectOptions","getItemIcon","renderItem","filterItems","selectedOption","option","callbackIcon","propertyIconHandler","schemaName","getSelectedOption","opt","_list$item","_list$inputValue","filterItemsHandler","inputValue","dropDown","SELECTSCHEMA","DROPDOWN_TOOLTIP_CLEARSELECTION","dropdownComponent","SelectItem","Select","_dropDown$selectedOpt","_dropDown$selectedOpt2","ComboBox","onInputChange","allowCustomValue","itemToString","itemToElement","renderSelectedItem","getDatasetMetadataSchemas","MultiSelectControl","handleOnChange","setShouldRender","shouldRender","multiSelectDropdown","selectedOptions","selectedValues","_evt$selectedItems","selectedItems","DROPDOWN_TOOLTIP_CLEARALL","overrideEmptyLabelKey","defaultEmptyLabel","MULTISELECT_DROPDOWN_EMPTY_LABEL","overrideOptionsSelectedLabelKey","defaultOptionsSelectedLabel","MULTISELECT_DROPDOWN_OPTIONS_SELECTED_LABEL","FilterableMultiSelect","initialSelectedItems","MultiSelect","SomeofselectControl","updateSelections","tableOptions","selectable","SelectColumnsControl","allSelectedFields","FIELDPICKER_FIELDCOLUMN_LABEL","onFieldPickerClose","func","StructureEditorControl","controlFactory","subCtrlName","rowCtrlNames","_getSubControlDef","_getColumnIndex","isReadOnly","_makeRow","_makeControlTable","negate_1","negate","reject_1","StructureTableControl","addColumns","removeColumns","indexOfRow","columnName","columnNames","newRows","_reject","dataColumnIndex","getTableFieldIndex","NEW_COLUMN","defaultRowIndex","defaultRowValue","newControlValues","getOnPanelContainer","StructurelisteditorControl","ReadonlyTableControl","overrideLabelKey","defaultEditLabel","READONLYTABLE_EDIT_BUTTON_LABEL","getHideEditButton","SliderControl","Slider","ariaLabelInput","SLIDER_NUMBER_INPUT_LABEL","formatLabel","ControlItem","showRequiredIndicator","indicator","LABEL_INDICATOR_REQUIRED","LABEL_INDICATOR_OPTIONAL","accessibleControls","LIST","MULTISELECT","SLIDER","SPINNER","TOGGLE","TOGGLETEXT","tableControls","createdControl","createdControlLayered","_control$action","_isUndefined","complex_types","dataModelFields","columnExists","fieldValueMatchesProto","fieldColumnValues","_findFieldColumnValues","columnValue","allValid","valueInDataset","dataModelField","dataType","_includes","includes_1","param1Date","param2Date","getTime","valueDate","trimSpaces","startDate","endDate","regExp","timeDateFormat","valueLength","compareValue","getConditionOps","customOps","ops","cellNotEmpty","colNotExists","colDoesExists","equals","greaterThan","isEmpty","isNotEmpty","lessThan","matches","notContains","notEquals","notMatches","isDateTime","dmTypeEquals","dmTypeNotEquals","dmMeasurementEquals","dmMeasurementNotEquals","dmRoleEquals","dmRoleNotEquals","lengthEquals","lengthLessThan","lengthGreaterThan","custOp","PropertiesController","propertiesStore","handlers","propertyListener","controllerHandler","titleChangeHandler","visibleDefinitions","enabledDefinitions","filterDefinitions","filteredEnumDefinitions","allowChangeDefinitions","conditionalDefaultDefinitions","prevControls","customControls","customActions","summaryPanelControls","controllerHandlerCalled","commandStack","CommandStack","custPropSumPanelValues","sharedCtrlInfo","isSummaryPanel","visibleSubPanelCounter","conditionOps","expressionRecentlyUsed","expressionFieldsRecentlyUsed","selectionListeners","getStore","inHandlers","DEFAULT_LOCALE","getActiveTab","convertTypes","makeForm","setForm","sameParameterDefRendered","_parseUiConditions","UiConditionsParser","_parseSummaryControls","conditionsUtil","_assign","isInitProps","differentProperties","_difference","_addToControlValues","setInitialAddRemoveRows","setInitialTableButtonState","filteredTearsheets","FILTER","ALLOWCHANGE","CONDITIONALDEFAULT","dfnIndex","conditionDefinitions","retCond","conditionKey","baseId","convertNestedPropertyId","childProperties","panelTreeRoot","parseUiContent","resolveParameterRefs","setDefaults","defaultControlValues","_populateFieldData","setDefaultValues","multiSchema","_isMultiSchemaControl","_indexOfField","k","_getDefaultSubControlValue","fieldName","controlsNames","controlNames","getTitle","custOps","getDatasetMetadata","schemas","schemaNames","_filterSharedDataset","defs","skipControlName","sharedCtrlList","propNames","fieldNames","skipName","usedFields","sharedProp","arrayValue","fieldIdx","usedFieldsList","inDatasetMetadata","_loop","dupNamedSchemas","filterSchema","multipleSchemas","_canHaveMultipleSchemas","_notifySelectionListener","setDisableRowMoveButtons","getDisableRowMoveButtons","listener","selections","enumSet","replacementItems","newControl","_loop2","initialValue","allowValidations","convertedValue","_convertObjectStructure","ACTIONS","UPDATE_PROPERTY","previousValue","parsedValue","propertyValue","itm","filteredValue","filterHiddenControls","controlState","getControlType","valueState","valueType","applyProperties","convert","returnValues","valueFilters","filteredValues","propKey","inValues","currentValues","convertedValues","convertObjectStructureToArray","convertValueDataTypes","defaultValues","_merge","conditionalDefaultValues","SET_PROPERTIES","setActiveTearsheetId","getActiveTearsheetId","customAction","renderAction","filterHiddenDisable","filterSuccess","filterDisplayError","filteredPipeline","_filterDisplayErrors","_filterMessages","requiredMessages","_filterNonRequiredErrors","_filterHiddenDisabledErrors","filteredMessages","pipelineMessages","paramKey","paramMessage","_filterErrors","testMessage","isUndefined_1","parameterError","clearErrorMessage","_i","_Object$keys","rowNumber","_moveMessageRows","secondRow","firstRowErrorMsg","secondRowErrorMsg","_i2","_Object$keys2","colNumber","fromRow","toRow","valuesObj","valueObj","saveDisable","wideFlyoutPrimaryButtonDisable","setSummaryPanelControls","inSummary","createFormControl","customCtrl","renderControl","maxLengthForMultiLineControls","maxLengthForSingleLineControls","setAddRemoveRows","setHideEditButton","staticRowsArr","validateSelectionValues","updateStaticRows","clearStaticRows","setTableButtonEnabled","setInitialTableButtonSubControlState","valueIdx","getTableButtonEnabled","validateParameterDefAgainstSchema","parameterDef","validator","SchemaValidator","canvasPrefix","pipelinePrefix","addSchema","parameterDefsV3Schema","uihintsV3Schema","conditionsV3Schema","operatorsV3Schema","dataRecordMetadataV3Schema","getValidator","valResult","validate","nestedErrors","errors","console","validateAgainstSchema","TitleEditor","focused","titleValidation","editTitleClickHandler","helpClickHandler","TITLE_EDITOR_LABEL","textInputOnFocus","textInputOnBlur","headingEnabled","showHeading","handleTitleChange","newTitle","titleInfo","propertiesTitleEditButtonLabel","helpButtonLabel","TITLE_EDITOR_HELPBUTTON_LABEL","descButtonLabel","TITLE_EDITOR_DESCBUTTON_LABEL","closeButtonLabel","PROPERTIESEDIT_CLOSEBUTTON_LABEL","titleValidationTypes","titleWithWarning","titleWithErrror","propertiesTitleEdit","helpButton","_this4$props","showHeadingDesc","isDescWithLink","tooltipButton","ToggletipActions","Toggletip","align","ToggletipButton","ToggletipContent","renderTooltip","Help","renderHelpOrTooltipButton","closeButton","closeHandler","Close","rightFlyoutTabsView","onKeyDown","_handleKeyPress","onFocus","createTitleActions","FLYOUT_WIDTH_SMALL","styles","flyoutWidthSmall","FLYOUT_WIDTH_MEDIUM","flyoutWidthMedium","FLYOUT_WIDTH_LARGE","flyoutWidthLarge","FLYOUT_WIDTH_MAX","flyoutWidthMax","PropertiesMain","propertiesController","setPropertiesConfig","propertiesInfo","initialEditorSize","setEditorSize","setCustomControls","setCustomActions","setConditionOps","customConditionOps","setLight","setAppData","setCallbacks","previousErrorMessages","callbacks","PROPERTIES_LOADED","showResizeBtn","applyPropertiesEditing","updateEditorSize","_getOverrideSize","_getResizeButton","_isResizeButtonRequired","detectResize","detectResizeThrottled","_debounce","debounce_1","resizeClicked","lastPanelHeight","resizeObserver","ResizeObserver","entries","contentRect","observe","setPropertiesHasMounted","newProps","newEditorSize","_this$resizeObserver","disconnect","_this$commonPropertie","setHandlers","schemaValidation","originalTitle","initialValueInfo","uiParameterKeys","_getUiOnlyKeys","_setValueInforProperties","buttonLabels","primary","PROPERTIESEDIT_APPLYBUTTON_LABEL","secondary","PROPERTIESEDIT_REJECTBUTTON_LABEL","propertiesActionLabelHandler","PROPERTIES_ACTION_LABEL","node_label","defaultEditorSize","editorSizeInForm","overrideSize","resizeButton","CHEVRONARROWS","LEFT","RIGHT","enableResize","valueInfo","conditionReturnValueHandling","CONDITION_RETURN_VALUE_HANDLING","NULL","returnValueFiltering","_omit","omit_1","_pick","uiOnlyKeys","cancelSource","closePropertiesDialog","closeProperties","newErrorMessages","applyPropertiesWithoutEdit","errorMessages","getPropertiesActionLabel","command","getCommandStack","APPLY","applyOnBlurEnabled","CANCEL","getApplyButtonLabel","getRejectButtonLabel","propertiesLabel","propertiesTitle","buttonsContainer","resizeBtn","hasHeading","resizeIcon","resizeBtnLabel","PROPERTIESEDIT_RESIZEBUTTON_EXPAND_LABEL","PROPERTIESEDIT_RESIZEBUTTON_CONTRACT_LABEL","resize","editorForm","onHide","propertiesSizeClassname","overrideStyle","Provider","forwardRef","CommonProperties","hasError","createPropertiesMainComponent","revertState","propertiesMainHasMounted","closeEditor","instance","closeAndRevertContainer","errorInfo","PROPERTIES_UNEXPECTED_MESSAGE","errorHeading","supportMessage","PROPERTIES_SUPPORT_MESSAGE","closeText","closeFunction","revertText","PROPERTIESEDIT_REVERTBUTTON_LABEL","revertFunction","propertiesLandmarkRoleLabel","PROPERTIES_ERROR_LABEL","PROPERTIES_REVERT_MESSAGE","PROPERTIES_CLOSE_MESSAGE","displayAppropriateUIFallback","ACCORDIONS"],"mappings":"m4CAAIA,EAAUC,EAAqBC,SAC/BC,EAAUC,EAAqBC,SAC/BC,EAAWC,EAAAA,UA2Bf,IC7BIC,EDaJ,SAAoBC,EAAQC,EAAOC,GAKjC,IAJA,IAAIC,GAAS,EACTC,EAASH,EAAMG,OACfC,EAAS,CAAA,IAEJF,EAAQC,GAAQ,CACvB,IAAIE,EAAOL,EAAME,GACbI,EAAQhB,EAAQS,EAAQM,GAExBJ,EAAUK,EAAOD,IACnBZ,EAAQW,EAAQR,EAASS,EAAMN,GAASO,EAE3C,CACD,OAAOF,CACT,EC1BIG,EAAQb,EAAAA,QAiBZ,IClBIc,EDYJ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