Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Commit 7de4f79

Browse files
Merge branch 'main' into v14/bugfix/block-area-config-use-workspace-create
2 parents 12fc41c + d8b72cf commit 7de4f79

File tree

50 files changed

+687
-206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+687
-206
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Property Dataset Dashboard Example
2+
3+
This example is a work in progress example of how to write a property editor.
4+
5+
This example covers a few points:
6+
7+
- Using an existing Property Editor Schema
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
2+
import { html, customElement, LitElement, property, css } from '@umbraco-cms/backoffice/external/lit';
3+
import { UmbElementMixin } from '@umbraco-cms/backoffice/element-api';
4+
import type { UmbBlockDataType, UmbBlockEditorCustomViewElement } from '@umbraco-cms/backoffice/extension-registry';
5+
6+
@customElement('example-block-custom-view')
7+
export class ExampleBlockCustomView extends UmbElementMixin(LitElement) implements UmbBlockEditorCustomViewElement {
8+
//
9+
@property({ attribute: false })
10+
content?: UmbBlockDataType;
11+
12+
override render() {
13+
return html`
14+
<div class="uui-text">
15+
<h5 class="uui-text">My Custom View</h5>
16+
<p>Headline: ${this.content.headline}</p>
17+
</div>
18+
`;
19+
}
20+
21+
static override styles = [
22+
UmbTextStyles,
23+
css`
24+
:host {
25+
display: block;
26+
height: 100%;
27+
box-sizing: border-box;
28+
background-color: #dddddd;
29+
border-radius: 9px;
30+
padding: 12px;
31+
}
32+
`,
33+
];
34+
}
35+
36+
export default ExampleBlockCustomView;
37+
38+
declare global {
39+
interface HTMLElementTagNameMap {
40+
'example-block-custom-view': ExampleBlockCustomView;
41+
}
42+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import type { ManifestBlockEditorCustomView } from '@umbraco-cms/backoffice/extension-registry';
2+
3+
export const manifests: Array<ManifestBlockEditorCustomView> = [
4+
{
5+
type: 'blockEditorCustomView',
6+
alias: 'Umb.blockEditorCustomView.TestView',
7+
name: 'Block Editor Custom View Test',
8+
element: () => import('./block-custom-view.js'),
9+
forContentTypeAlias: 'headlineUmbracoDemoBlock',
10+
forBlockEditor: 'block-grid',
11+
},
12+
];

package-lock.json

Lines changed: 24 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@
143143
"./src/packages/property-editors",
144144
"./src/packages/tags",
145145
"./src/packages/templating",
146+
"./src/packages/tiny-mce",
146147
"./src/packages/umbraco-news",
147148
"./src/packages/user",
148149
"./src/packages/webhook"
@@ -222,7 +223,7 @@
222223
"@hey-api/openapi-ts": "^0.48.3",
223224
"@mdx-js/react": "^3.0.1",
224225
"@open-wc/testing": "^4.0.0",
225-
"@playwright/test": "^1.45.2",
226+
"@playwright/test": "^1.45.3",
226227
"@rollup/plugin-commonjs": "^26.0.1",
227228
"@rollup/plugin-json": "^6.1.0",
228229
"@rollup/plugin-node-resolve": "^15.2.3",
@@ -267,7 +268,7 @@
267268
"storybook": "^7.6.17",
268269
"tiny-glob": "^0.2.9",
269270
"tsc-alias": "^1.8.10",
270-
"typedoc": "^0.26.4",
271+
"typedoc": "^0.26.5",
271272
"typescript": "^5.5.3",
272273
"typescript-eslint": "^7.16.1",
273274
"typescript-json-schema": "^0.64.0",

src/assets/lang/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,6 +1562,7 @@ export default {
15621562
ascending: 'ascending',
15631563
descending: 'descending',
15641564
template: 'Template',
1565+
systemFields: 'System fields',
15651566
},
15661567
grid: {
15671568
media: 'Image',

src/packages/core/components/input-entity/input-entity.element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export class UmbInputEntityElement extends UmbFormControlMixin<string | undefine
148148
id="btn-add"
149149
look="placeholder"
150150
@click=${this.#openPicker}
151-
label="${this.localize.term('general_choose')}"></uui-button>
151+
label=${this.localize.term('general_choose')}></uui-button>
152152
`;
153153
}
154154

src/packages/core/content-type/modals/composition-picker/composition-picker-modal.element.ts

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,18 @@ export class UmbCompositionPickerModalElement extends UmbModalBaseElement<
9090
await this.#init;
9191
if (!this.#compositionRepository) return;
9292

93-
const isElement = this.data?.isElement;
94-
const currentPropertyAliases = this.data?.currentPropertyAliases;
93+
// Notice isElement is not available on all types that can be composed.
94+
const isElement = this.data?.isElement ?? undefined;
95+
const currentPropertyAliases = this.data?.currentPropertyAliases ?? [];
9596

9697
const { data } = await this.#compositionRepository.availableCompositions({
9798
unique: this.#unique,
9899
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
99100
// @ts-ignore
100101
// TODO: isElement is not available on all types that can be composed.
101-
isElement: isElement ?? false,
102+
isElement: isElement,
102103
currentCompositeUniques: this._selection,
103-
currentPropertyAliases: currentPropertyAliases ?? [],
104+
currentPropertyAliases: currentPropertyAliases,
104105
});
105106

106107
if (!data) return;
@@ -129,19 +130,22 @@ export class UmbCompositionPickerModalElement extends UmbModalBaseElement<
129130
<div slot="actions">
130131
<uui-button label=${this.localize.term('general_close')} @click=${this._rejectModal}></uui-button>
131132
${!this._references.length
132-
? html`<uui-button
133-
label=${this.localize.term('general_submit')}
134-
look="primary"
135-
color="positive"
136-
@click=${this._submitModal}></uui-button>`
133+
? html`
134+
<uui-button
135+
label=${this.localize.term('general_submit')}
136+
look="primary"
137+
color="positive"
138+
@click=${this._submitModal}></uui-button>
139+
`
137140
: nothing}
138141
</div>
139142
</umb-body-layout>
140143
`;
141144
}
142145

143146
#renderHasReference() {
144-
return html` <umb-localize key="contentTypeEditor_compositionInUse">
147+
return html`
148+
<umb-localize key="contentTypeEditor_compositionInUse">
145149
This Content Type is used in a composition, and therefore cannot be composed itself.
146150
</umb-localize>
147151
<h4>
@@ -154,19 +158,22 @@ export class UmbCompositionPickerModalElement extends UmbModalBaseElement<
154158
${repeat(
155159
this._references,
156160
(item) => item.unique,
157-
(item) =>
158-
html`<uui-ref-node-document-type
161+
(item) => html`
162+
<uui-ref-node-document-type
159163
href=${'/section/settings/workspace/document-type/edit/' + item.unique}
160-
name=${item.name}>
164+
name=${this.localize.string(item.name)}>
161165
<umb-icon slot="icon" name=${item.icon}></umb-icon>
162-
</uui-ref-node-document-type>`,
166+
</uui-ref-node-document-type>
167+
`,
163168
)}
164-
</div>`;
169+
</div>
170+
`;
165171
}
166172

167173
#renderAvailableCompositions() {
168174
if (this._compatibleCompositions) {
169-
return html`<umb-localize key="contentTypeEditor_compositionsDescription">
175+
return html`
176+
<umb-localize key="contentTypeEditor_compositionsDescription">
170177
Inherit tabs and properties from an existing Document Type. New tabs will be<br />added to the current
171178
Document Type or merged if a tab with an identical name exists.<br />
172179
</umb-localize>
@@ -184,27 +191,31 @@ export class UmbCompositionPickerModalElement extends UmbModalBaseElement<
184191
: nothing}
185192
${this.#renderCompositionsItems(folder.compositions)}`,
186193
)}
187-
</div>`;
194+
</div>
195+
`;
188196
} else {
189-
return html`<umb-localize key="contentTypeEditor_noAvailableCompositions">
190-
There are no Content Types available to use as a composition
191-
</umb-localize>`;
197+
return html`
198+
<umb-localize key="contentTypeEditor_noAvailableCompositions">
199+
There are no Content Types available to use as a composition
200+
</umb-localize>
201+
`;
192202
}
193203
}
194204

195205
#renderCompositionsItems(compositionsList: Array<UmbContentTypeCompositionCompatibleModel>) {
196206
return repeat(
197207
compositionsList,
198208
(compositions) => compositions.unique,
199-
(compositions) =>
200-
html`<uui-menu-item
201-
label=${compositions.name}
209+
(compositions) => html`
210+
<uui-menu-item
211+
label=${this.localize.string(compositions.name)}
202212
selectable
203213
@selected=${() => this.#onSelectionAdd(compositions.unique)}
204214
@deselected=${() => this.#onSelectionRemove(compositions.unique)}
205215
?selected=${this._selection.find((unique) => unique === compositions.unique)}>
206216
<umb-icon name=${compositions.icon} slot="icon"></umb-icon>
207-
</uui-menu-item>`,
217+
</uui-menu-item>
218+
`,
208219
);
209220
}
210221

0 commit comments

Comments
 (0)