Skip to content

Commit

Permalink
Merge branch 'main' into v15/feature/grid-inline-editing-fixes
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/packages/core/content/property-dataset-context/element-property-dataset.context.ts
  • Loading branch information
nielslyngsoe committed Nov 7, 2024
2 parents fd17610 + e3c4177 commit 85fe0c6
Show file tree
Hide file tree
Showing 101 changed files with 1,310 additions and 1,976 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { manifests as workspaceViewManifests } from './views/manifests.js';
import { UMB_BLOCK_GRID_AREA_TYPE_WORKSPACE_ALIAS } from './index.js';
import { UmbSubmitWorkspaceAction } from '@umbraco-cms/backoffice/workspace';
import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace';
import { UmbSubmitWorkspaceAction, UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace';

export const manifests: Array<UmbExtensionManifest> = [
...workspaceViewManifests,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace';
import { UMB_BLOCK_GRID_AREA_TYPE_WORKSPACE_ALIAS } from '../index.js';
import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace';
import type { ManifestWorkspaceView } from '@umbraco-cms/backoffice/workspace';

export const workspaceViews: Array<ManifestWorkspaceView> = [
Expand Down
2 changes: 1 addition & 1 deletion src/packages/block/block-grid/workspace/views/manifests.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace';
import { UMB_BLOCK_GRID_TYPE_WORKSPACE_ALIAS } from '../index.js';
import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace';

export const manifests: Array<UmbExtensionManifest> = [
{
Expand Down
2 changes: 1 addition & 1 deletion src/packages/block/block-list/workspace/views/manifests.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace';
import { UMB_BLOCK_LIST_TYPE_WORKSPACE_ALIAS } from '../index.js';
import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace';

export const manifests: Array<UmbExtensionManifest> = [
{
Expand Down
2 changes: 1 addition & 1 deletion src/packages/block/block-rte/workspace/views/manifests.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace';
import { UMB_BLOCK_RTE_TYPE_WORKSPACE_ALIAS } from '../index.js';
import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace';

export const manifests: Array<UmbExtensionManifest> = [
{
Expand Down
3 changes: 1 addition & 2 deletions src/packages/block/block-type/workspace/manifests.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace';
import { UMB_BLOCK_GRID_TYPE_WORKSPACE_ALIAS } from '../../block-grid/workspace/index.js';
import { UMB_BLOCK_LIST_TYPE_WORKSPACE_ALIAS } from '../../block-list/workspace/index.js';
import { UMB_BLOCK_RTE_TYPE_WORKSPACE_ALIAS } from '../../block-rte/workspace/index.js';
import { UmbSubmitWorkspaceAction } from '@umbraco-cms/backoffice/workspace';
import { UMB_WORKSPACE_CONDITION_ALIAS, UmbSubmitWorkspaceAction } from '@umbraco-cms/backoffice/workspace';

export const manifests: Array<UmbExtensionManifest> = [
{
Expand Down
3 changes: 1 addition & 2 deletions src/packages/block/block/workspace/manifests.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace';
import { UMB_BLOCK_WORKSPACE_ALIAS } from './index.js';
import { UmbSubmitWorkspaceAction } from '@umbraco-cms/backoffice/workspace';
import { UMB_WORKSPACE_CONDITION_ALIAS, UmbSubmitWorkspaceAction } from '@umbraco-cms/backoffice/workspace';

export const manifests: Array<UmbExtensionManifest> = [
{
Expand Down
7 changes: 6 additions & 1 deletion src/packages/core/content-type/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
export * from './components/index.js';
export * from './composition/index.js';
export * from './modals/index.js';
export * from './repository/index.js';
export * from './structure/index.js';
export * from './workspace/index.js';
export type * from './types.js';

/**
* @deprecated Use `UmbPropertyTypeBasedPropertyElement` from `@umbraco-cms/backoffice/content` instead.
* Export will be removed in version 17.
*/
export { UmbPropertyTypeBasedPropertyElement } from '../content/components/property-type-based-property/property-type-based-property.element.js';
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import type { UmbContentTypeModel, UmbPropertyTypeContainerModel } from '../../../types.js';
import type { UmbContentTypeContainerStructureHelper } from '../../../structure/index.js';
import { css, customElement, html, nothing, property, repeat, state, when } from '@umbraco-cms/backoffice/external/lit';
import { umbConfirmModal } from '@umbraco-cms/backoffice/modal';
import { UmbLitElement, umbFocus } from '@umbraco-cms/backoffice/lit-element';
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
import type {
UmbContentTypeContainerStructureHelper,
UmbContentTypeModel,
UmbPropertyTypeContainerModel,
} from '@umbraco-cms/backoffice/content-type';
import type { UUIInputEvent } from '@umbraco-cms/backoffice/external/uui';

import './content-type-design-editor-properties.element.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { UMB_CONTENT_TYPE_WORKSPACE_CONTEXT } from '../../content-type-workspace.context-token.js';
import type { UmbContentTypeModel, UmbPropertyTypeModel } from '../../../types.js';
import { UmbContentTypePropertyStructureHelper } from '../../../structure/index.js';
import { UMB_CONTENT_TYPE_DESIGN_EDITOR_CONTEXT } from './content-type-design-editor.context.js';
import type { UmbContentTypeDesignEditorPropertyElement } from './content-type-design-editor-property.element.js';
import {
Expand All @@ -13,17 +15,15 @@ import {
} from '@umbraco-cms/backoffice/external/lit';
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
import { UmbContentTypePropertyStructureHelper } from '@umbraco-cms/backoffice/content-type';
import type { UmbContentTypeModel, UmbPropertyTypeModel } from '@umbraco-cms/backoffice/content-type';
import { type UmbSorterConfig, UmbSorterController } from '@umbraco-cms/backoffice/sorter';
import { UmbModalRouteRegistrationController } from '@umbraco-cms/backoffice/router';

import './content-type-design-editor-property.element.js';
import {
UMB_CREATE_PROPERTY_TYPE_WORKSPACE_PATH_PATTERN,
UMB_PROPERTY_TYPE_WORKSPACE_MODAL,
} from '@umbraco-cms/backoffice/property-type';

import './content-type-design-editor-property.element.js';

const SORTER_CONFIG: UmbSorterConfig<UmbPropertyTypeModel, UmbContentTypeDesignEditorPropertyElement> = {
getUniqueOfElement: (element) => {
return element.getAttribute('data-umb-property-id');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { UmbContentTypePropertyStructureHelper } from '../../../structure/index.js';
import type { UmbContentTypeModel, UmbPropertyTypeModel, UmbPropertyTypeScaffoldModel } from '../../../types.js';
import { UmbPropertyTypeContext } from './content-type-design-editor-property.context.js';
import { css, html, customElement, property, state, nothing } from '@umbraco-cms/backoffice/external/lit';
import { generateAlias } from '@umbraco-cms/backoffice/utils';
Expand All @@ -6,12 +8,6 @@ import { UmbDataTypeDetailRepository } from '@umbraco-cms/backoffice/data-type';
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
import { UMB_EDIT_PROPERTY_TYPE_WORKSPACE_PATH_PATTERN } from '@umbraco-cms/backoffice/property-type';
import type {
UmbContentTypeModel,
UmbContentTypePropertyStructureHelper,
UmbPropertyTypeModel,
UmbPropertyTypeScaffoldModel,
} from '@umbraco-cms/backoffice/content-type';
import type { UUIInputElement, UUIInputLockElement, UUIInputEvent } from '@umbraco-cms/backoffice/external/uui';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { UMB_CONTENT_TYPE_WORKSPACE_CONTEXT } from '../../content-type-workspace.context-token.js';
import type { UmbContentTypeModel, UmbPropertyTypeContainerModel } from '../../../types.js';
import { UmbContentTypeContainerStructureHelper } from '../../../structure/index.js';
import { UMB_CONTENT_TYPE_DESIGN_EDITOR_CONTEXT } from './content-type-design-editor.context.js';
import type { UmbContentTypeWorkspaceViewEditGroupElement } from './content-type-design-editor-group.element.js';
import { css, customElement, html, nothing, property, repeat, state } from '@umbraco-cms/backoffice/external/lit';
import { UmbContentTypeContainerStructureHelper } from '@umbraco-cms/backoffice/content-type';
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
import { UmbModalRouteRegistrationController } from '@umbraco-cms/backoffice/router';
import { UmbSorterController } from '@umbraco-cms/backoffice/sorter';
import { UMB_WORKSPACE_MODAL } from '@umbraco-cms/backoffice/workspace';
import type { UmbContentTypeModel, UmbPropertyTypeContainerModel } from '@umbraco-cms/backoffice/content-type';
import type { UmbSorterConfig } from '@umbraco-cms/backoffice/sorter';

import './content-type-design-editor-properties.element.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { UMB_CONTENT_TYPE_WORKSPACE_CONTEXT } from '../../content-type-workspace.context-token.js';
import type { UmbContentTypeModel, UmbPropertyTypeContainerModel } from '../../../types.js';
import {
UmbContentTypeContainerStructureHelper,
UmbContentTypeMoveRootGroupsIntoFirstTabHelper,
} from '../../../structure/index.js';
import { UMB_COMPOSITION_PICKER_MODAL } from '../../../modals/index.js';
import type { UmbContentTypeDesignEditorTabElement } from './content-type-design-editor-tab.element.js';
import { UmbContentTypeDesignEditorContext } from './content-type-design-editor.context.js';
import { css, html, customElement, state, repeat, ifDefined, nothing } from '@umbraco-cms/backoffice/external/lit';
import type { UUIInputElement, UUIInputEvent, UUITabElement } from '@umbraco-cms/backoffice/external/uui';
import {
UMB_COMPOSITION_PICKER_MODAL,
UmbContentTypeContainerStructureHelper,
UmbContentTypeMoveRootGroupsIntoFirstTabHelper,
type UmbContentTypeModel,
type UmbPropertyTypeContainerModel,
} from '@umbraco-cms/backoffice/content-type';
import { encodeFolderName } from '@umbraco-cms/backoffice/router';
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
import { CompositionTypeModel } from '@umbraco-cms/backoffice/external/backend-api';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import type { UmbPropertyEditorConfig } from '../../../property-editor/index.js';
import type { UmbPropertyTypeModel } from '../../types.js';
import { UmbContentPropertyContext } from '../../content-property.context.js';
import type { UmbPropertyEditorConfig } from '@umbraco-cms/backoffice/property-editor';
import { css, customElement, html, ifDefined, property, state } from '@umbraco-cms/backoffice/external/lit';
import { UmbContentPropertyContext } from '@umbraco-cms/backoffice/content';
import { UmbDataTypeDetailRepository } from '@umbraco-cms/backoffice/data-type';
import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
import type { UmbDataTypeDetailModel } from '@umbraco-cms/backoffice/data-type';
import type { UmbObserverController } from '@umbraco-cms/backoffice/observable-api';
import { UMB_UNSUPPORTED_EDITOR_SCHEMA_ALIASES } from '@umbraco-cms/backoffice/property';
import type { UmbPropertyTypeModel } from '@umbraco-cms/backoffice/content-type';

@customElement('umb-property-type-based-property')
export class UmbPropertyTypeBasedPropertyElement extends UmbLitElement {
Expand Down
2 changes: 1 addition & 1 deletion src/packages/core/content/constants.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const UMB_CONTENT_SECTION_ALIAS = 'Umb.Section.Content';
export const UMB_CONTENT_SECTION_ALIAS = 'Umb.Section.Content';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { UmbContentLikeDetailModel, UmbPotentialContentValueModel } from '../types.js';
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
import type { UmbContentLikeDetailModel, UmbPotentialContentValueModel } from '@umbraco-cms/backoffice/content';
import { createExtensionApi } from '@umbraco-cms/backoffice/extension-api';
import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
import { UmbVariantId, type UmbVariantDataModel } from '@umbraco-cms/backoffice/variant';
Expand Down
3 changes: 3 additions & 0 deletions src/packages/core/content/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
export { UMB_CONTENT_PROPERTY_CONTEXT } from './content-property.context-token.js';
export { UmbContentPropertyContext } from './content-property.context.js';

export * from './collection/index.js';
export * from './components/index.js';
export * from './constants.js';
export * from './controller/merge-content-variant-data.controller.js';
export * from './manager/index.js';
export * from './property-dataset-context/index.js';
export * from './variant-picker/index.js';
export * from './workspace/index.js';
export type * from './types.js';
13 changes: 11 additions & 2 deletions src/packages/core/content/manager/content-data-manager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { UmbContentDetailModel } from '../types.js';
import { UmbElementWorkspaceDataManager } from './element-data-manager.js';
import type { UmbContentDetailModel } from '@umbraco-cms/backoffice/content';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import { appendToFrozenArray, jsonStringComparison } from '@umbraco-cms/backoffice/observable-api';
import { UmbVariantId, type UmbEntityVariantModel } from '@umbraco-cms/backoffice/variant';
Expand All @@ -14,11 +14,20 @@ export class UmbContentWorkspaceDataManager<
//#repository;
#variantScaffold?: ModelVariantType;

constructor(host: UmbControllerHost, variantScaffold: ModelVariantType) {
constructor(host: UmbControllerHost, variantScaffold?: ModelVariantType) {
super(host);
this.#variantScaffold = variantScaffold;
}

/**
* Sets the variant scaffold data
* @param {ModelVariantType} variantScaffold The variant scaffold data
* @memberof UmbContentWorkspaceDataManager
*/
setVariantScaffold(variantScaffold: ModelVariantType) {
this.#variantScaffold = variantScaffold;
}

ensureVariantData(variantId: UmbVariantId) {
this.updateVariantData(variantId);
}
Expand Down
2 changes: 1 addition & 1 deletion src/packages/core/content/manager/element-data-manager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { UmbMergeContentVariantDataController } from '../controller/merge-content-variant-data.controller.js';
import type { UmbElementDetailModel } from '@umbraco-cms/backoffice/content';
import type { UmbElementDetailModel } from '../types.js';
import { UmbVariantId } from '@umbraco-cms/backoffice/variant';
import { UmbEntityWorkspaceDataManager, type UmbWorkspaceDataManager } from '@umbraco-cms/backoffice/workspace';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ export abstract class UmbElementPropertyDatasetContext<

override destroy() {
super.destroy();

this.#propertyVariantIdMap?.destroy();
(this.#propertyVariantIdMap as unknown) = undefined;
}
Expand Down
5 changes: 3 additions & 2 deletions src/packages/core/content/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ export interface UmbPotentialContentValueModel<ValueType = unknown> extends UmbP
segment?: string | null;
}

export interface UmbContentDetailModel extends UmbElementDetailModel {
export interface UmbContentDetailModel<VariantModelType extends UmbEntityVariantModel = UmbEntityVariantModel>
extends UmbElementDetailModel {
unique: string;
entityType: string;
variants: Array<UmbEntityVariantModel>;
variants: Array<VariantModelType>;
}

export interface UmbContentLikeDetailModel
Expand Down
1 change: 1 addition & 0 deletions src/packages/core/content/variant-picker/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './types.js';
8 changes: 8 additions & 0 deletions src/packages/core/content/variant-picker/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export interface UmbContentVariantPickerData<VariantOptionModelType> {
options: Array<VariantOptionModelType>;
pickableFilter?: (variantOption: VariantOptionModelType) => boolean;
}

export interface UmbContentVariantPickerValue {
selection: Array<string>;
}
Loading

0 comments on commit 85fe0c6

Please sign in to comment.