Many classes have shortcut names used when creating (instantiating) a class with a
configuration object. The shortcut name is referred to as an alias
(or xtype
if the
class extends Ext.Component). The alias/xtype is listed next to the class name of
applicable classes for quick reference.
Framework classes or their members may be specified as private
or protected
. Else,
the class / member is public
. Public
, protected
, and private
are access
descriptors used to convey how and when the class or class member should be used.
Public classes and class members are available for use by any other class or application code and may be relied upon as a stable and persistent within major product versions. Public classes and members may safely be extended via a subclass.
Protected class members are stable public
members intended to be used by the
owning class or its subclasses. Protected members may safely be extended via a subclass.
Private classes and class members are used internally by the framework and are not intended to be used by application developers. Private classes and members may change or be omitted from the framework at any time without notice and should not be relied upon in application logic.
static
label next to the
method name. *See Static below.Below is an example class member that we can disect to show the syntax of a class member (the lookupComponent method as viewed from the Ext.button.Button class in this case).
Let's look at each part of the member row:
lookupComponent
in this example)( item )
in this example)Ext.Component
in this case). This may be omitted for methods that do not
return anything other than undefined
or may display as multiple possible values
separated by a forward slash /
signifying that what is returned may depend on the
results of the method call (i.e. a method may return a Component if a get method calls is
successful or false
if unsuccessful which would be displayed as
Ext.Component/Boolean
).PROTECTED
in
this example - see the Flags section below)Ext.container.Container
in this example). The source
class will be displayed as a blue link if the member originates from the current class
and gray if it is inherited from an ancestor or mixed-in class.view source
in the example)item : Object
in the example).undefined
a "Returns" section
will note the type of class or object returned and a description (Ext.Component
in the
example)Available since 3.4.0
- not pictured in
the example) just after the member descriptionDefaults to: false
)The API documentation uses a number of flags to further commnicate the class member's function and intent. The label may be represented by a text label, an abbreviation, or an icon.
classInstance.method1().method2().etc();
false
is returned from
an event handler- Indicates a framework class
- A singleton framework class. *See the singleton flag for more information
- A component-type framework class (any class within the Ext JS framework that extends Ext.Component)
- Indicates that the class, member, or guide is new in the currently viewed version
- Indicates a class member of type config
- Indicates a class member of type property
- Indicates a class member of type
method
- Indicates a class member of type event
- Indicates a class member of type
theme variable
- Indicates a class member of type
theme mixin
- Indicates that the class, member, or guide is new in the currently viewed version
Just below the class name on an API doc page is a row of buttons corresponding to the types of members owned by the current class. Each button shows a count of members by type (this count is updated as filters are applied). Clicking the button will navigate you to that member section. Hovering over the member-type button will reveal a popup menu of all members of that type for quick navigation.
Getting and setter methods that correlate to a class config option will show up in the methods section as well as in the configs section of both the API doc and the member-type menus just beneath the config they work with. The getter and setter method documentation will be found in the config row for easy reference.
Your page history is kept in localstorage and displayed (using the available real estate) just below the top title bar. By default, the only search results shown are the pages matching the product / version you're currently viewing. You can expand what is displayed by clicking on the button on the right-hand side of the history bar and choosing the "All" radio option. This will show all recent pages in the history bar for all products / versions.
Within the history config menu you will also see a listing of your recent page visits. The results are filtered by the "Current Product / Version" and "All" radio options. Clicking on the button will clear the history bar as well as the history kept in local storage.
If "All" is selected in the history config menu the checkbox option for "Show product details in the history bar" will be enabled. When checked, the product/version for each historic page will show alongside the page name in the history bar. Hovering the cursor over the page names in the history bar will also show the product/version as a tooltip.
Both API docs and guides can be searched for using the search field at the top of the page.
On API doc pages there is also a filter input field that filters the member rows using the filter string. In addition to filtering by string you can filter the class members by access level, inheritance, and read only. This is done using the checkboxes at the top of the page.
The checkbox at the bottom of the API class navigation tree filters the class list to include or exclude private classes.
Clicking on an empty search field will show your last 10 searches for quick navigation.
Each API doc page (with the exception of Javascript primitives pages) has a menu view of metadata relating to that class. This metadata view will have one or more of the following:
Ext.button.Button
class has an alternate class name of Ext.Button
). Alternate class
names are commonly maintained for backward compatibility.Runnable examples (Fiddles) are expanded on a page by default. You can collapse and expand example code blocks individually using the arrow on the top-left of the code block. You can also toggle the collapse state of all examples using the toggle button on the top-right of the page. The toggle-all state will be remembered between page loads.
Class members are collapsed on a page by default. You can expand and collapse members using the arrow icon on the left of the member row or globally using the expand / collapse all toggle button top-right.
Viewing the docs on narrower screens or browsers will result in a view optimized for a smaller form factor. The primary differences between the desktop and "mobile" view are:
The class source can be viewed by clicking on the class name at the top of an API doc page. The source for class members can be viewed by clicking on the "view source" link on the right-hand side of the member row.
Sencha Ext JS 6.6 release has support for npm packaging and open tooling. With npm packages, Ext JS 6.6 now supports exceptionally easy workflows that every JavaScript developer is familiar with. With Open tooling, Ext JS developers now have powerful tooling to rapidly generate, build and update Ext JS applications. Ext JS 6.6 also brings several major enhancements to Ext JS, including new modern components, a new beautiful accessible theme, modern localization, advanced routing, and enhancements to several Ext JS components and the framework.
Ext JS 6.6 with npm and open tooling fundamentally changes how you build and create Ext JS apps. New features in this release include:
Ext JS npm Packages - Ext JS standard and premium components, themes and framework are now available in npm packages hosted by Sencha npm repository
ExtGen - New open tool that lets you generate new Ext JS apps by asking you a series of questions and provides you with a number of new app templates
ExtBuild - New open tooling to build and transpile your apps
New modern components - Modern time field and time panel component that provides an analog time view based on material design specification
New beautiful Graphite theme that makes your accessible apps visually stunning
Enhanced localization support for modern toolkit
Dynamic Styling of applications using Material Theme
Advanced Ext JS routing enhancements
Enhanced gauges component with improved ability to display interval values
The tooling in the JavaScript community is evolving to create web apps on faster timelines, with improved quality and maintainability. The Node Package Manager or npm is a very popular package manager amongst JavaScript developers. npm hosts a huge repository of 700,000 JavaScript based code packages that developers can use in their applications.
With Ext JS 6.6, the Ext JS framework, components and themes are now available as npm packages that are hosted in the npm repository at npm.sencha.com. Ext JS developers can execute simple commands to add a package to their project, manage dependencies, and manage versions of packages being used. They can also easily include 3rd party JavaScript libraries in Ext JS applications.
For example, you can easily add the Ext JS Pivot Grid npm package to your project with following command
npm i --save @sencha/ext-pivot
Similarly, you can add the new Graphite theme to your Ext JS npm Project with following command
npm i --save @sencha/ext-classic-theme-graphite
Ext JS customers can simply use their modified support portal login to get access to this npm repository, just replace @ with "..". For example, if your login to support portal is [email protected]
, your login to npm registry will be firstname.lastname..sencha.com
You will need to authenticate with Sencha npm registry only one time using following command
npm login --registry=https://npm.sencha.com --scope=@sencha
With new Ext JS npm packages, we are creating new set of powerful open tooling to help you with code generation, build integration and workspace management. Ext-Gen is a new powerful tool that will help you quickly get started with creating new applications using Ext JS npm packages. Ext-Gen provides multiple new templates to help you create mobile, desktop, and universal applications. You can also use your own template in creating new Ext JS application.
Ext-Gen is a node based cross-platform command line tool that provides multiple modes for application generation. It provides auto mode for quickly scaffolding application using default configuration options. It provides an interactive mode that asks a series of questions and generates an application based on those answers. The generated application uses webpack development server so that any changes to the app reflect immediatly in the browser.
You can install Ext-Gen with following command:
npm install -g @sencha/ext-gen
With Ext-Gen, you can generate an entire Ext JS application using npm packages with just one command.
ext-gen app -a
Ext-Build is a new node based tool to build Ext JS applications. Ext-Build currently uses Sencha Cmd and Google Closure compiler for building and transpiling Ext JS applications. Ext-Gen uses Ext-Build to build a development or a production version of Ext JS application.
For example, the following command generates a modern app with the build profiles below it.
ext-gen app -t moderndesktop -n ModernApp
"builds": {
"desktop": {
"toolkit": "modern",
"theme": "theme-material",
}
}
With open tooling, you still have backward compatibility to run sencha cmd. NPX is an npm package runner that allows you to invoke Sencha Cmd binaries within your application workspace.
For example, the following command directly uses Sencha Cmd to build the application.
npx sencha app build desktop
Time Panel is a new modern component that provides an easy way of selecting time using an analog clock face. The time panel component is supported on desktop, tablets, as well as iOS and Android devices. The component automatically jumps to the minutes field after selecting an hour value. There are multiple configuration options to set the alignment and mode of the analog clock. When the vertical configuration is set to auto, time header is set based on the orientation of the device.
Time Field is a new modern component that provides time input field with automatic time validation. The time field recognizes and uses JavaScript Date objects to validate input. The component supports multiple time formats and the default depends on the chosen locale. Time field can use Time picker to provide easy way to select time.
Communicating with users in a language that they understand and with conventions that they're used to is vital. Ext JS Modern now includes localization support that helps developers easily localize applications for many non-English languages. Ext JS 6.6 adds support for German, Italian, French, Spanish and Portuguese languages. The locale package contains all the bundled locale files in the override folder. The locale overrides tell Ext JS to replace the default English values of certain components for date formats, month, day names etc.
Here’s an example of application’s app.json to support French language
"requires": [
…,
"ext-locale"
],
"locale":"fr",
For an npm created application, you also need to import ext-modern-locale
package.
npm i --save @sencha/ext-modern-locale
Ext JS 6.6 provides a new beautiful graphite theme that makes your accessible apps visually stunning. The graphite theme is an accessible high-contrast theme and is designed to make applications that are easier to view for visually impaired users. The graphite theme inherits from the Triton theme and so it is a flat, minimalist, imageless theme. The graphite theme can be used out of the box for your applications or can be extended to create a customized look and feel. The colors, fonts and paddings of the Graphite theme are designed to ensure WCAG 2.0 accessibility guidelines.
For many web applications, it is useful to see how changing themes transform look and feel of applications quickly. Ext JS material theme supports CSS variables, and provides APIs to get and set colors. So it is now possible for you to make a color picker with only verified material colors. You can live update look and feel of your application without need of external server or Sencha Cmd.
The material theme provides APIs to get colors that give you nested objects with all the material colors and weights.
Ext.theme.Material.getColors()
The material theme provides you APIs to set colors, that can be used as below:
Ext.theme.Material.setColors({
'darkMode': darkMode,
'base': base || me._materialBaseColor,
'accent': accent || me._materialAccentColor
});
To illustrate this powerful capability, we have added a color palette in Modern Kitchensink that will allow you to quickly change the kitchensink look and feel to dark mode and apply different base/accent color combinations.
Ext JS provides Routing which is the ability to track the application state through the use of the browser history stack. Routing also allows for deep linking into the application which allows a direct link to a specific part of your application. This is very useful for users so they can bookmark your app and even send links to someone else to gain direct access to that part of the application.
Ext JS 6.6 provides a number of advanced routing features that include route "exit" that runs when navigating away, supporting named parameters with optional type specifiers in routes, and routes that disconnect after first use. Here’s an example of a wildcard route.
routes : {
'*' : 'onRoute',
'foo' : 'onFoo'
}
routes : {
'*' : {
before : 'onBeforeRoute',
exit : 'onExit',
action : 'onRoute'
},
'foo' : 'onFoo'
}
Gauges components are enhanced for both modern and classic applications and now support ability to enhance gauges with various needle types. The common needle types uses in applications are wedge, diamond, spike, arrow.
Gauge components can also provide custom needles.