Support Forum
Probably you omitted extension, import should be (this is how module name is declared in umd.d.ts).
I tried that locally and found that when I use umd import I get several errors.
1. bad typings
you can add //@ts-ignore above each line which prevents ts from building (or extend gantt.umd.d.ts with missing types). I opened ticket to fix bad typings: https://app.assembla.com/spaces/bryntum ... te/details
2. runtime TypeError.
It is caused by local lib/Task class, which is es6 class, being instantiated incorrectly by umd bundle. I opened ticket about that also: https://app.assembla.com/spaces/bryntum ... ar/details
For now you can either figure angular config yourself, or get rid of that class
Sorry for inconvenience.
import {...} from 'bryntum-gantt/gantt.umd.js'
I tried that locally and found that when I use umd import I get several errors.
1. bad typings
you can add //@ts-ignore above each line which prevents ts from building (or extend gantt.umd.d.ts with missing types). I opened ticket to fix bad typings: https://app.assembla.com/spaces/bryntum ... te/details
2. runtime TypeError.
It is caused by local lib/Task class, which is es6 class, being instantiated incorrectly by umd bundle. I opened ticket about that also: https://app.assembla.com/spaces/bryntum ... ar/details
For now you can either figure angular config yourself, or get rid of that class
Sorry for inconvenience.
Hi
I tried all the things now able to get something
But Below are problems
1. https://drive.google.com/file/d/19Lnv1H ... sp=sharing
Css and other things are missing in design
2. While clicking on create task below error is coming
3. I have done as you told
But now
Above lines of code gives error and EffectResolutionResult is not present
Thanks
I tried all the things now able to get something
But Below are problems
1. https://drive.google.com/file/d/19Lnv1H ... sp=sharing
Css and other things are missing in design
2. While clicking on create task below error is coming
webpack-internal:///./node_modules/@angular/core/esm5/core.js:1665 ERROR Error: Uncaught (in promise): TypeError: Class constructor Task cannot be invoked without 'new'
TypeError: Class constructor Task cannot be invoked without 'new'
at new _0x745148 (webpack-internal:///../build/gantt.umd.js:13)
at _0x248a0c.createRecord (webpack-internal:///../build/gantt.umd.js:13)
at _0xae5e1.ingestChildren (webpack-internal:///../build/gantt.umd.js:13)
at _0xae5e1.insertChild (webpack-internal:///../build/gantt.umd.js:13)
at _0xae5e1.appendChild (webpack-internal:///../build/gantt.umd.js:13)
at _0x1db973.eval (webpack-internal:///./src/app/project-schedule/components/project-schedule-v2/ganttToolbar.ts:257)
at step (webpack-internal:///./src/app/project-schedule/components/project-schedule-v2/ganttToolbar.ts:32)
at Object.eval [as next] (webpack-internal:///./src/app/project-schedule/components/project-schedule-v2/ganttToolbar.ts:13)
at eval (webpack-internal:///./src/app/project-schedule/components/project-schedule-v2/ganttToolbar.ts:7)
at new ZoneAwarePromise (webpack-internal:///./node_modules/zone.js/dist/zone.js:891)
at resolvePromise (webpack-internal:///./node_modules/zone.js/dist/zone.js:814)
at new ZoneAwarePromise (webpack-internal:///./node_modules/zone.js/dist/zone.js:894)
at __awaiter (webpack-internal:///./src/app/project-schedule/components/project-schedule-v2/ganttToolbar.ts:3)
at _0x1db973.onAddTaskClick (webpack-internal:///./src/app/project-schedule/components/project-schedule-v2/ganttToolbar.ts:252)
at _0xd7452a.callback (webpack-internal:///../build/gantt.umd.js:12)
at _0xd7452a.trigger (webpack-internal:///../build/gantt.umd.js:14)
at _0xd7452a.onInternalClick (webpack-internal:///../build/gantt.umd.js:14)
at HTMLButtonElement.handler (webpack-internal:///../build/gantt.umd.js:13)
at ZoneDelegate.invokeTask (webpack-internal:///./node_modules/zone.js/dist/zone.js:421)
at Object.onInvokeTask (webpack-internal:///./node_modules/@angular/core/esm5/core.js:4967)
defaultErrorLogger @ webpack-internal:///./node_modules/@angular/core/esm5/core.js:1665
ErrorHandler.handleError @ webpack-internal:///./node_modules/@angular/core/esm5/core.js:1726
next @ webpack-internal:///./node_modules/@angular/core/esm5/core.js:5724
schedulerFn @ webpack-internal:///./node_modules/@angular/core/esm5/core.js:4558
SafeSubscriber.__tryOrUnsub @ webpack-internal:///./node_modules/rxjs/_esm5/Subscriber.js:248
SafeSubscriber.next @ webpack-internal:///./node_modules/rxjs/_esm5/Subscriber.js:195
Subscriber._next @ webpack-internal:///./node_modules/rxjs/_esm5/Subscriber.js:136
Subscriber.next @ webpack-internal:///./node_modules/rxjs/_esm5/Subscriber.js:100
Subject.next @ webpack-internal:///./node_modules/rxjs/_esm5/Subject.js:66
EventEmitter.emit @ webpack-internal:///./node_modules/@angular/core/esm5/core.js:4538
(anonymous) @ webpack-internal:///./node_modules/@angular/core/esm5/core.js:4998
ZoneDelegate.invoke @ webpack-internal:///./node_modules/zone.js/dist/zone.js:388
Zone.run @ webpack-internal:///./node_modules/zone.js/dist/zone.js:138
NgZone.runOutsideAngular @ webpack-internal:///./node_modules/@angular/core/esm5/core.js:4924
onHandleError @ webpack-internal:///./node_modules/@angular/core/esm5/core.js:4998
ZoneDelegate.handleError @ webpack-internal:///./node_modules/zone.js/dist/zone.js:392
Zone.runGuarded @ webpack-internal:///./node_modules/zone.js/dist/zone.js:154
_loop_1 @ webpack-internal:///./node_modules/zone.js/dist/zone.js:677
api.microtaskDrainDone @ webpack-internal:///./node_modules/zone.js/dist/zone.js:686
drainMicroTaskQueue @ webpack-internal:///./node_modules/zone.js/dist/zone.js:602
ZoneTask.invokeTask @ webpack-internal:///./node_modules/zone.js/dist/zone.js:500
invokeTask @ webpack-internal:///./node_modules/zone.js/dist/zone.js:1540
globalZoneAwareCallback @ webpack-internal:///./node_modules/zone.js/dist/zone.js:1566
import {
Gantt,
Panel,
ProjectModel,
Toast,
WidgetHelper,
DateHelper
} from 'bryntum-gantt/gantt.umd.js';
// console.time("load data");
// project.load().then(() => {
// const stm = gantt.project.stm;
// // let's track scheduling conflicts happened
// project.on('schedulingconflict', context => {
// // show notification to user
// Toast.show('Scheduling conflict has happened ..recent changes were reverted');
// // as the conflict resolution approach let's simply cancel the changes
// //context.continueWithResolutionResult(EffectResolutionResult.Cancel);
// });
// stm.enable();
// stm.autoRecord = true;
// });
Thanks
Make sure you import css into your app, normally we do it in the src/styles.scss:rahulranjan wrote: ↑Wed May 01, 2019 8:13 pm 1. https://drive.google.com/file/d/19Lnv1H ... sp=sharing
Css and other things are missing in design
@import "bryntum-gantt/gantt.stockholm.css";
It still looks like you are using lib/Task class somewhere in your app. Remove that class and all usages/imports, it worked locally.rahulranjan wrote: ↑Wed May 01, 2019 8:13 pm 2. While clicking on create task below error is comingwebpack-internal:///./node_modules/@angular/core/esm5/core.js:1665 ERROR Error: Uncaught (in promise): TypeError: Class constructor Task cannot be invoked without 'new' TypeError: Class constructor Task cannot be invoked without 'new' at new _0x745148 (webpack-internal:///../build/gantt.umd.js:13) at _0x248a0c.createRecord (webpack-internal:///../build/gantt.umd.js:13) at _0xae5e1.ingestChildren (webpack-internal:///../build/gantt.umd.js:13) at _0xae5e1.insertChild (webpack-internal:///../build/gantt.umd.js:13) at _0xae5e1.appendChild (webpack-internal:///../build/gantt.umd.js:13) at _0x1db973.eval (webpack-internal:///./src/app/project-schedule/components/project-schedule-v2/ganttToolbar.ts:257) at step (webpack-internal:///./src/app/project-schedule/components/project-schedule-v2/ganttToolbar.ts:32) at Object.eval [as next] (webpack-internal:///./src/app/project-schedule/components/project-schedule-v2/ganttToolbar.ts:13) at eval (webpack-internal:///./src/app/project-schedule/components/project-schedule-v2/ganttToolbar.ts:7) at new ZoneAwarePromise (webpack-internal:///./node_modules/zone.js/dist/zone.js:891) at resolvePromise (webpack-internal:///./node_modules/zone.js/dist/zone.js:814) at new ZoneAwarePromise (webpack-internal:///./node_modules/zone.js/dist/zone.js:894) at __awaiter (webpack-internal:///./src/app/project-schedule/components/project-schedule-v2/ganttToolbar.ts:3) at _0x1db973.onAddTaskClick (webpack-internal:///./src/app/project-schedule/components/project-schedule-v2/ganttToolbar.ts:252) at _0xd7452a.callback (webpack-internal:///../build/gantt.umd.js:12) at _0xd7452a.trigger (webpack-internal:///../build/gantt.umd.js:14) at _0xd7452a.onInternalClick (webpack-internal:///../build/gantt.umd.js:14) at HTMLButtonElement.handler (webpack-internal:///../build/gantt.umd.js:13) at ZoneDelegate.invokeTask (webpack-internal:///./node_modules/zone.js/dist/zone.js:421) at Object.onInvokeTask (webpack-internal:///./node_modules/@angular/core/esm5/core.js:4967) defaultErrorLogger @ webpack-internal:///./node_modules/@angular/core/esm5/core.js:1665 ErrorHandler.handleError @ webpack-internal:///./node_modules/@angular/core/esm5/core.js:1726 next @ webpack-internal:///./node_modules/@angular/core/esm5/core.js:5724 schedulerFn @ webpack-internal:///./node_modules/@angular/core/esm5/core.js:4558 SafeSubscriber.__tryOrUnsub @ webpack-internal:///./node_modules/rxjs/_esm5/Subscriber.js:248 SafeSubscriber.next @ webpack-internal:///./node_modules/rxjs/_esm5/Subscriber.js:195 Subscriber._next @ webpack-internal:///./node_modules/rxjs/_esm5/Subscriber.js:136 Subscriber.next @ webpack-internal:///./node_modules/rxjs/_esm5/Subscriber.js:100 Subject.next @ webpack-internal:///./node_modules/rxjs/_esm5/Subject.js:66 EventEmitter.emit @ webpack-internal:///./node_modules/@angular/core/esm5/core.js:4538 (anonymous) @ webpack-internal:///./node_modules/@angular/core/esm5/core.js:4998 ZoneDelegate.invoke @ webpack-internal:///./node_modules/zone.js/dist/zone.js:388 Zone.run @ webpack-internal:///./node_modules/zone.js/dist/zone.js:138 NgZone.runOutsideAngular @ webpack-internal:///./node_modules/@angular/core/esm5/core.js:4924 onHandleError @ webpack-internal:///./node_modules/@angular/core/esm5/core.js:4998 ZoneDelegate.handleError @ webpack-internal:///./node_modules/zone.js/dist/zone.js:392 Zone.runGuarded @ webpack-internal:///./node_modules/zone.js/dist/zone.js:154 _loop_1 @ webpack-internal:///./node_modules/zone.js/dist/zone.js:677 api.microtaskDrainDone @ webpack-internal:///./node_modules/zone.js/dist/zone.js:686 drainMicroTaskQueue @ webpack-internal:///./node_modules/zone.js/dist/zone.js:602 ZoneTask.invokeTask @ webpack-internal:///./node_modules/zone.js/dist/zone.js:500 invokeTask @ webpack-internal:///./node_modules/zone.js/dist/zone.js:1540 globalZoneAwareCallback @ webpack-internal:///./node_modules/zone.js/dist/zone.js:1566
What kind of error gives this code? One you pasted in #2? Please see solution above. Try steps I described on clean angular application which you can find in distribution.rahulranjan wrote: ↑Wed May 01, 2019 8:13 pm 3. I have done as you toldBut nowimport { Gantt, Panel, ProjectModel, Toast, WidgetHelper, DateHelper } from 'bryntum-gantt/gantt.umd.js';
Above lines of code gives error and EffectResolutionResult is not present// console.time("load data"); // project.load().then(() => { // const stm = gantt.project.stm; // // let's track scheduling conflicts happened // project.on('schedulingconflict', context => { // // show notification to user // Toast.show('Scheduling conflict has happened ..recent changes were reverted'); // // as the conflict resolution approach let's simply cancel the changes // //context.continueWithResolutionResult(EffectResolutionResult.Cancel); // }); // stm.enable(); // stm.autoRecord = true; // });
Thanks
Hi
I am getting some errors
I am getting some errors
ERROR in node_modules/bryntum-gantt/gantt.umd.d.ts(1363,18): error TS2415: Class 'DependencyStore' incorrectly extends base class 'SchedulerDependencyStore'.
Types of property 'eventStore' are incompatible.
Type 'TaskStore' is not assignable to type 'EventStore'.
Property 'append' is missing in type 'TaskStore'.
node_modules/bryntum-gantt/gantt.umd.d.ts(1397,18): error TS2415: Class 'ResourceStore' incorrectly extends base class 'SchedulerResourceStore'.
Types of property 'eventStore' are incompatible.
Type 'TaskStore' is not assignable to type 'EventStore'.
node_modules/bryntum-gantt/gantt.umd.d.ts(1587,18): error TS2415: Class 'AssignmentModel' incorrectly extends base class 'SchedulerAssignmentModel'.
Types of property 'event' are incompatible.
Type 'TaskModel' is not assignable to type 'EventModel'.
Property 'eventColor' is missing in type 'TaskModel'.
node_modules/bryntum-gantt/gantt.umd.d.ts(1709,18): error TS2415: Class 'ResourceModel' incorrectly extends base class 'SchedulerResourceModel'.
Types of property 'eventStore' are incompatible.
Type 'TaskStore' is not assignable to type 'EventStore'.