Skip to content

Commit 3da8f41

Browse files
Deprecations: Client-side removal of v17 deprecated code (#20294)
* Webhooks: Removal of client-side deprecations for v17 * User: Removal of client-side deprecations for v17 * UFM: Removal of client-side deprecations for v17 * Tiptap: Removal of client-side deprecations for v17 * Templating: Removal of client-side deprecations for v17 * RTE: Removal of client-side deprecations for v17 * Relations: Removal of client-side deprecations for v17 * Search: Removal of client-side deprecations for v17 * Property Editors: Removal of client-side deprecations for v17 * URL Picker: Removal of client-side deprecations for v17 * Members: Removal of client-side deprecations for v17 * Media: Removal of client-side deprecations for v17 * Extension Insights: Removal of client-side deprecations for v17 * Documents: Removal of client-side deprecations for v17 * Media: Removal of client-side deprecations for v17 (part 2) * Data Types: Removal of client-side deprecations for v17 * Core: Removal of client-side deprecations for v17 * Content: Removal of client-side deprecations for v17 * Clipboard: Removal of client-side deprecations for v17 * Blocks: Removal of client-side deprecations for v17 * Mocks: Removal of client-side deprecations for v17 * Libs: Removal of client-side deprecations for v17 * Apps: Removal of client-side deprecations for v17 * DevOps: Removal of client-side deprecations for v17 * Document Publishing Workspace: Removal of client-side deprecations for v17 Refactored to use `UmbDocumentPublishingWorkspaceContext` * Reverted/modified some of my TODO comments * Updated TODO comment * Code cleanup sweep of TODO comments and tweaks * Updated OpenApi.json, re-gen TS client Tried to fix up mock data. * Refactored the document variant name/fields * Implemented co-pilot suggestions --------- Co-authored-by: Jacob Overgaard <[email protected]>
1 parent f14c4d5 commit 3da8f41

File tree

203 files changed

+1544
-3155
lines changed

Some content is hidden

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

203 files changed

+1544
-3155
lines changed

src/Umbraco.Cms.Api.Management/OpenApi.json

Lines changed: 637 additions & 278 deletions
Large diffs are not rendered by default.

src/Umbraco.Cms.StaticAssets/umbraco/UmbracoBackOffice/Index.cshtml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,12 @@
1212
@inject IJsonSerializer JsonSerializer
1313
@inject IProfilerHtml ProfilerHtml
1414
@inject IOptions<GlobalSettings> GlobalSettings
15-
1615
@{
1716
bool.TryParse(Context.Request.Query["umbDebug"], out var isDebug);
1817
var backOfficePath = BackOfficePathGenerator.BackOfficePath;
1918
var backOfficeAssetsPath = BackOfficePathGenerator.BackOfficeAssetsPath;
2019
var loginLogoImageAlternative = Url.RouteUrl(BackOfficeGraphicsController.LoginLogoAlternativeRouteName, new {Version= "1"});
21-
}
22-
23-
<!DOCTYPE html>
20+
}<!doctype html>
2421
<html lang="@GlobalSettings.Value.DefaultUILanguage">
2522

2623
<head>

src/Umbraco.Web.UI.Client/devops/eslint/rules/no-direct-api-import.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = {
33
meta: {
44
docs: {
55
description:
6-
'Ensures that any API resources from the `@umbraco-cms/backoffice/external/backend-api` module are not used directly. Instead you should use the `tryExecuteAndNotify` function from the `@umbraco-cms/backoffice/resources` module.',
6+
'Ensures that any API resources from the `@umbraco-cms/backoffice/external/backend-api` module are not used directly. Instead you should use the `tryExecute` function from the `@umbraco-cms/backoffice/resources` module.',
77
category: 'Best Practices',
88
recommended: true,
99
},

src/Umbraco.Web.UI.Client/devops/icons/index.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ const collectDictionaryIcons = async () => {
5252

5353
const icon = {
5454
name: iconDef.name,
55-
legacy: iconDef.legacy, // TODO: Deprecated, remove in v.17.
5655
hidden: iconDef.legacy ?? iconDef.internal,
5756
fileName: iconFileName,
5857
svg,
@@ -147,10 +146,8 @@ const collectDiskIcons = async (icons) => {
147146

148147
// Only append not already defined icons:
149148
if (!icons.find((x) => x.name === iconName)) {
150-
// remove legacy for v.17 (Deprecated)
151149
const icon = {
152150
name: iconName,
153-
legacy: true,
154151
hidden: true,
155152
fileName: iconFileName,
156153
svg,
@@ -184,11 +181,8 @@ const generateJS = (icons) => {
184181
const JSPath = `${moduleDirectory}/icons.ts`;
185182

186183
const iconDescriptors = icons.map((icon) => {
187-
// remove legacy for v.17 (Deprecated)
188-
// Notice how legacy also makes an icon hidden. Legacy will be removed in v.17, but still used in the dictionary for legacy icons. But outward they are both hidden. [NL]
189184
return `{
190185
name: "${icon.name}",
191-
${icon.legacy ? 'legacy: true,' : ''}
192186
${icon.hidden || icon.legacy ? 'hidden: true,' : ''}
193187
path: () => import("./icons/${icon.fileName}.js"),
194188
}`

src/Umbraco.Web.UI.Client/src/libs/context-api/consume/context-request.event.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
export const UMB_CONTEXT_REQUEST_EVENT_TYPE = 'umb:context-request';
2-
/**
3-
* @deprecated use UMB_CONTEXT_REQUEST_EVENT_TYPE
4-
* This will be removed in Umbraco 17
5-
*/
6-
export const UMB_CONTENT_REQUEST_EVENT_TYPE = UMB_CONTEXT_REQUEST_EVENT_TYPE;
72
export const UMB_DEBUG_CONTEXT_EVENT_TYPE = 'umb:debug-contexts';
83

94
export type UmbContextCallback<T> = (instance: T | undefined) => void;

src/Umbraco.Web.UI.Client/src/libs/context-api/provide/context-boundary.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export class UmbContextBoundary {
4545
* @memberof UmbContextBoundary
4646
*/
4747
public hostConnected(): void {
48-
//this.hostElement.addEventListener(UMB_CONTENT_REQUEST_EVENT_TYPE, this.#handleContextRequest);
4948
this.#eventTarget.dispatchEvent(new UmbContextProvideEventImplementation(this.#contextAlias));
5049
}
5150

src/Umbraco.Web.UI.Client/src/libs/localization-api/localization.controller.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,16 +241,15 @@ export class UmbLocalizationController<LocalizationSetType extends UmbLocalizati
241241
return new Intl.ListFormat(this.lang(), options).format(values);
242242
}
243243

244-
// TODO: for V.16 we should set type to be string | undefined. [NL]
245244
/**
246245
* Translates a string containing one or more terms. The terms should be prefixed with a `#` character.
247246
* If the term is found in the localization set, it will be replaced with the localized term.
248247
* If the term is not found, the original term will be returned.
249-
* @param {string | null | undefined} text The text to translate.
248+
* @param {string | undefined} text The text to translate.
250249
* @param {...any} args The arguments to parse for this localization entry.
251250
* @returns {string} The translated text.
252251
*/
253-
string(text: string | null | undefined, ...args: any): string {
252+
string(text: string | undefined, ...args: any): string {
254253
if (typeof text !== 'string') {
255254
return '';
256255
}

src/Umbraco.Web.UI.Client/src/mocks/data/data-type/data-type.data.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,7 +1272,7 @@ export const data: Array<UmbMockDataTypeModel> = [
12721272
isFolder: false,
12731273
isDeletable: true,
12741274
canIgnoreStartNodes: false,
1275-
signs: [],
1275+
flags: [],
12761276
values: [],
12771277
},
12781278
{
@@ -1285,7 +1285,7 @@ export const data: Array<UmbMockDataTypeModel> = [
12851285
isFolder: false,
12861286
isDeletable: true,
12871287
canIgnoreStartNodes: false,
1288-
signs: [],
1288+
flags: [],
12891289
values: [],
12901290
},
12911291
{
@@ -1298,7 +1298,7 @@ export const data: Array<UmbMockDataTypeModel> = [
12981298
isFolder: false,
12991299
isDeletable: true,
13001300
canIgnoreStartNodes: false,
1301-
signs: [],
1301+
flags: [],
13021302
values: [],
13031303
},
13041304
{
@@ -1311,7 +1311,7 @@ export const data: Array<UmbMockDataTypeModel> = [
13111311
isFolder: false,
13121312
isDeletable: true,
13131313
canIgnoreStartNodes: false,
1314-
signs: [],
1314+
flags: [],
13151315
values: [
13161316
{
13171317
alias: 'timeZones',

src/Umbraco.Web.UI.Client/src/mocks/data/document/data/permissions-test.data.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ export const data: Array<UmbMockDocumentModel> = [
4646
hasChildren: false,
4747
id: 'permissions-1-document-id',
4848
parent: { id: 'permissions-document-id' },
49-
urls: [
50-
{
51-
culture: null,
52-
url: '/permission-1',
53-
},
54-
],
5549
variants: permissionsTestDocument.variants.map((variant) => ({
5650
...variant,
5751
name: 'Permissions 1',
@@ -65,12 +59,6 @@ export const data: Array<UmbMockDocumentModel> = [
6559
hasChildren: true,
6660
id: 'permissions-2-document-id',
6761
parent: { id: 'permissions-document-id' },
68-
urls: [
69-
{
70-
culture: null,
71-
url: '/permissions-2',
72-
},
73-
],
7462
variants: permissionsTestDocument.variants.map((variant) => ({
7563
...variant,
7664
name: 'Permissions 2',

src/Umbraco.Web.UI.Client/src/mocks/data/document/document.data.ts

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export type UmbMockDocumentModel = DocumentResponseModel & DocumentTreeItemRespo
1111
export const data: Array<UmbMockDocumentModel> = [
1212
{
1313
ancestors: [],
14-
urls: [],
1514
template: null,
1615
id: 'the-simplest-document-id',
1716
createDate: '2023-02-06T15:32:05.350038',
@@ -50,12 +49,6 @@ export const data: Array<UmbMockDocumentModel> = [
5049
},
5150
{
5251
ancestors: [],
53-
urls: [
54-
{
55-
culture: 'en-US',
56-
url: '/',
57-
},
58-
],
5952
template: null,
6053
id: 'all-property-editors-document-id',
6154
createDate: '2023-02-06T15:32:05.350038',
@@ -677,12 +670,6 @@ export const data: Array<UmbMockDocumentModel> = [
677670
},
678671
{
679672
ancestors: [],
680-
urls: [
681-
{
682-
culture: 'en-US',
683-
url: '/',
684-
},
685-
],
686673
template: null,
687674
id: 'c05da24d-7740-447b-9cdc-bd8ce2172e38',
688675
createDate: '2023-02-06T15:32:05.350038',
@@ -828,7 +815,6 @@ export const data: Array<UmbMockDocumentModel> = [
828815
},
829816
{
830817
ancestors: [],
831-
urls: [],
832818
template: null,
833819
id: 'fd56a0b5-01a0-4da2-b428-52773bfa9cc4',
834820
createDate: '2023-02-06T15:32:05.350038',
@@ -916,12 +902,6 @@ export const data: Array<UmbMockDocumentModel> = [
916902
},
917903
{
918904
ancestors: [],
919-
urls: [
920-
{
921-
culture: 'en-US',
922-
url: '/',
923-
},
924-
],
925905
template: null,
926906
id: 'simple-document-id',
927907
createDate: '2023-02-06T15:32:05.350038',
@@ -968,12 +948,6 @@ export const data: Array<UmbMockDocumentModel> = [
968948
},
969949
{
970950
ancestors: [],
971-
urls: [
972-
{
973-
culture: 'en-US',
974-
url: '/',
975-
},
976-
],
977951
template: null,
978952
id: 'all-rtes-id',
979953
createDate: '2023-02-06T15:32:05.350038',
@@ -1038,12 +1012,6 @@ export const data: Array<UmbMockDocumentModel> = [
10381012
},
10391013
{
10401014
ancestors: [],
1041-
urls: [
1042-
{
1043-
culture: 'en-US',
1044-
url: '/',
1045-
},
1046-
],
10471015
template: null,
10481016
id: 'block-editors-document-id',
10491017
createDate: '2023-02-06T15:32:05.350038',
@@ -1308,7 +1276,6 @@ export const data: Array<UmbMockDocumentModel> = [
13081276
},
13091277
{
13101278
ancestors: [],
1311-
urls: [],
13121279
template: null,
13131280
id: 'forbidden',
13141281
createDate: '2023-02-06T15:32:05.350038',

0 commit comments

Comments
 (0)