|
|
|
@ -218,7 +218,7 @@ var BaseError = /** @class */ (function () {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return BaseError;
|
|
|
|
return BaseError;
|
|
|
|
}());
|
|
|
|
}());
|
|
|
|
BaseError.prototype = new Error();
|
|
|
|
Object.defineProperty(BaseError, 'prototype', new Error());
|
|
|
|
var ModelvalidationError = /** @class */ (function (_super) {
|
|
|
|
var ModelvalidationError = /** @class */ (function (_super) {
|
|
|
|
__extends(ModelvalidationError, _super);
|
|
|
|
__extends(ModelvalidationError, _super);
|
|
|
|
function ModelvalidationError(message) {
|
|
|
|
function ModelvalidationError(message) {
|
|
|
|
@ -351,7 +351,7 @@ function fcTopSort(graph) {
|
|
|
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
|
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
var FcModelService = /** @class */ (function () {
|
|
|
|
var FcModelService = /** @class */ (function () {
|
|
|
|
function FcModelService(modelValidation, model, modelChanged, cd, selectedObjects, dropNode, createEdge, edgeAddedCallback, nodeRemovedCallback, edgeRemovedCallback, canvasHtmlElement, svgHtmlElement) {
|
|
|
|
function FcModelService(modelValidation, model, modelChanged, detectChangesSubject, selectedObjects, dropNode, createEdge, edgeAddedCallback, nodeRemovedCallback, edgeRemovedCallback, canvasHtmlElement, svgHtmlElement) {
|
|
|
|
var _this = this;
|
|
|
|
var _this = this;
|
|
|
|
this.connectorsHtmlElements = {};
|
|
|
|
this.connectorsHtmlElements = {};
|
|
|
|
this.nodesHtmlElements = {};
|
|
|
|
this.nodesHtmlElements = {};
|
|
|
|
@ -362,7 +362,7 @@ var FcModelService = /** @class */ (function () {
|
|
|
|
this.modelValidation = modelValidation;
|
|
|
|
this.modelValidation = modelValidation;
|
|
|
|
this.model = model;
|
|
|
|
this.model = model;
|
|
|
|
this.modelChanged = modelChanged;
|
|
|
|
this.modelChanged = modelChanged;
|
|
|
|
this.cd = cd;
|
|
|
|
this.detectChangesSubject = detectChangesSubject;
|
|
|
|
this.canvasHtmlElement = canvasHtmlElement;
|
|
|
|
this.canvasHtmlElement = canvasHtmlElement;
|
|
|
|
this.svgHtmlElement = svgHtmlElement;
|
|
|
|
this.svgHtmlElement = svgHtmlElement;
|
|
|
|
this.modelValidation.validateModel(this.model);
|
|
|
|
this.modelValidation.validateModel(this.model);
|
|
|
|
@ -420,7 +420,7 @@ var FcModelService = /** @class */ (function () {
|
|
|
|
* @return {?}
|
|
|
|
* @return {?}
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function () {
|
|
|
|
function () {
|
|
|
|
_this.cd.detectChanges();
|
|
|
|
_this.detectChangesSubject.next();
|
|
|
|
}), 0);
|
|
|
|
}), 0);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
@ -747,23 +747,6 @@ var FcModelService = /** @class */ (function () {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return this.dragImage;
|
|
|
|
return this.dragImage;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @param {?} edgeAddedCallback
|
|
|
|
|
|
|
|
* @param {?} nodeRemovedCallback
|
|
|
|
|
|
|
|
* @param {?} edgeRemovedCallback
|
|
|
|
|
|
|
|
* @return {?}
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
FcModelService.prototype.registerCallbacks = /**
|
|
|
|
|
|
|
|
* @param {?} edgeAddedCallback
|
|
|
|
|
|
|
|
* @param {?} nodeRemovedCallback
|
|
|
|
|
|
|
|
* @param {?} edgeRemovedCallback
|
|
|
|
|
|
|
|
* @return {?}
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
function (edgeAddedCallback, nodeRemovedCallback, edgeRemovedCallback) {
|
|
|
|
|
|
|
|
this.edgeAddedCallback = edgeAddedCallback;
|
|
|
|
|
|
|
|
this.nodeRemovedCallback = nodeRemovedCallback;
|
|
|
|
|
|
|
|
this.edgeRemovedCallback = edgeRemovedCallback;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
return FcModelService;
|
|
|
|
return FcModelService;
|
|
|
|
}());
|
|
|
|
}());
|
|
|
|
if (false) {
|
|
|
|
if (false) {
|
|
|
|
@ -771,8 +754,11 @@ if (false) {
|
|
|
|
FcModelService.prototype.modelValidation;
|
|
|
|
FcModelService.prototype.modelValidation;
|
|
|
|
/** @type {?} */
|
|
|
|
/** @type {?} */
|
|
|
|
FcModelService.prototype.model;
|
|
|
|
FcModelService.prototype.model;
|
|
|
|
/** @type {?} */
|
|
|
|
/**
|
|
|
|
FcModelService.prototype.cd;
|
|
|
|
* @type {?}
|
|
|
|
|
|
|
|
* @private
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
FcModelService.prototype.detectChangesSubject;
|
|
|
|
/** @type {?} */
|
|
|
|
/** @type {?} */
|
|
|
|
FcModelService.prototype.selectedObjects;
|
|
|
|
FcModelService.prototype.selectedObjects;
|
|
|
|
/** @type {?} */
|
|
|
|
/** @type {?} */
|
|
|
|
@ -3115,6 +3101,7 @@ if (false) {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
var NgxFlowchartComponent = /** @class */ (function () {
|
|
|
|
var NgxFlowchartComponent = /** @class */ (function () {
|
|
|
|
function NgxFlowchartComponent(elementRef, differs, modelValidation, edgeDrawingService, cd, zone) {
|
|
|
|
function NgxFlowchartComponent(elementRef, differs, modelValidation, edgeDrawingService, cd, zone) {
|
|
|
|
|
|
|
|
var _this = this;
|
|
|
|
this.elementRef = elementRef;
|
|
|
|
this.elementRef = elementRef;
|
|
|
|
this.differs = differs;
|
|
|
|
this.differs = differs;
|
|
|
|
this.modelValidation = modelValidation;
|
|
|
|
this.modelValidation = modelValidation;
|
|
|
|
@ -3140,8 +3127,15 @@ var NgxFlowchartComponent = /** @class */ (function () {
|
|
|
|
function (index, item) {
|
|
|
|
function (index, item) {
|
|
|
|
return item;
|
|
|
|
return item;
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|
|
|
|
|
this.detectChangesSubject = new Subject();
|
|
|
|
this.arrowDefId = 'arrow-' + Math.random();
|
|
|
|
this.arrowDefId = 'arrow-' + Math.random();
|
|
|
|
this.arrowDefIdSelected = this.arrowDefId + '-selected';
|
|
|
|
this.arrowDefIdSelected = this.arrowDefId + '-selected';
|
|
|
|
|
|
|
|
this.detectChangesSubject
|
|
|
|
|
|
|
|
.pipe(debounceTime(50))
|
|
|
|
|
|
|
|
.subscribe((/**
|
|
|
|
|
|
|
|
* @return {?}
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
function () { return _this.cd.detectChanges(); }));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Object.defineProperty(NgxFlowchartComponent.prototype, "canvasClass", {
|
|
|
|
Object.defineProperty(NgxFlowchartComponent.prototype, "canvasClass", {
|
|
|
|
get: /**
|
|
|
|
get: /**
|
|
|
|
@ -3207,7 +3201,7 @@ var NgxFlowchartComponent = /** @class */ (function () {
|
|
|
|
this.userNodeCallbacks = this.userCallbacks.nodeCallbacks;
|
|
|
|
this.userNodeCallbacks = this.userCallbacks.nodeCallbacks;
|
|
|
|
/** @type {?} */
|
|
|
|
/** @type {?} */
|
|
|
|
var element = $(this.elementRef.nativeElement);
|
|
|
|
var element = $(this.elementRef.nativeElement);
|
|
|
|
this.modelService = new FcModelService(this.modelValidation, this.model, this.modelChanged, this.cd, this.selectedObjects, this.userCallbacks.dropNode, this.userCallbacks.createEdge, this.userCallbacks.edgeAdded, this.userCallbacks.nodeRemoved, this.userCallbacks.edgeRemoved, element[0], element[0].querySelector('svg'));
|
|
|
|
this.modelService = new FcModelService(this.modelValidation, this.model, this.modelChanged, this.detectChangesSubject, this.selectedObjects, this.userCallbacks.dropNode, this.userCallbacks.createEdge, this.userCallbacks.edgeAdded, this.userCallbacks.nodeRemoved, this.userCallbacks.edgeRemoved, element[0], element[0].querySelector('svg'));
|
|
|
|
if (this.dropTargetId) {
|
|
|
|
if (this.dropTargetId) {
|
|
|
|
this.modelService.dropTargetId = this.dropTargetId;
|
|
|
|
this.modelService.dropTargetId = this.dropTargetId;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -3291,7 +3285,7 @@ var NgxFlowchartComponent = /** @class */ (function () {
|
|
|
|
this.adjustCanvasSize(this.fitModelSizeByDefault);
|
|
|
|
this.adjustCanvasSize(this.fitModelSizeByDefault);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (nodesChanged_1 || edgesChanged_1) {
|
|
|
|
if (nodesChanged_1 || edgesChanged_1) {
|
|
|
|
this.cd.detectChanges();
|
|
|
|
this.detectChangesSubject.next();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
@ -3624,6 +3618,11 @@ if (false) {
|
|
|
|
* @private
|
|
|
|
* @private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
NgxFlowchartComponent.prototype.edgesDiffer;
|
|
|
|
NgxFlowchartComponent.prototype.edgesDiffer;
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @type {?}
|
|
|
|
|
|
|
|
* @private
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
NgxFlowchartComponent.prototype.detectChangesSubject;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @type {?}
|
|
|
|
* @type {?}
|
|
|
|
* @private
|
|
|
|
* @private
|
|
|
|
|