diff --git a/src/Umbraco.Web.UI.Client/devops/icons/index.js b/src/Umbraco.Web.UI.Client/devops/icons/index.js index a37ebf36db..c2b060fec8 100644 --- a/src/Umbraco.Web.UI.Client/devops/icons/index.js +++ b/src/Umbraco.Web.UI.Client/devops/icons/index.js @@ -47,6 +47,7 @@ const collectDictionaryIcons = async () => { const icon = { name: iconDef.name, legacy: iconDef.legacy, + hidden: iconDef.legacy ?? iconDef.internal, fileName: iconFileName, svg, output: `${iconsOutputDirectory}/${iconFileName}.ts`, diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/icon-registry.context.ts b/src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/icon-registry.context.ts index ec704b6ed0..b81e01b244 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/icon-registry.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/icon-registry.context.ts @@ -13,7 +13,7 @@ export class UmbIconRegistryContext extends UmbContextBase([], (x) => x.name); readonly icons = this.#icons.asObservable(); - readonly approvedIcons = this.#icons.asObservablePart((icons) => icons.filter((x) => x.legacy !== true)); + readonly approvedIcons = this.#icons.asObservablePart((icons) => icons.filter((x) => x.hidden !== true)); constructor(host: UmbControllerHost) { super(host, UMB_ICON_REGISTRY_CONTEXT); diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/types.ts b/src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/types.ts index ffc7c9d5db..e8f153daa3 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/types.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/types.ts @@ -5,7 +5,11 @@ export type * from './extensions/icons.extension.js'; export interface UmbIconDefinition { name: string; path: JsLoaderProperty; + /** + * @deprecated `legacy` is deprecated and will be removed in v.17. Use `hidden` instead. + */ legacy?: boolean; + hidden?: boolean; } export type UmbIconDictionary = Array;