@visuallyjs/browser-ui-angular 1.2.5 → 1.2.7
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/esm2022/index.mjs +2 -0
- package/esm2022/lib/browser-ui-angular.module.mjs +14 -4
- package/esm2022/lib/charts/area.chart.component.mjs +12 -9
- package/esm2022/lib/charts/bar.chart.component.mjs +12 -9
- package/esm2022/lib/charts/bubble.chart.component.mjs +12 -9
- package/esm2022/lib/charts/column.chart.component.mjs +12 -9
- package/esm2022/lib/charts/line.chart.component.mjs +12 -9
- package/esm2022/lib/charts/pie.chart.component.mjs +12 -9
- package/esm2022/lib/charts/sankey.chart.component.mjs +36 -10
- package/esm2022/lib/charts/scatter.chart.component.mjs +12 -9
- package/esm2022/lib/charts/series.based.chart.component.mjs +43 -10
- package/esm2022/lib/charts/xy.chart.component.mjs +12 -9
- package/esm2022/lib/controls-component.mjs +2 -2
- package/esm2022/lib/edge.property.mappings.inspector.component.mjs +69 -0
- package/esm2022/lib/edge.type.picker.component.mjs +1 -0
- package/esm2022/lib/shape-properties-inspector.component.mjs +214 -0
- package/esm2022/lib/shape.component.mjs +6 -2
- package/fesm2022/visuallyjs-browser-ui-angular.mjs +465 -93
- package/fesm2022/visuallyjs-browser-ui-angular.mjs.map +1 -1
- package/index.d.ts +2 -0
- package/lib/browser-ui-angular.module.d.ts +4 -2
- package/lib/charts/area.chart.component.d.ts +7 -7
- package/lib/charts/bar.chart.component.d.ts +7 -7
- package/lib/charts/bubble.chart.component.d.ts +7 -7
- package/lib/charts/column.chart.component.d.ts +8 -7
- package/lib/charts/line.chart.component.d.ts +7 -7
- package/lib/charts/pie.chart.component.d.ts +7 -7
- package/lib/charts/sankey.chart.component.d.ts +12 -9
- package/lib/charts/scatter.chart.component.d.ts +7 -7
- package/lib/charts/series.based.chart.component.d.ts +9 -6
- package/lib/charts/xy.chart.component.d.ts +7 -7
- package/lib/controls-component.d.ts +1 -5
- package/lib/diagram-palette-component.d.ts +1 -1
- package/lib/edge.property.mappings.inspector.component.d.ts +38 -0
- package/lib/palette.component.d.ts +9 -9
- package/lib/shape-properties-inspector.component.d.ts +31 -0
- package/lib/shape.component.d.ts +6 -2
- package/lib/shape.palette.component.d.ts +3 -3
- package/package.json +2 -2
- package/visuallyjs-browser-ui-angular.tgz +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, Injectable, inject, ElementRef, effect, Input, Component, ChangeDetectorRef, computed, Directive, input, EventEmitter, ViewContainerRef, NgZone, reflectComponentType, Output, TemplateRef, ViewChild, ContentChild, NgModule } from '@angular/core';
|
|
2
|
+
import { signal, Injectable, inject, ElementRef, effect, Input, Component, ChangeDetectorRef, computed, Directive, input, EventEmitter, ViewContainerRef, NgZone, reflectComponentType, Output, untracked, TemplateRef, ViewChild, ContentChild, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { log, Surface, Paper, MiniviewPlugin, EVENT_EDGE_UPDATED, EVENT_NODE_UPDATED, EVENT_GROUP_UPDATED, EVENT_PORT_UPDATED, EVENT_ZOOM, BrowserUIModel, OVERLAY_TYPE_CUSTOM, ELEMENT_DIV, isGroup, extend, renderSurface, EVENT_PORT_ADDED, EVENT_DATA_LOAD_END, EVENT_EDGE_ADDED, EVENT_EDGE_REMOVED, EVENT_INTERNAL_CONNECTION, ShapeLibraryDefaults, ShapePalette, convertToMultilineText, DEFAULT_LABEL_FILL_RATIO, LassoPlugin, EVENT_SURFACE_MODE_CHANGED, EVENT_UNDOREDO_UPDATE, TRUE, FALSE, EVENT_SELECT, EVENT_DESELECT, EVENT_SELECTION_CLEARED, SURFACE_MODE_PAN, SURFACE_MODE_SELECT, supportsPathEditing, PAN_VIEW_BOX, PAN_PATH, LASSO_VIEW_BOX, LASSO_PATH, ZOOM_TO_FIT_VIEW_BOX, ZOOM_TO_FIT_PATH, ZOOM_IN_OUT_VIEW_BOX, ZOOM_IN_PATH, ZOOM_OUT_PATH, UNDO_VIEW_BOX, UNDO_PATH, REDO_VIEW_BOX, REDO_PATH, CLASS_CONTROLS_RESET_SELECTION, RESET_SELECTION_VIEW_BOX, RESET_SELECTION_PATH, CLEAR_VIEW_BOX, CLEAR_PATH, INSPECTOR_CONTEXT_EDGE_PROPERTY_MAPPINGS, EdgeTypePicker, Palette, SvgExportUI, ImageExportUI, CLASS_CONTROLS, CLASS_EXPORT_CONTROLS, INSPECTOR_CONTEXT_RECENT_COLORS, EVENT_CONTEXT_UPDATE, CLASS_COLOR_PICKER, CLASS_COLOR_PICKER_SWATCHES, CLASS_COLOR_PICKER_SWATCH, createDiagram, ColumnChart, BarChart, DiagramPalette, CategoryValueChart, LineChart, AreaChart, PieChart, ScatterChart, BubbleChart, SankeyChart, PopupHandler, CLASS_SURFACE_POPUP, renderPaper, BackgroundPlugin, SimpleBackground, TiledBackground, GeneratedGridBackground, Edge, Node, Group, Port, Inspector, EVENT_DATA_UPDATED, EVENT_GRAPH_CLEARED } from '@visuallyjs/browser-ui';
|
|
5
|
+
import { log, Surface, Paper, MiniviewPlugin, EVENT_EDGE_UPDATED, EVENT_NODE_UPDATED, EVENT_GROUP_UPDATED, EVENT_PORT_UPDATED, EVENT_ZOOM, BrowserUIModel, OVERLAY_TYPE_CUSTOM, ELEMENT_DIV, isGroup, extend, renderSurface, EVENT_PORT_ADDED, EVENT_DATA_LOAD_END, EVENT_EDGE_ADDED, EVENT_EDGE_REMOVED, EVENT_INTERNAL_CONNECTION, ShapeLibraryDefaults, ShapePalette, convertToMultilineText, DEFAULT_LABEL_FILL_RATIO, LassoPlugin, EVENT_SURFACE_MODE_CHANGED, EVENT_UNDOREDO_UPDATE, TRUE, FALSE, EVENT_SELECT, EVENT_DESELECT, EVENT_SELECTION_CLEARED, SURFACE_MODE_PAN, SURFACE_MODE_SELECT, supportsPathEditing, PAN_VIEW_BOX, PAN_PATH, LASSO_VIEW_BOX, LASSO_PATH, ZOOM_TO_FIT_VIEW_BOX, ZOOM_TO_FIT_PATH, ZOOM_IN_OUT_VIEW_BOX, ZOOM_IN_PATH, ZOOM_OUT_PATH, UNDO_VIEW_BOX, UNDO_PATH, REDO_VIEW_BOX, REDO_PATH, CLASS_CONTROLS_RESET_SELECTION, RESET_SELECTION_VIEW_BOX, RESET_SELECTION_PATH, CLEAR_VIEW_BOX, CLEAR_PATH, INSPECTOR_CONTEXT_EDGE_PROPERTY_MAPPINGS, EdgeTypePicker, Palette, SvgExportUI, ImageExportUI, CLASS_CONTROLS, CLASS_EXPORT_CONTROLS, INSPECTOR_CONTEXT_RECENT_COLORS, EVENT_CONTEXT_UPDATE, CLASS_COLOR_PICKER, CLASS_COLOR_PICKER_SWATCHES, CLASS_COLOR_PICKER_SWATCH, createDiagram, ColumnChart, BarChart, DiagramPalette, CategoryValueChart, LineChart, AreaChart, PieChart, ScatterChart, BubbleChart, SankeyChart, PopupHandler, CLASS_SURFACE_POPUP, renderPaper, BackgroundPlugin, SimpleBackground, TiledBackground, GeneratedGridBackground, isNode, isString, Edge, Node, Group, Port, Inspector, EVENT_DATA_UPDATED, EVENT_GRAPH_CLEARED } from '@visuallyjs/browser-ui';
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class VisuallyJsService {
|
|
@@ -1115,7 +1115,7 @@ class ShapeComponent {
|
|
|
1115
1115
|
const lbl = this.shapeLibrary.renderShapeLabel(this.obj, this.labelProperty, this.labelStrokeWidth, this.label, this.obj.color || "#000000", this.obj.color || "#000000", this.font);
|
|
1116
1116
|
svg.appendChild(lbl);
|
|
1117
1117
|
if (this.multilineLabels !== false) {
|
|
1118
|
-
convertToMultilineText(lbl, this.label || this.obj[this.labelProperty] || "", this.width * this.labelFillRatio);
|
|
1118
|
+
convertToMultilineText(lbl, this.label || this.obj[this.labelProperty] || "", this.width * this.labelFillRatio, this.labelPosition);
|
|
1119
1119
|
}
|
|
1120
1120
|
}
|
|
1121
1121
|
}
|
|
@@ -1129,6 +1129,8 @@ class ShapeComponent {
|
|
|
1129
1129
|
this.multilineLabels = true;
|
|
1130
1130
|
|
|
1131
1131
|
this.labelFillRatio = DEFAULT_LABEL_FILL_RATIO;
|
|
1132
|
+
|
|
1133
|
+
this.labelPosition = "center";
|
|
1132
1134
|
this.$el = inject(ElementRef);
|
|
1133
1135
|
this.$vjs = inject(VisuallyJsService);
|
|
1134
1136
|
this.ui = this.$vjs.ui;
|
|
@@ -1144,7 +1146,7 @@ class ShapeComponent {
|
|
|
1144
1146
|
this._render();
|
|
1145
1147
|
}
|
|
1146
1148
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ShapeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1147
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ShapeComponent, selector: "vjs-shape", inputs: { obj: "obj", width: "width", height: "height", showLabels: "showLabels", labelProperty: "labelProperty", labelStrokeWidth: "labelStrokeWidth", label: "label", multilineLabels: "multilineLabels", labelFillRatio: "labelFillRatio", font: "font" }, usesOnChanges: true, ngImport: i0, template: `<svg:svg
|
|
1149
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ShapeComponent, selector: "vjs-shape", inputs: { obj: "obj", width: "width", height: "height", showLabels: "showLabels", labelProperty: "labelProperty", labelStrokeWidth: "labelStrokeWidth", label: "label", multilineLabels: "multilineLabels", labelFillRatio: "labelFillRatio", labelPosition: "labelPosition", font: "font" }, usesOnChanges: true, ngImport: i0, template: `<svg:svg
|
|
1148
1150
|
[attr.stroke-width]="obj.outlineWidth || 2"
|
|
1149
1151
|
attr.fill="{{ obj.fill }}"
|
|
1150
1152
|
attr.stroke="{{ obj.outline }}"
|
|
@@ -1184,6 +1186,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1184
1186
|
type: Input
|
|
1185
1187
|
}], labelFillRatio: [{
|
|
1186
1188
|
type: Input
|
|
1189
|
+
}], labelPosition: [{
|
|
1190
|
+
type: Input
|
|
1187
1191
|
}], font: [{
|
|
1188
1192
|
type: Input
|
|
1189
1193
|
}] } });
|
|
@@ -1293,13 +1297,13 @@ class ControlsComponent {
|
|
|
1293
1297
|
}
|
|
1294
1298
|
}
|
|
1295
1299
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ControlsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1296
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ControlsComponent, selector: "vjs-controls", inputs: { undoRedo: "undoRedo", zoomToExtents: "zoomToExtents", zoomButtons: "zoomButtons", clear: "clear", clearMessage: "clearMessage", buttons: "buttons", orientation: "orientation" }, ngImport: i0, template: "<div class=\"vjs-controls\" [attr.data-vjs-orientation]=\"orientation\">\n <i *ngIf=\"showPanButton\" class=\"vjs-pan-mode vjs-selected-mode\" data-mode=\"pan\" title=\"Pan Mode\" (click)=\"panMode()\">\n <svg viewBox=\"0 0 24 24\" stroke=\"currentColor\" fill=\"none\">\n <path d=\"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5 M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5 M14 5.5a1.5 1.5 0 0 1 3 0v6.5 M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47\"></path>\n </svg>\n </i>\n <i *ngIf=\"showLassoButton\" class=\"vjs-select-mode\" data-mode=\"select\" title=\"Select Mode\" (click)=\"selectMode()\">\n <svg fill=\"currentColor\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path d=\"M18.2848192,17.5777124 L20.8535534,20.1464466 C21.0488155,20.3417088 21.0488155,20.6582912 20.8535534,20.8535534 C20.6582912,21.0488155 20.3417088,21.0488155 20.1464466,20.8535534 L17.5777124,18.2848192 L15.9160251,20.7773501 C15.6899572,21.116452 15.1749357,21.0571624 15.0318354,20.6755617 L12.0318354,12.6755617 C11.8811067,12.2736185 12.2736185,11.8811067 12.6755617,12.0318354 L20.6755617,15.0318354 C21.0571624,15.1749357 21.116452,15.6899572 20.7773501,15.9160251 L18.2848192,17.5777124 L18.2848192,17.5777124 Z M17.2312404,17.0782479 L19.4104716,15.6254271 L13.3544004,13.3544004 L15.6254271,19.4104716 L17.0782479,17.2312404 C17.0974475,17.2011742 17.1201804,17.1727128 17.1464466,17.1464466 C17.1727128,17.1201804 17.2011742,17.0974475 17.2312404,17.0782479 L17.2312404,17.0782479 Z M5.5,3 C5.77614237,3 6,3.22385763 6,3.5 C6,3.77614237 5.77614237,4 5.5,4 C4.67157288,4 4,4.67157288 4,5.5 C4,5.77614237 3.77614237,6 3.5,6 C3.22385763,6 3,5.77614237 3,5.5 C3,4.11928813 4.11928813,3 5.5,3 Z M8.5,4 C8.22385763,4 8,3.77614237 8,3.5 C8,3.22385763 8.22385763,3 8.5,3 L10.5,3 C10.7761424,3 11,3.22385763 11,3.5 C11,3.77614237 10.7761424,4 10.5,4 L8.5,4 Z M13.5,4 C13.2238576,4 13,3.77614237 13,3.5 C13,3.22385763 13.2238576,3 13.5,3 L15.5,3 C15.7761424,3 16,3.22385763 16,3.5 C16,3.77614237 15.7761424,4 15.5,4 L13.5,4 Z M8.5,21 C8.22385763,21 8,20.7761424 8,20.5 C8,20.2238576 8.22385763,20 8.5,20 L10.5,20 C10.7761424,20 11,20.2238576 11,20.5 C11,20.7761424 10.7761424,21 10.5,21 L8.5,21 Z M3,8.5 C3,8.22385763 3.22385763,8 3.5,8 C3.77614237,8 4,8.22385763 4,8.5 L4,10.5 C4,10.7761424 3.77614237,11 3.5,11 C3.22385763,11 3,10.7761424 3,10.5 L3,8.5 Z M3,13.5 C3,13.2238576 3.22385763,13 3.5,13 C3.77614237,13 4,13.2238576 4,13.5 L4,15.5 C4,15.7761424 3.77614237,16 3.5,16 C3.22385763,16 3,15.7761424 3,15.5 L3,13.5 Z M3,18.5 C3,18.2238576 3.22385763,18 3.5,18 C3.77614237,18 4,18.2238576 4,18.5 C4,19.3284271 4.67157288,20 5.5,20 C5.77614237,20 6,20.2238576 6,20.5 C6,20.7761424 5.77614237,21 5.5,21 C4.11928813,21 3,19.8807119 3,18.5 Z M21,10.5 C21,10.7761424 20.7761424,11 20.5,11 C20.2238576,11 20,10.7761424 20,10.5 L20,8.5 C20,8.22385763 20.2238576,8 20.5,8 C20.7761424,8 21,8.22385763 21,8.5 L21,10.5 Z M21,5.5 C21,5.77614237 20.7761424,6 20.5,6 C20.2238576,6 20,5.77614237 20,5.5 C20,4.67157288 19.3284271,4 18.5,4 C18.2238576,4 18,3.77614237 18,3.5 C18,3.22385763 18.2238576,3 18.5,3 C19.8807119,3 21,4.11928813 21,5.5 Z\"></path>\n </svg>\n </i>\n\n <i *ngFor=\"let button of modeButtons\" data-mode=\"{{ button.mode }}\" class=\"{{ button.class }}\" title=\"{{ button.title }}\"></i>\n\n <i *ngIf=\"zoomToExtents\" class=\"vjs-zoom-to-fit\" data-reset=\"true\"title=\"Zoom To Fit\" (click)=\"zoomToFit()\">\n <svg viewBox=\"0 0 32 30\" stroke=\"currentColor\" fill=\"currentColor\"><path d=\"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z\"></path></svg>\n </i>\n\n <i *ngIf=\"zoomButtons\" class=\"vjs-zoom-in\" data-zoom-in=\"true\" title=\"Zoom In\" (click)=\"zoomIn()\">\n <svg viewBox=\"0 0 32 32\" stroke=\"currentColor\" fill=\"currentColor\"><path d=\"M 13 6 L 13 20 M 6 13 L 20 13 M 22,22 L 30,30 M1, 13 a 12,12 0 1,0 24,0 a 12,12 0 1,0 -24,0\"></path></svg>\n </i>\n\n <i *ngIf=\"zoomButtons\" class=\"vjs-zoom-out\" data-zoom-out=\"true\" title=\"Zoom Out\" (click)=\"zoomOut()\">\n <svg viewBox=\"0 0 32 32\" stroke=\"currentColor\" fill=\"currentColor\"><path d=\"M 6 13 L 20 13 M 22,22 L 30,30 M1, 13 a 12,12 0 1,0 24,0 a 12,12 0 1,0 -24,0\"></path></svg>\n </i>\n\n <i *ngIf=\"undoRedo\" class=\"vjs-undo\" data-undo=\"true\" title=\"Undo last action\" (click)=\"undo()\">\n <svg viewBox=\"0 0 24 24\" stroke=\"currentColor\" fill=\"none\"><path d=\"M3 7v6h6 M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13\" stroke-width=\"2\"></path></svg>\n </i>\n <i *ngIf=\"undoRedo\" class=\"vjs-redo\" data-redo=\"true\" title=\"Redo last action\" (click)=\"redo()\">\n <svg viewBox=\"0 0 24 24\" stroke=\"currentColor\" fill=\"none\"><path d=\"M21 7v6h-6 M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3L21 13\" stroke-width=\"2\"></path></svg>\n </i>\n <i class=\"vjs-controls-reset-selection\" title=\"Clear selection\" (click)=\"resetSelection()\">\n <svg viewBox=\"0 0 24 24\" stroke=\"currentColor\" fill=\"currentColor\"><path d=\"M2,5 V2 H5 M9,2 H11 M13,2 H15 M19,2 H22 V5 M22,9 V11 M22,13 V15 M22,19 V22 H19 M15,22 H13 M11,22 H9 M5,22 H2 V19 M2,15 V13 M2,11 V9 M9,9 L15,15 M15,9 L9,15\"></path></svg>\n </i>\n <i *ngIf=\"clear\" class=\"vjs-clear-dataset\" [title]=\"clearMessage\" (click)=\"doClear()\">\n <svg viewBox=\"0 0 24 24\" stroke=\"currentColor\" fill=\"currentColor\"><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"></path></svg>\n </i>\n <i *ngFor=\"let button of otherButtons\" class=\"{{ button.class }}\" title=\"{{ button.title }}\"></i>\n </div>", isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
1300
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ControlsComponent, selector: "vjs-controls", inputs: { undoRedo: "undoRedo", zoomToExtents: "zoomToExtents", zoomButtons: "zoomButtons", clear: "clear", clearMessage: "clearMessage", buttons: "buttons", orientation: "orientation" }, ngImport: i0, template: "<div class=\"vjs-controls\" [attr.data-vjs-orientation]=\"orientation\" can-undo=\"false\" can-redo=\"false\">\n <i *ngIf=\"showPanButton\" class=\"vjs-pan-mode vjs-selected-mode\" data-mode=\"pan\" title=\"Pan Mode\" (click)=\"panMode()\">\n <svg viewBox=\"0 0 24 24\" stroke=\"currentColor\" fill=\"none\">\n <path d=\"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5 M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5 M14 5.5a1.5 1.5 0 0 1 3 0v6.5 M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47\"></path>\n </svg>\n </i>\n <i *ngIf=\"showLassoButton\" class=\"vjs-select-mode\" data-mode=\"select\" title=\"Select Mode\" (click)=\"selectMode()\">\n <svg fill=\"currentColor\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path d=\"M18.2848192,17.5777124 L20.8535534,20.1464466 C21.0488155,20.3417088 21.0488155,20.6582912 20.8535534,20.8535534 C20.6582912,21.0488155 20.3417088,21.0488155 20.1464466,20.8535534 L17.5777124,18.2848192 L15.9160251,20.7773501 C15.6899572,21.116452 15.1749357,21.0571624 15.0318354,20.6755617 L12.0318354,12.6755617 C11.8811067,12.2736185 12.2736185,11.8811067 12.6755617,12.0318354 L20.6755617,15.0318354 C21.0571624,15.1749357 21.116452,15.6899572 20.7773501,15.9160251 L18.2848192,17.5777124 L18.2848192,17.5777124 Z M17.2312404,17.0782479 L19.4104716,15.6254271 L13.3544004,13.3544004 L15.6254271,19.4104716 L17.0782479,17.2312404 C17.0974475,17.2011742 17.1201804,17.1727128 17.1464466,17.1464466 C17.1727128,17.1201804 17.2011742,17.0974475 17.2312404,17.0782479 L17.2312404,17.0782479 Z M5.5,3 C5.77614237,3 6,3.22385763 6,3.5 C6,3.77614237 5.77614237,4 5.5,4 C4.67157288,4 4,4.67157288 4,5.5 C4,5.77614237 3.77614237,6 3.5,6 C3.22385763,6 3,5.77614237 3,5.5 C3,4.11928813 4.11928813,3 5.5,3 Z M8.5,4 C8.22385763,4 8,3.77614237 8,3.5 C8,3.22385763 8.22385763,3 8.5,3 L10.5,3 C10.7761424,3 11,3.22385763 11,3.5 C11,3.77614237 10.7761424,4 10.5,4 L8.5,4 Z M13.5,4 C13.2238576,4 13,3.77614237 13,3.5 C13,3.22385763 13.2238576,3 13.5,3 L15.5,3 C15.7761424,3 16,3.22385763 16,3.5 C16,3.77614237 15.7761424,4 15.5,4 L13.5,4 Z M8.5,21 C8.22385763,21 8,20.7761424 8,20.5 C8,20.2238576 8.22385763,20 8.5,20 L10.5,20 C10.7761424,20 11,20.2238576 11,20.5 C11,20.7761424 10.7761424,21 10.5,21 L8.5,21 Z M3,8.5 C3,8.22385763 3.22385763,8 3.5,8 C3.77614237,8 4,8.22385763 4,8.5 L4,10.5 C4,10.7761424 3.77614237,11 3.5,11 C3.22385763,11 3,10.7761424 3,10.5 L3,8.5 Z M3,13.5 C3,13.2238576 3.22385763,13 3.5,13 C3.77614237,13 4,13.2238576 4,13.5 L4,15.5 C4,15.7761424 3.77614237,16 3.5,16 C3.22385763,16 3,15.7761424 3,15.5 L3,13.5 Z M3,18.5 C3,18.2238576 3.22385763,18 3.5,18 C3.77614237,18 4,18.2238576 4,18.5 C4,19.3284271 4.67157288,20 5.5,20 C5.77614237,20 6,20.2238576 6,20.5 C6,20.7761424 5.77614237,21 5.5,21 C4.11928813,21 3,19.8807119 3,18.5 Z M21,10.5 C21,10.7761424 20.7761424,11 20.5,11 C20.2238576,11 20,10.7761424 20,10.5 L20,8.5 C20,8.22385763 20.2238576,8 20.5,8 C20.7761424,8 21,8.22385763 21,8.5 L21,10.5 Z M21,5.5 C21,5.77614237 20.7761424,6 20.5,6 C20.2238576,6 20,5.77614237 20,5.5 C20,4.67157288 19.3284271,4 18.5,4 C18.2238576,4 18,3.77614237 18,3.5 C18,3.22385763 18.2238576,3 18.5,3 C19.8807119,3 21,4.11928813 21,5.5 Z\"></path>\n </svg>\n </i>\n\n <i *ngFor=\"let button of modeButtons\" data-mode=\"{{ button.mode }}\" class=\"{{ button.class }}\" title=\"{{ button.title }}\"></i>\n\n <i *ngIf=\"zoomToExtents\" class=\"vjs-zoom-to-fit\" data-reset=\"true\"title=\"Zoom To Fit\" (click)=\"zoomToFit()\">\n <svg viewBox=\"0 0 32 30\" stroke=\"currentColor\" fill=\"currentColor\"><path d=\"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z\"></path></svg>\n </i>\n\n <i *ngIf=\"zoomButtons\" class=\"vjs-zoom-in\" data-zoom-in=\"true\" title=\"Zoom In\" (click)=\"zoomIn()\">\n <svg viewBox=\"0 0 32 32\" stroke=\"currentColor\" fill=\"currentColor\"><path d=\"M 13 6 L 13 20 M 6 13 L 20 13 M 22,22 L 30,30 M1, 13 a 12,12 0 1,0 24,0 a 12,12 0 1,0 -24,0\"></path></svg>\n </i>\n\n <i *ngIf=\"zoomButtons\" class=\"vjs-zoom-out\" data-zoom-out=\"true\" title=\"Zoom Out\" (click)=\"zoomOut()\">\n <svg viewBox=\"0 0 32 32\" stroke=\"currentColor\" fill=\"currentColor\"><path d=\"M 6 13 L 20 13 M 22,22 L 30,30 M1, 13 a 12,12 0 1,0 24,0 a 12,12 0 1,0 -24,0\"></path></svg>\n </i>\n\n <i *ngIf=\"undoRedo\" class=\"vjs-undo\" data-undo=\"true\" title=\"Undo last action\" (click)=\"undo()\">\n <svg viewBox=\"0 0 24 24\" stroke=\"currentColor\" fill=\"none\"><path d=\"M3 7v6h6 M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13\" stroke-width=\"2\"></path></svg>\n </i>\n <i *ngIf=\"undoRedo\" class=\"vjs-redo\" data-redo=\"true\" title=\"Redo last action\" (click)=\"redo()\">\n <svg viewBox=\"0 0 24 24\" stroke=\"currentColor\" fill=\"none\"><path d=\"M21 7v6h-6 M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3L21 13\" stroke-width=\"2\"></path></svg>\n </i>\n <i class=\"vjs-controls-reset-selection\" title=\"Clear selection\" (click)=\"resetSelection()\">\n <svg viewBox=\"0 0 24 24\" stroke=\"currentColor\" fill=\"currentColor\"><path d=\"M2,5 V2 H5 M9,2 H11 M13,2 H15 M19,2 H22 V5 M22,9 V11 M22,13 V15 M22,19 V22 H19 M15,22 H13 M11,22 H9 M5,22 H2 V19 M2,15 V13 M2,11 V9 M9,9 L15,15 M15,9 L9,15\"></path></svg>\n </i>\n <i *ngIf=\"clear\" class=\"vjs-clear-dataset\" [title]=\"clearMessage\" (click)=\"doClear()\">\n <svg viewBox=\"0 0 24 24\" stroke=\"currentColor\" fill=\"currentColor\"><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"></path></svg>\n </i>\n <i *ngFor=\"let button of otherButtons\" class=\"{{ button.class }}\" title=\"{{ button.title }}\"></i>\n </div>", isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
1297
1301
|
}
|
|
1298
1302
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ControlsComponent, decorators: [{
|
|
1299
1303
|
type: Component,
|
|
1300
1304
|
args: [{
|
|
1301
1305
|
selector: "vjs-controls",
|
|
1302
|
-
template: `<div class="vjs-controls" [attr.data-vjs-orientation]="orientation">
|
|
1306
|
+
template: `<div class="vjs-controls" [attr.data-vjs-orientation]="orientation" ${ATTRIBUTE_CAN_UNDO}="false" ${ATTRIBUTE_CAN_REDO}="false">
|
|
1303
1307
|
<i *ngIf="showPanButton" class="vjs-pan-mode ${CLASS_SELECTED_MODE}" data-mode="${SURFACE_MODE_PAN}" title="Pan Mode" (click)="panMode()">
|
|
1304
1308
|
<svg viewBox="${PAN_VIEW_BOX}" stroke="currentColor" fill="none">
|
|
1305
1309
|
<path d="${PAN_PATH}"></path>
|
|
@@ -1375,6 +1379,7 @@ class EdgeTypePickerComponent {
|
|
|
1375
1379
|
if (inspector != null) {
|
|
1376
1380
|
this.initialised = true;
|
|
1377
1381
|
inspector.onChange(() => {
|
|
1382
|
+
this.edgeTypePicker.reset();
|
|
1378
1383
|
this.edgeTypePicker.select(this.propertyName, inspector.getValue(this.propertyName));
|
|
1379
1384
|
});
|
|
1380
1385
|
const current = inspector.getValue(this.propertyName) || '';
|
|
@@ -1735,7 +1740,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1735
1740
|
class SeriesBasedChartComponent {
|
|
1736
1741
|
_init(dataSource, data, url) {
|
|
1737
1742
|
this.$ngZone.runOutsideAngular(() => {
|
|
1738
|
-
const o = Object.assign({}, this.options);
|
|
1743
|
+
const o = Object.assign({}, this.options());
|
|
1739
1744
|
Object.assign(o, { dataSource });
|
|
1740
1745
|
this.chart = this.createChart(this.$el.nativeElement, o);
|
|
1741
1746
|
if (data) {
|
|
@@ -1747,6 +1752,45 @@ class SeriesBasedChartComponent {
|
|
|
1747
1752
|
});
|
|
1748
1753
|
}
|
|
1749
1754
|
constructor() {
|
|
1755
|
+
|
|
1756
|
+
this.data = input();
|
|
1757
|
+
|
|
1758
|
+
this.url = input();
|
|
1759
|
+
|
|
1760
|
+
this.options = input();
|
|
1761
|
+
this._dataEffect = effect(() => {
|
|
1762
|
+
const currentData = this.data();
|
|
1763
|
+
if (currentData) {
|
|
1764
|
+
if (this.chart) {
|
|
1765
|
+
this.chart.load({ data: currentData });
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
});
|
|
1769
|
+
this._urlEffect = effect(() => {
|
|
1770
|
+
const currentUrl = this.url();
|
|
1771
|
+
if (currentUrl) {
|
|
1772
|
+
// Respond to changes in the url here.
|
|
1773
|
+
// For example, if you need to reload the model with new data:
|
|
1774
|
+
if (this.chart) {
|
|
1775
|
+
this.chart.load({ url: currentUrl });
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
});
|
|
1779
|
+
this._optionsEffect = effect(() => {
|
|
1780
|
+
this.options(); // track options
|
|
1781
|
+
if (this.chart) {
|
|
1782
|
+
// options have changed, recreate the chart
|
|
1783
|
+
untracked(() => {
|
|
1784
|
+
this.chart.destroy();
|
|
1785
|
+
if (this.useModel) {
|
|
1786
|
+
this._init(this.$vjs.model(), null, null);
|
|
1787
|
+
}
|
|
1788
|
+
else {
|
|
1789
|
+
this._init(null, this.data(), this.url());
|
|
1790
|
+
}
|
|
1791
|
+
});
|
|
1792
|
+
}
|
|
1793
|
+
});
|
|
1750
1794
|
this.$el = inject(ElementRef);
|
|
1751
1795
|
this.$ngZone = inject(NgZone);
|
|
1752
1796
|
this.$vjs = inject(VisuallyJsService);
|
|
@@ -1762,7 +1806,7 @@ class SeriesBasedChartComponent {
|
|
|
1762
1806
|
|
|
1763
1807
|
ngAfterViewInit() {
|
|
1764
1808
|
if (!this.useModel) {
|
|
1765
|
-
this._init(null, this.data, this.url);
|
|
1809
|
+
this._init(null, this.data(), this.url());
|
|
1766
1810
|
}
|
|
1767
1811
|
}
|
|
1768
1812
|
ngOnDestroy() {
|
|
@@ -1773,23 +1817,26 @@ class SeriesBasedChartComponent {
|
|
|
1773
1817
|
}
|
|
1774
1818
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SeriesBasedChartComponent, decorators: [{
|
|
1775
1819
|
type: Injectable
|
|
1776
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
1777
|
-
type: Input
|
|
1778
|
-
}], url: [{
|
|
1779
|
-
type: Input
|
|
1780
|
-
}], options: [{
|
|
1781
|
-
type: Input
|
|
1782
|
-
}], useModel: [{
|
|
1820
|
+
}], ctorParameters: () => [], propDecorators: { useModel: [{
|
|
1783
1821
|
type: Input
|
|
1784
1822
|
}] } });
|
|
1785
1823
|
|
|
1786
1824
|
|
|
1787
1825
|
class ColumnChartComponent extends SeriesBasedChartComponent {
|
|
1826
|
+
constructor() {
|
|
1827
|
+
super(...arguments);
|
|
1828
|
+
|
|
1829
|
+
this.data = input();
|
|
1830
|
+
|
|
1831
|
+
this.url = input();
|
|
1832
|
+
|
|
1833
|
+
this.options = input();
|
|
1834
|
+
}
|
|
1788
1835
|
createChart(el, options) {
|
|
1789
1836
|
return new ColumnChart(el, options);
|
|
1790
1837
|
}
|
|
1791
1838
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ColumnChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1792
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1839
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: ColumnChartComponent, selector: "vjs-column-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, useModel: { classPropertyName: "useModel", publicName: "useModel", isSignal: false, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `<div></div>`, isInline: true }); }
|
|
1793
1840
|
}
|
|
1794
1841
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ColumnChartComponent, decorators: [{
|
|
1795
1842
|
type: Component,
|
|
@@ -1797,23 +1844,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1797
1844
|
selector: "vjs-column-chart",
|
|
1798
1845
|
template: `<div></div>`
|
|
1799
1846
|
}]
|
|
1800
|
-
}], propDecorators: {
|
|
1801
|
-
type: Input
|
|
1802
|
-
}], url: [{
|
|
1803
|
-
type: Input
|
|
1804
|
-
}], options: [{
|
|
1805
|
-
type: Input
|
|
1806
|
-
}], useModel: [{
|
|
1847
|
+
}], propDecorators: { useModel: [{
|
|
1807
1848
|
type: Input
|
|
1808
1849
|
}] } });
|
|
1809
1850
|
|
|
1810
1851
|
|
|
1811
1852
|
class BarChartComponent extends SeriesBasedChartComponent {
|
|
1853
|
+
constructor() {
|
|
1854
|
+
super(...arguments);
|
|
1855
|
+
|
|
1856
|
+
this.data = input();
|
|
1857
|
+
|
|
1858
|
+
this.url = input();
|
|
1859
|
+
|
|
1860
|
+
this.options = input();
|
|
1861
|
+
}
|
|
1812
1862
|
createChart(el, options) {
|
|
1813
1863
|
return new BarChart(el, options);
|
|
1814
1864
|
}
|
|
1815
1865
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BarChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1816
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1866
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: BarChartComponent, selector: "vjs-bar-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, useModel: { classPropertyName: "useModel", publicName: "useModel", isSignal: false, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `<div></div>`, isInline: true }); }
|
|
1817
1867
|
}
|
|
1818
1868
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BarChartComponent, decorators: [{
|
|
1819
1869
|
type: Component,
|
|
@@ -1821,13 +1871,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1821
1871
|
selector: "vjs-bar-chart",
|
|
1822
1872
|
template: `<div></div>`
|
|
1823
1873
|
}]
|
|
1824
|
-
}], propDecorators: {
|
|
1825
|
-
type: Input
|
|
1826
|
-
}], url: [{
|
|
1827
|
-
type: Input
|
|
1828
|
-
}], options: [{
|
|
1829
|
-
type: Input
|
|
1830
|
-
}], useModel: [{
|
|
1874
|
+
}], propDecorators: { useModel: [{
|
|
1831
1875
|
type: Input
|
|
1832
1876
|
}] } });
|
|
1833
1877
|
|
|
@@ -1943,11 +1987,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1943
1987
|
|
|
1944
1988
|
|
|
1945
1989
|
class XYChartComponent extends SeriesBasedChartComponent {
|
|
1990
|
+
constructor() {
|
|
1991
|
+
super(...arguments);
|
|
1992
|
+
|
|
1993
|
+
this.data = input();
|
|
1994
|
+
|
|
1995
|
+
this.url = input();
|
|
1996
|
+
|
|
1997
|
+
this.options = input();
|
|
1998
|
+
}
|
|
1946
1999
|
createChart(el, options) {
|
|
1947
2000
|
return new CategoryValueChart(el, options);
|
|
1948
2001
|
}
|
|
1949
2002
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: XYChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1950
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2003
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: XYChartComponent, selector: "vjs-xy-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, useModel: { classPropertyName: "useModel", publicName: "useModel", isSignal: false, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `<div></div>`, isInline: true }); }
|
|
1951
2004
|
}
|
|
1952
2005
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: XYChartComponent, decorators: [{
|
|
1953
2006
|
type: Component,
|
|
@@ -1955,23 +2008,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1955
2008
|
selector: "vjs-xy-chart",
|
|
1956
2009
|
template: `<div></div>`
|
|
1957
2010
|
}]
|
|
1958
|
-
}], propDecorators: {
|
|
1959
|
-
type: Input
|
|
1960
|
-
}], url: [{
|
|
1961
|
-
type: Input
|
|
1962
|
-
}], options: [{
|
|
1963
|
-
type: Input
|
|
1964
|
-
}], useModel: [{
|
|
2011
|
+
}], propDecorators: { useModel: [{
|
|
1965
2012
|
type: Input
|
|
1966
2013
|
}] } });
|
|
1967
2014
|
|
|
1968
2015
|
|
|
1969
2016
|
class LineChartComponent extends SeriesBasedChartComponent {
|
|
2017
|
+
constructor() {
|
|
2018
|
+
super(...arguments);
|
|
2019
|
+
|
|
2020
|
+
this.data = input();
|
|
2021
|
+
|
|
2022
|
+
this.url = input();
|
|
2023
|
+
|
|
2024
|
+
this.options = input();
|
|
2025
|
+
}
|
|
1970
2026
|
createChart(el, options) {
|
|
1971
2027
|
return new LineChart(el, options);
|
|
1972
2028
|
}
|
|
1973
2029
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LineChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1974
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2030
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: LineChartComponent, selector: "vjs-line-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, useModel: { classPropertyName: "useModel", publicName: "useModel", isSignal: false, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `<div></div>`, isInline: true }); }
|
|
1975
2031
|
}
|
|
1976
2032
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LineChartComponent, decorators: [{
|
|
1977
2033
|
type: Component,
|
|
@@ -1979,23 +2035,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1979
2035
|
selector: "vjs-line-chart",
|
|
1980
2036
|
template: `<div></div>`
|
|
1981
2037
|
}]
|
|
1982
|
-
}], propDecorators: {
|
|
1983
|
-
type: Input
|
|
1984
|
-
}], url: [{
|
|
1985
|
-
type: Input
|
|
1986
|
-
}], options: [{
|
|
1987
|
-
type: Input
|
|
1988
|
-
}], useModel: [{
|
|
2038
|
+
}], propDecorators: { useModel: [{
|
|
1989
2039
|
type: Input
|
|
1990
2040
|
}] } });
|
|
1991
2041
|
|
|
1992
2042
|
|
|
1993
2043
|
class AreaChartComponent extends SeriesBasedChartComponent {
|
|
2044
|
+
constructor() {
|
|
2045
|
+
super(...arguments);
|
|
2046
|
+
|
|
2047
|
+
this.data = input();
|
|
2048
|
+
|
|
2049
|
+
this.url = input();
|
|
2050
|
+
|
|
2051
|
+
this.options = input();
|
|
2052
|
+
}
|
|
1994
2053
|
createChart(el, options) {
|
|
1995
2054
|
return new AreaChart(el, options);
|
|
1996
2055
|
}
|
|
1997
2056
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AreaChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1998
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2057
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: AreaChartComponent, selector: "vjs-area-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, useModel: { classPropertyName: "useModel", publicName: "useModel", isSignal: false, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `<div></div>`, isInline: true }); }
|
|
1999
2058
|
}
|
|
2000
2059
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AreaChartComponent, decorators: [{
|
|
2001
2060
|
type: Component,
|
|
@@ -2003,23 +2062,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2003
2062
|
selector: "vjs-area-chart",
|
|
2004
2063
|
template: `<div></div>`
|
|
2005
2064
|
}]
|
|
2006
|
-
}], propDecorators: {
|
|
2007
|
-
type: Input
|
|
2008
|
-
}], url: [{
|
|
2009
|
-
type: Input
|
|
2010
|
-
}], options: [{
|
|
2011
|
-
type: Input
|
|
2012
|
-
}], useModel: [{
|
|
2065
|
+
}], propDecorators: { useModel: [{
|
|
2013
2066
|
type: Input
|
|
2014
2067
|
}] } });
|
|
2015
2068
|
|
|
2016
2069
|
|
|
2017
2070
|
class PieChartComponent extends SeriesBasedChartComponent {
|
|
2071
|
+
constructor() {
|
|
2072
|
+
super(...arguments);
|
|
2073
|
+
|
|
2074
|
+
this.data = input();
|
|
2075
|
+
|
|
2076
|
+
this.url = input();
|
|
2077
|
+
|
|
2078
|
+
this.options = input();
|
|
2079
|
+
}
|
|
2018
2080
|
createChart(el, options) {
|
|
2019
2081
|
return new PieChart(el, options);
|
|
2020
2082
|
}
|
|
2021
2083
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PieChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2022
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2084
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: PieChartComponent, selector: "vjs-pie-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, useModel: { classPropertyName: "useModel", publicName: "useModel", isSignal: false, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `<div></div>`, isInline: true }); }
|
|
2023
2085
|
}
|
|
2024
2086
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PieChartComponent, decorators: [{
|
|
2025
2087
|
type: Component,
|
|
@@ -2027,23 +2089,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2027
2089
|
selector: "vjs-pie-chart",
|
|
2028
2090
|
template: `<div></div>`
|
|
2029
2091
|
}]
|
|
2030
|
-
}], propDecorators: {
|
|
2031
|
-
type: Input
|
|
2032
|
-
}], url: [{
|
|
2033
|
-
type: Input
|
|
2034
|
-
}], options: [{
|
|
2035
|
-
type: Input
|
|
2036
|
-
}], useModel: [{
|
|
2092
|
+
}], propDecorators: { useModel: [{
|
|
2037
2093
|
type: Input
|
|
2038
2094
|
}] } });
|
|
2039
2095
|
|
|
2040
2096
|
|
|
2041
2097
|
class ScatterChartComponent extends SeriesBasedChartComponent {
|
|
2098
|
+
constructor() {
|
|
2099
|
+
super(...arguments);
|
|
2100
|
+
|
|
2101
|
+
this.data = input();
|
|
2102
|
+
|
|
2103
|
+
this.url = input();
|
|
2104
|
+
|
|
2105
|
+
this.options = input();
|
|
2106
|
+
}
|
|
2042
2107
|
createChart(el, options) {
|
|
2043
2108
|
return new ScatterChart(el, options);
|
|
2044
2109
|
}
|
|
2045
2110
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ScatterChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2046
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2111
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: ScatterChartComponent, selector: "vjs-scatter-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, useModel: { classPropertyName: "useModel", publicName: "useModel", isSignal: false, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `<div></div>`, isInline: true }); }
|
|
2047
2112
|
}
|
|
2048
2113
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ScatterChartComponent, decorators: [{
|
|
2049
2114
|
type: Component,
|
|
@@ -2051,23 +2116,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2051
2116
|
selector: "vjs-scatter-chart",
|
|
2052
2117
|
template: `<div></div>`
|
|
2053
2118
|
}]
|
|
2054
|
-
}], propDecorators: {
|
|
2055
|
-
type: Input
|
|
2056
|
-
}], url: [{
|
|
2057
|
-
type: Input
|
|
2058
|
-
}], options: [{
|
|
2059
|
-
type: Input
|
|
2060
|
-
}], useModel: [{
|
|
2119
|
+
}], propDecorators: { useModel: [{
|
|
2061
2120
|
type: Input
|
|
2062
2121
|
}] } });
|
|
2063
2122
|
|
|
2064
2123
|
|
|
2065
2124
|
class BubbleChartComponent extends SeriesBasedChartComponent {
|
|
2125
|
+
constructor() {
|
|
2126
|
+
super(...arguments);
|
|
2127
|
+
|
|
2128
|
+
this.data = input();
|
|
2129
|
+
|
|
2130
|
+
this.url = input();
|
|
2131
|
+
|
|
2132
|
+
this.options = input();
|
|
2133
|
+
}
|
|
2066
2134
|
createChart(el, options) {
|
|
2067
2135
|
return new BubbleChart(el, options);
|
|
2068
2136
|
}
|
|
2069
2137
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BubbleChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2070
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2138
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: BubbleChartComponent, selector: "vjs-bubble-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, useModel: { classPropertyName: "useModel", publicName: "useModel", isSignal: false, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `<div></div>`, isInline: true }); }
|
|
2071
2139
|
}
|
|
2072
2140
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BubbleChartComponent, decorators: [{
|
|
2073
2141
|
type: Component,
|
|
@@ -2075,19 +2143,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2075
2143
|
selector: "vjs-bubble-chart",
|
|
2076
2144
|
template: `<div></div>`
|
|
2077
2145
|
}]
|
|
2078
|
-
}], propDecorators: {
|
|
2079
|
-
type: Input
|
|
2080
|
-
}], url: [{
|
|
2081
|
-
type: Input
|
|
2082
|
-
}], options: [{
|
|
2083
|
-
type: Input
|
|
2084
|
-
}], useModel: [{
|
|
2146
|
+
}], propDecorators: { useModel: [{
|
|
2085
2147
|
type: Input
|
|
2086
2148
|
}] } });
|
|
2087
2149
|
|
|
2088
2150
|
|
|
2089
2151
|
class SankeyChartComponent {
|
|
2090
2152
|
constructor() {
|
|
2153
|
+
|
|
2154
|
+
this.csvData = input();
|
|
2155
|
+
|
|
2156
|
+
this.jsonData = input();
|
|
2157
|
+
|
|
2158
|
+
this.url = input();
|
|
2159
|
+
this._dataEffect = effect(() => {
|
|
2160
|
+
const currentData = this.jsonData();
|
|
2161
|
+
if (currentData) {
|
|
2162
|
+
if (this.chart) {
|
|
2163
|
+
this.chart.load({ jsonData: currentData });
|
|
2164
|
+
}
|
|
2165
|
+
}
|
|
2166
|
+
});
|
|
2167
|
+
this._urlEffect = effect(() => {
|
|
2168
|
+
const currentUrl = this.url();
|
|
2169
|
+
if (currentUrl) {
|
|
2170
|
+
// Respond to changes in the url here.
|
|
2171
|
+
// For example, if you need to reload the model with new data:
|
|
2172
|
+
if (this.chart) {
|
|
2173
|
+
this.chart.load({ url: currentUrl });
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
});
|
|
2177
|
+
this._csvDataEffect = effect(() => {
|
|
2178
|
+
const currentData = this.csvData();
|
|
2179
|
+
if (currentData) {
|
|
2180
|
+
if (this.chart) {
|
|
2181
|
+
this.chart.load({ csvData: currentData });
|
|
2182
|
+
}
|
|
2183
|
+
}
|
|
2184
|
+
});
|
|
2091
2185
|
this.$el = inject(ElementRef);
|
|
2092
2186
|
this.$ngZone = inject(NgZone);
|
|
2093
2187
|
this.$vjs = inject(VisuallyJsService);
|
|
@@ -2122,7 +2216,7 @@ class SankeyChartComponent {
|
|
|
2122
2216
|
|
|
2123
2217
|
ngAfterViewInit() {
|
|
2124
2218
|
if (!this.useModel) {
|
|
2125
|
-
this._init(null, this.csvData, this.jsonData, this.url);
|
|
2219
|
+
this._init(null, this.csvData(), this.jsonData(), this.url());
|
|
2126
2220
|
}
|
|
2127
2221
|
}
|
|
2128
2222
|
ngOnChanges(changes) {
|
|
@@ -2136,7 +2230,7 @@ class SankeyChartComponent {
|
|
|
2136
2230
|
this.chart?.destroy();
|
|
2137
2231
|
}
|
|
2138
2232
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SankeyChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2139
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2233
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: SankeyChartComponent, selector: "vjs-sankey-chart", inputs: { csvData: { classPropertyName: "csvData", publicName: "csvData", isSignal: true, isRequired: false, transformFunction: null }, jsonData: { classPropertyName: "jsonData", publicName: "jsonData", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: false, isRequired: false, transformFunction: null }, pivot: { classPropertyName: "pivot", publicName: "pivot", isSignal: false, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: false, isRequired: false, transformFunction: null }, useModel: { classPropertyName: "useModel", publicName: "useModel", isSignal: false, isRequired: false, transformFunction: null } }, usesOnChanges: true, ngImport: i0, template: `<div></div>`, isInline: true }); }
|
|
2140
2234
|
}
|
|
2141
2235
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SankeyChartComponent, decorators: [{
|
|
2142
2236
|
type: Component,
|
|
@@ -2144,13 +2238,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2144
2238
|
selector: "vjs-sankey-chart",
|
|
2145
2239
|
template: `<div></div>`
|
|
2146
2240
|
}]
|
|
2147
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
2148
|
-
type: Input
|
|
2149
|
-
}], jsonData: [{
|
|
2150
|
-
type: Input
|
|
2151
|
-
}], url: [{
|
|
2152
|
-
type: Input
|
|
2153
|
-
}], interactive: [{
|
|
2241
|
+
}], ctorParameters: () => [], propDecorators: { interactive: [{
|
|
2154
2242
|
type: Input
|
|
2155
2243
|
}], pivot: [{
|
|
2156
2244
|
type: Input
|
|
@@ -2820,6 +2908,282 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2820
2908
|
}] } });
|
|
2821
2909
|
|
|
2822
2910
|
|
|
2911
|
+
class EdgePropertyMappingsInspectorComponent {
|
|
2912
|
+
constructor() {
|
|
2913
|
+
this.$vjs = inject(VisuallyJsService);
|
|
2914
|
+
this._inspector = this.$vjs.inspector;
|
|
2915
|
+
}
|
|
2916
|
+
get cls() {
|
|
2917
|
+
return this.cssClass || "vjs-inspector-section";
|
|
2918
|
+
}
|
|
2919
|
+
resolveMappings() {
|
|
2920
|
+
if (this.mappings) {
|
|
2921
|
+
return this.mappings;
|
|
2922
|
+
}
|
|
2923
|
+
else {
|
|
2924
|
+
const mappings = this._inspector().getFromContext(INSPECTOR_CONTEXT_EDGE_PROPERTY_MAPPINGS);
|
|
2925
|
+
return mappings || this._inspector().$ui.$getEdgePropertyMappings();
|
|
2926
|
+
}
|
|
2927
|
+
}
|
|
2928
|
+
toList(pm) {
|
|
2929
|
+
const p = pm.property;
|
|
2930
|
+
return Array.isArray(p) ? p : [p];
|
|
2931
|
+
}
|
|
2932
|
+
getPropertyKey(pm) {
|
|
2933
|
+
return this.toList(pm).join(" ");
|
|
2934
|
+
}
|
|
2935
|
+
getName(pm) {
|
|
2936
|
+
return this.getPropertyName ? this.getPropertyName(pm) : pm.name || this.getPropertyKey(pm);
|
|
2937
|
+
}
|
|
2938
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EdgePropertyMappingsInspectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2939
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: EdgePropertyMappingsInspectorComponent, selector: "vjs-edge-properties-inspector", inputs: { getPropertyName: "getPropertyName", showName: "showName", cssClass: "cssClass", mappings: "mappings" }, ngImport: i0, template: `
|
|
2940
|
+
@for (pm of resolveMappings(); track getPropertyKey(pm)) {
|
|
2941
|
+
<div [class]="cls">
|
|
2942
|
+
@if (showName !== false) {
|
|
2943
|
+
<div>{{ getName(pm) }}</div>
|
|
2944
|
+
}
|
|
2945
|
+
<vjs-edge-type [propertyName]="getPropertyKey(pm)"></vjs-edge-type>
|
|
2946
|
+
</div>
|
|
2947
|
+
}
|
|
2948
|
+
`, isInline: true, dependencies: [{ kind: "component", type: EdgeTypePickerComponent, selector: "vjs-edge-type", inputs: ["propertyName", "edgeMappings"], outputs: ["changeEvent"] }] }); }
|
|
2949
|
+
}
|
|
2950
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EdgePropertyMappingsInspectorComponent, decorators: [{
|
|
2951
|
+
type: Component,
|
|
2952
|
+
args: [{
|
|
2953
|
+
selector: "vjs-edge-properties-inspector",
|
|
2954
|
+
template: `
|
|
2955
|
+
@for (pm of resolveMappings(); track getPropertyKey(pm)) {
|
|
2956
|
+
<div [class]="cls">
|
|
2957
|
+
@if (showName !== false) {
|
|
2958
|
+
<div>{{ getName(pm) }}</div>
|
|
2959
|
+
}
|
|
2960
|
+
<vjs-edge-type [propertyName]="getPropertyKey(pm)"></vjs-edge-type>
|
|
2961
|
+
</div>
|
|
2962
|
+
}
|
|
2963
|
+
`
|
|
2964
|
+
}]
|
|
2965
|
+
}], propDecorators: { getPropertyName: [{
|
|
2966
|
+
type: Input
|
|
2967
|
+
}], showName: [{
|
|
2968
|
+
type: Input
|
|
2969
|
+
}], cssClass: [{
|
|
2970
|
+
type: Input
|
|
2971
|
+
}], mappings: [{
|
|
2972
|
+
type: Input
|
|
2973
|
+
}] } });
|
|
2974
|
+
|
|
2975
|
+
const MAX_RADIOS = 7;
|
|
2976
|
+
const TRUE_FALSE = ["True", "False"];
|
|
2977
|
+
|
|
2978
|
+
class ShapePropertiesInspectorComponent {
|
|
2979
|
+
constructor() {
|
|
2980
|
+
|
|
2981
|
+
this.vertex = null;
|
|
2982
|
+
this.$vjs = inject(VisuallyJsService);
|
|
2983
|
+
this._inspector = this.$vjs.inspector;
|
|
2984
|
+
}
|
|
2985
|
+
get currentMaxRadios() {
|
|
2986
|
+
return this.maxRadios == null ? MAX_RADIOS : this.maxRadios;
|
|
2987
|
+
}
|
|
2988
|
+
get shapeDef() {
|
|
2989
|
+
if (this._inspector() == null || this.vertex == null || !isNode(this.vertex)) {
|
|
2990
|
+
return null;
|
|
2991
|
+
}
|
|
2992
|
+
const { type, category } = this.vertex.data;
|
|
2993
|
+
if (!type || !category) {
|
|
2994
|
+
return null;
|
|
2995
|
+
}
|
|
2996
|
+
const shapeLibrary = this._inspector().$ui.getShapeLibrary();
|
|
2997
|
+
const shapeSet = shapeLibrary.getShapeSet(category);
|
|
2998
|
+
if (!shapeSet) {
|
|
2999
|
+
return null;
|
|
3000
|
+
}
|
|
3001
|
+
return shapeSet.shapes.find(s => s.type === type);
|
|
3002
|
+
}
|
|
3003
|
+
getBooleanLabel(prop, value) {
|
|
3004
|
+
const labels = prop.booleanLabels || TRUE_FALSE;
|
|
3005
|
+
return labels[value ? 0 : 1];
|
|
3006
|
+
}
|
|
3007
|
+
getShapePropertyValueLabel(v) {
|
|
3008
|
+
return isString(v) ? v : v.label;
|
|
3009
|
+
}
|
|
3010
|
+
getShapePropertyValueValue(v) {
|
|
3011
|
+
return isString(v) ? v : v.value;
|
|
3012
|
+
}
|
|
3013
|
+
isBoolean(prop) {
|
|
3014
|
+
return prop.type === 'boolean';
|
|
3015
|
+
}
|
|
3016
|
+
hasValues(prop) {
|
|
3017
|
+
return prop.values && prop.values.length > 0;
|
|
3018
|
+
}
|
|
3019
|
+
useRadio(prop) {
|
|
3020
|
+
return this.hasValues(prop) && prop.editor !== 'select' && prop.values.length <= this.currentMaxRadios;
|
|
3021
|
+
}
|
|
3022
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ShapePropertiesInspectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3023
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: ShapePropertiesInspectorComponent, selector: "vjs-shape-properties-inspector", inputs: { vertex: "vertex", maxRadios: "maxRadios" }, ngImport: i0, template: `
|
|
3024
|
+
@if (shapeDef && shapeDef.properties) {
|
|
3025
|
+
@for (prop of shapeDef.properties; track prop.id) {
|
|
3026
|
+
|
|
3027
|
+
<div class="vjs-inspector-field">
|
|
3028
|
+
@if (!isBoolean(prop) || prop.editor === 'select' || prop.editor === 'radio') {
|
|
3029
|
+
<label class="vjs-inspector-property-label">{{ prop.label || prop.id }}</label>
|
|
3030
|
+
}
|
|
3031
|
+
|
|
3032
|
+
@if (prop.type === 'string') {
|
|
3033
|
+
@if (hasValues(prop)) {
|
|
3034
|
+
@if (useRadio(prop)) {
|
|
3035
|
+
<div class="vjs-radio-group">
|
|
3036
|
+
@for (v of prop.values; track getShapePropertyValueLabel(v)) {
|
|
3037
|
+
<label>
|
|
3038
|
+
<input type="radio" [name]="prop.id" [attr.vjs-att]="prop.id" [value]="getShapePropertyValueValue(v)" /> {{ getShapePropertyValueLabel(v) }}
|
|
3039
|
+
</label>
|
|
3040
|
+
}
|
|
3041
|
+
</div>
|
|
3042
|
+
} @else {
|
|
3043
|
+
<select [attr.vjs-att]="prop.id">
|
|
3044
|
+
@for (v of prop.values; track getShapePropertyValueLabel(v)) {
|
|
3045
|
+
<option [value]="getShapePropertyValueValue(v)">{{ getShapePropertyValueLabel(v) }}</option>
|
|
3046
|
+
}
|
|
3047
|
+
</select>
|
|
3048
|
+
}
|
|
3049
|
+
} @else {
|
|
3050
|
+
<input type="text" [attr.vjs-att]="prop.id" [placeholder]="prop.description" />
|
|
3051
|
+
}
|
|
3052
|
+
} @else if (prop.type === 'number') {
|
|
3053
|
+
@if (hasValues(prop)) {
|
|
3054
|
+
@if (useRadio(prop)) {
|
|
3055
|
+
<div class="vjs-radio-group">
|
|
3056
|
+
@for (v of prop.values; track getShapePropertyValueLabel(v)) {
|
|
3057
|
+
<label>
|
|
3058
|
+
<input type="radio" [attr.vjs-att]="prop.id" [value]="getShapePropertyValueValue(v)" /> {{ getShapePropertyValueLabel(v) }}
|
|
3059
|
+
</label>
|
|
3060
|
+
}
|
|
3061
|
+
</div>
|
|
3062
|
+
} @else {
|
|
3063
|
+
<select [attr.vjs-att]="prop.id">
|
|
3064
|
+
@for (v of prop.values; track getShapePropertyValueLabel(v)) {
|
|
3065
|
+
<option [value]="getShapePropertyValueValue(v)">{{ getShapePropertyValueLabel(v) }}</option>
|
|
3066
|
+
}
|
|
3067
|
+
</select>
|
|
3068
|
+
}
|
|
3069
|
+
} @else {
|
|
3070
|
+
<input type="number" [attr.vjs-att]="prop.id" [placeholder]="prop.description" [attr.min]="prop.min" [attr.max]="prop.max" />
|
|
3071
|
+
}
|
|
3072
|
+
} @else if (isBoolean(prop)) {
|
|
3073
|
+
@if (prop.editor === 'select') {
|
|
3074
|
+
<select [attr.vjs-att]="prop.id" vjs-datatype="boolean">
|
|
3075
|
+
<option value=""></option>
|
|
3076
|
+
<option value="true">{{ getBooleanLabel(prop, true) }}</option>
|
|
3077
|
+
<option value="false">{{ getBooleanLabel(prop, false) }}</option>
|
|
3078
|
+
</select>
|
|
3079
|
+
} @else if (prop.editor === 'radio') {
|
|
3080
|
+
<div class="vjs-radio-group">
|
|
3081
|
+
<label><input type="radio" [name]="prop.id" [attr.vjs-att]="prop.id" vjs-datatype="boolean" value="true" /><span>{{ getBooleanLabel(prop, true) }}</span></label>
|
|
3082
|
+
<label><input type="radio" [name]="prop.id" [attr.vjs-att]="prop.id" vjs-datatype="boolean" value="false" /><span>{{ getBooleanLabel(prop, false) }}</span></label>
|
|
3083
|
+
</div>
|
|
3084
|
+
} @else {
|
|
3085
|
+
<label>
|
|
3086
|
+
<input type="checkbox" vjs-datatype="boolean" [attr.vjs-att]="prop.id" /> {{ prop.label || prop.id }}
|
|
3087
|
+
</label>
|
|
3088
|
+
}
|
|
3089
|
+
} @else {
|
|
3090
|
+
<input type="text" [attr.vjs-att]="prop.id" [placeholder]="prop.description" />
|
|
3091
|
+
}
|
|
3092
|
+
|
|
3093
|
+
@if (prop.description) {
|
|
3094
|
+
<div class="vjs-field-desc">{{ prop.description }}</div>
|
|
3095
|
+
}
|
|
3096
|
+
</div>
|
|
3097
|
+
}
|
|
3098
|
+
}
|
|
3099
|
+
`, isInline: true, styles: [":host{display:contents}\n"] }); }
|
|
3100
|
+
}
|
|
3101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ShapePropertiesInspectorComponent, decorators: [{
|
|
3102
|
+
type: Component,
|
|
3103
|
+
args: [{ selector: 'vjs-shape-properties-inspector', template: `
|
|
3104
|
+
@if (shapeDef && shapeDef.properties) {
|
|
3105
|
+
@for (prop of shapeDef.properties; track prop.id) {
|
|
3106
|
+
|
|
3107
|
+
<div class="vjs-inspector-field">
|
|
3108
|
+
@if (!isBoolean(prop) || prop.editor === 'select' || prop.editor === 'radio') {
|
|
3109
|
+
<label class="vjs-inspector-property-label">{{ prop.label || prop.id }}</label>
|
|
3110
|
+
}
|
|
3111
|
+
|
|
3112
|
+
@if (prop.type === 'string') {
|
|
3113
|
+
@if (hasValues(prop)) {
|
|
3114
|
+
@if (useRadio(prop)) {
|
|
3115
|
+
<div class="vjs-radio-group">
|
|
3116
|
+
@for (v of prop.values; track getShapePropertyValueLabel(v)) {
|
|
3117
|
+
<label>
|
|
3118
|
+
<input type="radio" [name]="prop.id" [attr.vjs-att]="prop.id" [value]="getShapePropertyValueValue(v)" /> {{ getShapePropertyValueLabel(v) }}
|
|
3119
|
+
</label>
|
|
3120
|
+
}
|
|
3121
|
+
</div>
|
|
3122
|
+
} @else {
|
|
3123
|
+
<select [attr.vjs-att]="prop.id">
|
|
3124
|
+
@for (v of prop.values; track getShapePropertyValueLabel(v)) {
|
|
3125
|
+
<option [value]="getShapePropertyValueValue(v)">{{ getShapePropertyValueLabel(v) }}</option>
|
|
3126
|
+
}
|
|
3127
|
+
</select>
|
|
3128
|
+
}
|
|
3129
|
+
} @else {
|
|
3130
|
+
<input type="text" [attr.vjs-att]="prop.id" [placeholder]="prop.description" />
|
|
3131
|
+
}
|
|
3132
|
+
} @else if (prop.type === 'number') {
|
|
3133
|
+
@if (hasValues(prop)) {
|
|
3134
|
+
@if (useRadio(prop)) {
|
|
3135
|
+
<div class="vjs-radio-group">
|
|
3136
|
+
@for (v of prop.values; track getShapePropertyValueLabel(v)) {
|
|
3137
|
+
<label>
|
|
3138
|
+
<input type="radio" [attr.vjs-att]="prop.id" [value]="getShapePropertyValueValue(v)" /> {{ getShapePropertyValueLabel(v) }}
|
|
3139
|
+
</label>
|
|
3140
|
+
}
|
|
3141
|
+
</div>
|
|
3142
|
+
} @else {
|
|
3143
|
+
<select [attr.vjs-att]="prop.id">
|
|
3144
|
+
@for (v of prop.values; track getShapePropertyValueLabel(v)) {
|
|
3145
|
+
<option [value]="getShapePropertyValueValue(v)">{{ getShapePropertyValueLabel(v) }}</option>
|
|
3146
|
+
}
|
|
3147
|
+
</select>
|
|
3148
|
+
}
|
|
3149
|
+
} @else {
|
|
3150
|
+
<input type="number" [attr.vjs-att]="prop.id" [placeholder]="prop.description" [attr.min]="prop.min" [attr.max]="prop.max" />
|
|
3151
|
+
}
|
|
3152
|
+
} @else if (isBoolean(prop)) {
|
|
3153
|
+
@if (prop.editor === 'select') {
|
|
3154
|
+
<select [attr.vjs-att]="prop.id" vjs-datatype="boolean">
|
|
3155
|
+
<option value=""></option>
|
|
3156
|
+
<option value="true">{{ getBooleanLabel(prop, true) }}</option>
|
|
3157
|
+
<option value="false">{{ getBooleanLabel(prop, false) }}</option>
|
|
3158
|
+
</select>
|
|
3159
|
+
} @else if (prop.editor === 'radio') {
|
|
3160
|
+
<div class="vjs-radio-group">
|
|
3161
|
+
<label><input type="radio" [name]="prop.id" [attr.vjs-att]="prop.id" vjs-datatype="boolean" value="true" /><span>{{ getBooleanLabel(prop, true) }}</span></label>
|
|
3162
|
+
<label><input type="radio" [name]="prop.id" [attr.vjs-att]="prop.id" vjs-datatype="boolean" value="false" /><span>{{ getBooleanLabel(prop, false) }}</span></label>
|
|
3163
|
+
</div>
|
|
3164
|
+
} @else {
|
|
3165
|
+
<label>
|
|
3166
|
+
<input type="checkbox" vjs-datatype="boolean" [attr.vjs-att]="prop.id" /> {{ prop.label || prop.id }}
|
|
3167
|
+
</label>
|
|
3168
|
+
}
|
|
3169
|
+
} @else {
|
|
3170
|
+
<input type="text" [attr.vjs-att]="prop.id" [placeholder]="prop.description" />
|
|
3171
|
+
}
|
|
3172
|
+
|
|
3173
|
+
@if (prop.description) {
|
|
3174
|
+
<div class="vjs-field-desc">{{ prop.description }}</div>
|
|
3175
|
+
}
|
|
3176
|
+
</div>
|
|
3177
|
+
}
|
|
3178
|
+
}
|
|
3179
|
+
`, styles: [":host{display:contents}\n"] }]
|
|
3180
|
+
}], propDecorators: { vertex: [{
|
|
3181
|
+
type: Input
|
|
3182
|
+
}], maxRadios: [{
|
|
3183
|
+
type: Input
|
|
3184
|
+
}] } });
|
|
3185
|
+
|
|
3186
|
+
|
|
2823
3187
|
class VisuallyJsModule {
|
|
2824
3188
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VisuallyJsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2825
3189
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: VisuallyJsModule, declarations: [DefaultNodeComponent,
|
|
@@ -2852,7 +3216,9 @@ class VisuallyJsModule {
|
|
|
2852
3216
|
BackgroundComponent,
|
|
2853
3217
|
ImageBackgroundComponent,
|
|
2854
3218
|
GridBackgroundComponent,
|
|
2855
|
-
TiledImageBackgroundComponent
|
|
3219
|
+
TiledImageBackgroundComponent,
|
|
3220
|
+
EdgePropertyMappingsInspectorComponent,
|
|
3221
|
+
ShapePropertiesInspectorComponent], imports: [CommonModule], exports: [MiniviewComponent,
|
|
2856
3222
|
SurfaceComponent,
|
|
2857
3223
|
PaperComponent,
|
|
2858
3224
|
PaletteComponent,
|
|
@@ -2878,7 +3244,9 @@ class VisuallyJsModule {
|
|
|
2878
3244
|
BackgroundComponent,
|
|
2879
3245
|
ImageBackgroundComponent,
|
|
2880
3246
|
GridBackgroundComponent,
|
|
2881
|
-
TiledImageBackgroundComponent
|
|
3247
|
+
TiledImageBackgroundComponent,
|
|
3248
|
+
EdgePropertyMappingsInspectorComponent,
|
|
3249
|
+
ShapePropertiesInspectorComponent] }); }
|
|
2882
3250
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VisuallyJsModule, imports: [CommonModule] }); }
|
|
2883
3251
|
}
|
|
2884
3252
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VisuallyJsModule, decorators: [{
|
|
@@ -2916,7 +3284,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2916
3284
|
BackgroundComponent,
|
|
2917
3285
|
ImageBackgroundComponent,
|
|
2918
3286
|
GridBackgroundComponent,
|
|
2919
|
-
TiledImageBackgroundComponent
|
|
3287
|
+
TiledImageBackgroundComponent,
|
|
3288
|
+
EdgePropertyMappingsInspectorComponent,
|
|
3289
|
+
ShapePropertiesInspectorComponent
|
|
2920
3290
|
],
|
|
2921
3291
|
exports: [
|
|
2922
3292
|
MiniviewComponent,
|
|
@@ -2945,7 +3315,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2945
3315
|
BackgroundComponent,
|
|
2946
3316
|
ImageBackgroundComponent,
|
|
2947
3317
|
GridBackgroundComponent,
|
|
2948
|
-
TiledImageBackgroundComponent
|
|
3318
|
+
TiledImageBackgroundComponent,
|
|
3319
|
+
EdgePropertyMappingsInspectorComponent,
|
|
3320
|
+
ShapePropertiesInspectorComponent
|
|
2949
3321
|
]
|
|
2950
3322
|
}]
|
|
2951
3323
|
}] });
|
|
@@ -3073,5 +3445,5 @@ function useVisuallyJsUpdate(callback) {
|
|
|
3073
3445
|
|
|
3074
3446
|
|
|
3075
3447
|
|
|
3076
|
-
export { AngularComponentOverlayType, AreaChartComponent, BackgroundComponent, BarChartComponent, BaseAngularOverlayComponent, BaseGroupComponent, BaseNodeComponent, BasePortComponent, BaseVertexComponent, BrowserUIAngularModel, BubbleChartComponent, ColorPickerComponent, ColumnChartComponent, ControlsComponent, DecoratorComponent, DefaultGroupComponent, DefaultNodeComponent, DiagramComponent, DiagramPaletteComponent, EdgeTypePickerComponent, ExportControlsComponent, GridBackgroundComponent, ImageBackgroundComponent, InspectorComponent, LineChartComponent, MiniviewComponent, PaletteComponent, PaperComponent, PieChartComponent, SankeyChartComponent, ScatterChartComponent, SeriesBasedChartComponent, ShapeComponent, ShapePaletteComponent, SurfaceComponent, SurfacePopupComponent, TiledImageBackgroundComponent, VisuallyJsModule, VisuallyJsService, XYChartComponent, useVisuallyJsUpdate, useZoom };
|
|
3448
|
+
export { AngularComponentOverlayType, AreaChartComponent, BackgroundComponent, BarChartComponent, BaseAngularOverlayComponent, BaseGroupComponent, BaseNodeComponent, BasePortComponent, BaseVertexComponent, BrowserUIAngularModel, BubbleChartComponent, ColorPickerComponent, ColumnChartComponent, ControlsComponent, DecoratorComponent, DefaultGroupComponent, DefaultNodeComponent, DiagramComponent, DiagramPaletteComponent, EdgePropertyMappingsInspectorComponent, EdgeTypePickerComponent, ExportControlsComponent, GridBackgroundComponent, ImageBackgroundComponent, InspectorComponent, LineChartComponent, MiniviewComponent, PaletteComponent, PaperComponent, PieChartComponent, SankeyChartComponent, ScatterChartComponent, SeriesBasedChartComponent, ShapeComponent, ShapePaletteComponent, ShapePropertiesInspectorComponent, SurfaceComponent, SurfacePopupComponent, TiledImageBackgroundComponent, VisuallyJsModule, VisuallyJsService, XYChartComponent, useVisuallyJsUpdate, useZoom };
|
|
3077
3449
|
//# sourceMappingURL=visuallyjs-browser-ui-angular.mjs.map
|