dockview-core
Advanced tools
Comparing version 1.7.2 to 1.7.3
@@ -11,3 +11,3 @@ import { Emitter, Event } from '../events'; | ||
readonly isGroupActive: boolean; | ||
readonly title: string; | ||
readonly title: string | undefined; | ||
readonly onDidActiveGroupChange: Event<void>; | ||
@@ -28,3 +28,3 @@ readonly onDidGroupChange: Event<void>; | ||
private readonly disposable; | ||
get title(): string; | ||
get title(): string | undefined; | ||
get isGroupActive(): boolean; | ||
@@ -31,0 +31,0 @@ set group(value: DockviewGroupPanel); |
@@ -13,3 +13,3 @@ import { DockviewApi } from '../api/component.api'; | ||
readonly api: DockviewPanelApi; | ||
readonly title: string; | ||
readonly title: string | undefined; | ||
readonly params: Record<string, any> | undefined; | ||
@@ -30,3 +30,3 @@ updateParentGroup(group: DockviewGroupPanel, isGroupActive: boolean): void; | ||
get params(): Parameters | undefined; | ||
get title(): string; | ||
get title(): string | undefined; | ||
get group(): DockviewGroupPanel; | ||
@@ -33,0 +33,0 @@ constructor(id: string, accessor: IDockviewComponent, containerApi: DockviewApi, group: DockviewGroupPanel, view: IDockviewPanelModel); |
@@ -39,3 +39,2 @@ "use strict"; | ||
_this.view = view; | ||
_this._title = ''; | ||
_this._group = group; | ||
@@ -75,4 +74,4 @@ _this.api = new dockviewPanelApi_1.DockviewPanelApiImpl(_this, _this._group); | ||
this._params = params.params; | ||
this.view.init(__assign(__assign({}, params), { api: this.api, containerApi: this.containerApi })); | ||
this.setTitle(params.title); | ||
this.view.init(__assign(__assign({}, params), { api: this.api, containerApi: this.containerApi })); | ||
}; | ||
@@ -94,7 +93,6 @@ DockviewPanel.prototype.focus = function () { | ||
DockviewPanel.prototype.setTitle = function (title) { | ||
var _a, _b; | ||
var didTitleChange = title !== ((_a = this._params) === null || _a === void 0 ? void 0 : _a.title); | ||
var didTitleChange = title !== this.title; | ||
if (didTitleChange) { | ||
this._title = title; | ||
(_b = this.view) === null || _b === void 0 ? void 0 : _b.update({ | ||
this.view.update({ | ||
params: { | ||
@@ -109,3 +107,2 @@ params: this._params, | ||
DockviewPanel.prototype.update = function (event) { | ||
var _a; | ||
var params = event.params; | ||
@@ -115,5 +112,5 @@ this._params = __assign(__assign({}, (this._params || {})), event.params.params); | ||
this._title = params.title; | ||
this.api._onDidTitleChange.fire({ title: this.title }); | ||
this.api._onDidTitleChange.fire({ title: params.title }); | ||
} | ||
(_a = this.view) === null || _a === void 0 ? void 0 : _a.update({ | ||
this.view.update({ | ||
params: { | ||
@@ -120,0 +117,0 @@ params: this._params, |
@@ -11,3 +11,3 @@ import { Emitter, Event } from '../events'; | ||
readonly isGroupActive: boolean; | ||
readonly title: string; | ||
readonly title: string | undefined; | ||
readonly onDidActiveGroupChange: Event<void>; | ||
@@ -28,3 +28,3 @@ readonly onDidGroupChange: Event<void>; | ||
private readonly disposable; | ||
get title(): string; | ||
get title(): string | undefined; | ||
get isGroupActive(): boolean; | ||
@@ -31,0 +31,0 @@ set group(value: DockviewGroupPanel); |
@@ -13,3 +13,3 @@ import { DockviewApi } from '../api/component.api'; | ||
readonly api: DockviewPanelApi; | ||
readonly title: string; | ||
readonly title: string | undefined; | ||
readonly params: Record<string, any> | undefined; | ||
@@ -30,3 +30,3 @@ updateParentGroup(group: DockviewGroupPanel, isGroupActive: boolean): void; | ||
get params(): Parameters | undefined; | ||
get title(): string; | ||
get title(): string | undefined; | ||
get group(): DockviewGroupPanel; | ||
@@ -33,0 +33,0 @@ constructor(id: string, accessor: IDockviewComponent, containerApi: DockviewApi, group: DockviewGroupPanel, view: IDockviewPanelModel); |
@@ -18,3 +18,2 @@ import { DockviewPanelApiImpl, } from '../api/dockviewPanelApi'; | ||
this.view = view; | ||
this._title = ''; | ||
this._group = group; | ||
@@ -32,4 +31,4 @@ this.api = new DockviewPanelApiImpl(this, this._group); | ||
this._params = params.params; | ||
this.view.init(Object.assign(Object.assign({}, params), { api: this.api, containerApi: this.containerApi })); | ||
this.setTitle(params.title); | ||
this.view.init(Object.assign(Object.assign({}, params), { api: this.api, containerApi: this.containerApi })); | ||
} | ||
@@ -51,7 +50,6 @@ focus() { | ||
setTitle(title) { | ||
var _a, _b; | ||
const didTitleChange = title !== ((_a = this._params) === null || _a === void 0 ? void 0 : _a.title); | ||
const didTitleChange = title !== this.title; | ||
if (didTitleChange) { | ||
this._title = title; | ||
(_b = this.view) === null || _b === void 0 ? void 0 : _b.update({ | ||
this.view.update({ | ||
params: { | ||
@@ -66,3 +64,2 @@ params: this._params, | ||
update(event) { | ||
var _a; | ||
const params = event.params; | ||
@@ -72,5 +69,5 @@ this._params = Object.assign(Object.assign({}, (this._params || {})), event.params.params); | ||
this._title = params.title; | ||
this.api._onDidTitleChange.fire({ title: this.title }); | ||
this.api._onDidTitleChange.fire({ title: params.title }); | ||
} | ||
(_a = this.view) === null || _a === void 0 ? void 0 : _a.update({ | ||
this.view.update({ | ||
params: { | ||
@@ -77,0 +74,0 @@ params: this._params, |
{ | ||
"name": "dockview-core", | ||
"version": "1.7.2", | ||
"version": "1.7.3", | ||
"description": "Zero dependency layout manager supporting tabs, grids and splitviews with ReactJS support", | ||
@@ -68,3 +68,3 @@ "main": "./dist/cjs/index.js", | ||
}, | ||
"gitHead": "fda40a9fcb7a67f2219d6d301cd546e2d2212cbc" | ||
"gitHead": "3d47c8e2c550624bec76ed8f055577c93bd2c35e" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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 too big to display
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 too big to display
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 too big to display
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 too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3841937
63151