Release v31.0.0 (from 028f81fbf6fef55e9694e5df4bd5106cc04c188a)
This commit is contained in:
10
charting_library/bundles/2827.3dbdc7dfbdee37f1c3d8.js
Normal file
10
charting_library/bundles/2827.3dbdc7dfbdee37f1c3d8.js
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[2827],{7973:(e,i,t)=>{t.d(i,{convertToInt:()=>r,floor:()=>n,limitedPrecision:()=>l});var o=t(95440);function n(e){return Math.floor(e)}function r(e){return parseInt(String(e))}function l(e){const i=new o.LimitedPrecisionNumericFormatter(e,!0);return e=>{if(null===e)return e;const t=i.parse(i.format(e));return t.res?t.value:null}}},8420:(e,i,t)=>{t.d(i,{LineStylePropertyDefinitionsMode:()=>p,lineStylePropertyDefinitions:()=>h});var o=t(91599),n=t(72769),r=t(73405),l=t(28434);const s=new n.TranslatedString("change line price source",o.t(null,void 0,t(2169))),a=new n.TranslatedString("change line color",o.t(null,void 0,t(7345))),c=new n.TranslatedString("change line width",o.t(null,void 0,t(93))),d=new n.TranslatedString("change line style",o.t(null,void 0,t(47517))),u=o.t(null,void 0,t(27912));var p;function h(e,i,t,o,n){const h=(0,l.createPriceSourceDefinition)(e,i,t,o,"SymbolLinePriceSource",s);let y;return y=n===p.Simple?(0,r.createLinePropertyDefinition)({color:i.color,width:i.linewidth,style:i.linestyle},{id:`${o}SymbolLineStyle`,title:u}):(0,r.createColorPropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.color,null,a),gradientColor1:i.gradientStartColor&&(0,r.getColorDefinitionProperty)(e,i.gradientStartColor,null,a),gradientColor2:i.gradientEndColor&&(0,r.getColorDefinitionProperty)(e,i.gradientEndColor,null,a),type:i.colorType&&(0,r.convertToDefinitionProperty)(e,i.colorType,a),width:(0,r.convertToDefinitionProperty)(e,i.linewidth,c),style:(0,r.convertToDefinitionProperty)(e,i.linestyle,d)},{id:`${o}SymbolLineStyle`,title:u}),[h,y]}!function(e){e[e.Gradient=0]="Gradient",e[e.Simple=1]="Simple"}(p||(p={}))},28434:(e,i,t)=>{t.d(i,{basePriceSources:()=>u,createPriceSourceDefinition:()=>p});var o=t(91599),n=t(54484),r=t(89659),l=t(73405),s=t(64830),a=t(37032),c=t(18518);const d=o.t(null,void 0,t(40926)),u=["open","high","low","close","hl2","hlc3","ohlc4"].map((e=>({title:c.priceSourceTitles[e],value:e,id:`price-source-${e}`})));function p(e,i,t,o,c,u){const p=void 0,h=(0,s.createWVFromGetterAndSubscriptions)((()=>!(0,a.isCloseBasedSymbol)(e.mainSeries().symbolInfo())),[e.mainSeries().dataEvents().symbolResolved(),e.mainSeries().dataEvents().symbolError()]);return(0,n.createOptionsPropertyDefinition)({disabled:p&&(0,l.convertFromReadonlyWVToDefinitionProperty)(p.weakReference()),option:(0,l.convertToDefinitionProperty)(e,i.priceSource,u),visible:(0,l.convertFromReadonlyWVToDefinitionProperty)(h.ownership())},{id:`${o}${c}`,title:d,options:new r.WatchedValue(t)})}},48421:(e,i,t)=>{t.d(i,{getSeriesStylePropertiesDefinitions:()=>Te});var o=t(42897),n=t(7321),r=t(91599),l=t(16905),s=t(72769),a=t(73405),c=(t(21725),t(89659)),d=t(7973),u=t(8420),p=t(28434)
|
||||
;const h=new s.TranslatedString("change color bars based on previous close",r.t(null,void 0,t(2018))),y=new s.TranslatedString("change HLC bars",r.t(null,void 0,t(51922))),f=new s.TranslatedString("change bar up color",r.t(null,void 0,t(13128))),v=new s.TranslatedString("change bar down color",r.t(null,void 0,t(67715))),g=new s.TranslatedString("change thin bars",r.t(null,void 0,t(557))),S=new s.TranslatedString("change area price source",r.t(null,void 0,t(34464))),b=new s.TranslatedString("change area line color",r.t(null,void 0,t(80792))),w=new s.TranslatedString("change area line visibility",r.t(null,void 0,t(14340))),P=new s.TranslatedString("change area line width",r.t(null,void 0,t(27089))),m=new s.TranslatedString("change area line style",r.t(null,void 0,t(35152))),T=new s.TranslatedString("change area fill color",r.t(null,void 0,t(95860))),D=new s.TranslatedString("change baseline price source",r.t(null,void 0,t(57390))),C=new s.TranslatedString("change baseline top line color",r.t(null,void 0,t(61764))),_=new s.TranslatedString("change baseline top line width",r.t(null,void 0,t(75699))),k=new s.TranslatedString("change baseline top line style",r.t(null,void 0,t(77290))),$=new s.TranslatedString("change baseline bottom line color",r.t(null,void 0,t(2672))),M=new s.TranslatedString("change baseline bottom line width",r.t(null,void 0,t(2383))),W=new s.TranslatedString("change baseline bottom line style",r.t(null,void 0,t(72774))),L=new s.TranslatedString("change baseline fill top area color",r.t(null,void 0,t(25049))),V=new s.TranslatedString("change baseline fill bottom area color",r.t(null,void 0,t(65523))),I=new s.TranslatedString("change base level",r.t(null,void 0,t(25373))),E=new s.TranslatedString("change high-low body visibility",r.t(null,void 0,t(29853))),O=new s.TranslatedString("change high-low body color",r.t(null,void 0,t(69488))),B=new s.TranslatedString("change high-low borders visibility",r.t(null,void 0,t(32836))),F=new s.TranslatedString("change high-low border color",r.t(null,void 0,t(67709))),x=new s.TranslatedString("change high-low labels visibility",r.t(null,void 0,t(50616))),A=new s.TranslatedString("change high-low labels color",r.t(null,void 0,t(7884))),N=(new s.TranslatedString("change renko wick visibility",r.t(null,void 0,t(14857))),new s.TranslatedString("change renko wick up color",r.t(null,void 0,t(57436))),new s.TranslatedString("change renko wick down color",r.t(null,void 0,t(50229))),new s.TranslatedString("change the display of real prices on price scale (instead of Heiken-Ashi price)",r.t(null,void 0,t(11371))),new s.TranslatedString("change range thin bars",r.t(null,void 0,t(40843))),new s.TranslatedString("change range bars style",r.t(null,void 0,t(79929))),
|
||||
new s.TranslatedString("change {candleType} body visibility",r.t(null,void 0,t(67522)))),H=new s.TranslatedString("change {candleType} up color",r.t(null,void 0,t(10817))),R=new s.TranslatedString("change {candleType} down color",r.t(null,void 0,t(79390))),G=new s.TranslatedString("change {candleType} border visibility",r.t(null,void 0,t(24971))),U=new s.TranslatedString("change {candleType} up border color",r.t(null,void 0,t(73789))),j=new s.TranslatedString("change {candleType} down border color",r.t(null,void 0,t(71771))),z=new s.TranslatedString("change {candleType} wick visibility",r.t(null,void 0,t(55505))),J=new s.TranslatedString("change {candleType} wick up color",r.t(null,void 0,t(16528))),q=new s.TranslatedString("change {candleType} wick down color",r.t(null,void 0,t(41609))),K=(new s.TranslatedString("change {chartType} up color",r.t(null,void 0,t(40964))),new s.TranslatedString("change {chartType} down color",r.t(null,void 0,t(79101))),new s.TranslatedString("change {chartType} projection bar up color",r.t(null,void 0,t(91136))),new s.TranslatedString("change {chartType} projection bar down color",r.t(null,void 0,t(31897))),new s.TranslatedString("change {chartType} border bar up color",r.t(null,void 0,t(4604))),new s.TranslatedString("change {chartType} border bar down color",r.t(null,void 0,t(27157))),new s.TranslatedString("change {chartType} projection border bar up color",r.t(null,void 0,t(40901))),new s.TranslatedString("change {chartType} projection border bar up color",r.t(null,void 0,t(40901))),new s.TranslatedString("change column up color",r.t(null,void 0,t(2613)))),Q=new s.TranslatedString("change column down color",r.t(null,void 0,t(20914))),X=new s.TranslatedString("change column price source",r.t(null,void 0,t(81442))),Y=new s.TranslatedString("change HLC bars color",r.t(null,void 0,t(63413))),Z=r.t(null,void 0,t(73148)),ee=r.t(null,void 0,t(39093)),ie=r.t(null,void 0,t(21944)),te=r.t(null,void 0,t(81075)),oe=r.t(null,void 0,t(18327)),ne=r.t(null,void 0,t(40949)),re=r.t(null,void 0,t(65229)),le=r.t(null,void 0,t(32807)),se=r.t(null,void 0,t(27912)),ae=r.t(null,void 0,t(58956)),ce=r.t(null,void 0,t(52028)),de=r.t(null,void 0,t(32618)),ue=r.t(null,void 0,t(62512)),pe=r.t(null,void 0,t(59972)),he=(r.t(null,void 0,t(27904)),r.t(null,void 0,t(32275)),r.t(null,void 0,t(24811)),r.t(null,void 0,t(60151)),r.t(null,void 0,t(66295)),r.t(null,void 0,t(72297)),r.t(null,void 0,t(3359))),ye=r.t(null,void 0,t(40949)),fe=r.t(null,void 0,t(65229)),ve=r.t(null,void 0,t(27150)),ge=r.t(null,void 0,t(79487)),Se=r.t(null,void 0,t(69886)),be=r.t(null,void 0,t(8986)),we=(r.t(null,void 0,t(31992)),r.t(null,void 0,t(25962)),r.t(null,void 0,t(18e3)),r.t(null,void 0,t(25962)));function Pe(e,i,t,o){return(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.barColorsOnPrevClose,h)},{id:`${t}${o}`,title:Z})}function me(e,i,t,n){const r=(0,o.removeSpaces)(t.originalText());return[(0,a.createTwoColorsPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.drawBody,N.format({
|
||||
candleType:t})),color1:(0,a.getColorDefinitionProperty)(e,i.upColor,null,H.format({candleType:t})),color2:(0,a.getColorDefinitionProperty)(e,i.downColor,null,R.format({candleType:t}))},{id:`${n}Symbol${r}CandlesColor`,title:ne}),(0,a.createTwoColorsPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.drawBorder,G.format({candleType:t})),color1:(0,a.getColorDefinitionProperty)(e,i.borderUpColor,null,U.format({candleType:t})),color2:(0,a.getColorDefinitionProperty)(e,i.borderDownColor,null,j.format({candleType:t}))},{id:`${n}Symbol${r}BordersColor`,title:re}),(0,a.createTwoColorsPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.drawWick,z.format({candleType:t})),color1:(0,a.getColorDefinitionProperty)(e,i.wickUpColor,null,J.format({candleType:t})),color2:(0,a.getColorDefinitionProperty)(e,i.wickDownColor,null,q.format({candleType:t}))},{id:`${n}Symbol${r}WickColors`,title:le})]}function Te(e,i,o,h,N,H){switch(o){case 0:return function(e,i,t){return[Pe(e,i,t,"SymbolBarStyleBarColorsOnPrevClose"),(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.dontDrawOpen,y)},{id:`${t}SymbolDontDrawOpen`,title:ee}),(0,a.createColorPropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,i.upColor,null,f)},{id:`${t}SymbolUpColor`,title:ie}),(0,a.createColorPropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,i.downColor,null,v)},{id:`${t}SymbolDownColor`,title:te}),(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.thinBars,g)},{id:`${t}SymbolBarThinBars`,title:oe})].filter(n.isExistent)}(e,i.barStyle.childs(),N);case 1:case 19:return function(e,i,o){return[Pe(e,i,o,"SymbolCandleStyleBarColorsOnPrevClose"),...me(e,i,new s.TranslatedString("candle",r.t(null,void 0,t(92370))),o)].filter(n.isExistent)}(e,1===o?i.candleStyle.childs():i.volCandlesStyle.childs(),N);case 2:const l=i.lineStyle.childs();return(0,u.lineStylePropertyDefinitions)(e,l,h.seriesPriceSources,N,H);case 14:const E=i.lineWithMarkersStyle.childs();return(0,u.lineStylePropertyDefinitions)(e,E,h.seriesPriceSources,N,H);case 15:const O=i.steplineStyle.childs();return(0,u.lineStylePropertyDefinitions)(e,O,h.seriesPriceSources,N,H);case 3:return function(e,i,t,o){return[(0,p.createPriceSourceDefinition)(e,i,t,o,"SymbolAreaPriceSource",S),(0,a.createLinePropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,i.linecolor,null,b),width:(0,a.convertToDefinitionProperty)(e,i.linewidth,P),style:(0,a.convertToDefinitionProperty)(e,i.linestyle,m)},{id:`${o}SymbolAreaLineStyle`,title:se}),(0,a.createTwoColorsPropertyDefinition)({color1:(0,a.getColorDefinitionProperty)(e,i.color1,i.transparency,T),color2:(0,a.getColorDefinitionProperty)(e,i.color2,i.transparency,T)},{id:`${o}SymbolAreaFills`,title:de})]}(e,i.areaStyle.childs(),h.seriesPriceSources,N);case 16:return function(e,i,t,o){return[(0,a.createLinePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.highLineVisible,w),color:(0,a.getColorDefinitionProperty)(e,i.highLineColor,null,b),width:(0,
|
||||
a.convertToDefinitionProperty)(e,i.highLineWidth,P)},{id:`${o}SymbolHLCAreaHighLineStyle`,title:ge}),(0,a.createLinePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.lowLineVisible,w),color:(0,a.getColorDefinitionProperty)(e,i.lowLineColor,null,b),width:(0,a.convertToDefinitionProperty)(e,i.lowLineWidth,P)},{id:`${o}SymbolHLCAreaLowLineStyle`,title:be}),(0,a.createLinePropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,i.closeLineColor,null,b),width:(0,a.convertToDefinitionProperty)(e,i.closeLineWidth,P)},{id:`${o}SymbolHLCAreaCloseLineStyle`,title:Se}),(0,a.createTwoColorsPropertyDefinition)({color1:(0,a.getColorDefinitionProperty)(e,i.highCloseFillColor,null,T),color2:(0,a.getColorDefinitionProperty)(e,i.closeLowFillColor,null,T)},{id:`${o}SymbolHLCAreaFills`,title:de})]}(e,i.hlcAreaStyle.childs(),h.seriesPriceSources,N);case 9:return me(e,i.hollowCandleStyle.childs(),new s.TranslatedString("hollow candles",r.t(null,void 0,t(54171))),N);case 10:return function(e,i,t,o){return[(0,p.createPriceSourceDefinition)(e,i,t,o,"SymbolBaseLinePriceSource",D),(0,a.createLinePropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,i.topLineColor,null,C),width:(0,a.convertToDefinitionProperty)(e,i.topLineWidth,_),style:(0,a.convertToDefinitionProperty)(e,i.topLineStyle,k)},{id:`${o}SymbolBaseLineTopLine`,title:ae}),(0,a.createLinePropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,i.bottomLineColor,null,$),width:(0,a.convertToDefinitionProperty)(e,i.bottomLineWidth,M),style:(0,a.convertToDefinitionProperty)(e,i.bottomLineStyle,W)},{id:`${o}SymbolBaseLineBottomLine`,title:ce}),(0,a.createTwoColorsPropertyDefinition)({color1:(0,a.getColorDefinitionProperty)(e,i.topFillColor1,null,L),color2:(0,a.getColorDefinitionProperty)(e,i.topFillColor2,null,L)},{id:`${o}SymbolBaseLineTopFills`,title:ue}),(0,a.createTwoColorsPropertyDefinition)({color1:(0,a.getColorDefinitionProperty)(e,i.bottomFillColor1,null,V),color2:(0,a.getColorDefinitionProperty)(e,i.bottomFillColor2,null,V)},{id:`${o}SymbolBaseLineBottomFills`,title:pe}),(0,a.createNumberPropertyDefinition)({value:(0,a.convertToDefinitionProperty)(e,i.baseLevelPercentage,I,[d.floor])},{id:`${o}SymbolBaseLevelPercentage`,title:he,type:0,min:new c.WatchedValue(0),max:new c.WatchedValue(100),step:new c.WatchedValue(1),unit:new c.WatchedValue("%")})]}(e,i.baselineStyle.childs(),h.seriesPriceSources,N);case 13:return function(e,i,t,o){return[(0,p.createPriceSourceDefinition)(e,i,t,o,"SymbolColumnPriceSource",X),Pe(e,i,o,"SymbolColumnStyleColumnColorsOnPrevClose"),(0,a.createColorPropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,i.upColor,null,K)},{id:`${o}SymbolUpColor`,title:ie}),(0,a.createColorPropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,i.downColor,null,Q)},{id:`${o}SymbolDownColor`,title:te})].filter(n.isExistent)}(e,i.columnStyle.childs(),h.seriesPriceSources,N);case 21:return function(e,i,t){return[(0,a.createColorPropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,i.color,null,Y)},{id:`${t}SymbolColor`,
|
||||
title:we}),(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.thinBars,g)},{id:`${t}SymbolBarThinBars`,title:oe})].filter(n.isExistent)}(e,i.hlcBarsStyle.childs(),N)}if(12===o&&(0,l.isFeaturesetEnabled)("chart_style_hilo")){return function(e,i,t){return[(0,a.createColorPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.drawBody,E),color:(0,a.getColorDefinitionProperty)(e,i.color,null,O)},{id:`${t}SymbolBodiesColor`,title:ye}),(0,a.createColorPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.showBorders,B),color:(0,a.getColorDefinitionProperty)(e,i.borderColor,null,F)},{id:`${t}SymbolBorderColor`,title:fe}),(0,a.createTextPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.showLabels,x),color:(0,a.getColorDefinitionProperty)(e,i.labelColor,null,A)},{id:`${t}SymbolLabels`,title:ve,isEditable:!1,isMultiLine:!1})]}(e,i.hiloStyle.childs(),N)}if(!i.hasOwnProperty("haStyle"))return[];if(h.isJapaneseChartsAvailable&&8===o){return function(e,i,o){const n=[];return n.push(Pe(e,i,o,"SymbolHAStyleBarColorsOnPrevClose"),...me(e,i,new s.TranslatedString("Heikin Ashi",r.t(null,void 0,t(48182))),o)),n}(e,i.haStyle.childs(),N)}return h.isJapaneseChartsAvailable&&(0,l.isFeaturesetEnabled)("japanese_chart_styles"),[]}},12827:(e,i,t)=>{t.d(i,{SeriesPropertyDefinitionsViewModel:()=>G,seriesPrecisionValues:()=>R});var o=t(85842),n=t(73775),r=t(91599),l=t(16905),s=t(72769),a=t(73405),c=t(73460),d=t(89659),u=t(49399),p=t(37032),h=t(48421),y=t(82372),f=t(7973);const v=new s.TranslatedString("change {inputName} property",r.t(null,void 0,t(32412)));function g(e){return e.map((e=>({value:e,title:(0,y.getTranslatedInputTitle)(e)})))}const S=new Set(["percentageLTP"]);function b(e,i,t,n,r,l,c){const u=[];return t.forEach((t=>{if(!function(e,i){return!e.isHidden&&(void 0===e.visible||function(e,i){if(!e)return!0;const t=e.split("==");return!(t.length<2)&&i[t[0]].value()===t[1]}(e.visible,i))}(t,n))return;const h=t.id;if(!n.hasOwnProperty(h))return;const b=n[h],w=function(e,i){return"style"===e.id?"Box size assignment method":"boxSize"===e.id?"Box size":i.childs().name.value()}(t,r[h]),P=(0,y.getTranslatedInputTitle)(w),m=new s.TranslatedString(w,P);if("options"in t){const i=(0,o.ensure)(t.options);u.push((0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,b,v.format({inputName:m}))},{id:`${c}${t.name}`,title:P,options:new d.WatchedValue(g(i))}))}else if("integer"!==t.type){if("float"===t.type){let o;return o=function(e,i){return!((i===(0,p.chartStyleStudyId)(4)||i===(0,p.chartStyleStudyId)(6))&&"boxSize"===e||i===(0,p.chartStyleStudyId)(5)&&"reversalAmount"===e)}(h,i)||null===l.value()?new d.WatchedValue(t.min):l,void u.push((0,a.createNumberPropertyDefinition)({value:(0,a.convertToDefinitionProperty)(e,b,v.format({inputName:m}))},{id:`${c}${t.name}`,title:P,type:1,min:o,max:new d.WatchedValue(t.max),unit:S.has(t.id)?new d.WatchedValue("%"):void 0,defval:t.defval}))}"text"!==t.type?"bool"!==t.type||u.push((0,
|
||||
a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,b,v.format({inputName:m}))},{id:`${c}${t.name}`,title:P})):u.push((0,a.createTextPropertyDefinition)({text:(0,a.convertToDefinitionProperty)(e,b,v.format({inputName:m}))},{id:`${c}${t.name}`,title:P,isEditable:!0,isMultiLine:!1}))}else u.push((0,a.createNumberPropertyDefinition)({value:(0,a.convertToDefinitionProperty)(e,b,v.format({inputName:m}),[f.floor])},{id:`${c}${t.name}`,title:P,type:0,min:new d.WatchedValue(t.min),max:new d.WatchedValue(t.max),unit:S.has(t.id)?new d.WatchedValue("%"):void 0,defval:t.defval}))})),u}var w=t(11513),P=t(20707),m=t(68657),T=t(54501),D=t(8420),C=t(28434);const _=(0,n.getLogger)("Chart.Definitions.Series"),k=(0,l.isFeaturesetEnabled)("pre_post_market_sessions"),$=new s.TranslatedString("change decimal places",r.t(null,void 0,t(52281))),M=new s.TranslatedString("change timezone",r.t(null,void 0,t(9027))),W=new s.TranslatedString("toggle inactivity gaps",r.t(null,void 0,t(47864))),L=(new s.TranslatedString("adjust data for dividends",r.t(null,void 0,t(87307))),new s.TranslatedString("use settlement as close on daily interval",r.t(null,void 0,t(15790))),new s.TranslatedString("adjust for contract changes",r.t(null,void 0,t(43431))),new s.TranslatedString("change session",r.t(null,void 0,t(23426)))),V=new s.TranslatedString("change extended hours color",r.t(null,void 0,t(26282))),I=new s.TranslatedString("change pre market color",r.t(null,void 0,t(61690))),E=new s.TranslatedString("change post market color",r.t(null,void 0,t(26008))),O=(new s.TranslatedString("change electronic trading hours",r.t(null,void 0,t(39303))),r.t(null,void 0,t(97155)),r.t(null,void 0,t(9956))),B=(r.t(null,void 0,t(4815)),r.t(null,void 0,t(18132)),r.t(null,void 0,t(831))),F=(r.t(null,void 0,t(29235)),r.t(null,void 0,t(64005))),x=r.t(null,void 0,t(69108)),A=r.t(null,void 0,t(37732)),N=r.t(null,void 0,t(10690)),H=[{priceScale:2,minMove:1,frac:!0},{priceScale:4,minMove:1,frac:!0},{priceScale:8,minMove:1,frac:!0},{priceScale:16,minMove:1,frac:!0},{priceScale:32,minMove:1,frac:!0},{priceScale:64,minMove:1,frac:!0},{priceScale:128,minMove:1,frac:!0},{priceScale:320,minMove:1,frac:!0}];function R(){const e=[{title:A,value:"default"}],i=function(e=15){const i=[];for(let t=0;t<=e;t++)i.push({priceScale:Math.pow(10,t),minMove:1,frac:!1});return i}();for(let o=0;o<i.length;o++){const n=Math.log10(i[o].priceScale),l=0===n?r.t(null,void 0,t(83975)):r.t(null,{plural:"{value} decimals",count:n,replace:{value:n.toString()}},t(25578));e.push({title:l,value:`${i[o].priceScale},${i[o].minMove},${i[o].frac}`})}for(let i=0;i<H.length;i++)e.push({title:`${H[i].minMove}/${H[i].priceScale}`,value:`${H[i].priceScale},${H[i].minMove},${H[i].frac}`});return e}class G{constructor(e,i,t,o,n,r){this._definitions=null,this._inputsSubscriptions=null,this._isDestroyed=!1,this._propertyPages=null,this._seriesMinTickWV=null,this._sessionIdOptionsWV=new d.WatchedValue([]),this._series=e,this._undoModel=i,this._model=this._undoModel.model(),this._propertyPageId=t,
|
||||
this._propertyPageName=o,this._propertyPageIcon=n,this._timezonePropertyObj=r,this._series.onStyleChanged().subscribe(this,this._updateDefinitions),this._series.properties().childs().rangeStyle.childs().barStyle.subscribe(this,this._updateDefinitions),this._series.dataEvents().symbolResolved().subscribe(this,this._updateSeriesMinTickWV),this._series.dataEvents().symbolResolved().subscribe(this,this._updateSessionIdOptionsWV),this._updateSeriesMinTickWV(),this._updateSessionIdOptionsWV()}destroy(){null!==this._propertyPages&&this._propertyPages.forEach((e=>{(0,a.destroyDefinitions)(e.definitions.value())})),this._series.onStyleChanged().unsubscribe(this,this._updateDefinitions),this._series.properties().childs().rangeStyle.childs().barStyle.unsubscribeAll(this),this._series.dataEvents().symbolResolved().unsubscribeAll(this),this._unsubscribeInputsUpdate(),this._isDestroyed=!0}propertyPages(){return null===this._propertyPages?this._getDefinitions().then((e=>{if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");return null===this._propertyPages&&(this._propertyPages=[{id:this._propertyPageId,title:this._propertyPageName,icon:this._propertyPageIcon,definitions:new d.WatchedValue(e.definitions),visible:e.visible??new d.WatchedValue(!0).readonly()}]),this._propertyPages})):Promise.resolve(this._propertyPages)}_seriesMinTick(){const e=this._series.symbolInfo();return null!==e?e.minmov/e.pricescale:null}_updateSeriesMinTickWV(){null===this._seriesMinTickWV?this._seriesMinTickWV=new d.WatchedValue(this._seriesMinTick()):this._seriesMinTickWV.setValue(this._seriesMinTick())}_updateSessionIdOptionsWV(){if(!k)return;const e=this._series.symbolInfo();if(null===e)return;const i=(e.subsessions||[]).filter((e=>!e.private)).map((e=>({title:(0,T.translateSessionDescription)(e.description),value:e.id})));this._sessionIdOptionsWV.setValue(i)}_updateDefinitions(){null!==this._definitions&&(0,a.destroyDefinitions)(this._definitions.definitions),this._definitions=null,this._createSeriesDefinitions().then((e=>{if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");(0,o.ensureNotNull)(this._propertyPages)[0].definitions.setValue(e.definitions)}))}_getDefinitions(){return null===this._definitions?this._createSeriesDefinitions():Promise.resolve(this._definitions)}_unsubscribeInputsUpdate(){null!==this._inputsSubscriptions&&(this._inputsSubscriptions.forEach((e=>{e.unsubscribeAll(this)})),this._inputsSubscriptions=null)}_subscribeInputsUpdate(e,i){this._unsubscribeInputsUpdate();const t=[];e.forEach((e=>{if(void 0!==e.visible){const o=e.visible.split("==");if(2===o.length){const e=i[o[0]];-1===t.indexOf(e)&&(e.subscribe(this,this._updateDefinitions),t.push(e))}}})),t.length>0?this._inputsSubscriptions=t:this._inputsSubscriptions=null}async _createSeriesDefinitions(){
|
||||
const e=this._series.properties().childs(),i=this._series.getInputsProperties(),n=this._series.getInputsInfoProperties(),s=e.style.value(),y=this._series.getStyleShortName(),f=c.chartStylesWithAttachedStudies.includes(s)?null:(0,p.chartStyleStudyId)(s);let v,g=null;if(null!==f){let e;try{e=await(0,u.studyMetaInfoRepository)().findById({type:"java",studyId:f});const t=(0,o.ensureNotNull)(this._seriesMinTickWV);g=b(this._undoModel,e.id,e.inputs,i,n,t,y),this._subscribeInputsUpdate(e.inputs,i)}catch(i){_.logWarn(`Find meta info for create series definitions with error - ${(0,w.errorToString)(i)}`),e=null}if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed")}else this._unsubscribeInputsUpdate();if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");if(c.chartStylesWithAttachedStudies.includes(s))throw new Error("unexpected chart style");{const i=(0,h.getSeriesStylePropertiesDefinitions)(this._undoModel,e,s,{seriesPriceSources:C.basePriceSources,isJapaneseChartsAvailable:true},"mainSeries",D.LineStylePropertyDefinitionsMode.Gradient);null!==g&&i.push(...g),v=(0,a.createPropertyDefinitionsGeneralGroup)(i,"generalSymbolStylesGroup",(0,p.getTranslatedChartStyleName)(s))}const S=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(this._undoModel,e.minTick,$),visible:(0,a.convertFromReadonlyWVToDefinitionProperty)(new d.WatchedValue(!0).ownership())},{id:`${y}SymbolMinTick`,title:F,options:new d.WatchedValue(R())}),P=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(this._undoModel,this._timezonePropertyObj.property,M)},{id:`${y}SymbolTimezone`,title:x,options:new d.WatchedValue(this._timezonePropertyObj.values)}),m=[...await this._seriesDataDefinitions(y),S,P];return(0,l.isFeaturesetEnabled)("inactivity_gaps")&&m.push((0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(this._undoModel,this._undoModel.model().properties().childs().inactivityGaps,W)},{id:`${y}InactivityGap`,title:N})),this._definitions={definitions:[v,(0,a.createPropertyDefinitionsGeneralGroup)(m,"dataModififcationGroup",r.t(null,void 0,t(32198)))]},this._definitions}async _seriesDataDefinitions(e){const i=[];if(k){const t=this._series.sessionIdProxyProperty(),o=(0,m.combineWithFilteredUpdate)(((e,i)=>!i&&(0,p.symbolHasSeveralSessions)(this._series.symbolInfo())),((e,i)=>i||!e),this._series.symbolResolvingActive().weakReference(),(0,P.createWVFromProperty)(this._series.isDWMProperty()).ownership()),n=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(this._undoModel,t,L),visible:(0,a.convertFromReadonlyWVToDefinitionProperty)(o.ownership())},{id:"sessionId",title:O,options:this._sessionIdOptionsWV});i.push(n);const r=(await this._model.sessions().promise()).graphicsInfo();let l=!1;r.backgrounds&&(l=void 0!==r.backgrounds.outOfSession);const s=await(l?this._createOutOfSessionDefinition(e):this._createPrePostMarketDefinition(e));i.push(s)
|
||||
;const c=this._createElectronicSessionDefinition(e);c&&i.push(c)}return i}_createOutOfSessionDefinition(e){const i=this._model.sessions().properties().childs().sessionHighlight.childs().backgrounds.childs().outOfSession.childs();return(0,a.createColorPropertyDefinition)({color:(0,a.getColorDefinitionProperty)(this._undoModel,i.color,i.transparency,V)},{id:`${e}SymbolExtendedHoursColors`,title:B})}_createPrePostMarketDefinition(e){const i=(0,P.createWVFromGetterAndSubscription)((()=>this._series.symbolInfo()),this._series.dataEvents().symbolResolved()),t=(0,m.combineWithFilteredUpdate)(((e,i)=>!e&&!!i&&(0,p.symbolHasPreOrPostMarket)(i)&&!(0,p.isRegularSessionId)(this._series.sessionIdProxyProperty().value(),i)),((e,i)=>e||!!i),(0,P.createWVFromProperty)(this._series.isDWMProperty()).ownership(),i.ownership()),o=this._model.sessions().properties().childs().sessionHighlight.childs(),n=o.backgrounds.childs().preMarket.childs(),r=o.backgrounds.childs().postMarket.childs();return(0,a.createTwoColorsPropertyDefinition)({color1:(0,a.getColorDefinitionProperty)(this._undoModel,n.color,n.transparency,I),color2:(0,a.getColorDefinitionProperty)(this._undoModel,r.color,r.transparency,E),visible:(0,a.convertFromReadonlyWVToDefinitionProperty)(t.ownership())},{id:`${e}SymbolExtendedHoursColors`,title:B})}_createElectronicSessionDefinition(e){return null}}}}]);
|
||||
Reference in New Issue
Block a user