src/app/core/common-components/description-only/display-description-only/display-description-only.component.ts
Display only a text block to provide explanation within a form without an actual user input field.
ViewDirective<
undefined,
undefined
>
| changeDetection | ChangeDetectionStrategy.OnPush |
| selector | app-display-description-only |
| standalone | true |
| imports | |
| styleUrls | ./display-description-only.component.scss |
| template | |
No results matching.
Properties |
|
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
|
|
| 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;
}