1 line
45 KiB
JSON
1 line
45 KiB
JSON
|
{"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/OverlayDemo.js\";\n\nimport React, { useState, useEffect, useRef } from 'react';\nimport { Dialog } from 'primereact/dialog';\nimport { Button } from 'primereact/button';\nimport { Sidebar } from 'primereact/sidebar';\nimport { Toast } from 'primereact/toast';\nimport { Column } from 'primereact/column';\nimport { DataTable } from 'primereact/datatable';\nimport { OverlayPanel } from 'primereact/overlaypanel';\nimport { InputText } from 'primereact/inputtext';\nimport { confirmPopup } from 'primereact/confirmpopup';\nimport { ProductService } from '../service/ProductService';\n\nvar OverlayDemo = function OverlayDemo() {\n var _useState = useState(false),\n _useState2 = _slicedToArray(_useState, 2),\n displayBasic = _useState2[0],\n setDisplayBasic = _useState2[1];\n\n var _useState3 = useState(false),\n _useState4 = _slicedToArray(_useState3, 2),\n displayConfirmation = _useState4[0],\n setDisplayConfirmation = _useState4[1];\n\n var _useState5 = useState(false),\n _useState6 = _slicedToArray(_useState5, 2),\n visibleLeft = _useState6[0],\n setVisibleLeft = _useState6[1];\n\n var _useState7 = useState(false),\n _useState8 = _slicedToArray(_useState7, 2),\n visibleRight = _useState8[0],\n setVisibleRight = _useState8[1];\n\n var _useState9 = useState(false),\n _useState10 = _slicedToArray(_useState9, 2),\n visibleTop = _useState10[0],\n setVisibleTop = _useState10[1];\n\n var _useState11 = useState(false),\n _useState12 = _slicedToArray(_useState11, 2),\n visibleBottom = _useState12[0],\n setVisibleBottom = _useState12[1];\n\n var _useState13 = useState(false),\n _useState14 = _slicedToArray(_useState13, 2),\n visibleFullScreen = _useState14[0],\n setVisibleFullScreen = _useState14[1];\n\n var _useState15 = useState(null),\n _useState16 = _slicedToArray(_useState15, 2),\n products = _useState16[0],\n setProducts = _useState16[1];\n\n var _useState17 = useState(null),\n _useState18 = _slicedToArray(_useState17, 2),\n selectedProduct = _useState18[0],\n setSelectedProduct = _useState18[1];\n\n var op = useRef(null);\n var op2 = useRef(null);\n var toast = useRef(null);\n\n var accept = function accept() {\n toast.current.show({\n severity: 'info',\n summary: 'Confirmed',\n detail: 'You have accepted',\n life: 3000\n });\n };\n\n var reject = function reject() {\n toast.current.show({\n severity: 'error',\n summary: 'Rejected',\n detail: 'You have rejected',\n life: 3000\n });\n };\n\n var confirm = function confirm(event) {\n confirmPopup({\n target: event.currentTarget,\n message: 'Are you sure you want to proceed?',\n icon: 'pi pi-exclamation-triangle',\n accept: accept,\n reject: reject\n });\n };\n\n useEffect(function () {\n var productService = new ProductService();\n productService.getProductsSmall().then(function (data) {\n return setProducts(data);\n });\n }, []);\n\n var toggle = function toggle(event) {\n op.current.toggle(event);\n };\n\n var toggleDataTable = function toggleDataTable(event) {\n op2.current.toggle(event);\n };\n\n var formatCurrency = function formatCurrency(value) {\n return value.toLocaleString('en-US', {\n style: 'currency',\n currency: 'USD'\n });\n };\n\n var onProductSelect = function onProductSelect(event) {\n op2.current.hide();\n toast.current.show({\n severity: 'info',\n summary: 'Product Selected',\n detail: event.data.name,\n life: 3000\n });\n };\n\n var basicDialogFooter = /*#__PURE__*/React.createElement(Button, {\n type: \"butt
|