diff --git a/frontend/app/components/Funnels/FunnelWidget/FunnelWidget.css b/frontend/app/components/Funnels/FunnelWidget/FunnelWidget.css index 6cca14777..0102e4d9f 100644 --- a/frontend/app/components/Funnels/FunnelWidget/FunnelWidget.css +++ b/frontend/app/components/Funnels/FunnelWidget/FunnelWidget.css @@ -1,6 +1,7 @@ .step { /* display: flex; */ position: relative; + transition: all 0.5s ease; &:before { content: ''; border-left: 2px solid $gray-lightest; @@ -15,4 +16,10 @@ &:last-child:before { display: none; } +} + +.step-disabled { + filter: grayscale(1); + opacity: 0.8; + transition: all 0.2s ease-in-out; } \ No newline at end of file diff --git a/frontend/app/components/Funnels/FunnelWidget/FunnelWidget.tsx b/frontend/app/components/Funnels/FunnelWidget/FunnelWidget.tsx index b71ea78bc..981111256 100644 --- a/frontend/app/components/Funnels/FunnelWidget/FunnelWidget.tsx +++ b/frontend/app/components/Funnels/FunnelWidget/FunnelWidget.tsx @@ -1,7 +1,6 @@ import React from 'react'; -import Funnel from 'App/mstore/types/funnel'; import Widget from 'App/mstore/types/widget'; -import Funnelbar from './FunnelBar' +import Funnelbar from './FunnelBar'; import cn from 'classnames'; import stl from './FunnelWidget.css'; import { Icon } from 'UI'; @@ -16,13 +15,15 @@ function FunnelWidget(props: Props) { <>
{metric.series[0].filter.filters.filter(f => f.isEvent).map((filter, index) => ( -
+
{index + 1}
- -
- + +
+
))} diff --git a/frontend/app/mstore/types/filterItem.ts b/frontend/app/mstore/types/filterItem.ts index c88d07db5..45442cc4d 100644 --- a/frontend/app/mstore/types/filterItem.ts +++ b/frontend/app/mstore/types/filterItem.ts @@ -14,6 +14,7 @@ export default class FilterItem { filters: FilterItem[] = [] operatorOptions: any[] = [] options: any[] = [] + isActive: boolean = true constructor(data: any = {}) { makeAutoObservable(this, { @@ -23,19 +24,20 @@ export default class FilterItem { operator: observable, source: observable, filters: observable, + isActive: observable, merge: action }) - if (Array.isArray(data.filters)) { - data.filters = data.filters.map(function (i) { - return new FilterItem(i); - }); - } + this.merge(data) } + updateKey(key: string, value: any) { + this[key] = value + } + merge(data) { Object.keys(data).forEach(key => { this[key] = data[key] diff --git a/frontend/app/svg/icons/eye-slash-fill.svg b/frontend/app/svg/icons/eye-slash-fill.svg new file mode 100644 index 000000000..dbd0e9889 --- /dev/null +++ b/frontend/app/svg/icons/eye-slash-fill.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file