Class Utility

Index

Methods

Methods

public static BuildLookupValuesAsString(choiceArray: ClientLookupValue[], isMultiLookup: boolean, setGroupDesc: boolean): string

Represents lookup values array in some strange format

Parameters

Returns

string

public static ChoiceFormatTypeToString(fileSystemObjectType: ChoiceFormatType): string

Parameters

Returns

string

public static ComputeRegisterTypeInfo(renderCtx: TemplateOverridesOptions): any

Parameters

Returns

any

public static ControlModeToString(mode: ClientControlMode): string

Parameters

Returns

string

public static FileSystemObjectTypeToString(fileSystemObjectType: FileSystemObjectType): string

Parameters

Returns

string

public static GetControlOptions(control: HTMLElement): any

Parameters

  • control: HTMLElement

Returns

any

public static GetFormContextForCurrentField(context: RenderContext_Form): ClientFormContext

Parameters

Returns

ClientFormContext

public static GetPropertiesFromPageContextInfo(context: RenderContext)

Parameters

public static InitContext(webUrl: string): ClientContext

Creates SP.ClientContext based on the specified Web URL. If the SP.Runtime.js script is not loaded, returns null

Parameters

  • webUrl: string

Returns

ClientContext

public static IsValidControlMode(mode: number): boolean

Parameters

  • mode: number

Returns

boolean

public static ParseLookupValue(valueStr: string): ClientLookupValue

Parameters

  • valueStr: string

Returns

ClientLookupValue

public static ParseMultiLookupValues(valueStr: string): ClientLookupValue[]

Parameters

  • valueStr: string

Returns

ClientLookupValue[]

public static ParseURLValue(value: string): ClientUrlValue

Parameters

  • value: string

Returns

ClientUrlValue

public static ReplaceUrlTokens(tokenUrl: string): string

Replaces tokens "~site/", "~sitecollection/", "~sitecollectionmasterpagegallery", "{lcid}", "{locale}" and "{siteclienttag}" with appropriate context values

Parameters

  • tokenUrl: string

Returns

string

public static RichTextModeToString(fileSystemObjectType: RichTextMode): string

Parameters

Returns

string

public static Trim(str: string): string

Removes leading and trailing spaces

Parameters

  • str: string

Returns

string

public static TryParseInitialUserValue(userStr: string): ClientUserValue[]

Parameters

  • userStr: string

Returns

ClientUserValue[]

public static TryParseUserControlValue(userStr: string, separator: string): Array<any>

Tries to resolve user names from string. Pushes either ClientUserValue (if resolved successfully) or original string (if not) to the resulting array.

Parameters

  • userStr: string
  • separator: string

Returns

Array<any>