@tetacom/ng-components 1.0.10 → 1.0.11
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/model/plot-band.d.ts +2 -0
- package/component/icon/icon-sprite.directive.d.ts +1 -1
- package/esm2020/component/chart/core/chart.mjs +13 -3
- package/esm2020/component/chart/model/plot-band.mjs +2 -1
- package/esm2020/component/icon/icon-sprite.directive.mjs +9 -2
- package/fesm2015/tetacom-ng-components.mjs +22 -3
- package/fesm2015/tetacom-ng-components.mjs.map +1 -1
- package/fesm2020/tetacom-ng-components.mjs +21 -3
- package/fesm2020/tetacom-ng-components.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -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 });
|
|
@@ -10930,7 +10937,12 @@ class TetaChart {
|
|
|
10930
10937
|
.attr('x', (d) => x(d.from))
|
|
10931
10938
|
.attr('y', 0)
|
|
10932
10939
|
.attr('width', (d) => Math.abs(x(d.to) - x(d.from)))
|
|
10933
|
-
.attr('fill', (d) =>
|
|
10940
|
+
.attr('fill', (d) => {
|
|
10941
|
+
if (d.image) {
|
|
10942
|
+
return `url(#${d.image})`;
|
|
10943
|
+
}
|
|
10944
|
+
return d.color;
|
|
10945
|
+
})
|
|
10934
10946
|
.style('opacity', (d) => d.opacity ?? 1)
|
|
10935
10947
|
.attr('height', plotBandHeight > 0 ? plotBandHeight : 0)
|
|
10936
10948
|
.attr('transform', `translate(0, ${this._options.bounds.top})`);
|
|
@@ -11170,7 +11182,12 @@ class TetaChart {
|
|
|
11170
11182
|
.attr('x', 0)
|
|
11171
11183
|
.attr('y', (d) => y(d.from))
|
|
11172
11184
|
.attr('width', (d) => plotBandWidth)
|
|
11173
|
-
.attr('fill', (d) =>
|
|
11185
|
+
.attr('fill', (d) => {
|
|
11186
|
+
if (d.image) {
|
|
11187
|
+
return `url(#${d.image})`;
|
|
11188
|
+
}
|
|
11189
|
+
return d.color;
|
|
11190
|
+
})
|
|
11174
11191
|
.style('opacity', (d) => d.opacity ?? 1)
|
|
11175
11192
|
.attr('height', (d) => Math.abs(y(d.to) - y(d.from)))
|
|
11176
11193
|
.attr('cursor', (d) => (d.draggable ? 'move' : 'default'));
|
|
@@ -12073,6 +12090,7 @@ class PlotBand {
|
|
|
12073
12090
|
this.to = options?.to;
|
|
12074
12091
|
this.label = options?.label;
|
|
12075
12092
|
this.color = options?.color || '#59AE501A';
|
|
12093
|
+
this.image = options?.image;
|
|
12076
12094
|
this.showGrabbers =
|
|
12077
12095
|
options?.showGrabbers != null ? options.showGrabbers : true;
|
|
12078
12096
|
this.draggable = options?.draggable != null ? options?.draggable : false;
|