Open adriatic opened 7 years ago
This is the result of gulp watch
on the app just checked in
[16:49:50] Finished 'build-html' after 206 ms
src\components\index.ts(1,21): error TS2307: Cannot find module 'https://aurelia-ui-toolkits.github.io/aurelia-kendoui-samples/samples.json!'.
[16:49:52] gulp-notify: [Error running Gulp] Error: src\components\index.ts(1,21): error TS2307: Cannot find module 'https://aurelia-ui-toolkits.github.io/aurelia-kendoui-samples/samples.json!'.
src\components\index.ts(20,11): error TS2345: Argument of type '{ name: any; route: any; moduleId: string; title: any; sample: any; category: any; }' is not assignable to parameter of type '{ name: string; route: string; redirect: string; }'.
Object literal may only specify known properties, and 'moduleId' does not exist in type '{ name: string; route: string; redirect: string; }'.
[16:49:52] gulp-notify: [Error running Gulp] Error: src\components\index.ts(20,11): error TS2345: Argument of type '{ name: any; route: any; moduleId: string; title: any; sample: any; category: any; }' is not assignable to parameter of type '{ name: string; route: string; redirect: string; }'.
Object literal may only specify known properties, and 'moduleId' does not exist in type '{ name: string; route: string; redirect: string; }'.
src\components\index.ts(37,10): error TS2339: Property 'router' does not exist on type 'Index'.
[16:49:52] gulp-notify: [Error running Gulp] Error: src\components\index.ts(37,10): error TS2339: Property 'router' does not exist on type 'Index'.
src\components\menu.ts(18,22): error TS2304: Cannot find name 'samples'.
[16:49:52] gulp-notify: [Error running Gulp] Error: src\components\menu.ts(18,22): error TS2304: Cannot find name 'samples'.
src\components\menu.ts(48,10): error TS2339: Property 'options' does not exist on type 'Menu'.
[16:49:52] gulp-notify: [Error running Gulp] Error: src\components\menu.ts(48,10): error TS2339: Property 'options' does not exist on type 'Menu'.
src\components\menu.ts(50,14): error TS2339: Property 'toggle' does not exist on type 'Menu'.
[16:49:52] gulp-notify: [Error running Gulp] Error: src\components\menu.ts(50,14): error TS2339: Property 'toggle' does not exist on type 'Menu'.
src\components\sample-runner.ts(6,26): error TS2307: Cannot find module 'aurelia-http-client'.
[16:49:52] gulp-notify: [Error running Gulp] Error: src\components\sample-runner.ts(6,26): error TS2307: Cannot find module 'aurelia-http-client'.
[16:49:52] TypeScript: 7 semantic errors
Render the subset of the demo-kendo UI, indicated below
Components
, Image 1
Why this does not work in Typescript app and this works in Javascript app?
Because of failing to understand 1 above, I did not do any needed "massage" on that index.ts file. I would like to get this whole UI rendered by processing the information from 'https://aurelia-ui-toolkits.github.io/aurelia-kendoui-samples/samples.json!';
- and then I will modify that to fetch this equivalent information from here
@JeroenVinke - can you do this for me?
After I merged Jeroen's PR - I see this
Image 1
indicating that Jeroen did not have the time to deal with all "pledges" I made, which would result with this screenshot instead (note that I deleted some of the top level menu entries, leaving just four). This UI will perfectly support the navigation to a specific aurelia component and its specific sample with just three (most often just two) clicks: select the component from the (multilevel) toolbar on the top and the sample from the sidebar which is defined by the component selection.
Image 2
This task is further defined here and should be conducted at that place.
I guess you know that already but there are no kendo styles applied to <nav-bar>
.
Is it possible that the bridge is not initialized successfully? No errors, though.
I think that your diagnosis is correct (you can always check the needed behavior here, by running the demo-kendo app.
Menu is implemented as an Aurelia custom element, which is "consumed" by nav-bar custom element (they are linked here. Style is initially set to KendoUI default theme here and style changes are handled by the theme-manager.
My problems (wich made me ask for Jeroen's help) were in the area of importing files and modules in Typescript, so rather than trying all possible combinations, I hoped he will make the theme switching functional. As it is now, he just fixed my own syntax errors, without fixing my logical errors and adding the missing code.
That one was easy. 😄
app.html
only required nav-bar.html
(as opposed to nav-bar
) which led to the template loading but not its view-model. It's the view-model where kendo is initialized.
I did some more fixes, samples
now load correctly but I had to "fix" samples.categories
by declaring samples
as any
. No idea how to do that in the .d.ts
file.
Also the layout is broken now. I'll take that on later.
I've fixed the layout but I'm a little unsure because the original bridge doesn't have the problem.
I also noticed that sample-runner
is empty and provided the code necessary to build the sidebar on the left.
In theory this is very close to the UI posted in @adriatic's comment above but I'd like to do some further polish. Also currently, the routes don't behave correctly, f.i. the selected menu item stays active when changing routes.
😃
👏
I started with the this Skeleton to ensure that I am using the most current Aurelia components and then stripped it of all that I do not need and added the few initial "parts"" of the demo-kendo - as you can see in the repo.
Issue 1
jspm install
results with that darned message that I was never able to resolveIssue 2
Running
gulp watch
is a lot more messy as I really did not do anything with the Javascript files other then changing their extension from.js
to.ts
. So, I am getting these error messagesWould you please fix my code and explain to me what all I missed? I was clearly spoiled by the MOnterey experience, where I stepped into a syntactically correct set of Typescript files as I failed to observe what all you did there.
As an example of what confuses me is the
maint.ts
file which cannot resolve these importsas well as all other error messages shown above 👎