1 line
19 KiB
JSON
1 line
19 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/MediaDemo.js\";\n\nimport React, { useEffect, useState } from 'react';\nimport { Carousel } from 'primereact/carousel';\nimport { Galleria } from 'primereact/galleria';\nimport { Button } from 'primereact/button';\nimport { Image } from \"primereact/image\";\nimport { ProductService } from '../service/ProductService';\nimport { PhotoService } from '../service/PhotoService';\n\nvar MediaDemo = function MediaDemo() {\n var _useState = useState([]),\n _useState2 = _slicedToArray(_useState, 2),\n products = _useState2[0],\n setProducts = _useState2[1];\n\n var _useState3 = useState([]),\n _useState4 = _slicedToArray(_useState3, 2),\n images = _useState4[0],\n setImages = _useState4[1];\n\n var galleriaResponsiveOptions = [{\n breakpoint: \"1024px\",\n numVisible: 5\n }, {\n breakpoint: \"960px\",\n numVisible: 4\n }, {\n breakpoint: \"768px\",\n numVisible: 3\n }, {\n breakpoint: \"560px\",\n numVisible: 1\n }];\n var carouselResponsiveOptions = [{\n breakpoint: \"1024px\",\n numVisible: 3,\n numScroll: 3\n }, {\n breakpoint: \"768px\",\n numVisible: 2,\n numScroll: 2\n }, {\n breakpoint: \"560px\",\n numVisible: 1,\n numScroll: 1\n }];\n useEffect(function () {\n var productService = new ProductService();\n productService.getProductsSmall().then(function (products) {\n return setProducts(products);\n });\n var photoService = new PhotoService();\n photoService.getImages().then(function (images) {\n return setImages(images);\n });\n }, []);\n\n var carouselItemTemplate = function carouselItemTemplate(product) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"product-item\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58,\n columnNumber: 13\n }\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"product-item-content\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59,\n columnNumber: 17\n }\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"mb-3\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 60,\n columnNumber: 21\n }\n }, /*#__PURE__*/React.createElement(\"img\", {\n src: \"assets/demo/images/product/\".concat(product.image),\n alt: product.name,\n className: \"product-image\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61,\n columnNumber: 25\n }\n })), /*#__PURE__*/React.createElement(\"div\", {\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 21\n }\n }, /*#__PURE__*/React.createElement(\"h4\", {\n className: \"p-mb-1\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 25\n }\n }, product.name), /*#__PURE__*/React.createElement(\"h6\", {\n className: \"mt-0 mb-3\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 25\n }\n }, \"$\", product.price), /*#__PURE__*/React.createElement(\"span\", {\n className: \"product-badge status-\".concat(product.inventoryStatus.toLowerCase()),\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 25\n }\n }, product.inventoryStatus), /*#__PURE__*/React.createElement(\"div\", {\n className: \"car-buttons mt-5\",\n __self: _this,\n __source: {\n f
|