iss-ctrl
v0.0.22
Published
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.1.0.
Downloads
1,452
Readme
Iss
This library was generated with Angular CLI version 18.1.0.
Code scaffolding
Run ng generate component component-name --project iss to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project iss.
Note: Don't forget to add
--project issor else it will be added to the default project in yourangular.jsonfile.
Entry points
The package is split so an app downloads only what it renders.
| Entry point | Contents |
| --- | --- |
| iss-ctrl | The form engine: Outlet, FormEngine, FieldBase, the COMPONENTS/VIEWERS/SERVICES/VALIDATORS indexes, validators and pipes. |
| iss-ctrl/tokens | HOST, UI_LANGUAGE, USER_SEARCH_API and the ATTACHMENT_* tokens. Import from here in an app's root providers so the engine stays out of its initial bundle. |
| iss-ctrl/base | ControlBase, ViewerBase, Hints, IssDateAdapter, the Hijri utilities — what a control is built from. |
| iss-ctrl/<control> | One per control: input, textarea, select, checkbox, radio, chips, toggle-button, slide-toggle, date-picker, time-picker, datetime-picker, date-range-picker, file-picker, plate, mobile. |
Controls are deliberately not re-exported from iss-ctrl. A static re-export makes the
bundler inline the control — and then every control — into whatever imports the engine, which
is what the split exists to prevent. Import a control from its own entry point:
import { Outlet } from "iss-ctrl";
import { HOST } from "iss-ctrl/tokens";
import { MobileControl } from "iss-ctrl/mobile";Fields and viewers are internal: the outlet resolves them through the indexes with a dynamic
import, so each one is its own lazy chunk. iss-ctrl/mobile matters most — it is the only
part of the library that pulls in libphonenumber-js.
Adding a control
Add projects/iss/<name>/ with an ng-package.json and src/public-api.ts, put the control
and its support files there, add the path to tsconfig.json, and keep the field and viewer in
projects/iss/src/components/controls/<name>/. A control may import from iss-ctrl/base,
iss-ctrl/tokens and other control entry points, but never from iss-ctrl — that closes a
dependency cycle and ng-packagr will reject the build.
Build
Run ng build iss to build the project. The build artifacts will be stored in the dist/ directory.
Publishing
After building your library with ng build iss, go to the dist folder cd dist/iss and run npm publish.
Running unit tests
Run ng test iss to execute the unit tests via Karma.
Further help
To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.
