move code-block to backoffice folder

Tests are failing when autoimporting an index file. As it turned out, the 'utils' folder is not the right place to put shared elements. Instead we are creating a 'shared' folder in the backoffice context and autoloading the component globally for the backoffice.

Consider moving the code-block element to the UI library later.
This commit is contained in:
Jacob Overgaard
2022-11-28 15:40:15 +01:00
parent 7d4162c11d
commit aae9b81cee
4 changed files with 8 additions and 9 deletions

View File

@@ -5,6 +5,7 @@ import './components/backoffice-modal-container.element';
import './components/backoffice-notification-container.element';
import './components/node-property/node-property.element';
import './components/table/table.element';
import './components/shared/code-block.element';
import './sections/shared/section-main/section-main.element';
import './sections/shared/section-sidebar/section-sidebar.element';
import './sections/shared/section.element';

View File

@@ -37,7 +37,9 @@ export class UUICodeBlock extends LitElement {
return html`<div id="container">
<uui-scroll-container>
<pre>
<code><slot></slot></code>
<code>
<slot></slot>
</code>
</pre>
</uui-scroll-container>
</div> `;

View File

@@ -1,11 +1,8 @@
import { UUIButtonState } from '@umbraco-ui/uui';
import { UUITextStyles } from '@umbraco-ui/uui-css/lib';
import { css, html, LitElement, nothing } from 'lit';
import { state, customElement } from 'lit/decorators.js';
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
import { customElement, state } from 'lit/decorators.js';
import { UUIButtonState } from '@umbraco-ui/uui';
import { UmbContextConsumerMixin } from '@umbraco-cms/context-api';
import { UmbNotificationService, UmbNotificationDefaultData } from '@umbraco-cms/services';
import {
ApiError,
CreatedResult,
@@ -14,8 +11,8 @@ import {
ModelsMode,
ProblemDetails,
} from '@umbraco-cms/backend-api';
import '@umbraco-cms/utils';
import { UmbContextConsumerMixin } from '@umbraco-cms/context-api';
import { UmbNotificationDefaultData, UmbNotificationService } from '@umbraco-cms/services';
@customElement('umb-dashboard-models-builder')
export class UmbDashboardModelsBuilderElement extends UmbContextConsumerMixin(LitElement) {

View File

@@ -1,3 +1,2 @@
export * from './baseUrl';
export * from './umbraco-path';
export * from './code-block';