From aae9b81cee5de4b0a1979e3bfc76cc0908b7a83c Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Mon, 28 Nov 2022 15:40:15 +0100 Subject: [PATCH] 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. --- .../src/backoffice/backoffice.element.ts | 1 + .../components/shared/code-block.element.ts} | 4 +++- .../dashboard-models-builder.element.ts | 11 ++++------- src/Umbraco.Web.UI.Client/src/core/utils/index.ts | 1 - 4 files changed, 8 insertions(+), 9 deletions(-) rename src/Umbraco.Web.UI.Client/src/{core/utils/code-block.ts => backoffice/components/shared/code-block.element.ts} (96%) diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/backoffice.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/backoffice.element.ts index e4969b2511..ea41a740a2 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/backoffice.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/backoffice.element.ts @@ -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'; diff --git a/src/Umbraco.Web.UI.Client/src/core/utils/code-block.ts b/src/Umbraco.Web.UI.Client/src/backoffice/components/shared/code-block.element.ts similarity index 96% rename from src/Umbraco.Web.UI.Client/src/core/utils/code-block.ts rename to src/Umbraco.Web.UI.Client/src/backoffice/components/shared/code-block.element.ts index a703f06bab..63771a52d3 100644 --- a/src/Umbraco.Web.UI.Client/src/core/utils/code-block.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/components/shared/code-block.element.ts @@ -37,7 +37,9 @@ export class UUICodeBlock extends LitElement { return html`
-+++