diff --git a/CHANGELOG-WIP.md b/CHANGELOG-WIP.md index cad3b88c641..194e06ba8b2 100644 --- a/CHANGELOG-WIP.md +++ b/CHANGELOG-WIP.md @@ -312,6 +312,7 @@ - Plugin settings are now persisted based on the settings model’s public properties, via `CraftCms\Cms\Plugin\PluginSettings::configData()`. Settings stored in private properties with getter and setter methods must be redeclared as public properties, or included by overriding `configData()`. - Plugins’ control panel nav items can now be shown as groups, by calling `group(true)` on the item returned by `getCpNavItem()` and passing its items to `subnav()`. ([#19903](https://github.com/craftcms/cms/pull/19903)) - Plugin bundles can now import the control panel’s components and composables from the `@craftcms/cp` import-map module, including `ElementIndexPage`, `ElementEditor`, `AdminTable`, and `useCraftTable`. ([#19912](https://github.com/craftcms/cms/issues/19912)) +- Added `HtmlFragmentRenderer`, `MetadataDetails`, `ScreenPanel`, `ActivityTimeline`, `ElementActionMenu`, `openUiModal()`, and `useInertiaUiRenderer()` to the `@craftcms/cp` import-map module, for plugin pages that build their own screens. `ScreenPanel`’s default slot now receives an `active` prop, which is true while its panel is open. ([#20570](https://github.com/craftcms/cms/pull/20570)) - Added `CraftCms\Cms\Element\Contracts\ElementInterface::supportsSourceBadgeCounts()`, `sourceSupportsBadgeCount()`, and `sourceBadgeCount()`, and the `defaultBadgeCount` source key, for element types whose sources can show a count of their elements. - Added `CraftCms\Cms\Cp\Data\ActionItem::$badgeLabel`. Element sources’ `badgeLabel` keys are now passed to screen readers in the control panel nav. - `` now has a `max` property, which sets the largest count shown before it’s shortened to “99+”. Set it to `Infinity` to show the whole count. Counts are now formatted for the page’s language. diff --git a/resources/js/common/components/ScreenPanel.vue b/resources/js/common/components/ScreenPanel.vue index acd22db024f..5ba9476583c 100644 --- a/resources/js/common/components/ScreenPanel.vue +++ b/resources/js/common/components/ScreenPanel.vue @@ -80,6 +80,12 @@ onBeforeUnmount(() => panels?.unregister(props.id)); const section = computed(() => panels?.sections.get(props.id) ?? null); + const active = computed(() => panels?.openPanelId.value === props.id); + + defineSlots<{ + default?(props: {active: boolean}): unknown; + 'header-actions'?(): unknown; + }>();