Merge branch 'main' into feature/document-type-groups

This commit is contained in:
Lone Iversen
2023-08-23 16:17:39 +02:00
committed by GitHub
5 changed files with 41 additions and 30 deletions

View File

@@ -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"
}
]
}
]
}

View File

@@ -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';

View File

@@ -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 {

View File

@@ -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

View File

@@ -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"]
}
}
]
}
"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"
}
]
}
]
}