@@ -71,194 +71,4 @@ This component has the same interface as it's [ember-one-way-controls counterpar
71
71
* [ {{one-way-phone-mask}}] ( docs/one-way-phone-mask.md )
72
72
* [ {{one-way-ssn-mask}}] ( docs/one-way-ssn-mask.md )
73
73
* [ {{one-way-zip-code-mask}}] ( docs/one-way-zip-code-mask.md )
74
-
75
- ## Input Mask Component (deprecated)
76
-
77
- The standard ` input-mask ` component:
78
-
79
- ``` hbs
80
- {{input-mask mask='999-aaa-***' value=foo unmaskedValue=bar}}
81
- ```
82
-
83
- ### Default Masking Definitions
84
-
85
- - ` 9 ` : numeric
86
- - ` a ` : alphabetical
87
- - ` * ` : alphanumeric
88
- - ` A ` : automatically uppercased alphabetical
89
- - ` # ` : unicode
90
-
91
- Optional portions of masks are delimited with brackets ` [] ` :
92
-
93
- ``` hbs
94
- // Optionally lets the user add the last dash and characters
95
- {{input-mask mask='999-aaa[-***]' value=foo unmaskedValue=bar}}
96
- ```
97
-
98
- ### Unmasked Value
99
-
100
- The mask is applied directly to the input itself, meaning it alters the ` value `
101
- attribute. There are times when you might want the value with the mask, and
102
- times when you might want the value without the mask. For example:
103
-
104
- ``` hbs
105
- {{input-mask mask='99/99/9999' value=foo unmaskedValue=bar}}
106
- ```
107
-
108
- This is an ad hoc mask for a date (consider using the ` date-input ` component
109
- instead). If the user were to enter ` 12/12/2014 ` , the value of ` foo ` would be
110
- just that, whereas the value of ` bar ` would be ` 12122014 ` , which may not be as
111
- useful to you. Either way, both values are accessible and bound to each other,
112
- so choose whichever one you want.
113
-
114
- ### Options
115
-
116
- - ` maskPlaceholder ` (default: ` null ` )
117
-
118
- Override Inputmask's default
119
- [ ` placeholder ` ] ( https://github.com/RobinHerbots/Inputmask#placeholder-1 )
120
- option.
121
-
122
- - ` showMaskOnFocus ` (default: ` true ` )
123
-
124
- Shows the user a preview of the mask when the field is focussed.
125
-
126
- - ` showMaskOnHover ` (default: ` true ` )
127
-
128
- Shows the user a preview of the mask when the field is hovered.
129
-
130
- - ` rightAlign ` (default: ` false ` )
131
-
132
- This is an option on the original plugin, but I highly recommend using CSS
133
- classes because all it does is apply a style directly to the input.
134
-
135
- - ` clearIncomplete ` (default: ` false ` )
136
-
137
- If the user does not completely fill in the mask before defocus, it will
138
- clear the input.
139
-
140
- - ` greedyMask ` (default: ` false ` )
141
-
142
- If there are any optional portions of the mask this decides whether or not
143
- to display them in the preview.
144
-
145
- ## Other Components
146
-
147
- As mentioned above, this addon include other components that extend the base
148
- ` input-mask ` component. Some of simple aliases, but some add additional options.
149
-
150
- ### Credit Card Inputs (deprecated)
151
-
152
- ``` hbs
153
- {{credit-card-input unmaskedValue=foo cardType=bar separator=' '}}
154
- ```
155
-
156
- The ` credit-card-input ` dynamically determines the type of the credit card and
157
- changes the mask as appropriate. It currently has support for:
158
-
159
- - Visa
160
- - MasterCard
161
- - Amex
162
- - Diners Club
163
- - Discover
164
- - JCB
165
-
166
- The card type is stored in ` cardType ` , which can be bound to. The separator for
167
- numbers can be specified with the ` separator ` option, and defaults to ` - ` .
168
-
169
- ### Currency Inputs (deprecated)
170
-
171
- ``` hbs
172
- {{currency-input unmaskedValue=foo}}
173
- ```
174
-
175
- This is just a wrapper for the Inputmask alias and is equivalent to the
176
- following:
177
-
178
- ``` hbs
179
- {{input-mask mask='currency' unmaskedValue=foo}}
180
- ```
181
-
182
- ### Date Inputs (deprecated)
183
-
184
- ``` hbs
185
- {{date-input unmaskedValue=foo}}
186
- ```
187
-
188
- This is just a wrapper for the Inputmask alias and is equivalent to the
189
- following:
190
-
191
- ``` hbs
192
- {{input-mask mask='date' unmaskedValue=foo}}
193
- ```
194
-
195
- ### Email Inputs (deprecated)
196
-
197
- ``` hbs
198
- {{email-input unmaskedValue=foo}}
199
- ```
200
-
201
- This is just a wrapper for the Inputmask alias and is equivalent to the
202
- following:
203
-
204
- ``` hbs
205
- {{input-mask mask='email' unmaskedValue=foo}}
206
- ```
207
-
208
- ### Number Inputs (deprecated)
209
-
210
- ``` hbs
211
- {{number-input unmaskedValue=foo group=false groupSize=3 separator=',''
212
- decimal=false radix='.'}}
213
- ```
214
-
215
- Number inputs only accept numbers, and can be modified using the following
216
- options:
217
-
218
- - ` group ` : Display the number grouped for readability (e.g. ` 1,234 ` vs.
219
- ` 1234 ` ).
220
- - ` groupSize ` : Change the size of the groups.
221
- - ` separator ` : Change the group separator. (Caveat: If radix and separator are
222
- the same, then the radix will default to '.'.)
223
- - ` decimal ` : If set to ` true ` then the input will be given 2 decimal places,
224
- if set some number then the input will be given that many decimal places.
225
- - ` radix ` : Sets the radix that separates the decimal places.
226
- - ` digitsOptional ` : Specify whether digits are optional (e.g. ` 97.00 ` vs. ` 97 ` )
227
- - ` prefix ` : Sets a prefix to be displayed before the number (e.g. ` $97.00 ` )
228
- - ` suffix ` : Sets a suffix to be displayed after the number (e.g. ` 100% ` )
229
- - ` min ` : Sets the minimum value for the field
230
- - ` max ` : Sets the maximum value for the field
231
- - ` unmaskAsNumber ` : Unmasks the input as a number rather than a string (e.g. ` 1234.56 ` vs. ` '1234,56' ` )
232
-
233
- ### US/Canada Phone Number Inputs (deprecated)
234
-
235
- ``` hbs
236
- {{phone-number-input unmaskedValue=foo extensions=false}}
237
- ```
238
-
239
- Masks a US/Canada phone number with the format ` (999) 999-9999 ` . The
240
- ` extensions ` option can be set to ` true ` to allow up to 4 digit extensions
241
- ` (999) 999-9999 x 9999 ` . Note that if ` greedyMask ` is set to ` false ` , which is
242
- the default, then you have to press space or 'x' to activate the extension part
243
- of the mask when entering.
244
-
245
- NOTE: There is a "phone" alias included in Inputmask, but when
246
- I tried using it, I encountered slowness and freezeups. It is much more general
247
- than this tag, however.
248
-
249
- ### US SSN Inputs
250
-
251
- ``` hbs
252
- {{ssn-input unmaskedValue=foo}}
253
- ```
254
-
255
- Masks a US SSN code (` 999-99-9999 ` ).
256
-
257
- ### US ZIP Code Inputs (deprecated)
258
-
259
- ``` hbs
260
- {{zip-code-input unmaskedValue=foo fullCode=false}}
261
- ```
262
-
263
- Masks a US ZIP code. If ` fullCode ` is set to ` true ` , then it will enable the
264
- user to enter an extended ZIP+4 code.
74
+ * [ Deprecated Masks] ( docs/deprecated-masks.md )
0 commit comments