Shared erxes business UI modules: contacts, products, tags, segments, team
members, permissions, automations, notifications, properties and the record
widgets built on them. Unlike @erxes/ui, these
components query the erxes core API, so use the version pinned by the erxes
release you deploy against.
erxes code imports this package as ui-modules and its design-system peer as
erxes-ui, so install both under those names with npm aliases:
pnpm add ui-modules@npm:@erxes/ui-modules@^1.0.0 erxes-ui@npm:@erxes/ui@^1.0.0
# npm install ui-modules@npm:@erxes/ui-modules@^1.0.0 erxes-ui@npm:@erxes/ui@^1.0.0The package is versioned on its own (semver). erxes pins the exact version it is
built with in its package.json; use the same version as your erxes deployment.
Other peer dependencies: react and react-dom 18, react-router and
react-router-dom 7, @apollo/client 3, graphql 16, jotai 2 and
react-i18next 15.
erxes core-ui provides ui-modules to plugin remotes as a Module Federation
singleton, so a remote declares it as shared and never bundles its own copy:
shared: {
'ui-modules': { singleton: true, import: false, requiredVersion: false },
}Import from the package root (import { SelectCustomer } from 'ui-modules').
Deep imports such as ui-modules/modules/contacts don't match the shared key
and would bundle a second, private copy.
pnpm install
pnpm build # dist/: the publishable package (ES modules + declarations)
pnpm lint
pnpm typecheck # lists the type errors the source currently carriesTo try local changes in erxes, point the dependency at your checkout
("ui-modules": "link:../ui-modules/dist"), run pnpm install there, and
rebuild here after each change. The same works for a local @erxes/ui checkout
here.
- Bump
versioninpackage.jsonfollowing semver (update theerxes-uidev dependency and peer range too when it needs a newer@erxes/ui) and merge tomain. - Push a matching tag, e.g.
git tag v1.0.1 && git push origin v1.0.1.
The Release workflow checks the tag against package.json and publishes to npm
with provenance through npm trusted publishing: the package's npm settings trust
this repository's release.yml, so no token is stored. Versions with a
prerelease suffix (1.1.0-beta.1) are published under the next dist-tag.
This package was developed in the erxes monorepo at frontend/libs/ui-modules;
its history was carried over. References like (erxes/erxes#1234) in older
commit messages point to pull requests in
erxes/erxes.
AGPL-3.0. See LICENSE.md.