orgchart 6.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.
Files changed (35) hide show
  1. package/.github/workflows/publish.yml +11 -8
  2. package/README.md +47 -35
  3. package/README.zh-cn.md +73 -30
  4. package/README.zh-tw.md +73 -30
  5. package/demo/edit-chart.html +0 -4
  6. package/demo/edit-hybrid-chart.html +3 -4
  7. package/demo/index.html +5 -1
  8. package/demo/ondemand-loading-data.html +137 -80
  9. package/demo/options-compact-drag.html +82 -0
  10. package/demo/options-export-navigation.html +76 -0
  11. package/demo/options-horizontal-template.html +80 -0
  12. package/demo/options-hybrid-navigation.html +71 -0
  13. package/dist/css/orgchart.css +12 -1
  14. package/dist/css/orgchart.min.css +1 -1
  15. package/dist/js/orgchart.js +896 -523
  16. package/dist/js/orgchart.min.js +1 -1
  17. package/dist/js/orgchart.min.js.map +1 -1
  18. package/gulpfile.js +5 -1
  19. package/package.json +2 -1
  20. package/src/css/orgchart.css +12 -1
  21. package/src/js/orgchart.js +896 -523
  22. package/test/compatibility/README.md +123 -0
  23. package/test/compatibility/browser.tests.js +1279 -0
  24. package/test/compatibility/options.tests.js +628 -0
  25. package/test/cypress/e2e/demo-interactions.cy.js +3 -3
  26. package/test/cypress/e2e/demo-rendering.cy.js +62 -1
  27. package/test/cypress/e2e/drag-drop-hybrid-chart.cy.js +2 -1
  28. package/test/cypress/e2e/local-datasource.cy.js +16 -16
  29. package/test/cypress/e2e/ondemand-loading-data.cy.js +34 -10
  30. package/test/cypress/e2e/toggle-sibs-resp.cy.js +4 -4
  31. package/test/cypress/e2e/vertical-vevel.cy.js +5 -5
  32. package/test/integration/init-tests.js +30 -43
  33. package/test/integration/tests.js +21 -13
  34. package/test/unit/lifecycle-builders-export.tests.js +179 -118
  35. package/test/unit/tests.js +33 -34
package/gulpfile.js CHANGED
@@ -55,6 +55,10 @@ gulp.task('integration-tests', gulp.series('unit-tests', function () {
55
55
  return runMocha(['test/integration/*.js']);
56
56
  }));
57
57
 
58
+ gulp.task('compatibility-tests', function () {
59
+ return runMocha(['test/compatibility/*.tests.js']);
60
+ });
61
+
58
62
  gulp.task('addAssets', gulp.series('integration-tests', function () {
59
63
  const jsFiles = gulp.src([
60
64
  paths.srcJS,
@@ -82,7 +86,7 @@ gulp.task('e2e-tests', gulp.series('addAssets', function () {
82
86
  });
83
87
  }));
84
88
 
85
- gulp.task('test', gulp.series('e2e-tests'));
89
+ gulp.task('test', gulp.series('compatibility-tests', 'e2e-tests'));
86
90
 
87
91
  gulp.task('cleanupJS', function() {
88
92
  return deletePaths([paths.distJSFolder + '/**']);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orgchart",
3
- "version": "6.0.0",
3
+ "version": "7.0.0",
4
4
  "description": "Simple and direct organization chart(tree-like hierarchy) library based on pure DOM.",
5
5
  "main": "./dist/js/orgchart.min.js",
6
6
  "style": [
@@ -10,6 +10,7 @@
10
10
  "test": "gulp test",
11
11
  "unit-tests": "gulp unit-tests",
12
12
  "integration-tests": "gulp integration-tests",
13
+ "compatibility-tests": "mocha test/compatibility/*.tests.js",
13
14
  "e2e-tests": "gulp e2e-tests",
14
15
  "addAssets": "gulp addAssets",
15
16
  "build": "gulp build",
@@ -547,7 +547,8 @@
547
547
  background-color: rgba(68, 157, 68, 0.6);
548
548
  }
549
549
 
550
- .orgchart .node:hover .toggleBtn {
550
+ .orgchart .node:hover > .toggleBtn,
551
+ .orgchart .node.controls-active > .toggleBtn {
551
552
  visibility: visible;
552
553
  }
553
554
 
@@ -723,6 +724,16 @@
723
724
  display: none;
724
725
  }
725
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
+
726
737
  .orgchart .node.compact.looseMode > .node {
727
738
  display: inline-block;
728
739
  }