@yesilyazilim/web.spa 1.0.35 → 1.0.36

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/index.js CHANGED
@@ -3280,13 +3280,13 @@ let $5171e0e35cb50421$export$1374f173322d64ce = class MainPanel extends (0, $05c
3280
3280
  }
3281
3281
  closeItemAsync(name) {
3282
3282
  return $5171e0e35cb50421$var$__awaiter(this, void 0, void 0, function*() {
3283
- const sp = this._findSubPanel(name);
3283
+ const sp = this.findSubPanel(name);
3284
3284
  if (sp) return sp.tabContainer.removeTabAsync(name);
3285
3285
  return Promise.reject("Item not found in panels !");
3286
3286
  });
3287
3287
  }
3288
3288
  moveItemTo(name, pos, activate = false) {
3289
- const sp = this._findSubPanel(name);
3289
+ const sp = this.findSubPanel(name);
3290
3290
  const tp = this._panels.get(pos);
3291
3291
  if (!(sp && tp && sp.panelPos != tp.panelPos)) return false;
3292
3292
  return sp.tabContainer.moveTo(name, tp.tabContainer, activate);
@@ -3297,6 +3297,12 @@ let $5171e0e35cb50421$export$1374f173322d64ce = class MainPanel extends (0, $05c
3297
3297
  ...affecteds
3298
3298
  ])this._panels.get(ap).tabContainer.warnChildrenResize(start);
3299
3299
  }
3300
+ findSubPanel(name) {
3301
+ for (const sp of this._panels.values()){
3302
+ if (sp.tabContainer.containsTab(name)) return sp;
3303
+ }
3304
+ return null;
3305
+ }
3300
3306
  get Center() {
3301
3307
  return this._panels.get((0, $a3c2e7787b76c59b$export$304fddd53466c558).Center);
3302
3308
  }
@@ -3309,12 +3315,6 @@ let $5171e0e35cb50421$export$1374f173322d64ce = class MainPanel extends (0, $05c
3309
3315
  get Bottom() {
3310
3316
  return this._panels.get((0, $a3c2e7787b76c59b$export$304fddd53466c558).Bottom);
3311
3317
  }
3312
- _findSubPanel(name) {
3313
- for (const sp of this._panels.values()){
3314
- if (sp.tabContainer.containsTab(name)) return sp;
3315
- }
3316
- return null;
3317
- }
3318
3318
  };
3319
3319
  $5171e0e35cb50421$export$1374f173322d64ce = $5171e0e35cb50421$var$__decorate([
3320
3320
  (0, $450614f9d282ad7a$export$16fa2f45be04daa8)({
@@ -3529,6 +3529,13 @@ let $03ccb78a5d1bdf8a$export$16975c34e60e1e61 = class Application {
3529
3529
  openPanel(item, pos) {
3530
3530
  this._mainPanel.openItem(pos, item);
3531
3531
  }
3532
+ isPanelOpen(name) {
3533
+ const sp = this._mainPanel.findSubPanel(name);
3534
+ return !!sp;
3535
+ }
3536
+ closePanelAsync(name) {
3537
+ return this._mainPanel.closeItemAsync(name);
3538
+ }
3532
3539
  movePanel(name, pos) {
3533
3540
  this._mainPanel.moveItemTo(name, pos);
3534
3541
  }