@masterteam/components 0.0.346 → 0.0.348
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/i18n/ar.json +743 -740
- package/assets/i18n/en.json +743 -740
- package/fesm2022/masterteam-components-business-fields.mjs +2 -2
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-number-field.mjs +368 -4
- package/fesm2022/masterteam-components-number-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-table.mjs +34 -3
- package/fesm2022/masterteam-components-table.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-number-field.d.ts +42 -0
- package/types/masterteam-components-table.d.ts +41 -2
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input,
|
|
2
|
+
import { input, computed, signal, inject, ElementRef, ChangeDetectorRef, effect, DestroyRef, HostBinding, ViewChild, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
4
|
import { NgControl, Validators, FormsModule } from '@angular/forms';
|
|
5
|
+
import { TranslocoPipe } from '@jsverse/transloco';
|
|
5
6
|
import * as i2 from 'primeng/inputnumber';
|
|
6
7
|
import { InputNumberModule } from 'primeng/inputnumber';
|
|
7
8
|
import { FieldValidation } from '@masterteam/components/field-validation';
|
|
@@ -9,6 +10,166 @@ import { newFieldId, isInvalid } from '@masterteam/components';
|
|
|
9
10
|
import { Tooltip } from '@masterteam/components/tooltip';
|
|
10
11
|
import { Icon } from '@masterteam/icons';
|
|
11
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Pure helpers for `mt-number-field`: let a person type or paste a decimal
|
|
15
|
+
* separator in whichever form their keyboard or spreadsheet produces
|
|
16
|
+
* (`.`, `,`, Arabic `٫` / `،`) without PrimeNG silently dropping it.
|
|
17
|
+
*
|
|
18
|
+
* No Angular in here on purpose, so every rule is unit-testable on its own.
|
|
19
|
+
*/
|
|
20
|
+
/** Characters that mean "decimal point" when typed or pasted. */
|
|
21
|
+
const DECIMAL_LOOKALIKES = new Set(['.', ',', '٫', '،']);
|
|
22
|
+
function isDecimalLookalike(char) {
|
|
23
|
+
return DECIMAL_LOOKALIKES.has(char);
|
|
24
|
+
}
|
|
25
|
+
function isMinusChar(char) {
|
|
26
|
+
return char === '-' || char === '−';
|
|
27
|
+
}
|
|
28
|
+
/** Arabic-Indic and Persian digits to ASCII; everything else is left alone. */
|
|
29
|
+
function toAsciiDigits(text) {
|
|
30
|
+
return text.replace(/[٠-٩۰-۹]/g, (ch) => {
|
|
31
|
+
const code = ch.charCodeAt(0);
|
|
32
|
+
return String(code >= 0x6f0 ? code - 0x6f0 : code - 0x660);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The decimal character PrimeNG's `InputNumber` uses for `locale`. It derives
|
|
37
|
+
* it the same way (`Intl`, grouping off), so the two stay in step.
|
|
38
|
+
*/
|
|
39
|
+
function resolveDecimalChar(locale) {
|
|
40
|
+
const part = new Intl.NumberFormat(locale, { useGrouping: false })
|
|
41
|
+
.formatToParts(1.1)
|
|
42
|
+
.find((p) => p.type === 'decimal');
|
|
43
|
+
return part?.value ?? '.';
|
|
44
|
+
}
|
|
45
|
+
const refuse = (reason) => ({ ok: false, reason });
|
|
46
|
+
const escapeRegExp = (text) => text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
47
|
+
/** `1,234,567`: 1-3 digits, then groups of exactly three. */
|
|
48
|
+
const isGrouped = (text, separator) => new RegExp(`^\\d{1,3}(?:${escapeRegExp(separator)}\\d{3})+$`).test(text);
|
|
49
|
+
const count = (text, char) => text.split(char).length - 1;
|
|
50
|
+
/**
|
|
51
|
+
* Reads a pasted number. Returns the canonical ASCII form (`-1234.5`, `.` as
|
|
52
|
+
* the decimal) or a refusal. Ambiguous text is refused rather than guessed, so
|
|
53
|
+
* a paste can never quietly become a different number.
|
|
54
|
+
*
|
|
55
|
+
* - one separator -> a decimal (`2,2` = 2.2)
|
|
56
|
+
* - one separator, but decimals are not allowed -> only `1,234` (a thousands
|
|
57
|
+
* group) is accepted; this is what PrimeNG already did for integer fields
|
|
58
|
+
* - same separator repeated -> thousands, groups of three
|
|
59
|
+
* - two kinds -> the last one is the decimal, the other is thousands
|
|
60
|
+
*/
|
|
61
|
+
function normalizePastedNumber(text, maxFractionDigits) {
|
|
62
|
+
const maxFraction = Number.isFinite(maxFractionDigits)
|
|
63
|
+
? Math.max(0, maxFractionDigits)
|
|
64
|
+
: 0;
|
|
65
|
+
const cleaned = toAsciiDigits(text)
|
|
66
|
+
.replace(/[\s]/g, '')
|
|
67
|
+
.replace(/[−–‐]/g, '-')
|
|
68
|
+
.replace(/٫/g, '.')
|
|
69
|
+
.replace(/[٬،]/g, ',');
|
|
70
|
+
const match = /^(-?)([\d.,]*)$/.exec(cleaned);
|
|
71
|
+
if (!match || !/\d/.test(match[2])) {
|
|
72
|
+
return refuse('invalid');
|
|
73
|
+
}
|
|
74
|
+
const sign = match[1];
|
|
75
|
+
const body = match[2];
|
|
76
|
+
const withFraction = (intPart, fraction) => {
|
|
77
|
+
if (fraction.length > maxFraction) {
|
|
78
|
+
return refuse(maxFraction === 0 ? 'decimals-not-allowed' : 'too-many-decimals');
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
ok: true,
|
|
82
|
+
value: `${sign}${intPart || '0'}${fraction ? `.${fraction}` : ''}`,
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
const dots = count(body, '.');
|
|
86
|
+
const commas = count(body, ',');
|
|
87
|
+
if (dots === 0 && commas === 0) {
|
|
88
|
+
return { ok: true, value: sign + body };
|
|
89
|
+
}
|
|
90
|
+
if (dots > 0 && commas > 0) {
|
|
91
|
+
const decimal = body.lastIndexOf('.') > body.lastIndexOf(',') ? '.' : ',';
|
|
92
|
+
const thousands = decimal === '.' ? ',' : '.';
|
|
93
|
+
if (count(body, decimal) !== 1) {
|
|
94
|
+
return refuse('ambiguous');
|
|
95
|
+
}
|
|
96
|
+
const [intPart, fraction] = body.split(decimal);
|
|
97
|
+
if (!isGrouped(intPart, thousands)) {
|
|
98
|
+
return refuse('ambiguous');
|
|
99
|
+
}
|
|
100
|
+
return withFraction(intPart.split(thousands).join(''), fraction);
|
|
101
|
+
}
|
|
102
|
+
const separator = dots > 0 ? '.' : ',';
|
|
103
|
+
const parts = body.split(separator);
|
|
104
|
+
if (parts.length === 2) {
|
|
105
|
+
const [intPart, fraction] = parts;
|
|
106
|
+
if (maxFraction === 0 &&
|
|
107
|
+
/^\d{1,3}$/.test(intPart) &&
|
|
108
|
+
/^\d{3}$/.test(fraction)) {
|
|
109
|
+
return { ok: true, value: sign + intPart + fraction };
|
|
110
|
+
}
|
|
111
|
+
return withFraction(intPart, fraction);
|
|
112
|
+
}
|
|
113
|
+
if (isGrouped(body, separator)) {
|
|
114
|
+
return { ok: true, value: sign + parts.join('') };
|
|
115
|
+
}
|
|
116
|
+
return refuse('ambiguous');
|
|
117
|
+
}
|
|
118
|
+
const digitCount = (text) => (text.match(/\p{Nd}/gu) ?? []).length;
|
|
119
|
+
/**
|
|
120
|
+
* Safety net for keyboards that insert text without a cancelable event (IME
|
|
121
|
+
* composition, autocorrect). Cleans what was inserted so the field never holds
|
|
122
|
+
* a separator PrimeNG would strip on blur. Returns `null` when nothing needs
|
|
123
|
+
* changing, otherwise the repaired text and where the caret goes.
|
|
124
|
+
*/
|
|
125
|
+
function repairRawValue(edit) {
|
|
126
|
+
const { previous, selectionStart, selectionEnd, current, decimal } = edit;
|
|
127
|
+
const maxFraction = Number.isFinite(edit.maxFractionDigits)
|
|
128
|
+
? Math.max(0, edit.maxFractionDigits)
|
|
129
|
+
: 0;
|
|
130
|
+
const tail = previous.length - selectionEnd;
|
|
131
|
+
const insertedEnd = current.length - tail;
|
|
132
|
+
const before = previous.slice(0, selectionStart);
|
|
133
|
+
const after = previous.slice(selectionEnd);
|
|
134
|
+
const located = tail >= 0 &&
|
|
135
|
+
insertedEnd >= selectionStart &&
|
|
136
|
+
current.startsWith(before) &&
|
|
137
|
+
current.endsWith(after);
|
|
138
|
+
const prefix = located ? before : '';
|
|
139
|
+
const suffix = located ? after : '';
|
|
140
|
+
const inserted = located
|
|
141
|
+
? current.slice(selectionStart, insertedEnd)
|
|
142
|
+
: current;
|
|
143
|
+
let result = prefix;
|
|
144
|
+
let decimalSeen = prefix.includes(decimal) || suffix.includes(decimal);
|
|
145
|
+
for (const raw of inserted) {
|
|
146
|
+
const char = toAsciiDigits(raw);
|
|
147
|
+
if (/[0-9]/.test(char)) {
|
|
148
|
+
const fractionDigits = result.includes(decimal)
|
|
149
|
+
? digitCount(result.slice(result.indexOf(decimal))) + digitCount(suffix)
|
|
150
|
+
: 0;
|
|
151
|
+
if (!result.includes(decimal) || fractionDigits < maxFraction) {
|
|
152
|
+
result += char;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
else if (isDecimalLookalike(raw) || raw === decimal) {
|
|
156
|
+
if (maxFraction > 0 && !decimalSeen) {
|
|
157
|
+
result += decimal;
|
|
158
|
+
decimalSeen = true;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
else if (isMinusChar(raw)) {
|
|
162
|
+
if (edit.allowNegative &&
|
|
163
|
+
result === '' &&
|
|
164
|
+
!isMinusChar(suffix.charAt(0))) {
|
|
165
|
+
result += '-';
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
const value = result + suffix;
|
|
170
|
+
return value === current ? null : { value, caret: result.length };
|
|
171
|
+
}
|
|
172
|
+
|
|
12
173
|
class NumberField {
|
|
13
174
|
inputNumber;
|
|
14
175
|
field = input(true, ...(ngDevMode ? [{ debugName: "field" }] : /* istanbul ignore next */ []));
|
|
@@ -27,8 +188,23 @@ class NumberField {
|
|
|
27
188
|
min = input(-999999999999999, ...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
|
|
28
189
|
max = input(999999999999999, ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
29
190
|
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
191
|
+
/**
|
|
192
|
+
* PrimeNG parses typed text with its locale, but with `format` off it always
|
|
193
|
+
* writes the number back as "1.5". On a browser whose decimal sign is "," the
|
|
194
|
+
* two disagree and "2,2" is corrupted on the next keystroke, so the parsing
|
|
195
|
+
* locale is pinned to en-US in that mode. An explicit `pInputs.locale` wins,
|
|
196
|
+
* and grouping/format-on fields keep the browser locale as before.
|
|
197
|
+
*/
|
|
198
|
+
parseLocale = computed(() => this.pInputs()?.locale ??
|
|
199
|
+
(this.format() || this.useGrouping() ? undefined : 'en-US'), ...(ngDevMode ? [{ debugName: "parseLocale" }] : /* istanbul ignore next */ []));
|
|
200
|
+
/** Set when a pasted number was refused instead of guessed at. */
|
|
201
|
+
pasteRefused = signal(false, ...(ngDevMode ? [{ debugName: "pasteRefused" }] : /* istanbul ignore next */ []));
|
|
30
202
|
styleClass;
|
|
31
203
|
ngControl = inject(NgControl, { self: true });
|
|
204
|
+
host = inject(ElementRef).nativeElement;
|
|
205
|
+
cdr = inject(ChangeDetectorRef);
|
|
206
|
+
/** The input's text and selection just before a native edit. */
|
|
207
|
+
snapshot = null;
|
|
32
208
|
isInvalid = isInvalid;
|
|
33
209
|
requiredValidator = Validators.required;
|
|
34
210
|
value = signal(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
@@ -45,6 +221,21 @@ class NumberField {
|
|
|
45
221
|
this.ngControl.control.updateValueAndValidity();
|
|
46
222
|
}
|
|
47
223
|
});
|
|
224
|
+
// On the host, in the capture phase: runs before PrimeNG's own handlers
|
|
225
|
+
// whatever the registration order, and survives PrimeNG re-rendering its
|
|
226
|
+
// <input>.
|
|
227
|
+
const listeners = new AbortController();
|
|
228
|
+
const on = (type, handler, capture = false) => this.host.addEventListener(type, handler, {
|
|
229
|
+
capture,
|
|
230
|
+
signal: listeners.signal,
|
|
231
|
+
});
|
|
232
|
+
on('keydown', this.onKeyDown, true);
|
|
233
|
+
on('beforeinput', this.onBeforeInput, true);
|
|
234
|
+
on('paste', this.onPaste, true);
|
|
235
|
+
on('compositionstart', this.onCompositionStart, true);
|
|
236
|
+
on('compositionend', this.onCompositionEnd);
|
|
237
|
+
on('input', this.onInput);
|
|
238
|
+
inject(DestroyRef).onDestroy(() => listeners.abort());
|
|
48
239
|
}
|
|
49
240
|
applyInputsToInputNumber() {
|
|
50
241
|
Object.assign(this.inputNumber, this.pInputs());
|
|
@@ -76,18 +267,191 @@ class NumberField {
|
|
|
76
267
|
setDisabledState(disabled) {
|
|
77
268
|
this.disabled.set(disabled);
|
|
78
269
|
}
|
|
270
|
+
onInputBlur() {
|
|
271
|
+
this.pasteRefused.set(false);
|
|
272
|
+
this.onTouched();
|
|
273
|
+
}
|
|
274
|
+
// ---- decimal separator handling ------------------------------------------
|
|
275
|
+
//
|
|
276
|
+
// PrimeNG only inserts a digit, the minus sign or the locale's decimal sign,
|
|
277
|
+
// and strips the grouping sign on paste, so a typed or pasted "," silently
|
|
278
|
+
// vanished ("2,2" became 22). Here "." "," and the Arabic separators all mean
|
|
279
|
+
// "decimal" while grouping is off. Three layers, because keyboards differ:
|
|
280
|
+
// 1. keydown - desktop keyboards.
|
|
281
|
+
// 2. beforeinput - soft keyboards (Android sends no keypress and a
|
|
282
|
+
// keyCode of 229), plus paste/drop.
|
|
283
|
+
// 3. input / compositionend - repair for text the browser inserted that
|
|
284
|
+
// could not be cancelled (IME composition, autocorrect).
|
|
285
|
+
// Typing and pasting both go through PrimeNG's own `insert`, so cursor,
|
|
286
|
+
// selection, decimals limit and the form value behave exactly as typed.
|
|
287
|
+
/** Only plain, writable, grouping-off fields get this handling. */
|
|
288
|
+
isHandling(event) {
|
|
289
|
+
const inner = this.inputNumber;
|
|
290
|
+
const el = inner?.input?.nativeElement;
|
|
291
|
+
return !!el && event.target === el && !inner.useGrouping && !inner.readonly;
|
|
292
|
+
}
|
|
293
|
+
onKeyDown = (event) => {
|
|
294
|
+
const e = event;
|
|
295
|
+
if (!this.isHandling(e)) {
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
this.pasteRefused.set(false);
|
|
299
|
+
// AltGr reports ctrl+alt on Windows; it is how some layouts type symbols.
|
|
300
|
+
const shortcut = e.metaKey || ((e.ctrlKey || e.altKey) && !e.getModifierState('AltGraph'));
|
|
301
|
+
if (e.isComposing || shortcut || !isDecimalLookalike(e.key)) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
e.preventDefault();
|
|
305
|
+
e.stopPropagation();
|
|
306
|
+
this.typeText(e, e.key);
|
|
307
|
+
};
|
|
308
|
+
onBeforeInput = (event) => {
|
|
309
|
+
const e = event;
|
|
310
|
+
if (!this.isHandling(e)) {
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
if (!e.isComposing) {
|
|
314
|
+
this.takeSnapshot();
|
|
315
|
+
}
|
|
316
|
+
if (!e.cancelable || e.isComposing) {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
switch (e.inputType) {
|
|
320
|
+
case 'insertText':
|
|
321
|
+
e.preventDefault();
|
|
322
|
+
e.stopPropagation();
|
|
323
|
+
this.typeText(e, e.data ?? '');
|
|
324
|
+
break;
|
|
325
|
+
case 'insertFromPaste':
|
|
326
|
+
case 'insertFromPasteAsQuotation':
|
|
327
|
+
case 'insertFromDrop':
|
|
328
|
+
e.preventDefault();
|
|
329
|
+
e.stopPropagation();
|
|
330
|
+
this.pasteText(e, e.data ?? e.dataTransfer?.getData('text') ?? '');
|
|
331
|
+
break;
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
onPaste = (event) => {
|
|
335
|
+
if (!this.isHandling(event)) {
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
event.preventDefault();
|
|
339
|
+
event.stopPropagation();
|
|
340
|
+
this.pasteText(event, event.clipboardData?.getData('text') ?? '');
|
|
341
|
+
};
|
|
342
|
+
onCompositionStart = (event) => {
|
|
343
|
+
if (this.isHandling(event)) {
|
|
344
|
+
this.takeSnapshot();
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
onCompositionEnd = (event) => {
|
|
348
|
+
if (this.isHandling(event)) {
|
|
349
|
+
this.reconcile(event);
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
onInput = (event) => {
|
|
353
|
+
if (this.isHandling(event) && !event.isComposing) {
|
|
354
|
+
this.reconcile(event);
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
/**
|
|
358
|
+
* These listeners run outside Angular's template event bindings, so change
|
|
359
|
+
* detection is not forced between keystrokes (and with `eventCoalescing` it
|
|
360
|
+
* is batched to once a frame). PrimeNG binds `[value]="formattedValue()"`, and
|
|
361
|
+
* a stale pass writes that over text PrimeNG added by hand: "3" then "," then
|
|
362
|
+
* "7" arriving inside one frame came out as 37, the "." wiped. Flushing here
|
|
363
|
+
* keeps the bindings current before the next event.
|
|
364
|
+
*/
|
|
365
|
+
refreshView() {
|
|
366
|
+
this.inputNumber.cd.detectChanges();
|
|
367
|
+
this.cdr.detectChanges();
|
|
368
|
+
}
|
|
369
|
+
/** Replays `text` through PrimeNG's typing path, one character at a time. */
|
|
370
|
+
typeText(event, text) {
|
|
371
|
+
const inner = this.inputNumber;
|
|
372
|
+
const decimal = resolveDecimalChar(inner.locale);
|
|
373
|
+
this.pasteRefused.set(false);
|
|
374
|
+
for (const raw of text) {
|
|
375
|
+
const char = toAsciiDigits(raw);
|
|
376
|
+
if (/[0-9]/.test(char)) {
|
|
377
|
+
inner.insert(event, char);
|
|
378
|
+
}
|
|
379
|
+
else if (isDecimalLookalike(raw) || raw === decimal) {
|
|
380
|
+
inner.insert(event, decimal, {
|
|
381
|
+
isDecimalSign: true,
|
|
382
|
+
isMinusSign: false,
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
else if (isMinusChar(raw)) {
|
|
386
|
+
inner.insert(event, '-', { isDecimalSign: false, isMinusSign: true });
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
this.refreshView();
|
|
390
|
+
}
|
|
391
|
+
pasteText(event, text) {
|
|
392
|
+
const result = normalizePastedNumber(text, this.inputNumber.maxFractionDigits ?? 0);
|
|
393
|
+
if (result.ok) {
|
|
394
|
+
this.typeText(event, result.value);
|
|
395
|
+
}
|
|
396
|
+
else {
|
|
397
|
+
// Text with no digits at all is ignored silently, as before.
|
|
398
|
+
this.pasteRefused.set(/\d/.test(toAsciiDigits(text)));
|
|
399
|
+
this.refreshView();
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
takeSnapshot() {
|
|
403
|
+
const el = this.inputNumber.input.nativeElement;
|
|
404
|
+
this.snapshot = {
|
|
405
|
+
value: el.value,
|
|
406
|
+
start: el.selectionStart ?? el.value.length,
|
|
407
|
+
end: el.selectionEnd ?? el.value.length,
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* After the browser edited the text itself (soft keyboards, composition,
|
|
412
|
+
* undo, a deletion PrimeNG never saw): clean what it inserted and push the
|
|
413
|
+
* value to the form, which PrimeNG would otherwise only do on blur.
|
|
414
|
+
*/
|
|
415
|
+
reconcile(event) {
|
|
416
|
+
const inner = this.inputNumber;
|
|
417
|
+
const el = inner.input.nativeElement;
|
|
418
|
+
const before = this.snapshot ?? { value: '', start: 0, end: 0 };
|
|
419
|
+
this.snapshot = null;
|
|
420
|
+
const repaired = repairRawValue({
|
|
421
|
+
previous: before.value,
|
|
422
|
+
selectionStart: before.start,
|
|
423
|
+
selectionEnd: before.end,
|
|
424
|
+
current: el.value,
|
|
425
|
+
decimal: resolveDecimalChar(inner.locale),
|
|
426
|
+
maxFractionDigits: inner.maxFractionDigits ?? 0,
|
|
427
|
+
allowNegative: this.min() < 0,
|
|
428
|
+
});
|
|
429
|
+
if (repaired) {
|
|
430
|
+
el.value = repaired.value;
|
|
431
|
+
el.setSelectionRange(repaired.caret, repaired.caret);
|
|
432
|
+
}
|
|
433
|
+
inner.updateModel(event, inner.parseValue(el.value));
|
|
434
|
+
this.refreshView();
|
|
435
|
+
}
|
|
79
436
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NumberField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
80
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: NumberField, isStandalone: true, selector: "mt-number-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, pInputs: { classPropertyName: "pInputs", publicName: "pInputs", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, useGrouping: { classPropertyName: "useGrouping", publicName: "useGrouping", isSignal: true, isRequired: false, transformFunction: null }, maxFractionDigits: { classPropertyName: "maxFractionDigits", publicName: "maxFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.gap-1": "label() || hint()", "class": "this.styleClass" }, classAttribute: "grid" }, viewQueries: [{ propertyName: "inputNumber", first: true, predicate: ["inputNumber"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "@if (label() || hint()) {\r\n <div class=\"flex items-center gap-1\">\r\n @if (label()) {\r\n <label\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"fieldId\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n @if (hint()) {\r\n <span\r\n class=\"inline-flex text-surface-400\"\r\n [mtTooltip]=\"hint()\"\r\n tooltipPosition=\"top\"\r\n >\r\n <mt-icon icon=\"general.help-circle\" />\r\n </span>\r\n }\r\n </div>\r\n}\r\n<p-inputnumber\r\n #inputNumber\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onBlur)=\"
|
|
437
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: NumberField, isStandalone: true, selector: "mt-number-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, pInputs: { classPropertyName: "pInputs", publicName: "pInputs", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, useGrouping: { classPropertyName: "useGrouping", publicName: "useGrouping", isSignal: true, isRequired: false, transformFunction: null }, maxFractionDigits: { classPropertyName: "maxFractionDigits", publicName: "maxFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.gap-1": "label() || hint()", "class": "this.styleClass" }, classAttribute: "grid" }, viewQueries: [{ propertyName: "inputNumber", first: true, predicate: ["inputNumber"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "@if (label() || hint()) {\r\n <div class=\"flex items-center gap-1\">\r\n @if (label()) {\r\n <label\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"fieldId\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n @if (hint()) {\r\n <span\r\n class=\"inline-flex text-surface-400\"\r\n [mtTooltip]=\"hint()\"\r\n tooltipPosition=\"top\"\r\n >\r\n <mt-icon icon=\"general.help-circle\" />\r\n </span>\r\n }\r\n </div>\r\n}\r\n<p-inputnumber\r\n #inputNumber\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onBlur)=\"onInputBlur()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [inputId]=\"fieldId\"\r\n [format]=\"format() || useGrouping()\"\r\n [locale]=\"parseLocale()\"\r\n [useGrouping]=\"useGrouping()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [maxFractionDigits]=\"maxFractionDigits()\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n placeholder=\"{{ placeholder() ?? label() ?? '' }}\"\r\n styleClass=\"w-full\"\r\n inputStyleClass=\"w-full\"\r\n></p-inputnumber>\r\n\r\n@if (pasteRefused()) {\r\n <p class=\"text-xs text-red-500\" role=\"status\">\r\n {{ \"components.numberField.pasteRefused\" | transloco }}\r\n </p>\r\n}\r\n\r\n<mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n", styles: [":host p-inputNumber{display:block;width:100%}:host p-inputNumber input{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i2.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: FieldValidation, selector: "mt-field-validation", inputs: ["control", "touched", "messageId"] }, { kind: "directive", type: Tooltip, selector: "[mtTooltip]" }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
81
438
|
}
|
|
82
439
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NumberField, decorators: [{
|
|
83
440
|
type: Component,
|
|
84
|
-
args: [{ selector: 'mt-number-field', standalone: true, imports: [
|
|
441
|
+
args: [{ selector: 'mt-number-field', standalone: true, imports: [
|
|
442
|
+
FormsModule,
|
|
443
|
+
InputNumberModule,
|
|
444
|
+
FieldValidation,
|
|
445
|
+
Tooltip,
|
|
446
|
+
Icon,
|
|
447
|
+
TranslocoPipe,
|
|
448
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
85
449
|
class: 'grid',
|
|
86
450
|
// The gap only separates the label row from the control. With no label and
|
|
87
451
|
// no hint that row is not rendered, so the gap becomes dead space under the
|
|
88
452
|
// control and knocks it out of vertical alignment with sibling fields.
|
|
89
453
|
'[class.gap-1]': 'label() || hint()',
|
|
90
|
-
}, template: "@if (label() || hint()) {\r\n <div class=\"flex items-center gap-1\">\r\n @if (label()) {\r\n <label\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"fieldId\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n @if (hint()) {\r\n <span\r\n class=\"inline-flex text-surface-400\"\r\n [mtTooltip]=\"hint()\"\r\n tooltipPosition=\"top\"\r\n >\r\n <mt-icon icon=\"general.help-circle\" />\r\n </span>\r\n }\r\n </div>\r\n}\r\n<p-inputnumber\r\n #inputNumber\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onBlur)=\"
|
|
454
|
+
}, template: "@if (label() || hint()) {\r\n <div class=\"flex items-center gap-1\">\r\n @if (label()) {\r\n <label\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"fieldId\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n @if (hint()) {\r\n <span\r\n class=\"inline-flex text-surface-400\"\r\n [mtTooltip]=\"hint()\"\r\n tooltipPosition=\"top\"\r\n >\r\n <mt-icon icon=\"general.help-circle\" />\r\n </span>\r\n }\r\n </div>\r\n}\r\n<p-inputnumber\r\n #inputNumber\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onBlur)=\"onInputBlur()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [inputId]=\"fieldId\"\r\n [format]=\"format() || useGrouping()\"\r\n [locale]=\"parseLocale()\"\r\n [useGrouping]=\"useGrouping()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [maxFractionDigits]=\"maxFractionDigits()\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n placeholder=\"{{ placeholder() ?? label() ?? '' }}\"\r\n styleClass=\"w-full\"\r\n inputStyleClass=\"w-full\"\r\n></p-inputnumber>\r\n\r\n@if (pasteRefused()) {\r\n <p class=\"text-xs text-red-500\" role=\"status\">\r\n {{ \"components.numberField.pasteRefused\" | transloco }}\r\n </p>\r\n}\r\n\r\n<mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n", styles: [":host p-inputNumber{display:block;width:100%}:host p-inputNumber input{width:100%}\n"] }]
|
|
91
455
|
}], ctorParameters: () => [], propDecorators: { inputNumber: [{
|
|
92
456
|
type: ViewChild,
|
|
93
457
|
args: ['inputNumber', { static: true }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-components-number-field.mjs","sources":["../../../../packages/masterteam/components/number-field/number-field.ts","../../../../packages/masterteam/components/number-field/number-field.html","../../../../packages/masterteam/components/number-field/masterteam-components-number-field.ts"],"sourcesContent":["import {\r\n Component,\r\n HostBinding,\r\n OnChanges,\r\n OnInit,\r\n SimpleChanges,\r\n ViewChild,\r\n signal,\r\n input,\r\n inject,\r\n ChangeDetectionStrategy,\r\n effect,\r\n} from '@angular/core';\r\nimport {\r\n ControlValueAccessor,\r\n FormsModule,\r\n NgControl,\r\n Validators,\r\n} from '@angular/forms';\r\nimport { InputNumberModule, InputNumber } from 'primeng/inputnumber';\r\nimport { FieldValidation } from '@masterteam/components/field-validation';\r\nimport { isInvalid, newFieldId } from '@masterteam/components';\r\nimport { Tooltip } from '@masterteam/components/tooltip';\r\nimport { Icon } from '@masterteam/icons';\r\n\r\n@Component({\r\n selector: 'mt-number-field',\r\n standalone: true,\r\n imports: [FormsModule, InputNumberModule, FieldValidation, Tooltip, Icon],\r\n templateUrl: './number-field.html',\r\n styleUrls: ['./number-field.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'grid',\r\n // The gap only separates the label row from the control. With no label and\r\n // no hint that row is not rendered, so the gap becomes dead space under the\r\n // control and knocks it out of vertical alignment with sibling fields.\r\n '[class.gap-1]': 'label() || hint()',\r\n },\r\n})\r\nexport class NumberField implements ControlValueAccessor, OnInit, OnChanges {\r\n @ViewChild('inputNumber', { static: true })\r\n inputNumber: InputNumber;\r\n\r\n readonly field = input<boolean>(true);\r\n readonly hint = input<string>();\r\n readonly label = input<string>();\r\n\r\n /** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */\r\n readonly fieldId = newFieldId('mt-number-field');\r\n readonly placeholder = input<string>();\r\n readonly class = input<string>('');\r\n readonly readonly = input<boolean>(false);\r\n readonly pInputs = input<Partial<InputNumber>>();\r\n readonly format = input<boolean>(false);\r\n readonly useGrouping = input<boolean>(false);\r\n readonly maxFractionDigits = input<number>(2);\r\n // TODO: wait for primeng to allow undefined and remove these numbers\r\n readonly min = input<number>(-999999999999999);\r\n readonly max = input<number>(999999999999999);\r\n readonly required = input<boolean>(false);\r\n\r\n @HostBinding('class') styleClass: string;\r\n\r\n public ngControl = inject(NgControl, { self: true });\r\n\r\n isInvalid = isInvalid;\r\n\r\n requiredValidator = Validators.required;\r\n value = signal<number | null>(null);\r\n disabled = signal<boolean>(false);\r\n\r\n onTouched: () => void = () => {};\r\n onModelChange: (value: number | null) => void = () => {};\r\n\r\n constructor() {\r\n if (this.ngControl) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n effect(() => {\r\n if (this.ngControl.control && this.required()) {\r\n this.ngControl.control.addValidators(Validators.required);\r\n this.ngControl.control.updateValueAndValidity();\r\n }\r\n });\r\n }\r\n\r\n applyInputsToInputNumber() {\r\n Object.assign(this.inputNumber, this.pInputs());\r\n }\r\n\r\n ngOnInit() {\r\n this.styleClass = this.class();\r\n if (this.pInputs()) {\r\n this.applyInputsToInputNumber();\r\n }\r\n }\r\n onValueChange(value: number | null) {\r\n this.onModelChange(value);\r\n this.value.set(value);\r\n }\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes['pInputs']) {\r\n this.applyInputsToInputNumber();\r\n }\r\n }\r\n\r\n writeValue(value: number | null) {\r\n this.value.set(value);\r\n }\r\n\r\n registerOnChange(fn: any) {\r\n this.onModelChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any) {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(disabled: boolean) {\r\n this.disabled.set(disabled);\r\n }\r\n}\r\n","@if (label() || hint()) {\r\n <div class=\"flex items-center gap-1\">\r\n @if (label()) {\r\n <label\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"fieldId\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n @if (hint()) {\r\n <span\r\n class=\"inline-flex text-surface-400\"\r\n [mtTooltip]=\"hint()\"\r\n tooltipPosition=\"top\"\r\n >\r\n <mt-icon icon=\"general.help-circle\" />\r\n </span>\r\n }\r\n </div>\r\n}\r\n<p-inputnumber\r\n #inputNumber\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onBlur)=\"onTouched()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [inputId]=\"fieldId\"\r\n [format]=\"format() || useGrouping()\"\r\n [useGrouping]=\"useGrouping()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [maxFractionDigits]=\"maxFractionDigits()\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n placeholder=\"{{ placeholder() ?? label() ?? '' }}\"\r\n styleClass=\"w-full\"\r\n inputStyleClass=\"w-full\"\r\n></p-inputnumber>\r\n\r\n<mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAwCa,WAAW,CAAA;AAEtB,IAAA,WAAW;AAEF,IAAA,KAAK,GAAG,KAAK,CAAU,IAAI,4EAAC;IAC5B,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;IACtB,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,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AA,EAAE,eAAe,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,SAAA,EAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,OAAO,EAAA,QAAA,EAAA,aAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,IAAI,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAY7D,WAAW,EAAA,UAAA,EAAA,CAAA;kBAfvB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,cACf,IAAI,EAAA,OAAA,EACP,CAAC,WAAW,EAAE,iBAAiB,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,CAAC,mBAGxD,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,KAAK,EAAE,MAAM;;;;AAIb,wBAAA,eAAe,EAAE,mBAAmB;AACrC,qBAAA,EAAA,QAAA,EAAA,8qCAAA,EAAA,MAAA,EAAA,CAAA,sFAAA,CAAA,EAAA;;sBAGA,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;sBAqBzC,WAAW;uBAAC,OAAO;;;AE9DtB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"masterteam-components-number-field.mjs","sources":["../../../../packages/masterteam/components/number-field/decimal-input.ts","../../../../packages/masterteam/components/number-field/number-field.ts","../../../../packages/masterteam/components/number-field/number-field.html","../../../../packages/masterteam/components/number-field/masterteam-components-number-field.ts"],"sourcesContent":["/**\r\n * Pure helpers for `mt-number-field`: let a person type or paste a decimal\r\n * separator in whichever form their keyboard or spreadsheet produces\r\n * (`.`, `,`, Arabic `٫` / `،`) without PrimeNG silently dropping it.\r\n *\r\n * No Angular in here on purpose, so every rule is unit-testable on its own.\r\n */\r\n\r\n/** Characters that mean \"decimal point\" when typed or pasted. */\r\nconst DECIMAL_LOOKALIKES = new Set(['.', ',', '٫', '،']);\r\n\r\nexport function isDecimalLookalike(char: string): boolean {\r\n return DECIMAL_LOOKALIKES.has(char);\r\n}\r\n\r\nexport function isMinusChar(char: string): boolean {\r\n return char === '-' || char === '−';\r\n}\r\n\r\n/** Arabic-Indic and Persian digits to ASCII; everything else is left alone. */\r\nexport function toAsciiDigits(text: string): string {\r\n return text.replace(/[٠-٩۰-۹]/g, (ch) => {\r\n const code = ch.charCodeAt(0);\r\n return String(code >= 0x6f0 ? code - 0x6f0 : code - 0x660);\r\n });\r\n}\r\n\r\n/**\r\n * The decimal character PrimeNG's `InputNumber` uses for `locale`. It derives\r\n * it the same way (`Intl`, grouping off), so the two stay in step.\r\n */\r\nexport function resolveDecimalChar(locale: string | undefined): string {\r\n const part = new Intl.NumberFormat(locale, { useGrouping: false })\r\n .formatToParts(1.1)\r\n .find((p) => p.type === 'decimal');\r\n return part?.value ?? '.';\r\n}\r\n\r\nexport type PasteRefusal =\r\n | 'invalid'\r\n | 'ambiguous'\r\n | 'too-many-decimals'\r\n | 'decimals-not-allowed';\r\n\r\nexport type PasteResult =\r\n | { ok: true; value: string }\r\n | { ok: false; reason: PasteRefusal };\r\n\r\nconst refuse = (reason: PasteRefusal): PasteResult => ({ ok: false, reason });\r\n\r\nconst escapeRegExp = (text: string) =>\r\n text.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\r\n\r\n/** `1,234,567`: 1-3 digits, then groups of exactly three. */\r\nconst isGrouped = (text: string, separator: string) =>\r\n new RegExp(`^\\\\d{1,3}(?:${escapeRegExp(separator)}\\\\d{3})+$`).test(text);\r\n\r\nconst count = (text: string, char: string) => text.split(char).length - 1;\r\n\r\n/**\r\n * Reads a pasted number. Returns the canonical ASCII form (`-1234.5`, `.` as\r\n * the decimal) or a refusal. Ambiguous text is refused rather than guessed, so\r\n * a paste can never quietly become a different number.\r\n *\r\n * - one separator -> a decimal (`2,2` = 2.2)\r\n * - one separator, but decimals are not allowed -> only `1,234` (a thousands\r\n * group) is accepted; this is what PrimeNG already did for integer fields\r\n * - same separator repeated -> thousands, groups of three\r\n * - two kinds -> the last one is the decimal, the other is thousands\r\n */\r\nexport function normalizePastedNumber(\r\n text: string,\r\n maxFractionDigits: number,\r\n): PasteResult {\r\n const maxFraction = Number.isFinite(maxFractionDigits)\r\n ? Math.max(0, maxFractionDigits)\r\n : 0;\r\n\r\n const cleaned = toAsciiDigits(text)\r\n .replace(/[\\s]/g, '')\r\n .replace(/[−–‐]/g, '-')\r\n .replace(/٫/g, '.')\r\n .replace(/[٬،]/g, ',');\r\n\r\n const match = /^(-?)([\\d.,]*)$/.exec(cleaned);\r\n if (!match || !/\\d/.test(match[2])) {\r\n return refuse('invalid');\r\n }\r\n const sign = match[1];\r\n const body = match[2];\r\n\r\n const withFraction = (intPart: string, fraction: string): PasteResult => {\r\n if (fraction.length > maxFraction) {\r\n return refuse(\r\n maxFraction === 0 ? 'decimals-not-allowed' : 'too-many-decimals',\r\n );\r\n }\r\n return {\r\n ok: true,\r\n value: `${sign}${intPart || '0'}${fraction ? `.${fraction}` : ''}`,\r\n };\r\n };\r\n\r\n const dots = count(body, '.');\r\n const commas = count(body, ',');\r\n\r\n if (dots === 0 && commas === 0) {\r\n return { ok: true, value: sign + body };\r\n }\r\n\r\n if (dots > 0 && commas > 0) {\r\n const decimal = body.lastIndexOf('.') > body.lastIndexOf(',') ? '.' : ',';\r\n const thousands = decimal === '.' ? ',' : '.';\r\n if (count(body, decimal) !== 1) {\r\n return refuse('ambiguous');\r\n }\r\n const [intPart, fraction] = body.split(decimal);\r\n if (!isGrouped(intPart, thousands)) {\r\n return refuse('ambiguous');\r\n }\r\n return withFraction(intPart.split(thousands).join(''), fraction);\r\n }\r\n\r\n const separator = dots > 0 ? '.' : ',';\r\n const parts = body.split(separator);\r\n\r\n if (parts.length === 2) {\r\n const [intPart, fraction] = parts;\r\n if (\r\n maxFraction === 0 &&\r\n /^\\d{1,3}$/.test(intPart) &&\r\n /^\\d{3}$/.test(fraction)\r\n ) {\r\n return { ok: true, value: sign + intPart + fraction };\r\n }\r\n return withFraction(intPart, fraction);\r\n }\r\n\r\n if (isGrouped(body, separator)) {\r\n return { ok: true, value: sign + parts.join('') };\r\n }\r\n return refuse('ambiguous');\r\n}\r\n\r\nexport interface RawEdit {\r\n /** The text and selection before the edit. */\r\n previous: string;\r\n selectionStart: number;\r\n selectionEnd: number;\r\n /** The text after the browser applied the edit. */\r\n current: string;\r\n decimal: string;\r\n maxFractionDigits: number;\r\n allowNegative: boolean;\r\n}\r\n\r\nconst digitCount = (text: string) => (text.match(/\\p{Nd}/gu) ?? []).length;\r\n\r\n/**\r\n * Safety net for keyboards that insert text without a cancelable event (IME\r\n * composition, autocorrect). Cleans what was inserted so the field never holds\r\n * a separator PrimeNG would strip on blur. Returns `null` when nothing needs\r\n * changing, otherwise the repaired text and where the caret goes.\r\n */\r\nexport function repairRawValue(\r\n edit: RawEdit,\r\n): { value: string; caret: number } | null {\r\n const { previous, selectionStart, selectionEnd, current, decimal } = edit;\r\n const maxFraction = Number.isFinite(edit.maxFractionDigits)\r\n ? Math.max(0, edit.maxFractionDigits)\r\n : 0;\r\n\r\n const tail = previous.length - selectionEnd;\r\n const insertedEnd = current.length - tail;\r\n const before = previous.slice(0, selectionStart);\r\n const after = previous.slice(selectionEnd);\r\n const located =\r\n tail >= 0 &&\r\n insertedEnd >= selectionStart &&\r\n current.startsWith(before) &&\r\n current.endsWith(after);\r\n\r\n const prefix = located ? before : '';\r\n const suffix = located ? after : '';\r\n const inserted = located\r\n ? current.slice(selectionStart, insertedEnd)\r\n : current;\r\n\r\n let result = prefix;\r\n let decimalSeen = prefix.includes(decimal) || suffix.includes(decimal);\r\n\r\n for (const raw of inserted) {\r\n const char = toAsciiDigits(raw);\r\n if (/[0-9]/.test(char)) {\r\n const fractionDigits = result.includes(decimal)\r\n ? digitCount(result.slice(result.indexOf(decimal))) + digitCount(suffix)\r\n : 0;\r\n if (!result.includes(decimal) || fractionDigits < maxFraction) {\r\n result += char;\r\n }\r\n } else if (isDecimalLookalike(raw) || raw === decimal) {\r\n if (maxFraction > 0 && !decimalSeen) {\r\n result += decimal;\r\n decimalSeen = true;\r\n }\r\n } else if (isMinusChar(raw)) {\r\n if (\r\n edit.allowNegative &&\r\n result === '' &&\r\n !isMinusChar(suffix.charAt(0))\r\n ) {\r\n result += '-';\r\n }\r\n }\r\n }\r\n\r\n const value = result + suffix;\r\n return value === current ? null : { value, caret: result.length };\r\n}\r\n","import {\r\n ChangeDetectorRef,\r\n Component,\r\n DestroyRef,\r\n ElementRef,\r\n HostBinding,\r\n OnChanges,\r\n OnInit,\r\n SimpleChanges,\r\n ViewChild,\r\n computed,\r\n signal,\r\n input,\r\n inject,\r\n ChangeDetectionStrategy,\r\n effect,\r\n} from '@angular/core';\r\nimport {\r\n ControlValueAccessor,\r\n FormsModule,\r\n NgControl,\r\n Validators,\r\n} from '@angular/forms';\r\nimport { TranslocoPipe } from '@jsverse/transloco';\r\nimport { InputNumberModule, InputNumber } from 'primeng/inputnumber';\r\nimport { FieldValidation } from '@masterteam/components/field-validation';\r\nimport { isInvalid, newFieldId } from '@masterteam/components';\r\nimport { Tooltip } from '@masterteam/components/tooltip';\r\nimport { Icon } from '@masterteam/icons';\r\nimport {\r\n isDecimalLookalike,\r\n isMinusChar,\r\n normalizePastedNumber,\r\n repairRawValue,\r\n resolveDecimalChar,\r\n toAsciiDigits,\r\n} from './decimal-input';\r\n\r\n@Component({\r\n selector: 'mt-number-field',\r\n standalone: true,\r\n imports: [\r\n FormsModule,\r\n InputNumberModule,\r\n FieldValidation,\r\n Tooltip,\r\n Icon,\r\n TranslocoPipe,\r\n ],\r\n templateUrl: './number-field.html',\r\n styleUrls: ['./number-field.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'grid',\r\n // The gap only separates the label row from the control. With no label and\r\n // no hint that row is not rendered, so the gap becomes dead space under the\r\n // control and knocks it out of vertical alignment with sibling fields.\r\n '[class.gap-1]': 'label() || hint()',\r\n },\r\n})\r\nexport class NumberField implements ControlValueAccessor, OnInit, OnChanges {\r\n @ViewChild('inputNumber', { static: true })\r\n inputNumber: InputNumber;\r\n\r\n readonly field = input<boolean>(true);\r\n readonly hint = input<string>();\r\n readonly label = input<string>();\r\n\r\n /** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */\r\n readonly fieldId = newFieldId('mt-number-field');\r\n readonly placeholder = input<string>();\r\n readonly class = input<string>('');\r\n readonly readonly = input<boolean>(false);\r\n readonly pInputs = input<Partial<InputNumber>>();\r\n readonly format = input<boolean>(false);\r\n readonly useGrouping = input<boolean>(false);\r\n readonly maxFractionDigits = input<number>(2);\r\n // TODO: wait for primeng to allow undefined and remove these numbers\r\n readonly min = input<number>(-999999999999999);\r\n readonly max = input<number>(999999999999999);\r\n readonly required = input<boolean>(false);\r\n\r\n /**\r\n * PrimeNG parses typed text with its locale, but with `format` off it always\r\n * writes the number back as \"1.5\". On a browser whose decimal sign is \",\" the\r\n * two disagree and \"2,2\" is corrupted on the next keystroke, so the parsing\r\n * locale is pinned to en-US in that mode. An explicit `pInputs.locale` wins,\r\n * and grouping/format-on fields keep the browser locale as before.\r\n */\r\n protected readonly parseLocale = computed(\r\n () =>\r\n this.pInputs()?.locale ??\r\n (this.format() || this.useGrouping() ? undefined : 'en-US'),\r\n );\r\n\r\n /** Set when a pasted number was refused instead of guessed at. */\r\n protected readonly pasteRefused = signal(false);\r\n\r\n @HostBinding('class') styleClass: string;\r\n\r\n public ngControl = inject(NgControl, { self: true });\r\n\r\n private readonly host =\r\n inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\r\n private readonly cdr = inject(ChangeDetectorRef);\r\n\r\n /** The input's text and selection just before a native edit. */\r\n private snapshot: { value: string; start: number; end: number } | null = null;\r\n\r\n isInvalid = isInvalid;\r\n\r\n requiredValidator = Validators.required;\r\n value = signal<number | null>(null);\r\n disabled = signal<boolean>(false);\r\n\r\n onTouched: () => void = () => {};\r\n onModelChange: (value: number | null) => void = () => {};\r\n\r\n constructor() {\r\n if (this.ngControl) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n effect(() => {\r\n if (this.ngControl.control && this.required()) {\r\n this.ngControl.control.addValidators(Validators.required);\r\n this.ngControl.control.updateValueAndValidity();\r\n }\r\n });\r\n\r\n // On the host, in the capture phase: runs before PrimeNG's own handlers\r\n // whatever the registration order, and survives PrimeNG re-rendering its\r\n // <input>.\r\n const listeners = new AbortController();\r\n const on = (\r\n type: string,\r\n handler: (event: Event) => void,\r\n capture = false,\r\n ) =>\r\n this.host.addEventListener(type, handler, {\r\n capture,\r\n signal: listeners.signal,\r\n });\r\n on('keydown', this.onKeyDown, true);\r\n on('beforeinput', this.onBeforeInput, true);\r\n on('paste', this.onPaste, true);\r\n on('compositionstart', this.onCompositionStart, true);\r\n on('compositionend', this.onCompositionEnd);\r\n on('input', this.onInput);\r\n inject(DestroyRef).onDestroy(() => listeners.abort());\r\n }\r\n\r\n applyInputsToInputNumber() {\r\n Object.assign(this.inputNumber, this.pInputs());\r\n }\r\n\r\n ngOnInit() {\r\n this.styleClass = this.class();\r\n if (this.pInputs()) {\r\n this.applyInputsToInputNumber();\r\n }\r\n }\r\n onValueChange(value: number | null) {\r\n this.onModelChange(value);\r\n this.value.set(value);\r\n }\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes['pInputs']) {\r\n this.applyInputsToInputNumber();\r\n }\r\n }\r\n\r\n writeValue(value: number | null) {\r\n this.value.set(value);\r\n }\r\n\r\n registerOnChange(fn: any) {\r\n this.onModelChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any) {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(disabled: boolean) {\r\n this.disabled.set(disabled);\r\n }\r\n\r\n onInputBlur() {\r\n this.pasteRefused.set(false);\r\n this.onTouched();\r\n }\r\n\r\n // ---- decimal separator handling ------------------------------------------\r\n //\r\n // PrimeNG only inserts a digit, the minus sign or the locale's decimal sign,\r\n // and strips the grouping sign on paste, so a typed or pasted \",\" silently\r\n // vanished (\"2,2\" became 22). Here \".\" \",\" and the Arabic separators all mean\r\n // \"decimal\" while grouping is off. Three layers, because keyboards differ:\r\n // 1. keydown - desktop keyboards.\r\n // 2. beforeinput - soft keyboards (Android sends no keypress and a\r\n // keyCode of 229), plus paste/drop.\r\n // 3. input / compositionend - repair for text the browser inserted that\r\n // could not be cancelled (IME composition, autocorrect).\r\n // Typing and pasting both go through PrimeNG's own `insert`, so cursor,\r\n // selection, decimals limit and the form value behave exactly as typed.\r\n\r\n /** Only plain, writable, grouping-off fields get this handling. */\r\n private isHandling(event: Event): boolean {\r\n const inner = this.inputNumber;\r\n const el = inner?.input?.nativeElement;\r\n return !!el && event.target === el && !inner.useGrouping && !inner.readonly;\r\n }\r\n\r\n private readonly onKeyDown = (event: Event) => {\r\n const e = event as KeyboardEvent;\r\n if (!this.isHandling(e)) {\r\n return;\r\n }\r\n this.pasteRefused.set(false);\r\n // AltGr reports ctrl+alt on Windows; it is how some layouts type symbols.\r\n const shortcut =\r\n e.metaKey || ((e.ctrlKey || e.altKey) && !e.getModifierState('AltGraph'));\r\n if (e.isComposing || shortcut || !isDecimalLookalike(e.key)) {\r\n return;\r\n }\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.typeText(e, e.key);\r\n };\r\n\r\n private readonly onBeforeInput = (event: Event) => {\r\n const e = event as InputEvent;\r\n if (!this.isHandling(e)) {\r\n return;\r\n }\r\n if (!e.isComposing) {\r\n this.takeSnapshot();\r\n }\r\n if (!e.cancelable || e.isComposing) {\r\n return;\r\n }\r\n switch (e.inputType) {\r\n case 'insertText':\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.typeText(e, e.data ?? '');\r\n break;\r\n case 'insertFromPaste':\r\n case 'insertFromPasteAsQuotation':\r\n case 'insertFromDrop':\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.pasteText(e, e.data ?? e.dataTransfer?.getData('text') ?? '');\r\n break;\r\n }\r\n };\r\n\r\n private readonly onPaste = (event: Event) => {\r\n if (!this.isHandling(event)) {\r\n return;\r\n }\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.pasteText(\r\n event,\r\n (event as ClipboardEvent).clipboardData?.getData('text') ?? '',\r\n );\r\n };\r\n\r\n private readonly onCompositionStart = (event: Event) => {\r\n if (this.isHandling(event)) {\r\n this.takeSnapshot();\r\n }\r\n };\r\n\r\n private readonly onCompositionEnd = (event: Event) => {\r\n if (this.isHandling(event)) {\r\n this.reconcile(event);\r\n }\r\n };\r\n\r\n private readonly onInput = (event: Event) => {\r\n if (this.isHandling(event) && !(event as InputEvent).isComposing) {\r\n this.reconcile(event);\r\n }\r\n };\r\n\r\n /**\r\n * These listeners run outside Angular's template event bindings, so change\r\n * detection is not forced between keystrokes (and with `eventCoalescing` it\r\n * is batched to once a frame). PrimeNG binds `[value]=\"formattedValue()\"`, and\r\n * a stale pass writes that over text PrimeNG added by hand: \"3\" then \",\" then\r\n * \"7\" arriving inside one frame came out as 37, the \".\" wiped. Flushing here\r\n * keeps the bindings current before the next event.\r\n */\r\n private refreshView() {\r\n this.inputNumber.cd.detectChanges();\r\n this.cdr.detectChanges();\r\n }\r\n\r\n /** Replays `text` through PrimeNG's typing path, one character at a time. */\r\n private typeText(event: Event, text: string) {\r\n const inner = this.inputNumber;\r\n const decimal = resolveDecimalChar(inner.locale);\r\n this.pasteRefused.set(false);\r\n for (const raw of text) {\r\n const char = toAsciiDigits(raw);\r\n if (/[0-9]/.test(char)) {\r\n inner.insert(event, char);\r\n } else if (isDecimalLookalike(raw) || raw === decimal) {\r\n inner.insert(event, decimal, {\r\n isDecimalSign: true,\r\n isMinusSign: false,\r\n });\r\n } else if (isMinusChar(raw)) {\r\n inner.insert(event, '-', { isDecimalSign: false, isMinusSign: true });\r\n }\r\n }\r\n this.refreshView();\r\n }\r\n\r\n private pasteText(event: Event, text: string) {\r\n const result = normalizePastedNumber(\r\n text,\r\n this.inputNumber.maxFractionDigits ?? 0,\r\n );\r\n if (result.ok) {\r\n this.typeText(event, result.value);\r\n } else {\r\n // Text with no digits at all is ignored silently, as before.\r\n this.pasteRefused.set(/\\d/.test(toAsciiDigits(text)));\r\n this.refreshView();\r\n }\r\n }\r\n\r\n private takeSnapshot() {\r\n const el = this.inputNumber.input.nativeElement;\r\n this.snapshot = {\r\n value: el.value,\r\n start: el.selectionStart ?? el.value.length,\r\n end: el.selectionEnd ?? el.value.length,\r\n };\r\n }\r\n\r\n /**\r\n * After the browser edited the text itself (soft keyboards, composition,\r\n * undo, a deletion PrimeNG never saw): clean what it inserted and push the\r\n * value to the form, which PrimeNG would otherwise only do on blur.\r\n */\r\n private reconcile(event: Event) {\r\n const inner = this.inputNumber;\r\n const el = inner.input.nativeElement;\r\n const before = this.snapshot ?? { value: '', start: 0, end: 0 };\r\n this.snapshot = null;\r\n\r\n const repaired = repairRawValue({\r\n previous: before.value,\r\n selectionStart: before.start,\r\n selectionEnd: before.end,\r\n current: el.value,\r\n decimal: resolveDecimalChar(inner.locale),\r\n maxFractionDigits: inner.maxFractionDigits ?? 0,\r\n allowNegative: this.min() < 0,\r\n });\r\n if (repaired) {\r\n el.value = repaired.value;\r\n el.setSelectionRange(repaired.caret, repaired.caret);\r\n }\r\n inner.updateModel(event, inner.parseValue(el.value));\r\n this.refreshView();\r\n }\r\n}\r\n","@if (label() || hint()) {\r\n <div class=\"flex items-center gap-1\">\r\n @if (label()) {\r\n <label\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"fieldId\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n @if (hint()) {\r\n <span\r\n class=\"inline-flex text-surface-400\"\r\n [mtTooltip]=\"hint()\"\r\n tooltipPosition=\"top\"\r\n >\r\n <mt-icon icon=\"general.help-circle\" />\r\n </span>\r\n }\r\n </div>\r\n}\r\n<p-inputnumber\r\n #inputNumber\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onBlur)=\"onInputBlur()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [inputId]=\"fieldId\"\r\n [format]=\"format() || useGrouping()\"\r\n [locale]=\"parseLocale()\"\r\n [useGrouping]=\"useGrouping()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [maxFractionDigits]=\"maxFractionDigits()\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n placeholder=\"{{ placeholder() ?? label() ?? '' }}\"\r\n styleClass=\"w-full\"\r\n inputStyleClass=\"w-full\"\r\n></p-inputnumber>\r\n\r\n@if (pasteRefused()) {\r\n <p class=\"text-xs text-red-500\" role=\"status\">\r\n {{ \"components.numberField.pasteRefused\" | transloco }}\r\n </p>\r\n}\r\n\r\n<mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;AAMG;AAEH;AACA,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAElD,SAAU,kBAAkB,CAAC,IAAY,EAAA;AAC7C,IAAA,OAAO,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC;AACrC;AAEM,SAAU,WAAW,CAAC,IAAY,EAAA;AACtC,IAAA,OAAO,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG;AACrC;AAEA;AACM,SAAU,aAAa,CAAC,IAAY,EAAA;IACxC,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,EAAE,KAAI;QACtC,MAAM,IAAI,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;AAC7B,QAAA,OAAO,MAAM,CAAC,IAAI,IAAI,KAAK,GAAG,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