From f6ddd770ab7eb656d418f662b61130ab256b893b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Wed, 21 Aug 2024 10:51:42 +0200 Subject: [PATCH] clean up --- .../block/block-list/context/block-list-entries.context.ts | 2 +- .../packages/core/validation/utils/json-path.function.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-list/context/block-list-entries.context.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-list/context/block-list-entries.context.ts index e01e973f14..6f09e65e16 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-list/context/block-list-entries.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-list/context/block-list-entries.context.ts @@ -41,7 +41,7 @@ export class UmbBlockListEntriesContext extends UmbBlockEntriesContext< blockGroups: [], openClipboard: routingInfo.view === 'clipboard', originData: { index: index }, - createBlockInWorkspace: this._manager.getLiveEditingMode() === false, + createBlockInWorkspace: this._manager.getInlineEditingMode() === false, }, }; }) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/validation/utils/json-path.function.ts b/src/Umbraco.Web.UI.Client/src/packages/core/validation/utils/json-path.function.ts index 98606e2ee3..c7c1244fc0 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/validation/utils/json-path.function.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/validation/utils/json-path.function.ts @@ -28,6 +28,7 @@ export function GetPropertyNameFromPath(path: string): string { * * @param data * @param path + * @returns {any} */ function GetNextPropertyValueFromPath(data: any, path: string): any { if (!data) return undefined; @@ -56,7 +57,6 @@ function GetNextPropertyValueFromPath(data: any, path: string): any { // check if the entryPointer is a JSON Path Filter ( starting with ?( and ending with ) ): if (entryPointer.startsWith('?(') && entryPointer.endsWith(')')) { // get the filter from the entryPointer: - console.log('query', entryPointer); // get the filter as a function: const jsFilter = JsFilterFromJsonPathFilter(entryPointer); // find the index of the value that matches the filter: @@ -90,10 +90,10 @@ function GetNextPropertyValueFromPath(data: any, path: string): any { } /** - * * @param filter + * @returns {Array<(queryFilter: any) => boolean>} - array of methods that returns true if the given items property value matches the value of the query. */ -function JsFilterFromJsonPathFilter(filter: string): any { +function JsFilterFromJsonPathFilter(filter: string): Array<(item: any) => boolean> { // strip ?( and ) from the filter const jsFilter = filter.slice(2, -1); // split the filter into parts by splitting at ' && '