V15: Block package should not import from itself (#18902)
* fix: avoids circular dependencies by realising the 'block' package was importing from itself * chore: lowers requirement to 9 after fixes * chore: removes unused file
This commit is contained in:
@@ -52,7 +52,7 @@ if (circular.length) {
|
||||
*/
|
||||
|
||||
// TODO: Remove this check and set an exit with argument 1 when we have fixed all circular dependencies.
|
||||
if (circular.length > 11) {
|
||||
if (circular.length > 9) {
|
||||
process.exit(1);
|
||||
} else {
|
||||
process.exit(0);
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
import type { UmbBlockDataModel } from '../../block/index.js';
|
||||
import { UMB_BLOCK_CATALOGUE_MODAL, UmbBlockEntriesContext } from '../../block/index.js';
|
||||
import type { UmbBlockRteLayoutModel, UmbBlockRteTypeModel, UmbBlockRteValueModel } from '../types.js';
|
||||
import {
|
||||
UMB_BLOCK_RTE_WORKSPACE_MODAL,
|
||||
type UmbBlockRteWorkspaceOriginData,
|
||||
} from '../workspace/block-rte-workspace.modal-token.js';
|
||||
import { UMB_BLOCK_RTE_MANAGER_CONTEXT } from './block-rte-manager.context-token.js';
|
||||
import { UMB_BLOCK_CATALOGUE_MODAL, UmbBlockEntriesContext } from '@umbraco-cms/backoffice/block';
|
||||
import type { UmbBlockDataModel } from '@umbraco-cms/backoffice/block';
|
||||
import { UmbBooleanState } from '@umbraco-cms/backoffice/observable-api';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
import { UmbModalRouteRegistrationController } from '@umbraco-cms/backoffice/router';
|
||||
import { UMB_BLOCK_RTE_PROPERTY_EDITOR_SCHEMA_ALIAS } from '@umbraco-cms/backoffice/rte';
|
||||
|
||||
/**
|
||||
* Copied from the 'rte' package to avoid a circular dependency.
|
||||
* @internal
|
||||
*/
|
||||
const UMB_BLOCK_RTE_PROPERTY_EDITOR_SCHEMA_ALIAS = 'Umbraco.RichText';
|
||||
|
||||
export class UmbBlockRteEntriesContext extends UmbBlockEntriesContext<
|
||||
typeof UMB_BLOCK_RTE_MANAGER_CONTEXT,
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
import { UMB_BLOCK_WORKSPACE_MODAL } from '../../workspace/index.js';
|
||||
import { UMB_BLOCK_MANAGER_CONTEXT } from '../../context/index.js';
|
||||
import type { UmbBlockCatalogueModalData, UmbBlockCatalogueModalValue } from './block-catalogue-modal.token.js';
|
||||
import type { UmbBlockTypeGroup, UmbBlockTypeWithGroupKey } from '@umbraco-cms/backoffice/block-type';
|
||||
import {
|
||||
UMB_BLOCK_MANAGER_CONTEXT,
|
||||
type UmbBlockCatalogueModalData,
|
||||
type UmbBlockCatalogueModalValue,
|
||||
} from '@umbraco-cms/backoffice/block';
|
||||
import { css, html, customElement, state, repeat, nothing } from '@umbraco-cms/backoffice/external/lit';
|
||||
import type { UUIInputEvent } from '@umbraco-cms/backoffice/external/uui';
|
||||
import { UMB_MODAL_CONTEXT, UmbModalBaseElement } from '@umbraco-cms/backoffice/modal';
|
||||
import { UmbModalRouteRegistrationController } from '@umbraco-cms/backoffice/router';
|
||||
import type { UmbSelectionChangeEvent } from '@umbraco-cms/backoffice/event';
|
||||
|
||||
// TODO: This is across packages, how should we go about getting just a single element from another package? like here we just need the umb-block-type-card element
|
||||
import '@umbraco-cms/backoffice/block-type';
|
||||
import type { UmbSelectionChangeEvent } from '@umbraco-cms/backoffice/event';
|
||||
|
||||
@customElement('umb-block-catalogue-modal')
|
||||
export class UmbBlockCatalogueModalElement extends UmbModalBaseElement<
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import type { UmbBlockDataModel } from '../types.js';
|
||||
import { UmbDataPathBlockElementDataQuery } from './data-path-element-data-query.function.js';
|
||||
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
|
||||
import type { UmbPropertyValueDataPotentiallyWithEditorAlias } from '@umbraco-cms/backoffice/property';
|
||||
import {
|
||||
@@ -7,7 +9,6 @@ import {
|
||||
umbScopeMapperForJsonPaths,
|
||||
type UmbPropertyValidationPathTranslator,
|
||||
} from '@umbraco-cms/backoffice/validation';
|
||||
import { UmbDataPathBlockElementDataQuery, type UmbBlockDataModel } from '@umbraco-cms/backoffice/block';
|
||||
|
||||
export abstract class UmbBlockEditorValidationPropertyPathTranslatorBase<PropertyValueType>
|
||||
extends UmbControllerBase
|
||||
|
||||
Reference in New Issue
Block a user