/home/vianto5/heredit.mx/wp-content/plugins/code-snippets/js/components/WelcomeMenu
NameSizeModeActions
Changelog.tsx27030644editdlrm
index.ts300644editdlrm
WelcomeMenu.tsx33150644editdlrm
Edit: /home/vianto5/heredit.mx/wp-content/plugins/code-snippets/js/components/WelcomeMenu/Changelog.tsx (2703B)
import React, { Fragment } from 'react' import { __, sprintf } from '@wordpress/i18n' import { CHANGELOG_SECTIONS } from '../../types/schema/WelcomeSchema' import type { ChangelogSectionTitle } from '../../types/schema/WelcomeSchema' const CHANGELOG_LABELS: Record = { Added: __('New features', 'code-snippets'), Changed: __('Improvements', 'code-snippets'), Deprecated: __('Deprecated features', 'code-snippets'), Removed: __('Removed features', 'code-snippets'), Fixed: __('Bug fixes', 'code-snippets'), Security: __('Security updates', 'code-snippets'), Other: __('Other', 'code-snippets') } const CHANGELOG_ICONS: Record = { Added: 'lightbulb', Changed: 'chart-line', Deprecated: 'remove', Removed: 'trash', Fixed: 'buddicons-replies', Security: 'shield', Other: 'open-folder' } const PLUGIN_TYPE_LABELS: Record = { core: __('Core', 'code-snippets'), pro: __('Pro', 'code-snippets') } const CHANGELOG_DATA = window.CODE_SNIPPETS_WELCOME?.changelog interface ChangelogSectionProps { section: ChangelogSectionTitle entries: Record } const ChangelogSection: React.FC = ({ section, entries }) => <>

{CHANGELOG_LABELS[section]}

    {Object.entries(entries).map(([pluginType, changes]) => changes.map(change =>
  • {PLUGIN_TYPE_LABELS[pluginType] ?? pluginType} {change}
  • ) )}
export const Changelog = () =>
{CHANGELOG_DATA?.map(({ version, date, entries }) =>

{sprintf( /* translators: %s: version number. */ __('Version %s', 'code-snippets'), version )} {date}

{CHANGELOG_SECTIONS.map(section => entries[section] ? : null)}
)}