1 | import { NgModule, Component, ChangeDetectionStrategy, Input, ViewChild, EventEmitter, Output, forwardRef, ViewEncapsulation } from '@angular/core';
|
---|
2 | import { CommonModule } from '@angular/common';
|
---|
3 | import { InputTextModule } from 'primeng/inputtext';
|
---|
4 | import { ButtonModule } from 'primeng/button';
|
---|
5 | import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
---|
6 | import * as i0 from "@angular/core";
|
---|
7 | import * as i1 from "@angular/common";
|
---|
8 | import * as i2 from "primeng/inputtext";
|
---|
9 | import * as i3 from "primeng/button";
|
---|
10 | export const INPUTNUMBER_VALUE_ACCESSOR = {
|
---|
11 | provide: NG_VALUE_ACCESSOR,
|
---|
12 | useExisting: forwardRef(() => InputNumber),
|
---|
13 | multi: true
|
---|
14 | };
|
---|
15 | export class InputNumber {
|
---|
16 | constructor(el, cd) {
|
---|
17 | this.el = el;
|
---|
18 | this.cd = cd;
|
---|
19 | this.showButtons = false;
|
---|
20 | this.format = true;
|
---|
21 | this.buttonLayout = "stacked";
|
---|
22 | this.incrementButtonIcon = 'pi pi-angle-up';
|
---|
23 | this.decrementButtonIcon = 'pi pi-angle-down';
|
---|
24 | this.readonly = false;
|
---|
25 | this.step = 1;
|
---|
26 | this.allowEmpty = true;
|
---|
27 | this.mode = "decimal";
|
---|
28 | this.useGrouping = true;
|
---|
29 | this.onInput = new EventEmitter();
|
---|
30 | this.onFocus = new EventEmitter();
|
---|
31 | this.onBlur = new EventEmitter();
|
---|
32 | this.onKeyDown = new EventEmitter();
|
---|
33 | this.onModelChange = () => { };
|
---|
34 | this.onModelTouched = () => { };
|
---|
35 | this.groupChar = '';
|
---|
36 | this.prefixChar = '';
|
---|
37 | this.suffixChar = '';
|
---|
38 | }
|
---|
39 | get disabled() {
|
---|
40 | return this._disabled;
|
---|
41 | }
|
---|
42 | set disabled(disabled) {
|
---|
43 | if (disabled)
|
---|
44 | this.focused = false;
|
---|
45 | this._disabled = disabled;
|
---|
46 | if (this.timer)
|
---|
47 | this.clearTimer();
|
---|
48 | }
|
---|
49 | ngOnChanges(simpleChange) {
|
---|
50 | const props = ['locale', 'localeMatcher', 'mode', 'currency', 'currencyDisplay', 'useGrouping', 'minFractionDigits', 'maxFractionDigits', 'prefix', 'suffix'];
|
---|
51 | if (props.some(p => !!simpleChange[p])) {
|
---|
52 | this.updateConstructParser();
|
---|
53 | }
|
---|
54 | }
|
---|
55 | ngOnInit() {
|
---|
56 | this.constructParser();
|
---|
57 | this.initialized = true;
|
---|
58 | }
|
---|
59 | getOptions() {
|
---|
60 | return {
|
---|
61 | localeMatcher: this.localeMatcher,
|
---|
62 | style: this.mode,
|
---|
63 | currency: this.currency,
|
---|
64 | currencyDisplay: this.currencyDisplay,
|
---|
65 | useGrouping: this.useGrouping,
|
---|
66 | minimumFractionDigits: this.minFractionDigits,
|
---|
67 | maximumFractionDigits: this.maxFractionDigits
|
---|
68 | };
|
---|
69 | }
|
---|
70 | constructParser() {
|
---|
71 | this.numberFormat = new Intl.NumberFormat(this.locale, this.getOptions());
|
---|
72 | const numerals = [...new Intl.NumberFormat(this.locale, { useGrouping: false }).format(9876543210)].reverse();
|
---|
73 | const index = new Map(numerals.map((d, i) => [d, i]));
|
---|
74 | this._numeral = new RegExp(`[${numerals.join('')}]`, 'g');
|
---|
75 | this._group = this.getGroupingExpression();
|
---|
76 | this._minusSign = this.getMinusSignExpression();
|
---|
77 | this._currency = this.getCurrencyExpression();
|
---|
78 | this._decimal = this.getDecimalExpression();
|
---|
79 | this._suffix = this.getSuffixExpression();
|
---|
80 | this._prefix = this.getPrefixExpression();
|
---|
81 | this._index = d => index.get(d);
|
---|
82 | }
|
---|
83 | updateConstructParser() {
|
---|
84 | if (this.initialized) {
|
---|
85 | this.constructParser();
|
---|
86 | }
|
---|
87 | }
|
---|
88 | escapeRegExp(text) {
|
---|
89 | return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
|
---|
90 | }
|
---|
91 | getDecimalExpression() {
|
---|
92 | const formatter = new Intl.NumberFormat(this.locale, { ...this.getOptions(), useGrouping: false });
|
---|
93 | return new RegExp(`[${formatter.format(1.1).replace(this._currency, '').trim().replace(this._numeral, '')}]`, 'g');
|
---|
94 | }
|
---|
95 | getGroupingExpression() {
|
---|
96 | const formatter = new Intl.NumberFormat(this.locale, { useGrouping: true });
|
---|
97 | this.groupChar = formatter.format(1000000).trim().replace(this._numeral, '').charAt(0);
|
---|
98 | return new RegExp(`[${this.groupChar}]`, 'g');
|
---|
99 | }
|
---|
100 | getMinusSignExpression() {
|
---|
101 | const formatter = new Intl.NumberFormat(this.locale, { useGrouping: false });
|
---|
102 | return new RegExp(`[${formatter.format(-1).trim().replace(this._numeral, '')}]`, 'g');
|
---|
103 | }
|
---|
104 | getCurrencyExpression() {
|
---|
105 | if (this.currency) {
|
---|
106 | const formatter = new Intl.NumberFormat(this.locale, { style: 'currency', currency: this.currency, currencyDisplay: this.currencyDisplay,
|
---|
107 | minimumFractionDigits: 0, maximumFractionDigits: 0 });
|
---|
108 | return new RegExp(`[${formatter.format(1).replace(/\s/g, '').replace(this._numeral, '').replace(this._group, '')}]`, 'g');
|
---|
109 | }
|
---|
110 | return new RegExp(`[]`, 'g');
|
---|
111 | }
|
---|
112 | getPrefixExpression() {
|
---|
113 | if (this.prefix) {
|
---|
114 | this.prefixChar = this.prefix;
|
---|
115 | }
|
---|
116 | else {
|
---|
117 | const formatter = new Intl.NumberFormat(this.locale, { style: this.mode, currency: this.currency, currencyDisplay: this.currencyDisplay });
|
---|
118 | this.prefixChar = formatter.format(1).split('1')[0];
|
---|
119 | }
|
---|
120 | return new RegExp(`${this.escapeRegExp(this.prefixChar || '')}`, 'g');
|
---|
121 | }
|
---|
122 | getSuffixExpression() {
|
---|
123 | if (this.suffix) {
|
---|
124 | this.suffixChar = this.suffix;
|
---|
125 | }
|
---|
126 | else {
|
---|
127 | const formatter = new Intl.NumberFormat(this.locale, { style: this.mode, currency: this.currency, currencyDisplay: this.currencyDisplay,
|
---|
128 | minimumFractionDigits: 0, maximumFractionDigits: 0 });
|
---|
129 | this.suffixChar = formatter.format(1).split('1')[1];
|
---|
130 | }
|
---|
131 | return new RegExp(`${this.escapeRegExp(this.suffixChar || '')}`, 'g');
|
---|
132 | }
|
---|
133 | formatValue(value) {
|
---|
134 | if (value != null) {
|
---|
135 | if (value === '-') { // Minus sign
|
---|
136 | return value;
|
---|
137 | }
|
---|
138 | if (this.format) {
|
---|
139 | let formatter = new Intl.NumberFormat(this.locale, this.getOptions());
|
---|
140 | let formattedValue = formatter.format(value);
|
---|
141 | if (this.prefix) {
|
---|
142 | formattedValue = this.prefix + formattedValue;
|
---|
143 | }
|
---|
144 | if (this.suffix) {
|
---|
145 | formattedValue = formattedValue + this.suffix;
|
---|
146 | }
|
---|
147 | return formattedValue;
|
---|
148 | }
|
---|
149 | return value.toString();
|
---|
150 | }
|
---|
151 | return '';
|
---|
152 | }
|
---|
153 | parseValue(text) {
|
---|
154 | let filteredText = text
|
---|
155 | .replace(this._suffix, '')
|
---|
156 | .replace(this._prefix, '')
|
---|
157 | .trim()
|
---|
158 | .replace(/\s/g, '')
|
---|
159 | .replace(this._currency, '')
|
---|
160 | .replace(this._group, '')
|
---|
161 | .replace(this._minusSign, '-')
|
---|
162 | .replace(this._decimal, '.')
|
---|
163 | .replace(this._numeral, this._index);
|
---|
164 | if (filteredText) {
|
---|
165 | if (filteredText === '-') // Minus sign
|
---|
166 | return filteredText;
|
---|
167 | let parsedValue = +filteredText;
|
---|
168 | return isNaN(parsedValue) ? null : parsedValue;
|
---|
169 | }
|
---|
170 | return null;
|
---|
171 | }
|
---|
172 | repeat(event, interval, dir) {
|
---|
173 | if (this.readonly) {
|
---|
174 | return;
|
---|
175 | }
|
---|
176 | let i = interval || 500;
|
---|
177 | this.clearTimer();
|
---|
178 | this.timer = setTimeout(() => {
|
---|
179 | this.repeat(event, 40, dir);
|
---|
180 | }, i);
|
---|
181 | this.spin(event, dir);
|
---|
182 | }
|
---|
183 | spin(event, dir) {
|
---|
184 | let step = this.step * dir;
|
---|
185 | let currentValue = this.parseValue(this.input.nativeElement.value) || 0;
|
---|
186 | let newValue = this.validateValue(currentValue + step);
|
---|
187 | if (this.maxlength && this.maxlength < this.formatValue(newValue).length) {
|
---|
188 | return;
|
---|
189 | }
|
---|
190 | this.updateInput(newValue, null, 'spin', null);
|
---|
191 | this.updateModel(event, newValue);
|
---|
192 | this.handleOnInput(event, currentValue, newValue);
|
---|
193 | }
|
---|
194 | onUpButtonMouseDown(event) {
|
---|
195 | this.input.nativeElement.focus();
|
---|
196 | this.repeat(event, null, 1);
|
---|
197 | event.preventDefault();
|
---|
198 | }
|
---|
199 | onUpButtonMouseUp() {
|
---|
200 | this.clearTimer();
|
---|
201 | }
|
---|
202 | onUpButtonMouseLeave() {
|
---|
203 | this.clearTimer();
|
---|
204 | }
|
---|
205 | onUpButtonKeyDown(event) {
|
---|
206 | if (event.keyCode === 32 || event.keyCode === 13) {
|
---|
207 | this.repeat(event, null, 1);
|
---|
208 | }
|
---|
209 | }
|
---|
210 | onUpButtonKeyUp() {
|
---|
211 | this.clearTimer();
|
---|
212 | }
|
---|
213 | onDownButtonMouseDown(event) {
|
---|
214 | this.input.nativeElement.focus();
|
---|
215 | this.repeat(event, null, -1);
|
---|
216 | event.preventDefault();
|
---|
217 | }
|
---|
218 | onDownButtonMouseUp() {
|
---|
219 | this.clearTimer();
|
---|
220 | }
|
---|
221 | onDownButtonMouseLeave() {
|
---|
222 | this.clearTimer();
|
---|
223 | }
|
---|
224 | onDownButtonKeyUp() {
|
---|
225 | this.clearTimer();
|
---|
226 | }
|
---|
227 | onDownButtonKeyDown(event) {
|
---|
228 | if (event.keyCode === 32 || event.keyCode === 13) {
|
---|
229 | this.repeat(event, null, -1);
|
---|
230 | }
|
---|
231 | }
|
---|
232 | onUserInput(event) {
|
---|
233 | if (this.isSpecialChar) {
|
---|
234 | event.target.value = this.lastValue;
|
---|
235 | }
|
---|
236 | this.isSpecialChar = false;
|
---|
237 | }
|
---|
238 | onInputKeyDown(event) {
|
---|
239 | this.lastValue = event.target.value;
|
---|
240 | if (event.shiftKey || event.altKey) {
|
---|
241 | this.isSpecialChar = true;
|
---|
242 | return;
|
---|
243 | }
|
---|
244 | let selectionStart = event.target.selectionStart;
|
---|
245 | let selectionEnd = event.target.selectionEnd;
|
---|
246 | let inputValue = event.target.value;
|
---|
247 | let newValueStr = null;
|
---|
248 | if (event.altKey) {
|
---|
249 | event.preventDefault();
|
---|
250 | }
|
---|
251 | switch (event.which) {
|
---|
252 | //up
|
---|
253 | case 38:
|
---|
254 | this.spin(event, 1);
|
---|
255 | event.preventDefault();
|
---|
256 | break;
|
---|
257 | //down
|
---|
258 | case 40:
|
---|
259 | this.spin(event, -1);
|
---|
260 | event.preventDefault();
|
---|
261 | break;
|
---|
262 | //left
|
---|
263 | case 37:
|
---|
264 | if (!this.isNumeralChar(inputValue.charAt(selectionStart - 1))) {
|
---|
265 | event.preventDefault();
|
---|
266 | }
|
---|
267 | break;
|
---|
268 | //right
|
---|
269 | case 39:
|
---|
270 | if (!this.isNumeralChar(inputValue.charAt(selectionStart))) {
|
---|
271 | event.preventDefault();
|
---|
272 | }
|
---|
273 | break;
|
---|
274 | //enter
|
---|
275 | case 13:
|
---|
276 | newValueStr = this.validateValue(this.parseValue(this.input.nativeElement.value));
|
---|
277 | this.input.nativeElement.value = this.formatValue(newValueStr);
|
---|
278 | this.input.nativeElement.setAttribute('aria-valuenow', newValueStr);
|
---|
279 | this.updateModel(event, newValueStr);
|
---|
280 | break;
|
---|
281 | //backspace
|
---|
282 | case 8: {
|
---|
283 | event.preventDefault();
|
---|
284 | if (selectionStart === selectionEnd) {
|
---|
285 | const deleteChar = inputValue.charAt(selectionStart - 1);
|
---|
286 | const { decimalCharIndex, decimalCharIndexWithoutPrefix } = this.getDecimalCharIndexes(inputValue);
|
---|
287 | if (this.isNumeralChar(deleteChar)) {
|
---|
288 | const decimalLength = this.getDecimalLength(inputValue);
|
---|
289 | if (this._group.test(deleteChar)) {
|
---|
290 | this._group.lastIndex = 0;
|
---|
291 | newValueStr = inputValue.slice(0, selectionStart - 2) + inputValue.slice(selectionStart - 1);
|
---|
292 | }
|
---|
293 | else if (this._decimal.test(deleteChar)) {
|
---|
294 | this._decimal.lastIndex = 0;
|
---|
295 | if (decimalLength) {
|
---|
296 | this.input.nativeElement.setSelectionRange(selectionStart - 1, selectionStart - 1);
|
---|
297 | }
|
---|
298 | else {
|
---|
299 | newValueStr = inputValue.slice(0, selectionStart - 1) + inputValue.slice(selectionStart);
|
---|
300 | }
|
---|
301 | }
|
---|
302 | else if (decimalCharIndex > 0 && selectionStart > decimalCharIndex) {
|
---|
303 | const insertedText = this.isDecimalMode() && (this.minFractionDigits || 0) < decimalLength ? '' : '0';
|
---|
304 | newValueStr = inputValue.slice(0, selectionStart - 1) + insertedText + inputValue.slice(selectionStart);
|
---|
305 | }
|
---|
306 | else if (decimalCharIndexWithoutPrefix === 1) {
|
---|
307 | newValueStr = inputValue.slice(0, selectionStart - 1) + '0' + inputValue.slice(selectionStart);
|
---|
308 | newValueStr = this.parseValue(newValueStr) > 0 ? newValueStr : '';
|
---|
309 | }
|
---|
310 | else {
|
---|
311 | newValueStr = inputValue.slice(0, selectionStart - 1) + inputValue.slice(selectionStart);
|
---|
312 | }
|
---|
313 | }
|
---|
314 | this.updateValue(event, newValueStr, null, 'delete-single');
|
---|
315 | }
|
---|
316 | else {
|
---|
317 | newValueStr = this.deleteRange(inputValue, selectionStart, selectionEnd);
|
---|
318 | this.updateValue(event, newValueStr, null, 'delete-range');
|
---|
319 | }
|
---|
320 | break;
|
---|
321 | }
|
---|
322 | // del
|
---|
323 | case 46:
|
---|
324 | event.preventDefault();
|
---|
325 | if (selectionStart === selectionEnd) {
|
---|
326 | const deleteChar = inputValue.charAt(selectionStart);
|
---|
327 | const { decimalCharIndex, decimalCharIndexWithoutPrefix } = this.getDecimalCharIndexes(inputValue);
|
---|
328 | if (this.isNumeralChar(deleteChar)) {
|
---|
329 | const decimalLength = this.getDecimalLength(inputValue);
|
---|
330 | if (this._group.test(deleteChar)) {
|
---|
331 | this._group.lastIndex = 0;
|
---|
332 | newValueStr = inputValue.slice(0, selectionStart) + inputValue.slice(selectionStart + 2);
|
---|
333 | }
|
---|
334 | else if (this._decimal.test(deleteChar)) {
|
---|
335 | this._decimal.lastIndex = 0;
|
---|
336 | if (decimalLength) {
|
---|
337 | this.input.nativeElement.setSelectionRange(selectionStart + 1, selectionStart + 1);
|
---|
338 | }
|
---|
339 | else {
|
---|
340 | newValueStr = inputValue.slice(0, selectionStart) + inputValue.slice(selectionStart + 1);
|
---|
341 | }
|
---|
342 | }
|
---|
343 | else if (decimalCharIndex > 0 && selectionStart > decimalCharIndex) {
|
---|
344 | const insertedText = this.isDecimalMode() && (this.minFractionDigits || 0) < decimalLength ? '' : '0';
|
---|
345 | newValueStr = inputValue.slice(0, selectionStart) + insertedText + inputValue.slice(selectionStart + 1);
|
---|
346 | }
|
---|
347 | else if (decimalCharIndexWithoutPrefix === 1) {
|
---|
348 | newValueStr = inputValue.slice(0, selectionStart) + '0' + inputValue.slice(selectionStart + 1);
|
---|
349 | newValueStr = this.parseValue(newValueStr) > 0 ? newValueStr : '';
|
---|
350 | }
|
---|
351 | else {
|
---|
352 | newValueStr = inputValue.slice(0, selectionStart) + inputValue.slice(selectionStart + 1);
|
---|
353 | }
|
---|
354 | }
|
---|
355 | this.updateValue(event, newValueStr, null, 'delete-back-single');
|
---|
356 | }
|
---|
357 | else {
|
---|
358 | newValueStr = this.deleteRange(inputValue, selectionStart, selectionEnd);
|
---|
359 | this.updateValue(event, newValueStr, null, 'delete-range');
|
---|
360 | }
|
---|
361 | break;
|
---|
362 | default:
|
---|
363 | break;
|
---|
364 | }
|
---|
365 | this.onKeyDown.emit(event);
|
---|
366 | }
|
---|
367 | onInputKeyPress(event) {
|
---|
368 | event.preventDefault();
|
---|
369 | let code = event.which || event.keyCode;
|
---|
370 | let char = String.fromCharCode(code);
|
---|
371 | const isDecimalSign = this.isDecimalSign(char);
|
---|
372 | const isMinusSign = this.isMinusSign(char);
|
---|
373 | if ((48 <= code && code <= 57) || isMinusSign || isDecimalSign) {
|
---|
374 | this.insert(event, char, { isDecimalSign, isMinusSign });
|
---|
375 | }
|
---|
376 | }
|
---|
377 | onPaste(event) {
|
---|
378 | if (!this.disabled) {
|
---|
379 | event.preventDefault();
|
---|
380 | let data = (event.clipboardData || window['clipboardData']).getData('Text');
|
---|
381 | if (data) {
|
---|
382 | let filteredData = this.parseValue(data);
|
---|
383 | if (filteredData != null) {
|
---|
384 | this.insert(event, filteredData.toString());
|
---|
385 | }
|
---|
386 | }
|
---|
387 | }
|
---|
388 | }
|
---|
389 | allowMinusSign() {
|
---|
390 | return this.min == null || this.min < 0;
|
---|
391 | }
|
---|
392 | isMinusSign(char) {
|
---|
393 | if (this._minusSign.test(char) || char === '-') {
|
---|
394 | this._minusSign.lastIndex = 0;
|
---|
395 | return true;
|
---|
396 | }
|
---|
397 | return false;
|
---|
398 | }
|
---|
399 | isDecimalSign(char) {
|
---|
400 | if (this._decimal.test(char)) {
|
---|
401 | this._decimal.lastIndex = 0;
|
---|
402 | return true;
|
---|
403 | }
|
---|
404 | return false;
|
---|
405 | }
|
---|
406 | isDecimalMode() {
|
---|
407 | return this.mode === 'decimal';
|
---|
408 | }
|
---|
409 | getDecimalCharIndexes(val) {
|
---|
410 | let decimalCharIndex = val.search(this._decimal);
|
---|
411 | this._decimal.lastIndex = 0;
|
---|
412 | const filteredVal = val.replace(this._prefix, '').trim().replace(/\s/g, '').replace(this._currency, '');
|
---|
413 | const decimalCharIndexWithoutPrefix = filteredVal.search(this._decimal);
|
---|
414 | this._decimal.lastIndex = 0;
|
---|
415 | return { decimalCharIndex, decimalCharIndexWithoutPrefix };
|
---|
416 | }
|
---|
417 | getCharIndexes(val) {
|
---|
418 | const decimalCharIndex = val.search(this._decimal);
|
---|
419 | this._decimal.lastIndex = 0;
|
---|
420 | const minusCharIndex = val.search(this._minusSign);
|
---|
421 | this._minusSign.lastIndex = 0;
|
---|
422 | const suffixCharIndex = val.search(this._suffix);
|
---|
423 | this._suffix.lastIndex = 0;
|
---|
424 | const currencyCharIndex = val.search(this._currency);
|
---|
425 | this._currency.lastIndex = 0;
|
---|
426 | return { decimalCharIndex, minusCharIndex, suffixCharIndex, currencyCharIndex };
|
---|
427 | }
|
---|
428 | insert(event, text, sign = { isDecimalSign: false, isMinusSign: false }) {
|
---|
429 | const minusCharIndexOnText = text.search(this._minusSign);
|
---|
430 | this._minusSign.lastIndex = 0;
|
---|
431 | if (!this.allowMinusSign() && minusCharIndexOnText !== -1) {
|
---|
432 | return;
|
---|
433 | }
|
---|
434 | let selectionStart = this.input.nativeElement.selectionStart;
|
---|
435 | let selectionEnd = this.input.nativeElement.selectionEnd;
|
---|
436 | let inputValue = this.input.nativeElement.value.trim();
|
---|
437 | const { decimalCharIndex, minusCharIndex, suffixCharIndex, currencyCharIndex } = this.getCharIndexes(inputValue);
|
---|
438 | let newValueStr;
|
---|
439 | if (sign.isMinusSign) {
|
---|
440 | if (selectionStart === 0) {
|
---|
441 | newValueStr = inputValue;
|
---|
442 | if (minusCharIndex === -1 || selectionEnd !== 0) {
|
---|
443 | newValueStr = this.insertText(inputValue, text, 0, selectionEnd);
|
---|
444 | }
|
---|
445 | this.updateValue(event, newValueStr, text, 'insert');
|
---|
446 | }
|
---|
447 | }
|
---|
448 | else if (sign.isDecimalSign) {
|
---|
449 | if (decimalCharIndex > 0 && selectionStart === decimalCharIndex) {
|
---|
450 | this.updateValue(event, inputValue, text, 'insert');
|
---|
451 | }
|
---|
452 | else if (decimalCharIndex > selectionStart && decimalCharIndex < selectionEnd) {
|
---|
453 | newValueStr = this.insertText(inputValue, text, selectionStart, selectionEnd);
|
---|
454 | this.updateValue(event, newValueStr, text, 'insert');
|
---|
455 | }
|
---|
456 | else if (decimalCharIndex === -1 && this.maxFractionDigits) {
|
---|
457 | newValueStr = this.insertText(inputValue, text, selectionStart, selectionEnd);
|
---|
458 | this.updateValue(event, newValueStr, text, 'insert');
|
---|
459 | }
|
---|
460 | }
|
---|
461 | else {
|
---|
462 | const maxFractionDigits = this.numberFormat.resolvedOptions().maximumFractionDigits;
|
---|
463 | const operation = selectionStart !== selectionEnd ? 'range-insert' : 'insert';
|
---|
464 | if (decimalCharIndex > 0 && selectionStart > decimalCharIndex) {
|
---|
465 | if ((selectionStart + text.length - (decimalCharIndex + 1)) <= maxFractionDigits) {
|
---|
466 | const charIndex = currencyCharIndex >= selectionStart ? currencyCharIndex - 1 : (suffixCharIndex >= selectionStart ? suffixCharIndex : inputValue.length);
|
---|
467 | newValueStr = inputValue.slice(0, selectionStart) + text + inputValue.slice(selectionStart + text.length, charIndex) + inputValue.slice(charIndex);
|
---|
468 | this.updateValue(event, newValueStr, text, operation);
|
---|
469 | }
|
---|
470 | }
|
---|
471 | else {
|
---|
472 | newValueStr = this.insertText(inputValue, text, selectionStart, selectionEnd);
|
---|
473 | this.updateValue(event, newValueStr, text, operation);
|
---|
474 | }
|
---|
475 | }
|
---|
476 | }
|
---|
477 | insertText(value, text, start, end) {
|
---|
478 | let textSplit = text === '.' ? text : text.split('.');
|
---|
479 | if (textSplit.length === 2) {
|
---|
480 | const decimalCharIndex = value.slice(start, end).search(this._decimal);
|
---|
481 | this._decimal.lastIndex = 0;
|
---|
482 | return (decimalCharIndex > 0) ? value.slice(0, start) + this.formatValue(text) + value.slice(end) : (value || this.formatValue(text));
|
---|
483 | }
|
---|
484 | else if ((end - start) === value.length) {
|
---|
485 | return this.formatValue(text);
|
---|
486 | }
|
---|
487 | else if (start === 0) {
|
---|
488 | return text + value.slice(end);
|
---|
489 | }
|
---|
490 | else if (end === value.length) {
|
---|
491 | return value.slice(0, start) + text;
|
---|
492 | }
|
---|
493 | else {
|
---|
494 | return value.slice(0, start) + text + value.slice(end);
|
---|
495 | }
|
---|
496 | }
|
---|
497 | deleteRange(value, start, end) {
|
---|
498 | let newValueStr;
|
---|
499 | if ((end - start) === value.length)
|
---|
500 | newValueStr = '';
|
---|
501 | else if (start === 0)
|
---|
502 | newValueStr = value.slice(end);
|
---|
503 | else if (end === value.length)
|
---|
504 | newValueStr = value.slice(0, start);
|
---|
505 | else
|
---|
506 | newValueStr = value.slice(0, start) + value.slice(end);
|
---|
507 | return newValueStr;
|
---|
508 | }
|
---|
509 | initCursor() {
|
---|
510 | let selectionStart = this.input.nativeElement.selectionStart;
|
---|
511 | let inputValue = this.input.nativeElement.value;
|
---|
512 | let valueLength = inputValue.length;
|
---|
513 | let index = null;
|
---|
514 | // remove prefix
|
---|
515 | let prefixLength = (this.prefixChar || '').length;
|
---|
516 | inputValue = inputValue.replace(this._prefix, '');
|
---|
517 | selectionStart = selectionStart - prefixLength;
|
---|
518 | let char = inputValue.charAt(selectionStart);
|
---|
519 | if (this.isNumeralChar(char)) {
|
---|
520 | return selectionStart + prefixLength;
|
---|
521 | }
|
---|
522 | //left
|
---|
523 | let i = selectionStart - 1;
|
---|
524 | while (i >= 0) {
|
---|
525 | char = inputValue.charAt(i);
|
---|
526 | if (this.isNumeralChar(char)) {
|
---|
527 | index = i + prefixLength;
|
---|
528 | break;
|
---|
529 | }
|
---|
530 | else {
|
---|
531 | i--;
|
---|
532 | }
|
---|
533 | }
|
---|
534 | if (index !== null) {
|
---|
535 | this.input.nativeElement.setSelectionRange(index + 1, index + 1);
|
---|
536 | }
|
---|
537 | else {
|
---|
538 | i = selectionStart;
|
---|
539 | while (i < valueLength) {
|
---|
540 | char = inputValue.charAt(i);
|
---|
541 | if (this.isNumeralChar(char)) {
|
---|
542 | index = i + prefixLength;
|
---|
543 | break;
|
---|
544 | }
|
---|
545 | else {
|
---|
546 | i++;
|
---|
547 | }
|
---|
548 | }
|
---|
549 | if (index !== null) {
|
---|
550 | this.input.nativeElement.setSelectionRange(index, index);
|
---|
551 | }
|
---|
552 | }
|
---|
553 | return index || 0;
|
---|
554 | }
|
---|
555 | onInputClick() {
|
---|
556 | this.initCursor();
|
---|
557 | }
|
---|
558 | isNumeralChar(char) {
|
---|
559 | if (char.length === 1 && (this._numeral.test(char) || this._decimal.test(char) || this._group.test(char) || this._minusSign.test(char))) {
|
---|
560 | this.resetRegex();
|
---|
561 | return true;
|
---|
562 | }
|
---|
563 | return false;
|
---|
564 | }
|
---|
565 | resetRegex() {
|
---|
566 | this._numeral.lastIndex = 0;
|
---|
567 | this._decimal.lastIndex = 0;
|
---|
568 | this._group.lastIndex = 0;
|
---|
569 | this._minusSign.lastIndex = 0;
|
---|
570 | }
|
---|
571 | updateValue(event, valueStr, insertedValueStr, operation) {
|
---|
572 | let currentValue = this.input.nativeElement.value;
|
---|
573 | let newValue = null;
|
---|
574 | if (valueStr != null) {
|
---|
575 | newValue = this.parseValue(valueStr);
|
---|
576 | newValue = !newValue && !this.allowEmpty ? 0 : newValue;
|
---|
577 | this.updateInput(newValue, insertedValueStr, operation, valueStr);
|
---|
578 | this.handleOnInput(event, currentValue, newValue);
|
---|
579 | }
|
---|
580 | }
|
---|
581 | handleOnInput(event, currentValue, newValue) {
|
---|
582 | if (this.isValueChanged(currentValue, newValue)) {
|
---|
583 | this.onInput.emit({ originalEvent: event, value: newValue });
|
---|
584 | }
|
---|
585 | }
|
---|
586 | isValueChanged(currentValue, newValue) {
|
---|
587 | if (newValue === null && currentValue !== null) {
|
---|
588 | return true;
|
---|
589 | }
|
---|
590 | if (newValue != null) {
|
---|
591 | let parsedCurrentValue = (typeof currentValue === 'string') ? this.parseValue(currentValue) : currentValue;
|
---|
592 | return newValue !== parsedCurrentValue;
|
---|
593 | }
|
---|
594 | return false;
|
---|
595 | }
|
---|
596 | validateValue(value) {
|
---|
597 | if (value === '-' || value == null) {
|
---|
598 | return null;
|
---|
599 | }
|
---|
600 | if (this.min != null && value < this.min) {
|
---|
601 | return this.min;
|
---|
602 | }
|
---|
603 | if (this.max != null && value > this.max) {
|
---|
604 | return this.max;
|
---|
605 | }
|
---|
606 | return value;
|
---|
607 | }
|
---|
608 | updateInput(value, insertedValueStr, operation, valueStr) {
|
---|
609 | insertedValueStr = insertedValueStr || '';
|
---|
610 | let inputValue = this.input.nativeElement.value;
|
---|
611 | let newValue = this.formatValue(value);
|
---|
612 | let currentLength = inputValue.length;
|
---|
613 | if (newValue !== valueStr) {
|
---|
614 | newValue = this.concatValues(newValue, valueStr);
|
---|
615 | }
|
---|
616 | if (currentLength === 0) {
|
---|
617 | this.input.nativeElement.value = newValue;
|
---|
618 | this.input.nativeElement.setSelectionRange(0, 0);
|
---|
619 | const index = this.initCursor();
|
---|
620 | const selectionEnd = index + insertedValueStr.length;
|
---|
621 | this.input.nativeElement.setSelectionRange(selectionEnd, selectionEnd);
|
---|
622 | }
|
---|
623 | else {
|
---|
624 | let selectionStart = this.input.nativeElement.selectionStart;
|
---|
625 | let selectionEnd = this.input.nativeElement.selectionEnd;
|
---|
626 | if (this.maxlength && this.maxlength < newValue.length) {
|
---|
627 | return;
|
---|
628 | }
|
---|
629 | this.input.nativeElement.value = newValue;
|
---|
630 | let newLength = newValue.length;
|
---|
631 | if (operation === 'range-insert') {
|
---|
632 | const startValue = this.parseValue((inputValue || '').slice(0, selectionStart));
|
---|
633 | const startValueStr = startValue !== null ? startValue.toString() : '';
|
---|
634 | const startExpr = startValueStr.split('').join(`(${this.groupChar})?`);
|
---|
635 | const sRegex = new RegExp(startExpr, 'g');
|
---|
636 | sRegex.test(newValue);
|
---|
637 | const tExpr = insertedValueStr.split('').join(`(${this.groupChar})?`);
|
---|
638 | const tRegex = new RegExp(tExpr, 'g');
|
---|
639 | tRegex.test(newValue.slice(sRegex.lastIndex));
|
---|
640 | selectionEnd = sRegex.lastIndex + tRegex.lastIndex;
|
---|
641 | this.input.nativeElement.setSelectionRange(selectionEnd, selectionEnd);
|
---|
642 | }
|
---|
643 | else if (newLength === currentLength) {
|
---|
644 | if (operation === 'insert' || operation === 'delete-back-single')
|
---|
645 | this.input.nativeElement.setSelectionRange(selectionEnd + 1, selectionEnd + 1);
|
---|
646 | else if (operation === 'delete-single')
|
---|
647 | this.input.nativeElement.setSelectionRange(selectionEnd - 1, selectionEnd - 1);
|
---|
648 | else if (operation === 'delete-range' || operation === 'spin')
|
---|
649 | this.input.nativeElement.setSelectionRange(selectionEnd, selectionEnd);
|
---|
650 | }
|
---|
651 | else if (operation === 'delete-back-single') {
|
---|
652 | let prevChar = inputValue.charAt(selectionEnd - 1);
|
---|
653 | let nextChar = inputValue.charAt(selectionEnd);
|
---|
654 | let diff = currentLength - newLength;
|
---|
655 | let isGroupChar = this._group.test(nextChar);
|
---|
656 | if (isGroupChar && diff === 1) {
|
---|
657 | selectionEnd += 1;
|
---|
658 | }
|
---|
659 | else if (!isGroupChar && this.isNumeralChar(prevChar)) {
|
---|
660 | selectionEnd += (-1 * diff) + 1;
|
---|
661 | }
|
---|
662 | this._group.lastIndex = 0;
|
---|
663 | this.input.nativeElement.setSelectionRange(selectionEnd, selectionEnd);
|
---|
664 | }
|
---|
665 | else if (inputValue === '-' && operation === 'insert') {
|
---|
666 | this.input.nativeElement.setSelectionRange(0, 0);
|
---|
667 | const index = this.initCursor();
|
---|
668 | const selectionEnd = index + insertedValueStr.length + 1;
|
---|
669 | this.input.nativeElement.setSelectionRange(selectionEnd, selectionEnd);
|
---|
670 | }
|
---|
671 | else {
|
---|
672 | selectionEnd = selectionEnd + (newLength - currentLength);
|
---|
673 | this.input.nativeElement.setSelectionRange(selectionEnd, selectionEnd);
|
---|
674 | }
|
---|
675 | }
|
---|
676 | this.input.nativeElement.setAttribute('aria-valuenow', value);
|
---|
677 | }
|
---|
678 | concatValues(val1, val2) {
|
---|
679 | if (val1 && val2) {
|
---|
680 | let decimalCharIndex = val2.search(this._decimal);
|
---|
681 | this._decimal.lastIndex = 0;
|
---|
682 | return decimalCharIndex !== -1 ? (val1.split(this._decimal)[0] + val2.slice(decimalCharIndex)) : val1;
|
---|
683 | }
|
---|
684 | return val1;
|
---|
685 | }
|
---|
686 | getDecimalLength(value) {
|
---|
687 | if (value) {
|
---|
688 | const valueSplit = value.split(this._decimal);
|
---|
689 | if (valueSplit.length === 2) {
|
---|
690 | return valueSplit[1].replace(this._suffix, '')
|
---|
691 | .trim()
|
---|
692 | .replace(/\s/g, '')
|
---|
693 | .replace(this._currency, '').length;
|
---|
694 | }
|
---|
695 | }
|
---|
696 | return 0;
|
---|
697 | }
|
---|
698 | onInputFocus(event) {
|
---|
699 | this.focused = true;
|
---|
700 | this.onFocus.emit(event);
|
---|
701 | }
|
---|
702 | onInputBlur(event) {
|
---|
703 | this.focused = false;
|
---|
704 | let newValue = this.validateValue(this.parseValue(this.input.nativeElement.value));
|
---|
705 | this.input.nativeElement.value = this.formatValue(newValue);
|
---|
706 | this.input.nativeElement.setAttribute('aria-valuenow', newValue);
|
---|
707 | this.updateModel(event, newValue);
|
---|
708 | this.onBlur.emit(event);
|
---|
709 | }
|
---|
710 | formattedValue() {
|
---|
711 | const val = !this.value && !this.allowEmpty ? 0 : this.value;
|
---|
712 | return this.formatValue(val);
|
---|
713 | }
|
---|
714 | updateModel(event, value) {
|
---|
715 | if (this.value !== value) {
|
---|
716 | this.value = value;
|
---|
717 | this.onModelChange(value);
|
---|
718 | }
|
---|
719 | this.onModelTouched();
|
---|
720 | }
|
---|
721 | writeValue(value) {
|
---|
722 | this.value = value;
|
---|
723 | this.cd.markForCheck();
|
---|
724 | }
|
---|
725 | registerOnChange(fn) {
|
---|
726 | this.onModelChange = fn;
|
---|
727 | }
|
---|
728 | registerOnTouched(fn) {
|
---|
729 | this.onModelTouched = fn;
|
---|
730 | }
|
---|
731 | setDisabledState(val) {
|
---|
732 | this.disabled = val;
|
---|
733 | this.cd.markForCheck();
|
---|
734 | }
|
---|
735 | get filled() {
|
---|
736 | return (this.value != null && this.value.toString().length > 0);
|
---|
737 | }
|
---|
738 | clearTimer() {
|
---|
739 | if (this.timer) {
|
---|
740 | clearInterval(this.timer);
|
---|
741 | }
|
---|
742 | }
|
---|
743 | getFormatter() {
|
---|
744 | return this.numberFormat;
|
---|
745 | }
|
---|
746 | }
|
---|
747 | InputNumber.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: InputNumber, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
---|
748 | InputNumber.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: InputNumber, selector: "p-inputNumber", inputs: { showButtons: "showButtons", format: "format", buttonLayout: "buttonLayout", inputId: "inputId", styleClass: "styleClass", style: "style", placeholder: "placeholder", size: "size", maxlength: "maxlength", tabindex: "tabindex", title: "title", ariaLabel: "ariaLabel", ariaRequired: "ariaRequired", name: "name", required: "required", autocomplete: "autocomplete", min: "min", max: "max", incrementButtonClass: "incrementButtonClass", decrementButtonClass: "decrementButtonClass", incrementButtonIcon: "incrementButtonIcon", decrementButtonIcon: "decrementButtonIcon", readonly: "readonly", step: "step", allowEmpty: "allowEmpty", locale: "locale", localeMatcher: "localeMatcher", mode: "mode", currency: "currency", currencyDisplay: "currencyDisplay", useGrouping: "useGrouping", minFractionDigits: "minFractionDigits", maxFractionDigits: "maxFractionDigits", prefix: "prefix", suffix: "suffix", inputStyle: "inputStyle", inputStyleClass: "inputStyleClass", disabled: "disabled" }, outputs: { onInput: "onInput", onFocus: "onFocus", onBlur: "onBlur", onKeyDown: "onKeyDown" }, host: { properties: { "class.p-inputwrapper-filled": "filled", "class.p-inputwrapper-focus": "focused" }, classAttribute: "p-element p-inputwrapper" }, providers: [INPUTNUMBER_VALUE_ACCESSOR], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
---|
749 | <span [ngClass]="{'p-inputnumber p-component': true,'p-inputnumber-buttons-stacked': this.showButtons && this.buttonLayout === 'stacked',
|
---|
750 | 'p-inputnumber-buttons-horizontal': this.showButtons && this.buttonLayout === 'horizontal', 'p-inputnumber-buttons-vertical': this.showButtons && this.buttonLayout === 'vertical'}"
|
---|
751 | [ngStyle]="style" [class]="styleClass">
|
---|
752 | <input #input [ngClass]="'p-inputnumber-input'" [ngStyle]="inputStyle" [class]="inputStyleClass" pInputText [value]="formattedValue()" [attr.placeholder]="placeholder" [attr.title]="title" [attr.id]="inputId"
|
---|
753 | [attr.size]="size" [attr.name]="name" [attr.autocomplete]="autocomplete" [attr.maxlength]="maxlength" [attr.tabindex]="tabindex" [attr.aria-label]="ariaLabel"
|
---|
754 | [attr.aria-required]="ariaRequired" [disabled]="disabled" [attr.required]="required" [attr.aria-valuemin]="min" [attr.aria-valuemax]="max" [readonly]="readonly" inputmode="decimal"
|
---|
755 | (input)="onUserInput($event)" (keydown)="onInputKeyDown($event)" (keypress)="onInputKeyPress($event)" (paste)="onPaste($event)" (click)="onInputClick()"
|
---|
756 | (focus)="onInputFocus($event)" (blur)="onInputBlur($event)">
|
---|
757 | <span class="p-inputnumber-button-group" *ngIf="showButtons && buttonLayout === 'stacked'">
|
---|
758 | <button type="button" pButton [ngClass]="{'p-inputnumber-button p-inputnumber-button-up': true}" [class]="incrementButtonClass" [icon]="incrementButtonIcon" [disabled]="disabled"
|
---|
759 | (mousedown)="this.onUpButtonMouseDown($event)" (mouseup)="onUpButtonMouseUp()" (mouseleave)="onUpButtonMouseLeave()" (keydown)="onUpButtonKeyDown($event)" (keyup)="onUpButtonKeyUp()"></button>
|
---|
760 | <button type="button" pButton [ngClass]="{'p-inputnumber-button p-inputnumber-button-down': true}" [class]="decrementButtonClass" [icon]="decrementButtonIcon" [disabled]="disabled"
|
---|
761 | (mousedown)="this.onDownButtonMouseDown($event)" (mouseup)="onDownButtonMouseUp()" (mouseleave)="onDownButtonMouseLeave()" (keydown)="onDownButtonKeyDown($event)" (keyup)="onDownButtonKeyUp()"></button>
|
---|
762 | </span>
|
---|
763 | <button type="button" pButton [ngClass]="{'p-inputnumber-button p-inputnumber-button-up': true}" [class]="incrementButtonClass" [icon]="incrementButtonIcon" *ngIf="showButtons && buttonLayout !== 'stacked'" [disabled]="disabled"
|
---|
764 | (mousedown)="this.onUpButtonMouseDown($event)" (mouseup)="onUpButtonMouseUp()" (mouseleave)="onUpButtonMouseLeave()" (keydown)="onUpButtonKeyDown($event)" (keyup)="onUpButtonKeyUp()"></button>
|
---|
765 | <button type="button" pButton [ngClass]="{'p-inputnumber-button p-inputnumber-button-down': true}" [class]="decrementButtonClass" [icon]="decrementButtonIcon" *ngIf="showButtons && buttonLayout !== 'stacked'" [disabled]="disabled"
|
---|
766 | (mousedown)="this.onDownButtonMouseDown($event)" (mouseup)="onDownButtonMouseUp()" (mouseleave)="onDownButtonMouseLeave()" (keydown)="onDownButtonKeyDown($event)" (keyup)="onDownButtonKeyUp()"></button>
|
---|
767 | </span>
|
---|
768 | `, isInline: true, styles: ["p-inputnumber,.p-inputnumber{display:inline-flex}.p-inputnumber-button{display:flex;align-items:center;justify-content:center;flex:0 0 auto}.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button .p-button-label,.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button .p-button-label{display:none}.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-up{border-top-left-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0;padding:0}.p-inputnumber-buttons-stacked .p-inputnumber-input{border-top-right-radius:0;border-bottom-right-radius:0}.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-down{border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:0;padding:0}.p-inputnumber-buttons-stacked .p-inputnumber-button-group{display:flex;flex-direction:column}.p-inputnumber-buttons-stacked .p-inputnumber-button-group .p-button.p-inputnumber-button{flex:1 1 auto}.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-up{order:3;border-top-left-radius:0;border-bottom-left-radius:0}.p-inputnumber-buttons-horizontal .p-inputnumber-input{order:2;border-radius:0}.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-down{order:1;border-top-right-radius:0;border-bottom-right-radius:0}.p-inputnumber-buttons-vertical{flex-direction:column}.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-up{order:1;border-bottom-left-radius:0;border-bottom-right-radius:0;width:100%}.p-inputnumber-buttons-vertical .p-inputnumber-input{order:2;border-radius:0;text-align:center}.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-down{order:3;border-top-left-radius:0;border-top-right-radius:0;width:100%}.p-inputnumber-input{flex:1 1 auto}.p-fluid p-inputnumber,.p-fluid .p-inputnumber{width:100%}.p-fluid .p-inputnumber .p-inputnumber-input{width:1%}.p-fluid .p-inputnumber-buttons-vertical .p-inputnumber-input{width:100%}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2.InputText, selector: "[pInputText]" }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
---|
769 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: InputNumber, decorators: [{
|
---|
770 | type: Component,
|
---|
771 | args: [{ selector: 'p-inputNumber', template: `
|
---|
772 | <span [ngClass]="{'p-inputnumber p-component': true,'p-inputnumber-buttons-stacked': this.showButtons && this.buttonLayout === 'stacked',
|
---|
773 | 'p-inputnumber-buttons-horizontal': this.showButtons && this.buttonLayout === 'horizontal', 'p-inputnumber-buttons-vertical': this.showButtons && this.buttonLayout === 'vertical'}"
|
---|
774 | [ngStyle]="style" [class]="styleClass">
|
---|
775 | <input #input [ngClass]="'p-inputnumber-input'" [ngStyle]="inputStyle" [class]="inputStyleClass" pInputText [value]="formattedValue()" [attr.placeholder]="placeholder" [attr.title]="title" [attr.id]="inputId"
|
---|
776 | [attr.size]="size" [attr.name]="name" [attr.autocomplete]="autocomplete" [attr.maxlength]="maxlength" [attr.tabindex]="tabindex" [attr.aria-label]="ariaLabel"
|
---|
777 | [attr.aria-required]="ariaRequired" [disabled]="disabled" [attr.required]="required" [attr.aria-valuemin]="min" [attr.aria-valuemax]="max" [readonly]="readonly" inputmode="decimal"
|
---|
778 | (input)="onUserInput($event)" (keydown)="onInputKeyDown($event)" (keypress)="onInputKeyPress($event)" (paste)="onPaste($event)" (click)="onInputClick()"
|
---|
779 | (focus)="onInputFocus($event)" (blur)="onInputBlur($event)">
|
---|
780 | <span class="p-inputnumber-button-group" *ngIf="showButtons && buttonLayout === 'stacked'">
|
---|
781 | <button type="button" pButton [ngClass]="{'p-inputnumber-button p-inputnumber-button-up': true}" [class]="incrementButtonClass" [icon]="incrementButtonIcon" [disabled]="disabled"
|
---|
782 | (mousedown)="this.onUpButtonMouseDown($event)" (mouseup)="onUpButtonMouseUp()" (mouseleave)="onUpButtonMouseLeave()" (keydown)="onUpButtonKeyDown($event)" (keyup)="onUpButtonKeyUp()"></button>
|
---|
783 | <button type="button" pButton [ngClass]="{'p-inputnumber-button p-inputnumber-button-down': true}" [class]="decrementButtonClass" [icon]="decrementButtonIcon" [disabled]="disabled"
|
---|
784 | (mousedown)="this.onDownButtonMouseDown($event)" (mouseup)="onDownButtonMouseUp()" (mouseleave)="onDownButtonMouseLeave()" (keydown)="onDownButtonKeyDown($event)" (keyup)="onDownButtonKeyUp()"></button>
|
---|
785 | </span>
|
---|
786 | <button type="button" pButton [ngClass]="{'p-inputnumber-button p-inputnumber-button-up': true}" [class]="incrementButtonClass" [icon]="incrementButtonIcon" *ngIf="showButtons && buttonLayout !== 'stacked'" [disabled]="disabled"
|
---|
787 | (mousedown)="this.onUpButtonMouseDown($event)" (mouseup)="onUpButtonMouseUp()" (mouseleave)="onUpButtonMouseLeave()" (keydown)="onUpButtonKeyDown($event)" (keyup)="onUpButtonKeyUp()"></button>
|
---|
788 | <button type="button" pButton [ngClass]="{'p-inputnumber-button p-inputnumber-button-down': true}" [class]="decrementButtonClass" [icon]="decrementButtonIcon" *ngIf="showButtons && buttonLayout !== 'stacked'" [disabled]="disabled"
|
---|
789 | (mousedown)="this.onDownButtonMouseDown($event)" (mouseup)="onDownButtonMouseUp()" (mouseleave)="onDownButtonMouseLeave()" (keydown)="onDownButtonKeyDown($event)" (keyup)="onDownButtonKeyUp()"></button>
|
---|
790 | </span>
|
---|
791 | `, changeDetection: ChangeDetectionStrategy.OnPush, providers: [INPUTNUMBER_VALUE_ACCESSOR], encapsulation: ViewEncapsulation.None, host: {
|
---|
792 | 'class': 'p-element p-inputwrapper',
|
---|
793 | '[class.p-inputwrapper-filled]': 'filled',
|
---|
794 | '[class.p-inputwrapper-focus]': 'focused'
|
---|
795 | }, styles: ["p-inputnumber,.p-inputnumber{display:inline-flex}.p-inputnumber-button{display:flex;align-items:center;justify-content:center;flex:0 0 auto}.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button .p-button-label,.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button .p-button-label{display:none}.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-up{border-top-left-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0;padding:0}.p-inputnumber-buttons-stacked .p-inputnumber-input{border-top-right-radius:0;border-bottom-right-radius:0}.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-down{border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:0;padding:0}.p-inputnumber-buttons-stacked .p-inputnumber-button-group{display:flex;flex-direction:column}.p-inputnumber-buttons-stacked .p-inputnumber-button-group .p-button.p-inputnumber-button{flex:1 1 auto}.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-up{order:3;border-top-left-radius:0;border-bottom-left-radius:0}.p-inputnumber-buttons-horizontal .p-inputnumber-input{order:2;border-radius:0}.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-down{order:1;border-top-right-radius:0;border-bottom-right-radius:0}.p-inputnumber-buttons-vertical{flex-direction:column}.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-up{order:1;border-bottom-left-radius:0;border-bottom-right-radius:0;width:100%}.p-inputnumber-buttons-vertical .p-inputnumber-input{order:2;border-radius:0;text-align:center}.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-down{order:3;border-top-left-radius:0;border-top-right-radius:0;width:100%}.p-inputnumber-input{flex:1 1 auto}.p-fluid p-inputnumber,.p-fluid .p-inputnumber{width:100%}.p-fluid .p-inputnumber .p-inputnumber-input{width:1%}.p-fluid .p-inputnumber-buttons-vertical .p-inputnumber-input{width:100%}\n"] }]
|
---|
796 | }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { showButtons: [{
|
---|
797 | type: Input
|
---|
798 | }], format: [{
|
---|
799 | type: Input
|
---|
800 | }], buttonLayout: [{
|
---|
801 | type: Input
|
---|
802 | }], inputId: [{
|
---|
803 | type: Input
|
---|
804 | }], styleClass: [{
|
---|
805 | type: Input
|
---|
806 | }], style: [{
|
---|
807 | type: Input
|
---|
808 | }], placeholder: [{
|
---|
809 | type: Input
|
---|
810 | }], size: [{
|
---|
811 | type: Input
|
---|
812 | }], maxlength: [{
|
---|
813 | type: Input
|
---|
814 | }], tabindex: [{
|
---|
815 | type: Input
|
---|
816 | }], title: [{
|
---|
817 | type: Input
|
---|
818 | }], ariaLabel: [{
|
---|
819 | type: Input
|
---|
820 | }], ariaRequired: [{
|
---|
821 | type: Input
|
---|
822 | }], name: [{
|
---|
823 | type: Input
|
---|
824 | }], required: [{
|
---|
825 | type: Input
|
---|
826 | }], autocomplete: [{
|
---|
827 | type: Input
|
---|
828 | }], min: [{
|
---|
829 | type: Input
|
---|
830 | }], max: [{
|
---|
831 | type: Input
|
---|
832 | }], incrementButtonClass: [{
|
---|
833 | type: Input
|
---|
834 | }], decrementButtonClass: [{
|
---|
835 | type: Input
|
---|
836 | }], incrementButtonIcon: [{
|
---|
837 | type: Input
|
---|
838 | }], decrementButtonIcon: [{
|
---|
839 | type: Input
|
---|
840 | }], readonly: [{
|
---|
841 | type: Input
|
---|
842 | }], step: [{
|
---|
843 | type: Input
|
---|
844 | }], allowEmpty: [{
|
---|
845 | type: Input
|
---|
846 | }], locale: [{
|
---|
847 | type: Input
|
---|
848 | }], localeMatcher: [{
|
---|
849 | type: Input
|
---|
850 | }], mode: [{
|
---|
851 | type: Input
|
---|
852 | }], currency: [{
|
---|
853 | type: Input
|
---|
854 | }], currencyDisplay: [{
|
---|
855 | type: Input
|
---|
856 | }], useGrouping: [{
|
---|
857 | type: Input
|
---|
858 | }], minFractionDigits: [{
|
---|
859 | type: Input
|
---|
860 | }], maxFractionDigits: [{
|
---|
861 | type: Input
|
---|
862 | }], prefix: [{
|
---|
863 | type: Input
|
---|
864 | }], suffix: [{
|
---|
865 | type: Input
|
---|
866 | }], inputStyle: [{
|
---|
867 | type: Input
|
---|
868 | }], inputStyleClass: [{
|
---|
869 | type: Input
|
---|
870 | }], input: [{
|
---|
871 | type: ViewChild,
|
---|
872 | args: ['input']
|
---|
873 | }], onInput: [{
|
---|
874 | type: Output
|
---|
875 | }], onFocus: [{
|
---|
876 | type: Output
|
---|
877 | }], onBlur: [{
|
---|
878 | type: Output
|
---|
879 | }], onKeyDown: [{
|
---|
880 | type: Output
|
---|
881 | }], disabled: [{
|
---|
882 | type: Input
|
---|
883 | }] } });
|
---|
884 | export class InputNumberModule {
|
---|
885 | }
|
---|
886 | InputNumberModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: InputNumberModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
---|
887 | InputNumberModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: InputNumberModule, declarations: [InputNumber], imports: [CommonModule, InputTextModule, ButtonModule], exports: [InputNumber] });
|
---|
888 | InputNumberModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: InputNumberModule, imports: [[CommonModule, InputTextModule, ButtonModule]] });
|
---|
889 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: InputNumberModule, decorators: [{
|
---|
890 | type: NgModule,
|
---|
891 | args: [{
|
---|
892 | imports: [CommonModule, InputTextModule, ButtonModule],
|
---|
893 | exports: [InputNumber],
|
---|
894 | declarations: [InputNumber]
|
---|
895 | }]
|
---|
896 | }] });
|
---|
897 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXRudW1iZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL2NvbXBvbmVudHMvaW5wdXRudW1iZXIvaW5wdXRudW1iZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFDLFFBQVEsRUFBQyxTQUFTLEVBQUMsdUJBQXVCLEVBQUUsS0FBSyxFQUFjLFNBQVMsRUFBVSxZQUFZLEVBQUUsTUFBTSxFQUFFLFVBQVUsRUFBRSxpQkFBaUIsRUFBbUMsTUFBTSxlQUFlLENBQUM7QUFDdE0sT0FBTyxFQUFDLFlBQVksRUFBQyxNQUFNLGlCQUFpQixDQUFDO0FBQzdDLE9BQU8sRUFBQyxlQUFlLEVBQUMsTUFBTSxtQkFBbUIsQ0FBQztBQUNsRCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDOUMsT0FBTyxFQUFFLGlCQUFpQixFQUF3QixNQUFNLGdCQUFnQixDQUFDOzs7OztBQUV6RSxNQUFNLENBQUMsTUFBTSwwQkFBMEIsR0FBUTtJQUMzQyxPQUFPLEVBQUUsaUJBQWlCO0lBQzFCLFdBQVcsRUFBRSxVQUFVLENBQUMsR0FBRyxFQUFFLENBQUMsV0FBVyxDQUFDO0lBQzFDLEtBQUssRUFBRSxJQUFJO0NBQ2QsQ0FBQztBQWtDRixNQUFNLE9BQU8sV0FBVztJQThJc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0b25LZXlEb3duKCRldmVudClcIiAoa2V5dXApPVwib25VcEJ1dHRvbktleVVwKClcIj48L2J1dHRvbj5cbiAgICAgICAgICAgICAgICA8YnV0dG9uIHR5cGU9XCJidXR0b25cIiBwQnV0dG9uIFtuZ0NsYXNzXT1cInsncC1pbnB1dG51bWJlci1idXR0b24gcC1pbnB1dG51bWJlci1idXR0b24tZG93bic6IHRydWV9XCIgW2NsYXNzXT1cImRlY3JlbWVudEJ1dHRvbkNsYXNzXCIgW2ljb25dPVwiZGVjcmVtZW50QnV0dG9uSWNvblwiIFtkaXNhYmxlZF09XCJkaXNhYmxlZFwiXG4gICAgICAgICAgICAgICAgICAgIChtb3VzZWRvd24pPVwidGhpcy5vbkRvd25CdXR0b25Nb3VzZURvd24oJGV2ZW50KVwiIChtb3VzZXVwKT1cIm9uRG93bkJ1dHRvbk1vdXNlVXAoKVwiIChtb3VzZWxlYXZlKT1cIm9uRG93bkJ1dHRvbk1vdXNlTGVhdmUoKVwiIChrZXlkb3duKT1cIm9uRG93bkJ1dHRvbktleURvd24oJGV2ZW50KVwiIChrZXl1cCk9XCJvbkRvd25CdXR0b25LZXlVcCgpXCI+PC9idXR0b24+XG4gICAgICAgICAgICA8L3NwYW4+XG4gICAgICAgICAgICA8YnV0dG9uIHR5cGU9XCJidXR0b25cIiBwQnV0dG9uIFtuZ0NsYXNzXT1cInsncC1pbnB1dG51bWJlci1idXR0b24gcC1pbnB1dG51bWJlci1idXR0b24tdXAnOiB0cnVlfVwiIFtjbGFzc109XCJpbmNyZW1lbnRCdXR0b25DbGFzc1wiIFtpY29uXT1cImluY3JlbWVudEJ1dHRvbkljb25cIiAqbmdJZj1cInNob3dCdXR0b25zICYmIGJ1dHRvbkxheW91dCAhPT0gJ3N0YWNrZWQnXCIgW2Rpc2FibGVkXT1cImRpc2FibGVkXCJcbiAgICAgICAgICAgICAgICAobW91c2Vkb3duKT1cInRoaXMub25VcEJ1dHRvbk1vdXNlRG93bigkZXZlbnQpXCIgKG1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0gZm9ybWF0dGVkVmFsdWUgKyB0aGlzLnN1ZmZpeDtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gZm9ybWF0dGVkVmFsdWU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiB2YWx1ZS50b1N0cmluZygpO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuICcnO1xuICAgIH1cblxuICAgIHBhcnNlVmFsdWUodGV4dCkge1xuICAgICAgICBsZXQgZmlsdGVyZWRUZXh0ID0gdGV4dFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlKHRoaXMuX3N1ZmZpeCwgJycpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UodGhpcy5fcHJlZml4LCAnJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAudHJpbSgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoL1xccy9nLCAnJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSh0aGlzLl9jdXJyZW5jeSwgJycpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UodGhpcy5fZ3JvdXAsICcnKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlKHRoaXMuX21pbnVzU2lnbiwgJy0nKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlKHRoaXMuX2RlY2ltYWwsICcuJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSh0aGlzLl9udW1lcmFsLCB0aGlzLl9pbmRleCk7XG5cbiAgICAgICAgaWYgKGZpbHRlcmVkVGV4dCkge1xuICAgICAgICAgICAgaWYgKGZpbHRlcmVkVGV4dCA9PT0gJy0nKSAvLyBNaW51cyBzaWduXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZpbHRlcmVkVGV4dDtcblxuICAgICAgICAgICAg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O1xuXG4gICAgICAgIGlmIChldmVudC5hbHRLZXkpIHtcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgIH1cblxuICAgICAgICBzd2l0Y2ggKGV2ZW50LndoaWNoKSB7XG4gICAgICAgICAgICAvL3VwXG4gICAgICAgICAgICBjYXNlIDM4OlxuICAgICAgICAgICAgICAgIHRoaXMuc3BpbihldmVudCwgMSk7XG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAvL2Rvd25cbiAgICAgICAgICAgIGNhc2UgNDA6XG4gICAgICAgICAgICAgICAgdGhpcy5zcGluKGV2ZW50LCAtMSk7XG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAvL2xlZnRcbiAgICAgICAgICAgIGNhc2UgMzc6XG4gICAgICAgICAgICAgICAgaWYgKCF0aGlzLmlzTnVtZXJhbENoYXIoaW5wdXRWYWx1ZS5jaGFyQXQoc2VsZWN0aW9uU3RhcnQgLSAxKSkpIHtcbiAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgLy9yaWdodFxuICAgICAgICAgICAgY2FzZSAzOTpcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuaXNOdW1lcmFsQ2hhcihpbnB1dFZhbHVlLmNoYXJBdChzZWxlY3Rpb25TdGFydCkpKSB7XG4gICAgICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIC8vZW50ZXJcbiAgICAgICAgICAgIGNhc2UgMTM6XG4gICAgICAgICAgICAgICA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gICAgIGlmICh0aGlzLl9ncm91cC50ZXN0KGRlbGV0ZUNoYXIpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fZ3JvdXAubGFzdEluZGV4ID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdWYWx1ZVN0ciA9IGlucHV0VmFsdWUuc2xpY2UoMCwgc2VsZWN0aW9uU3RhcnQgLSAyKSArIGlucHV0VmFsdWUuc2xpY2Uoc2VsZWN0aW9uU3RhcnQgLSAxKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuX2RlY2ltYWwudGVzdChkZWxldGVDaGFyKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2RlY2ltYWwubGFzdEluZGV4ID0gMDtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkZWNpbWFsTGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuaW5wdXQubmF0aXZlRWxlbWVudC5zZXRTZWxlY3Rpb25SYW5nZShzZWxlY3Rpb25TdGFydCAtIDEsIHNlbGVjdGlvblN0YXJ0IC0gMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdWYWx1ZVN0ciA9IGlucHV0VmFsdWUuc2xpY2UoMCwgc2VsZWN0aW9uU3RhcnQgLSAxKSArIGlucHV0VmFsdWUuc2xpY2Uoc2VsZWN0aW9uU3RhcnQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGRlY2ltYWxDaGFySW5kZXggPiAwICYmIHNlbGVjdGlvblN0YXJ0ID4gZGVjaW1hbENoYXJJbmRleCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGluc2VydGVkVGV4dCA9IHRoaXMuaXNEZWNpbWFsTW9kZSgpICYmICh0aGlzLm1pbkZyYWN0aW9uRGlnaXRzIHx8IDApIDwgZGVjaW1hbExlbmd0aCA/ICcnIDogJzAnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld1ZhbHVlU3RyID0gaW5wdXRWYWx1ZS5zbGljZSgwLCBzZWxlY3Rpb25TdGFydCAtIDEpICsgaW5zZXJ0ZWRUZXh0ICsgaW5wdXRWYWx1ZS5zbGljZShzZWxlY3Rpb25TdGFydCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChkZWNpbWFsQ2hhckluZGV4V2l0aG91dFByZWZpeCA9PT0gMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld1ZhbHVlU3RyID0gaW5wdXRWYWx1ZS5zbGljZSgwLCBzZWxlY3Rpb25TdGFydCAtIDEpICsgJzAnICsgaW5wdXRWYWx1ZS5zbGljZShzZWxlY3Rpb25TdGFydCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3VmFsdWVTdHIgPSB0aGlzLnBhcnNlVmFsdWUobmV3VmFsdWVTdHIpID4gMCA/IG5ld1ZhbHVlU3RyIDogJyc7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdWYWx1ZVN0ciA9IGlucHV0VmFsdWUuc2xpY2UoMCwgc2VsZWN0aW9uU3RhcnQgLSAxKSArIGlucHV0VmFsdWUuc2xpY2Uoc2VsZWN0aW9uU3RhcnQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgdGhpcy51cGRhdGVWYWx1ZShldmVudCwgbmV3VmFsdWVTdHIsIG51bGwsICdkZWxldGUtc2luZ2xlJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBuZXdWYWx1ZVN0ciA9IHRoaXMuZGVsZXRlUmFuZ2UoaW5wdXRWYWx1ZSwgc2VsZWN0aW9uU3RhcnQsIHNlbGVjdGlvbkVuZCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlVmFsdWUoZXZlbnQsIG5ld1ZhbHVlU3RyLCBudWxsLCAnZGVsZXRlLXJhbmdlJyk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIGRlbFxuICAgICAgICAgICAgY2FzZSA0NjpcbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuXG4gICAgICAgICAgICAgICAgaWYgKHNlbGVjdGlvblN0YXJ0ID09PSBzZWxlY3Rpb25FbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZGVsZXRlQ2hhciA9IGlucHV0VmFsdWUuY2hhckF0KHNlbGVjdGlvblN0YXJ0KTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgeyBkZWNpbWFsQ2hhckluZGV4LCBkZWNpbWFsQ2hhckluZGV4V2l0aG91dFByZWZpeCB9ID0gdGhpcy5nZXREZWNpbWFsQ2hhckluZGV4ZXMoaW5wdXRWYWx1ZSk7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuaXNOdW1lcmFsQ2hhcihkZWxldGVDaGFyKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZGVjaW1hbExlbmd0aCA9IHRoaXMuZ2V0RGVjaW1hbExlbmd0aChpbnB1dFZhbHVlKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2dyb3VwLnRlc3QoZGVsZXRlQ2hhcikpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9ncm91cC5sYXN0SW5kZXggPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld1ZhbHVlU3RyID0gaW5wdXRWYWx1ZS5zbGljZSgwLCBzZWxlY3Rpb25TdGFydCkgKyBpbnB1dFZhbHVlLnNsaWNlKHNlbGVjdGlvblN0YXJ0ICsgMik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICh0aGlzLl9kZWNpbWFsLnRlc3QoZGVsZXRlQ2hhcikpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9kZWNpbWFsLmxhc3RJbmRleCA9IDA7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGVjaW1hbExlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmlucHV0Lm5hdGl2ZUVsZW1lbnQuc2V0U2VsZWN0aW9uUmFuZ2Uoc2VsZWN0aW9uU3RhcnQgKyAxLCBzZWxlY3Rpb25TdGFydCArIDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3VmFsdWVTdHIgPSBpbnB1dFZhbHVlLnNsaWNlKDAsIHNlbGVjdGlvblN0YXJ0KSArIGlucHV0VmFsdWUuc2xpY2Uoc2VsZWN0aW9uU3RhcnQgKyAxKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChkZWNpbWFsQ2hhckluZGV4ID4gMCAmJiBzZWxlY3Rpb25TdGFydCA+IGRlY2ltYWxDaGFySW5kZXgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBpbnNlcnRlZFRleHQgPSB0aGlzLmlzRGVjaW1hbE1vZGUoKSAmJiAodGhpcy5taW5GcmFjdGlvbkRpZ2l0cyB8fCAwKSA8IGRlY2ltYWxMZW5ndGggPyAnJyA6ICcwJztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdWYWx1ZVN0ciA9IGlucHV0VmFsdWUuc2xpY2UoMCwgc2VsZWN0aW9uU3RhcnQpICsgaW5zZXJ0ZWRUZXh0ICsgaW5wdXRWYWx1ZS5zbGljZShzZWxlY3Rpb25TdGFydCArIDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoZGVjaW1hbENoYXJJbmRleFdpdGhvdXRQcmVmaXggPT09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdWYWx1ZVN0ciA9IGlucHV0VmFsdWUuc2xpY2UoMCwgc2VsZWN0aW9uU3RhcnQpICsgJzAnICsgaW5wdXRWYWx1ZS5zbGljZShzZWxlY3Rpb25TdGFydCArIDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld1ZhbHVlU3RyID0gdGhpcy5wYXJzZVZhbHVlKG5ld1ZhbHVlU3RyKSA+IDAgPyBuZXdWYWx1ZVN0ciA6ICcnO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3VmFsdWVTdHIgPSBpbnB1dFZhbHVlLnNsaWNlKDAsIHNlbGVjdGlvblN0YXJ0KSArIGlucHV0VmFsdWUuc2xpY2Uoc2VsZWN0aW9uU3RhcnQgKyAxKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHRoaXMudX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AgICAgfVxuICAgIH1cblxuICAgIG9uUGFzdGUoZXZlbnQpIHtcbiAgICAgICAgaWYgKCF0aGlzLmRpc2FibGVkKSB7XG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgbGV0IGRhdGEgPSAoZXZlbnQuY2xpcGJvYXJkRGF0YSB8fCB3aW5kb3dbJ2NsaXBib2FyZERhdGEnXSkuZ2V0RGF0YSgnVGV4dCcpO1xuICAgICAgICAgICAgaWYgKGRhdGEpIHtcbiAgICAgICAgICAgICAgICBsZXQgZmlsdGVyZWREYXRhID0gdGhpcy5wYXJzZVZhbHVlKGRhdGEpO1xuICAgICAgICAgICAgICAgIGlmIChmaWx0ZXJlZERhdGEgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmluc2VydChldmVudCwgZmlsdGVyZWREYXRhLnRvU3RyaW5nKCkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGFsbG93TWludXNTaWduKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5taW4gPT0gbnVsbCB8fCB0aGlzLm1pbiA8IDA7XG4gICAgfVxuXG4gICAgaXNNaW51c1NpZ24oY2hhcikge1xuICAgICAgICBpZiAodGhpcy5fbWludXNTaWduLnRlc3QoY2hhcikgfHwgY2hhciA9PT0gJy0nKSB7XG4gICAgICAgICAgICB0aGlzLl9taW51c1NpZ24ubGFzdEluZGV4ID0gMDtcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cblxuICAgIGlzRGVjaW1hbFNpZ24oY2hhcikge1xuICAgICAgICBpZiAodGhpcy5fZGVjaW1hbC50ZXN0KGNoYXIpKSB7XG4gICAgICAgICAgICB0aGlzLl9kZWNpbWFsLmxhc3RJbmRleCA9IDA7XG4gICAgICAgICAgICByZXR1cm4gdHJ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cbiAgICAgICAgLy9sZWZ0XG4gICAgICAgIGxldCBpID0gc2VsZWN0aW9uU3RhcnQgLSAxO1xuICAgICAgICB3aGlsZSAoaSA+PSAwKSB7XG4gICAgICAgICAgICBjaGFyID0gaW5wdXRWYWx1ZS5jaGFyQXQoaSk7XG4gICAgICAgICAgICBpZiAodGhpcy5pc051bWVyYWxDaGFyKGNoYXIpKSB7XG4gICAgICAgICAgICAgICAgaW5kZXggPSBpICsgcHJlZml4TGVuZ3RoO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGluZGV4ICE9PSBudWxsKSB7XG4gICAgICAgICAgICB0aGlzLmlucHV0Lm5hdGl2ZUVsZW1lbnQuc2V0U2VsZWN0aW9uUmFuZ2UoaW5kZXggKyAxLCBpbmRleCArIDEpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgaSA9IHNlbGVjdGlvblN0YXJ0O1xuICAgICAgICAgICAgd2hpbGUgKGkgPCB2YWx1ZUxlbmd0aCkge1xuICAgICAgICAgICAgICAgIGNoYXIgPSBpbnB1dFZhbHVlLmNoYXJBdChpKTtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5pc051bWVyYWxDaGFyKGNoYXIpKSB7XG4gICAgICAgICAgICAgICAgICAgIGluZGV4ID0gaSArIHByZWZpeExlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpKys7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoaW5kZXggIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmlucHV0Lm5hdGl2ZUVs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b25FbmQgKz0gMTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoIWlzR3JvdXBDaGFyICYmIHRoaXMuaXNOdW1lcmFsQ2hhcihwcmV2Q2hhcikpIHtcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uRW5kICs9ICgtMSAqIGRpZmYpICsgMTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0aGlzLl9ncm91cC5sYXN0SW5kZXggPSAwO1xuICAgICAgICAgICAgICAgIHRoaXMuaW5wdXQubmF0aXZlRWxlbWVudC5zZXRTZWxlY3Rpb25SYW5nZShzZWxlY3Rpb25FbmQsIHNlbGVjdGlvbkVuZCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChpbnB1dFZhbHVlID09PSAnLScgJiYgb3BlcmF0aW9uID09PSAnaW5zZXJ0Jykge1xuICAgICAgICAgICAgICAgIHRoaXMuaW5wdXQubmF0aXZlRWxlbWVudC5zZXRTZWxlY3Rpb25SYW5nZSgwLCAwKTtcbiAgICAgICAgICAgICAgICBjb25zdCBpbmRleCA9IHRoaXMuaW5pdEN1cnNvcigpO1xuICAgICAgICAgICAgICAgIGNvbnN0IHNlbGVjdGlvbkVuZCA9IGluZGV4ICsgaW5zZXJ0ZWRWYWx1ZVN0ci5sZW5ndGggKyAxO1xuICAgICAgICAgICAgICAgIHRoaXMuaW5wdXQubmF0aXZlRWxlbWVudC5zZXRTZWxlY3Rpb25SYW5nZShzZWxlY3Rpb25FbmQsIHNlbGVjdGlvbkVuZCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBzZWxlY3Rpb25FbmQgPSBzZWxlY3Rpb25FbmQgKyAobmV3TGVuZ3RoIC0gY3VycmVudExlbmd0aCk7XG4gICAgICAgICAgICAgICAgdGhpcy5pbnB1dC5uYXRpdmVFbGVtZW50LnNldFNlbGVjdGlvblJhb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