dockview-core 1.16.0 → 1.16.1

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 (43) hide show
  1. package/dist/cjs/api/component.api.d.ts +6 -4
  2. package/dist/cjs/dockview/dockviewComponent.js +1 -0
  3. package/dist/cjs/gridview/baseComponentGridview.d.ts +2 -0
  4. package/dist/cjs/gridview/baseComponentGridview.js +53 -5
  5. package/dist/cjs/gridview/gridviewComponent.d.ts +2 -3
  6. package/dist/cjs/gridview/gridviewComponent.js +1 -0
  7. package/dist/cjs/paneview/paneviewComponent.d.ts +1 -0
  8. package/dist/cjs/paneview/paneviewComponent.js +66 -20
  9. package/dist/cjs/splitview/splitviewComponent.d.ts +4 -4
  10. package/dist/cjs/splitview/splitviewComponent.js +67 -21
  11. package/dist/dockview-core.amd.js +51 -8
  12. package/dist/dockview-core.amd.js.map +1 -1
  13. package/dist/dockview-core.amd.min.js +2 -2
  14. package/dist/dockview-core.amd.min.js.map +1 -1
  15. package/dist/dockview-core.amd.min.noStyle.js +2 -2
  16. package/dist/dockview-core.amd.min.noStyle.js.map +1 -1
  17. package/dist/dockview-core.amd.noStyle.js +51 -8
  18. package/dist/dockview-core.amd.noStyle.js.map +1 -1
  19. package/dist/dockview-core.cjs.js +51 -8
  20. package/dist/dockview-core.cjs.js.map +1 -1
  21. package/dist/dockview-core.esm.js +51 -8
  22. package/dist/dockview-core.esm.js.map +1 -1
  23. package/dist/dockview-core.esm.min.js +2 -2
  24. package/dist/dockview-core.esm.min.js.map +1 -1
  25. package/dist/dockview-core.js +51 -8
  26. package/dist/dockview-core.js.map +1 -1
  27. package/dist/dockview-core.min.js +2 -2
  28. package/dist/dockview-core.min.js.map +1 -1
  29. package/dist/dockview-core.min.noStyle.js +2 -2
  30. package/dist/dockview-core.min.noStyle.js.map +1 -1
  31. package/dist/dockview-core.noStyle.js +51 -8
  32. package/dist/dockview-core.noStyle.js.map +1 -1
  33. package/dist/esm/api/component.api.d.ts +6 -4
  34. package/dist/esm/dockview/dockviewComponent.js +1 -0
  35. package/dist/esm/gridview/baseComponentGridview.d.ts +2 -0
  36. package/dist/esm/gridview/baseComponentGridview.js +18 -2
  37. package/dist/esm/gridview/gridviewComponent.d.ts +2 -3
  38. package/dist/esm/gridview/gridviewComponent.js +1 -0
  39. package/dist/esm/paneview/paneviewComponent.d.ts +1 -0
  40. package/dist/esm/paneview/paneviewComponent.js +17 -3
  41. package/dist/esm/splitview/splitviewComponent.d.ts +4 -4
  42. package/dist/esm/splitview/splitviewComponent.js +16 -2
  43. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview-core
3
- * @version 1.16.0
3
+ * @version 1.16.1
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -2705,6 +2705,7 @@
2705
2705
  this.gridview.locked = value;
2706
2706
  }
2707
2707
  constructor(options) {
2708
+ var _a, _b;
2708
2709
  super(document.createElement('div'), options.disableAutoResizing);
2709
2710
  this._id = nextLayoutId$1.next();
2710
2711
  this._groups = new Map();
@@ -2718,10 +2719,12 @@
2718
2719
  this.onDidLayoutChange = this._bufferOnDidLayoutChange.onEvent;
2719
2720
  this._onDidViewVisibilityChangeMicroTaskQueue = new AsapEvent();
2720
2721
  this.onDidViewVisibilityChangeMicroTaskQueue = this._onDidViewVisibilityChangeMicroTaskQueue.onEvent;
2722
+ this.classNames = [];
2721
2723
  this.element.style.height = '100%';
2722
2724
  this.element.style.width = '100%';
2723
- if (typeof options.className === 'string') {
2724
- this.element.classList.add(options.className);
2725
+ this.classNames = (_b = (_a = options.className) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
2726
+ for (const className of this.classNames) {
2727
+ toggleClass(this.element, className, true);
2725
2728
  }
2726
2729
  options.parentElement.appendChild(this.element);
2727
2730
  this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation, options.locked, options.margin);
@@ -2746,6 +2749,18 @@
2746
2749
  isVisible(panel) {
2747
2750
  return this.gridview.isViewVisible(getGridLocation(panel.element));
2748
2751
  }
2752
+ updateOptions(options) {
2753
+ var _a, _b;
2754
+ if ('className' in options) {
2755
+ for (const className of this.classNames) {
2756
+ toggleClass(this.element, className, false);
2757
+ }
2758
+ this.classNames = (_b = (_a = options.className) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
2759
+ for (const className of this.classNames) {
2760
+ toggleClass(this.element, className, true);
2761
+ }
2762
+ }
2763
+ }
2749
2764
  maximizeGroup(panel) {
2750
2765
  this.gridview.maximizeView(panel);
2751
2766
  this.doSetGroupActive(panel);
@@ -7834,6 +7849,7 @@
7834
7849
  }
7835
7850
  updateOptions(options) {
7836
7851
  var _a, _b;
7852
+ super.updateOptions(options);
7837
7853
  const changed_floatingGroupBounds = 'floatingGroupBounds' in options &&
7838
7854
  options.floatingGroupBounds !== this.options.floatingGroupBounds;
7839
7855
  const changed_rootOverlayOptions = 'rootOverlayModel' in options &&
@@ -8778,6 +8794,7 @@
8778
8794
  }
8779
8795
  }
8780
8796
  updateOptions(options) {
8797
+ super.updateOptions(options);
8781
8798
  const hasOrientationChanged = typeof options.orientation === 'string' &&
8782
8799
  this.gridview.orientation !== options.orientation;
8783
8800
  this._options = Object.assign(Object.assign({}, this.options), options);
@@ -9045,6 +9062,7 @@
9045
9062
  : this.splitview.orthogonalSize;
9046
9063
  }
9047
9064
  constructor(parentElement, options) {
9065
+ var _a, _b;
9048
9066
  super(parentElement, options.disableAutoResizing);
9049
9067
  this._splitviewChangeDisposable = new MutableDisposable();
9050
9068
  this._panels = new Map();
@@ -9056,8 +9074,10 @@
9056
9074
  this.onDidRemoveView = this._onDidRemoveView.event;
9057
9075
  this._onDidLayoutChange = new Emitter();
9058
9076
  this.onDidLayoutChange = this._onDidLayoutChange.event;
9059
- if (typeof options.className === 'string') {
9060
- this.element.classList.add(options.className);
9077
+ this.classNames = [];
9078
+ this.classNames = (_b = (_a = options.className) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
9079
+ for (const className of this.classNames) {
9080
+ toggleClass(this.element, className, true);
9061
9081
  }
9062
9082
  this._options = options;
9063
9083
  if (!options.components) {
@@ -9070,6 +9090,16 @@
9070
9090
  this.addDisposables(this._onDidAddView, this._onDidLayoutfromJSON, this._onDidRemoveView, this._onDidLayoutChange);
9071
9091
  }
9072
9092
  updateOptions(options) {
9093
+ var _a, _b;
9094
+ if ('className' in options) {
9095
+ for (const className of this.classNames) {
9096
+ toggleClass(this.element, className, false);
9097
+ }
9098
+ this.classNames = (_b = (_a = options.className) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
9099
+ for (const className of this.classNames) {
9100
+ toggleClass(this.element, className, true);
9101
+ }
9102
+ }
9073
9103
  const hasOrientationChanged = typeof options.orientation === 'string' &&
9074
9104
  this.options.orientation !== options.orientation;
9075
9105
  this._options = Object.assign(Object.assign({}, this.options), options);
@@ -9372,6 +9402,7 @@
9372
9402
  return this._options;
9373
9403
  }
9374
9404
  constructor(parentElement, options) {
9405
+ var _a, _b;
9375
9406
  super(parentElement, options.disableAutoResizing);
9376
9407
  this._id = nextLayoutId.next();
9377
9408
  this._disposable = new MutableDisposable();
@@ -9386,10 +9417,12 @@
9386
9417
  this.onDidAddView = this._onDidAddView.event;
9387
9418
  this._onDidRemoveView = new Emitter();
9388
9419
  this.onDidRemoveView = this._onDidRemoveView.event;
9389
- if (typeof options.className === 'string') {
9390
- this.element.classList.add(options.className);
9391
- }
9420
+ this.classNames = [];
9392
9421
  this.addDisposables(this._onDidLayoutChange, this._onDidLayoutfromJSON, this._onDidDrop, this._onDidAddView, this._onDidRemoveView);
9422
+ this.classNames = (_b = (_a = options.className) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
9423
+ for (const className of this.classNames) {
9424
+ toggleClass(this.element, className, true);
9425
+ }
9393
9426
  this._options = options;
9394
9427
  if (!options.components) {
9395
9428
  options.components = {};
@@ -9411,6 +9444,16 @@
9411
9444
  //noop
9412
9445
  }
9413
9446
  updateOptions(options) {
9447
+ var _a, _b;
9448
+ if ('className' in options) {
9449
+ for (const className of this.classNames) {
9450
+ toggleClass(this.element, className, false);
9451
+ }
9452
+ this.classNames = (_b = (_a = options.className) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
9453
+ for (const className of this.classNames) {
9454
+ toggleClass(this.element, className, true);
9455
+ }
9456
+ }
9414
9457
  this._options = Object.assign(Object.assign({}, this.options), options);
9415
9458
  }
9416
9459
  addPanel(options) {