I have an issue using the properties panel in an Angular project.
It seems like the preact library throws errors:
ERROR TypeError: n.__ is not a function
at k (hooks.module.js:1:2971)
at Array.forEach (<anonymous>)
at b (hooks.module.js:1:1804)
at timer (zone.js:2405:41)
at _ZoneDelegate.invokeTask (zone.js:406:31)
at Object.onInvokeTask (core.mjs:26278:33)
at _ZoneDelegate.invokeTask (zone.js:405:60)
at Zone.runTask (zone.js:178:47)
at invokeTask (zone.js:487:34)
at ZoneTask.invoke (zone.js:476:48)
preact__WEBPACK_IMPORTED_MODULE_0__.options.diffed @ hooks.module.js:1
preact__WEBPACK_IMPORTED_MODULE_0__.options.diffed @ hooks.module.js:1
j @ preact.module.js:1
core.mjs:7643 ERROR TypeError: n.__ is not a function
at k (hooks.module.js:1:2971)
at Array.forEach (<anonymous>)
at b (hooks.module.js:1:1804)
at timer (zone.js:2405:41)
at _ZoneDelegate.invokeTask (zone.js:406:31)
at Object.onInvokeTask (core.mjs:26278:33)
at _ZoneDelegate.invokeTask (zone.js:405:60)
at Zone.runTask (zone.js:178:47)
at invokeTask (zone.js:487:34)
at ZoneTask.invoke (zone.js:476:48)
Sometimes it works, if I randomly rebuild the Angular project. Maybe Webpack is not able to build the project correctly?
I used the following lines to import the Form-JS libary:
package.json:
...
"@bpmn-io/form-js": "^0.11.0",
...
Angular Component:
constructor() {
this.formEditor = new FormEditor({});
}
ngAfterContentInit(): void {
// attach Form-JS instance to DOM element
this.formEditor.attachTo(this.elFormeditor.nativeElement);
this.formEditor.importSchema(this.schema);
}