@softheon/armature 17.26.0 → 17.26.2

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.
Files changed (34) hide show
  1. package/esm2022/lib/armature.module.mjs +8 -4
  2. package/esm2022/lib/core/components/app-template/app-template.component.mjs +6 -4
  3. package/esm2022/lib/header/components/header/header.component.mjs +8 -4
  4. package/esm2022/lib/header/components/sof-header/sof-header.component.mjs +1 -1
  5. package/esm2022/lib/header/header-api.mjs +2 -1
  6. package/esm2022/lib/header/header.module.mjs +11 -6
  7. package/esm2022/lib/header/models/header-external-links.mjs +2 -0
  8. package/esm2022/lib/header/models/header.settings.mjs +1 -1
  9. package/esm2022/lib/mfe/components/entity-base/entity-base.component.mjs +72 -0
  10. package/esm2022/lib/mfe/mfe.module.mjs +24 -0
  11. package/esm2022/lib/mfe/models/entity-config-base.mjs +2 -0
  12. package/esm2022/lib/mfe/models/entity-dto.mjs +2 -0
  13. package/esm2022/lib/mfe/services/entity-helper.service.mjs +113 -0
  14. package/esm2022/lib/navigation/components/b2b-nav/b2b-nav.component.mjs +202 -0
  15. package/esm2022/lib/navigation/models/nav.settings.mjs +1 -1
  16. package/esm2022/public-api.mjs +8 -1
  17. package/fesm2022/softheon-armature.mjs +482 -94
  18. package/fesm2022/softheon-armature.mjs.map +1 -1
  19. package/lib/armature.module.d.ts +2 -1
  20. package/lib/core/components/app-template/app-template.component.d.ts +1 -1
  21. package/lib/header/components/header/header.component.d.ts +4 -1
  22. package/lib/header/header-api.d.ts +1 -0
  23. package/lib/header/header.module.d.ts +2 -1
  24. package/lib/header/models/header-external-links.d.ts +13 -0
  25. package/lib/header/models/header.settings.d.ts +3 -0
  26. package/lib/mfe/components/entity-base/entity-base.component.d.ts +34 -0
  27. package/lib/mfe/mfe.module.d.ts +7 -0
  28. package/lib/mfe/models/entity-config-base.d.ts +5 -0
  29. package/lib/mfe/models/entity-dto.d.ts +9 -0
  30. package/lib/mfe/services/entity-helper.service.d.ts +60 -0
  31. package/lib/navigation/components/b2b-nav/b2b-nav.component.d.ts +91 -0
  32. package/lib/navigation/models/nav.settings.d.ts +2 -0
  33. package/package.json +1 -1
  34. package/public-api.d.ts +6 -0
@@ -13,6 +13,7 @@ import * as i8 from "./alert-banner/alert-banner.module";
13
13
  import * as i9 from "@angular/router";
14
14
  import * as i10 from "@angular/common";
15
15
  import * as i11 from "@ngbracket/ngx-layout";
16
+ import * as i12 from "./navigation/components/b2b-nav/b2b-nav.component";
16
17
  /**
17
18
  * Session base path factory
18
19
  * @param injector The angular injector
@@ -41,6 +42,6 @@ export declare class ArmatureModule {
41
42
  */
42
43
  static forRoot(configServiceClass?: any, ignoreCustomAppInitializer?: boolean): ModuleWithProviders<ArmatureModule>;
43
44
  static ɵfac: i0.ɵɵFactoryDeclaration<ArmatureModule, never>;
44
- static ɵmod: i0.ɵɵNgModuleDeclaration<ArmatureModule, [typeof i1.AppTemplateComponent], [typeof i2.FormsModule, typeof i3.NavigationModule, typeof i4.ArmatureHeaderModule, typeof i5.ArmatureFooterModule, typeof i6.BaseComponentModule, typeof i7.ThemeModule, typeof i8.AlertBannerModule, typeof i9.RouterModule, typeof i10.CommonModule, typeof i11.FlexLayoutModule], [typeof i2.FormsModule, typeof i3.NavigationModule, typeof i4.ArmatureHeaderModule, typeof i5.ArmatureFooterModule, typeof i6.BaseComponentModule, typeof i7.ThemeModule, typeof i8.AlertBannerModule, typeof i1.AppTemplateComponent]>;
45
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ArmatureModule, [typeof i1.AppTemplateComponent], [typeof i2.FormsModule, typeof i3.NavigationModule, typeof i4.ArmatureHeaderModule, typeof i5.ArmatureFooterModule, typeof i6.BaseComponentModule, typeof i7.ThemeModule, typeof i8.AlertBannerModule, typeof i9.RouterModule, typeof i10.CommonModule, typeof i11.FlexLayoutModule, typeof i12.B2bNavComponent], [typeof i2.FormsModule, typeof i3.NavigationModule, typeof i4.ArmatureHeaderModule, typeof i5.ArmatureFooterModule, typeof i6.BaseComponentModule, typeof i7.ThemeModule, typeof i8.AlertBannerModule, typeof i1.AppTemplateComponent]>;
45
46
  static ɵinj: i0.ɵɵInjectorDeclaration<ArmatureModule>;
46
47
  }
@@ -69,5 +69,5 @@ export declare class AppTemplateComponent implements OnInit {
69
69
  /** Assigns the default navigation theme */
70
70
  private assignDefaultNavTheme;
71
71
  static ɵfac: i0.ɵɵFactoryDeclaration<AppTemplateComponent, never>;
72
- static ɵcmp: i0.ɵɵComponentDeclaration<AppTemplateComponent, "sof-ar-app-template", never, {}, {}, never, ["[sof-ar-header-left]", "[sof-ar-header-center]", "[sof-ar-header-right]", "[sof-header-user-menu]", "[sof-ar-template-content]", "[sof-ar-nav-content-header]", "[sof-ar-footer-content]", "[sof-ar-nav-mobile-footer]"], false, never>;
72
+ static ɵcmp: i0.ɵɵComponentDeclaration<AppTemplateComponent, "sof-ar-app-template", never, {}, {}, never, ["[sof-ar-header-left]", "[sof-ar-header-center]", "[sof-ar-header-right]", "[sof-header-user-menu]", "[sof-ar-template-content]", "[sof-ar-nav-content-header]", "[sof-ar-footer-content]", "[sof-ar-nav-mobile-footer]", "[sof-ar-nav-content-header]", "[sof-ar-footer-content]", "[sof-ar-nav-mobile-footer]"], false, never>;
73
73
  }
@@ -1,5 +1,5 @@
1
1
  import { MediaMatcher } from '@angular/cdk/layout';
2
- import { ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
2
+ import { ChangeDetectorRef, EventEmitter, OnInit, WritableSignal } from '@angular/core';
3
3
  import { MatSlideToggleChange } from '@angular/material/slide-toggle';
4
4
  import { TranslateService } from '@ngx-translate/core';
5
5
  import { OAuthService, OAuthStorage } from 'angular-oauth2-oidc';
@@ -9,6 +9,7 @@ import { HeaderAuthSettings } from '../../models/header-auth.settings';
9
9
  import { HeaderLanguageSettings } from '../../models/header-language.settings';
10
10
  import { HeaderThemeSettings } from '../../models/header-theme.settings';
11
11
  import { HeaderSettings } from '../../models/header.settings';
12
+ import { HeaderExternalLinks } from '../../models/header-external-links';
12
13
  import * as i0 from "@angular/core";
13
14
  /** The Header Component */
14
15
  export declare class ArmatureHeaderComponent implements OnInit {
@@ -80,6 +81,8 @@ export declare class ArmatureHeaderComponent implements OnInit {
80
81
  get manageUrl(): string;
81
82
  /** The header language settings */
82
83
  headerLanguageSettings: HeaderLanguageSettings;
84
+ /** The header external links */
85
+ externalLinks: WritableSignal<Array<HeaderExternalLinks>>;
83
86
  /** the mobile query */
84
87
  mobileQuery: MediaQueryList;
85
88
  /** the mobile query listener2 */
@@ -9,3 +9,4 @@ export * from './models/header-theme.settings';
9
9
  export * from './models/header-auth.settings';
10
10
  export * from './models/mobile-header-nav.settings';
11
11
  export * from './models/header-language.settings';
12
+ export * from './models/header-external-links';
@@ -13,8 +13,9 @@ import * as i11 from "@angular/material/icon";
13
13
  import * as i12 from "@angular/material/list";
14
14
  import * as i13 from "@angular/material/slide-toggle";
15
15
  import * as i14 from "@angular/material/sidenav";
16
+ import * as i15 from "@angular/material/tooltip";
16
17
  export declare class ArmatureHeaderModule {
17
18
  static ɵfac: i0.ɵɵFactoryDeclaration<ArmatureHeaderModule, never>;
18
- static ɵmod: i0.ɵɵNgModuleDeclaration<ArmatureHeaderModule, [typeof i1.ArmatureHeaderComponent, typeof i2.MobileHeaderMenuComponent], [typeof i3.RouterModule, typeof i4.CommonModule, typeof i5.TranslateModule, typeof i6.FlexLayoutModule, typeof i7.MatToolbarModule, typeof i8.MatMenuModule, typeof i9.MatButtonToggleModule, typeof i10.MatButtonModule, typeof i11.MatIconModule, typeof i12.MatListModule, typeof i13.MatSlideToggleModule, typeof i14.MatSidenavModule], [typeof i1.ArmatureHeaderComponent, typeof i2.MobileHeaderMenuComponent, typeof i7.MatToolbarModule, typeof i8.MatMenuModule, typeof i9.MatButtonToggleModule, typeof i10.MatButtonModule, typeof i11.MatIconModule, typeof i12.MatListModule, typeof i13.MatSlideToggleModule, typeof i14.MatSidenavModule]>;
19
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ArmatureHeaderModule, [typeof i1.ArmatureHeaderComponent, typeof i2.MobileHeaderMenuComponent], [typeof i3.RouterModule, typeof i4.CommonModule, typeof i5.TranslateModule, typeof i6.FlexLayoutModule, typeof i7.MatToolbarModule, typeof i8.MatMenuModule, typeof i9.MatButtonToggleModule, typeof i10.MatButtonModule, typeof i11.MatIconModule, typeof i12.MatListModule, typeof i13.MatSlideToggleModule, typeof i14.MatSidenavModule, typeof i15.MatTooltipModule], [typeof i1.ArmatureHeaderComponent, typeof i2.MobileHeaderMenuComponent, typeof i7.MatToolbarModule, typeof i8.MatMenuModule, typeof i9.MatButtonToggleModule, typeof i10.MatButtonModule, typeof i11.MatIconModule, typeof i12.MatListModule, typeof i13.MatSlideToggleModule, typeof i14.MatSidenavModule, typeof i15.MatTooltipModule]>;
19
20
  static ɵinj: i0.ɵɵInjectorDeclaration<ArmatureHeaderModule>;
20
21
  }
@@ -0,0 +1,13 @@
1
+ /** The header external link configurations */
2
+ export interface HeaderExternalLinks {
3
+ /** The link uri */
4
+ uri?: string;
5
+ /** The link text translate key */
6
+ translateKey?: string;
7
+ /** The link icon */
8
+ icon?: string;
9
+ /** The link icon alt text, also applies to log alt text */
10
+ iconAltTextTranslateKey?: string;
11
+ /** The link logo */
12
+ logo?: string;
13
+ }
@@ -1,5 +1,6 @@
1
1
  import { RoutePath } from '../../core/models/route-path';
2
2
  import { Styles } from '../../core/models/styles';
3
+ import { HeaderExternalLinks } from './header-external-links';
3
4
  import { HeaderLanguageSettings } from './header-language.settings';
4
5
  /** the Header Settings */
5
6
  export interface HeaderSettings {
@@ -50,4 +51,6 @@ export interface HeaderSettings {
50
51
  darkThemeText?: string;
51
52
  /** True if we want to show username as unclickable*/
52
53
  makeUsernameUnclickable?: boolean;
54
+ /** The header external links */
55
+ externalLinks?: Array<HeaderExternalLinks>;
53
56
  }
@@ -0,0 +1,34 @@
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
+ import { ActivatedRoute } from '@angular/router';
3
+ import { EntityHelperService } from '../../services/entity-helper.service';
4
+ import { EntityDto } from '../../models/entity-dto';
5
+ import { EntityConfigBase } from '../../models/entity-config-base';
6
+ import * as i0 from "@angular/core";
7
+ /** The entity base component */
8
+ export declare abstract class EntityBaseComponent<TConfig extends EntityConfigBase> implements OnInit, OnDestroy {
9
+ private readonly activatedRoute;
10
+ protected readonly entityHelper: EntityHelperService<TConfig>;
11
+ /** True if is expanded */
12
+ protected isExpanded: boolean;
13
+ /**
14
+ * Constructor
15
+ * @param activatedRoute The activated route
16
+ * @param entityHelper The entity helper service
17
+ */
18
+ constructor(activatedRoute: ActivatedRoute, entityHelper: EntityHelperService<TConfig>);
19
+ /** Life cycle hook for component initialization */
20
+ ngOnInit(): void;
21
+ /** Life cycle hook for component destruction */
22
+ ngOnDestroy(): void;
23
+ abstract onRowClick(entity: EntityDto): void;
24
+ /** Navigate back to list view */
25
+ returnToQueueView(): void;
26
+ /** Copies the entity url */
27
+ copyEntityUrl(): void;
28
+ /** Reloads the entity */
29
+ reloadEntity(): void;
30
+ /** Opens the entity view in a new route */
31
+ openEntityView(): void;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<EntityBaseComponent<any>, never>;
33
+ static ɵcmp: i0.ɵɵComponentDeclaration<EntityBaseComponent<any>, "ng-component", never, {}, {}, never, never, false, never>;
34
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@angular/common";
3
+ export declare class MfeModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<MfeModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MfeModule, never, [typeof i1.CommonModule], never>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<MfeModule>;
7
+ }
@@ -0,0 +1,5 @@
1
+ /** The entity configuration base */
2
+ export interface EntityConfigBase {
3
+ /** The copy entity route prefix */
4
+ copyEntityRoutePrefix: string;
5
+ }
@@ -0,0 +1,9 @@
1
+ /** The entity dto */
2
+ export interface EntityDto {
3
+ /** The folder ID */
4
+ folderId: number;
5
+ /** The drawer ID */
6
+ drawerId: number;
7
+ /** The task ID */
8
+ taskId: number;
9
+ }
@@ -0,0 +1,60 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { WritableSignal } from '@angular/core';
3
+ import { ActivatedRoute } from '@angular/router';
4
+ import { TranslateService } from '@ngx-translate/core';
5
+ import { Observable } from 'rxjs';
6
+ import { EntityDto } from '../models/entity-dto';
7
+ import { EntityConfigBase } from '../models/entity-config-base';
8
+ import * as i0 from "@angular/core";
9
+ /** The queue session storage prefix */
10
+ export declare const ENTITY_SESSION_STORAGE_PREFIX = "mfe.entity.";
11
+ /** The session storage queue name key */
12
+ export declare const ENTITY_SS_CONFIG_PREFIX = "mfe.entity.entity-config-prefix";
13
+ export declare class EntityHelperService<TConfig extends EntityConfigBase> {
14
+ private readonly http;
15
+ private readonly translateService;
16
+ /** The configuration behavior subject */
17
+ private readonly configBs;
18
+ /** The activated route subscription */
19
+ private activatedRouteSub;
20
+ /** The configuration observable */
21
+ readonly config$: Observable<TConfig>;
22
+ /** The configurations */
23
+ get config(): TConfig;
24
+ /** Sets the configurations */
25
+ set config(value: TConfig);
26
+ /** isLoaded behavior subject */
27
+ private readonly isLoadedBs;
28
+ /** Is loaded observable */
29
+ readonly isLoaded$: Observable<boolean>;
30
+ /** The current entity */
31
+ currentEntity: WritableSignal<EntityDto>;
32
+ /**
33
+ * Constructor
34
+ * @param http The http client
35
+ * @param translateService The translate service
36
+ */
37
+ constructor(http: HttpClient, translateService: TranslateService);
38
+ /**
39
+ * Initializes the current entity from route params
40
+ * @param activatedRoute The activated route
41
+ */
42
+ initializeRouteParams(activatedRoute: ActivatedRoute): void;
43
+ /**
44
+ * Initializes the configurations
45
+ */
46
+ initializeConfigurations(): void;
47
+ /**
48
+ *
49
+ * @param taskId The task id
50
+ * @param drawerId The drawer id
51
+ * @param entityId The entity id
52
+ * @param configPrefix Teh config prefix
53
+ * @param entityConfig The entity config
54
+ * @param enLangConfig The en lang config
55
+ */
56
+ loadConfigurations(configPrefix: string, entityConfig?: TConfig, enLangConfig?: JSON): void;
57
+ resetLoading(): void;
58
+ static ɵfac: i0.ɵɵFactoryDeclaration<EntityHelperService<any>, never>;
59
+ static ɵprov: i0.ɵɵInjectableDeclaration<EntityHelperService<any>>;
60
+ }
@@ -0,0 +1,91 @@
1
+ import { BreakpointState } from '@angular/cdk/layout';
2
+ import { EventEmitter, OnInit, Signal } from '@angular/core';
3
+ import { MatSidenavContent } from '@angular/material/sidenav';
4
+ import { NavPanelLogo } from '../sof-navigation-panel/models/nav-panel-logo';
5
+ import { NavNode } from '../../models/navigation';
6
+ import { NavigationAdvancedSettings, NavigationSettings } from '../../models/nav.settings';
7
+ import { NavigationThemeSettings } from '../../models/nav-theme.settings';
8
+ import { HeaderLanguageSettings } from '../../../header/models/header-language.settings';
9
+ import { MatMenuTrigger } from '@angular/material/menu';
10
+ import * as i0 from "@angular/core";
11
+ export declare class B2bNavComponent implements OnInit {
12
+ /** Utility for checking the matching state of media queries.*/
13
+ private breakpointObserver;
14
+ /** The router */
15
+ private router;
16
+ /** Has the small screen breakpoint been hit */
17
+ isSmallScreen: Signal<BreakpointState>;
18
+ /** The brand logo in the footer of the navigation panel */
19
+ brandLogo: NavPanelLogo;
20
+ /**
21
+ * Should scroll to top on `NavigationEnd` event?
22
+ * @default true
23
+ */
24
+ private scrollToTopOnNavigationEndEvent;
25
+ /**
26
+ * Is the nav panel open
27
+ * @note this is needed to pass panel opened state to the SofHeaderPortalComponent
28
+ */
29
+ isNavPanelOpenedEvent: EventEmitter<boolean>;
30
+ /**
31
+ * Main content for scroll position
32
+ * @note this is the element which has the apps 'main' scrollbar.
33
+ */
34
+ sidenavContent: MatSidenavContent;
35
+ /** Component Input - the navigation data */
36
+ navigationData: NavNode[];
37
+ /** Component Input - the navigation settings */
38
+ settings: NavigationSettings;
39
+ /** Component Input - the navigation settings */
40
+ advancedSettings: NavigationAdvancedSettings;
41
+ /** Component Input - the navigation settings */
42
+ themeSettings: NavigationThemeSettings;
43
+ /** Component Input - the navigation language settings */
44
+ languageSettings: HeaderLanguageSettings;
45
+ /** Current language **/
46
+ currentLang: string;
47
+ /** logOut text **/
48
+ logOutText: string;
49
+ /** Sets language **/
50
+ setLanguage$: EventEmitter<any>;
51
+ /** The mat menu trigger */
52
+ trigger: MatMenuTrigger;
53
+ /** True when the navigation is open */
54
+ isNavOpen: boolean;
55
+ /** The selected nav node */
56
+ selectedNode: NavNode;
57
+ /** Angular's router */
58
+ /** On Init - Initialize the settings */
59
+ ngOnInit(): void;
60
+ shrinkNav(): void;
61
+ openMenu(node: NavNode, event: MouseEvent): void;
62
+ /**
63
+ * Initializes the nav panel settings, defaults will be set if `null` or `undefined`
64
+ * @note The 'nullish coalescing assignment operator' `??=` assigns defaults for `boolean` and `number` types,
65
+ * for `number` types this will allow for `0` to be accepted. For a `string`, use 'logical OR assignment' `||=` operator,
66
+ * as this will also prevent empty strings `" "`.
67
+ * @see `??=` {@link [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_assignment#using_nullish_coalescing_assignment)}
68
+ * @see `||=` {@link [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_OR_assignment#try_it)}
69
+ */
70
+ private initSettings;
71
+ /**
72
+ * Scrolls to the top of page
73
+ * @note using `window.scrollTo` will not work if using this component as the main scrollbar does not live on the window level.
74
+ * Configuring `scrollPositionRestoration` in the router module will not work either.
75
+ */
76
+ scrollToTop(): void;
77
+ /** Initializes the advanced nav settings */
78
+ private initAdvancedSettings;
79
+ /** Initializes the nav theme settings */
80
+ private initThemeSettings;
81
+ /** Initializes the basic nav settings */
82
+ private initBasicSettings;
83
+ /**
84
+ * Sets the theme color
85
+ * @param variable the css variable name
86
+ * @param color the color
87
+ */
88
+ setThemeColor(variable: string, color: string): void;
89
+ static ɵfac: i0.ɵɵFactoryDeclaration<B2bNavComponent, never>;
90
+ static ɵcmp: i0.ɵɵComponentDeclaration<B2bNavComponent, "sof-nav-b2b", never, { "scrollToTopOnNavigationEndEvent": { "alias": "scrollToTopOnNavigationEndEvent"; "required": false; }; "navigationData": { "alias": "navigationData"; "required": false; }; "settings": { "alias": "settings"; "required": false; }; "advancedSettings": { "alias": "advancedSettings"; "required": false; }; "themeSettings": { "alias": "themeSettings"; "required": false; }; "languageSettings": { "alias": "languageSettings"; "required": false; }; "currentLang": { "alias": "currentLang"; "required": false; }; "logOutText": { "alias": "logOutText"; "required": false; }; }, { "isNavPanelOpenedEvent": "isNavPanelOpenedEvent"; "setLanguage$": "setLanguage$"; }, never, ["[sof-ar-nav-header]", "*"], true, never>;
91
+ }
@@ -52,6 +52,8 @@ export interface NavigationSettings {
52
52
  allowNavToggle?: boolean;
53
53
  /** Whether to allow username to show up on sidenav mobile view */
54
54
  disableUsernameMobile?: boolean;
55
+ /** The navigation version */
56
+ version?: 'v1' | 'v2';
55
57
  }
56
58
  /** The Advanced Settings */
57
59
  export interface NavigationAdvancedSettings {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softheon/armature",
3
- "version": "17.26.0",
3
+ "version": "17.26.2",
4
4
  "dependencies": {
5
5
  "tslib": "^2.5.0"
6
6
  },
package/public-api.d.ts CHANGED
@@ -47,3 +47,9 @@ export * from './lib/component-save-print/sof-ar-component-save-print.module';
47
47
  export * from './lib/component-save-print/components/component-save-print/component-save-print.component';
48
48
  export * from './lib/component-save-print/services/component-save-print.service';
49
49
  export * from './lib/rbac/services/tokens';
50
+ export * from './lib/mfe/mfe.module';
51
+ export * from './lib/mfe/services/entity-helper.service';
52
+ export * from './lib/mfe/components/entity-base/entity-base.component';
53
+ export * from './lib/mfe/models/entity-config-base';
54
+ export * from './lib/mfe/models/entity-dto';
55
+ export * from './lib/navigation/components/b2b-nav/b2b-nav.component';