@yesilyazilim/web.spa 1.0.34 → 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
@@ -1950,7 +1950,11 @@ let $ff6d38504eec951c$export$2a4aa3d46d9c7613 = class NavigationService {
1950
1950
  }
1951
1951
  getUserPagesForNav() {
1952
1952
  const arr = [];
1953
- for (const pl of (0, $8cd149071be21260$export$ddfe55de202c2217).allItems)if (pl.props.iconClass && this.authService.hasAuth(pl.props.auth)) arr.push(pl.props);
1953
+ const appProps = (0, $0d4387cdcd1c68f9$export$5b9912b4863e041b)();
1954
+ for (const pl of (0, $8cd149071be21260$export$ddfe55de202c2217).allItems){
1955
+ if (pl.props.key == (0, $a3c2e7787b76c59b$export$183adaae804499ea).App && appProps.appPageDisabled) continue;
1956
+ if (pl.props.iconClass && this.authService.hasAuth(pl.props.auth)) arr.push(pl.props);
1957
+ }
1954
1958
  return arr;
1955
1959
  }
1956
1960
  get headerActionsContainer() {
@@ -3276,13 +3280,13 @@ let $5171e0e35cb50421$export$1374f173322d64ce = class MainPanel extends (0, $05c
3276
3280
  }
3277
3281
  closeItemAsync(name) {
3278
3282
  return $5171e0e35cb50421$var$__awaiter(this, void 0, void 0, function*() {
3279
- const sp = this._findSubPanel(name);
3283
+ const sp = this.findSubPanel(name);
3280
3284
  if (sp) return sp.tabContainer.removeTabAsync(name);
3281
3285
  return Promise.reject("Item not found in panels !");
3282
3286
  });
3283
3287
  }
3284
3288
  moveItemTo(name, pos, activate = false) {
3285
- const sp = this._findSubPanel(name);
3289
+ const sp = this.findSubPanel(name);
3286
3290
  const tp = this._panels.get(pos);
3287
3291
  if (!(sp && tp && sp.panelPos != tp.panelPos)) return false;
3288
3292
  return sp.tabContainer.moveTo(name, tp.tabContainer, activate);
@@ -3293,6 +3297,12 @@ let $5171e0e35cb50421$export$1374f173322d64ce = class MainPanel extends (0, $05c
3293
3297
  ...affecteds
3294
3298
  ])this._panels.get(ap).tabContainer.warnChildrenResize(start);
3295
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
+ }
3296
3306
  get Center() {
3297
3307
  return this._panels.get((0, $a3c2e7787b76c59b$export$304fddd53466c558).Center);
3298
3308
  }
@@ -3305,12 +3315,6 @@ let $5171e0e35cb50421$export$1374f173322d64ce = class MainPanel extends (0, $05c
3305
3315
  get Bottom() {
3306
3316
  return this._panels.get((0, $a3c2e7787b76c59b$export$304fddd53466c558).Bottom);
3307
3317
  }
3308
- _findSubPanel(name) {
3309
- for (const sp of this._panels.values()){
3310
- if (sp.tabContainer.containsTab(name)) return sp;
3311
- }
3312
- return null;
3313
- }
3314
3318
  };
3315
3319
  $5171e0e35cb50421$export$1374f173322d64ce = $5171e0e35cb50421$var$__decorate([
3316
3320
  (0, $450614f9d282ad7a$export$16fa2f45be04daa8)({
@@ -3525,6 +3529,13 @@ let $03ccb78a5d1bdf8a$export$16975c34e60e1e61 = class Application {
3525
3529
  openPanel(item, pos) {
3526
3530
  this._mainPanel.openItem(pos, item);
3527
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
+ }
3528
3539
  movePanel(name, pos) {
3529
3540
  this._mainPanel.moveItemTo(name, pos);
3530
3541
  }