@syncfusion/ej2-angular-diagrams 26.1.35 → 26.1.40-ngcc
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/@syncfusion/ej2-angular-diagrams.es5.js +1333 -0
- package/@syncfusion/ej2-angular-diagrams.es5.js.map +1 -0
- package/@syncfusion/ej2-angular-diagrams.js +1252 -0
- package/@syncfusion/ej2-angular-diagrams.js.map +1 -0
- package/dist/ej2-angular-diagrams.umd.js +1755 -0
- package/dist/ej2-angular-diagrams.umd.js.map +1 -0
- package/dist/ej2-angular-diagrams.umd.min.js +11 -0
- package/dist/ej2-angular-diagrams.umd.min.js.map +1 -0
- package/ej2-angular-diagrams.d.ts +7 -0
- package/ej2-angular-diagrams.metadata.json +1 -0
- package/license +10 -0
- package/package.json +14 -28
- package/schematics/collection.json +0 -25
- package/src/diagram/connector-annotation.directive.d.ts +0 -5
- package/src/diagram/connector-fixeduserhandle.directive.d.ts +0 -5
- package/src/diagram/connectors.directive.d.ts +1 -6
- package/src/diagram/customcursor.directive.d.ts +0 -5
- package/src/diagram/diagram-all.module.d.ts +0 -6
- package/src/diagram/diagram.component.d.ts +0 -3
- package/src/diagram/diagram.module.d.ts +0 -15
- package/src/diagram/layers.directive.d.ts +0 -5
- package/src/diagram/node-annotation.directive.d.ts +0 -5
- package/src/diagram/node-fixeduserhandle.directive.d.ts +0 -5
- package/src/diagram/nodes.directive.d.ts +5 -10
- package/src/diagram/ports.directive.d.ts +0 -5
- package/src/overview/overview-all.module.d.ts +0 -6
- package/src/overview/overview.component.d.ts +0 -3
- package/src/overview/overview.module.d.ts +0 -6
- package/src/symbol-palette/palettes.directive.d.ts +0 -5
- package/src/symbol-palette/symbolpalette-all.module.d.ts +0 -6
- package/src/symbol-palette/symbolpalette.component.d.ts +0 -3
- package/src/symbol-palette/symbolpalette.module.d.ts +0 -7
- package/styles/diagram/fluent2.css +5 -5
- package/styles/fluent2.css +5 -5
- package/CHANGELOG.md +0 -2011
- package/esm2020/public_api.mjs +0 -2
- package/esm2020/src/diagram/connector-annotation.directive.mjs +0 -59
- package/esm2020/src/diagram/connector-fixeduserhandle.directive.mjs +0 -59
- package/esm2020/src/diagram/connectors.directive.mjs +0 -60
- package/esm2020/src/diagram/customcursor.directive.mjs +0 -54
- package/esm2020/src/diagram/diagram-all.module.mjs +0 -80
- package/esm2020/src/diagram/diagram.component.mjs +0 -224
- package/esm2020/src/diagram/diagram.module.mjs +0 -106
- package/esm2020/src/diagram/layers.directive.mjs +0 -54
- package/esm2020/src/diagram/node-annotation.directive.mjs +0 -59
- package/esm2020/src/diagram/node-fixeduserhandle.directive.mjs +0 -59
- package/esm2020/src/diagram/nodes.directive.mjs +0 -62
- package/esm2020/src/diagram/ports.directive.mjs +0 -59
- package/esm2020/src/index.mjs +0 -21
- package/esm2020/src/overview/overview-all.module.mjs +0 -23
- package/esm2020/src/overview/overview.component.mjs +0 -60
- package/esm2020/src/overview/overview.module.mjs +0 -25
- package/esm2020/src/symbol-palette/palettes.directive.mjs +0 -52
- package/esm2020/src/symbol-palette/symbolpalette-all.module.mjs +0 -23
- package/esm2020/src/symbol-palette/symbolpalette.component.mjs +0 -71
- package/esm2020/src/symbol-palette/symbolpalette.module.mjs +0 -34
- package/esm2020/syncfusion-ej2-angular-diagrams.mjs +0 -5
- package/fesm2015/syncfusion-ej2-angular-diagrams.mjs +0 -1143
- package/fesm2015/syncfusion-ej2-angular-diagrams.mjs.map +0 -1
- package/fesm2020/syncfusion-ej2-angular-diagrams.mjs +0 -1143
- package/fesm2020/syncfusion-ej2-angular-diagrams.mjs.map +0 -1
- package/schematics/generators/diagram-default-functionalities/index.d.ts +0 -3
- package/schematics/generators/diagram-default-functionalities/index.js +0 -8
- package/schematics/generators/diagram-default-functionalities/index.ts +0 -8
- package/schematics/generators/diagram-default-functionalities/sample-details.d.ts +0 -5
- package/schematics/generators/diagram-default-functionalities/sample-details.js +0 -7
- package/schematics/generators/diagram-default-functionalities/sample-details.ts +0 -5
- package/schematics/generators/diagram-default-functionalities/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.css +0 -0
- package/schematics/generators/diagram-default-functionalities/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +0 -125
- package/schematics/generators/diagram-default-functionalities/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +0 -91
- package/schematics/generators/diagram-default-functionalities/schema.d.ts +0 -3
- package/schematics/generators/diagram-default-functionalities/schema.js +0 -2
- package/schematics/generators/diagram-default-functionalities/schema.json +0 -125
- package/schematics/generators/diagram-default-functionalities/schema.ts +0 -3
- package/schematics/generators/diagram-hierarchical-tree/index.d.ts +0 -3
- package/schematics/generators/diagram-hierarchical-tree/index.js +0 -8
- package/schematics/generators/diagram-hierarchical-tree/index.ts +0 -8
- package/schematics/generators/diagram-hierarchical-tree/sample-details.d.ts +0 -5
- package/schematics/generators/diagram-hierarchical-tree/sample-details.js +0 -7
- package/schematics/generators/diagram-hierarchical-tree/sample-details.ts +0 -5
- package/schematics/generators/diagram-hierarchical-tree/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.css +0 -0
- package/schematics/generators/diagram-hierarchical-tree/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +0 -13
- package/schematics/generators/diagram-hierarchical-tree/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +0 -75
- package/schematics/generators/diagram-hierarchical-tree/samples/__path__/__name@dasherize@if-flat__/assets/diagram-data.ts +0 -670
- package/schematics/generators/diagram-hierarchical-tree/schema.d.ts +0 -3
- package/schematics/generators/diagram-hierarchical-tree/schema.js +0 -2
- package/schematics/generators/diagram-hierarchical-tree/schema.json +0 -125
- package/schematics/generators/diagram-hierarchical-tree/schema.ts +0 -3
- package/schematics/generators/diagram-organization-chart/index.d.ts +0 -3
- package/schematics/generators/diagram-organization-chart/index.js +0 -8
- package/schematics/generators/diagram-organization-chart/index.ts +0 -8
- package/schematics/generators/diagram-organization-chart/sample-details.d.ts +0 -5
- package/schematics/generators/diagram-organization-chart/sample-details.js +0 -7
- package/schematics/generators/diagram-organization-chart/sample-details.ts +0 -5
- package/schematics/generators/diagram-organization-chart/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.css +0 -0
- package/schematics/generators/diagram-organization-chart/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +0 -66
- package/schematics/generators/diagram-organization-chart/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +0 -179
- package/schematics/generators/diagram-organization-chart/samples/__path__/__name@dasherize@if-flat__/assets/diagram-data.ts +0 -670
- package/schematics/generators/diagram-organization-chart/schema.d.ts +0 -3
- package/schematics/generators/diagram-organization-chart/schema.js +0 -2
- package/schematics/generators/diagram-organization-chart/schema.json +0 -125
- package/schematics/generators/diagram-organization-chart/schema.ts +0 -3
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/Clayton.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/Jenny.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/John.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/Maria.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/Paul.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/Robin.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/Thomas.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/eric.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/female.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/image12.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/image2.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/image3.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/image50.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/image51.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/image53.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/image54.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/image55.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/image56.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/image57.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/images7.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/images9.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/male.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/moreinfo.png +0 -0
- package/schematics/generators/diagram-overview/images/__path__/__name@dasherize__/smith.png +0 -0
- package/schematics/generators/diagram-overview/index.d.ts +0 -3
- package/schematics/generators/diagram-overview/index.js +0 -8
- package/schematics/generators/diagram-overview/index.ts +0 -8
- package/schematics/generators/diagram-overview/sample-details.d.ts +0 -5
- package/schematics/generators/diagram-overview/sample-details.js +0 -7
- package/schematics/generators/diagram-overview/sample-details.ts +0 -5
- package/schematics/generators/diagram-overview/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.css +0 -0
- package/schematics/generators/diagram-overview/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +0 -19
- package/schematics/generators/diagram-overview/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +0 -98
- package/schematics/generators/diagram-overview/schema.d.ts +0 -3
- package/schematics/generators/diagram-overview/schema.js +0 -2
- package/schematics/generators/diagram-overview/schema.json +0 -125
- package/schematics/generators/diagram-overview/schema.ts +0 -3
- package/schematics/generators/diagram-radial-tree/index.d.ts +0 -3
- package/schematics/generators/diagram-radial-tree/index.js +0 -8
- package/schematics/generators/diagram-radial-tree/index.ts +0 -8
- package/schematics/generators/diagram-radial-tree/sample-details.d.ts +0 -5
- package/schematics/generators/diagram-radial-tree/sample-details.js +0 -7
- package/schematics/generators/diagram-radial-tree/sample-details.ts +0 -5
- package/schematics/generators/diagram-radial-tree/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.css +0 -0
- package/schematics/generators/diagram-radial-tree/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +0 -7
- package/schematics/generators/diagram-radial-tree/samples/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +0 -87
- package/schematics/generators/diagram-radial-tree/samples/__path__/__name@dasherize@if-flat__/assets/diagram-data.ts +0 -670
- package/schematics/generators/diagram-radial-tree/schema.d.ts +0 -3
- package/schematics/generators/diagram-radial-tree/schema.js +0 -2
- package/schematics/generators/diagram-radial-tree/schema.json +0 -125
- package/schematics/generators/diagram-radial-tree/schema.ts +0 -3
- package/schematics/ng-add/index.d.ts +0 -3
- package/schematics/ng-add/index.js +0 -9
- package/schematics/ng-add/schema.d.ts +0 -13
- package/schematics/ng-add/schema.js +0 -2
- package/schematics/utils/lib-details.d.ts +0 -4
- package/schematics/utils/lib-details.js +0 -6
- package/syncfusion-ej2-angular-diagrams.d.ts +0 -5
@@ -1,125 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
3
|
-
"$id": "EJ2SchemaTemplateID",
|
4
|
-
"title": "diagram-hierarchical-tree",
|
5
|
-
"type": "object",
|
6
|
-
"properties": {
|
7
|
-
"path": {
|
8
|
-
"type": "string",
|
9
|
-
"format": "path",
|
10
|
-
"description": "The path to create the component.",
|
11
|
-
"visible": false
|
12
|
-
},
|
13
|
-
"project": {
|
14
|
-
"type": "string",
|
15
|
-
"description": "The name of the project.",
|
16
|
-
"$default": {
|
17
|
-
"$source": "projectName"
|
18
|
-
}
|
19
|
-
},
|
20
|
-
"name": {
|
21
|
-
"type": "string",
|
22
|
-
"description": "The name of the component.",
|
23
|
-
"$default": {
|
24
|
-
"$source": "argv",
|
25
|
-
"index": 0
|
26
|
-
}
|
27
|
-
},
|
28
|
-
"inlineStyle": {
|
29
|
-
"description": "Specifies if the style will be in the ts file.",
|
30
|
-
"type": "boolean",
|
31
|
-
"default": false,
|
32
|
-
"alias": "s"
|
33
|
-
},
|
34
|
-
"inlineTemplate": {
|
35
|
-
"description": "Specifies if the template will be in the ts file.",
|
36
|
-
"type": "boolean",
|
37
|
-
"default": false,
|
38
|
-
"alias": "t"
|
39
|
-
},
|
40
|
-
"viewEncapsulation": {
|
41
|
-
"description": "Specifies the view encapsulation strategy.",
|
42
|
-
"enum": [
|
43
|
-
"Emulated",
|
44
|
-
"Native",
|
45
|
-
"None",
|
46
|
-
"ShadowDom"
|
47
|
-
],
|
48
|
-
"type": "string",
|
49
|
-
"alias": "v"
|
50
|
-
},
|
51
|
-
"changeDetection": {
|
52
|
-
"description": "Specifies the change detection strategy.",
|
53
|
-
"enum": [
|
54
|
-
"Default",
|
55
|
-
"OnPush"
|
56
|
-
],
|
57
|
-
"type": "string",
|
58
|
-
"default": "Default",
|
59
|
-
"alias": "c"
|
60
|
-
},
|
61
|
-
"prefix": {
|
62
|
-
"type": "string",
|
63
|
-
"description": "The prefix to apply to generated selectors.",
|
64
|
-
"alias": "p",
|
65
|
-
"oneOf": [
|
66
|
-
{
|
67
|
-
"maxLength": 0
|
68
|
-
},
|
69
|
-
{
|
70
|
-
"minLength": 1,
|
71
|
-
"format": "html-selector"
|
72
|
-
}
|
73
|
-
]
|
74
|
-
},
|
75
|
-
"styleext": {
|
76
|
-
"description": "The file extension to be used for style files.",
|
77
|
-
"type": "string",
|
78
|
-
"default": "css"
|
79
|
-
},
|
80
|
-
"spec": {
|
81
|
-
"type": "boolean",
|
82
|
-
"description": "Specifies if a spec file is generated.",
|
83
|
-
"default": true
|
84
|
-
},
|
85
|
-
"flat": {
|
86
|
-
"type": "boolean",
|
87
|
-
"description": "Flag to indicate if a dir is created.",
|
88
|
-
"default": false
|
89
|
-
},
|
90
|
-
"skipImport": {
|
91
|
-
"type": "boolean",
|
92
|
-
"description": "Flag to skip the module import.",
|
93
|
-
"default": false
|
94
|
-
},
|
95
|
-
"selector": {
|
96
|
-
"type": "string",
|
97
|
-
"format": "html-selector",
|
98
|
-
"description": "The selector to use for the component."
|
99
|
-
},
|
100
|
-
"module": {
|
101
|
-
"type": "string",
|
102
|
-
"description": "Allows specification of the declaring module.",
|
103
|
-
"alias": "m"
|
104
|
-
},
|
105
|
-
"export": {
|
106
|
-
"type": "boolean",
|
107
|
-
"default": false,
|
108
|
-
"description": "Specifies if declaring module exports the component."
|
109
|
-
},
|
110
|
-
"entryComponent": {
|
111
|
-
"type": "boolean",
|
112
|
-
"default": false,
|
113
|
-
"description": "Specifies if the component is an entry component of declaring module."
|
114
|
-
},
|
115
|
-
"lintFix": {
|
116
|
-
"type": "boolean",
|
117
|
-
"default": false,
|
118
|
-
"description": "Specifies whether to apply lint fixes after generating the component."
|
119
|
-
}
|
120
|
-
},
|
121
|
-
"required": [
|
122
|
-
"name"
|
123
|
-
],
|
124
|
-
"id": "diagram-hierarchical-tree"
|
125
|
-
}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const schematics_1 = require("@syncfusion/ej2-angular-base/schematics");
|
4
|
-
const sampleDetails = require("./sample-details");
|
5
|
-
function default_1(options) {
|
6
|
-
return schematics_1.componentBuilder(options, sampleDetails);
|
7
|
-
}
|
8
|
-
exports.default = default_1;
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import { Rule } from '@angular-devkit/schematics';
|
2
|
-
import { componentBuilder } from "@syncfusion/ej2-angular-base/schematics";
|
3
|
-
import { Schema } from './schema';
|
4
|
-
import * as sampleDetails from './sample-details';
|
5
|
-
|
6
|
-
export default function (options: Schema): Rule {
|
7
|
-
return componentBuilder(options, sampleDetails);
|
8
|
-
}
|
@@ -1,7 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.componentName = 'diagram';
|
4
|
-
exports.sampleName = 'organization-chart';
|
5
|
-
exports.diModules = null;
|
6
|
-
exports.packageName = '@syncfusion/ej2-angular-diagrams';
|
7
|
-
exports.libModules = 'DiagramModule';
|
@@ -1,5 +0,0 @@
|
|
1
|
-
export const componentName: string = 'diagram';
|
2
|
-
export const sampleName: string = 'organization-chart';
|
3
|
-
export const diModules: string = null;
|
4
|
-
export const packageName: string = '@syncfusion/ej2-angular-diagrams';
|
5
|
-
export const libModules: string = 'DiagramModule';
|
File without changes
|
@@ -1,66 +0,0 @@
|
|
1
|
-
<style>
|
2
|
-
.diagram-organizationalchart .image-pattern-style {
|
3
|
-
background-color: white;
|
4
|
-
background-size: contain;
|
5
|
-
background-repeat: no-repeat;
|
6
|
-
height: 75px;
|
7
|
-
width: calc((100% - 18px) / 3);
|
8
|
-
cursor: pointer;
|
9
|
-
border: 1px solid #D5D5D5;
|
10
|
-
background-position: center;
|
11
|
-
float: left;
|
12
|
-
}
|
13
|
-
|
14
|
-
.diagram-organizationalchart .row {
|
15
|
-
margin-left: 0px;
|
16
|
-
margin-right: 0px;
|
17
|
-
}
|
18
|
-
|
19
|
-
.diagram-organizationalchart .row-header {
|
20
|
-
font-size: 15px;
|
21
|
-
font-weight: 500;
|
22
|
-
}
|
23
|
-
|
24
|
-
.diagram-organizationalchart .sb-child-row {
|
25
|
-
padding-top: 8px;
|
26
|
-
}
|
27
|
-
|
28
|
-
.diagram-organizationalchart .row-header1 {
|
29
|
-
font-size: 12px;
|
30
|
-
padding-left: 2px;
|
31
|
-
font-weight: 400;
|
32
|
-
}
|
33
|
-
|
34
|
-
.diagram-organizationalchart .e-selected-style {
|
35
|
-
border-color: #006CE6;
|
36
|
-
border-width: 2px;
|
37
|
-
}
|
38
|
-
|
39
|
-
.diagram-organizationalchart .e-checkbox-wrapper .e-label {
|
40
|
-
font-size: 12px;
|
41
|
-
}
|
42
|
-
|
43
|
-
.diagram-organizationalchart .col-xs-6 {
|
44
|
-
padding-left: 0px;
|
45
|
-
padding-right: 0px;
|
46
|
-
}
|
47
|
-
</style>
|
48
|
-
<div class="control-section diagram-organizationalchart">
|
49
|
-
<div class="col-lg-8 control-section">
|
50
|
-
<div class="content-wrapper">
|
51
|
-
<ejs-diagram #diagram id="diagram" width="100%" height="700px" [getConnectorDefaults]='connDefaults'
|
52
|
-
[getNodeDefaults]='nodeDefaults' [layout]='layout' [dataSourceSettings]='data' [tool]='tool'
|
53
|
-
[snapSettings]='snapSettings'>
|
54
|
-
</ejs-diagram>
|
55
|
-
</div>
|
56
|
-
</div>
|
57
|
-
<div class="col-lg-4 property-section">
|
58
|
-
<div class="property-panel-header">
|
59
|
-
Properties
|
60
|
-
</div>
|
61
|
-
<div class="row property-panel-content" id="appearance">
|
62
|
-
<div class="row" style="padding-top: 10px">
|
63
|
-
</div>
|
64
|
-
</div>
|
65
|
-
</div>
|
66
|
-
</div>
|
@@ -1,179 +0,0 @@
|
|
1
|
-
import { Component, ViewEncapsulation, ViewChild } from '@angular/core';
|
2
|
-
import { ChangeEventArgs as NumericChangeEventArgs } from '@syncfusion/ej2-inputs';
|
3
|
-
import {
|
4
|
-
DiagramComponent, Diagram, NodeModel, ConnectorModel, LayoutOrientation, LayoutAnimation, TreeInfo, SnapSettingsModel,
|
5
|
-
SubTreeOrientation, SubTreeAlignments, DiagramTools, Node, DataBinding, HierarchicalTree, SnapConstraints
|
6
|
-
} from '@syncfusion/ej2-angular-diagrams';
|
7
|
-
import { DataManager } from '@syncfusion/ej2-data';
|
8
|
-
import { localBindData } from './assets/diagram-data';
|
9
|
-
Diagram.Inject(DataBinding, HierarchicalTree, LayoutAnimation);
|
10
|
-
|
11
|
-
export interface EmployeeInfo {
|
12
|
-
Role: string;
|
13
|
-
color: string;
|
14
|
-
}
|
15
|
-
export interface DataInfo {
|
16
|
-
[key: string]: string;
|
17
|
-
}
|
18
|
-
|
19
|
-
/**
|
20
|
-
* Sample for Organizational Chart
|
21
|
-
*/
|
22
|
-
@Component({
|
23
|
-
selector: '<%=dasherize(selector)%>',
|
24
|
-
templateUrl: '<%=dasherize(name)%>.component.html',
|
25
|
-
encapsulation: ViewEncapsulation.None
|
26
|
-
})
|
27
|
-
export class <%= classify(name) %>Component {
|
28
|
-
@ViewChild('diagram')
|
29
|
-
public diagram: DiagramComponent;
|
30
|
-
public snapSettings: SnapSettingsModel = { constraints: SnapConstraints.None };
|
31
|
-
public tool: DiagramTools = DiagramTools.ZoomPan;
|
32
|
-
public data: Object = {
|
33
|
-
id: 'Id', parentId: 'Manager',
|
34
|
-
dataManager: new DataManager(localBindData as JSON[]),
|
35
|
-
doBinding: (nodeModel: NodeModel, data: object, diagram: Diagram) => {
|
36
|
-
nodeModel.shape = {
|
37
|
-
type: 'Text', content: (data as EmployeeInfo).Role,
|
38
|
-
margin: { left: 10, right: 10, top: 10, bottom: 10 }
|
39
|
-
};
|
40
|
-
}
|
41
|
-
};
|
42
|
-
public layout: Object = {
|
43
|
-
type: 'OrganizationalChart',
|
44
|
-
getLayoutInfo: (node: Node, options: TreeInfo) => {
|
45
|
-
/* tslint:disable:no-string-literal */
|
46
|
-
if ((node.data as DataInfo)['Role'] === 'General Manager') {
|
47
|
-
options.assistants.push(options.children[0]);
|
48
|
-
options.children.splice(0, 1);
|
49
|
-
}
|
50
|
-
if (!options.hasSubTree) {
|
51
|
-
options.type = 'Right';
|
52
|
-
}
|
53
|
-
}
|
54
|
-
};
|
55
|
-
|
56
|
-
//Defines the default node and connector properties
|
57
|
-
public nodeDefaults(obj: NodeModel): NodeModel {
|
58
|
-
obj.backgroundColor = (obj.data as EmployeeInfo).color;
|
59
|
-
obj.style = { fill: 'none', strokeColor: 'none', color: 'white' };
|
60
|
-
obj.expandIcon = { height: 10, width: 10, shape: 'None', fill: 'lightgray', offset: { x: .5, y: 1 } };
|
61
|
-
obj.expandIcon.verticalAlignment = 'Center';
|
62
|
-
obj.expandIcon.margin = { left: 0, right: 0, top: 0, bottom: 0 };
|
63
|
-
obj.collapseIcon.offset = { x: .5, y: 1 };
|
64
|
-
obj.collapseIcon.verticalAlignment = 'Center';
|
65
|
-
obj.collapseIcon.margin = { left: 0, right: 0, top: 0, bottom: 0 };
|
66
|
-
obj.collapseIcon.height = 10;
|
67
|
-
obj.collapseIcon.width = 10;
|
68
|
-
obj.collapseIcon.shape = 'None';
|
69
|
-
obj.collapseIcon.fill = 'lightgray';
|
70
|
-
obj.width = 120;
|
71
|
-
obj.height = 30;
|
72
|
-
return obj;
|
73
|
-
};
|
74
|
-
public connDefaults(connector: ConnectorModel, diagram: Diagram): ConnectorModel {
|
75
|
-
connector.targetDecorator.shape = 'None';
|
76
|
-
connector.type = 'Orthogonal';
|
77
|
-
connector.constraints = 0;
|
78
|
-
connector.cornerRadius = 0;
|
79
|
-
return connector;
|
80
|
-
}
|
81
|
-
ngOnInit(): void {
|
82
|
-
document.getElementById('appearance').onclick = this.documentClick.bind(this);
|
83
|
-
}
|
84
|
-
private documentClick(args: MouseEvent): void {
|
85
|
-
let layoutOrientation: LayoutOrientation;
|
86
|
-
let subTreeOrientation: SubTreeOrientation;
|
87
|
-
let subTreeAlignment: SubTreeAlignments;
|
88
|
-
let target: HTMLElement = args.target as HTMLElement;
|
89
|
-
let selectedElement: HTMLCollection = document.getElementsByClassName('e-selected-style');
|
90
|
-
if (selectedElement.length) {
|
91
|
-
selectedElement[0].classList.remove('e-selected-style');
|
92
|
-
}
|
93
|
-
if (target.className === 'image-pattern-style') {
|
94
|
-
switch (target.id) {
|
95
|
-
case 'pattern1':
|
96
|
-
subTreeOrientation = 'Vertical';
|
97
|
-
subTreeAlignment = 'Alternate';
|
98
|
-
break;
|
99
|
-
case 'pattern2':
|
100
|
-
subTreeOrientation = 'Vertical';
|
101
|
-
subTreeAlignment = 'Left';
|
102
|
-
break;
|
103
|
-
case 'pattern3':
|
104
|
-
subTreeOrientation = 'Vertical';
|
105
|
-
subTreeAlignment = 'Left';
|
106
|
-
break;
|
107
|
-
case 'pattern4':
|
108
|
-
subTreeOrientation = 'Vertical';
|
109
|
-
subTreeAlignment = 'Right';
|
110
|
-
break;
|
111
|
-
case 'pattern5':
|
112
|
-
subTreeOrientation = 'Vertical';
|
113
|
-
subTreeAlignment = 'Right';
|
114
|
-
break;
|
115
|
-
case 'pattern6':
|
116
|
-
subTreeOrientation = 'Horizontal';
|
117
|
-
subTreeAlignment = 'Balanced';
|
118
|
-
break;
|
119
|
-
case 'pattern7':
|
120
|
-
subTreeOrientation = 'Horizontal';
|
121
|
-
subTreeAlignment = 'Center';
|
122
|
-
break;
|
123
|
-
case 'pattern8':
|
124
|
-
subTreeOrientation = 'Horizontal';
|
125
|
-
subTreeAlignment = 'Left';
|
126
|
-
break;
|
127
|
-
case 'pattern9':
|
128
|
-
subTreeOrientation = 'Horizontal';
|
129
|
-
subTreeAlignment = 'Right';
|
130
|
-
break;
|
131
|
-
case 'topToBottom':
|
132
|
-
layoutOrientation = 'TopToBottom';
|
133
|
-
break;
|
134
|
-
case 'bottomToTop':
|
135
|
-
layoutOrientation = 'BottomToTop';
|
136
|
-
break;
|
137
|
-
case 'leftToRight':
|
138
|
-
layoutOrientation = 'LeftToRight';
|
139
|
-
break;
|
140
|
-
case 'rightToLeft':
|
141
|
-
layoutOrientation = 'RightToLeft';
|
142
|
-
break;
|
143
|
-
}
|
144
|
-
if (layoutOrientation || subTreeOrientation) {
|
145
|
-
if (layoutOrientation) {
|
146
|
-
this.diagram.layout.orientation = layoutOrientation;
|
147
|
-
}
|
148
|
-
target.classList.add('e-selected-style');
|
149
|
-
}
|
150
|
-
this.diagram.layout.getLayoutInfo = (node: NodeModel, options: TreeInfo) => {
|
151
|
-
if (target.id === 'pattern4' || target.id === 'pattern3') {
|
152
|
-
options.offset = -50;
|
153
|
-
}
|
154
|
-
if ((node.data as DataInfo)['Role'] === 'General Manager') {
|
155
|
-
options.assistants.push(options.children[0]);
|
156
|
-
options.children.splice(0, 1);
|
157
|
-
}
|
158
|
-
if (!options.hasSubTree) {
|
159
|
-
options.orientation = subTreeOrientation;
|
160
|
-
options.type = subTreeAlignment;
|
161
|
-
}
|
162
|
-
};
|
163
|
-
|
164
|
-
this.diagram.doLayout();
|
165
|
-
this.diagram.dataBind();
|
166
|
-
}
|
167
|
-
};
|
168
|
-
|
169
|
-
public onhSpacingChange(args: NumericChangeEventArgs): void {
|
170
|
-
this.diagram.layout.horizontalSpacing = Number(args.value);
|
171
|
-
this.diagram.dataBind();
|
172
|
-
}
|
173
|
-
|
174
|
-
public onvSpacingChange(args: NumericChangeEventArgs): void {
|
175
|
-
this.diagram.layout.verticalSpacing = Number(args.value);
|
176
|
-
this.diagram.dataBind();
|
177
|
-
}
|
178
|
-
|
179
|
-
}
|