diff --git a/src/Umbraco.Web.UI.Client/README.md b/src/Umbraco.Web.UI.Client/README.md index e8e2e3b0b4..6308975ef4 100644 --- a/src/Umbraco.Web.UI.Client/README.md +++ b/src/Umbraco.Web.UI.Client/README.md @@ -29,9 +29,12 @@ Create an umbraco-package.json file in the root of your package. "label": "My Dashboard", "pathname": "my-dashboard" }, - "conditions": { - "sections": ["Umb.Section.Content"] - } + "conditions": [ + { + "alias": "Umb.Condition.SectionAlias", + "match": "Umb.Section.Content" + } + ] } ] } @@ -157,9 +160,12 @@ Finally add an umbraco-package.json file in the root of your package folder `my- "label": "My Dashboard", "pathname": "my-dashboard" }, - "conditions": { - "sections": ["Umb.Section.Content"] - } + "conditions": [ + { + "alias": "Umb.Condition.SectionAlias", + "match": "Umb.Section.Content" + } + ] } ] } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/localization/localize.element.test.ts b/src/Umbraco.Web.UI.Client/src/packages/core/localization/localize.element.test.ts index 3e46e024bb..478dc8ba7f 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/localization/localize.element.test.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/localization/localize.element.test.ts @@ -1,6 +1,6 @@ import { aTimeout, elementUpdated, expect, fixture, html } from '@open-wc/testing'; -import { umbTranslationRegistry } from '@umbraco-cms/backoffice/localization'; import { UmbLocalizeElement } from './localize.element.js'; +import { umbTranslationRegistry } from '@umbraco-cms/backoffice/localization'; import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry'; import { UmbLocalizeController } from '@umbraco-cms/backoffice/localization-api'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/components/insert-menu/templating-insert-menu.element.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/components/insert-menu/templating-insert-menu.element.ts index babb659488..19fe1076a7 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/components/insert-menu/templating-insert-menu.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/components/insert-menu/templating-insert-menu.element.ts @@ -1,7 +1,7 @@ -import { UmbDictionaryRepository } from '@umbraco-cms/backoffice/dictionary'; import { UMB_MODAL_TEMPLATING_INSERT_CHOOSE_TYPE_SIDEBAR_ALIAS } from '../../modals/manifests.js'; import { getInsertDictionarySnippet, getInsertPartialSnippet } from '../../utils.js'; import { ChooseInsertTypeModalResult, CodeSnippetType } from '../../modals/insert-choose-type-sidebar.element.js'; +import { UmbDictionaryRepository } from '@umbraco-cms/backoffice/dictionary'; import { customElement, property, css, html } from '@umbraco-cms/backoffice/external/lit'; import { UUITextStyles } from '@umbraco-cms/backoffice/external/uui'; import { diff --git a/src/Umbraco.Web.UI.Client/storybook/stories/extending/registration/conditions.mdx b/src/Umbraco.Web.UI.Client/storybook/stories/extending/registration/conditions.mdx index 9833605deb..24ae95827f 100644 --- a/src/Umbraco.Web.UI.Client/storybook/stories/extending/registration/conditions.mdx +++ b/src/Umbraco.Web.UI.Client/storybook/stories/extending/registration/conditions.mdx @@ -25,7 +25,7 @@ In this following example we define the manifest for a Workspace Action, this ac conditions: [ { alias: 'Umb.Condition.SectionAlias', - matches: 'My.Example.Workspace' + match: 'My.Example.Workspace' } ] } @@ -37,7 +37,7 @@ Each condition is an object with the following properties: - `alias`- The alias of the condition to utilize. - `...` - The rest of the properties of the object are specific to the condition. -In the above example the `Umb.Condition.SectionAlias` condition is used, this condition takes a property `matches` which must be set to the alias of the section to match. +In the above example the `Umb.Condition.SectionAlias` condition is used, this condition takes a property `match` which must be set to the alias of the section to match. ### Core conditions types diff --git a/src/Umbraco.Web.UI.Client/utils/json-schema/test-package.json b/src/Umbraco.Web.UI.Client/utils/json-schema/test-package.json index 34edf0f9e9..59034cd817 100644 --- a/src/Umbraco.Web.UI.Client/utils/json-schema/test-package.json +++ b/src/Umbraco.Web.UI.Client/utils/json-schema/test-package.json @@ -1,22 +1,27 @@ { - "$schema": "../../types/umbraco-package-schema.json", - "name": "My Package", - "version": "1.0.0", - "extensions": [ - { - "name": "My Dashboard", - "alias": "myDashboard", - - "weight": -10, - "elementName": "my-dashboard", - "js": "js/my-dashboard.js", + "$schema": "../../types/umbraco-package-schema.json", + "name": "My Package", + "version": "1.0.0", + "extensions": [ + { + "name": "My Dashboard", + "alias": "myDashboard", - "type": "dashboard", - "meta": { - "label": "My Dashboard", - "pathname": "my-dashboard", - "sections": ["Umb.Section.Content"] - } - } - ] -} \ No newline at end of file + "weight": -10, + "elementName": "my-dashboard", + "js": "js/my-dashboard.js", + + "type": "dashboard", + "meta": { + "label": "My Dashboard", + "pathname": "my-dashboard" + }, + "conditions": [ + { + "alias": "Umb.Condition.SectionAlias", + "match": "Umb.Section.Content" + } + ] + } + ] +}