ui: fix lucide version
This commit is contained in:
parent
d24fc53124
commit
2c189f983a
5 changed files with 55 additions and 42 deletions
|
|
@ -1,20 +1,19 @@
|
|||
import React, { useState, useMemo } from 'react';
|
||||
import { Checkbox, Table, Typography } from 'antd';
|
||||
import { Checkbox, Table, Typography, Switch, Tag, Tooltip } from 'antd';
|
||||
import MetricListItem from '../MetricListItem';
|
||||
import { TablePaginationConfig, SorterResult } from 'antd/lib/table/interface';
|
||||
import Widget from 'App/mstore/types/widget';
|
||||
import { LockOutlined, TeamOutlined } from ".store/@ant-design-icons-virtual-981121729b/package";
|
||||
import { Switch, Tag, Tooltip } from ".store/antd-virtual-9b6c8c01be/package";
|
||||
import { LockOutlined, TeamOutlined } from "@ant-design/icons";
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
// interface Metric {
|
||||
// metricId: number;
|
||||
// name: string;
|
||||
// owner: string;
|
||||
// lastModified: string;
|
||||
// visibility: string;
|
||||
// }
|
||||
interface Metric {
|
||||
metricId: number;
|
||||
name: string;
|
||||
owner: string;
|
||||
lastModified: string;
|
||||
visibility: string;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
list: Widget[];
|
||||
|
|
|
|||
|
|
@ -60,20 +60,22 @@ function WidgetOptions() {
|
|||
metric.metricOf != FilterKey.USERID &&
|
||||
metric.metricOf != FilterKey.ERRORS && (
|
||||
<Dropdown
|
||||
trigger={['click']}
|
||||
menu={{
|
||||
selectable: true,
|
||||
items: [
|
||||
{ key: 'sessionCount', label: 'All Sessions' },
|
||||
{ key: 'userCount', label: 'Unique Users' },
|
||||
],
|
||||
onClick: (info: { key: string }) => handleChange(info.key)
|
||||
}}
|
||||
>
|
||||
<Button type='text' variant='text' size='small'>
|
||||
{metric.metricFormat === 'sessionCount' ? 'All Sessions' : 'Unique Users'}
|
||||
<DownOutlined className='text-sm' />
|
||||
</Button>
|
||||
trigger={['click']}
|
||||
menu={{
|
||||
selectable: true,
|
||||
items: [
|
||||
{ key: 'sessionCount', label: 'All Sessions' },
|
||||
{ key: 'userCount', label: 'Unique Users' },
|
||||
],
|
||||
onClick: (info: { key: string }) => handleChange(info.key),
|
||||
}}
|
||||
>
|
||||
<Button type="text" variant="text" size="small">
|
||||
{metric.metricFormat === 'sessionCount'
|
||||
? 'All Sessions'
|
||||
: 'Unique Users'}
|
||||
<DownOutlined className="text-sm" />
|
||||
</Button>
|
||||
</Dropdown>
|
||||
)}
|
||||
{hasViewTypes ? <WidgetViewTypeOptions metric={metric} /> : null}
|
||||
|
|
@ -102,8 +104,10 @@ const SeriesTypeOptions = observer(({ metric }: { metric: any }) => {
|
|||
key,
|
||||
label: (
|
||||
<div className={'flex items-center gap-2'}>
|
||||
{chartIcons[key]}
|
||||
<div>{name}</div>
|
||||
<>
|
||||
{chartIcons[key]}
|
||||
<div>{name}</div>
|
||||
</>
|
||||
</div>
|
||||
),
|
||||
})),
|
||||
|
|
@ -112,11 +116,16 @@ const SeriesTypeOptions = observer(({ metric }: { metric: any }) => {
|
|||
},
|
||||
}}
|
||||
>
|
||||
<Button type='text' variant='text' size='small' className='btn-aggregator'>
|
||||
<Button
|
||||
type="text"
|
||||
variant="text"
|
||||
size="small"
|
||||
className="btn-aggregator"
|
||||
>
|
||||
<Space>
|
||||
{chartIcons[metric.metricOf]}
|
||||
<div>{items[metric.metricOf] || 'Total Sessions'}</div>
|
||||
<DownOutlined className='text-sm' />
|
||||
<DownOutlined className="text-sm" />
|
||||
</Space>
|
||||
</Button>
|
||||
</Dropdown>
|
||||
|
|
@ -167,9 +176,11 @@ const WidgetViewTypeOptions = observer(({ metric }: { metric: any }) => {
|
|||
items: allowedTypes[metric.metricType].map((key) => ({
|
||||
key,
|
||||
label: (
|
||||
<div className='flex gap-2 items-center'>
|
||||
{chartIcons[key]}
|
||||
<div>{chartTypes[key]}</div>
|
||||
<div className="flex gap-2 items-center">
|
||||
<>
|
||||
{chartIcons[key]}
|
||||
<div>{chartTypes[key]}</div>
|
||||
</>
|
||||
</div>
|
||||
),
|
||||
})),
|
||||
|
|
@ -177,13 +188,17 @@ const WidgetViewTypeOptions = observer(({ metric }: { metric: any }) => {
|
|||
metric.updateKey('viewType', key);
|
||||
},
|
||||
}}
|
||||
|
||||
>
|
||||
<Button type='text' variant='text' size='small' className='btn-visualization-type'>
|
||||
<Button
|
||||
type="text"
|
||||
variant="text"
|
||||
size="small"
|
||||
className="btn-visualization-type"
|
||||
>
|
||||
<Space>
|
||||
{chartIcons[metric.viewType]}
|
||||
<div>{chartTypes[metric.viewType]}</div>
|
||||
<DownOutlined className='text-sm ' />
|
||||
<DownOutlined className="text-sm " />
|
||||
</Space>
|
||||
</Button>
|
||||
</Dropdown>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
// Components/CardViewMenu.tsx
|
||||
import { useHistory } from 'react-router';
|
||||
import { useStore } from 'App/mstore';
|
||||
import { observer } from 'mobx-react-lite';
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
"jshint": "^2.11.1",
|
||||
"jspdf": "^2.5.1",
|
||||
"lottie-react": "^2.4.0",
|
||||
"lucide-react": "^0.454.0",
|
||||
"lucide-react": "0.454.0",
|
||||
"luxon": "^3.5.0",
|
||||
"microdiff": "^1.4.0",
|
||||
"mobx": "^6.13.3",
|
||||
|
|
|
|||
|
|
@ -10637,12 +10637,12 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"lucide-react@npm:^0.396.0":
|
||||
version: 0.396.0
|
||||
resolution: "lucide-react@npm:0.396.0"
|
||||
"lucide-react@npm:0.454.0":
|
||||
version: 0.454.0
|
||||
resolution: "lucide-react@npm:0.454.0"
|
||||
peerDependencies:
|
||||
react: ^16.5.1 || ^17.0.0 || ^18.0.0
|
||||
checksum: 10c1/f07aa9b36cf50488120893d9e7b6198927fb0dfce09a78a8e1c3051754d5a822f5b06088abd398a78c8b70b3723da5209e2b35eb0744f2f53e6c1995d9d885f2
|
||||
react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc
|
||||
checksum: 10c1/74a826345610813f909a52e0c74c4ec374fb3c23fdae598670a7b80001610672afc97b7e887546164e7464e5ba69e2eb386ba1dbfbca73e4cb1f707a9a69dc3c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
|
@ -11624,7 +11624,7 @@ __metadata:
|
|||
jshint: "npm:^2.11.1"
|
||||
jspdf: "npm:^2.5.1"
|
||||
lottie-react: "npm:^2.4.0"
|
||||
lucide-react: "npm:^0.396.0"
|
||||
lucide-react: "npm:0.454.0"
|
||||
luxon: "npm:^3.5.0"
|
||||
microdiff: "npm:^1.4.0"
|
||||
mini-css-extract-plugin: "npm:^2.6.0"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue