Our pure JavaScript Scheduler component


Post by imre.szecsodi »

Hi, I am a paid customer of the scheduler, and I have some concerns, about the product.

First of all, where is the download link for the Scheduler examples? I already went through most of the pages, and nothing. The only link is download free trial. Once again, I will NOT sign up to download anything, because as I said, I'm a paid customer. I would appreciate if you include a download link for the examples, somewhere in the page, where I don't need to sign up.

I'm integrating this into our product with React, and trying to get the Tree View work. We use Typescript, and when I check your code, on this page. https://bryntum.com/examples/examples-scheduler/drag-from-tree/ I downloaded the JS file, have the correct packages installed. When you change the file to Typescript it will report multiple errors. Mostly non-existent fields methods, wrong overrides (Something defined as variable, you override it as method) TS 4.6 is used.

React examples, I am looking at this. https://bryntum.com/examples/scheduler/frameworks/react/javascript/drag-from-grid/build/ This is what I want to replicate on my own, but there is no Source code available, which is very disappointing.

I would appropriate if you help me out.


Post by mats »

If you are a paid customer, someone on your end should have received a link to our customer zone: https://customerzone.bryntum.com/ and your email needs to be added to your license by your license owner/admin.

The customer zone is where our customers go to download ZIP archives of our releases and manage their license members. You can also use NPM, as described in this guide: https://bryntum.com/docs/scheduler/guide/Scheduler/npm-repository

Hope this helps!


Post by imre.szecsodi »

Thank you for the help. I found it in the customer zone, what I needed. But still I want to underline the problem, there is no clear indication that the examples are there. I used the NPM to install the packages, it is not obvious that the examples are there.

The Typescript issue still holds .


Post by alex.l »

Please check /examples folder in sources you just downloaded. All examples are there.
About TS problems, it's hard to say without the code.
TypeScript has different syntax, that's not clear what exactly was done with the code.
We need to see your application with the issue to help you here.

All the best,
Alex


Post by saki »

Regarding TypeScript: Renaming JavaScript file to *.ts does not automatically make it TypeScript. An effort must be made to add types required by TS to the code that was originally written as JS. To demonstrate it, I have rewritten our Scheduler drag-from-grid JavaScript example to TypeScript.

You can use a diff tool to find what is different. As you can see it is a lot of things added and modified to satisfy the requirements of TypeScript. The zip is attached.

Attachments
drag-from-grid.zip
(1.94 MiB) Downloaded 35 times

Post by imre.szecsodi »

Thank you Saki for the example code. And yes, I'm fully aware of this, that changing the file type does not magically make it work out of the box. And I thought expressed myself correctly, but this seems was incorrect assumption.

=> Mostly non-existent fields methods, this shows up in the example too

class UnplannedGrid extends Grid

constructor(config: Partial<GridConfig> & { eventStore: TaskStore}){
                                           ======================

This is a good example, when you work with a 3rd party library, and you have to think, is this a type error, or a tag-along as you did in the example.

=> Wrong overrides, something defined as variable, you override it as method

schedulerpro.d.ts

 export class DragHelper extends Base implements EventsClass {
        onDrag: Function

Example code from -> https://bryntum.com/examples/examples-scheduler/drag-from-tree/

onDrag({ event, context }) {
        const me = this;

While I would argue this is a correct usage, the Typescript compiler thinks otherwise.

Class 'DragHelper' defines instance member property 'onDrag', but extended class 'Drag' defines it as instance member function.

I can easily fix the second one, because I know what is the correct code, but the first is case is where you really need to think.

I thank everybody in this discussion, I think most of my concerns are sorted out by now.


Post by saki »

Hello Imre, yes, you are right. The demo is a port of the existing JS demo and has not been originally written with TS in mind. We need a true TS demo that would demonstrate also good TypeScript practices.

The ticket is here: https://github.com/bryntum/support/issues/4891


Post Reply