src/app/core/common-components/description-only/display-description-only/display-description-only.component.ts

Description

Display only a text block to provide explanation within a form without an actual user input field.

Extends

ViewDirective< undefined, undefined >

Example

Metadata

Relationships

Used by

No results matching.

Index

Properties
Inputs

Inputs

config
Type : C
Default value : undefined
Inherited from ViewDirective
entity
Type : Entity
Inherited from ViewDirective
formFieldConfig
Type : FormFieldConfig
Inherited from ViewDirective
id
Type : string
Inherited from ViewDirective
tooltip
Type : string
Inherited from ViewDirective
value
Type : T
Inherited from ViewDirective

Properties

Readonly config
Type : unknown
Default value : computed<C>(() => { const ffc = this.formFieldConfig(); return ffc !== undefined ? (ffc.additional as C) : this._directConfig(); })
Inherited from ViewDirective
Readonly isPartiallyAnonymized
Type : unknown
Default value : computed<boolean>(() => { const entity = this.entity(); const id = this.id(); return ( (entity?.anonymized && entity?.getSchema()?.get(id)?.anonymize === "retain-anonymized") ?? false ); })
Inherited from ViewDirective
import { ChangeDetectionStrategy, Component } from "@angular/core";
import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";

import { ViewDirective } from "#src/app/core/entity/default-datatype/view.directive";
import { MarkdownPageModule } from "app/features/markdown-page/markdown-page.module";

/**
 * Display only a text block to provide explanation within a form
 * without an actual user input field.
 */
@DynamicComponent("DisplayDescriptionOnly")
@Component({
  selector: "app-display-description-only",
  template: ` <markdown>{{ formFieldConfig()?.label }}</markdown> `,
  styleUrls: ["./display-description-only.component.scss"],
  imports: [MarkdownPageModule],
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class DisplayDescriptionOnlyComponent extends ViewDirective<
  undefined,
  undefined
> {}

./display-description-only.component.scss

@use "variables/sizes";

.container {
  margin-bottom: sizes.$regular;
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""