@tetacom/ng-components 1.0.9 → 1.0.13
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/assets/intersect.svg +3 -0
- package/assets/lithotype-icons.svg +7 -1
- package/component/chart/chart/chart.component.d.ts +2 -1
- package/component/chart/core/chart.d.ts +2 -0
- package/component/chart/model/enum/dispatch-type.d.ts +2 -1
- package/component/chart/model/plot-band.d.ts +2 -0
- package/component/chart/model/point/base-point.d.ts +2 -0
- package/component/chart/model/point/marker-options.d.ts +9 -0
- package/component/icon/icon-sprite.directive.d.ts +1 -1
- package/component/input/text-field/text-field.component.d.ts +3 -1
- package/esm2020/component/chart/chart/chart.component.mjs +11 -4
- package/esm2020/component/chart/core/chart.mjs +23 -5
- package/esm2020/component/chart/drawer/line-drawer.mjs +38 -2
- package/esm2020/component/chart/drawer/spline-drawer.mjs +2 -1
- package/esm2020/component/chart/model/enum/dispatch-type.mjs +2 -1
- package/esm2020/component/chart/model/plot-band.mjs +2 -1
- package/esm2020/component/chart/model/point/base-point.mjs +1 -1
- package/esm2020/component/chart/model/point/marker-options.mjs +2 -0
- package/esm2020/component/icon/icon-sprite.directive.mjs +9 -2
- package/esm2020/component/input/text-field/text-field.component.mjs +15 -6
- package/esm2020/directive/only-number/only-number.directive.mjs +1 -2
- package/fesm2015/tetacom-ng-components.mjs +95 -16
- package/fesm2015/tetacom-ng-components.mjs.map +1 -1
- package/fesm2020/tetacom-ng-components.mjs +94 -15
- package/fesm2020/tetacom-ng-components.mjs.map +1 -1
- package/package.json +1 -1
- package/style/scroll.scss +9 -0
|
@@ -240,7 +240,14 @@ class IconSpriteDirective {
|
|
|
240
240
|
this.bypassInterceptors = true;
|
|
241
241
|
}
|
|
242
242
|
ngOnInit() {
|
|
243
|
-
|
|
243
|
+
if (typeof this.tetaIconSprite === 'string') {
|
|
244
|
+
this._iconService.addSprite(this.tetaIconSprite, this.bypassInterceptors);
|
|
245
|
+
}
|
|
246
|
+
if (this.tetaIconSprite instanceof Array && this.tetaIconSprite?.length) {
|
|
247
|
+
this.tetaIconSprite.forEach((sprite) => {
|
|
248
|
+
this._iconService.addSprite(sprite, this.bypassInterceptors);
|
|
249
|
+
});
|
|
250
|
+
}
|
|
244
251
|
}
|
|
245
252
|
}
|
|
246
253
|
IconSpriteDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: IconSpriteDirective, deps: [{ token: IconService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -2673,7 +2680,6 @@ class OnlyNumberDirective {
|
|
|
2673
2680
|
value = '0.0';
|
|
2674
2681
|
}
|
|
2675
2682
|
const valid = new RegExp(regex).test(value.toString());
|
|
2676
|
-
console.log(value, valid);
|
|
2677
2683
|
this._control.control.setValue(valid ? value : this._previousValue ?? 0);
|
|
2678
2684
|
}
|
|
2679
2685
|
}
|
|
@@ -3532,6 +3538,7 @@ class TextFieldComponent {
|
|
|
3532
3538
|
this.placeholder = '';
|
|
3533
3539
|
this.disabled = false;
|
|
3534
3540
|
this.onlyNumber = false;
|
|
3541
|
+
this.tabindex = 0;
|
|
3535
3542
|
this.textField = true;
|
|
3536
3543
|
this.value = '';
|
|
3537
3544
|
}
|
|
@@ -3543,6 +3550,9 @@ class TextFieldComponent {
|
|
|
3543
3550
|
this.input.nativeElement.blur();
|
|
3544
3551
|
}
|
|
3545
3552
|
}
|
|
3553
|
+
emitBlur() {
|
|
3554
|
+
this.onTouched();
|
|
3555
|
+
}
|
|
3546
3556
|
registerOnChange(fn) {
|
|
3547
3557
|
this.onChange = fn;
|
|
3548
3558
|
}
|
|
@@ -3557,17 +3567,19 @@ class TextFieldComponent {
|
|
|
3557
3567
|
this.value = input;
|
|
3558
3568
|
this._cdr.detectChanges();
|
|
3559
3569
|
}
|
|
3560
|
-
onChange(input) {
|
|
3561
|
-
|
|
3570
|
+
onChange(input) {
|
|
3571
|
+
}
|
|
3572
|
+
onTouched() {
|
|
3573
|
+
}
|
|
3562
3574
|
}
|
|
3563
3575
|
TextFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TextFieldComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3564
|
-
TextFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TextFieldComponent, selector: "teta-text-field", inputs: { placeholder: "placeholder", leftIconName: "leftIconName", disabled: "disabled", onlyNumber: "onlyNumber", invalid: "invalid" }, host: { listeners: { "click": "onFocus()" }, properties: { "class.text-field_disabled": "this.disabled", "class.text-field_invalid": "this.invalid", "class.text-field": "this.textField" } }, providers: [
|
|
3576
|
+
TextFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: TextFieldComponent, selector: "teta-text-field", inputs: { placeholder: "placeholder", leftIconName: "leftIconName", disabled: "disabled", onlyNumber: "onlyNumber", invalid: "invalid" }, host: { listeners: { "click": "onFocus()" }, properties: { "class.text-field_disabled": "this.disabled", "class.text-field_invalid": "this.invalid", "attr.tabindex": "this.tabindex", "class.text-field": "this.textField" } }, providers: [
|
|
3565
3577
|
{
|
|
3566
3578
|
provide: NG_VALUE_ACCESSOR,
|
|
3567
3579
|
useExisting: forwardRef(() => TextFieldComponent),
|
|
3568
3580
|
multi: true,
|
|
3569
3581
|
},
|
|
3570
|
-
], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<teta-icon *ngIf=\"leftIconName\" [name]=\"leftIconName\"></teta-icon>\n<input\n #input\n [ngModel]=\"value\"\n [tetaOnlyNumber]=\"onlyNumber\"\n (ngModelChange)=\"value = $event; onChange($event);\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n (keydown)=\"keyPress($event)\"\n autocomplete=\"off\"\n type=\"text\"\n/>\n<teta-icon\n *ngIf=\"value && !disabled\"\n class=\"close-icon\"\n [name]=\"'closeCircle'\"\n (click)=\"value = ''; onChange('');\"\n></teta-icon>\n", styles: [""], components: [{ type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: OnlyNumberDirective, selector: "[tetaOnlyNumber]", inputs: ["tetaOnlyNumber", "allowDecimals", "allowSign", "decimalSeparator", "commaSeparator"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3582
|
+
], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<teta-icon *ngIf=\"leftIconName\" [name]=\"leftIconName\"></teta-icon>\n<input\n #input\n [ngModel]=\"value\"\n [tetaOnlyNumber]=\"onlyNumber\"\n (ngModelChange)=\"value = $event; onChange($event);\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n (blur)=\"emitBlur()\"\n (keydown)=\"keyPress($event)\"\n autocomplete=\"off\"\n type=\"text\"\n/>\n<teta-icon\n *ngIf=\"value && !disabled\"\n class=\"close-icon\"\n [name]=\"'closeCircle'\"\n (click)=\"value = ''; onChange('');\"\n></teta-icon>\n", styles: [""], components: [{ type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: OnlyNumberDirective, selector: "[tetaOnlyNumber]", inputs: ["tetaOnlyNumber", "allowDecimals", "allowSign", "decimalSeparator", "commaSeparator"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3571
3583
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TextFieldComponent, decorators: [{
|
|
3572
3584
|
type: Component,
|
|
3573
3585
|
args: [{ selector: 'teta-text-field', providers: [
|
|
@@ -3576,7 +3588,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
3576
3588
|
useExisting: forwardRef(() => TextFieldComponent),
|
|
3577
3589
|
multi: true,
|
|
3578
3590
|
},
|
|
3579
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-icon *ngIf=\"leftIconName\" [name]=\"leftIconName\"></teta-icon>\n<input\n #input\n [ngModel]=\"value\"\n [tetaOnlyNumber]=\"onlyNumber\"\n (ngModelChange)=\"value = $event; onChange($event);\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n (keydown)=\"keyPress($event)\"\n autocomplete=\"off\"\n type=\"text\"\n/>\n<teta-icon\n *ngIf=\"value && !disabled\"\n class=\"close-icon\"\n [name]=\"'closeCircle'\"\n (click)=\"value = ''; onChange('');\"\n></teta-icon>\n", styles: [""] }]
|
|
3591
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-icon *ngIf=\"leftIconName\" [name]=\"leftIconName\"></teta-icon>\n<input\n #input\n [ngModel]=\"value\"\n [tetaOnlyNumber]=\"onlyNumber\"\n (ngModelChange)=\"value = $event; onChange($event);\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n (blur)=\"emitBlur()\"\n (keydown)=\"keyPress($event)\"\n autocomplete=\"off\"\n type=\"text\"\n/>\n<teta-icon\n *ngIf=\"value && !disabled\"\n class=\"close-icon\"\n [name]=\"'closeCircle'\"\n (click)=\"value = ''; onChange('');\"\n></teta-icon>\n", styles: [""] }]
|
|
3580
3592
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { placeholder: [{
|
|
3581
3593
|
type: Input
|
|
3582
3594
|
}], leftIconName: [{
|
|
@@ -3596,6 +3608,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
3596
3608
|
}], input: [{
|
|
3597
3609
|
type: ViewChild,
|
|
3598
3610
|
args: ['input', { static: false }]
|
|
3611
|
+
}], tabindex: [{
|
|
3612
|
+
type: HostBinding,
|
|
3613
|
+
args: ['attr.tabindex']
|
|
3599
3614
|
}], textField: [{
|
|
3600
3615
|
type: HostBinding,
|
|
3601
3616
|
args: ['class.text-field']
|
|
@@ -9967,14 +9982,16 @@ class BarDrawer {
|
|
|
9967
9982
|
var DispatchType;
|
|
9968
9983
|
(function (DispatchType) {
|
|
9969
9984
|
DispatchType["moveLine"] = "moveLine";
|
|
9985
|
+
DispatchType["movePoint"] = "movePoint";
|
|
9970
9986
|
})(DispatchType || (DispatchType = {}));
|
|
9971
9987
|
|
|
9972
9988
|
class LineDrawer {
|
|
9973
9989
|
constructor() {
|
|
9974
|
-
this.dispatch = d3.dispatch(DispatchType.moveLine);
|
|
9990
|
+
this.dispatch = d3.dispatch(DispatchType.moveLine, DispatchType.movePoint);
|
|
9975
9991
|
}
|
|
9976
9992
|
draw(series, context, scaleX, scaleY, options) {
|
|
9977
9993
|
const points = series.data;
|
|
9994
|
+
const markerPoints = points.filter((_) => _.marker);
|
|
9978
9995
|
const path = d3
|
|
9979
9996
|
.line()
|
|
9980
9997
|
.curve(series.curveType)
|
|
@@ -9982,6 +9999,41 @@ class LineDrawer {
|
|
|
9982
9999
|
.x((d) => scaleX(d.x))
|
|
9983
10000
|
.y((d) => scaleY(d.y));
|
|
9984
10001
|
const seriesIndex = options.series.findIndex((_) => _.id === series.id);
|
|
10002
|
+
if (markerPoints?.length) {
|
|
10003
|
+
const emit = (event, target) => {
|
|
10004
|
+
this.dispatch.apply(DispatchType.movePoint, {
|
|
10005
|
+
target: series,
|
|
10006
|
+
point: {
|
|
10007
|
+
...target,
|
|
10008
|
+
},
|
|
10009
|
+
event,
|
|
10010
|
+
});
|
|
10011
|
+
};
|
|
10012
|
+
context
|
|
10013
|
+
.selectAll('circle')
|
|
10014
|
+
.data(markerPoints)
|
|
10015
|
+
.enter()
|
|
10016
|
+
.append('circle')
|
|
10017
|
+
.attr('class', 'draggable-marker')
|
|
10018
|
+
.attr('r', (d) => d.marker?.style?.radius || 5)
|
|
10019
|
+
.attr('cx', function (d) {
|
|
10020
|
+
return scaleX(d.x);
|
|
10021
|
+
})
|
|
10022
|
+
.attr('cy', function (d) {
|
|
10023
|
+
return scaleY(d.y);
|
|
10024
|
+
})
|
|
10025
|
+
.style('cursor', 'pointer')
|
|
10026
|
+
.style('fill', (d) => d.marker?.style?.color || 'red')
|
|
10027
|
+
.attr('stroke', (d) => d.marker?.style?.stroke || 'none')
|
|
10028
|
+
.attr('stroke-width', (d) => d.marker?.style?.strokeWidth || 0);
|
|
10029
|
+
context.selectAll('.draggable-marker').call(d3.drag().on('drag start end', function dragged(event, d) {
|
|
10030
|
+
d.x = scaleX.invert(event.sourceEvent?.offsetX);
|
|
10031
|
+
d.y = scaleY.invert(event.sourceEvent?.offsetY);
|
|
10032
|
+
d3.select(this).attr('cx', scaleX(d.x)).attr('cy', scaleY(d.y));
|
|
10033
|
+
context.select('path').attr('d', path);
|
|
10034
|
+
emit(event, d);
|
|
10035
|
+
}));
|
|
10036
|
+
}
|
|
9985
10037
|
context
|
|
9986
10038
|
.append('path')
|
|
9987
10039
|
.attr('class', (d) => series?.drag.enable ? 'draggable' : null)
|
|
@@ -10083,6 +10135,7 @@ class SplineDrawer {
|
|
|
10083
10135
|
const path = d3
|
|
10084
10136
|
.line()
|
|
10085
10137
|
.curve(d3.curveCatmullRom)
|
|
10138
|
+
.defined((d) => d.x != null && d.y != null)
|
|
10086
10139
|
.x((d) => scaleX(d.x))
|
|
10087
10140
|
.y((d) => scaleY(d.y));
|
|
10088
10141
|
context
|
|
@@ -10446,6 +10499,7 @@ class TetaChart {
|
|
|
10446
10499
|
this.plotLinesMove$ = new Subject();
|
|
10447
10500
|
this.plotBandsMove$ = new Subject();
|
|
10448
10501
|
this.seriesMove$ = new Subject();
|
|
10502
|
+
this.pointMove$ = new Subject();
|
|
10449
10503
|
this.zoom$ = new Subject();
|
|
10450
10504
|
this._container = null;
|
|
10451
10505
|
this._width = 0;
|
|
@@ -10467,6 +10521,7 @@ class TetaChart {
|
|
|
10467
10521
|
this.plotLinesMove = this.plotLinesMove$.asObservable();
|
|
10468
10522
|
this.plotBandsMove = this.plotBandsMove$.asObservable();
|
|
10469
10523
|
this.seriesMove = this.seriesMove$.asObservable();
|
|
10524
|
+
this.pointMove = this.pointMove$.asObservable();
|
|
10470
10525
|
this.zoom = this.zoom$.asObservable();
|
|
10471
10526
|
}
|
|
10472
10527
|
redraw(options) {
|
|
@@ -10922,7 +10977,12 @@ class TetaChart {
|
|
|
10922
10977
|
.attr('x', (d) => x(d.from))
|
|
10923
10978
|
.attr('y', 0)
|
|
10924
10979
|
.attr('width', (d) => Math.abs(x(d.to) - x(d.from)))
|
|
10925
|
-
.attr('fill', (d) =>
|
|
10980
|
+
.attr('fill', (d) => {
|
|
10981
|
+
if (d.image) {
|
|
10982
|
+
return `url(#${d.image})`;
|
|
10983
|
+
}
|
|
10984
|
+
return d.color;
|
|
10985
|
+
})
|
|
10926
10986
|
.style('opacity', (d) => d.opacity ?? 1)
|
|
10927
10987
|
.attr('height', plotBandHeight > 0 ? plotBandHeight : 0)
|
|
10928
10988
|
.attr('transform', `translate(0, ${this._options.bounds.top})`);
|
|
@@ -11162,7 +11222,12 @@ class TetaChart {
|
|
|
11162
11222
|
.attr('x', 0)
|
|
11163
11223
|
.attr('y', (d) => y(d.from))
|
|
11164
11224
|
.attr('width', (d) => plotBandWidth)
|
|
11165
|
-
.attr('fill', (d) =>
|
|
11225
|
+
.attr('fill', (d) => {
|
|
11226
|
+
if (d.image) {
|
|
11227
|
+
return `url(#${d.image})`;
|
|
11228
|
+
}
|
|
11229
|
+
return d.color;
|
|
11230
|
+
})
|
|
11166
11231
|
.style('opacity', (d) => d.opacity ?? 1)
|
|
11167
11232
|
.attr('height', (d) => Math.abs(y(d.to) - y(d.from)))
|
|
11168
11233
|
.attr('cursor', (d) => (d.draggable ? 'move' : 'default'));
|
|
@@ -11305,9 +11370,15 @@ class TetaChart {
|
|
|
11305
11370
|
const emit = (event) => {
|
|
11306
11371
|
this.seriesMove$.next(event);
|
|
11307
11372
|
};
|
|
11373
|
+
const emitPoint = (event) => {
|
|
11374
|
+
this.pointMove$.next(event);
|
|
11375
|
+
};
|
|
11308
11376
|
drawer?.dispatch?.on(DispatchType.moveLine, function () {
|
|
11309
11377
|
emit(this);
|
|
11310
11378
|
});
|
|
11379
|
+
drawer?.dispatch?.on(DispatchType.movePoint, function () {
|
|
11380
|
+
emitPoint(this);
|
|
11381
|
+
});
|
|
11311
11382
|
});
|
|
11312
11383
|
}
|
|
11313
11384
|
createTooltip() {
|
|
@@ -11354,7 +11425,7 @@ class TetaChart {
|
|
|
11354
11425
|
color: d.color,
|
|
11355
11426
|
name: d.name,
|
|
11356
11427
|
});
|
|
11357
|
-
return `translate(${!isNaN(data?.x) ? foundX(data.x) : -10}, ${!isNaN(data?.y) ? foundY(data.y) : -10})`;
|
|
11428
|
+
return `translate(${!isNaN(data?.x) && data?.x != null ? foundX(data.x) : -10}, ${!isNaN(data?.y) && data?.y != null ? foundY(data.y) : -10})`;
|
|
11358
11429
|
}
|
|
11359
11430
|
if (this._options.tooltip.tracking === 'y') {
|
|
11360
11431
|
const sorted = [...d.data].sort((a, b) => d3.ascending(a.y, b.y));
|
|
@@ -11367,7 +11438,7 @@ class TetaChart {
|
|
|
11367
11438
|
color: d.color,
|
|
11368
11439
|
name: d.name,
|
|
11369
11440
|
});
|
|
11370
|
-
return `translate(${foundX(data.x)}, ${foundY(data.y)})`;
|
|
11441
|
+
return `translate(${!isNaN(data?.x) && data?.x != null ? foundX(data.x) : -10}, ${!isNaN(data?.y) && data?.y != null ? foundY(data.y) : -10})`;
|
|
11371
11442
|
}
|
|
11372
11443
|
});
|
|
11373
11444
|
if (this._options.tooltip?.format) {
|
|
@@ -11752,6 +11823,7 @@ class ChartComponent {
|
|
|
11752
11823
|
this.plotLinesMove = new EventEmitter();
|
|
11753
11824
|
this.plotBandsMove = new EventEmitter();
|
|
11754
11825
|
this.seriesMove = new EventEmitter();
|
|
11826
|
+
this.pointMove = new EventEmitter();
|
|
11755
11827
|
this.zoomChange = new EventEmitter();
|
|
11756
11828
|
this._alive = true;
|
|
11757
11829
|
this.size$ = new Subject();
|
|
@@ -11803,8 +11875,7 @@ class ChartComponent {
|
|
|
11803
11875
|
this._chart?.setZoom(this.zoom);
|
|
11804
11876
|
}
|
|
11805
11877
|
}
|
|
11806
|
-
ngOnInit() {
|
|
11807
|
-
}
|
|
11878
|
+
ngOnInit() { }
|
|
11808
11879
|
ngAfterViewInit() {
|
|
11809
11880
|
this._observer = new ResizeObserver((entries) => {
|
|
11810
11881
|
const { contentRect } = entries[0];
|
|
@@ -11850,6 +11921,11 @@ class ChartComponent {
|
|
|
11850
11921
|
this._chart.seriesMove
|
|
11851
11922
|
.pipe(takeWhile((_) => this._alive))
|
|
11852
11923
|
.subscribe((_) => this.seriesMove.emit(_));
|
|
11924
|
+
this._chart.pointMove
|
|
11925
|
+
.pipe(takeWhile((_) => this._alive))
|
|
11926
|
+
.subscribe((_) => {
|
|
11927
|
+
this.pointMove.emit(_);
|
|
11928
|
+
});
|
|
11853
11929
|
this._chart.zoom
|
|
11854
11930
|
.pipe(takeWhile((_) => this._alive), map((_) => {
|
|
11855
11931
|
this.zoomChange.emit(_);
|
|
@@ -11867,7 +11943,7 @@ class ChartComponent {
|
|
|
11867
11943
|
}
|
|
11868
11944
|
}
|
|
11869
11945
|
ChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ChartComponent, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
11870
|
-
ChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: ChartComponent, selector: "teta-chart", inputs: { zoom: "zoom", config: "config" }, outputs: { plotLinesMove: "plotLinesMove", plotBandsMove: "plotBandsMove", seriesMove: "seriesMove", zoomChange: "zoomChange" }, host: { listeners: { "click": "click($event)" } }, viewQueries: [{ propertyName: "chart", first: true, predicate: ["chart"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div [style.display]=\"hasSeriesData ? 'contents' : 'none'\">\n <div #chart class=\"chart-container\"></div>\n <div class=\"legend-container\"></div>\n</div>\n<div [style.display]=\"!hasSeriesData ? 'block' : 'none'\" class=\"chart-placeholder text-align-center\">\n <span class=\"font-body-3 color-text-40\">\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442</span>\n</div>\n\n\n", styles: [":host{display:flex;width:100%;height:100%;flex-direction:column}.chart-container{position:relative;min-height:0;flex-grow:1;flex-basis:1px}.chart-placeholder{margin:auto;width:100%}.chart-placeholder span{text-overflow:ellipsis;overflow:hidden;display:block}.legend-container{flex-shrink:0;flex-basis:1px}::ng-deep .grid line{stroke-dasharray:1,4}::ng-deep .tooltip-chart{padding:8px 12px;border-radius:2px}::ng-deep .legend{grid-gap:8px;padding-bottom:5px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-evenly}::ng-deep .legend .item{display:flex;align-items:center;cursor:pointer}::ng-deep .legend .item .swatch{width:10px;height:10px}::ng-deep .legend .item .line{width:12px;height:2px}::ng-deep .legend .item .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-left:5px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11946
|
+
ChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: ChartComponent, selector: "teta-chart", inputs: { zoom: "zoom", config: "config" }, outputs: { plotLinesMove: "plotLinesMove", plotBandsMove: "plotBandsMove", seriesMove: "seriesMove", pointMove: "pointMove", zoomChange: "zoomChange" }, host: { listeners: { "click": "click($event)" } }, viewQueries: [{ propertyName: "chart", first: true, predicate: ["chart"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div [style.display]=\"hasSeriesData ? 'contents' : 'none'\">\n <div #chart class=\"chart-container\"></div>\n <div class=\"legend-container\"></div>\n</div>\n<div [style.display]=\"!hasSeriesData ? 'block' : 'none'\" class=\"chart-placeholder text-align-center\">\n <span class=\"font-body-3 color-text-40\">\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442</span>\n</div>\n\n\n", styles: [":host{display:flex;width:100%;height:100%;flex-direction:column}.chart-container{position:relative;min-height:0;flex-grow:1;flex-basis:1px}.chart-placeholder{margin:auto;width:100%}.chart-placeholder span{text-overflow:ellipsis;overflow:hidden;display:block}.legend-container{flex-shrink:0;flex-basis:1px}::ng-deep .grid line{stroke-dasharray:1,4}::ng-deep .tooltip-chart{padding:8px 12px;border-radius:2px}::ng-deep .legend{grid-gap:8px;padding-bottom:5px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-evenly}::ng-deep .legend .item{display:flex;align-items:center;cursor:pointer}::ng-deep .legend .item .swatch{width:10px;height:10px}::ng-deep .legend .item .line{width:12px;height:2px}::ng-deep .legend .item .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-left:5px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11871
11947
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: ChartComponent, decorators: [{
|
|
11872
11948
|
type: Component,
|
|
11873
11949
|
args: [{ selector: 'teta-chart', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [style.display]=\"hasSeriesData ? 'contents' : 'none'\">\n <div #chart class=\"chart-container\"></div>\n <div class=\"legend-container\"></div>\n</div>\n<div [style.display]=\"!hasSeriesData ? 'block' : 'none'\" class=\"chart-placeholder text-align-center\">\n <span class=\"font-body-3 color-text-40\">\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442</span>\n</div>\n\n\n", styles: [":host{display:flex;width:100%;height:100%;flex-direction:column}.chart-container{position:relative;min-height:0;flex-grow:1;flex-basis:1px}.chart-placeholder{margin:auto;width:100%}.chart-placeholder span{text-overflow:ellipsis;overflow:hidden;display:block}.legend-container{flex-shrink:0;flex-basis:1px}::ng-deep .grid line{stroke-dasharray:1,4}::ng-deep .tooltip-chart{padding:8px 12px;border-radius:2px}::ng-deep .legend{grid-gap:8px;padding-bottom:5px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-evenly}::ng-deep .legend .item{display:flex;align-items:center;cursor:pointer}::ng-deep .legend .item .swatch{width:10px;height:10px}::ng-deep .legend .item .line{width:12px;height:2px}::ng-deep .legend .item .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-left:5px}\n"] }]
|
|
@@ -11881,6 +11957,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
11881
11957
|
type: Output
|
|
11882
11958
|
}], seriesMove: [{
|
|
11883
11959
|
type: Output
|
|
11960
|
+
}], pointMove: [{
|
|
11961
|
+
type: Output
|
|
11884
11962
|
}], zoomChange: [{
|
|
11885
11963
|
type: Output
|
|
11886
11964
|
}], chart: [{
|
|
@@ -12065,6 +12143,7 @@ class PlotBand {
|
|
|
12065
12143
|
this.to = options?.to;
|
|
12066
12144
|
this.label = options?.label;
|
|
12067
12145
|
this.color = options?.color || '#59AE501A';
|
|
12146
|
+
this.image = options?.image;
|
|
12068
12147
|
this.showGrabbers =
|
|
12069
12148
|
options?.showGrabbers != null ? options.showGrabbers : true;
|
|
12070
12149
|
this.draggable = options?.draggable != null ? options?.draggable : false;
|