From 395452e60e4c45f35525066d826d68c3e19a7acb Mon Sep 17 00:00:00 2001 From: Nikola Holst Nikolic Date: Wed, 1 Dec 2021 12:44:34 +0100 Subject: [PATCH] feature(digi-migrering): Utfasning av digi-ng-typography-dynamic-header. (TV-858) Merge in TEA/mina-sidor-fa-web from feature/TV-858-digi-ng-typography-dynamic-heading to develop Squashed commit of the following: commit 31384faf8c31562024882ea26b74a79be7ab71fa Author: WP\holno Date: Wed Dec 1 11:15:19 2021 +0100 - Removed digi-ng-typography-dynamic-header and typographyDynamicHeadingLevel, replaced with a h3. - Overkill to create a ui-component for this as it's only used in one place and the headingLevel-input never gets a value and falls back on default h3. --- .../expanded-tree-node.component.html | 6 +----- .../expanded-tree-node.component.scss | 13 ++----------- .../expanded-tree-node.component.ts | 2 -- .../tree-nodes-selector.module.ts | 10 +++++++--- 4 files changed, 10 insertions(+), 21 deletions(-) diff --git a/apps/mina-sidor-fa/src/app/shared/components/tree-nodes-selector/components/expanded-tree-node/expanded-tree-node.component.html b/apps/mina-sidor-fa/src/app/shared/components/tree-nodes-selector/components/expanded-tree-node/expanded-tree-node.component.html index de70eca..da258e5 100644 --- a/apps/mina-sidor-fa/src/app/shared/components/tree-nodes-selector/components/expanded-tree-node/expanded-tree-node.component.html +++ b/apps/mina-sidor-fa/src/app/shared/components/tree-nodes-selector/components/expanded-tree-node/expanded-tree-node.component.html @@ -5,11 +5,7 @@ }" >
- +

{{ headingText }}

{{generalInfo}}

diff --git a/apps/mina-sidor-fa/src/app/shared/components/tree-nodes-selector/components/expanded-tree-node/expanded-tree-node.component.scss b/apps/mina-sidor-fa/src/app/shared/components/tree-nodes-selector/components/expanded-tree-node/expanded-tree-node.component.scss index da46e3b..6db89e0 100644 --- a/apps/mina-sidor-fa/src/app/shared/components/tree-nodes-selector/components/expanded-tree-node/expanded-tree-node.component.scss +++ b/apps/mina-sidor-fa/src/app/shared/components/tree-nodes-selector/components/expanded-tree-node/expanded-tree-node.component.scss @@ -29,21 +29,12 @@ } &__heading { + margin: 0; font-size: 1rem; padding: 0 0.9375rem; display: block; font-weight: 600; - - ::ng-deep { - h1, - h2, - h3, - h4, - h5, - h6 { - max-width: 100%; - } - } + max-width: 100%; } &__nodes { diff --git a/apps/mina-sidor-fa/src/app/shared/components/tree-nodes-selector/components/expanded-tree-node/expanded-tree-node.component.ts b/apps/mina-sidor-fa/src/app/shared/components/tree-nodes-selector/components/expanded-tree-node/expanded-tree-node.component.ts index 9793879..da8af09 100644 --- a/apps/mina-sidor-fa/src/app/shared/components/tree-nodes-selector/components/expanded-tree-node/expanded-tree-node.component.ts +++ b/apps/mina-sidor-fa/src/app/shared/components/tree-nodes-selector/components/expanded-tree-node/expanded-tree-node.component.ts @@ -1,4 +1,3 @@ -import { TypographyDynamicHeadingLevel } from '@af/digi-ng/_typography/typography-dynamic-heading'; import { Component, ChangeDetectionStrategy, @@ -27,7 +26,6 @@ import { }) export class ExpandedTreeNodeComponent extends UnsubscribeDirective implements OnChanges { @Input() treeNodeModel: TreeNodeModel; - @Input() headingLevel: TypographyDynamicHeadingLevel = TypographyDynamicHeadingLevel.H3; @Input() headingText: string; @Input() showGeneralInfo: boolean; @Input() generalInfo: string; diff --git a/apps/mina-sidor-fa/src/app/shared/components/tree-nodes-selector/tree-nodes-selector.module.ts b/apps/mina-sidor-fa/src/app/shared/components/tree-nodes-selector/tree-nodes-selector.module.ts index 9f9ff63..e270b4c 100644 --- a/apps/mina-sidor-fa/src/app/shared/components/tree-nodes-selector/tree-nodes-selector.module.ts +++ b/apps/mina-sidor-fa/src/app/shared/components/tree-nodes-selector/tree-nodes-selector.module.ts @@ -3,12 +3,16 @@ import { CommonModule } from '@angular/common'; import { TreeNodesSelectorPanelComponent } from './components/tree-nodes-selector-panel/tree-nodes-selector-panel.component'; import { TreeNodesSelectorComponent } from './components/tree-nodes-selector/tree-nodes-selector.component'; import { ExpandedTreeNodeComponent } from './components/expanded-tree-node/expanded-tree-node.component'; -import { DigiNgTypographyDynamicHeadingModule } from '@af/digi-ng/_typography/typography-dynamic-heading'; import { AriaLabelTextForExpansionBtnPipe } from './pipes/aria-label-text-for-expansion-btn.pipe'; @NgModule({ - declarations: [TreeNodesSelectorComponent, TreeNodesSelectorPanelComponent, ExpandedTreeNodeComponent, AriaLabelTextForExpansionBtnPipe], - imports: [CommonModule, DigiNgTypographyDynamicHeadingModule], + declarations: [ + TreeNodesSelectorComponent, + TreeNodesSelectorPanelComponent, + ExpandedTreeNodeComponent, + AriaLabelTextForExpansionBtnPipe, + ], + imports: [CommonModule], schemas: [CUSTOM_ELEMENTS_SCHEMA], exports: [TreeNodesSelectorComponent], })