Files
ai/charting_library/bundles/symbol-search-dialog.fad5d4654e0fe57a6951.js

2 lines
3.1 KiB
JavaScript

"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[8481],{96898:(e,t,o)=>{o.r(t),o.d(t,{Components:()=>h,showDefaultSearchDialog:()=>c,showSymbolSearchItemsDialog:()=>l.showSymbolSearchItemsDialog});var a=o(70761),s=(o(72445),o(95360)),n=o(66411),l=o(45267),i=o(89659),r=o(90141);o(16905),o(45958);!(0,r.isOnMobileAppPage)("any")&&window.matchMedia("(min-width: 602px) and (min-height: 445px)").matches;function c(e){new i.WatchedValue({});const t=(0,n.getSymbolSearchCompleteOverrideFunction)(),{defaultValue:o,showSpreadActions:r,source:c,onSearchComplete:h,trackResultsOptions:d,setSymbol:m=(e,t)=>a.linking.setSymbolAndLogInitiator(e,t),searchType:u,...S}=e,g={...S,showSpreadActions:r??(0,s.canShowSpreadActions)(),onSymbolFiltersParamsChange:void 0,onSearchComplete:(e,o)=>{t(e[0].symbol,e[0].result).then((e=>{m(e.symbol,"symbol search"),h?.(e.symbol)}))},onEmptyResults:void 0};(0,l.showSymbolSearchItemsDialog)({...g,defaultValue:o})}const h={SymbolSearchWatchlistDialogContentItem:null,SymbolSearchWatchlistDialog:null}},45267:(e,t,o)=>{o.d(t,{showSymbolSearchItemsDialog:()=>r});var a=o(79474),s=o(16780),n=o(84688),l=o(72101),i=o(64483);function r(e){const{symbolTypeFilter:t,initialMode:o="symbolSearch",autofocus:r=!0,defaultValue:c,showSpreadActions:h,selectSearchOnInit:d,onSearchComplete:m,dialogTitle:u,placeholder:S,fullscreen:g,initialScreen:p,wrapper:y,dialog:b,contentItem:w,onClose:C,onOpen:f,footer:O,symbolTypes:I,searchInput:v,emptyState:M,hideMarkedListFlag:D,dialogWidth:F="auto",manager:R,shouldReturnFocus:A,onSymbolFiltersParamsChange:P,onEmptyResults:k,customSearchSymbols:T,enableOptionsChain:V,disableRecents:E,overrideQueryParams:W,hiddenFilterIds:_,showRecents:K,searchInitiationPoint:x,selectedSymbolSettingsKey:L,filterValuesSettingsKey:Q}=e;if(n.dialogsOpenerManager.isOpened("SymbolSearch")||n.dialogsOpenerManager.isOpened("ChangeIntervalDialog"))return;const j=document.createElement("div"),q=a.createElement(s.SlotContext.Provider,{value:R??null},a.createElement(l.SymbolSearchItemsDialog,{symbolTypeFilter:t,onClose:B,initialMode:o,defaultValue:c,showSpreadActions:h,hideMarkedListFlag:D,selectSearchOnInit:d,onSearchComplete:m,dialogTitle:u,placeholder:S,fullscreen:g,initialScreen:p,wrapper:y,dialog:b,contentItem:w,footer:O,symbolTypes:I,searchInput:v,emptyState:M,autofocus:r,dialogWidth:F,shouldReturnFocus:A,onSymbolFiltersParamsChange:P,onEmptyResults:k,customSearchSymbols:T,enableOptionsChain:V,disableRecents:E,overrideQueryParams:W,hiddenFilterIds:_,showRecents:K,searchInitiationPoint:x,selectedSymbolSettingsKey:L,filterValuesSettingsKey:Q})),z=(0,i.createReactRoot)(q,j);function B(){z.unmount(),n.dialogsOpenerManager.setAsClosed("SymbolSearch"),C&&C()}return n.dialogsOpenerManager.setAsOpened("SymbolSearch"),f&&f(),{close:B}}},84688:(e,t,o)=>{o.d(t,{DialogsOpenerManager:()=>a,dialogsOpenerManager:()=>s});class a{constructor(){this._storage=new Map}setAsOpened(e,t){this._storage.set(e,t)}setAsClosed(e){this._storage.delete(e)}isOpened(e){return this._storage.has(e)}
getDialogPayload(e){return this._storage.get(e)}}const s=new a}}]);