create umbraco-news "package"
This commit is contained in:
committed by
Jacob Overgaard
parent
adf026b388
commit
3d52f9afeb
@@ -24,12 +24,11 @@ const CORE_PACKAGES = [
|
||||
import('./packages/umbraco-package'),
|
||||
import('./search/umbraco-package'),
|
||||
import('./templating/umbraco-package'),
|
||||
import('./umbraco-news/umbraco-package'),
|
||||
];
|
||||
|
||||
@defineElement('umb-backoffice')
|
||||
export class UmbBackofficeElement extends UmbLitElement {
|
||||
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.provideContext(UMB_MODAL_CONTEXT_TOKEN, new UmbModalContext(this));
|
||||
@@ -48,7 +47,7 @@ export class UmbBackofficeElement extends UmbLitElement {
|
||||
<umb-backoffice-modal-container></umb-backoffice-modal-container>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -15,20 +15,6 @@ const dashboards: Array<ManifestDashboard> = [
|
||||
sections: ['Umb.Section.Content'],
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'dashboard',
|
||||
alias: 'Umb.Dashboard.Welcome',
|
||||
name: 'Welcome Dashboard',
|
||||
loader: () => import('../../documents/dashboards/welcome/dashboard-welcome.element'),
|
||||
weight: 20,
|
||||
meta: {
|
||||
label: 'Welcome',
|
||||
pathname: 'welcome',
|
||||
},
|
||||
conditions: {
|
||||
sections: ['Umb.Section.Content'],
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export const manifests = [...dashboards];
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
import './dashboard-welcome.element';
|
||||
|
||||
import { Meta, Story } from '@storybook/web-components';
|
||||
import { html } from 'lit';
|
||||
|
||||
import type { UmbDashboardWelcomeElement } from './dashboard-welcome.element';
|
||||
|
||||
export default {
|
||||
title: 'Dashboards/Welcome',
|
||||
component: 'umb-dashboard-welcome',
|
||||
id: 'umb-dashboard-welcome',
|
||||
} as Meta;
|
||||
|
||||
export const AAAOverview: Story<UmbDashboardWelcomeElement> = () =>
|
||||
html` <umb-dashboard-welcome></umb-dashboard-welcome>`;
|
||||
AAAOverview.storyName = 'Overview';
|
||||
@@ -0,0 +1,19 @@
|
||||
import { UmbEntrypointOnInit } from '@umbraco-cms/backoffice/extensions-api';
|
||||
import { ManifestDashboard } from '@umbraco-cms/backoffice/extensions-registry';
|
||||
|
||||
const dashboard: ManifestDashboard = {
|
||||
type: 'dashboard',
|
||||
alias: 'Umb.Dashboard.UmbracoNews',
|
||||
name: 'Umbraco News Dashboard',
|
||||
loader: () => import('./umbraco-news-dashboard.element'),
|
||||
weight: 20,
|
||||
meta: {
|
||||
label: 'Welcome',
|
||||
pathname: 'welcome',
|
||||
},
|
||||
conditions: {
|
||||
sections: ['Umb.Section.Content'],
|
||||
},
|
||||
};
|
||||
|
||||
export const onInit: UmbEntrypointOnInit = (_host, extensionRegistry) => extensionRegistry.register(dashboard);
|
||||
@@ -2,10 +2,8 @@ import { UUITextStyles } from '@umbraco-ui/uui-css/lib';
|
||||
import { css, html, LitElement } from 'lit';
|
||||
import { customElement } from 'lit/decorators.js';
|
||||
|
||||
@customElement('umb-dashboard-welcome')
|
||||
export class UmbDashboardWelcomeElement extends LitElement {
|
||||
|
||||
|
||||
@customElement('umb-umbraco-news-dashboard')
|
||||
export class UmbUmbracoNewsDashboardElement extends LitElement {
|
||||
render() {
|
||||
return html`
|
||||
<uui-box>
|
||||
@@ -14,7 +12,7 @@ export class UmbDashboardWelcomeElement extends LitElement {
|
||||
</uui-box>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
@@ -26,10 +24,10 @@ export class UmbDashboardWelcomeElement extends LitElement {
|
||||
];
|
||||
}
|
||||
|
||||
export default UmbDashboardWelcomeElement;
|
||||
export default UmbUmbracoNewsDashboardElement;
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'umb-dashboard-welcome': UmbDashboardWelcomeElement;
|
||||
'umb-umbraco-news-dashboard': UmbUmbracoNewsDashboardElement;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import './umbraco-news-dashboard.element';
|
||||
|
||||
import { Meta, Story } from '@storybook/web-components';
|
||||
import { html } from 'lit';
|
||||
|
||||
import type { UmbUmbracoNewsDashboardElement } from './umbraco-news-dashboard.element';
|
||||
|
||||
export default {
|
||||
title: 'Dashboards/Umbraco News',
|
||||
component: 'umb-umbraco-news-dashboard',
|
||||
id: 'umb-umbraco-news-dashboard',
|
||||
} as Meta;
|
||||
|
||||
export const AAAOverview: Story<UmbUmbracoNewsDashboardElement> = () =>
|
||||
html` <umb-umbraco-news-dashboard></umb-umbraco-news-dashboard>`;
|
||||
AAAOverview.storyName = 'Overview';
|
||||
@@ -0,0 +1,10 @@
|
||||
export const name = 'Umbraco.Core.UmbracoNews';
|
||||
export const version = '0.0.1';
|
||||
export const extensions = [
|
||||
{
|
||||
name: 'Umbraco News Entry Point',
|
||||
alias: 'Umb.EntryPoint.UmbracoNews',
|
||||
type: 'entryPoint',
|
||||
loader: () => import('./index'),
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user