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 b462b1b36e52..845fcf6c0a51 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 = 10; -const SELF_IMPORTS_THRESHOLD = 13; +const ILLEGAL_CORE_IMPORTS_THRESHOLD = 7; +const SELF_IMPORTS_THRESHOLD = 12; const clientProjectRoot = path.resolve(import.meta.dirname, '../../'); const modulePrefix = '@umbraco-cms/backoffice/'; diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json index 99587795dfdd..d4febe34b1a7 100644 --- a/src/Umbraco.Web.UI.Client/package-lock.json +++ b/src/Umbraco.Web.UI.Client/package-lock.json @@ -4329,6 +4329,10 @@ "resolved": "src/packages/code-editor", "link": true }, + "node_modules/@umbraco-backoffice/content": { + "resolved": "src/packages/content", + "link": true + }, "node_modules/@umbraco-backoffice/core": { "resolved": "src/packages/core", "link": true @@ -17595,6 +17599,9 @@ "src/packages/code-editor": { "name": "@umbraco-backoffice/code-editor" }, + "src/packages/content": { + "name": "@umbraco-backoffice/content" + }, "src/packages/core": { "name": "@umbraco-backoffice/core", "dependencies": { diff --git a/src/Umbraco.Web.UI.Client/package.json b/src/Umbraco.Web.UI.Client/package.json index d1a394307254..ae56d1196361 100644 --- a/src/Umbraco.Web.UI.Client/package.json +++ b/src/Umbraco.Web.UI.Client/package.json @@ -29,8 +29,8 @@ "./collection": "./dist-cms/packages/core/collection/index.js", "./components": "./dist-cms/packages/core/components/index.js", "./const": "./dist-cms/packages/core/const/index.js", - "./content-type": "./dist-cms/packages/core/content-type/index.js", - "./content": "./dist-cms/packages/core/content/index.js", + "./content-type": "./dist-cms/packages/content/content-type/index.js", + "./content": "./dist-cms/packages/content/content/index.js", "./culture": "./dist-cms/packages/core/culture/index.js", "./current-user": "./dist-cms/packages/user/current-user/index.js", "./dashboard": "./dist-cms/packages/core/dashboard/index.js", @@ -77,7 +77,7 @@ "./picker": "./dist-cms/packages/core/picker/index.js", "./property-action": "./dist-cms/packages/core/property-action/index.js", "./property-editor": "./dist-cms/packages/core/property-editor/index.js", - "./property-type": "./dist-cms/packages/core/property-type/index.js", + "./property-type": "./dist-cms/packages/content/property-type/index.js", "./property": "./dist-cms/packages/core/property/index.js", "./recycle-bin": "./dist-cms/packages/core/recycle-bin/index.js", "./relation-type": "./dist-cms/packages/relations/relation-types/index.js", diff --git a/src/Umbraco.Web.UI.Client/src/apps/backoffice/backoffice.element.ts b/src/Umbraco.Web.UI.Client/src/apps/backoffice/backoffice.element.ts index fb0294e5bb49..38a63a09117a 100644 --- a/src/Umbraco.Web.UI.Client/src/apps/backoffice/backoffice.element.ts +++ b/src/Umbraco.Web.UI.Client/src/apps/backoffice/backoffice.element.ts @@ -48,6 +48,7 @@ const CORE_PACKAGES = [ import('../../packages/umbraco-news/umbraco-package.js'), import('../../packages/user/umbraco-package.js'), import('../../packages/webhook/umbraco-package.js'), + import('../../packages/content/umbraco-package.js'), ]; @customElement('umb-backoffice') diff --git a/src/Umbraco.Web.UI.Client/src/assets/lang/en-us.ts b/src/Umbraco.Web.UI.Client/src/assets/lang/en-us.ts index 0e3689106bc3..ddcd6c505186 100644 --- a/src/Umbraco.Web.UI.Client/src/assets/lang/en-us.ts +++ b/src/Umbraco.Web.UI.Client/src/assets/lang/en-us.ts @@ -2563,7 +2563,7 @@ export default { consentForAnalytics: 'Consent for telemetry data', analyticsLevelSavedSuccess: 'Telemetry level saved!', analyticsDescription: - 'In order to improve Umbraco and add new functionality based on as relevant information as possible, we would like to collect system- and usage information from your installation.\n
Aggregate data will be shared on a regular basis as well as learnings from these metrics.\n
Hopefully, you will help us collect some valuable data.\n
\n
We WILL NOT collect any personal data such as content, code, user information, and all data will be fully anonymized.', + 'In order to improve Umbraco and add new functionality based on as relevant information as possible, we would like to collect system- and usage information from your installation.\n
Aggregate data will be shared on a regular basis as well as learnings from these metrics.\n
Hopefully, you will help us collect some valuable data.\n
\n
We WILL NOT collect any personal data such as content, code, user information, and all data will be fully anonymized.', minimalLevelDescription: 'We will only send an anonymized site ID to let us know that the site exists.', basicLevelDescription: 'We will send an anonymized site ID, Umbraco version, and packages installed', detailedLevelDescription: diff --git a/src/Umbraco.Web.UI.Client/src/mocks/data/document-blueprint/document-blueprint.data.ts b/src/Umbraco.Web.UI.Client/src/mocks/data/document-blueprint/document-blueprint.data.ts index 3c4f1445deee..8588c17bb2b4 100644 --- a/src/Umbraco.Web.UI.Client/src/mocks/data/document-blueprint/document-blueprint.data.ts +++ b/src/Umbraco.Web.UI.Client/src/mocks/data/document-blueprint/document-blueprint.data.ts @@ -5,7 +5,6 @@ import { type DocumentBlueprintTreeItemResponseModel, } from '@umbraco-cms/backoffice/external/backend-api'; -// eslint-disable-next-line @typescript-eslint/no-empty-object-type export type UmbMockDocumentBlueprintModel = DocumentBlueprintResponseModel & DocumentBlueprintItemResponseModel & DocumentBlueprintTreeItemResponseModel; diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/block-grid-area-config-entry/block-grid-area-config-entry.context.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/block-grid-area-config-entry/block-grid-area-config-entry.context.ts index 53eb4b6323f9..dca1a8bb0490 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/block-grid-area-config-entry/block-grid-area-config-entry.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/block-grid-area-config-entry/block-grid-area-config-entry.context.ts @@ -3,13 +3,13 @@ import { UmbBlockGridScaleManager, type UmbBlockGridScalableContext, } from '../../context/block-grid-scale-manager/block-grid-scale-manager.controller.js'; +import type { UmbBlockGridTypeAreaType } from '../../types.js'; import { UMB_BLOCK_GRID_AREA_CONFIG_ENTRY_CONTEXT } from './block-grid-area-config-entry.context-token.js'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import { UmbObjectState, appendToFrozenArray } from '@umbraco-cms/backoffice/observable-api'; import { UmbContextBase } from '@umbraco-cms/backoffice/class-api'; import { UMB_PROPERTY_CONTEXT } from '@umbraco-cms/backoffice/property'; import { umbConfirmModal } from '@umbraco-cms/backoffice/modal'; -import type { UmbBlockGridTypeAreaType } from '../../types.js'; export class UmbBlockGridAreaConfigEntryContext extends UmbContextBase implements UmbBlockGridScalableContext diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/property-editors/block-grid-editor/property-editor-ui-block-grid.element.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/property-editors/block-grid-editor/property-editor-ui-block-grid.element.ts index 1fbb6b61b50c..06d94b2dd031 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/property-editors/block-grid-editor/property-editor-ui-block-grid.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/property-editors/block-grid-editor/property-editor-ui-block-grid.element.ts @@ -62,7 +62,7 @@ export class UmbPropertyEditorUIBlockGridElement /** * Sets the input to readonly mode, meaning value cannot be changed but still able to read and select its content. * @type {boolean} - * @default false + * @default */ public set readonly(value) { this.#readonly = value; diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/property-editors/block-grid-group-configuration/property-editor-ui-block-grid-group-configuration.element.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/property-editors/block-grid-group-configuration/property-editor-ui-block-grid-group-configuration.element.ts index 6f9d071a2ad7..7ae692a82bd6 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/property-editors/block-grid-group-configuration/property-editor-ui-block-grid-group-configuration.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/property-editors/block-grid-group-configuration/property-editor-ui-block-grid-group-configuration.element.ts @@ -1,3 +1,4 @@ +import type { UmbBlockGridTypeGroupType } from '../../types.js'; import { html, customElement, property, css } from '@umbraco-cms/backoffice/external/lit'; import type { UmbPropertyEditorUiElement, @@ -7,7 +8,6 @@ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; import { UmbId } from '@umbraco-cms/backoffice/id'; import { UmbChangeEvent } from '@umbraco-cms/backoffice/event'; -import type { UmbBlockGridTypeGroupType } from '../../types.js'; @customElement('umb-property-editor-ui-block-grid-group-configuration') export class UmbPropertyEditorUIBlockGridGroupConfigurationElement diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/property-editors/block-grid-type-configuration/property-editor-ui-block-grid-type-configuration.element.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/property-editors/block-grid-type-configuration/property-editor-ui-block-grid-type-configuration.element.ts index f0fbbaaf8abe..0955813e9411 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/property-editors/block-grid-type-configuration/property-editor-ui-block-grid-type-configuration.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/property-editors/block-grid-type-configuration/property-editor-ui-block-grid-type-configuration.element.ts @@ -1,3 +1,6 @@ +import type { UmbBlockGridTypeGroupType } from '../../types.js'; +import { UMB_BLOCK_GRID_TYPE_WORKSPACE_MODAL } from '../../workspace/index.js'; +import { UMB_BLOCK_GRID_TYPE } from '../../constants.js'; import type { UmbBlockTypeWithGroupKey, UmbInputBlockTypeElement } from '@umbraco-cms/backoffice/block-type'; import type { UmbPropertyEditorUiElement, @@ -25,9 +28,6 @@ import { UmbModalRouteRegistrationController } from '@umbraco-cms/backoffice/rou import { UmbSorterController } from '@umbraco-cms/backoffice/sorter'; import { UmbChangeEvent } from '@umbraco-cms/backoffice/event'; import { umbConfirmModal } from '@umbraco-cms/backoffice/modal'; -import type { UmbBlockGridTypeGroupType } from '../../types.js'; -import { UMB_BLOCK_GRID_TYPE_WORKSPACE_MODAL } from '../../workspace/index.js'; -import { UMB_BLOCK_GRID_TYPE } from '../../constants.js'; interface MappedGroupWithBlockTypes extends UmbBlockGridTypeGroupType { blocks: Array; diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-list/property-editors/block-list-editor/property-editor-ui-block-list.element.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-list/property-editors/block-list-editor/property-editor-ui-block-list.element.ts index f62cb3cc8483..f905bb8f4251 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-list/property-editors/block-list-editor/property-editor-ui-block-list.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-list/property-editors/block-list-editor/property-editor-ui-block-list.element.ts @@ -120,7 +120,7 @@ export class UmbPropertyEditorUIBlockListElement /** * Sets the input to readonly mode, meaning value cannot be changed but still able to read and select its content. * @type {boolean} - * @default false + * @default */ public set readonly(value) { this.#readonly = value; diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-rte/property-editors/property-editor-ui-block-rte-type-configuration.element.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-rte/property-editors/property-editor-ui-block-rte-type-configuration.element.ts index ceec47eac153..4c2ce4b9f2da 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-rte/property-editors/property-editor-ui-block-rte-type-configuration.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-rte/property-editors/property-editor-ui-block-rte-type-configuration.element.ts @@ -1,3 +1,4 @@ +import { UMB_BLOCK_RTE_TYPE } from '../constants.js'; import { customElement, html, property, state, nothing } from '@umbraco-cms/backoffice/external/lit'; import { UmbInputBlockTypeElement } from '@umbraco-cms/backoffice/block-type'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; @@ -9,7 +10,6 @@ import type { UmbPropertyEditorUiElement, UmbPropertyEditorConfigCollection, } from '@umbraco-cms/backoffice/property-editor'; -import { UMB_BLOCK_RTE_TYPE } from '../constants.js'; /** * @element umb-property-editor-ui-block-rte-type-configuration diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block/modals/block-catalogue/block-catalogue-modal.token.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block/modals/block-catalogue/block-catalogue-modal.token.ts index f944163ff7ea..2021ae5930c0 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block/modals/block-catalogue/block-catalogue-modal.token.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block/modals/block-catalogue/block-catalogue-modal.token.ts @@ -1,7 +1,7 @@ +import type { UmbBlockWorkspaceData } from '../../workspace/index.js'; import { UmbModalToken } from '@umbraco-cms/backoffice/modal'; import type { UmbBlockTypeGroup, UmbBlockTypeBaseModel } from '@umbraco-cms/backoffice/block-type'; import type { UmbClipboardEntryDetailModel } from '@umbraco-cms/backoffice/clipboard'; -import type { UmbBlockWorkspaceData } from '../../workspace/index.js'; export interface UmbBlockCatalogueModalData { blocks: Array; diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block/workspace/views/edit/block-workspace-view-edit-property.element.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block/workspace/views/edit/block-workspace-view-edit-property.element.ts index f72415898fb8..20ea00482b7d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block/workspace/views/edit/block-workspace-view-edit-property.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block/workspace/views/edit/block-workspace-view-edit-property.element.ts @@ -1,9 +1,9 @@ +import type UmbBlockElementManager from '../../block-element-manager.js'; import { html, customElement, property, state, nothing } from '@umbraco-cms/backoffice/external/lit'; import type { UmbPropertyTypeModel } from '@umbraco-cms/backoffice/content-type'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { UmbDataPathPropertyValueQuery } from '@umbraco-cms/backoffice/validation'; import { UmbVariantId } from '@umbraco-cms/backoffice/variant'; -import type UmbBlockElementManager from '../../block-element-manager.js'; @customElement('umb-block-workspace-view-edit-property') export class UmbBlockWorkspaceViewEditPropertyElement extends UmbLitElement { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/composition/content-type-composition-data-source.interface.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/composition/content-type-composition-data-source.interface.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/composition/content-type-composition-data-source.interface.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/composition/content-type-composition-data-source.interface.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/composition/content-type-composition-repository.interface.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/composition/content-type-composition-repository.interface.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/composition/content-type-composition-repository.interface.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/composition/content-type-composition-repository.interface.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/composition/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/composition/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/composition/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/composition/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/composition/types.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/composition/types.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/composition/types.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/composition/types.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/content/content-type/conditions/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/conditions/manifests.ts new file mode 100644 index 000000000000..0e4865bde973 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/conditions/manifests.ts @@ -0,0 +1,3 @@ +import { manifest as workspaceContentTypeAliasCondition } from './workspace-content-type-alias.condition.js'; + +export const manifests: Array = [workspaceContentTypeAliasCondition]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/content/content-type/conditions/types.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/conditions/types.ts new file mode 100644 index 000000000000..9ad295ee579a --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/conditions/types.ts @@ -0,0 +1,27 @@ +import type { UmbConditionConfigBase } from '@umbraco-cms/backoffice/extension-api'; + +export type UmbWorkspaceContentTypeAliasConditionConfig = + UmbConditionConfigBase<'Umb.Condition.WorkspaceContentTypeAlias'> & { + /** + * Define a content type alias in which workspace this extension should be available + * @example + * Depends on implementation, but i.e. "article", "image", "blockPage" + */ + match?: string; + /** + * Define one or more content type aliases in which workspace this extension should be available + * @example + * ["article", "image", "blockPage"] + */ + oneOf?: Array; + }; +/** + * @deprecated Use `UmbWorkspaceContentTypeAliasConditionConfig` instead. This will be removed in Umbraco 17. + */ +export type WorkspaceContentTypeAliasConditionConfig = UmbWorkspaceContentTypeAliasConditionConfig; + +declare global { + interface UmbExtensionConditionConfigMap { + umbWorkspaceContentTypeAliasConditionConfig: UmbWorkspaceContentTypeAliasConditionConfig; + } +} diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/conditions/workspace-content-type-alias.condition.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/conditions/workspace-content-type-alias.condition.ts similarity index 90% rename from src/Umbraco.Web.UI.Client/src/packages/core/workspace/conditions/workspace-content-type-alias.condition.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/conditions/workspace-content-type-alias.condition.ts index a758373ce232..b21189980d86 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/conditions/workspace-content-type-alias.condition.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/conditions/workspace-content-type-alias.condition.ts @@ -1,8 +1,8 @@ -import { UmbConditionBase } from '../../extension-registry/conditions/condition-base.controller.js'; +import { UMB_PROPERTY_STRUCTURE_WORKSPACE_CONTEXT } from '../contexts/index.js'; import type { UmbWorkspaceContentTypeAliasConditionConfig } from './types.js'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; -import { UMB_PROPERTY_STRUCTURE_WORKSPACE_CONTEXT } from '@umbraco-cms/backoffice/workspace'; import type { UmbConditionControllerArguments, UmbExtensionCondition } from '@umbraco-cms/backoffice/extension-api'; +import { UmbConditionBase } from '@umbraco-cms/backoffice/extension-registry'; const ObserveSymbol = Symbol(); diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/constants.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/constants.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/constants.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/content/content-type/contexts/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/contexts/index.ts new file mode 100644 index 000000000000..c675bcbe1128 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/contexts/index.ts @@ -0,0 +1,2 @@ +export * from './property-structure-workspace.context-token.js'; +export type * from './property-structure-workspace-context.interface.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/contexts/tokens/property-structure-workspace-context.interface.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/contexts/property-structure-workspace-context.interface.ts similarity index 67% rename from src/Umbraco.Web.UI.Client/src/packages/core/workspace/contexts/tokens/property-structure-workspace-context.interface.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/contexts/property-structure-workspace-context.interface.ts index 52ee7e88bf34..1214369c72b6 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/contexts/tokens/property-structure-workspace-context.interface.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/contexts/property-structure-workspace-context.interface.ts @@ -1,10 +1,7 @@ -import type { UmbEntityWorkspaceContext } from './entity-workspace-context.interface.js'; -import type { - UmbContentTypeModel, - UmbContentTypeStructureManager, - UmbPropertyTypeModel, -} from '@umbraco-cms/backoffice/content-type'; +import type { UmbContentTypeModel, UmbPropertyTypeModel } from '../types.js'; +import type { UmbContentTypeStructureManager } from '../structure/index.js'; import type { Observable } from '@umbraco-cms/backoffice/external/rxjs'; +import type { UmbEntityWorkspaceContext } from '@umbraco-cms/backoffice/workspace'; export interface UmbPropertyStructureWorkspaceContext< ContentTypeModel extends UmbContentTypeModel = UmbContentTypeModel, diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/contexts/tokens/property-structure-workspace.context-token.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/contexts/property-structure-workspace.context-token.ts similarity index 85% rename from src/Umbraco.Web.UI.Client/src/packages/core/workspace/contexts/tokens/property-structure-workspace.context-token.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/contexts/property-structure-workspace.context-token.ts index 9e9d3b4ec836..fe7d064de169 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/contexts/tokens/property-structure-workspace.context-token.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/contexts/property-structure-workspace.context-token.ts @@ -1,5 +1,5 @@ -import type { UmbWorkspaceContext } from '../../workspace-context.interface.js'; import type { UmbPropertyStructureWorkspaceContext } from './property-structure-workspace-context.interface.js'; +import type { UmbWorkspaceContext } from '@umbraco-cms/backoffice/workspace'; import { UmbContextToken } from '@umbraco-cms/backoffice/context-api'; export const UMB_PROPERTY_STRUCTURE_WORKSPACE_CONTEXT = new UmbContextToken< diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/global-components/content-type-workspace-editor-header.element.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/global-components/content-type-workspace-editor-header.element.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/global-components/content-type-workspace-editor-header.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/global-components/content-type-workspace-editor-header.element.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/global-components/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/global-components/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/global-components/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/global-components/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/index.ts similarity index 93% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/index.ts index a43707b91ea3..2d487a5e7dab 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/index.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/index.ts @@ -1,4 +1,5 @@ export * from './constants.js'; +export * from './contexts/index.js'; export * from './global-components/index.js'; export * from './repository/index.js'; export * from './structure/index.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/manifests.ts similarity index 66% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/manifests.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/manifests.ts index 824f90f7ad1f..d1e2ee2bab81 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/manifests.ts @@ -1,4 +1,5 @@ -import { manifests as workspaceManifests } from './workspace/manifests.js'; +import { manifests as conditionManifests } from './conditions/manifests.js'; import { manifests as modalManifests } from './modals/manifests.js'; +import { manifests as workspaceManifests } from './workspace/manifests.js'; -export const manifests = [...workspaceManifests, ...modalManifests]; +export const manifests = [...workspaceManifests, ...modalManifests, ...conditionManifests]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/modals/composition-picker/composition-picker-modal.element.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/modals/composition-picker/composition-picker-modal.element.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/modals/composition-picker/composition-picker-modal.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/modals/composition-picker/composition-picker-modal.element.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/modals/composition-picker/composition-picker-modal.token.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/modals/composition-picker/composition-picker-modal.token.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/modals/composition-picker/composition-picker-modal.token.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/modals/composition-picker/composition-picker-modal.token.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/modals/composition-picker/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/modals/composition-picker/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/modals/composition-picker/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/modals/composition-picker/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/modals/composition-picker/manifest.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/modals/composition-picker/manifest.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/modals/composition-picker/manifest.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/modals/composition-picker/manifest.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/modals/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/modals/constants.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/modals/constants.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/modals/constants.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/modals/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/modals/manifests.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/modals/manifests.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/modals/manifests.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/repository/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/repository/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/repository/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/repository/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/repository/structure/content-type-structure-data-source.interface.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/repository/structure/content-type-structure-data-source.interface.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/repository/structure/content-type-structure-data-source.interface.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/repository/structure/content-type-structure-data-source.interface.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/repository/structure/content-type-structure-repository-base.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/repository/structure/content-type-structure-repository-base.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/repository/structure/content-type-structure-repository-base.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/repository/structure/content-type-structure-repository-base.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/repository/structure/content-type-structure-repository.interface.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/repository/structure/content-type-structure-repository.interface.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/repository/structure/content-type-structure-repository.interface.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/repository/structure/content-type-structure-repository.interface.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/repository/structure/content-type-structure-server-data-source-base.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/repository/structure/content-type-structure-server-data-source-base.ts similarity index 93% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/repository/structure/content-type-structure-server-data-source-base.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/repository/structure/content-type-structure-server-data-source-base.ts index 09c7aa336af9..27189474a5cd 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/repository/structure/content-type-structure-server-data-source-base.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/repository/structure/content-type-structure-server-data-source-base.ts @@ -1,9 +1,8 @@ -import type { UmbPagedModel } from '../../../repository/types.js'; import type { UmbContentTypeStructureDataSource } from './content-type-structure-data-source.interface.js'; import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import { tryExecute } from '@umbraco-cms/backoffice/resources'; -import type { UmbDataSourceResponse } from '@umbraco-cms/backoffice/repository'; +import type { UmbPagedModel, UmbDataSourceResponse } from '@umbraco-cms/backoffice/repository'; // Keep this type internal type AllowedContentTypeBaseModel = { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/repository/structure/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/repository/structure/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/repository/structure/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/repository/structure/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-container-structure-helper.class.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/structure/content-type-container-structure-helper.class.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-container-structure-helper.class.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/structure/content-type-container-structure-helper.class.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-move-root-containers-into-first-tab-helper.class.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/structure/content-type-move-root-containers-into-first-tab-helper.class.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-move-root-containers-into-first-tab-helper.class.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/structure/content-type-move-root-containers-into-first-tab-helper.class.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-property-structure-helper.class.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/structure/content-type-property-structure-helper.class.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-property-structure-helper.class.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/structure/content-type-property-structure-helper.class.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-structure-manager.class.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/structure/content-type-structure-manager.class.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-structure-manager.class.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/structure/content-type-structure-manager.class.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/structure/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/structure/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/types.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/types.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/types.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/types.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/constants.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/constants.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/constants.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/content-type-workspace-context-base.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/content-type-workspace-context-base.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/content-type-workspace-context-base.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/content-type-workspace-context-base.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/content-type-workspace-context.interface.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/content-type-workspace-context.interface.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/content-type-workspace-context.interface.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/content-type-workspace-context.interface.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/content-type-workspace.context-token.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/content-type-workspace.context-token.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/content-type-workspace.context-token.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/content-type-workspace.context-token.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/manifests.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/manifests.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/manifests.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/constants.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/constants.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/constants.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor-group.element.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor-group.element.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-properties.element.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor-properties.element.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-properties.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor-properties.element.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-property.context-token.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor-property.context-token.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-property.context-token.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor-property.context-token.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-property.context.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor-property.context.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-property.context.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor-property.context.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-property.element.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor-property.element.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-property.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor-property.element.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-tab.element.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor-tab.element.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-tab.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor-tab.element.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.context-token.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor.context-token.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.context-token.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor.context-token.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.context.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor.context.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.context.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor.context.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.element.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor.element.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor.element.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/manifest.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/manifest.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/manifest.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/manifest.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/constants.ts new file mode 100644 index 000000000000..90f0571264b9 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/constants.ts @@ -0,0 +1 @@ +export * from './workspace-has-content-collection/constants.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/collection/content-collection-workspace-context.interface.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/content-collection-workspace-context.interface.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/collection/content-collection-workspace-context.interface.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/collection/content-collection-workspace-context.interface.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/collection/content-collection-workspace-view.element.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/content-collection-workspace-view.element.ts similarity index 97% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/collection/content-collection-workspace-view.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/collection/content-collection-workspace-view.element.ts index 7a04140ceccf..88b351890daa 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content/collection/content-collection-workspace-view.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/content-collection-workspace-view.element.ts @@ -1,4 +1,3 @@ -import type { UmbCollectionConfiguration } from '../../collection/types.js'; import { UMB_CONTENT_COLLECTION_WORKSPACE_CONTEXT } from './content-collection-workspace.context-token.js'; import { customElement, html, nothing, state } from '@umbraco-cms/backoffice/external/lit'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; @@ -6,6 +5,7 @@ import { UmbDataTypeDetailRepository } from '@umbraco-cms/backoffice/data-type'; import { UmbPropertyEditorConfigCollection } from '@umbraco-cms/backoffice/property-editor'; import type { UmbDataTypeDetailModel } from '@umbraco-cms/backoffice/data-type'; import type { UmbWorkspaceViewElement } from '@umbraco-cms/backoffice/workspace'; +import type { UmbCollectionConfiguration } from '@umbraco-cms/backoffice/collection'; const elementName = 'umb-content-collection-workspace-view'; @customElement('umb-content-collection-workspace-view') diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/collection/content-collection-workspace.context-token.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/content-collection-workspace.context-token.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/collection/content-collection-workspace.context-token.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/collection/content-collection-workspace.context-token.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/collection/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/collection/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/collection/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/collection/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/manifests.ts similarity index 66% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/collection/manifests.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/collection/manifests.ts index 4ab94434f36e..c2a2a34eca39 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content/collection/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/manifests.ts @@ -1,6 +1,7 @@ +import { manifests as workspaceHasContentCollectionManifests } from './workspace-has-content-collection/manifests.js'; import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry'; -export const manifests: Array = [ +export const manifests: Array = [ { type: 'kind', alias: 'Umb.Kind.WorkspaceView.Content.Collection', @@ -18,4 +19,5 @@ export const manifests: Array = [ }, }, }, + ...workspaceHasContentCollectionManifests, ]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/collection/types.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/types.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/collection/types.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/collection/types.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/workspace-has-content-collection/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/workspace-has-content-collection/constants.ts new file mode 100644 index 000000000000..bfd16e700e71 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/workspace-has-content-collection/constants.ts @@ -0,0 +1,4 @@ +/** + * Workspace has content collection condition alias + */ +export const UMB_WORKSPACE_HAS_CONTENT_COLLECTION_CONDITION_ALIAS = 'Umb.Condition.WorkspaceHasContentCollection'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/workspace-has-content-collection/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/workspace-has-content-collection/manifests.ts new file mode 100644 index 000000000000..fa1ea2ce3a65 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/workspace-has-content-collection/manifests.ts @@ -0,0 +1,10 @@ +import { UMB_WORKSPACE_HAS_CONTENT_COLLECTION_CONDITION_ALIAS } from './constants.js'; + +export const manifests: Array = [ + { + type: 'condition', + name: 'Workspace Has Collection Condition', + alias: UMB_WORKSPACE_HAS_CONTENT_COLLECTION_CONDITION_ALIAS, + api: () => import('./workspace-has-content-collection.condition.js'), + }, +]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/workspace-has-content-collection/types.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/workspace-has-content-collection/types.ts new file mode 100644 index 000000000000..5497acc11346 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/workspace-has-content-collection/types.ts @@ -0,0 +1,16 @@ +import type { UMB_WORKSPACE_HAS_CONTENT_COLLECTION_CONDITION_ALIAS } from './constants.js'; +import type { UmbConditionConfigBase } from '@umbraco-cms/backoffice/extension-api'; + +export type UmbWorkspaceHasContentCollectionConditionConfig = UmbConditionConfigBase< + typeof UMB_WORKSPACE_HAS_CONTENT_COLLECTION_CONDITION_ALIAS +>; +/** + * @deprecated Use `UmbWorkspaceHasContentCollectionConditionConfig` instead. This will be removed in Umbraco 17. + */ +export type WorkspaceHasCollectionConditionConfig = UmbWorkspaceHasContentCollectionConditionConfig; + +declare global { + interface UmbExtensionConditionConfigMap { + umbWorkspaceHasContentCollection: UmbWorkspaceHasContentCollectionConditionConfig; + } +} diff --git a/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/workspace-has-content-collection/workspace-has-content-collection.condition.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/workspace-has-content-collection/workspace-has-content-collection.condition.ts new file mode 100644 index 000000000000..579df46456ae --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content/collection/workspace-has-content-collection/workspace-has-content-collection.condition.ts @@ -0,0 +1,31 @@ +import { UMB_CONTENT_COLLECTION_WORKSPACE_CONTEXT } from '../content-collection-workspace.context-token.js'; +import type { UmbWorkspaceHasContentCollectionConditionConfig } from './types.js'; +import { UmbConditionBase } from '@umbraco-cms/backoffice/extension-registry'; +import type { UmbConditionControllerArguments, UmbExtensionCondition } from '@umbraco-cms/backoffice/extension-api'; +import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; + +const ObserveSymbol = Symbol(); + +export class UmbWorkspaceHasContentCollectionCondition + extends UmbConditionBase + implements UmbExtensionCondition +{ + constructor( + host: UmbControllerHost, + args: UmbConditionControllerArguments, + ) { + super(host, args); + + this.consumeContext(UMB_CONTENT_COLLECTION_WORKSPACE_CONTEXT, (context) => { + this.observe( + context.contentTypeHasCollection, + (hasCollection) => { + this.permitted = hasCollection; + }, + ObserveSymbol, + ); + }); + } +} + +export { UmbWorkspaceHasContentCollectionCondition as api }; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/components/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/components/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/components/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/components/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/components/property-type-based-property/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/components/property-type-based-property/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/components/property-type-based-property/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/components/property-type-based-property/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/components/property-type-based-property/property-type-based-property.element.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/components/property-type-based-property/property-type-based-property.element.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/components/property-type-based-property/property-type-based-property.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/components/property-type-based-property/property-type-based-property.element.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/conditions/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/conditions/constants.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/conditions/constants.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/conditions/constants.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/conditions/has-properties/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/conditions/has-properties/constants.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/conditions/has-properties/constants.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/conditions/has-properties/constants.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/conditions/has-properties/content-has-properties.condition.manifest.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/conditions/has-properties/content-has-properties.condition.manifest.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/conditions/has-properties/content-has-properties.condition.manifest.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/conditions/has-properties/content-has-properties.condition.manifest.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/conditions/has-properties/content-has-properties.condition.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/conditions/has-properties/content-has-properties.condition.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/conditions/has-properties/content-has-properties.condition.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/conditions/has-properties/content-has-properties.condition.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/conditions/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/conditions/manifests.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/conditions/manifests.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/conditions/manifests.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/constants.ts similarity index 77% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/constants.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/constants.ts index 806e9e81d847..888a91de6afc 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content/constants.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content/constants.ts @@ -1,3 +1,4 @@ export const UMB_CONTENT_SECTION_ALIAS = 'Umb.Section.Content'; export * from './workspace/constants.js'; export * from './conditions/constants.js'; +export * from './collection/constants.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/content-property.context-token.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/content-property.context-token.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/content-property.context-token.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/content-property.context-token.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/content-property.context.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/content-property.context.ts similarity index 89% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/content-property.context.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/content-property.context.ts index 1b7343c66024..caefd7669024 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content/content-property.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content/content-property.context.ts @@ -1,8 +1,8 @@ -import type { UmbPropertyTypeModel } from '../content-type/types.js'; import { UMB_CONTENT_PROPERTY_CONTEXT } from './content-property.context-token.js'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import { UmbContextBase } from '@umbraco-cms/backoffice/class-api'; import { UmbObjectState } from '@umbraco-cms/backoffice/observable-api'; +import type { UmbPropertyTypeModel } from '@umbraco-cms/backoffice/content-type'; export class UmbContentPropertyContext extends UmbContextBase { #dataType = new UmbObjectState(undefined); diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/controller/merge-content-variant-data.controller.test.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/controller/merge-content-variant-data.controller.test.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/controller/merge-content-variant-data.controller.test.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/controller/merge-content-variant-data.controller.test.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/controller/merge-content-variant-data.controller.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/controller/merge-content-variant-data.controller.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/controller/merge-content-variant-data.controller.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/controller/merge-content-variant-data.controller.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/manager/content-data-manager.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/manager/content-data-manager.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/manager/content-data-manager.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/manager/content-data-manager.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/manager/element-data-manager.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/manager/element-data-manager.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/manager/element-data-manager.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/manager/element-data-manager.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/manager/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/manager/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/manager/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/manager/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/manifests.ts similarity index 66% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/manifests.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/manifests.ts index deb147c1de84..2636fe20b972 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content/manifests.ts @@ -1,4 +1,5 @@ import { manifests as workspaceManifests } from './workspace/manifests.js'; import { manifests as conditionManifests } from './conditions/manifests.js'; +import { manifests as collectionManifests } from './collection/manifests.js'; -export const manifests = [...workspaceManifests, ...conditionManifests]; +export const manifests = [...workspaceManifests, ...conditionManifests, ...collectionManifests]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/property-dataset-context/content-property-dataset.context-token.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/property-dataset-context/content-property-dataset.context-token.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/property-dataset-context/content-property-dataset.context-token.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/property-dataset-context/content-property-dataset.context-token.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/property-dataset-context/content-property-dataset.context.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/property-dataset-context/content-property-dataset.context.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/property-dataset-context/content-property-dataset.context.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/property-dataset-context/content-property-dataset.context.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/property-dataset-context/element-property-data-owner.interface.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/property-dataset-context/element-property-data-owner.interface.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/property-dataset-context/element-property-data-owner.interface.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/property-dataset-context/element-property-data-owner.interface.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/property-dataset-context/element-property-dataset.context.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/property-dataset-context/element-property-dataset.context.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/property-dataset-context/element-property-dataset.context.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/property-dataset-context/element-property-dataset.context.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/property-dataset-context/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/property-dataset-context/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/property-dataset-context/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/property-dataset-context/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/repository/content-validation-repository.interface.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/repository/content-validation-repository.interface.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/repository/content-validation-repository.interface.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/repository/content-validation-repository.interface.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/repository/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/repository/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/repository/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/repository/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/types.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/types.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/types.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/types.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/variant-picker/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/variant-picker/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/variant-picker/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/variant-picker/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/variant-picker/types.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/variant-picker/types.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/variant-picker/types.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/variant-picker/types.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/constants.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/constants.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/constants.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/content-detail-validation-path-translator.test.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-detail-validation-path-translator.test.ts similarity index 96% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/content-detail-validation-path-translator.test.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-detail-validation-path-translator.test.ts index f2df7ff95b28..51614196fdc5 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/content-detail-validation-path-translator.test.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-detail-validation-path-translator.test.ts @@ -7,7 +7,7 @@ import { UmbValidationPathTranslationController, } from '@umbraco-cms/backoffice/validation'; import type { UmbDocumentDetailModel } from '@umbraco-cms/backoffice/document'; -import type { UmbValidationMessage } from '../../validation/context/validation-messages.manager'; +import type { UmbValidationMessage } from '../../../core/validation/context/validation-messages.manager.js'; @customElement('umb-test-controller-host') export class UmbTestControllerHostElement extends UmbControllerHostElementMixin(HTMLElement) {} diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/content-detail-validation-path-translator.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-detail-validation-path-translator.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/content-detail-validation-path-translator.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-detail-validation-path-translator.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/content-detail-workspace-base.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-detail-workspace-base.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/content-detail-workspace-base.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-detail-workspace-base.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/content-workspace-context.interface.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-workspace-context.interface.ts similarity index 85% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/content-workspace-context.interface.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-workspace-context.interface.ts index 2dbad190cfe2..073ef20862be 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/content-workspace-context.interface.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-workspace-context.interface.ts @@ -1,13 +1,9 @@ import type { UmbContentDetailModel } from '../types.js'; import type { UmbElementPropertyDataOwner } from '../property-dataset-context/index.js'; -import type { UmbContentTypeModel } from '@umbraco-cms/backoffice/content-type'; +import type { UmbContentTypeModel, UmbPropertyStructureWorkspaceContext } from '@umbraco-cms/backoffice/content-type'; import type { Observable } from '@umbraco-cms/backoffice/external/rxjs'; import type { UmbVariantId, UmbEntityVariantModel } from '@umbraco-cms/backoffice/variant'; -import type { - UmbPropertyStructureWorkspaceContext, - UmbRoutableWorkspaceContext, - UmbVariantDatasetWorkspaceContext, -} from '@umbraco-cms/backoffice/workspace'; +import type { UmbRoutableWorkspaceContext, UmbVariantDatasetWorkspaceContext } from '@umbraco-cms/backoffice/workspace'; import type { UmbVariantPropertyGuardManager } from '@umbraco-cms/backoffice/property'; export interface UmbContentWorkspaceContext< diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/content-workspace.context-token.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-workspace.context-token.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/content-workspace.context-token.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-workspace.context-token.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/manifests.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/manifests.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/manifests.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/views/edit/content-editor-properties.element.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/views/edit/content-editor-properties.element.ts similarity index 97% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/views/edit/content-editor-properties.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/views/edit/content-editor-properties.element.ts index 257973f19bc5..acf627ffadce 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/views/edit/content-editor-properties.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/views/edit/content-editor-properties.element.ts @@ -1,3 +1,4 @@ +import { UMB_CONTENT_WORKSPACE_CONTEXT } from '../../content-workspace.context-token.js'; import { css, html, customElement, property, state, repeat, nothing } from '@umbraco-cms/backoffice/external/lit'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; import type { @@ -9,8 +10,8 @@ import { UmbContentTypePropertyStructureHelper } from '@umbraco-cms/backoffice/c import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { UmbVariantId } from '@umbraco-cms/backoffice/variant'; import { UMB_PROPERTY_DATASET_CONTEXT } from '@umbraco-cms/backoffice/property'; + import './content-editor-property.element.js'; -import { UMB_CONTENT_WORKSPACE_CONTEXT } from '@umbraco-cms/backoffice/content'; @customElement('umb-content-workspace-view-edit-properties') export class UmbContentWorkspaceViewEditPropertiesElement extends UmbLitElement { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/views/edit/content-editor-property.element.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/views/edit/content-editor-property.element.ts similarity index 96% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/views/edit/content-editor-property.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/views/edit/content-editor-property.element.ts index 262f07659a3d..b7f3396900d4 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/views/edit/content-editor-property.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/views/edit/content-editor-property.element.ts @@ -1,9 +1,9 @@ +import { UMB_CONTENT_WORKSPACE_CONTEXT } from '../../content-workspace.context-token.js'; import { html, customElement, property, state, nothing } from '@umbraco-cms/backoffice/external/lit'; import type { UmbPropertyTypeModel } from '@umbraco-cms/backoffice/content-type'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { UmbDataPathPropertyValueQuery } from '@umbraco-cms/backoffice/validation'; import { UmbVariantId } from '@umbraco-cms/backoffice/variant'; -import { UMB_CONTENT_WORKSPACE_CONTEXT } from '@umbraco-cms/backoffice/content'; @customElement('umb-content-workspace-view-edit-property') export class UmbContentWorkspaceViewEditPropertyElement extends UmbLitElement { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/views/edit/content-editor-tab.element.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/views/edit/content-editor-tab.element.ts similarity index 93% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/views/edit/content-editor-tab.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/views/edit/content-editor-tab.element.ts index f21d9eef47a5..91850508d5ef 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/views/edit/content-editor-tab.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/views/edit/content-editor-tab.element.ts @@ -5,9 +5,11 @@ import type { UmbContentTypeStructureManager, UmbPropertyTypeContainerModel, } from '@umbraco-cms/backoffice/content-type'; -import { UmbContentTypeContainerStructureHelper } from '@umbraco-cms/backoffice/content-type'; +import { + UmbContentTypeContainerStructureHelper, + UMB_PROPERTY_STRUCTURE_WORKSPACE_CONTEXT, +} from '@umbraco-cms/backoffice/content-type'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; -import { UMB_PROPERTY_STRUCTURE_WORKSPACE_CONTEXT } from '@umbraco-cms/backoffice/workspace'; import './content-editor-properties.element.js'; @customElement('umb-content-workspace-view-edit-tab') diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/views/edit/content-editor.element.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/views/edit/content-editor.element.ts similarity index 96% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/views/edit/content-editor.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/views/edit/content-editor.element.ts index a347df2e4f5f..f24cd448f310 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/views/edit/content-editor.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/views/edit/content-editor.element.ts @@ -6,12 +6,14 @@ import type { UmbContentTypeStructureManager, UmbPropertyTypeContainerModel, } from '@umbraco-cms/backoffice/content-type'; -import { UmbContentTypeContainerStructureHelper } from '@umbraco-cms/backoffice/content-type'; +import { + UmbContentTypeContainerStructureHelper, + UMB_PROPERTY_STRUCTURE_WORKSPACE_CONTEXT, +} from '@umbraco-cms/backoffice/content-type'; import type { UmbRoute, UmbRouterSlotChangeEvent, UmbRouterSlotInitEvent } from '@umbraco-cms/backoffice/router'; import { encodeFolderName } from '@umbraco-cms/backoffice/router'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import type { UmbWorkspaceViewElement } from '@umbraco-cms/backoffice/workspace'; -import { UMB_PROPERTY_STRUCTURE_WORKSPACE_CONTEXT } from '@umbraco-cms/backoffice/workspace'; import './content-editor-tab.element.js'; @customElement('umb-content-workspace-view-edit') diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/views/edit/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/views/edit/manifests.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/content/workspace/views/edit/manifests.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/views/edit/manifests.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/content/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/content/manifests.ts new file mode 100644 index 000000000000..efcf8a73cc84 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/content/manifests.ts @@ -0,0 +1,10 @@ +import { manifests as contentManifests } from './content/manifests.js'; +import { manifests as contentTypeManifests } from './content-type/manifests.js'; +import { manifests as propertyTypeManifests } from './property-type/manifests.js'; +import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry'; + +export const manifests: Array = [ + ...contentManifests, + ...contentTypeManifests, + ...propertyTypeManifests, +]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/content/package.json b/src/Umbraco.Web.UI.Client/src/packages/content/package.json new file mode 100644 index 000000000000..aabed0deeba0 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/content/package.json @@ -0,0 +1,8 @@ +{ + "name": "@umbraco-backoffice/content", + "private": true, + "type": "module", + "scripts": { + "build": "vite build" + } +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-type/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/content/property-type/constants.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/property-type/constants.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/property-type/constants.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-type/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/property-type/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/property-type/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/property-type/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-type/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/content/property-type/manifests.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/property-type/manifests.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/property-type/manifests.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-type/types.ts b/src/Umbraco.Web.UI.Client/src/packages/content/property-type/types.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/property-type/types.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/property-type/types.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-type/utils/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/property-type/utils/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/property-type/utils/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/property-type/utils/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/content/property-type/workspace/constants.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/constants.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/property-type/workspace/constants.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/index.ts b/src/Umbraco.Web.UI.Client/src/packages/content/property-type/workspace/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/property-type/workspace/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/content/property-type/workspace/manifests.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/manifests.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/property-type/workspace/manifests.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/paths.ts b/src/Umbraco.Web.UI.Client/src/packages/content/property-type/workspace/paths.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/paths.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/property-type/workspace/paths.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/property-type-workspace-editor.element.ts b/src/Umbraco.Web.UI.Client/src/packages/content/property-type/workspace/property-type-workspace-editor.element.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/property-type-workspace-editor.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/property-type/workspace/property-type-workspace-editor.element.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/property-type-workspace.context-token.ts b/src/Umbraco.Web.UI.Client/src/packages/content/property-type/workspace/property-type-workspace.context-token.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/property-type-workspace.context-token.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/property-type/workspace/property-type-workspace.context-token.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/property-type-workspace.context.ts b/src/Umbraco.Web.UI.Client/src/packages/content/property-type/workspace/property-type-workspace.context.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/property-type-workspace.context.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/property-type/workspace/property-type-workspace.context.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/property-type-workspace.modal-token.ts b/src/Umbraco.Web.UI.Client/src/packages/content/property-type/workspace/property-type-workspace.modal-token.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/property-type-workspace.modal-token.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/property-type/workspace/property-type-workspace.modal-token.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/views/settings/property-workspace-view-settings.element.ts b/src/Umbraco.Web.UI.Client/src/packages/content/property-type/workspace/views/settings/property-workspace-view-settings.element.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/views/settings/property-workspace-view-settings.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/content/property-type/workspace/views/settings/property-workspace-view-settings.element.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/content/umbraco-package.ts b/src/Umbraco.Web.UI.Client/src/packages/content/umbraco-package.ts new file mode 100644 index 000000000000..80bf0e9c35e3 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/content/umbraco-package.ts @@ -0,0 +1,9 @@ +export const name = 'Umbraco.Content'; +export const extensions = [ + { + name: 'Content Bundle', + alias: 'Umb.Bundle.Content', + type: 'bundle', + js: () => import('./manifests.js'), + }, +]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/content/vite.config.ts b/src/Umbraco.Web.UI.Client/src/packages/content/vite.config.ts new file mode 100644 index 000000000000..4b3820d646a8 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/content/vite.config.ts @@ -0,0 +1,21 @@ +import { defineConfig } from 'vite'; +import { rmSync } from 'fs'; +import { getDefaultConfig } from '../../vite-config-base'; + +const dist = '../../../dist-cms/packages/content'; + +// delete the unbundled dist folder +rmSync(dist, { recursive: true, force: true }); + +export default defineConfig({ + ...getDefaultConfig({ + dist, + entry: { + 'content-type/index': './content-type/index.ts', + 'content/index': './content/index.ts', + 'property-type/index': './property-type/index.ts', + 'umbraco-package': 'umbraco-package.ts', + manifests: 'manifests.ts', + }, + }), +}); diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/collection/action/collection-action-button.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/collection/action/collection-action-button.element.ts index 08ae65ccf3e2..5cd622a789e4 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/collection/action/collection-action-button.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/collection/action/collection-action-button.element.ts @@ -1,10 +1,10 @@ +import type { ManifestCollectionAction } from '../extensions/types.js'; import type { UmbCollectionAction } from './collection-action-base.js'; import { UmbActionExecutedEvent } from '@umbraco-cms/backoffice/event'; import { html, customElement, property, state } from '@umbraco-cms/backoffice/external/lit'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { createExtensionApi } from '@umbraco-cms/backoffice/extension-api'; import type { UUIButtonState } from '@umbraco-cms/backoffice/external/uui'; -import type { ManifestCollectionAction } from '../extensions/types.js'; @customElement('umb-collection-action-button') export class UmbCollectionActionButtonElement extends UmbLitElement { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/entity-action.extension.ts b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/entity-action.extension.ts index 1e0ad5e13792..3ecf0c9128d0 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/entity-action.extension.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/entity-action.extension.ts @@ -1,6 +1,6 @@ -import type { ManifestElementAndApi, ManifestWithDynamicConditions } from '@umbraco-cms/backoffice/extension-api'; import type { UmbEntityActionElement } from './entity-action-element.interface.js'; import type { UmbEntityAction } from './entity-action.interface.js'; +import type { ManifestElementAndApi, ManifestWithDynamicConditions } from '@umbraco-cms/backoffice/extension-api'; /** * An action to perform on an entity diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/common/duplicate-to/duplicate-to.action.ts b/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/common/duplicate-to/duplicate-to.action.ts index bbd9b58bcbc2..f7a9cb42e355 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/common/duplicate-to/duplicate-to.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/common/duplicate-to/duplicate-to.action.ts @@ -1,3 +1,4 @@ +import { UmbEntityBulkActionBase } from '../../entity-bulk-action-base.js'; import type { UmbBulkDuplicateToRepository } from './duplicate-to-repository.interface.js'; import { createExtensionApiByAlias } from '@umbraco-cms/backoffice/extension-registry'; import { @@ -9,7 +10,6 @@ import { UMB_ENTITY_CONTEXT } from '@umbraco-cms/backoffice/entity'; import { umbOpenModal } from '@umbraco-cms/backoffice/modal'; import { UMB_TREE_PICKER_MODAL } from '@umbraco-cms/backoffice/tree'; import type { MetaEntityBulkActionDuplicateToKind } from '@umbraco-cms/backoffice/extension-registry'; -import { UmbEntityBulkActionBase } from '../../entity-bulk-action-base.js'; export class UmbMediaDuplicateEntityBulkAction extends UmbEntityBulkActionBase { async execute() { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/common/move-to/move-to.action.ts b/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/common/move-to/move-to.action.ts index 9ae178952995..29012e65b151 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/common/move-to/move-to.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/common/move-to/move-to.action.ts @@ -1,3 +1,4 @@ +import { UmbEntityBulkActionBase } from '../../entity-bulk-action-base.js'; import type { UmbBulkMoveToRepository } from './move-to-repository.interface.js'; import { createExtensionApiByAlias } from '@umbraco-cms/backoffice/extension-registry'; import { @@ -9,7 +10,6 @@ import { UMB_ENTITY_CONTEXT } from '@umbraco-cms/backoffice/entity'; import { umbOpenModal } from '@umbraco-cms/backoffice/modal'; import { UMB_TREE_PICKER_MODAL } from '@umbraco-cms/backoffice/tree'; import type { MetaEntityBulkActionMoveToKind } from '@umbraco-cms/backoffice/extension-registry'; -import { UmbEntityBulkActionBase } from '../../entity-bulk-action-base.js'; export class UmbMediaMoveEntityBulkAction extends UmbEntityBulkActionBase { async execute() { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/common/trash/trash.action.ts b/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/common/trash/trash.action.ts index 169ebc78c4c6..d85a23b8fea1 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/common/trash/trash.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/common/trash/trash.action.ts @@ -1,3 +1,5 @@ +import { UmbEntityBulkActionBase } from '../../entity-bulk-action-base.js'; +import type { UmbEntityBulkActionArgs } from '../../types.js'; import type { UmbBulkTrashRepository } from './trash-repository.interface.js'; import { createExtensionApiByAlias } from '@umbraco-cms/backoffice/extension-registry'; import { @@ -10,8 +12,6 @@ import { umbConfirmModal } from '@umbraco-cms/backoffice/modal'; import type { MetaEntityBulkActionTrashKind } from '@umbraco-cms/backoffice/extension-registry'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import { UmbDeprecation } from '@umbraco-cms/backoffice/utils'; -import { UmbEntityBulkActionBase } from '../../entity-bulk-action-base.js'; -import type { UmbEntityBulkActionArgs } from '../../types.js'; /** * @deprecated since v15.3.0. Will be removed in v17.0.0. import `UmbMediaTrashEntityBulkAction` from @umbraco-cms/backoffice/recycle-bin instead. diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/entity/contexts/ancestors/ancestors.entity-context.ts b/src/Umbraco.Web.UI.Client/src/packages/core/entity/contexts/ancestors/ancestors.entity-context.ts index e888a6496de2..5cbd6a8cedda 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/entity/contexts/ancestors/ancestors.entity-context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/entity/contexts/ancestors/ancestors.entity-context.ts @@ -1,8 +1,8 @@ +import type { UmbEntityModel } from '../../types.js'; import { UMB_ANCESTORS_ENTITY_CONTEXT } from './ancestors.entity-context-token.js'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import { UmbContextBase } from '@umbraco-cms/backoffice/class-api'; import { UmbArrayState } from '@umbraco-cms/backoffice/observable-api'; -import type { UmbEntityModel } from '../../types.js'; /** * A entity context for the ancestors diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/extensions/icons.extension.ts b/src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/extensions/icons.extension.ts index bd3f9b9f9f7f..c67278425ddc 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/extensions/icons.extension.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/extensions/icons.extension.ts @@ -1,5 +1,5 @@ -import type { ManifestPlainJs } from '@umbraco-cms/backoffice/extension-api'; import type { UmbIconDictionary } from '../types.js'; +import type { ManifestPlainJs } from '@umbraco-cms/backoffice/extension-api'; export interface ManifestIcons extends ManifestPlainJs<{ default: UmbIconDictionary }> { type: 'icons'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/icon-picker-modal/icon-picker-modal.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/icon-picker-modal/icon-picker-modal.element.ts index ece11d0ff9b8..a1f75b3f7295 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/icon-picker-modal/icon-picker-modal.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/icon-picker-modal/icon-picker-modal.element.ts @@ -1,3 +1,5 @@ +import type { UmbIconDefinition } from '../types.js'; +import { UMB_ICON_REGISTRY_CONTEXT } from '../icon-registry.context-token.js'; import type { UmbIconPickerModalData, UmbIconPickerModalValue } from './icon-picker-modal.token.js'; import { css, customElement, html, nothing, query, repeat, state } from '@umbraco-cms/backoffice/external/lit'; import { extractUmbColorVariable, umbracoColors } from '@umbraco-cms/backoffice/resources'; @@ -5,8 +7,6 @@ import { umbFocus } from '@umbraco-cms/backoffice/lit-element'; import { UmbModalBaseElement } from '@umbraco-cms/backoffice/modal'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; import type { UUIColorSwatchesEvent } from '@umbraco-cms/backoffice/external/uui'; -import type { UmbIconDefinition } from '../types.js'; -import { UMB_ICON_REGISTRY_CONTEXT } from '../icon-registry.context-token.js'; @customElement('umb-icon-picker-modal') export class UmbIconPickerModalElement extends UmbModalBaseElement { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/core/manifests.ts index 60f4a53b2852..2d382b768a7b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/manifests.ts @@ -1,7 +1,5 @@ import { manifests as authManifests } from './auth/manifests.js'; import { manifests as collectionManifests } from './collection/manifests.js'; -import { manifests as contentManifests } from './content/manifests.js'; -import { manifests as contentTypeManifests } from './content-type/manifests.js'; import { manifests as cultureManifests } from './culture/manifests.js'; import { manifests as debugManifests } from './debug/manifests.js'; import { manifests as entityActionManifests } from './entity-action/manifests.js'; @@ -15,7 +13,6 @@ import { manifests as pickerManifests } from './picker/manifests.js'; import { manifests as propertyActionManifests } from './property-action/manifests.js'; import { manifests as propertyEditorManifests } from './property-editor/manifests.js'; import { manifests as propertyManifests } from './property/manifests.js'; -import { manifests as propertyTypeManifests } from './property-type/manifests.js'; import { manifests as recycleBinManifests } from './recycle-bin/manifests.js'; import { manifests as sectionManifests } from './section/manifests.js'; import { manifests as serverFileSystemManifests } from './server-file-system/manifests.js'; @@ -29,8 +26,6 @@ import type { UmbExtensionManifestKind } from './extension-registry/index.js'; export const manifests: Array = [ ...authManifests, ...collectionManifests, - ...contentManifests, - ...contentTypeManifests, ...cultureManifests, ...debugManifests, ...entityActionManifests, @@ -44,7 +39,6 @@ export const manifests: Array = ...propertyActionManifests, ...propertyEditorManifests, ...propertyManifests, - ...propertyTypeManifests, ...recycleBinManifests, ...sectionManifests, ...serverFileSystemManifests, diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/modal/common/confirm/confirm-modal.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/modal/common/confirm/confirm-modal.element.ts index a355d07c13e4..6a5e5b06968a 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/modal/common/confirm/confirm-modal.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/modal/common/confirm/confirm-modal.element.ts @@ -1,8 +1,8 @@ +import type { UmbModalContext } from '../../context/index.js'; +import type { UmbConfirmModalData, UmbConfirmModalValue } from './confirm-modal.token.js'; import { html, customElement, property, css, unsafeHTML } from '@umbraco-cms/backoffice/external/lit'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; import { UmbLitElement, umbFocus } from '@umbraco-cms/backoffice/lit-element'; -import type { UmbModalContext } from '../../context/index.js'; -import type { UmbConfirmModalData, UmbConfirmModalValue } from './confirm-modal.token.js'; @customElement('umb-confirm-modal') export class UmbConfirmModalElement extends UmbLitElement { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/modal/common/item-picker/item-picker-modal.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/modal/common/item-picker/item-picker-modal.element.ts index 38b1288d9068..e4aafaf0238d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/modal/common/item-picker/item-picker-modal.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/modal/common/item-picker/item-picker-modal.element.ts @@ -1,3 +1,5 @@ +import { UmbModalBaseElement } from '../../component/modal-base.element.js'; +import type { UmbItemPickerModalData, UmbItemPickerModel } from './item-picker-modal.token.js'; import { css, html, @@ -10,8 +12,6 @@ import { } from '@umbraco-cms/backoffice/external/lit'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; import { umbFocus } from '@umbraco-cms/backoffice/lit-element'; -import { UmbModalBaseElement } from '../../component/modal-base.element.js'; -import type { UmbItemPickerModalData, UmbItemPickerModel } from './item-picker-modal.token.js'; @customElement('umb-item-picker-modal') export class UmbItemPickerModalElement extends UmbModalBaseElement { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/modal/component/modal-base.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/modal/component/modal-base.element.ts index 3e8c3acaad09..e596f799dfc2 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/modal/component/modal-base.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/modal/component/modal-base.element.ts @@ -1,7 +1,7 @@ import type { UmbModalRejectReason, UmbModalContext } from '../context/index.js'; +import type { ManifestModal, UmbModalExtensionElement } from '../extensions/types.js'; import { property } from '@umbraco-cms/backoffice/external/lit'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; -import type { ManifestModal, UmbModalExtensionElement } from '../extensions/types.js'; export abstract class UmbModalBaseElement< ModalDataType extends object = object, diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/modal/component/modal.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/modal/component/modal.element.ts index 6084b6e5bd92..8f130957cef2 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/modal/component/modal.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/modal/component/modal.element.ts @@ -1,5 +1,6 @@ import type { UmbModalContext } from '../context/modal.context.js'; import { UMB_MODAL_CONTEXT } from '../context/modal.context-token.js'; +import type { ManifestModal } from '../extensions/types.js'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; @@ -22,7 +23,6 @@ import { UmbContextBoundary, UmbContextProvider, } from '@umbraco-cms/backoffice/context-api'; -import type { ManifestModal } from '../extensions/types.js'; @customElement('umb-modal') export class UmbModalElement extends UmbLitElement { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/notification/layouts/default/notification-layout-default.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/notification/layouts/default/notification-layout-default.element.ts index 81ed462b2e62..1fe83a515505 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/notification/layouts/default/notification-layout-default.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/notification/layouts/default/notification-layout-default.element.ts @@ -1,3 +1,5 @@ +import type { UmbNotificationDefaultData } from '../../types.js'; +import type { UmbNotificationHandler } from '../../notification-handler.js'; import { html, LitElement, @@ -8,8 +10,6 @@ import { css, } from '@umbraco-cms/backoffice/external/lit'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; -import type { UmbNotificationDefaultData } from '../../types.js'; -import type { UmbNotificationHandler } from '../../notification-handler.js'; export type { UmbNotificationDefaultData }; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/notification/stories/story-notification-default-example.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/notification/stories/story-notification-default-example.element.ts index 9d57bda1ce4b..3dbbcfb05f0b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/notification/stories/story-notification-default-example.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/notification/stories/story-notification-default-example.element.ts @@ -1,7 +1,7 @@ -import { html, customElement } from '@umbraco-cms/backoffice/external/lit'; -import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { UMB_NOTIFICATION_CONTEXT, type UmbNotificationContext } from '../notification.context.js'; import type { UmbNotificationColor, UmbNotificationOptions } from '../types.js'; +import { html, customElement } from '@umbraco-cms/backoffice/external/lit'; +import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; @customElement('umb-story-notification-default-example') export class UmbStoryNotificationDefaultExampleElement extends UmbLitElement { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property/property-guard-manager/property-guard.manager.ts b/src/Umbraco.Web.UI.Client/src/packages/core/property/property-guard-manager/property-guard.manager.ts index e1a10673caf8..7fa38e663871 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/property/property-guard-manager/property-guard.manager.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/property/property-guard-manager/property-guard.manager.ts @@ -1,4 +1,4 @@ -import { type Observable } from '@umbraco-cms/backoffice/observable-api'; +import type { Observable } from '@umbraco-cms/backoffice/observable-api'; import type { UmbReferenceByUnique } from '@umbraco-cms/backoffice/models'; import { UmbGuardManagerBase, type UmbGuardRule } from '@umbraco-cms/backoffice/utils'; @@ -6,6 +6,11 @@ export interface UmbPropertyGuardRule extends UmbGuardRule { propertyType?: UmbReferenceByUnique; } +/** + * + * @param rule + * @param propertyType + */ function findRule(rule: UmbPropertyGuardRule, propertyType: UmbReferenceByUnique) { return rule.propertyType?.unique === propertyType.unique || rule.propertyType === undefined; } @@ -14,13 +19,13 @@ function findRule(rule: UmbPropertyGuardRule, propertyType: UmbReferenceByUnique * @description - A Guard to manage property rules. * @export * @class UmbPropertyGuardManager - * @extends {UmbGuardManagerBase} + * @augments {UmbGuardManagerBase} */ export class UmbPropertyGuardManager extends UmbGuardManagerBase { /** * Checks if the property is permitted for the given property type * @param {UmbReferenceByUnique} propertyType - * @return {Observable} - Observable that emits true if the property is permitted + * @returns {Observable} - Observable that emits true if the property is permitted * @memberof UmbPropertyGuardManager */ isPermittedForProperty(propertyType: UmbReferenceByUnique): Observable { @@ -30,7 +35,7 @@ export class UmbPropertyGuardManager extends UmbGuardManagerBase} + * @augments {UmbGuardManagerBase} */ export class UmbVariantPropertyGuardManager extends UmbGuardManagerBase { /** * Checks if the variant and propertyType is permitted. * @param {UmbVariantId} variantId - The variant id to check. * @param {UmbReferenceByUnique} propertyType - The property type to check. - * @return {Observable} - Returns an observable that emits true if the variant and propertyType is permitted, false otherwise. + * @returns {Observable} - Returns an observable that emits true if the variant and propertyType is permitted, false otherwise. * @memberof UmbVariantPropertyGuardManager */ isPermittedForVariantAndProperty(variantId: UmbVariantId, propertyType: UmbReferenceByUnique): Observable { @@ -39,7 +45,7 @@ export class UmbVariantPropertyGuardManager extends UmbGuardManagerBase): notifications is Array { return notifications.every(objectIsUmbNotification); } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/router/generate-route-path-builder.function.ts b/src/Umbraco.Web.UI.Client/src/packages/core/router/generate-route-path-builder.function.ts index 440b23e3e873..d14780544cd8 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/router/generate-route-path-builder.function.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/router/generate-route-path-builder.function.ts @@ -1,5 +1,5 @@ -import { umbUrlPatternToString, type UrlParametersRecord } from '@umbraco-cms/backoffice/utils'; import { stripSlash } from './router-slot/util.js'; +import { umbUrlPatternToString, type UrlParametersRecord } from '@umbraco-cms/backoffice/utils'; /** * diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/router/route/route.interface.ts b/src/Umbraco.Web.UI.Client/src/packages/core/router/route/route.interface.ts index 08bceefe62c3..b46571cdee76 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/router/route/route.interface.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/router/route/route.interface.ts @@ -1 +1 @@ -export type { IRoute as UmbRoute } from '../router-slot/model.js'; \ No newline at end of file +export type { IRoute as UmbRoute } from '../router-slot/model.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/router/router-slot/router-slot.ts b/src/Umbraco.Web.UI.Client/src/packages/core/router/router-slot/router-slot.ts index aca87b52a409..3f3a0b9a8dc1 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/router/router-slot/router-slot.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/router/router-slot/router-slot.ts @@ -295,6 +295,7 @@ export class RouterSlot extends HTMLElement implements IRouter /** * Notify the listeners. + * @param info */ notifyChildRouters(info: IRoutingInfo) { // This method should be called before routeMatch is being set! @@ -316,6 +317,7 @@ export class RouterSlot extends HTMLElement implements IRouter /** * Loads a new path based on the routes. * Returns true if a navigation was made to a new page. + * @param path */ protected async renderPath(path: string | PathFragment): Promise { // Notice: Since this is never called from any other place than one higher in this file(when writing this...), we could just retrieve the path and find a match by using this.getRouteMatch() [NL] diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/router/router-slot/util/history.ts b/src/Umbraco.Web.UI.Client/src/packages/core/router/router-slot/util/history.ts index 5692ccb49ccf..b133c910a6c4 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/router/router-slot/util/history.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/router/router-slot/util/history.ts @@ -84,6 +84,9 @@ export function saveNativeFunction(obj: any, name: string, func: () => void) { /** * Dispatches and event and returns whether the state change should be cancelled. * The state will be considered as cancelled if the "willChangeState" event was cancelled. + * @param data + * @param data.url + * @param data.eventName */ function shouldCancelChangeState(data: { url?: string | null; eventName: GlobalRouterEvent }): boolean { return !GLOBAL_ROUTER_EVENTS_TARGET.dispatchEvent( diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/router/router-slot/util/url.ts b/src/Umbraco.Web.UI.Client/src/packages/core/router/router-slot/util/url.ts index 9ce3696cb7ef..5349bc7ddddf 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/router/router-slot/util/url.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/router/router-slot/util/url.ts @@ -29,6 +29,7 @@ export function pathWithoutBasePath(options: Partial = {}): strin * * To make this method more performant we could cache the anchor element. * As default it will return the base path with slashes in front and at the end. + * @param options */ export function basePath(options: Partial = {}): string { return constructPathWithBasePath('.', options); @@ -92,8 +93,10 @@ export function ensureSlash(path: string): string { /** * Makes sure that the start and end slashes are present or not depending on the options. * @param path + * @param start.start * @param start * @param end + * @param start.end */ export function slashify(path: string, { start = true, end = true }: Partial = {}): string { path = start && !path.startsWith('/') ? `/${path}` : !start && path.startsWith('/') ? path.slice(1) : path; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/router/types.ts b/src/Umbraco.Web.UI.Client/src/packages/core/router/types.ts index 9a52bbf13ba1..1ca51ac18e23 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/router/types.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/router/types.ts @@ -1,5 +1,5 @@ -import type { UmbApi } from '@umbraco-cms/backoffice/extension-api'; import type { IRoutingInfo, PageComponent } from './router-slot/index.js'; +import type { UmbApi } from '@umbraco-cms/backoffice/extension-api'; export interface UmbRouteEntry extends UmbApi { getPath?(): string; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/section/extensions/section-sidebar-app.extension.ts b/src/Umbraco.Web.UI.Client/src/packages/core/section/extensions/section-sidebar-app.extension.ts index 880d13402796..461fa1d4fdcd 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/section/extensions/section-sidebar-app.extension.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/section/extensions/section-sidebar-app.extension.ts @@ -1,5 +1,5 @@ -import type { ManifestElement, ManifestWithDynamicConditions } from '@umbraco-cms/backoffice/extension-api'; import type { UmbSectionSidebarAppElement } from './section-sidebar-app-element.interface.js'; +import type { ManifestElement, ManifestWithDynamicConditions } from '@umbraco-cms/backoffice/extension-api'; export interface ManifestSectionSidebarApp extends ManifestElement, diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/section/repository/item/section-item.repository.ts b/src/Umbraco.Web.UI.Client/src/packages/core/section/repository/item/section-item.repository.ts index 81d78c6b2f51..97772fc13223 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/section/repository/item/section-item.repository.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/section/repository/item/section-item.repository.ts @@ -1,10 +1,10 @@ +import type { ManifestSection } from '../../extensions/index.js'; import type { UmbSectionItemModel } from './types.js'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import type { UmbItemRepository } from '@umbraco-cms/backoffice/repository'; import { UmbRepositoryBase } from '@umbraco-cms/backoffice/repository'; import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry'; import { createObservablePart } from '@umbraco-cms/backoffice/observable-api'; -import type { ManifestSection } from '../../extensions/index.js'; export class UmbSectionItemRepository extends UmbRepositoryBase implements UmbItemRepository { constructor(host: UmbControllerHost) { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/section/section-picker-modal/section-picker-modal.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/section/section-picker-modal/section-picker-modal.element.ts index c5b59d96d30a..184a5454f74e 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/section/section-picker-modal/section-picker-modal.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/section/section-picker-modal/section-picker-modal.element.ts @@ -1,9 +1,9 @@ +import type { ManifestSection } from '../extensions/index.js'; import type { UmbSectionPickerModalData, UmbSectionPickerModalValue } from './section-picker-modal.token.js'; import { html, customElement, state } from '@umbraco-cms/backoffice/external/lit'; import { UmbSelectionManager } from '@umbraco-cms/backoffice/utils'; import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry'; import { UmbModalBaseElement } from '@umbraco-cms/backoffice/modal'; -import type { ManifestSection } from '../extensions/index.js'; @customElement('umb-section-picker-modal') export class UmbSectionPickerModalElement extends UmbModalBaseElement< diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/tree/entity-actions/duplicate-to/modal/duplicate-to-modal.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/tree/entity-actions/duplicate-to/modal/duplicate-to-modal.element.ts index 7c12cb87a2cc..6689f250f73e 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/tree/entity-actions/duplicate-to/modal/duplicate-to-modal.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/tree/entity-actions/duplicate-to/modal/duplicate-to-modal.element.ts @@ -1,9 +1,9 @@ +import type { UmbTreeElement } from '../../../tree.element.js'; import type { UmbDuplicateToModalData, UmbDuplicateToModalValue } from './duplicate-to-modal.token.js'; import { html, customElement, nothing, state } from '@umbraco-cms/backoffice/external/lit'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; import { UmbModalBaseElement } from '@umbraco-cms/backoffice/modal'; import type { UmbSelectionChangeEvent } from '@umbraco-cms/backoffice/event'; -import type { UmbTreeElement } from '../../../tree.element.js'; const elementName = 'umb-duplicate-to-modal'; @customElement(elementName) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/tree/entity-actions/move/move-to.action.ts b/src/Umbraco.Web.UI.Client/src/packages/core/tree/entity-actions/move/move-to.action.ts index fc1cb864609b..f142ebf4cf86 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/tree/entity-actions/move/move-to.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/tree/entity-actions/move/move-to.action.ts @@ -1,10 +1,10 @@ +import { UMB_TREE_PICKER_MODAL } from '../../tree-picker-modal/index.js'; import type { UmbMoveRepository } from './move-repository.interface.js'; import type { MetaEntityActionMoveToKind } from './types.js'; import { UmbEntityActionBase, UmbRequestReloadStructureForEntityEvent } from '@umbraco-cms/backoffice/entity-action'; import { umbOpenModal } from '@umbraco-cms/backoffice/modal'; import { createExtensionApiByAlias } from '@umbraco-cms/backoffice/extension-registry'; import { UMB_ACTION_EVENT_CONTEXT } from '@umbraco-cms/backoffice/action'; -import { UMB_TREE_PICKER_MODAL } from '../../tree-picker-modal/index.js'; export class UmbMoveToEntityAction extends UmbEntityActionBase { override async execute() { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/tree/folder/entity-create-option-action/folder-entity-create-option-action.ts b/src/Umbraco.Web.UI.Client/src/packages/core/tree/folder/entity-create-option-action/folder-entity-create-option-action.ts index fd9f7b4085fe..bcf79d435d37 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/tree/folder/entity-create-option-action/folder-entity-create-option-action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/tree/folder/entity-create-option-action/folder-entity-create-option-action.ts @@ -1,7 +1,7 @@ +import { UmbCreateFolderEntityAction } from '../entity-action/create-folder/index.js'; import type { MetaEntityCreateOptionActionFolderKind } from './types.js'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import type { UmbEntityCreateOptionActionArgs } from '@umbraco-cms/backoffice/entity-create-option-action'; -import { UmbCreateFolderEntityAction } from '../entity-action/create-folder/index.js'; export class UmbFolderCreateOptionAction extends UmbCreateFolderEntityAction { constructor(host: UmbControllerHost, args: UmbEntityCreateOptionActionArgs) { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/tree/folder/modal/folder-create-modal.token.ts b/src/Umbraco.Web.UI.Client/src/packages/core/tree/folder/modal/folder-create-modal.token.ts index aa9fbcd60e97..4117df4e43db 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/tree/folder/modal/folder-create-modal.token.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/tree/folder/modal/folder-create-modal.token.ts @@ -1,6 +1,6 @@ +import type { UmbFolderModel } from '../types.js'; import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity'; import { UmbModalToken } from '@umbraco-cms/backoffice/modal'; -import type { UmbFolderModel } from '../types.js'; export interface UmbFolderCreateModalData { folderRepositoryAlias: string; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/tree/folder/modal/folder-modal-element-base.ts b/src/Umbraco.Web.UI.Client/src/packages/core/tree/folder/modal/folder-modal-element-base.ts index 562d979d5a8d..6d55666c21b2 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/tree/folder/modal/folder-modal-element-base.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/tree/folder/modal/folder-modal-element-base.ts @@ -1,3 +1,4 @@ +import type { UmbFolderModel } from '../types.js'; import { css, html, state } from '@umbraco-cms/backoffice/external/lit'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; import { UmbModalBaseElement } from '@umbraco-cms/backoffice/modal'; @@ -5,7 +6,6 @@ import { UmbExtensionApiInitializer } from '@umbraco-cms/backoffice/extension-ap import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry'; import { umbFocus } from '@umbraco-cms/backoffice/lit-element'; import type { UmbDetailRepository } from '@umbraco-cms/backoffice/repository'; -import type { UmbFolderModel } from '../types.js'; export abstract class UmbFolderModalElementBase< FolderModalDataType extends { folderRepositoryAlias: string }, diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/tree/folder/modal/folder-update-modal.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/tree/folder/modal/folder-update-modal.element.ts index d8025b0bb6fb..8bc2b88be8b8 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/tree/folder/modal/folder-update-modal.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/tree/folder/modal/folder-update-modal.element.ts @@ -1,6 +1,6 @@ import { UmbFolderModalElementBase } from './folder-modal-element-base.js'; -import { customElement } from '@umbraco-cms/backoffice/external/lit'; import type { UmbFolderUpdateModalData, UmbFolderUpdateModalValue } from './folder-update-modal.token.js'; +import { customElement } from '@umbraco-cms/backoffice/external/lit'; @customElement('umb-folder-update-modal') export class UmbFolderModalElement extends UmbFolderModalElementBase< diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/tree/folder/modal/folder-update-modal.token.ts b/src/Umbraco.Web.UI.Client/src/packages/core/tree/folder/modal/folder-update-modal.token.ts index 3edfbe3c3cc5..492d742a9af3 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/tree/folder/modal/folder-update-modal.token.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/tree/folder/modal/folder-update-modal.token.ts @@ -1,5 +1,5 @@ -import { UmbModalToken } from '@umbraco-cms/backoffice/modal'; import type { UmbFolderModel } from '../types.js'; +import { UmbModalToken } from '@umbraco-cms/backoffice/modal'; export interface UmbFolderUpdateModalData { folderRepositoryAlias: string; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/utils/guard-manager/guard.manager.base.ts b/src/Umbraco.Web.UI.Client/src/packages/core/utils/guard-manager/guard.manager.base.ts index a9d9fb998a7d..ff5bef8a4474 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/utils/guard-manager/guard.manager.base.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/utils/guard-manager/guard.manager.base.ts @@ -1,6 +1,6 @@ +import type { UmbPartialSome } from '../type/index.js'; import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api'; import { UmbArrayState } from '@umbraco-cms/backoffice/observable-api'; -import type { UmbPartialSome } from '../type/index.js'; export interface UmbGuardIncomingRuleBase { unique?: string | symbol; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/utils/guard-manager/readonly-variant-guard.manager.ts b/src/Umbraco.Web.UI.Client/src/packages/core/utils/guard-manager/readonly-variant-guard.manager.ts index bec93e14f31e..ed0c85bb0e94 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/utils/guard-manager/readonly-variant-guard.manager.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/utils/guard-manager/readonly-variant-guard.manager.ts @@ -1,12 +1,17 @@ import { UmbReadOnlyGuardManager } from './readonly-guard.manager.js'; +import type { UmbGuardRule } from './guard.manager.base.js'; import type { UmbVariantId } from '@umbraco-cms/backoffice/variant'; import { mergeObservables, type Observable } from '@umbraco-cms/backoffice/observable-api'; -import type { UmbGuardRule } from './guard.manager.base.js'; export interface UmbVariantGuardRule extends UmbGuardRule { variantId?: UmbVariantId; } +/** + * + * @param rule + * @param variantId + */ function findRule(rule: UmbVariantGuardRule, variantId: UmbVariantId) { return rule.variantId?.compare(variantId) || rule.variantId === undefined; } @@ -16,13 +21,13 @@ function findRule(rule: UmbVariantGuardRule, variantId: UmbVariantId) { * Read only guard manager for variant rules. * @export * @class UmbReadOnlyVariantGuardManager - * @extends {UmbReadOnlyGuardManager} + * @augments {UmbReadOnlyGuardManager} */ export class UmbReadOnlyVariantGuardManager extends UmbReadOnlyGuardManager { /** * Observe if the given variantId is permitted to read * @param {UmbVariantId} variantId - * @return {Observable} - Observable that emits true if the variantId is permitted to read, false otherwise + * @returns {Observable} - Observable that emits true if the variantId is permitted to read, false otherwise * @memberof UmbReadOnlyVariantGuardManager */ isPermittedForVariant(variantId: UmbVariantId): Observable { @@ -33,7 +38,7 @@ export class UmbReadOnlyVariantGuardManager extends UmbReadOnlyGuardManager} variantId - * @return {Observable} - Observable that emits true if the variantId is permitted to read, false otherwise + * @returns {Observable} - Observable that emits true if the variantId is permitted to read, false otherwise * @memberof UmbReadOnlyVariantGuardManager */ isPermittedForObservableVariant(variantId: Observable): Observable { @@ -49,7 +54,7 @@ export class UmbReadOnlyVariantGuardManager extends UmbReadOnlyGuardManager} + * @augments {UmbStateManager} * @template StateType */ export class UmbReadOnlyStateManager extends UmbStateManager { @@ -17,7 +17,7 @@ export class UmbReadOnlyStateManager extends UmbStat /** * Checks if the state is read-only - * @return {boolean} - true if the state is read-only + * @returns {boolean} - true if the state is read-only * @memberof UmbReadOnlyStateManager */ getIsReadOnly(): boolean { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/vite.config.ts b/src/Umbraco.Web.UI.Client/src/packages/core/vite.config.ts index 1cf88bf452b0..643d45cda574 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/vite.config.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/vite.config.ts @@ -18,8 +18,6 @@ export default defineConfig({ 'collection/index': './collection/index.ts', 'components/index': './components/index.ts', 'const/index': './const/index.ts', - 'content-type/index': './content-type/index.ts', - 'content/index': './content/index.ts', 'culture/index': './culture/index.ts', 'dashboard/index': './dashboard/index.ts', 'debug/index': './debug/index.ts', @@ -45,7 +43,6 @@ export default defineConfig({ 'picker/index': './picker/index.ts', 'property-action/index': './property-action/index.ts', 'property-editor/index': './property-editor/index.ts', - 'property-type/index': './property-type/index.ts', 'property/index': './property/index.ts', 'recycle-bin/index': './recycle-bin/index.ts', 'repository/index': './repository/index.ts', diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/manifests.ts index cef93734b6fb..9a6b1cf556d6 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/manifests.ts @@ -1,4 +1,3 @@ -import { manifests as workspaceViewManifests } from '../../content/collection/manifests.js'; import { manifests as workspaceActionManifests } from './workspace-action/manifests.js'; import { manifests as workspaceActionMenuItemManifests } from './workspace-action-menu-item/manifests.js'; import { manifests as workspaceBreadcrumbManifests } from './workspace-breadcrumb/manifests.js'; @@ -8,5 +7,4 @@ export const manifests: Array = ...workspaceActionManifests, ...workspaceActionMenuItemManifests, ...workspaceBreadcrumbManifests, - ...workspaceViewManifests, ]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-split-view/workspace-split-view-variant-selector.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-split-view/workspace-split-view-variant-selector.element.ts index d4a4a7f8f0f9..211198098800 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-split-view/workspace-split-view-variant-selector.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-split-view/workspace-split-view-variant-selector.element.ts @@ -1,4 +1,5 @@ import type { ActiveVariant } from '../../controllers/index.js'; +import type { UmbVariantDatasetWorkspaceContext } from '../../contexts/index.js'; import { UMB_WORKSPACE_SPLIT_VIEW_CONTEXT } from './workspace-split-view.context.js'; import { css, customElement, html, ifDefined, nothing, query, ref, state } from '@umbraco-cms/backoffice/external/lit'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; @@ -7,7 +8,6 @@ import { UmbVariantId } from '@umbraco-cms/backoffice/variant'; import { UmbDataPathVariantQuery, umbBindToValidation } from '@umbraco-cms/backoffice/validation'; import { UMB_PROPERTY_DATASET_CONTEXT, isNameablePropertyDatasetContext } from '@umbraco-cms/backoffice/property'; import { UUIInputEvent } from '@umbraco-cms/backoffice/external/uui'; -import type { UmbContentWorkspaceContext } from '@umbraco-cms/backoffice/content'; import type { UmbEntityVariantModel, UmbEntityVariantOptionModel } from '@umbraco-cms/backoffice/variant'; import type { UmbVariantGuardRule } from '@umbraco-cms/backoffice/utils'; import type { UUIInputElement, UUIPopoverContainerElement } from '@umbraco-cms/backoffice/external/uui'; @@ -61,7 +61,8 @@ export class UmbWorkspaceSplitViewVariantSelectorElement< this.consumeContext(UMB_WORKSPACE_SPLIT_VIEW_CONTEXT, (instance) => { this.#splitViewContext = instance; - const workspaceContext = this.#splitViewContext.getWorkspaceContext() as unknown as UmbContentWorkspaceContext; + const workspaceContext = + this.#splitViewContext.getWorkspaceContext() as unknown as UmbVariantDatasetWorkspaceContext; if (!workspaceContext) throw new Error('Split View Workspace context not found'); this.#observeVariants(workspaceContext); @@ -76,7 +77,7 @@ export class UmbWorkspaceSplitViewVariantSelectorElement< }); } - async #observeVariants(workspaceContext: UmbContentWorkspaceContext) { + async #observeVariants(workspaceContext: UmbVariantDatasetWorkspaceContext) { this.observe( workspaceContext.variantOptions, (variantOptions) => { @@ -87,7 +88,7 @@ export class UmbWorkspaceSplitViewVariantSelectorElement< ); } - async #observeActiveVariants(workspaceContext: UmbContentWorkspaceContext) { + async #observeActiveVariants(workspaceContext: UmbVariantDatasetWorkspaceContext) { this.observe( workspaceContext.splitView.activeVariantsInfo, (activeVariants) => { @@ -113,7 +114,8 @@ export class UmbWorkspaceSplitViewVariantSelectorElement< async #observeCurrentVariant() { if (!this.#datasetContext || !this.#splitViewContext) return; - const workspaceContext = this.#splitViewContext.getWorkspaceContext() as unknown as UmbContentWorkspaceContext; + const workspaceContext = + this.#splitViewContext.getWorkspaceContext() as unknown as UmbVariantDatasetWorkspaceContext; if (!workspaceContext) return; this._variantId = this.#datasetContext.getVariantId(); @@ -166,7 +168,7 @@ export class UmbWorkspaceSplitViewVariantSelectorElement< return this._variantOptions?.length > 1; } - #setReadOnlyCultures(workspaceContext: UmbContentWorkspaceContext) { + #setReadOnlyCultures(workspaceContext: UmbVariantDatasetWorkspaceContext) { this._readOnlyCultures = this._variantOptions .filter((variant) => workspaceContext.readOnlyGuard.getIsPermittedForVariant(UmbVariantId.Create(variant))) .map((variant) => variant.culture); diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/conditions/const.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/conditions/const.ts index 6aa130abce38..c9faa944c20c 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/conditions/const.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/conditions/const.ts @@ -1,8 +1,3 @@ -/** - * Workspace has collection condition alias - */ -export const UMB_WORKSPACE_HAS_COLLECTION_CONDITION_ALIAS = 'Umb.Condition.WorkspaceHasCollection'; - /** * Workspace entity is new condition alias */ diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/conditions/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/conditions/manifests.ts index 1371174d9326..3250ae8565e7 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/conditions/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/conditions/manifests.ts @@ -1,13 +1,9 @@ import { manifest as workspaceAliasCondition } from './workspace-alias.condition.js'; import { manifest as workspaceEntityTypeCondition } from './workspace-entity-type.condition.js'; import { manifest as workspaceEntityIsNewCondition } from './workspace-entity-is-new.condition.js'; -import { manifest as workspaceHasCollectionCondition } from './workspace-has-collection.condition.js'; -import { manifest as workspaceContentTypeAliasCondition } from './workspace-content-type-alias.condition.js'; export const manifests: Array = [ workspaceEntityIsNewCondition, workspaceAliasCondition, - workspaceContentTypeAliasCondition, workspaceEntityTypeCondition, - workspaceHasCollectionCondition, ]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/conditions/types.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/conditions/types.ts index 5cea5e30b50e..a8a150d21861 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/conditions/types.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/conditions/types.ts @@ -1,8 +1,4 @@ -import type { - UMB_WORKSPACE_CONDITION_ALIAS, - UMB_WORKSPACE_ENTITY_IS_NEW_CONDITION_ALIAS, - UMB_WORKSPACE_HAS_COLLECTION_CONDITION_ALIAS, -} from './const.js'; +import type { UMB_WORKSPACE_CONDITION_ALIAS, UMB_WORKSPACE_ENTITY_IS_NEW_CONDITION_ALIAS } from './const.js'; import type { UmbConditionConfigBase } from '@umbraco-cms/backoffice/extension-api'; export interface WorkspaceAliasConditionConfig extends UmbConditionConfigBase { @@ -20,26 +16,6 @@ export interface WorkspaceAliasConditionConfig extends UmbConditionConfigBase; } -export type UmbWorkspaceContentTypeAliasConditionConfig = - UmbConditionConfigBase<'Umb.Condition.WorkspaceContentTypeAlias'> & { - /** - * Define a content type alias in which workspace this extension should be available - * @example - * Depends on implementation, but i.e. "article", "image", "blockPage" - */ - match?: string; - /** - * Define one or more content type aliases in which workspace this extension should be available - * @example - * ["article", "image", "blockPage"] - */ - oneOf?: Array; - }; -/** - * @deprecated Use `UmbWorkspaceContentTypeAliasConditionConfig` instead. This will be removed in Umbraco 17. - */ -export type WorkspaceContentTypeAliasConditionConfig = UmbWorkspaceContentTypeAliasConditionConfig; - export type UmbWorkspaceEntityTypeConditionConfig = UmbConditionConfigBase<'Umb.Condition.WorkspaceEntityType'> & { /** * Define the workspace that this extension should be available in @@ -53,14 +29,6 @@ export type UmbWorkspaceEntityTypeConditionConfig = UmbConditionConfigBase<'Umb. */ export type WorkspaceEntityTypeConditionConfig = UmbWorkspaceEntityTypeConditionConfig; -export type UmbWorkspaceHasCollectionConditionConfig = UmbConditionConfigBase< - typeof UMB_WORKSPACE_HAS_COLLECTION_CONDITION_ALIAS ->; -/** - * @deprecated Use `UmbWorkspaceHasCollectionConditionConfig` instead. This will be removed in Umbraco 17. - */ -export type WorkspaceHasCollectionConditionConfig = UmbWorkspaceHasCollectionConditionConfig; - export interface UmbWorkspaceEntityIsNewConditionConfig extends UmbConditionConfigBase { match: boolean; @@ -75,9 +43,7 @@ export interface WorkspaceEntityIsNewConditionConfig extends UmbWorkspaceEntityI declare global { interface UmbExtensionConditionConfigMap { umbWorkspaceAlias: WorkspaceAliasConditionConfig; - umbWorkspaceContentTypeAlias: UmbWorkspaceContentTypeAliasConditionConfig; umbWorkspaceEntityIsNewConditionConfig: UmbWorkspaceEntityIsNewConditionConfig; umbWorkspaceEntityType: UmbWorkspaceEntityTypeConditionConfig; - umbWorkspaceHasCollection: UmbWorkspaceHasCollectionConditionConfig; } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/conditions/workspace-has-collection.condition.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/conditions/workspace-has-collection.condition.ts deleted file mode 100644 index 1903b70bc790..000000000000 --- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/conditions/workspace-has-collection.condition.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { UMB_CONTENT_COLLECTION_WORKSPACE_CONTEXT } from '../../content/collection/content-collection-workspace.context-token.js'; -import type { UmbWorkspaceHasCollectionConditionConfig } from './types.js'; -import { UMB_WORKSPACE_HAS_COLLECTION_CONDITION_ALIAS } from './const.js'; -import { UmbConditionBase } from '@umbraco-cms/backoffice/extension-registry'; -import type { UmbConditionControllerArguments, UmbExtensionCondition } from '@umbraco-cms/backoffice/extension-api'; -import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; - -const ObserveSymbol = Symbol(); - -export class UmbWorkspaceHasCollectionCondition - extends UmbConditionBase - implements UmbExtensionCondition -{ - constructor( - host: UmbControllerHost, - args: UmbConditionControllerArguments, - ) { - super(host, args); - - this.consumeContext(UMB_CONTENT_COLLECTION_WORKSPACE_CONTEXT, (context) => { - this.observe( - context.contentTypeHasCollection, - (hasCollection) => { - this.permitted = hasCollection; - }, - ObserveSymbol, - ); - }); - } -} - -export const manifest: UmbExtensionManifest = { - type: 'condition', - name: 'Workspace Has Collection Condition', - alias: UMB_WORKSPACE_HAS_COLLECTION_CONDITION_ALIAS, - api: UmbWorkspaceHasCollectionCondition, -}; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/contexts/tokens/index.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/contexts/tokens/index.ts index 06d402f312d8..9c4fd2a4ed32 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/contexts/tokens/index.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/contexts/tokens/index.ts @@ -1,12 +1,10 @@ export * from './entity-workspace.context-token.js'; -export * from './property-structure-workspace.context-token.js'; export * from './publishable-workspace.context-token.js'; export * from './routable-workspace.context-token.js'; export * from './submittable-workspace.context-token.js'; export * from './variant-workspace.context-token.js'; export type * from './entity-workspace-context.interface.js'; export type * from './invariant-dataset-workspace-context.interface.js'; -export type * from './property-structure-workspace-context.interface.js'; export type * from './publishable-workspace-context.interface.js'; export type * from './routable-workspace-context.interface.js'; export type * from './submittable-workspace-context.interface.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/contexts/tokens/variant-dataset-workspace-context.interface.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/contexts/tokens/variant-dataset-workspace-context.interface.ts index d03b2f62e70a..72ea778ae075 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/contexts/tokens/variant-dataset-workspace-context.interface.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/contexts/tokens/variant-dataset-workspace-context.interface.ts @@ -5,6 +5,7 @@ import type { Observable } from '@umbraco-cms/backoffice/external/rxjs'; import type { UmbVariantId, UmbEntityVariantModel, UmbEntityVariantOptionModel } from '@umbraco-cms/backoffice/variant'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import type { UmbValidationController } from '@umbraco-cms/backoffice/validation'; +import type { UmbReadOnlyVariantGuardManager } from '@umbraco-cms/backoffice/utils'; export interface UmbVariantDatasetWorkspaceContext extends UmbSubmittableWorkspaceContext { @@ -18,6 +19,7 @@ export interface UmbVariantDatasetWorkspaceContext>>; splitView: UmbWorkspaceSplitViewManager; getVariant(variantId: UmbVariantId): VariantType | undefined; + readonly readOnlyGuard: UmbReadOnlyVariantGuardManager; // Property: // This one is async cause it needs to structure to provide this data: [NL] diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/info-app/global-components/workspace-info-app-layout.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/info-app/global-components/workspace-info-app-layout.element.ts index 83a10560ff00..981a93651c8a 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/info-app/global-components/workspace-info-app-layout.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/info-app/global-components/workspace-info-app-layout.element.ts @@ -24,7 +24,7 @@ export class UmbWorkspaceInfoAppLayoutElement extends UmbLitElement { } #container { - padding-left: var(--uui-size-space-4) + padding-left: var(--uui-size-space-4); } `, ]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/data-type/modals/data-type-picker-flow/data-type-picker-flow-data-type-picker-modal.element.ts b/src/Umbraco.Web.UI.Client/src/packages/data-type/modals/data-type-picker-flow/data-type-picker-flow-data-type-picker-modal.element.ts index e456e3be1d35..62ee9b68af1d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/data-type/modals/data-type-picker-flow/data-type-picker-flow-data-type-picker-modal.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/data-type/modals/data-type-picker-flow/data-type-picker-flow-data-type-picker-modal.element.ts @@ -1,4 +1,5 @@ import { UmbDataTypeCollectionRepository } from '../../collection/index.js'; +import type { UmbDataTypeItemModel } from '../../repository/item/types.js'; import type { UmbDataTypePickerFlowDataTypePickerModalData, UmbDataTypePickerFlowDataTypePickerModalValue, @@ -6,7 +7,6 @@ import type { import { css, customElement, html, repeat, state } from '@umbraco-cms/backoffice/external/lit'; import { UmbModalBaseElement } from '@umbraco-cms/backoffice/modal'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; -import type { UmbDataTypeItemModel } from '../../repository/item/types.js'; @customElement('umb-data-type-picker-flow-data-type-picker-modal') export class UmbDataTypePickerFlowDataTypePickerModalElement extends UmbModalBaseElement< diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/create/modal/document-type-create-options-modal.element.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/create/modal/document-type-create-options-modal.element.ts index 428739ea5ab6..941c581e24e6 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/create/modal/document-type-create-options-modal.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/create/modal/document-type-create-options-modal.element.ts @@ -1,13 +1,13 @@ import { UMB_DOCUMENT_TYPE_FOLDER_REPOSITORY_ALIAS } from '../../../tree/index.js'; -import type { UmbDocumentTypeCreateOptionsModalData } from './constants.js'; -import { html, customElement, map } from '@umbraco-cms/backoffice/external/lit'; -import { UmbModalBaseElement } from '@umbraco-cms/backoffice/modal'; -import { UmbCreateFolderEntityAction } from '@umbraco-cms/backoffice/tree'; import { UMB_CREATE_DOCUMENT_TYPE_WORKSPACE_PATH_PATTERN, type UmbCreateDocumentTypeWorkspacePresetType, } from '../../../paths.js'; import type { UmbDocumentTypeEntityTypeUnion } from '../../../entity.js'; +import type { UmbDocumentTypeCreateOptionsModalData } from './constants.js'; +import { html, customElement, map } from '@umbraco-cms/backoffice/external/lit'; +import { UmbModalBaseElement } from '@umbraco-cms/backoffice/modal'; +import { UmbCreateFolderEntityAction } from '@umbraco-cms/backoffice/tree'; // Include the types from the DocumentTypeWorkspacePresetType + folder. type OptionsPresetType = UmbCreateDocumentTypeWorkspacePresetType | 'folder' | null; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/composition/document-type-composition.repository.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/composition/document-type-composition.repository.ts index a84f2c529529..b8d5b7290108 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/composition/document-type-composition.repository.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/composition/document-type-composition.repository.ts @@ -1,12 +1,12 @@ -import { UmbDocumentTypeCompositionServerDataSource } from './document-type-composition.server.data-source.js'; -import type { UmbContentTypeCompositionRepository } from '@umbraco-cms/backoffice/content-type'; -import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; -import { UmbRepositoryBase } from '@umbraco-cms/backoffice/repository'; import type { UmbDocumentTypeAvailableCompositionRequestModel, UmbDocumentTypeCompositionCompatibleModel, UmbDocumentTypeCompositionReferenceModel, } from '../../types.js'; +import { UmbDocumentTypeCompositionServerDataSource } from './document-type-composition.server.data-source.js'; +import type { UmbContentTypeCompositionRepository } from '@umbraco-cms/backoffice/content-type'; +import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; +import { UmbRepositoryBase } from '@umbraco-cms/backoffice/repository'; export class UmbDocumentTypeCompositionRepository extends UmbRepositoryBase diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/structure/document-type-structure.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/structure/document-type-structure.server.data-source.ts index d274bf3a9f8c..2b746c52b6eb 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/structure/document-type-structure.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/structure/document-type-structure.server.data-source.ts @@ -7,7 +7,7 @@ import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; /** * - + * @class UmbDocumentTypeStructureServerDataSource * @augments {UmbContentTypeStructureServerDataSourceBase} */ diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/global-contexts/document-configuration.context.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/global-contexts/document-configuration.context.ts index fef64026936e..5179c90df82f 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/global-contexts/document-configuration.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/global-contexts/document-configuration.context.ts @@ -8,7 +8,7 @@ import { tryExecute } from '@umbraco-cms/backoffice/resources'; // TODO: Turn this into a Repository with a Store that holds the cache [NL] /** * A context for fetching and caching the document configuration. - * @internal Do not use this one, it is only for internal usage. + * @internal */ export class UmbDocumentConfigurationContext extends UmbContextBase @@ -46,7 +46,7 @@ export class UmbDocumentConfigurationContext export default UmbDocumentConfigurationContext; /** - * @internal Do not use this one, it is only for internal usage. + * @internal */ export const UMB_DOCUMENT_CONFIGURATION_CONTEXT = new UmbContextToken( 'UmbDocumentConfigurationContext', diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/user-permissions/document-property-value/workspace-context/document-block-property-value-user-permission.workspace-context.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/user-permissions/document-property-value/workspace-context/document-block-property-value-user-permission.workspace-context.ts index c02f721d0cde..e91b5f85074d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/user-permissions/document-property-value/workspace-context/document-block-property-value-user-permission.workspace-context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/user-permissions/document-property-value/workspace-context/document-block-property-value-user-permission.workspace-context.ts @@ -1,8 +1,8 @@ +import { UMB_DOCUMENT_ENTITY_TYPE } from '../../../entity.js'; +import { UmbPropertyValueUserPermissionWorkspaceContextBase } from './property-value-user-permission-workspace-context-base.js'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import { UMB_BLOCK_WORKSPACE_CONTEXT } from '@umbraco-cms/backoffice/block'; -import { UmbPropertyValueUserPermissionWorkspaceContextBase } from './property-value-user-permission-workspace-context-base.js'; import { UMB_CONTENT_WORKSPACE_CONTEXT } from '@umbraco-cms/backoffice/content'; -import { UMB_DOCUMENT_ENTITY_TYPE } from '../../../entity.js'; export class UmbDocumentBlockPropertyValueUserPermissionWorkspaceContext extends UmbPropertyValueUserPermissionWorkspaceContextBase { #blockWorkspaceContext?: typeof UMB_BLOCK_WORKSPACE_CONTEXT.TYPE; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/user-permissions/document-property-value/workspace-context/document-property-value-user-permission.workspace-context.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/user-permissions/document-property-value/workspace-context/document-property-value-user-permission.workspace-context.ts index abd442ae9522..2ddab0362d86 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/user-permissions/document-property-value/workspace-context/document-property-value-user-permission.workspace-context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/user-permissions/document-property-value/workspace-context/document-property-value-user-permission.workspace-context.ts @@ -1,6 +1,6 @@ import { UMB_DOCUMENT_WORKSPACE_CONTEXT } from '../../../workspace/constants.js'; -import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import { UmbPropertyValueUserPermissionWorkspaceContextBase } from './property-value-user-permission-workspace-context-base.js'; +import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; export class UmbDocumentPropertyValueUserPermissionWorkspaceContext extends UmbPropertyValueUserPermissionWorkspaceContextBase { #documentWorkspaceContext?: typeof UMB_DOCUMENT_WORKSPACE_CONTEXT.TYPE; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace.context.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace.context.ts index 53f8354c561b..5407aeb4a1f5 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace.context.ts @@ -17,6 +17,7 @@ import { import { UmbDocumentPreviewRepository } from '../repository/preview/index.js'; import { UMB_DOCUMENT_PUBLISHING_WORKSPACE_CONTEXT, UmbDocumentPublishingRepository } from '../publishing/index.js'; import { UmbDocumentValidationRepository } from '../repository/validation/index.js'; +import { UMB_DOCUMENT_CONFIGURATION_CONTEXT } from '../index.js'; import { UMB_DOCUMENT_DETAIL_MODEL_VARIANT_SCAFFOLD, UMB_DOCUMENT_WORKSPACE_ALIAS } from './constants.js'; import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity'; import { UMB_INVARIANT_CULTURE, UmbVariantId } from '@umbraco-cms/backoffice/variant'; @@ -36,7 +37,6 @@ import type { UmbDocumentTypeDetailModel } from '@umbraco-cms/backoffice/documen import { UmbIsTrashedEntityContext } from '@umbraco-cms/backoffice/recycle-bin'; import { ensurePathEndsWithSlash, UmbDeprecation } from '@umbraco-cms/backoffice/utils'; import { createExtensionApiByAlias } from '@umbraco-cms/backoffice/extension-registry'; -import { UMB_DOCUMENT_CONFIGURATION_CONTEXT } from '../index.js'; import { observeMultiple } from '@umbraco-cms/backoffice/observable-api'; import { UMB_LANGUAGE_USER_PERMISSION_CONDITION_ALIAS } from '@umbraco-cms/backoffice/language'; import { UMB_SERVER_CONTEXT } from '@umbraco-cms/backoffice/server'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/manifests.ts index 6c18d54faa4d..2cce72664a89 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/manifests.ts @@ -1,7 +1,10 @@ import { UMB_DOCUMENT_ENTITY_TYPE } from '../entity.js'; import { UMB_DOCUMENT_WORKSPACE_ALIAS } from './constants.js'; import { manifests as actionManifests } from './actions/manifests.js'; -import { UMB_CONTENT_HAS_PROPERTIES_WORKSPACE_CONDITION } from '@umbraco-cms/backoffice/content'; +import { + UMB_CONTENT_HAS_PROPERTIES_WORKSPACE_CONDITION, + UMB_WORKSPACE_HAS_CONTENT_COLLECTION_CONDITION_ALIAS, +} from '@umbraco-cms/backoffice/content'; import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace'; export const manifests: Array = [ @@ -31,7 +34,7 @@ export const manifests: Array = [ match: UMB_DOCUMENT_WORKSPACE_ALIAS, }, { - alias: 'Umb.Condition.WorkspaceHasCollection', + alias: UMB_WORKSPACE_HAS_CONTENT_COLLECTION_CONDITION_ALIAS, }, ], }, diff --git a/src/Umbraco.Web.UI.Client/src/packages/health-check/health-check-dashboard.context.ts b/src/Umbraco.Web.UI.Client/src/packages/health-check/health-check-dashboard.context.ts index 516bf4b191b2..2d88ad8ec5d6 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/health-check/health-check-dashboard.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/health-check/health-check-dashboard.context.ts @@ -1,6 +1,6 @@ -import { UmbContextBase } from '@umbraco-cms/backoffice/class-api'; import { UmbHealthCheckContext } from './health-check.context.js'; import type { ManifestHealthCheck } from './health-check.extension.js'; +import { UmbContextBase } from '@umbraco-cms/backoffice/class-api'; import { UmbContextToken } from '@umbraco-cms/backoffice/context-api'; import { loadManifestApi } from '@umbraco-cms/backoffice/extension-api'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/language/modals/language-picker/language-picker-modal.token.ts b/src/Umbraco.Web.UI.Client/src/packages/language/modals/language-picker/language-picker-modal.token.ts index 0ece01809559..5228b6275732 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/language/modals/language-picker/language-picker-modal.token.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/language/modals/language-picker/language-picker-modal.token.ts @@ -1,5 +1,5 @@ -import { UmbModalToken } from '@umbraco-cms/backoffice/modal'; import type { UmbLanguageItemModel } from '../../repository/item/types.js'; +import { UmbModalToken } from '@umbraco-cms/backoffice/modal'; export interface UmbLanguagePickerModalData { multiple?: boolean; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/workspace/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/workspace/manifests.ts index dd63b8871745..4cb6f7523555 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/workspace/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/workspace/manifests.ts @@ -1,7 +1,10 @@ import { UMB_MEDIA_WORKSPACE_ALIAS } from './constants.js'; import { UmbSubmitWorkspaceAction, UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace'; import { UMB_ENTITY_IS_NOT_TRASHED_CONDITION_ALIAS } from '@umbraco-cms/backoffice/recycle-bin'; -import { UMB_CONTENT_HAS_PROPERTIES_WORKSPACE_CONDITION } from '@umbraco-cms/backoffice/content'; +import { + UMB_CONTENT_HAS_PROPERTIES_WORKSPACE_CONDITION, + UMB_WORKSPACE_HAS_CONTENT_COLLECTION_CONDITION_ALIAS, +} from '@umbraco-cms/backoffice/content'; export const manifests: Array = [ { @@ -30,7 +33,7 @@ export const manifests: Array = [ match: UMB_MEDIA_WORKSPACE_ALIAS, }, { - alias: 'Umb.Condition.WorkspaceHasCollection', + alias: UMB_WORKSPACE_HAS_CONTENT_COLLECTION_CONDITION_ALIAS, }, ], }, diff --git a/src/Umbraco.Web.UI.Client/src/packages/members/member-group/property-editor/member-group-picker/property-editor-ui-member-group-picker.element.ts b/src/Umbraco.Web.UI.Client/src/packages/members/member-group/property-editor/member-group-picker/property-editor-ui-member-group-picker.element.ts index 5c0852dc512a..2ec6cce2a2a7 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/members/member-group/property-editor/member-group-picker/property-editor-ui-member-group-picker.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/members/member-group/property-editor/member-group-picker/property-editor-ui-member-group-picker.element.ts @@ -1,3 +1,4 @@ +import type { UmbInputMemberGroupElement } from '../../components/index.js'; import { html, customElement, property, state } from '@umbraco-cms/backoffice/external/lit'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import type { UmbNumberRangeValueType } from '@umbraco-cms/backoffice/models'; @@ -6,7 +7,6 @@ import type { UmbPropertyEditorUiElement, } from '@umbraco-cms/backoffice/property-editor'; import { UmbChangeEvent } from '@umbraco-cms/backoffice/event'; -import type { UmbInputMemberGroupElement } from '../../components/index.js'; /** * @element umb-property-editor-ui-member-group-picker diff --git a/src/Umbraco.Web.UI.Client/src/packages/members/member/entity-actions/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/members/member/entity-actions/manifests.ts index 56072ee35b13..11f400c72dab 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/members/member/entity-actions/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/members/member/entity-actions/manifests.ts @@ -1,8 +1,8 @@ import { UMB_MEMBER_ITEM_REPOSITORY_ALIAS } from '../item/constants.js'; import { UMB_MEMBER_ENTITY_TYPE } from '../entity.js'; import { UMB_MEMBER_DETAIL_REPOSITORY_ALIAS } from '../repository/detail/manifests.js'; -import { manifests as createManifests } from './create/manifests.js'; import { UMB_MEMBER_REFERENCE_REPOSITORY_ALIAS } from '../reference/constants.js'; +import { manifests as createManifests } from './create/manifests.js'; export const manifests: Array = [ { @@ -18,4 +18,4 @@ export const manifests: Array = [ }, }, ...createManifests, -]; \ No newline at end of file +]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/members/member/workspace/member/views/member/member-workspace-view-member.element.ts b/src/Umbraco.Web.UI.Client/src/packages/members/member/workspace/member/views/member/member-workspace-view-member.element.ts index f048becc14aa..7e0f64532e83 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/members/member/workspace/member/views/member/member-workspace-view-member.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/members/member/workspace/member/views/member/member-workspace-view-member.element.ts @@ -182,7 +182,8 @@ export class UmbMemberWorkspaceViewMemberElement extends UmbLitElement implement .selection=${this._workspaceContext.memberGroups}> - ${when(this._hasAccessToSensitiveData, + ${when( + this._hasAccessToSensitiveData, () => html` this.#onChange('isLockedOut', e.target.checked)}> - `) - } + `, + )} ; diff --git a/src/Umbraco.Web.UI.Client/src/packages/packages/package/repository/sources/package.server.data.ts b/src/Umbraco.Web.UI.Client/src/packages/packages/package/repository/sources/package.server.data.ts index 36d47fbe377f..9458a605cdc3 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/packages/package/repository/sources/package.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/packages/package/repository/sources/package.server.data.ts @@ -8,7 +8,7 @@ import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; /** * Data source for packages from the server - + */ export class UmbPackageServerDataSource { constructor(private readonly host: UmbControllerHost) {} diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/property-editors/stylesheet-picker/property-editor-ui-stylesheet-picker.element.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/property-editors/stylesheet-picker/property-editor-ui-stylesheet-picker.element.ts index 88c09eddd08f..e340d7ad693d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/property-editors/stylesheet-picker/property-editor-ui-stylesheet-picker.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/property-editors/stylesheet-picker/property-editor-ui-stylesheet-picker.element.ts @@ -1,3 +1,4 @@ +import type { UmbStylesheetInputElement } from '../../global-components/index.js'; import { customElement, html, property } from '@umbraco-cms/backoffice/external/lit'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { UmbServerFilePathUniqueSerializer } from '@umbraco-cms/backoffice/server-file-system'; @@ -6,7 +7,6 @@ import type { UmbPropertyEditorUiElement, } from '@umbraco-cms/backoffice/property-editor'; import { UmbChangeEvent } from '@umbraco-cms/backoffice/event'; -import type { UmbStylesheetInputElement } from '../../global-components/index.js'; @customElement('umb-property-editor-ui-stylesheet-picker') export class UmbPropertyEditorUIStylesheetPickerElement extends UmbLitElement implements UmbPropertyEditorUiElement { diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/templates/modals/query-builder/query-builder-modal.element.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/templates/modals/query-builder/query-builder-modal.element.ts index 8c63e041e0c7..3972a46403d0 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/templates/modals/query-builder/query-builder-modal.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/templates/modals/query-builder/query-builder-modal.element.ts @@ -243,7 +243,11 @@ export default class UmbTemplateQueryBuilderModalElement extends UmbModalBaseEle
- items returned, in + items returned, in ${this._templateQuery?.sampleResults.map( (sample) => html`${sample.name}`, diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/templates/modals/template-picker-modal.token.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/templates/modals/template-picker-modal.token.ts index e963d48806d5..5d41aaf880d2 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/templates/modals/template-picker-modal.token.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/templates/modals/template-picker-modal.token.ts @@ -1,7 +1,7 @@ +import type { UmbTemplateTreeItemModel } from '../tree/index.js'; import { UmbModalToken } from '@umbraco-cms/backoffice/modal'; import { UMB_TREE_PICKER_MODAL_ALIAS } from '@umbraco-cms/backoffice/tree'; import type { UmbTreePickerModalValue, UmbTreePickerModalData } from '@umbraco-cms/backoffice/tree'; -import type { UmbTemplateTreeItemModel } from '../tree/index.js'; export type UmbTemplatePickerModalData = UmbTreePickerModalData; export type UmbTemplatePickerModalValue = UmbTreePickerModalValue; diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/templates/workspace/template-workspace-editor.element.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/templates/workspace/template-workspace-editor.element.ts index 9292fe26d156..6d2cfb1a731b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/templates/workspace/template-workspace-editor.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/templates/workspace/template-workspace-editor.element.ts @@ -2,6 +2,7 @@ import { getQuerySnippet } from '../../utils/index.js'; import { UMB_TEMPLATE_QUERY_BUILDER_MODAL } from '../modals/query-builder/index.js'; import { UMB_TEMPLATING_SECTION_PICKER_MODAL } from '../../modals/templating-section-picker/templating-section-picker-modal.token.js'; import type { UmbTemplatingInsertMenuElement } from '../../local-components/insert-menu/insert-menu.element.js'; +import { UMB_TEMPLATE_PICKER_MODAL } from '../modals/index.js'; import { UMB_TEMPLATE_WORKSPACE_CONTEXT } from './template-workspace.context-token.js'; import { css, customElement, html, nothing, query, state } from '@umbraco-cms/backoffice/external/lit'; import { UmbLitElement, umbFocus } from '@umbraco-cms/backoffice/lit-element'; @@ -13,7 +14,6 @@ import { umbBindToValidation } from '@umbraco-cms/backoffice/validation'; import '@umbraco-cms/backoffice/code-editor'; import '../../local-components/insert-menu/index.js'; -import { UMB_TEMPLATE_PICKER_MODAL } from '../modals/index.js'; @customElement('umb-template-workspace-editor') export class UmbTemplateWorkspaceEditorElement extends UmbLitElement { diff --git a/src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/block/block.tipap-api.ts b/src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/block/block.tipap-api.ts index 7bc786929195..38dc55c4f8f6 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/block/block.tipap-api.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/block/block.tipap-api.ts @@ -1,3 +1,4 @@ +import { UmbTiptapExtensionApiBase } from '../base.js'; import { distinctUntilChanged } from '@umbraco-cms/backoffice/external/rxjs'; import { Node } from '@umbraco-cms/backoffice/external/tiptap'; import { UMB_BLOCK_RTE_DATA_CONTENT_KEY } from '@umbraco-cms/backoffice/rte'; @@ -5,7 +6,6 @@ import { UMB_BLOCK_RTE_MANAGER_CONTEXT } from '@umbraco-cms/backoffice/block-rte import type { UmbBlockDataModel } from '@umbraco-cms/backoffice/block'; import type { UmbBlockRteLayoutModel } from '@umbraco-cms/backoffice/block-rte'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; -import { UmbTiptapExtensionApiBase } from '../base.js'; declare module '@tiptap/core' { interface Commands { diff --git a/src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/block/block.tiptap-toolbar-api.ts b/src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/block/block.tiptap-toolbar-api.ts index 52d0b001451d..c7a777e359b2 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/block/block.tiptap-toolbar-api.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/block/block.tiptap-toolbar-api.ts @@ -1,8 +1,8 @@ +import { UmbTiptapToolbarElementApiBase } from '../base.js'; import { UMB_BLOCK_RTE_MANAGER_CONTEXT, UMB_BLOCK_RTE_ENTRIES_CONTEXT } from '@umbraco-cms/backoffice/block-rte'; import type { Editor } from '@umbraco-cms/backoffice/external/tiptap'; import type { UmbBlockTypeBaseModel } from '@umbraco-cms/backoffice/block-type'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; -import { UmbTiptapToolbarElementApiBase } from '../base.js'; export default class UmbTiptapBlockPickerToolbarExtension extends UmbTiptapToolbarElementApiBase { #blocks?: Array; diff --git a/src/Umbraco.Web.UI.Client/src/packages/ufm/ufm-component.extension.ts b/src/Umbraco.Web.UI.Client/src/packages/ufm/ufm-component.extension.ts index 7935806e485f..60c5354f92ba 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/ufm/ufm-component.extension.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/ufm/ufm-component.extension.ts @@ -1,5 +1,5 @@ -import type { ManifestApi, UmbApi } from '@umbraco-cms/backoffice/extension-api'; import type { UfmToken } from './plugins/index.js'; +import type { ManifestApi, UmbApi } from '@umbraco-cms/backoffice/extension-api'; export interface UmbUfmComponentApi extends UmbApi { render(token: UfmToken): string | undefined; diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/current-user/current-user-header-app.element.ts b/src/Umbraco.Web.UI.Client/src/packages/user/current-user/current-user-header-app.element.ts index 4ce50fc2651f..84cce8717158 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/current-user/current-user-header-app.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/current-user/current-user-header-app.element.ts @@ -1,10 +1,10 @@ import { UMB_CURRENT_USER_MODAL } from './modals/current-user/current-user-modal.token.js'; +import type { UmbCurrentUserModel } from './types.js'; +import { UMB_CURRENT_USER_CONTEXT } from './constants.js'; import type { CSSResultGroup } from '@umbraco-cms/backoffice/external/lit'; import { css, html, customElement, state } from '@umbraco-cms/backoffice/external/lit'; import { umbOpenModal } from '@umbraco-cms/backoffice/modal'; import { UmbHeaderAppButtonElement } from '@umbraco-cms/backoffice/components'; -import type { UmbCurrentUserModel } from './types.js'; -import { UMB_CURRENT_USER_CONTEXT } from './constants.js'; @customElement('umb-current-user-header-app') export class UmbCurrentUserHeaderAppElement extends UmbHeaderAppButtonElement { diff --git a/src/Umbraco.Web.UI.Client/src/packages/webhook/webhook/workspace/views/webhook-details-workspace-view.element.ts b/src/Umbraco.Web.UI.Client/src/packages/webhook/webhook/workspace/views/webhook-details-workspace-view.element.ts index 09b139b589df..cfe5e4acfa04 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/webhook/webhook/workspace/views/webhook-details-workspace-view.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/webhook/webhook/workspace/views/webhook-details-workspace-view.element.ts @@ -1,6 +1,7 @@ import { UMB_WEBHOOK_WORKSPACE_CONTEXT } from '../webhook-workspace.context-token.js'; import type { UmbInputWebhookHeadersElement } from '../../../components/input-webhook-headers.element.js'; import type { UmbInputWebhookEventsElement } from '../../../webhook-event/input-webhook-events.element.js'; +import type { UmbWebhookDetailModel } from '../../types.js'; import { css, customElement, html, state, nothing } from '@umbraco-cms/backoffice/external/lit'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; @@ -8,7 +9,6 @@ import type { UmbChangeEvent } from '@umbraco-cms/backoffice/event'; import type { UmbInputDocumentTypeElement } from '@umbraco-cms/backoffice/document-type'; import type { UmbWorkspaceViewElement } from '@umbraco-cms/backoffice/workspace'; import type { UUIBooleanInputEvent, UUIInputEvent } from '@umbraco-cms/backoffice/external/uui'; -import type { UmbWebhookDetailModel } from '../../types.js'; import '@umbraco-cms/backoffice/culture'; import '../../../components/input-webhook-headers.element.js'; diff --git a/src/Umbraco.Web.UI.Client/tsconfig.json b/src/Umbraco.Web.UI.Client/tsconfig.json index 2f7cbe500ecf..87e82e73fcf7 100644 --- a/src/Umbraco.Web.UI.Client/tsconfig.json +++ b/src/Umbraco.Web.UI.Client/tsconfig.json @@ -56,8 +56,8 @@ DON'T EDIT THIS FILE DIRECTLY. It is generated by /devops/tsconfig/index.js "@umbraco-cms/backoffice/collection": ["./src/packages/core/collection/index.ts"], "@umbraco-cms/backoffice/components": ["./src/packages/core/components/index.ts"], "@umbraco-cms/backoffice/const": ["./src/packages/core/const/index.ts"], - "@umbraco-cms/backoffice/content-type": ["./src/packages/core/content-type/index.ts"], - "@umbraco-cms/backoffice/content": ["./src/packages/core/content/index.ts"], + "@umbraco-cms/backoffice/content-type": ["./src/packages/content/content-type/index.ts"], + "@umbraco-cms/backoffice/content": ["./src/packages/content/content/index.ts"], "@umbraco-cms/backoffice/culture": ["./src/packages/core/culture/index.ts"], "@umbraco-cms/backoffice/current-user": ["./src/packages/user/current-user/index.ts"], "@umbraco-cms/backoffice/dashboard": ["./src/packages/core/dashboard/index.ts"], @@ -106,7 +106,7 @@ DON'T EDIT THIS FILE DIRECTLY. It is generated by /devops/tsconfig/index.js "@umbraco-cms/backoffice/picker": ["./src/packages/core/picker/index.ts"], "@umbraco-cms/backoffice/property-action": ["./src/packages/core/property-action/index.ts"], "@umbraco-cms/backoffice/property-editor": ["./src/packages/core/property-editor/index.ts"], - "@umbraco-cms/backoffice/property-type": ["./src/packages/core/property-type/index.ts"], + "@umbraco-cms/backoffice/property-type": ["./src/packages/content/property-type/index.ts"], "@umbraco-cms/backoffice/property": ["./src/packages/core/property/index.ts"], "@umbraco-cms/backoffice/recycle-bin": ["./src/packages/core/recycle-bin/index.ts"], "@umbraco-cms/backoffice/relation-type": ["./src/packages/relations/relation-types/index.ts"],