@refactored-ts/aurelia-syncfusion-ej2-bridge
v1.0.0
Published
Aurelia 1 plugin wrapping Syncfusion EJ2 controls (not for Aurelia 2)
Maintainers
Readme
aurelia-syncfusion-ej-2-bridge
Syncfusion EJ2 controls for Aurelia 1 (aurelia-framework 1.x). It does not work with Aurelia 2.
This wrapper is not fully supported, use at your own risk
Supported controls
Every control also has a page in the dev app (see below). Properties and events are the Syncfusion model members, listed in src/controlBindings.ts.
Buttons: Button, CheckBox, Progress Button, Radio Button, Switch, Chip List, Fab, Speed Dial, Smart Paste Button, Drop Down Button, Split Button
Inputs: TextBox, Masked TextBox, Numeric TextBox, Slider, Uploader, Rich Text Editor, Color Picker, Text Area, Smart Text Area, Signature, Rating, Otp Input, Speech To Text
Dropdowns: AutoComplete, ComboBox, DropDownList, DropDownTree, MultiSelect, List Box, Mention, Multi Column Combo Box
Calendars: DatePicker, DateRangePicker, DateTimePicker, TimePicker, Schedule, Calendar, Recurrence Editor
Data: Grid, Pager, ListView, TreeView, File Manager, Timeline, Gantt, Kanban, Pivot View, Pivot Field List, Query Builder, Spreadsheet, Tree Grid
Layout: Accordion, Dashboard Layout, Sidebar, Splitter
Barcodes: Barcode Generator, QR Code Generator, Data Matrix Generator, PDF417 Generator
Editors: Block Editor, Form Builder, Form Renderer, In Place Editor, Rich Text Editor UI
Charts: Chart, Accumulation Chart, Stock Chart, Range Navigator, Bullet Chart, Smithchart, Sparkline, Chart3 D, Circular Chart3 D, Sankey, Heat Map
Gauges: Circular Gauge, Linear Gauge, Progress Bar
Diagrams: Diagram, Symbol Palette, Ruler, Overview
Documents: Document Editor, Document Editor Container, Image Editor, Pdf Viewer, Pdf Comparer
AI: AI Assist View, Chat UI, Inline AI Assist
Maps: Maps, Tree Map
Navigation: Toolbar, Context Menu, Menu, Tab, Breadcrumb, Carousel, App Bar, Stepper, Ribbon
Notifications: Toast, Message, Skeleton
Popups: Popup, Dialog, Tooltip
Loading only the controls you use
Every control is its own module and none of them depends on another, so an app only pays for the ones it loads. The plugin entry
registers nothing by itself: it loads no control, and ConfigBuilder refers to each one by module id.
Register the controls globally, naming only the ones you need:
aurelia.use.plugin(PLATFORM.moduleName('@refactored-ts/aurelia-syncfusion-ej2-bridge'), builder => builder.ej2Slider().ej2Grid());or declare them per view, which loads a control only when a view that uses it is opened:
import { viewResources } from 'aurelia-framework';
import { Ej2Slider } from '@refactored-ts/aurelia-syncfusion-ej2-bridge/dist/commonjs/widgets/slider/ej2-slider';
@viewResources(Ej2Slider)
export class SettingsPage { }builder.useAll() / useDefaults() still register every control, avoid them in production. A control brings in only its own
Syncfusion package (the slider needs @syncfusion/ej2-inputs, the grid @syncfusion/ej2-grids, and so on).
yarn check:isolation fails the build when the entry reaches a control or one control reaches another.
How the lazy modules end up in separate files depends on your bundler, the dev app does it with tools/gen-bundles.js
(one bundle per control and per Syncfusion package).
Ej2UploaderDataAdapter is not exported from the entry (that would load the uploader), import it from .../widgets/uploader/ej2-uploader.
Releasing
Releases are published by .github/workflows/publish.yml with npm trusted publishing (OIDC), there is no npm token to store.
Bump version in package.json, merge to master, then publish a GitHub Release tagged v<version>. The workflow verifies
(bindings, tag, build, isolation, a clean-install import check), then a maintainer approves the npm-publish environment and it publishes.
Run the workflow by hand with "dry run" checked to verify without publishing.
One-time setup (needs an npm login with 2FA, as an owner of the @refactored-ts scope):
- npm only lets you trust a package that already exists, so publish a pre-release from your machine, the real
1.0.0then goes out through the workflow with provenance. Thenexttag keeps it from becominglatest, and provenance only works in CI, hence the flag:npm pkg set version=1.0.0-pre.0 yarn build && npm publish --access public --tag next --provenance=false git checkout package.json - Trust this repository and workflow (npm >= 11.15):
npm trust github @refactored-ts/aurelia-syncfusion-ej2-bridge --file publish.yml --repo RTS-MikeS/aurelia-syncfusion-ej2-bridge --env npm-publish --allow-publish - In the repository settings create the
npm-publishenvironment and add required reviewers.
If a version is already on npm the workflow skips publishing instead of failing.
Dev app and end-to-end tests
yarn start serves the dev app on http://localhost:8090. Each control has a page of feature samples
(dev-app/<control>/), registered once in dev-app/nav.ts, which drives both the router and the sidebar.
Samples are wrapped in <demo-section id="..."> and located in tests through data-testid.
Nothing is registered globally: a sample view-model declares its controls with @viewResources(...), and
tools/gen-bundles.js (run by yarn start and yarn e2e) splits the build so a page only loads the control it shows.
yarn e2e runs the Playwright suite in e2e/ (starts the dev server itself, yarn e2e:ui for the UI runner).
smoke.spec.tsvisits every registered control and fails on any console or page error.- One spec per control (
e2e/<control>.spec.ts) covering bindings, events, widget API and lifecycle (if.bind). - Add a control: register it in
nav.ts, build the demo sections, adde2e/<control>.spec.ts.
yarn check:bindings verifies every bindable name in src/controlBindings.ts exists on the Syncfusion model of its wrapper,
yarn sync:bindings adds members that Syncfusion introduced since (properties as one-way, EmitType members as events).
Keeping the wrappers in sync with Syncfusion
yarn check:bindingsvalidates every bindable name against the Syncfusion models,yarn sync:bindingsadds missing members.node tools/list-controls.jslists every control in the installed@syncfusion/ej2-*packages and whether it is wrapped.node tools/scaffold-wrappers.jsgenerates wrapper, bindings entry, ConfigBuilder registration, route and demo skeleton for controls that are not wrapped yet.yarn check:coveragereports bindable properties/events no demo binds. Each bound member is asserted ine2e/<control>.spec.ts.
