Options
All
  • Public
  • Public/Protected
  • All
Menu

@fschopp/project-planning-ui-for-you-track

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Type aliases

Contributor

Plain

Plain<T>: PlainHelper<PlainHelper<PlainHelper<T>>>

Type parameters

  • T

Variables

Const DEFAULT_HOURS_PER_WEEK

DEFAULT_HOURS_PER_WEEK: 40 = 40

Const DEFAULT_NUM_MEMBERS

DEFAULT_NUM_MEMBERS: 1 = 1

Const EXTERNAL_CONTRIBUTOR_VALUE

EXTERNAL_CONTRIBUTOR_VALUE: "youtrack-planning-js/external" = "youtrack-planning-js/external"

Value for ContributorEditArea.id to indicate an external contributor.

Functions

AlertsView

  • AlertsView(__namedParameters: object): HTMLElement

AssigneeFieldView

  • AssigneeFieldView(__namedParameters: object): HTMLElement
  • Returns a control that allows to choose the assignee custom field.

    The assignee custom field is assumed to be optional (and hence the input is always valid, even if empty).

    Parameters

    • __namedParameters: object

    Returns HTMLElement

BundleElementsView

  • BundleElementsView(__namedParameters: object): HTMLElement

ContributorsView

  • ContributorsView(__namedParameters: object): HTMLElement

DependsLinkTypeView

  • DependsLinkTypeView(__namedParameters: object): HTMLElement

IssueFieldView

  • IssueFieldView(__namedParameters: object): HTMLElement

IssueTypeFieldView

  • IssueTypeFieldView(__namedParameters: object): HTMLElement
  • Returns a control that allows to choose the issue type custom field.

    The issue type custom field is assumed to be optional (and hence the input is always valid, even if empty).

    Parameters

    • __namedParameters: object

    Returns HTMLElement

LinkTypeView

  • LinkTypeView(__namedParameters: object): HTMLElement

MultiSelectView

  • MultiSelectView<T>(__namedParameters: object): HTMLElement
  • Returns a <select multiple> control that allows to choose zero or more elements.

    The user may choose zero or more elements, so the input is assumed to be always valid.

    Type parameters

    • T

    Parameters

    • __namedParameters: object

    Returns HTMLElement

NavView

  • NavView(__namedParameters: object): HTMLElement

OverlaySavedQueryView

  • OverlaySavedQueryView(__namedParameters: object): HTMLElement

ProgressBarView

  • ProgressBarView(__namedParameters: object): HTMLElement

ProjectPlanningSettingsView

  • ProjectPlanningSettingsView(__namedParameters: object): HTMLElement

RadioToggleView

  • RadioToggleView(__namedParameters: object): HTMLElement

SavedQueryView

  • SavedQueryView(__namedParameters: object): HTMLElement

SecondarySelectView

  • SecondarySelectView<T>(__namedParameters: object): HTMLElement
  • Returns a “secondary” <select> control that allows to choose a single element.

    The element must differ from the value that (typically) is already the active value of another “primary” control. If the current value is not available, the control shows “Unknown (ID: )” as select option, and this option is not disabled (see SelectView).

    Type parameters

    • T

    Parameters

    • __namedParameters: object

    Returns HTMLElement

SelectView

  • SelectView<T>(__namedParameters: object): HTMLElement
  • Returns a newly created <select> control for choosing at most one from a list of option.

    The control shows a disabled placeholder option if the current value is empty. If the current value is not available, the control shows “Unknown (ID: )” as select option, and this option is not disabled. (If it was disabled, we would be running into Firefox bug 1569314.)

    Type parameters

    • T

    Parameters

    • __namedParameters: object

    Returns HTMLElement

SettingsView

  • SettingsView(__namedParameters: object): HTMLElement

WarningsView

  • WarningsView(__namedParameters: object): HTMLElement

assignApp

  • assignApp<T>(app: App<T>, plain: Plain<App<T>>): void
  • Updates the application state to the given values in a plain JSON object.

    The update is performed within a single S.js transaction.

    Type parameters

    Parameters

    • app: App<T>

      application state

    • plain: Plain<App<T>>

      Plain JSON object. This function cannot rely on static type checking, because the data may be user input.

    Returns void

assignContributorEditArea

assignContributors

assignDependsLinkType

assignProjectPlanningApp

assignProjectPlanningSettings

assignSettings

bindNumber

  • bindNumber(signal: DataSignal<number>, invalidCounter?: Counter): function
  • Two-way binds the given number data signal with the given <input> element (note the currying).

    Parameters

    • signal: DataSignal<number>
    • Optional invalidCounter: Counter

    Returns function

      • (element: HTMLInputElement): void
      • Parameters

        • element: HTMLInputElement

        Returns void

bindString

  • bindString(signal: DataSignal<string>, invalidCounter?: Counter): function
  • Two-way binds the given string data signal with the given <input> element (note the currying).

    Parameters

    • signal: DataSignal<string>
    • Optional invalidCounter: Counter

    Returns function

      • (element: HTMLInputElement | HTMLSelectElement): void
      • Parameters

        • element: HTMLInputElement | HTMLSelectElement

        Returns void

bindStringSet

  • bindStringSet(signal: DataSignal<Set<string>>): function
  • Two-way binds the given data signal with the given <select multiple> element (note the currying).

    Parameters

    • signal: DataSignal<Set<string>>

    Returns function

      • (element: HTMLSelectElement): void
      • Parameters

        • element: HTMLSelectElement

        Returns void

bindToOnValue

  • bindToOnValue<T>(signal: DataSignal<T>, onValue: T): function
  • Two-way binds the given data signal with the given input element (note the currying): The element is checked if and only if the data signal has the given “on”-value.

    Type parameters

    • T

    Parameters

    • signal: DataSignal<T>
    • onValue: T

    Returns function

      • (element: HTMLInputElement): void
      • Parameters

        • element: HTMLInputElement

        Returns void

createApp

  • createApp<T>(settings: T): App<T>

createAppComputation

createContributor

createContributorEditArea

  • createContributorEditArea(): object

createContributors

createDependsLinkType

createProjectPlanningApp

createProjectPlanningAppComputation

createProjectPlanningSettings

createSettings

ensureArray

  • ensureArray<T>(value: T[], defaultValue?: T[], validElementPredicate: function): T[]
  • Returns a newly created array where each element is the result of invoking ensureElementType(). If the given value is not an array, returns the default array.

    This function is meant to be used when we cannot trust the type system (typically, user input).

    Type parameters

    • T

    Parameters

    • value: T[]
    • Default value defaultValue: T[] = []
    • validElementPredicate: function
        • (element: T): boolean
        • Parameters

          • element: T

          Returns boolean

    Returns T[]

ensureBoolean

  • ensureBoolean(value: boolean, defaultValue?: boolean): boolean
  • Returns the given value if it is a boolean, or otherwise the given default value.

    This function is meant to be used when we cannot trust the type system (typically, user input).

    Parameters

    • value: boolean
    • Default value defaultValue: boolean = false

    Returns boolean

ensureNumber

  • ensureNumber(value: number, defaultValue?: number): number
  • Returns the given value if it is a number, or otherwise the given default value.

    This function is meant to be used when we cannot trust the type system (typically, user input).

    Parameters

    • value: number
    • Default value defaultValue: number = 0

    Returns number

ensureString

  • ensureString(value: string, defaultValue?: string): string
  • Returns the given value as string if the type of the value is string, boolean, or number; otherwise, returns the given default value.

    This function is meant to be used when we cannot trust the type system (typically, user input).

    Parameters

    • value: string
    • Default value defaultValue: string = ""

    Returns string

focusOnChangeToValue

  • focusOnChangeToValue<T>(signal: function, value: T): function
  • If the given signal is changed to the given value, focus on the given HTML element.

    Type parameters

    • T

    Parameters

    • signal: function
        • (): T
        • Returns T

    • value: T

    Returns function

      • (element: HTMLElement): void
      • Parameters

        • element: HTMLElement

        Returns void

hrefFrom

  • hrefFrom(signal: function): function
  • One-way binds the href attribute to react to the given signal.

    This function is necessary because we want to remove the href attribute if the given signal is the empty URL (as opposed to setting the href attribute to the empty string, which would still be shown as a link in the browser).

    Parameters

    • signal: function
        • (): string
        • Returns string

    Returns function

      • (element: HTMLAnchorElement): void
      • Parameters

        • element: HTMLAnchorElement

        Returns void

jsonable

projectPlanningActionLabel

  • projectPlanningActionLabel(action: Action): string

sortableBindSarray

  • sortableBindSarray<T>(sArray: SDataArray<T>, sortableOptions?: undefined | object): function
  • One-way binds the given data-signal array to react to UI changes in the given HTML element (note the currying).

    Type parameters

    • T

    Parameters

    • sArray: SDataArray<T>
    • Optional sortableOptions: undefined | object

    Returns function

      • (element: HTMLElement): void
      • Parameters

        • element: HTMLElement

        Returns void

toNormalizedPlainSettings

  • toNormalizedPlainSettings<T>(settings: T): Plain<T>

toNormalizedUrl

  • toNormalizedUrl(urlString: string): string
  • Returns the normalized URL.

    Normalization means returning a syntactically valid URL that ends with a slash (/).

    Parameters

    • urlString: string

    Returns string

    the normalized URL, or the empty string if the given URL is not valid

toPlain

  • toPlain<T>(source: T): Plain<T>
  • Creates a new plain JSON value for the given value (which may contain signals or Set instances).

    Type parameters

    • T

    Parameters

    • source: T

    Returns Plain<T>

unreachableCase

  • unreachableCase(x: never): never
  • Function that always throws an error.

    The purpose of this function is to be used as a compile-time type completeness check; for instance, in a switch statement. Calling this function will cause no error only if control-flow-based type analysis infers the argument type as never – in other words, if the function call cannot be reached.

    Parameters

    • x: never

    Returns never

withClassIff

  • withClassIff(signal: function, ...classes: string[]): function
  • One-way binds the presence of CSS classes on the given HTML element to react to the given signal (note the currying).

    Parameters

    • signal: function
        • (): boolean
        • Returns boolean

    • Rest ...classes: string[]

    Returns function

      • (element: HTMLElement): void
      • Parameters

        • element: HTMLElement

        Returns void

Generated using TypeDoc