@indigina/ui-kit 1.1.165 → 1.1.166

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.
@@ -1,16 +1,16 @@
1
- import { ElementRef, Signal, WritableSignal } from '@angular/core';
1
+ import { AfterContentInit, ElementRef, Signal, WritableSignal } from '@angular/core';
2
2
  import { KitNavigationMenuService } from '../kit-navigation-menu/kit-navigation-menu.service';
3
3
  import * as i0 from "@angular/core";
4
- export declare class KitPageLayoutComponent {
4
+ export declare class KitPageLayoutComponent implements AfterContentInit {
5
5
  private readonly kitNavigationMenuService;
6
6
  readonly sidebarContainer: Signal<ElementRef<HTMLDivElement> | undefined>;
7
- readonly headerContainer: Signal<ElementRef<HTMLDivElement> | undefined>;
7
+ readonly topBarContainer: Signal<ElementRef<HTMLDivElement> | undefined>;
8
8
  readonly isMenuCollapsed: WritableSignal<boolean>;
9
9
  readonly hasMenuSelected: WritableSignal<boolean>;
10
10
  hasSidebar: boolean;
11
- hasHeader: boolean;
11
+ hasTopBar: boolean;
12
12
  constructor(kitNavigationMenuService: KitNavigationMenuService);
13
13
  ngAfterContentInit(): void;
14
14
  static ɵfac: i0.ɵɵFactoryDeclaration<KitPageLayoutComponent, never>;
15
- static ɵcmp: i0.ɵɵComponentDeclaration<KitPageLayoutComponent, "kit-page-layout", never, {}, {}, never, ["[sidebar]", "[header]", "[content]"], true, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<KitPageLayoutComponent, "kit-page-layout", never, {}, {}, never, ["[sidebar]", "[topBar]", "[content]"], true, never>;
16
16
  }
@@ -5,3 +5,12 @@ export interface UserApplication {
5
5
  export interface UserApplications {
6
6
  applications: UserApplication[];
7
7
  }
8
+ export interface CurrentUser {
9
+ id: number;
10
+ userName: string | null;
11
+ email: string | null;
12
+ firstName: string | null;
13
+ lastName: string | null;
14
+ name: string | null;
15
+ companyName: string;
16
+ }
@@ -1,11 +1,12 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import { Observable } from 'rxjs';
3
- import { UserApplications } from './kit-user-api.model';
3
+ import { CurrentUser, UserApplications } from './kit-user-api.model';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class KitUserApiService {
6
6
  private readonly httpClient;
7
7
  private readonly basePath;
8
8
  constructor(httpClient: HttpClient, basePath: string);
9
+ getUserInfo(): Observable<CurrentUser>;
9
10
  getUserApplicationList(): Observable<UserApplications>;
10
11
  static ɵfac: i0.ɵɵFactoryDeclaration<KitUserApiService, never>;
11
12
  static ɵprov: i0.ɵɵInjectableDeclaration<KitUserApiService>;
@@ -0,0 +1,3 @@
1
+ export declare class FetchUser {
2
+ static readonly type: string;
3
+ }
@@ -0,0 +1,14 @@
1
+ import { StateContext, StateToken } from '@ngxs/store';
2
+ import { Observable } from 'rxjs';
3
+ import { KitUserApiService } from '../../services/api/kit-user-api/kit-user-api.service';
4
+ import { ApiResponseState } from '../store.model';
5
+ import { CurrentUser } from '../../services/api/kit-user-api/kit-user-api.model';
6
+ import * as i0 from "@angular/core";
7
+ export declare const KIT_USER_STATE_TOKEN: StateToken<ApiResponseState<CurrentUser>>;
8
+ export declare class KitUserState {
9
+ private readonly kitUserApiService;
10
+ constructor(kitUserApiService: KitUserApiService);
11
+ fetchUser(ctx: StateContext<ApiResponseState<CurrentUser>>): Observable<CurrentUser>;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<KitUserState, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<KitUserState>;
14
+ }
@@ -1,4 +1,4 @@
1
- import { DestroyRef, EventEmitter, InputSignal, OnDestroy, OnInit, Signal, ViewContainerRef, WritableSignal } from '@angular/core';
1
+ import { DestroyRef, InputSignal, OnDestroy, OnInit, OutputEmitterRef, Signal, ViewContainerRef, WritableSignal } from '@angular/core';
2
2
  import { Store } from '@ngxs/store';
3
3
  import { Observable } from 'rxjs';
4
4
  import { TitleCasePipe } from '@angular/common';
@@ -7,7 +7,7 @@ import { KitSortDescriptor } from '../../../utils/kit-data-query/kit-data-query.
7
7
  import { KitAutocompleteItem } from '../../../components/kit-autocomplete/kit-autocomplete.component';
8
8
  import { ApiResponseState } from '../../../store/store.model';
9
9
  import { KitGridView, KitGridViewType, KitViewsState } from './store/kit-grid-views.model';
10
- import { KitGridColumnConfig } from '../store/kit-grid.model';
10
+ import { KitGridColumnConfig, KitGridDataState } from '../store/kit-grid.model';
11
11
  import { KitCollapsedListComponent } from '../../../components/kit-collapsed-list/kit-collapsed-list.component';
12
12
  import { KitSvgIcon, KitSvgIconType } from '../../../components/kit-svg-icon/kit-svg-icon.const';
13
13
  import { KitButtonIconPosition, KitButtonKind, KitButtonType } from '../../../components/kit-button/kit-button.const';
@@ -34,7 +34,7 @@ export declare class KitGridViewsComponent implements OnInit, OnDestroy {
34
34
  readonly defaultViewName: InputSignal<string>;
35
35
  readonly defaultSorting: InputSignal<KitSortDescriptor[]>;
36
36
  readonly systemViews: InputSignal<KitGridView[]>;
37
- viewChanged: EventEmitter<void>;
37
+ readonly viewChanged: OutputEmitterRef<void>;
38
38
  readonly collapsedList: Signal<KitCollapsedListComponent<KitGridViewListItem> | undefined>;
39
39
  readonly createNewViewPopup: Signal<KitPopupComponent | undefined>;
40
40
  readonly createNewViewName: WritableSignal<string>;
@@ -59,6 +59,7 @@ export declare class KitGridViewsComponent implements OnInit, OnDestroy {
59
59
  ngOnDestroy(): void;
60
60
  get isViewNameValid(): boolean;
61
61
  get inputMessage(): string;
62
+ get defaultGridState(): KitGridDataState;
62
63
  onSelectView(selectedView: KitGridViewListItem): void;
63
64
  openViewsManagerModal(): void;
64
65
  onViewCreate(): void;
@@ -72,7 +73,8 @@ export declare class KitGridViewsComponent implements OnInit, OnDestroy {
72
73
  private updateGridState;
73
74
  private getCollapsedListItem;
74
75
  private navigateToView;
75
- private buildGridDataState;
76
+ private buildGridState;
77
+ private buildUrlParamsFromView;
76
78
  static ɵfac: i0.ɵɵFactoryDeclaration<KitGridViewsComponent, never>;
77
79
  static ɵcmp: i0.ɵɵComponentDeclaration<KitGridViewsComponent, "kit-grid-views", never, { "viewGroup": { "alias": "viewGroup"; "required": true; "isSignal": true; }; "viewConfigGroup": { "alias": "viewConfigGroup"; "required": true; "isSignal": true; }; "defaultColumns": { "alias": "defaultColumns"; "required": true; "isSignal": true; }; "defaultViewName": { "alias": "defaultViewName"; "required": true; "isSignal": true; }; "defaultSorting": { "alias": "defaultSorting"; "required": true; "isSignal": true; }; "systemViews": { "alias": "systemViews"; "required": true; "isSignal": true; }; }, { "viewChanged": "viewChanged"; }, never, never, true, never>;
78
80
  }
@@ -0,0 +1,24 @@
1
+ import { InputSignal, OnInit } from '@angular/core';
2
+ import { KitSkeletonShape } from '../../../components/kit-skeleton/kit-skeleton.component';
3
+ import { Observable } from 'rxjs';
4
+ import { ApiResponseState } from '../../../store/store.model';
5
+ import { CurrentUser } from '../../../services/api/kit-user-api/kit-user-api.model';
6
+ import { Store } from '@ngxs/store';
7
+ import { KitProfileMenuItem } from '../../../components/kit-profile-menu/kit-profile-menu.model';
8
+ import { KitUserMenuItem } from './kit-top-bar-user.model';
9
+ import { TranslateService } from '@ngx-translate/core';
10
+ import * as i0 from "@angular/core";
11
+ export declare class KitTopBarUserComponent implements OnInit {
12
+ private readonly store;
13
+ private readonly translateService;
14
+ readonly menuItems: InputSignal<KitUserMenuItem[]>;
15
+ readonly user$: Observable<ApiResponseState<CurrentUser>>;
16
+ readonly menuItems$: Observable<KitProfileMenuItem[]>;
17
+ readonly kitSkeletonShape: typeof KitSkeletonShape;
18
+ constructor(store: Store, translateService: TranslateService);
19
+ ngOnInit(): void;
20
+ buildUserName(user: CurrentUser): string;
21
+ private fetchUser;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<KitTopBarUserComponent, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<KitTopBarUserComponent, "kit-top-bar-user", never, { "menuItems": { "alias": "menuItems"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
24
+ }
@@ -0,0 +1,4 @@
1
+ import { KitProfileMenuItem } from '../../../components/kit-profile-menu/kit-profile-menu.model';
2
+ export interface KitUserMenuItem extends KitProfileMenuItem {
3
+ permission?: string;
4
+ }
@@ -0,0 +1,17 @@
1
+ import { InputSignal, WritableSignal } from '@angular/core';
2
+ import { KitButtonType } from '../../components/kit-button/kit-button.const';
3
+ import { KitSvgIcon } from '../../components/kit-svg-icon/kit-svg-icon.const';
4
+ import { KitNavigationMenuService } from '../../components/kit-navigation-menu/kit-navigation-menu.service';
5
+ import { KitUserMenuItem } from './kit-top-bar-user/kit-top-bar-user.model';
6
+ import * as i0 from "@angular/core";
7
+ export declare class KitTopBarComponent {
8
+ private readonly kitNavigationMenuService;
9
+ readonly userMenuItems: InputSignal<KitUserMenuItem[]>;
10
+ readonly kitButtonType: typeof KitButtonType;
11
+ readonly kitSvgIcon: typeof KitSvgIcon;
12
+ readonly collapsed: WritableSignal<boolean>;
13
+ constructor(kitNavigationMenuService: KitNavigationMenuService);
14
+ toggleSidebar(collapsed: boolean): void;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<KitTopBarComponent, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<KitTopBarComponent, "kit-top-bar", never, { "userMenuItems": { "alias": "userMenuItems"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
17
+ }
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "components",
8
8
  "shared"
9
9
  ],
10
- "version": "1.1.165",
10
+ "version": "1.1.166",
11
11
  "peerDependencies": {
12
12
  "@angular/common": "^19.1.4",
13
13
  "@angular/core": "^19.1.4"
package/public-api.d.ts CHANGED
@@ -193,6 +193,8 @@ export { KitGridColumnManagerComponent, } from './lib/widgets/kit-grid-managemen
193
193
  export { KIT_DATE_FORMAT, KIT_DATETIME_FORMAT_LONG } from './lib/const/date-time.const';
194
194
  export { KitEntityGridComponent } from './lib/components/kit-entity-grid/kit-entity-grid.component';
195
195
  export { KitSidebarComponent } from './lib/widgets/kit-sidebar/kit-sidebar.component';
196
+ export { KitTopBarComponent } from './lib/widgets/kit-top-bar/kit-top-bar.component';
197
+ export { KitUserMenuItem } from './lib/widgets/kit-top-bar/kit-top-bar-user/kit-top-bar-user.model';
196
198
  export { KitMainMenuItem } from './lib/services/kit-menu-builder/kit-menu-builder.model';
197
199
  export { KitUserApplicationsState } from './lib/store/kit-user-applications/kit-user-applications.state';
198
200
  export { KIT_USER_PERMISSIONS_STATE_TOKEN, KitUserPermissionsState } from './lib/store/kit-user-permissions/kit-user-permissions.state';