Team Ai
Apppublic

Deepvest/ProfilingAI

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
portfolio-view.js126 linesDownload Raw Back to react-components
1/******/ (() => { // webpackBootstrap2/******/ 	"use strict";3/******/ 	var __webpack_modules__ = ({4 5/***/ 698:6/***/ ((__unused_webpack_module, exports) => {7 8var __webpack_unused_export__;9/**10 * @license React11 * react-jsx-runtime.production.js12 *13 * Copyright (c) Meta Platforms, Inc. and affiliates.14 *15 * This source code is licensed under the MIT license found in the16 * LICENSE file in the root directory of this source tree.17 */18 19 20var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),21  REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");22function jsxProd(type, config, maybeKey) {23  var key = null;24  void 0 !== maybeKey && (key = "" + maybeKey);25  void 0 !== config.key && (key = "" + config.key);26  if ("key" in config) {27    maybeKey = {};28    for (var propName in config)29      "key" !== propName && (maybeKey[propName] = config[propName]);30  } else maybeKey = config;31  config = maybeKey.ref;32  return {33    $$typeof: REACT_ELEMENT_TYPE,34    type: type,35    key: key,36    ref: void 0 !== config ? config : null,37    props: maybeKey38  };39}40__webpack_unused_export__ = REACT_FRAGMENT_TYPE;41__webpack_unused_export__ = jsxProd;42__webpack_unused_export__ = jsxProd;43 44 45/***/ }),46 47/***/ 848:48/***/ ((module, __unused_webpack_exports, __webpack_require__) => {49 50 51 52if (true) {53  /* unused reexport */ __webpack_require__(698);54} else {}55 56 57/***/ })58 59/******/ 	});60/************************************************************************/61/******/ 	// The module cache62/******/ 	var __webpack_module_cache__ = {};63/******/ 	64/******/ 	// The require function65/******/ 	function __webpack_require__(moduleId) {66/******/ 		// Check if module is in cache67/******/ 		var cachedModule = __webpack_module_cache__[moduleId];68/******/ 		if (cachedModule !== undefined) {69/******/ 			return cachedModule.exports;70/******/ 		}71/******/ 		// Create a new module (and put it into the cache)72/******/ 		var module = __webpack_module_cache__[moduleId] = {73/******/ 			// no module.id needed74/******/ 			// no module.loaded needed75/******/ 			exports: {}76/******/ 		};77/******/ 	78/******/ 		// Execute the module function79/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);80/******/ 	81/******/ 		// Return the exports of the module82/******/ 		return module.exports;83/******/ 	}84/******/ 	85/************************************************************************/86var __webpack_exports__ = {};87 88// UNUSED EXPORTS: default89 90// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js91var jsx_runtime = __webpack_require__(848);92;// ./src/interface/components/ui/card.tsx93 94function card_Card(_a) {95    var children = _a.children, _b = _a.className, className = _b === void 0 ? '' : _b;96    return (_jsx("div", { className: "bg-white shadow rounded-lg overflow-hidden ".concat(className), children: children }));97}98function card_CardHeader(_a) {99    var children = _a.children, _b = _a.className, className = _b === void 0 ? '' : _b;100    return (_jsx("div", { className: "px-6 py-4 border-b border-gray-200 ".concat(className), children: children }));101}102function card_CardTitle(_a) {103    var children = _a.children, _b = _a.className, className = _b === void 0 ? '' : _b;104    return (_jsx("h3", { className: "text-lg font-semibold text-gray-900 ".concat(className), children: children }));105}106function card_CardContent(_a) {107    var children = _a.children, _b = _a.className, className = _b === void 0 ? '' : _b;108    return (_jsx("div", { className: "px-6 py-4 ".concat(className), children: children }));109}110 111;// ./src/interface/components/portfolio-view.tsx112 113 114 115var PortfolioView = function (_a) {116    var data = _a.data;117    return (_jsxs("div", { className: "space-y-6", children: [_jsxs(Card, { children: [_jsx(CardHeader, { children: _jsx(CardTitle, { children: "Vue d'ensemble du portefeuille" }) }), _jsx(CardContent, { children: _jsxs("div", { className: "grid grid-cols-3 gap-4", children: [_jsxs("div", { className: "text-center", children: [_jsx("h3", { className: "text-sm font-medium text-gray-500", children: "Valeur actuelle" }), _jsx("p", { className: "mt-1 text-2xl font-semibold text-gray-900", children: new Intl.NumberFormat('fr-FR', { style: 'currency', currency: 'EUR' })118                                                .format(data.currentValue) })] }), _jsxs("div", { className: "text-center", children: [_jsx("h3", { className: "text-sm font-medium text-gray-500", children: "Performance" }), _jsxs("p", { className: "mt-1 text-2xl font-semibold ".concat(data.returns >= 0 ? 'text-green-600' : 'text-red-600'), children: [(data.returns * 100).toFixed(2), "%"] })] }), _jsxs("div", { className: "text-center", children: [_jsx("h3", { className: "text-sm font-medium text-gray-500", children: "Actifs" }), _jsx("p", { className: "mt-1 text-2xl font-semibold text-gray-900", children: Object.keys(data.allocation).length })] })] }) })] }), _jsxs(Card, { children: [_jsx(CardHeader, { children: _jsx(CardTitle, { children: "\u00C9volution du portefeuille" }) }), _jsx(CardContent, { children: _jsx("div", { className: "h-96", children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", children: _jsxs(LineChart, { data: data.history, children: [_jsx(CartesianGrid, { strokeDasharray: "3 3", className: "stroke-gray-200" }), _jsx(XAxis, { dataKey: "date", className: "text-xs" }), _jsx(YAxis, { className: "text-xs" }), _jsx(Tooltip, {}), _jsx(Legend, {}), _jsx(Line, { type: "monotone", dataKey: "value", stroke: "#3b82f6", strokeWidth: 2, dot: false })] }) }) }) })] }), _jsxs(Card, { children: [_jsx(CardHeader, { children: _jsx(CardTitle, { children: "Allocation des actifs" }) }), _jsx(CardContent, { children: _jsx("div", { className: "grid grid-cols-2 gap-4", children: Object.entries(data.allocation).map(function (_a) {119                                var asset = _a[0], weight = _a[1];120                                return (_jsxs("div", { className: "flex items-center justify-between p-2 bg-gray-50 rounded", children: [_jsx("span", { className: "font-medium", children: asset }), _jsxs("span", { className: "text-gray-600", children: [(weight * 100).toFixed(1), "%"] })] }, asset));121                            }) }) })] })] }));122};123/* harmony default export */ const portfolio_view = ((/* unused pure expression or super */ null && (PortfolioView)));124 125/******/ })()126;