Skip to content

Commit

Permalink
Hotfix: ensure we export all extension types (#17787)
Browse files Browse the repository at this point in the history
* export all Extension Manifest Types

* clean up

* lint fix
  • Loading branch information
nielslyngsoe authored Dec 12, 2024
1 parent c26b45d commit 2d428cc
Show file tree
Hide file tree
Showing 77 changed files with 103 additions and 92 deletions.
18 changes: 9 additions & 9 deletions src/Umbraco.Web.UI.Client/examples/custom-modal/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import type { ManifestDashboard } from '@umbraco-cms/backoffice/dashboard';
import type { ManifestModal } from '@umbraco-cms/backoffice/modal';

const demoModal : ManifestModal = {
const demoModal: ManifestModal = {
type: 'modal',
name: 'Example Custom Modal Element',
alias: 'example.modal.custom.element',
js: () => import('./example-modal-view.element.js'),
}
};

const demoModalsDashboard : ManifestDashboard = {
const demoModalsDashboard: ManifestDashboard = {
type: 'dashboard',
name: 'Example Custom Modal Dashboard',
alias: 'example.dashboard.custom.modal.element',
Expand All @@ -18,12 +18,12 @@ const demoModalsDashboard : ManifestDashboard = {
label: 'Custom Modal',
pathname: 'custom-modal',
},
conditions : [
conditions: [
{
alias: 'Umb.Condition.SectionAlias',
match: 'Umb.Section.Content'
}
]
}
match: 'Umb.Section.Content',
},
],
};

export default [demoModal,demoModalsDashboard];
export default [demoModal, demoModalsDashboard];
24 changes: 11 additions & 13 deletions src/Umbraco.Web.UI.Client/examples/validation-context/index.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
import type { ManifestDashboard } from '@umbraco-cms/backoffice/dashboard';

const dashboard : ManifestDashboard = {
const dashboard: ManifestDashboard = {
type: 'dashboard',
alias: 'Demo.Dashboard',
name: 'Demo Dashboard Validation Context',
weight: 1000,
element: () => import('./validation-context-dashboard.js'),
meta: {
label: 'Validation Context Demo',
pathname: 'demo'
label: 'Validation Context Demo',
pathname: 'demo',
},
conditions : [
{
alias : "Umb.Condition.SectionAlias",
match : "Umb.Section.Content"
}
]
}
conditions: [
{
alias: 'Umb.Condition.SectionAlias',
match: 'Umb.Section.Content',
},
],
};

export const manifests = [
dashboard
];
export const manifests = [dashboard];
1 change: 0 additions & 1 deletion src/Umbraco.Web.UI.Client/src/packages/core/auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ export * from './auth.context.token.js';
export * from './modals/index.js';
export type * from './models/openApiConfiguration.js';
export * from './components/index.js';
export type * from './auth-provider.extension.js';

export type * from './types.js';
2 changes: 2 additions & 0 deletions src/Umbraco.Web.UI.Client/src/packages/core/auth/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type { ManifestAuthProvider } from './auth-provider.extension.js';

export type * from './auth-provider.extension.js';

/**
* User login state that can be used to determine the current state of the user.
* @example 'loggedIn'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ManifestCollectionAction } from '../../extensions/index.js';
import type { ManifestCollectionAction } from '../../extensions/types.js';

export interface ManifestCollectionActionCreateKind extends ManifestCollectionAction {
type: 'collectionAction';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ManifestCollectionView } from './extensions/index.js';
import type { ManifestCollectionView } from './extensions/types.js';
import { umbExtensionsRegistry } from '../extension-registry/index.js';
import { UmbCollectionViewManager } from './collection-view.manager.js';
import { expect } from '@open-wc/testing';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ManifestCollectionView } from './extensions/index.js';
import type { ManifestCollectionView } from './extensions/types.js';
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
import { UmbExtensionsManifestInitializer, createExtensionElement } from '@umbraco-cms/backoffice/extension-api';
import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { UmbCollectionConfiguration } from './types.js';
import type { ManifestCollection } from './extensions/index.js';
import type { ManifestCollection } from './extensions/types.js';
import { customElement, property } from '@umbraco-cms/backoffice/external/lit';
import { UmbExtensionElementAndApiSlotElementBase } from '@umbraco-cms/backoffice/extension-registry';
import type { UmbApi } from '@umbraco-cms/backoffice/extension-api';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { UMB_COLLECTION_CONTEXT } from '../default/index.js';
import type { ManifestCollectionView } from '../extensions/index.js';
import type { ManifestCollectionView } from '../extensions/types.js';
import type { UmbCollectionLayoutConfiguration } from '../types.js';
import { UMB_ROUTE_CONTEXT } from '../../router/route.context.js';
import { css, customElement, html, nothing, query, repeat, state } from '@umbraco-cms/backoffice/external/lit';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
} from '../types.js';
import type { UmbCollectionFilterModel } from '../collection-filter-model.interface.js';
import type { UmbCollectionRepository } from '../repository/collection-repository.interface.js';
import type { ManifestCollection } from '../extensions/index.js';
import type { ManifestCollection } from '../extensions/types.js';
import { UMB_COLLECTION_CONTEXT } from './collection-default.context-token.js';
import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
import { UmbArrayState, UmbBasicState, UmbNumberState, UmbObjectState } from '@umbraco-cms/backoffice/observable-api';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import type { ManifestCollection } from './extensions/index.js';
import type { ManifestCollection } from './extensions/types.js';
import type { Observable } from '@umbraco-cms/backoffice/external/rxjs';
import type { UmbPaginationManager } from '@umbraco-cms/backoffice/utils';

export type * from './extensions/index.js';
export type * from './action/create/types.js';
export type * from './extensions/types.js';
export type * from './conditions/types.js';
export type * from './workspace-view/types.js';

/** @deprecated No longer used internally. This will be removed in Umbraco 17. [LK] */
export interface UmbCollectionBulkActionPermissions {
Expand Down Expand Up @@ -50,5 +52,3 @@ export interface UmbCollectionContext {
items: Observable<any[]>;
totalItems: Observable<number>;
}

export type * from './extensions/index.js';
2 changes: 2 additions & 0 deletions src/Umbraco.Web.UI.Client/src/packages/core/content/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { UmbPropertyValueData } from '@umbraco-cms/backoffice/property';
import type { UmbEntityVariantModel } from '@umbraco-cms/backoffice/variant';

export type * from './collection/types.js';

export interface UmbElementDetailModel {
values: Array<UmbElementValueModel>;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { MetaEntityActionDefaultKind } from '../../default/index.js';
import type { ManifestEntityAction } from '../../entity-action.extension.js';
import type { ManifestEntityAction, MetaEntityActionDefaultKind } from '../../types.js';

export interface ManifestEntityActionCreateKind extends ManifestEntityAction<MetaEntityActionCreateKind> {
type: 'entityAction';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { MetaEntityActionDefaultKind } from '../../default/index.js';
import type { ManifestEntityAction } from '../../entity-action.extension.js';
import type { ManifestEntityAction, MetaEntityActionDefaultKind } from '../../types.js';

export interface ManifestEntityActionDeleteKind extends ManifestEntityAction<MetaEntityActionDeleteKind> {
type: 'entityAction';
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ export * from './constants.js';
export * from './entity-action-base.js';
export * from './entity-action-list.element.js';
export * from './entity-action.event.js';
export type * from './default/index.js';
export type * from './entity-action-element.interface.js';
export type * from './entity-action.extension.js';
export type * from './entity-action.interface.js';
export type * from './types.js';

export { UmbRequestReloadStructureForEntityEvent } from './request-reload-structure-for-entity.event.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';

export type * from './default/types.js';
export type * from './entity-action-element.interface.js';
export type * from './entity-action.extension.js';
export type * from './entity-action.interface.js';

export interface UmbEntityActionArgs<MetaArgsType> extends UmbEntityModel {
meta: MetaArgsType;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export * from './constants.js';
export * from './entity-create-option-action-base.js';
export type * from './entity-create-option-action.extension.js';
export type * from './entity-create-option-action.interface.js';
export type * from './types.js';
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';

export type * from './entity-create-option-action.extension.js';
export type * from './entity-create-option-action.interface.js';

export interface UmbEntityCreateOptionActionArgs<MetaArgsType> extends UmbEntityModel {
meta: MetaArgsType;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ManifestExternalLoginProvider } from '../extensions/index.js';
import type { ManifestExternalLoginProvider } from './types.js';

export interface UmbExternalLoginProviderElement extends HTMLElement {
manifest?: ManifestExternalLoginProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export * from './conditions/index.js';
export * from './initializers/index.js';
export * from './registry.js';
export * from './utils/index.js';
export type * from './models/index.js';
export type * from './extensions/index.js';
export type * from './models/types.js';
export type * from './extensions/types.js';

export { UmbExtensionElementAndApiSlotElementBase } from './extension-element-and-api-slot-element-base.js';
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ export * from './icon-registry.context-token.js';
export * from './icon-registry.context.js';
export * from './icon.registry.js';
export type * from './types.js';
export type * from './extensions/icons.extension.js';
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type { JsLoaderProperty } from '@umbraco-cms/backoffice/extension-api';

export type * from './extensions/icons.extension.js';

export interface UmbIconDefinition<JsType = any> {
name: string;
path: JsLoaderProperty<JsType>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from './menu-item-default.element.js';
export type * from './link/index.js';

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type * from './link/types.js';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type * from './menu-item/types.js';
4 changes: 1 addition & 3 deletions src/Umbraco.Web.UI.Client/src/packages/core/menu/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
export * from './components/index.js';
export * from './menu-tree-structure-workspace-context-base.js';
export * from './menu-variant-tree-structure-workspace-context-base.js';
export type * from './menu-item-element.interface.js';
export type * from './menu-item.extension.js';
export type * from './menu.extension.js';

export type * from './types.js';

export type { UmbMenuStructureWorkspaceContext } from './menu-structure-workspace-context.interface.js';
5 changes: 5 additions & 0 deletions src/Umbraco.Web.UI.Client/src/packages/core/menu/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';

export type * from './components/types.js';
export type * from './conditions/types.js';
export type * from './menu-item-element.interface.js';
export type * from './menu-item.extension.js';
export type * from './menu.extension.js';

// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface UmbStructureItemModelBase extends UmbEntityModel {}
Expand Down
2 changes: 1 addition & 1 deletion src/Umbraco.Web.UI.Client/src/packages/core/modal/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { UUIModalElement, UUIModalSidebarSize } from '@umbraco-cms/backoffice/external/uui';
import type { ElementLoaderProperty } from '@umbraco-cms/backoffice/extension-api';

export type * from './extensions/index.js';
export type * from './extensions/types.js';

export interface UmbPickerModalData<ItemType> {
multiple?: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from './manager/index.js';
export * from './picker-search-field.element.js';
export * from './picker-search-result.element.js';
export type * from './result-item/index.js';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type * from './result-item/types.js';
2 changes: 2 additions & 0 deletions src/Umbraco.Web.UI.Client/src/packages/core/picker/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ export interface UmbPickerContextConfig {
queryParams?: object;
};
}

export type * from './search/types.js';
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ export * from './components/index.js';
export * from './config/index.js';
export * from './constants.js';
export * from './events/index.js';
export type * from './extensions/index.js';
export * from './ui-picker-modal/index.js';
export type * from './extensions/types.js';
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export type * from './types.js';
export * from './empty-recycle-bin.action.js';
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { UmbTreeItemModel, UmbTreeRootModel, UmbTreeStartNode } from '../ty
import type { UmbTreeRepository } from '../data/tree-repository.interface.js';
import type { UmbTreeContext } from '../tree-context.interface.js';
import type { UmbTreeRootItemsRequestArgs } from '../data/types.js';
import type { ManifestTree } from '../extensions/index.js';
import type { ManifestTree } from '../extensions/types.js';
import { UMB_TREE_CONTEXT } from './default-tree.context-token.js';
import { type UmbActionEventContext, UMB_ACTION_EVENT_CONTEXT } from '@umbraco-cms/backoffice/action';
import { type ManifestRepository, umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
export type { UmbMoveDataSource } from './move-data-source.interface.js';
export type { UmbMoveRepository } from './move-repository.interface.js';
export type * from './types.js';
export { UmbMoveToEntityAction } from './move-to.action.js';
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type { ManifestEntityAction, MetaEntityActionDefaultKind } from '@umbraco-cms/backoffice/entity-action';

export type { UmbMoveDataSource } from './move-data-source.interface.js';
export type { UmbMoveRepository } from './move-repository.interface.js';
export interface UmbMoveToRequestArgs {
unique: string;
destination: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
export { UmbSortChildrenOfEntityAction } from './sort-children-of.action.js';
export type { UmbSortChildrenOfRepository } from './sort-children-of-repository.interface.js';
export type { UmbSortChildrenOfDataSource } from './sort-children-of-data-source.interface.js';
export type * from './types.js';
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import type { ManifestEntityAction, MetaEntityActionDefaultKind } from '@umbraco-cms/backoffice/entity-action';

export type { UmbSortChildrenOfRepository } from './sort-children-of-repository.interface.js';
export type { UmbSortChildrenOfDataSource } from './sort-children-of-data-source.interface.js';

export interface UmbSortChildrenOfArgs {
unique: string | null;
sorting: Array<{ unique: string; sortOrder: number }>;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export type * from './duplicate-to/types.js';
export type * from './move/types.js';
export type * from './reload-tree-item-children/types.js';
export type * from './sort-children-of/types.js';
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from './create-folder.action.js';
export type * from './types.js';
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from './delete-folder.action.js';
export type * from './types.js';
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export type * from './create-folder/types.js';
export type * from './delete-folder/types.js';
export type * from './update-folder/types.js';
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export type * from './types.js';
export * from './update-folder.action.js';
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export type * from './types.js';
export * from './modal/index.js';
export * from './entity-action/index.js';
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
import type { MetaEntityActionDefaultKind } from '@umbraco-cms/backoffice/entity-action';

export type * from './entity-action/types.js';

export interface UmbFolderModel extends UmbEntityModel {
name: string;
}
Expand Down
2 changes: 0 additions & 2 deletions src/Umbraco.Web.UI.Client/src/packages/core/tree/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ export * from './folder/index.js';
export * from './tree-item/index.js';
export * from './tree-menu-item-default/index.js';
export * from './tree.element.js';
export type * from './entity-actions/move/index.js';
export type * from './extensions/index.js';
export type * from './types.js';

export type { UmbTreePickerModalData, UmbTreePickerModalValue } from './tree-picker-modal/index.js';
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { UmbTreeItemContext } from '../tree-item-context.interface.js';
import { UMB_TREE_CONTEXT, type UmbDefaultTreeContext } from '../../default/index.js';
import type { UmbTreeItemModel, UmbTreeRootModel } from '../../types.js';
import { UmbRequestReloadTreeItemChildrenEvent } from '../../entity-actions/reload-tree-item-children/index.js';
import type { ManifestTreeItem } from '../../extensions/index.js';
import type { ManifestTreeItem } from '../../extensions/types.js';
import { map } from '@umbraco-cms/backoffice/external/rxjs';
import { UmbArrayState, UmbBooleanState, UmbObjectState, UmbStringState } from '@umbraco-cms/backoffice/observable-api';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ManifestTreeItem } from '../extensions/index.js';
import type { ManifestTreeItem } from '../extensions/types.js';
import { customElement, property } from '@umbraco-cms/backoffice/external/lit';
import {
UmbExtensionElementAndApiSlotElementBase,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from './tree-menu-item-default.element.js';
export type * from './types.js';
Loading

0 comments on commit 2d428cc

Please sign in to comment.