jimu-core package contains classes, types, properties, functions, interfaces, enumerations and third party functions which will be used for widget development. The package focuses on handling widget properties, dispatching message actions, assigning data sources, and other tasks that are used for widget development.
Most widgets will make use of the
Data component (a union of the
Data interface and the
Data interface). You will use the
Data to obtain the
use immutable object containing the data source used by the widget, which is set by the experience author on the settings page. You may also use the
Query query parameters which is sourced from the settings page and/or from within the widget against the data source.
A broad summary of the contents of the
jimu-core package are as follows:
- Initializes the app running environment including:
Appinterface which defines the properties not changed after the app is loaded.
- The redux store's state, which is contained within the
Stateinterface holding important properties about the experience relative to the widget, app, client, data source, map, theme, user locale, app location and portal.
- i18n internationalization, handled by translations strings within a
default.tsfile located in the
runtime/translationsdirectory and the
default.tsfile within the
setting/translationsdirectory. A common implementation makes use of the
defaultproperty is applied, sourced from the
- Manage user login sessions using the
Appinterface is the experience's configuration structure. It is stored in the redux store.
- Core interfaces such as
Messageare included. Based on these interfaces, the
jimu-corepackage provides predefined implementations, including a
Filter Data Recordsmessage action, an
Export to JSONdata action, a
Record Selection Changesmessage, and so forth.
- As explained above, the
Dataprovide access to the data source, while the
Source Component Props
Expressionprovide access to resolve the
Resolver Component Props
Resize, and other third-party libraries are re-exported by the
In summary, you will most likely use some part of the
jimu-core package for widget development.