From 4c5f20bfe8d179ff102615c90774ac362cdcc927 Mon Sep 17 00:00:00 2001 From: jvcalderon Date: Thu, 18 Apr 2024 18:21:37 +0200 Subject: [PATCH 1/4] WIP --- packages/types/src/sdk/licensing/plan.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/types/src/sdk/licensing/plan.ts b/packages/types/src/sdk/licensing/plan.ts index 5ac8b1c9f6..016caf8c38 100644 --- a/packages/types/src/sdk/licensing/plan.ts +++ b/packages/types/src/sdk/licensing/plan.ts @@ -7,6 +7,7 @@ export enum PlanType { /** @deprecated */ PREMIUM = "premium", PREMIUM_PLUS = "premium_plus", + PREMIUM_PLUS_TRIAL = "premium_plus_trial", /** @deprecated */ BUSINESS = "business", ENTERPRISE_BASIC = "enterprise_basic", From cb8564f73eab62af6715aec2b4c936dd349278bd Mon Sep 17 00:00:00 2001 From: Dean Date: Fri, 19 Apr 2024 12:53:23 +0100 Subject: [PATCH 2/4] Clear the onEmptyFilter from datasource filtering when no fields are specified --- packages/frontend-core/src/components/FilterBuilder.svelte | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/frontend-core/src/components/FilterBuilder.svelte b/packages/frontend-core/src/components/FilterBuilder.svelte index 1b252d5b06..b90882449f 100644 --- a/packages/frontend-core/src/components/FilterBuilder.svelte +++ b/packages/frontend-core/src/components/FilterBuilder.svelte @@ -67,6 +67,12 @@ const removeFilter = id => { filters = filters.filter(field => field.id !== id) + + // Clear all filters when no fields are specified + let [first] = filters + if (filters.length == 1 && first?.onEmptyFilter) { + filters = [] + } } const duplicateFilter = id => { From 51933c124418c2673c8c51e3074a514200d39c41 Mon Sep 17 00:00:00 2001 From: jvcalderon Date: Mon, 22 Apr 2024 10:11:31 +0200 Subject: [PATCH 3/4] Update submodules --- packages/pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pro b/packages/pro index 06b1064f7e..b55d5b3200 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit 06b1064f7e2f7cac5d4bef2ee999796a2a1f0f2c +Subproject commit b55d5b32003e3e999a1cbf2e5f3e6ce8d71eace7 From ed3073a20dee097cb9d1a9c38d3ac735173c97ed Mon Sep 17 00:00:00 2001 From: Dean Date: Mon, 22 Apr 2024 09:12:05 +0100 Subject: [PATCH 4/4] PR feedback --- packages/frontend-core/src/components/FilterBuilder.svelte | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/frontend-core/src/components/FilterBuilder.svelte b/packages/frontend-core/src/components/FilterBuilder.svelte index b90882449f..074c2dbd9b 100644 --- a/packages/frontend-core/src/components/FilterBuilder.svelte +++ b/packages/frontend-core/src/components/FilterBuilder.svelte @@ -69,8 +69,7 @@ filters = filters.filter(field => field.id !== id) // Clear all filters when no fields are specified - let [first] = filters - if (filters.length == 1 && first?.onEmptyFilter) { + if (filters.length === 1 && filters[0].onEmptyFilter) { filters = [] } }