katoikia-app/web-ui/web-react/node_modules/.cache/babel-loader/abb51fccc2967a18f587741157b...

1 line
9.3 KiB
JSON
Raw Normal View History

2022-07-06 04:15:11 +00:00
{"ast":null,"code":"import _slicedToArray from \"/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/slicedToArray\";\n\nvar _this = this,\n _jsxFileName = \"/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/src/components/TreeDemo.js\";\n\nimport React, { useState, useEffect } from 'react';\nimport { Tree } from 'primereact/tree';\nimport { TreeTable } from 'primereact/treetable';\nimport { Column } from 'primereact/column';\nimport { NodeService } from '../service/NodeService';\n\nvar TreeDemo = function TreeDemo() {\n var _useState = useState([]),\n _useState2 = _slicedToArray(_useState, 2),\n treeNodes = _useState2[0],\n setTreeNodes = _useState2[1];\n\n var _useState3 = useState(null),\n _useState4 = _slicedToArray(_useState3, 2),\n selectedTreeNodeKeys = _useState4[0],\n setSelectedTreeNodeKeys = _useState4[1];\n\n var _useState5 = useState([]),\n _useState6 = _slicedToArray(_useState5, 2),\n treeTableNodes = _useState6[0],\n setTreeTableNodes = _useState6[1];\n\n var _useState7 = useState([]),\n _useState8 = _slicedToArray(_useState7, 2),\n selectedTreeTableNodeKeys = _useState8[0],\n setSelectedTreeTableNodeKeys = _useState8[1];\n\n useEffect(function () {\n var nodeService = new NodeService();\n nodeService.getTreeNodes().then(function (data) {\n return setTreeNodes(data);\n });\n nodeService.getTreeTableNodes().then(function (data) {\n return setTreeTableNodes(data);\n });\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"grid\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 20,\n columnNumber: 9\n }\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"col-12\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 13\n }\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"card\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 22,\n columnNumber: 17\n }\n }, /*#__PURE__*/React.createElement(\"h5\", {\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23,\n columnNumber: 21\n }\n }, \"Tree\"), /*#__PURE__*/React.createElement(Tree, {\n value: treeNodes,\n selectionMode: \"checkbox\",\n selectionKeys: selectedTreeNodeKeys,\n onSelectionChange: function onSelectionChange(e) {\n return setSelectedTreeNodeKeys(e.value);\n },\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 21\n }\n }))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"col-12\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 13\n }\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"card\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 17\n }\n }, /*#__PURE__*/React.createElement(\"h5\", {\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 21\n }\n }, \"TreeTable\"), /*#__PURE__*/React.createElement(TreeTable, {\n value: treeTableNodes,\n header: \"FileSystem\",\n selectionMode: \"checkbox\",\n selectionKeys: selectedTreeTableNodeKeys,\n onSelectionChange: function onSelectionChange(e) {\n return setSelectedTreeTableNodeKeys(e.value);\n },\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 21\n }\n }, /*#__PURE__*/React.createElement(Column, {\n field: \"name\",\n header: \"Name\",\n expander: true,\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 25\n }\n }), /*#__PURE__*/React.createElement(Column,