@cfxjs/sirius-next-common 0.1.38 → 0.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-3RVRAMNW.js +69 -0
- package/dist/chunk-3RVRAMNW.js.map +1 -0
- package/dist/chunk-4HTI24KG.js +3629 -0
- package/dist/chunk-4HTI24KG.js.map +1 -0
- package/dist/chunk-6AGMKWAW.js +286 -0
- package/dist/chunk-6AGMKWAW.js.map +1 -0
- package/dist/chunk-6GBDCZIP.js +414 -0
- package/dist/chunk-6GBDCZIP.js.map +1 -0
- package/dist/chunk-73IFRWHE.js +130 -0
- package/dist/chunk-73IFRWHE.js.map +1 -0
- package/dist/chunk-AAQD5VX5.js +212 -0
- package/dist/chunk-AAQD5VX5.js.map +1 -0
- package/dist/chunk-AD46ITJC.js +416 -0
- package/dist/chunk-AD46ITJC.js.map +1 -0
- package/dist/chunk-AV2OU3PU.js +108 -0
- package/dist/chunk-AV2OU3PU.js.map +1 -0
- package/dist/chunk-B5XWZ3ZE.js +150 -0
- package/dist/chunk-B5XWZ3ZE.js.map +1 -0
- package/dist/chunk-CDYRVFSO.js +150 -0
- package/dist/chunk-CDYRVFSO.js.map +1 -0
- package/dist/chunk-EP4RVV4C.js +3629 -0
- package/dist/chunk-EP4RVV4C.js.map +1 -0
- package/dist/chunk-EVMUOMAM.js +412 -0
- package/dist/chunk-EVMUOMAM.js.map +1 -0
- package/dist/chunk-EYT54RGS.js +63 -0
- package/dist/chunk-EYT54RGS.js.map +1 -0
- package/dist/chunk-FMHO65DC.js +105 -0
- package/dist/chunk-FMHO65DC.js.map +1 -0
- package/dist/chunk-H6W3LPDS.js +2324 -0
- package/dist/chunk-H6W3LPDS.js.map +1 -0
- package/dist/chunk-HC2D4STF.js +69 -0
- package/dist/chunk-HC2D4STF.js.map +1 -0
- package/dist/chunk-IV4QQOMI.js +416 -0
- package/dist/chunk-IV4QQOMI.js.map +1 -0
- package/dist/chunk-IWECTQOD.js +212 -0
- package/dist/chunk-IWECTQOD.js.map +1 -0
- package/dist/chunk-JQUV4NMR.js +416 -0
- package/dist/chunk-JQUV4NMR.js.map +1 -0
- package/dist/chunk-KAGEJPGK.js +416 -0
- package/dist/chunk-KAGEJPGK.js.map +1 -0
- package/dist/chunk-KCPSCEXG.js +69 -0
- package/dist/chunk-KCPSCEXG.js.map +1 -0
- package/dist/chunk-KKR2JERD.js +284 -0
- package/dist/chunk-KKR2JERD.js.map +1 -0
- package/dist/chunk-LQXAMTBE.js +69 -0
- package/dist/chunk-LQXAMTBE.js.map +1 -0
- package/dist/chunk-M43SICPO.js +63 -0
- package/dist/chunk-M43SICPO.js.map +1 -0
- package/dist/chunk-M6MXSMYM.js +284 -0
- package/dist/chunk-M6MXSMYM.js.map +1 -0
- package/dist/chunk-MIAX5LP5.js +141 -0
- package/dist/chunk-MIAX5LP5.js.map +1 -0
- package/dist/chunk-N5TMLKGL.js +141 -0
- package/dist/chunk-N5TMLKGL.js.map +1 -0
- package/dist/chunk-NIYCXPXR.js +108 -0
- package/dist/chunk-NIYCXPXR.js.map +1 -0
- package/dist/chunk-O474QMUU.js +105 -0
- package/dist/chunk-O474QMUU.js.map +1 -0
- package/dist/chunk-OF33MONA.js +69 -0
- package/dist/chunk-OF33MONA.js.map +1 -0
- package/dist/chunk-PLU4IMEZ.js +130 -0
- package/dist/chunk-PLU4IMEZ.js.map +1 -0
- package/dist/chunk-RB2U3Y7F.js +49 -0
- package/dist/chunk-RB2U3Y7F.js.map +1 -0
- package/dist/chunk-RVVVAX7C.js +796 -0
- package/dist/chunk-RVVVAX7C.js.map +1 -0
- package/dist/chunk-TAJNIINB.js +69 -0
- package/dist/chunk-TAJNIINB.js.map +1 -0
- package/dist/chunk-VLDX5EPR.js +69 -0
- package/dist/chunk-VLDX5EPR.js.map +1 -0
- package/dist/chunk-VUULJBTQ.js +796 -0
- package/dist/chunk-VUULJBTQ.js.map +1 -0
- package/dist/chunk-VY6BUAPS.js +49 -0
- package/dist/chunk-VY6BUAPS.js.map +1 -0
- package/dist/chunk-XGOIDR7R.js +416 -0
- package/dist/chunk-XGOIDR7R.js.map +1 -0
- package/dist/chunk-XMBEB34D.js +69 -0
- package/dist/chunk-XMBEB34D.js.map +1 -0
- package/dist/chunk-XMWQQ4A6.js +414 -0
- package/dist/chunk-XMWQQ4A6.js.map +1 -0
- package/dist/chunk-Z6EYKGBH.js +286 -0
- package/dist/chunk-Z6EYKGBH.js.map +1 -0
- package/dist/chunk-ZKNMJZ5R.js +2324 -0
- package/dist/chunk-ZKNMJZ5R.js.map +1 -0
- package/dist/components/AddressContainer/CoreAddressContainer.js +10 -10
- package/dist/components/AddressContainer/EVMAddressContainer.js +9 -9
- package/dist/components/AddressContainer/addressSwitcher.js +7 -7
- package/dist/components/AddressContainer/addressView.js +6 -6
- package/dist/components/AddressContainer/label.js +4 -4
- package/dist/components/Age/index.js +4 -4
- package/dist/components/Charts/ChartOptions.js +2 -2
- package/dist/components/Charts/PreviewChartTemplate.js +6 -4
- package/dist/components/Charts/PreviewChartTemplate.js.map +1 -1
- package/dist/components/Charts/StockChartTemplate.js +7 -5
- package/dist/components/Charts/StockChartTemplate.js.map +1 -1
- package/dist/components/Charts/config.d.ts +5 -4
- package/dist/components/Charts/config.js +3 -1
- package/dist/components/CopyButton/index.js +3 -3
- package/dist/components/DownloadCSV/index.js +4 -4
- package/dist/components/GasPriceDropdown/index.js +2 -2
- package/dist/components/IncreasePercent/index.js +2 -2
- package/dist/components/InfoIconWithTooltip/index.js +3 -3
- package/dist/components/Modal/index.js +3 -3
- package/dist/components/NetworkIcon/index.js +2 -2
- package/dist/components/PhishingAddressContainer/index.js +4 -4
- package/dist/components/Price/index.js +3 -3
- package/dist/components/Radio/index.js +2 -2
- package/dist/components/Select/index.js +3 -3
- package/dist/components/Select/select.js +3 -3
- package/dist/components/Text/index.js +4 -4
- package/dist/components/Tooltip/index.js +3 -3
- package/dist/components/TransactionAction/coreTransactionAction.js +10 -10
- package/dist/components/TransactionAction/evmTransactionAction.js +9 -9
- package/dist/utils/address.d.ts +1 -1
- package/dist/utils/address.js +2 -2
- package/dist/utils/contractManagerTool.js +2 -2
- package/dist/utils/hooks/useChartQueryParams.d.ts +18 -0
- package/dist/utils/hooks/useChartQueryParams.js +31 -0
- package/dist/utils/hooks/useChartQueryParams.js.map +1 -0
- package/dist/utils/hooks/useENS.js +3 -3
- package/dist/utils/index.js +2 -2
- package/dist/utils/request.d.ts +1 -1
- package/dist/utils/request.js +1 -1
- package/package.json +3 -3
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RenderAddress
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-73IFRWHE.js";
|
|
4
|
+
import "../../chunk-KKR2JERD.js";
|
|
5
|
+
import "../../chunk-FMHO65DC.js";
|
|
6
6
|
import "../../chunk-TOKKKTFG.js";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-ZKNMJZ5R.js";
|
|
8
8
|
import "../../chunk-LRCAKRPK.js";
|
|
9
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-VUULJBTQ.js";
|
|
10
10
|
import "../../chunk-7RH7LJYB.js";
|
|
11
|
-
import "../../chunk-
|
|
11
|
+
import "../../chunk-Z6EYKGBH.js";
|
|
12
12
|
import "../../chunk-J2I22Q2M.js";
|
|
13
13
|
import "../../chunk-YEUH2K6Z.js";
|
|
14
14
|
import "../../chunk-DQGLZCIG.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getLabelInfo
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-RB2U3Y7F.js";
|
|
4
|
+
import "../../chunk-ZKNMJZ5R.js";
|
|
5
5
|
import "../../chunk-LRCAKRPK.js";
|
|
6
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-VUULJBTQ.js";
|
|
7
7
|
import "../../chunk-7RH7LJYB.js";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-Z6EYKGBH.js";
|
|
9
9
|
import "../../chunk-J2I22Q2M.js";
|
|
10
10
|
import "../../chunk-YEUH2K6Z.js";
|
|
11
11
|
import "../../chunk-DQGLZCIG.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Text
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-FMHO65DC.js";
|
|
4
4
|
import "../../chunk-TOKKKTFG.js";
|
|
5
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-ZKNMJZ5R.js";
|
|
6
6
|
import "../../chunk-LRCAKRPK.js";
|
|
7
7
|
import {
|
|
8
8
|
getDuration
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-VUULJBTQ.js";
|
|
10
10
|
import "../../chunk-7RH7LJYB.js";
|
|
11
|
-
import "../../chunk-
|
|
11
|
+
import "../../chunk-Z6EYKGBH.js";
|
|
12
12
|
import "../../chunk-J2I22Q2M.js";
|
|
13
13
|
import "../../chunk-YEUH2K6Z.js";
|
|
14
14
|
import {
|
|
@@ -6,9 +6,10 @@ import {
|
|
|
6
6
|
ConstructorType,
|
|
7
7
|
defaultIntervalType,
|
|
8
8
|
defaultLimit,
|
|
9
|
+
minTimestamp,
|
|
9
10
|
optsOrigin,
|
|
10
11
|
previewOpts
|
|
11
|
-
} from "../../chunk-
|
|
12
|
+
} from "../../chunk-XGOIDR7R.js";
|
|
12
13
|
import {
|
|
13
14
|
PreviewTitle_default
|
|
14
15
|
} from "../../chunk-YOI54A6M.js";
|
|
@@ -16,7 +17,7 @@ import "../../chunk-2Y57U43P.js";
|
|
|
16
17
|
import "../../chunk-TGK5LP2H.js";
|
|
17
18
|
import {
|
|
18
19
|
sendRequestChart
|
|
19
|
-
} from "../../chunk-
|
|
20
|
+
} from "../../chunk-Z6EYKGBH.js";
|
|
20
21
|
import "../../chunk-J2I22Q2M.js";
|
|
21
22
|
import "../../chunk-YEUH2K6Z.js";
|
|
22
23
|
import "../../chunk-DQGLZCIG.js";
|
|
@@ -37,11 +38,12 @@ function PreviewChartTemplate({ options, request }) {
|
|
|
37
38
|
url: request.url,
|
|
38
39
|
query: {
|
|
39
40
|
...request.query,
|
|
40
|
-
limit,
|
|
41
|
+
limit: limit === "all" ? void 0 : limit,
|
|
42
|
+
minTimestamp,
|
|
41
43
|
intervalType
|
|
42
44
|
}
|
|
43
45
|
});
|
|
44
|
-
}, [request.url, request.query, intervalType]);
|
|
46
|
+
}, [request.url, request.query, intervalType, limit]);
|
|
45
47
|
const { data, isLoading } = useSWR(
|
|
46
48
|
request.url + intervalType + limit,
|
|
47
49
|
sendRequestCallback,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Charts/PreviewChartTemplate.tsx"],"sourcesContent":["import { useEffect, useRef, useCallback } from 'react';\nimport Highcharts from 'highcharts/highstock';\nimport HighchartsReact from 'highcharts-react-official';\nimport useSWR from 'swr';\nimport PreviewTitle from './PreviewTitle';\nimport { sendRequestChart } from '../../utils/request';\nimport lodash from 'lodash';\nimport {\n ChartsProps,\n optsOrigin,\n previewOpts,\n defaultLimit,\n defaultIntervalType,\n ConstructorType,\n} from './config';\nimport { useHighCharts } from './useHighCharts';\n\nexport function PreviewChartTemplate({ options, request }: ChartsProps) {\n const chart = useRef(null);\n const limit = request?.query?.limit || defaultLimit;\n const intervalType = request?.query?.intervalType || defaultIntervalType;\n\n const sendRequestCallback = useCallback(() => {\n return sendRequestChart({\n url: request.url,\n query: {\n ...request.query,\n limit,\n intervalType,\n },\n });\n }, [request.url, request.query, intervalType]);\n\n const { data, isLoading } = useSWR(\n request.url + intervalType + limit,\n sendRequestCallback,\n {\n revalidateOnFocus: false,\n },\n );\n\n useHighCharts(chart);\n\n useEffect(() => {\n if (isLoading) {\n // @ts-ignore\n chart.current?.chart.showLoading();\n } else {\n // @ts-ignore\n chart.current?.chart.hideLoading();\n }\n }, [isLoading]);\n\n const optsOrigins = optsOrigin({ options, request, data });\n const opts = lodash.merge(optsOrigins, options, previewOpts);\n opts.intervalType = { value: intervalType };\n const constructorType = ConstructorType({ options, request });\n return (\n <div className=\"bg-[#FFFFFF] border border-[#E5E5E5] rounded-lg shadow-sm\">\n <PreviewTitle header={opts.header}></PreviewTitle>\n <div className=\"p-[1.2857rem]\">\n <HighchartsReact\n constructorType={constructorType}\n highcharts={Highcharts}\n options={opts}\n ref={chart}\n />\n </div>\n </div>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Charts/PreviewChartTemplate.tsx"],"sourcesContent":["import { useEffect, useRef, useCallback } from 'react';\nimport Highcharts from 'highcharts/highstock';\nimport HighchartsReact from 'highcharts-react-official';\nimport useSWR from 'swr';\nimport PreviewTitle from './PreviewTitle';\nimport { sendRequestChart } from '../../utils/request';\nimport lodash from 'lodash';\nimport {\n ChartsProps,\n optsOrigin,\n previewOpts,\n defaultLimit,\n defaultIntervalType,\n ConstructorType,\n minTimestamp,\n} from './config';\nimport { useHighCharts } from './useHighCharts';\n\nexport function PreviewChartTemplate({ options, request }: ChartsProps) {\n const chart = useRef(null);\n const limit = request?.query?.limit || defaultLimit;\n const intervalType = request?.query?.intervalType || defaultIntervalType;\n\n const sendRequestCallback = useCallback(() => {\n return sendRequestChart({\n url: request.url,\n query: {\n ...request.query,\n limit: limit === 'all' ? undefined : limit,\n minTimestamp,\n intervalType,\n },\n });\n }, [request.url, request.query, intervalType, limit]);\n\n const { data, isLoading } = useSWR(\n request.url + intervalType + limit,\n sendRequestCallback,\n {\n revalidateOnFocus: false,\n },\n );\n\n useHighCharts(chart);\n\n useEffect(() => {\n if (isLoading) {\n // @ts-ignore\n chart.current?.chart.showLoading();\n } else {\n // @ts-ignore\n chart.current?.chart.hideLoading();\n }\n }, [isLoading]);\n\n const optsOrigins = optsOrigin({ options, request, data });\n const opts = lodash.merge(optsOrigins, options, previewOpts);\n opts.intervalType = { value: intervalType };\n const constructorType = ConstructorType({ options, request });\n return (\n <div className=\"bg-[#FFFFFF] border border-[#E5E5E5] rounded-lg shadow-sm\">\n <PreviewTitle header={opts.header}></PreviewTitle>\n <div className=\"p-[1.2857rem]\">\n <HighchartsReact\n constructorType={constructorType}\n highcharts={Highcharts}\n options={opts}\n ref={chart}\n />\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,WAAW,QAAQ,mBAAmB;AAC/C,OAAO,gBAAgB;AACvB,OAAO,qBAAqB;AAC5B,OAAO,YAAY;AAGnB,OAAO,YAAY;AAsDf,SACE,KADF;AA1CG,SAAS,qBAAqB,EAAE,SAAS,QAAQ,GAAgB;AACtE,QAAM,QAAQ,OAAO,IAAI;AACzB,QAAM,QAAQ,SAAS,OAAO,SAAS;AACvC,QAAM,eAAe,SAAS,OAAO,gBAAgB;AAErD,QAAM,sBAAsB,YAAY,MAAM;AAC5C,WAAO,iBAAiB;AAAA,MACtB,KAAK,QAAQ;AAAA,MACb,OAAO;AAAA,QACL,GAAG,QAAQ;AAAA,QACX,OAAO,UAAU,QAAQ,SAAY;AAAA,QACrC;AAAA,QACA;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH,GAAG,CAAC,QAAQ,KAAK,QAAQ,OAAO,cAAc,KAAK,CAAC;AAEpD,QAAM,EAAE,MAAM,UAAU,IAAI;AAAA,IAC1B,QAAQ,MAAM,eAAe;AAAA,IAC7B;AAAA,IACA;AAAA,MACE,mBAAmB;AAAA,IACrB;AAAA,EACF;AAEA,gBAAc,KAAK;AAEnB,YAAU,MAAM;AACd,QAAI,WAAW;AAEb,YAAM,SAAS,MAAM,YAAY;AAAA,IACnC,OAAO;AAEL,YAAM,SAAS,MAAM,YAAY;AAAA,IACnC;AAAA,EACF,GAAG,CAAC,SAAS,CAAC;AAEd,QAAM,cAAc,WAAW,EAAE,SAAS,SAAS,KAAK,CAAC;AACzD,QAAM,OAAO,OAAO,MAAM,aAAa,SAAS,WAAW;AAC3D,OAAK,eAAe,EAAE,OAAO,aAAa;AAC1C,QAAM,kBAAkB,gBAAgB,EAAE,SAAS,QAAQ,CAAC;AAC5D,SACE,qBAAC,SAAI,WAAU,6DACb;AAAA,wBAAC,wBAAa,QAAQ,KAAK,QAAQ;AAAA,IACnC,oBAAC,SAAI,WAAU,iBACb;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,KAAK;AAAA;AAAA,IACP,GACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "../../chunk-V3GMPX56.js";
|
|
7
7
|
import {
|
|
8
8
|
ChartOptions_default
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-XMBEB34D.js";
|
|
10
10
|
import {
|
|
11
11
|
useHighCharts
|
|
12
12
|
} from "../../chunk-HQA7I4SW.js";
|
|
@@ -15,13 +15,14 @@ import {
|
|
|
15
15
|
ConstructorType,
|
|
16
16
|
defaultIntervalType,
|
|
17
17
|
defaultLimit,
|
|
18
|
+
minTimestamp,
|
|
18
19
|
optsOrigin
|
|
19
|
-
} from "../../chunk-
|
|
20
|
+
} from "../../chunk-XGOIDR7R.js";
|
|
20
21
|
import "../../chunk-2Y57U43P.js";
|
|
21
22
|
import "../../chunk-TGK5LP2H.js";
|
|
22
23
|
import {
|
|
23
24
|
sendRequestChart
|
|
24
|
-
} from "../../chunk-
|
|
25
|
+
} from "../../chunk-Z6EYKGBH.js";
|
|
25
26
|
import "../../chunk-J2I22Q2M.js";
|
|
26
27
|
import "../../chunk-YEUH2K6Z.js";
|
|
27
28
|
import "../../chunk-DQGLZCIG.js";
|
|
@@ -48,11 +49,12 @@ function StockChartTemplate({ options, request }) {
|
|
|
48
49
|
url: request.url,
|
|
49
50
|
query: {
|
|
50
51
|
...request.query,
|
|
51
|
-
limit: limit
|
|
52
|
+
limit: limit === "all" ? void 0 : limit,
|
|
53
|
+
minTimestamp,
|
|
52
54
|
intervalType
|
|
53
55
|
}
|
|
54
56
|
});
|
|
55
|
-
}, [request.url, request.query, intervalType, limit
|
|
57
|
+
}, [request.url, request.query, intervalType, limit]);
|
|
56
58
|
const { data, isLoading } = useSWR(
|
|
57
59
|
request.url + intervalType + limit,
|
|
58
60
|
sendRequestCallback,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Charts/StockChartTemplate.tsx"],"sourcesContent":["import { useState, useEffect, useRef, useCallback } from 'react';\nimport Highcharts from 'highcharts/highstock';\nimport HighchartsReact from 'highcharts-react-official';\nimport Exporting from 'highcharts/modules/exporting';\nimport ExportData from 'highcharts/modules/export-data';\nimport useSWR from 'swr';\nimport { sendRequestChart } from '../../utils/request';\nimport StockTitle from './StockTitle';\nimport BreadcrumbNav from './BreadcrumbNav';\nimport ChartOptions from './ChartOptions';\nimport lodash from 'lodash';\nimport {\n ChartsProps,\n optsOrigin,\n defaultLimit,\n defaultIntervalType,\n ScopeType,\n onCombination,\n ConstructorType,\n} from './config';\nimport { useHighCharts } from './useHighCharts';\n\nExporting(Highcharts);\nExportData(Highcharts);\n\nexport function StockChartTemplate({ options, request }: ChartsProps) {\n const chart = useRef<HighchartsReact.RefObject>(null);\n const [limit, setLimit] = useState(request?.query?.limit || defaultLimit);\n const [intervalType, setIntervalType] = useState<keyof ScopeType>(\n (request?.query?.intervalType as keyof ScopeType) || defaultIntervalType,\n );\n\n const sendRequestCallback = useCallback(() => {\n return sendRequestChart({\n url: request.url,\n query: {\n ...request.query,\n limit: limit
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Charts/StockChartTemplate.tsx"],"sourcesContent":["import { useState, useEffect, useRef, useCallback } from 'react';\nimport Highcharts from 'highcharts/highstock';\nimport HighchartsReact from 'highcharts-react-official';\nimport Exporting from 'highcharts/modules/exporting';\nimport ExportData from 'highcharts/modules/export-data';\nimport useSWR from 'swr';\nimport { sendRequestChart } from '../../utils/request';\nimport StockTitle from './StockTitle';\nimport BreadcrumbNav from './BreadcrumbNav';\nimport ChartOptions from './ChartOptions';\nimport lodash from 'lodash';\nimport {\n ChartsProps,\n optsOrigin,\n defaultLimit,\n defaultIntervalType,\n ScopeType,\n onCombination,\n ConstructorType,\n minTimestamp,\n} from './config';\nimport { useHighCharts } from './useHighCharts';\n\nExporting(Highcharts);\nExportData(Highcharts);\n\nexport function StockChartTemplate({ options, request }: ChartsProps) {\n const chart = useRef<HighchartsReact.RefObject>(null);\n const [limit, setLimit] = useState(request?.query?.limit || defaultLimit);\n const [intervalType, setIntervalType] = useState<keyof ScopeType>(\n (request?.query?.intervalType as keyof ScopeType) || defaultIntervalType,\n );\n\n const sendRequestCallback = useCallback(() => {\n return sendRequestChart({\n url: request.url,\n query: {\n ...request.query,\n limit: limit === 'all' ? undefined : limit,\n minTimestamp,\n intervalType: intervalType,\n },\n });\n }, [request.url, request.query, intervalType, limit]);\n\n const { data, isLoading } = useSWR(\n request.url + intervalType + limit,\n sendRequestCallback,\n {\n revalidateOnFocus: false,\n },\n );\n\n useHighCharts(chart);\n\n const handleCombination: onCombination = (type, limit) => {\n // @ts-ignore\n // chart.current?.chart.xAxis[0].setExtremes(null, null);\n\n if (type) setIntervalType(type);\n if (limit) setLimit(limit);\n };\n\n useEffect(() => {\n if (isLoading) {\n chart.current?.chart.showLoading();\n } else {\n chart.current?.chart.hideLoading();\n }\n }, [isLoading]);\n\n const optsOrigins = optsOrigin({ options, request, data });\n const opts = lodash.merge(optsOrigins, options);\n opts.intervalType = { value: intervalType };\n const constructorType = ConstructorType({ options, request });\n return (\n <div>\n {opts.header.breadcrumbShow !== false ? (\n <BreadcrumbNav breadcrumb={opts.header.breadcrumb}></BreadcrumbNav>\n ) : (\n <></>\n )}\n {opts.header.titleShow !== false ? (\n <StockTitle header={opts.header}></StockTitle>\n ) : (\n <></>\n )}\n <div\n className=\"bg-[#FFF] relative p-[1.2857rem] rounded-[4px] color-[#333]\"\n style={{ boxShadow: 'rgba(20, 27, 50, 0.12) 0.8571rem' }}\n >\n {opts.header.optionShow !== false ? (\n <ChartOptions\n intervalScope={opts.intervalScope}\n intervalType={intervalType}\n limit={limit}\n onCombination={handleCombination}\n />\n ) : (\n <></>\n )}\n\n <HighchartsReact\n constructorType={constructorType}\n highcharts={Highcharts}\n options={opts}\n ref={chart}\n />\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,UAAU,WAAW,QAAQ,mBAAmB;AACzD,OAAO,gBAAgB;AACvB,OAAO,qBAAqB;AAC5B,OAAO,eAAe;AACtB,OAAO,gBAAgB;AACvB,OAAO,YAAY;AAKnB,OAAO,YAAY;AAoEX,SAEA,UAFA,KASF,YATE;AAvDR,UAAU,UAAU;AACpB,WAAW,UAAU;AAEd,SAAS,mBAAmB,EAAE,SAAS,QAAQ,GAAgB;AACpE,QAAM,QAAQ,OAAkC,IAAI;AACpD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,SAAS,OAAO,SAAS,YAAY;AACxE,QAAM,CAAC,cAAc,eAAe,IAAI;AAAA,IACrC,SAAS,OAAO,gBAAoC;AAAA,EACvD;AAEA,QAAM,sBAAsB,YAAY,MAAM;AAC5C,WAAO,iBAAiB;AAAA,MACtB,KAAK,QAAQ;AAAA,MACb,OAAO;AAAA,QACL,GAAG,QAAQ;AAAA,QACX,OAAO,UAAU,QAAQ,SAAY;AAAA,QACrC;AAAA,QACA;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH,GAAG,CAAC,QAAQ,KAAK,QAAQ,OAAO,cAAc,KAAK,CAAC;AAEpD,QAAM,EAAE,MAAM,UAAU,IAAI;AAAA,IAC1B,QAAQ,MAAM,eAAe;AAAA,IAC7B;AAAA,IACA;AAAA,MACE,mBAAmB;AAAA,IACrB;AAAA,EACF;AAEA,gBAAc,KAAK;AAEnB,QAAM,oBAAmC,CAAC,MAAMA,WAAU;AAIxD,QAAI;AAAM,sBAAgB,IAAI;AAC9B,QAAIA;AAAO,eAASA,MAAK;AAAA,EAC3B;AAEA,YAAU,MAAM;AACd,QAAI,WAAW;AACb,YAAM,SAAS,MAAM,YAAY;AAAA,IACnC,OAAO;AACL,YAAM,SAAS,MAAM,YAAY;AAAA,IACnC;AAAA,EACF,GAAG,CAAC,SAAS,CAAC;AAEd,QAAM,cAAc,WAAW,EAAE,SAAS,SAAS,KAAK,CAAC;AACzD,QAAM,OAAO,OAAO,MAAM,aAAa,OAAO;AAC9C,OAAK,eAAe,EAAE,OAAO,aAAa;AAC1C,QAAM,kBAAkB,gBAAgB,EAAE,SAAS,QAAQ,CAAC;AAC5D,SACE,qBAAC,SACE;AAAA,SAAK,OAAO,mBAAmB,QAC9B,oBAAC,yBAAc,YAAY,KAAK,OAAO,YAAY,IAEnD,gCAAE;AAAA,IAEH,KAAK,OAAO,cAAc,QACzB,oBAAC,sBAAW,QAAQ,KAAK,QAAQ,IAEjC,gCAAE;AAAA,IAEJ;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,OAAO,EAAE,WAAW,mCAAmC;AAAA,QAEtD;AAAA,eAAK,OAAO,eAAe,QAC1B;AAAA,YAAC;AAAA;AAAA,cACC,eAAe,KAAK;AAAA,cACpB;AAAA,cACA;AAAA,cACA,eAAe;AAAA;AAAA,UACjB,IAEA,gCAAE;AAAA,UAGJ;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA,YAAY;AAAA,cACZ,SAAS;AAAA,cACT,KAAK;AAAA;AAAA,UACP;AAAA;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;","names":["limit"]}
|
|
@@ -2,6 +2,7 @@ import Highcharts from 'highcharts/highstock';
|
|
|
2
2
|
|
|
3
3
|
declare const defaultLimit: string;
|
|
4
4
|
declare const defaultIntervalType: string;
|
|
5
|
+
declare const minTimestamp = "1603756800";
|
|
5
6
|
interface ChildProps {
|
|
6
7
|
preview?: boolean;
|
|
7
8
|
}
|
|
@@ -9,8 +10,8 @@ interface ChartsProps {
|
|
|
9
10
|
request: {
|
|
10
11
|
url: string;
|
|
11
12
|
query?: {
|
|
12
|
-
limit
|
|
13
|
-
intervalType
|
|
13
|
+
limit?: string;
|
|
14
|
+
intervalType?: string;
|
|
14
15
|
};
|
|
15
16
|
formatter: (data: any) => any;
|
|
16
17
|
};
|
|
@@ -21,7 +22,7 @@ interface ChartsProps {
|
|
|
21
22
|
}
|
|
22
23
|
interface ScopeItemType {
|
|
23
24
|
label: string;
|
|
24
|
-
limit: number;
|
|
25
|
+
limit: number | string;
|
|
25
26
|
}
|
|
26
27
|
interface ScopeType {
|
|
27
28
|
min?: ScopeItemType[];
|
|
@@ -220,4 +221,4 @@ declare const tooltipCustomLabel: {
|
|
|
220
221
|
shared: boolean;
|
|
221
222
|
};
|
|
222
223
|
|
|
223
|
-
export { ChartOptionsProps, ChartsProps, ChildProps, ConstructorType, ScopeItemType, ScopeType, defaultIntervalType, defaultLimit, onCombination, optsOrigin, previewOpts, scope, tooltipCustomLabel, xAxisCustomLabelHour, xAxisCustomLabelYear };
|
|
224
|
+
export { ChartOptionsProps, ChartsProps, ChildProps, ConstructorType, ScopeItemType, ScopeType, defaultIntervalType, defaultLimit, minTimestamp, onCombination, optsOrigin, previewOpts, scope, tooltipCustomLabel, xAxisCustomLabelHour, xAxisCustomLabelYear };
|
|
@@ -2,17 +2,19 @@ import {
|
|
|
2
2
|
ConstructorType,
|
|
3
3
|
defaultIntervalType,
|
|
4
4
|
defaultLimit,
|
|
5
|
+
minTimestamp,
|
|
5
6
|
optsOrigin,
|
|
6
7
|
previewOpts,
|
|
7
8
|
scope,
|
|
8
9
|
tooltipCustomLabel,
|
|
9
10
|
xAxisCustomLabelHour,
|
|
10
11
|
xAxisCustomLabelYear
|
|
11
|
-
} from "../../chunk-
|
|
12
|
+
} from "../../chunk-XGOIDR7R.js";
|
|
12
13
|
export {
|
|
13
14
|
ConstructorType,
|
|
14
15
|
defaultIntervalType,
|
|
15
16
|
defaultLimit,
|
|
17
|
+
minTimestamp,
|
|
16
18
|
optsOrigin,
|
|
17
19
|
previewOpts,
|
|
18
20
|
scope,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Tooltip
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-ZKNMJZ5R.js";
|
|
4
4
|
import "../../chunk-LRCAKRPK.js";
|
|
5
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-VUULJBTQ.js";
|
|
6
6
|
import "../../chunk-7RH7LJYB.js";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-Z6EYKGBH.js";
|
|
8
8
|
import "../../chunk-J2I22Q2M.js";
|
|
9
9
|
import "../../chunk-YEUH2K6Z.js";
|
|
10
10
|
import {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Modal
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-CDYRVFSO.js";
|
|
4
4
|
import "../../chunk-XCKMXAL2.js";
|
|
5
5
|
import {
|
|
6
6
|
Link
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
import "../../chunk-TGK5LP2H.js";
|
|
9
9
|
import {
|
|
10
10
|
Tooltip
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-ZKNMJZ5R.js";
|
|
12
12
|
import "../../chunk-LRCAKRPK.js";
|
|
13
|
-
import "../../chunk-
|
|
13
|
+
import "../../chunk-VUULJBTQ.js";
|
|
14
14
|
import "../../chunk-7RH7LJYB.js";
|
|
15
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-Z6EYKGBH.js";
|
|
16
16
|
import "../../chunk-J2I22Q2M.js";
|
|
17
17
|
import "../../chunk-YEUH2K6Z.js";
|
|
18
18
|
import {
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
import "../../chunk-H3V3K4DD.js";
|
|
5
5
|
import {
|
|
6
6
|
fromDripToGdrip
|
|
7
|
-
} from "../../chunk-
|
|
7
|
+
} from "../../chunk-VUULJBTQ.js";
|
|
8
8
|
import "../../chunk-7RH7LJYB.js";
|
|
9
9
|
import {
|
|
10
10
|
sendRequestGasPrice
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-Z6EYKGBH.js";
|
|
12
12
|
import "../../chunk-J2I22Q2M.js";
|
|
13
13
|
import "../../chunk-YEUH2K6Z.js";
|
|
14
14
|
import {
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
cn,
|
|
7
7
|
getIncreasePercent
|
|
8
|
-
} from "../../chunk-
|
|
8
|
+
} from "../../chunk-VUULJBTQ.js";
|
|
9
9
|
import "../../chunk-7RH7LJYB.js";
|
|
10
|
-
import "../../chunk-
|
|
10
|
+
import "../../chunk-Z6EYKGBH.js";
|
|
11
11
|
import "../../chunk-J2I22Q2M.js";
|
|
12
12
|
import "../../chunk-YEUH2K6Z.js";
|
|
13
13
|
import "../../chunk-DQGLZCIG.js";
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "../../chunk-65X53DMW.js";
|
|
4
4
|
import {
|
|
5
5
|
Tooltip
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-ZKNMJZ5R.js";
|
|
7
7
|
import "../../chunk-LRCAKRPK.js";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-VUULJBTQ.js";
|
|
9
9
|
import "../../chunk-7RH7LJYB.js";
|
|
10
|
-
import "../../chunk-
|
|
10
|
+
import "../../chunk-Z6EYKGBH.js";
|
|
11
11
|
import "../../chunk-J2I22Q2M.js";
|
|
12
12
|
import "../../chunk-YEUH2K6Z.js";
|
|
13
13
|
import "../../chunk-DQGLZCIG.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Modal
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-CDYRVFSO.js";
|
|
4
4
|
import "../../chunk-XCKMXAL2.js";
|
|
5
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-VUULJBTQ.js";
|
|
6
6
|
import "../../chunk-7RH7LJYB.js";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-Z6EYKGBH.js";
|
|
8
8
|
import "../../chunk-J2I22Q2M.js";
|
|
9
9
|
import "../../chunk-YEUH2K6Z.js";
|
|
10
10
|
import "../../chunk-DQGLZCIG.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getNetworkIcon
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-VUULJBTQ.js";
|
|
4
4
|
import "../../chunk-7RH7LJYB.js";
|
|
5
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-Z6EYKGBH.js";
|
|
6
6
|
import "../../chunk-J2I22Q2M.js";
|
|
7
7
|
import "../../chunk-YEUH2K6Z.js";
|
|
8
8
|
import "../../chunk-DQGLZCIG.js";
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "../../chunk-3DOLNPRU.js";
|
|
4
4
|
import {
|
|
5
5
|
convertCheckSum
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-KKR2JERD.js";
|
|
7
7
|
import {
|
|
8
8
|
Tooltip
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-ZKNMJZ5R.js";
|
|
10
10
|
import "../../chunk-LRCAKRPK.js";
|
|
11
|
-
import "../../chunk-
|
|
11
|
+
import "../../chunk-VUULJBTQ.js";
|
|
12
12
|
import "../../chunk-7RH7LJYB.js";
|
|
13
|
-
import "../../chunk-
|
|
13
|
+
import "../../chunk-Z6EYKGBH.js";
|
|
14
14
|
import "../../chunk-J2I22Q2M.js";
|
|
15
15
|
import "../../chunk-YEUH2K6Z.js";
|
|
16
16
|
import {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Tooltip
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-ZKNMJZ5R.js";
|
|
4
4
|
import "../../chunk-LRCAKRPK.js";
|
|
5
5
|
import {
|
|
6
6
|
formatPrice
|
|
7
|
-
} from "../../chunk-
|
|
7
|
+
} from "../../chunk-VUULJBTQ.js";
|
|
8
8
|
import "../../chunk-7RH7LJYB.js";
|
|
9
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-Z6EYKGBH.js";
|
|
10
10
|
import "../../chunk-J2I22Q2M.js";
|
|
11
11
|
import "../../chunk-YEUH2K6Z.js";
|
|
12
12
|
import "../../chunk-DQGLZCIG.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cn
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-VUULJBTQ.js";
|
|
4
4
|
import "../../chunk-7RH7LJYB.js";
|
|
5
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-Z6EYKGBH.js";
|
|
6
6
|
import "../../chunk-J2I22Q2M.js";
|
|
7
7
|
import "../../chunk-YEUH2K6Z.js";
|
|
8
8
|
import "../../chunk-DQGLZCIG.js";
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
SelectItem,
|
|
6
6
|
SelectTrigger,
|
|
7
7
|
SelectValue
|
|
8
|
-
} from "../../chunk-
|
|
8
|
+
} from "../../chunk-4HTI24KG.js";
|
|
9
9
|
import "../../chunk-LRCAKRPK.js";
|
|
10
10
|
import {
|
|
11
11
|
cn
|
|
12
|
-
} from "../../chunk-
|
|
12
|
+
} from "../../chunk-VUULJBTQ.js";
|
|
13
13
|
import "../../chunk-7RH7LJYB.js";
|
|
14
|
-
import "../../chunk-
|
|
14
|
+
import "../../chunk-Z6EYKGBH.js";
|
|
15
15
|
import "../../chunk-J2I22Q2M.js";
|
|
16
16
|
import "../../chunk-YEUH2K6Z.js";
|
|
17
17
|
import "../../chunk-DQGLZCIG.js";
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
SelectSeparator,
|
|
9
9
|
SelectTrigger,
|
|
10
10
|
SelectValue
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-4HTI24KG.js";
|
|
12
12
|
import "../../chunk-LRCAKRPK.js";
|
|
13
|
-
import "../../chunk-
|
|
13
|
+
import "../../chunk-VUULJBTQ.js";
|
|
14
14
|
import "../../chunk-7RH7LJYB.js";
|
|
15
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-Z6EYKGBH.js";
|
|
16
16
|
import "../../chunk-J2I22Q2M.js";
|
|
17
17
|
import "../../chunk-YEUH2K6Z.js";
|
|
18
18
|
import "../../chunk-DQGLZCIG.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Text
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-FMHO65DC.js";
|
|
4
4
|
import "../../chunk-TOKKKTFG.js";
|
|
5
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-ZKNMJZ5R.js";
|
|
6
6
|
import "../../chunk-LRCAKRPK.js";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-VUULJBTQ.js";
|
|
8
8
|
import "../../chunk-7RH7LJYB.js";
|
|
9
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-Z6EYKGBH.js";
|
|
10
10
|
import "../../chunk-J2I22Q2M.js";
|
|
11
11
|
import "../../chunk-YEUH2K6Z.js";
|
|
12
12
|
import "../../chunk-DQGLZCIG.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Tooltip
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-ZKNMJZ5R.js";
|
|
4
4
|
import "../../chunk-LRCAKRPK.js";
|
|
5
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-VUULJBTQ.js";
|
|
6
6
|
import "../../chunk-7RH7LJYB.js";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-Z6EYKGBH.js";
|
|
8
8
|
import "../../chunk-J2I22Q2M.js";
|
|
9
9
|
import "../../chunk-YEUH2K6Z.js";
|
|
10
10
|
import "../../chunk-DQGLZCIG.js";
|
|
@@ -10,24 +10,24 @@ import {
|
|
|
10
10
|
import "../../chunk-TGK5LP2H.js";
|
|
11
11
|
import {
|
|
12
12
|
CoreAddressContainer
|
|
13
|
-
} from "../../chunk-
|
|
14
|
-
import "../../chunk-
|
|
15
|
-
import "../../chunk-
|
|
16
|
-
import "../../chunk-
|
|
17
|
-
import "../../chunk-
|
|
18
|
-
import "../../chunk-
|
|
19
|
-
import "../../chunk-
|
|
13
|
+
} from "../../chunk-N5TMLKGL.js";
|
|
14
|
+
import "../../chunk-EYT54RGS.js";
|
|
15
|
+
import "../../chunk-AAQD5VX5.js";
|
|
16
|
+
import "../../chunk-73IFRWHE.js";
|
|
17
|
+
import "../../chunk-KKR2JERD.js";
|
|
18
|
+
import "../../chunk-RB2U3Y7F.js";
|
|
19
|
+
import "../../chunk-FMHO65DC.js";
|
|
20
20
|
import "../../chunk-TOKKKTFG.js";
|
|
21
|
-
import "../../chunk-
|
|
21
|
+
import "../../chunk-ZKNMJZ5R.js";
|
|
22
22
|
import "../../chunk-LRCAKRPK.js";
|
|
23
23
|
import {
|
|
24
24
|
formatBalance
|
|
25
|
-
} from "../../chunk-
|
|
25
|
+
} from "../../chunk-VUULJBTQ.js";
|
|
26
26
|
import "../../chunk-7RH7LJYB.js";
|
|
27
27
|
import {
|
|
28
28
|
reqContractAndToken,
|
|
29
29
|
reqNametag
|
|
30
|
-
} from "../../chunk-
|
|
30
|
+
} from "../../chunk-Z6EYKGBH.js";
|
|
31
31
|
import "../../chunk-J2I22Q2M.js";
|
|
32
32
|
import "../../chunk-YEUH2K6Z.js";
|
|
33
33
|
import {
|
|
@@ -10,25 +10,25 @@ import {
|
|
|
10
10
|
import "../../chunk-TGK5LP2H.js";
|
|
11
11
|
import {
|
|
12
12
|
EVMAddressContainer
|
|
13
|
-
} from "../../chunk-
|
|
14
|
-
import "../../chunk-
|
|
15
|
-
import "../../chunk-
|
|
13
|
+
} from "../../chunk-NIYCXPXR.js";
|
|
14
|
+
import "../../chunk-AAQD5VX5.js";
|
|
15
|
+
import "../../chunk-73IFRWHE.js";
|
|
16
16
|
import {
|
|
17
17
|
formatAddress
|
|
18
|
-
} from "../../chunk-
|
|
19
|
-
import "../../chunk-
|
|
20
|
-
import "../../chunk-
|
|
18
|
+
} from "../../chunk-KKR2JERD.js";
|
|
19
|
+
import "../../chunk-RB2U3Y7F.js";
|
|
20
|
+
import "../../chunk-FMHO65DC.js";
|
|
21
21
|
import "../../chunk-TOKKKTFG.js";
|
|
22
|
-
import "../../chunk-
|
|
22
|
+
import "../../chunk-ZKNMJZ5R.js";
|
|
23
23
|
import "../../chunk-LRCAKRPK.js";
|
|
24
24
|
import {
|
|
25
25
|
formatBalance
|
|
26
|
-
} from "../../chunk-
|
|
26
|
+
} from "../../chunk-VUULJBTQ.js";
|
|
27
27
|
import "../../chunk-7RH7LJYB.js";
|
|
28
28
|
import {
|
|
29
29
|
reqContractAndToken,
|
|
30
30
|
reqNametag
|
|
31
|
-
} from "../../chunk-
|
|
31
|
+
} from "../../chunk-Z6EYKGBH.js";
|
|
32
32
|
import "../../chunk-J2I22Q2M.js";
|
|
33
33
|
import "../../chunk-YEUH2K6Z.js";
|
|
34
34
|
import {
|
package/dist/utils/address.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ interface AddressCache {
|
|
|
7
7
|
[key: string]: unknown;
|
|
8
8
|
}
|
|
9
9
|
declare const ADDRESS_FUNC_CACHE: AddressCache;
|
|
10
|
-
declare const convertCheckSum: <T extends LooseAddressType>(address: T) => `0x${string}
|
|
10
|
+
declare const convertCheckSum: <T extends LooseAddressType>(address: T) => T | `0x${string}`;
|
|
11
11
|
declare const isCoreMainOrTestAddress: (address: LooseAddressType) => boolean;
|
|
12
12
|
declare const isCoreMainnetAddress: (address: LooseAddressType) => boolean;
|
|
13
13
|
declare const isCoreTestnetAddress: (address: LooseAddressType) => boolean;
|
package/dist/utils/address.js
CHANGED
|
@@ -23,9 +23,9 @@ import {
|
|
|
23
23
|
isSimplyZeroAddress,
|
|
24
24
|
isSpecialAddress,
|
|
25
25
|
isZeroAddress
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-KKR2JERD.js";
|
|
27
27
|
import "../chunk-7RH7LJYB.js";
|
|
28
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-Z6EYKGBH.js";
|
|
29
29
|
import "../chunk-J2I22Q2M.js";
|
|
30
30
|
import "../chunk-YEUH2K6Z.js";
|
|
31
31
|
import "../chunk-DQGLZCIG.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseString
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-VUULJBTQ.js";
|
|
4
4
|
import "../chunk-7RH7LJYB.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-Z6EYKGBH.js";
|
|
6
6
|
import "../chunk-J2I22Q2M.js";
|
|
7
7
|
import "../chunk-YEUH2K6Z.js";
|
|
8
8
|
import "../chunk-DQGLZCIG.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const useChartQueryParams: ({ preview, withoutToday, }: {
|
|
2
|
+
preview?: boolean | undefined;
|
|
3
|
+
withoutToday?: boolean | undefined;
|
|
4
|
+
}) => {
|
|
5
|
+
limit: string;
|
|
6
|
+
intervalType: string;
|
|
7
|
+
maxTimestamp?: undefined;
|
|
8
|
+
} | {
|
|
9
|
+
limit: string;
|
|
10
|
+
intervalType: string;
|
|
11
|
+
maxTimestamp: number;
|
|
12
|
+
} | {
|
|
13
|
+
maxTimestamp: number;
|
|
14
|
+
limit?: undefined;
|
|
15
|
+
intervalType?: undefined;
|
|
16
|
+
} | undefined;
|
|
17
|
+
|
|
18
|
+
export { useChartQueryParams };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// src/utils/hooks/useChartQueryParams.ts
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import dayjs from "dayjs";
|
|
4
|
+
import utc from "dayjs/plugin/utc";
|
|
5
|
+
dayjs.extend(utc);
|
|
6
|
+
var useChartQueryParams = ({
|
|
7
|
+
preview = false,
|
|
8
|
+
withoutToday = false
|
|
9
|
+
}) => {
|
|
10
|
+
const yesterday = useMemo(
|
|
11
|
+
() => withoutToday ? dayjs().utc().startOf("day").subtract(1, "day").unix() : 0,
|
|
12
|
+
[withoutToday]
|
|
13
|
+
);
|
|
14
|
+
if (!withoutToday) {
|
|
15
|
+
return preview ? {
|
|
16
|
+
limit: "30",
|
|
17
|
+
intervalType: "day"
|
|
18
|
+
} : void 0;
|
|
19
|
+
}
|
|
20
|
+
return preview ? {
|
|
21
|
+
limit: "30",
|
|
22
|
+
intervalType: "day",
|
|
23
|
+
maxTimestamp: yesterday
|
|
24
|
+
} : {
|
|
25
|
+
maxTimestamp: yesterday
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
useChartQueryParams
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=useChartQueryParams.js.map
|