Skip to content

Commit a1ced8e

Browse files
committed
Merge branch 'main' into temp/16511
2 parents d527963 + 6e21fce commit a1ced8e

File tree

3,198 files changed

+43475
-28310
lines changed

Some content is hidden

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

3,198 files changed

+43475
-28310
lines changed

.github/RELEASE_INSTRUCTION.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Bellissima release instructions
2+
3+
4+
## Build
5+
6+
> _See internal documentation on the build/release workflow._
7+
8+
9+
## GitHub Release Notes
10+
11+
To generate release notes on GitHub.
12+
13+
- Go to the [**Releases** area](https://github.com/umbraco/Umbraco.CMS.Backoffice/releases)
14+
- Press the [**"Draft a new release"** button](https://github.com/umbraco/Umbraco.CMS.Backoffice/releases/new)
15+
- In the combobox for "Choose a tag", expand then select or enter the next version number, e.g. `v14.2.0`
16+
- If the tag does not already exist, an option labelled "Create new tag: v14.2.0 on publish" will appear, select that option
17+
- In the combobox for "Target: main", expand then select the release branch for the next version, e.g. `release/14.2`
18+
- In the combobox for "Previous tag: auto":
19+
- If the next release is an RC, then you can leave as `auto`
20+
- Otherwise, select the previous stable version, e.g. `v14.1.1`
21+
- Press the **"Generate release notes"** button, this will populate the main textarea
22+
- Check the details, view in the "Preview" tab
23+
- What type of release is this?
24+
- If it's an RC, then check "Set as a pre-release"
25+
- If it's stable, then check "Set as the latest release"
26+
- Once you're happy with the contents and ready to save...
27+
- If you need more time to review, press the **"Save draft"** button and you can come back to it later
28+
- If you are ready to make the release notes public, then press **"Publish release"** button! :tada:
29+
30+
> If you're curious about how the content is generated, take a look at the `release.yml` configuration:
31+
> https://github.com/umbraco/Umbraco.CMS.Backoffice/blob/main/.github/release.yml

.github/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ changelog:
99
categories:
1010
- title: 🙌 Notable Changes
1111
labels:
12-
- notable
12+
- category/notable
1313
- title: 💥 Breaking Changes
1414
labels:
1515
- category/breaking

.github/workflows/azure-static-web-apps-ambitious-stone-0033b3603.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ on:
55
branches:
66
- main
77
- release/*
8+
- v*/dev
89
pull_request:
910
types: [opened, synchronize, reopened, closed]
1011
branches:
1112
- main
1213
- release/*
14+
- v*/dev
1315
workflow_dispatch:
1416
inputs:
1517
issue_number:

.github/workflows/build_test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ on:
88
branches:
99
- main
1010
- release/*
11+
- v*/dev
1112
pull_request:
1213
branches:
1314
- main
1415
- release/*
16+
- v*/dev
1517

1618
# Allows GitHub to use this workflow to validate the merge queue
1719
merge_group:

.github/workflows/codeql.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ on:
1616
branches:
1717
- main
1818
- release/*
19+
- v*/dev
1920
pull_request:
2021
branches:
2122
- main
2223
- release/*
24+
- v*/dev
2325
schedule:
2426
- cron: '33 2 * * 1'
2527

.madgerc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"tsConfig": "tsconfig.json",
3+
"detectiveOptions": {
4+
"ts": {
5+
"skipTypeImports": true,
6+
"skipAsyncImports": true
7+
}
8+
}
9+
}

.sonarlint/connectedMode.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"sonarCloudOrganization": "umbraco",
3+
"projectKey": "umbraco_Umbraco.CMS.Backoffice"
4+
}

.vscode/settings.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"combobox",
77
"ctrls",
88
"devs",
9+
"Dropcursor",
910
"Elementable",
11+
"Gapcursor",
1012
"iframes",
1113
"invariantable",
1214
"lucide",
@@ -19,13 +21,20 @@
1921
"svgs",
2022
"templating",
2123
"tinymce",
24+
"tiptap",
2225
"umbraco",
2326
"Uncategorized",
2427
"uninitialize",
28+
"unprovide",
29+
"unpublishing",
2530
"variantable"
2631
],
2732
"exportall.config.folderListener": [],
2833
"exportall.config.relExclusion": [],
2934
"conventionalCommits.scopes": ["partial views"],
30-
"typescript.tsdk": "node_modules/typescript/lib"
35+
"typescript.tsdk": "node_modules/typescript/lib",
36+
"sonarlint.connectedMode.project": {
37+
"connectionId": "umbraco",
38+
"projectKey": "umbraco_Umbraco.CMS.Backoffice"
39+
}
3140
}

devops/icons/index.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,14 @@ const collectDiskIcons = async (icons) => {
124124
iconPaths.forEach((path) => {
125125
const rawData = readFileSync(path);
126126
const svg = rawData.toString();
127-
const pattern = /\/([^/]+)\.svg$/;
127+
const parsed = pathModule.parse(path);
128128

129-
const match = path.match(pattern);
130-
131-
if (!match) {
132-
console.log('No match found.');
129+
if (!parsed) {
130+
console.log('No match found for: ', path);
133131
return;
134132
}
135133

136-
const SVGFileName = match[1];
134+
const SVGFileName = parsed.name;
137135
const iconFileName = SVGFileName.replace('.svg', '');
138136
const iconName = iconFileName;
139137

devops/json-schema-generator/index.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { writeFileSync } from 'fs';
2+
import { createImportMap } from '../importmap/index.js';
3+
4+
const tsPath = './src/json-schema/all-packages.ts';
5+
6+
const importmap = createImportMap({
7+
rootDir: './src',
8+
replaceModuleExtensions: true,
9+
});
10+
11+
const paths = Object.keys(importmap.imports);
12+
13+
const content = `
14+
${
15+
paths.map(path => `import '${path}';`).join('\n')
16+
}
17+
`;
18+
19+
//const config = await resolveConfig('./.prettierrc.json');
20+
//const formattedContent = await format(content, { ...config, parser: 'json' });
21+
22+
writeFileSync(tsPath, content);

devops/openapi-ts/openapi-ts.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { defineConfig } from '@hey-api/openapi-ts';
22

33
export default defineConfig({
44
client: 'fetch',
5-
input: 'https://raw.githubusercontent.com/umbraco/Umbraco-CMS/v14/dev/src/Umbraco.Cms.Api.Management/OpenApi.json',
5+
input: 'https://raw.githubusercontent.com/umbraco/Umbraco-CMS/v15/dev/src/Umbraco.Cms.Api.Management/OpenApi.json',
66
output: {
77
path: 'src/external/backend-api/src',
88
format: 'prettier',

devops/tsconfig/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ DON'T EDIT THIS FILE DIRECTLY. It is generated by /devops/tsconfig/index.js
1818
const tsConfigBase = {
1919
compilerOptions: {
2020
module: 'esnext',
21+
moduleResolution: 'bundler',
22+
moduleDetection: 'force',
23+
verbatimModuleSyntax: true,
2124
target: 'es2022',
2225
lib: ['es2022', 'dom', 'dom.iterable'],
2326
outDir: './types',
@@ -29,8 +32,6 @@ const tsConfigBase = {
2932
incremental: true,
3033
skipLibCheck: true,
3134
noImplicitOverride: true,
32-
/* Bundler mode */
33-
moduleResolution: 'bundler',
3435
allowImportingTsExtensions: true,
3536
resolveJsonModule: true,
3637
isolatedModules: true,

eslint.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ import wcPlugin from 'eslint-plugin-wc';
66
import litPlugin from 'eslint-plugin-lit';
77
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
88
import tseslint from 'typescript-eslint';
9+
import jsdoc from 'eslint-plugin-jsdoc';
910

1011
export default [
1112
// Recommended config applied to all files
1213
js.configs.recommended,
1314
...tseslint.configs.recommended,
1415
wcPlugin.configs['flat/recommended'],
1516
litPlugin.configs['flat/recommended'],
17+
jsdoc.configs['flat/recommended'], // We use the non typescript version to allow types to be defined in the jsdoc comments. This will allow js docs as an alternative to typescript types.
1618
localRules.configs.all,
1719
eslintPluginPrettierRecommended,
1820

@@ -46,7 +48,7 @@ export default [
4648
},
4749
rules: {
4850
semi: ['warn', 'always'],
49-
"prettier/prettier": ["warn", { "endOfLine": "auto" }],
51+
'prettier/prettier': ['warn', { endOfLine: 'auto' }],
5052
'no-unused-vars': 'off', //Let '@typescript-eslint/no-unused-vars' catch the errors to allow unused function parameters (ex: in interfaces)
5153
'no-var': 'error',
5254
...importPlugin.configs.recommended.rules,

examples/block-custom-view/README.md

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: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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 } from '@umbraco-cms/backoffice/block';
5+
import type { UmbBlockEditorCustomViewElement } from '@umbraco-cms/backoffice/block-custom-view';
6+
7+
// eslint-disable-next-line local-rules/enforce-umb-prefix-on-element-name
8+
@customElement('example-block-custom-view')
9+
// eslint-disable-next-line local-rules/umb-class-prefix
10+
export class ExampleBlockCustomView extends UmbElementMixin(LitElement) implements UmbBlockEditorCustomViewElement {
11+
//
12+
@property({ attribute: false })
13+
content?: UmbBlockDataType;
14+
15+
@property({ attribute: false })
16+
settings?: UmbBlockDataType;
17+
18+
override render() {
19+
return html`
20+
<div class="uui-text ${this.settings?.blockAlignment ? 'align-' + this.settings?.blockAlignment : undefined}">
21+
<h5 class="uui-text">My Custom View</h5>
22+
<p>Headline: ${this.content?.headline}</p>
23+
<p>Alignment: ${this.settings?.blockAlignment}</p>
24+
</div>
25+
`;
26+
}
27+
28+
static override styles = [
29+
UmbTextStyles,
30+
css`
31+
:host {
32+
display: block;
33+
height: 100%;
34+
box-sizing: border-box;
35+
background-color: #dddddd;
36+
border-radius: 9px;
37+
padding: 12px;
38+
}
39+
40+
.align-center {
41+
text-align: center;
42+
}
43+
.align-right {
44+
text-align: right;
45+
}
46+
`,
47+
];
48+
}
49+
50+
export default ExampleBlockCustomView;
51+
52+
declare global {
53+
interface HTMLElementTagNameMap {
54+
'example-block-custom-view': ExampleBlockCustomView;
55+
}
56+
}

examples/block-custom-view/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export const manifests: Array<UmbExtensionManifest> = [
2+
{
3+
type: 'blockEditorCustomView',
4+
alias: 'Umb.blockEditorCustomView.TestView',
5+
name: 'Block Editor Custom View Test',
6+
element: () => import('./block-custom-view.js'),
7+
forContentTypeAlias: 'headlineUmbracoDemoBlock',
8+
forBlockEditor: 'block-list',
9+
},
10+
];

examples/dashboard-with-property-dataset/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@
33
This example demonstrates the essence of the Property Dataset.
44

55
This dashboard implements such, to display a few selected Property Editors and bind the data back to the Dashboard.
6+
7+
8+
## SVG code of Icons
9+
10+
Make sure to use currentColor for fill or stroke color, as that will make the icon adapt to the font color of where its begin used.

examples/dashboard-with-property-dataset/dataset-dashboard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
22
import { css, html, customElement, LitElement } from '@umbraco-cms/backoffice/external/lit';
33
import { UmbElementMixin } from '@umbraco-cms/backoffice/element-api';
4-
import { UmbPropertyValueData, type UmbPropertyDatasetElement } from '@umbraco-cms/backoffice/property';
4+
import { type UmbPropertyValueData, type UmbPropertyDatasetElement } from '@umbraco-cms/backoffice/property';
55

66
@customElement('example-dataset-dashboard')
77
export class ExampleDatasetDashboard extends UmbElementMixin(LitElement) {

examples/dashboard-with-property-dataset/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ManifestDashboard } from '@umbraco-cms/backoffice/extension-registry';
1+
import type { ManifestDashboard } from '@umbraco-cms/backoffice/dashboard';
22

33
export const manifests: Array<ManifestDashboard> = [
44
{
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const workspace: UmbExtensionManifest = {
2+
type: 'workspaceView',
3+
alias: 'Example.WorkspaceView.EntityContentTypeCondition',
4+
name: 'Example Workspace View With Entity Content Type Condition',
5+
element: () => import('./workspace-view.element.js'),
6+
meta: {
7+
icon: 'icon-bus',
8+
label: 'Conditional',
9+
pathname: 'conditional',
10+
},
11+
conditions: [
12+
{
13+
alias: 'Umb.Condition.WorkspaceContentTypeAlias',
14+
//match : 'blogPost'
15+
oneOf: ['blogPost', 'mediaType1'],
16+
},
17+
],
18+
};
19+
20+
export const manifests = [workspace];
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { html, customElement } from '@umbraco-cms/backoffice/external/lit';
2+
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
3+
4+
@customElement('umb-example-entity-content-type-condition')
5+
export class UmbWorkspaceExampleViewElement extends UmbLitElement {
6+
override render() {
7+
return html`<p>
8+
This is a conditional element that is only shown in workspaces based on it's entities content type.
9+
</p>`;
10+
}
11+
}
12+
13+
export default UmbWorkspaceExampleViewElement;
14+
15+
declare global {
16+
interface HTMLElementTagNameMap {
17+
'umb-example-entity-content-type-condition': UmbWorkspaceExampleViewElement;
18+
}
19+
}

examples/icons/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Icons Example
2+
3+
This example demonstrates how to registerer your own icons.
4+
5+
Currently they have to be made as JavaScript files that exports an SVG string.
6+
7+
Declared as part of a Icon Dictionary in a JavaScript file.

examples/icons/files/icon-heart.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export default `<!-- @license lucide-static v0.424.0 - ISC -->
2+
<svg
3+
class="lucide lucide-heart"
4+
xmlns="http://www.w3.org/2000/svg"
5+
viewBox="0 0 24 24"
6+
fill="none"
7+
stroke="currentColor"
8+
stroke-width="1.75"
9+
stroke-linecap="round"
10+
stroke-linejoin="round"
11+
>
12+
<path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z" />
13+
</svg>
14+
`;

0 commit comments

Comments
 (0)