Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AbstractTaskContentComponent Abstract

Hierarchy

  • AbstractTaskContentComponent

Implements

  • OnDestroy

Index

Constructors

Properties

DEFAULT_ASYNC_RENDERING_CONFIGURATION: AsyncRenderingConfiguration = ...
DEFAULT_COMPACT_DIRECTION: NONE = DataGroupCompact.NONE
DEFAULT_FIELD_ALIGNMENT: CENTER = FieldAlignment.CENTER
DEFAULT_HIDE_EMPTY_ROWS: ALL = DataGroupHideEmptyRows.ALL
DEFAULT_LAYOUT_TYPE: LEGACY = DataGroupLayoutType.LEGACY
_asyncRenderTimeout: number
_asyncRenderingConfig: AsyncRenderingConfiguration
_dataSource$: BehaviorSubject<Subgrid[]>

The data fields that are currently displayed

_defaultAlignment: FieldAlignment
_defaultCompactDirection: DataGroupCompact
_defaultHideEmptyRows: DataGroupHideEmptyRows
_defaultNumberOfCols: number
_existingSubgridIds: Set<string>
_fieldConverter: FieldConverterService
_logger: LoggerService
_paperView: PaperViewService
_subTaskContent: Subscription
_subTaskEvent: Subscription
_subgridIdCounter: IncrementingCounter
_taskEventService: TaskEventService = null
displayNoDataIcon: boolean = true

Whether an icon should be displayed when the no data message is shown.

An icon is displayed by default

fieldTypeResource: typeof FieldTypeResource = FieldTypeResource

Exists to allow references to the enum in the HTML

hasDataToDisplay$: Observable<boolean>

Emits true if there is at least one data field, that should be displayed. Emits false otherwise.

loading$: LoadingEmitter

Indicates whether data is being loaded from backend, or if it is being processed.

noDataIcon: string

The icon that should be displayed when the task contains no data.

If a falsy value is provided the default icon is displayed

noDataText: string

The translate text that should be displayed when the task contains no data.

If a falsy value is provided the default text is displayed

rowHeight: number = 105

Defines the row height of one row in task content

taskContentService: TaskContentService
taskEvent: EventEmitter<TaskEventNotification>

Emits notifications about task events

Accessors

  • get taskId(): string

Methods

  • collapseGridEmptySpace(grid: string[][], layout: DataGroupLayout, subgrid: Subgrid): void
  • compactFieldsUp(grid: string[][], hideRows: DataGroupHideEmptyRows, subgrid: Subgrid): void
  • Moves any element as far UP as it can go. Elements that were originally declared in the same row might end up in different rows. Resulting trailing empty rows are removed.

    The input grid is modified in place.

    Parameters

    • grid: string[][]

      the state of the grid that should be modified

    • hideRows: DataGroupHideEmptyRows

      configuration for empty row removal during the compacting process

    • subgrid: Subgrid

      the object that holds the context of the computed layouting unit

    Returns void

  • computeDefaultLayoutConfiguration(): void
  • computeLayoutData(dataGroups: DataGroup[]): void
  • createSubgridId(dataGroup: DataGroup): string
  • Lays out the fields from left to right, from top to bottom. If the width is greater than 1 and the block of flowed fields doesn't fit neatly into the columns (if the width of a single field is not a divisor of column count), then the entire block of fields is left aligned. The last row of fields is aligned to the left, center or right based on the data groups property. If the last row cannot be aligned to the exact center it is offset one grid tile to the left.

    Parameters

    • dataGroup: DataGroup

      the data group that should be laid out into a grid

    • subgrid: Subgrid

      the object that holds the context of the computed layouting unit

    • fieldWidth: number

      the number of grid tiles, that should be occupied by each field

    Returns void

  • getElementDimensions(grid: string[][], x: number, y: number, subgrid: Subgrid): { height: number; width: number }
  • Determines the dimensions of the element in the grid with its top-left corner at the specified position

    Parameters

    • grid: string[][]

      the grid of elements

    • x: number

      the X coordinate of the desired elements top-left corner

    • y: number

      the Y coordinate of the desired elements top-left corner

    • subgrid: Subgrid

      the object that holds the context of the computed layouting unit

    Returns { height: number; width: number }

    the width and height of the specified element

    • height: number
    • width: number
  • getNumberOfFormColumns(): number
  • hasRequiredComponentProperty(component: Component, propertyName: string, propertyValue: string): boolean
  • initializeLocalFieldLayout(dataGroups: DataGroup[]): void
  • isAreaEmpty(grid: string[][], x: number, y: number, width: number, height: number): boolean
  • isLastRow(index: number, dataGroup: DataGroup, fieldsPerRow: number): boolean
  • isPaperView(): boolean
  • isTaskRef(field: DataField<unknown>): boolean
  • newGridRow(width: number, content?: string): string[]
  • ngOnDestroy(): void
  • occupySpace(grid: string[][], y: number, x: number, width: number, value: string, height?: number, checkOccupants?: boolean): void
  • Fills the specified rectangular area with the specified value in the provided grid.

    If the specified area contains values other than the empty string an error will be thrown.

    Parameters

    • grid: string[][]

      the grid that should be modified

    • y: number

      the 0 based row index of the top-left corner of the filled area

    • x: number

      the 0 based column index of the top-left corner of the filled area

    • width: number

      the width of the filled area

    • value: string

      the value that is set into every cell of the grid inside the specified area

    • height: number = 1

      the height of the filled area

    • checkOccupants: boolean = true

      whether the filled area should be checked for other elements. If a check is performed an error will be thrown if elements are found.

    Returns void

  • rearrangeDataGroups(dataGroups: DataGroup[]): PreprocessedDataGroups
  • removeEmptyRows(grid: string[][], firstRow?: number, lastRow?: number): void
  • Removes rows from the grid that only contain empty elements (are empty). The grid is modified in place.

    Parameters

    • grid: string[][]

      the grid that should have it's empty rows removed

    • firstRow: number = 0

      the 0 based index of the first row that should be checked. Use 0 to start from the beginning of the grid.

      If no value is provided, the grid will be checked from the first row.

    • lastRow: number = Number.POSITIVE_INFINITY

      the 0 based index of the row where the checking should end. The row with this index is not checked.

      If no value is provided the entire grid from the firstRow will be checked.

      If a value that is smaller or equal to the firstRow is provided no checks will be preformed.

    Returns void

  • renderContent(content?: Subgrid[]): void
  • renderFields(subgrids: Map<string, Subgrid>): void
  • resolveContentHeightCss(): string
  • scrollingNeeded(): boolean
  • shouldResolveTaskRefData(dataRef: DataField<any>): boolean
  • spreadFieldRenderingOverTime(subgrids: Subgrid[], iteration?: number): void
  • trackBySubgridFn(index: number, subgrid: Subgrid): string

Generated using TypeDoc