1 line
6.6 KiB
JSON
1 line
6.6 KiB
JSON
{"ast":null,"code":"var _jsxFileName = \"D:\\\\aiproject\\\\goAgent\\\\todo\\\\client\\\\src\\\\components\\\\TodoList.js\";\nimport React from 'react';\nimport styled from 'styled-components';\nimport TodoItem from './TodoItem';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nconst ListContainer = styled.div`\n background: white;\n border-radius: 16px;\n padding: 20px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);\n border: 1px solid #f0f0f0;\n`;\n_c = ListContainer;\nconst DateHeader = styled.div`\n display: flex;\n align-items: center;\n margin-bottom: 20px;\n padding-bottom: 12px;\n border-bottom: 2px solid #f8f9fa;\n`;\n_c2 = DateHeader;\nconst DateLabel = styled.h3`\n color: #333;\n font-size: 18px;\n font-weight: 600;\n margin: 0;\n margin-right: 12px;\n`;\n_c3 = DateLabel;\nconst TodoCount = styled.span`\n background: rgba(102, 126, 234, 0.1);\n color: #667eea;\n padding: 4px 12px;\n border-radius: 20px;\n font-size: 14px;\n font-weight: 500;\n`;\n_c4 = TodoCount;\nconst TodoItems = styled.div`\n display: flex;\n flex-direction: column;\n gap: 12px;\n`;\n_c5 = TodoItems;\nfunction TodoList({\n dateLabel,\n todos,\n onToggleTodo\n}) {\n const completedCount = todos.filter(todo => todo.completed).length;\n const totalCount = todos.length;\n return /*#__PURE__*/_jsxDEV(ListContainer, {\n children: [/*#__PURE__*/_jsxDEV(DateHeader, {\n children: [/*#__PURE__*/_jsxDEV(DateLabel, {\n children: dateLabel\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(TodoCount, {\n children: [completedCount, \"/\", totalCount]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 50,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(TodoItems, {\n children: todos.map(todo => /*#__PURE__*/_jsxDEV(TodoItem, {\n todo: todo,\n onToggle: onToggleTodo\n }, todo.id, false, {\n fileName: _jsxFileName,\n lineNumber: 59,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 57,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 5\n }, this);\n}\n_c6 = TodoList;\nexport default TodoList;\nvar _c, _c2, _c3, _c4, _c5, _c6;\n$RefreshReg$(_c, \"ListContainer\");\n$RefreshReg$(_c2, \"DateHeader\");\n$RefreshReg$(_c3, \"DateLabel\");\n$RefreshReg$(_c4, \"TodoCount\");\n$RefreshReg$(_c5, \"TodoItems\");\n$RefreshReg$(_c6, \"TodoList\");","map":{"version":3,"names":["React","styled","TodoItem","jsxDEV","_jsxDEV","ListContainer","div","_c","DateHeader","_c2","DateLabel","h3","_c3","TodoCount","span","_c4","TodoItems","_c5","TodoList","dateLabel","todos","onToggleTodo","completedCount","filter","todo","completed","length","totalCount","children","fileName","_jsxFileName","lineNumber","columnNumber","map","onToggle","id","_c6","$RefreshReg$"],"sources":["D:/aiproject/goAgent/todo/client/src/components/TodoList.js"],"sourcesContent":["import React from 'react';\r\nimport styled from 'styled-components';\r\nimport TodoItem from './TodoItem';\r\n\r\nconst ListContainer = styled.div`\r\n background: white;\r\n border-radius: 16px;\r\n padding: 20px;\r\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);\r\n border: 1px solid #f0f0f0;\r\n`;\r\n\r\nconst DateHeader = styled.div`\r\n display: flex;\r\n align-items: center;\r\n margin-bottom: 20px;\r\n padding-bottom: 12px;\r\n border-bottom: 2px solid #f8f9fa;\r\n`;\r\n\r\nconst DateLabel = styled.h3`\r\n color: #333;\r\n font-size: 18px;\r\n font-weight: 600;\r\n margin: 0;\r\n margin-right: 12px;\r\n`;\r\n\r\nconst TodoCount = styled.span`\r\n background: rgba(102, 126, 234, 0.1);\r\n color: #667eea;\r\n padding: 4px 12px;\r\n border-radius: 20px;\r\n font-size: 14px;\r\n font-weight: 500;\r\n`;\r\n\r\nconst TodoItems = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n gap: 12px;\r\n`;\r\n\r\nfunction TodoList({ dateLabel, todos, onToggleTodo }) {\r\n const completedCount = todos.filter(todo => todo.completed).length;\r\n const totalCount = todos.length;\r\n\r\n return (\r\n <ListContainer>\r\n <DateHeader>\r\n <DateLabel>{dateLabel}</DateLabel>\r\n <TodoCount>\r\n {completedCount}/{totalCount}\r\n </TodoCount>\r\n </DateHeader>\r\n \r\n <TodoItems>\r\n {todos.map(todo => (\r\n <TodoItem\r\n key={todo.id}\r\n todo={todo}\r\n onToggle={onToggleTodo}\r\n />\r\n ))}\r\n </TodoItems>\r\n </ListContainer>\r\n );\r\n}\r\n\r\nexport default TodoList; "],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,mBAAmB;AACtC,OAAOC,QAAQ,MAAM,YAAY;AAAC,SAAAC,MAAA,IAAAC,OAAA;AAElC,MAAMC,aAAa,GAAGJ,MAAM,CAACK,GAAG;AAChC;AACA;AACA;AACA;AACA;AACA,CAAC;AAACC,EAAA,GANIF,aAAa;AAQnB,MAAMG,UAAU,GAAGP,MAAM,CAACK,GAAG;AAC7B;AACA;AACA;AACA;AACA;AACA,CAAC;AAACG,GAAA,GANID,UAAU;AAQhB,MAAME,SAAS,GAAGT,MAAM,CAACU,EAAE;AAC3B;AACA;AACA;AACA;AACA;AACA,CAAC;AAACC,GAAA,GANIF,SAAS;AAQf,MAAMG,SAAS,GAAGZ,MAAM,CAACa,IAAI;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAACC,GAAA,GAPIF,SAAS;AASf,MAAMG,SAAS,GAAGf,MAAM,CAACK,GAAG;AAC5B;AACA;AACA;AACA,CAAC;AAACW,GAAA,GAJID,SAAS;AAMf,SAASE,QAAQA,CAAC;E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