@softheon/armature 17.12.7 → 17.13.1

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 (28) hide show
  1. package/ag-grid-components/src/sof-table/sof-table.component.d.ts +25 -23
  2. package/assets/styles/_variables.scss +3 -0
  3. package/assets/styles/sof-styles.scss +6 -2
  4. package/esm2022/ag-grid-components/src/sof-table/sof-table.component.mjs +41 -33
  5. package/esm2022/lib/base-components/sof-utility-button/sof-utility-button.component.mjs +4 -10
  6. package/esm2022/lib/core/components/app-template/app-template.component.mjs +1 -1
  7. package/esm2022/lib/core/models/base-config.mjs +1 -1
  8. package/esm2022/lib/core/models/nav-panel-config.mjs +2 -0
  9. package/esm2022/lib/navigation/components/{side-navigation → navigation}/navigation.component.mjs +1 -1
  10. package/esm2022/lib/navigation/components/sof-navigation-panel/models/nav-panel-nodes.mjs +2 -0
  11. package/esm2022/lib/navigation/components/sof-navigation-panel/models/nav-panel-settings.mjs +2 -0
  12. package/esm2022/lib/navigation/components/sof-navigation-panel/sof-nav-panel.component.mjs +136 -0
  13. package/esm2022/lib/navigation/navigation-api.mjs +5 -2
  14. package/esm2022/lib/navigation/navigation.module.mjs +2 -2
  15. package/fesm2022/softheon-armature-ag-grid-components.mjs +41 -33
  16. package/fesm2022/softheon-armature-ag-grid-components.mjs.map +1 -1
  17. package/fesm2022/softheon-armature.mjs +126 -12
  18. package/fesm2022/softheon-armature.mjs.map +1 -1
  19. package/lib/base-components/sof-utility-button/sof-utility-button.component.d.ts +2 -9
  20. package/lib/core/models/base-config.d.ts +5 -0
  21. package/lib/core/models/nav-panel-config.d.ts +17 -0
  22. package/lib/navigation/components/sof-navigation-panel/models/nav-panel-nodes.d.ts +99 -0
  23. package/lib/navigation/components/sof-navigation-panel/models/nav-panel-settings.d.ts +26 -0
  24. package/lib/navigation/components/sof-navigation-panel/sof-nav-panel.component.d.ts +82 -0
  25. package/lib/navigation/navigation-api.d.ts +4 -1
  26. package/lib/navigation/navigation.module.d.ts +1 -1
  27. package/package.json +1 -1
  28. /package/lib/navigation/components/{side-navigation → navigation}/navigation.component.d.ts +0 -0
@@ -1,6 +1,5 @@
1
- import { OnDestroy, OnInit } from '@angular/core';
2
1
  import * as i0 from "@angular/core";
3
- export declare class SofUtilityButtonComponent implements OnInit, OnDestroy {
2
+ export declare class SofUtilityButtonComponent {
4
3
  buttonId: string;
5
4
  buttonColorText: string;
6
5
  buttonSize: string;
@@ -10,16 +9,10 @@ export declare class SofUtilityButtonComponent implements OnInit, OnDestroy {
10
9
  /** Individual Button Click */
11
10
  buttonClick: Function;
12
11
  displayAdditionalComponent: any;
13
- /** On component init */
14
- constructor();
15
- /** On Destroy */
16
- ngOnDestroy(): void;
17
- /** Initialize component **/
18
- ngOnInit(): void;
19
12
  /** Any logic related to ag grid cell renderer data can be added here */
20
13
  agInit(params: any): void;
21
14
  static ɵfac: i0.ɵɵFactoryDeclaration<SofUtilityButtonComponent, never>;
22
- static ɵcmp: i0.ɵɵComponentDeclaration<SofUtilityButtonComponent, "lib-sof-utility-button", never, { "buttonId": { "alias": "buttonId"; "required": false; }; "buttonColorText": { "alias": "buttonColorText"; "required": false; }; "buttonSize": { "alias": "buttonSize"; "required": false; }; "buttonDisabled": { "alias": "buttonDisabled"; "required": false; }; "buttonIconClass": { "alias": "buttonIconClass"; "required": false; }; "menuDropDown": { "alias": "menuDropDown"; "required": false; }; "buttonClick": { "alias": "buttonClick"; "required": false; }; }, {}, never, never, false, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<SofUtilityButtonComponent, "sof-utility-button", never, { "buttonId": { "alias": "buttonId"; "required": false; }; "buttonColorText": { "alias": "buttonColorText"; "required": false; }; "buttonSize": { "alias": "buttonSize"; "required": false; }; "buttonDisabled": { "alias": "buttonDisabled"; "required": false; }; "buttonIconClass": { "alias": "buttonIconClass"; "required": false; }; "menuDropDown": { "alias": "menuDropDown"; "required": false; }; "buttonClick": { "alias": "buttonClick"; "required": false; }; }, {}, never, never, false, never>;
23
16
  }
24
17
  export declare enum BUTTON_COLORS_VARIATIONS {
25
18
  PRIMARY = "primary",
@@ -4,6 +4,7 @@ import { HeaderConfig } from './header-config';
4
4
  import { NavigationConfig } from './navigation-config';
5
5
  import { OidcAuthSettings } from './oidc-auth-settings';
6
6
  import { SubdomainConfig } from './subdomain-config';
7
+ import { NavPanelConfig } from './nav-panel-config';
7
8
  /** The base configuration interface */
8
9
  export interface BaseConfig {
9
10
  /** The oidc settings */
@@ -20,4 +21,8 @@ export interface BaseConfig {
20
21
  federatedModules?: {
21
22
  [key: string]: FederatedModuleConfig;
22
23
  };
24
+ /**
25
+ * The navigation panel configs
26
+ */
27
+ navigationPanel?: NavPanelConfig;
23
28
  }
@@ -0,0 +1,17 @@
1
+ import { NavPanelNode } from "../../navigation/components/sof-navigation-panel/models/nav-panel-nodes";
2
+ import { NavPanelSettings } from "../../navigation/components/sof-navigation-panel/models/nav-panel-settings";
3
+ /**
4
+ * Navigation panel config
5
+ * @property `settings`: NavPanelSettings
6
+ * @property `nodes`: Array&lt;NavPanelNode&gt;
7
+ */
8
+ export interface NavPanelConfig {
9
+ /**
10
+ * Navigation panel settings
11
+ */
12
+ settings: NavPanelSettings;
13
+ /**
14
+ * Navigation panel nodes
15
+ */
16
+ nodes: Array<NavPanelNode>;
17
+ }
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Navigation panel nodes
3
+ * @example
4
+ * ```typescript
5
+ * // no subnodes ...
6
+ * node: NavPanelNode = {
7
+ * label: 'Test Link',
8
+ * iconClass: 'ph-bold ph-acorn',
9
+ * route: '/test-link'
10
+ * };
11
+ *
12
+ * // with sub nodes ...
13
+ * node: NavPanelNode = {
14
+ * label: 'Section Header',
15
+ * subnodes: [
16
+ * {
17
+ * label: 'Test Link',
18
+ * iconClass: 'ph-bold ph-acorn',
19
+ * route: '/test-link'
20
+ * }
21
+ * ]
22
+ * };
23
+ * ```
24
+ */
25
+ export interface NavPanelNode {
26
+ /**
27
+ * Node label
28
+ * @note can be a translation key
29
+ * @example 'armature.navigationPanel.node-labels.home'
30
+ */
31
+ label: string;
32
+ /**
33
+ * Node icon class
34
+ * @note we are currently using phosphor-icons type: bold, per design
35
+ * @example 'ph-bold ph-acorn'
36
+ * @tutorial
37
+ * - include the following script in the index.html of your app -
38
+ * ```html
39
+ * <script src="https://unpkg.com/@phosphor-icons/web"></script>
40
+ * ```
41
+ * - Setting the font-size for an icon automatically sets the height & width to match, which helps when aligning icons in a column or row.
42
+ * @see {@link [Phosphor Icons: Bold](https://phosphoricons.com/?weight=%22bold%22)}
43
+ */
44
+ iconClass?: string;
45
+ /**
46
+ * Node route url
47
+ */
48
+ route?: string;
49
+ /**
50
+ * Subnodes array
51
+ * @description If sub nodes are present,
52
+ * the parent node should not have a route or icon and will only include a label for the sub nodes,
53
+ * this parent node would not be included in the applications router-module as it is just a section header.
54
+ * @example
55
+ * ```typescript
56
+ * node: NavPanelNode = {
57
+ * label: 'Section Header',
58
+ * subnodes: [
59
+ * {
60
+ * label: 'Test Link',
61
+ * iconClass: 'ph-bold ph-acorn',
62
+ * route: '/test-link'
63
+ * }
64
+ * ]
65
+ * };
66
+ * ```
67
+ */
68
+ subnodes?: Array<NavPanelSubnode>;
69
+ }
70
+ /**
71
+ * Navigation panel subnodes
72
+ * @note subnodes cannot have there own subnodes
73
+ */
74
+ interface NavPanelSubnode {
75
+ /**
76
+ * Subnode label
77
+ * @note can be a translation key
78
+ * @example 'armature.navigationPanel.node-labels.home'
79
+ */
80
+ label: string;
81
+ /**
82
+ * Subnode icon class
83
+ * @note we are currently using phosphor-icons, type: bold, per design
84
+ * @example 'ph-bold ph-acorn'
85
+ * @tutorial
86
+ * - include the following script in the index.html of your app -
87
+ * ```html
88
+ * <script src="https://unpkg.com/@phosphor-icons/web"></script>
89
+ * ```
90
+ * - Setting the font-size for an icon automatically sets the height & width to match, which helps when aligning icons in a column or row.
91
+ * @see {@link [Phosphor Icons: Bold](https://phosphoricons.com/?weight=%22bold%22)}
92
+ */
93
+ iconClass?: string;
94
+ /**
95
+ * Subnode route url
96
+ */
97
+ route?: string;
98
+ }
99
+ export {};
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Navigation panel settings
3
+ */
4
+ export interface NavPanelSettings {
5
+ /**
6
+ * Can we collapse/expand the nav panel on desktop
7
+ * @note on mobile you always can.
8
+ * @default true
9
+ */
10
+ allowNavToggle?: boolean;
11
+ /**
12
+ * To show the login/logout button
13
+ * @default false
14
+ */
15
+ showAuthButton?: boolean;
16
+ /**
17
+ * To show the language settings button
18
+ * @default false
19
+ */
20
+ showLanguageButton?: boolean;
21
+ /**
22
+ * To show the whats new button
23
+ * @default false
24
+ */
25
+ showWhatsNewButton?: boolean;
26
+ }
@@ -0,0 +1,82 @@
1
+ import { AfterViewInit, ElementRef, EventEmitter, OnInit, Signal, WritableSignal } from '@angular/core';
2
+ import { BreakpointState } from '@angular/cdk/layout';
3
+ import { NavPanelNode } from './models/nav-panel-nodes';
4
+ import { NavPanelSettings } from './models/nav-panel-settings';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * The Navigation Panel Component - WIP
8
+ * @description Main navigation panel for Portals, part of the new Portal UI-shell.
9
+ * @todo `header` some adjustments will be needed depending on the new Header design, like the toggle button & mobile.
10
+ * @see [Figma/portal-ui-shell]({@link https://www.figma.com/design/W5HVNCcN9HafDRvc5N7Z28/%5BWIP%5D-Softheon-Unified-Design-System-v1.0?node-id=14089-118395&t=G5IKDvYHpwU0vOFq-0}) _- header design to the right of nav panel design_
11
+ * @todo `language settings` - awaiting design ( its own component, modal )
12
+ * @see [Figma/language-switcher]({@link https://www.figma.com/design/W5HVNCcN9HafDRvc5N7Z28/%5BWIP%5D-Softheon-Unified-Design-System-v1.0?node-id=14089-118249&t=qMyPFk9iMfbU6iRS-0})
13
+ * @todo `mobile styling` - awaiting design
14
+ * @todo `whats new` - awaiting design ( its own component, modal )
15
+ * @note _this component should need 2 data points when the 'what's new' flow is implemented_ -
16
+ * - does the user have unread release notes? - if so style the button appropriately
17
+ * - what is the current version? - to display on badge
18
+ */
19
+ export declare class SofNavPanelComponent implements OnInit, AfterViewInit {
20
+ /**
21
+ * Component Input (required) - Navigation node data
22
+ * @see {@link NavPanelNode}
23
+ */
24
+ nodes: Array<NavPanelNode>;
25
+ /**
26
+ * Component Input - Basic navigation settings
27
+ * @see {@link NavPanelSettings}
28
+ * @note If any or all settings are not passed, defaults will be set.
29
+ * @see {@link initSettings()}
30
+ */
31
+ settings?: NavPanelSettings;
32
+ /**
33
+ * Component Input - Current language to display
34
+ * @see {@link [Figma/language-switcher](https://www.figma.com/design/W5HVNCcN9HafDRvc5N7Z28/%5BWIP%5D-Softheon-Unified-Design-System-v1.0?node-id=14089-118249&t=qMyPFk9iMfbU6iRS-0)}
35
+ */
36
+ currentLanguage: string;
37
+ /** Nav panels footer element reference */
38
+ navPanelFooter: ElementRef<HTMLElement>;
39
+ /** Emit this event to show the whats new modal */
40
+ showWhatsNewEvent: EventEmitter<void>;
41
+ /** Emit this event to show the language settings modal */
42
+ showLanguageEvent: EventEmitter<void>;
43
+ /** Utility for checking the matching state of media queries.*/
44
+ private breakpointObserver;
45
+ /** Has the small screen breakpoint been hit */
46
+ isSmallScreen: Signal<BreakpointState>;
47
+ /** Inject the auth service */
48
+ private authorizationService;
49
+ /**
50
+ * How much padding-bottom.px to add, depending on footer content/height
51
+ * @default 40
52
+ */
53
+ footerSpacePadding: WritableSignal<number>;
54
+ /** On Init - Initialize the settings */
55
+ ngOnInit(): void;
56
+ /** After View Init - Set the footer space */
57
+ ngAfterViewInit(): void;
58
+ /**
59
+ * Initializes the nav panel settings, defaults will be set if `null` or `undefined`
60
+ * @note The 'nullish coalescing assignment operator' `??=` assigns defaults for `boolean` and `number` types,
61
+ * for `number` types this will allow for `0` to be accepted. For a `string`, use 'logical OR assignment' `||=` operator,
62
+ * as this will also prevent empty strings `" "`.
63
+ * @see `??=` {@link [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_assignment#using_nullish_coalescing_assignment)}
64
+ * @see `||=` {@link [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_OR_assignment#try_it)}
65
+ */
66
+ private initSettings;
67
+ /**
68
+ * Calculate the padding based on the footer height depending on how many buttons are present
69
+ * @note If no buttons, the footer is removed and the default padding is returned
70
+ * @returns `padding: number` the number of pixels to add to the `<nav>` elements `[style.paddingBottom.px]`
71
+ * @default 40
72
+ */
73
+ private calcFooterSpacePadding;
74
+ /** Logs out the user, only logout is needed for portals as they have there own login page */
75
+ logout(): void;
76
+ /** Emits event to show the language settings modal */
77
+ showLanguageSettings(): void;
78
+ /** Emits event to show the whats new modal */
79
+ showWhatsNew(): void;
80
+ static ɵfac: i0.ɵɵFactoryDeclaration<SofNavPanelComponent, never>;
81
+ static ɵcmp: i0.ɵɵComponentDeclaration<SofNavPanelComponent, "sof-nav-panel", never, { "nodes": { "alias": "nodes"; "required": true; }; "settings": { "alias": "settings"; "required": false; }; "currentLanguage": { "alias": "currentLanguage"; "required": false; }; }, { "showWhatsNewEvent": "showWhatsNewEvent"; "showLanguageEvent": "showLanguageEvent"; }, never, ["[sof-nav-panel-main-content]"], true, never>;
82
+ }
@@ -4,8 +4,11 @@ export * from './models/navigation';
4
4
  export * from './models/nav.settings';
5
5
  export * from './models/nav-theme.settings';
6
6
  export * from './models/breadcrumb';
7
- export * from './components/side-navigation/navigation.component';
7
+ export * from './components/sof-navigation-panel/models/nav-panel-nodes';
8
+ export * from './components/sof-navigation-panel/models/nav-panel-settings';
9
+ export * from './components/navigation/navigation.component';
8
10
  export * from './components/sof-breadcrumbs/sof-breadcrumbs-hierarchy/sof-breadcrumbs-hierarchy.component';
9
11
  export * from './components/sof-breadcrumbs/sof-breadcrumbs-history/sof-breadcrumbs-history.component';
10
12
  export * from './components/sof-tabs-navigation/sof-tabs.component';
11
13
  export * from './components/sof-sub-navigation/sof-sub-navigation.component';
14
+ export * from './components/sof-navigation-panel/sof-nav-panel.component';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from "@angular/core";
2
- import * as i1 from "./components/side-navigation/navigation.component";
2
+ import * as i1 from "./components/navigation/navigation.component";
3
3
  import * as i2 from "./components/sof-breadcrumbs/sof-breadcrumbs-hierarchy/sof-breadcrumbs-hierarchy.component";
4
4
  import * as i3 from "./components/sof-breadcrumbs/sof-breadcrumbs-history/sof-breadcrumbs-history.component";
5
5
  import * as i4 from "./components/sof-tabs-navigation/sof-tabs.component";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softheon/armature",
3
- "version": "17.12.7",
3
+ "version": "17.13.1",
4
4
  "dependencies": {
5
5
  "tslib": "^2.5.0"
6
6
  },