Release v31.0.0 (from 028f81fbf6fef55e9694e5df4bd5106cc04c188a)

This commit is contained in:
jenkins
2026-03-05 21:03:46 +00:00
committed by Edward Dewhurst
parent 6fe5436603
commit c8eebb69a4
3622 changed files with 7663 additions and 6956 deletions

View File

@@ -0,0 +1,3 @@
"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6800],{43825:(e,t,i)=>{i.r(t),i.d(t,{LineToolInfoLine:()=>h,LineToolInfoLineConst:()=>a});var r=i(47004),s=i(90450),n=i(45124);const o={...s.nonThemedFactoryDefaults,statsPosition:n.StatsPosition.Center,alwaysShowStats:!0,showPriceRange:!0,showPercentPriceRange:!0,showPipsPriceRange:!0,showBarsRange:!0,showDateTimeRange:!0,showDistance:!0,showAngle:!0};class l extends s.LineToolTrendLinePropertiesImpl{static create(e,t,i){return s.LineToolTrendLinePropertiesImpl._createWithDefaults("linetoolinfoline",e,o,s.themedFactoryDefaults,t,i)}}var a;!function(e){e.ConstructorName="LineToolInfoLine",e.Name="Info Line"}(a||(a={}));class h extends r.LineToolTrendLine{constructor(e,t,i,r){super(e,t??h.createProperties(e.backgroundTheme().spawnOwnership()),i,r)}pointsCount(){return 2}name(){return"Info Line"}static createProperties(e,t){const i=l.create(e,t);return this._configureProperties(i),i}}},90450:(e,t,i)=>{i.d(t,{LineToolTrendLinePropertiesImpl:()=>S,nonThemedFactoryDefaults:()=>T,themedFactoryDefaults:()=>x});var r=i(11284),s=i(85842),n=i(25432),o=i(47097),l=i(95385),a=i(68459),h=i(45124),d=i(62565),c=i(88483),u=i(5829),p=i(93445),_=i(86371),g=i(17567);const P=(0,r.getHexColorByName)("color-tv-blue-500"),T={intervalsVisibilities:{...c.intervalsVisibilitiesDefaults},linewidth:u.DEFAULT_LINE_TOOL_LINE_WIDTH,linestyle:d.LineStyle.Solid,extendLeft:!1,extendRight:!1,leftEnd:a.LineEnd.Normal,rightEnd:a.LineEnd.Normal,horzLabelsAlign:l.HorizontalAlign.Center,vertLabelsAlign:l.VerticalAlign.Bottom,fontsize:14,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceLabels:!1,showPriceRange:!1,showPercentPriceRange:!1,showPipsPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:h.StatsPosition.Right},w={linecolor:P,textcolor:P},x=new Map([[o.StdTheme.Light,w],[o.StdTheme.Dark,w]]),f=(0,p.extractThemedColors)((0,s.ensureDefined)(x.get(o.StdTheme.Light)),(0,s.ensureDefined)(x.get(o.StdTheme.Dark))),m=(0,p.extractAllPropertiesKeys)((0,s.ensureDefined)(x.get(o.StdTheme.Light))),v=(0,p.extractAllPropertiesKeys)(T),L=[...m,...v,"text"],b=[...new Set([...L,...n.commonLineToolPropertiesStateKeys])];class S extends _.LineDataSourceProperty{constructor(e){super(e),this.hasChild("text")||this.addProperty("text","")}static create(e,t,i){return S._createWithDefaults("linetooltrendline",e,T,x,t,i)}static _createWithDefaults(e,t,i,r,s,n){return new this({defaultName:e,factoryDefaultsSupplier:()=>(0,g.factoryDefaultsForCurrentTheme)(i,r),nonThemedDefaultsKeys:v,themedDefaultsKeys:m,allStateKeys:b,themedColors:f,templateKeys:L,replaceThemedColorsOnThemeChange:!0,state:s,theme:t,useUserPreferences:n})}}},47004:(e,t,i)=>{i.r(t),i.d(t,{Consts:()=>m,LineToolTrendLine:()=>L});var r=i(85842),s=i(33993),n=i(63212),o=i(91569),l=i(57415),a=i(91069),h=i(78792),d=i(61208),c=i(16965),u=i(79083),p=i(45124),_=i(71367),g=i(6353),P=i(14491),T=i(83077),w=i(35428),x=i(7955);class f extends w.TrendToolWithStatsPaneView{
constructor(e,t,i,r,s,n){super(e,t,r,s,n),this._trendRenderer=new g.TrendLineRenderer,this._pane=i,this._labelRenderer=new c.LineToolTextRenderer(void 0,new T.HitTestResult(T.HitTarget.MovePoint,(0,x.inplaceEditHandlers)(this._tryActivateEditMode.bind(this,null)))),this._source.setAdditionalCursorData((()=>({color:this._source.editableTextStyle().cursorColor,rotationPoint:this._labelRenderer.rotation()??void 0,...this._labelRenderer.getTextInfo()})),this._labelRenderer.positionToCoordinate.bind(this._labelRenderer))}_getPointsForStats(){return[this._points[0],(0,r.ensureNotNull)(this._middlePoint),this._points[1]]}_updateImpl(e){this._renderer.clear(),this._invalidated=!1;const t=this._getOwnerSource();if(!t||this._pane&&!this._pane.sourcesByGroup().hasLineSource(this._source))return;const i=t.priceScale(),r=this._model.timeScale();if(!i||i.isEmpty()||r.isEmpty())return;const s=this._model.timeScale().visibleBarsStrictRange();if(null===s)return;const n=this._source.points();if(n.length<2)return;const o=n[0],c=n[1],g=this._source.properties().childs();if(o.index<s.firstBar()&&c.index<s.firstBar()&&!g.extendLeft.value()&&!g.extendRight.value())return;if(super._updateImpl(e),this._points.length<2)return;g.showPriceRange.value()||g.showPercentPriceRange.value()||g.showPipsPriceRange.value()||g.showBarsRange.value()||g.showDateTimeRange.value()||g.showDistance.value()||g.showAngle.value()||(this._label=null,this._labelData&&(this._labelData.text=""));const w=this._points[0],x=this._points[1],{mediaSize:{width:f,height:m}}=e;let v;const L=g.text.value(),b=this._isTextEditMode(),S=this._placeHolderMode(!0);if(L||S||b){const e=w.x<x.x?w:x,t=e===w?x:w,i=g.vertLabelsAlign.value(),r=g.horzLabelsAlign.value();let s;s="left"===r?e.clone():"right"===r?t.clone():new l.Point((w.x+x.x)/2,(w.y+x.y)/2);const n=Math.atan((t.y-e.y)/(t.x-e.x));this._labelRenderer.setData({points:[s],text:this._textData(),color:this._textColor(),vertAlign:i,horzAlign:r,font:P.CHART_FONT_FAMILY,offsetX:0,offsetY:0,bold:g.bold.value(),italic:g.italic.value(),fontsize:g.fontsize.value(),forceTextAlign:!0,angle:n,decorator:S?u.PlusTextRendererDecorator.instance():void 0,...this._inplaceTextHighlight()}),this._labelRenderer.setCursorType(this._textCursorType()),this._renderer.append(this._labelRenderer),this._needLabelExclusionPath(this._labelRenderer)&&(v=(0,d.getTextBoundaries)(this._labelRenderer,f,m)??void 0),this._labelRenderer.isOutOfScreen(f,m)?this.closeTextEditor():this._updateInplaceText(this._labelRenderer.getTextInfo())}const R=g.linecolor.value(),y={points:this._points,color:R,linewidth:g.linewidth.value(),linestyle:g.linestyle.value(),extendleft:g.extendLeft.value(),extendright:g.extendRight.value(),leftend:g.leftEnd.value(),rightend:g.rightEnd.value(),excludeBoundaries:v?[v]:void 0};this._trendRenderer.setData(y),this._renderer.insert(this._trendRenderer,0);const D=(0,l.box)(new l.Point(0,0),new l.Point(f,m));let A=!1;g.statsPosition.value()===p.StatsPosition.Auto&&(A=(0,l.equalPoints)(w,x)?!(0,a.pointInBox)(w,D):null===(0,
h.intersectLineSegmentAndBox)((0,l.lineSegment)(w,x),D));if(((this.isHoveredSource()||this.isSelectedSource())&&this.isEditMode()||g.alwaysShowStats.value())&&!A&&2===this._points.length&&this._renderer.append(this._updateAndReturnStatsRenderer(e)),this._middlePoint&&!b){const e=(this.isHoveredSource()||this.isSelectedSource())&&g.showMiddlePoint.value();this._renderer.append(new _.SelectionRenderer({points:[{point:this._middlePoint}],bgColors:this._lineAnchorColors([this._middlePoint]),color:R,visible:e&&this.areAnchorsVisible(),hittestResult:T.HitTarget.Regular,barSpacing:0}))}this.addAnchors(this._renderer),y.points.length>=2&&this._addAlertRenderer(this._renderer,y.points)}}var m,v=i(90450);!function(e){e[e.PointsCount=2]="PointsCount",e.Name="Trend Line"}(m||(m={}));class L extends n.InplaceTextLineDataSource{constructor(e,t,i,r){super(e,t??L.createProperties(e.backgroundTheme().spawnOwnership()),i,r)}destroy(){super.destroy()}pointsCount(){return 2}name(){return"Trend Line"}canHasAlert(){return!0}showPriceLabels(){return this._properties.childs().showPriceLabels.value()}createPriceAxisView(e){return new o.LineToolPriceAxisView(this,{pointIndex:e,backgroundPropertyGetter:()=>this.showPriceLabels()?this._properties.childs().linecolor.value():null})}isForcedDrawPriceAxisLabel(){return this.showPriceLabels()}template(){const e=super.template();return e.text=this.properties().childs().text.value(),e}editableTextProperties(){const e=this.properties().childs();return{text:e.text,textColor:e.textcolor}}supportsTargetSignature(){return!1}isMultiPaneAvailable(){return this.supportsTargetSignature()}isMultiPaneEnabled(){return null!==this.targetSignature().value()}snapTo45DegreesAvailable(){return!0}static createProperties(e,t,i){return L._createPropertiesImpl(e,t,i)}_getPaneViews(e){return null!==this.targetSignature().value()||this._paneViews.has(e)||e&&!e.hasDataSource(this)||this._paneViews.set(e,[new f(this,this._model,e??null,this._openTextEditor.bind(this),this._closeTextEditor.bind(this))]),super._getPaneViews(e)}_getAlertPlots(){const e=this._linePointsToAlertPlot(this._points,null,this._properties.childs().extendLeft.value(),this._properties.childs().extendRight.value());return null===e?[]:[e]}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(1982),i.e(7686),i.e(2428),i.e(3920),i.e(9328)]).then(i.bind(i,44252))).TrendLineDefinitionsViewModel}_applyTemplateImpl(e){super._applyTemplateImpl(e),this.properties().childs().text.setValue(e.text||"")}_createSignatureSourcePaneViews(e){return[new f(this,this._model,null,this._openTextEditor.bind(this),this._closeTextEditor.bind(this),e)]}static _createPropertiesImpl(e,t,i){const r=v.LineToolTrendLinePropertiesImpl.create(e,t,i);return this._configureProperties(r),r}static _configureProperties(e){super._configureProperties(e),e.addChild("textsColors",new s.LineToolColorsProperty([(0,r.ensureDefined)(e.child("textcolor"))]))}}}}]);