Premium support for our pure JavaScript UI components


Post by gismya »

Hello!

I've found some more issues with the published types. The EventModel (And SchedulerEventModel) is missing some properties. The properties and methods added through the following two classes are missing:

AbstractPartOfProjectGenericMixin - e.g $project, getResourceStore()

Model - e.g OriginalData.

Probably other mixin classes on the way is missing, but these are the ones I've needed at the moment.

Kind regards,
Lars

EDIT: Further testing shows that EventModel has a project property, but SchedulerEventModel does not. If that is not an error I don't quite understand the conceptual differences between them. I was under the impression that a SchedulerEventModel was a slightly broader version of an EventModel


Post by mats »

SchedulerEventModel is not public and if you're using Scheduler Pro you should only use EventModel.

originalData is also not public, you should only rely on what's public in the docs. What's your use case for needing originalData?


Post by gismya »

Oh. I don't need originalData, there are other ways to get around the issue and fetch the needed data. Are there any indications in your types and in the objects what properties and methods are considered public or not? I'm usually assuming that anything that's not prefixed is public (So was kind of assuming that $project would be internal).

If SchedulerEventModel is not public, why are there so many references to it as both property type and return type in the types?

In that case, there are issues with the segments-props on the EventModel and the EventModelConfig. Either the EventSegmentModel needs to have its required and optional attributes adjusted, or it needs to be referenced with Partial<>. But that might be best for a separate issue.


Post by alex.l »

Are there any indications in your types and in the objects what properties and methods are considered public or not?

It's public if it's documented as public.

If SchedulerEventModel is not public, why are there so many references to it as both property type and return type in the types?

I think Mats was not fully clear in his message. SchedulerEventModel is just for Scheduler and SchedulerPro. You can use it, but together with the Scheduler, it won't be working for Pro.

All the best,
Alex


Post by gismya »

I had missed the distinction that the SchedulerEventModel was for Scheduler and not Scheduler Pro. Then that apply to all of the types prefixed with "Scheduler"?

Apologies for the confusion about which properties are public. I'll make sure to note that if I find paths to data that are not in the schema, there probably are other ways there.


Post by mats »

I had missed the distinction that the SchedulerEventModel was for Scheduler and not Scheduler Pro. Then that apply to all of the types prefixed with "Scheduler"?

Generally yes, although some class names like SchedulerBase are public. You can see which classes are public in our docs too.


Post Reply