diff --git a/src/Umbraco.Web.UI.Client/devops/module-dependencies/index.js b/src/Umbraco.Web.UI.Client/devops/module-dependencies/index.js index e8a456367554..1590c70896c9 100644 --- a/src/Umbraco.Web.UI.Client/devops/module-dependencies/index.js +++ b/src/Umbraco.Web.UI.Client/devops/module-dependencies/index.js @@ -2,8 +2,8 @@ import fs from 'fs'; import path from 'path'; import { createImportMap } from '../importmap/index.js'; -const ILLEGAL_CORE_IMPORTS_THRESHOLD = 7; -const SELF_IMPORTS_THRESHOLD = 9; +const ILLEGAL_CORE_IMPORTS_THRESHOLD = 6; +const SELF_IMPORTS_THRESHOLD = 8; const clientProjectRoot = path.resolve(import.meta.dirname, '../../'); const modulePrefix = '@umbraco-cms/backoffice/'; @@ -142,7 +142,9 @@ function reportIllegalImportsFromCore() { `Illegal imports found in ${total} core modules. ${total - ILLEGAL_CORE_IMPORTS_THRESHOLD} more than the threshold.`, ); } else { - console.log(`✅ Success! Still under the threshold of ${ILLEGAL_CORE_IMPORTS_THRESHOLD} illegal imports. `); + console.log( + `✅ Success! Still (${total}) under the threshold of ${ILLEGAL_CORE_IMPORTS_THRESHOLD} illegal imports. `, + ); } console.log(`\n\n`); @@ -191,4 +193,3 @@ report(); // TODO: // - Check what packages another package depends on (not modules) - This will be used when we split the tsconfig into multiple configs // - Check for circular module imports -// - Report if a module imports itself diff --git a/src/Umbraco.Web.UI.Client/src/packages/content/content-type/global-components/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/global-components/index.ts index e9575c6d1b4c..0863190fc704 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/content/content-type/global-components/index.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/global-components/index.ts @@ -1,3 +1,5 @@ import './content-type-workspace-editor-header.element.js'; +import './input-content-type-collection-configuration/input-content-type-collection-configuration.element.js'; export * from './content-type-workspace-editor-header.element.js'; +export * from './input-content-type-collection-configuration/input-content-type-collection-configuration.element.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/content/content-type/global-components/input-content-type-collection-configuration/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/global-components/input-content-type-collection-configuration/index.ts new file mode 100644 index 000000000000..e6cc5e03f973 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/global-components/input-content-type-collection-configuration/index.ts @@ -0,0 +1 @@ +export * from './input-content-type-collection-configuration.element.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/components/input-collection-configuration/input-collection-configuration.element.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/global-components/input-content-type-collection-configuration/input-content-type-collection-configuration.element.ts similarity index 91% rename from src/Umbraco.Web.UI.Client/src/packages/core/components/input-collection-configuration/input-collection-configuration.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/global-components/input-content-type-collection-configuration/input-content-type-collection-configuration.element.ts index d18d7e3c62da..ccd32f1d9dd3 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/components/input-collection-configuration/input-collection-configuration.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/global-components/input-content-type-collection-configuration/input-content-type-collection-configuration.element.ts @@ -9,10 +9,11 @@ import { import { UmbModalRouteRegistrationController } from '@umbraco-cms/backoffice/router'; import { UmbFormControlMixin } from '@umbraco-cms/backoffice/validation'; -@customElement('umb-input-collection-configuration') -export class UmbInputCollectionConfigurationElement extends UmbFormControlMixin( - UmbLitElement, -) { +@customElement('umb-input-content-type-collection-configuration') +export class UmbInputContentTypeCollectionConfigurationElement extends UmbFormControlMixin< + string, + typeof UmbLitElement +>(UmbLitElement) { protected override getFormElement() { return undefined; } @@ -122,10 +123,8 @@ export class UmbInputCollectionConfigurationElement extends UmbFormControlMixin< ]; } -export default UmbInputCollectionConfigurationElement; - declare global { interface HTMLElementTagNameMap { - 'umb-input-collection-configuration': UmbInputCollectionConfigurationElement; + 'umb-input-content-type-collection-configuration': UmbInputContentTypeCollectionConfigurationElement; } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/components/index.ts b/src/Umbraco.Web.UI.Client/src/packages/core/components/index.ts index 3d81540ec55f..a6494c5c3b24 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/components/index.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/components/index.ts @@ -10,7 +10,6 @@ export * from './footer-layout/index.js'; export * from './header-app/index.js'; export * from './history/index.js'; export * from './icon/index.js'; -export * from './input-collection-configuration/index.js'; export * from './input-color/index.js'; export * from './input-date/index.js'; export * from './input-dropdown/index.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/components/input-collection-configuration/index.ts b/src/Umbraco.Web.UI.Client/src/packages/core/components/input-collection-configuration/index.ts deleted file mode 100644 index 08e8bcfe8ff3..000000000000 --- a/src/Umbraco.Web.UI.Client/src/packages/core/components/input-collection-configuration/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './input-collection-configuration.element.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/document-type/views/structure/document-type-workspace-view-structure.element.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/document-type/views/structure/document-type-workspace-view-structure.element.ts index 0fa3d0312eae..22f1d7103581 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/document-type/views/structure/document-type-workspace-view-structure.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/document-type/views/structure/document-type-workspace-view-structure.element.ts @@ -4,8 +4,10 @@ import { UMB_DOCUMENT_TYPE_WORKSPACE_CONTEXT } from '../../document-type-workspa import { css, html, customElement, state } from '@umbraco-cms/backoffice/external/lit'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; -import type { UmbContentTypeSortModel } from '@umbraco-cms/backoffice/content-type'; -import type { UmbInputCollectionConfigurationElement } from '@umbraco-cms/backoffice/components'; +import type { + UmbContentTypeSortModel, + UmbInputContentTypeCollectionConfigurationElement, +} from '@umbraco-cms/backoffice/content-type'; import type { UmbWorkspaceViewElement } from '@umbraco-cms/backoffice/workspace'; import type { UUIToggleElement } from '@umbraco-cms/backoffice/external/uui'; @@ -98,14 +100,14 @@ export class UmbDocumentTypeWorkspaceViewStructureElement extends UmbLitElement
${this.localize.term('contentTypeEditor_collectionDescription')}
- { - const unique = (e.target as UmbInputCollectionConfigurationElement).value as string; + const unique = (e.target as UmbInputContentTypeCollectionConfigurationElement).value as string; this.#workspaceContext?.setCollection({ unique }); }}> - +
diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media-types/workspace/views/structure/media-type-workspace-view-structure.element.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media-types/workspace/views/structure/media-type-workspace-view-structure.element.ts index ba60a983083d..c7e2aab9dfa6 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media-types/workspace/views/structure/media-type-workspace-view-structure.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media-types/workspace/views/structure/media-type-workspace-view-structure.element.ts @@ -4,8 +4,10 @@ import { UMB_MEDIA_TYPE_WORKSPACE_CONTEXT } from '../../media-type-workspace.con import { css, html, customElement, state } from '@umbraco-cms/backoffice/external/lit'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; -import type { UmbContentTypeSortModel } from '@umbraco-cms/backoffice/content-type'; -import type { UmbInputCollectionConfigurationElement } from '@umbraco-cms/backoffice/components'; +import type { + UmbContentTypeSortModel, + UmbInputContentTypeCollectionConfigurationElement, +} from '@umbraco-cms/backoffice/content-type'; import type { UmbWorkspaceViewElement } from '@umbraco-cms/backoffice/workspace'; import type { UUIToggleElement } from '@umbraco-cms/backoffice/external/uui'; @@ -101,7 +103,7 @@ export class UmbMediaTypeWorkspaceViewStructureElement extends UmbLitElement imp default-value="3a0156c4-3b8c-4803-bdc1-6871faa83fff" .value=${this._collection} @change=${(e: CustomEvent) => { - const unique = (e.target as UmbInputCollectionConfigurationElement).value as string; + const unique = (e.target as UmbInputContentTypeCollectionConfigurationElement).value as string; this.#workspaceContext?.setCollection({ unique }); }}>