1 line
8.7 KiB
Text
1 line
8.7 KiB
Text
|
{"version":3,"file":"FileTable.stories-BUJcT0a2.js","sources":["../../stories/organisms/FileTable.stories.ts"],"sourcesContent":["/* Stories for FileTable organism.\n * Copyright (C) 2024 André Jaenisch\n * SPDX-FileCopyrightText: 2024 André Jaenisch\n * SPDX-License-Identifier: AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { withActions } from '@storybook/addon-actions/decorator';\nimport { withLinks } from '@storybook/addon-links';\nimport type { Meta, StoryObj } from '@storybook/svelte';\n\nimport FileTable from '$lib/components/organisms/FileTable.svelte';\n\nconst meta = {\n\ttitle: 'Organisms/FileTable',\n\tcomponent: FileTable,\n\ttags: ['autodocs'],\n\targs: {\n\t\tsb: 'Templates/Profile'\n\t},\n\targTypes: {\n\t\tonSubmit: { action: 'submit' },\n\t\tsb: { control: 'radio', options: ['Templates/Profile'] }\n\t},\n\tdecorators: [withActions, withLinks]\n} satisfies Meta<FileTable>;\n\nexport default meta;\ntype Story = StoryObj<typeof meta>;\n\nexport const NoProjects: Story = {\n\targs: {\n\t\ti18n: {\n\t\t\theading: {\n\t\t\t\tlastUpdated: 'page.projects.table.heading.last_updated',\n\t\t\t\tname: 'page.projects.table.heading.name'\n\t\t\t},\n\t\t\ttable: {\n\t\t\t\tupdated: 'page.projects.file_table.updated'\n\t\t\t}\n\t\t},\n\t\tprojects: []\n\t}\n};\n\nexport const SingleProject: Story = {\n\targs: {\n\t\ti18n: {\n\t\t\theading: {\n\t\t\t\tlastUpdated: 'page.projects.table.heading.last_updated',\n\t\t\t\tname: 'page.projects.table.heading.name'\n\t\t\t},\n\t\t\ttable: {\n\t\t\t\tupdated: 'page.projects.file_table.updated'\n\t\t\t}\n\t\t},\n\t\tprojects: [\n\t\t\t{\n\t\t\t\tname: 'Project A',\n\t\t\t\tdescription:\n\t\t\t\t\t'This software project is a web-based application that will allow users to book appointments online.',\n\t\t\t\tavatar: 'https://example.com',\n\t\t\t\t// Date back three months\n\t\t\t\tlastUpdated: new Date(Date.now() - 3 * 30 * 24 * 60 * 60 * 1000),\n\t\t\t\tmembers: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Person A',\n\t\t\t\t\t\tavatar: 'https://example.com',\n\t\t\t\t\t\tslug: 'a'\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Person B',\n\t\t\t\t\t\tavatar: 'https://example.com',\n\t\t\t\t\t\tslug: 'b'\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Person C',\n\t\t\t\t\t\tavatar: 'https://example.com',\n\t\t\t\t\t\tslug: 'c'\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\ttags: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'ActivityPub',\n\t\t\t\t\t\tlink: '/tag/ActivityPub'\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'css',\n\t\t\t\t\t\tlink: '/tag/css'\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'guile',\n\t\t\t\t\t\tlink: '/tag/guile'\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t}\n};\n\nexport const MultipleProjects: Story = {\n\targs: {\n\t\ti18n: {\n\t\t\theading: {\n\t\t\t\tlastUpdated: 'page.projects.table.heading.last_updated',\n\t\t\t\tname: 'page.projects.table.heading.name'\n\t\t\t},\n\t\t\ttable: {\n\t\t\t\tupdated: 'page.projects.file_table.updated'\n\t\t\t}\n\t\t},\n\t\tprojects: [\n\t\t\t{\n\t\t\t\tname: 'Project A',\n\t\t\t\tdescription:\n\t\t\t\t\t'This software project is a web-based application that will allow users to book appointments online.',\n\t\t\t\tavatar: 'https://example.com',\n\t\t\t\t// Date back three months\n\t\t\t\tlastUpdated: new Date(Date.now() - 3 * 30 * 24 * 60 * 60 * 1000),\n\t\t\t\tmembers: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Person A',\n\t\t\t\t\t\tavatar: 'https://example.com',\n\t\t\t\t\t\tslug: 'a'\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t
|