Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
915 changes: 431 additions & 484 deletions src/Umbraco.Web.UI.Client/package-lock.json

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions src/Umbraco.Web.UI.Client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,10 @@
"element-internals-polyfill": "^3.0.2"
},
"devDependencies": {
"@babel/core": "^7.28.0",
"@eslint/js": "^9.33.0",
"@babel/core": "^7.28.4",
"@eslint/js": "^9.37.0",
"@open-wc/testing": "^4.0.0",
"@playwright/test": "^1.54.2",
"@playwright/test": "^1.55.1",
"@storybook/addon-a11y": "9.0.14",
"@storybook/addon-docs": "9.0.14",
"@storybook/addon-links": "9.0.14",
Expand All @@ -233,18 +233,18 @@
"@web/test-runner": "^0.20.2",
"@web/test-runner-playwright": "^0.11.1",
"babel-loader": "^10.0.0",
"cross-env": "7.0.3",
"cssnano": "^7.1.0",
"eslint": "^9.33.0",
"cross-env": "10.1.0",
"cssnano": "^7.1.1",
"eslint": "^9.37.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-jsdoc": "^50.8.0",
"eslint-plugin-jsdoc": "^60.8.2",
"eslint-plugin-lit": "^2.1.1",
"eslint-plugin-local-rules": "^3.0.2",
"eslint-plugin-prettier": "^5.5.4",
"eslint-plugin-storybook": "9.0.14",
"eslint-plugin-wc": "^2.2.1",
"globals": "^16.3.0",
"eslint-plugin-wc": "^3.0.2",
"globals": "^16.4.0",
"madge": "^8.0.0",
"msw": "^1.3.5",
"playwright-msw": "^3.0.1",
Expand All @@ -255,12 +255,12 @@
"storybook": "9.0.14",
"tiny-glob": "^0.2.9",
"tsc-alias": "^1.8.16",
"typedoc": "^0.28.10",
"typescript": "5.9.2",
"typescript-eslint": "^8.39.1",
"typedoc": "^0.28.13",
"typescript": "5.9.3",
"typescript-eslint": "^8.45.0",
"typescript-json-schema": "^0.65.1",
"vite": "^7.1.5",
"vite-plugin-static-copy": "^3.1.2",
"vite": "^7.1.9",
"vite-plugin-static-copy": "^3.1.3",
"vite-tsconfig-paths": "^5.1.4",
"web-component-analyzer": "^2.0.0"
},
Expand Down
3 changes: 1 addition & 2 deletions src/Umbraco.Web.UI.Client/src/assets/lang/da.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2472,8 +2472,7 @@ export default {
confirmDeleteBlockTypeNotice:
'Indholdet vil stadigt eksistere, men redigering af dette indhold vil ikke\n være muligt. Indholdet vil blive vist som ikke understøttet indhold.\n ',
confirmDeleteBlockGroupTitle: 'Slet gruppe?',
confirmDeleteBlockGroupMessage:
'Er du sikker på at du vil slette gruppen <strong>%0%</strong>?',
confirmDeleteBlockGroupMessage: 'Er du sikker på at du vil slette gruppen <strong>%0%</strong>?',
confirmDeleteBlockGroupNotice:
'Indholdet af gruppens blokke vil stadigt eksistere, men redigering af dette indhold vil ikke\n være muligt. Indholdet vil blive vist som ikke understøttet indhold.\n ',
blockConfigurationOverlayTitle: "Konfiguration af '%0%'",
Expand Down
3 changes: 1 addition & 2 deletions src/Umbraco.Web.UI.Client/src/assets/lang/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2605,8 +2605,7 @@ export default {
confirmDeleteBlockTypeNotice:
'The content of this block will still be present, editing of this content will no longer be available and will be shown as unsupported content.',
confirmDeleteBlockGroupTitle: 'Delete group?',
confirmDeleteBlockGroupMessage:
'Are you sure you want to delete group <strong>%0%</strong>?',
confirmDeleteBlockGroupMessage: 'Are you sure you want to delete group <strong>%0%</strong>?',
confirmDeleteBlockGroupNotice:
'The content of these Blocks will still be present, editing of this content will no longer be available and will be shown as unsupported content.',
blockConfigurationOverlayTitle: "Configuration of '%0%'",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"build": "vite build"
},
"dependencies": {
"dompurify": "^3.2.5"
"dompurify": "^3.2.7"
}
}
2 changes: 1 addition & 1 deletion src/Umbraco.Web.UI.Client/src/external/lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"build": "vite build"
},
"dependencies": {
"lit": "^3.3.0"
"lit": "^3.3.1"
}
}
2 changes: 1 addition & 1 deletion src/Umbraco.Web.UI.Client/src/external/marked/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"build": "vite build"
},
"dependencies": {
"marked": "^15.0.9"
"marked": "^16.3.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"build": "vite build"
},
"dependencies": {
"monaco-editor": "^0.52.2"
"monaco-editor": "^0.54.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const distAssets = '../../../dist-cms';
rmSync(dist, { recursive: true, force: true });

// copy fonts
cpSync('../../../node_modules/monaco-editor/min/vs/base/browser/ui/codicons', `${distAssets}/assets/fonts`, {
cpSync('../../../node_modules/monaco-editor/esm/vs/base/browser/ui/codicons', `${distAssets}/assets/fonts`, {
recursive: true,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ export class UmbPropertyEditorUIBlockGridAreaTypePermissionElement
private _blockTypes?: Array<UmbBlockTypeWithGroupKey>;

@state()
private _blockTypesWithElementName: Array<{ type: UmbBlockTypeWithGroupKey; name: string; icon: string | null | undefined }> = [];
private _blockTypesWithElementName: Array<{
type: UmbBlockTypeWithGroupKey;
name: string;
icon: string | null | undefined;
}> = [];

@state()
private _blockGroups: Array<UmbBlockGridTypeGroupType> = [];
Expand All @@ -55,7 +59,11 @@ export class UmbPropertyEditorUIBlockGridAreaTypePermissionElement
}
return undefined;
})
.filter((x) => x !== undefined) as Array<{ type: UmbBlockTypeWithGroupKey; name: string; icon: string | null | undefined }>;
.filter((x) => x !== undefined) as Array<{
type: UmbBlockTypeWithGroupKey;
name: string;
icon: string | null | undefined;
}>;
});

this.consumeContext(UMB_DATA_TYPE_WORKSPACE_CONTEXT, async (context) => {
Expand Down Expand Up @@ -193,9 +201,7 @@ export class UmbPropertyEditorUIBlockGridAreaTypePermissionElement
this._blockGroups,
(group) => group.key,
(group) =>
html`<uui-combobox-list-option
.value=${group.key}
?selected=${area.groupKey === group.key}>
html`<uui-combobox-list-option .value=${group.key} ?selected=${area.groupKey === group.key}>
<umb-icon name="icon-folder"></umb-icon>
${group.name}
</uui-combobox-list-option>`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface UmbElementValueModel<ValueType = unknown> extends UmbPropertyVa
/**
* @deprecated, we do not use entityType on values anymore. To be removed in Umbraco v.18.
* Just remove the property.
**/
*/
entityType?: string;
segment: string | null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,11 +392,11 @@ export abstract class UmbContentDetailWorkspaceContextBase<
this.#segments.setValue(data?.items ?? []);
}

/**
* @deprecated Call `_processIncomingData` instead. `_scaffoldProcessData` will be removed in v.18.
*/
/**
* @deprecated Call `_processIncomingData` instead. `_scaffoldProcessData` will be removed in v.18.
*/
protected override _scaffoldProcessData(data: DetailModelType): Promise<DetailModelType> {
return this._processIncomingData(data);
return this._processIncomingData(data);
}

protected override async _processIncomingData(data: DetailModelType): Promise<DetailModelType> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is auto-generated by @hey-api/openapi-ts

import type { ClientOptions } from './types.gen';
import { type Config, type ClientOptions as DefaultClientOptions, createClient, createConfig } from './client';
import { type ClientOptions, type Config, createClient, createConfig } from './client';
import type { ClientOptions as ClientOptions2 } from './types.gen';

/**
* The `createClientConfig()` function will be called on client initialization
Expand All @@ -11,8 +11,8 @@ import { type Config, type ClientOptions as DefaultClientOptions, createClient,
* `setConfig()`. This is useful for example if you're using Next.js
* to ensure your client always has the correct values.
*/
export type CreateClientConfig<T extends DefaultClientOptions = ClientOptions> = (override?: Config<DefaultClientOptions & T>) => Config<Required<DefaultClientOptions> & T>;
export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;

export const client = createClient(createConfig<ClientOptions>({
export const client = createClient(createConfig<ClientOptions2>({
throwOnError: true
}));
}));
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { createSseClient } from '../core/serverSentEvents.gen';
import type { HttpMethod } from '../core/types.gen';
import { getValidRequestBody } from '../core/utils.gen';
import type {
Client,
Config,
Expand Down Expand Up @@ -60,12 +61,12 @@ export const createClient = (config: Config = {}): Client => {
await opts.requestValidator(opts);
}

if (opts.body && opts.bodySerializer) {
if (opts.body !== undefined && opts.bodySerializer) {
opts.serializedBody = opts.bodySerializer(opts.body);
}

// remove Content-Type header if body is empty to avoid sending invalid requests
if (opts.serializedBody === undefined || opts.serializedBody === '') {
if (opts.body === undefined || opts.serializedBody === '') {
opts.headers.delete('Content-Type');
}

Expand All @@ -80,12 +81,12 @@ export const createClient = (config: Config = {}): Client => {
const requestInit: ReqInit = {
redirect: 'follow',
...opts,
body: opts.serializedBody,
body: getValidRequestBody(opts),
};

let request = new Request(url, requestInit);

for (const fn of interceptors.request._fns) {
for (const fn of interceptors.request.fns) {
if (fn) {
request = await fn(request, opts);
}
Expand All @@ -96,7 +97,7 @@ export const createClient = (config: Config = {}): Client => {
const _fetch = opts.fetch!;
let response = await _fetch(request);

for (const fn of interceptors.response._fns) {
for (const fn of interceptors.response.fns) {
if (fn) {
response = await fn(response, request, opts);
}
Expand All @@ -108,23 +109,41 @@ export const createClient = (config: Config = {}): Client => {
};

if (response.ok) {
const parseAs =
(opts.parseAs === 'auto'
? getParseAs(response.headers.get('Content-Type'))
: opts.parseAs) ?? 'json';

if (
response.status === 204 ||
response.headers.get('Content-Length') === '0'
) {
let emptyData: any;
switch (parseAs) {
case 'arrayBuffer':
case 'blob':
case 'text':
emptyData = await response[parseAs]();
break;
case 'formData':
emptyData = new FormData();
break;
case 'stream':
emptyData = response.body;
break;
case 'json':
default:
emptyData = {};
break;
}
return opts.responseStyle === 'data'
? {}
? emptyData
: {
data: {},
data: emptyData,
...result,
};
}

const parseAs =
(opts.parseAs === 'auto'
? getParseAs(response.headers.get('Content-Type'))
: opts.parseAs) ?? 'json';

let data: any;
switch (parseAs) {
case 'arrayBuffer':
Expand Down Expand Up @@ -173,7 +192,7 @@ export const createClient = (config: Config = {}): Client => {
const error = jsonError ?? textError;
let finalError = error;

for (const fn of interceptors.error._fns) {
for (const fn of interceptors.error.fns) {
if (fn) {
finalError = (await fn(error, response, request, opts)) as string;
}
Expand Down Expand Up @@ -206,6 +225,15 @@ export const createClient = (config: Config = {}): Client => {
body: opts.body as BodyInit | null | undefined,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
let request = new Request(url, init);
for (const fn of interceptors.request.fns) {
if (fn) {
request = await fn(request, opts);
}
}
return request;
},
url,
});
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export {
urlSearchParamsBodySerializer,
} from '../core/bodySerializer.gen';
export { buildClientParams } from '../core/params.gen';
export { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';
export { createClient } from './client.gen';
export type {
Client,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface Config<T extends ClientOptions = ClientOptions>
*
* @default globalThis.fetch
*/
fetch?: (request: Request) => ReturnType<typeof fetch>;
fetch?: typeof fetch;
/**
* Please don't use the Fetch client for Next.js applications. The `next`
* options won't have any effect.
Expand Down
Loading
Loading