Anvil/assets/History-BFR5OGr2.js.map

1 line
7.3 KiB
Text
Raw Normal View History

2024-07-31 10:01:28 +02:00
{"version":3,"file":"History-BFR5OGr2.js","sources":["../../src/lib/components/atoms/HistoryFallback.svelte","../../src/lib/components/molecules/History.svelte"],"sourcesContent":["<!--\nHistoryFallback atom.\nCopyright (C) 2024 André Jaenisch\nSPDX-FileCopyrightText: 2024 André Jaenisch\nSPDX-License-Identifier: AGPL-3.0-or-later\n\nThis 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\nThis 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\nYou 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\n<script>\n\timport { _, date } from 'svelte-i18n';\n\timport { NorthStar24 } from 'svelte-octicons';\n\n\t/**\n\t * Service with which username was created on the instance.\n\t */\n\texport let created_with = '';\n\n\t/**\n\t * Instance to show in fallback.\n\t */\n\texport let instance = '';\n\n\t/**\n\t * Username to show in fallback.\n\t */\n\texport let username = '';\n</script>\n\n<!-- Commit day -->\n<span class=\"relative\">\n\t<span class=\"absolute ltr:-left-3 rtl:-right-3\">\n\t\t<NorthStar24 fill=\"currentColor\" />\n\t</span>\n\t<span class=\"ms-4\">\n\t\t{$date(new Date('2023-04-23'))} - {$_('page.profile.history.activities.setup.summary')}\n\t</span>\n</span>\n<!-- Commits -->\n<span class=\"ms-6 mt-8\">\n\t<span class=\"border box-decoration-clone px-4 py-2 leading-10\">\n\t\t{$_('page.profile.history.activities.setup.description', {\n\t\t\tvalues: {\n\t\t\t\tcreated_with,\n\t\t\t\tinstance,\n\t\t\t\tusername\n\t\t\t}\n\t\t})}\n\t</span>\n</span>\n","<!--\nHistory molecule.\nCopyright (C) 2024 André Jaenisch\nSPDX-FileCopyrightText: 2024 André Jaenisch\nSPDX-License-Identifier: AGPL-3.0-or-later\n\nThis 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\nThis 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\nYou 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\n<script>\n\timport { _ } from 'svelte-i18n';\n\n\timport CommitBody from '../atoms/CommitBody.svelte';\n\timport CommitDate from '../atoms/CommitDate.svelte';\n\timport HistoryFallback from '../atoms/HistoryFallback.svelte';\n\n\t/**\n\t * Array of commits to display by date and project.\n\t */\n\texport let commitsMap = [];\n\n\t/**\n\t * Required context for populating the template.\n\t */\n\texport let data = {\n\t\tuser: {\n\t\t\tcreated_with: '',\n\t\t\tinstance: '',\n\t\t\tusername: ''\n\t\t}\n\t};\n\n\t/**\n\t * Array of followings to look up.\n\t */\n\texport let followingsMap = [];\n\n\t/* Since I group commits by date and project I need to create a structure. */\n\tconst groupCommitsByDateAndProject = function (commitsMap) {\n\t\tconst groupByDateAndProject = {};\n\t\tcommitsMap\n\t\t\t// Some commits couldn't be fetched from Vervis\n\t\t\t.filter((commit) => Boolean(commit.id))\n\t\t\t.forEach((commit) => {\n\t\t\t\tconst { committed, context } = commit;\n\t\t\t\t// Committed is formatted as ISO date. Group by date no matter the time\n\t\t\t\tconst date = committed.slice(0, committed.indexOf('T'));\n\n\t\t\t\t// Ensure key exists\n\t\t\t\tif (!groupByDateAndProject[date]) {\n\t\t\t\t\tgroupByDateAndProject[date] = {};\n\t\t\t\t}\n\n\t\t\t\t// Ensure Array exists\n\t\t\t\tif (!groupByDateAndProject[date