Guide applies to: modern
Getting started with Ext JS Enterprise Components using npm
This guide covers adding one of the Ext JS add-on components to your application using npm.
Add-on Components | Config Name <addon-package> | npm Package Name | Description |
---|---|---|---|
Standard Add-on Components | |||
AMF | amf | @sencha/ext-amf | AMF Direct support |
Charts | charts | @sencha/ext-charts | Sencha charts and visualizations |
Core | core | @sencha/ext-core | Sencha Core |
Font Awesome | font-awesome | @sencha/ext-font-awesome | Package wrapper for Font Awesome |
Font-ext | font-ext | @sencha/ext-font-ext | Extra font icons |
Font-ios | font-ios | @sencha/ext-font-ios | iOS font icons |
Font-pictos | font-pictos | @sencha/ext-font-pictos | Package wrapper for Pictos Web Font |
@sencha/ext-google | Google APIs | ||
Soap | soap | @sencha/ext-soap | SOAP Data Support |
UX | ux | @sencha/ext-ux | User extensions. |
Enterprise Edition Add-on Components | |||
Calendar | calendar | @sencha/ext-calendar | Event management. |
Exporter | exporter | @sencha/ext-exporter | Data export tool. |
D3 Adapter | d3 | @sencha/ext-d3 | Data visualization. |
Pivot Grid | pivot | @sencha/ext-pivot | Data dimensions visualization. |
Pivot D3 | pivot-d3 | @sencha/ext-pivot-d3 | D3 adapter for the pivot grid. |
Pivote Locale | pivot-locale | @sencha/ext-pivot-locale | Data analytics. |
Froala Editor | froala-editor | @sencha/ext-froala-editor | WYSIWYG HTML Editor |
Requirements
Add the Add-on Component to your Project
Step 1: Install the Add-on npm Dependency
This will add it to the add-on dependency in the package.json.
Example:
npm install --save @sencha/ext-<addon-package>
Specific Example:
npm install --save @sencha/ext-calendar
Step 2: Declare the Package in app.json
In the project’s app.json requires
property, declare the new package dependency calendar
or whatever the package config name is.
Example app.json
:
"requires": [
"font-awesome",
// Declare the add-on Component package here
"calendar"
],
Step 3: Add the Add-on Component to a View
In this step, add the enterprise component to one of the applications views. In this example, the calendar
package is added to the Main.js
view.
Example:
{
title: 'Home',
iconCls: 'x-fa fa-home',
layout: 'fit',
items: [{
xtype: 'calendar'
}]
}
Step 4: Try it out
Start up your your web server and reload the web page. Verify the new component renders.
What’s Next
Now you’re ready to move to the next stage of using all the Ext JS Components.
Reference
For Workspaces: Declare Packages in the Workspace
In some projects with a workspace configuration, configure the packages.
In workspace.json append the dir variable under packages with new add-on package location.
${framework.dir}/../ext-<addon-package>
Example before:
"packages": {
"dir": "${workspace.dir}/packages”,
Example after:
"packages": {
"dir": "${workspace.dir}/packages,${framework.dir}/../ext-calendar",