@unovis/angular 1.3.4-beta.2 → 1.4.0-beta.0
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/dist/lib/bundles/unovis-angular.umd.js +53 -6
- package/dist/lib/bundles/unovis-angular.umd.js.map +1 -1
- package/dist/lib/components/annotations/annotations.component.d.ts +26 -0
- package/dist/lib/components/area/area.component.d.ts +1 -1
- package/dist/lib/containers/single-container/single-container.component.d.ts +3 -1
- package/dist/lib/containers/xy-container/xy-container.component.d.ts +3 -1
- package/dist/lib/esm2015/components/annotations/annotations.component.js +37 -0
- package/dist/lib/esm2015/components/area/area.component.js +1 -1
- package/dist/lib/esm2015/containers/single-container/single-container.component.js +9 -4
- package/dist/lib/esm2015/containers/xy-container/xy-container.component.js +9 -3
- package/dist/lib/fesm2015/unovis-angular.js +48 -6
- package/dist/lib/fesm2015/unovis-angular.js.map +1 -1
- package/dist/lib/package.json +2 -2
- package/package.json +2 -2
|
@@ -425,6 +425,44 @@
|
|
|
425
425
|
type: i0.Input
|
|
426
426
|
}] } });
|
|
427
427
|
|
|
428
|
+
// !!! This code was automatically generated. You should not change it !!!
|
|
429
|
+
var VisAnnotationsComponent = /** @class */ (function () {
|
|
430
|
+
function VisAnnotationsComponent() {
|
|
431
|
+
}
|
|
432
|
+
VisAnnotationsComponent.prototype.ngAfterViewInit = function () {
|
|
433
|
+
this.component = new ts.Annotations(this.getConfig());
|
|
434
|
+
};
|
|
435
|
+
VisAnnotationsComponent.prototype.ngOnChanges = function (changes) {
|
|
436
|
+
var _a, _b;
|
|
437
|
+
(_a = this.component) === null || _a === void 0 ? void 0 : _a.setConfig(this.getConfig());
|
|
438
|
+
(_b = this.componentContainer) === null || _b === void 0 ? void 0 : _b.render();
|
|
439
|
+
};
|
|
440
|
+
VisAnnotationsComponent.prototype.getConfig = function () {
|
|
441
|
+
var items = this.items;
|
|
442
|
+
var config = { items: items };
|
|
443
|
+
var keys = Object.keys(config);
|
|
444
|
+
keys.forEach(function (key) {
|
|
445
|
+
if (config[key] === undefined)
|
|
446
|
+
delete config[key];
|
|
447
|
+
});
|
|
448
|
+
return config;
|
|
449
|
+
};
|
|
450
|
+
return VisAnnotationsComponent;
|
|
451
|
+
}());
|
|
452
|
+
VisAnnotationsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VisAnnotationsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
453
|
+
VisAnnotationsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: VisAnnotationsComponent, selector: "vis-annotations", inputs: { items: "items" }, providers: [{ provide: VisGenericComponent, useExisting: VisAnnotationsComponent }], usesOnChanges: true, ngImport: i0__namespace, template: '', isInline: true });
|
|
454
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VisAnnotationsComponent, decorators: [{
|
|
455
|
+
type: i0.Component,
|
|
456
|
+
args: [{
|
|
457
|
+
selector: 'vis-annotations',
|
|
458
|
+
template: '',
|
|
459
|
+
// eslint-disable-next-line no-use-before-define
|
|
460
|
+
providers: [{ provide: VisGenericComponent, useExisting: VisAnnotationsComponent }],
|
|
461
|
+
}]
|
|
462
|
+
}], propDecorators: { items: [{
|
|
463
|
+
type: i0.Input
|
|
464
|
+
}] } });
|
|
465
|
+
|
|
428
466
|
var VisXYContainerComponent = /** @class */ (function () {
|
|
429
467
|
function VisXYContainerComponent() {
|
|
430
468
|
/** Constraint the minimum value of the Y scale domain.
|
|
@@ -480,13 +518,14 @@
|
|
|
480
518
|
(_b = this.chart) === null || _b === void 0 ? void 0 : _b.updateContainer(this.getConfig());
|
|
481
519
|
};
|
|
482
520
|
VisXYContainerComponent.prototype.getConfig = function () {
|
|
483
|
-
var _a;
|
|
521
|
+
var _a, _b;
|
|
484
522
|
var _c = this, duration = _c.duration, margin = _c.margin, padding = _c.padding, scaleByDomain = _c.scaleByDomain, autoMargin = _c.autoMargin, width = _c.width, height = _c.height, xScale = _c.xScale, xDomain = _c.xDomain, xDomainMinConstraint = _c.xDomainMinConstraint, xDomainMaxConstraint = _c.xDomainMaxConstraint, xRange = _c.xRange, yScale = _c.yScale, yDomain = _c.yDomain, yDomainMinConstraint = _c.yDomainMinConstraint, yDomainMaxConstraint = _c.yDomainMaxConstraint, yRange = _c.yRange, yDirection = _c.yDirection, ariaLabel = _c.ariaLabel;
|
|
485
523
|
var visComponents = this.visComponents.toArray().map(function (d) { return d.component; });
|
|
486
524
|
var crosshair = visComponents.find(function (c) { return c instanceof ts.Crosshair; });
|
|
487
525
|
var tooltip = (_a = this.tooltipComponent) === null || _a === void 0 ? void 0 : _a.component;
|
|
488
526
|
var xAxis = visComponents.find(function (c) { var _a; return c instanceof ts.Axis && ((_a = c === null || c === void 0 ? void 0 : c.config) === null || _a === void 0 ? void 0 : _a.type) === 'x'; });
|
|
489
527
|
var yAxis = visComponents.find(function (c) { var _a; return c instanceof ts.Axis && ((_a = c === null || c === void 0 ? void 0 : c.config) === null || _a === void 0 ? void 0 : _a.type) === 'y'; });
|
|
528
|
+
var annotations = (_b = this.annotationsComponent) === null || _b === void 0 ? void 0 : _b.component;
|
|
490
529
|
var components = visComponents.filter(function (c) { return !(c instanceof ts.Crosshair) && !(c instanceof ts.Tooltip) && !(c instanceof ts.Axis); });
|
|
491
530
|
return {
|
|
492
531
|
components: components,
|
|
@@ -499,6 +538,7 @@
|
|
|
499
538
|
yAxis: yAxis,
|
|
500
539
|
tooltip: tooltip,
|
|
501
540
|
crosshair: crosshair,
|
|
541
|
+
annotations: annotations,
|
|
502
542
|
scaleByDomain: scaleByDomain,
|
|
503
543
|
autoMargin: autoMargin,
|
|
504
544
|
xScale: xScale,
|
|
@@ -528,7 +568,7 @@
|
|
|
528
568
|
return VisXYContainerComponent;
|
|
529
569
|
}());
|
|
530
570
|
VisXYContainerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VisXYContainerComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
531
|
-
VisXYContainerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: VisXYContainerComponent, selector: "vis-xy-container", inputs: { width: "width", height: "height", xScale: "xScale", xDomain: "xDomain", xDomainMinConstraint: "xDomainMinConstraint", xDomainMaxConstraint: "xDomainMaxConstraint", xRange: "xRange", yScale: "yScale", yDomain: "yDomain", yDomainMinConstraint: "yDomainMinConstraint", yDomainMaxConstraint: "yDomainMaxConstraint", yRange: "yRange", yDirection: "yDirection", preventEmptyDomain: "preventEmptyDomain", duration: "duration", margin: "margin", padding: "padding", scaleByDomain: "scaleByDomain", autoMargin: "autoMargin", ariaLabel: "ariaLabel", data: "data" }, queries: [{ propertyName: "tooltipComponent", first: true, predicate: VisTooltipComponent, descendants: true }, { propertyName: "visComponents", predicate: VisXYComponent }], viewQueries: [{ propertyName: "containerRef", first: true, predicate: ["container"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div #container class=\"unovis-xy-container\">\n <ng-content></ng-content>\n </div>", isInline: true, styles: [".unovis-xy-container { width: 100%; height: 100%; position: relative; }"] });
|
|
571
|
+
VisXYContainerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: VisXYContainerComponent, selector: "vis-xy-container", inputs: { width: "width", height: "height", xScale: "xScale", xDomain: "xDomain", xDomainMinConstraint: "xDomainMinConstraint", xDomainMaxConstraint: "xDomainMaxConstraint", xRange: "xRange", yScale: "yScale", yDomain: "yDomain", yDomainMinConstraint: "yDomainMinConstraint", yDomainMaxConstraint: "yDomainMaxConstraint", yRange: "yRange", yDirection: "yDirection", preventEmptyDomain: "preventEmptyDomain", duration: "duration", margin: "margin", padding: "padding", scaleByDomain: "scaleByDomain", autoMargin: "autoMargin", ariaLabel: "ariaLabel", data: "data" }, queries: [{ propertyName: "tooltipComponent", first: true, predicate: VisTooltipComponent, descendants: true }, { propertyName: "annotationsComponent", first: true, predicate: VisAnnotationsComponent, descendants: true }, { propertyName: "visComponents", predicate: VisXYComponent }], viewQueries: [{ propertyName: "containerRef", first: true, predicate: ["container"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div #container class=\"unovis-xy-container\">\n <ng-content></ng-content>\n </div>", isInline: true, styles: [".unovis-xy-container { width: 100%; height: 100%; position: relative; }"] });
|
|
532
572
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VisXYContainerComponent, decorators: [{
|
|
533
573
|
type: i0.Component,
|
|
534
574
|
args: [{
|
|
@@ -545,6 +585,9 @@
|
|
|
545
585
|
}], tooltipComponent: [{
|
|
546
586
|
type: i0.ContentChild,
|
|
547
587
|
args: [VisTooltipComponent]
|
|
588
|
+
}], annotationsComponent: [{
|
|
589
|
+
type: i0.ContentChild,
|
|
590
|
+
args: [VisAnnotationsComponent]
|
|
548
591
|
}], width: [{
|
|
549
592
|
type: i0.Input
|
|
550
593
|
}], height: [{
|
|
@@ -627,11 +670,12 @@
|
|
|
627
670
|
(_b = this.chart) === null || _b === void 0 ? void 0 : _b.updateContainer(this.getConfig());
|
|
628
671
|
};
|
|
629
672
|
VisSingleContainerComponent.prototype.getConfig = function () {
|
|
630
|
-
var _a, _b;
|
|
631
|
-
var
|
|
673
|
+
var _a, _b, _c;
|
|
674
|
+
var _d = this, width = _d.width, height = _d.height, duration = _d.duration, margin = _d.margin, ariaLabel = _d.ariaLabel;
|
|
632
675
|
var component = (_a = this.visComponent) === null || _a === void 0 ? void 0 : _a.component;
|
|
633
676
|
var tooltip = (_b = this.tooltipComponent) === null || _b === void 0 ? void 0 : _b.component;
|
|
634
|
-
|
|
677
|
+
var annotations = (_c = this.annotationsComponent) === null || _c === void 0 ? void 0 : _c.component;
|
|
678
|
+
return { width: width, height: height, duration: duration, margin: margin, component: component, tooltip: tooltip, ariaLabel: ariaLabel, annotations: annotations };
|
|
635
679
|
};
|
|
636
680
|
VisSingleContainerComponent.prototype.ngOnDestroy = function () {
|
|
637
681
|
this.chart.destroy();
|
|
@@ -639,7 +683,7 @@
|
|
|
639
683
|
return VisSingleContainerComponent;
|
|
640
684
|
}());
|
|
641
685
|
VisSingleContainerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VisSingleContainerComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
642
|
-
VisSingleContainerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: VisSingleContainerComponent, selector: "vis-single-container", inputs: { width: "width", height: "height", margin: "margin", duration: "duration", ariaLabel: "ariaLabel", data: "data" }, queries: [{ propertyName: "visComponent", first: true, predicate: VisCoreComponent, descendants: true }, { propertyName: "tooltipComponent", first: true, predicate: VisTooltipComponent, descendants: true }], viewQueries: [{ propertyName: "containerRef", first: true, predicate: ["container"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div #container class=\"unovis-single-container\">\n <ng-content></ng-content>\n </div>", isInline: true, styles: [".unovis-single-container { width: 100%; height: 100%; position: relative; }"] });
|
|
686
|
+
VisSingleContainerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: VisSingleContainerComponent, selector: "vis-single-container", inputs: { width: "width", height: "height", margin: "margin", duration: "duration", ariaLabel: "ariaLabel", data: "data" }, queries: [{ propertyName: "visComponent", first: true, predicate: VisCoreComponent, descendants: true }, { propertyName: "tooltipComponent", first: true, predicate: VisTooltipComponent, descendants: true }, { propertyName: "annotationsComponent", first: true, predicate: VisAnnotationsComponent, descendants: true }], viewQueries: [{ propertyName: "containerRef", first: true, predicate: ["container"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div #container class=\"unovis-single-container\">\n <ng-content></ng-content>\n </div>", isInline: true, styles: [".unovis-single-container { width: 100%; height: 100%; position: relative; }"] });
|
|
643
687
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VisSingleContainerComponent, decorators: [{
|
|
644
688
|
type: i0.Component,
|
|
645
689
|
args: [{
|
|
@@ -656,6 +700,9 @@
|
|
|
656
700
|
}], tooltipComponent: [{
|
|
657
701
|
type: i0.ContentChild,
|
|
658
702
|
args: [VisTooltipComponent]
|
|
703
|
+
}], annotationsComponent: [{
|
|
704
|
+
type: i0.ContentChild,
|
|
705
|
+
args: [VisAnnotationsComponent]
|
|
659
706
|
}], width: [{
|
|
660
707
|
type: i0.Input
|
|
661
708
|
}], height: [{
|