@kris701/ez-ui 1.1.17 → 1.1.19

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.
@@ -26,7 +26,7 @@ import { v4 } from 'uuid';
26
26
  import { firstValueFrom, switchMap } from 'rxjs';
27
27
  import * as i1$1 from '@angular/common/http';
28
28
  import * as i2$2 from '@angular/router';
29
- import { RouterLink, RouterModule } from '@angular/router';
29
+ import { RouterLink, NavigationEnd, RouterModule } from '@angular/router';
30
30
 
31
31
  class EzUIBooleanInput {
32
32
  icon = '';
@@ -5168,9 +5168,15 @@ class EzUISideBar {
5168
5168
  ...(ngDevMode ? [{ debugName: "sidebarFooterItems" }] : /* istanbul ignore next */ []));
5169
5169
  haveMoved = signal(false, /* @ts-ignore */
5170
5170
  ...(ngDevMode ? [{ debugName: "haveMoved" }] : /* istanbul ignore next */ []));
5171
+ baseRoute = signal("/", /* @ts-ignore */
5172
+ ...(ngDevMode ? [{ debugName: "baseRoute" }] : /* istanbul ignore next */ []));
5171
5173
  constructor(layoutService, router) {
5172
5174
  this.layoutService = layoutService;
5173
5175
  this.router = router;
5176
+ router.events.subscribe((val) => {
5177
+ if (val instanceof NavigationEnd)
5178
+ this.initialize();
5179
+ });
5174
5180
  }
5175
5181
  ngOnInit() {
5176
5182
  this.initialize();
@@ -5180,7 +5186,7 @@ class EzUISideBar {
5180
5186
  var sidebarFooterItems = [...this.sidebarFooterItems()];
5181
5187
  this.hideEmptySections(sidebarItems);
5182
5188
  this.hideEmptySections(sidebarFooterItems);
5183
- if (!this.haveMoved() && this.router.routerState.snapshot.url == '/')
5189
+ if (!this.haveMoved() && this.router.routerState.snapshot.url == this.baseRoute())
5184
5190
  this.gotoFirstPage(sidebarItems);
5185
5191
  this.setActiveRoute(sidebarItems);
5186
5192
  this.setActiveRoute(sidebarFooterItems);
@@ -5223,7 +5229,7 @@ class EzUISideBar {
5223
5229
  }
5224
5230
  }
5225
5231
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUISideBar, deps: [{ token: EzUILayoutService }, { token: i2$2.Router }], target: i0.ɵɵFactoryTarget.Component });
5226
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: EzUISideBar, isStandalone: true, selector: "ezui-sidebar", inputs: { sidebarItems: "sidebarItems", sidebarFooterItems: "sidebarFooterItems" }, ngImport: i0, template: `
5232
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: EzUISideBar, isStandalone: true, selector: "ezui-sidebar", inputs: { sidebarItems: "sidebarItems", sidebarFooterItems: "sidebarFooterItems", baseRoute: "baseRoute" }, ngImport: i0, template: `
5227
5233
  <aside
5228
5234
  style="height:100%"
5229
5235
  tuitheme=""
@@ -5269,6 +5275,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
5269
5275
  type: Input
5270
5276
  }], sidebarFooterItems: [{
5271
5277
  type: Input
5278
+ }], baseRoute: [{
5279
+ type: Input
5272
5280
  }] } });
5273
5281
 
5274
5282
  class EzUITopBar {
@@ -5342,6 +5350,8 @@ class EzUILayout {
5342
5350
  ...(ngDevMode ? [{ debugName: "sidebarItems" }] : /* istanbul ignore next */ []));
5343
5351
  sidebarFooterItems = signal([], /* @ts-ignore */
5344
5352
  ...(ngDevMode ? [{ debugName: "sidebarFooterItems" }] : /* istanbul ignore next */ []));
5353
+ baseRoute = signal("/", /* @ts-ignore */
5354
+ ...(ngDevMode ? [{ debugName: "baseRoute" }] : /* istanbul ignore next */ []));
5345
5355
  topbarright;
5346
5356
  topbarlogo;
5347
5357
  sidebar = viewChild("sidebar", /* @ts-ignore */
@@ -5349,12 +5359,12 @@ class EzUILayout {
5349
5359
  topbar = viewChild("topbar", /* @ts-ignore */
5350
5360
  ...(ngDevMode ? [{ debugName: "topbar" }] : /* istanbul ignore next */ []));
5351
5361
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUILayout, deps: [], target: i0.ɵɵFactoryTarget.Component });
5352
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.0", type: EzUILayout, isStandalone: true, selector: "ezui-layout", inputs: { sidebarItems: "sidebarItems", sidebarFooterItems: "sidebarFooterItems" }, queries: [{ propertyName: "topbarright", first: true, predicate: ["topbarright"], descendants: true }, { propertyName: "topbarlogo", first: true, predicate: ["topbarlogo"], descendants: true }], viewQueries: [{ propertyName: "sidebar", first: true, predicate: ["sidebar"], descendants: true, isSignal: true }, { propertyName: "topbar", first: true, predicate: ["topbar"], descendants: true, isSignal: true }], ngImport: i0, template: `
5362
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.0", type: EzUILayout, isStandalone: true, selector: "ezui-layout", inputs: { sidebarItems: "sidebarItems", sidebarFooterItems: "sidebarFooterItems", baseRoute: "baseRoute" }, queries: [{ propertyName: "topbarright", first: true, predicate: ["topbarright"], descendants: true }, { propertyName: "topbarlogo", first: true, predicate: ["topbarlogo"], descendants: true }], viewQueries: [{ propertyName: "sidebar", first: true, predicate: ["sidebar"], descendants: true, isSignal: true }, { propertyName: "topbar", first: true, predicate: ["topbar"], descendants: true, isSignal: true }], ngImport: i0, template: `
5353
5363
  <tui-root class="rootContainer">
5354
5364
  <div class="layout-wrapper">
5355
5365
  <ezui-topbar #topbar></ezui-topbar>
5356
5366
  <div class="layout-wrapper-split">
5357
- <ezui-sidebar [sidebarItems]="sidebarItems" [sidebarFooterItems]="sidebarFooterItems" #sidebar></ezui-sidebar>
5367
+ <ezui-sidebar [sidebarItems]="sidebarItems" [sidebarFooterItems]="sidebarFooterItems" [baseRoute]="baseRoute" #sidebar></ezui-sidebar>
5358
5368
  <div class="layout-main-container">
5359
5369
  <tui-scrollbar class="layout-main">
5360
5370
  <router-outlet></router-outlet>
@@ -5363,7 +5373,7 @@ class EzUILayout {
5363
5373
  </div>
5364
5374
  </div>
5365
5375
  </tui-root>
5366
- `, isInline: true, styles: ["::ng-deep .rootContainer .t-root-content{display:flex;height:100vh;width:100vw}.layout-wrapper{display:flex;flex-direction:column;height:100vh;min-height:100vh;max-height:100vh}.layout-wrapper-split{display:flex;flex-direction:row;width:100%;height:100%;overflow:hidden;max-width:100vw}.layout-main-container{display:flex;flex-direction:column;min-height:inherit;max-height:inherit;width:100%;justify-content:space-between;overflow:hidden}.layout-main{flex:1 1 auto;display:flex}::ng-deep .layout-main>.t-content{padding:1rem;display:flex;block-size:auto!important;box-sizing:border-box}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2$2.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: EzUITopBar, selector: "ezui-topbar" }, { kind: "component", type: EzUISideBar, selector: "ezui-sidebar", inputs: ["sidebarItems", "sidebarFooterItems"] }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar" }, { kind: "component", type: TuiRoot, selector: "tui-root" }] });
5376
+ `, isInline: true, styles: ["::ng-deep .rootContainer .t-root-content{display:flex;height:100vh;width:100vw}.layout-wrapper{display:flex;flex-direction:column;height:100vh;min-height:100vh;max-height:100vh}.layout-wrapper-split{display:flex;flex-direction:row;width:100%;height:100%;overflow:hidden;max-width:100vw}.layout-main-container{display:flex;flex-direction:column;min-height:inherit;max-height:inherit;width:100%;justify-content:space-between;overflow:hidden}.layout-main{flex:1 1 auto;display:flex}::ng-deep .layout-main>.t-content{padding:1rem;display:flex;block-size:auto!important;box-sizing:border-box}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2$2.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: EzUITopBar, selector: "ezui-topbar" }, { kind: "component", type: EzUISideBar, selector: "ezui-sidebar", inputs: ["sidebarItems", "sidebarFooterItems", "baseRoute"] }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar" }, { kind: "component", type: TuiRoot, selector: "tui-root" }] });
5367
5377
  }
5368
5378
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUILayout, decorators: [{
5369
5379
  type: Component,
@@ -5372,7 +5382,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
5372
5382
  <div class="layout-wrapper">
5373
5383
  <ezui-topbar #topbar></ezui-topbar>
5374
5384
  <div class="layout-wrapper-split">
5375
- <ezui-sidebar [sidebarItems]="sidebarItems" [sidebarFooterItems]="sidebarFooterItems" #sidebar></ezui-sidebar>
5385
+ <ezui-sidebar [sidebarItems]="sidebarItems" [sidebarFooterItems]="sidebarFooterItems" [baseRoute]="baseRoute" #sidebar></ezui-sidebar>
5376
5386
  <div class="layout-main-container">
5377
5387
  <tui-scrollbar class="layout-main">
5378
5388
  <router-outlet></router-outlet>
@@ -5386,6 +5396,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
5386
5396
  type: Input
5387
5397
  }], sidebarFooterItems: [{
5388
5398
  type: Input
5399
+ }], baseRoute: [{
5400
+ type: Input
5389
5401
  }], topbarright: [{
5390
5402
  type: ContentChild,
5391
5403
  args: ['topbarright', { static: false }]