@v587d/capital-generation 2.6.2 → 2.6.4
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/CHANGELOG.md +89 -6
- package/README.md +18 -9
- package/capital-config/client.js +8 -2
- package/capital-config/client.src.cjs +74 -1
- package/capital-config/package.json +1 -1
- package/capital-watchlist/client.js +67 -24
- package/capital-watchlist/client.src.cjs +345 -73
- package/capital-watchlist/index.js +530 -65
- package/capital-watchlist/package.json +1 -1
- package/chart-ui/package.json +1 -1
- package/lib/sources/tencent-http.js +71 -253
- package/lib/sources/tencent-public-core.d.ts +100 -0
- package/lib/sources/tencent-public-core.js +386 -0
- package/lib/web-retriever/local-fetch.d.ts +1 -1
- package/lib/web-retriever/local-fetch.js +1 -1
- package/lib/web-retriever/wind-client.d.ts +1 -1
- package/lib/web-retriever/wind-client.js +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ window.__ModuleLoader__.load({
|
|
|
5
5
|
var module = { exports: {} }
|
|
6
6
|
var exports = module.exports
|
|
7
7
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' })
|
|
8
|
-
"use strict";var{createElement:e,useEffect:
|
|
8
|
+
"use strict";var{createElement:e,useEffect:K,useState:_}=require("react"),{createSnapshotStore:B}=require("@deepseek-ai/dsh-client-store"),{IconChecklistOutlineRegular:Y,IconCloseOutlineRegular:C,IconEllipsisOutlineRegular:W,IconGoalOutlineRegular:G,IconListPenOutlineRegular:J,IconPinOutlineRegular:V,IconRefreshOutlineRegular:X,IconSearchOutlineRegular:Z,IconTrashOutlineRegular:aa,Menu:ta,Modal:ea}=require("@deepseek-ai/dsh-client-ui-primitives"),f="capital-watchlist",v="capital.watchlist",E="conversation.input.overlay",$="/capital-watchlist",ia="capital-generation",ra=300,A="capital-watchlist-css",la={"command.label":"\u81EA\u9009\u80A1","command.description":"\u6DFB\u52A0 / \u67E5\u770B / \u5220\u9664\u81EA\u9009\u80A1",title:"\u81EA\u9009\u80A1",close:"\u5173\u95ED",searchPlaceholder:"\u8F93\u5165\u8BC1\u5238\u4EE3\u7801\u6216\u540D\u79F0\uFF0C\u652F\u6301A\u80A1/\u6E2F\u80A1/\u7F8E\u80A1",add:"\u6DFB\u52A0",added:"\u5DF2\u6DFB\u52A0",refreshing:"\u5237\u65B0\u4E2D\u2026",refresh:"\u5237\u65B0\u62A5\u4EF7",loading:"\u6B63\u5728\u8BFB\u53D6\u6E05\u5355\u2026",empty:"\u8FD8\u6CA1\u6709\u81EA\u9009\u80A1\uFF0C\u7528\u4E0A\u9762\u7684\u8F93\u5165\u6846\u6DFB\u52A0\u3002",colName:"\u540D\u79F0",colQuote:"\u6700\u65B0\u4EF7 / \u6DA8\u8DCC\u5E45",colAction:"\u64CD\u4F5C",updated:"\u66F4\u65B0\u65F6\u95F4",notRefreshed:"\u672A\u5237\u65B0",stale:"\u4E0A\u4E00\u6B21\u5FEB\u7167",exchangeTime:"\u4EA4\u6613\u6240\u65F6\u95F4",noChangePct:"\u6682\u65E0\u6DA8\u8DCC\u6570\u636E",typeAShare:"A\u80A1",typeHkStock:"\u6E2F\u80A1",typeUsStock:"\u7F8E\u80A1",typeAIndex:"A\u6307",typeHkIndex:"\u6E2F\u6307",typeUsIndex:"\u7F8E\u6307",kindStock:"\u80A1\u7968",kindIndex:"\u6307\u6570",kindEtf:"ETF",remove:"\u79FB\u9664",more:"\u66F4\u591A",pin:"\u7F6E\u9876",predict:"\u9884\u6D4B",predictTip:"AI\u9884\u6D4B\u8BE5\u8BC1\u5238\u6807\u7684",review:"\u590D\u76D8",reviewTip:"AI\u590D\u76D8\u8BE5\u8BC1\u5238\u6807\u7684",predictPromptPrefix:"\u8BF7\u9884\u6D4B ",predictPromptSuffix:"\uFF1A\u672A\u6765 5 \u4E2A\u4EA4\u6613\u65E5\u7684\u8D70\u52BF\u4E0E\u5173\u952E\u70B9\u4F4D\uFF0C\u8BF4\u660E\u4F9D\u636E\uFF0C\u5E76\u7ED9\u51FA\u5224\u65AD\u7684\u4E0D\u786E\u5B9A\u6027\u3002",reviewPromptPrefix:"\u8BF7\u590D\u76D8 ",reviewPromptSuffix:"\uFF1A\u4ECA\u65E5\u8D70\u52BF\u4E0E\u91CF\u4EF7\u3001\u8FD1 20 \u65E5\u8D8B\u52BF\u3001\u57FA\u7840\u9762\u3001\u6D88\u606F\u9762\uFF0C\u7ED9\u51FA\u7ED3\u8BBA\u548C\u5FC5\u8981\u98CE\u9669\u8BC4\u4F30\u3002",searching:"\u641C\u7D22\u4E2D\u2026",composingHint:"\u8F93\u5165\u5B8C\u6210\u540E\u81EA\u52A8\u641C\u7D22",clearInput:"\u6E05\u7A7A\u8F93\u5165",confirmTitle:"\u786E\u8BA4\u79FB\u9664\uFF1F",confirmDescPrefix:"\u786E\u5B9A\u5C06 ",confirmDescSuffix:" \u4ECE\u81EA\u9009\u4E2D\u79FB\u9664\u5417\uFF1F",confirmCancel:"\u53D6\u6D88",confirmOk:"\u786E\u8BA4\u79FB\u9664",truncated:"\u6CA1\u6709\u66F4\u591A\uFF0C\u8BF7\u8F93\u5165\u51C6\u786E\u7684\u8BC1\u5238\u4EE3\u7801\u6216\u540D\u79F0\u3002",filterAll:"\u5168\u90E8",filterLabel:"\u6309\u5E02\u573A\u7B5B\u9009\u5019\u9009",filterNoHit:"\u8FD9\u4E2A\u5E02\u573A\u4E0B\u6CA1\u6709\u5339\u914D\u7684\u6807\u7684\u3002",noHit:"\u6CA1\u6709\u5339\u914D\u7684\u6807\u7684\uFF08A\u80A1 / \u6E2F\u80A1 / \u7F8E\u80A1\uFF0C\u542B\u6307\u6570\u4E0E\u573A\u5185\u57FA\u91D1\uFF09\u3002","error.invalid_query":"\u8F93\u5165\u4E0D\u88AB\u63A5\u53D7","error.not_found":"\u6CA1\u6709\u627E\u5230\u8BE5\u6807\u7684","error.ambiguous":"\u547D\u4E2D\u591A\u6761\uFF0C\u8BF7\u4ECE\u5019\u9009\u91CC\u9009\u4E00\u6761","error.list_full":"\u81EA\u9009\u80A1\u6700\u591A {max} \u6761\uFF0C\u5148\u5220\u4E00\u6761\u518D\u52A0","error.list_full_noMax":"\u81EA\u9009\u80A1\u5DF2\u8FBE\u4E0A\u9650\uFF0C\u5148\u5220\u4E00\u6761\u518D\u52A0","error.credential_missing":"\u672A\u914D\u7F6E Fuyao \u5BC6\u94A5\uFF1A\u5728\u300C\u63D2\u4EF6\u300D\u9875\u7684 Capital \u6A21\u5F0F\u5361\u7247\u91CC\u586B API Key\uFF08\u53EA\u5F71\u54CD A \u80A1\u90A3\u4E00\u8DEF\uFF0C\u6E2F\u7F8E\u80A1\u7167\u5E38\u7528\uFF09","error.rate_limited":"\u884C\u60C5\u670D\u52A1\u9650\u6D41\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","error.fuyao_unavailable":"A \u80A1\u884C\u60C5\u6682\u65F6\u53D6\u4E0D\u5230\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","error.tencent_unavailable":"\u6E2F\u7F8E\u80A1\u884C\u60C5\u6682\u65F6\u53D6\u4E0D\u5230\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","error.quote_unavailable":"\u8BE5\u6807\u7684\u6CA1\u6709\u53EF\u7528\u62A5\u4EF7","error.refresh_timeout":"\u5237\u65B0\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","error.store_unavailable":"\u81EA\u9009\u80A1\u5B58\u50A8\u4E0D\u53EF\u7528","error.unauthorized":"\u767B\u5F55\u72B6\u6001\u5DF2\u5931\u6548\uFF1A\u8BF7\u5148\u56DE\u5230\u5BBF\u4E3B\u7A97\u53E3\u91CD\u65B0\u767B\u5F55",errorSuffix:"\uFF08\u5176\u4ED6\u6807\u7684\u4ECD\u662F\u4E0A\u4E00\u6B21\u6210\u529F\u5FEB\u7167\uFF09","partial.a-share":"A \u80A1\u68C0\u7D22\u4E0D\u53EF\u7528\uFF1A","partial.hk":"\u6E2F\u80A1\u68C0\u7D22\u4E0D\u53EF\u7528\uFF1A","partial.us":"\u7F8E\u80A1\u68C0\u7D22\u4E0D\u53EF\u7528\uFF1A"},sa={"command.label":"Watchlist","command.description":"Add / view / remove watched symbols",title:"Watchlist",close:"Close",searchPlaceholder:"Symbol code or name \u2014 A-share / HK / US",add:"Add",added:"Added",refreshing:"Refreshing\u2026",refresh:"Refresh quotes",loading:"Loading list\u2026",empty:"No symbols yet \u2014 use the input above to add one.",colName:"Symbol",colQuote:"Last / change",colAction:"Actions",updated:"Updated",notRefreshed:"Not refreshed",stale:"last snapshot",exchangeTime:"exchange time",noChangePct:"No change data yet",typeAShare:"A-Share",typeHkStock:"HK",typeUsStock:"US",typeAIndex:"A-Index",typeHkIndex:"HK-Index",typeUsIndex:"US-Index",kindStock:"stock",kindIndex:"index",kindEtf:"ETF",remove:"Remove",more:"More",pin:"Pin to top",predict:"Predict",predictTip:"AI prediction for this symbol",review:"Review",reviewTip:"AI review of this symbol",predictPromptPrefix:"Predict ",predictPromptSuffix:" over the next 5 sessions: the likely path and key levels, the evidence behind the call, and how uncertain it is.",reviewPromptPrefix:"Review ",reviewPromptSuffix:" with today's trend and volume, the last 20 sessions, fundamental, news, then a conclusion and the necessary risks analysis.",searching:"Searching\u2026",composingHint:"Search runs when you finish typing",clearInput:"Clear input",confirmTitle:"Remove this symbol?",confirmDescPrefix:"Remove ",confirmDescSuffix:" from your watchlist?",confirmCancel:"Cancel",confirmOk:"Remove",truncated:"No more candidates \u2014 enter an accurate code or name.",filterAll:"All",filterLabel:"Filter candidates by market",filterNoHit:"No matching symbol in this market.",noHit:"No matching symbol (A-share / HK / US, including indices and listed funds).","error.invalid_query":"Input not accepted","error.not_found":"Symbol not found","error.ambiguous":"Multiple hits \u2014 pick one candidate","error.list_full":"Watchlist holds at most {max} symbols \u2014 remove one first","error.list_full_noMax":"Watchlist is full \u2014 remove one first","error.credential_missing":"No Fuyao API key: set it on the Capital card in the Plugins page (A-share quotes only \u2014 HK and US keep working)","error.rate_limited":"Quote service is rate limited \u2014 try again later","error.fuyao_unavailable":"A-share quotes unavailable \u2014 try again later","error.tencent_unavailable":"HK / US quotes unavailable \u2014 try again later","error.quote_unavailable":"No quote for this symbol","error.refresh_timeout":"Refresh timed out \u2014 try again later","error.store_unavailable":"Watchlist storage unavailable","error.unauthorized":"Session expired \u2014 sign back in to the host first",errorSuffix:" (other symbols still show their last good snapshot)","partial.a-share":"A-share search unavailable: ","partial.hk":"HK search unavailable: ","partial.us":"US search unavailable: "},na={"a-share":"typeAShare","hk-stock":"typeHkStock","us-stock":"typeUsStock","a-share-index":"typeAIndex","hk-index":"typeHkIndex","us-index":"typeUsIndex","fund-etf":"typeAShare"},oa={"a-share":"kindStock","hk-stock":"kindStock","us-stock":"kindStock","a-share-index":"kindIndex","hk-index":"kindIndex","us-index":"kindIndex","fund-etf":"kindEtf"};function ca(l,t){let a=na[l];return a===void 0?String(l??""):t(a)}function da(l,t){let a=oa[l];return a===void 0?String(l??""):t(a)}var pa=/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F-\u009F\u00AD\u200B-\u200F\u2028\u2029\u202A-\u202E\u2060-\u2064\u2066-\u2069\uFEFF]/gu;function k(l){return String(l??"").replace(pa,"")}function b(l){return Array.isArray(l)?l.map(t=>t===null||typeof t!="object"?t:{...t,name:k(t.name)}):l}var ha={"a-share":"capital-watchlist-tag-cn","a-share-index":"capital-watchlist-tag-cn","fund-etf":"capital-watchlist-tag-cn","hk-stock":"capital-watchlist-tag-hk","hk-index":"capital-watchlist-tag-hk","us-stock":"capital-watchlist-tag-us","us-index":"capital-watchlist-tag-us"},R=[{id:"all"},{id:"cn",label:"CN"},{id:"hk",label:"HK"},{id:"us",label:"US"}],P=l=>l.exchange==="HK"?"hk":l.exchange==="US"?"us":"cn",ua=`
|
|
9
9
|
/* \u5BBD 420 / \u5706\u89D2 18 / \u65E0\u5185\u8FB9\u8DDD\uFF08\u5185\u8FB9\u8DDD\u4F4F\u5728\u5404\u6BB5\u81EA\u5DF1\u5934\u4E0A\uFF0C\u597D\u8BA9\u8868\u5934\u4E0E\u5206\u9694\u7EBF\u5BF9\u9F50\uFF09\u3002
|
|
10
10
|
\u9650\u9AD8\u6309\u5B98\u65B9\u53E3\u5F84\u8D70 max-height: 100%\uFF08\u5BF9 .root \u7684 padding box\uFF09\uFF0C\u4E0D\u81EA\u5DF1\u7B97 vh\u3002 */
|
|
11
11
|
.capital-watchlist-dialog.capital-watchlist-dialog { width: min(420px, 92vw); max-height: 100%; padding: 0; gap: 0; border-radius: 18px; }
|
|
@@ -36,30 +36,67 @@ window.__ModuleLoader__.load({
|
|
|
36
36
|
\u76F4\u63A5\u900F\u89C6\u4E0A\u6765\uFF08\u5B98\u65B9\u6EDA\u52A8\u6D6E\u5C42 .media \u9762\u677F\u4E0E MenuSurface .material \u90FD\u662F\u8FD9\u4E00\u5BF9\uFF09\u3002border: 0 +
|
|
37
37
|
elevation-prominent \u5206\u79BB\uFF1B\u63CF\u8FB9\u6D45\u8272\u91CD\u7ED1 l1\uFF0C\u6DF1\u8272\u7531\u5BBF\u4E3B [data-menu-material] \u89C4\u5219\u7FFB\u6210 l3\u3002 */
|
|
38
38
|
/* \u5019\u9009\u4E0B\u62C9\u662F**\u5361\u7247\u5185**\u7684\u6D6E\u5C42\uFF0C\u800C\u5361\u7247 overflow: hidden\uFF08\u5706\u89D2\u4E0E\u6E05\u5355\u6EDA\u52A8\u90FD\u9760\u5B83\uFF09\uFF1A\u6D6E\u5C42\u4E00\u65E6\u6BD4
|
|
39
|
-
\u5361\u7247\u5269\u4F59\u7684\u7A7A\u95F4\u9AD8\uFF0C\u591A\u51FA\u6765\u7684\u90E8\u5206\u5C31\u88AB\u65E0\u58F0\u88C1\u6389\
|
|
40
|
-
\
|
|
41
|
-
|
|
42
|
-
\
|
|
43
|
-
|
|
39
|
+
\u5361\u7247\u5269\u4F59\u7684\u7A7A\u95F4\u9AD8\uFF0C\u591A\u51FA\u6765\u7684\u90E8\u5206\u5C31\u88AB\u65E0\u58F0\u88C1\u6389\u3002\u6240\u4EE5\u5B83\u7684 max-height \u5FC5\u987B\u4E0E\u4E0B\u9762
|
|
40
|
+
capital-watchlist-list-open \u90A3\u683C\u7684 min-height **\u540C\u503C**\uFF08\u4E0B\u62C9\u6B63\u597D\u94FA\u6EE1\u6E05\u5355\u90A3\u4E00\u683C\uFF1A\u591F\u9AD8\uFF0C\u53C8\u538B\u4E0D\u5230
|
|
41
|
+
\u9875\u811A\uFF09\u2014\u2014246px \u2192 **320px**\uFF082026-10-08 \u7528\u6237\u70B9\u540D"\u4E00\u5C4F\u53EA\u80FD\u663E\u793A 3 \u4E2A\u6807\u7684"\uFF1A\u884C\u9AD8\u538B\u5230\u7EA6 47px\u3001
|
|
42
|
+
\u6D6E\u5C42\u62AC\u5230 320\uFF0C\u4E00\u5C4F 5~6 \u884C\uFF1B\u8FD9\u4E24\u4E2A\u6570\u4E00\u6539\u5FC5\u987B\u4E00\u8D77\u6539\uFF0C\u6D4B\u8BD5\u91CC\u6709\u540C\u503C\u65AD\u8A00\uFF09\u3002
|
|
43
|
+
\u8FD9\u4E00\u5C42\u81EA\u5DF1\u4E0D\u6EDA\uFF1A\u91CC\u9762 .capital-watchlist-options \u624D\u662F\u6EDA\u52A8\u533A\u2014\u2014\u7B5B\u9009\u5934\u9489\u5728\u9876\u4E0A\uFF08"\u9501\u5B9A\u8FD9\u4E2A\u5934"\uFF09\uFF0C
|
|
44
|
+
"\u6CA1\u6709\u66F4\u591A"\u90A3\u53E5\u4F4F\u5728**\u6EDA\u52A8\u533A\u672B\u5C3E**\uFF08\u6EDA\u5230\u5E95\u624D\u770B\u5F97\u89C1\uFF0C\u4E0D\u51BB\u7ED3\u5728\u5E95\u90E8\uFF09\uFF0C\u5176\u4F59 hint \u8D34\u5728\u9009\u9879\u4E4B\u540E\u3002
|
|
45
|
+
\u5019\u9009\u6C60\u662F 50+10+10=70 \u884C\uFF08\u4E09\u8DEF\u4E0A\u6E38\u786C\u9876\u4E4B\u548C\uFF0C\u670D\u52A1\u7AEF\u4E0D\u5207\u7247\uFF09\u3002 */
|
|
46
|
+
.capital-watchlist-dropdown { position: absolute; top: calc(100% - 8px); left: 20px; right: 20px; z-index: 20; display: flex; flex-direction: column; max-height: 320px; overflow: hidden; background: var(--dsw-specific-menu); backdrop-filter: var(--dsw-menu-backdrop-filter); border: 0; border-radius: 12px; --dsw-elevation-stroke-color: var(--dsw-alias-border-l1); box-shadow: var(--dsw-elevation-prominent); animation: capital-watchlist-drop .18s var(--ds-ease-in-out); }
|
|
47
|
+
/* \u7B5B\u9009\u5934\u4E0E\u90A3\u51E0\u53E5"\u6B64\u523B\u600E\u4E48\u4E86"\u7684 hint \u90FD\u662F flex: none\uFF0C\u53EA\u6709\u9009\u9879\u5C42 flex: 0 1 auto \u53EF\u6536\u7F29\u3001\u53EF\u6EDA\uFF1A
|
|
48
|
+
\u5934\u6C38\u8FDC\u5728\u9876\uFF0Chint \u5728\u9009\u9879\u4E4B\u540E\uFF08\u5185\u5BB9\u77ED\u65F6\u7D27\u8D34\u6700\u540E\u4E00\u884C\uFF0C\u5185\u5BB9\u957F\u65F6\u4E5F\u4E0D\u4F1A\u88AB\u6324\u6CA1\uFF09\u3002 */
|
|
49
|
+
.capital-watchlist-filter { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-bottom: .5px solid var(--dsw-alias-border-l2); }
|
|
50
|
+
.capital-watchlist-options { flex: 0 1 auto; min-height: 0; overflow-y: auto; }
|
|
51
|
+
.capital-watchlist-filterbtn { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border: none; border-radius: 999px; corner-shape: round; background: var(--dsw-alias-interactive-bg-hover); color: var(--dsw-alias-label-secondary); font-family: inherit; font-size: 12px; line-height: 16px; cursor: pointer; }
|
|
52
|
+
.capital-watchlist-filterbtn:hover { background: var(--dsw-alias-interactive-bg-hover-accent); color: var(--dsw-alias-label-primary); }
|
|
53
|
+
/* \u9009\u4E2D\u6001\u8BFB aria-pressed\uFF1A\u72B6\u6001\u4F4F\u5728\u5C5E\u6027\u91CC\uFF0C\u6837\u5F0F\u53EA\u662F\u5B83\u7684\u6295\u5F71\uFF08\u8BFB\u5C4F\u4E5F\u542C\u5F97\u89C1"\u5DF2\u9009\u4E2D"\uFF09\u3002
|
|
54
|
+
\u538B\u5728\u534A\u900F\u660E\u83DC\u5355\u6750\u8D28\u4E0A\u7528 color-mix \u7684\u900F\u660E\u6DE1\u67D3\u2014\u2014\u5B83\u4E0D\u5199\u80CC\u666F\u5B9E\u5E95\uFF0C\u5E95\u4E0B\u7684\u83DC\u5355\u6A21\u7CCA\u7167\u5E38\u900F\u4E0A\u6765\u3002 */
|
|
55
|
+
.capital-watchlist-filterbtn[aria-pressed="true"] { background: color-mix(in srgb, var(--dsw-alias-brand-primary) 14%, transparent); color: var(--dsw-alias-label-primary); }
|
|
56
|
+
.capital-watchlist-filtercount { font-size: 11px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
|
|
44
57
|
@keyframes capital-watchlist-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
|
|
45
58
|
@keyframes capital-watchlist-breathe { 0% { opacity: 1; } 40% { opacity: .6; } 80%, 100% { opacity: 1; } }
|
|
46
59
|
@media (prefers-reduced-motion: reduce) { .capital-watchlist-dropdown { animation: none; } .capital-watchlist-skeleton { animation: none; } }
|
|
47
|
-
|
|
60
|
+
/* \u5019\u9009\u884C\u9AD8\u5EA6\uFF082026-10-08 \u7528\u6237\u70B9\u540D"\u51CF\u5C11\u6BCF\u4E2A\u6807\u7684\u5C55\u793A\u9AD8\u5EA6"\uFF09\uFF1Apadding 6 + \u540D\u79F0 18 + \u95F4\u9699 1 + \u4EE3\u7801\u884C 15
|
|
61
|
+
\u2248 47px\u3002\u4E0E\u4E0A\u9762\u90A3\u6761"\u6D6E\u5C42 320px"\u4E00\u8D77\u7B97\uFF1A(320 \u2212 \u7B5B\u9009\u5934\u7EA6 32) \xF7 47 \u2248 6 \u884C\u4E00\u5C4F\uFF08\u6539\u524D\u662F 3 \u884C\uFF09\u3002
|
|
62
|
+
\u4E24\u4E2A\u6570\u662F\u4E00\u5BF9\u2014\u2014\u53EA\u62AC\u6D6E\u5C42\u4E0D\u538B\u884C\u9AD8\uFF0C\u591A\u51FA\u6765\u7684\u7A7A\u95F4\u4F1A\u88AB\u884C\u9AD8\u5403\u6389\uFF1B\u53EA\u538B\u884C\u9AD8\u4E0D\u62AC\u6D6E\u5C42\uFF0C\u4E00\u5C4F\u8FD8\u662F 3 \u884C\u3002 */
|
|
63
|
+
.capital-watchlist-option { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px; border: none; border-bottom: .5px solid var(--dsw-alias-border-l2); background: transparent; color: inherit; font-family: inherit; text-align: left; cursor: pointer; }
|
|
48
64
|
.capital-watchlist-option:last-of-type { border-bottom: none; }
|
|
49
|
-
|
|
50
|
-
|
|
65
|
+
/* \u300C\u5DF2\u6DFB\u52A0\u300D\u4E0E"\u5728\u9014"\u8FD9\u4E00\u6863\u8BFB\u7684\u662F **aria-disabled \u800C\u4E0D\u662F :disabled**\uFF08\u771F disabled \u4F1A\u628A\u7126\u70B9\u8E22\u5230
|
|
66
|
+
body\uFF0C\u641C\u7D22\u6BB5\u7684 onBlur \u5C31\u5224"\u70B9\u5230\u6846\u5916"\u6536\u8D77\u4E0B\u62C9 \u2014\u2014 \u89C1\u6E32\u67D3\u5904\u90A3\u6BB5\uFF09\uFF0C\u6240\u4EE5\u89C6\u89C9\u964D\u6863\u4E5F\u8DDF\u7740\u8BFB\u5B83\uFF1A
|
|
67
|
+
\u6574\u884C opacity .45\u3001\u6307\u9488 not-allowed\uFF0C\u7126\u70B9\u7167\u65E7\u7559\u5728\u8FD9\u4E00\u884C\u3002 */
|
|
68
|
+
.capital-watchlist-option:hover:not([aria-disabled="true"]) { background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 10%, transparent); }
|
|
69
|
+
.capital-watchlist-option[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
|
|
51
70
|
/* \u952E\u76D8\u7126\u70B9\u8D70\u5B98\u65B9\u8868\u8FBE\u5F0F\uFF1A\u73AF\u8272\u7531\u5BBF\u4E3B\u6309\u4E3B\u9898\u4E0E\u8F93\u5165\u6A21\u6001\u7BA1\u597D\uFF08\u6307\u9488\u6A21\u6001\u81EA\u52A8\u900F\u660E\uFF09\uFF0C\u4E0D\u81EA\u5DF1\u9020\u73AF\u3002 */
|
|
52
|
-
.capital-watchlist-close:focus-visible, .capital-watchlist-clear:focus-visible, .capital-watchlist-option:focus-visible, .capital-watchlist-more:focus-visible, .capital-watchlist-predict:focus-visible, .capital-watchlist-review:focus-visible, .capital-watchlist-refresh:focus-visible, .capital-watchlist-confirmbtn:focus-visible { outline: var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary)); outline-offset: 1px; }
|
|
53
|
-
.capital-watchlist-optionmain { display: flex; flex-direction: column; gap:
|
|
54
|
-
.capital-watchlist-optionname { font-size: 14px; font-weight: 500; color: var(--dsw-alias-label-primary); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
|
|
55
|
-
.capital-watchlist-optioncode { font-size: 12px; color: var(--dsw-alias-label-tertiary); }
|
|
71
|
+
.capital-watchlist-close:focus-visible, .capital-watchlist-clear:focus-visible, .capital-watchlist-option:focus-visible, .capital-watchlist-filterbtn:focus-visible, .capital-watchlist-more:focus-visible, .capital-watchlist-predict:focus-visible, .capital-watchlist-review:focus-visible, .capital-watchlist-refresh:focus-visible, .capital-watchlist-confirmbtn:focus-visible { outline: var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary)); outline-offset: 1px; }
|
|
72
|
+
.capital-watchlist-optionmain { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
|
|
73
|
+
.capital-watchlist-optionname { font-size: 14px; line-height: 18px; font-weight: 500; color: var(--dsw-alias-label-primary); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
|
|
74
|
+
.capital-watchlist-optioncode { font-size: 12px; line-height: 15px; color: var(--dsw-alias-label-tertiary); }
|
|
75
|
+
/* \u53F3\u4FA7\u90A3\u9897\u300C\u6DFB\u52A0\u300D\u662F**\u6574\u884C\u8FD9\u4E2A button \u7684\u53EF\u89C1\u52A8\u8BCD**\uFF0C\u4E0D\u662F\u7B2C\u4E8C\u4E2A\u53EF\u805A\u7126\u63A7\u4EF6\uFF08button \u91CC\u5957 button
|
|
76
|
+
\u662F\u975E\u6CD5 HTML\uFF09\uFF1A\u6240\u4EE5\u5B83\u53EA\u662F\u4E00\u9897\u80F6\u56CA\u2014\u2014\u5E38\u6001\u7070\u5E95\u3001hover \u8DDF\u7740\u6574\u884C\u52A0\u6DF1\uFF1B\u300C\u5DF2\u6DFB\u52A0\u300D\u90A3\u6863\u7531\u6574\u884C disabled
|
|
77
|
+
\u7684 opacity \u7EDF\u4E00\u964D\u4E0B\u53BB\uFF0C\u4E0D\u518D\u5F80\u4EE3\u7801\u884C\u91CC\u585E\u300C\xB7 \u5DF2\u6DFB\u52A0\u300D\uFF08\u4EE3\u7801 + \u5FBD\u6807\u624D\u662F\u7B2C\u4E8C\u884C\u8981\u8BFB\u7684\u4E24\u6837\uFF09\u3002 */
|
|
78
|
+
/* \u53F3\u4FA7\u90A3\u9897\u300C\u6DFB\u52A0\u300D\u662F**\u6574\u884C\u8FD9\u4E2A button \u7684\u53EF\u89C1\u52A8\u8BCD**\uFF0C\u4E0D\u662F\u7B2C\u4E8C\u4E2A\u53EF\u805A\u7126\u63A7\u4EF6\uFF08button \u91CC\u5957 button
|
|
79
|
+
\u662F\u975E\u6CD5 HTML\uFF09\u3002\u4E24\u6001\uFF082026-10-08 \u7B2C\u4E09\u8F6E\u7528\u6237\u70B9\u540D\uFF09\uFF1A
|
|
80
|
+
- **\u6DFB\u52A0 = \u9192\u76EE**\uFF1A\u6CBF\u7528\u300C\u5237\u65B0\u62A5\u4EF7\u300D\u90A3\u9897 verb \u6309\u94AE\u7684\u914D\u65B9\uFF08state \u8272 12% \u6DE1\u5E95 + 25% \u63CF\u8FB9 + \u540C\u8272\u5B57\uFF09\uFF0C
|
|
81
|
+
\u6574\u884C\u91CC\u552F\u4E00\u5E26\u8272\u7684\u5143\u7D20\u5C31\u662F\u5B83\uFF0C\u4E00\u773C\u77E5\u9053\u70B9\u54EA\u513F\uFF1B
|
|
82
|
+
- **\u5DF2\u6DFB\u52A0 = \u6697**\uFF1A\u900F\u660E\u5E95 + l1 \u63CF\u8FB9 + tertiary \u5B57\uFF08data-state="added"\uFF09\uFF0C\u8DDF\u6574\u884C\u7684 aria-disabled
|
|
83
|
+
\u4E00\u8D77\u964D\u4E0B\u53BB\uFF0C\u5E76\u4E14\u70B9\u4E86\u4E5F\u4E0D\u518D\u51FA\u7F51\uFF08guard \u5728\u6E32\u67D3\u5904\uFF09\u3002 */
|
|
84
|
+
.capital-watchlist-addbtn { flex: none; padding: 3px 9px; border: 1px solid color-mix(in srgb, var(--dsw-alias-state-business-primary) 25%, transparent); border-radius: 999px; corner-shape: round; background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 12%, transparent); color: var(--dsw-alias-state-business-primary); font-size: 12px; line-height: 15px; font-weight: 500; }
|
|
85
|
+
.capital-watchlist-option:hover:not([aria-disabled="true"]) .capital-watchlist-addbtn { background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 20%, transparent); }
|
|
86
|
+
.capital-watchlist-addbtn[data-state="added"] { border-color: var(--dsw-alias-border-l1); background: transparent; color: var(--dsw-alias-label-tertiary); font-weight: 400; }
|
|
56
87
|
.capital-watchlist-tag { flex: none; display: inline-block; padding: 2px 7px; border-radius: 6px; font-size: 11px; line-height: 14px; font-weight: 500; }
|
|
57
88
|
/* \u7C7B\u578B\u5FBD\u6807 = \u5B98\u65B9\u72B6\u6001\u5FBD\u6807\u90A3\u5BF9\u5199\u6CD5\uFF1A\u5E95\u8272\u7528 state-*-tertiary\uFF08\u4E3B\u9898\u5305\u4E3A"\u72B6\u6001\u8272\u7684\u5E95"\u51C6\u5907\u7684\u5B9E\u5FC3\u6863\uFF0C
|
|
58
89
|
\u81EA\u5DF1 color-mix \u51FA\u6765\u7684\u900F\u660E\u6863\u538B\u5728\u767D\u5361\u7247\u4E0A\u7B49\u4E8E\u6CA1\u6DF7\uFF09\uFF0C\u6587\u5B57\u7528\u540C\u8272\u7CFB primary\uFF1B
|
|
59
90
|
amber \u4F8B\u5916\u8D70 warn-label\u2014\u2014warn-primary \u538B\u767D\u5E95\u53EA\u6709 2:1\uFF0C\u5B98\u65B9"\u72B6\u6001\u8272\u5F53\u6587\u5B57"\u53E6\u6709 label \u4E00\u6863\u3002 */
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
91
|
+
/* \u4E09\u6863\u5FBD\u6807\u6309**\u5E02\u573A**\u914D\u8272\uFF0C\u53D6\u7684\u662F"\u949E\u7968\u7684\u4E3B\u8272"\u8FD9\u628A\u76F4\u89C9\uFF1A\u4EBA\u6C11\u5E01=\u7EA2\u3001\u6E2F\u5E01=\u91D1\u7425\u73C0\u3001\u7F8E\u5143=\u7EFF
|
|
92
|
+
\uFF082026-10-07 \u7528\u6237\u70B9\u540D\uFF0C\u5E76\u660E\u786E\u7EFF\u90A3\u4E00\u6863"\u548C\u7F8E\u5143\u5F88\u50CF"\uFF09\u3002\u80A1\u7968\u4E0E\u6307\u6570\u540C\u5E02\u540C\u8272\uFF0C\u54C1\u79CD\u53EA\u7531\u6587\u5B57\u5206\u3002
|
|
93
|
+
\u26A0\uFE0F \u7EA2\u6863\u4E0E"\u7EA2\u6DA8"\u90A3\u9897\u7EA2\u662F\u4E24\u79CD\u4E1C\u897F\uFF1A\u5FBD\u6807\u662F\u6574\u884C\u56FA\u5B9A\u7684\u5E95\uFF0C\u4EF7\u683C\u53EA\u5728\u6DA8\u8DCC\u65F6\u4E0A\u8272\u3002
|
|
94
|
+
state-*-tertiary \u662F\u4E3B\u9898\u5305\u7ED9\u72B6\u6001\u8272\u51C6\u5907\u7684**\u5B9E\u5FC3\u5E95**\uFF1Berror \u90A3\u4E00\u65CF\u7684 tertiary \u672C\u4ED3\u4ECE\u672A\u7528\u8FC7\u3001
|
|
95
|
+
\u65E0\u6CD5\u5728\u6B64\u786E\u8BA4\u5B58\u5728\uFF0C\u4E8E\u662F\u7ED9\u4E00\u6761 color-mix \u515C\u5E95\u2014\u2014\u731C\u9519 token \u7684\u75C7\u72B6\u662F"\u5E95\u8272\u6CA1\u4E86"\uFF0C\u4E0D\u4F1A\u62A5\u9519\u3002
|
|
96
|
+
\u26A0\uFE0F \u8FD9\u6BB5 CSS \u4F4F\u5728\u6A21\u677F\u5B57\u7B26\u4E32\u91CC\uFF1A\u6CE8\u91CA\u91CC\u4E0D\u8BB8\u51FA\u73B0\u53CD\u5F15\u53F7\uFF0C\u51FA\u73B0\u5C31\u628A\u6574\u6BB5\u6837\u5F0F\u622A\u65AD\uFF08\u672C\u8F6E\u8E29\u8FC7\uFF09\u3002 */
|
|
97
|
+
.capital-watchlist-tag-cn { color: var(--dsw-alias-state-error-primary); background: var(--dsw-alias-state-error-tertiary, color-mix(in srgb, var(--dsw-alias-state-error-primary) 12%, transparent)); }
|
|
98
|
+
.capital-watchlist-tag-hk { color: var(--dsw-alias-state-warn-label); background: var(--dsw-alias-state-warn-tertiary); }
|
|
99
|
+
.capital-watchlist-tag-us { color: var(--dsw-alias-state-success-primary); background: var(--dsw-alias-state-success-tertiary); }
|
|
63
100
|
/* \u8868\u5934\u4E0E\u6570\u636E\u884C\u5171\u7528\u540C\u4E00\u4E2A grid \u5B9A\u4E49\uFF1A\u5BBD\u5EA6\u53EA\u5728\u8FD9\u4E00\u5904\uFF0C\u4E24\u5904\u5404\u81EA\u6392\u7248\u5C31\u4F1A\u4E32\u884C\uFF08\u5B9E\u673A\u8E29\u8FC7\uFF09\u3002
|
|
64
101
|
\u4E09\u5217\uFF1A\u540D\u79F0\uFF08\u7B2C\u4E8C\u884C\u662F\u300C\u4EE3\u7801 \xB7 \u5FBD\u6807\u300D\uFF09/ \u62A5\u4EF7 / \u300C\u64CD\u4F5C\u300D\u90A3\u4E00\u7C07\uFF08\u300C\u9884\u6D4B\u300D\u300C\u590D\u76D8\u300D\u300C\u66F4\u591A\u300D\u4E09\u679A\uFF09\u3002
|
|
65
102
|
92px \u4E0E 84px \u5FC5\u987B\u662F**\u5B9A\u503C**\uFF1A\u8868\u5934\u4E0E\u6570\u636E\u884C\u662F\u4E24\u4E2A\u72EC\u7ACB\u7684 grid \u5BB9\u5668\uFF0C\u53EA\u6709\u5B9A\u503C\u624D\u8BA9\u4E24\u884C\u7684\u5217\u8FB9\u7EBF\u5BF9\u9F50\uFF1B
|
|
@@ -74,15 +111,19 @@ window.__ModuleLoader__.load({
|
|
|
74
111
|
\u8FD9\u4E00\u683C\u88C5\u7740\u8FD9\u4E00\u884C\u7684\u4E09\u4E2A\u52A8\u4F5C\uFF1A\u300C\u9884\u6D4B\u300D\u300C\u590D\u76D8\u300D\u4E0E\u300C\u66F4\u591A\u300D\uFF0C\u8868\u5934\u8D34\u7684\u5C31\u662F\u5B83\u4EEC\u5171\u540C\u90A3\u6761\u53F3\u7F18\u3002 */
|
|
75
112
|
.capital-watchlist-headaction { text-align: right; }
|
|
76
113
|
.capital-watchlist-list { max-height: 300px; padding: 0 12px 8px; overflow-y: auto; }
|
|
77
|
-
/* \u4E0B\u62C9\u6253\u5F00\u65F6\u628A\u8FD9\u4E00\u683C\u6491\u5230\u6D6E\u5C42\u7684\u6700\u5927\u9AD8\u5EA6\uFF08\u89C1\u4E0A\u9762 capital-watchlist-dropdown \u90A3\u4E00\u6BB5\u7684\u7406\u7531\uFF09\
|
|
78
|
-
\
|
|
79
|
-
|
|
114
|
+
/* \u4E0B\u62C9\u6253\u5F00\u65F6\u628A\u8FD9\u4E00\u683C\u6491\u5230\u6D6E\u5C42\u7684\u6700\u5927\u9AD8\u5EA6\uFF08\u89C1\u4E0A\u9762 capital-watchlist-dropdown \u90A3\u4E00\u6BB5\u7684\u7406\u7531\uFF09\uFF1A
|
|
115
|
+
**\u8FD9\u4E24\u4E2A\u6570\u5FC5\u987B\u540C\u503C**\u2014\u2014\u4E00\u4E2A\u6539\u4E86\u53E6\u4E00\u4E2A\u4E0D\u6539\uFF0C\u4E0B\u62C9\u5C31\u4F1A\u88AB\u5361\u7247\u88C1\u6389\u4E00\u622A\uFF08\u6216\u8005\u6E05\u5355\u88AB\u9876\u51FA\u5361\u7247\u5916\uFF09\u3002
|
|
116
|
+
2026-10-08 \u4E00\u8D77\u4ECE 246 \u62AC\u5230 320\uFF08\u7528\u6237\u70B9\u540D"\u4E00\u5C4F\u53EA\u80FD\u663E\u793A 3 \u4E2A\u6807\u7684"\uFF09\uFF0C\u6D4B\u8BD5\u91CC\u6709\u540C\u503C\u65AD\u8A00\u3002
|
|
117
|
+
\u53EA\u5728\u6253\u5F00\u65F6\u6491\uFF1A\u5E73\u65F6 1-2 \u884C\u7684\u77ED\u6E05\u5355\u4E0D\u8BE5\u5E73\u767D\u591A\u51FA\u4E00\u622A\u7A7A\u767D\u3002
|
|
118
|
+
\u26A0\uFE0F \u6253\u5F00\u65F6 min-height(320) > \u4E0A\u9762\u90A3\u6761 max-height(300)\uFF0C\u800C CSS \u91CC min \u6052\u80DC max \u21D2 \u8FD9\u4E00\u683C\u6B64\u65F6\u6309
|
|
119
|
+
320 \u9AD8\u3001\u5185\u90E8\u7167\u65E7 overflow-y: auto \u81EA\u5DF1\u6EDA\uFF1B\u6536\u8D77\u540E max-height 300 \u6062\u590D\u751F\u6548\u3002 */
|
|
120
|
+
.capital-watchlist-list-open { min-height: 320px; }
|
|
80
121
|
.capital-watchlist-row { padding: 11px 8px; border-radius: 10px; transition: background .15s var(--ds-ease-in-out); }
|
|
81
122
|
.capital-watchlist-row:hover { background: var(--dsw-alias-interactive-bg-hover); }
|
|
82
123
|
.capital-watchlist-namewrap { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
|
|
83
124
|
.capital-watchlist-name { font-size: 14px; font-weight: 500; color: var(--dsw-alias-label-primary); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
|
|
84
|
-
/* \u4EE3\u7801\u4E0E\u7C7B\u578B\u5FBD\u6807\u540C\u5904\u7B2C\u4E8C\u884C\uFF1Agap \u662F\u8FD9\u4E00\u5BF9\u552F\u4E00\u7684\u95F4\u8DDD\u6765\u6E90\uFF0C\u5FBD\u6807\u81EA\u5E26\u5185\u8FB9\u8DDD\uFF0C\u522B\u518D\u5404\u5199 margin\u3002 */
|
|
85
|
-
.capital-watchlist-codeline { display: flex; align-items: center; gap:
|
|
125
|
+
/* \u4EE3\u7801\u4E0E\u7C7B\u578B\u5FBD\u6807\u540C\u5904\u7B2C\u4E8C\u884C\uFF082026-10-07 \u8D77\u8FD9\u4E00\u884C\u5C31\u8FD9\u4E24\u6837\uFF0C\u5E01\u79CD\u4E0D\u8FDB\u9762\u677F\uFF09\uFF1Agap \u662F\u8FD9\u4E00\u5BF9\u552F\u4E00\u7684\u95F4\u8DDD\u6765\u6E90\uFF0C\u5FBD\u6807\u81EA\u5E26\u5185\u8FB9\u8DDD\uFF0C\u522B\u518D\u5404\u5199 margin\u300210px \u4E0E\u5019\u9009\u884C capital-watchlist-option \u90A3\u6761 gap \u540C\u503C\u2014\u2014\u540C\u4E00\u4EF6\u4E8B\u7684\u4E24\u79CD\u6392\u6CD5\uFF0C\u4E0D\u8BE5\u4E00\u5904\u7D27\u4E00\u5904\u677E\uFF1B6px \u5728\u5B9E\u673A\u4E0A\u8BFB\u8D77\u6765\u662F"\u8D34\u7740"\uFF082026-10-07 \u7528\u6237\u70B9\u540D\uFF09\u3002 */
|
|
126
|
+
.capital-watchlist-codeline { display: flex; align-items: center; gap: 10px; min-width: 0; }
|
|
86
127
|
.capital-watchlist-code { font-size: 11px; color: var(--dsw-alias-label-tertiary); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
|
|
87
128
|
/* \u6700\u65B0\u4EF7\u5728\u4E0A\u3001\u6DA8\u8DCC\u5E45\u5728\u4E0B\uFF0C\u53F3\u5BF9\u9F50\uFF1A\u4E24\u884C\u90FD\u540C\u4E00\u5217\u91CC\u6392\uFF0C\u5217\u5BBD\u624D\u4E0D\u9700\u8981\u8DDF\u7740\u6DA8\u8DCC\u4F4D\u6570\u6296\u3002
|
|
88
129
|
padding-right \u662F**\u6570\u5B57\u4E0E\u52A8\u4F5C\u533A\u4E4B\u95F4\u90A3\u53E3\u6C14\u7684\u552F\u4E00\u6765\u6E90**\uFF082026-10-01 \u7528\u6237\u70B9\u540D\uFF1A\u62A5\u4EF7\u548C\u9884\u6D4B/\u590D\u76D8\u592A\u8FD1\uFF0C
|
|
@@ -140,7 +181,9 @@ window.__ModuleLoader__.load({
|
|
|
140
181
|
.capital-watchlist-refresh:disabled { opacity: .45; cursor: not-allowed; }
|
|
141
182
|
/* 34px = \u5237\u65B0\u6309\u94AE\u7684\u9AD8\u5EA6\uFF1A\u4E0E\u5B83\u540C\u4E00\u884C\u7684\u65F6\u95F4\u6309\u6309\u94AE\u9AD8\u5EA6\u884C\u9AD8\u5C45\u4E2D\uFF0C\u5DE6\u5217\u591A\u51FA\u5931\u8D25\u884C\u4E5F\u4E0D\u53D7\u5F71\u54CD\u3002 */
|
|
142
183
|
.capital-watchlist-updated { font-size: 12px; line-height: 34px; color: var(--dsw-alias-label-tertiary); }
|
|
143
|
-
|
|
184
|
+
/* flex: none\uFF1A2026-10-08 \u8D77 hint \u662F\u4E0B\u62C9\u8FD9\u4E2A flex \u5217\u7684\u76F4\u63A5\u5B50\u5143\u7D20\uFF08\u6EDA\u52A8\u533A\u53EA\u5269\u9009\u9879\u90A3\u4E00\u5C42\uFF09\uFF0C
|
|
185
|
+
\u4E0D\u9489\u4F4F\u7684\u8BDD\u7A7A\u95F4\u4E00\u7D27\u5B83\u5C31\u4F1A\u88AB\u538B\u6241\u2014\u2014hint \u6CA1\u6709 overflow\uFF0C\u538B\u6241\u5C31\u662F\u6587\u5B57\u88AB\u88C1\u3002 */
|
|
186
|
+
.capital-watchlist-hint { flex: none; padding: 8px 14px; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary); }
|
|
144
187
|
/* \u9EC4 = \u52A8\u4F5C\u6CA1\u6210\u3002\u4E24\u6761\u9EC4\u5B57\u90FD\u7528 warn-label\uFF1A\u5B98\u65B9"\u72B6\u6001\u8272\u7528\u4F5C\u6587\u5B57"\u7ED9\u7684\u662F label \u90A3\u4E00\u6863\uFF0C
|
|
145
188
|
warn-primary \u538B\u5728\u6D45\u5E95\u4E0A\u53EA\u6709 2:1\uFF0C\u62A5\u9519\u6587\u5B57\u53CD\u800C\u662F\u6700\u4E0D\u8BE5\u770B\u4E0D\u89C1\u7684\u4E00\u884C\u3002 */
|
|
146
189
|
/* \u641C\u7D22\u5931\u8D25\uFF1A\u5360\u4E0B\u62C9\u7684 hint \u4F4D\uFF08\u4E0E\u300C\u641C\u7D22\u4E2D\u2026\u300D\u300C\u6CA1\u6709\u5339\u914D\u7684\u6807\u7684\u300D\u540C\u4E00\u4E2A\u69FD\uFF0C\u66FF\u6362\u800C\u975E\u5E76\u5217\uFF09\u3002
|
|
@@ -175,8 +218,8 @@ window.__ModuleLoader__.load({
|
|
|
175
218
|
.capital-watchlist-confirmbtn:hover { background: var(--dsw-alias-interactive-bg-hover-accent); }
|
|
176
219
|
.capital-watchlist-confirmdanger { border: 1px solid color-mix(in srgb, var(--dsw-alias-state-error-primary) 25%, transparent); background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 15%, transparent); color: var(--dsw-alias-state-error-primary); }
|
|
177
220
|
.capital-watchlist-confirmdanger:hover { background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 25%, transparent); }
|
|
178
|
-
`;function
|
|
179
|
-
`);return await navigator.clipboard.writeText(t),t}dispose(){this.timer!==null&&clearTimeout(this.timer),this.searchController!==null&&this.searchController.abort()}};function P(r){if(typeof r!="number"||!Number.isFinite(r))return"";let t=new Date(r),a=s=>String(s).padStart(2,"0");return`${a(t.getMonth()+1)}-${a(t.getDate())} ${a(t.getHours())}:${a(t.getMinutes())}`}function C({assetType:r,t}){return e("span",{className:`capital-watchlist-tag ${ia[r]??"capital-watchlist-tag-stock"}`},$(r,t))}function sa(r,t,a){let s=v(r.name);return`${t(`${a}PromptPrefix`)}${s} (${r.thscode} \xB7 ${$(r.asset_type,t)})${t(`${a}PromptSuffix`)}`}function na({quote:r,failureCode:t,refreshing:a,t:s}){let i=t!==void 0;if(r==null)return a===!0?e("div",{className:"capital-watchlist-quote"},e("span",{className:"capital-watchlist-skeleton capital-watchlist-skeleton-price"}),e("span",{className:"capital-watchlist-skeleton capital-watchlist-skeleton-change"})):i?e("div",{className:"capital-watchlist-quote",title:s(`error.${t}`)},e("div",{className:"capital-watchlist-price capital-watchlist-quotefailed"},"\u2014")):e("div",{className:"capital-watchlist-quote"},e("div",{className:"capital-watchlist-price"},s("notRefreshed")));let p=typeof r.change_pct=="number"&&Number.isFinite(r.change_pct),n=p?`${r.change_pct>0?"+":""}${r.change_pct.toFixed(2)}%`:"\u2014",o=i?"capital-watchlist-stale":p?r.change_pct>0?"capital-watchlist-up":r.change_pct<0?"capital-watchlist-down":"capital-watchlist-flat":"capital-watchlist-nodata";return e("div",{className:"capital-watchlist-quote",title:i?`${s(`error.${t}`)} \xB7 ${s("stale")} ${P(r.captured_at)}`:p?void 0:s("noChangePct")},e("div",{className:i?"capital-watchlist-price capital-watchlist-stale":"capital-watchlist-price"},r.price.toFixed(2)),e("div",{className:`capital-watchlist-change ${o}`},n))}function oa(r,t){if(t.code!=="list_full")return r(`error.${t.code}`);let a=t.limit;return typeof a!="number"||!Number.isFinite(a)?r("error.list_full_noMax"):r("error.list_full").replace("{max}",String(a))}function ca({useDialog:r,surface:t,t:a,inputActions:s}){let i=r(l=>l),[p,n]=q(!1),o=i.pendingRemove??null;if(F(()=>()=>t.dispose(),[t]),!i.open)return null;let c=i.dropdownOpen===!0,d=o!==null,u=l=>{if(l.key==="Escape"){if(d){l.stopPropagation(),t.setPendingRemove(null);return}c&&(l.stopPropagation(),t.hideDropdown())}},R=l=>{if(!c)return;let h=l.relatedTarget;h!=null&&l.currentTarget?.contains?.(h)===!0||t.hideDropdown()},w=i.error,T=w==null?null:e("p",{className:"capital-watchlist-notice",role:"alert","data-code":w.code},`${a(`error.${w.code}`)}${w.partial===!0?a("errorSuffix"):""}`),x=(l,h)=>{s.insertText(sa(l,a,h),s.captureInsertion())===!0&&t.close()},z=c?e("div",{className:"capital-watchlist-dropdown",role:"listbox","aria-label":a("title"),"data-menu-material":"translucent"},i.candidates.map(l=>e("button",{key:l.thscode,type:"button",role:"option",className:"capital-watchlist-option",title:l.in_list===!0?a("added"):a("add"),disabled:l.in_list===!0||p,onClick:()=>{n(!0),t.add(l).finally(()=>n(!1))}},e("span",{className:"capital-watchlist-optionmain"},e("span",{className:"capital-watchlist-optionname"},l.name),e("span",{className:"capital-watchlist-optioncode"},l.in_list===!0?`${l.ticker} \xB7 ${a("added")}`:l.ticker)),e(C,{assetType:l.asset_type,t:a}))),i.composing===!0?e("div",{className:"capital-watchlist-hint"},a("composingHint")):i.searching===!0||i.pendingSearch===!0?e("div",{className:"capital-watchlist-hint"},a("searching")):i.searchError!==null&&i.searchError!==void 0?e("div",{className:"capital-watchlist-hint capital-watchlist-searcherror",role:"alert","data-code":i.searchError.code},a(`error.${i.searchError.code}`)):i.candidates.length===0?e("div",{className:"capital-watchlist-hint"},a("noHit")):null,i.truncated?e("div",{className:"capital-watchlist-hint"},a("truncated")):null):null,I=i.items.length===0?null:e("div",{className:"capital-watchlist-grid capital-watchlist-head"},e("span",null,a("colName")),e("span",{className:"capital-watchlist-quote"},a("colQuote")),e("span",{className:"capital-watchlist-headaction"},a("colAction"))),M=i.loadError!==null&&i.loadError!==void 0?e("p",{className:"capital-watchlist-empty capital-watchlist-loaderror",role:"alert","data-code":i.loadError.code},a(`error.${i.loadError.code}`)):e("p",{className:"capital-watchlist-empty"},a("empty")),A=i.loading?e("p",{className:"capital-watchlist-empty"},a("loading")):i.items.length===0?M:e("div",{className:c?"capital-watchlist-list capital-watchlist-list-open":"capital-watchlist-list"},i.items.map((l,h)=>e("div",{key:l.thscode,className:"capital-watchlist-grid capital-watchlist-row","data-thscode":l.thscode},e("span",{className:"capital-watchlist-namewrap"},e("span",{className:"capital-watchlist-name",title:`${l.name} ${l.ticker}`},l.name),e("span",{className:"capital-watchlist-codeline"},e("span",{className:"capital-watchlist-code"},l.ticker),e(C,{assetType:l.asset_type,t:a}))),e(na,{quote:l.quote,failureCode:i.failures[l.thscode],refreshing:i.refreshing,t:a}),e("span",{className:"capital-watchlist-rowactions"},e("button",{type:"button",className:"capital-watchlist-predict",disabled:p,title:a("predictTip"),"aria-label":`${a("predict")} ${l.name}`,onClick:()=>x(l,"predict")},e(H,{size:14})),e("button",{type:"button",className:"capital-watchlist-review",disabled:p,title:a("reviewTip"),"aria-label":`${a("review")} ${l.name}`,onClick:()=>x(l,"review")},e(B,{size:14})),e(K,{open:i.rowMenu===l.thscode,anchor:e("button",{type:"button",className:"capital-watchlist-more",disabled:p,title:a("more"),"aria-label":`${a("more")} ${l.name}`,"aria-haspopup":"menu","aria-expanded":i.rowMenu===l.thscode,onClick:()=>t.toggleRowMenu(l.thscode)},e(L,{size:14})),items:[{id:"pin",label:a("pin"),icon:e(U,{size:14}),disabled:h===0},{id:"remove",label:a("remove"),icon:e(G,{size:14}),danger:!0}],onSelect:j=>{t.closeRowMenu(),j==="pin"?t.pin(l.thscode):t.setPendingRemove(l)},onClose:()=>t.closeRowMenu(),align:"end",portal:!0,className:"capital-watchlist-actions"}))))),O=e("div",{className:d?"capital-watchlist-confirm capital-watchlist-confirm-open":"capital-watchlist-confirm","aria-hidden":d?void 0:"true"},e("div",{className:"capital-watchlist-confirmbox",role:d?"alertdialog":void 0,"aria-label":a("confirmTitle")},e("div",{className:"capital-watchlist-confirmtitle"},a("confirmTitle")),d?e("p",{className:"capital-watchlist-confirmdesc"},a("confirmDescPrefix"),e("strong",null,`${o.name} \xB7 ${o.ticker}`),a("confirmDescSuffix")):null,e("div",{className:"capital-watchlist-confirmactions"},e("button",{type:"button",className:"capital-watchlist-confirmbtn",onClick:()=>t.setPendingRemove(null)},a("confirmCancel")),e("button",{type:"button",className:"capital-watchlist-confirmbtn capital-watchlist-confirmdanger",onClick:()=>{let l=o;t.setPendingRemove(null),l!==null&&t.remove(l.thscode)}},a("confirmOk")))));return e(J,{open:!0,onClose:()=>t.close(),title:a("title"),headless:!0,shortcutModal:"watchlist",className:"capital-watchlist-dialog"},e("div",{className:"capital-watchlist-card",onKeyDown:u},e("div",{className:"capital-watchlist-header"},e("h2",{className:"capital-watchlist-title"},a("title")),e("button",{type:"button",className:"capital-watchlist-close","aria-label":a("close"),onClick:()=>t.close()},e(k,{size:14}))),e("div",{className:"capital-watchlist-search",onBlur:R},e("div",{className:"capital-watchlist-field"},e("span",{className:"capital-watchlist-searchicon"},e(W,{size:16})),e("input",{className:"capital-watchlist-input","data-modal-autofocus":!0,value:i.query,placeholder:a("searchPlaceholder"),onChange:l=>t.onQueryChange(l.target.value,l.isComposing),onCompositionStart:()=>t.beginComposition(),onCompositionEnd:l=>t.endComposition(l.target.value)}),i.query.length>0?e("button",{type:"button",className:"capital-watchlist-clear",title:a("clearInput"),"aria-label":a("clearInput"),onMouseDown:l=>l.preventDefault(),onClick:()=>t.onQueryChange("",!1)},e(k,{size:12})):null),z),i.addError!==null&&i.addError!==void 0?e("p",{className:"capital-watchlist-adderror",role:"status","data-code":i.addError.code},oa(a,i.addError)):null,I,A,e("div",{className:"capital-watchlist-footer"},e("div",{className:"capital-watchlist-footcol"},e("button",{type:"button",className:"capital-watchlist-refresh",disabled:i.refreshing||p,onClick:()=>{t.refresh()}},e(Y,{size:14}),i.refreshing?a("refreshing"):a("refresh")),T),e("span",{className:"capital-watchlist-updated"},`${a("updated")} ${i.refreshed_at===null||i.refreshed_at===void 0?a("notRefreshed"):P(i.refreshed_at)}`)),O))}function pa(r){r.effect(la,`${m}: styles`),r.effect(()=>r.locale.register(b,{zh:Z,en:aa}),`${m}: dictionaries`);let t=new Map,a=n=>{let o=t.get(n);return o===void 0&&(o=new y,t.set(n,o)),o};r.effect(()=>()=>{for(let n of t.values())n.dispose();t.clear()},`${m}: per-session surfaces`);let s=n=>{let c=r.sessions?.list?.getSnapshot?.().byId?.[n]?.projectionValues?.agentPreset;return typeof c=="string"?c:void 0},i=new Set,p=n=>{let o=s(n);return o!==void 0?o===V:(i.has(n)||(i.add(n),Promise.resolve(r.sessions?.refreshProjections?.(n)).catch(()=>{})),!1)};r.slots.inject(N,()=>r.slots.register({name:N,id:"capital-watchlist-dialog",order:3,locale:b,inject:n=>{let o=a(n);return{hooks:{dialog:o.state},surface:o}}},ca)),r.inject(["commandUi"],n=>{let o=r.locale.bind(b);n.effect(()=>n.commandUi.register({name:"watchlist",label:()=>o("command.label"),description:()=>o("command.description"),icon:Q,available:c=>p(c.sessionId),ui:{kind:"action",run:c=>{a(c.sessionId).open()}}}),`${m}: /watchlist contribution`)}),r.logger?.info?.(`${m}: \u5BA2\u6237\u7AEF\u534A\u8FB9\u5DF2\u6302\u8F7D\uFF08/watchlist \u83DC\u5355\u884C + \u81EA\u9009\u80A1\u5F39\u7A97\uFF09`)}exports.name=m;exports.inject=["slots","locale","commandUi","sessions"];exports.apply=pa;
|
|
221
|
+
`;function ma(){let l=globalThis.document;if(!l||typeof l.createElement!="function"||l.querySelector(`style[data-${A}]`))return;let t=l.createElement("style");t.setAttribute(`data-${A}`,""),t.textContent=ua;let a=l.head??l.body;if(!(a===void 0||typeof a.appendChild!="function"))return a.appendChild(t),()=>t.remove()}async function m(l,{query:t,body:a,signal:s}={}){let i=t!==void 0?`${$}${l}?${t}`:`${$}${l}`,d=a===void 0?{method:"GET",cache:"no-store",credentials:"same-origin",signal:s}:{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(a),credentials:"same-origin",signal:s},n=await fetch(i,d),o=await n.text(),c={};try{c=o.length>0?JSON.parse(o):{}}catch{c={}}if(n.ok===!0&&c.ok===!0)return c;let p=typeof c.code=="string"&&c.code.length>0?c.code:n.status===401||n.status===403?"unauthorized":"fuyao_unavailable",h=new Error(p);throw h.code=p,h.candidates=c.candidates,h.limit=c.limit,h}var I=()=>({open:!1,loading:!1,refreshing:!1,searching:!1,items:[],candidates:[],truncated:!1,marketFilter:"all",query:"",dropdownOpen:!1,rowMenu:null,pendingRemove:null,refreshed_at:null,error:null,searchError:null,searchPartial:null,addError:null,loadError:null,failures:{},composing:!1,pendingSearch:!1}),y=class{constructor(){this.store=B(I()),this.searchController=null,this.timer=null,this.pending=null,this.lastQuery=null}get state(){return this.store}get snapshot(){return this.store.getSnapshot()}patch(t){this.store.update(a=>Object.assign(a,t))}open(){this.patch({...I(),open:!0,loading:!0}),this.load().then(()=>this.refresh(),()=>this.patch({loading:!1}))}close(){this.timer!==null&&clearTimeout(this.timer),this.searchController!==null&&this.searchController.abort(),this.lastQuery=null,this.patch({open:!1,rowMenu:null,composing:!1,pendingSearch:!1})}async load(){try{let t=await m("/list");this.patch({items:b(t.items)??[],seeded_at:t.seeded_at,loading:!1,loadError:null})}catch(t){throw this.patch({loading:!1,loadError:{code:t.code??"fuyao_unavailable"}}),t}}refresh(){if(this.pending!==null)return this.pending;this.patch({refreshing:!0});let t=m("/refresh",{body:{}}).then(a=>{let s={};for(let d of a.failures??[])s[d.thscode]=d.code;let i=b(a.items)??this.snapshot.items;this.patch({items:i,refreshed_at:a.refreshed_at??this.snapshot.refreshed_at,failures:s,error:a.error?{code:a.error.code,partial:i.length>0&&i.some(d=>s[d.thscode]===void 0)}:null})}).catch(a=>{this.patch({error:{code:a.code??"fuyao_unavailable",partial:this.snapshot.items.some(s=>s.quote!==null)}})}).finally(()=>{this.patch({refreshing:!1}),this.pending=null});return this.pending=t,t}onQueryChange(t,a){let s=t.trim(),i=a===void 0?this.snapshot.composing===!0:a===!0;if(this.patch({query:t,searchError:null,composing:i,dropdownOpen:s.length>0}),this.timer!==null&&clearTimeout(this.timer),s.length===0){this.searchController!==null&&this.searchController.abort(),this.lastQuery=null,this.patch({candidates:[],truncated:!1,searching:!1,pendingSearch:!1});return}s===this.lastQuery&&this.snapshot.pendingSearch===!1||(this.patch({candidates:[],truncated:!1,pendingSearch:!i}),i!==!0&&(this.timer=setTimeout(()=>this.search(s),ra)))}beginComposition(){this.timer!==null&&clearTimeout(this.timer),this.patch({composing:!0})}endComposition(t){this.onQueryChange(t,!1)}hideDropdown(){this.patch({dropdownOpen:!1})}setMarketFilter(t){R.some(a=>a.id===t)&&this.patch({marketFilter:t})}toggleRowMenu(t){this.patch({rowMenu:this.snapshot.rowMenu===t?null:t})}closeRowMenu(){this.snapshot.rowMenu!==null&&this.patch({rowMenu:null})}setPendingRemove(t){this.patch({pendingRemove:t??null})}async search(t){this.lastQuery=t,this.searchController!==null&&this.searchController.abort();let a=new AbortController;this.searchController=a,this.patch({searching:!0,searchError:null,searchPartial:null});let s=()=>this.snapshot.query.trim()===t;try{let i=await m("/search",{query:`q=${encodeURIComponent(t)}`,signal:a.signal});if(!s()){this.patch({searching:!1});return}this.patch({candidates:b(i.items)??[],truncated:i.truncated===!0,searching:!1,pendingSearch:!1,searchPartial:Array.isArray(i.partial)&&i.partial.length>0?i.partial:null})}catch(i){if(i.name==="AbortError"||(this.lastQuery===t&&(this.lastQuery=null),!s()))return;this.patch({candidates:[],truncated:!1,searching:!1,pendingSearch:!1,searchError:{code:i.code??"fuyao_unavailable"},searchPartial:null})}}async add(t){try{await m("/add",{body:{thscode:t.thscode}})}catch(s){this.patch({addError:{code:s.code??"fuyao_unavailable",candidates:s.candidates,limit:s.limit}}),s.candidates!==void 0&&this.patch({candidates:s.candidates,truncated:!1});return}this.patch({addError:null,candidates:this.snapshot.candidates.map(s=>s.thscode===t.thscode?{...s,in_list:!0}:s)}),await this.load().catch(()=>{}),await this.refresh();let a=this.snapshot.items.find(s=>s.thscode===t.thscode);a!==void 0&&a.quote===null&&this.snapshot.failures[t.thscode]===void 0&&await this.refresh()}async remove(t){let a=this.snapshot.items;this.patch({items:a.filter(s=>s.thscode!==t),rowMenu:null});try{await m("/remove",{body:{thscode:t}}),this.snapshot.addError?.code==="list_full"&&this.patch({addError:null})}catch{this.patch({items:a})}}async pin(t){let a=this.snapshot.items,s=a.find(i=>i.thscode===t);if(s!==void 0){this.patch({items:[s,...a.filter(i=>i.thscode!==t)],rowMenu:null});try{let i=await m("/pin",{body:{thscode:t}});Array.isArray(i.items)&&this.patch({items:b(i.items)})}catch{this.patch({items:a})}}}async copyToClipboard(){let t=this.snapshot.items.map(a=>[a.thscode,k(a.name),a.asset_type,a.quote?.price??"",a.quote?.change_pct??"",a.quote?.captured_at??""].join(" ")).join(`
|
|
222
|
+
`);return await navigator.clipboard.writeText(t),t}dispose(){this.timer!==null&&clearTimeout(this.timer),this.searchController!==null&&this.searchController.abort()}};function z(l){if(typeof l!="number"||!Number.isFinite(l))return"";let t=new Date(l),a=s=>String(s).padStart(2,"0");return`${a(t.getMonth()+1)}-${a(t.getDate())} ${a(t.getHours())}:${a(t.getMinutes())}`}function T({assetType:l,t}){return e("span",{className:`capital-watchlist-tag ${ha[l]??"capital-watchlist-tag-cn"}`},ca(l,t))}function fa(l,t,a){let s=k(l.name);return`${t(`${a}PromptPrefix`)}${s} (${l.thscode} \xB7 ${da(l.asset_type,t)})${t(`${a}PromptSuffix`)}`}function wa({quote:l,failureCode:t,refreshing:a,t:s}){let i=t!==void 0;if(l==null)return a===!0?e("div",{className:"capital-watchlist-quote"},e("span",{className:"capital-watchlist-skeleton capital-watchlist-skeleton-price"}),e("span",{className:"capital-watchlist-skeleton capital-watchlist-skeleton-change"})):i?e("div",{className:"capital-watchlist-quote",title:s(`error.${t}`)},e("div",{className:"capital-watchlist-price capital-watchlist-quotefailed"},"\u2014")):e("div",{className:"capital-watchlist-quote"},e("div",{className:"capital-watchlist-price"},s("notRefreshed")));let d=typeof l.change_pct=="number"&&Number.isFinite(l.change_pct),n=d?`${l.change_pct>0?"+":""}${l.change_pct.toFixed(2)}%`:"\u2014",o=i?"capital-watchlist-stale":d?l.change_pct>0?"capital-watchlist-up":l.change_pct<0?"capital-watchlist-down":"capital-watchlist-flat":"capital-watchlist-nodata",c=typeof l.source_time=="string"&&l.source_time.length>0?`${s("exchangeTime")} ${l.source_time}`:"",p=[];return i?p.push(`${s(`error.${t}`)} \xB7 ${s("stale")} ${z(l.captured_at)}`):d||p.push(s("noChangePct")),c.length>0&&p.push(c),e("div",{className:"capital-watchlist-quote",title:p.length===0?void 0:p.join(" \xB7 ")},e("div",{className:i?"capital-watchlist-price capital-watchlist-stale":"capital-watchlist-price"},l.price.toFixed(2)),e("div",{className:`capital-watchlist-change ${o}`},n))}function ga(l,t){if(t.code!=="list_full")return l(`error.${t.code}`);let a=t.limit;return typeof a!="number"||!Number.isFinite(a)?l("error.list_full_noMax"):l("error.list_full").replace("{max}",String(a))}function ba({useDialog:l,surface:t,t:a,inputActions:s}){let i=l(r=>r),[d,n]=_(!1),[o,c]=_(null),p=i.pendingRemove??null;if(K(()=>()=>t.dispose(),[t]),!i.open)return null;let h=i.dropdownOpen===!0,w=p!==null,M=r=>{if(r.key==="Escape"){if(w){r.stopPropagation(),t.setPendingRemove(null);return}h&&(r.stopPropagation(),t.hideDropdown())}},H=r=>{if(!h)return;let u=r.relatedTarget;u!=null&&r.currentTarget?.contains?.(u)===!0||t.hideDropdown()},g=i.error,O=g==null?null:e("p",{className:"capital-watchlist-notice",role:"alert","data-code":g.code},`${a(`error.${g.code}`)}${g.partial===!0?a("errorSuffix"):""}`),N=(r,u)=>{s.insertText(fa(r,a,u),s.captureInsertion())===!0&&t.close()},x=i.marketFilter==="all"?i.candidates:i.candidates.filter(r=>P(r)===i.marketFilter),S={all:i.candidates.length,cn:0,hk:0,us:0};for(let r of i.candidates)S[P(r)]+=1;let F=i.candidates.length===0?null:e("div",{className:"capital-watchlist-filter",role:"group","aria-label":a("filterLabel")},R.map(r=>e("button",{key:r.id,type:"button",className:"capital-watchlist-filterbtn","aria-pressed":i.marketFilter===r.id,onClick:()=>t.setMarketFilter(r.id)},e("span",{className:"capital-watchlist-filterlabel"},r.id==="all"?a("filterAll"):r.label),e("span",{className:"capital-watchlist-filtercount"},String(S[r.id]))))),j=h?e("div",{className:"capital-watchlist-dropdown","aria-label":a("title"),"data-menu-material":"translucent"},F,e("div",{className:"capital-watchlist-options",role:"listbox","aria-label":a("title")},x.map(r=>e("button",{key:r.thscode,type:"button",role:"option",className:"capital-watchlist-option",title:r.name,"aria-disabled":r.in_list===!0||o===r.thscode,onClick:()=>{r.in_list===!0||o===r.thscode||(n(!0),c(r.thscode),t.add(r).finally(()=>{n(!1),c(null)}))}},e("span",{className:"capital-watchlist-optionmain"},e("span",{className:"capital-watchlist-optionname"},r.name),e("span",{className:"capital-watchlist-codeline"},e("span",{className:"capital-watchlist-optioncode"},r.thscode),e(T,{assetType:r.asset_type,t:a}))),e("span",{className:"capital-watchlist-addbtn","data-state":r.in_list===!0?"added":"idle"},r.in_list===!0?a("added"):a("add")))),i.truncated===!0&&x.length>0?e("div",{className:"capital-watchlist-hint capital-watchlist-endhint"},a("truncated")):null),i.composing===!0?e("div",{className:"capital-watchlist-hint"},a("composingHint")):i.searching===!0||i.pendingSearch===!0?e("div",{className:"capital-watchlist-hint"},a("searching")):i.searchError!==null&&i.searchError!==void 0?e("div",{className:"capital-watchlist-hint capital-watchlist-searcherror",role:"alert","data-code":i.searchError.code},a(`error.${i.searchError.code}`)):i.candidates.length===0?e("div",{className:"capital-watchlist-hint"},a("noHit")):x.length===0?e("div",{className:"capital-watchlist-hint","data-filter":i.marketFilter},a("filterNoHit")):null,...(i.searchPartial??[]).map(r=>e("div",{key:`partial-${r.market}`,className:"capital-watchlist-hint capital-watchlist-searcherror",role:"status","data-market":r.market,"data-code":r.code},`${a(`partial.${r.market}`)}${a(`error.${r.code}`)}`))):null,U=i.items.length===0?null:e("div",{className:"capital-watchlist-grid capital-watchlist-head"},e("span",null,a("colName")),e("span",{className:"capital-watchlist-quote"},a("colQuote")),e("span",{className:"capital-watchlist-headaction"},a("colAction"))),D=i.loadError!==null&&i.loadError!==void 0?e("p",{className:"capital-watchlist-empty capital-watchlist-loaderror",role:"alert","data-code":i.loadError.code},a(`error.${i.loadError.code}`)):e("p",{className:"capital-watchlist-empty"},a("empty")),L=i.loading?e("p",{className:"capital-watchlist-empty"},a("loading")):i.items.length===0?D:e("div",{className:h?"capital-watchlist-list capital-watchlist-list-open":"capital-watchlist-list"},i.items.map((r,u)=>e("div",{key:r.thscode,className:"capital-watchlist-grid capital-watchlist-row","data-thscode":r.thscode},e("span",{className:"capital-watchlist-namewrap"},e("span",{className:"capital-watchlist-name",title:`${r.name} ${r.ticker}`},r.name),e("span",{className:"capital-watchlist-codeline"},e("span",{className:"capital-watchlist-code"},r.ticker),e(T,{assetType:r.asset_type,t:a}))),e(wa,{quote:r.quote,failureCode:i.failures[r.thscode],refreshing:i.refreshing,t:a}),e("span",{className:"capital-watchlist-rowactions"},e("button",{type:"button",className:"capital-watchlist-predict",disabled:d,title:a("predictTip"),"aria-label":`${a("predict")} ${r.name}`,onClick:()=>N(r,"predict")},e(G,{size:14})),e("button",{type:"button",className:"capital-watchlist-review",disabled:d,title:a("reviewTip"),"aria-label":`${a("review")} ${r.name}`,onClick:()=>N(r,"review")},e(J,{size:14})),e(ta,{open:i.rowMenu===r.thscode,anchor:e("button",{type:"button",className:"capital-watchlist-more",disabled:d,title:a("more"),"aria-label":`${a("more")} ${r.name}`,"aria-haspopup":"menu","aria-expanded":i.rowMenu===r.thscode,onClick:()=>t.toggleRowMenu(r.thscode)},e(W,{size:14})),items:[{id:"pin",label:a("pin"),icon:e(V,{size:14}),disabled:u===0},{id:"remove",label:a("remove"),icon:e(aa,{size:14}),danger:!0}],onSelect:Q=>{t.closeRowMenu(),Q==="pin"?t.pin(r.thscode):t.setPendingRemove(r)},onClose:()=>t.closeRowMenu(),align:"end",portal:!0,className:"capital-watchlist-actions"}))))),q=e("div",{className:w?"capital-watchlist-confirm capital-watchlist-confirm-open":"capital-watchlist-confirm","aria-hidden":w?void 0:"true"},e("div",{className:"capital-watchlist-confirmbox",role:w?"alertdialog":void 0,"aria-label":a("confirmTitle")},e("div",{className:"capital-watchlist-confirmtitle"},a("confirmTitle")),w?e("p",{className:"capital-watchlist-confirmdesc"},a("confirmDescPrefix"),e("strong",null,`${p.name} \xB7 ${p.ticker}`),a("confirmDescSuffix")):null,e("div",{className:"capital-watchlist-confirmactions"},e("button",{type:"button",className:"capital-watchlist-confirmbtn",onClick:()=>t.setPendingRemove(null)},a("confirmCancel")),e("button",{type:"button",className:"capital-watchlist-confirmbtn capital-watchlist-confirmdanger",onClick:()=>{let r=p;t.setPendingRemove(null),r!==null&&t.remove(r.thscode)}},a("confirmOk")))));return e(ea,{open:!0,onClose:()=>t.close(),title:a("title"),headless:!0,shortcutModal:"watchlist",className:"capital-watchlist-dialog"},e("div",{className:"capital-watchlist-card",onKeyDown:M},e("div",{className:"capital-watchlist-header"},e("h2",{className:"capital-watchlist-title"},a("title")),e("button",{type:"button",className:"capital-watchlist-close","aria-label":a("close"),onClick:()=>t.close()},e(C,{size:14}))),e("div",{className:"capital-watchlist-search",onBlur:H},e("div",{className:"capital-watchlist-field"},e("span",{className:"capital-watchlist-searchicon"},e(Z,{size:16})),e("input",{className:"capital-watchlist-input","data-modal-autofocus":!0,value:i.query,placeholder:a("searchPlaceholder"),onChange:r=>t.onQueryChange(r.target.value,r.isComposing),onCompositionStart:()=>t.beginComposition(),onCompositionEnd:r=>t.endComposition(r.target.value)}),i.query.length>0?e("button",{type:"button",className:"capital-watchlist-clear",title:a("clearInput"),"aria-label":a("clearInput"),onMouseDown:r=>r.preventDefault(),onClick:()=>t.onQueryChange("",!1)},e(C,{size:12})):null),j),i.addError!==null&&i.addError!==void 0?e("p",{className:"capital-watchlist-adderror",role:"status","data-code":i.addError.code},ga(a,i.addError)):null,U,L,e("div",{className:"capital-watchlist-footer"},e("div",{className:"capital-watchlist-footcol"},e("button",{type:"button",className:"capital-watchlist-refresh",disabled:i.refreshing||d,onClick:()=>{t.refresh()}},e(X,{size:14}),i.refreshing?a("refreshing"):a("refresh")),O),e("span",{className:"capital-watchlist-updated"},`${a("updated")} ${i.refreshed_at===null||i.refreshed_at===void 0?a("notRefreshed"):z(i.refreshed_at)}`)),q))}function xa(l){l.effect(ma,`${f}: styles`),l.effect(()=>l.locale.register(v,{zh:la,en:sa}),`${f}: dictionaries`);let t=new Map,a=n=>{let o=t.get(n);return o===void 0&&(o=new y,t.set(n,o)),o};l.effect(()=>()=>{for(let n of t.values())n.dispose();t.clear()},`${f}: per-session surfaces`);let s=n=>{let c=l.sessions?.list?.getSnapshot?.().byId?.[n]?.projectionValues?.agentPreset;return typeof c=="string"?c:void 0},i=new Set,d=n=>{let o=s(n);return o!==void 0?o===ia:(i.has(n)||(i.add(n),Promise.resolve(l.sessions?.refreshProjections?.(n)).catch(()=>{})),!1)};l.slots.inject(E,()=>l.slots.register({name:E,id:"capital-watchlist-dialog",order:3,locale:v,inject:n=>{let o=a(n);return{hooks:{dialog:o.state},surface:o}}},ba)),l.inject(["commandUi"],n=>{let o=l.locale.bind(v);n.effect(()=>n.commandUi.register({name:"watchlist",label:()=>o("command.label"),description:()=>o("command.description"),icon:Y,available:c=>d(c.sessionId),ui:{kind:"action",run:c=>{a(c.sessionId).open()}}}),`${f}: /watchlist contribution`)}),l.logger?.info?.(`${f}: \u5BA2\u6237\u7AEF\u534A\u8FB9\u5DF2\u6302\u8F7D\uFF08/watchlist \u83DC\u5355\u884C + \u81EA\u9009\u80A1\u5F39\u7A97\uFF09`)}exports.name=f;exports.inject=["slots","locale","commandUi","sessions"];exports.apply=xa;
|
|
180
223
|
return module.exports
|
|
181
224
|
},
|
|
182
225
|
})
|