Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

it does not support angular 13? #226

Closed
p3x-robot opened this issue Nov 5, 2021 · 22 comments
Closed

it does not support angular 13? #226

p3x-robot opened this issue Nov 5, 2021 · 22 comments

Comments

@p3x-robot
Copy link

No description provided.

@Sergiobop
Copy link

Sergiobop commented Nov 5, 2021

Looks like not, some errors which can help to support NG13:

Error: node_modules/@angular-material-components/datetime-picker/lib/datetime-picker.component.d.ts:12:20 Module '"@angular/material/core"' has no exported member 'CanColorCtor'.

Error: node_modules/@angular-material-components/datetime-picker/lib/datetime-picker.component.d.ts:34:22 Class 'NgxMatDatetimeContent<D>' incorrectly implements interface 'CanColor'. Type 'NgxMatDatetimeContent<D>' is missing the following properties from type 'CanColor': color, defaultColor

@h2qutc

@p3x-robot
Copy link
Author

i reverted to Angular 12, 13 is too new.

@p3x-robot
Copy link
Author

Give some time to upgrade the NG

@vpetrusevici
Copy link

I tried updating this library and building a PR, i spend 3 hours but I couldn't even do npm install.
This repo still uses angular v7, it can be difficult to update to v13.

@p3x-robot
Copy link
Author

at least works on ng v12

@p3x-robot
Copy link
Author

if the developer will not want to update, i will copy the code from https://github.com/h2qutc/angular-material-components/tree/master/projects and update myself inline...

@p3x-robot
Copy link
Author

cant be too much hassle.

@h2qutc
Copy link
Owner

h2qutc commented Nov 6, 2021

Hi all, I will try to release a version supporting Angular 13 within 2-3 days

@p3x-robot
Copy link
Author

no rush, still on ng v12, ng v13 is very early :) happy relax mood weekend

@p3x-robot
Copy link
Author

p3x-robot commented Nov 6, 2021

Hi all, I will try to release a version supporting Angular 13 within 2-3 days

thanks for your support

@DSigmund
Copy link

Hi all, I will try to release a version supporting Angular 13 within 2-3 days

Many Thanks, upgraded to early :-)

@hoberlaender
Copy link

Hello h2qutc,
can you tell me, when Version supporting Angular 13 is available?
I want to update my projects, otherwise I must implement my own solition but I don't like to do that.
Kind regards, Heiko

@CxdeBits
Copy link

It's working fine here in Angular 13. I just don't use Angular Material 13... Which breaks a lot of stuff.

@JavierConde
Copy link

Hi! we had the same issue today, updated our angular project from 11 to 13.
After some investigations i changed this and solve the error at compiler time.

@angular-material-components/datetime-picker/datetime-picker.component.d.ts

import { CanColor, ThemePalette } from '@angular/material/core'; <----- change this line
declare const _MatDatepickerContentMixinBase: CanColor & typeof MatDatepickerContentBase; <------- change this line

export declare class NgxMatDatetimeContent extends _MatDatepickerContentMixinBase implements AfterViewInit, CanColor {
private cd;
private _viewContainerRef;
color: any; <------- add this line
defaultColor: any; <------- add this line
/** Reference to the internal calendar component. */

depends on what version of angular material do you use and other components, but maybe this can help someone.!

regards

@hoberlaender
Copy link

Thank you all for your responses.
@iiMS0Raw: This is not an option for me to use Angular 13 with Angular Material is not 13 but 12. Both versions should be on the same level.
@JavierConde: I don't want to change any code in files placed in node_modules directory. I have such a situation using @biacsics/ng-canvas-gauges because there is a bug in the source code and it is a big effort to deal with that all the time.
Solution: I decided to create my own time picker component based on the code of the time picker component located in angular-material-components.
Kind regards and thank you again, Heiko

@h2qutc
Copy link
Owner

h2qutc commented Nov 12, 2021

Hi all, a new version with support Angular 13 will be released within some hours.
Thanks all for your support.

@hoberlaender
Copy link

Thank you.

@justinwatkins
Copy link

Hi all, a new version with support Angular 13 will be released within some hours. Thanks all for your support.

if you just mixin the classes this way, you don't have to import the now hidden Ctor type. This works for all 3 components.

export class NgxMatColorPickerContentComponent extends mixinColor(NgxMatColorPickerContentBase)

@andrew-stuart-cross
Copy link

Hi all, a new version with support Angular 13 will be released within some hours. Thanks all for your support.

Many thanks for the quick work, @h2qutc . It is appreciated :)

@h2qutc
Copy link
Owner

h2qutc commented Nov 12, 2021

Hi all,

A new version of @angular-material-components/datetime-picker v7.x+ supporting Angular 13 has been already released.

Thanks all for your support.

@h2qutc h2qutc closed this as completed Nov 12, 2021
@rmbl-milad
Copy link

Hi,
I get following compile error after upgrading to the latest version using Angular 13.

Error: node_modules/@angular-material-components/datetime-picker/lib/datetime-picker.component.d.ts:22:79 - error TS2694: Namespace '".../node_modules/@angular/material/core/index"' has no exported member '_Constructor'.

22 declare const _MatDatetimepickerContentBase: import("@angular/material/core")._Constructor & import("@angular/material/core")._AbstractConstructor & {
~~~~~~~~~~~~

Error: node_modules/@angular-material-components/datetime-picker/lib/datetime-picker.component.d.ts:22:137 - error TS2694: Namespace '".../node_modules/@angular/material/core/index"' has no exported member '_AbstractConstructor'.

22 declare const _MatDatetimepickerContentBase: import("@angular/material/core")._Constructor & import("@angular/material/core")._AbstractConstructor & {
~~~~~~~~~~~~~~~~~~~~

Error: node_modules/@angular-material-components/datetime-picker/lib/datetime-picker.component.d.ts:34:22 - error TS2420: Class 'NgxMatDatetimeContent' incorrectly implements interface 'CanColor'.
Type 'NgxMatDatetimeContent' is missing the following properties from type 'CanColor': color, defaultColor

34 export declare class NgxMatDatetimeContent extends _MatDatetimepickerContentBase implements AfterViewInit, CanColor {
~~~~~~~~~~~~~~~~~~~~~

Any idea how to solve this?

Thank you in advance

@lreiner
Copy link

lreiner commented Dec 15, 2021

Hi, I get following compile error after upgrading to the latest version using Angular 13.

Error: node_modules/@angular-material-components/datetime-picker/lib/datetime-picker.component.d.ts:22:79 - error TS2694: Namespace '".../node_modules/@angular/material/core/index"' has no exported member '_Constructor'.

22 declare const _MatDatetimepickerContentBase: import("@angular/material/core")._Constructor & import("@angular/material/core")._AbstractConstructor & { ~~~~~~~~~~~~

Error: node_modules/@angular-material-components/datetime-picker/lib/datetime-picker.component.d.ts:22:137 - error TS2694: Namespace '".../node_modules/@angular/material/core/index"' has no exported member '_AbstractConstructor'.

22 declare const _MatDatetimepickerContentBase: import("@angular/material/core")._Constructor & import("@angular/material/core")._AbstractConstructor & { ~~~~~~~~~~~~~~~~~~~~

Error: node_modules/@angular-material-components/datetime-picker/lib/datetime-picker.component.d.ts:34:22 - error TS2420: Class 'NgxMatDatetimeContent' incorrectly implements interface 'CanColor'. Type 'NgxMatDatetimeContent' is missing the following properties from type 'CanColor': color, defaultColor

34 export declare class NgxMatDatetimeContent extends _MatDatetimepickerContentBase implements AfterViewInit, CanColor { ~~~~~~~~~~~~~~~~~~~~~

Any idea how to solve this?

Thank you in advance

got the same error. My Problem was that I have installed the module for angular 13 but my project was on angular 12. Uninstall your current package and run this command:

npm install --save @angular-material-components/datetime-picker@6.0.2

Version 6 is for angular 12 projects. Version 7+ is for Angular 13 +

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests