diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/info/types.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/info/types.ts new file mode 100644 index 000000000000..8b959f66e45a --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/info/types.ts @@ -0,0 +1 @@ +export type * from './workspace-info-app.extension.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/info/workspace-info-app.extension.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/info/workspace-info-app.extension.ts new file mode 100644 index 000000000000..ee521b1617ff --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/info/workspace-info-app.extension.ts @@ -0,0 +1,22 @@ +import type { ManifestElement, ManifestWithDynamicConditions } from '@umbraco-cms/backoffice/extension-api'; + +export interface UmbWorkspaceInfoAppElement extends HTMLElement { + manifest?: ManifestWorkspaceInfoApp; +} + +export interface ManifestWorkspaceInfoApp + extends ManifestElement, + ManifestWithDynamicConditions { + type: 'workspaceInfoApp'; + meta: MetaWorkspaceInfoApp; +} + +export interface MetaWorkspaceInfoApp { + label: string; +} + +declare global { + interface UmbExtensionManifestMap { + umbWorkspaceInfoApp: ManifestWorkspaceInfoApp; + } +} diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/types.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/types.ts index 76bb7815af5b..7e0c0fe82e08 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/types.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/types.ts @@ -1,11 +1,12 @@ import type { UmbEntityUnique } from '@umbraco-cms/backoffice/entity'; -export type * from './extensions/types.js'; -export type * from './kinds/types.js'; export type * from './conditions/types.js'; export type * from './data-manager/types.js'; -export type * from './workspace-context.interface.js'; +export type * from './extensions/types.js'; +export type * from './info/types.js'; +export type * from './kinds/types.js'; export type * from './namable/types.js'; +export type * from './workspace-context.interface.js'; /** * @deprecated Use `UmbEntityUnique`instead. diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info-history.element.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/audit-log/info-app/document-history-workspace-info-app.element.ts similarity index 85% rename from src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info-history.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/documents/documents/audit-log/info-app/document-history-workspace-info-app.element.ts index cfa0bc151aac..208ead1d2ec2 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info-history.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/audit-log/info-app/document-history-workspace-info-app.element.ts @@ -1,7 +1,8 @@ -import type { UmbDocumentAuditLogModel } from '../../../audit-log/types.js'; -import { UmbDocumentAuditLogRepository } from '../../../audit-log/index.js'; -import { UMB_DOCUMENT_WORKSPACE_CONTEXT } from '../../document-workspace.context-token.js'; -import { getDocumentHistoryTagStyleAndText, TimeOptions } from './utils.js'; +import { UmbDocumentAuditLogRepository } from '../repository/index.js'; +import { UMB_DOCUMENT_WORKSPACE_CONTEXT } from '../../workspace/constants.js'; +import type { UmbDocumentAuditLogModel } from '../types.js'; +import { TimeOptions } from '../../utils.js'; +import { getDocumentHistoryTagStyleAndText } from './utils.js'; import { css, customElement, html, nothing, repeat, state, when } from '@umbraco-cms/backoffice/external/lit'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { UmbPaginationManager } from '@umbraco-cms/backoffice/utils'; @@ -13,8 +14,8 @@ import type { ManifestEntityAction } from '@umbraco-cms/backoffice/entity-action import type { UmbUserItemModel } from '@umbraco-cms/backoffice/user'; import type { UUIPaginationEvent } from '@umbraco-cms/backoffice/external/uui'; -@customElement('umb-document-workspace-view-info-history') -export class UmbDocumentWorkspaceViewInfoHistoryElement extends UmbLitElement { +@customElement('umb-document-history-workspace-info-app') +export class UmbDocumentHistoryWorkspaceInfoAppElement extends UmbLitElement { #allowedActions = new Set(['Umb.EntityAction.Document.Rollback']); #auditLogRepository = new UmbDocumentAuditLogRepository(this); @@ -98,19 +99,18 @@ export class UmbDocumentWorkspaceViewInfoHistoryElement extends UmbLitElement { override render() { return html` - - this.#allowedActions.has(manifest.alias)}> - + .filter=${(manifest: ManifestEntityAction) => + this.#allowedActions.has(manifest.alias)}> + ${when( this._items, () => this.#renderHistory(), () => html`
`, )} ${this.#renderPagination()} -
`; } @@ -162,6 +162,11 @@ export class UmbDocumentWorkspaceViewInfoHistoryElement extends UmbLitElement { static override styles = [ UmbTextStyles, css` + :host { + display: block; + padding: var(--uui-size-space-4) var(--uui-size-space-5); + } + #loader { display: flex; justify-content: center; @@ -183,10 +188,10 @@ export class UmbDocumentWorkspaceViewInfoHistoryElement extends UmbLitElement { ]; } -export default UmbDocumentWorkspaceViewInfoHistoryElement; +export default UmbDocumentHistoryWorkspaceInfoAppElement; declare global { interface HTMLElementTagNameMap { - 'umb-document-workspace-view-info-history': UmbDocumentWorkspaceViewInfoHistoryElement; + 'umb-document-history-workspace-info-app': UmbDocumentHistoryWorkspaceInfoAppElement; } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/audit-log/info-app/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/audit-log/info-app/manifests.ts new file mode 100644 index 000000000000..cb9782417bc4 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/audit-log/info-app/manifests.ts @@ -0,0 +1,21 @@ +import { UMB_DOCUMENT_WORKSPACE_ALIAS } from '../../workspace/constants.js'; +import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace'; + +export const manifests: Array = [ + { + type: 'workspaceInfoApp', + name: 'Document History Workspace Info App', + alias: 'Umb.WorkspaceInfoApp.Document.History', + element: () => import('./document-history-workspace-info-app.element.js'), + weight: 80, + meta: { + label: '#general_history', + }, + conditions: [ + { + alias: UMB_WORKSPACE_CONDITION_ALIAS, + match: UMB_DOCUMENT_WORKSPACE_ALIAS, + }, + ], + }, +]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/utils.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/audit-log/info-app/utils.ts similarity index 95% rename from src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/utils.ts rename to src/Umbraco.Web.UI.Client/src/packages/documents/documents/audit-log/info-app/utils.ts index 5dc112913f52..fcf0124809a3 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/utils.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/audit-log/info-app/utils.ts @@ -1,4 +1,4 @@ -import { UmbDocumentAuditLog, type UmbDocumentAuditLogType } from '../../../audit-log/utils/index.js'; +import { UmbDocumentAuditLog, type UmbDocumentAuditLogType } from '../utils/index.js'; interface HistoryStyleMap { look: 'default' | 'primary' | 'secondary' | 'outline' | 'placeholder'; @@ -137,12 +137,3 @@ export function getDocumentHistoryTagStyleAndText(type: UmbDocumentAuditLogType) }; } } - -export const TimeOptions: Intl.DateTimeFormatOptions = { - year: 'numeric', - month: 'long', - day: 'numeric', - hour: 'numeric', - minute: 'numeric', - second: 'numeric', -}; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/audit-log/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/audit-log/manifests.ts new file mode 100644 index 000000000000..9680516a9b4a --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/audit-log/manifests.ts @@ -0,0 +1,4 @@ +import { manifests as infoAppManifests } from './info-app/manifests.js'; +import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry'; + +export const manifests: Array = [...infoAppManifests]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/constants.ts index b51328d5925e..456994bdd613 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/constants.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/constants.ts @@ -12,5 +12,6 @@ export * from './reference/constants.js'; export * from './repository/constants.js'; export * from './rollback/constants.js'; export * from './search/constants.js'; +export * from './url/constants.js'; export * from './user-permissions/constants.js'; export * from './workspace/constants.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/index.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/index.ts index b172085015d5..fcc6565ced8d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/index.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/index.ts @@ -1,9 +1,9 @@ import './components/index.js'; -export { UmbDocumentAuditLogRepository } from './audit-log/index.js'; +export * from './audit-log/index.js'; export * from './components/index.js'; -export * from './entity-actions/index.js'; export * from './constants.js'; +export * from './entity-actions/index.js'; export * from './global-contexts/index.js'; export * from './modals/index.js'; export * from './paths.js'; @@ -11,6 +11,7 @@ export * from './publishing/index.js'; export * from './recycle-bin/index.js'; export * from './reference/index.js'; export * from './repository/index.js'; +export * from './url/index.js'; export * from './user-permissions/index.js'; export * from './tree/index.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/manifests.ts index bb29839ea2ff..e744094a3c84 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/manifests.ts @@ -1,3 +1,4 @@ +import { manifests as auditLogManifests } from './audit-log/manifests.js'; import { manifests as collectionManifests } from './collection/manifests.js'; import { manifests as entityActionManifests } from './entity-actions/manifests.js'; import { manifests as entityBulkActionManifests } from './entity-bulk-actions/manifests.js'; @@ -13,12 +14,14 @@ import { manifests as rollbackManifests } from './rollback/manifests.js'; import { manifests as searchProviderManifests } from './search/manifests.js'; import { manifests as trackedReferenceManifests } from './reference/manifests.js'; import { manifests as treeManifests } from './tree/manifests.js'; +import { manifests as urlManifests } from './url/manifests.js'; import { manifests as userPermissionManifests } from './user-permissions/manifests.js'; import { manifests as workspaceManifests } from './workspace/manifests.js'; import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry'; export const manifests: Array = [ + ...auditLogManifests, ...collectionManifests, ...entityActionManifests, ...entityBulkActionManifests, @@ -34,6 +37,7 @@ export const manifests: Array = ...searchProviderManifests, ...trackedReferenceManifests, ...treeManifests, + ...urlManifests, ...userPermissionManifests, ...workspaceManifests, ]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info-reference.element.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/reference/info-app/document-references-workspace-view-info.element.ts similarity index 54% rename from src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info-reference.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/documents/documents/reference/info-app/document-references-workspace-view-info.element.ts index 12cccd21f165..789efc0d632d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info-reference.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/reference/info-app/document-references-workspace-view-info.element.ts @@ -1,5 +1,5 @@ -import { UmbDocumentReferenceRepository } from '../../../reference/index.js'; -import { css, customElement, html, nothing, property, repeat, state, when } from '@umbraco-cms/backoffice/external/lit'; +import { UmbDocumentReferenceRepository } from '../repository/index.js'; +import { css, customElement, html, nothing, repeat, state, when } from '@umbraco-cms/backoffice/external/lit'; import { isDefaultReference, isDocumentReference, isMediaReference } from '@umbraco-cms/backoffice/relations'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; @@ -7,16 +7,11 @@ import { UmbModalRouteRegistrationController } from '@umbraco-cms/backoffice/rou import { UMB_WORKSPACE_MODAL } from '@umbraco-cms/backoffice/workspace'; import type { UmbReferenceModel } from '@umbraco-cms/backoffice/relations'; import type { UUIPaginationEvent } from '@umbraco-cms/backoffice/external/uui'; +import { UMB_DOCUMENT_WORKSPACE_CONTEXT } from '../../constants.js'; +import type { UmbEntityUnique } from '@umbraco-cms/backoffice/entity'; -@customElement('umb-document-workspace-view-info-reference') -export class UmbDocumentWorkspaceViewInfoReferenceElement extends UmbLitElement { - #itemsPerPage = 10; - - #referenceRepository = new UmbDocumentReferenceRepository(this); - - @property() - documentUnique = ''; - +@customElement('umb-document-references-workspace-info-app') +export class UmbDocumentReferencesWorkspaceInfoAppElement extends UmbLitElement { @state() private _editDocumentPath = ''; @@ -29,6 +24,11 @@ export class UmbDocumentWorkspaceViewInfoReferenceElement extends UmbLitElement @state() private _items?: Array = []; + #itemsPerPage = 10; + #referenceRepository = new UmbDocumentReferenceRepository(this); + #documentUnique?: UmbEntityUnique; + #workspaceContext?: typeof UMB_DOCUMENT_WORKSPACE_CONTEXT.TYPE; + constructor() { super(); @@ -40,15 +40,41 @@ export class UmbDocumentWorkspaceViewInfoReferenceElement extends UmbLitElement .observeRouteBuilder((routeBuilder) => { this._editDocumentPath = routeBuilder({}); }); + + this.consumeContext(UMB_DOCUMENT_WORKSPACE_CONTEXT, (context) => { + this.#workspaceContext = context; + this.#observeDocumentUnique(); + }); } - protected override firstUpdated(): void { - this.#getReferences(); + #observeDocumentUnique() { + this.observe( + this.#workspaceContext?.unique, + (unique) => { + if (!unique) { + this.#documentUnique = undefined; + this._items = []; + return; + } + + if (this.#documentUnique === unique) { + return; + } + + this.#documentUnique = unique; + this.#getReferences(); + }, + 'umbReferencesDocumentUniqueObserver', + ); } async #getReferences() { + if (!this.#documentUnique) { + throw new Error('Document unique is required'); + } + const { data } = await this.#referenceRepository.requestReferencedBy( - this.documentUnique, + this.#documentUnique, (this._currentPage - 1) * this.#itemsPerPage, this.#itemsPerPage, ); @@ -111,48 +137,46 @@ export class UmbDocumentWorkspaceViewInfoReferenceElement extends UmbLitElement override render() { if (!this._items?.length) return nothing; return html` - - - - - Name - Status - Type Name - Type - - ${repeat( - this._items, - (item) => item.id, - (item) => html` - - - - - - ${when( - isDocumentReference(item), - () => html` - - ${item.name} - - `, - () => item.name, - )} - - - ${this.#getPublishedStatus(item) - ? this.localize.term('content_published') - : this.localize.term('content_unpublished')} - - ${this.#getContentTypeName(item)} - ${this.#getContentType(item)} - - `, - )} - - + + + + Name + Status + Type Name + Type + + ${repeat( + this._items, + (item) => item.id, + (item) => html` + + + + + + ${when( + isDocumentReference(item), + () => html` + + ${item.name} + + `, + () => item.name, + )} + + + ${this.#getPublishedStatus(item) + ? this.localize.term('content_published') + : this.localize.term('content_unpublished')} + + ${this.#getContentTypeName(item)} + ${this.#getContentType(item)} + + `, + )} + ${this.#renderReferencePagination()} `; } @@ -176,6 +200,7 @@ export class UmbDocumentWorkspaceViewInfoReferenceElement extends UmbLitElement :host { display: contents; } + uui-table-cell:not(.link-cell) { color: var(--uui-color-text-alt); } @@ -194,10 +219,10 @@ export class UmbDocumentWorkspaceViewInfoReferenceElement extends UmbLitElement ]; } -export default UmbDocumentWorkspaceViewInfoReferenceElement; +export default UmbDocumentReferencesWorkspaceInfoAppElement; declare global { interface HTMLElementTagNameMap { - 'umb-document-workspace-view-info-reference': UmbDocumentWorkspaceViewInfoReferenceElement; + 'umb-document-references-workspace-info-app': UmbDocumentReferencesWorkspaceInfoAppElement; } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/reference/info-app/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/reference/info-app/manifests.ts new file mode 100644 index 000000000000..089ecc6fe4a0 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/reference/info-app/manifests.ts @@ -0,0 +1,21 @@ +import { UMB_DOCUMENT_WORKSPACE_ALIAS } from '../../workspace/constants.js'; +import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace'; + +export const manifests: Array = [ + { + type: 'workspaceInfoApp', + name: 'Document References Workspace Info App', + alias: 'Umb.WorkspaceInfoApp.Document.References', + element: () => import('./document-references-workspace-view-info.element.js'), + weight: 90, + meta: { + label: '#references_labelUsedByItems', + }, + conditions: [ + { + alias: UMB_WORKSPACE_CONDITION_ALIAS, + match: UMB_DOCUMENT_WORKSPACE_ALIAS, + }, + ], + }, +]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/reference/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/reference/manifests.ts index 4ac6fbdcb2ff..d804039738aa 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/reference/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/reference/manifests.ts @@ -1,3 +1,4 @@ +import { manifests as infoAppManifests } from './info-app/manifests.js'; import { manifests as repositoryManifests } from './repository/manifests.js'; -export const manifests: Array = [...repositoryManifests]; +export const manifests: Array = [...infoAppManifests, ...repositoryManifests]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/constants.ts index 655e81e66dd1..7a6c4a9d9c73 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/constants.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/constants.ts @@ -1,4 +1,3 @@ export * from './detail/constants.js'; export * from './item/constants.js'; -export * from './url/constants.js'; export * from './validation/constants.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/index.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/index.ts index 4e403fde93b1..8059abd30dde 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/index.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/index.ts @@ -1,6 +1,5 @@ export { UmbDocumentDetailRepository } from './detail/index.js'; export { UmbDocumentItemRepository } from './item/index.js'; -export { UmbDocumentUrlRepository, UMB_DOCUMENT_URL_REPOSITORY_ALIAS } from './url/index.js'; export { UmbDocumentPreviewRepository } from './preview/index.js'; export * from './constants.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/manifests.ts index 7c077b7378a1..4dfb0c911f4e 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/manifests.ts @@ -1,5 +1,4 @@ import { manifests as detailManifests } from './detail/manifests.js'; import { manifests as itemManifests } from './item/manifests.js'; -import { manifests as urlManifests } from './url/manifests.js'; -export const manifests: Array = [...detailManifests, ...itemManifests, ...urlManifests]; +export const manifests: Array = [...detailManifests, ...itemManifests]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/constants.ts new file mode 100644 index 000000000000..41a409dec1f0 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/constants.ts @@ -0,0 +1 @@ +export * from './repository/constants.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/index.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/index.ts new file mode 100644 index 000000000000..03eef61de79a --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/index.ts @@ -0,0 +1,3 @@ +export { UmbDocumentUrlRepository, UMB_DOCUMENT_URL_REPOSITORY_ALIAS } from './repository/index.js'; + +export * from './constants.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info-links.element.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/info-app/document-links-workspace-info-app.element.ts similarity index 89% rename from src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info-links.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/info-app/document-links-workspace-info-app.element.ts index 4024d2297784..a7723cd80130 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info-links.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/info-app/document-links-workspace-info-app.element.ts @@ -1,7 +1,7 @@ -import { UmbDocumentUrlRepository } from '../../../repository/url/document-url.repository.js'; -import { UMB_DOCUMENT_WORKSPACE_CONTEXT } from '../../document-workspace.context-token.js'; -import type { UmbDocumentVariantOptionModel } from '../../../types.js'; -import type { UmbDocumentUrlModel } from '../../../repository/url/types.js'; +import { UmbDocumentUrlRepository } from '../repository/index.js'; +import type { UmbDocumentVariantOptionModel } from '../../types.js'; +import { UMB_DOCUMENT_WORKSPACE_CONTEXT } from '../../workspace/constants.js'; +import type { UmbDocumentUrlModel } from '../repository/types.js'; import { css, customElement, html, nothing, repeat, state, when } from '@umbraco-cms/backoffice/external/lit'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import type { UmbEntityActionEvent } from '@umbraco-cms/backoffice/entity-action'; @@ -18,8 +18,8 @@ interface UmbDocumentInfoViewLink { state: DocumentVariantStateModel | null | undefined; } -@customElement('umb-document-workspace-view-info-links') -export class UmbDocumentWorkspaceViewInfoLinksElement extends UmbLitElement { +@customElement('umb-document-links-workspace-info-app') +export class UmbDocumentLinksWorkspaceInfoAppElement extends UmbLitElement { #documentUrlRepository = new UmbDocumentUrlRepository(this); @state() @@ -155,13 +155,11 @@ export class UmbDocumentWorkspaceViewInfoLinksElement extends UmbLitElement { override render() { return html` - - ${when( - this._loading, - () => this.#renderLoading(), - () => this.#renderContent(), - )} - + ${when( + this._loading, + () => this.#renderLoading(), + () => this.#renderContent(), + )} `; } @@ -284,10 +282,10 @@ export class UmbDocumentWorkspaceViewInfoLinksElement extends UmbLitElement { ]; } -export default UmbDocumentWorkspaceViewInfoLinksElement; +export default UmbDocumentLinksWorkspaceInfoAppElement; declare global { interface HTMLElementTagNameMap { - 'umb-document-workspace-view-info-links': UmbDocumentWorkspaceViewInfoLinksElement; + 'umb-document-links-workspace-info-app': UmbDocumentLinksWorkspaceInfoAppElement; } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/info-app/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/info-app/manifests.ts new file mode 100644 index 000000000000..315eb893995f --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/info-app/manifests.ts @@ -0,0 +1,21 @@ +import { UMB_DOCUMENT_WORKSPACE_ALIAS } from '../../workspace/constants.js'; +import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace'; + +export const manifests: Array = [ + { + type: 'workspaceInfoApp', + name: 'Document Links Workspace Info App', + alias: 'Umb.WorkspaceInfoApp.Document.Links', + element: () => import('./document-links-workspace-info-app.element.js'), + weight: 100, + meta: { + label: '#general_links', + }, + conditions: [ + { + alias: UMB_WORKSPACE_CONDITION_ALIAS, + match: UMB_DOCUMENT_WORKSPACE_ALIAS, + }, + ], + }, +]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/manifests.ts new file mode 100644 index 000000000000..f241b57605f5 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/manifests.ts @@ -0,0 +1,4 @@ +import { manifests as infoAppManifests } from './info-app/manifests.js'; +import { manifests as repositoryManifests } from './repository/manifests.js'; + +export const manifests: Array = [...repositoryManifests, ...infoAppManifests]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/url/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/constants.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/url/constants.ts rename to src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/constants.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/url/document-url.repository.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/document-url.repository.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/url/document-url.repository.ts rename to src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/document-url.repository.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/url/document-url.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/document-url.server.data-source.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/url/document-url.server.data-source.ts rename to src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/document-url.server.data-source.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/url/document-url.store.context-token.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/document-url.store.context-token.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/url/document-url.store.context-token.ts rename to src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/document-url.store.context-token.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/url/document-url.store.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/document-url.store.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/url/document-url.store.ts rename to src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/document-url.store.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/url/index.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/url/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/url/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/manifests.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/url/manifests.ts rename to src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/manifests.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/url/types.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/types.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/url/types.ts rename to src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/types.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/utils.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/utils.ts index a7e8ea7e4dd0..3622652b5111 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/utils.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/utils.ts @@ -37,3 +37,12 @@ export const sortVariants = (a: VariantType, b: VariantType) => { return compareDefault(a, b) || compareMandatory(a, b) || compareState(a, b) || compareName(a, b); }; + +export const TimeOptions: Intl.DateTimeFormatOptions = { + year: 'numeric', + month: 'long', + day: 'numeric', + hour: 'numeric', + minute: 'numeric', + second: 'numeric', +}; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/index.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/index.ts new file mode 100644 index 000000000000..5414064f667b --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/index.ts @@ -0,0 +1 @@ +export * from './document-workspace.context-token.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info.element.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info.element.ts index 0e7c96dadf9f..ff740f699be1 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info.element.ts @@ -1,24 +1,20 @@ import { UMB_DOCUMENT_PROPERTY_DATASET_CONTEXT, UMB_DOCUMENT_WORKSPACE_CONTEXT } from '../../../constants.js'; import type { UmbDocumentVariantModel } from '../../../types.js'; import { UMB_DOCUMENT_PUBLISHING_WORKSPACE_CONTEXT } from '../../../publishing/index.js'; -import { TimeOptions } from './utils.js'; +import { TimeOptions } from '../../../utils.js'; import { css, customElement, html, ifDefined, nothing, state } from '@umbraco-cms/backoffice/external/lit'; import { DocumentVariantStateModel } from '@umbraco-cms/backoffice/external/backend-api'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { UmbModalRouteRegistrationController } from '@umbraco-cms/backoffice/router'; import { UMB_MODAL_MANAGER_CONTEXT } from '@umbraco-cms/backoffice/modal'; -import { UMB_WORKSPACE_MODAL } from '@umbraco-cms/backoffice/workspace'; +import { UMB_WORKSPACE_MODAL, type ManifestWorkspaceInfoApp } from '@umbraco-cms/backoffice/workspace'; import { UMB_TEMPLATE_PICKER_MODAL, UmbTemplateItemRepository } from '@umbraco-cms/backoffice/template'; import type { UmbDocumentTypeDetailModel } from '@umbraco-cms/backoffice/document-type'; import type { UmbModalRouteBuilder } from '@umbraco-cms/backoffice/router'; import { createExtensionApiByAlias } from '@umbraco-cms/backoffice/extension-registry'; import { UMB_SECTION_USER_PERMISSION_CONDITION_ALIAS } from '@umbraco-cms/backoffice/section'; import { UMB_SETTINGS_SECTION_ALIAS } from '@umbraco-cms/backoffice/settings'; - -// import of local components -import './document-workspace-view-info-links.element.js'; -import './document-workspace-view-info-history.element.js'; -import './document-workspace-view-info-reference.element.js'; +import type { UmbExtensionElementInitializer } from '@umbraco-cms/backoffice/extension-api'; @customElement('umb-document-workspace-view-info') export class UmbDocumentWorkspaceViewInfoElement extends UmbLitElement { @@ -182,10 +178,10 @@ export class UmbDocumentWorkspaceViewInfoElement extends UmbLitElement { override render() { return html`
- - - +
@@ -195,6 +191,17 @@ export class UmbDocumentWorkspaceViewInfoElement extends UmbLitElement { `; } + #renderInfoApp(initializer: UmbExtensionElementInitializer) { + const headline = initializer.manifest?.meta.label; + return html` + + ${initializer.component} + `; + } + #renderGeneralSection() { const editDocumentTypePath = this._routeBuilder?.({ entityType: 'document-type' }) ?? ''; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/imaging/components/media-image.element.ts b/src/Umbraco.Web.UI.Client/src/packages/media/imaging/components/media-image.element.ts index c81596b112b4..517bfab56b77 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/imaging/components/media-image.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/imaging/components/media-image.element.ts @@ -1,4 +1,4 @@ -import { UmbMediaUrlRepository } from '../../media/repository/index.js'; +import { UmbMediaUrlRepository } from '../../media/url/index.js'; import { css, customElement, html, nothing, property, state, when } from '@umbraco-cms/backoffice/external/lit'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/audit-log/info-app/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/audit-log/info-app/manifests.ts new file mode 100644 index 000000000000..ff6482b7d789 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/audit-log/info-app/manifests.ts @@ -0,0 +1,21 @@ +import { UMB_MEDIA_WORKSPACE_ALIAS } from '../../workspace/constants.js'; +import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace'; + +export const manifests: Array = [ + { + type: 'workspaceInfoApp', + name: 'Media History Workspace Info App', + alias: 'Umb.WorkspaceInfoApp.Media.History', + element: () => import('./media-history-workspace-info-app.element.js'), + weight: 80, + meta: { + label: '#general_history', + }, + conditions: [ + { + alias: UMB_WORKSPACE_CONDITION_ALIAS, + match: UMB_MEDIA_WORKSPACE_ALIAS, + }, + ], + }, +]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/workspace/views/info/media-workspace-view-info-history.element.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/audit-log/info-app/media-history-workspace-info-app.element.ts similarity index 86% rename from src/Umbraco.Web.UI.Client/src/packages/media/media/workspace/views/info/media-workspace-view-info-history.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/media/media/audit-log/info-app/media-history-workspace-info-app.element.ts index 33ac9a609fa1..9b1d8104f312 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/workspace/views/info/media-workspace-view-info-history.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/audit-log/info-app/media-history-workspace-info-app.element.ts @@ -1,7 +1,7 @@ -import type { UmbMediaAuditLogModel } from '../../../audit-log/types.js'; -import { UmbMediaAuditLogRepository } from '../../../audit-log/index.js'; -import { UMB_MEDIA_WORKSPACE_CONTEXT } from '../../media-workspace.context-token.js'; -import { TimeOptions, getMediaHistoryTagStyleAndText } from './utils.js'; +import { UMB_MEDIA_WORKSPACE_CONTEXT } from '../../workspace/constants.js'; +import type { UmbMediaAuditLogModel } from '../types.js'; +import { UmbMediaAuditLogRepository } from '../repository/index.js'; +import { getMediaHistoryTagStyleAndText, TimeOptions } from './utils.js'; import { css, html, customElement, state, nothing, repeat } from '@umbraco-cms/backoffice/external/lit'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; @@ -10,8 +10,8 @@ import type { UUIPaginationEvent } from '@umbraco-cms/backoffice/external/uui'; import type { UmbUserItemModel } from '@umbraco-cms/backoffice/user'; import { UmbUserItemRepository } from '@umbraco-cms/backoffice/user'; -@customElement('umb-media-workspace-view-info-history') -export class UmbMediaWorkspaceViewInfoHistoryElement extends UmbLitElement { +@customElement('umb-media-history-workspace-info-app') +export class UmbMediaHistoryWorkspaceInfoAppElement extends UmbLitElement { @state() _currentPageNumber = 1; @@ -83,13 +83,10 @@ export class UmbMediaWorkspaceViewInfoHistoryElement extends UmbLitElement { } override render() { - return html` -
-

History

-
+ return html` ${this._items ? this.#renderHistory() : html` `} ${this.#renderPagination()} -
`; + `; } #renderHistory() { @@ -145,6 +142,11 @@ export class UmbMediaWorkspaceViewInfoHistoryElement extends UmbLitElement { static override styles = [ UmbTextStyles, css` + :host { + display: block; + padding: var(--uui-size-space-4) var(--uui-size-space-5); + } + uui-loader-circle { font-size: 2rem; } @@ -172,10 +174,10 @@ export class UmbMediaWorkspaceViewInfoHistoryElement extends UmbLitElement { ]; } -export default UmbMediaWorkspaceViewInfoHistoryElement; +export default UmbMediaHistoryWorkspaceInfoAppElement; declare global { interface HTMLElementTagNameMap { - 'umb-media-workspace-view-info-history': UmbMediaWorkspaceViewInfoHistoryElement; + 'umb-media-workspace-view-info-history': UmbMediaHistoryWorkspaceInfoAppElement; } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/workspace/views/info/utils.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/audit-log/info-app/utils.ts similarity index 87% rename from src/Umbraco.Web.UI.Client/src/packages/media/media/workspace/views/info/utils.ts rename to src/Umbraco.Web.UI.Client/src/packages/media/media/audit-log/info-app/utils.ts index f4290ab2c017..e410f350d42c 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/workspace/views/info/utils.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/audit-log/info-app/utils.ts @@ -1,5 +1,5 @@ -import type { UmbMediaAuditLogType } from '../../../audit-log/utils/index.js'; -import { UmbMediaAuditLog } from '../../../audit-log/utils/index.js'; +import type { UmbMediaAuditLogType } from '../utils/index.js'; +import { UmbMediaAuditLog } from '../utils/index.js'; interface HistoryStyleMap { look: 'default' | 'primary' | 'secondary' | 'outline' | 'placeholder'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/audit-log/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/audit-log/manifests.ts new file mode 100644 index 000000000000..c72138184b5a --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/audit-log/manifests.ts @@ -0,0 +1,3 @@ +import { manifests as infoAppManifests } from './info-app/manifests.js'; + +export const manifests: Array = [...infoAppManifests]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/constants.ts index ef2d8e44dfe8..e873149ff56e 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/constants.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/constants.ts @@ -8,6 +8,7 @@ export * from './recycle-bin/constants.js'; export * from './reference/constants.js'; export * from './repository/constants.js'; export * from './tree/constants.js'; +export * from './url/constants.js'; export * from './workspace/constants.js'; export * from './paths.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/index.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/index.ts index 377c05b6dc47..f9957ebb0d9b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/index.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/index.ts @@ -1,9 +1,10 @@ export * from './components/index.js'; -export * from './dropzone/index.js'; export * from './constants.js'; +export * from './dropzone/index.js'; export * from './reference/index.js'; export * from './repository/index.js'; export * from './search/index.js'; +export * from './url/index.js'; export * from './utils/index.js'; export { UmbMediaAuditLogRepository } from './audit-log/index.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/manifests.ts index d6f8ad84e405..1b61cda60755 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/manifests.ts @@ -1,31 +1,37 @@ +import { manifests as auditLogManifests } from './audit-log/manifests.js'; import { manifests as collectionManifests } from './collection/manifests.js'; import { manifests as dropzoneManifests } from './dropzone/manifests.js'; import { manifests as entityActionsManifests } from './entity-actions/manifests.js'; import { manifests as entityBulkActionsManifests } from './entity-bulk-actions/manifests.js'; +import { manifests as fileUploadPreviewManifests } from './components/input-upload-field/manifests.js'; import { manifests as menuManifests } from './menu/manifests.js'; import { manifests as modalManifests } from './modals/manifests.js'; import { manifests as propertyEditorsManifests } from './property-editors/manifests.js'; import { manifests as recycleBinManifests } from './recycle-bin/manifests.js'; +import { manifests as referenceManifests } from './reference/manifests.js'; import { manifests as repositoryManifests } from './repository/manifests.js'; import { manifests as searchManifests } from './search/manifests.js'; import { manifests as sectionViewManifests } from './dashboard/manifests.js'; import { manifests as treeManifests } from './tree/manifests.js'; +import { manifests as urlManifests } from './url/manifests.js'; import { manifests as workspaceManifests } from './workspace/manifests.js'; -import { manifests as fileUploadPreviewManifests } from './components/input-upload-field/manifests.js'; export const manifests: Array = [ + ...auditLogManifests, ...collectionManifests, ...dropzoneManifests, ...entityActionsManifests, ...entityBulkActionsManifests, + ...fileUploadPreviewManifests, ...menuManifests, ...modalManifests, ...propertyEditorsManifests, ...recycleBinManifests, + ...referenceManifests, ...repositoryManifests, ...searchManifests, ...sectionViewManifests, ...treeManifests, + ...urlManifests, ...workspaceManifests, - ...fileUploadPreviewManifests, ]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/modals/image-cropper-editor/image-cropper-editor-modal.element.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/modals/image-cropper-editor/image-cropper-editor-modal.element.ts index 33a7bbfa082d..cd2b11c38830 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/modals/image-cropper-editor/image-cropper-editor-modal.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/modals/image-cropper-editor/image-cropper-editor-modal.element.ts @@ -1,8 +1,8 @@ -import { UmbMediaUrlRepository } from '../../repository/index.js'; import { UMB_MEDIA_PICKER_MODAL } from '../media-picker/media-picker-modal.token.js'; import type { UmbCropModel } from '../../types.js'; import type { UmbInputImageCropperFieldElement } from '../../components/input-image-cropper/image-cropper-field.element.js'; import type { UmbImageCropperPropertyEditorValue } from '../../components/index.js'; +import { UmbMediaUrlRepository } from '../../url/index.js'; import type { UmbImageCropperEditorModalData, UmbImageCropperEditorModalValue, diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/reference/info-app/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/reference/info-app/manifests.ts new file mode 100644 index 000000000000..772ac537704f --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/reference/info-app/manifests.ts @@ -0,0 +1,21 @@ +import { UMB_MEDIA_WORKSPACE_ALIAS } from '../../workspace/constants.js'; +import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace'; + +export const manifests: Array = [ + { + type: 'workspaceInfoApp', + name: 'Media References Workspace Info App', + alias: 'Umb.WorkspaceInfoApp.Media.References', + element: () => import('./media-references-workspace-info-app.element.js'), + weight: 90, + meta: { + label: '#references_labelUsedByItems', + }, + conditions: [ + { + alias: UMB_WORKSPACE_CONDITION_ALIAS, + match: UMB_MEDIA_WORKSPACE_ALIAS, + }, + ], + }, +]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/workspace/views/info/media-workspace-view-info-reference.element.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/reference/info-app/media-references-workspace-info-app.element.ts similarity index 78% rename from src/Umbraco.Web.UI.Client/src/packages/media/media/workspace/views/info/media-workspace-view-info-reference.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/media/media/reference/info-app/media-references-workspace-info-app.element.ts index 4f9aaa6bb868..1b2b6ddcccdd 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/workspace/views/info/media-workspace-view-info-reference.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/reference/info-app/media-references-workspace-info-app.element.ts @@ -1,5 +1,6 @@ -import { UmbMediaReferenceRepository } from '../../../reference/index.js'; -import { css, customElement, html, nothing, property, repeat, state, when } from '@umbraco-cms/backoffice/external/lit'; +import { UmbMediaReferenceRepository } from '../repository/index.js'; +import { UMB_MEDIA_WORKSPACE_CONTEXT } from '../../workspace/constants.js'; +import { css, customElement, html, nothing, repeat, state, when } from '@umbraco-cms/backoffice/external/lit'; import { isDefaultReference, isDocumentReference, isMediaReference } from '@umbraco-cms/backoffice/relations'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { UmbModalRouteRegistrationController } from '@umbraco-cms/backoffice/router'; @@ -8,18 +9,16 @@ import { UMB_WORKSPACE_MODAL } from '@umbraco-cms/backoffice/workspace'; import type { UmbReferenceModel } from '@umbraco-cms/backoffice/relations'; import type { UmbModalRouteBuilder } from '@umbraco-cms/backoffice/router'; import type { UUIPaginationEvent } from '@umbraco-cms/backoffice/external/uui'; +import type { UmbEntityUnique } from '@umbraco-cms/backoffice/entity'; -@customElement('umb-media-workspace-view-info-reference') -export class UmbMediaWorkspaceViewInfoReferenceElement extends UmbLitElement { +@customElement('umb-media-references-workspace-info-app') +export class UmbMediaReferencesWorkspaceInfoAppElement extends UmbLitElement { #itemsPerPage = 10; #referenceRepository; #routeBuilder?: UmbModalRouteBuilder; - @property() - mediaUnique = ''; - @state() private _currentPage = 1; @@ -32,6 +31,9 @@ export class UmbMediaWorkspaceViewInfoReferenceElement extends UmbLitElement { @state() private _loading = true; + #workspaceContext?: typeof UMB_MEDIA_WORKSPACE_CONTEXT.TYPE; + #mediaUnique?: UmbEntityUnique; + constructor() { super(); this.#referenceRepository = new UmbMediaReferenceRepository(this); @@ -44,6 +46,32 @@ export class UmbMediaWorkspaceViewInfoReferenceElement extends UmbLitElement { .observeRouteBuilder((routeBuilder) => { this.#routeBuilder = routeBuilder; }); + + this.consumeContext(UMB_MEDIA_WORKSPACE_CONTEXT, (context) => { + this.#workspaceContext = context; + this.#observeMediaUnique(); + }); + } + + #observeMediaUnique() { + this.observe( + this.#workspaceContext?.unique, + (unique) => { + if (!unique) { + this.#mediaUnique = undefined; + this._items = []; + return; + } + + if (this.#mediaUnique === unique) { + return; + } + + this.#mediaUnique = unique; + this.#getReferences(); + }, + 'umbReferencesDocumentUniqueObserver', + ); } protected override firstUpdated(): void { @@ -51,10 +79,14 @@ export class UmbMediaWorkspaceViewInfoReferenceElement extends UmbLitElement { } async #getReferences() { + if (!this.#mediaUnique) { + throw new Error('Media unique is required'); + } + this._loading = true; const { data } = await this.#referenceRepository.requestReferencedBy( - this.mediaUnique, + this.#mediaUnique, (this._currentPage - 1) * this.#itemsPerPage, this.#itemsPerPage, ); @@ -124,13 +156,11 @@ export class UmbMediaWorkspaceViewInfoReferenceElement extends UmbLitElement { override render() { return html` - - ${when( - this._loading, - () => html``, - () => html`${this.#renderItems()} ${this.#renderPagination()}`, - )} - + ${when( + this._loading, + () => html``, + () => html`${this.#renderItems()} ${this.#renderPagination()}`, + )} `; } @@ -218,10 +248,10 @@ export class UmbMediaWorkspaceViewInfoReferenceElement extends UmbLitElement { ]; } -export default UmbMediaWorkspaceViewInfoReferenceElement; +export default UmbMediaReferencesWorkspaceInfoAppElement; declare global { interface HTMLElementTagNameMap { - 'umb-media-workspace-view-info-reference': UmbMediaWorkspaceViewInfoReferenceElement; + 'umb-media-references-workspace-info-app': UmbMediaReferencesWorkspaceInfoAppElement; } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/reference/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/reference/manifests.ts index 4ac6fbdcb2ff..cad6350ec827 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/reference/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/reference/manifests.ts @@ -1,3 +1,4 @@ import { manifests as repositoryManifests } from './repository/manifests.js'; +import { manifests as infoAppManifests } from './info-app/manifests.js'; -export const manifests: Array = [...repositoryManifests]; +export const manifests: Array = [...repositoryManifests, ...infoAppManifests]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/constants.ts index 655e81e66dd1..7a6c4a9d9c73 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/constants.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/constants.ts @@ -1,4 +1,3 @@ export * from './detail/constants.js'; export * from './item/constants.js'; -export * from './url/constants.js'; export * from './validation/constants.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/index.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/index.ts index 034f9d529ba5..d55093c76181 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/index.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/index.ts @@ -1,3 +1,2 @@ export { UmbMediaDetailRepository } from './detail/index.js'; export { UmbMediaItemRepository } from './item/index.js'; -export { UmbMediaUrlRepository } from './url/index.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/manifests.ts index 62a6814b7013..74a3121896bb 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/manifests.ts @@ -1,11 +1,5 @@ import { manifests as detailManifests } from './detail/manifests.js'; import { manifests as itemManifests } from './item/manifests.js'; -import { manifests as urlManifests } from './url/manifests.js'; import { manifests as validationManifests } from './validation/manifests.js'; -export const manifests: Array = [ - ...detailManifests, - ...itemManifests, - ...urlManifests, - ...validationManifests, -]; +export const manifests: Array = [...detailManifests, ...itemManifests, ...validationManifests]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/types.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/types.ts index 6988c782f6df..3c4135818c76 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/types.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/types.ts @@ -1,2 +1 @@ -export type { UmbMediaUrlModel } from './url/types.js'; export type { UmbMediaItemModel } from './item/types.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/types.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/types.ts index ade991b00fc2..c9545de5a05e 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/types.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/types.ts @@ -6,11 +6,12 @@ import type { UmbContentDetailModel, UmbElementValueModel } from '@umbraco-cms/b export type * from './audit-log/types.js'; export type * from './collection/types.js'; export type * from './dropzone/types.js'; -export type * from './recycle-bin/types.js'; export type * from './modals/types.js'; +export type * from './recycle-bin/types.js'; export type * from './repository/types.js'; export type * from './search/types.js'; export type * from './tree/types.js'; +export type * from './url/types.js'; export interface UmbMediaDetailModel extends UmbContentDetailModel { mediaType: { diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/url/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/constants.ts new file mode 100644 index 000000000000..41a409dec1f0 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/constants.ts @@ -0,0 +1 @@ +export * from './repository/constants.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/url/index.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/index.ts new file mode 100644 index 000000000000..3d76f338dddc --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/index.ts @@ -0,0 +1 @@ +export * from './repository/index.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/url/info-app/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/info-app/manifests.ts new file mode 100644 index 000000000000..fe093b2a4108 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/info-app/manifests.ts @@ -0,0 +1,21 @@ +import { UMB_MEDIA_WORKSPACE_ALIAS } from '../../workspace/constants.js'; +import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace'; + +export const manifests: Array = [ + { + type: 'workspaceInfoApp', + name: 'Media Links Workspace Info App', + alias: 'Umb.WorkspaceInfoApp.Media.Links', + element: () => import('./media-links-workspace-info-app.element.js'), + weight: 100, + meta: { + label: '#general_links', + }, + conditions: [ + { + alias: UMB_WORKSPACE_CONDITION_ALIAS, + match: UMB_MEDIA_WORKSPACE_ALIAS, + }, + ], + }, +]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/url/info-app/media-links-workspace-info-app.element.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/info-app/media-links-workspace-info-app.element.ts new file mode 100644 index 000000000000..b3994befd03a --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/info-app/media-links-workspace-info-app.element.ts @@ -0,0 +1,142 @@ +import { UMB_MEDIA_WORKSPACE_CONTEXT } from '../../workspace/constants.js'; +import type { MediaUrlInfoModel } from '@umbraco-cms/backoffice/external/backend-api'; +import { css, customElement, html, repeat, state } from '@umbraco-cms/backoffice/external/lit'; +import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; + +@customElement('umb-media-links-workspace-info-app') +export class UmbMediaLinksWorkspaceInfoAppElement extends UmbLitElement { + @state() + private _urls?: Array; + + #workspaceContext?: typeof UMB_MEDIA_WORKSPACE_CONTEXT.TYPE; + + constructor() { + super(); + + this.consumeContext(UMB_MEDIA_WORKSPACE_CONTEXT, (context) => { + this.#workspaceContext = context; + this.#observeUrls(); + }); + } + + #observeUrls() { + if (!this.#workspaceContext) return; + + this.observe( + this.#workspaceContext.urls, + (urls) => { + this._urls = urls; + }, + '__urls', + ); + } + + protected override render() { + return html` ${this.#renderLinksSection()} `; + } + + #openSvg(imagePath: string) { + const popup = window.open('', '_blank'); + if (!popup) return; + + const html = ` + + + +`; + + popup.document.open(); + popup.document.write(html); + popup.document.close(); + } + + #renderLinksSection() { + if (this._urls && this._urls.length) { + return html` + ${repeat( + this._urls, + (item) => item.url, + (item) => this.#renderLinkItem(item), + )} + `; + } else { + return html` + + `; + } + } + + #renderLinkItem(item: MediaUrlInfoModel) { + const ext = item.url.split(/[#?]/)[0].split('.').pop()?.trim(); + if (ext === 'svg') { + return html` + this.#openSvg(item.url)}> + ${item.url} + + + `; + } else { + return html` + + ${item.url} + + + `; + } + } + + static override styles = [ + css` + uui-box { + --uui-box-default-padding: 0; + } + + #link-section { + display: flex; + flex-direction: column; + text-align: left; + } + + .link-item { + padding: var(--uui-size-space-4) var(--uui-size-space-6); + display: grid; + grid-template-columns: 1fr auto; + gap: var(--uui-size-6); + color: inherit; + text-decoration: none; + word-break: break-all; + } + + .link-language { + color: var(--uui-color-divider-emphasis); + } + + .link-content.italic { + font-style: italic; + } + + .link-item uui-icon { + margin-right: var(--uui-size-space-2); + vertical-align: middle; + } + + .link-item.with-href { + cursor: pointer; + } + + .link-item.with-href:hover { + background: var(--uui-color-divider); + } + `, + ]; +} + +export default UmbMediaLinksWorkspaceInfoAppElement; + +declare global { + interface HTMLElementTagNameMap { + 'umb-media-links-workspace-info-app': UmbMediaLinksWorkspaceInfoAppElement; + } +} diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/url/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/manifests.ts new file mode 100644 index 000000000000..cad6350ec827 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/manifests.ts @@ -0,0 +1,4 @@ +import { manifests as repositoryManifests } from './repository/manifests.js'; +import { manifests as infoAppManifests } from './info-app/manifests.js'; + +export const manifests: Array = [...repositoryManifests, ...infoAppManifests]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/url/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/constants.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/media/media/repository/url/constants.ts rename to src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/constants.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/url/index.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/media/media/repository/url/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/url/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/manifests.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/media/media/repository/url/manifests.ts rename to src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/manifests.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/url/media-url.repository.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/media-url.repository.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/media/media/repository/url/media-url.repository.ts rename to src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/media-url.repository.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/url/media-url.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/media-url.server.data-source.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/media/media/repository/url/media-url.server.data-source.ts rename to src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/media-url.server.data-source.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/url/media-url.store.context-token.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/media-url.store.context-token.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/media/media/repository/url/media-url.store.context-token.ts rename to src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/media-url.store.context-token.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/url/media-url.store.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/media-url.store.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/media/media/repository/url/media-url.store.ts rename to src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/media-url.store.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/repository/url/types.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/types.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/media/media/repository/url/types.ts rename to src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/types.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/url/types.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/types.ts new file mode 100644 index 000000000000..e32ac4b889fe --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/types.ts @@ -0,0 +1 @@ +export type * from './repository/types.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/workspace/views/info/media-workspace-view-info.element.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/workspace/views/info/media-workspace-view-info.element.ts index c79e95d0f4c3..511de01adbfe 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/workspace/views/info/media-workspace-view-info.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/workspace/views/info/media-workspace-view-info.element.ts @@ -1,20 +1,17 @@ import { UMB_MEDIA_WORKSPACE_CONTEXT } from '../../media-workspace.context-token.js'; -import { TimeOptions } from './utils.js'; +import { TimeOptions } from '../../../audit-log/info-app/utils.js'; import { css, customElement, html, ifDefined, nothing, repeat, state } from '@umbraco-cms/backoffice/external/lit'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import type { UmbMediaTypeItemModel } from '@umbraco-cms/backoffice/media-type'; import { UMB_MEDIA_TYPE_ENTITY_TYPE, UmbMediaTypeItemRepository } from '@umbraco-cms/backoffice/media-type'; import { UmbModalRouteRegistrationController } from '@umbraco-cms/backoffice/router'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; -import { UMB_WORKSPACE_MODAL } from '@umbraco-cms/backoffice/workspace'; +import { UMB_WORKSPACE_MODAL, type ManifestWorkspaceInfoApp } from '@umbraco-cms/backoffice/workspace'; import type { MediaUrlInfoModel } from '@umbraco-cms/backoffice/external/backend-api'; import { createExtensionApiByAlias } from '@umbraco-cms/backoffice/extension-registry'; import { UMB_SECTION_USER_PERMISSION_CONDITION_ALIAS } from '@umbraco-cms/backoffice/section'; import { UMB_SETTINGS_SECTION_ALIAS } from '@umbraco-cms/backoffice/settings'; - -// import of local components -import './media-workspace-view-info-history.element.js'; -import './media-workspace-view-info-reference.element.js'; +import type { UmbExtensionElementInitializer } from '@umbraco-cms/backoffice/extension-api'; @customElement('umb-media-workspace-view-info') export class UmbMediaWorkspaceViewInfoElement extends UmbLitElement { @@ -37,9 +34,6 @@ export class UmbMediaWorkspaceViewInfoElement extends UmbLitElement { #mediaTypeItemRepository = new UmbMediaTypeItemRepository(this); - @state() - private _urls?: Array; - @state() private _createDate?: string | null = null; @@ -90,14 +84,6 @@ export class UmbMediaWorkspaceViewInfoElement extends UmbLitElement { #observeContent() { if (!this.#workspaceContext) return; - this.observe( - this.#workspaceContext.urls, - (urls) => { - this._urls = urls; - }, - '__urls', - ); - this.observe( this.#workspaceContext.unique, (unique) => { @@ -112,33 +98,14 @@ export class UmbMediaWorkspaceViewInfoElement extends UmbLitElement { this._updateDate = variants?.[0]?.updateDate; }); } - #openSvg(imagePath: string) { - const popup = window.open('', '_blank'); - if (!popup) return; - - const html = ` - - - -`; - - popup.document.open(); - popup.document.write(html); - popup.document.close(); - } override render() { return html`
- - - - - - - +
item.url, - (item) => this.#renderLinkItem(item), - )} - `; - } else { - return html` - - `; - } - } - - #renderLinkItem(item: MediaUrlInfoModel) { - const ext = item.url.split(/[#?]/)[0].split('.').pop()?.trim(); - if (ext === 'svg') { - return html` - this.#openSvg(item.url)}> - ${item.url} - - - `; - } else { - return html` - - ${item.url} - - - `; - } + #renderInfoApp(initializer: UmbExtensionElementInitializer) { + const headline = initializer.manifest?.meta.label; + return html` + + ${initializer.component} + `; } #renderGeneralSection() { @@ -264,44 +205,6 @@ export class UmbMediaWorkspaceViewInfoElement extends UmbLitElement { margin-bottom: var(--uui-size-space-6); } - // Link section - - #link-section { - display: flex; - flex-direction: column; - text-align: left; - } - - .link-item { - padding: var(--uui-size-space-4) var(--uui-size-space-6); - display: grid; - grid-template-columns: 1fr auto; - gap: var(--uui-size-6); - color: inherit; - text-decoration: none; - } - - .link-language { - color: var(--uui-color-divider-emphasis); - } - - .link-content.italic { - font-style: italic; - } - - .link-item uui-icon { - margin-right: var(--uui-size-space-2); - vertical-align: middle; - } - - .link-item.with-href { - cursor: pointer; - } - - .link-item.with-href:hover { - background: var(--uui-color-divider); - } - uui-ref-node-document-type[readonly] { padding-top: 7px; padding-bottom: 7px; diff --git a/src/Umbraco.Web.UI.Client/utils/all-umb-consts/index.ts b/src/Umbraco.Web.UI.Client/utils/all-umb-consts/index.ts index e8d76f2d6502..1b53a43a1f02 100644 --- a/src/Umbraco.Web.UI.Client/utils/all-umb-consts/index.ts +++ b/src/Umbraco.Web.UI.Client/utils/all-umb-consts/index.ts @@ -140,7 +140,7 @@ export const foundConsts = [{ }, { path: '@umbraco-cms/backoffice/document', - consts: ["UMB_DOCUMENT_COLLECTION_ALIAS","UMB_DOCUMENT_COLLECTION_CONTEXT","UMB_DOCUMENT_COLLECTION_REPOSITORY_ALIAS","UMB_DOCUMENT_GRID_COLLECTION_VIEW_ALIAS","UMB_DOCUMENT_TABLE_COLLECTION_VIEW_ALIAS","UMB_DOCUMENT_CREATE_OPTIONS_MODAL","UMB_CREATE_BLUEPRINT_MODAL","UMB_DOCUMENT_CREATE_BLUEPRINT_REPOSITORY_ALIAS","UMB_CULTURE_AND_HOSTNAMES_MODAL","UMB_DOCUMENT_CULTURE_AND_HOSTNAMES_REPOSITORY_ALIAS","UMB_DUPLICATE_DOCUMENT_MODAL","UMB_DUPLICATE_DOCUMENT_MODAL_ALIAS","UMB_DUPLICATE_DOCUMENT_REPOSITORY_ALIAS","UMB_MOVE_DOCUMENT_REPOSITORY_ALIAS","UMB_DOCUMENT_NOTIFICATIONS_MODAL","UMB_DOCUMENT_NOTIFICATIONS_MODAL_ALIAS","UMB_DOCUMENT_NOTIFICATIONS_REPOSITORY_ALIAS","UMB_PUBLIC_ACCESS_MODAL","UMB_DOCUMENT_PUBLIC_ACCESS_REPOSITORY_ALIAS","UMB_SORT_CHILDREN_OF_DOCUMENT_REPOSITORY_ALIAS","UMB_BULK_DUPLICATE_DOCUMENT_REPOSITORY_ALIAS","UMB_BULK_MOVE_DOCUMENT_REPOSITORY_ALIAS","UMB_BULK_TRASH_DOCUMENT_REPOSITORY_ALIAS","UMB_DOCUMENT_ENTITY_TYPE","UMB_DOCUMENT_ROOT_ENTITY_TYPE","UMB_DOCUMENT_CONFIGURATION_CONTEXT","UMB_CONTENT_MENU_ALIAS","UMB_DOCUMENT_PICKER_MODAL","UMB_DOCUMENT_SAVE_MODAL","UMB_DOCUMENT_SAVE_MODAL_ALIAS","UMB_DOCUMENT_WORKSPACE_PATH","UMB_CREATE_FROM_BLUEPRINT_DOCUMENT_WORKSPACE_PATH_PATTERN","UMB_CREATE_DOCUMENT_WORKSPACE_PATH_PATTERN","UMB_EDIT_DOCUMENT_WORKSPACE_PATH_PATTERN","UMB_DOCUMENT_PROPERTY_DATASET_CONTEXT","UMB_DOCUMENT_PUBLISH_MODAL_ALIAS","UMB_DOCUMENT_PUBLISH_MODAL","UMB_DOCUMENT_PUBLISH_WITH_DESCENDANTS_MODAL_ALIAS","UMB_DOCUMENT_PUBLISH_WITH_DESCENDANTS_MODAL","UMB_DOCUMENT_PUBLISHING_REPOSITORY_ALIAS","UMB_DOCUMENT_SCHEDULE_MODAL_ALIAS","UMB_DOCUMENT_SCHEDULE_MODAL","UMB_DOCUMENT_UNPUBLISH_MODAL_ALIAS","UMB_DOCUMENT_UNPUBLISH_MODAL","UMB_DOCUMENT_PUBLISHING_WORKSPACE_CONTEXT","UMB_DOCUMENT_RECYCLE_BIN_ROOT_ENTITY_TYPE","UMB_DOCUMENT_RECYCLE_BIN_REPOSITORY_ALIAS","UMB_DOCUMENT_RECYCLE_BIN_TREE_REPOSITORY_ALIAS","UMB_DOCUMENT_RECYCLE_BIN_TREE_STORE_ALIAS","UMB_DOCUMENT_RECYCLE_BIN_TREE_ALIAS","UMB_DOCUMENT_RECYCLE_BIN_TREE_STORE_CONTEXT","UMB_DOCUMENT_REFERENCE_REPOSITORY_ALIAS","UMB_DOCUMENT_DETAIL_REPOSITORY_ALIAS","UMB_DOCUMENT_DETAIL_STORE_ALIAS","UMB_DOCUMENT_DETAIL_STORE_CONTEXT","UMB_DOCUMENT_ITEM_REPOSITORY_ALIAS","UMB_DOCUMENT_STORE_ALIAS","UMB_DOCUMENT_ITEM_STORE_CONTEXT","UMB_DOCUMENT_URL_REPOSITORY_ALIAS","UMB_DOCUMENT_URL_STORE_ALIAS","UMB_DOCUMENT_URL_STORE_CONTEXT","UMB_DOCUMENT_VALIDATION_REPOSITORY_ALIAS","UMB_ROLLBACK_MODAL_ALIAS","UMB_ROLLBACK_MODAL","UMB_ROLLBACK_REPOSITORY_ALIAS","UMB_DOCUMENT_SEARCH_PROVIDER_ALIAS","UMB_DOCUMENT_TREE_STORE_CONTEXT","UMB_DOCUMENT_TREE_REPOSITORY_ALIAS","UMB_DOCUMENT_TREE_STORE_ALIAS","UMB_DOCUMENT_TREE_ALIAS","UMB_DOCUMENT_USER_PERMISSION_CONDITION_ALIAS","UMB_USER_PERMISSION_DOCUMENT_CREATE","UMB_USER_PERMISSION_DOCUMENT_READ","UMB_USER_PERMISSION_DOCUMENT_UPDATE","UMB_USER_PERMISSION_DOCUMENT_DELETE","UMB_USER_PERMISSION_DOCUMENT_CREATE_BLUEPRINT","UMB_USER_PERMISSION_DOCUMENT_NOTIFICATIONS","UMB_USER_PERMISSION_DOCUMENT_PUBLISH","UMB_USER_PERMISSION_DOCUMENT_PERMISSIONS","UMB_USER_PERMISSION_DOCUMENT_UNPUBLISH","UMB_USER_PERMISSION_DOCUMENT_DUPLICATE","UMB_USER_PERMISSION_DOCUMENT_MOVE","UMB_USER_PERMISSION_DOCUMENT_SORT","UMB_USER_PERMISSION_DOCUMENT_CULTURE_AND_HOSTNAMES","UMB_USER_PERMISSION_DOCUMENT_PUBLIC_ACCESS","UMB_USER_PERMISSION_DOCUMENT_ROLLBACK","UMB_DOCUMENT_PERMISSION_REPOSITORY_ALIAS","UMB_DOCUMENT_IS_NOT_TRASHED_CONDITION_ALIAS","UMB_DOCUMENT_IS_TRASHED_CONDITION_ALIAS","UMB_DOCUMENT_WORKSPACE_ALIAS","UMB_DOCUMENT_DETAIL_MODEL_VARIANT_SCAFFOLD","UMB_DOCUMENT_WORKSPACE_CONTEXT"] + consts: ["UMB_DOCUMENT_COLLECTION_ALIAS","UMB_DOCUMENT_COLLECTION_CONTEXT","UMB_DOCUMENT_COLLECTION_REPOSITORY_ALIAS","UMB_DOCUMENT_GRID_COLLECTION_VIEW_ALIAS","UMB_DOCUMENT_TABLE_COLLECTION_VIEW_ALIAS","UMB_DOCUMENT_CREATE_OPTIONS_MODAL","UMB_CREATE_BLUEPRINT_MODAL","UMB_DOCUMENT_CREATE_BLUEPRINT_REPOSITORY_ALIAS","UMB_CULTURE_AND_HOSTNAMES_MODAL","UMB_DOCUMENT_CULTURE_AND_HOSTNAMES_REPOSITORY_ALIAS","UMB_DUPLICATE_DOCUMENT_MODAL","UMB_DUPLICATE_DOCUMENT_MODAL_ALIAS","UMB_DUPLICATE_DOCUMENT_REPOSITORY_ALIAS","UMB_MOVE_DOCUMENT_REPOSITORY_ALIAS","UMB_DOCUMENT_NOTIFICATIONS_MODAL","UMB_DOCUMENT_NOTIFICATIONS_MODAL_ALIAS","UMB_DOCUMENT_NOTIFICATIONS_REPOSITORY_ALIAS","UMB_PUBLIC_ACCESS_MODAL","UMB_DOCUMENT_PUBLIC_ACCESS_REPOSITORY_ALIAS","UMB_SORT_CHILDREN_OF_DOCUMENT_REPOSITORY_ALIAS","UMB_BULK_DUPLICATE_DOCUMENT_REPOSITORY_ALIAS","UMB_BULK_MOVE_DOCUMENT_REPOSITORY_ALIAS","UMB_BULK_TRASH_DOCUMENT_REPOSITORY_ALIAS","UMB_DOCUMENT_ENTITY_TYPE","UMB_DOCUMENT_ROOT_ENTITY_TYPE","UMB_DOCUMENT_CONFIGURATION_CONTEXT","UMB_CONTENT_MENU_ALIAS","UMB_DOCUMENT_PICKER_MODAL","UMB_DOCUMENT_SAVE_MODAL","UMB_DOCUMENT_SAVE_MODAL_ALIAS","UMB_DOCUMENT_WORKSPACE_PATH","UMB_CREATE_FROM_BLUEPRINT_DOCUMENT_WORKSPACE_PATH_PATTERN","UMB_CREATE_DOCUMENT_WORKSPACE_PATH_PATTERN","UMB_EDIT_DOCUMENT_WORKSPACE_PATH_PATTERN","UMB_DOCUMENT_PROPERTY_DATASET_CONTEXT","UMB_DOCUMENT_PUBLISH_MODAL_ALIAS","UMB_DOCUMENT_PUBLISH_MODAL","UMB_DOCUMENT_PUBLISH_WITH_DESCENDANTS_MODAL_ALIAS","UMB_DOCUMENT_PUBLISH_WITH_DESCENDANTS_MODAL","UMB_DOCUMENT_PUBLISHING_REPOSITORY_ALIAS","UMB_DOCUMENT_SCHEDULE_MODAL_ALIAS","UMB_DOCUMENT_SCHEDULE_MODAL","UMB_DOCUMENT_UNPUBLISH_MODAL_ALIAS","UMB_DOCUMENT_UNPUBLISH_MODAL","UMB_DOCUMENT_PUBLISHING_WORKSPACE_CONTEXT","UMB_DOCUMENT_RECYCLE_BIN_ROOT_ENTITY_TYPE","UMB_DOCUMENT_RECYCLE_BIN_REPOSITORY_ALIAS","UMB_DOCUMENT_RECYCLE_BIN_TREE_REPOSITORY_ALIAS","UMB_DOCUMENT_RECYCLE_BIN_TREE_STORE_ALIAS","UMB_DOCUMENT_RECYCLE_BIN_TREE_ALIAS","UMB_DOCUMENT_RECYCLE_BIN_TREE_STORE_CONTEXT","UMB_DOCUMENT_REFERENCE_REPOSITORY_ALIAS","UMB_DOCUMENT_DETAIL_REPOSITORY_ALIAS","UMB_DOCUMENT_DETAIL_STORE_ALIAS","UMB_DOCUMENT_DETAIL_STORE_CONTEXT","UMB_DOCUMENT_ITEM_REPOSITORY_ALIAS","UMB_DOCUMENT_STORE_ALIAS","UMB_DOCUMENT_ITEM_STORE_CONTEXT","UMB_DOCUMENT_VALIDATION_REPOSITORY_ALIAS","UMB_ROLLBACK_MODAL_ALIAS","UMB_ROLLBACK_MODAL","UMB_ROLLBACK_REPOSITORY_ALIAS","UMB_DOCUMENT_SEARCH_PROVIDER_ALIAS","UMB_DOCUMENT_TREE_STORE_CONTEXT","UMB_DOCUMENT_TREE_REPOSITORY_ALIAS","UMB_DOCUMENT_TREE_STORE_ALIAS","UMB_DOCUMENT_TREE_ALIAS","UMB_DOCUMENT_URL_REPOSITORY_ALIAS","UMB_DOCUMENT_URL_STORE_ALIAS","UMB_DOCUMENT_URL_STORE_CONTEXT","UMB_DOCUMENT_USER_PERMISSION_CONDITION_ALIAS","UMB_USER_PERMISSION_DOCUMENT_CREATE","UMB_USER_PERMISSION_DOCUMENT_READ","UMB_USER_PERMISSION_DOCUMENT_UPDATE","UMB_USER_PERMISSION_DOCUMENT_DELETE","UMB_USER_PERMISSION_DOCUMENT_CREATE_BLUEPRINT","UMB_USER_PERMISSION_DOCUMENT_NOTIFICATIONS","UMB_USER_PERMISSION_DOCUMENT_PUBLISH","UMB_USER_PERMISSION_DOCUMENT_PERMISSIONS","UMB_USER_PERMISSION_DOCUMENT_UNPUBLISH","UMB_USER_PERMISSION_DOCUMENT_DUPLICATE","UMB_USER_PERMISSION_DOCUMENT_MOVE","UMB_USER_PERMISSION_DOCUMENT_SORT","UMB_USER_PERMISSION_DOCUMENT_CULTURE_AND_HOSTNAMES","UMB_USER_PERMISSION_DOCUMENT_PUBLIC_ACCESS","UMB_USER_PERMISSION_DOCUMENT_ROLLBACK","UMB_DOCUMENT_PERMISSION_REPOSITORY_ALIAS","UMB_DOCUMENT_IS_NOT_TRASHED_CONDITION_ALIAS","UMB_DOCUMENT_IS_TRASHED_CONDITION_ALIAS","UMB_DOCUMENT_WORKSPACE_ALIAS","UMB_DOCUMENT_DETAIL_MODEL_VARIANT_SCAFFOLD","UMB_DOCUMENT_WORKSPACE_CONTEXT"] }, { path: '@umbraco-cms/backoffice/entity-action', @@ -212,7 +212,7 @@ export const foundConsts = [{ }, { path: '@umbraco-cms/backoffice/media', - consts: ["UMB_MEDIA_COLLECTION_ALIAS","UMB_MEDIA_COLLECTION_CONTEXT","UMB_MEDIA_COLLECTION_REPOSITORY_ALIAS","UMB_MEDIA_GRID_COLLECTION_VIEW_ALIAS","UMB_MEDIA_TABLE_COLLECTION_VIEW_ALIAS","UMB_DROPZONE_MEDIA_TYPE_PICKER_MODAL","UMB_MEDIA_CREATE_OPTIONS_MODAL","UMB_MOVE_MEDIA_REPOSITORY_ALIAS","UMB_SORT_CHILDREN_OF_MEDIA_REPOSITORY_ALIAS","UMB_BULK_MOVE_MEDIA_REPOSITORY_ALIAS","UMB_BULK_TRASH_MEDIA_REPOSITORY_ALIAS","UMB_MEDIA_ENTITY_TYPE","UMB_MEDIA_ROOT_ENTITY_TYPE","UMB_MEDIA_PLACEHOLDER_ENTITY_TYPE","UMB_MEDIA_MENU_ALIAS","UMB_IMAGE_CROPPER_EDITOR_MODAL","UMB_MEDIA_CAPTION_ALT_TEXT_MODAL","UMB_MEDIA_PICKER_MODAL","UMB_MEDIA_WORKSPACE_PATH","UMB_CREATE_MEDIA_WORKSPACE_PATH_PATTERN","UMB_EDIT_MEDIA_WORKSPACE_PATH_PATTERN","UMB_MEDIA_VARIANT_CONTEXT","UMB_MEDIA_RECYCLE_BIN_ROOT_ENTITY_TYPE","UMB_MEDIA_RECYCLE_BIN_REPOSITORY_ALIAS","UMB_MEDIA_RECYCLE_BIN_TREE_REPOSITORY_ALIAS","UMB_MEDIA_RECYCLE_BIN_TREE_STORE_ALIAS","UMB_MEDIA_RECYCLE_BIN_TREE_ALIAS","UMB_MEDIA_RECYCLE_BIN_TREE_STORE_CONTEXT","UMB_MEDIA_REFERENCE_REPOSITORY_ALIAS","UMB_MEDIA_DETAIL_REPOSITORY_ALIAS","UMB_MEDIA_DETAIL_STORE_ALIAS","UMB_MEDIA_DETAIL_STORE_CONTEXT","UMB_MEDIA_ITEM_REPOSITORY_ALIAS","UMB_MEDIA_STORE_ALIAS","UMB_MEDIA_ITEM_STORE_CONTEXT","UMB_MEDIA_URL_REPOSITORY_ALIAS","UMB_MEDIA_URL_STORE_ALIAS","UMB_MEDIA_URL_STORE_CONTEXT","UMB_MEDIA_VALIDATION_REPOSITORY_ALIAS","UMB_MEDIA_TREE_REPOSITORY_ALIAS","UMB_MEDIA_TREE_STORE_ALIAS","UMB_MEDIA_TREE_ALIAS","UMB_MEDIA_TREE_PICKER_MODAL","UMB_MEDIA_TREE_STORE_CONTEXT","UMB_MEDIA_WORKSPACE_ALIAS","UMB_MEMBER_DETAIL_MODEL_VARIANT_SCAFFOLD","UMB_MEDIA_WORKSPACE_CONTEXT"] + consts: ["UMB_MEDIA_COLLECTION_ALIAS","UMB_MEDIA_COLLECTION_CONTEXT","UMB_MEDIA_COLLECTION_REPOSITORY_ALIAS","UMB_MEDIA_GRID_COLLECTION_VIEW_ALIAS","UMB_MEDIA_TABLE_COLLECTION_VIEW_ALIAS","UMB_DROPZONE_MEDIA_TYPE_PICKER_MODAL","UMB_MEDIA_CREATE_OPTIONS_MODAL","UMB_MOVE_MEDIA_REPOSITORY_ALIAS","UMB_SORT_CHILDREN_OF_MEDIA_REPOSITORY_ALIAS","UMB_BULK_MOVE_MEDIA_REPOSITORY_ALIAS","UMB_BULK_TRASH_MEDIA_REPOSITORY_ALIAS","UMB_MEDIA_ENTITY_TYPE","UMB_MEDIA_ROOT_ENTITY_TYPE","UMB_MEDIA_PLACEHOLDER_ENTITY_TYPE","UMB_MEDIA_MENU_ALIAS","UMB_IMAGE_CROPPER_EDITOR_MODAL","UMB_MEDIA_CAPTION_ALT_TEXT_MODAL","UMB_MEDIA_PICKER_MODAL","UMB_MEDIA_WORKSPACE_PATH","UMB_CREATE_MEDIA_WORKSPACE_PATH_PATTERN","UMB_EDIT_MEDIA_WORKSPACE_PATH_PATTERN","UMB_MEDIA_VARIANT_CONTEXT","UMB_MEDIA_RECYCLE_BIN_ROOT_ENTITY_TYPE","UMB_MEDIA_RECYCLE_BIN_REPOSITORY_ALIAS","UMB_MEDIA_RECYCLE_BIN_TREE_REPOSITORY_ALIAS","UMB_MEDIA_RECYCLE_BIN_TREE_STORE_ALIAS","UMB_MEDIA_RECYCLE_BIN_TREE_ALIAS","UMB_MEDIA_RECYCLE_BIN_TREE_STORE_CONTEXT","UMB_MEDIA_REFERENCE_REPOSITORY_ALIAS","UMB_MEDIA_DETAIL_REPOSITORY_ALIAS","UMB_MEDIA_DETAIL_STORE_ALIAS","UMB_MEDIA_DETAIL_STORE_CONTEXT","UMB_MEDIA_ITEM_REPOSITORY_ALIAS","UMB_MEDIA_STORE_ALIAS","UMB_MEDIA_ITEM_STORE_CONTEXT","UMB_MEDIA_VALIDATION_REPOSITORY_ALIAS","UMB_MEDIA_TREE_REPOSITORY_ALIAS","UMB_MEDIA_TREE_STORE_ALIAS","UMB_MEDIA_TREE_ALIAS","UMB_MEDIA_TREE_PICKER_MODAL","UMB_MEDIA_TREE_STORE_CONTEXT","UMB_MEDIA_URL_REPOSITORY_ALIAS","UMB_MEDIA_URL_STORE_ALIAS","UMB_MEDIA_URL_STORE_CONTEXT","UMB_MEDIA_WORKSPACE_ALIAS","UMB_MEMBER_DETAIL_MODEL_VARIANT_SCAFFOLD","UMB_MEDIA_WORKSPACE_CONTEXT"] }, { path: '@umbraco-cms/backoffice/member-group',