// ***********************************************************************************
// Begin Config
// ***********************************************************************************
// We do not want "_hidden" style backing properties.
$configPrefixed: false,
// We also want non-config system properties to go to the instance.
$configStrict: false,
config: {
/**
* @cfg {Object} data
* The initial set of data to apply to the `{@link #tpl}` to update the content
* area of the Component.
*
* @since 3.4.0
*/
data: null,
/**
* @cfg {Boolean} modelValidation
* This config enables binding to your `{@link Ext.data.Model#validators}`. This
* is only processed by form fields (e.g., `Ext.form.field.Text`) at present, but
* this setting is inherited and so can be set on a parent container.
*
* When set to `true` by a component or not set by a component but inherited from
* an ancestor container, `Ext.data.Validation` records are used to automatically
* bind validation results for any form field to which a `value` is bound.
*
* While this config can be set arbitrarily high in the component hierarchy, doing
* so can create a lot overhead if most of your form fields do not actually rely on
* `validators` in your data model.
*
* Using this setting for a form that is bound to an `Ext.data.Model` might look
* like this:
*
* {
* xtype: 'panel',
* modelValidation: true,
* items: [{
* xtype: 'textfield',
* bind: '{theUser.firstName}'
* },{
* xtype: 'textfield',
* bind: '{theUser.lastName}'
* },{
* xtype: 'textfield',
* bind: '{theUser.phoneNumber}'
* },{
* xtype: 'textfield',
* bind: '{theUser.email}'
* }]
* }
*
* The above is equivalent to the following manual binding of validation:
*
* {
* xtype: 'panel',
* items: [{
* xtype: 'textfield',
* bind: {
* value: '{theUser.firstName}'
* validation: '{theUser.validation.firstName}'
* }
* },{
* xtype: 'textfield',
* bind: {
* value: '{theUser.lastName}'
* validation: '{theUser.validation.lastName}'
* }
* },{
* xtype: 'textfield',
* bind: {
* value: '{theUser.phoneNumber}'
* validation: '{theUser.validation.phoneNumber}'
* }
* },{
* xtype: 'textfield',
* bind: {
* value: '{theUser.email}'
* validation: '{theUser.validation.email}'
* }
* }]
* }
*
* Notice that "validation" is a pseudo-association defined for all entities. See
* `{@link Ext.data.Model#getValidation}` for further details.
*/
/**
* @cfg {Number} maxHeight
* The maximum value in pixels which this Component will set its height to.
*
* **Warning:** This will override any size management applied by layout managers.
*/
maxHeight: null,
/**
* @cfg {Number} maxWidth
* The maximum value in pixels which this Component will set its width to.
*
* **Warning:** This will override any size management applied by layout managers.
*/
maxWidth: null,
/**
* @cfg {Number} minHeight
* The minimum value in pixels which this Component will set its height to.
*
* **Warning:** This will override any size management applied by layout managers.
*/
minHeight: null,
/**
* @cfg {Number} minWidth
* The minimum value in pixels which this Component will set its width to.
*
* **Warning:** This will override any size management applied by layout managers.
*/
minWidth: null,
/**
* @cfg {Boolean/String/Object} scrollable
* Configuration options to make this Component scrollable. Acceptable values are:
*
* - `true` to enable auto scrolling.
* - `false` (or `null`) to disable scrolling - this is the default.
* - `x` or `horizontal` to enable horizontal scrolling only
* - `y` or `vertical` to enable vertical scrolling only
*
* Also accepts a configuration object for a `{@link Ext.scroll.Scroller}` if
* if advanced configuration is needed.
*
* The getter for this config returns the {@link Ext.scroll.Scroller Scroller}
* instance. You can use the Scroller API to read or manipulate the scroll position:
*
* // scrolls the component to 5 on the x axis and 10 on the y axis
* component.getScrollable().scrollTo(5, 10);
*/
scrollable: null
},
defaultBindProperty: 'html',
/**
* @cfg {String} [alignTarget]
* A Component or Element by which to position this component according to the {@link #defaultAlign}.
* Defaults to the owning Container.
*
* *Only applicable if this component is {@link #floating}*
*
* *Used upon first show*.
*/
alignTarget: null,
/**
* @cfg {String} anchor
* @inheritDoc Ext.layout.container.Anchor
*/
/**
* @cfg {String/Object} autoEl
* A tag name or {@link Ext.dom.Helper DomHelper} spec used to create the {@link #getEl Element} which will
* encapsulate this Component.
*
* You do not normally need to specify this. For the base classes {@link Ext.Component} and
* {@link Ext.container.Container}, this defaults to **'div'**. The more complex Sencha classes use a more
* complex DOM structure specified by their own {@link #renderTpl}s.
*
* This is intended to allow the developer to create application-specific utility Components encapsulated by
* different DOM elements. Example usage:
*
* {
* xtype: 'component',
* autoEl: {
* tag: 'img',
* src: 'http://www.example.com/example.jpg'
* }
* }, {
* xtype: 'component',
* autoEl: {
* tag: 'blockquote',
* html: 'autoEl is cool!'
* }
* }, {
* xtype: 'container',
* autoEl: 'ul',
* cls: 'ux-unordered-list',
* items: {
* xtype: 'component',
* autoEl: 'li',
* html: 'First list item'
* }
* }
*
* @since 2.3.0
*/
/**
* @cfg {Boolean/String/HTMLElement/Ext.dom.Element} autoRender
* This config is intended mainly for non-{@link #cfg-floating} Components which may or may not be shown. Instead of using
* {@link #renderTo} in the configuration, and rendering upon construction, this allows a Component to render itself
* upon first _{@link Ext.Component#method-show show}_. If {@link #cfg-floating} is `true`, the value of this config is omitted as if it is `true`.
*
* Specify as `true` to have this Component render to the document body upon first show.
*
* Specify as an element, or the ID of an element to have this Component render to a specific element upon first
* show.
*/
autoRender: false,
/**
* @cfg {Boolean} [autoScroll=false]
* `true` to use overflow:'auto' on the components layout element and show scroll bars automatically when necessary,
* `false` to clip any overflowing content.
*
* This should not be combined with {@link #overflowX} or {@link #overflowY}.
* @deprecated 5.1.0 Use {@link #scrollable} instead
*/
/**
* @cfg {Boolean} autoShow
* `true` to automatically show the component upon creation. This config option may only be used for
* {@link #floating} components or components that use {@link #autoRender}.
*
* @since 2.3.0
*/
autoShow: false,
/**
* @cfg {String} [baseCls='x-component']
* The base CSS class to apply to this component's element. This will also be prepended to elements within this
* component like Panel's body will get a class `x-panel-body`. This means that if you create a subclass of Panel, and
* you want it to get all the Panels styling for the element and the body, you leave the `baseCls` `x-panel` and use
* `componentCls` to add specific styling for this component.
*/
baseCls: Ext.baseCSSPrefix + 'component',
/**
* @cfg {Number/String/Boolean} border
* Specifies the border size for this component. The border can be a single numeric value to apply to all sides or it can
* be a CSS style specification for each style, for example: '10 5 3 10' (top, right, bottom, left).
*
* For components that have no border by default, setting this won't make the border appear by itself.
* You also need to specify border color and style:
*
* border: 5,
* style: {
* borderColor: 'red',
* borderStyle: 'solid'
* }
*
* To turn off the border, use `border: false`.
*/
/**
* @cfg {Object/String[]/Object[]} childEls
* @inheritdoc Ext.util.ElementContainer#childEls
*/
childEls: {
frameTable: { frame: true },
frameTL: { frame: 'tl' },
frameTC: { frame: 'tc' },
frameTR: { frame: 'tr' },
frameML: { frame: 'ml' },
frameBody: { frame: 'mc' },
frameMR: { frame: 'mr' },
frameBL: { frame: 'bl' },
frameBC: { frame: 'bc' },
frameBR: { frame: 'br' }
},
/**
* @cfg {String/String[]} [cls='']
* An optional extra CSS class that will be added to this component's Element.
* The value can be a string, a list of strings separated by spaces, or an array of strings. This can be useful
* for adding customized styles to the component or any of its children using standard CSS rules.
*
* @since 1.1.0
*/
/**
* @cfg {Number} [columnWidth]
* Defines the column width inside {@link Ext.layout.container.Column column layout}.
*
* The columnWidth property is always evaluated as a percentage and must be a decimal value greater than 0 and
* less than 1 (e.g., .25). See the description at the top of {@link Ext.layout.container.Column column layout} for
* additional usage details when combining width and columnWidth configs within the layout.
*/
/**
* @cfg {String} componentCls
* CSS Class to be added to a components root level element to give distinction to it via styling.
*/
// @cmd-auto-dependency { aliasPrefix : "layout." }
/**
* @cfg {String/Object} componentLayout
* The sizing and positioning of a Component's internal Elements is the responsibility of the Component's layout
* manager which sizes a Component's internal structure in response to the Component being sized.
*
* Generally, developers will not use this configuration as all provided Components which need their internal
* elements sizing (Such as {@link Ext.form.field.Base input fields}) come with their own componentLayout managers.
*
* The {@link Ext.layout.container.Auto default layout manager} will be used on instances of the base Ext.Component
* class which simply sizes the Component's encapsulating element to the height and width specified in the
* {@link #setSize} method.
*
*/
componentLayout: 'autocomponent',
/**
* @cfg {Object/String} constraintInsets
* An object or a string (in TRBL order) specifying insets from the configured {@link #constrainTo constrain region}
* within which this component must be constrained when positioning or sizing.
* example:
*
* constraintInsets: '10 10 10 10' // Constrain with 10px insets from parent
*/
/**
* @cfg {Ext.util.Region/Ext.dom.Element} constrainTo
* A {@link Ext.util.Region Region} (or an element from which a Region measurement will be read) which is used
* to constrain the component. Only applies when the component is floating.
*/
/**
* @cfg {String} contentEl
* Specify an existing HTML element, or the `id` of an existing HTML element to use as the content for this component.
*
* This config option is used to take an existing HTML element and place it in the layout element of a new component
* (it simply moves the specified DOM element _after the Component is rendered_ to use as the content.
*
* **Notes:**
*
* The specified HTML element is appended to the layout element of the component _after any configured
* {@link #html HTML} has been inserted_, and so the document will not contain this element at the time
* the {@link #event-render} event is fired.
*
* The specified HTML element used will not participate in any **`{@link Ext.container.Container#layout layout}`**
* scheme that the Component may use. It is just HTML. Layouts operate on child
* **`{@link Ext.container.Container#cfg-items items}`**.
*
* Add either the `x-hidden` or the `x-hidden-display` CSS class to prevent a brief flicker of the content before it
* is rendered to the panel.
*
* @since 3.4.0
*/
/**
* @cfg {String} [defaultAlign="c-c"]
* The default {@link Ext.util.Positionable#getAlignToXY Ext.dom.Element#getAlignToXY} anchor position value for this component
* relative to its {@link #alignTarget} (which defaults to its owning Container).
*
* _Only applicable if this component is {@link #floating}_
*
* *Used upon first show*.
*/
defaultAlign: 'c-c',
/**
* @cfg {Boolean} disabled
* `true` to disable the component.
* @since 2.3.0
*/
disabled: false,
// http://www.w3.org/TR/html5/disabled-elements.html
disabledRe: /^(?:button|input|select|textarea|optgroup|option|fieldset)$/i,
nonMaskableRe: (function () {
var re = ['input', 'select', 'textarea', 'optgroup', 'option', 'table'];
// All IE browsers 9 and below except for IE 9 standards.
if (Ext.isIE9m && !(Ext.isIE9 && !Ext.isIEQuirks)) {
// .insertAdjacentHTML('BeforeEnd', '
...
') yields
// 'Invalid source HTML for this operation' in all IEs not IE 9 standards.
re.push('p');
}
return new RegExp('^(?:' + re.join('|') + ')$', 'i');
}()),
/**
* @cfg {String} [disabledCls='x-item-disabled']
* CSS class to add when the Component is disabled.
*/
disabledCls: Ext.baseCSSPrefix + 'item-disabled',
/**
* @cfg {'top'/'bottom'/'left'/'right'} dock
* The side of the {@link Ext.panel.Panel panel} where this component is to be
* docked when specified in the panel's
* {@link Ext.panel.Panel#dockedItems dockedItems} config.
*
* Possible values are:
*
* - top
* - bottom
* - left
* - right
*/
/**
* @cfg {Boolean/Object} [draggable=false]
* Specify as true to make a {@link #floating} Component draggable using the Component's encapsulating element as
* the drag handle.
*
* This may also be specified as a config object for the {@link Ext.util.ComponentDragger ComponentDragger} which is
* instantiated to perform dragging.
*
* For example to create a Component which may only be dragged around using a certain internal element as the drag
* handle, use the delegate option:
*
* new Ext.Component({
* constrain: true,
* floating: true,
* style: {
* backgroundColor: '#fff',
* border: '1px solid black'
* },
* html: 'The title
The content
',
* draggable: {
* delegate: 'h1'
* }
* }).show();
*/
draggable: false,
/**
* @cfg {Number} flex
* Flex may be applied to **child items** of a box layout ({@link Ext.layout.container.VBox vbox} or
* {@link Ext.layout.container.HBox hbox}). Each child item with a flex property will
* fill space (horizontally in `hbox`, vertically in `vbox`) according to that item's
* **relative** flex value compared to the sum of all items with a flex value specified.
*
* Any child items that have either a `flex` of `0` or `undefined`
* will not be 'flexed' (the initial size will not be changed).
*/
/**
* @cfg {Boolean} floating
* Specify as true to float the Component outside of the document flow using CSS absolute positioning.
*
* Components such as {@link Ext.window.Window Window}s and {@link Ext.menu.Menu Menu}s are floating by default.
*
* Floating Components that are programmatically {@link Ext.Component#method-render rendered} will register
* themselves with the global {@link Ext.WindowManager ZIndexManager}
*
* ### Floating Components as child items of a Container
*
* A floating Component may be used as a child item of a Container. This just allows the floating Component to seek
* a ZIndexManager by examining the ownerCt chain.
*
* When configured as floating, Components acquire, at render time, a {@link Ext.ZIndexManager ZIndexManager} which
* manages a stack of related floating Components. The ZIndexManager sorts its stack according to
* an incrementing access counter and the {@link Ext.util.Floating#alwaysOnTop alwaysOnTop} config when the Component's {@link #toFront} method is called.
*
* The ZIndexManager is found by traversing up the {@link #ownerCt} chain to find an ancestor which itself is
* floating. This is so that descendant floating Components of floating _Containers_ (Such as a ComboBox dropdown
* within a Window) can have its zIndex managed relative to any siblings, but always **above** that floating
* ancestor Container.
*
* If no floating ancestor is found, a floating Component registers itself with the default {@link Ext.WindowManager
* ZIndexManager}.
*
* Floating components _do not participate in the Container's layout_. Because of this, they are not rendered until
* you explicitly {@link #method-show} them.
*
* After rendering, the ownerCt reference is deleted, and the {@link #floatParent} property is set to the found
* floating ancestor Container. If no floating ancestor Container was found the {@link #floatParent} property will
* not be set.
*/
floating: false,
/**
* @cfg {Boolean} [formBind=false]
* When inside FormPanel, any component configured with `formBind: true` will
* be enabled/disabled depending on the validity state of the form.
* See {@link Ext.form.Panel} for more information and example.
*/
/**
* @cfg {Boolean} frame
* Specify as `true` to have the Component inject framing elements within the Component at render time to provide a
* graphical rounded frame around the Component content.
*
* This is only necessary when running on outdated, or non standard-compliant browsers such as Microsoft's Internet
* Explorer prior to version 9 which do not support rounded corners natively.
*
* The extra space taken up by this framing is available from the read only property {@link #frameSize}.
*/
/**
* @cfg {Number|String} height
* The height of this component. A numeric value will be interpreted as the number of
* pixels; a string value will be treated as a CSS value with units.
*/
/**
* @cfg {Boolean} hidden
* `true` to hide the component.
* @since 2.3.0
*/
hidden: false,
/**
* @cfg {String} hideMode
* A String which specifies how this Component's encapsulating DOM element will be hidden. Values may be:
*
* - `'display'` : The Component will be hidden using the `display: none` style.
* - `'visibility'` : The Component will be hidden using the `visibility: hidden` style.
* - `'offsets'` : The Component will be hidden by absolutely positioning it out of the visible area of the document.
* This is useful when a hidden Component must maintain measurable dimensions. Hiding using `display` results in a
* Component having zero dimensions.
*
* @since 1.1.0
*/
hideMode: 'display',
/**
* @cfg {String/Object} [html='']
* An HTML fragment, or a {@link Ext.dom.Helper DomHelper} specification to use as the layout element content.
* The HTML content is added after the component is rendered, so the document will not contain this HTML at the time
* the {@link #event-render} event is fired. This content is inserted into the body _before_ any configured {@link #contentEl}
* is appended.
*
* @since 3.4.0
*/
/**
* @cfg {String} id
* The **unique** id of this component instance.
*
* Use of this config should be considered carefully as this value must be unique across
* all existing components. Components created with an `id` may be accessed globally
* using {@link Ext#getCmp Ext.getCmp}.
*
* Instead of using assigned ids, consider a {@link #reference} config and a {@link #cfg-controller ViewController}
* to respond to events and perform processing upon this Component.
*
* Alternatively, {@link #itemId} and {@link Ext.ComponentQuery ComponentQuery} can be
* used to perform selector-based searching for Components analogous to DOM querying.
* The {@link Ext.container.Container Container} class contains several helpful
* {@link Ext.container.Container#down shortcut methods} to query its descendant
* Components by selector.
*
* Note that this `id` will also be used as the element id for the containing HTML
* element that is rendered to the page for this component. This allows you to write
* id-based CSS rules to style the specific instance of this component uniquely, and
* also to select sub-elements using this component's `id` as the parent.
*
* Defaults to an {@link #getId auto-assigned id}.
*
* **Note**: Valid identifiers start with a letter or underscore and are followed by
* (optional) additional letters, underscores, digits or hyphens.
*
* @since 1.1.0
*/
/**
* @cfg {String} itemId
* The **unique** id of this component instance within its container. See also the
* {@link #reference} config.
*
* An `itemId` can be used as an alternative way to get a reference to a component when no object reference is
* available. Instead of using an `{@link #id}` with {@link Ext#getCmp getCmp}, use
* `itemId` with {@link Ext.container.Container#getComponent getComponent} which will
* retrieve `itemId`'s or {@link #id}'s. Since `itemId`'s are an index to the container's
* internal collection, the `itemId` is scoped locally to the container -- avoiding
* potential conflicts with {@link Ext.ComponentManager} which requires a **unique**
* `{@link #id}` values.
*
* var c = new Ext.panel.Panel({ //
* {@link Ext.Component#height height}: 300,
* {@link #renderTo}: document.body,
* {@link Ext.container.Container#layout layout}: 'auto',
* {@link Ext.container.Container#cfg-items items}: [
* {
* itemId: 'p1',
* {@link Ext.panel.Panel#title title}: 'Panel 1',
* {@link Ext.Component#height height}: 150
* },
* {
* itemId: 'p2',
* {@link Ext.panel.Panel#title title}: 'Panel 2',
* {@link Ext.Component#height height}: 150
* }
* ]
* })
* p1 = c.{@link Ext.container.Container#getComponent getComponent}('p1'); // not the same as {@link Ext#getCmp Ext.getCmp()}
* p2 = p1.{@link #ownerCt}.{@link Ext.container.Container#getComponent getComponent}('p2'); // reference via a sibling
*
* Also see {@link #id}, `{@link Ext.container.Container#query}`, `{@link Ext.container.Container#down}` and
* `{@link Ext.container.Container#child}`.
*
* **Note**: Valid identifiers start with a letter or underscore and are followed by
* (optional) additional letters, underscores, digits or hyphens.
*
* **Note**: to access the container of an item see {@link #ownerCt}.
*
* @since 3.4.0
*/
/**
* @cfg {Ext.ComponentLoader/Object} loader
* A configuration object or an instance of a {@link Ext.ComponentLoader} to load remote content
* for this Component.
*
* Ext.create('Ext.Component', {
* loader: {
* url: 'content.html',
* autoLoad: true
* },
* renderTo: Ext.getBody()
* });
*/
/**
* @cfg {Number/String} margin
* Specifies the margin for this component. The margin can be a single numeric value to apply to all sides or it can
* be a CSS style specification for each style, for example: '10 5 3 10' (top, right, bottom, left).
*/
/**
* @cfg {String} [maskElement=null]
* Related to the {@link #cfg-childEls} configuration which specifies named properties which correspond to component sub-elements.
*
* The name of the element property in this component to mask when masked by a LoadMask.
*
* Defaults to `null` to indicate that Components cannot by default contain a LoadMask, and that any LoadMask should be rendered into the document body.
*
* For example, Panels use `"el"` to indicate that the whole panel should be masked. This could be configured to be
* `"body"` so that only the body is masked and toolbars and the header are still mouse-accessible.
*/
maskElement: null,
/**
* @cfg {String} [overCls='']
* An optional extra CSS class that will be added to this component's Element when the mouse moves over the Element,
* and removed when the mouse moves out. This can be useful for adding customized 'active' or 'hover' styles to the
* component or any of its children using standard CSS rules.
*
* @since 2.3.0
*/
/**
* @cfg {String} overflowX
* Possible values are:
*
* - `'auto'` to enable automatic horizontal scrollbar (Style overflow-x: 'auto').
* - `'scroll'` to always enable horizontal scrollbar (Style overflow-x: 'scroll').
*
* The default is overflow-x: 'hidden'. This should not be combined with {@link #autoScroll}.
* @deprecated 5.1.0 Use {@link #scrollable} instead
*/
/**
* @cfg {String} overflowY
* Possible values are:
*
* - `'auto'` to enable automatic vertical scrollbar (Style overflow-y: 'auto').
* - `'scroll'` to always enable vertical scrollbar (Style overflow-y: 'scroll').
*
* The default is overflow-y: 'hidden'. This should not be combined with {@link #autoScroll}.
* @deprecated 5.1.0 Use {@link #scrollable} instead
*/
/**
* @cfg {Number/String} padding
* Specifies the padding for this component. The padding can be a single numeric value to apply to all sides or it
* can be a CSS style specification for each style, for example: '10 5 3 10' (top, right, bottom, left).
*/
/**
* @cfg {Ext.plugin.Abstract[]/Ext.plugin.Abstract/Object[]/Object/Ext.enums.Plugin[]/Ext.enums.Plugin} plugins
* An array of plugins to be added to this component. Can also be just a single plugin instead of array.
*
* Plugins provide custom functionality for a component. The only requirement for
* a valid plugin is that it contain an `init` method that accepts a reference of type Ext.Component. When a component
* is created, if any plugins are available, the component will call the init method on each plugin, passing a
* reference to itself. Each plugin can then call methods or respond to events on the component as needed to provide
* its functionality.
*
* Plugins can be added to component by either directly referencing the plugin instance:
*
* plugins: [Ext.create('Ext.grid.plugin.CellEditing', {clicksToEdit: 1})],
*
* By using config object with ptype:
*
* plugins: {ptype: 'cellediting', clicksToEdit: 1},
*
* Or with just a ptype:
*
* plugins: ['cellediting', 'gridviewdragdrop'],
*
* See {@link Ext.enums.Plugin} for list of all ptypes.
*
* @since 2.3.0
*/
/**
* @cfg {"north"/"south"/"east"/"west"/"center"} [region=undefined]
* Defines the region inside {@link Ext.layout.container.Border border layout}.
*
* Possible values:
*
* - north - Positions component at top.
* - south - Positions component at bottom.
* - east - Positions component at right.
* - west - Positions component at left.
* - center - Positions component at the remaining space.
* There **must** be a component with `region: "center"` in every border layout.
*/
/**
* @cfg {Object} renderData
*
* The data used by {@link #renderTpl} in addition to the following property values of the component:
*
* - id
* - ui
* - uiCls
* - baseCls
* - componentCls
* - frame
*
* See {@link #renderSelectors} and {@link #cfg-childEls} for usage examples.
*/
/**
* @cfg {Object} renderSelectors
* An object containing properties specifying CSS selectors which identify child elements
* created by the render process.
*
* After the Component's internal structure is rendered according to the {@link #renderTpl}, this object is iterated through,
* and the found Elements are added as properties to the Component using the `renderSelector` property name.
*
* For example, a Component which renders a title and description into its element:
*
* Ext.create('Ext.Component', {
* renderTo: Ext.getBody(),
* renderTpl: [
* '{title}
',
* '{desc}
'
* ],
* renderData: {
* title: "Error",
* desc: "Something went wrong"
* },
* renderSelectors: {
* titleEl: 'h1.title',
* descEl: 'p'
* },
* listeners: {
* afterrender: function(cmp){
* // After rendering the component will have a titleEl and descEl properties
* cmp.titleEl.setStyle({color: "red"});
* }
* }
* });
*
* The use of `renderSelectors` is deprecated (for performance reasons). The above
* code should be refactored into something like this:
*
* Ext.create('Ext.Component', {
* renderTo: Ext.getBody(),
* renderTpl: [
* '{title}
',
* '{desc}
'
* ],
* renderData: {
* title: "Error",
* desc: "Something went wrong"
* },
* childEls: [
* 'titleEl',
* 'descEl'
* ]
* });
*
* To use `childEls` yet retain the use of selectors (which remains as expensive as
* `renderSelectors`):
*
* Ext.create('Ext.Component', {
* renderTo: Ext.getBody(),
* renderTpl: [
* '{title}
',
* '{desc}
'
* ],
* renderData: {
* title: "Error",
* desc: "Something went wrong"
* },
* childEls: {
* titleEl: { selectNode: 'h1.title' },
* descEl: { selectNode: 'p' }
* }
* });
*
* @deprecated 5.0 Use {@link #cfg-childEls} instead.
*/
/**
* @cfg {String/HTMLElement/Ext.dom.Element} renderTo
* Specify the `id` of the element, a DOM element or an existing Element that this component will be rendered into.
*
* **Notes:**
*
* Do *not* use this option if the Component is to be a child item of a {@link Ext.container.Container Container}.
* It is the responsibility of the {@link Ext.container.Container Container}'s
* {@link Ext.container.Container#layout layout manager} to render and manage its child items.
*
* When using this config, a call to `render()` is not required.
*
* See also: {@link #method-render}.
*
* @since 2.3.0
*/
/**
* @cfg {Ext.XTemplate/String/String[]} renderTpl
* An {@link Ext.XTemplate XTemplate} used to create the internal structure inside this Component's encapsulating
* {@link #getEl Element}.
*
* You do not normally need to specify this. For the base classes {@link Ext.Component} and
* {@link Ext.container.Container}, this defaults to **`null`** which means that they will be initially rendered
* with no internal structure; they render their {@link #getEl Element} empty. The more specialized Ext JS and Sencha Touch
* classes which use a more complex DOM structure, provide their own template definitions.
*
* This is intended to allow the developer to create application-specific utility Components with customized
* internal structure.
*
* Upon rendering, any created child elements may be automatically imported into object properties using the
* {@link #renderSelectors} and {@link #cfg-childEls} options.
* @protected
*/
renderTpl: [
'',
'',
'',
'{%this.renderContent(out,values)%}',
'
'
],
/**
* @cfg {Boolean/Object} resizable
* Specify as `true` to apply a {@link Ext.resizer.Resizer Resizer} to this Component after rendering.
*
* May also be specified as a config object to be passed to the constructor of {@link Ext.resizer.Resizer Resizer}
* to override any defaults. By default the Component passes its minimum and maximum size, and uses
* `{@link Ext.resizer.Resizer#dynamic}: false`
*/
/**
* @cfg {String} resizeHandles
* A valid {@link Ext.resizer.Resizer} handles config string. Only applies when resizable = true.
*/
resizeHandles: 'all',
/**
* @cfg {Boolean/Number} [shrinkWrap=2]
*
* The possible values for shrinkWrap are:
*
* - 0 (or `false`): Neither width nor height depend on content.
* - 1: Width depends on content (shrink wraps), but height does not.
* - 2: Height depends on content (shrink wraps), but width does not.
* - 3 (or `true`): Both width and height depend on content (shrink wrap).
*
* In CSS terms, shrink-wrap width is analogous to an inline-block element as opposed
* to a block-level element.
*
* @localdoc ##Non-Panel Components
*
* The shrinkWrap config is a class-level config and should be used when defining a
* subclass.
* It is not intended to be set as a config on instances of a given component.
*
* For non-Panel components, shrinkWrap is a descriptive config only. It should be
* set when defining your own custom class including the DOM elements used to
* construct the component. The shrinkWrap property does not itself apply styling on
* the component elements. Rather, it should describe the CSS styling you've applied
* to your custom component (_refer to the numeric matrix above_).
*
* When a component is owned by a container the layout of that container will inspect
* the component's shrinkWrap property during layout. The layout then uses the
* content-wrapping policy described by shrinkWrap to correctly size and position the
* container's child items.
*/
shrinkWrap: 2,
/**
* @cfg {String/Object} style
* A custom style specification to be applied to this component's Element. Should be a valid argument to
* {@link Ext.dom.Element#applyStyles}.
*
* new Ext.panel.Panel({
* title: 'Some Title',
* renderTo: Ext.getBody(),
* width: 400, height: 300,
* layout: 'form',
* items: [{
* xtype: 'textarea',
* style: {
* width: '95%',
* marginBottom: '10px'
* }
* },
* new Ext.button.Button({
* text: 'Send',
* minWidth: '100',
* style: {
* marginBottom: '10px'
* }
* })
* ]
* });
*
* @since 1.1.0
*/
/**
* @cfg {Boolean} toFrontOnShow
* True to automatically call {@link #toFront} when the {@link #method-show} method is called on an already visible,
* floating component.
*/
toFrontOnShow: true,
/**
* @cfg {Ext.XTemplate/Ext.Template/String/String[]} tpl
* An {@link Ext.Template}, {@link Ext.XTemplate} or an array of strings to form an Ext.XTemplate. Used in
* conjunction with the `{@link #data}` and `{@link #tplWriteMode}` configurations.
*
* @since 3.4.0
*/
/**
* @property {Boolean} [synthetic=false]
* This property is `true` if the component was created internally by the framework
* and is not explicitly user-defined. This is set for such things as `Splitter`
* instances managed by `border` and `box` layouts.
* @private
*/
synthetic: false,
/**
* @cfg {String} tplWriteMode
* The Ext.(X)Template method to use when updating the content area of the Component.
* See `{@link Ext.XTemplate#overwrite}` for information on default mode.
*
* @since 3.4.0
*/
tplWriteMode: 'overwrite',
/**
* @cfg {String} ui
* A UI style for a component.
*/
ui: 'default',
/**
* @cfg {String[]} uiCls
* An array of of `classNames` which are currently applied to this component.
* @private
*/
uiCls: [],
/**
* @cfg {Number} [weight]
* A value to control how Components are laid out in a {@link Ext.layout.container.Border Border} layout or as docked items.
*
* In a Border layout, this can control how the regions (not the center) region lay out if the west or east take full height
* or if the north or south region take full width. Also look at the {@link Ext.layout.container.Border#regionWeights} on the Border layout. An example to show how you can
* take control of this is:
*
* Ext.create('Ext.container.Viewport', {
* layout : 'border',
* defaultType : 'panel',
* items : [
* {
* region : 'north',
* title : 'North',
* height : 100
* },
* {
* region : 'south',
* title : 'South',
* height : 100,
* weight : -25
* },
* {
* region : 'west',
* title : 'West',
* width : 200,
* weight : 15
* },
* {
* region : 'east',
* title : 'East',
* width : 200
* },
* {
* region : 'center',
* title : 'center'
* }
* ]
* });
*
* If docked items, the weight will order how the items are laid out. Here is an example to put a {@link Ext.toolbar.Toolbar} above
* a {@link Ext.panel.Panel}'s header:
*
* Ext.create('Ext.panel.Panel', {
* renderTo : document.body,
* width : 300,
* height : 300,
* title : 'Panel',
* html : 'Panel Body',
* dockedItems : [
* {
* xtype : 'toolbar',
* items : [
* {
* text : 'Save'
* }
* ]
* },
* {
* xtype : 'toolbar',
* weight : -10,
* items : [
* {
* text : 'Remove'
* }
* ]
* }
* ]
* });
*/
weight: null,
/**
* @cfg {Number|String} width
* The width of this component. A numeric value will be interpreted as the number of
* pixels; a string value will be treated as a CSS value with units.
*/
/**
* @cfg {Ext.enums.Widget} xtype
* **Note:** Only applies to {@link Ext.Component} derived classes when used as
* a config in {@link Ext#define Ext.define}.
*
* This property provides a shorter alternative to creating objects than using a full
* class name. Using `xtype` is the most common way to define component instances,
* especially in a container. For example, the items in a form containing text fields
* could be created explicitly like so:
*
* items: [
* Ext.create('Ext.form.field.Text', {
* fieldLabel: 'Foo'
* }),
* Ext.create('Ext.form.field.Text', {
* fieldLabel: 'Bar'
* }),
* Ext.create('Ext.form.field.Number', {
* fieldLabel: 'Num'
* })
* ]
*
* But by using `xtype`, the above becomes:
*
* items: [
* {
* xtype: 'textfield',
* fieldLabel: 'Foo'
* },
* {
* xtype: 'textfield',
* fieldLabel: 'Bar'
* },
* {
* xtype: 'numberfield',
* fieldLabel: 'Num'
* }
* ]
*
* When the `xtype` is common to many items, {@link Ext.container.Container#defaultType}
* is another way to specify the `xtype` for all items that don't have an explicit `xtype`:
*
* defaultType: 'textfield',
* items: [
* { fieldLabel: 'Foo' },
* { fieldLabel: 'Bar' },
* { fieldLabel: 'Num', xtype: 'numberfield' }
* ]
*
* Each member of the `items` array is now just a "configuration object". These objects
* are used to create and configure component instances. A configuration object can be
* manually used to instantiate a component using {@link Ext#widget}:
*
* var text1 = Ext.create('Ext.form.field.Text', {
* fieldLabel: 'Foo'
* });
*
* // or alternatively:
*
* var text1 = Ext.widget({
* xtype: 'textfield',
* fieldLabel: 'Foo'
* });
*
* This conversion of configuration objects into instantiated components is done when
* a container is created as part of its {Ext.container.AbstractContainer#initComponent}
* process. As part of the same process, the `items` array is converted from its raw
* array form into a {@link Ext.util.MixedCollection} instance.
*
* You can define your own `xtype` on a custom {@link Ext.Component component} by specifying
* the `xtype` property in {@link Ext#define}. For example:
*
* Ext.define('MyApp.PressMeButton', {
* extend: 'Ext.button.Button',
* xtype: 'pressmebutton',
* text: 'Press Me'
* });
*
* Care should be taken when naming an `xtype` in a custom component because there is
* a single, shared scope for all xtypes. Third part components should consider using
* a prefix to avoid collisions.
*
* Ext.define('Foo.form.CoolButton', {
* extend: 'Ext.button.Button',
* xtype: 'ux-coolbutton',
* text: 'Cool!'
* });
*
* See {@link Ext.enums.Widget} for list of all available xtypes.
*
* @since 2.3.0
*/
// ***********************************************************************************
// End Config
// ***********************************************************************************
//
//