Socivo / ember-cli-intl-tel-input

An Ember.js wrapper for intl-tel-input library by Jack O'Connor (https://github.com/jackocnr/intl-tel-input). The plugin is based on ember-intl-tel-input by Justin Lau(http://justin-lau.github.io/ember-intl-tel-input). The plugin was created as the original plugin is no longer actively upgraded and mainted for new versions of Ember.js and jquery.
MIT License
4 stars 6 forks source link

Compile Error on usage #1

Closed evoactivity closed 1 year ago

evoactivity commented 7 years ago

intl-tel-input is not a helper

I'm using Ember 2.16.0

Twiddle setup here https://ember-twiddle.com/9f99a329bd4454c8186a60decb941085?openFiles=templates.application.hbs%2C

evoactivity commented 7 years ago

That would be because it's now exported as ember-cli-intl-tel-input what would be the reason for this?

MojoJojo commented 7 years ago

Hi,

Thanks for bringing it to my attention. I'm not sure - I haven't tested it with the latest EmberJS. Will fix it over the weekend and publish a new version.

MojoJojo commented 7 years ago

Hi.. Quick feedback ..the plugin exports the template as ember-cli-intl-tel-input ...was done to keep it separate from other plugins using the same namespace.

I am going to refactor it to remove bower dependecies and fix the exported namespace. Will publish a new version later today.

Thank you for your patience!

evoactivity commented 7 years ago

@MojoJojo Good to hear :)

Another issue I ran into was the vendor css wasn't added to my vendor file, I had a quick look into that but couldn't replicate on ember twiddle. I don't have time to look into that this week but I might have some time to have a look next week.

monica-olejniczak-safetyculture commented 6 years ago

@MojoJojo Hey! What's the status on this?

@MojoJojo @evoactivity I ran into the same issue. If you add ember-cli-sass in your dependencies (not devDependencies!) it fixes the issue.

MojoJojo commented 6 years ago

@evoactivity @monica-olejniczak-safetyculture Will publish the fixed version on npm today.

Thank you for your patience!

monica-olejniczak-safetyculture commented 6 years ago

@MojoJojo Awesome, thanks! While you're at it with updating, can you use the newer intl-tel-input options?

This includes:

MojoJojo commented 6 years ago

Hi @evoactivity @monica-olejniczak-safetyculture Have published 1.0.8 on npm with changes and the new methods. Please have a look.

Will add tests shortly.

dudv commented 6 years ago

@MojoJojo Thanks for your work. Unfortunately I still get Compile Error: intl-tel-input is not a helper. Here's Twiddle which reproduces it https://ember-twiddle.com/381aa0707274545084745c4571db0b85.

MojoJojo commented 6 years ago

That's odd. Looking at it now.

evoactivity commented 6 years ago

@MojoJojo downgrading to 1.0.10 works so must be something in the last few commits

temecom commented 6 years ago

I think that you need to add a link file:

// app/components/intl-tel-input.js
export { default } from 'ember-cli-intl-tel-input/components/intl-tel-input';

and

// app/templates/components/intl-tel-input.js
export { default } from 'ember-cli-intl-tel-input/templates/components/intl-tel-input';

Otherwise the application cannot see the addon as a component where it normally would in
app/components and app/templates/components

(that is unless Ember 2.18 changed the way that they handle addons :) )

MojoJojo commented 6 years ago

Apologies for the delayed response. Been swamped with work.

@evoactivity @temecom You are right. Not sure how I missed the component re-export file! Have updated codebase and published the new version (1.0.14)

https://ember-twiddle.com/4541d241d9e1ae653a64dac7279bb5fc?openFiles=twiddle.json%2C

temecom commented 6 years ago

There is no test/dummy app with samples like the original repo: https://github.com/justin-lau/ember-intl-tel-input/blob/master/tests/dummy/app/templates/index.hbs

Is that intentional? It makes testing a lot easier :)

MojoJojo commented 6 years ago

Sigh...its not intentional..the plugin was kind of rushed to get a project going..I will try and update it this week.

temecom commented 6 years ago

Sorry to be a pest :)