Encapsulates a DriveWorks Live Specification and enables the rendering and control of that specification via custom elements and callbacks.

Hierarchy

  • Specification

Constructors

  • Creates a new Specification and registers all required delegates for rendering a fully interactive specification form.

    Parameters

    • _client: DriveWorksLiveClient

      The DriveWorksLiveClient that will be used to send and receive data to and from the Integration Theme.

    • _groupAlias: string

      The alias of the group the specification belongs to.

    • _id: string

      The unique identifier of this specification.

    Returns Specification

Accessors

  • get id(): number
  • Gets the unique identifier of the represented specification.

    Returns number

  • get name(): any
  • Returns any

  • get specificationFormElement(): any
  • Gets the HTML element for the specification form.

    Returns any

Methods

  • Adds a new child specification from the chosen project to a Child Specification List control in this Specification.

    Parameters

    • childSpecificationListControlName: string

      The name of the Child Specification List control.

    • projectName: string

      The name of the project that the child specification will be created from.

    Returns Promise<unknown>

    Throws

    ArgumentException if childSpecificationListControlName is null or empty.

    Throws

    ArgumentException if projectName is null or empty.

  • Adds an item with the specified form name to an Item List control within this Specification.

    Parameters

    • itemListControlName: string

      The name of the Item List control.

    • formName: string

      The name of the form that the added dialog will show.

    Returns Promise<unknown>

    Throws

    ArgumentException if itemListControlName is null or empty.

    Throws

    ArgumentException if formName is null or empty.

  • Cancels the current specification and clears the the inner HTML of the provided HTMLElement that the specification was rendered to.

    Returns Promise<void>

  • Copies an item from an Item List control within this Specification with the specified form name.

    Parameters

    • itemListControlName: string

      The name of the Item List control.

    • formName: string

      The name of the form which represents the type of item to copy.

    Returns Promise<unknown>

    Throws

    ArgumentException if itemListControlName is null or empty.

    Throws

    ArgumentException if formName is null or empty.

  • Deletes the currently selected item from an Item List control within this Specification.

    Parameters

    • itemListControlName: string

      The name of the Item List control.

    Returns Promise<unknown>

    Throws

    ArgumentException if itemListControlName is null or empty.

  • Stop sending a keep alive signal for this specification on an interval.

    Returns void

  • Edits an item from an Item List control within this Specification with the specified form name.

    Parameters

    • itemListControlName: string

      The name of the Item List control.

    • formName: string

      The name of the form which represents the type of item to edit.

    Returns Promise<unknown>

    Throws

    ArgumentException if itemListControlName is null or empty.

    Throws

    ArgumentException if formName is null or empty.

  • Starts regularly sending a keep alive signal for this specification on an interval.

    Parameters

    • Optional pingInterval: number = 30

      The interval that the ping will be called, in seconds. Defaults to 30 seconds.

    Returns void

  • Gets a constant with the provided name that belongs to this Specification.

    Parameters

    • constantName: string

      The name of the constant to retrieve.

    Returns Promise<ConstantData>

    Throws

    ArgumentException if constantName is null or empty.

  • Gets the document belonging to this Specification with the provided identifier.

    Parameters

    • documentId: string

      The identifier of the document to retrieve.

    Returns Promise<DocumentData>

    Throws

    ArgumentException if documentId is null or empty.

  • Gets the download url of a specified document belonging to this Specification.

    Parameters

    • documentId: string

      The identifier of the document that you wish to retrieve the download url for.

    • resourceName: string

      The name of the document, or the name of a resource within a HTML file, with the provided documentId.

    Returns string

    Throws

    ArgumentException if documentId is null or empty.

    Throws

    ArgumentException if resourceName is null or empty.

  • Gets information about the chosen operation for this Specification.

    Parameters

    • operationName: string

      The name of the operation to retrieve.

    Returns Promise<ActionData>

    Throws

    ArgumentException if operationName is null or empty.

  • Gets the specification properties for this Specification.

    Returns Promise<Record<string, string>>

    An object containing 0 or more key value pairs, e.g. {"MyProperty": "MyValue"}.

  • Gets the specification report with the provided identifier for this Specification.

    Parameters

    • reportId: string

      The identifier of the report to retrieve.

    Returns Promise<ReportData>

    Throws

    ArgumentException if reportId is null or empty.

  • Gets the chosen specification report belonging to this Specification in JSON format.

    Parameters

    • reportId: string

      The identifier of the report to retrieve.

    Returns Promise<ReportJsonData>

    Throws

    ArgumentException if reportId is null or empty.

  • Gets the download url for the chosen specification report belonging to this Specification.

    Parameters

    • reportId: string

      The identifier of the report to retrieve the download url for.

    Returns string

    Throws

    ArgumentException if reportId is null or empty.

  • Gets information about the chosen transition for this Specification.

    Parameters

    • transitionName: string

      The name of the transition to retrieve.

    Returns Promise<TransitionData>

    Throws

    ArgumentException if transitionName is null or empty.

  • Gets a variable with the provided name from this Specification.

    Parameters

    • variableName: string

      The name of the variable to retrieve.

    Returns Promise<VariableData>

    Throws

    ArgumentException if variableName is null or empty.

  • Invokes an operation on the currently selected specification in a Child Specification List control within this Specification.

    Parameters

    • childSpecificationListControlName: string

      The name of the Child Specification List control.

    • operationName: string

      The name of the operation to invoke on the selected child specification.

    Returns Promise<unknown>

    Throws

    ArgumentException if childSpecificationListControlName is null or empty.

    Throws

    ArgumentException if operationName is null or empty.

  • Invokes a transition on the currently selected specification in a Child Specification List control within this Specification.

    Parameters

    • childSpecificationListControlName: string

      The name of the Child Specification List control.

    • transitionName: string

      The name of the transition to invoke on the selected child specification.

    Returns Promise<unknown>

    Throws

    ArgumentException if childSpecificationListControlName is null or empty.

    Throws

    ArgumentException if transitionName is null or empty.

  • Cancels the active dialog within this Specification and closes it.

    Returns Promise<unknown>

  • Confirms the chosen items on a dialog within this Specification and closes it.

    Returns Promise<unknown>

  • Invokes an operation on this Specification.

    Parameters

    • operationName: string

      The name of the operation to invoke.

    Returns Promise<unknown>

    Throws

    ArgumentException if operationName is null or empty.

  • Invokes a transition on this Specification.

    Parameters

    • transitionName: string

      The name of the transition to invoke.

    Returns Promise<unknown>

    Throws

    ArgumentException if transitionName is null or empty.

  • Moves the child specification at the specified index in a Child Specification List control within this Specification up or down.

    Parameters

    • childSpecificationListControlName: string

      The name of the Child Specification List control.

    • commandData: MoveListItemCommandData

      The MoveListItemCommandData containing the movement direction and row index to perform the command.

    Returns Promise<unknown>

    Throws

    ArgumentException if childSpecificationListControlName is null or empty.

    Throws

    ArgumentException if commandData is null or empty.

    Throws

    ArgumentException if the commandData object does not implement the MoveListItemCommandData interface.

  • Moves the item at the specified index in an Item List Control within this Specification up or down.

    Parameters

    Returns Promise<unknown>

    Throws

    ArgumentException if itemListControlName is null or empty.

    Throws

    ArgumentException if commandData is null or empty.

    Throws

    ArgumentException if the commandData object does not implement the MoveListItemCommandData interface.

  • Navigates this Specification in the chosen direction.

    Parameters

    • direction: "backward" | "forward"

      The direction to navigate in - "backward" or "forward".

    Returns Promise<unknown>

    Throws

    ArgumentException if direction is null or empty.

    Throws

    ArgumentException if direction contains an invalid value.

  • Navigates to the hyperlink of a Hyperlink control within this Specification.

    Parameters

    • hyperlinkControlName: string

      The name of the Hyperlink control.

    Returns Promise<unknown>

    Throws

    ArgumentException if hyperlinkControlName is null or empty.

  • Opens the dialog of a Dialog Button within this Specification.

    Parameters

    • dialogButtonControlName: string

      The name of the Dialog Button control.

    Returns Promise<unknown>

    Throws

    ArgumentException if dialogButtonControlName is null or empty.

  • Sends a signal to the server to restart timeout timers for the session, specification and group.

    Returns any

  • Registers a chosen HTML element that when clicked will cancel the active dialog.

    Parameters

    • element: HTMLElement

      The element that will be registered as the cancel button.

    • displayStyle: null | string = ...

      The value to set the display property to when making the cancel button visible. By default the current value of the display property will be used.

    Returns void

    Throws

    ArgumentException if the passed element is null.

  • Registers a function to execute when a project constant's value is changed.

    Parameters

    • constantValueChangedDelegate: ((data) => void)

      The function to be executed when a project constant's value is changed.

        • (data): void
        • Parameters

          • data: {
                constantName: string;
                constantValue: unknown;
            }
            • constantName: string
            • constantValue: unknown

          Returns void

    Returns void

  • Registers a chosen HTML element that when clicked will navigate the specification to the next form.

    Parameters

    • element: HTMLElement

      The element that will be registered as the next button.

    • displayStyle: null | string = ...

      The value to set the display property to when making the next button visible. By default the current value of the display property will be used.

    Returns void

    Throws

    ArgumentException if the passed element is null.

  • Registers a chosen HTML element that when clicked will confirm and close the active dialog.

    Parameters

    • element: HTMLElement

      The element that will be registered as the confirmation button.

    • displayStyle: null | string = ...

      The value to set the display property to when making the ok button visible. By default the current value of the display property will be used.

    Returns void

    Throws

    ArgumentException if the passed element is null.

  • Registers a chosen HTML element that when clicked will navigate the specification to the previous form.

    Parameters

    • element: HTMLElement

      The element that will be registered as the previous button.

    • displayStyle: null | string = ...

      The value to set the display property to when making the previous button visible. By default the current value of the display property will be used.

    Returns void

    Throws

    ArgumentException if the passed element is null.

  • Registers a function to execute when the specification is cancelled.

    Parameters

    • cancelledDelegate: (() => void)

      The function to be executed when the specification is cancelled.

        • (): void
        • Returns void

    Returns void

  • Registers a function to execute when the specification is closed.

    Parameters

    • closedDelegate: (() => void)

      The function to be executed when the specification is closed.

        • (): void
        • Returns void

    Returns void

  • Registers a function to execute when a project variable's value is changed.

    Parameters

    • variableValueChangedDelegate: ((data) => void)

      The function to be executed when a project variable's value is changed.

        • (data): void
        • Parameters

          • data: {
                variableName: string;
                variableValue: unknown;
            }
            • variableName: string
            • variableValue: unknown

          Returns void

    Returns void

  • Removes the currently selected child specification from a Child Specification List within this Specification.

    Parameters

    • childSpecificationListControlName: string

      The name of the Child Specification List control.

    Returns Promise<unknown>

    Throws

    ArgumentException if childSpecificationListControlName is null or empty.

  • Renders the specification's active form to the supplied HTML element.

    Parameters

    • element: HTMLElement

      The element that you wish to render the specification form to.

    Returns Promise<void>

    Throws

    ArgumentException if the element is null.

  • Requests a preview from a 3D Preview control within this Specification.

    Parameters

    • previewControlName: string

      The name of the 3D Preview control.

    Returns Promise<unknown>

    Throws

    ArgumentException if previewControlName is null or empty.

  • Requests a screenshot from a 3D Preview control within this Specification.

    Parameters

    Returns Promise<unknown>

    Throws

    ArgumentException if previewControlName is null or empty.

    Throws

    ArgumentException if commandData is null or empty.

    Throws

    ArgumentException if the commandData object does not implement the RequestPreviewScreenshotCommandData interface.

  • Runs a macro for a control within this Specification.

    Parameters

    • controlName: string

      The name of the control to run the macro on.

    • macroData: ControlMacroData

      The ControlMacroData to provide to the macro, including the name of the macro to run.

    Returns Promise<unknown>

    Throws

    ArgumentException if controlName is null or empty.

    Throws

    ArgumentException if macroData is null or empty.

    Throws

    ArgumentException if the macroData object does not implement the ControlMacroData interface.

  • Runs a macro within this Specification.

    Parameters

    Returns Promise<unknown>

    Throws

    ArgumentException if macroData is null or empty.

    Throws

    ArgumentException if the macroData object does not implement the SpecificationMacroData interface.

  • Runs a touch point macro within a 3D Preview control in this Specification.

    Parameters

    Returns Promise<unknown>

    Throws

    ArgumentException if previewControlName is null or empty.

  • Sets the selection of a Child Specification List control in this Specification to the item at the provided index.

    Parameters

    • childSpecificationListControlName: string

      The name of the Child Specification List control.

    • index: number

      The index to set as the selected item of the list control.

    Returns Promise<unknown>

    Throws

    ArgumentException if childSpecificationListControlName is null or empty.

    Throws

    ArgumentException if index is null or empty.

  • Sets the selection of an Item List control in this Specification to the item at the provided index.

    Parameters

    • listControlName: string
    • rowIndex: number

      The index to set as the selected item of the list control.

    Returns Promise<unknown>

    Throws

    ArgumentException if listControlName is null or empty.

    Throws

    ArgumentException if rowIndex is null or empty.

  • Updates a constant within this Specification with the provided value.

    Parameters

    • constantName: string

      The name of the constant to update.

    • constantValue: string

      The value to be applied to the constant.

    Returns Promise<ConstantData>

    Throws

    ArgumentException if constantName is null or empty.