orgchart 5.0.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish.yml +35 -0
- package/README.md +214 -123
- package/README.zh-cn.md +232 -100
- package/README.zh-tw.md +232 -100
- package/bower.json +6 -9
- package/demo/10000-nodes.html +139 -0
- package/demo/ajax-datasource.html +46 -45
- package/demo/bottom2top.html +12 -9
- package/demo/center-on-selected-node.html +21 -17
- package/demo/color-coded.html +12 -9
- package/demo/css/style.css +28 -0
- package/demo/custom-icons.html +12 -9
- package/demo/custom-template.html +12 -9
- package/demo/data-prop-compact.html +11 -8
- package/demo/data-prop-hybrid.html +79 -50
- package/demo/default-collapsed.html +12 -9
- package/demo/drag-drop-hybrid-chart.html +17 -14
- package/demo/drag-drop.html +21 -16
- package/demo/edit-chart.html +144 -94
- package/demo/edit-hybrid-chart.html +177 -135
- package/demo/expand-to-given-depth.html +30 -22
- package/demo/export-chart-pdf.html +12 -9
- package/demo/export-chart-with-pictures.html +19 -12
- package/demo/export-chart.html +12 -9
- package/demo/family-tree.html +14 -11
- package/demo/familytree-custom-properties.html +108 -0
- package/demo/filter-node.html +104 -57
- package/demo/get-hierarchy.html +17 -12
- package/demo/get-related-nodes.html +27 -17
- package/demo/index.html +10 -3
- package/demo/integrate-map.html +32 -27
- package/demo/left2right.html +12 -9
- package/demo/level-offset.html +16 -15
- package/demo/link-node.html +12 -9
- package/demo/local-datasource.html +11 -8
- package/demo/minimap.html +224 -0
- package/demo/nodes-of-different-widths.html +11 -8
- package/demo/ondemand-loading-data.html +166 -112
- package/demo/option-createNode.html +28 -17
- package/demo/options-compact-drag.html +82 -0
- package/demo/options-export-navigation.html +76 -0
- package/demo/options-horizontal-template.html +80 -0
- package/demo/options-hybrid-navigation.html +71 -0
- package/demo/pan-zoom.html +20 -11
- package/demo/reload-data.html +17 -14
- package/demo/report-path.html +59 -29
- package/demo/responsive-design.html +14 -11
- package/demo/right2left.html +12 -9
- package/demo/toggle-sibs-resp.html +12 -9
- package/demo/ul-datasource.html +11 -8
- package/demo/vertical-level.html +12 -9
- package/dist/css/{jquery.orgchart.css → orgchart.css} +154 -80
- package/dist/css/orgchart.min.css +1 -0
- package/dist/js/orgchart.js +4474 -0
- package/dist/js/orgchart.min.js +2 -0
- package/dist/js/orgchart.min.js.map +1 -0
- package/gulpfile.js +42 -27
- package/package.json +33 -32
- package/src/css/{jquery.orgchart.css → orgchart.css} +154 -80
- package/src/js/orgchart.js +4474 -0
- package/test/compatibility/README.md +123 -0
- package/test/compatibility/browser.tests.js +1279 -0
- package/test/compatibility/options.tests.js +628 -0
- package/test/cypress/e2e/demo-interactions.cy.js +91 -0
- package/test/cypress/e2e/demo-rendering.cy.js +161 -0
- package/test/cypress/e2e/drag-drop-hybrid-chart.cy.js +23 -0
- package/test/cypress/e2e/edit-chart.cy.js +20 -0
- package/test/cypress/e2e/level-offset.cy.js +21 -0
- package/test/cypress/e2e/local-datasource.cy.js +16 -16
- package/test/cypress/e2e/minimap.cy.js +66 -0
- package/test/cypress/e2e/ondemand-loading-data.cy.js +34 -10
- package/test/cypress/e2e/pan-zoom.cy.js +165 -0
- package/test/cypress/e2e/report-path.cy.js +20 -0
- package/test/cypress/e2e/toggle-sibs-resp.cy.js +4 -4
- package/test/cypress/e2e/vertical-vevel.cy.js +7 -5
- package/test/e2e/local-datasource/test.js +1 -1
- package/test/integration/init-tests.js +192 -99
- package/test/integration/tests.js +1043 -57
- package/test/unit/lifecycle-builders-export.tests.js +1487 -0
- package/test/unit/minimap.tests.js +210 -0
- package/test/unit/tests.js +2372 -253
- package/dist/css/jquery.orgchart.min.css +0 -1
- package/dist/js/jquery.orgchart.js +0 -1741
- package/dist/js/jquery.orgchart.min.js +0 -5
- package/dist/js/jquery.orgchart.min.js.map +0 -1
- package/src/js/jquery.orgchart.js +0 -1741
package/gulpfile.js
CHANGED
|
@@ -1,17 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
const gulp = require('gulp');
|
|
2
|
+
const { spawn } = require('node:child_process');
|
|
3
|
+
const browserSync = require('browser-sync').create();
|
|
4
|
+
const uglify = require('gulp-uglify');
|
|
5
|
+
const rename = require("gulp-rename");
|
|
6
|
+
const eslint = require('gulp-eslint');
|
|
7
|
+
const merge = require('ordered-read-streams');
|
|
8
|
+
const csslint = require('gulp-csslint');
|
|
9
|
+
const cleanCSS = require('gulp-clean-css');
|
|
10
|
+
const sourcemaps = require('gulp-sourcemaps');
|
|
11
|
+
const cypress = require('cypress');
|
|
12
|
+
const jest = require('gulp-jest').default;
|
|
13
|
+
const deletePaths = (patterns) => import('del').then(({ deleteAsync }) => deleteAsync(patterns));
|
|
14
|
+
const runMocha = (files) => new Promise(function (resolve, reject) {
|
|
15
|
+
const mochaProcess = spawn(process.execPath, [
|
|
16
|
+
require.resolve('mocha/bin/mocha.js'),
|
|
17
|
+
'--reporter', 'spec'
|
|
18
|
+
].concat(files), { stdio: 'inherit' });
|
|
19
|
+
|
|
20
|
+
mochaProcess.once('error', reject);
|
|
21
|
+
mochaProcess.once('exit', function (exitCode) {
|
|
22
|
+
if (exitCode === 0) {
|
|
23
|
+
resolve();
|
|
24
|
+
} else {
|
|
25
|
+
reject(new Error('Tests failed with exit code ' + exitCode));
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
const paths = {
|
|
15
30
|
src: 'src',
|
|
16
31
|
srcFiles: 'src/**/*',
|
|
17
32
|
srcHTML: 'src/**/*.html',
|
|
@@ -33,27 +48,27 @@ var paths = {
|
|
|
33
48
|
};
|
|
34
49
|
|
|
35
50
|
gulp.task('unit-tests', function () {
|
|
36
|
-
return
|
|
37
|
-
.pipe(mocha({reporter: 'spec'}));
|
|
51
|
+
return runMocha(['test/unit/*.js']);
|
|
38
52
|
});
|
|
39
53
|
|
|
40
54
|
gulp.task('integration-tests', gulp.series('unit-tests', function () {
|
|
41
|
-
return
|
|
42
|
-
.pipe(mocha({reporter: 'spec'}));
|
|
55
|
+
return runMocha(['test/integration/*.js']);
|
|
43
56
|
}));
|
|
44
57
|
|
|
58
|
+
gulp.task('compatibility-tests', function () {
|
|
59
|
+
return runMocha(['test/compatibility/*.tests.js']);
|
|
60
|
+
});
|
|
61
|
+
|
|
45
62
|
gulp.task('addAssets', gulp.series('integration-tests', function () {
|
|
46
|
-
|
|
63
|
+
const jsFiles = gulp.src([
|
|
47
64
|
paths.srcJS,
|
|
48
|
-
'node_modules/jquery/dist/jquery.min.js',
|
|
49
|
-
'node_modules/jquery-mockjax/dist/jquery.mockjax.min.js',
|
|
50
65
|
'node_modules/html2canvas/dist/html2canvas.min.js',
|
|
51
66
|
'node_modules/jspdf/dist/jspdf.umd.min.js',
|
|
52
67
|
'node_modules/json-digger/dist/json-digger.js'
|
|
53
68
|
])
|
|
54
69
|
.pipe(gulp.dest(paths.demoJSFolder));
|
|
55
70
|
|
|
56
|
-
|
|
71
|
+
const cssFiles = gulp.src(paths.srcCSS)
|
|
57
72
|
.pipe(gulp.dest(paths.demoCSSFolder));
|
|
58
73
|
|
|
59
74
|
return merge(jsFiles, cssFiles);
|
|
@@ -71,10 +86,10 @@ gulp.task('e2e-tests', gulp.series('addAssets', function () {
|
|
|
71
86
|
});
|
|
72
87
|
}));
|
|
73
88
|
|
|
74
|
-
gulp.task('test', gulp.series('e2e-tests'));
|
|
89
|
+
gulp.task('test', gulp.series('compatibility-tests', 'e2e-tests'));
|
|
75
90
|
|
|
76
91
|
gulp.task('cleanupJS', function() {
|
|
77
|
-
return
|
|
92
|
+
return deletePaths([paths.distJSFolder + '/**']);
|
|
78
93
|
});
|
|
79
94
|
|
|
80
95
|
gulp.task('eslint', function () {
|
|
@@ -88,13 +103,13 @@ gulp.task('js', gulp.series('cleanupJS', 'eslint', 'test', function () {
|
|
|
88
103
|
.pipe(gulp.dest(paths.distJSFolder))
|
|
89
104
|
.pipe(sourcemaps.init())
|
|
90
105
|
.pipe(uglify())
|
|
91
|
-
.pipe(rename('
|
|
106
|
+
.pipe(rename('orgchart.min.js'))
|
|
92
107
|
.pipe(sourcemaps.write('./'))
|
|
93
108
|
.pipe(gulp.dest(paths.distJSFolder));
|
|
94
109
|
}));
|
|
95
110
|
|
|
96
111
|
gulp.task('cleanupCSS', function() {
|
|
97
|
-
return
|
|
112
|
+
return deletePaths([paths.distCSSFolder + '/**']);
|
|
98
113
|
});
|
|
99
114
|
|
|
100
115
|
gulp.task('csslint', function() {
|
|
@@ -113,7 +128,7 @@ gulp.task('css', gulp.series('cleanupCSS', 'csslint', function () {
|
|
|
113
128
|
return gulp.src(paths.srcCSS)
|
|
114
129
|
.pipe(gulp.dest(paths.distCSSFolder))
|
|
115
130
|
.pipe(cleanCSS())
|
|
116
|
-
.pipe(rename('
|
|
131
|
+
.pipe(rename('orgchart.min.css'))
|
|
117
132
|
.pipe(gulp.dest(paths.distCSSFolder));
|
|
118
133
|
}));
|
|
119
134
|
|
package/package.json
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orgchart",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Simple and direct organization chart(tree-like hierarchy)
|
|
5
|
-
"main": "./dist/js/
|
|
3
|
+
"version": "7.0.0",
|
|
4
|
+
"description": "Simple and direct organization chart(tree-like hierarchy) library based on pure DOM.",
|
|
5
|
+
"main": "./dist/js/orgchart.min.js",
|
|
6
6
|
"style": [
|
|
7
|
-
"./dist/css/
|
|
7
|
+
"./dist/css/orgchart.min.css"
|
|
8
8
|
],
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test": "gulp test",
|
|
11
11
|
"unit-tests": "gulp unit-tests",
|
|
12
|
+
"integration-tests": "gulp integration-tests",
|
|
13
|
+
"compatibility-tests": "mocha test/compatibility/*.tests.js",
|
|
14
|
+
"e2e-tests": "gulp e2e-tests",
|
|
15
|
+
"addAssets": "gulp addAssets",
|
|
12
16
|
"build": "gulp build",
|
|
13
17
|
"start": "gulp serve",
|
|
14
18
|
"cypress:open": "cypress open"
|
|
@@ -18,11 +22,10 @@
|
|
|
18
22
|
},
|
|
19
23
|
"repository": {
|
|
20
24
|
"type": "git",
|
|
21
|
-
"url": "https://github.com/dabeng/OrgChart.git"
|
|
25
|
+
"url": "git+https://github.com/dabeng/OrgChart.git"
|
|
22
26
|
},
|
|
23
27
|
"keywords": [
|
|
24
|
-
"
|
|
25
|
-
"plugin",
|
|
28
|
+
"dom",
|
|
26
29
|
"organization",
|
|
27
30
|
"chart",
|
|
28
31
|
"orgchart",
|
|
@@ -38,36 +41,34 @@
|
|
|
38
41
|
"homepage": "https://github.com/dabeng/OrgChart#readme",
|
|
39
42
|
"dependencies": {
|
|
40
43
|
"html2canvas": "^1.4.1",
|
|
41
|
-
"jquery": "^3.6.2",
|
|
42
|
-
"jquery-mockjax": "^2.6.0",
|
|
43
44
|
"json-digger": "^2.0.2",
|
|
44
|
-
"jspdf": "^2.
|
|
45
|
+
"jspdf": "^4.2.1"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
|
-
"browser-sync": "^3.0.
|
|
48
|
-
"chai": "^
|
|
49
|
-
"cypress": "^
|
|
50
|
-
"del": "^
|
|
51
|
-
"gulp": "^5.0.
|
|
52
|
-
"gulp-clean-css": "^3.
|
|
48
|
+
"browser-sync": "^3.0.4",
|
|
49
|
+
"chai": "^6.2.2",
|
|
50
|
+
"cypress": "^15.20.0",
|
|
51
|
+
"del": "^8.0.1",
|
|
52
|
+
"gulp": "^5.0.1",
|
|
53
|
+
"gulp-clean-css": "^4.3.0",
|
|
53
54
|
"gulp-csslint": "^1.0.1",
|
|
54
|
-
"gulp-eslint": "^
|
|
55
|
-
"gulp-inject": "^
|
|
56
|
-
"gulp-jest": "^4.0.
|
|
57
|
-
"gulp-mocha": "^
|
|
58
|
-
"gulp-rename": "^1.
|
|
59
|
-
"gulp-sourcemaps": "^
|
|
55
|
+
"gulp-eslint": "^6.0.0",
|
|
56
|
+
"gulp-inject": "^5.0.5",
|
|
57
|
+
"gulp-jest": "^4.0.4",
|
|
58
|
+
"gulp-mocha": "^10.0.1",
|
|
59
|
+
"gulp-rename": "^2.1.0",
|
|
60
|
+
"gulp-sourcemaps": "^3.0.0",
|
|
60
61
|
"gulp-uglify": "^3.0.2",
|
|
61
|
-
"jest": "^
|
|
62
|
-
"jest-cli": "^
|
|
63
|
-
"jest-image-snapshot": "^6.
|
|
64
|
-
"jest-puppeteer": "^
|
|
65
|
-
"jsdom": "^
|
|
62
|
+
"jest": "^30.4.2",
|
|
63
|
+
"jest-cli": "^30.4.2",
|
|
64
|
+
"jest-image-snapshot": "^6.5.2",
|
|
65
|
+
"jest-puppeteer": "^11.0.0",
|
|
66
|
+
"jsdom": "^30.0.1",
|
|
66
67
|
"jsdom-global": "^3.0.2",
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"puppeteer": "^
|
|
70
|
-
"sinon": "^
|
|
71
|
-
"sinon-chai": "^
|
|
68
|
+
"mocha": "^11.8.0",
|
|
69
|
+
"ordered-read-streams": "^2.0.0",
|
|
70
|
+
"puppeteer": "^25.5.0",
|
|
71
|
+
"sinon": "^22.1.0",
|
|
72
|
+
"sinon-chai": "^4.0.1"
|
|
72
73
|
}
|
|
73
74
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
2
|
+
* JavaScript OrgChart Component
|
|
3
3
|
* https://github.com/dabeng/OrgChart
|
|
4
4
|
*
|
|
5
5
|
* Copyright 2016, dabeng
|
|
@@ -51,7 +51,9 @@
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.orgchart ~ .mask {
|
|
54
|
-
position:
|
|
54
|
+
position: sticky;
|
|
55
|
+
width: 100%;
|
|
56
|
+
height: 100%;
|
|
55
57
|
top: 0;
|
|
56
58
|
right: 0;
|
|
57
59
|
bottom: 0;
|
|
@@ -86,19 +88,89 @@
|
|
|
86
88
|
justify-content: center;
|
|
87
89
|
}
|
|
88
90
|
|
|
91
|
+
.orgchart-minimap {
|
|
92
|
+
position: absolute;
|
|
93
|
+
right: 12px;
|
|
94
|
+
bottom: 12px;
|
|
95
|
+
z-index: 25;
|
|
96
|
+
width: 180px;
|
|
97
|
+
height: 120px;
|
|
98
|
+
padding: 8px;
|
|
99
|
+
border: 1px solid rgba(68, 68, 68, 0.18);
|
|
100
|
+
border-radius: 8px;
|
|
101
|
+
background-color: rgba(255, 255, 255, 0.96);
|
|
102
|
+
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
|
|
103
|
+
box-sizing: border-box;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.orgchart-minimap-stage {
|
|
107
|
+
position: relative;
|
|
108
|
+
width: 100%;
|
|
109
|
+
height: 100%;
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
border-radius: 5px;
|
|
112
|
+
background-image: linear-gradient(rgba(68, 68, 68, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(68, 68, 68, 0.05) 1px, transparent 1px);
|
|
113
|
+
background-size: 10px 10px;
|
|
114
|
+
background-color: #f9fbfc;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.orgchart-minimap-content {
|
|
118
|
+
position: absolute;
|
|
119
|
+
top: 0;
|
|
120
|
+
left: 0;
|
|
121
|
+
pointer-events: none;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.orgchart-minimap-node {
|
|
125
|
+
position: absolute;
|
|
126
|
+
min-width: 6px;
|
|
127
|
+
height: 18px;
|
|
128
|
+
border-radius: 0;
|
|
129
|
+
opacity: 1;
|
|
130
|
+
box-shadow: none;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.orgchart-minimap .orgchart,
|
|
134
|
+
.orgchart-minimap .orgchart ul,
|
|
135
|
+
.orgchart-minimap .orgchart li,
|
|
136
|
+
.orgchart-minimap .orgchart .node,
|
|
137
|
+
.orgchart-minimap .orgchart .edge,
|
|
138
|
+
.orgchart-minimap .orgchart .verticalNodes,
|
|
139
|
+
.orgchart-minimap .orgchart .verticalNode,
|
|
140
|
+
.orgchart-minimap .orgchart .nodes,
|
|
141
|
+
.orgchart-minimap-node {
|
|
142
|
+
pointer-events: none;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.orgchart-minimap-viewport {
|
|
146
|
+
position: absolute;
|
|
147
|
+
top: 0;
|
|
148
|
+
left: 0;
|
|
149
|
+
min-width: 12px;
|
|
150
|
+
min-height: 12px;
|
|
151
|
+
border: 2px solid rgba(28, 111, 197, 0.9);
|
|
152
|
+
border-radius: 4px;
|
|
153
|
+
background-color: rgba(28, 111, 197, 0.12);
|
|
154
|
+
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9), 0 0 0 999px rgba(255, 255, 255, 0.12);
|
|
155
|
+
box-sizing: border-box;
|
|
156
|
+
cursor: move;
|
|
157
|
+
}
|
|
158
|
+
|
|
89
159
|
.orgchart .hierarchy {
|
|
90
160
|
position: relative;
|
|
91
161
|
}
|
|
92
162
|
|
|
93
163
|
/* styles of link lines */
|
|
94
164
|
.orgchart .hierarchy::before {
|
|
165
|
+
box-sizing: border-box;
|
|
95
166
|
content: "";
|
|
96
167
|
position: absolute;
|
|
97
168
|
top: -11px; /* -(background square size + half width of line) */
|
|
98
169
|
left: 0;
|
|
99
170
|
width: 100%;
|
|
100
|
-
border-
|
|
101
|
-
|
|
171
|
+
border-color: rgba(217, 83, 79, 0.8);
|
|
172
|
+
border-style: solid;
|
|
173
|
+
border-width: 2px 0 0 0;
|
|
102
174
|
}
|
|
103
175
|
|
|
104
176
|
/* 本姓人与上一层父母的连线,借助伪元素::before实现 */
|
|
@@ -111,7 +183,7 @@
|
|
|
111
183
|
/* 处理同一层中特殊的末节点 */
|
|
112
184
|
.orgchart .couple:last-child:not(:only-child)::before {
|
|
113
185
|
width: calc(50% + 71px);
|
|
114
|
-
left:
|
|
186
|
+
left: 0;
|
|
115
187
|
}
|
|
116
188
|
|
|
117
189
|
.orgchart .hierarchy.couple:only-child::before {
|
|
@@ -212,24 +284,24 @@
|
|
|
212
284
|
background-color: rgba(238, 217, 54, 0.5);
|
|
213
285
|
}
|
|
214
286
|
/* excluding root node */
|
|
215
|
-
.orgchart > ul > li > ul li > .node
|
|
287
|
+
.orgchart > ul > li > ul li > .node::before {
|
|
216
288
|
content: "";
|
|
217
289
|
position: absolute;
|
|
218
|
-
top: var(--top, -12px); /* -(fallback value = background square size + border width of node) */
|
|
219
290
|
left: calc(50% - 1px);
|
|
220
291
|
width: 2px;
|
|
221
|
-
height: var(--height, 10px); /* fallback value = background square size */
|
|
222
292
|
background-color: rgba(217, 83, 79, 0.8);
|
|
293
|
+
top: var(--top, -12px); /* -(fallback value = background square size + border width of node) */
|
|
294
|
+
height: var(--height, 10px); /* fallback value = background square size */
|
|
223
295
|
}
|
|
224
296
|
|
|
225
297
|
.orgchart > ul > li > ul li > .node.outsider::before {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
298
|
+
background-color: unset;
|
|
299
|
+
background-image: repeating-linear-gradient(
|
|
300
|
+
to bottom,
|
|
301
|
+
rgba(217, 83, 79, 0.8) 0 2px,
|
|
302
|
+
transparent 2px 4px
|
|
303
|
+
);
|
|
304
|
+
background-repeat: repeat-y;
|
|
233
305
|
}
|
|
234
306
|
|
|
235
307
|
.orgchart > ul > li > ul .isSiblingsCollapsed > .node::before {
|
|
@@ -471,19 +543,57 @@
|
|
|
471
543
|
bottom: -2px;
|
|
472
544
|
width: 16px;
|
|
473
545
|
height: 16px;
|
|
546
|
+
visibility: hidden;
|
|
547
|
+
background-color: rgba(68, 157, 68, 0.6);
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
.orgchart .node:hover > .toggleBtn,
|
|
551
|
+
.orgchart .node.controls-active > .toggleBtn {
|
|
552
|
+
visibility: visible;
|
|
474
553
|
}
|
|
475
554
|
|
|
476
555
|
.orgchart .node .toggleBtn::before {
|
|
477
|
-
|
|
556
|
+
content: "";
|
|
478
557
|
position: absolute;
|
|
479
|
-
left:
|
|
480
|
-
|
|
558
|
+
left: 3px;
|
|
559
|
+
top: 7px;
|
|
560
|
+
box-sizing: border-box;
|
|
561
|
+
width: 10px;
|
|
562
|
+
height: 2px;
|
|
563
|
+
border-radius: 1px;
|
|
564
|
+
background-color: #fff;
|
|
565
|
+
display: none;
|
|
481
566
|
}
|
|
482
567
|
|
|
483
|
-
.orgchart .node .toggleBtn:hover
|
|
568
|
+
.orgchart .node .toggleBtn:hover {
|
|
484
569
|
background-color: #449d44;
|
|
485
570
|
}
|
|
486
571
|
|
|
572
|
+
.orgchart .node .toggleBtn::after {
|
|
573
|
+
content: "";
|
|
574
|
+
position: absolute;
|
|
575
|
+
left: 7px;
|
|
576
|
+
top: 3px;
|
|
577
|
+
width: 2px;
|
|
578
|
+
height: 10px;
|
|
579
|
+
border-radius: 1px;
|
|
580
|
+
background-color: #fff;
|
|
581
|
+
display: none;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.orgchart .node .toggleBtn.oci-plus-square::before,
|
|
585
|
+
.orgchart .node .toggleBtn.oci-plus-square::after {
|
|
586
|
+
display: block;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.orgchart .node .toggleBtn.oci-minus-square::before {
|
|
590
|
+
display: block;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.orgchart .node .toggleBtn.oci-minus-square::after {
|
|
594
|
+
display: none;
|
|
595
|
+
}
|
|
596
|
+
|
|
487
597
|
.oc-export-btn {
|
|
488
598
|
margin-left: 0.5rem;
|
|
489
599
|
padding: 0.5rem 1rem;
|
|
@@ -560,24 +670,21 @@
|
|
|
560
670
|
content: '';
|
|
561
671
|
position: absolute;
|
|
562
672
|
left: -6px; /* -(background square size + half width of line */
|
|
673
|
+
width: 11px; /* background square size + half width of line */
|
|
563
674
|
border-color: rgba(217, 83, 79, 0.8);
|
|
564
675
|
border-style: solid;
|
|
565
|
-
border-width: 0 0 2px 2px;
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
.orgchart .nodes.vertical .hierarchy:only-child::before {
|
|
569
|
-
width: 11px;
|
|
570
676
|
}
|
|
571
677
|
|
|
572
678
|
.orgchart .nodes.vertical .hierarchy::before {
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
width:
|
|
679
|
+
height: 26px;
|
|
680
|
+
top: 0;
|
|
681
|
+
border-width: 0 0 2px 2px;
|
|
576
682
|
}
|
|
577
683
|
|
|
578
684
|
.orgchart .nodes.vertical .hierarchy::after {
|
|
685
|
+
height: calc(100% - 24px); /* node top half's height(25px) + half width of line */
|
|
579
686
|
bottom: 0;
|
|
580
|
-
|
|
687
|
+
border-width: 0 0 0 2px;
|
|
581
688
|
}
|
|
582
689
|
|
|
583
690
|
.orgchart .nodes.vertical .hierarchy:last-child::after {
|
|
@@ -585,7 +692,6 @@
|
|
|
585
692
|
}
|
|
586
693
|
|
|
587
694
|
.orgchart .nodes.vertical > .hierarchy:first-child::before {
|
|
588
|
-
box-sizing: border-box;
|
|
589
695
|
top: -11px; /* -(background square size + half width of line) */
|
|
590
696
|
height: 35px; /* node top half's height + node padding + node border width + background square size */
|
|
591
697
|
width: calc(50% + 2px);
|
|
@@ -593,19 +699,16 @@
|
|
|
593
699
|
}
|
|
594
700
|
|
|
595
701
|
.orgchart .nodes.vertical > .hierarchy:first-child::after {
|
|
596
|
-
box-sizing: border-box;
|
|
597
702
|
top: 24px; /* node bottom half's height(25px) - half border width of line */
|
|
598
|
-
width: 11px; /* backgroud square size + half border width of line */
|
|
599
703
|
border-width: 2px 0 0 2px;
|
|
600
704
|
}
|
|
601
705
|
|
|
602
|
-
.orgchart .nodes.vertical > .hierarchy:
|
|
706
|
+
.orgchart .nodes.vertical > .hierarchy:only-child::after {
|
|
603
707
|
border-width: 2px 0 0 0;
|
|
604
708
|
}
|
|
605
709
|
|
|
606
710
|
/* styles for compact nodes */
|
|
607
711
|
.orgchart .node.compact {
|
|
608
|
-
position: static;
|
|
609
712
|
display: grid;
|
|
610
713
|
width: 140px;
|
|
611
714
|
height: 50px;
|
|
@@ -613,7 +716,6 @@
|
|
|
613
716
|
}
|
|
614
717
|
|
|
615
718
|
.orgchart .node.compact.looseMode {
|
|
616
|
-
display: grid;
|
|
617
719
|
width: unset;
|
|
618
720
|
height: unset;
|
|
619
721
|
}
|
|
@@ -622,6 +724,16 @@
|
|
|
622
724
|
display: none;
|
|
623
725
|
}
|
|
624
726
|
|
|
727
|
+
.orgchart .nodes.compact-family {
|
|
728
|
+
display: grid;
|
|
729
|
+
grid-template-columns: repeat(var(--compact-columns, 2), max-content);
|
|
730
|
+
gap: 10px;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
.orgchart .node.compact:not(.looseMode) > .nodes {
|
|
734
|
+
display: none;
|
|
735
|
+
}
|
|
736
|
+
|
|
625
737
|
.orgchart .node.compact.looseMode > .node {
|
|
626
738
|
display: inline-block;
|
|
627
739
|
}
|
|
@@ -656,14 +768,14 @@
|
|
|
656
768
|
background-color: #eee;
|
|
657
769
|
}
|
|
658
770
|
|
|
659
|
-
.orgchart .node.compact::before {
|
|
771
|
+
/* .orgchart .node.compact::before {
|
|
660
772
|
top: var(--top-cross-point, -10px);
|
|
661
|
-
}
|
|
773
|
+
} */
|
|
662
774
|
|
|
663
775
|
.orgchart .node.compact > .content {
|
|
664
776
|
position: absolute;
|
|
665
|
-
top:
|
|
666
|
-
left:
|
|
777
|
+
top: 23px;
|
|
778
|
+
left: 3px;
|
|
667
779
|
}
|
|
668
780
|
|
|
669
781
|
.orgchart .node.compact.looseMode > .title {
|
|
@@ -672,8 +784,8 @@
|
|
|
672
784
|
}
|
|
673
785
|
|
|
674
786
|
.orgchart .node.compact.looseMode > .content {
|
|
675
|
-
top:
|
|
676
|
-
left:
|
|
787
|
+
top: 28px;
|
|
788
|
+
left: 8px;
|
|
677
789
|
}
|
|
678
790
|
|
|
679
791
|
.orgchart .node.compact > .node.compact.looseMode > .title {
|
|
@@ -706,33 +818,11 @@
|
|
|
706
818
|
|
|
707
819
|
.orgchart .node.compact > .backToCompactSymbol {
|
|
708
820
|
position: absolute;
|
|
709
|
-
top: 5px;
|
|
710
|
-
left: 5px;
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
.orgchart .node.compact.looseMode > .backToCompactSymbol {
|
|
714
|
-
top: 10px;
|
|
715
|
-
left: 10px;
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
.orgchart .node.compact > .node.compact.looseMode > .backToCompactSymbol {
|
|
719
821
|
top: 8px;
|
|
720
822
|
left: 8px;
|
|
721
823
|
}
|
|
722
824
|
|
|
723
|
-
.orgchart .node.compact > .node.compact > .backToCompactSymbol {
|
|
724
|
-
position: absolute;
|
|
725
|
-
top: 3px;
|
|
726
|
-
left: 3px;
|
|
727
|
-
}
|
|
728
|
-
|
|
729
825
|
.orgchart .node.compact > .backToLooseSymbol {
|
|
730
|
-
position: absolute;
|
|
731
|
-
top: 25px;
|
|
732
|
-
right: 5px;
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
.orgchart .node.compact > .node.compact > .backToLooseSymbol {
|
|
736
826
|
position: absolute;
|
|
737
827
|
top: 23px;
|
|
738
828
|
right: 3px;
|
|
@@ -859,27 +949,11 @@
|
|
|
859
949
|
}
|
|
860
950
|
|
|
861
951
|
.oci-plus-square::before {
|
|
862
|
-
content: "
|
|
863
|
-
display: inline-block;
|
|
864
|
-
width: 16px;
|
|
865
|
-
height: 16px;
|
|
866
|
-
text-align: center;
|
|
867
|
-
line-height: 16px;
|
|
868
|
-
background-color: #000;
|
|
869
|
-
color: #fff;
|
|
870
|
-
font-weight: bold;
|
|
952
|
+
content: "";
|
|
871
953
|
}
|
|
872
954
|
|
|
873
955
|
.oci-minus-square::before {
|
|
874
|
-
content: "
|
|
875
|
-
display: inline-block;
|
|
876
|
-
width: 16px;
|
|
877
|
-
height: 16px;
|
|
878
|
-
text-align: center;
|
|
879
|
-
line-height: 16px;
|
|
880
|
-
background-color: #000;
|
|
881
|
-
color: #fff;
|
|
882
|
-
font-weight: bold;
|
|
956
|
+
content: "";
|
|
883
957
|
}
|
|
884
958
|
|
|
885
959
|
.oci-arrow-square-up::before {
|