Module Ext

Index

Variables

Modules

Interfaces

Classes

Functions

Variables

SSL_SECURE_URL: boolean

[Property] (Boolean)

emptyFn: any

[Property] (Function)

enableGarbageCollector: boolean

[Property] (Boolean)

enableListenerCollection: boolean

[Property] (Boolean)

enumerables: Array<string>

[Property] (String[])

frameStartTime: any

[Property] (Object)

isSecure: boolean

[Property] (Boolean)

version: string

[Property] (String)

Functions

application(config?: any)

[Method] Loads Ext app Application class and starts it up with given configuration after the page is ready

Parameters

  • config?: any optional

    Object An object with the following config options:

apply(object?: any, config?: any, defaults?: any): any

[Method] Copies all the properties of config to the specified object

Parameters

  • object?: any optional

    Object The receiver of the properties.

  • config?: any optional

    Object The source of the properties.

  • defaults?: any optional

    Object A different object that will also be applied for default values.

Returns

any

Object returns obj

applyIf(object?: any, config?: any): any

[Method] Copies all the properties of config to object if they don t already exist

Parameters

  • object?: any optional

    Object The receiver of the properties.

  • config?: any optional

    Object The source of the properties.

Returns

any

Object returns obj

bind(fn?: any, scope?: any, args?: Array<any>, appendArgs?: any): any

[Method] Create a new function from the provided fn change this to the provided scope optionally overrides arguments for the

Parameters

  • fn?: any optional

    Function The function to delegate.

  • scope?: any optional

    Object The scope (this reference) in which the function is executed. If omitted, defaults to the browser window.

  • args?: Array<any> optional

    Array Overrides arguments for the call. (Defaults to the arguments passed by the caller)

  • appendArgs?: any optional

    Boolean/Number if true args are appended to call args instead of overriding, if a number the args are inserted at the specified position.

Returns

any

Function The new function.

callback(callback?: any, scope?: any, args?: Array<any>, delay?: number)

[Method] Calls function after specified delay or right away when delay 0

Parameters

  • callback?: any optional

    Function The callback to execute.

  • scope?: any optional

    Object The scope to execute in.

  • args?: Array<any> optional

    Array The arguments to pass to the function.

  • delay?: number optional

    Number Pass a number to delay the call by a number of milliseconds.

clean(array?: Array<any>): Array<any>

[Method] Old alias to Ext Array clean

Parameters

  • array?: Array<any> optional

    Array

Returns

Array<any>

Array results

clone(item?: any): any

[Method] Clone almost any type of variable including array object DOM nodes and Date without keeping the old reference

Parameters

  • item?: any optional

    Object The variable to clone.

Returns

any

Object clone

copyTo(dest?: any, source?: any, names?: any, usePrototypeKeys?: boolean): any

[Method] Copies a set of named properties from the source object to the destination object

Parameters

  • dest?: any optional

    Object The destination object.

  • source?: any optional

    Object The source object.

  • names?: any optional

    String/String[] Either an Array of property names, or a comma-delimited list of property names to copy.

  • usePrototypeKeys?: boolean optional

    Boolean Pass true to copy keys off of the prototype as well as the instance.

Returns

any

Object The modified object.

create(name?: string, args?: any): any

[Method] Instantiate a class by either full name alias or alternate name

Parameters

  • name?: string optional

    String

  • args?: any optional

    Mixed Additional arguments after the name will be passed to the class' constructor.

Returns

any

Object instance

createByAlias(alias: string, args?: Array<any>): any

[Method] Convenient shorthand see Ext ClassManager instantiateByAlias

Parameters

  • alias: string

    String

  • args?: Array<any> optional

    Mixed... Additional arguments after the alias will be passed to the class constructor.

Returns

any

Object instance

createInterceptor(origFn?: any, newFn?: any, scope?: any, returnValue?: any): any

[Method] Creates an interceptor function

Parameters

  • origFn?: any optional

    Function The original function.

  • newFn?: any optional

    Function The function to call before the original.

  • scope?: any optional

    Object The scope (this reference) in which the passed function is executed. If omitted, defaults to the scope in which the original function is called or the browser window.

  • returnValue?: any optional

    Object The value to return if the passed function return false.

Returns

any

Function The new function.

createWidget()

[Method] Old name for widget

decode(json?: string, safe?: boolean): any

[Method] Shorthand for Ext JSON decode

Parameters

  • json?: string optional

    String The JSON string.

  • safe?: boolean optional

    Boolean Whether to return null or throw an exception if the JSON is invalid.

Returns

any

Object/null The resulting object.

defer(fn?: any, millis?: number, scope?: any, args?: Array<any>, appendArgs?: any): number

[Method] Calls this function after the number of milliseconds specified optionally in a specific scope

Parameters

  • fn?: any optional

    Function The function to defer.

  • millis?: number optional

    Number The number of milliseconds for the setTimeout() call. If less than or equal to 0 the function is executed immediately.

  • scope?: any optional

    Object The scope (this reference) in which the function is executed. If omitted, defaults to the browser window.

  • args?: Array<any> optional

    Array Overrides arguments for the call. Defaults to the arguments passed by the caller.

  • appendArgs?: any optional

    Boolean/Number if true, args are appended to call args instead of overriding, if a number the args are inserted at the specified position.

Returns

number

Number The timeout id that can be used with clearTimeout().

define(className?: string, data?: any, createdFn?: any): IBase

[Method] Defines a class or override

Parameters

  • className?: string optional

    String The class name to create in string dot-namespaced format, for example: 'My.very.awesome.Class', 'FeedViewer.plugin.CoolPager' It is highly recommended to follow this simple convention: - The root and the class name are 'CamelCased' - Everything else is lower-cased

  • data?: any optional

    Object The key - value pairs of properties to apply to this class. Property names can be of any valid strings, except those in the reserved listed below: mixins statics config alias self singleton alternateClassName override

  • createdFn?: any optional

    Function Optional callback to execute after the class (or override) is created. The execution scope (this) will be the newly created class itself.

Returns

IBase

Ext.Base

destroy(args?: Array<any>)

[Method] Attempts to destroy any objects passed to it by removing all event listeners removing them from the DOM if applicab

Parameters

  • args?: Array<any> optional

    Mixed... An Ext.Element, Ext.Component, or an Array of either of these to destroy.

dispatch()

[Method] Dispatches a request to a controller action

each(iterable?: any, fn?: any, scope?: any, reverse?: boolean): boolean

[Method] Iterates an array or an iterable value and invoke the given callback function for each item

Parameters

  • iterable?: any optional

    Array/NodeList/Object The value to be iterated. If this argument is not iterable, the callback function is called once.

  • fn?: any optional

    Function The callback function. If it returns false, the iteration stops and this method returns the current index.

  • scope?: any optional

    Object The scope (this reference) in which the specified function is executed.

  • reverse?: boolean optional

    Boolean Reverse the iteration order (loop from the end to the beginning).

Returns

boolean

Boolean See description for the fn parameter.

encode(o?: any): string

[Method] Shorthand for Ext JSON encode

Parameters

  • o?: any optional

    Object The variable to encode.

Returns

string

String The JSON string.

exclude(excludes?: Array<any>): any

[Method] Convenient shortcut to Ext Loader exclude

Parameters

  • excludes?: Array<any> optional

    Array

Returns

any

Object object contains require method for chaining.

extend(superclass?: any, overrides?: any): any

[Method] This method deprecated

Parameters

  • superclass?: any optional

    Function

  • overrides?: any optional

    Object

Returns

any

Function The subclass constructor from the overrides parameter, or a generated one if not provided.

factory(config?: any, classReference?: string, instance?: any, aliasNamespace?: any)

[Method] A global factory method to instantiate a class from a config object

Parameters

  • config?: any optional

    Object The config object to instantiate or update an instance with.

  • classReference?: string optional

    String The class to instantiate from.

  • instance?: any optional

    Object The instance to update.

  • aliasNamespace?: any optional

    Object

flatten(array?: Array<any>): Array<any>

[Method] Old alias to Ext Array flatten

Parameters

  • array?: Array<any> optional

    Array The array to flatten

Returns

Array<any>

Array The 1-d array.

fly(element?: any, named?: string): IElement

[Method] Gets the globally shared flyweight Element with the passed node as the active element

Parameters

  • element?: any optional

    String/HTMLElement The DOM node or id.

  • named?: string optional

    String Allows for creation of named reusable flyweights to prevent conflicts (e.g. internally Ext uses "_global").

Returns

IElement

Ext.dom.Element The shared Element object (or null if no matching element was found).

get(element?: any): IElement

[Method] Retrieves Ext dom Element objects

Parameters

  • element?: any optional

    String/HTMLElement/Ext.Element The id of the node, a DOM Node or an existing Element.

Returns

IElement

Ext.dom.Element The Element object (or null if no matching element was found).

getBody(): IElement

[Method] Returns the current document body as an Ext Element

Returns

IElement

Ext.Element The document body.

getClass()

[Method] Convenient shorthand see Ext ClassManager getClass

getClassName(object?: any): string

[Method] Convenient shorthand for Ext ClassManager getName

Parameters

  • object?: any optional

    Ext.Class/Object

Returns

string

String className

getCmp(id?: string): IComponent

[Method] This is shorthand reference to Ext ComponentMgr get

Parameters

  • id?: string optional

    String The component id

Returns

IComponent

Ext.Component The Component, undefined if not found, or null if a Class was found.

getDisplayName(object?: any): string

[Method] Returns the display name for object

Parameters

  • object?: any optional

    Mixed The object who's display name to determine.

Returns

string

String The determined display name, or "Anonymous" if none found.

getDoc(): IElement

[Method] Returns the current HTML document object as an Ext Element

Returns

IElement

Ext.Element The document.

getDom(el?: any): HTMLElement

[Method] Return the dom node for the passed String id dom node or Ext Element

Parameters

  • el?: any optional

    Mixed

Returns

HTMLElement

HTMLElement

getHead(): IElement

[Method] Returns the current document head as an Ext Element

Returns

IElement

Ext.Element The document head.

getOrientation()

[Method] Returns the current orientation of the mobile device

getStore(store?: any): IStore

[Method] Shortcut to Ext data StoreManager lookup

Parameters

  • store?: any optional

    String/Object The id of the Store, or a Store instance, or a store configuration.

Returns

IStore

Ext.data.Store

htmlDecode(value?: string): string

[Method] Old alias to Ext String htmlDecode

Parameters

  • value?: string optional

    String The string to decode.

Returns

string

String The decoded text.

htmlEncode(value?: string): string

[Method] Old alias to Ext String htmlEncode

Parameters

  • value?: string optional

    String The string to encode.

Returns

string

String The encoded text.

id(el?: any, prefix?: string): string

[Method] Generates unique ids

Parameters

  • el?: any optional

    Mixed The element to generate an id for.

  • prefix?: string optional

    String The id prefix.

Returns

string

String The generated id.

isArray(target?: any): boolean

[Method] Returns true if the passed value is a JavaScript Array false otherwise

Parameters

  • target?: any optional

    Object The target to test.

Returns

boolean

Boolean

isBoolean(value?: any): boolean

[Method] Returns true if the passed value is a Boolean

Parameters

  • value?: any optional

    Object The value to test.

Returns

boolean

Boolean

isDate(object?: any): boolean

[Method] Returns true if the passed value is a JavaScript Date object false otherwise

Parameters

  • object?: any optional

    Object The object to test.

Returns

boolean

Boolean

isDefined(value?: any): boolean

[Method] Returns true if the passed value is defined

Parameters

  • value?: any optional

    Object The value to test.

Returns

boolean

Boolean

isElement(value?: any): boolean

[Method] Returns true if the passed value is an HTMLElement

Parameters

  • value?: any optional

    Object The value to test.

Returns

boolean

Boolean

isEmpty(value?: any, allowEmptyString?: boolean): boolean

[Method] Returns true if the passed value is empty false otherwise

Parameters

  • value?: any optional

    Object The value to test.

  • allowEmptyString?: boolean optional

    Boolean true to allow empty strings.

Returns

boolean

Boolean

isFunction(value?: any): boolean

[Method] Returns true if the passed value is a JavaScript Function false otherwise

Parameters

  • value?: any optional

    Object The value to test.

Returns

boolean

Boolean

isIterable(value?: any): boolean

[Method] Returns true if the passed value is iterable false otherwise

Parameters

  • value?: any optional

    Object The value to test.

Returns

boolean

Boolean

isMSDate(value?: any): boolean

[Method] Returns true if the passed value is a String that matches the MS Date JSON encoding format

Parameters

  • value?: any optional

    Object {String} The string to test

Returns

boolean

Boolean

isNumber(value?: any): boolean

[Method] Returns true if the passed value is a number

Parameters

  • value?: any optional

    Object The value to test.

Returns

boolean

Boolean

isNumeric(value?: any): boolean

[Method] Validates that a value is numeric

Parameters

  • value?: any optional

    Object Examples: 1, '1', '2.34'

Returns

boolean

Boolean true if numeric, false otherwise.

isObject(value?: any): boolean

[Method] Returns true if the passed value is a JavaScript Object false otherwise

Parameters

  • value?: any optional

    Object The value to test.

Returns

boolean

Boolean

isPrimitive(value?: any): boolean

[Method] Returns true if the passed value is a JavaScript primitive a string number or Boolean

Parameters

  • value?: any optional

    Object The value to test.

Returns

boolean

Boolean

isString(value?: any): boolean

[Method] Returns true if the passed value is a string

Parameters

  • value?: any optional

    Object The value to test.

Returns

boolean

Boolean

isTextNode(value?: any): boolean

[Method] Returns true if the passed value is a TextNode

Parameters

  • value?: any optional

    Object The value to test.

Returns

boolean

Boolean

iterate(object?: any, fn?: any, scope?: any)

[Method] Iterates either an array or an object

Parameters

  • object?: any optional

    Object/Array The object or array to be iterated.

  • fn?: any optional

    Function The function to be called for each iteration. See and Ext.Array.each and Ext.Object.each for detailed lists of arguments passed to this function depending on the given object type that is being iterated.

  • scope?: any optional

    Object The scope (this reference) in which the specified function is executed. Defaults to the object being iterated itself.

max(array?: any, comparisonFn?: any): any

[Method] Old alias to Ext Array max

Parameters

  • array?: any optional

    Array/NodeList The Array from which to select the maximum value.

  • comparisonFn?: any optional

    Function a function to perform the comparison which determines maximization. If omitted the ">" operator will be used. Note: gt = 1; eq = 0; lt = -1

Returns

any

Object maxValue The maximum value

mean(array?: Array<any>): number

[Method] Old alias to Ext Array mean

Parameters

  • array?: Array<any> optional

    Array The Array to calculate the mean value of.

Returns

number

Number The mean.

merge()

[Method] A convenient alias method for Ext Object merge

min(array?: any, comparisonFn?: any): any

[Method] Old alias to Ext Array min

Parameters

  • array?: any optional

    Array/NodeList The Array from which to select the minimum value.

  • comparisonFn?: any optional

    Function a function to perform the comparison which determines minimization. If omitted the "<" operator will be used. Note: gt = 1; eq = 0; lt = -1

Returns

any

Object minValue The minimum value.

namespace(namespace1?: string, namespace2?: string, etc?: string): any

[Method] Creates namespaces to be used for scoping variables and classes so that they are not global

Parameters

  • namespace1?: string optional

    String

  • namespace2?: string optional

    String

  • etc?: string optional

    String

Returns

any

Object The namespace object. If multiple arguments are passed, this will be the last namespace created.

ns()

[Method] Convenient alias for Ext namespace

num()

[Method] This method is deprecated please use Ext Number from instead

onReady(fn?: any, scope?: any, options?: boolean)

[Method] Adds a listener to be notified when the document is ready and all dependencies are loaded

Parameters

  • fn?: any optional

    Function The method the event invokes.

  • scope?: any optional

    Object The scope in which the handler function executes. Defaults to the browser window.

  • options?: boolean optional

    Boolean Options object as passed to Ext.Element.addListener. It is recommended that the options {single: true} be used so that the handler is removed on first invocation.

override(cls?: any, overrides?: any)

[Method] Proxy to Ext Base override

Parameters

  • cls?: any optional

    Object The class to override

  • overrides?: any optional

    Object The properties to add to origClass. This should be specified as an object literal containing one or more properties.

pass(fn?: any, args?: Array<any>, scope?: any): any

[Method] Create a new function from the provided fn the arguments of which are pre set to args

Parameters

  • fn?: any optional

    Function The original function.

  • args?: Array<any> optional

    Array The arguments to pass to new callback.

  • scope?: any optional

    Object The scope (this reference) in which the function is executed.

Returns

any

Function The new callback function.

pluck(array?: any, propertyName?: string): Array<any>

[Method] Old alias to Ext Array pluck

Parameters

  • array?: any optional

    Array/NodeList The Array of items to pluck the value from.

  • propertyName?: string optional

    String The property name to pluck from each element.

Returns

Array<any>

Array The value from each item in the Array.

preg()

[Method] Registers a new ptype

query(selector?: string, root?: any): Array<HTMLElement>

[Method] Shorthand of Ext dom Query select

Parameters

  • selector?: string optional

    String The selector/xpath query (can be a comma separated list of selectors)

  • root?: any optional

    HTMLElement/String The start of the query (defaults to document).

Returns

Array<HTMLElement>

HTMLElement[] An Array of DOM elements which match the selector. If there are no matches, and empty Array is returned.

redirect()

[Method] Dispatches a request to a controller action adding to the History stack and updating the page url as necessary

reg()

[Method] Registers a new xtype

regApplication()

[Method] Creates a new Application class from the specified config object

regController()

[Method] Creates a new Controller class from the specified config object

regLayout()

[Method] Registers new layout type

regModel(name?: string, config?: any): IModel

[Method] Old way for creating Model classes

Parameters

  • name?: string optional

    String Name of the Model class.

  • config?: any optional

    Object A configuration object for the Model you wish to create.

Returns

IModel

Ext.data.Model The newly registered Model.

regStore(id?: string, config?: any)

[Method] Creates a new store for the given id and config then registers it with the Store Manager

Parameters

  • id?: string optional

    String The id to set on the new store.

  • config?: any optional

    Object The store config.

removeNode(node?: HTMLElement)

[Method] Removes this element from the document removes all DOM event listeners and deletes the cache reference

Parameters

  • node?: HTMLElement optional

    HTMLElement The node to remove.

repaint()

[Method] Repaints the whole page

require(expressions?: any, fn?: any, scope?: any, excludes?: any)

[Method] Convenient alias of Ext Loader require

Parameters

  • expressions?: any optional

    String/Array Can either be a string or an array of string.

  • fn?: any optional

    Function The callback function.

  • scope?: any optional

    Object The execution scope (this) of the callback function.

  • excludes?: any optional

    String/Array Classes to be excluded, useful when being used with expressions.

select(selector?: any, composite?: boolean): ICompositeElementLite

[Method] Selects elements based on the passed CSS selector to enable Element methods to be applied to many related elements in

Parameters

  • selector?: any optional

    String/HTMLElement[] The CSS selector or an array of elements

  • composite?: boolean optional

    Boolean Return a CompositeElement as opposed to a CompositeElementLite. Defaults to false.

Returns

ICompositeElementLite

Ext.dom.CompositeElementLite/Ext.dom.CompositeElement

setup(config?: any)

[Method] Ext setup is the entry point to initialize a Sencha Touch application

Parameters

  • config?: any optional

    Object An object with the following config options:

sum(array?: Array<any>): number

[Method] Old alias to Ext Array sum

Parameters

  • array?: Array<any> optional

    Array The Array to calculate the sum value of.

Returns

number

Number The sum.

syncRequire(expressions?: any, fn?: any, scope?: any, excludes?: any)

[Method] Synchronous version of require convenient alias of Ext Loader syncRequire

Parameters

  • expressions?: any optional

    String/Array Can either be a string or an array of string

  • fn?: any optional

    Function The callback function

  • scope?: any optional

    Object The execution scope (this) of the callback function

  • excludes?: any optional

    String/Array Classes to be excluded, useful when being used with expressions

toArray(iterable?: any, start?: number, end?: number): Array<any>

[Method] Converts any iterable numeric indices and a length property into a true array

Parameters

  • iterable?: any optional

    Object the iterable object to be turned into a true Array.

  • start?: number optional

    Number a zero-based index that specifies the start of extraction.

  • end?: number optional

    Number a zero-based index that specifies the end of extraction.

Returns

Array<any>

Array

type(value?: any): string

[Method] Old alias to typeOf

Parameters

  • value?: any optional

    Object

Returns

string

String

typeOf(value?: any): string

[Method] Returns the type of the given variable in string format

Parameters

  • value?: any optional

    Object

Returns

string

String

unique(array?: Array<any>): Array<any>

[Method] Old alias to Ext Array unique

Parameters

  • array?: Array<any> optional

    Array

Returns

Array<any>

Array results

urlAppend(url?: string, string?: string): string

[Method] Old alias to Ext String urlAppend

Parameters

  • url?: string optional

    String The URL to append to.

  • string?: string optional

    String The content to append to the URL.

Returns

string

String The resulting URL.

urlDecode()

[Method] A convenient alias method for Ext Object fromQueryString

urlEncode()

[Method] A convenient alias method for Ext Object toQueryString

valueFrom(value?: any, defaultValue?: any, allowBlank?: boolean): any

[Method] Returns the given value itself if it s not empty as described in isEmpty returns the default value second argument

Parameters

  • value?: any optional

    Object The value to test.

  • defaultValue?: any optional

    Object The value to return if the original value is empty.

  • allowBlank?: boolean optional

    Boolean true to allow zero length strings to qualify as non-empty.

Returns

any

Object value, if non-empty, else defaultValue.

widget(name?: string): any

[Method] Convenient shorthand to create a widget by its xtype also see Ext ClassManager instantiateByAlias var button Ext

Parameters

  • name?: string optional

    String

Returns

any

Object instance