From e87a53730ad1f733bfebbbbff9d7f71b33806ff4 Mon Sep 17 00:00:00 2001 From: Alexis JC Date: Thu, 27 Jun 2024 12:34:22 +0200 Subject: [PATCH 1/2] chore: update wwlib --- src/wwElement.vue | 4 ++-- ww-config.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wwElement.vue b/src/wwElement.vue index 08e0437..ccb18a1 100644 --- a/src/wwElement.vue +++ b/src/wwElement.vue @@ -151,12 +151,12 @@ export default { }, computed: { stacks() { - const stacks = wwLib.wwCollection.getCollectionData(this.content.stacks); + const stacks = wwLib.wwUtils.getDataFromCollection(this.content.stacks); if (!Array.isArray(stacks)) return []; return stacks; }, items() { - const items = wwLib.wwCollection.getCollectionData(this.content.items); + const items = wwLib.wwUtils.getDataFromCollection(this.content.items); if (!Array.isArray(items)) return []; return items; }, diff --git a/ww-config.js b/ww-config.js index be9d29c..34ecc5d 100644 --- a/ww-config.js +++ b/ww-config.js @@ -2,12 +2,12 @@ function showObjectPropertyPath(basePropertyKey, { content, boundProps }) { return ( boundProps[basePropertyKey] && content[basePropertyKey] && - typeof wwLib.wwCollection.getCollectionData(content[basePropertyKey])[0] === + typeof wwLib.wwUtils.getDataFromCollection(content[basePropertyKey])[0] === "object" ); } function getObjectPropertyPathOptions(basePropertyKey, { content }) { - const data = wwLib.wwCollection.getCollectionData(content[basePropertyKey]); + const data = wwLib.wwUtils.getDataFromCollection(content[basePropertyKey]); if (!data.length || typeof data[0] !== "object") { return null; } From 76acbc246680ead19046736504bdce53013e2e41 Mon Sep 17 00:00:00 2001 From: Alexis JC Date: Thu, 27 Jun 2024 12:41:32 +0200 Subject: [PATCH 2/2] chore: update wwlib 2 --- src/wwElement.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/wwElement.vue b/src/wwElement.vue index ccb18a1..cd9eab2 100644 --- a/src/wwElement.vue +++ b/src/wwElement.vue @@ -85,7 +85,7 @@ export default { name: "item:moved", event: { item: change.added.element, - from: wwLib.resolveObjectPropertyPath( + from: wwLib.wwUtils.resolveObjectPropertyPath( change.added.element, props.content.stackedBy ), @@ -223,12 +223,12 @@ export default { this.internalStacks = this.stacks .map((stack) => ({ label: - wwLib.resolveObjectPropertyPath( + wwLib.wwUtils.resolveObjectPropertyPath( stack, this.content.stackLabel || "label" ) ?? "", value: - wwLib.resolveObjectPropertyPath( + wwLib.wwUtils.resolveObjectPropertyPath( stack, this.content.stackValue || "value" ) ?? "", @@ -238,18 +238,18 @@ export default { items: this.items .filter( (item) => - wwLib.resolveObjectPropertyPath( + wwLib.wwUtils.resolveObjectPropertyPath( item, this.content.stackedBy ) === stack.value ) .sort((a, b) => { if (!this.content.sortedBy) return 0; - const valueA = wwLib.resolveObjectPropertyPath( + const valueA = wwLib.wwUtils.resolveObjectPropertyPath( a, this.content.sortedBy ); - const valueB = wwLib.resolveObjectPropertyPath( + const valueB = wwLib.wwUtils.resolveObjectPropertyPath( b, this.content.sortedBy ); @@ -261,7 +261,7 @@ export default { }), })); const stacksList = this.stacks.map((stack) => - wwLib.resolveObjectPropertyPath( + wwLib.wwUtils.resolveObjectPropertyPath( stack, this.content.stackValue || "value" ) @@ -269,7 +269,7 @@ export default { this.uncategorizedStack.items = this.items.filter( (item) => !stacksList.includes( - wwLib.resolveObjectPropertyPath(item, this.content.stackedBy) + wwLib.wwUtils.resolveObjectPropertyPath(item, this.content.stackedBy) ) ); },