ember-phone-input
Advanced tools
Comparing version 8.1.0-alpha.1 to 9.0.0-alpha.0
@@ -8,3 +8,3 @@ import Component from '@ember/component'; | ||
/* eslint-disable ember/no-classic-components, ember/no-classic-classes, ember/require-tagless-components, ember/no-component-lifecycle-hooks, no-unused-vars */ | ||
/* eslint-disable ember/no-classic-components, ember/no-classic-classes, ember/require-tagless-components, ember/no-component-lifecycle-hooks */ | ||
@@ -17,2 +17,3 @@ /** | ||
autoPlaceholder='aggressive' | ||
customPlaceholder='Enter phone number' | ||
disabled=true | ||
@@ -92,2 +93,10 @@ required=required | ||
/** | ||
Replace the auto placeholder with a custom placeholder. | ||
If defined, must return a string. Defaults to null. | ||
@argument customPlaceholder | ||
@type {string} | ||
*/ | ||
this.customPlaceholder = this.customPlaceholder || null; | ||
/** | ||
It will just be the first country in the list. Set the initial country by | ||
@@ -142,2 +151,5 @@ it's country code. Defaults to ''. | ||
this.update = this.update || function () {}; | ||
if (this.customPlaceholder) { | ||
assert('`customPlaceholder` must be of type string', typeof this.customPlaceholder === 'string'); | ||
} | ||
const validAutoPlaceholer = ['polite', 'aggressive', 'off'].includes(this.autoPlaceholder); | ||
@@ -193,2 +205,3 @@ assert("`autoPlaceholder` possible values are 'polite', 'aggressive' and 'off'", validAutoPlaceholer); | ||
autoPlaceholder, | ||
customPlaceholder, | ||
initialCountry, | ||
@@ -204,2 +217,3 @@ onlyCountries, | ||
autoPlaceholder, | ||
customPlaceholder: () => customPlaceholder, | ||
initialCountry, | ||
@@ -206,0 +220,0 @@ onlyCountries, |
{ | ||
"name": "ember-phone-input", | ||
"version": "8.1.0-alpha.1", | ||
"version": "9.0.0-alpha.0", | ||
"description": "A component to input / validate / submit phone numbers", | ||
@@ -48,19 +48,19 @@ "keywords": [ | ||
"devDependencies": { | ||
"@babel/core": "^7.17.0", | ||
"@babel/eslint-parser": "^7.18.2", | ||
"@babel/plugin-proposal-class-properties": "^7.16.7", | ||
"@babel/plugin-proposal-decorators": "^7.17.0", | ||
"@babel/plugin-syntax-decorators": "^7.17.0", | ||
"@embroider/addon-dev": "^3.0.0", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"concurrently": "^7.2.1", | ||
"ember-template-lint": "^4.0.0", | ||
"eslint": "^7.32.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-ember": "^10.5.8", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"prettier": "^2.5.1", | ||
"rollup": "^2.67.0", | ||
"rollup-plugin-copy": "^3.4.0" | ||
"@babel/core": "7.21.8", | ||
"@babel/eslint-parser": "7.21.8", | ||
"@babel/plugin-proposal-class-properties": "7.18.6", | ||
"@babel/plugin-proposal-decorators": "7.21.0", | ||
"@babel/plugin-syntax-decorators": "7.21.0", | ||
"@embroider/addon-dev": "3.0.0", | ||
"@rollup/plugin-babel": "5.3.1", | ||
"concurrently": "8.0.1", | ||
"ember-template-lint": "5.7.3", | ||
"eslint": "7.32.0", | ||
"eslint-config-prettier": "8.8.0", | ||
"eslint-plugin-ember": "11.5.2", | ||
"eslint-plugin-node": "11.1.0", | ||
"eslint-plugin-prettier": "4.2.1", | ||
"prettier": "2.8.8", | ||
"rollup": "2.79.1", | ||
"rollup-plugin-copy": "3.4.0" | ||
}, | ||
@@ -67,0 +67,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
33671
308