devextreme-angular
Version:
Angular UI and visualization components based on DevExtreme widgets
30 lines (28 loc) • 21.2 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/platform-browser"),require("@angular/core"),require("devextreme/ui/diagram"),require("devextreme-angular/core"),require("devextreme-angular/ui/nested")):"function"==typeof define&&define.amd?define("devextreme-angular/ui/diagram",["exports","@angular/platform-browser","@angular/core","devextreme/ui/diagram","devextreme-angular/core","devextreme-angular/ui/nested"],t):t(((e=e||self)["devextreme-angular"]=e["devextreme-angular"]||{},e["devextreme-angular"].ui=e["devextreme-angular"].ui||{},e["devextreme-angular"].ui.diagram={}),e.ng.platformBrowser,e.ng.core,e.DxDiagram,e["devextreme-angular"].core,e["devextreme-angular"].ui.nested)}(this,(function(e,t,o,n,i,p){"use strict";n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)};function u(e,t,o,n){var i,p=arguments.length,r=p<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var u=e.length-1;u>=0;u--)(i=e[u])&&(r=(p<3?i(r):p>3?i(t,o,r):i(t,o))||r);return p>3&&r&&Object.defineProperty(t,o,r),r}function s(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}
/*!
* devextreme-angular
* Version: 20.2.5
* Build date: Fri Jan 15 2021
*
* Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file in the root of the project for details.
*
* https://github.com/DevExpress/devextreme-angular
*/
var a=function(e){function a(t,o,n,i,p,r,u,s){var a=e.call(this,t,o,n,i,u,s)||this;return a._watcherHelper=i,a._idh=p,a._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"customCommand",emit:"onCustomCommand"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"itemClick",emit:"onItemClick"},{subscribe:"itemDblClick",emit:"onItemDblClick"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"requestEditOperation",emit:"onRequestEditOperation"},{subscribe:"requestLayoutUpdate",emit:"onRequestLayoutUpdate"},{subscribe:"selectionChanged",emit:"onSelectionChanged"},{emit:"autoZoomModeChange"},{emit:"contextMenuChange"},{emit:"contextToolboxChange"},{emit:"customShapesChange"},{emit:"customShapeTemplateChange"},{emit:"customShapeToolboxTemplateChange"},{emit:"defaultItemPropertiesChange"},{emit:"disabledChange"},{emit:"edgesChange"},{emit:"editingChange"},{emit:"elementAttrChange"},{emit:"exportChange"},{emit:"fullScreenChange"},{emit:"gridSizeChange"},{emit:"hasChangesChange"},{emit:"heightChange"},{emit:"historyToolbarChange"},{emit:"mainToolbarChange"},{emit:"nodesChange"},{emit:"pageColorChange"},{emit:"pageOrientationChange"},{emit:"pageSizeChange"},{emit:"propertiesPanelChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"showGridChange"},{emit:"simpleViewChange"},{emit:"snapToGridChange"},{emit:"toolboxChange"},{emit:"unitsChange"},{emit:"viewToolbarChange"},{emit:"viewUnitsChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"zoomLevelChange"}]),a._idh.setHost(a),r.setHost(a),a}var l,d;return function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}(a,e),Object.defineProperty(a.prototype,"autoZoomMode",{get:function(){return this._getOption("autoZoomMode")},set:function(e){this._setOption("autoZoomMode",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"contextMenu",{get:function(){return this._getOption("contextMenu")},set:function(e){this._setOption("contextMenu",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"contextToolbox",{get:function(){return this._getOption("contextToolbox")},set:function(e){this._setOption("contextToolbox",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"customShapes",{get:function(){return this._getOption("customShapes")},set:function(e){this._setOption("customShapes",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"customShapeTemplate",{get:function(){return this._getOption("customShapeTemplate")},set:function(e){this._setOption("customShapeTemplate",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"customShapeToolboxTemplate",{get:function(){return this._getOption("customShapeToolboxTemplate")},set:function(e){this._setOption("customShapeToolboxTemplate",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"defaultItemProperties",{get:function(){return this._getOption("defaultItemProperties")},set:function(e){this._setOption("defaultItemProperties",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"disabled",{get:function(){return this._getOption("disabled")},set:function(e){this._setOption("disabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"edges",{get:function(){return this._getOption("edges")},set:function(e){this._setOption("edges",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"editing",{get:function(){return this._getOption("editing")},set:function(e){this._setOption("editing",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"elementAttr",{get:function(){return this._getOption("elementAttr")},set:function(e){this._setOption("elementAttr",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"export",{get:function(){return this._getOption("export")},set:function(e){this._setOption("export",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"fullScreen",{get:function(){return this._getOption("fullScreen")},set:function(e){this._setOption("fullScreen",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"gridSize",{get:function(){return this._getOption("gridSize")},set:function(e){this._setOption("gridSize",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"hasChanges",{get:function(){return this._getOption("hasChanges")},set:function(e){this._setOption("hasChanges",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"height",{get:function(){return this._getOption("height")},set:function(e){this._setOption("height",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"historyToolbar",{get:function(){return this._getOption("historyToolbar")},set:function(e){this._setOption("historyToolbar",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"mainToolbar",{get:function(){return this._getOption("mainToolbar")},set:function(e){this._setOption("mainToolbar",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"nodes",{get:function(){return this._getOption("nodes")},set:function(e){this._setOption("nodes",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"pageColor",{get:function(){return this._getOption("pageColor")},set:function(e){this._setOption("pageColor",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"pageOrientation",{get:function(){return this._getOption("pageOrientation")},set:function(e){this._setOption("pageOrientation",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"pageSize",{get:function(){return this._getOption("pageSize")},set:function(e){this._setOption("pageSize",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"propertiesPanel",{get:function(){return this._getOption("propertiesPanel")},set:function(e){this._setOption("propertiesPanel",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"readOnly",{get:function(){return this._getOption("readOnly")},set:function(e){this._setOption("readOnly",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"rtlEnabled",{get:function(){return this._getOption("rtlEnabled")},set:function(e){this._setOption("rtlEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"showGrid",{get:function(){return this._getOption("showGrid")},set:function(e){this._setOption("showGrid",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"simpleView",{get:function(){return this._getOption("simpleView")},set:function(e){this._setOption("simpleView",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"snapToGrid",{get:function(){return this._getOption("snapToGrid")},set:function(e){this._setOption("snapToGrid",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"toolbox",{get:function(){return this._getOption("toolbox")},set:function(e){this._setOption("toolbox",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"units",{get:function(){return this._getOption("units")},set:function(e){this._setOption("units",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"viewToolbar",{get:function(){return this._getOption("viewToolbar")},set:function(e){this._setOption("viewToolbar",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"viewUnits",{get:function(){return this._getOption("viewUnits")},set:function(e){this._setOption("viewUnits",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"visible",{get:function(){return this._getOption("visible")},set:function(e){this._setOption("visible",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"width",{get:function(){return this._getOption("width")},set:function(e){this._setOption("width",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"zoomLevel",{get:function(){return this._getOption("zoomLevel")},set:function(e){this._setOption("zoomLevel",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"customShapesChildren",{get:function(){return this._getOption("customShapes")},set:function(e){this.setChildren("customShapes",e)},enumerable:!0,configurable:!0}),a.prototype._createInstance=function(e,t){return new n(e,t)},a.prototype.ngOnDestroy=function(){this._destroyWidget()},a.prototype.ngOnChanges=function(t){e.prototype.ngOnChanges.call(this,t),this.setupChanges("customShapes",t)},a.prototype.setupChanges=function(e,t){e in this._optionsToUpdate||this._idh.setup(e,t)},a.prototype.ngDoCheck=function(){this._idh.doCheck("customShapes"),this._watcherHelper.checkWatchers(),e.prototype.ngDoCheck.call(this),e.prototype.clearChangedOptions.call(this)},a.prototype._setOption=function(t,o){var n=this._idh.setupSingle(t,o),i=null!==this._idh.getChanges(t,o);(n||i)&&e.prototype._setOption.call(this,t,o)},a.ctorParameters=function(){return[{type:o.ElementRef},{type:o.NgZone},{type:i.DxTemplateHost},{type:i.WatcherHelper},{type:i.IterableDifferHelper},{type:i.NestedOptionHost},{type:t.TransferState},{type:void 0,decorators:[{type:o.Inject,args:[o.PLATFORM_ID]}]}]},u([o.Input(),s("design:type",String),s("design:paramtypes",[String])],a.prototype,"autoZoomMode",null),u([o.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"contextMenu",null),u([o.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"contextToolbox",null),u([o.Input(),s("design:type",Array),s("design:paramtypes",[Array])],a.prototype,"customShapes",null),u([o.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"customShapeTemplate",null),u([o.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"customShapeToolboxTemplate",null),u([o.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"defaultItemProperties",null),u([o.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],a.prototype,"disabled",null),u([o.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"edges",null),u([o.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"editing",null),u([o.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"elementAttr",null),u([o.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"export",null),u([o.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],a.prototype,"fullScreen",null),u([o.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"gridSize",null),u([o.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],a.prototype,"hasChanges",null),u([o.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"height",null),u([o.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"historyToolbar",null),u([o.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"mainToolbar",null),u([o.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"nodes",null),u([o.Input(),s("design:type",String),s("design:paramtypes",[String])],a.prototype,"pageColor",null),u([o.Input(),s("design:type",String),s("design:paramtypes",[String])],a.prototype,"pageOrientation",null),u([o.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"pageSize",null),u([o.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"propertiesPanel",null),u([o.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],a.prototype,"readOnly",null),u([o.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],a.prototype,"rtlEnabled",null),u([o.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],a.prototype,"showGrid",null),u([o.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],a.prototype,"simpleView",null),u([o.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],a.prototype,"snapToGrid",null),u([o.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"toolbox",null),u([o.Input(),s("design:type",String),s("design:paramtypes",[String])],a.prototype,"units",null),u([o.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"viewToolbar",null),u([o.Input(),s("design:type",String),s("design:paramtypes",[String])],a.prototype,"viewUnits",null),u([o.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],a.prototype,"visible",null),u([o.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"width",null),u([o.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"zoomLevel",null),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"onContentReady",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"onCustomCommand",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"onDisposing",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"onInitialized",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"onItemClick",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"onItemDblClick",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"onOptionChanged",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"onRequestEditOperation",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"onRequestLayoutUpdate",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"onSelectionChanged",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"autoZoomModeChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"contextMenuChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"contextToolboxChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"customShapesChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"customShapeTemplateChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"customShapeToolboxTemplateChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"defaultItemPropertiesChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"disabledChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"edgesChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"editingChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"elementAttrChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"exportChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"fullScreenChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"gridSizeChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"hasChangesChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"heightChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"historyToolbarChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"mainToolbarChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"nodesChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"pageColorChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"pageOrientationChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"pageSizeChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"propertiesPanelChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"readOnlyChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"rtlEnabledChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"showGridChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"simpleViewChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"snapToGridChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"toolboxChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"unitsChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"viewToolbarChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"viewUnitsChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"visibleChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"widthChange",void 0),u([o.Output(),s("design:type",o.EventEmitter)],a.prototype,"zoomLevelChange",void 0),u([o.ContentChildren(p.DxiCustomShapeComponent),s("design:type",o.QueryList),s("design:paramtypes",[Object])],a.prototype,"customShapesChildren",null),a=u([o.Component({selector:"dx-diagram",template:"",providers:[i.DxTemplateHost,i.WatcherHelper,i.NestedOptionHost,i.IterableDifferHelper]}),(l=7,d=o.Inject(o.PLATFORM_ID),function(e,t){d(e,t,l)}),s("design:paramtypes",[o.ElementRef,o.NgZone,i.DxTemplateHost,i.WatcherHelper,i.IterableDifferHelper,i.NestedOptionHost,t.TransferState,Object])],a)}(i.DxComponent),l=function(){function e(){}return e=u([o.NgModule({imports:[p.DxoContextMenuModule,p.DxiCommandModule,p.DxiItemModule,p.DxoContextToolboxModule,p.DxiCustomShapeModule,p.DxiConnectionPointModule,p.DxoDefaultItemPropertiesModule,p.DxoEdgesModule,p.DxoEditingModule,p.DxoExportModule,p.DxoGridSizeModule,p.DxoHistoryToolbarModule,p.DxoMainToolbarModule,p.DxoNodesModule,p.DxoAutoLayoutModule,p.DxoPageSizeModule,p.DxoPropertiesPanelModule,p.DxiTabModule,p.DxiGroupModule,p.DxoToolboxModule,p.DxoViewToolbarModule,p.DxoZoomLevelModule,i.DxIntegrationModule,i.DxTemplateModule,t.BrowserTransferStateModule],declarations:[a],exports:[a,p.DxoContextMenuModule,p.DxiCommandModule,p.DxiItemModule,p.DxoContextToolboxModule,p.DxiCustomShapeModule,p.DxiConnectionPointModule,p.DxoDefaultItemPropertiesModule,p.DxoEdgesModule,p.DxoEditingModule,p.DxoExportModule,p.DxoGridSizeModule,p.DxoHistoryToolbarModule,p.DxoMainToolbarModule,p.DxoNodesModule,p.DxoAutoLayoutModule,p.DxoPageSizeModule,p.DxoPropertiesPanelModule,p.DxiTabModule,p.DxiGroupModule,p.DxoToolboxModule,p.DxoViewToolbarModule,p.DxoZoomLevelModule,i.DxTemplateModule]})],e)}();e.DxDiagramComponent=a,e.DxDiagramModule=l,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=devextreme-angular-ui-diagram.umd.min.js.map