@elyra/canvas 13.45.0 → 13.45.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ChevronRight-3d8ca494.js → ChevronRight-411e5c21.js} +2 -2
- package/dist/{ChevronRight-3d8ca494.js.map → ChevronRight-411e5c21.js.map} +1 -1
- package/dist/{ChevronRight-42b5629a.js → ChevronRight-e8e77f7d.js} +2 -2
- package/dist/{ChevronRight-42b5629a.js.map → ChevronRight-e8e77f7d.js.map} +1 -1
- package/dist/{Close-1b1822b0.js → Close-3730864c.js} +2 -2
- package/dist/{Close-1b1822b0.js.map → Close-3730864c.js.map} +1 -1
- package/dist/{Close-c707c8f7.js → Close-854a176c.js} +2 -2
- package/dist/{Close-c707c8f7.js.map → Close-854a176c.js.map} +1 -1
- package/dist/{Time-3da3c23b.js → Time-579424f6.js} +2 -2
- package/dist/{Time-3da3c23b.js.map → Time-579424f6.js.map} +1 -1
- package/dist/{Time-4b4e32e7.js → Time-63073cae.js} +2 -2
- package/dist/{Time-4b4e32e7.js.map → Time-63073cae.js.map} +1 -1
- package/dist/{canvas-controller-0c473fba.js → canvas-controller-16cb4e8a.js} +2 -2
- package/dist/{canvas-controller-0c473fba.js.map → canvas-controller-16cb4e8a.js.map} +1 -1
- package/dist/{canvas-controller-bbf16890.js → canvas-controller-bcb2b669.js} +2 -2
- package/dist/{canvas-controller-bbf16890.js.map → canvas-controller-bcb2b669.js.map} +1 -1
- package/dist/common-canvas-02630b88.js +2 -0
- package/dist/common-canvas-02630b88.js.map +1 -0
- package/dist/common-canvas-f4dc619f.js +2 -0
- package/dist/common-canvas-f4dc619f.js.map +1 -0
- package/dist/common-canvas.cjs +1 -1
- package/dist/common-canvas.js +1 -1
- package/dist/common-properties-66a5ed63.js +2 -0
- package/dist/common-properties-66a5ed63.js.map +1 -0
- package/dist/{common-properties-bb42fec5.js → common-properties-7197e445.js} +2 -2
- package/dist/common-properties-7197e445.js.map +1 -0
- package/dist/{context-menu-wrapper-0fdb9b4c.js → context-menu-wrapper-6bf9b2a3.js} +2 -2
- package/dist/{context-menu-wrapper-0fdb9b4c.js.map → context-menu-wrapper-6bf9b2a3.js.map} +1 -1
- package/dist/{context-menu-wrapper-8933071e.js → context-menu-wrapper-ae031dc8.js} +2 -2
- package/dist/{context-menu-wrapper-8933071e.js.map → context-menu-wrapper-ae031dc8.js.map} +1 -1
- package/dist/{flexible-table-e16bd245.js → flexible-table-20fac41c.js} +2 -2
- package/dist/{flexible-table-e16bd245.js.map → flexible-table-20fac41c.js.map} +1 -1
- package/dist/{flexible-table-8ce77a9c.js → flexible-table-2e44daf0.js} +2 -2
- package/dist/{flexible-table-8ce77a9c.js.map → flexible-table-2e44daf0.js.map} +1 -1
- package/dist/{index-0ad294bf.js → index-361c491b.js} +2 -2
- package/dist/{index-0ad294bf.js.map → index-361c491b.js.map} +1 -1
- package/dist/{index-37817c66.js → index-e12020a5.js} +2 -2
- package/dist/{index-37817c66.js.map → index-e12020a5.js.map} +1 -1
- package/dist/{keyboard-utils-d9b6ba48.js → keyboard-utils-6f375370.js} +2 -2
- package/dist/{keyboard-utils-81dcfd3f.js.map → keyboard-utils-6f375370.js.map} +1 -1
- package/dist/{keyboard-utils-81dcfd3f.js → keyboard-utils-78bc27c3.js} +2 -2
- package/dist/{keyboard-utils-d9b6ba48.js.map → keyboard-utils-78bc27c3.js.map} +1 -1
- package/dist/lib/canvas-controller.cjs +1 -1
- package/dist/lib/canvas-controller.js +1 -1
- package/dist/lib/canvas.cjs +1 -1
- package/dist/lib/canvas.js +1 -1
- package/dist/lib/context-menu.cjs +1 -1
- package/dist/lib/context-menu.js +1 -1
- package/dist/lib/properties/field-picker.cjs +1 -1
- package/dist/lib/properties/field-picker.js +1 -1
- package/dist/lib/properties/flexible-table.cjs +1 -1
- package/dist/lib/properties/flexible-table.js +1 -1
- package/dist/lib/properties.cjs +1 -1
- package/dist/lib/properties.js +1 -1
- package/locales/command-actions/locales/index.js +12 -12
- package/locales/common-canvas/locales/de.json +2 -0
- package/locales/common-canvas/locales/es.json +2 -0
- package/locales/common-canvas/locales/fr.json +2 -0
- package/locales/common-canvas/locales/index.js +12 -12
- package/locales/common-canvas/locales/it.json +2 -0
- package/locales/common-canvas/locales/ja.json +2 -0
- package/locales/common-canvas/locales/ko.json +2 -0
- package/locales/common-canvas/locales/pt-BR.json +2 -0
- package/locales/common-canvas/locales/sv.json +2 -0
- package/locales/common-canvas/locales/zh-CN.json +2 -0
- package/locales/common-canvas/locales/zh-TW.json +2 -0
- package/locales/common-properties/locales/index.js +12 -12
- package/locales/notification-panel/locales/index.js +12 -12
- package/locales/palette/locales/index.js +12 -12
- package/locales/toolbar/locales/index.js +12 -12
- package/package.json +7 -3
- package/src/common-canvas/canvas-controller.js +50 -24
- package/src/common-canvas/keyboard-utils.js +8 -0
- package/src/palette/palette-content-list-item.jsx +7 -1
- package/src/palette/palette-content-list.jsx +3 -1
- package/src/palette/palette-flyout-content-category.jsx +19 -2
- package/stats.html +1 -1
- package/types/canvas-controller.d.ts +60 -44
- package/dist/common-canvas-048c583e.js +0 -2
- package/dist/common-canvas-048c583e.js.map +0 -1
- package/dist/common-canvas-4b305040.js +0 -2
- package/dist/common-canvas-4b305040.js.map +0 -1
- package/dist/common-properties-3860224b.js +0 -2
- package/dist/common-properties-3860224b.js.map +0 -1
- package/dist/common-properties-bb42fec5.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-menu-wrapper-8933071e.js","sources":["../src/color-picker/color-set.js","../src/color-picker/color-picker.jsx","../src/context-menu/common-context-menu.jsx","../src/context-menu/context-menu-wrapper.jsx"],"sourcesContent":["/*\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\n// This is the set of colors for the WYSIWYG comments color palette used for\n// both text coloring and background coloring.\n\nconst colorArray = [\n\t\"#FFF1F1\", // Red\n\t\"#FCEBD6\", // Orange\n\t\"#FDF4D6\", // Yellow\n\t\"#DEFBE6\", // Green\n\t\"#D9FBFB\", // Teal\n\t\"#E5F6FF\", // Blue\n\t\"#F6F2FF\", // Purple\n\t\"#FFFFFF\", // Gray\n\n\t\"#FFD7D9\", // Red\n\t\"#FFD9BD\", // Orange\n\t\"#FFFFC7\", // Yellow\n\t\"#E2FEC7\", // Green\n\t\"#9EF0F0\", // Teal\n\t\"#CDE1FD\", // Blue\n\t\"#D4BBFF\", // Purple\n\t\"#F4F4F4\", // Gray\n\n\t\"#FFB3B8\", // Red\n\t\"#FF832B\", // Orange\n\t\"#FFFF00\", // Yellow\n\t\"#A7F0BA\", // Green\n\t\"#3DDBD9\", // Teal\n\t\"#BAE6FF\", // Blue\n\t\"#8080C0\", // Purple\n\t\"#E0E0E0\", // Gray\n\n\t\"#FF8389\", // Red\n\t\"#FC7B1D\", // Orange\n\t\"#FDDC69\", // Yellow\n\t\"#6FDC8C\", // Green\n\t\"#08BDBA\", // Teal\n\t\"#82CFFF\", // Blue\n\t\"#8080FF\", // Purple\n\t\"#C6C6C6\", // Gray\n\n\t\"#FA4D56\", // Red\n\t\"#EB6200\", // Orange\n\t\"#F1C21B\", // Yellow\n\t\"#42BE65\", // Green\n\t\"#009D9A\", // Teal\n\t\"#33B1FF\", // Blue\n\t\"#8000FF\", // Purple\n\t\"#A8A8A8\", // Gray\n\n\t\"#EA3325\", // Red\n\t\"#BA4E00\", // Orange\n\t\"#D2A106\", // Yellow\n\t\"#24A148\", // Green\n\t\"#007D79\", // Teal\n\t\"#78A9FF\", // Blue\n\t\"#6929C4\", // Purple\n\t\"#8D8D8D\", // Gray\n\n\t\"#DA1E28\", // Red\n\t\"#804040\", // Orange\n\t\"#B28600\", // Yellow\n\t\"#198038\", // Green\n\t\"#005D5D\", // Teal\n\t\"#1192E8\", // Blue\n\t\"#491D8B\", // Purple\n\t\"#000000\", // Gray\n\n\t\"#A2191F\", // Red\n\t\"#5C2800\", // Orange\n\t\"#8E6A01\", // Yellow\n\t\"#0E6027\", // Green\n\t\"#004144\", // Teal\n\t\"#0072C3\", // Blue\n\t\"#400080\", // Purple\n\t\"transparent\" // Gray\n];\nexport default colorArray;\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 KeyboardUtils from \"../common-canvas/keyboard-utils.js\";\nimport Logger from \"../logging/canvas-logger.js\";\nimport colorSetArray from \"./color-set.js\";\nimport { WYSIWYG } from \"../common-canvas/constants/canvas-constants.js\";\n\n// These dimensions should match the values in color-picker.scss\nconst COLOR_DIMENSION = 20;\nconst COLOR_PADDING = 5;\nconst COLOR_DIM_PLUS_PAD = COLOR_DIMENSION + COLOR_PADDING;\n\n\n// These values must reflect the layout of the color picker panel\n// described by the SCSS/CSS.\n\nclass ColorPicker extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.logger = new Logger(\"CC-Color-Picker\");\n\n\t\tthis.colorIndex = 0;\n\n\t\tthis.colorsPerRow = props.subPanelData.type === WYSIWYG ? 8 : 6;\n\t\tthis.totalColors = props.subPanelData.type === WYSIWYG ? colorSetArray.length : 12;\n\n\t\tthis.refss = [];\n\t\tfor (let i = 0; i < this.totalColors; i++) {\n\t\t\tthis.refss.push(React.createRef());\n\t\t}\n\t\tthis.onClick = this.onClick.bind(this);\n\t\tthis.onKeyDown = this.onKeyDown.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.setFocus(this.colorIndex);\n\t}\n\n\tonClick(evt) {\n\t\tevt.stopPropagation();\n\t\tthis.selectColor(evt);\n\t}\n\n\tonKeyDown(evt) {\n\t\tif (KeyboardUtils.nextColor(evt)) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex++;\n\t\t\tif (this.colorIndex > this.totalColors - 1) {\n\t\t\t\tthis.colorIndex = 0;\n\t\t\t}\n\t\t\tthis.setFocus(this.colorIndex);\n\n\t\t} else if (KeyboardUtils.previousColor(evt)) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex--;\n\t\t\tif (this.colorIndex < 0) {\n\t\t\t\tthis.props.closeSubPanel();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.setFocus(this.colorIndex);\n\n\t\t} else if (KeyboardUtils.aboveColor(evt)) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex -= this.colorsPerRow;\n\t\t\tif (this.colorIndex < 0) {\n\t\t\t\tthis.colorIndex += this.colorsPerRow;\n\t\t\t}\n\t\t\tthis.setFocus(this.colorIndex);\n\n\t\t} else if (KeyboardUtils.belowColor(evt)) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex += this.colorsPerRow;\n\t\t\tif (this.colorIndex > this.totalColors - 1) {\n\t\t\t\tthis.colorIndex -= this.colorsPerRow;\n\t\t\t}\n\t\t\tthis.setFocus(this.colorIndex);\n\n\t\t} else if (KeyboardUtils.selectColor(evt)) {\n\t\t\tevt.stopPropagation();\n\t\t\tevt.preventDefault();\n\t\t\tthis.selectColor(evt);\n\n\t\t} else if (KeyboardUtils.tabKey(evt)) {\n\t\t\tevt.stopPropagation();\n\t\t\tevt.preventDefault();\n\t\t\treturn;\n\t\t}\n\t}\n\n\tsetFocus(index) {\n\t\tthis.refss[index].current.focus();\n\t}\n\n\tselectColor(evt) {\n\t\tconst color = evt.target.dataset.color;\n\t\tthis.props.subPanelData.clickActionHandler(color, evt);\n\t\tthis.props.closeSubPanel();\n\t}\n\n\n\trender() {\n\t\tthis.logger.log(\"render\");\n\t\tif (this.props.subPanelData.type === WYSIWYG) {\n\n\t\t\tconst colorDivs = colorSetArray.map((c, i) => {\n\t\t\t\tlet className = \"color-picker-item\" + (c === \"transparent\" ? \" color-transparent\" : \"\");\n\t\t\t\tclassName += this.props.subPanelData.selectedColor === c ? \" selected\" : \"\";\n\n\t\t\t\treturn (<div key={\"key\" + i} ref={this.refss[i]} tabIndex={\"-1\"}\n\t\t\t\t\tdata-color={c}\n\t\t\t\t\tstyle={{ backgroundColor: c }}\n\t\t\t\t\tclassName={className}\n\t\t\t\t/>);\n\t\t\t});\n\n\t\t\tconst rowCount = Math.ceil(this.totalColors / this.colorsPerRow);\n\n\t\t\tconst style = {\n\t\t\t\twidth: (this.colorsPerRow * COLOR_DIM_PLUS_PAD) + COLOR_PADDING,\n\t\t\t\theight: (rowCount * COLOR_DIM_PLUS_PAD) + COLOR_PADDING,\n\t\t\t\tpaddingBottom: \"4px\"\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\t<div className=\"color-picker\" style={style} tabIndex={\"-1\"} onClick={this.onClick} onKeyDown={this.onKeyDown}>\n\t\t\t\t\t{colorDivs}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<div className=\"color-picker\" tabIndex={\"-1\"} onClick={this.onClick} onKeyDown={this.onKeyDown}>\n\t\t\t\t<div ref={this.refss[0]} tabIndex={\"-1\"} data-color={\"bkg-col-white-0\"} className=\"color-picker-item white-0\" />\n\t\t\t\t<div ref={this.refss[1]} tabIndex={\"-1\"} data-color={\"bkg-col-yellow-20\"} className=\"color-picker-item yellow-20\" />\n\t\t\t\t<div ref={this.refss[2]} tabIndex={\"-1\"} data-color={\"bkg-col-gray-20\"} className=\"color-picker-item gray-20\" />\n\t\t\t\t<div ref={this.refss[3]} tabIndex={\"-1\"} data-color={\"bkg-col-green-20\"} className=\"color-picker-item green-20\" />\n\t\t\t\t<div ref={this.refss[4]} tabIndex={\"-1\"} data-color={\"bkg-col-teal-20\"} className=\"color-picker-item teal-20\" />\n\t\t\t\t<div ref={this.refss[5]} tabIndex={\"-1\"} data-color={\"bkg-col-cyan-20\"} className=\"color-picker-item cyan-20\" />\n\n\t\t\t\t<div ref={this.refss[6]} tabIndex={\"-1\"} data-color={\"bkg-col-red-50\"} className=\"color-picker-item red-50\" />\n\t\t\t\t<div ref={this.refss[7]} tabIndex={\"-1\"} data-color={\"bkg-col-orange-40\"} className=\"color-picker-item orange-40\" />\n\t\t\t\t<div ref={this.refss[8]} tabIndex={\"-1\"} data-color={\"bkg-col-gray-50\"} className=\"color-picker-item gray-50\" />\n\t\t\t\t<div ref={this.refss[9]} tabIndex={\"-1\"} data-color={\"bkg-col-green-50\"} className=\"color-picker-item green-50\" />\n\t\t\t\t<div ref={this.refss[10]} tabIndex={\"-1\"} data-color={\"bkg-col-teal-50\"} className=\"color-picker-item teal-50\" />\n\t\t\t\t<div ref={this.refss[11]} tabIndex={\"-1\"} data-color={\"bkg-col-cyan-50\"} className=\"color-picker-item cyan-50\" />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nColorPicker.propTypes = {\n\tcloseSubPanel: PropTypes.func,\n\tsubPanelData: PropTypes.object\n};\n\nexport default ColorPicker;\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/* eslint no-empty-function: [\"error\", { \"allow\": [\"arrowFunctions\"] }] */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\n// Carbon icons - direct imports for tree-shaking optimization\nimport ChevronRight from \"@carbon/icons-react/lib/ChevronRight\";\nimport ColorPicker from \"../color-picker\";\nimport KeyboardUtils from \"../common-canvas/keyboard-utils\";\n\n// context-menu sizing\nconst CONTEXT_MENU_WIDTH = 160; // See context-menu.scss\nconst CONTEXT_MENU_LINK_HEIGHT = 30; // See context-menu.scss\nconst CONTEXT_MENU_DIVIDER_HEIGHT = 1; // See context-menu.scss\nconst EXTRA_OFFSET = 5; // Extra offset for vertical menu positioning\n\n\nclass CommonContextMenu extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tdisplaySubMenuAction: \"\"\n\t\t};\n\t\tthis.menuRefs = [];\n\t\tthis.subMenuRefs = [];\n\n\t\tthis.focusIndex = null; // Set to null so we know when it is not initialized.\n\t\tthis.subMenuFocusIndex = 0;\n\n\t\tthis.onKeyDown = this.onKeyDown.bind(this);\n\t\tthis.itemSelected = this.itemSelected.bind(this);\n\t\tthis.colorClicked = this.colorClicked.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.focusIndex = this.focusIndex === null ? 0 : this.focusIndex;\n\t\tthis.menuRefs[this.focusIndex].current.focus();\n\t}\n\n\tcomponentDidUpdate() {\n\t\tif (this.state.displaySubMenuAction) {\n\t\t\tthis.subMenuFocusIndex = 0;\n\t\t\tif (this.state.displaySubMenuAction !== \"colorBackground\") {\n\t\t\t\tconst subMenuRefs = this.subMenuRefs[this.state.displaySubMenuAction];\n\t\t\t\tsubMenuRefs[this.subMenuFocusIndex].current.focus();\n\t\t\t}\n\n\t\t} else {\n\t\t\tthis.focusIndex = this.focusIndex === null ? 0 : this.focusIndex;\n\t\t\tthis.menuRefs[this.focusIndex].current.focus();\n\t\t}\n\t}\n\n\tonContextMenu(e) {\n\t\te.preventDefault();\n\t}\n\n\tonKeyDown(evt) {\n\t\t// Don't let keyboard event go through to other objects.\n\t\tevt.stopPropagation();\n\t\tevt.preventDefault();\n\n\t\tif (KeyboardUtils.nextContextMenuOption(evt)) {\n\t\t\tif (this.state.displaySubMenuAction) {\n\t\t\t\tconst subMenuRefs = this.subMenuRefs[this.state.displaySubMenuAction];\n\t\t\t\tthis.subMenuFocusIndex = this.subMenuFocusIndex === subMenuRefs.length - 1 ? 0 : this.subMenuFocusIndex + 1;\n\t\t\t\tsubMenuRefs[this.subMenuFocusIndex].current.focus();\n\n\t\t\t} else {\n\t\t\t\tthis.focusIndex = this.focusIndex === this.menuRefs.length - 1 ? 0 : this.focusIndex + 1;\n\t\t\t\tthis.menuRefs[this.focusIndex].current.focus();\n\t\t\t}\n\n\t\t} else if (KeyboardUtils.previousContextMenuOption(evt)) {\n\t\t\tif (this.state.displaySubMenuAction) {\n\t\t\t\tconst subMenuRefs = this.subMenuRefs[this.state.displaySubMenuAction];\n\t\t\t\tthis.subMenuFocusIndex = this.subMenuFocusIndex === 0 ? subMenuRefs.length - 1 : this.subMenuFocusIndex - 1;\n\t\t\t\tsubMenuRefs[this.subMenuFocusIndex].current.focus();\n\n\t\t\t} else {\n\t\t\t\tthis.focusIndex = this.focusIndex === 0 ? this.menuRefs.length - 1 : this.focusIndex - 1;\n\t\t\t\tthis.menuRefs[this.focusIndex].current.focus();\n\t\t\t}\n\n\t\t} else if (KeyboardUtils.openContextMenuSubMenu(evt)) {\n\t\t\tconst action = evt.target.dataset.action;\n\t\t\tif (this.subMenuRefs[action]) {\n\t\t\t\tthis.subMenuOpen(action);\n\t\t\t}\n\n\t\t} else if (KeyboardUtils.closeContextMenuSubMenu(evt) &&\n\t\t\t\t\tthis.state.displaySubMenuAction) {\n\t\t\tthis.subMenuClose();\n\n\t\t} else if (KeyboardUtils.closeContextMenu(evt) &&\n\t\t\t\t\t!this.state.displaySubMenuAction) {\n\t\t\tthis.props.closeContextMenu();\n\n\t\t} else if (KeyboardUtils.activateContextMenuOption(evt)) {\n\t\t\tconst action = evt.target.dataset.action;\n\t\t\tif (this.subMenuRefs[action]) {\n\t\t\t\tthis.subMenuOpen(action);\n\n\t\t\t} else {\n\t\t\t\tthis.itemSelected(action);\n\t\t\t}\n\t\t}\n\t}\n\n\titemSelected(data) {\n\t\tthis.props.contextHandler(data);\n\t}\n\n\tcolorClicked(color, evt) {\n\t\tthis.props.contextHandler(\"colorSelectedObjects\", evt, { color });\n\t}\n\n\t// Returns the size of the menu passed in.\n\tcalculateMenuSize(menu) {\n\t\tvar numDividers = 0;\n\t\tfor (let i = 0; i < menu.length; ++i) {\n\t\t\tconst divider = menu[i].divider;\n\t\t\tif (divider) {\n\t\t\t\tnumDividers++;\n\t\t\t}\n\t\t}\n\n\t\tvar menuSize = {\n\t\t\theight: ((menu.length - numDividers) * CONTEXT_MENU_LINK_HEIGHT) + (numDividers * CONTEXT_MENU_DIVIDER_HEIGHT),\n\t\t\twidth: CONTEXT_MENU_WIDTH\n\t\t};\n\n\t\treturn menuSize;\n\t}\n\n\t// Returns a new position and the canvas rectangle for the context menu based on the current\n\t// mouse position and whether the menu would appear outside the edges of the page.\n\tcalculateMenuPos(mousePos, menuSize, canvasRect) {\n\t\tconst menuPos = { x: mousePos.x, y: mousePos.y };\n\n\t\t// Reposition contextMenu if it will show off the bottom of the page\n\t\tif (mousePos.y + menuSize.height > canvasRect.height) {\n\t\t\tmenuPos.y = canvasRect.height - menuSize.height - EXTRA_OFFSET; // Move up by extra offset so it looks nice\n\n\t\t\t// If repositioning the menu would push it off the top of the page\n\t\t\t// (in very short browser windows) position it at the top.\n\t\t\tif (menuPos.y < 0) {\n\t\t\t\tmenuPos.y = 0;\n\t\t\t}\n\t\t}\n\n\t\t// Reposition contextMenu if it will show off the right of the page\n\t\tif (mousePos.x + menuSize.width > canvasRect.width) {\n\t\t\tmenuPos.x -= menuSize.width;\n\t\t}\n\n\t\t// Add two pixels to x and y because on Chrome without this the context menu\n\t\t// appears with the top corner of the first menu item under the mouse\n\t\t// cursor. This highlights the first menu item (which looks weird) and, if\n\t\t// the first item is a cascade menu, automatically opens the sub-menu.\n\t\tmenuPos.x += 2;\n\t\tmenuPos.y += 2;\n\n\t\treturn menuPos;\n\t}\n\n\t// Returns true if all the items in a menu (or sub-menu) are disabled.\n\tareAllItemsDisabled(menuItems) {\n\t\tlet isEnabled = false;\n\n\t\tfor (let i = 0; i < menuItems.length; i++) {\n\t\t\tif (!menuItems[i].divider) {\n\t\t\t\tif (menuItems[i].submenu) {\n\t\t\t\t\tif (!this.areAllItemsDisabled(menuItems[i].menu)) {\n\t\t\t\t\t\tisEnabled = true;\n\t\t\t\t\t}\n\n\t\t\t\t} else if (this.isItemEnabled(menuItems[i])) {\n\t\t\t\t\tisEnabled = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn !isEnabled;\n\t}\n\n\t// Returns true if the menu item passed is enabled. The absence of the\n\t// 'enable' property default to true.\n\tisItemEnabled(item) {\n\t\treturn (typeof item.enable === \"undefined\" || item.enable === true);\n\t}\n\n\t// Builds a new menu based on the menu definition passed in.\n\tbuildMenu(menuDefinition, menuSize, menuPos, canvasRect) {\n\t\tconst menuItems = [];\n\t\tconst menuRefs = [];\n\n\t\tlet runningYPos = 0;\n\n\t\t// Records if we have just displayed a divider. This is useful because we\n\t\t// only want to display one divider if there is a divider element\n\t\t// immediately after another divider element in the menuDefinition array.\n\t\tlet previousDivider = false;\n\n\t\tconst allItemsDisabled = this.areAllItemsDisabled(menuDefinition);\n\n\t\tfor (let i = 0; i < menuDefinition.length; ++i) {\n\t\t\tconst divider = menuDefinition[i].divider;\n\t\t\tlet menuItem;\n\n\t\t\tif (divider) {\n\t\t\t\tif (!previousDivider) {\n\t\t\t\t\tmenuItem = <div key={i} className={\"context-menu-divider\"} />;\n\t\t\t\t\trunningYPos += CONTEXT_MENU_DIVIDER_HEIGHT;\n\t\t\t\t\tpreviousDivider = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tpreviousDivider = false;\n\n\t\t\t\t// Special case, when all menu items are disabled, it allows the topmost\n\t\t\t\t// disabled item to receive focus, even though it is disabled, so the\n\t\t\t\t// keyboard user can close the menu using ESC.\n\t\t\t\tif (i === 0 && allItemsDisabled) {\n\t\t\t\t\tconst ref = React.createRef();\n\t\t\t\t\tmenuRefs.push(ref);\n\n\t\t\t\t\tmenuItem = (\n\t\t\t\t\t\t<div key={i} ref={ref} tabIndex={0} className={\"context-menu-item disabled\"} onKeyDown={this.onKeyDown} role=\"menuitem\">\n\t\t\t\t\t\t\t{menuDefinition[i].label}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\n\t\t\t\t} else if (menuDefinition[i].action === \"colorBackground\") {\n\t\t\t\t\tconst disabled = !this.isItemEnabled(menuDefinition[i]);\n\t\t\t\t\tconst subMenuSize = { width: CONTEXT_MENU_WIDTH, height: 50 };\n\t\t\t\t\tconst subMenuInfo = this.buildColorPickerPanel();\n\t\t\t\t\tconst subMenuContent = subMenuInfo.menuItems;\n\t\t\t\t\tthis.subMenuRefs[menuDefinition[i].action] = subMenuInfo.menuRefs;\n\n\t\t\t\t\tmenuItem = this.buildSubMenu(\n\t\t\t\t\t\tmenuDefinition, i, menuRefs, subMenuContent, runningYPos, menuPos, menuSize, subMenuSize, canvasRect, disabled);\n\n\n\t\t\t\t} else if (menuDefinition[i].submenu) {\n\t\t\t\t\tconst disabled = this.areAllItemsDisabled(menuDefinition[i].menu);\n\t\t\t\t\tconst subMenuSize = this.calculateMenuSize(menuDefinition[i].menu);\n\t\t\t\t\tconst subMenuInfo = this.buildMenu(menuDefinition[i].menu, menuSize, menuPos, canvasRect, 100);\n\t\t\t\t\tconst subMenuContent = subMenuInfo.menuItems;\n\t\t\t\t\tthis.subMenuRefs[menuDefinition[i].action] = subMenuInfo.menuRefs;\n\n\t\t\t\t\tmenuItem = this.buildSubMenu(\n\t\t\t\t\t\tmenuDefinition, i, menuRefs, subMenuContent, runningYPos, menuPos, menuSize, subMenuSize, canvasRect, disabled);\n\n\t\t\t\t} else if (menuDefinition[i].enable === false) {\n\t\t\t\t\tmenuItem = (\n\t\t\t\t\t\t<div key={i} className={\"context-menu-item disabled\"} role=\"menuitem\">\n\t\t\t\t\t\t\t{menuDefinition[i].label}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\n\t\t\t\t} else {\n\t\t\t\t\tconst onClickFunction = this.itemSelected.bind(null, menuDefinition[i].action);\n\t\t\t\t\tconst ref = React.createRef();\n\t\t\t\t\tmenuRefs.push(ref);\n\n\t\t\t\t\tmenuItem = (\n\t\t\t\t\t\t<div key={i} ref={ref} tabIndex={-1} data-action={menuDefinition[i].action}\n\t\t\t\t\t\t\tclassName={\"context-menu-item\"} onClick={onClickFunction} onKeyDown={this.onKeyDown} role=\"menuitem\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{menuDefinition[i].label}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\trunningYPos += CONTEXT_MENU_LINK_HEIGHT;\n\t\t\t}\n\t\t\tmenuItems.push(menuItem);\n\t\t}\n\t\treturn { menuItems, menuRefs };\n\t}\n\n\tbuildColorPickerPanel() {\n\t\tconst subPanelData = {\n\t\t\tclickActionHandler: (c, evt) => this.colorClicked(c, evt),\n\t\t\tcloseSubPanel: () => this.subMenuClose()\n\t\t};\n\t\t// Only create the color picker when we are actually displaying it in the sub-menu.\n\t\t// That way the color picker will set focus on itself when it is opened.\n\t\tconst colorPicker = this.state.displaySubMenuAction === \"colorBackground\"\n\t\t\t? <ColorPicker ref={ref} subPanelData={subPanelData} closeSubPanel={() => this.subMenuClose()} />\n\t\t\t: null;\n\n\t\tconst ref = React.createRef();\n\n\t\tconst content = (\n\t\t\t<div key={\"color-picker\"} ref={ref} tabIndex={-1}>\n\t\t\t\t{colorPicker}\n\t\t\t</div>\n\t\t);\n\n\t\treturn { menuItems: [content], menuRefs: [ref] };\n\t}\n\n\tsubMenuOpen(action) {\n\t\tthis.setState({ displaySubMenuAction: action });\n\t}\n\n\tsubMenuClose(action) {\n\t\tthis.setState({ displaySubMenuAction: \"\" });\n\t}\n\n\t// Builds a sub-menu for the menuitem identified by the index into the menu definition.\n\tbuildSubMenu(menuDefinition, index, menuRefs, subMenuContent, runningYPos, menuPos,\n\t\tmenuSize, subMenuSize, canvasRect, disabled) {\n\t\tconst rtl = this.buildRtlState(menuPos, menuSize, subMenuSize, canvasRect);\n\t\tconst subMenuPosStyle = this.buildSubMenuPosStyle(runningYPos, menuPos, subMenuSize, canvasRect, rtl);\n\t\tconst menuItem = menuDefinition[index];\n\n\t\tconst icon = (<ChevronRight />);\n\t\tconst menuItemContent = <div>{menuItem.label}{icon} </div>;\n\t\tconst menuItemClass = \"context-menu-item \" + (disabled ? \" disabled\" : \"\");\n\t\tconst subMenuClass = \"context-menu-popover context-menu-submenu\" +\n\t\t\t(this.state.displaySubMenuAction === menuItem.action ? \" context-menu--visible\" : \"\");\n\t\tconst onMouseEnter = (disabled ? null : this.subMenuOpen.bind(this, menuItem.action));\n\t\tconst onMouseLeave = (disabled ? null : this.subMenuClose.bind(this));\n\n\t\tconst ref = disabled ? null : React.createRef();\n\t\tif (!disabled) {\n\t\t\tmenuRefs.push(ref);\n\t\t}\n\n\t\treturn (\n\t\t\t<div key={index} ref={ref} className={menuItemClass} aria-haspopup tabIndex={-1} data-action={menuItem.action} role=\"menuitem\"\n\t\t\t\tonMouseEnter={onMouseEnter}\n\t\t\t\tonMouseLeave={onMouseLeave}\n\t\t\t\tonKeyDown={this.onKeyDown}\n\t\t\t>\n\t\t\t\t{menuItemContent}\n\t\t\t\t<div style={subMenuPosStyle} className={subMenuClass}>\n\t\t\t\t\t{subMenuContent}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Returns a boolean to indicate whether the submenu should appear on the\n\t// right of the context menu (rtl === false) or on the left of the context\n\t// menu (rtl === true).\n\tbuildRtlState(menuPos, menuSize, subMenuSize, canvasRect) {\n\t\t// Ensure that the combined menu position, plus the menu width,\n\t\t// plus the submenu width, does not exceed the viewport bounds.\n\t\treturn (menuPos.x + menuSize.width + subMenuSize.width > canvasRect.right);\n\t}\n\n\t// Returns a style object that can be applied to the sub-menu to adjust its:\n\t// * vertical (y) position: If the submenu is tall enough that it would be\n\t// displayed off the bottom of the canvas area.\n\t// * horizontal (x) position: If the sub-menu needs to appear on the left\n\t// side of the main menu (rtl === true).\n\tbuildSubMenuPosStyle(runningYPos, menuPos, subMenuSize, canvasRect, rtl) {\n\t\t// Does the submenu go below the bottom of the viewport?\n\t\tconst y = canvasRect.bottom - (menuPos.y + runningYPos + subMenuSize.height);\n\n\t\t// If submenu is not below the viewport bottom set offset to 0 so the\n\t\t// submenu will not be moved. Otherwise, y will be used to move the\n\t\t// submenu up fully into the view port.\n\t\tconst offset = (y > 0) ? 0 : y - EXTRA_OFFSET;\n\n\t\tconst subMenuPosStyle = {\n\t\t\ttop: offset + \"px\" // Use negative to push the menu up\n\t\t};\n\n\t\tif (rtl) {\n\t\t\tsubMenuPosStyle.left = -CONTEXT_MENU_WIDTH + \"px\";\n\t\t}\n\n\t\treturn subMenuPosStyle;\n\t}\n\n\t// Returns the menu definition array passed in making sure any\n\t// submenu items have an action. Note: some applications forget\n\t// to provide an action because, for the submenu, it is only\n\t// used by the context menu code.\n\tensureAllSubMenuItemsHaveAction(menuDef) {\n\t\treturn menuDef.map((item, index) => {\n\t\t\tif (item.submenu && typeof item.action === \"undefined\") {\n\t\t\t\treturn { ...item, action: \"submenu_\" + index };\n\t\t\t}\n\t\t\treturn item;\n\t\t});\n\t}\n\n\trender() {\n\t\t// Reposition contextMenu so that it does not show off the screen\n\t\tconst menuSize = this.calculateMenuSize(this.props.menuDefinition);\n\t\tconst menuPos = this.calculateMenuPos(this.props.mousePos, menuSize, this.props.canvasRect);\n\t\tconst posStyle = {\n\t\t\tleft: menuPos.x + \"px\",\n\t\t\ttop: menuPos.y + \"px\"\n\t\t};\n\n\t\tthis.menuRefs = [];\n\t\tconst menuDefinition = this.ensureAllSubMenuItemsHaveAction(this.props.menuDefinition);\n\t\tconst menuInfo = this.buildMenu(menuDefinition, menuSize, menuPos, this.props.canvasRect);\n\t\tthis.menuRefs = menuInfo.menuRefs;\n\n\t\treturn (\n\t\t\t<div id=\"context-menu-popover\" role=\"menu\" className=\"context-menu-popover\" style={posStyle} onContextMenu={this.onContextMenu}>\n\t\t\t\t{menuInfo.menuItems}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nCommonContextMenu.propTypes = {\n\tcontextHandler: PropTypes.func.isRequired,\n\tcloseContextMenu: PropTypes.func.isRequired,\n\tmenuDefinition: PropTypes.array.isRequired,\n\tcanvasRect: PropTypes.object.isRequired,\n\tmousePos: PropTypes.object.isRequired\n};\n\nexport default CommonContextMenu;\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 CommonContextMenu from \"./common-context-menu.jsx\";\n\nexport default class ContextMenuWrapper extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {};\n\n\t\tthis.contextMenuClicked = this.contextMenuClicked.bind(this);\n\t\tthis.handleClickOutside = this.handleClickOutside.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tdocument.addEventListener(\"click\", this.handleClickOutside, true);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener(\"click\", this.handleClickOutside, true);\n\t}\n\n\t// Returns an object that describes the dimensions of a rectangle for the\n\t// canvas div with coordinates based on the top left corner of the div. This\n\t// will match the coordinates for the mouse position where the user clicked,\n\t// which is specified in this.props.contextMenuPos object.\n\tgetCanvasRect() {\n\t\tconst containingDiv = document.getElementById(this.props.containingDivId);\n\t\tif (containingDiv) {\n\t\t\tconst clientRect = containingDiv.getBoundingClientRect();\n\t\t\treturn {\n\t\t\t\ttop: 0,\n\t\t\t\tbottom: clientRect.bottom - clientRect.top,\n\t\t\t\tleft: 0,\n\t\t\t\tright: clientRect.right - clientRect.left,\n\t\t\t\theight: clientRect.height,\n\t\t\t\twidth: clientRect.width\n\t\t\t};\n\t\t}\n\t\t// Assist Jests tests to run when containingDiv is not available.\n\t\treturn { top: 0, bottom: 200, left: 0, right: 50, height: 200, width: 50 };\n\t}\n\n\thandleClickOutside(e) {\n\t\t// On Safari, when a user is displaying the context menu with a ctrl-click\n\t\t// (which is a supported context menu gesture on the Mac) a secondary click\n\t\t// event is emitted which is received here with the ctrlKey field enabled.\n\t\t// So we ignore that event otherwise, if we continue, the context menu will\n\t\t// be closed.\n\t\tif (e.ctrlKey) {\n\t\t\te.stopPropagation();\n\t\t\treturn;\n\t\t}\n\n\t\t// If the click was anywhere outside the context menu and\n\t\t// the ellipsis button we just close the menu.\n\t\tif (!this.isOverContextMenu(e) && !this.isOverEllipsisButton(e)) {\n\t\t\t// This stop propagation is needed in common canvas so that selected nodes will\n\t\t\t// remain selected even after clicking outside the context menu to close the menu.\n\t\t\tif (this.props.stopPropagation) {\n\t\t\t\te.stopPropagation();\n\t\t\t}\n\t\t\tthis.props.closeContextMenu();\n\t\t}\n\t}\n\n\t// Returns true if the event occurred over the context menu.\n\tisOverContextMenu(e) {\n\t\tconst domNode = document.getElementById(\"context-menu-popover\");\n\t\treturn !domNode || domNode.contains(e.target);\n\t}\n\n\t// Returns true if the event occurred over the ellipsis button. Typically\n\t// there will be only one ellipsis button on the canvas, since they are only\n\t// displayed on hover, but in some test circumstances there might be more\n\t// than one.\n\tisOverEllipsisButton(e) {\n\t\tconst ellipsisNodes = document.getElementsByClassName(\"d3-node-ellipsis-group\");\n\t\tlet state = false;\n\t\tfor (let i = 0; i < ellipsisNodes.length; i++) {\n\t\t\tif (state === false && ellipsisNodes[i].contains(e.target)) {\n\t\t\t\tstate = true;\n\t\t\t}\n\t\t}\n\t\treturn state;\n\t}\n\n\tcontextMenuClicked(action, evt, param) {\n\t\tthis.props.contextMenuActionHandler(action, evt, param);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<CommonContextMenu\n\t\t\t\tcontextHandler={this.contextMenuClicked}\n\t\t\t\tmenuDefinition={this.props.contextMenuDef}\n\t\t\t\tcanvasRect={this.getCanvasRect()}\n\t\t\t\tmousePos={this.props.contextMenuPos}\n\t\t\t\tcloseContextMenu={this.props.closeContextMenu}\n\t\t\t/>\n\t\t);\n\t}\n}\n\nContextMenuWrapper.propTypes = {\n\tcontextMenuDef: PropTypes.array.isRequired,\n\tcontainingDivId: PropTypes.string.isRequired,\n\tcontextMenuPos: PropTypes.object.isRequired,\n\tcontextMenuActionHandler: PropTypes.func.isRequired,\n\tcloseContextMenu: PropTypes.func.isRequired,\n\tstopPropagation: PropTypes.bool\n};\n"],"names":["colorSetArray","ColorPicker$1","_React$Component","ColorPicker","props","_this","_classCallCheck","logger","Logger","colorIndex","colorsPerRow","subPanelData","type","WYSIWYG","totalColors","length","refss","i","push","React","createRef","onClick","bind","onKeyDown","_inherits","_createClass","key","value","this","setFocus","evt","stopPropagation","selectColor","KeyboardUtils","nextColor","previousColor","closeSubPanel","aboveColor","belowColor","preventDefault","tabKey","index","current","focus","color","target","dataset","clickActionHandler","_this2","log","colorDivs","map","c","className","selectedColor","createElement","ref","tabIndex","style","backgroundColor","rowCount","Math","ceil","width","COLOR_DIMENSION","height","paddingBottom","Component","CommonContextMenu$1","CommonContextMenu","state","displaySubMenuAction","menuRefs","subMenuRefs","focusIndex","subMenuFocusIndex","itemSelected","colorClicked","e","nextContextMenuOption","previousContextMenuOption","openContextMenuSubMenu","action","subMenuOpen","closeContextMenuSubMenu","subMenuClose","closeContextMenu","activateContextMenuOption","data","contextHandler","menu","numDividers","divider","mousePos","menuSize","canvasRect","menuPos","x","y","menuItems","isEnabled","submenu","areAllItemsDisabled","isItemEnabled","item","enable","menuDefinition","runningYPos","previousDivider","allItemsDisabled","menuItem","role","label","disabled","subMenuSize","subMenuInfo","buildColorPickerPanel","subMenuContent","buildSubMenu","calculateMenuSize","buildMenu","onClickFunction","colorPicker","setState","rtl","buildRtlState","subMenuPosStyle","buildSubMenuPosStyle","icon","ChevronRight","menuItemContent","menuItemClass","subMenuClass","onMouseEnter","onMouseLeave","right","bottom","top","left","menuDef","_objectSpread","calculateMenuPos","posStyle","ensureAllSubMenuItemsHaveAction","menuInfo","id","onContextMenu","ContextMenuWrapper","contextMenuClicked","handleClickOutside","document","addEventListener","removeEventListener","containingDiv","getElementById","containingDivId","clientRect","getBoundingClientRect","ctrlKey","isOverContextMenu","isOverEllipsisButton","domNode","contains","ellipsisNodes","getElementsByClassName","param","contextMenuActionHandler","contextMenuDef","getCanvasRect","contextMenuPos"],"mappings":"2XAmBA,IAyEAA,EAzEmB,CAClB,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UAEA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UAEA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UAEA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UAEA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UAEA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UAEA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UAEA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,8JClED,IAmJAC,WA3IiBC,GAChB,SAAAC,EAAYC,GAAO,IAAAC,QAAAC,OAAAH,KAClBA,QAAMC,SAAND,IAAAE,qEACKE,OAAS,IAAIC,EAAO,mBAEzBH,EAAKI,WAAa,EAElBJ,EAAKK,aAAeN,EAAMO,aAAaC,OAASC,EAAU,EAAI,EAC9DR,EAAKS,YAAcV,EAAMO,aAAaC,OAASC,EAAUb,EAAce,OAAS,GAEhFV,EAAKW,MAAQ,GACb,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DyB,GAAQ,GAGV,OAAOA,CACR,GAAC,CAAA5C,IAAA,qBAAAC,MAED,SAAmBuD,EAAQpD,EAAKuI,GAC/BzI,KAAKxB,MAAMkK,yBAAyBpF,EAAQpD,EAAKuI,EAClD,GAAC,CAAA3I,IAAA,SAAAC,MAED,WACC,OACCR,EAAAoC,cAACc,EAAiB,CACjBoB,eAAgB7D,KAAKwH,mBACrB1C,eAAgB9E,KAAKxB,MAAMmK,eAC3BxE,WAAYnE,KAAK4I,gBACjB3E,SAAUjE,KAAKxB,MAAMqK,eACrBnF,iBAAkB1D,KAAKxB,MAAMkF,kBAGhC,IAAC,EAhG8CnE,EAAMgD"}
|
|
1
|
+
{"version":3,"file":"context-menu-wrapper-ae031dc8.js","sources":["../src/color-picker/color-set.js","../src/color-picker/color-picker.jsx","../src/context-menu/common-context-menu.jsx","../src/context-menu/context-menu-wrapper.jsx"],"sourcesContent":["/*\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\n// This is the set of colors for the WYSIWYG comments color palette used for\n// both text coloring and background coloring.\n\nconst colorArray = [\n\t\"#FFF1F1\", // Red\n\t\"#FCEBD6\", // Orange\n\t\"#FDF4D6\", // Yellow\n\t\"#DEFBE6\", // Green\n\t\"#D9FBFB\", // Teal\n\t\"#E5F6FF\", // Blue\n\t\"#F6F2FF\", // Purple\n\t\"#FFFFFF\", // Gray\n\n\t\"#FFD7D9\", // Red\n\t\"#FFD9BD\", // Orange\n\t\"#FFFFC7\", // Yellow\n\t\"#E2FEC7\", // Green\n\t\"#9EF0F0\", // Teal\n\t\"#CDE1FD\", // Blue\n\t\"#D4BBFF\", // Purple\n\t\"#F4F4F4\", // Gray\n\n\t\"#FFB3B8\", // Red\n\t\"#FF832B\", // Orange\n\t\"#FFFF00\", // Yellow\n\t\"#A7F0BA\", // Green\n\t\"#3DDBD9\", // Teal\n\t\"#BAE6FF\", // Blue\n\t\"#8080C0\", // Purple\n\t\"#E0E0E0\", // Gray\n\n\t\"#FF8389\", // Red\n\t\"#FC7B1D\", // Orange\n\t\"#FDDC69\", // Yellow\n\t\"#6FDC8C\", // Green\n\t\"#08BDBA\", // Teal\n\t\"#82CFFF\", // Blue\n\t\"#8080FF\", // Purple\n\t\"#C6C6C6\", // Gray\n\n\t\"#FA4D56\", // Red\n\t\"#EB6200\", // Orange\n\t\"#F1C21B\", // Yellow\n\t\"#42BE65\", // Green\n\t\"#009D9A\", // Teal\n\t\"#33B1FF\", // Blue\n\t\"#8000FF\", // Purple\n\t\"#A8A8A8\", // Gray\n\n\t\"#EA3325\", // Red\n\t\"#BA4E00\", // Orange\n\t\"#D2A106\", // Yellow\n\t\"#24A148\", // Green\n\t\"#007D79\", // Teal\n\t\"#78A9FF\", // Blue\n\t\"#6929C4\", // Purple\n\t\"#8D8D8D\", // Gray\n\n\t\"#DA1E28\", // Red\n\t\"#804040\", // Orange\n\t\"#B28600\", // Yellow\n\t\"#198038\", // Green\n\t\"#005D5D\", // Teal\n\t\"#1192E8\", // Blue\n\t\"#491D8B\", // Purple\n\t\"#000000\", // Gray\n\n\t\"#A2191F\", // Red\n\t\"#5C2800\", // Orange\n\t\"#8E6A01\", // Yellow\n\t\"#0E6027\", // Green\n\t\"#004144\", // Teal\n\t\"#0072C3\", // Blue\n\t\"#400080\", // Purple\n\t\"transparent\" // Gray\n];\nexport default colorArray;\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 KeyboardUtils from \"../common-canvas/keyboard-utils.js\";\nimport Logger from \"../logging/canvas-logger.js\";\nimport colorSetArray from \"./color-set.js\";\nimport { WYSIWYG } from \"../common-canvas/constants/canvas-constants.js\";\n\n// These dimensions should match the values in color-picker.scss\nconst COLOR_DIMENSION = 20;\nconst COLOR_PADDING = 5;\nconst COLOR_DIM_PLUS_PAD = COLOR_DIMENSION + COLOR_PADDING;\n\n\n// These values must reflect the layout of the color picker panel\n// described by the SCSS/CSS.\n\nclass ColorPicker extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.logger = new Logger(\"CC-Color-Picker\");\n\n\t\tthis.colorIndex = 0;\n\n\t\tthis.colorsPerRow = props.subPanelData.type === WYSIWYG ? 8 : 6;\n\t\tthis.totalColors = props.subPanelData.type === WYSIWYG ? colorSetArray.length : 12;\n\n\t\tthis.refss = [];\n\t\tfor (let i = 0; i < this.totalColors; i++) {\n\t\t\tthis.refss.push(React.createRef());\n\t\t}\n\t\tthis.onClick = this.onClick.bind(this);\n\t\tthis.onKeyDown = this.onKeyDown.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.setFocus(this.colorIndex);\n\t}\n\n\tonClick(evt) {\n\t\tevt.stopPropagation();\n\t\tthis.selectColor(evt);\n\t}\n\n\tonKeyDown(evt) {\n\t\tif (KeyboardUtils.nextColor(evt)) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex++;\n\t\t\tif (this.colorIndex > this.totalColors - 1) {\n\t\t\t\tthis.colorIndex = 0;\n\t\t\t}\n\t\t\tthis.setFocus(this.colorIndex);\n\n\t\t} else if (KeyboardUtils.previousColor(evt)) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex--;\n\t\t\tif (this.colorIndex < 0) {\n\t\t\t\tthis.props.closeSubPanel();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.setFocus(this.colorIndex);\n\n\t\t} else if (KeyboardUtils.aboveColor(evt)) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex -= this.colorsPerRow;\n\t\t\tif (this.colorIndex < 0) {\n\t\t\t\tthis.colorIndex += this.colorsPerRow;\n\t\t\t}\n\t\t\tthis.setFocus(this.colorIndex);\n\n\t\t} else if (KeyboardUtils.belowColor(evt)) {\n\t\t\tevt.stopPropagation();\n\t\t\tthis.colorIndex += this.colorsPerRow;\n\t\t\tif (this.colorIndex > this.totalColors - 1) {\n\t\t\t\tthis.colorIndex -= this.colorsPerRow;\n\t\t\t}\n\t\t\tthis.setFocus(this.colorIndex);\n\n\t\t} else if (KeyboardUtils.selectColor(evt)) {\n\t\t\tevt.stopPropagation();\n\t\t\tevt.preventDefault();\n\t\t\tthis.selectColor(evt);\n\n\t\t} else if (KeyboardUtils.tabKey(evt)) {\n\t\t\tevt.stopPropagation();\n\t\t\tevt.preventDefault();\n\t\t\treturn;\n\t\t}\n\t}\n\n\tsetFocus(index) {\n\t\tthis.refss[index].current.focus();\n\t}\n\n\tselectColor(evt) {\n\t\tconst color = evt.target.dataset.color;\n\t\tthis.props.subPanelData.clickActionHandler(color, evt);\n\t\tthis.props.closeSubPanel();\n\t}\n\n\n\trender() {\n\t\tthis.logger.log(\"render\");\n\t\tif (this.props.subPanelData.type === WYSIWYG) {\n\n\t\t\tconst colorDivs = colorSetArray.map((c, i) => {\n\t\t\t\tlet className = \"color-picker-item\" + (c === \"transparent\" ? \" color-transparent\" : \"\");\n\t\t\t\tclassName += this.props.subPanelData.selectedColor === c ? \" selected\" : \"\";\n\n\t\t\t\treturn (<div key={\"key\" + i} ref={this.refss[i]} tabIndex={\"-1\"}\n\t\t\t\t\tdata-color={c}\n\t\t\t\t\tstyle={{ backgroundColor: c }}\n\t\t\t\t\tclassName={className}\n\t\t\t\t/>);\n\t\t\t});\n\n\t\t\tconst rowCount = Math.ceil(this.totalColors / this.colorsPerRow);\n\n\t\t\tconst style = {\n\t\t\t\twidth: (this.colorsPerRow * COLOR_DIM_PLUS_PAD) + COLOR_PADDING,\n\t\t\t\theight: (rowCount * COLOR_DIM_PLUS_PAD) + COLOR_PADDING,\n\t\t\t\tpaddingBottom: \"4px\"\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\t<div className=\"color-picker\" style={style} tabIndex={\"-1\"} onClick={this.onClick} onKeyDown={this.onKeyDown}>\n\t\t\t\t\t{colorDivs}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<div className=\"color-picker\" tabIndex={\"-1\"} onClick={this.onClick} onKeyDown={this.onKeyDown}>\n\t\t\t\t<div ref={this.refss[0]} tabIndex={\"-1\"} data-color={\"bkg-col-white-0\"} className=\"color-picker-item white-0\" />\n\t\t\t\t<div ref={this.refss[1]} tabIndex={\"-1\"} data-color={\"bkg-col-yellow-20\"} className=\"color-picker-item yellow-20\" />\n\t\t\t\t<div ref={this.refss[2]} tabIndex={\"-1\"} data-color={\"bkg-col-gray-20\"} className=\"color-picker-item gray-20\" />\n\t\t\t\t<div ref={this.refss[3]} tabIndex={\"-1\"} data-color={\"bkg-col-green-20\"} className=\"color-picker-item green-20\" />\n\t\t\t\t<div ref={this.refss[4]} tabIndex={\"-1\"} data-color={\"bkg-col-teal-20\"} className=\"color-picker-item teal-20\" />\n\t\t\t\t<div ref={this.refss[5]} tabIndex={\"-1\"} data-color={\"bkg-col-cyan-20\"} className=\"color-picker-item cyan-20\" />\n\n\t\t\t\t<div ref={this.refss[6]} tabIndex={\"-1\"} data-color={\"bkg-col-red-50\"} className=\"color-picker-item red-50\" />\n\t\t\t\t<div ref={this.refss[7]} tabIndex={\"-1\"} data-color={\"bkg-col-orange-40\"} className=\"color-picker-item orange-40\" />\n\t\t\t\t<div ref={this.refss[8]} tabIndex={\"-1\"} data-color={\"bkg-col-gray-50\"} className=\"color-picker-item gray-50\" />\n\t\t\t\t<div ref={this.refss[9]} tabIndex={\"-1\"} data-color={\"bkg-col-green-50\"} className=\"color-picker-item green-50\" />\n\t\t\t\t<div ref={this.refss[10]} tabIndex={\"-1\"} data-color={\"bkg-col-teal-50\"} className=\"color-picker-item teal-50\" />\n\t\t\t\t<div ref={this.refss[11]} tabIndex={\"-1\"} data-color={\"bkg-col-cyan-50\"} className=\"color-picker-item cyan-50\" />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nColorPicker.propTypes = {\n\tcloseSubPanel: PropTypes.func,\n\tsubPanelData: PropTypes.object\n};\n\nexport default ColorPicker;\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/* eslint no-empty-function: [\"error\", { \"allow\": [\"arrowFunctions\"] }] */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\n// Carbon icons - direct imports for tree-shaking optimization\nimport ChevronRight from \"@carbon/icons-react/lib/ChevronRight\";\nimport ColorPicker from \"../color-picker\";\nimport KeyboardUtils from \"../common-canvas/keyboard-utils\";\n\n// context-menu sizing\nconst CONTEXT_MENU_WIDTH = 160; // See context-menu.scss\nconst CONTEXT_MENU_LINK_HEIGHT = 30; // See context-menu.scss\nconst CONTEXT_MENU_DIVIDER_HEIGHT = 1; // See context-menu.scss\nconst EXTRA_OFFSET = 5; // Extra offset for vertical menu positioning\n\n\nclass CommonContextMenu extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tdisplaySubMenuAction: \"\"\n\t\t};\n\t\tthis.menuRefs = [];\n\t\tthis.subMenuRefs = [];\n\n\t\tthis.focusIndex = null; // Set to null so we know when it is not initialized.\n\t\tthis.subMenuFocusIndex = 0;\n\n\t\tthis.onKeyDown = this.onKeyDown.bind(this);\n\t\tthis.itemSelected = this.itemSelected.bind(this);\n\t\tthis.colorClicked = this.colorClicked.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.focusIndex = this.focusIndex === null ? 0 : this.focusIndex;\n\t\tthis.menuRefs[this.focusIndex].current.focus();\n\t}\n\n\tcomponentDidUpdate() {\n\t\tif (this.state.displaySubMenuAction) {\n\t\t\tthis.subMenuFocusIndex = 0;\n\t\t\tif (this.state.displaySubMenuAction !== \"colorBackground\") {\n\t\t\t\tconst subMenuRefs = this.subMenuRefs[this.state.displaySubMenuAction];\n\t\t\t\tsubMenuRefs[this.subMenuFocusIndex].current.focus();\n\t\t\t}\n\n\t\t} else {\n\t\t\tthis.focusIndex = this.focusIndex === null ? 0 : this.focusIndex;\n\t\t\tthis.menuRefs[this.focusIndex].current.focus();\n\t\t}\n\t}\n\n\tonContextMenu(e) {\n\t\te.preventDefault();\n\t}\n\n\tonKeyDown(evt) {\n\t\t// Don't let keyboard event go through to other objects.\n\t\tevt.stopPropagation();\n\t\tevt.preventDefault();\n\n\t\tif (KeyboardUtils.nextContextMenuOption(evt)) {\n\t\t\tif (this.state.displaySubMenuAction) {\n\t\t\t\tconst subMenuRefs = this.subMenuRefs[this.state.displaySubMenuAction];\n\t\t\t\tthis.subMenuFocusIndex = this.subMenuFocusIndex === subMenuRefs.length - 1 ? 0 : this.subMenuFocusIndex + 1;\n\t\t\t\tsubMenuRefs[this.subMenuFocusIndex].current.focus();\n\n\t\t\t} else {\n\t\t\t\tthis.focusIndex = this.focusIndex === this.menuRefs.length - 1 ? 0 : this.focusIndex + 1;\n\t\t\t\tthis.menuRefs[this.focusIndex].current.focus();\n\t\t\t}\n\n\t\t} else if (KeyboardUtils.previousContextMenuOption(evt)) {\n\t\t\tif (this.state.displaySubMenuAction) {\n\t\t\t\tconst subMenuRefs = this.subMenuRefs[this.state.displaySubMenuAction];\n\t\t\t\tthis.subMenuFocusIndex = this.subMenuFocusIndex === 0 ? subMenuRefs.length - 1 : this.subMenuFocusIndex - 1;\n\t\t\t\tsubMenuRefs[this.subMenuFocusIndex].current.focus();\n\n\t\t\t} else {\n\t\t\t\tthis.focusIndex = this.focusIndex === 0 ? this.menuRefs.length - 1 : this.focusIndex - 1;\n\t\t\t\tthis.menuRefs[this.focusIndex].current.focus();\n\t\t\t}\n\n\t\t} else if (KeyboardUtils.openContextMenuSubMenu(evt)) {\n\t\t\tconst action = evt.target.dataset.action;\n\t\t\tif (this.subMenuRefs[action]) {\n\t\t\t\tthis.subMenuOpen(action);\n\t\t\t}\n\n\t\t} else if (KeyboardUtils.closeContextMenuSubMenu(evt) &&\n\t\t\t\t\tthis.state.displaySubMenuAction) {\n\t\t\tthis.subMenuClose();\n\n\t\t} else if (KeyboardUtils.closeContextMenu(evt) &&\n\t\t\t\t\t!this.state.displaySubMenuAction) {\n\t\t\tthis.props.closeContextMenu();\n\n\t\t} else if (KeyboardUtils.activateContextMenuOption(evt)) {\n\t\t\tconst action = evt.target.dataset.action;\n\t\t\tif (this.subMenuRefs[action]) {\n\t\t\t\tthis.subMenuOpen(action);\n\n\t\t\t} else {\n\t\t\t\tthis.itemSelected(action);\n\t\t\t}\n\t\t}\n\t}\n\n\titemSelected(data) {\n\t\tthis.props.contextHandler(data);\n\t}\n\n\tcolorClicked(color, evt) {\n\t\tthis.props.contextHandler(\"colorSelectedObjects\", evt, { color });\n\t}\n\n\t// Returns the size of the menu passed in.\n\tcalculateMenuSize(menu) {\n\t\tvar numDividers = 0;\n\t\tfor (let i = 0; i < menu.length; ++i) {\n\t\t\tconst divider = menu[i].divider;\n\t\t\tif (divider) {\n\t\t\t\tnumDividers++;\n\t\t\t}\n\t\t}\n\n\t\tvar menuSize = {\n\t\t\theight: ((menu.length - numDividers) * CONTEXT_MENU_LINK_HEIGHT) + (numDividers * CONTEXT_MENU_DIVIDER_HEIGHT),\n\t\t\twidth: CONTEXT_MENU_WIDTH\n\t\t};\n\n\t\treturn menuSize;\n\t}\n\n\t// Returns a new position and the canvas rectangle for the context menu based on the current\n\t// mouse position and whether the menu would appear outside the edges of the page.\n\tcalculateMenuPos(mousePos, menuSize, canvasRect) {\n\t\tconst menuPos = { x: mousePos.x, y: mousePos.y };\n\n\t\t// Reposition contextMenu if it will show off the bottom of the page\n\t\tif (mousePos.y + menuSize.height > canvasRect.height) {\n\t\t\tmenuPos.y = canvasRect.height - menuSize.height - EXTRA_OFFSET; // Move up by extra offset so it looks nice\n\n\t\t\t// If repositioning the menu would push it off the top of the page\n\t\t\t// (in very short browser windows) position it at the top.\n\t\t\tif (menuPos.y < 0) {\n\t\t\t\tmenuPos.y = 0;\n\t\t\t}\n\t\t}\n\n\t\t// Reposition contextMenu if it will show off the right of the page\n\t\tif (mousePos.x + menuSize.width > canvasRect.width) {\n\t\t\tmenuPos.x -= menuSize.width;\n\t\t}\n\n\t\t// Add two pixels to x and y because on Chrome without this the context menu\n\t\t// appears with the top corner of the first menu item under the mouse\n\t\t// cursor. This highlights the first menu item (which looks weird) and, if\n\t\t// the first item is a cascade menu, automatically opens the sub-menu.\n\t\tmenuPos.x += 2;\n\t\tmenuPos.y += 2;\n\n\t\treturn menuPos;\n\t}\n\n\t// Returns true if all the items in a menu (or sub-menu) are disabled.\n\tareAllItemsDisabled(menuItems) {\n\t\tlet isEnabled = false;\n\n\t\tfor (let i = 0; i < menuItems.length; i++) {\n\t\t\tif (!menuItems[i].divider) {\n\t\t\t\tif (menuItems[i].submenu) {\n\t\t\t\t\tif (!this.areAllItemsDisabled(menuItems[i].menu)) {\n\t\t\t\t\t\tisEnabled = true;\n\t\t\t\t\t}\n\n\t\t\t\t} else if (this.isItemEnabled(menuItems[i])) {\n\t\t\t\t\tisEnabled = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn !isEnabled;\n\t}\n\n\t// Returns true if the menu item passed is enabled. The absence of the\n\t// 'enable' property default to true.\n\tisItemEnabled(item) {\n\t\treturn (typeof item.enable === \"undefined\" || item.enable === true);\n\t}\n\n\t// Builds a new menu based on the menu definition passed in.\n\tbuildMenu(menuDefinition, menuSize, menuPos, canvasRect) {\n\t\tconst menuItems = [];\n\t\tconst menuRefs = [];\n\n\t\tlet runningYPos = 0;\n\n\t\t// Records if we have just displayed a divider. This is useful because we\n\t\t// only want to display one divider if there is a divider element\n\t\t// immediately after another divider element in the menuDefinition array.\n\t\tlet previousDivider = false;\n\n\t\tconst allItemsDisabled = this.areAllItemsDisabled(menuDefinition);\n\n\t\tfor (let i = 0; i < menuDefinition.length; ++i) {\n\t\t\tconst divider = menuDefinition[i].divider;\n\t\t\tlet menuItem;\n\n\t\t\tif (divider) {\n\t\t\t\tif (!previousDivider) {\n\t\t\t\t\tmenuItem = <div key={i} className={\"context-menu-divider\"} />;\n\t\t\t\t\trunningYPos += CONTEXT_MENU_DIVIDER_HEIGHT;\n\t\t\t\t\tpreviousDivider = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tpreviousDivider = false;\n\n\t\t\t\t// Special case, when all menu items are disabled, it allows the topmost\n\t\t\t\t// disabled item to receive focus, even though it is disabled, so the\n\t\t\t\t// keyboard user can close the menu using ESC.\n\t\t\t\tif (i === 0 && allItemsDisabled) {\n\t\t\t\t\tconst ref = React.createRef();\n\t\t\t\t\tmenuRefs.push(ref);\n\n\t\t\t\t\tmenuItem = (\n\t\t\t\t\t\t<div key={i} ref={ref} tabIndex={0} className={\"context-menu-item disabled\"} onKeyDown={this.onKeyDown} role=\"menuitem\">\n\t\t\t\t\t\t\t{menuDefinition[i].label}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\n\t\t\t\t} else if (menuDefinition[i].action === \"colorBackground\") {\n\t\t\t\t\tconst disabled = !this.isItemEnabled(menuDefinition[i]);\n\t\t\t\t\tconst subMenuSize = { width: CONTEXT_MENU_WIDTH, height: 50 };\n\t\t\t\t\tconst subMenuInfo = this.buildColorPickerPanel();\n\t\t\t\t\tconst subMenuContent = subMenuInfo.menuItems;\n\t\t\t\t\tthis.subMenuRefs[menuDefinition[i].action] = subMenuInfo.menuRefs;\n\n\t\t\t\t\tmenuItem = this.buildSubMenu(\n\t\t\t\t\t\tmenuDefinition, i, menuRefs, subMenuContent, runningYPos, menuPos, menuSize, subMenuSize, canvasRect, disabled);\n\n\n\t\t\t\t} else if (menuDefinition[i].submenu) {\n\t\t\t\t\tconst disabled = this.areAllItemsDisabled(menuDefinition[i].menu);\n\t\t\t\t\tconst subMenuSize = this.calculateMenuSize(menuDefinition[i].menu);\n\t\t\t\t\tconst subMenuInfo = this.buildMenu(menuDefinition[i].menu, menuSize, menuPos, canvasRect, 100);\n\t\t\t\t\tconst subMenuContent = subMenuInfo.menuItems;\n\t\t\t\t\tthis.subMenuRefs[menuDefinition[i].action] = subMenuInfo.menuRefs;\n\n\t\t\t\t\tmenuItem = this.buildSubMenu(\n\t\t\t\t\t\tmenuDefinition, i, menuRefs, subMenuContent, runningYPos, menuPos, menuSize, subMenuSize, canvasRect, disabled);\n\n\t\t\t\t} else if (menuDefinition[i].enable === false) {\n\t\t\t\t\tmenuItem = (\n\t\t\t\t\t\t<div key={i} className={\"context-menu-item disabled\"} role=\"menuitem\">\n\t\t\t\t\t\t\t{menuDefinition[i].label}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\n\t\t\t\t} else {\n\t\t\t\t\tconst onClickFunction = this.itemSelected.bind(null, menuDefinition[i].action);\n\t\t\t\t\tconst ref = React.createRef();\n\t\t\t\t\tmenuRefs.push(ref);\n\n\t\t\t\t\tmenuItem = (\n\t\t\t\t\t\t<div key={i} ref={ref} tabIndex={-1} data-action={menuDefinition[i].action}\n\t\t\t\t\t\t\tclassName={\"context-menu-item\"} onClick={onClickFunction} onKeyDown={this.onKeyDown} role=\"menuitem\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{menuDefinition[i].label}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\trunningYPos += CONTEXT_MENU_LINK_HEIGHT;\n\t\t\t}\n\t\t\tmenuItems.push(menuItem);\n\t\t}\n\t\treturn { menuItems, menuRefs };\n\t}\n\n\tbuildColorPickerPanel() {\n\t\tconst subPanelData = {\n\t\t\tclickActionHandler: (c, evt) => this.colorClicked(c, evt),\n\t\t\tcloseSubPanel: () => this.subMenuClose()\n\t\t};\n\t\t// Only create the color picker when we are actually displaying it in the sub-menu.\n\t\t// That way the color picker will set focus on itself when it is opened.\n\t\tconst colorPicker = this.state.displaySubMenuAction === \"colorBackground\"\n\t\t\t? <ColorPicker ref={ref} subPanelData={subPanelData} closeSubPanel={() => this.subMenuClose()} />\n\t\t\t: null;\n\n\t\tconst ref = React.createRef();\n\n\t\tconst content = (\n\t\t\t<div key={\"color-picker\"} ref={ref} tabIndex={-1}>\n\t\t\t\t{colorPicker}\n\t\t\t</div>\n\t\t);\n\n\t\treturn { menuItems: [content], menuRefs: [ref] };\n\t}\n\n\tsubMenuOpen(action) {\n\t\tthis.setState({ displaySubMenuAction: action });\n\t}\n\n\tsubMenuClose(action) {\n\t\tthis.setState({ displaySubMenuAction: \"\" });\n\t}\n\n\t// Builds a sub-menu for the menuitem identified by the index into the menu definition.\n\tbuildSubMenu(menuDefinition, index, menuRefs, subMenuContent, runningYPos, menuPos,\n\t\tmenuSize, subMenuSize, canvasRect, disabled) {\n\t\tconst rtl = this.buildRtlState(menuPos, menuSize, subMenuSize, canvasRect);\n\t\tconst subMenuPosStyle = this.buildSubMenuPosStyle(runningYPos, menuPos, subMenuSize, canvasRect, rtl);\n\t\tconst menuItem = menuDefinition[index];\n\n\t\tconst icon = (<ChevronRight />);\n\t\tconst menuItemContent = <div>{menuItem.label}{icon} </div>;\n\t\tconst menuItemClass = \"context-menu-item \" + (disabled ? \" disabled\" : \"\");\n\t\tconst subMenuClass = \"context-menu-popover context-menu-submenu\" +\n\t\t\t(this.state.displaySubMenuAction === menuItem.action ? \" context-menu--visible\" : \"\");\n\t\tconst onMouseEnter = (disabled ? null : this.subMenuOpen.bind(this, menuItem.action));\n\t\tconst onMouseLeave = (disabled ? null : this.subMenuClose.bind(this));\n\n\t\tconst ref = disabled ? null : React.createRef();\n\t\tif (!disabled) {\n\t\t\tmenuRefs.push(ref);\n\t\t}\n\n\t\treturn (\n\t\t\t<div key={index} ref={ref} className={menuItemClass} aria-haspopup tabIndex={-1} data-action={menuItem.action} role=\"menuitem\"\n\t\t\t\tonMouseEnter={onMouseEnter}\n\t\t\t\tonMouseLeave={onMouseLeave}\n\t\t\t\tonKeyDown={this.onKeyDown}\n\t\t\t>\n\t\t\t\t{menuItemContent}\n\t\t\t\t<div style={subMenuPosStyle} className={subMenuClass}>\n\t\t\t\t\t{subMenuContent}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Returns a boolean to indicate whether the submenu should appear on the\n\t// right of the context menu (rtl === false) or on the left of the context\n\t// menu (rtl === true).\n\tbuildRtlState(menuPos, menuSize, subMenuSize, canvasRect) {\n\t\t// Ensure that the combined menu position, plus the menu width,\n\t\t// plus the submenu width, does not exceed the viewport bounds.\n\t\treturn (menuPos.x + menuSize.width + subMenuSize.width > canvasRect.right);\n\t}\n\n\t// Returns a style object that can be applied to the sub-menu to adjust its:\n\t// * vertical (y) position: If the submenu is tall enough that it would be\n\t// displayed off the bottom of the canvas area.\n\t// * horizontal (x) position: If the sub-menu needs to appear on the left\n\t// side of the main menu (rtl === true).\n\tbuildSubMenuPosStyle(runningYPos, menuPos, subMenuSize, canvasRect, rtl) {\n\t\t// Does the submenu go below the bottom of the viewport?\n\t\tconst y = canvasRect.bottom - (menuPos.y + runningYPos + subMenuSize.height);\n\n\t\t// If submenu is not below the viewport bottom set offset to 0 so the\n\t\t// submenu will not be moved. Otherwise, y will be used to move the\n\t\t// submenu up fully into the view port.\n\t\tconst offset = (y > 0) ? 0 : y - EXTRA_OFFSET;\n\n\t\tconst subMenuPosStyle = {\n\t\t\ttop: offset + \"px\" // Use negative to push the menu up\n\t\t};\n\n\t\tif (rtl) {\n\t\t\tsubMenuPosStyle.left = -CONTEXT_MENU_WIDTH + \"px\";\n\t\t}\n\n\t\treturn subMenuPosStyle;\n\t}\n\n\t// Returns the menu definition array passed in making sure any\n\t// submenu items have an action. Note: some applications forget\n\t// to provide an action because, for the submenu, it is only\n\t// used by the context menu code.\n\tensureAllSubMenuItemsHaveAction(menuDef) {\n\t\treturn menuDef.map((item, index) => {\n\t\t\tif (item.submenu && typeof item.action === \"undefined\") {\n\t\t\t\treturn { ...item, action: \"submenu_\" + index };\n\t\t\t}\n\t\t\treturn item;\n\t\t});\n\t}\n\n\trender() {\n\t\t// Reposition contextMenu so that it does not show off the screen\n\t\tconst menuSize = this.calculateMenuSize(this.props.menuDefinition);\n\t\tconst menuPos = this.calculateMenuPos(this.props.mousePos, menuSize, this.props.canvasRect);\n\t\tconst posStyle = {\n\t\t\tleft: menuPos.x + \"px\",\n\t\t\ttop: menuPos.y + \"px\"\n\t\t};\n\n\t\tthis.menuRefs = [];\n\t\tconst menuDefinition = this.ensureAllSubMenuItemsHaveAction(this.props.menuDefinition);\n\t\tconst menuInfo = this.buildMenu(menuDefinition, menuSize, menuPos, this.props.canvasRect);\n\t\tthis.menuRefs = menuInfo.menuRefs;\n\n\t\treturn (\n\t\t\t<div id=\"context-menu-popover\" role=\"menu\" className=\"context-menu-popover\" style={posStyle} onContextMenu={this.onContextMenu}>\n\t\t\t\t{menuInfo.menuItems}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nCommonContextMenu.propTypes = {\n\tcontextHandler: PropTypes.func.isRequired,\n\tcloseContextMenu: PropTypes.func.isRequired,\n\tmenuDefinition: PropTypes.array.isRequired,\n\tcanvasRect: PropTypes.object.isRequired,\n\tmousePos: PropTypes.object.isRequired\n};\n\nexport default CommonContextMenu;\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 CommonContextMenu from \"./common-context-menu.jsx\";\n\nexport default class ContextMenuWrapper extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {};\n\n\t\tthis.contextMenuClicked = this.contextMenuClicked.bind(this);\n\t\tthis.handleClickOutside = this.handleClickOutside.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tdocument.addEventListener(\"click\", this.handleClickOutside, true);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener(\"click\", this.handleClickOutside, true);\n\t}\n\n\t// Returns an object that describes the dimensions of a rectangle for the\n\t// canvas div with coordinates based on the top left corner of the div. This\n\t// will match the coordinates for the mouse position where the user clicked,\n\t// which is specified in this.props.contextMenuPos object.\n\tgetCanvasRect() {\n\t\tconst containingDiv = document.getElementById(this.props.containingDivId);\n\t\tif (containingDiv) {\n\t\t\tconst clientRect = containingDiv.getBoundingClientRect();\n\t\t\treturn {\n\t\t\t\ttop: 0,\n\t\t\t\tbottom: clientRect.bottom - clientRect.top,\n\t\t\t\tleft: 0,\n\t\t\t\tright: clientRect.right - clientRect.left,\n\t\t\t\theight: clientRect.height,\n\t\t\t\twidth: clientRect.width\n\t\t\t};\n\t\t}\n\t\t// Assist Jests tests to run when containingDiv is not available.\n\t\treturn { top: 0, bottom: 200, left: 0, right: 50, height: 200, width: 50 };\n\t}\n\n\thandleClickOutside(e) {\n\t\t// On Safari, when a user is displaying the context menu with a ctrl-click\n\t\t// (which is a supported context menu gesture on the Mac) a secondary click\n\t\t// event is emitted which is received here with the ctrlKey field enabled.\n\t\t// So we ignore that event otherwise, if we continue, the context menu will\n\t\t// be closed.\n\t\tif (e.ctrlKey) {\n\t\t\te.stopPropagation();\n\t\t\treturn;\n\t\t}\n\n\t\t// If the click was anywhere outside the context menu and\n\t\t// the ellipsis button we just close the menu.\n\t\tif (!this.isOverContextMenu(e) && !this.isOverEllipsisButton(e)) {\n\t\t\t// This stop propagation is needed in common canvas so that selected nodes will\n\t\t\t// remain selected even after clicking outside the context menu to close the menu.\n\t\t\tif (this.props.stopPropagation) {\n\t\t\t\te.stopPropagation();\n\t\t\t}\n\t\t\tthis.props.closeContextMenu();\n\t\t}\n\t}\n\n\t// Returns true if the event occurred over the context menu.\n\tisOverContextMenu(e) {\n\t\tconst domNode = document.getElementById(\"context-menu-popover\");\n\t\treturn !domNode || domNode.contains(e.target);\n\t}\n\n\t// Returns true if the event occurred over the ellipsis button. Typically\n\t// there will be only one ellipsis button on the canvas, since they are only\n\t// displayed on hover, but in some test circumstances there might be more\n\t// than one.\n\tisOverEllipsisButton(e) {\n\t\tconst ellipsisNodes = document.getElementsByClassName(\"d3-node-ellipsis-group\");\n\t\tlet state = false;\n\t\tfor (let i = 0; i < ellipsisNodes.length; i++) {\n\t\t\tif (state === false && ellipsisNodes[i].contains(e.target)) {\n\t\t\t\tstate = true;\n\t\t\t}\n\t\t}\n\t\treturn state;\n\t}\n\n\tcontextMenuClicked(action, evt, param) {\n\t\tthis.props.contextMenuActionHandler(action, evt, param);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<CommonContextMenu\n\t\t\t\tcontextHandler={this.contextMenuClicked}\n\t\t\t\tmenuDefinition={this.props.contextMenuDef}\n\t\t\t\tcanvasRect={this.getCanvasRect()}\n\t\t\t\tmousePos={this.props.contextMenuPos}\n\t\t\t\tcloseContextMenu={this.props.closeContextMenu}\n\t\t\t/>\n\t\t);\n\t}\n}\n\nContextMenuWrapper.propTypes = {\n\tcontextMenuDef: PropTypes.array.isRequired,\n\tcontainingDivId: PropTypes.string.isRequired,\n\tcontextMenuPos: PropTypes.object.isRequired,\n\tcontextMenuActionHandler: PropTypes.func.isRequired,\n\tcloseContextMenu: PropTypes.func.isRequired,\n\tstopPropagation: PropTypes.bool\n};\n"],"names":["colorSetArray","ColorPicker$1","_React$Component","ColorPicker","props","_this","_classCallCheck","logger","Logger","colorIndex","colorsPerRow","subPanelData","type","WYSIWYG","totalColors","length","refss","i","push","React","createRef","onClick","bind","onKeyDown","_inherits","_createClass","key","value","this","setFocus","evt","stopPropagation","selectColor","KeyboardUtils","nextColor","previousColor","closeSubPanel","aboveColor","belowColor","preventDefault","tabKey","index","current","focus","color","target","dataset","clickActionHandler","_this2","log","colorDivs","map","c","className","selectedColor","createElement","ref","tabIndex","style","backgroundColor","rowCount","Math","ceil","width","COLOR_DIMENSION","height","paddingBottom","Component","CommonContextMenu$1","CommonContextMenu","state","displaySubMenuAction","menuRefs","subMenuRefs","focusIndex","subMenuFocusIndex","itemSelected","colorClicked","e","nextContextMenuOption","previousContextMenuOption","openContextMenuSubMenu","action","subMenuOpen","closeContextMenuSubMenu","subMenuClose","closeContextMenu","activateContextMenuOption","data","contextHandler","menu","numDividers","divider","mousePos","menuSize","canvasRect","menuPos","x","y","menuItems","isEnabled","submenu","areAllItemsDisabled","isItemEnabled","item","enable","menuDefinition","runningYPos","previousDivider","allItemsDisabled","menuItem","role","label","disabled","subMenuSize","subMenuInfo","buildColorPickerPanel","subMenuContent","buildSubMenu","calculateMenuSize","buildMenu","onClickFunction","colorPicker","setState","rtl","buildRtlState","subMenuPosStyle","buildSubMenuPosStyle","icon","ChevronRight","menuItemContent","menuItemClass","subMenuClass","onMouseEnter","onMouseLeave","right","bottom","top","left","menuDef","_objectSpread","calculateMenuPos","posStyle","ensureAllSubMenuItemsHaveAction","menuInfo","id","onContextMenu","ContextMenuWrapper","contextMenuClicked","handleClickOutside","document","addEventListener","removeEventListener","containingDiv","getElementById","containingDivId","clientRect","getBoundingClientRect","ctrlKey","isOverContextMenu","isOverEllipsisButton","domNode","contains","ellipsisNodes","getElementsByClassName","param","contextMenuActionHandler","contextMenuDef","getCanvasRect","contextMenuPos"],"mappings":"2XAmBA,IAyEAA,EAzEmB,CAClB,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UAEA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UAEA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UAEA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UAEA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UAEA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UAEA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UAEA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,8JClED,IAmJAC,WA3IiBC,GAChB,SAAAC,EAAYC,GAAO,IAAAC,QAAAC,OAAAH,KAClBA,QAAMC,SAAND,IAAAE,qEACKE,OAAS,IAAIC,EAAO,mBAEzBH,EAAKI,WAAa,EAElBJ,EAAKK,aAAeN,EAAMO,aAAaC,OAASC,EAAU,EAAI,EAC9DR,EAAKS,YAAcV,EAAMO,aAAaC,OAASC,EAAUb,EAAce,OAAS,GAEhFV,EAAKW,MAAQ,GACb,IAAK,IAAIC,EAAI,EAAGA,EAAIZ,EAAKS,YAAaG,IACrCZ,EAAKW,MAAME,KAAKC,EAAMC,aAGoB,OAD3Cf,EAAKgB,QAAUhB,EAAKgB,QAAQC,KAAIjB,GAChCA,EAAKkB,UAAYlB,EAAKkB,UAAUD,KAAIjB,GAAOA,CAC5C,CAAC,OAAAmB,EAAArB,EAAAD,GAAAuB,EAAAtB,EAAA,CAAA,CAAAuB,IAAA,oBAAAC,MAED,WACCC,KAAKC,SAASD,KAAKnB,WACpB,GAAC,CAAAiB,IAAA,UAAAC,MAED,SAAQG,GACPA,EAAIC,kBACJH,KAAKI,YAAYF,EAClB,GAAC,CAAAJ,IAAA,YAAAC,MAED,SAAUG,GACT,GAAIG,EAAcC,UAAUJ,GA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.js"),t=require("./inherits-74e481d1.js"),r=require("./isArrayLikeObject-4737a54a.js"),o=require("./common-canvas-utils-272fb8c4.js"),l=require("react"),s=require("react-intl"),a=require("@carbon/react"),i=require("./toInteger-b7d805dd.js"),n=require("@tanstack/react-table"),c=require("@tanstack/react-virtual"),d=require("./keyboard-utils-81dcfd3f.js"),p=require("react/jsx-runtime"),u=require("./lib/tooltip.cjs"),h=require("react-virtualized"),E=require("react-draggable"),f=require("uuid");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=b(l),T=b(p),R=b(E),v={VISIBLE:"visible",HIDDEN:"hidden",ENABLED:"enabled",DISABLED:"disabled"},_={ASC:"ASC",DESC:"DESC",NOT_SORTED:"not-sorted"},S={SINGLE:"single",MULTIPLE:"multiple-edit"},L=o._baseGetTag,w=o.isArray_1,O=o.isObjectLike_1;var g=function(e){return"string"==typeof e||!w(e)&&O(e)&&"[object String]"==L(e)};const I=d.Icon2zUDcllO,y=d.iconPropTypesDaTOKOBs;let A=m.default;A=I.__toESM(A);let N=T.default;const C=A.default.forwardRef(function({children:e,size:t=16,...r},o){return 16===t||"16"===t||"16px"===t?A.default.createElement(I.Icon,{width:t,height:t,ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...r},(0,N.jsx)("path",{d:"M8.5 11 8.5 6.5 6.5 6.5 6.5 7.5 7.5 7.5 7.5 11 6 11 6 12 10 12 10 11z"}),(0,N.jsx)("path",{d:"M8,3.5c-0.4,0-0.8,0.3-0.8,0.8S7.6,5,8,5c0.4,0,0.8-0.3,0.8-0.8S8.4,3.5,8,3.5z"}),(0,N.jsx)("path",{d:"M8,15c-3.9,0-7-3.1-7-7s3.1-7,7-7s7,3.1,7,7S11.9,15,8,15z M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6s6-2.7,6-6S11.3,2,8,2z"}),e):A.default.createElement(I.Icon,{width:t,height:t,ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...r},(0,N.jsx)("path",{d:"M17 22 17 14 13 14 13 16 15 16 15 22 12 22 12 24 20 24 20 22 17 22z"}),(0,N.jsx)("path",{d:"M16,8a1.5,1.5,0,1,0,1.5,1.5A1.5,1.5,0,0,0,16,8Z"}),(0,N.jsx)("path",{d:"M16,30A14,14,0,1,1,30,16,14,14,0,0,1,16,30ZM16,4A12,12,0,1,0,28,16,12,12,0,0,0,16,4Z"}),e)});"production"!==process.env.NODE_ENV&&(C.propTypes=y.iconPropTypes);var x=C;function D(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(D=function(){return!!e})()}var k=function(r){function l(){return e._classCallCheck(this,l),r=this,o=l,s=arguments,o=t._getPrototypeOf(o),t._possibleConstructorReturn(r,D()?Reflect.construct(o,s||[],t._getPrototypeOf(r).constructor):o.apply(r,s));var r,o,s}return t._inherits(l,r),e._createClass(l,[{key:"render",value:function(){var t=this,r=this.props.tooltipText,l=this.props.truncatedRef;"object"!==e._typeof(this.props.tooltipText)&&(r=String(this.props.tooltipText)),this.props.content&&this.props.content.type===a.Checkbox&&this.tooltipRef&&this.tooltipRef.firstChild&&(l=this.tooltipRef.firstChild.lastChild.previousSibling);var s=m.default.createElement("div",{className:"properties-tooltips"},r);return m.default.createElement("div",{className:"properties-truncated-tooltip"},m.default.createElement(u,{id:"properties",tip:s,direction:"bottom",className:"properties-tooltips",disable:!o.has_1(this.props,"disabled")||this.props.disabled,showToolTipIfTruncated:!0,truncatedRef:l},m.default.createElement("div",{ref:function(e){return t.tooltipRef=e}},this.props.content)))}}])}(m.default.Component),P=k;function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},B.apply(null,arguments)}var M=o._arrayMap;var U=function(e,t){return M(t,function(t){return e[t]})},H=r.keys_1;var z=function(e){return null==e?[]:U(e,H(e))},W=r._baseIndexOf,F=r.isArrayLike_1,G=g,K=i.toInteger_1,j=z,X=Math.max;var V=function(e,t,r,o){e=F(e)?e:j(e),r=r&&!o?K(r):0;var l=e.length;return r<0&&(r=X(l+r,0)),G(e)?r<=l&&e.indexOf(t,r)>-1:!!l&&W(e,t,r)>-1};const Y=d.Icon2zUDcllO,q=d.iconPropTypesDaTOKOBs;let Z=m.default;Z=Y.__toESM(Z);let J=T.default;const Q=Z.default.forwardRef(function({children:e,size:t=16,...r},o){return 16===t||"16"===t||"16px"===t?Z.default.createElement(Y.Icon,{width:t,height:t,ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...r},(0,J.jsx)("path",{d:"M3.7 6.7 7.5 2.9 7.5 15 8.5 15 8.5 2.9 12.3 6.7 13 6 8 1 3 6z"}),e):Z.default.createElement(Y.Icon,{width:t,height:t,ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...r},(0,J.jsx)("path",{d:"M16 4 6 14 7.41 15.41 15 7.83 15 28 17 28 17 7.83 24.59 15.41 26 14 16 4z"}),e)});"production"!==process.env.NODE_ENV&&(Q.propTypes=q.iconPropTypes);var $=Q;const ee=d.Icon2zUDcllO,te=d.iconPropTypesDaTOKOBs;let re=m.default;re=ee.__toESM(re);let oe=T.default;const le=re.default.forwardRef(function({children:e,size:t=16,...r},o){return 16===t||"16"===t||"16px"===t?re.default.createElement(ee.Icon,{width:t,height:t,ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...r},(0,oe.jsx)("path",{d:"M12.3 9.3 8.5 13.1 8.5 1 7.5 1 7.5 13.1 3.7 9.3 3 10 8 15 13 10z"}),e):re.default.createElement(ee.Icon,{width:t,height:t,ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...r},(0,oe.jsx)("path",{d:"M24.59 16.59 17 24.17 17 4 15 4 15 24.17 7.41 16.59 6 18 16 28 26 18 24.59 16.59z"}),e)});"production"!==process.env.NODE_ENV&&(le.propTypes=te.iconPropTypes);var se=le;const ae=d.Icon2zUDcllO,ie=d.iconPropTypesDaTOKOBs;let ne=m.default;ne=ae.__toESM(ne);let ce=T.default;const de=ne.default.forwardRef(function({children:e,size:t=16,...r},o){return ne.default.createElement(ae.Icon,{width:t,height:t,ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...r},(0,ce.jsx)("path",{d:"M27.6 20.6 24 24.2 24 4 22 4 22 24.2 18.4 20.6 17 22 23 28 29 22z"}),(0,ce.jsx)("path",{d:"M9 4 3 10 4.4 11.4 8 7.8 8 28 10 28 10 7.8 13.6 11.4 15 10z"}),e)});"production"!==process.env.NODE_ENV&&(de.propTypes=ie.iconPropTypes);var pe=de,ue=function(e){var t=l.useState([]),o=i._slicedToArray(t,2),s=o[0],p=o[1],h=l.useState(!1),E=i._slicedToArray(h,2),f=E[0],b=E[1],T=l.useState(!1),R=i._slicedToArray(T,2),v=R[0],_=R[1],L=l.useState(!1),w=i._slicedToArray(L,2),O=w[0],g=w[1],I=l.useState(r.isEmpty_1(e.rowsSelected)?null:e.rowsSelected.slice(-1).pop()),y=i._slicedToArray(I,2),A=y[0],N=y[1],C=l.useRef(null),D=c.useVirtualizer({count:e.rowCount,getScrollElement:function(){return C.current},estimateSize:function(){return 32},overscan:3}),k=c.useVirtualizer({count:e.columns.length,getScrollElement:function(){return C.current},estimateSize:function(t){return e.columns[t].width||120},horizontal:!0,overscan:3}),B=m.default.useMemo(function(){var t=[];return e.columns.forEach(function(r,o){var l={accessorFn:function(e){var t;return null===(t=e.columns.find(function(e){return e.column===r.key}))||void 0===t?void 0:t.content},header:r.label,size:r.width,id:r.key,enableResizing:r.resizable,enableSorting:e.onSort&&V(e.sortColumns,r.key)};t.push(l)}),t},[e.columns]),M=n.useReactTable({data:e.data,columns:B,defaultColumn:{size:120},state:{sorting:s},sortDescFirst:!1,onSortingChange:p,columnResizeMode:"onChange",getCoreRowModel:n.getCoreRowModel(),enableSortingRemoval:!1}),U=m.default.useMemo(function(){var e=k.getMeasurements(),t=M.getLeafHeaders(),r={};return t.forEach(function(t,o){r[o]=t.column.getSize(),e[o].size!==r[o]&&k.resizeItem(o,r[o])}),r},[M.getState().columnSizingInfo,B,e.excessWidth]);l.useEffect(function(){e.onSort&&M.getState().sorting.length>0&&e.onSort(M.getState().sorting[0].id,M.getState().sorting[0].desc)},[M.getState().sorting]),l.useEffect(function(){if(void 0!==e.scrollToIndex){var t=D.getVirtualItems().map(function(e){return e.index}),r=V(t,e.scrollToIndex),o=function(){D.scrollToIndex(e.scrollToIndex,{align:"start"}),requestAnimationFrame(function(){requestAnimationFrame(function(){t=D.getVirtualItems().map(function(e){return e.index}),(r=V(t,e.scrollToIndex))||o()})})};r?D.scrollToIndex(e.scrollToIndex,{align:"center"}):o()}},[e.scrollToIndex]);var H,z,W,F,G,K,j,X,Y=m.default.useMemo(function(){if(void 0===e.columns||0===e.columns.length)return 0;for(var t=0;t<e.columns.length;t++)if("index"!==e.columns[t].operation)return t;return 0},[e.columns]),q=function(t){e.readOnly||("mouseenter"!==t.type||O?"mouseleave"===t.type&&v?(_(!1),b(!1)):"focus"!==t.type||v?"blur"===t.type&&O&&(g(!1),b(!1)):(g(!0),b(!0)):(_(!0),b(!0)))},Z=function(t,r,o,l){if("cds--select-option"===t.target.className)t.stopPropagation();else if(void 0!==l||e.rowSelection===S.SINGLE){var s=null!=l?l:!Q(o.originalRowIndex);"function"==typeof e.setRowsSelected&&(e.setRowsSelected({index:r,originalRowIndex:o.originalRowIndex,selected:s,isOverSelectOption:f,selectMultipleRows:!!t.shiftKey&&t.shiftKey,lastCheckedRow:null===A?0:A},t),N(o.originalRowIndex))}},J=function(t,r,o){e.onRowDoubleClick&&e.onRowDoubleClick(t,r,o)},Q=function(t){return!!e.rowsSelected&&e.rowsSelected.indexOf(t)>-1},ee=function(t,r){var o=r.checked;r.id,e.setAllRowsSelected(o)};return m.default.createElement("div",{ref:C,className:i.classNames("properties-tanstack-grid properties-vt",{disabled:e.tableDisabled})},m.default.createElement("table",{"aria-label":e.tableLabel?e.tableLabel:"",className:i.classNames("properties-autosized-vt",{"properties-vt-single-selection":e.rowSelection&&e.rowSelection===S.SINGLE},{"properties-light-disabled":!e.light})},e.showHeader?(X=M.getHeaderGroups(),m.default.createElement("thead",{className:"properties-grid-header"},X.map(function(t){var o=k.getVirtualItems(),l=o.length>1?[o[0].start,k.getTotalSize()-o[o.length-1].end]:[0,0],s=i._slicedToArray(l,2),n=s[0],c=s[1]+e.excessWidth;return m.default.createElement("tr",{className:"properties-vt-row-class",key:"canvas-grid-header-row-0","data-role":"properties-header-row"},m.default.createElement("th",{key:"properties-grid-fake-col-row-0-start",className:"properties-grid-fake-col",style:{width:"".concat(n,"px")}}),function(){if(e.selectable&&e.rowSelection===S.SINGLE)return m.default.createElement("th",{className:"properties-vt-column properties-vt-header-radio"});var t=void 0===e.columns||0===e.columns.length?"":e.columns[Y].headerLabel,o=e.intl.formatMessage({id:"virtualizedTable.header.checkbox.label",defaultMessage:r.commonPropertiesMessages["virtualizedTable.header.checkbox.label"]},{header_checkbox_label:t});return e.selectable&&e.rowSelection!==S.SINGLE?m.default.createElement("th",{className:"properties-vt-column properties-vt-header-checkbox"},m.default.createElement(a.Checkbox,{id:"properties-vt-hd-cb-".concat(e.scrollKey),onChange:ee,checked:e.checkedAll,labelText:o,hideLabel:!0,readOnly:e.readOnly,disabled:e.tableDisabled})):""}(),o.map(function(o){var l=t.headers[o.index],s=e.columns[o.index],a=s.label,n="string"==typeof a?m.default.createElement("span",null,a):a,c=r.isEmpty_1(s.description)?null:m.default.createElement("div",{className:"properties-vt-info-icon-tip"},m.default.createElement(u,{id:"properties-tooltip-info",tip:s.description,direction:"bottom",className:"properties-tooltips",showToolTipOnClick:!0},m.default.createElement(x,{className:"properties-vt-info-icon"}))),p=V(e.sortColumns,s.key),h=null;h=p?"asc"===l.column.getIsSorted()?m.default.createElement($,{className:"properties-ft-column-sort-icon asc"}):"desc"===l.column.getIsSorted()?m.default.createElement(se,{className:"properties-ft-column-sort-icon desc"}):m.default.createElement(pe,{className:"properties-ft-column-sort-icon default"}):null;var E=null;p&&(E=m.default.createElement("div",{className:"properties-vt-header-sort-icon",disabled:!p,tabIndex:h?0:null,role:h?"button":null,"aria-label":h?e.intl.formatMessage({id:"table.sort.column.label"},{column_name:a}):null,onKeyDown:h?function(e){d.KeyboardUtils.spaceKey(e)&&l.column.getToggleSortingHandler()(e)}:null,onClick:l.column.getToggleSortingHandler()},h));var f=m.default.createElement("div",{className:"properties-vt-label-tip-icon"},m.default.createElement(P,{tooltipText:a,content:n,disabled:s.disabled}),c),b=s.resizable?m.default.createElement("div",{className:i.classNames("properties-vt-header-resize",{resizing:l.column.getIsResizing()}),onMouseDown:l.getResizeHandler(),onTouchStart:l.getResizeHandler(),role:"button",tabIndex:"0","aria-label":"Resize column"}):null;return m.default.createElement("th",{key:"properties-grid-".concat(l.id),className:i.classNames("properties-autosized-vt-header sticky-row properties-vt-column properties-tooltips-container",{"properties-vt-column-with-resize":s.resizable},{"properties-vt-column-sortable":p},{"sort-column-active":p&&("asc"===l.column.getIsSorted()||"desc"===l.column.getIsSorted())}),style:{width:Math.max(U[o.index],s.width)},onClick:l.column.getToggleSortingHandler(),"aria-label":a,"data-id":"properties-vt-header-".concat(s.key)},f,E,b)}),m.default.createElement("th",{key:"properties-grid-fake-col-row-0-end",className:"properties-grid-fake-col",style:{width:"".concat(c,"px")}}))}))):null,(H=M.getRowModel().rows,z=D.getVirtualItems(),W=k.getVirtualItems(),F=W.length>1?[W[0].start,k.getTotalSize()-W[W.length-1].end]:[0,0],G=i._slicedToArray(F,2),K=G[0],j=G[1]+e.excessWidth,m.default.createElement("tbody",{key:"properties-grid-body-key",className:"properties-grid-body",style:{height:"".concat(D.getTotalSize(),"px")}},z.map(function(t){var o=H[t.index],l=e.getOriginalRowIndex(o.original,t.index),s=o.getVisibleCells(),n=W.map(function(r){var o=s[r.index];return m.default.createElement("td",{key:"properties-grid-row-".concat(t.index,"-").concat(r.index),className:i.classNames("properties-grid-body-row-cell"),style:{minHeight:32,width:Math.max(U[r.index],e.columns[r.index].width)}},o.getValue())});n.originalRowIndex=l;var c=Q(n.originalRowIndex),d="boolean"==typeof o.original.disabled&&o.original.disabled;return n.disabled=d,m.default.createElement("tr",{key:"properties-grid-body-row-".concat(t.index,"}"),"data-id":"".concat(e.scrollKey,"-").concat(l),className:i.classNames("properties-grid-body-row properties-vt-row-class properties-vt-double-click",{"properties-vt-row-selected":c},{"properties-vt-row-disabled":d},{"properties-vt-row-non-interactive":!e.selectable}),"data-role":"properties-data-row",style:{transform:"translateY(".concat(t.start,"px)")},onMouseDown:function(e){return Z(e,t.index,n)},onDoubleClick:function(e){return J(e,o.original.rowKey,t.index)}},m.default.createElement("td",{key:"properties-grid-body-row-".concat(t.index,"-fake-col-start"),className:"properties-grid-fake-col",style:{width:"".concat(K,"px")}}),function(t,o){if(e.summaryTable)return m.default.createElement("div",{className:"properties-vt-row-checkbox"});var l="";if(e.selectable){var s=Q(o.originalRowIndex),i="boolean"==typeof o.disabled&&o.disabled;if(e.rowSelection===S.SINGLE){var n=e.intl.formatMessage({id:"virtualizedTable.row.radio.label",defaultMessage:r.commonPropertiesMessages["virtualizedTable.row.radio.label"]},{row_index:t+1,table_label:e.tableLabel?e.tableLabel:""});l=m.default.createElement("td",{className:"properties-vt-row-radio",onMouseEnter:function(e){return q(e)},onMouseLeave:function(e){return q(e)},onFocus:function(e){return q(e)},onBlur:function(e){return q(e)}},m.default.createElement(a.RadioButton,{id:"properties-vt-row-radio-".concat(e.scrollKey,"-").concat(t),key:"properties-vt-row-radio-".concat(e.scrollKey,"-").concat(t),name:"properties-vt-radio-group-".concat(e.scrollKey),labelText:n,hideLabel:!0,checked:s,disabled:i||e.tableDisabled,readOnly:e.readOnly,value:o.originalRowIndex,onChange:function(e,r,l){return Z(l,t,o)}}))}else{var c=e.intl.formatMessage({id:"virtualizedTable.row.checkbox.label",defaultMessage:r.commonPropertiesMessages["virtualizedTable.row.checkbox.label"]},{row_index:t+1,table_label:e.tableLabel?e.tableLabel:""});l=m.default.createElement("td",{className:"properties-vt-row-checkbox",onMouseEnter:function(e){return q(e)},onMouseLeave:function(e){return q(e)},onFocus:function(e){return q(e)},onBlur:function(e){return q(e)}},m.default.createElement(a.Checkbox,{id:"properties-vt-row-cb-".concat(e.scrollKey,"-").concat(t),key:"properties-vt-row-cb-".concat(e.scrollKey,"-").concat(t),labelText:c,hideLabel:!0,checked:s,disabled:i||e.tableDisabled,readOnly:e.readOnly,onChange:function(e,r){return Z(e.nativeEvent,t,o,r.checked)}}))}}return l}(t.index,n),n,m.default.createElement("td",{key:"properties-grid-body-row-".concat(t.index,"-fake-col-end"),className:"properties-grid-fake-col",style:{width:"".concat(j,"px")}}))})))))};ue.defaultProps={disableHeader:!1};var he=s.injectIntl(ue),Ee=o._baseAssignValue,fe=i._baseForOwn,be=i._baseIteratee;var me=function(e,t){var r={};return t=be(t),fe(e,function(e,o,l){Ee(r,o,t(e,o,l))}),r},Te=r._baseDifference,Re=r._baseFlatten,ve=i._baseIteratee,_e=r._baseRest,Se=r.isArrayLikeObject_1,Le=r.last_1,we=_e(function(e,t){var r=Le(t);return Se(r)&&(r=void 0),Se(e)?Te(e,Re(t,1,Se,!0),ve(r)):[]}),Oe=we;function ge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ge=function(){return!!e})()}var Ie=function(o){function l(o,s){var a,i,n,c;return e._classCallCheck(this,l),i=this,n=l,c=[o,s],n=t._getPrototypeOf(n),(a=t._possibleConstructorReturn(i,ge()?Reflect.construct(n,c||[],t._getPrototypeOf(i).constructor):n.apply(i,c))).state={rowCount:a.props.rowCount,columns:a.props.columns,columnResized:!1},a.virtualizedTableRef=m.default.createRef(),a.lastChecked=r.isEmpty_1(o.rowsSelected)?null:o.rowsSelected.slice(-1).pop(),a.isOverSelectOption=!1,a.mouseEventCalled=!1,a.keyBoardEventCalled=!1,a.cellRenderer=a.cellRenderer.bind(a),a.selectAll=a.selectAll.bind(a),a.headerRowRenderer=a.headerRowRenderer.bind(a),a.headerColRenderer=a.headerColRenderer.bind(a),a.onRowClick=a.onRowClick.bind(a),a.overSelectOption=a.overSelectOption.bind(a),a.resizeColumn=a.resizeColumn.bind(a),a.uuid=f.v4(),a}return t._inherits(l,o),e._createClass(l,[{key:"componentDidUpdate",value:function(){"function"==typeof this.props.rowHeight&&this.recomputeRowHeights()}},{key:"onRowClick",value:function(e,t,r){if("cds--select-option"===e.target.className)e.stopPropagation();else{var o=!this.isRowSelected(t.originalRowIndex);"function"==typeof this.props.setRowsSelected&&(this.props.setRowsSelected({index:r,originalRowIndex:t.originalRowIndex,selected:o,isOverSelectOption:this.isOverSelectOption,selectMultipleRows:!!e.shiftKey&&e.shiftKey,lastCheckedRow:null===this.lastChecked?0:this.lastChecked},e),this.lastChecked=t.index)}}},{key:"onRowDoubleClick",value:function(e,t,r){this.props.onRowDoubleClick&&this.props.onRowDoubleClick(e,t,r)}},{key:"getCheckboxLabelColumnIndex",value:function(e){for(var t=0;t<e.length;t++)if("index"!==e[t].operation)return t;return 0}},{key:"getColumnIndex",value:function(e,t){return e.findIndex(function(e){return e.key===t})}},{key:"getColumnWiseDeltas",value:function(e,t){var r={};if(e.length>0){e.sort(function(e,t){return e.width-t.width});for(var o=t,l=0;l<e.length;l++){var s=e.slice(l).reduce(function(e,t){return e+t.width},0),a=Math.round(e[l].width*o/s);e[l].headerLabel.length>0&&e[l].width-a<56?a=e[l].width-56:e[l].width-a<32&&(a=e[l].width-32),o-=a,r[e[l].key]=a}if(o>0)return me(r,function(){return 0})}return r}},{key:"isRowSelected",value:function(e){return!!this.props.rowsSelected&&this.props.rowsSelected.indexOf(e)>-1}},{key:"isLastColumn",value:function(e){var t=this.getColumnIndex(this.props.columns,e)===this.props.columns.length-1;return t}},{key:"selectAll",value:function(e,t){var r=t.checked;t.id,this.props.setAllRowsSelected(r)}},{key:"cellRenderer",value:function(e){var t=e.cellData;return null==t?"":t}},{key:"cellRendererHTML",value:function(e){var t=e.cellData;return null==t?"":m.default.createElement("div",{dangerouslySetInnerHTML:{__html:t}})}},{key:"recomputeRowHeights",value:function(e){this.virtualizedTableRef&&this.virtualizedTableRef.current&&this.virtualizedTableRef.current.recomputeRowHeights(e)}},{key:"headerRowRenderer",value:function(e,t){var o=t.className,l=t.columns,s=t.style,i=void 0===this.props.columns||0===this.props.columns.length?0:this.getCheckboxLabelColumnIndex(this.props.columns),n=void 0===this.props.columns||0===this.props.columns.length?"":this.props.columns[i].headerLabel,c=this.props.intl.formatMessage({id:"virtualizedTable.header.checkbox.label",defaultMessage:r.commonPropertiesMessages["virtualizedTable.header.checkbox.label"]},{header_checkbox_label:n}),d=this.props.selectable&&this.props.rowSelection!==S.SINGLE?m.default.createElement("div",{role:"checkbox","aria-checked":this.props.checkedAll,className:"properties-vt-header-checkbox"},m.default.createElement(a.Checkbox,{id:"properties-vt-hd-cb-".concat(this.uuid,"-").concat(e),onChange:this.selectAll,checked:this.props.checkedAll,labelText:c,hideLabel:!0,readOnly:this.props.readOnly})):"";return m.default.createElement("div",{className:o,"data-role":"properties-header-row",role:"row",style:s},d,l)}},{key:"headerColRenderer",value:function(e){var t=this,o=e.columnData,l=e.dataKey,s=e.disableSort,a=e.label;e.sortBy,e.sortDirection;var n=null;if(void 0!==this.props.sortColumns[l]){var c=null;switch(this.props.sortColumns[l]){case _.ASC:c=m.default.createElement($,{disabled:this.props.tableState===v.DISABLED});break;case _.DESC:c=m.default.createElement(se,{disabled:this.props.tableState===v.DISABLED});break;default:c=m.default.createElement(pe,{disabled:this.props.tableState===v.DISABLED})}n=m.default.createElement("span",{className:"properties-ft-column-sort-icon"},c)}var d=r.isEmpty_1(o.description)?null:m.default.createElement("div",{className:"properties-vt-info-icon-tip"},m.default.createElement(u,{id:"properties-tooltip-info",tip:o.description,direction:"bottom",className:"properties-tooltips",showToolTipOnClick:!0},m.default.createElement(x,{className:"properties-vt-info-icon"}))),p=o.resizable&&!this.isLastColumn(l)?m.default.createElement(R.default,{axis:"x",defaultClassName:"properties-vt-header-resize",defaultClassNameDragging:"properties-vt-header-resize-active",onDrag:function(e,r){var o=r.deltaX;t.resizeColumn({dataKey:l,deltaX:o})},position:{x:0},zIndex:999},m.default.createElement("div",{role:"button",tabIndex:"0","aria-label":"Resize column"})):"",h="string"==typeof a?m.default.createElement("span",null,a):a,E=m.default.createElement("div",{className:"properties-vt-label-tip-icon"},m.default.createElement(P,{tooltipText:o.headerLabel,content:h,disabled:o.disabled}),d);return m.default.createElement("div",{"data-id":"properties-vt-header-".concat(l),className:i.classNames({"properties-vt-column-with-resize":""!==p,"properties-vt-column-without-resize":""===p})},m.default.createElement("div",{className:i.classNames("properties-vt-column properties-tooltips-container",{"sort-column-active":l===this.props.sortBy})},E,!1===s&&n),p)}},{key:"resizeColumn",value:function(e){var t=this,o=e.dataKey,l=e.deltaX;this.setState(function(e){var s=e.columns,a=t.getColumnIndex(s,o),i=s.slice(a+1).filter(function(e){return!e.staticWidth}).filter(function(e){return!(l>=0)||(e.headerLabel.length>0?e.width>56:e.width>32)}),n=t.getColumnWiseDeltas(i,l),c=Object.keys(n),d=Object.values(n).every(function(e){return 0===e});return s[a].width+l>56&&!r.isEmpty_1(n)&&!d&&(s[a].width+=l,c.forEach(function(e){var t=s.findIndex(function(t){return t.key===e});s[t].width-=n[e]})),{columnResized:!0,columns:s}})}},{key:"overSelectOption",value:function(e){this.props.readOnly||("mouseenter"!==e.type||this.keyBoardEventCalled?"mouseleave"===e.type&&this.mouseEventCalled?(this.mouseEventCalled=!1,this.isOverSelectOption=!this.isOverSelectOption):"focus"!==e.type||this.mouseEventCalled?"blur"===e.type&&this.keyBoardEventCalled&&(this.keyBoardEventCalled=!1,this.isOverSelectOption=!this.isOverSelectOption):(this.keyBoardEventCalled=!0,this.isOverSelectOption=!this.isOverSelectOption):(this.mouseEventCalled=!0,this.isOverSelectOption=!this.isOverSelectOption))}},{key:"rowRenderer",value:function(e,t){var o=this,l=t.className,s=t.columns,n=t.index,c=t.key,d=t.rowData,p=t.style,u="",h=!1,E="boolean"==typeof d.disabled&&d.disabled;if("function"==typeof this.props.rowHeight&&0===this.props.rowHeight({index:n}))return null;if(this.props.selectable){var f=this.props.sortDirection?this.isRowSelected(d.index):this.isRowSelected(d.originalRowIndex);if(h=this.props.selectable&&f,this.props.rowSelection!==S.SINGLE){var b=this.props.intl.formatMessage({id:"virtualizedTable.row.checkbox.label",defaultMessage:r.commonPropertiesMessages["virtualizedTable.row.checkbox.label"]},{row_index:n+1,table_label:this.props.tableLabel?this.props.tableLabel:""});u=m.default.createElement("div",{className:"properties-vt-row-checkbox",role:"gridcell",onMouseEnter:function(e){return o.overSelectOption(e)},onMouseLeave:function(e){return o.overSelectOption(e)},onFocus:function(e){return o.overSelectOption(e)},onBlur:function(e){return o.overSelectOption(e)},onKeyDown:function(e){"Space"!==e.key&&"Enter"!==e.key||o.onRowClick(e,d,n)}},m.default.createElement(a.Checkbox,{id:"properties-vt-row-cb-".concat(this.uuid,"-").concat(e,"-").concat(n),key:"properties-vt-row-cb-".concat(e,"-").concat(n),labelText:b,hideLabel:!0,checked:f,disabled:E,readOnly:this.props.readOnly}))}}if(this.props.summaryTable&&(u=m.default.createElement("div",{className:"properties-vt-row-checkbox"})),!0===d.loading)return m.default.createElement("div",{className:l,key:c,"data-role":"properties-loading-row",role:"row",style:p},m.default.createElement(a.Loading,{className:"properties-vt-small-loading",small:!0,withOverlay:!1}));var T=parseInt(p.width,10)+"px",R=Object.assign({},p,{width:T});return m.default.createElement("div",{style:{},key:c,className:"properties-vt-double-click",onDoubleClick:function(e){return o.onRowDoubleClick(e,d.rowKey,n)}},m.default.createElement("div",{className:i.classNames(l,{"properties-vt-row-selected":h},{"properties-vt-row-disabled":E},{"properties-vt-row-non-interactive":!this.props.selectable}),"data-role":"properties-data-row",role:"row",style:R,onMouseDown:function(e){return o.onRowClick(e,d,n)}},u,s))}},{key:"render",value:function(){var e=this;return m.default.createElement("div",{className:"properties-vt deprecated"},m.default.createElement("div",{className:i.classNames("properties-vt-autosizer",{"properties-vt-single-selection":this.props.rowSelection&&this.props.rowSelection===S.SINGLE,"properties-light-disabled":!this.props.light})},m.default.createElement(h.AutoSizer,null,function(t){var r=t.height,o=t.width;return m.default.createElement(h.Table,{ref:e.virtualizedTableRef,width:o||500,height:e.props.tableHeight||r||2e3,className:"properties-autosized-vt","aria-label":e.props.tableLabel?e.props.tableLabel:"",disableHeader:e.props.disableHeader,headerClassName:"properties-autosized-vt-header",headerHeight:32,headerRowRenderer:e.headerRowRenderer.bind(e,e.props.scrollKey),onHeaderClick:e.props.onHeaderClick,rowClassName:"properties-vt-row-class",rowHeight:e.props.rowHeight?e.props.rowHeight:32,rowCount:e.state.rowCount,rowGetter:e.props.rowGetter,rowRenderer:e.rowRenderer.bind(e,e.props.scrollKey),scrollToIndex:e.props.scrollToIndex,scrollToAlignment:e.props.scrollToAlignment,sort:e.props.onSort,sortDirection:e.props.sortDirection,tabIndex:-1},e.state.columns.map(function(t){return m.default.createElement(h.Column,B({key:t.key,label:t.label,dataKey:t.key,width:t.width,columnData:t,disableSort:void 0===e.props.sortColumns[t.key],cellRenderer:t.isHTML?e.cellRendererHTML:e.cellRenderer,headerRenderer:e.headerColRenderer},t.minWidth&&{minWidth:t.minWidth}))}))})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var o={};e.rowCount!==t.rowCount&&(o.rowCount=e.rowCount);var l=t.columns.reduce(function(e,t){return t.width+e},0)!==e.columns.reduce(function(e,t){return t.width+e},0);return t.columnResized&&r.isEmpty_1(Oe(e.columns,t.columns,"headerLabel"))&&!l||(o.columns=e.columns),o}}])}(m.default.Component);Ie.defaultProps={disableHeader:!1};var ye=s.injectIntl(Ie);function Ae(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Ne(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ne(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,l=function(){};return{s:l,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,i=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,s=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw s}}}}function Ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function Ce(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ce=function(){return!!e})()}var xe=function(l){function s(r){var o,l,a,i;e._classCallCheck(this,s),l=this,a=s,i=[r],a=t._getPrototypeOf(a);var n={};if(void 0!==(o=t._possibleConstructorReturn(l,Ce()?Reflect.construct(a,i||[],t._getPrototypeOf(l).constructor):a.apply(l,i))).props.sortable)for(var c=0;c<o.props.sortable.length;c++){n[o.props.sortable[c]]=_.NOT_SORTED}return o.state={checkedAllRows:!1,columnSortDir:n,currentSortColumn:"",excessWidth:0,availableWidth:0,tableWidth:0,tableHeight:0,headerHeight:0,rows:void 0!==r.rows?r.rows:5.5,dynamicHeight:null},o.rowHeight=o.rowHeight.bind(o),o.rowGetter=o.rowGetter.bind(o),o.tableRef=m.default.createRef(),o.flexibleTableHeader=m.default.createRef(),o.getOriginalRowIndex=o.getOriginalRowIndex.bind(o),o.getLastChildPropertyIdRow=o.getLastChildPropertyIdRow.bind(o),o.calculateColumnWidths=o.calculateColumnWidths.bind(o),o.handleFilterChange=o.handleFilterChange.bind(o),o.onSortVT=o.onSortVT.bind(o),o.onSort=o.onSort.bind(o),o.sortHeaderClick=o.sortHeaderClick.bind(o),o._updateTableWidth=o._updateTableWidth.bind(o),o._updateRows=o._updateRows.bind(o),o._adjustTableHeight=o._adjustTableHeight.bind(o),o.updateHeaderHeight=o.updateHeaderHeight.bind(o),o.updateExcessWidth=o.updateExcessWidth.bind(o),o.handleCheckedRow=o.handleCheckedRow.bind(o),o.handleCheckedAllRows=o.handleCheckedAllRows.bind(o),o.handleCheckedMultipleRows=o.handleCheckedMultipleRows.bind(o),o}return t._inherits(s,l),e._createClass(s,[{key:"componentDidMount",value:function(){var e=this;this._updateTableWidth(this.tableRef.current.getBoundingClientRect(),this.tableRef.current),this.calculateColumnWidths(),this._adjustTableHeight(),this.headerObserver=new ResizeObserver(function(t){var r,o=Ae(t);try{for(o.s();!(r=o.n()).done;){var l=r.value;e.updateHeaderHeight(l.contentRect)}}catch(e){o.e(e)}finally{o.f()}}),this.flexibleTableHeader.current&&this.headerObserver.observe(this.flexibleTableHeader.current),this.resizeObserver=new ResizeObserver(function(t){var r,o=Ae(t);try{for(o.s();!(r=o.n()).done;){var l=r.value;e._updateTableWidth(l.contentRect,l.target)}}catch(e){o.e(e)}finally{o.f()}}),this.tableRef.current&&this.resizeObserver.observe(this.tableRef.current)}},{key:"componentDidUpdate",value:function(e,t){e.rows!==this.props.rows&&this._updateRows(),e.columns===this.props.columns&&e.noAutoSize===this.props.noAutoSize&&t.availableWidth===this.state.availableWidth||(this._adjustTableHeight(),this.calculateColumnWidths()),t.tableWidth===this.state.tableWidth&&t.availableWidth===this.state.availableWidth||this.updateExcessWidth(),this.props.selectedRows&&!r.isEmpty_1(this.props.data)&&this.setCheckedAll(this.props.selectedRows)}},{key:"componentWillUnmount",value:function(){var e,t;null===(e=this.headerObserver)||void 0===e||e.disconnect(),null===(t=this.resizeObserver)||void 0===t||t.disconnect()}},{key:"onSortVT",value:function(e){var t=e.sortBy;if(this.props.onSort){var r={column:t,direction:this.state.columnSortDir[t]===_.ASC?_.DESC:_.ASC};this.props.onSort(r)}}},{key:"onSort",value:function(e,t){if(this.props.onSort){var r={column:e,direction:!0===t?_.DESC:_.ASC};this.props.onSort(r)}}},{key:"getOriginalRowIndex",value:function(e,t){var r=t;return e.columns&&o.has_1(e.columns[0],"content.props.children.props.propertyId.propertyId")?r=this.getLastChildPropertyIdRow(e.columns[0].content.props.children.props.propertyId,t):e.columns&&o.has_1(e.columns[0],"content.props.children.props.propertyId.index")?r=e.columns[0].content.props.children.props.propertyId.index:e.columns&&o.has_1(e.columns[0],"content.props.children.props.propertyId.row")?r=e.columns[0].content.props.children.props.propertyId.row:"number"==typeof e.rowKey&&(r=parseInt(e.rowKey,10)),r}},{key:"getLastChildPropertyIdRow",value:function(e,t){return void 0!==e.propertyId?this.getLastChildPropertyIdRow(e.propertyId):void 0!==e.row?e.row:t}},{key:"setCheckedAll",value:function(e){for(var t=!0,r=0;r<this.props.data.length;r++){var o=this.props.data[r],l=this.getOriginalRowIndex(o,r);if(e.indexOf(l)<0){t=!1;break}}this.state.checkedAllRows!==t&&this.setState({checkedAllRows:t})}},{key:"calculateColumnWidths",value:function(){var e=this.props.columns,t=this.state.availableWidth-12;void 0!==this.props.updateRowSelections&&(t-=40);var r,o=t+9,l=e.length,s=0,a=Ae(e);try{for(a.s();!(r=a.n()).done;){var i=r.value;i.width&&("string"==typeof i.width&&i.width.includes("px")?(t-=parseInt(i.width,10),l--):s=Math.max(s,i.width))}}catch(e){a.e(e)}finally{a.f()}var n,c=[],d=t>40*l?Math.floor(t/l):40,p=[],u=0,h=Ae(e);try{for(h.s();!(n=h.n()).done;){var E=n.value;E.width&&!isNaN(E.width)?(p.push(E.width/s),u+=E.width/s):p.push(null)}}catch(e){h.e(e)}finally{h.f()}for(var f=t/u,b=0,m=0;m<e.length;m++){var T=e[m];if(T.width)if("string"==typeof T.width&&T.width.includes("px"))c.push(Math.floor(parseInt(T.width,10))+"px"),b+=parseInt(T.width,10);else{var R=Math.floor(p[m]*f);c.push(R+"px"),b+=R}else c.push(d),b+=d}if(b<o){var v=parseInt(c[0],10);c[0]=v+o-b+"px"}this.setState({columnWidths:c,tableWidth:b})}},{key:"updateHeaderHeight",value:function(e){this.state.headerHeight!==e.height&&this.setState({headerHeight:e.height})}},{key:"updateExcessWidth",value:function(){if(this.state.tableWidth>0&&this.state.tableWidth<this.state.availableWidth){var e=this.state.availableWidth-this.state.tableWidth-12;void 0!==this.props.updateRowSelections&&(e-=40),this.setState({excessWidth:e>0?e:0})}else 0!==this.state.excessWidth&&this.setState({excessWidth:0})}},{key:"_updateTableWidth",value:function(e,t){var r,o=this,l=Math.floor(null==t||null===(r=t.childNodes)||void 0===r||null===(r=r[0].childNodes)||void 0===r||null===(r=r[0])||void 0===r?void 0:r.clientWidth)||e.width;this.state.availableWidth!==Math.floor(l-2)&&this.setState({availableWidth:Math.floor(l-2)},function(){return o.updateExcessWidth()})}},{key:"_updateRows",value:function(){var e=this;this.props.rows&&this.props.rows!==this.state.rows&&this.setState({rows:this.props.rows},function(){e._adjustTableHeight()})}},{key:"_adjustTableHeight",value:function(){if(!this.props.noAutoSize){var e=this.state.tableHeight,t=this.state.dynamicHeight;if(Array.isArray(this.props.data)&&this.props.data.length<this.state.rows)e=16*(2*this.props.data.length+2);else if(this.state.rows>0)e=16*(2*this.state.rows+2);else if(0===this.state.rows)e=32;else if(-1===this.state.rows&&this.flexibleTable){var r=this.findPropertyNodeHeight(this.flexibleTable,"properties-wf-children"),o=this.findPropertyNodeHeight(this.flexibleTable,"properties-primary-tab-panel");if(0===r&&0===o)e="100vh",t=-1;else{var l=0!==r?r:o;e="calc(".concat(l-this.state.headerHeight-50,"px - ").concat(56,"px)"),t=l-this.state.headerHeight-50-56}}e!==this.state.tableHeight&&this.setState({tableHeight:e,dynamicHeight:t})}}},{key:"findPropertyNodeHeight",value:function(e,t){if(e&&e.parentNode&&e.parentNode.className&&e.parentNode.className.includes(t)){var r=e.parentNode.getBoundingClientRect();return r?r.height:0}return e&&e.parentNode?this.findPropertyNodeHeight(e.parentNode,t):0}},{key:"sortHeaderClick",value:function(e){var t=e.dataKey,r=this.state.columnSortDir;void 0!==r[t]&&(Object.keys(r).forEach(function(e){e!==t&&(r[e]=_.NOT_SORTED)}),r[t]=r[t]===_.ASC?_.DESC:_.ASC,this.setState({columnSortDir:r,currentSortColumn:t}))}},{key:"handleFilterChange",value:function(e){this.props.onFilter&&this.props.onFilter(e.target.value)}},{key:"handleCheckedAllRows",value:function(e){var t=[],r=this.props.data;if(e){t=Array.from(this.props.selectedRows);for(var o=0;o<r.length;o++){var l=this.getOriginalRowIndex(r[o],o);t.push(l)}}t=Array.from(new Set(t)),this.props.updateRowSelections(t),this.setState({checkedAllRows:e})}},{key:"handleCheckedMultipleRows",value:function(e,t,r){var o,l=this.props.selectedRows?this.props.selectedRows:[];return o=e<t?Array.from({length:t-e+1},function(t,r){return e+r}):Array.from({length:e-t+1},function(e,r){return t+r}),l=l.filter(function(e){return!o.includes(e)}),r&&(l=l.concat(o)),l}},{key:"handleCheckedRow",value:function(e,t){var r=e.originalRowIndex,o=e.index,l=e.selected,s=e.isOverSelectOption;if(!this.props.data[o].disabled&&"function"==typeof this.props.updateRowSelections)if(this.props.rowSelection===S.SINGLE)this.props.updateRowSelections(e.index,t,this.props.data[e.index].rowKey);else if(s){var a=this.props.selectedRows?this.props.selectedRows:[];e.selectMultipleRows?(a=this.handleCheckedMultipleRows(e.lastCheckedRow,o,l),this.setCheckedAll(a)):l?(a=a.concat(r),this.setCheckedAll(a)):a&&(a=a.filter(function(e){return e!==r}),this.setState({checkedAllRows:!1})),a.sort(function(e,t){return e-t}),this.props.updateRowSelections(a)}}},{key:"generateTableHeaderRow",value:function(){for(var t=[],r="",o=0;o<this.props.columns.length;o++){var l,s,a=this.props.columns[o];void 0!==this.props.filterable&&this.props.filterable[0]===a.key&&(r=a.label);var i=Math.abs(parseInt(null!==(l=null===(s=this.state.columnWidths)||void 0===s?void 0:s[o])&&void 0!==l?l:40,10)),n=void 0;"object"===e._typeof(a.label)?n=a.label.props.labelText:"string"==typeof a.label&&(n=a.label),t.push({key:a.key,label:a.label,width:i,description:a.description,headerLabel:n,resizable:a.resizable,operation:a.operation,staticWidth:!!a.staticWidth&&a.staticWidth})}return{headers:t,searchLabel:r}}},{key:"rowGetter",value:function(e){var t=e.index,r=this.props.data[t],o=this.getOriginalRowIndex(r,t),l={};if(r.columns)for(var s=0;s<r.columns.length;s++){var a=r.columns[s];l[a.column]=a.content}return Object.assign({},l,{loading:!1,index:t,originalRowIndex:o,rowKey:void 0!==r.rowKey?r.rowKey:this.props.scrollKey+"-row-"+t,disabled:r.disabled})}},{key:"rowHeight",value:function(e){return e.index,32}},{key:"render",value:function(){var e=this,t=r.isEmpty_1(this.props.data)?m.default.createElement("div",{className:"properties-ft-empty-table"},this.props.emptyTablePlaceholder):null;if(0===this.props.columns.length)return m.default.createElement("div",{ref:this.tableRef},m.default.createElement("div",{className:"properties-ft-empty-table-header"}),t);var o=this.generateTableHeaderRow(),l=o.headers,s=o.searchLabel,n=this.props.tableState===v.DISABLED,c=null;if(void 0!==this.props.filterable&&0!==this.props.filterable.length){var d=void 0!==this.props.searchPlaceholder?this.props.searchPlaceholder:this.props.intl.formatMessage({id:"table.search.placeholder",defaultMessage:r.commonPropertiesMessages["table.search.placeholder"]},{column_name:s}),p=this.props.intl.formatMessage({id:"table.search.label",defaultMessage:r.commonPropertiesMessages["table.search.label"]},{table_name:this.props.tableLabel});c=m.default.createElement("div",{className:i.classNames("properties-ft-search-container",{disabled:n})},m.default.createElement(a.Layer,{level:this.props.light?1:0},m.default.createElement(a.Search,{className:"properties-ft-search-text",placeholder:d,onChange:this.handleFilterChange,disabled:n,size:"sm",labelText:p})))}var u=-1;void 0!==this.props.scrollToRow&&null!==this.props.scrollToRow&&(u=this.props.scrollToRow);var h={};this.props.noAutoSize||(h={height:this.state.tableHeight});var E=this.props.showHeader?"properties-ft-container-absolute ":"properties-ft-container-absolute-noheader ",f=this.props.messageInfo?E:E+v.INFO,b=i.classNames("properties-ft-table-header",{"single-row-selection-table":this.props.rowSelection===S.SINGLE}),T=void 0!==this.props.topRightPanel&&null!==this.props.topRightPanel&&void 0===this.props.topRightPanel.props.className,R=c||this.props.topRightPanel?m.default.createElement("div",{className:b,ref:this.flexibleTableHeader},T?null:c,this.props.topRightPanel):null,_=i.classNames("properties-ft-control-container",{"properties-light-disabled":!this.props.light}),L=0;-1!==this.state.rows&&this.state.tableHeight?L=parseInt(this.state.tableHeight,10):-1===this.state.rows&&this.state.dynamicHeight&&-1!==this.state.dynamicHeight&&(L=this.state.dynamicHeight);return this.props.enableTanstackTable?m.default.createElement("div",{"data-id":"properties-ft-"+this.props.scrollKey,className:_,ref:function(t){return e.flexibleTable=t}},R,m.default.createElement("div",{className:"properties-ft-container-panel"},m.default.createElement("div",{className:i.classNames("properties-ft-container-wrapper",this.props.messageInfo?this.props.messageInfo.type:""),style:h,ref:this.tableRef},m.default.createElement("div",{className:f},m.default.createElement(he,B({data:this.props.data,tableLabel:this.props.tableLabel,excessWidth:this.state.excessWidth,columns:l,onHeaderClick:this.sortHeaderClick,rowCount:this.props.data.length,rowHeight:this.rowHeight,rowGetter:this.rowGetter,summaryTable:this.props.summaryTable,selectable:void 0!==this.props.updateRowSelections,rowSelection:this.props.rowSelection,showHeader:this.props.showHeader,onRowDoubleClick:this.props.onRowDoubleClick,getOriginalRowIndex:this.getOriginalRowIndex,rowsSelected:this.props.selectedRows,checkedAll:this.state.checkedAllRows,setRowsSelected:this.handleCheckedRow,setAllRowsSelected:this.handleCheckedAllRows,scrollKey:this.props.scrollKey,onSort:this.onSort,sortBy:this.state.currentSortColumn,sortColumns:this.props.sortable,sortDirection:this.state.columnSortDir[this.state.currentSortColumn],tableDisabled:n,light:this.props.light,readOnly:this.props.readOnly},-1!==u&&{scrollToIndex:u}))))),t):m.default.createElement("div",{"data-id":"properties-ft-"+this.props.scrollKey,className:_,ref:function(t){return e.flexibleTable=t}},R,m.default.createElement("div",{className:"properties-ft-container-panel"},m.default.createElement("div",{className:i.classNames("properties-ft-container-wrapper",this.props.messageInfo?this.props.messageInfo.type:""),style:h,ref:this.tableRef},m.default.createElement("div",{className:f},m.default.createElement(ye,B({tableLabel:this.props.tableLabel,tableHeight:L,columns:l,onHeaderClick:this.sortHeaderClick,rowCount:this.props.data.length,rowHeight:this.rowHeight,rowGetter:this.rowGetter,summaryTable:this.props.summaryTable,selectable:void 0!==this.props.updateRowSelections,rowSelection:this.props.rowSelection,disableHeader:!this.props.showHeader,onRowDoubleClick:this.props.onRowDoubleClick,rowsSelected:this.props.selectedRows,checkedAll:this.state.checkedAllRows,setRowsSelected:this.handleCheckedRow,setAllRowsSelected:this.handleCheckedAllRows,scrollKey:this.props.scrollKey,onSort:this.onSortVT,sortBy:this.state.currentSortColumn,sortColumns:this.state.columnSortDir,sortDirection:this.state.columnSortDir[this.state.currentSortColumn],tableState:this.props.tableState,light:this.props.light,readOnly:this.props.readOnly},-1!==u&&{scrollToIndex:u,scrollToAlignment:"center"}))))),t)}}])}(m.default.Component);xe.defaultProps={showHeader:!0,light:!0,emptyTablePlaceholder:"",selectedRows:[],enableTanstackTable:!0};var De=s.injectIntl(xe);exports.ACTIONS={SET_PROPERTIES:"SET_PROPERTIES",UPDATE_PROPERTY:"UPDATE_PROPERTY",PROPERTIES_LOADED:"PROPERTIES_LOADED"},exports.APPLY="apply",exports.CANCEL="cancel",exports.CARBON_BUTTON_KIND={PRIMARY:"primary",SECONDARY:"secondary",TERTIARY:"tertiary",GHOST:"ghost",DANGER:"danger",DANGER_TERTIARY:"danger--tertiary",DANGER_GHOST:"danger--ghost"},exports.CARBON_BUTTON_SIZE={SMALL:"sm",MEDIUM:"md",LARGE:"lg",EXTRA_LARGE:"xl"},exports.CARBON_ICONS={CHEVRONARROWS:{UP:"chevron-up",DOWN:"chevron-down",LEFT:"chevron-left",RIGHT:"chevron-right"},CALCULATOR:"calculator",ADD:"add",REMOVE:"remove",EDIT:"edit",MEASUREMENTS:{EMPTY:"measurement-empty",ORDINAL:"measurement-ordinal",NOMINAL:"measurement-nominal",SCALE:"measurement-scale",FLAG:"measurement-flag",DISCRETE:"measurement-discrete"},INFORMATION:"informationHollow",SETTINGS:"settings"},exports.CARBON_MODAL_SIZE_LARGE="lg",exports.CARBON_MODAL_SIZE_SMALL="sm",exports.CARBON_MODAL_SIZE_XSMALL="xs",exports.CATEGORY_VIEW={ACCORDIONS:"accordions",TABS:"tabs"},exports.CONDITION_DEFINITION_INDEX={CONTROLS:"controls",REFS:"refs"},exports.CONDITION_MESSAGE_TYPE={INFO:"info",ERROR:"error",WARNING:"warning",SUCCESS:"success"},exports.CONDITION_RETURN_VALUE_HANDLING={VALUE:"value",NULL:"null"},exports.CONDITION_TYPE={VISIBLE:"visible",ENABLED:"enabled",FILTEREDENUM:"enum_filter",ALLOWCHANGE:"allow_change",FILTER:"filter",VALIDATION:"validation",CONDITIONALDEFAULT:"default_value"},exports.CONTAINER_TYPE={CUSTOM:"Custom",TEARSHEET:"Tearsheet",MODAL:"Modal"},exports.DATA_TYPE={INTEGER:"integer",DOUBLE:"double",STRING:"string",DATE:"date",TIME:"time",TIMESTAMP:"timestamp"},exports.DATEPICKER_TYPE={SINGLE:"single",RANGE:"range"},exports.DEFAULT_DATEPICKER_FORMAT="Y-m-d",exports.DEFAULT_DATE_FORMAT="yyyy-MM-dd",exports.DEFAULT_LABEL_EDITABLE=!0,exports.DEFAULT_LOCALE="en",exports.DEFAULT_TIME_FORMAT="H:m:s",exports.DEFAULT_VALIDATION_MESSAGE={type:"info",text:""},exports.EXPRESSION_TABLE_ROWS=5,exports.FlexibleTable=De,exports.Information=x,exports.MESSAGE_KEYS={SUBPANEL_BUTTON_TOOLTIP:"subPanel.button.tooltip",STRUCTURELISTEDITOR_ADDBUTTON_LABEL:"structureListEditor.addButton.label",STRUCTURETABLE_ADDBUTTON_LABEL:"structureTable.addButton.label",FIELDPICKER_SAVEBUTTON_LABEL:"fieldPicker.saveButton.label",FIELDPICKER_SAVEBUTTON_MODAL_LABEL:"fieldPicker.saveButton.modal.label",FIELDPICKER_RESETBUTTON_LABEL:"fieldPicker.resetButton.label",FIELDPICKER_FILTER_LABEL:"fieldPicker.filter.label",FIELDPICKER_FIELDCOLUMN_LABEL:"fieldPicker.fieldColumn.label",FIELDPICKER_SCHEMACOLUMN_LABEL:"fieldPicker.schemaColumn.label",FIELDPICKER_DATATYPECOLUMN_LABEL:"fieldPicker.dataTypeColumn.label",FIELDPICKER_INTEGER_LABEL:"fieldPicker.integer.label",FIELDPICKER_DOUBLE_LABEL:"fieldPicker.double.label",FIELDPICKER_STRING_LABEL:"fieldPicker.string.label",FIELDPICKER_DATE_LABEL:"fieldPicker.date.label",FIELDPICKER_TIME_LABEL:"fieldPicker.time.label",FIELDPICKER_TIMESTAMP_LABEL:"fieldPicker.timestamp.label",APPLYBUTTON_LABEL:"flyout.applyButton.label",REJECTBUTTON_LABEL:"flyout.rejectButton.label",PROPERTIESEDIT_CLOSEBUTTON_LABEL:"propertiesEdit.closeButton.label",PROPERTIESEDIT_APPLYBUTTON_LABEL:"propertiesEdit.applyButton.label",PROPERTIESEDIT_REJECTBUTTON_LABEL:"propertiesEdit.rejectButton.label",PROPERTIESEDIT_REVERTBUTTON_LABEL:"propertiesEdit.revertButton.label",PROPERTIESEDIT_RESIZEBUTTON_EXPAND_LABEL:"propertiesEdit.resizeButton.expand.label",PROPERTIESEDIT_RESIZEBUTTON_CONTRACT_LABEL:"propertiesEdit.resizeButton.contract.label",PROPERTIES_REVERT_MESSAGE:"properties.revert.message",PROPERTIES_CLOSE_MESSAGE:"properties.close.message",PROPERTIES_SUPPORT_MESSAGE:"properties.support.message",PROPERTIES_UNEXPECTED_MESSAGE:"properties.unexpected.message",TABLE_SEARCH_HEADER:"table.search.header",LONG_TABLE_SUMMARY_PLACEHOLDER:"summary.longTable.placeholder",ALERTS_TAB_TITLE:"alerts.tab.title",TITLE_EDITOR_LABEL:"title.editor.label",TITLE_EDITOR_HELPBUTTON_LABEL:"title.editor.helpButton.label",TITLE_EDITOR_DESCBUTTON_LABEL:"title.editor.descButton.label",TABLE_SUMMARY_ERROR:"table.summary.error",TABLE_SUMMARY_WARNING:"table.summary.warning",CONTROL_SUMMARY_ERROR:"control.summary.error",CONTROL_SUMMARY_WARNING:"control.summary.warning",CONTROL_SUMMARY_ERROR_WARNING:"control.summary.error.warning",REQUIRED_ERROR:"required.error",DATETIME_FORMAT_ERROR:"datetime.format.error",INVALID_FIELD_ERROR:"invalid.field.error",INVALID_NUMBER_ERROR:"invalid.number.error",EXPRESSION_VALIDATE_LABEL:"expression.validate.label",EXPRESSION_VALIDATING_LABEL:"expression.validating.label",EXPRESSION_BUILDER_TITLE:"expression.builder.title",EXPRESSION_BUILDER_ICON_DESCRIPTION:"expression.builder.icon.description",EXPRESSION_BUILDER_LABEL:"expression.builder.label",EXPRESSION_FIELDS_TABLE_LABEL:"expression.fields.table.label",EXPRESSION_FIELDS_EMPTY_TABLE_LABEL:"expression.fields.empty.table.label",EXPRESSION_VALUES_TABLE_LABEL:"expression.values.table.label",EXPRESSION_VALUES_EMPTY_TABLE_LABEL:"expression.values.empty.table.label",EXPRESSION_FUNCTIONS_TABLE_LABEL:"expression.functions.table.label",EXPRESSION_FIELDS_DROPDOWN_TITLE:"expression.fields.dropdown",EXPRESSION_FUNCTIONS_DROPDOWN_TITLE:"expression.functions.dropdown",EXPRESSION_FIELDS_TITLE:"expression.fields.title",EXPRESSION_VALUES_TITLE:"expression.values.title",EXPRESSION_FIELD_COLUMN:"expression.field.column",EXPRESSION_ADD_COLUMN:"expression.add.column",EXPRESSION_FIELD_COLUMN_DESCRIPTION:"expression.field.column.description",EXPRESSION_STORAGE_COLUMN:"expression.storage.column",EXPRESSION_VALUE_COLUMN:"expression.value.column",EXPRESSION_VALUE_COLUMN_DESCRIPTION:"expression.value.column.description",EXPRESSION_FUNCTION_COLUMN:"expression.function.column",EXPRESSION_RETURN_COLUMN:"expression.return.column",EXPRESSION_RECENTLY_USED_COLUMN:"expression.recently.used.column",EXPRESSION_RECENTLY_USED_COLUMN_DESCRIPTION:"expression.recently.used.column.description",EXPRESSION_FIELD_TAB:"expression.field.tab",EXPRESSION_FUNCTIONS_TAB:"expression.functions.tab",EXPRESSION_RECENTLY_USED:"expression.recently.used",EXPRESSION_ALL_FUNCTIONS:"expression.all.functions",EXPRESSION_MIN_LABEL:"expression.min.label",EXPRESSION_MAX_LABEL:"expression.max.label",EXPRESSION_MAXIMIZE_LABEL:"expression.maximize.label",EXPRESSION_MINIMIZE_LABEL:"expression.minimize.label",EXPRESSION_NO_FUNCTIONS:"expression.no.functions",SINGLE_SELECTED_ROW_LABEL:"single.selected.row.label",MULTI_SELECTED_ROW_LABEL:"multi.selected.row.label",SINGLE_SELECTED_ROW_LABEL_SMALL_FLYOUT:"single.selected.row.label.small.flyout",MULTI_SELECTED_ROW_LABEL_SMALL_FLYOUT:"multi.selected.row.label.small.flyout",MULTI_SELECT_EDIT_SUBPANEL_TITLE:"multi.select.edit.subpanel.title",LIST_TABLE_LABEL:"list.table.label",DROPDOWN_TOOLTIP_OPENMENU:"dropdown.tooltip.openMenu",DROPDOWN_TOOLTIP_CLOSEMENU:"dropdown.tooltip.closeMenu",DROPDOWN_TOOLTIP_CLEARALL:"dropdown.tooltip.clear.all",DROPDOWN_TOOLTIP_CLEARSELECTION:"dropdown.tooltip.clear.selection",TRUNCATE_LONG_STRING_ERROR:"truncate.long.string.error",PROPERTIES_LABEL:"properties.label",PROPERTIES_ERROR_LABEL:"properties.error.label",PROPERTIES_ACTION_LABEL:"action.commonProperties",READONLYTABLE_EDIT_BUTTON_LABEL:"readonlytable.edit.button.label",TOGGLETEXT_ICON_DESCRIPTION:"toggletext.icon.description",MULTISELECT_DROPDOWN_EMPTY_LABEL:"multiselect.dropdown.empty.label",MULTISELECT_DROPDOWN_OPTIONS_SELECTED_LABEL:"multiselect.dropdown.options.selected.label",PROPERTIES_EMPTY_TABLE_TEXT:"properties.empty.table.text",TOGGLE_ON_LABEL:"toggle.on.label",TOGGLE_OFF_LABEL:"toggle.off.label",SHOW_PASSWORD_TOOLTIP:"passwordShow.tooltip",HIDE_PASSWORD_TOOLTIP:"passwordHide.tooltip",LABEL_INDICATOR_REQUIRED:"label.indicator.required",LABEL_INDICATOR_OPTIONAL:"label.indicator.optional",DATEPICKER_RANGE_START_LABEL:"datepickerRangeStart.default.label",DATEPICKER_RANGE_END_LABEL:"datepickerRangeEnd.default.label",SLIDER_NUMBER_INPUT_LABEL:"slider.numberInput.label",EDITORFORM_TABLIST_LABEL:"editorForm.tabList.label",SUBTABS_TABLIST_LABEL:"subTabs.tabList.label",TABLE_TOOLBAR_BUTTON_TOP:"table.toolbar.button.top",TABLE_TOOLBAR_BUTTON_UP:"table.toolbar.button.up",TABLE_TOOLBAR_BUTTON_DOWN:"table.toolbar.button.down",TABLE_TOOLBAR_BUTTON_BOTTOM:"table.toolbar.button.bottom",TABLE_TOOLBAR_BUTTON_DELETE:"table.toolbar.button.delete",TABLE_TOOLBAR_BUTTON_EDIT:"table.toolbar.button.edit",TABLE_TOOLBAR_BUTTON_CANCEL:"table.toolbar.button.cancel",TABLE_TOOLBAR_OVERFLOW_LABEL:"table.toolbar.overflow.label",TABLE_TOOLBAR_LABEL:"table.toolbar.label",RADIO_BUTTON_GROUP_ARIA_LABEL:"radiobuttongroup.aria.label",TABLE_DELETEICON_TOOLTIP:"table.deleteIcon.tooltip"},exports.PANEL_TREE_ROOT="PanelTreeRoot",exports.ROW_SELECTION=S,exports.SORT_DIRECTION=_,exports.STATES=v,exports.TABLE_SUBPANEL_BUTTON_WIDTH="36px",exports.TRUNCATE_LIMIT=1e4,exports.TruncatedContentTooltip=P,exports.UPDATE_TYPE={INITIAL_LOAD:"initial_load"},exports._extends=B,exports.includes_1=V,exports.isString_1=g;
|
|
2
|
-
//# sourceMappingURL=flexible-table-
|
|
1
|
+
"use strict";var e=require("./createClass-df7b07d6.js"),t=require("./inherits-74e481d1.js"),r=require("./isArrayLikeObject-4737a54a.js"),o=require("./common-canvas-utils-272fb8c4.js"),l=require("react"),s=require("react-intl"),a=require("@carbon/react"),i=require("./toInteger-b7d805dd.js"),n=require("@tanstack/react-table"),c=require("@tanstack/react-virtual"),d=require("./keyboard-utils-78bc27c3.js"),p=require("react/jsx-runtime"),u=require("./lib/tooltip.cjs"),h=require("react-virtualized"),E=require("react-draggable"),f=require("uuid");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=b(l),T=b(p),R=b(E),v={VISIBLE:"visible",HIDDEN:"hidden",ENABLED:"enabled",DISABLED:"disabled"},_={ASC:"ASC",DESC:"DESC",NOT_SORTED:"not-sorted"},S={SINGLE:"single",MULTIPLE:"multiple-edit"},L=o._baseGetTag,w=o.isArray_1,O=o.isObjectLike_1;var g=function(e){return"string"==typeof e||!w(e)&&O(e)&&"[object String]"==L(e)};const I=d.Icon2zUDcllO,y=d.iconPropTypesDaTOKOBs;let A=m.default;A=I.__toESM(A);let N=T.default;const C=A.default.forwardRef(function({children:e,size:t=16,...r},o){return 16===t||"16"===t||"16px"===t?A.default.createElement(I.Icon,{width:t,height:t,ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...r},(0,N.jsx)("path",{d:"M8.5 11 8.5 6.5 6.5 6.5 6.5 7.5 7.5 7.5 7.5 11 6 11 6 12 10 12 10 11z"}),(0,N.jsx)("path",{d:"M8,3.5c-0.4,0-0.8,0.3-0.8,0.8S7.6,5,8,5c0.4,0,0.8-0.3,0.8-0.8S8.4,3.5,8,3.5z"}),(0,N.jsx)("path",{d:"M8,15c-3.9,0-7-3.1-7-7s3.1-7,7-7s7,3.1,7,7S11.9,15,8,15z M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6s6-2.7,6-6S11.3,2,8,2z"}),e):A.default.createElement(I.Icon,{width:t,height:t,ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...r},(0,N.jsx)("path",{d:"M17 22 17 14 13 14 13 16 15 16 15 22 12 22 12 24 20 24 20 22 17 22z"}),(0,N.jsx)("path",{d:"M16,8a1.5,1.5,0,1,0,1.5,1.5A1.5,1.5,0,0,0,16,8Z"}),(0,N.jsx)("path",{d:"M16,30A14,14,0,1,1,30,16,14,14,0,0,1,16,30ZM16,4A12,12,0,1,0,28,16,12,12,0,0,0,16,4Z"}),e)});"production"!==process.env.NODE_ENV&&(C.propTypes=y.iconPropTypes);var x=C;function D(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(D=function(){return!!e})()}var k=function(r){function l(){return e._classCallCheck(this,l),r=this,o=l,s=arguments,o=t._getPrototypeOf(o),t._possibleConstructorReturn(r,D()?Reflect.construct(o,s||[],t._getPrototypeOf(r).constructor):o.apply(r,s));var r,o,s}return t._inherits(l,r),e._createClass(l,[{key:"render",value:function(){var t=this,r=this.props.tooltipText,l=this.props.truncatedRef;"object"!==e._typeof(this.props.tooltipText)&&(r=String(this.props.tooltipText)),this.props.content&&this.props.content.type===a.Checkbox&&this.tooltipRef&&this.tooltipRef.firstChild&&(l=this.tooltipRef.firstChild.lastChild.previousSibling);var s=m.default.createElement("div",{className:"properties-tooltips"},r);return m.default.createElement("div",{className:"properties-truncated-tooltip"},m.default.createElement(u,{id:"properties",tip:s,direction:"bottom",className:"properties-tooltips",disable:!o.has_1(this.props,"disabled")||this.props.disabled,showToolTipIfTruncated:!0,truncatedRef:l},m.default.createElement("div",{ref:function(e){return t.tooltipRef=e}},this.props.content)))}}])}(m.default.Component),P=k;function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},B.apply(null,arguments)}var M=o._arrayMap;var U=function(e,t){return M(t,function(t){return e[t]})},H=r.keys_1;var z=function(e){return null==e?[]:U(e,H(e))},W=r._baseIndexOf,F=r.isArrayLike_1,G=g,K=i.toInteger_1,j=z,X=Math.max;var V=function(e,t,r,o){e=F(e)?e:j(e),r=r&&!o?K(r):0;var l=e.length;return r<0&&(r=X(l+r,0)),G(e)?r<=l&&e.indexOf(t,r)>-1:!!l&&W(e,t,r)>-1};const Y=d.Icon2zUDcllO,q=d.iconPropTypesDaTOKOBs;let Z=m.default;Z=Y.__toESM(Z);let J=T.default;const Q=Z.default.forwardRef(function({children:e,size:t=16,...r},o){return 16===t||"16"===t||"16px"===t?Z.default.createElement(Y.Icon,{width:t,height:t,ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...r},(0,J.jsx)("path",{d:"M3.7 6.7 7.5 2.9 7.5 15 8.5 15 8.5 2.9 12.3 6.7 13 6 8 1 3 6z"}),e):Z.default.createElement(Y.Icon,{width:t,height:t,ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...r},(0,J.jsx)("path",{d:"M16 4 6 14 7.41 15.41 15 7.83 15 28 17 28 17 7.83 24.59 15.41 26 14 16 4z"}),e)});"production"!==process.env.NODE_ENV&&(Q.propTypes=q.iconPropTypes);var $=Q;const ee=d.Icon2zUDcllO,te=d.iconPropTypesDaTOKOBs;let re=m.default;re=ee.__toESM(re);let oe=T.default;const le=re.default.forwardRef(function({children:e,size:t=16,...r},o){return 16===t||"16"===t||"16px"===t?re.default.createElement(ee.Icon,{width:t,height:t,ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...r},(0,oe.jsx)("path",{d:"M12.3 9.3 8.5 13.1 8.5 1 7.5 1 7.5 13.1 3.7 9.3 3 10 8 15 13 10z"}),e):re.default.createElement(ee.Icon,{width:t,height:t,ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...r},(0,oe.jsx)("path",{d:"M24.59 16.59 17 24.17 17 4 15 4 15 24.17 7.41 16.59 6 18 16 28 26 18 24.59 16.59z"}),e)});"production"!==process.env.NODE_ENV&&(le.propTypes=te.iconPropTypes);var se=le;const ae=d.Icon2zUDcllO,ie=d.iconPropTypesDaTOKOBs;let ne=m.default;ne=ae.__toESM(ne);let ce=T.default;const de=ne.default.forwardRef(function({children:e,size:t=16,...r},o){return ne.default.createElement(ae.Icon,{width:t,height:t,ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...r},(0,ce.jsx)("path",{d:"M27.6 20.6 24 24.2 24 4 22 4 22 24.2 18.4 20.6 17 22 23 28 29 22z"}),(0,ce.jsx)("path",{d:"M9 4 3 10 4.4 11.4 8 7.8 8 28 10 28 10 7.8 13.6 11.4 15 10z"}),e)});"production"!==process.env.NODE_ENV&&(de.propTypes=ie.iconPropTypes);var pe=de,ue=function(e){var t=l.useState([]),o=i._slicedToArray(t,2),s=o[0],p=o[1],h=l.useState(!1),E=i._slicedToArray(h,2),f=E[0],b=E[1],T=l.useState(!1),R=i._slicedToArray(T,2),v=R[0],_=R[1],L=l.useState(!1),w=i._slicedToArray(L,2),O=w[0],g=w[1],I=l.useState(r.isEmpty_1(e.rowsSelected)?null:e.rowsSelected.slice(-1).pop()),y=i._slicedToArray(I,2),A=y[0],N=y[1],C=l.useRef(null),D=c.useVirtualizer({count:e.rowCount,getScrollElement:function(){return C.current},estimateSize:function(){return 32},overscan:3}),k=c.useVirtualizer({count:e.columns.length,getScrollElement:function(){return C.current},estimateSize:function(t){return e.columns[t].width||120},horizontal:!0,overscan:3}),B=m.default.useMemo(function(){var t=[];return e.columns.forEach(function(r,o){var l={accessorFn:function(e){var t;return null===(t=e.columns.find(function(e){return e.column===r.key}))||void 0===t?void 0:t.content},header:r.label,size:r.width,id:r.key,enableResizing:r.resizable,enableSorting:e.onSort&&V(e.sortColumns,r.key)};t.push(l)}),t},[e.columns]),M=n.useReactTable({data:e.data,columns:B,defaultColumn:{size:120},state:{sorting:s},sortDescFirst:!1,onSortingChange:p,columnResizeMode:"onChange",getCoreRowModel:n.getCoreRowModel(),enableSortingRemoval:!1}),U=m.default.useMemo(function(){var e=k.getMeasurements(),t=M.getLeafHeaders(),r={};return t.forEach(function(t,o){r[o]=t.column.getSize(),e[o].size!==r[o]&&k.resizeItem(o,r[o])}),r},[M.getState().columnSizingInfo,B,e.excessWidth]);l.useEffect(function(){e.onSort&&M.getState().sorting.length>0&&e.onSort(M.getState().sorting[0].id,M.getState().sorting[0].desc)},[M.getState().sorting]),l.useEffect(function(){if(void 0!==e.scrollToIndex){var t=D.getVirtualItems().map(function(e){return e.index}),r=V(t,e.scrollToIndex),o=function(){D.scrollToIndex(e.scrollToIndex,{align:"start"}),requestAnimationFrame(function(){requestAnimationFrame(function(){t=D.getVirtualItems().map(function(e){return e.index}),(r=V(t,e.scrollToIndex))||o()})})};r?D.scrollToIndex(e.scrollToIndex,{align:"center"}):o()}},[e.scrollToIndex]);var H,z,W,F,G,K,j,X,Y=m.default.useMemo(function(){if(void 0===e.columns||0===e.columns.length)return 0;for(var t=0;t<e.columns.length;t++)if("index"!==e.columns[t].operation)return t;return 0},[e.columns]),q=function(t){e.readOnly||("mouseenter"!==t.type||O?"mouseleave"===t.type&&v?(_(!1),b(!1)):"focus"!==t.type||v?"blur"===t.type&&O&&(g(!1),b(!1)):(g(!0),b(!0)):(_(!0),b(!0)))},Z=function(t,r,o,l){if("cds--select-option"===t.target.className)t.stopPropagation();else if(void 0!==l||e.rowSelection===S.SINGLE){var s=null!=l?l:!Q(o.originalRowIndex);"function"==typeof e.setRowsSelected&&(e.setRowsSelected({index:r,originalRowIndex:o.originalRowIndex,selected:s,isOverSelectOption:f,selectMultipleRows:!!t.shiftKey&&t.shiftKey,lastCheckedRow:null===A?0:A},t),N(o.originalRowIndex))}},J=function(t,r,o){e.onRowDoubleClick&&e.onRowDoubleClick(t,r,o)},Q=function(t){return!!e.rowsSelected&&e.rowsSelected.indexOf(t)>-1},ee=function(t,r){var o=r.checked;r.id,e.setAllRowsSelected(o)};return m.default.createElement("div",{ref:C,className:i.classNames("properties-tanstack-grid properties-vt",{disabled:e.tableDisabled})},m.default.createElement("table",{"aria-label":e.tableLabel?e.tableLabel:"",className:i.classNames("properties-autosized-vt",{"properties-vt-single-selection":e.rowSelection&&e.rowSelection===S.SINGLE},{"properties-light-disabled":!e.light})},e.showHeader?(X=M.getHeaderGroups(),m.default.createElement("thead",{className:"properties-grid-header"},X.map(function(t){var o=k.getVirtualItems(),l=o.length>1?[o[0].start,k.getTotalSize()-o[o.length-1].end]:[0,0],s=i._slicedToArray(l,2),n=s[0],c=s[1]+e.excessWidth;return m.default.createElement("tr",{className:"properties-vt-row-class",key:"canvas-grid-header-row-0","data-role":"properties-header-row"},m.default.createElement("th",{key:"properties-grid-fake-col-row-0-start",className:"properties-grid-fake-col",style:{width:"".concat(n,"px")}}),function(){if(e.selectable&&e.rowSelection===S.SINGLE)return m.default.createElement("th",{className:"properties-vt-column properties-vt-header-radio"});var t=void 0===e.columns||0===e.columns.length?"":e.columns[Y].headerLabel,o=e.intl.formatMessage({id:"virtualizedTable.header.checkbox.label",defaultMessage:r.commonPropertiesMessages["virtualizedTable.header.checkbox.label"]},{header_checkbox_label:t});return e.selectable&&e.rowSelection!==S.SINGLE?m.default.createElement("th",{className:"properties-vt-column properties-vt-header-checkbox"},m.default.createElement(a.Checkbox,{id:"properties-vt-hd-cb-".concat(e.scrollKey),onChange:ee,checked:e.checkedAll,labelText:o,hideLabel:!0,readOnly:e.readOnly,disabled:e.tableDisabled})):""}(),o.map(function(o){var l=t.headers[o.index],s=e.columns[o.index],a=s.label,n="string"==typeof a?m.default.createElement("span",null,a):a,c=r.isEmpty_1(s.description)?null:m.default.createElement("div",{className:"properties-vt-info-icon-tip"},m.default.createElement(u,{id:"properties-tooltip-info",tip:s.description,direction:"bottom",className:"properties-tooltips",showToolTipOnClick:!0},m.default.createElement(x,{className:"properties-vt-info-icon"}))),p=V(e.sortColumns,s.key),h=null;h=p?"asc"===l.column.getIsSorted()?m.default.createElement($,{className:"properties-ft-column-sort-icon asc"}):"desc"===l.column.getIsSorted()?m.default.createElement(se,{className:"properties-ft-column-sort-icon desc"}):m.default.createElement(pe,{className:"properties-ft-column-sort-icon default"}):null;var E=null;p&&(E=m.default.createElement("div",{className:"properties-vt-header-sort-icon",disabled:!p,tabIndex:h?0:null,role:h?"button":null,"aria-label":h?e.intl.formatMessage({id:"table.sort.column.label"},{column_name:a}):null,onKeyDown:h?function(e){d.KeyboardUtils.spaceKey(e)&&l.column.getToggleSortingHandler()(e)}:null,onClick:l.column.getToggleSortingHandler()},h));var f=m.default.createElement("div",{className:"properties-vt-label-tip-icon"},m.default.createElement(P,{tooltipText:a,content:n,disabled:s.disabled}),c),b=s.resizable?m.default.createElement("div",{className:i.classNames("properties-vt-header-resize",{resizing:l.column.getIsResizing()}),onMouseDown:l.getResizeHandler(),onTouchStart:l.getResizeHandler(),role:"button",tabIndex:"0","aria-label":"Resize column"}):null;return m.default.createElement("th",{key:"properties-grid-".concat(l.id),className:i.classNames("properties-autosized-vt-header sticky-row properties-vt-column properties-tooltips-container",{"properties-vt-column-with-resize":s.resizable},{"properties-vt-column-sortable":p},{"sort-column-active":p&&("asc"===l.column.getIsSorted()||"desc"===l.column.getIsSorted())}),style:{width:Math.max(U[o.index],s.width)},onClick:l.column.getToggleSortingHandler(),"aria-label":a,"data-id":"properties-vt-header-".concat(s.key)},f,E,b)}),m.default.createElement("th",{key:"properties-grid-fake-col-row-0-end",className:"properties-grid-fake-col",style:{width:"".concat(c,"px")}}))}))):null,(H=M.getRowModel().rows,z=D.getVirtualItems(),W=k.getVirtualItems(),F=W.length>1?[W[0].start,k.getTotalSize()-W[W.length-1].end]:[0,0],G=i._slicedToArray(F,2),K=G[0],j=G[1]+e.excessWidth,m.default.createElement("tbody",{key:"properties-grid-body-key",className:"properties-grid-body",style:{height:"".concat(D.getTotalSize(),"px")}},z.map(function(t){var o=H[t.index],l=e.getOriginalRowIndex(o.original,t.index),s=o.getVisibleCells(),n=W.map(function(r){var o=s[r.index];return m.default.createElement("td",{key:"properties-grid-row-".concat(t.index,"-").concat(r.index),className:i.classNames("properties-grid-body-row-cell"),style:{minHeight:32,width:Math.max(U[r.index],e.columns[r.index].width)}},o.getValue())});n.originalRowIndex=l;var c=Q(n.originalRowIndex),d="boolean"==typeof o.original.disabled&&o.original.disabled;return n.disabled=d,m.default.createElement("tr",{key:"properties-grid-body-row-".concat(t.index,"}"),"data-id":"".concat(e.scrollKey,"-").concat(l),className:i.classNames("properties-grid-body-row properties-vt-row-class properties-vt-double-click",{"properties-vt-row-selected":c},{"properties-vt-row-disabled":d},{"properties-vt-row-non-interactive":!e.selectable}),"data-role":"properties-data-row",style:{transform:"translateY(".concat(t.start,"px)")},onMouseDown:function(e){return Z(e,t.index,n)},onDoubleClick:function(e){return J(e,o.original.rowKey,t.index)}},m.default.createElement("td",{key:"properties-grid-body-row-".concat(t.index,"-fake-col-start"),className:"properties-grid-fake-col",style:{width:"".concat(K,"px")}}),function(t,o){if(e.summaryTable)return m.default.createElement("div",{className:"properties-vt-row-checkbox"});var l="";if(e.selectable){var s=Q(o.originalRowIndex),i="boolean"==typeof o.disabled&&o.disabled;if(e.rowSelection===S.SINGLE){var n=e.intl.formatMessage({id:"virtualizedTable.row.radio.label",defaultMessage:r.commonPropertiesMessages["virtualizedTable.row.radio.label"]},{row_index:t+1,table_label:e.tableLabel?e.tableLabel:""});l=m.default.createElement("td",{className:"properties-vt-row-radio",onMouseEnter:function(e){return q(e)},onMouseLeave:function(e){return q(e)},onFocus:function(e){return q(e)},onBlur:function(e){return q(e)}},m.default.createElement(a.RadioButton,{id:"properties-vt-row-radio-".concat(e.scrollKey,"-").concat(t),key:"properties-vt-row-radio-".concat(e.scrollKey,"-").concat(t),name:"properties-vt-radio-group-".concat(e.scrollKey),labelText:n,hideLabel:!0,checked:s,disabled:i||e.tableDisabled,readOnly:e.readOnly,value:o.originalRowIndex,onChange:function(e,r,l){return Z(l,t,o)}}))}else{var c=e.intl.formatMessage({id:"virtualizedTable.row.checkbox.label",defaultMessage:r.commonPropertiesMessages["virtualizedTable.row.checkbox.label"]},{row_index:t+1,table_label:e.tableLabel?e.tableLabel:""});l=m.default.createElement("td",{className:"properties-vt-row-checkbox",onMouseEnter:function(e){return q(e)},onMouseLeave:function(e){return q(e)},onFocus:function(e){return q(e)},onBlur:function(e){return q(e)}},m.default.createElement(a.Checkbox,{id:"properties-vt-row-cb-".concat(e.scrollKey,"-").concat(t),key:"properties-vt-row-cb-".concat(e.scrollKey,"-").concat(t),labelText:c,hideLabel:!0,checked:s,disabled:i||e.tableDisabled,readOnly:e.readOnly,onChange:function(e,r){return Z(e.nativeEvent,t,o,r.checked)}}))}}return l}(t.index,n),n,m.default.createElement("td",{key:"properties-grid-body-row-".concat(t.index,"-fake-col-end"),className:"properties-grid-fake-col",style:{width:"".concat(j,"px")}}))})))))};ue.defaultProps={disableHeader:!1};var he=s.injectIntl(ue),Ee=o._baseAssignValue,fe=i._baseForOwn,be=i._baseIteratee;var me=function(e,t){var r={};return t=be(t),fe(e,function(e,o,l){Ee(r,o,t(e,o,l))}),r},Te=r._baseDifference,Re=r._baseFlatten,ve=i._baseIteratee,_e=r._baseRest,Se=r.isArrayLikeObject_1,Le=r.last_1,we=_e(function(e,t){var r=Le(t);return Se(r)&&(r=void 0),Se(e)?Te(e,Re(t,1,Se,!0),ve(r)):[]}),Oe=we;function ge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ge=function(){return!!e})()}var Ie=function(o){function l(o,s){var a,i,n,c;return e._classCallCheck(this,l),i=this,n=l,c=[o,s],n=t._getPrototypeOf(n),(a=t._possibleConstructorReturn(i,ge()?Reflect.construct(n,c||[],t._getPrototypeOf(i).constructor):n.apply(i,c))).state={rowCount:a.props.rowCount,columns:a.props.columns,columnResized:!1},a.virtualizedTableRef=m.default.createRef(),a.lastChecked=r.isEmpty_1(o.rowsSelected)?null:o.rowsSelected.slice(-1).pop(),a.isOverSelectOption=!1,a.mouseEventCalled=!1,a.keyBoardEventCalled=!1,a.cellRenderer=a.cellRenderer.bind(a),a.selectAll=a.selectAll.bind(a),a.headerRowRenderer=a.headerRowRenderer.bind(a),a.headerColRenderer=a.headerColRenderer.bind(a),a.onRowClick=a.onRowClick.bind(a),a.overSelectOption=a.overSelectOption.bind(a),a.resizeColumn=a.resizeColumn.bind(a),a.uuid=f.v4(),a}return t._inherits(l,o),e._createClass(l,[{key:"componentDidUpdate",value:function(){"function"==typeof this.props.rowHeight&&this.recomputeRowHeights()}},{key:"onRowClick",value:function(e,t,r){if("cds--select-option"===e.target.className)e.stopPropagation();else{var o=!this.isRowSelected(t.originalRowIndex);"function"==typeof this.props.setRowsSelected&&(this.props.setRowsSelected({index:r,originalRowIndex:t.originalRowIndex,selected:o,isOverSelectOption:this.isOverSelectOption,selectMultipleRows:!!e.shiftKey&&e.shiftKey,lastCheckedRow:null===this.lastChecked?0:this.lastChecked},e),this.lastChecked=t.index)}}},{key:"onRowDoubleClick",value:function(e,t,r){this.props.onRowDoubleClick&&this.props.onRowDoubleClick(e,t,r)}},{key:"getCheckboxLabelColumnIndex",value:function(e){for(var t=0;t<e.length;t++)if("index"!==e[t].operation)return t;return 0}},{key:"getColumnIndex",value:function(e,t){return e.findIndex(function(e){return e.key===t})}},{key:"getColumnWiseDeltas",value:function(e,t){var r={};if(e.length>0){e.sort(function(e,t){return e.width-t.width});for(var o=t,l=0;l<e.length;l++){var s=e.slice(l).reduce(function(e,t){return e+t.width},0),a=Math.round(e[l].width*o/s);e[l].headerLabel.length>0&&e[l].width-a<56?a=e[l].width-56:e[l].width-a<32&&(a=e[l].width-32),o-=a,r[e[l].key]=a}if(o>0)return me(r,function(){return 0})}return r}},{key:"isRowSelected",value:function(e){return!!this.props.rowsSelected&&this.props.rowsSelected.indexOf(e)>-1}},{key:"isLastColumn",value:function(e){var t=this.getColumnIndex(this.props.columns,e)===this.props.columns.length-1;return t}},{key:"selectAll",value:function(e,t){var r=t.checked;t.id,this.props.setAllRowsSelected(r)}},{key:"cellRenderer",value:function(e){var t=e.cellData;return null==t?"":t}},{key:"cellRendererHTML",value:function(e){var t=e.cellData;return null==t?"":m.default.createElement("div",{dangerouslySetInnerHTML:{__html:t}})}},{key:"recomputeRowHeights",value:function(e){this.virtualizedTableRef&&this.virtualizedTableRef.current&&this.virtualizedTableRef.current.recomputeRowHeights(e)}},{key:"headerRowRenderer",value:function(e,t){var o=t.className,l=t.columns,s=t.style,i=void 0===this.props.columns||0===this.props.columns.length?0:this.getCheckboxLabelColumnIndex(this.props.columns),n=void 0===this.props.columns||0===this.props.columns.length?"":this.props.columns[i].headerLabel,c=this.props.intl.formatMessage({id:"virtualizedTable.header.checkbox.label",defaultMessage:r.commonPropertiesMessages["virtualizedTable.header.checkbox.label"]},{header_checkbox_label:n}),d=this.props.selectable&&this.props.rowSelection!==S.SINGLE?m.default.createElement("div",{role:"checkbox","aria-checked":this.props.checkedAll,className:"properties-vt-header-checkbox"},m.default.createElement(a.Checkbox,{id:"properties-vt-hd-cb-".concat(this.uuid,"-").concat(e),onChange:this.selectAll,checked:this.props.checkedAll,labelText:c,hideLabel:!0,readOnly:this.props.readOnly})):"";return m.default.createElement("div",{className:o,"data-role":"properties-header-row",role:"row",style:s},d,l)}},{key:"headerColRenderer",value:function(e){var t=this,o=e.columnData,l=e.dataKey,s=e.disableSort,a=e.label;e.sortBy,e.sortDirection;var n=null;if(void 0!==this.props.sortColumns[l]){var c=null;switch(this.props.sortColumns[l]){case _.ASC:c=m.default.createElement($,{disabled:this.props.tableState===v.DISABLED});break;case _.DESC:c=m.default.createElement(se,{disabled:this.props.tableState===v.DISABLED});break;default:c=m.default.createElement(pe,{disabled:this.props.tableState===v.DISABLED})}n=m.default.createElement("span",{className:"properties-ft-column-sort-icon"},c)}var d=r.isEmpty_1(o.description)?null:m.default.createElement("div",{className:"properties-vt-info-icon-tip"},m.default.createElement(u,{id:"properties-tooltip-info",tip:o.description,direction:"bottom",className:"properties-tooltips",showToolTipOnClick:!0},m.default.createElement(x,{className:"properties-vt-info-icon"}))),p=o.resizable&&!this.isLastColumn(l)?m.default.createElement(R.default,{axis:"x",defaultClassName:"properties-vt-header-resize",defaultClassNameDragging:"properties-vt-header-resize-active",onDrag:function(e,r){var o=r.deltaX;t.resizeColumn({dataKey:l,deltaX:o})},position:{x:0},zIndex:999},m.default.createElement("div",{role:"button",tabIndex:"0","aria-label":"Resize column"})):"",h="string"==typeof a?m.default.createElement("span",null,a):a,E=m.default.createElement("div",{className:"properties-vt-label-tip-icon"},m.default.createElement(P,{tooltipText:o.headerLabel,content:h,disabled:o.disabled}),d);return m.default.createElement("div",{"data-id":"properties-vt-header-".concat(l),className:i.classNames({"properties-vt-column-with-resize":""!==p,"properties-vt-column-without-resize":""===p})},m.default.createElement("div",{className:i.classNames("properties-vt-column properties-tooltips-container",{"sort-column-active":l===this.props.sortBy})},E,!1===s&&n),p)}},{key:"resizeColumn",value:function(e){var t=this,o=e.dataKey,l=e.deltaX;this.setState(function(e){var s=e.columns,a=t.getColumnIndex(s,o),i=s.slice(a+1).filter(function(e){return!e.staticWidth}).filter(function(e){return!(l>=0)||(e.headerLabel.length>0?e.width>56:e.width>32)}),n=t.getColumnWiseDeltas(i,l),c=Object.keys(n),d=Object.values(n).every(function(e){return 0===e});return s[a].width+l>56&&!r.isEmpty_1(n)&&!d&&(s[a].width+=l,c.forEach(function(e){var t=s.findIndex(function(t){return t.key===e});s[t].width-=n[e]})),{columnResized:!0,columns:s}})}},{key:"overSelectOption",value:function(e){this.props.readOnly||("mouseenter"!==e.type||this.keyBoardEventCalled?"mouseleave"===e.type&&this.mouseEventCalled?(this.mouseEventCalled=!1,this.isOverSelectOption=!this.isOverSelectOption):"focus"!==e.type||this.mouseEventCalled?"blur"===e.type&&this.keyBoardEventCalled&&(this.keyBoardEventCalled=!1,this.isOverSelectOption=!this.isOverSelectOption):(this.keyBoardEventCalled=!0,this.isOverSelectOption=!this.isOverSelectOption):(this.mouseEventCalled=!0,this.isOverSelectOption=!this.isOverSelectOption))}},{key:"rowRenderer",value:function(e,t){var o=this,l=t.className,s=t.columns,n=t.index,c=t.key,d=t.rowData,p=t.style,u="",h=!1,E="boolean"==typeof d.disabled&&d.disabled;if("function"==typeof this.props.rowHeight&&0===this.props.rowHeight({index:n}))return null;if(this.props.selectable){var f=this.props.sortDirection?this.isRowSelected(d.index):this.isRowSelected(d.originalRowIndex);if(h=this.props.selectable&&f,this.props.rowSelection!==S.SINGLE){var b=this.props.intl.formatMessage({id:"virtualizedTable.row.checkbox.label",defaultMessage:r.commonPropertiesMessages["virtualizedTable.row.checkbox.label"]},{row_index:n+1,table_label:this.props.tableLabel?this.props.tableLabel:""});u=m.default.createElement("div",{className:"properties-vt-row-checkbox",role:"gridcell",onMouseEnter:function(e){return o.overSelectOption(e)},onMouseLeave:function(e){return o.overSelectOption(e)},onFocus:function(e){return o.overSelectOption(e)},onBlur:function(e){return o.overSelectOption(e)},onKeyDown:function(e){"Space"!==e.key&&"Enter"!==e.key||o.onRowClick(e,d,n)}},m.default.createElement(a.Checkbox,{id:"properties-vt-row-cb-".concat(this.uuid,"-").concat(e,"-").concat(n),key:"properties-vt-row-cb-".concat(e,"-").concat(n),labelText:b,hideLabel:!0,checked:f,disabled:E,readOnly:this.props.readOnly}))}}if(this.props.summaryTable&&(u=m.default.createElement("div",{className:"properties-vt-row-checkbox"})),!0===d.loading)return m.default.createElement("div",{className:l,key:c,"data-role":"properties-loading-row",role:"row",style:p},m.default.createElement(a.Loading,{className:"properties-vt-small-loading",small:!0,withOverlay:!1}));var T=parseInt(p.width,10)+"px",R=Object.assign({},p,{width:T});return m.default.createElement("div",{style:{},key:c,className:"properties-vt-double-click",onDoubleClick:function(e){return o.onRowDoubleClick(e,d.rowKey,n)}},m.default.createElement("div",{className:i.classNames(l,{"properties-vt-row-selected":h},{"properties-vt-row-disabled":E},{"properties-vt-row-non-interactive":!this.props.selectable}),"data-role":"properties-data-row",role:"row",style:R,onMouseDown:function(e){return o.onRowClick(e,d,n)}},u,s))}},{key:"render",value:function(){var e=this;return m.default.createElement("div",{className:"properties-vt deprecated"},m.default.createElement("div",{className:i.classNames("properties-vt-autosizer",{"properties-vt-single-selection":this.props.rowSelection&&this.props.rowSelection===S.SINGLE,"properties-light-disabled":!this.props.light})},m.default.createElement(h.AutoSizer,null,function(t){var r=t.height,o=t.width;return m.default.createElement(h.Table,{ref:e.virtualizedTableRef,width:o||500,height:e.props.tableHeight||r||2e3,className:"properties-autosized-vt","aria-label":e.props.tableLabel?e.props.tableLabel:"",disableHeader:e.props.disableHeader,headerClassName:"properties-autosized-vt-header",headerHeight:32,headerRowRenderer:e.headerRowRenderer.bind(e,e.props.scrollKey),onHeaderClick:e.props.onHeaderClick,rowClassName:"properties-vt-row-class",rowHeight:e.props.rowHeight?e.props.rowHeight:32,rowCount:e.state.rowCount,rowGetter:e.props.rowGetter,rowRenderer:e.rowRenderer.bind(e,e.props.scrollKey),scrollToIndex:e.props.scrollToIndex,scrollToAlignment:e.props.scrollToAlignment,sort:e.props.onSort,sortDirection:e.props.sortDirection,tabIndex:-1},e.state.columns.map(function(t){return m.default.createElement(h.Column,B({key:t.key,label:t.label,dataKey:t.key,width:t.width,columnData:t,disableSort:void 0===e.props.sortColumns[t.key],cellRenderer:t.isHTML?e.cellRendererHTML:e.cellRenderer,headerRenderer:e.headerColRenderer},t.minWidth&&{minWidth:t.minWidth}))}))})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var o={};e.rowCount!==t.rowCount&&(o.rowCount=e.rowCount);var l=t.columns.reduce(function(e,t){return t.width+e},0)!==e.columns.reduce(function(e,t){return t.width+e},0);return t.columnResized&&r.isEmpty_1(Oe(e.columns,t.columns,"headerLabel"))&&!l||(o.columns=e.columns),o}}])}(m.default.Component);Ie.defaultProps={disableHeader:!1};var ye=s.injectIntl(Ie);function Ae(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Ne(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ne(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,l=function(){};return{s:l,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,i=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,s=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw s}}}}function Ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function Ce(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ce=function(){return!!e})()}var xe=function(l){function s(r){var o,l,a,i;e._classCallCheck(this,s),l=this,a=s,i=[r],a=t._getPrototypeOf(a);var n={};if(void 0!==(o=t._possibleConstructorReturn(l,Ce()?Reflect.construct(a,i||[],t._getPrototypeOf(l).constructor):a.apply(l,i))).props.sortable)for(var c=0;c<o.props.sortable.length;c++){n[o.props.sortable[c]]=_.NOT_SORTED}return o.state={checkedAllRows:!1,columnSortDir:n,currentSortColumn:"",excessWidth:0,availableWidth:0,tableWidth:0,tableHeight:0,headerHeight:0,rows:void 0!==r.rows?r.rows:5.5,dynamicHeight:null},o.rowHeight=o.rowHeight.bind(o),o.rowGetter=o.rowGetter.bind(o),o.tableRef=m.default.createRef(),o.flexibleTableHeader=m.default.createRef(),o.getOriginalRowIndex=o.getOriginalRowIndex.bind(o),o.getLastChildPropertyIdRow=o.getLastChildPropertyIdRow.bind(o),o.calculateColumnWidths=o.calculateColumnWidths.bind(o),o.handleFilterChange=o.handleFilterChange.bind(o),o.onSortVT=o.onSortVT.bind(o),o.onSort=o.onSort.bind(o),o.sortHeaderClick=o.sortHeaderClick.bind(o),o._updateTableWidth=o._updateTableWidth.bind(o),o._updateRows=o._updateRows.bind(o),o._adjustTableHeight=o._adjustTableHeight.bind(o),o.updateHeaderHeight=o.updateHeaderHeight.bind(o),o.updateExcessWidth=o.updateExcessWidth.bind(o),o.handleCheckedRow=o.handleCheckedRow.bind(o),o.handleCheckedAllRows=o.handleCheckedAllRows.bind(o),o.handleCheckedMultipleRows=o.handleCheckedMultipleRows.bind(o),o}return t._inherits(s,l),e._createClass(s,[{key:"componentDidMount",value:function(){var e=this;this._updateTableWidth(this.tableRef.current.getBoundingClientRect(),this.tableRef.current),this.calculateColumnWidths(),this._adjustTableHeight(),this.headerObserver=new ResizeObserver(function(t){var r,o=Ae(t);try{for(o.s();!(r=o.n()).done;){var l=r.value;e.updateHeaderHeight(l.contentRect)}}catch(e){o.e(e)}finally{o.f()}}),this.flexibleTableHeader.current&&this.headerObserver.observe(this.flexibleTableHeader.current),this.resizeObserver=new ResizeObserver(function(t){var r,o=Ae(t);try{for(o.s();!(r=o.n()).done;){var l=r.value;e._updateTableWidth(l.contentRect,l.target)}}catch(e){o.e(e)}finally{o.f()}}),this.tableRef.current&&this.resizeObserver.observe(this.tableRef.current)}},{key:"componentDidUpdate",value:function(e,t){e.rows!==this.props.rows&&this._updateRows(),e.columns===this.props.columns&&e.noAutoSize===this.props.noAutoSize&&t.availableWidth===this.state.availableWidth||(this._adjustTableHeight(),this.calculateColumnWidths()),t.tableWidth===this.state.tableWidth&&t.availableWidth===this.state.availableWidth||this.updateExcessWidth(),this.props.selectedRows&&!r.isEmpty_1(this.props.data)&&this.setCheckedAll(this.props.selectedRows)}},{key:"componentWillUnmount",value:function(){var e,t;null===(e=this.headerObserver)||void 0===e||e.disconnect(),null===(t=this.resizeObserver)||void 0===t||t.disconnect()}},{key:"onSortVT",value:function(e){var t=e.sortBy;if(this.props.onSort){var r={column:t,direction:this.state.columnSortDir[t]===_.ASC?_.DESC:_.ASC};this.props.onSort(r)}}},{key:"onSort",value:function(e,t){if(this.props.onSort){var r={column:e,direction:!0===t?_.DESC:_.ASC};this.props.onSort(r)}}},{key:"getOriginalRowIndex",value:function(e,t){var r=t;return e.columns&&o.has_1(e.columns[0],"content.props.children.props.propertyId.propertyId")?r=this.getLastChildPropertyIdRow(e.columns[0].content.props.children.props.propertyId,t):e.columns&&o.has_1(e.columns[0],"content.props.children.props.propertyId.index")?r=e.columns[0].content.props.children.props.propertyId.index:e.columns&&o.has_1(e.columns[0],"content.props.children.props.propertyId.row")?r=e.columns[0].content.props.children.props.propertyId.row:"number"==typeof e.rowKey&&(r=parseInt(e.rowKey,10)),r}},{key:"getLastChildPropertyIdRow",value:function(e,t){return void 0!==e.propertyId?this.getLastChildPropertyIdRow(e.propertyId):void 0!==e.row?e.row:t}},{key:"setCheckedAll",value:function(e){for(var t=!0,r=0;r<this.props.data.length;r++){var o=this.props.data[r],l=this.getOriginalRowIndex(o,r);if(e.indexOf(l)<0){t=!1;break}}this.state.checkedAllRows!==t&&this.setState({checkedAllRows:t})}},{key:"calculateColumnWidths",value:function(){var e=this.props.columns,t=this.state.availableWidth-12;void 0!==this.props.updateRowSelections&&(t-=40);var r,o=t+9,l=e.length,s=0,a=Ae(e);try{for(a.s();!(r=a.n()).done;){var i=r.value;i.width&&("string"==typeof i.width&&i.width.includes("px")?(t-=parseInt(i.width,10),l--):s=Math.max(s,i.width))}}catch(e){a.e(e)}finally{a.f()}var n,c=[],d=t>40*l?Math.floor(t/l):40,p=[],u=0,h=Ae(e);try{for(h.s();!(n=h.n()).done;){var E=n.value;E.width&&!isNaN(E.width)?(p.push(E.width/s),u+=E.width/s):p.push(null)}}catch(e){h.e(e)}finally{h.f()}for(var f=t/u,b=0,m=0;m<e.length;m++){var T=e[m];if(T.width)if("string"==typeof T.width&&T.width.includes("px"))c.push(Math.floor(parseInt(T.width,10))+"px"),b+=parseInt(T.width,10);else{var R=Math.floor(p[m]*f);c.push(R+"px"),b+=R}else c.push(d),b+=d}if(b<o){var v=parseInt(c[0],10);c[0]=v+o-b+"px"}this.setState({columnWidths:c,tableWidth:b})}},{key:"updateHeaderHeight",value:function(e){this.state.headerHeight!==e.height&&this.setState({headerHeight:e.height})}},{key:"updateExcessWidth",value:function(){if(this.state.tableWidth>0&&this.state.tableWidth<this.state.availableWidth){var e=this.state.availableWidth-this.state.tableWidth-12;void 0!==this.props.updateRowSelections&&(e-=40),this.setState({excessWidth:e>0?e:0})}else 0!==this.state.excessWidth&&this.setState({excessWidth:0})}},{key:"_updateTableWidth",value:function(e,t){var r,o=this,l=Math.floor(null==t||null===(r=t.childNodes)||void 0===r||null===(r=r[0].childNodes)||void 0===r||null===(r=r[0])||void 0===r?void 0:r.clientWidth)||e.width;this.state.availableWidth!==Math.floor(l-2)&&this.setState({availableWidth:Math.floor(l-2)},function(){return o.updateExcessWidth()})}},{key:"_updateRows",value:function(){var e=this;this.props.rows&&this.props.rows!==this.state.rows&&this.setState({rows:this.props.rows},function(){e._adjustTableHeight()})}},{key:"_adjustTableHeight",value:function(){if(!this.props.noAutoSize){var e=this.state.tableHeight,t=this.state.dynamicHeight;if(Array.isArray(this.props.data)&&this.props.data.length<this.state.rows)e=16*(2*this.props.data.length+2);else if(this.state.rows>0)e=16*(2*this.state.rows+2);else if(0===this.state.rows)e=32;else if(-1===this.state.rows&&this.flexibleTable){var r=this.findPropertyNodeHeight(this.flexibleTable,"properties-wf-children"),o=this.findPropertyNodeHeight(this.flexibleTable,"properties-primary-tab-panel");if(0===r&&0===o)e="100vh",t=-1;else{var l=0!==r?r:o;e="calc(".concat(l-this.state.headerHeight-50,"px - ").concat(56,"px)"),t=l-this.state.headerHeight-50-56}}e!==this.state.tableHeight&&this.setState({tableHeight:e,dynamicHeight:t})}}},{key:"findPropertyNodeHeight",value:function(e,t){if(e&&e.parentNode&&e.parentNode.className&&e.parentNode.className.includes(t)){var r=e.parentNode.getBoundingClientRect();return r?r.height:0}return e&&e.parentNode?this.findPropertyNodeHeight(e.parentNode,t):0}},{key:"sortHeaderClick",value:function(e){var t=e.dataKey,r=this.state.columnSortDir;void 0!==r[t]&&(Object.keys(r).forEach(function(e){e!==t&&(r[e]=_.NOT_SORTED)}),r[t]=r[t]===_.ASC?_.DESC:_.ASC,this.setState({columnSortDir:r,currentSortColumn:t}))}},{key:"handleFilterChange",value:function(e){this.props.onFilter&&this.props.onFilter(e.target.value)}},{key:"handleCheckedAllRows",value:function(e){var t=[],r=this.props.data;if(e){t=Array.from(this.props.selectedRows);for(var o=0;o<r.length;o++){var l=this.getOriginalRowIndex(r[o],o);t.push(l)}}t=Array.from(new Set(t)),this.props.updateRowSelections(t),this.setState({checkedAllRows:e})}},{key:"handleCheckedMultipleRows",value:function(e,t,r){var o,l=this.props.selectedRows?this.props.selectedRows:[];return o=e<t?Array.from({length:t-e+1},function(t,r){return e+r}):Array.from({length:e-t+1},function(e,r){return t+r}),l=l.filter(function(e){return!o.includes(e)}),r&&(l=l.concat(o)),l}},{key:"handleCheckedRow",value:function(e,t){var r=e.originalRowIndex,o=e.index,l=e.selected,s=e.isOverSelectOption;if(!this.props.data[o].disabled&&"function"==typeof this.props.updateRowSelections)if(this.props.rowSelection===S.SINGLE)this.props.updateRowSelections(e.index,t,this.props.data[e.index].rowKey);else if(s){var a=this.props.selectedRows?this.props.selectedRows:[];e.selectMultipleRows?(a=this.handleCheckedMultipleRows(e.lastCheckedRow,o,l),this.setCheckedAll(a)):l?(a=a.concat(r),this.setCheckedAll(a)):a&&(a=a.filter(function(e){return e!==r}),this.setState({checkedAllRows:!1})),a.sort(function(e,t){return e-t}),this.props.updateRowSelections(a)}}},{key:"generateTableHeaderRow",value:function(){for(var t=[],r="",o=0;o<this.props.columns.length;o++){var l,s,a=this.props.columns[o];void 0!==this.props.filterable&&this.props.filterable[0]===a.key&&(r=a.label);var i=Math.abs(parseInt(null!==(l=null===(s=this.state.columnWidths)||void 0===s?void 0:s[o])&&void 0!==l?l:40,10)),n=void 0;"object"===e._typeof(a.label)?n=a.label.props.labelText:"string"==typeof a.label&&(n=a.label),t.push({key:a.key,label:a.label,width:i,description:a.description,headerLabel:n,resizable:a.resizable,operation:a.operation,staticWidth:!!a.staticWidth&&a.staticWidth})}return{headers:t,searchLabel:r}}},{key:"rowGetter",value:function(e){var t=e.index,r=this.props.data[t],o=this.getOriginalRowIndex(r,t),l={};if(r.columns)for(var s=0;s<r.columns.length;s++){var a=r.columns[s];l[a.column]=a.content}return Object.assign({},l,{loading:!1,index:t,originalRowIndex:o,rowKey:void 0!==r.rowKey?r.rowKey:this.props.scrollKey+"-row-"+t,disabled:r.disabled})}},{key:"rowHeight",value:function(e){return e.index,32}},{key:"render",value:function(){var e=this,t=r.isEmpty_1(this.props.data)?m.default.createElement("div",{className:"properties-ft-empty-table"},this.props.emptyTablePlaceholder):null;if(0===this.props.columns.length)return m.default.createElement("div",{ref:this.tableRef},m.default.createElement("div",{className:"properties-ft-empty-table-header"}),t);var o=this.generateTableHeaderRow(),l=o.headers,s=o.searchLabel,n=this.props.tableState===v.DISABLED,c=null;if(void 0!==this.props.filterable&&0!==this.props.filterable.length){var d=void 0!==this.props.searchPlaceholder?this.props.searchPlaceholder:this.props.intl.formatMessage({id:"table.search.placeholder",defaultMessage:r.commonPropertiesMessages["table.search.placeholder"]},{column_name:s}),p=this.props.intl.formatMessage({id:"table.search.label",defaultMessage:r.commonPropertiesMessages["table.search.label"]},{table_name:this.props.tableLabel});c=m.default.createElement("div",{className:i.classNames("properties-ft-search-container",{disabled:n})},m.default.createElement(a.Layer,{level:this.props.light?1:0},m.default.createElement(a.Search,{className:"properties-ft-search-text",placeholder:d,onChange:this.handleFilterChange,disabled:n,size:"sm",labelText:p})))}var u=-1;void 0!==this.props.scrollToRow&&null!==this.props.scrollToRow&&(u=this.props.scrollToRow);var h={};this.props.noAutoSize||(h={height:this.state.tableHeight});var E=this.props.showHeader?"properties-ft-container-absolute ":"properties-ft-container-absolute-noheader ",f=this.props.messageInfo?E:E+v.INFO,b=i.classNames("properties-ft-table-header",{"single-row-selection-table":this.props.rowSelection===S.SINGLE}),T=void 0!==this.props.topRightPanel&&null!==this.props.topRightPanel&&void 0===this.props.topRightPanel.props.className,R=c||this.props.topRightPanel?m.default.createElement("div",{className:b,ref:this.flexibleTableHeader},T?null:c,this.props.topRightPanel):null,_=i.classNames("properties-ft-control-container",{"properties-light-disabled":!this.props.light}),L=0;-1!==this.state.rows&&this.state.tableHeight?L=parseInt(this.state.tableHeight,10):-1===this.state.rows&&this.state.dynamicHeight&&-1!==this.state.dynamicHeight&&(L=this.state.dynamicHeight);return this.props.enableTanstackTable?m.default.createElement("div",{"data-id":"properties-ft-"+this.props.scrollKey,className:_,ref:function(t){return e.flexibleTable=t}},R,m.default.createElement("div",{className:"properties-ft-container-panel"},m.default.createElement("div",{className:i.classNames("properties-ft-container-wrapper",this.props.messageInfo?this.props.messageInfo.type:""),style:h,ref:this.tableRef},m.default.createElement("div",{className:f},m.default.createElement(he,B({data:this.props.data,tableLabel:this.props.tableLabel,excessWidth:this.state.excessWidth,columns:l,onHeaderClick:this.sortHeaderClick,rowCount:this.props.data.length,rowHeight:this.rowHeight,rowGetter:this.rowGetter,summaryTable:this.props.summaryTable,selectable:void 0!==this.props.updateRowSelections,rowSelection:this.props.rowSelection,showHeader:this.props.showHeader,onRowDoubleClick:this.props.onRowDoubleClick,getOriginalRowIndex:this.getOriginalRowIndex,rowsSelected:this.props.selectedRows,checkedAll:this.state.checkedAllRows,setRowsSelected:this.handleCheckedRow,setAllRowsSelected:this.handleCheckedAllRows,scrollKey:this.props.scrollKey,onSort:this.onSort,sortBy:this.state.currentSortColumn,sortColumns:this.props.sortable,sortDirection:this.state.columnSortDir[this.state.currentSortColumn],tableDisabled:n,light:this.props.light,readOnly:this.props.readOnly},-1!==u&&{scrollToIndex:u}))))),t):m.default.createElement("div",{"data-id":"properties-ft-"+this.props.scrollKey,className:_,ref:function(t){return e.flexibleTable=t}},R,m.default.createElement("div",{className:"properties-ft-container-panel"},m.default.createElement("div",{className:i.classNames("properties-ft-container-wrapper",this.props.messageInfo?this.props.messageInfo.type:""),style:h,ref:this.tableRef},m.default.createElement("div",{className:f},m.default.createElement(ye,B({tableLabel:this.props.tableLabel,tableHeight:L,columns:l,onHeaderClick:this.sortHeaderClick,rowCount:this.props.data.length,rowHeight:this.rowHeight,rowGetter:this.rowGetter,summaryTable:this.props.summaryTable,selectable:void 0!==this.props.updateRowSelections,rowSelection:this.props.rowSelection,disableHeader:!this.props.showHeader,onRowDoubleClick:this.props.onRowDoubleClick,rowsSelected:this.props.selectedRows,checkedAll:this.state.checkedAllRows,setRowsSelected:this.handleCheckedRow,setAllRowsSelected:this.handleCheckedAllRows,scrollKey:this.props.scrollKey,onSort:this.onSortVT,sortBy:this.state.currentSortColumn,sortColumns:this.state.columnSortDir,sortDirection:this.state.columnSortDir[this.state.currentSortColumn],tableState:this.props.tableState,light:this.props.light,readOnly:this.props.readOnly},-1!==u&&{scrollToIndex:u,scrollToAlignment:"center"}))))),t)}}])}(m.default.Component);xe.defaultProps={showHeader:!0,light:!0,emptyTablePlaceholder:"",selectedRows:[],enableTanstackTable:!0};var De=s.injectIntl(xe);exports.ACTIONS={SET_PROPERTIES:"SET_PROPERTIES",UPDATE_PROPERTY:"UPDATE_PROPERTY",PROPERTIES_LOADED:"PROPERTIES_LOADED"},exports.APPLY="apply",exports.CANCEL="cancel",exports.CARBON_BUTTON_KIND={PRIMARY:"primary",SECONDARY:"secondary",TERTIARY:"tertiary",GHOST:"ghost",DANGER:"danger",DANGER_TERTIARY:"danger--tertiary",DANGER_GHOST:"danger--ghost"},exports.CARBON_BUTTON_SIZE={SMALL:"sm",MEDIUM:"md",LARGE:"lg",EXTRA_LARGE:"xl"},exports.CARBON_ICONS={CHEVRONARROWS:{UP:"chevron-up",DOWN:"chevron-down",LEFT:"chevron-left",RIGHT:"chevron-right"},CALCULATOR:"calculator",ADD:"add",REMOVE:"remove",EDIT:"edit",MEASUREMENTS:{EMPTY:"measurement-empty",ORDINAL:"measurement-ordinal",NOMINAL:"measurement-nominal",SCALE:"measurement-scale",FLAG:"measurement-flag",DISCRETE:"measurement-discrete"},INFORMATION:"informationHollow",SETTINGS:"settings"},exports.CARBON_MODAL_SIZE_LARGE="lg",exports.CARBON_MODAL_SIZE_SMALL="sm",exports.CARBON_MODAL_SIZE_XSMALL="xs",exports.CATEGORY_VIEW={ACCORDIONS:"accordions",TABS:"tabs"},exports.CONDITION_DEFINITION_INDEX={CONTROLS:"controls",REFS:"refs"},exports.CONDITION_MESSAGE_TYPE={INFO:"info",ERROR:"error",WARNING:"warning",SUCCESS:"success"},exports.CONDITION_RETURN_VALUE_HANDLING={VALUE:"value",NULL:"null"},exports.CONDITION_TYPE={VISIBLE:"visible",ENABLED:"enabled",FILTEREDENUM:"enum_filter",ALLOWCHANGE:"allow_change",FILTER:"filter",VALIDATION:"validation",CONDITIONALDEFAULT:"default_value"},exports.CONTAINER_TYPE={CUSTOM:"Custom",TEARSHEET:"Tearsheet",MODAL:"Modal"},exports.DATA_TYPE={INTEGER:"integer",DOUBLE:"double",STRING:"string",DATE:"date",TIME:"time",TIMESTAMP:"timestamp"},exports.DATEPICKER_TYPE={SINGLE:"single",RANGE:"range"},exports.DEFAULT_DATEPICKER_FORMAT="Y-m-d",exports.DEFAULT_DATE_FORMAT="yyyy-MM-dd",exports.DEFAULT_LABEL_EDITABLE=!0,exports.DEFAULT_LOCALE="en",exports.DEFAULT_TIME_FORMAT="H:m:s",exports.DEFAULT_VALIDATION_MESSAGE={type:"info",text:""},exports.EXPRESSION_TABLE_ROWS=5,exports.FlexibleTable=De,exports.Information=x,exports.MESSAGE_KEYS={SUBPANEL_BUTTON_TOOLTIP:"subPanel.button.tooltip",STRUCTURELISTEDITOR_ADDBUTTON_LABEL:"structureListEditor.addButton.label",STRUCTURETABLE_ADDBUTTON_LABEL:"structureTable.addButton.label",FIELDPICKER_SAVEBUTTON_LABEL:"fieldPicker.saveButton.label",FIELDPICKER_SAVEBUTTON_MODAL_LABEL:"fieldPicker.saveButton.modal.label",FIELDPICKER_RESETBUTTON_LABEL:"fieldPicker.resetButton.label",FIELDPICKER_FILTER_LABEL:"fieldPicker.filter.label",FIELDPICKER_FIELDCOLUMN_LABEL:"fieldPicker.fieldColumn.label",FIELDPICKER_SCHEMACOLUMN_LABEL:"fieldPicker.schemaColumn.label",FIELDPICKER_DATATYPECOLUMN_LABEL:"fieldPicker.dataTypeColumn.label",FIELDPICKER_INTEGER_LABEL:"fieldPicker.integer.label",FIELDPICKER_DOUBLE_LABEL:"fieldPicker.double.label",FIELDPICKER_STRING_LABEL:"fieldPicker.string.label",FIELDPICKER_DATE_LABEL:"fieldPicker.date.label",FIELDPICKER_TIME_LABEL:"fieldPicker.time.label",FIELDPICKER_TIMESTAMP_LABEL:"fieldPicker.timestamp.label",APPLYBUTTON_LABEL:"flyout.applyButton.label",REJECTBUTTON_LABEL:"flyout.rejectButton.label",PROPERTIESEDIT_CLOSEBUTTON_LABEL:"propertiesEdit.closeButton.label",PROPERTIESEDIT_APPLYBUTTON_LABEL:"propertiesEdit.applyButton.label",PROPERTIESEDIT_REJECTBUTTON_LABEL:"propertiesEdit.rejectButton.label",PROPERTIESEDIT_REVERTBUTTON_LABEL:"propertiesEdit.revertButton.label",PROPERTIESEDIT_RESIZEBUTTON_EXPAND_LABEL:"propertiesEdit.resizeButton.expand.label",PROPERTIESEDIT_RESIZEBUTTON_CONTRACT_LABEL:"propertiesEdit.resizeButton.contract.label",PROPERTIES_REVERT_MESSAGE:"properties.revert.message",PROPERTIES_CLOSE_MESSAGE:"properties.close.message",PROPERTIES_SUPPORT_MESSAGE:"properties.support.message",PROPERTIES_UNEXPECTED_MESSAGE:"properties.unexpected.message",TABLE_SEARCH_HEADER:"table.search.header",LONG_TABLE_SUMMARY_PLACEHOLDER:"summary.longTable.placeholder",ALERTS_TAB_TITLE:"alerts.tab.title",TITLE_EDITOR_LABEL:"title.editor.label",TITLE_EDITOR_HELPBUTTON_LABEL:"title.editor.helpButton.label",TITLE_EDITOR_DESCBUTTON_LABEL:"title.editor.descButton.label",TABLE_SUMMARY_ERROR:"table.summary.error",TABLE_SUMMARY_WARNING:"table.summary.warning",CONTROL_SUMMARY_ERROR:"control.summary.error",CONTROL_SUMMARY_WARNING:"control.summary.warning",CONTROL_SUMMARY_ERROR_WARNING:"control.summary.error.warning",REQUIRED_ERROR:"required.error",DATETIME_FORMAT_ERROR:"datetime.format.error",INVALID_FIELD_ERROR:"invalid.field.error",INVALID_NUMBER_ERROR:"invalid.number.error",EXPRESSION_VALIDATE_LABEL:"expression.validate.label",EXPRESSION_VALIDATING_LABEL:"expression.validating.label",EXPRESSION_BUILDER_TITLE:"expression.builder.title",EXPRESSION_BUILDER_ICON_DESCRIPTION:"expression.builder.icon.description",EXPRESSION_BUILDER_LABEL:"expression.builder.label",EXPRESSION_FIELDS_TABLE_LABEL:"expression.fields.table.label",EXPRESSION_FIELDS_EMPTY_TABLE_LABEL:"expression.fields.empty.table.label",EXPRESSION_VALUES_TABLE_LABEL:"expression.values.table.label",EXPRESSION_VALUES_EMPTY_TABLE_LABEL:"expression.values.empty.table.label",EXPRESSION_FUNCTIONS_TABLE_LABEL:"expression.functions.table.label",EXPRESSION_FIELDS_DROPDOWN_TITLE:"expression.fields.dropdown",EXPRESSION_FUNCTIONS_DROPDOWN_TITLE:"expression.functions.dropdown",EXPRESSION_FIELDS_TITLE:"expression.fields.title",EXPRESSION_VALUES_TITLE:"expression.values.title",EXPRESSION_FIELD_COLUMN:"expression.field.column",EXPRESSION_ADD_COLUMN:"expression.add.column",EXPRESSION_FIELD_COLUMN_DESCRIPTION:"expression.field.column.description",EXPRESSION_STORAGE_COLUMN:"expression.storage.column",EXPRESSION_VALUE_COLUMN:"expression.value.column",EXPRESSION_VALUE_COLUMN_DESCRIPTION:"expression.value.column.description",EXPRESSION_FUNCTION_COLUMN:"expression.function.column",EXPRESSION_RETURN_COLUMN:"expression.return.column",EXPRESSION_RECENTLY_USED_COLUMN:"expression.recently.used.column",EXPRESSION_RECENTLY_USED_COLUMN_DESCRIPTION:"expression.recently.used.column.description",EXPRESSION_FIELD_TAB:"expression.field.tab",EXPRESSION_FUNCTIONS_TAB:"expression.functions.tab",EXPRESSION_RECENTLY_USED:"expression.recently.used",EXPRESSION_ALL_FUNCTIONS:"expression.all.functions",EXPRESSION_MIN_LABEL:"expression.min.label",EXPRESSION_MAX_LABEL:"expression.max.label",EXPRESSION_MAXIMIZE_LABEL:"expression.maximize.label",EXPRESSION_MINIMIZE_LABEL:"expression.minimize.label",EXPRESSION_NO_FUNCTIONS:"expression.no.functions",SINGLE_SELECTED_ROW_LABEL:"single.selected.row.label",MULTI_SELECTED_ROW_LABEL:"multi.selected.row.label",SINGLE_SELECTED_ROW_LABEL_SMALL_FLYOUT:"single.selected.row.label.small.flyout",MULTI_SELECTED_ROW_LABEL_SMALL_FLYOUT:"multi.selected.row.label.small.flyout",MULTI_SELECT_EDIT_SUBPANEL_TITLE:"multi.select.edit.subpanel.title",LIST_TABLE_LABEL:"list.table.label",DROPDOWN_TOOLTIP_OPENMENU:"dropdown.tooltip.openMenu",DROPDOWN_TOOLTIP_CLOSEMENU:"dropdown.tooltip.closeMenu",DROPDOWN_TOOLTIP_CLEARALL:"dropdown.tooltip.clear.all",DROPDOWN_TOOLTIP_CLEARSELECTION:"dropdown.tooltip.clear.selection",TRUNCATE_LONG_STRING_ERROR:"truncate.long.string.error",PROPERTIES_LABEL:"properties.label",PROPERTIES_ERROR_LABEL:"properties.error.label",PROPERTIES_ACTION_LABEL:"action.commonProperties",READONLYTABLE_EDIT_BUTTON_LABEL:"readonlytable.edit.button.label",TOGGLETEXT_ICON_DESCRIPTION:"toggletext.icon.description",MULTISELECT_DROPDOWN_EMPTY_LABEL:"multiselect.dropdown.empty.label",MULTISELECT_DROPDOWN_OPTIONS_SELECTED_LABEL:"multiselect.dropdown.options.selected.label",PROPERTIES_EMPTY_TABLE_TEXT:"properties.empty.table.text",TOGGLE_ON_LABEL:"toggle.on.label",TOGGLE_OFF_LABEL:"toggle.off.label",SHOW_PASSWORD_TOOLTIP:"passwordShow.tooltip",HIDE_PASSWORD_TOOLTIP:"passwordHide.tooltip",LABEL_INDICATOR_REQUIRED:"label.indicator.required",LABEL_INDICATOR_OPTIONAL:"label.indicator.optional",DATEPICKER_RANGE_START_LABEL:"datepickerRangeStart.default.label",DATEPICKER_RANGE_END_LABEL:"datepickerRangeEnd.default.label",SLIDER_NUMBER_INPUT_LABEL:"slider.numberInput.label",EDITORFORM_TABLIST_LABEL:"editorForm.tabList.label",SUBTABS_TABLIST_LABEL:"subTabs.tabList.label",TABLE_TOOLBAR_BUTTON_TOP:"table.toolbar.button.top",TABLE_TOOLBAR_BUTTON_UP:"table.toolbar.button.up",TABLE_TOOLBAR_BUTTON_DOWN:"table.toolbar.button.down",TABLE_TOOLBAR_BUTTON_BOTTOM:"table.toolbar.button.bottom",TABLE_TOOLBAR_BUTTON_DELETE:"table.toolbar.button.delete",TABLE_TOOLBAR_BUTTON_EDIT:"table.toolbar.button.edit",TABLE_TOOLBAR_BUTTON_CANCEL:"table.toolbar.button.cancel",TABLE_TOOLBAR_OVERFLOW_LABEL:"table.toolbar.overflow.label",TABLE_TOOLBAR_LABEL:"table.toolbar.label",RADIO_BUTTON_GROUP_ARIA_LABEL:"radiobuttongroup.aria.label",TABLE_DELETEICON_TOOLTIP:"table.deleteIcon.tooltip"},exports.PANEL_TREE_ROOT="PanelTreeRoot",exports.ROW_SELECTION=S,exports.SORT_DIRECTION=_,exports.STATES=v,exports.TABLE_SUBPANEL_BUTTON_WIDTH="36px",exports.TRUNCATE_LIMIT=1e4,exports.TruncatedContentTooltip=P,exports.UPDATE_TYPE={INITIAL_LOAD:"initial_load"},exports._extends=B,exports.includes_1=V,exports.isString_1=g;
|
|
2
|
+
//# sourceMappingURL=flexible-table-20fac41c.js.map
|