Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dockview-core

Package Overview
Dependencies
Maintainers
0
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dockview-core - npm Package Compare versions

Comparing version 1.16.0 to 1.16.1

10

dist/cjs/api/component.api.d.ts

@@ -5,7 +5,7 @@ import { FloatingGroupOptions, IDockviewComponent, MovePanelEvent, SerializedDockview } from '../dockview/dockviewComponent';

import { Direction } from '../gridview/baseComponentGridview';
import { AddComponentOptions, GridviewComponentUpdateOptions, IGridviewComponent, SerializedGridviewComponent } from '../gridview/gridviewComponent';
import { AddComponentOptions, IGridviewComponent, SerializedGridviewComponent } from '../gridview/gridviewComponent';
import { IGridviewPanel } from '../gridview/gridviewPanel';
import { AddPaneviewComponentOptions, SerializedPaneview, IPaneviewComponent } from '../paneview/paneviewComponent';
import { IPaneviewPanel } from '../paneview/paneviewPanel';
import { AddSplitviewComponentOptions, ISplitviewComponent, SerializedSplitview, SplitviewComponentUpdateOptions } from '../splitview/splitviewComponent';
import { AddSplitviewComponentOptions, ISplitviewComponent, SerializedSplitview } from '../splitview/splitviewComponent';
import { IView, Orientation, Sizing } from '../splitview/splitview';

@@ -21,2 +21,4 @@ import { ISplitviewPanel } from '../splitview/splitviewPanel';

import { PaneviewComponentOptions } from '../paneview/options';
import { SplitviewComponentOptions } from '../splitview/options';
import { GridviewComponentOptions } from '../gridview/options';
export interface CommonApi<T = any> {

@@ -120,3 +122,3 @@ readonly height: number;

*/
updateOptions(options: Partial<SplitviewComponentUpdateOptions>): void;
updateOptions(options: Partial<SplitviewComponentOptions>): void;
/**

@@ -311,3 +313,3 @@ * Release resources and teardown component. Do not call when using framework versions of dockview.

clear(): void;
updateOptions(options: Partial<GridviewComponentUpdateOptions>): void;
updateOptions(options: Partial<GridviewComponentOptions>): void;
/**

@@ -314,0 +316,0 @@ * Release resources and teardown component. Do not call when using framework versions of dockview.

2

dist/cjs/gridview/baseComponentGridview.d.ts

@@ -66,2 +66,3 @@ import { Event, AsapEvent } from '../events';

readonly onDidViewVisibilityChangeMicroTaskQueue: Event<void>;
private classNames;
get id(): string;

@@ -85,2 +86,3 @@ get size(): number;

isVisible(panel: T): boolean;
updateOptions(options: Partial<BaseGridOptions>): void;
maximizeGroup(panel: T): void;

@@ -87,0 +89,0 @@ isMaximizedGroup(panel: T): boolean;

@@ -36,2 +36,3 @@ "use strict";

var resizable_1 = require("../resizable");
var dom_1 = require("../dom");
var nextLayoutId = (0, math_1.sequentialNumberGenerator)();

@@ -57,2 +58,4 @@ function toTarget(direction) {

function BaseGrid(options) {
var e_1, _a;
var _b, _c;
var _this = _super.call(this, document.createElement('div'), options.disableAutoResizing) || this;

@@ -71,7 +74,19 @@ _this._id = nextLayoutId.next();

_this.onDidViewVisibilityChangeMicroTaskQueue = _this._onDidViewVisibilityChangeMicroTaskQueue.onEvent;
_this.classNames = [];
_this.element.style.height = '100%';
_this.element.style.width = '100%';
if (typeof options.className === 'string') {
_this.element.classList.add(options.className);
_this.classNames = (_c = (_b = options.className) === null || _b === void 0 ? void 0 : _b.split(' ')) !== null && _c !== void 0 ? _c : [];
try {
for (var _d = __values(_this.classNames), _e = _d.next(); !_e.done; _e = _d.next()) {
var className = _e.value;
(0, dom_1.toggleClass)(_this.element, className, true);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
}
finally { if (e_1) throw e_1.error; }
}
options.parentElement.appendChild(_this.element);

@@ -183,2 +198,35 @@ _this.gridview = new gridview_1.Gridview(!!options.proportionalLayout, options.styles, options.orientation, options.locked, options.margin);

};
BaseGrid.prototype.updateOptions = function (options) {
var e_2, _a, e_3, _b;
var _c, _d;
if ('className' in options) {
try {
for (var _e = __values(this.classNames), _f = _e.next(); !_f.done; _f = _e.next()) {
var className = _f.value;
(0, dom_1.toggleClass)(this.element, className, false);
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_f && !_f.done && (_a = _e.return)) _a.call(_e);
}
finally { if (e_2) throw e_2.error; }
}
this.classNames = (_d = (_c = options.className) === null || _c === void 0 ? void 0 : _c.split(' ')) !== null && _d !== void 0 ? _d : [];
try {
for (var _g = __values(this.classNames), _h = _g.next(); !_h.done; _h = _g.next()) {
var className = _h.value;
(0, dom_1.toggleClass)(this.element, className, true);
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (_h && !_h.done && (_b = _g.return)) _b.call(_g);
}
finally { if (e_3) throw e_3.error; }
}
}
};
BaseGrid.prototype.maximizeGroup = function (panel) {

@@ -287,3 +335,3 @@ this.gridview.maximizeView(panel);

BaseGrid.prototype.dispose = function () {
var e_1, _a;
var e_4, _a;
this._onDidActiveChange.dispose();

@@ -298,3 +346,3 @@ this._onDidAdd.dispose();

}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
catch (e_4_1) { e_4 = { error: e_4_1 }; }
finally {

@@ -304,3 +352,3 @@ try {

}
finally { if (e_1) throw e_1.error; }
finally { if (e_4) throw e_4.error; }
}

@@ -307,0 +355,0 @@ this.gridview.dispose();

@@ -28,7 +28,6 @@ import { SerializedGridview } from './gridview';

}
export type GridviewComponentUpdateOptions = Pick<GridviewComponentOptions, 'orientation' | 'components' | 'frameworkComponents'>;
export interface IGridviewComponent extends IBaseGrid<GridviewPanel> {
readonly orientation: Orientation;
readonly onDidLayoutFromJSON: Event<void>;
updateOptions(options: Partial<GridviewComponentUpdateOptions>): void;
updateOptions(options: Partial<GridviewComponentOptions>): void;
addPanel<T extends object = Parameters>(options: AddComponentOptions<T>): IGridviewPanel;

@@ -67,3 +66,3 @@ removePanel(panel: IGridviewPanel, sizing?: Sizing): void;

constructor(parentElement: HTMLElement, options: GridviewComponentOptions);
updateOptions(options: Partial<GridviewComponentUpdateOptions>): void;
updateOptions(options: Partial<GridviewComponentOptions>): void;
removePanel(panel: GridviewPanel): void;

@@ -70,0 +69,0 @@ /**

@@ -126,2 +126,3 @@ "use strict";

GridviewComponent.prototype.updateOptions = function (options) {
_super.prototype.updateOptions.call(this, options);
var hasOrientationChanged = typeof options.orientation === 'string' &&

@@ -128,0 +129,0 @@ this.gridview.orientation !== options.orientation;

@@ -106,2 +106,3 @@ import { Event } from '../events';

readonly onDidRemoveView: Event<PaneviewPanel>;
private classNames;
get id(): string;

@@ -108,0 +109,0 @@ get panels(): PaneviewPanel[];

@@ -28,2 +28,13 @@ "use strict";

};
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
var __read = (this && this.__read) || function (o, n) {

@@ -45,13 +56,2 @@ var m = typeof Symbol === "function" && o[Symbol.iterator];

};
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -69,2 +69,3 @@ exports.PaneviewComponent = exports.PaneFramework = void 0;

var resizable_1 = require("../resizable");
var dom_1 = require("../dom");
var nextLayoutId = (0, math_1.sequentialNumberGenerator)();

@@ -90,2 +91,4 @@ var PaneFramework = /** @class */ (function (_super) {

function PaneviewComponent(parentElement, options) {
var e_1, _a;
var _b, _c;
var _this = _super.call(this, parentElement, options.disableAutoResizing) || this;

@@ -105,6 +108,18 @@ _this._id = nextLayoutId.next();

_this.onDidRemoveView = _this._onDidRemoveView.event;
if (typeof options.className === 'string') {
_this.element.classList.add(options.className);
_this.classNames = [];
_this.addDisposables(_this._onDidLayoutChange, _this._onDidLayoutfromJSON, _this._onDidDrop, _this._onDidAddView, _this._onDidRemoveView);
_this.classNames = (_c = (_b = options.className) === null || _b === void 0 ? void 0 : _b.split(' ')) !== null && _c !== void 0 ? _c : [];
try {
for (var _d = __values(_this.classNames), _e = _d.next(); !_e.done; _e = _d.next()) {
var className = _e.value;
(0, dom_1.toggleClass)(_this.element, className, true);
}
}
_this.addDisposables(_this._onDidLayoutChange, _this._onDidLayoutfromJSON, _this._onDidDrop, _this._onDidAddView, _this._onDidRemoveView);
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
}
finally { if (e_1) throw e_1.error; }
}
_this._options = options;

@@ -199,2 +214,33 @@ if (!options.components) {

PaneviewComponent.prototype.updateOptions = function (options) {
var e_2, _a, e_3, _b;
var _c, _d;
if ('className' in options) {
try {
for (var _e = __values(this.classNames), _f = _e.next(); !_f.done; _f = _e.next()) {
var className = _f.value;
(0, dom_1.toggleClass)(this.element, className, false);
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_f && !_f.done && (_a = _e.return)) _a.call(_e);
}
finally { if (e_2) throw e_2.error; }
}
this.classNames = (_d = (_c = options.className) === null || _c === void 0 ? void 0 : _c.split(' ')) !== null && _d !== void 0 ? _d : [];
try {
for (var _g = __values(this.classNames), _h = _g.next(); !_h.done; _h = _g.next()) {
var className = _h.value;
(0, dom_1.toggleClass)(this.element, className, true);
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (_h && !_h.done && (_b = _g.return)) _b.call(_g);
}
finally { if (e_3) throw e_3.error; }
}
}
this._options = __assign(__assign({}, this.options), options);

@@ -363,3 +409,3 @@ };

PaneviewComponent.prototype.clear = function () {
var e_1, _a;
var e_4, _a;
try {

@@ -371,3 +417,3 @@ for (var _b = __values(this._viewDisposables.entries()), _c = _b.next(); !_c.done; _c = _b.next()) {

}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
catch (e_4_1) { e_4 = { error: e_4_1 }; }
finally {

@@ -377,3 +423,3 @@ try {

}
finally { if (e_1) throw e_1.error; }
finally { if (e_4) throw e_4.error; }
}

@@ -398,3 +444,3 @@ this._viewDisposables.clear();

PaneviewComponent.prototype.dispose = function () {
var e_2, _a;
var e_5, _a;
_super.prototype.dispose.call(this);

@@ -407,3 +453,3 @@ try {

}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
catch (e_5_1) { e_5 = { error: e_5_1 }; }
finally {

@@ -413,3 +459,3 @@ try {

}
finally { if (e_2) throw e_2.error; }
finally { if (e_5) throw e_5.error; }
}

@@ -416,0 +462,0 @@ this._viewDisposables.clear();

import { IDisposable } from '../lifecycle';
import { IView, LayoutPriority, Orientation, Sizing, Splitview } from './splitview';
import { IView, LayoutPriority, Orientation, Sizing, Splitview, SplitViewOptions } from './splitview';
import { SplitviewComponentOptions } from './options';

@@ -34,3 +34,2 @@ import { BaseComponentOptions, Parameters } from '../panel/types';

}
export type SplitviewComponentUpdateOptions = Pick<SplitviewComponentOptions, 'orientation' | 'components' | 'frameworkComponents'>;
export interface ISplitviewComponent extends IDisposable {

@@ -47,3 +46,3 @@ readonly minimumSize: number;

readonly panels: SplitviewPanel[];
updateOptions(options: Partial<SplitviewComponentUpdateOptions>): void;
updateOptions(options: Partial<SplitViewOptions>): void;
addPanel<T extends object = Parameters>(options: AddSplitviewComponentOptions<T>): ISplitviewPanel;

@@ -78,2 +77,3 @@ layout(width: number, height: number): void;

readonly onDidLayoutChange: Event<void>;
private classNames;
get panels(): SplitviewPanel[];

@@ -90,3 +90,3 @@ get options(): SplitviewComponentOptions;

constructor(parentElement: HTMLElement, options: SplitviewComponentOptions);
updateOptions(options: Partial<SplitviewComponentUpdateOptions>): void;
updateOptions(options: Partial<SplitviewComponentOptions>): void;
focus(): void;

@@ -93,0 +93,0 @@ movePanel(from: number, to: number): void;

@@ -28,2 +28,13 @@ "use strict";

};
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
var __read = (this && this.__read) || function (o, n) {

@@ -45,13 +56,2 @@ var m = typeof Symbol === "function" && o[Symbol.iterator];

};
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -64,2 +64,3 @@ exports.SplitviewComponent = void 0;

var resizable_1 = require("../resizable");
var dom_1 = require("../dom");
/**

@@ -71,2 +72,4 @@ * A high-level implementation of splitview that works using 'panels'

function SplitviewComponent(parentElement, options) {
var e_1, _a;
var _b, _c;
var _this = _super.call(this, parentElement, options.disableAutoResizing) || this;

@@ -83,5 +86,17 @@ _this._splitviewChangeDisposable = new lifecycle_1.MutableDisposable();

_this.onDidLayoutChange = _this._onDidLayoutChange.event;
if (typeof options.className === 'string') {
_this.element.classList.add(options.className);
_this.classNames = [];
_this.classNames = (_c = (_b = options.className) === null || _b === void 0 ? void 0 : _b.split(' ')) !== null && _c !== void 0 ? _c : [];
try {
for (var _d = __values(_this.classNames), _e = _d.next(); !_e.done; _e = _d.next()) {
var className = _e.value;
(0, dom_1.toggleClass)(_this.element, className, true);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
}
finally { if (e_1) throw e_1.error; }
}
_this._options = options;

@@ -175,2 +190,33 @@ if (!options.components) {

SplitviewComponent.prototype.updateOptions = function (options) {
var e_2, _a, e_3, _b;
var _c, _d;
if ('className' in options) {
try {
for (var _e = __values(this.classNames), _f = _e.next(); !_f.done; _f = _e.next()) {
var className = _f.value;
(0, dom_1.toggleClass)(this.element, className, false);
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_f && !_f.done && (_a = _e.return)) _a.call(_e);
}
finally { if (e_2) throw e_2.error; }
}
this.classNames = (_d = (_c = options.className) === null || _c === void 0 ? void 0 : _c.split(' ')) !== null && _d !== void 0 ? _d : [];
try {
for (var _g = __values(this.classNames), _h = _g.next(); !_h.done; _h = _g.next()) {
var className = _h.value;
(0, dom_1.toggleClass)(this.element, className, true);
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (_h && !_h.done && (_b = _g.return)) _b.call(_g);
}
finally { if (e_3) throw e_3.error; }
}
}
var hasOrientationChanged = typeof options.orientation === 'string' &&

@@ -348,3 +394,3 @@ this.options.orientation !== options.orientation;

SplitviewComponent.prototype.clear = function () {
var e_1, _a;
var e_4, _a;
try {

@@ -356,3 +402,3 @@ for (var _b = __values(this._panels.values()), _c = _b.next(); !_c.done; _c = _b.next()) {

}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
catch (e_4_1) { e_4 = { error: e_4_1 }; }
finally {

@@ -362,3 +408,3 @@ try {

}
finally { if (e_1) throw e_1.error; }
finally { if (e_4) throw e_4.error; }
}

@@ -372,3 +418,3 @@ this._panels.clear();

SplitviewComponent.prototype.dispose = function () {
var e_2, _a, e_3, _b;
var e_5, _a, e_6, _b;
try {

@@ -380,3 +426,3 @@ for (var _c = __values(this._panels.values()), _d = _c.next(); !_d.done; _d = _c.next()) {

}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
catch (e_5_1) { e_5 = { error: e_5_1 }; }
finally {

@@ -386,3 +432,3 @@ try {

}
finally { if (e_2) throw e_2.error; }
finally { if (e_5) throw e_5.error; }
}

@@ -399,3 +445,3 @@ this._panels.clear();

}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
catch (e_6_1) { e_6 = { error: e_6_1 }; }
finally {

@@ -405,3 +451,3 @@ try {

}
finally { if (e_3) throw e_3.error; }
finally { if (e_6) throw e_6.error; }
}

@@ -408,0 +454,0 @@ _super.prototype.dispose.call(this);

@@ -5,7 +5,7 @@ import { FloatingGroupOptions, IDockviewComponent, MovePanelEvent, SerializedDockview } from '../dockview/dockviewComponent';

import { Direction } from '../gridview/baseComponentGridview';
import { AddComponentOptions, GridviewComponentUpdateOptions, IGridviewComponent, SerializedGridviewComponent } from '../gridview/gridviewComponent';
import { AddComponentOptions, IGridviewComponent, SerializedGridviewComponent } from '../gridview/gridviewComponent';
import { IGridviewPanel } from '../gridview/gridviewPanel';
import { AddPaneviewComponentOptions, SerializedPaneview, IPaneviewComponent } from '../paneview/paneviewComponent';
import { IPaneviewPanel } from '../paneview/paneviewPanel';
import { AddSplitviewComponentOptions, ISplitviewComponent, SerializedSplitview, SplitviewComponentUpdateOptions } from '../splitview/splitviewComponent';
import { AddSplitviewComponentOptions, ISplitviewComponent, SerializedSplitview } from '../splitview/splitviewComponent';
import { IView, Orientation, Sizing } from '../splitview/splitview';

@@ -21,2 +21,4 @@ import { ISplitviewPanel } from '../splitview/splitviewPanel';

import { PaneviewComponentOptions } from '../paneview/options';
import { SplitviewComponentOptions } from '../splitview/options';
import { GridviewComponentOptions } from '../gridview/options';
export interface CommonApi<T = any> {

@@ -120,3 +122,3 @@ readonly height: number;

*/
updateOptions(options: Partial<SplitviewComponentUpdateOptions>): void;
updateOptions(options: Partial<SplitviewComponentOptions>): void;
/**

@@ -311,3 +313,3 @@ * Release resources and teardown component. Do not call when using framework versions of dockview.

clear(): void;
updateOptions(options: Partial<GridviewComponentUpdateOptions>): void;
updateOptions(options: Partial<GridviewComponentOptions>): void;
/**

@@ -314,0 +316,0 @@ * Release resources and teardown component. Do not call when using framework versions of dockview.

@@ -66,2 +66,3 @@ import { Event, AsapEvent } from '../events';

readonly onDidViewVisibilityChangeMicroTaskQueue: Event<void>;
private classNames;
get id(): string;

@@ -85,2 +86,3 @@ get size(): number;

isVisible(panel: T): boolean;
updateOptions(options: Partial<BaseGridOptions>): void;
maximizeGroup(panel: T): void;

@@ -87,0 +89,0 @@ isMaximizedGroup(panel: T): boolean;

@@ -7,2 +7,3 @@ import { Emitter, Event, AsapEvent } from '../events';

import { Resizable } from '../resizable';
import { toggleClass } from '../dom';
const nextLayoutId = sequentialNumberGenerator();

@@ -62,2 +63,3 @@ export function toTarget(direction) {

constructor(options) {
var _a, _b;
super(document.createElement('div'), options.disableAutoResizing);

@@ -76,6 +78,8 @@ this._id = nextLayoutId.next();

this.onDidViewVisibilityChangeMicroTaskQueue = this._onDidViewVisibilityChangeMicroTaskQueue.onEvent;
this.classNames = [];
this.element.style.height = '100%';
this.element.style.width = '100%';
if (typeof options.className === 'string') {
this.element.classList.add(options.className);
this.classNames = (_b = (_a = options.className) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
for (const className of this.classNames) {
toggleClass(this.element, className, true);
}

@@ -105,2 +109,14 @@ options.parentElement.appendChild(this.element);

}
updateOptions(options) {
var _a, _b;
if ('className' in options) {
for (const className of this.classNames) {
toggleClass(this.element, className, false);
}
this.classNames = (_b = (_a = options.className) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
for (const className of this.classNames) {
toggleClass(this.element, className, true);
}
}
}
maximizeGroup(panel) {

@@ -107,0 +123,0 @@ this.gridview.maximizeView(panel);

@@ -28,7 +28,6 @@ import { SerializedGridview } from './gridview';

}
export type GridviewComponentUpdateOptions = Pick<GridviewComponentOptions, 'orientation' | 'components' | 'frameworkComponents'>;
export interface IGridviewComponent extends IBaseGrid<GridviewPanel> {
readonly orientation: Orientation;
readonly onDidLayoutFromJSON: Event<void>;
updateOptions(options: Partial<GridviewComponentUpdateOptions>): void;
updateOptions(options: Partial<GridviewComponentOptions>): void;
addPanel<T extends object = Parameters>(options: AddComponentOptions<T>): IGridviewPanel;

@@ -67,3 +66,3 @@ removePanel(panel: IGridviewPanel, sizing?: Sizing): void;

constructor(parentElement: HTMLElement, options: GridviewComponentOptions);
updateOptions(options: Partial<GridviewComponentUpdateOptions>): void;
updateOptions(options: Partial<GridviewComponentOptions>): void;
removePanel(panel: GridviewPanel): void;

@@ -70,0 +69,0 @@ /**

@@ -56,2 +56,3 @@ import { getRelativeLocation, getGridLocation, } from './gridview';

updateOptions(options) {
super.updateOptions(options);
const hasOrientationChanged = typeof options.orientation === 'string' &&

@@ -58,0 +59,0 @@ this.gridview.orientation !== options.orientation;

@@ -106,2 +106,3 @@ import { Event } from '../events';

readonly onDidRemoveView: Event<PaneviewPanel>;
private classNames;
get id(): string;

@@ -108,0 +109,0 @@ get panels(): PaneviewPanel[];

@@ -11,2 +11,3 @@ import { PaneviewApi } from '../api/component.api';

import { Resizable } from '../resizable';
import { toggleClass } from '../dom';
const nextLayoutId = sequentialNumberGenerator();

@@ -61,2 +62,3 @@ export class PaneFramework extends DraggablePaneviewPanel {

constructor(parentElement, options) {
var _a, _b;
super(parentElement, options.disableAutoResizing);

@@ -76,6 +78,8 @@ this._id = nextLayoutId.next();

this.onDidRemoveView = this._onDidRemoveView.event;
if (typeof options.className === 'string') {
this.element.classList.add(options.className);
this.classNames = [];
this.addDisposables(this._onDidLayoutChange, this._onDidLayoutfromJSON, this._onDidDrop, this._onDidAddView, this._onDidRemoveView);
this.classNames = (_b = (_a = options.className) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
for (const className of this.classNames) {
toggleClass(this.element, className, true);
}
this.addDisposables(this._onDidLayoutChange, this._onDidLayoutfromJSON, this._onDidDrop, this._onDidAddView, this._onDidRemoveView);
this._options = options;

@@ -102,2 +106,12 @@ if (!options.components) {

updateOptions(options) {
var _a, _b;
if ('className' in options) {
for (const className of this.classNames) {
toggleClass(this.element, className, false);
}
this.classNames = (_b = (_a = options.className) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
for (const className of this.classNames) {
toggleClass(this.element, className, true);
}
}
this._options = Object.assign(Object.assign({}, this.options), options);

@@ -104,0 +118,0 @@ }

import { IDisposable } from '../lifecycle';
import { IView, LayoutPriority, Orientation, Sizing, Splitview } from './splitview';
import { IView, LayoutPriority, Orientation, Sizing, Splitview, SplitViewOptions } from './splitview';
import { SplitviewComponentOptions } from './options';

@@ -34,3 +34,2 @@ import { BaseComponentOptions, Parameters } from '../panel/types';

}
export type SplitviewComponentUpdateOptions = Pick<SplitviewComponentOptions, 'orientation' | 'components' | 'frameworkComponents'>;
export interface ISplitviewComponent extends IDisposable {

@@ -47,3 +46,3 @@ readonly minimumSize: number;

readonly panels: SplitviewPanel[];
updateOptions(options: Partial<SplitviewComponentUpdateOptions>): void;
updateOptions(options: Partial<SplitViewOptions>): void;
addPanel<T extends object = Parameters>(options: AddSplitviewComponentOptions<T>): ISplitviewPanel;

@@ -78,2 +77,3 @@ layout(width: number, height: number): void;

readonly onDidLayoutChange: Event<void>;
private classNames;
get panels(): SplitviewPanel[];

@@ -90,3 +90,3 @@ get options(): SplitviewComponentOptions;

constructor(parentElement: HTMLElement, options: SplitviewComponentOptions);
updateOptions(options: Partial<SplitviewComponentUpdateOptions>): void;
updateOptions(options: Partial<SplitviewComponentOptions>): void;
focus(): void;

@@ -93,0 +93,0 @@ movePanel(from: number, to: number): void;

@@ -6,2 +6,3 @@ import { CompositeDisposable, MutableDisposable, } from '../lifecycle';

import { Resizable } from '../resizable';
import { toggleClass } from '../dom';
/**

@@ -49,2 +50,3 @@ * A high-level implementation of splitview that works using 'panels'

constructor(parentElement, options) {
var _a, _b;
super(parentElement, options.disableAutoResizing);

@@ -61,4 +63,6 @@ this._splitviewChangeDisposable = new MutableDisposable();

this.onDidLayoutChange = this._onDidLayoutChange.event;
if (typeof options.className === 'string') {
this.element.classList.add(options.className);
this.classNames = [];
this.classNames = (_b = (_a = options.className) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
for (const className of this.classNames) {
toggleClass(this.element, className, true);
}

@@ -76,2 +80,12 @@ this._options = options;

updateOptions(options) {
var _a, _b;
if ('className' in options) {
for (const className of this.classNames) {
toggleClass(this.element, className, false);
}
this.classNames = (_b = (_a = options.className) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
for (const className of this.classNames) {
toggleClass(this.element, className, true);
}
}
const hasOrientationChanged = typeof options.orientation === 'string' &&

@@ -78,0 +92,0 @@ this.options.orientation !== options.orientation;

{
"name": "dockview-core",
"version": "1.16.0",
"version": "1.16.1",
"description": "Zero dependency layout manager supporting tabs, grids and splitviews",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc