@nanahoshi/mona-ui 0.27.2 → 0.28.0
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/docs/api/chart.md +2 -2
- package/docs/api/popup.md +1 -1
- package/docs/api/theme.md +2 -2
- package/docs/chart.md +14 -0
- package/docs/editor.md +2 -0
- package/docs/installation.md +147 -15
- package/docs/introduction.md +37 -15
- package/docs/theming-built-in-themes.md +67 -0
- package/docs/theming-custom-colors.md +274 -0
- package/docs/theming-custom-themes.md +168 -0
- package/docs/theming.md +164 -248
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1089 -603
- package/fesm2022/nanahoshi-mona-ui-avatar.mjs +369 -184
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +658 -371
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +513 -359
- package/fesm2022/nanahoshi-mona-ui-button.mjs +622 -517
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +2070 -1573
- package/fesm2022/nanahoshi-mona-ui-card.mjs +620 -316
- package/fesm2022/nanahoshi-mona-ui-chart.mjs +61151 -64921
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +646 -317
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +737 -516
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +441 -242
- package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +443 -390
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +1138 -814
- package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +1114 -959
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +858 -504
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1181 -742
- package/fesm2022/nanahoshi-mona-ui-command.mjs +1454 -853
- package/fesm2022/nanahoshi-mona-ui-common.mjs +569 -743
- package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +978 -532
- package/fesm2022/nanahoshi-mona-ui-date-input.mjs +283 -266
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +973 -451
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +1203 -658
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +1415 -936
- package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +1165 -568
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +1142 -677
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +1018 -734
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +3589 -2122
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +577 -359
- package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +311 -151
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +1086 -718
- package/fesm2022/nanahoshi-mona-ui-grid-grid-colgroup.component-NhONCVIX.mjs +77 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-Djv8ZnT5.mjs +480 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-WbXAzGCa.mjs +470 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-DkWTD3pN.mjs +2115 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DAHqTwBJ.mjs +330 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid.styles-BmLU-3zP.mjs +3766 -0
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +5418 -2
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +1379 -1079
- package/fesm2022/nanahoshi-mona-ui-i18n.mjs +4451 -5077
- package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +344 -143
- package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +257 -127
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +2080 -1829
- package/fesm2022/nanahoshi-mona-ui-internal-popup-menu.mjs +103 -141
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +2498 -2706
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +722 -1007
- package/fesm2022/nanahoshi-mona-ui-label.mjs +313 -202
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1308 -1009
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +1411 -677
- package/fesm2022/nanahoshi-mona-ui-list.mjs +1 -6
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +556 -577
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +530 -573
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +530 -573
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +533 -576
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +530 -571
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +530 -571
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +576 -591
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +530 -565
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales.mjs +59 -77
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +1411 -829
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +1326 -702
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +763 -675
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +1306 -826
- package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +1122 -897
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +1110 -651
- package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +95 -53
- package/fesm2022/nanahoshi-mona-ui-popover.mjs +559 -397
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +2323 -1694
- package/fesm2022/nanahoshi-mona-ui-popup.mjs +1657 -1455
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +441 -267
- package/fesm2022/nanahoshi-mona-ui-query.mjs +211 -340
- package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +1017 -548
- package/fesm2022/nanahoshi-mona-ui-rating.mjs +874 -624
- package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +1130 -917
- package/fesm2022/nanahoshi-mona-ui-segmented.mjs +705 -455
- package/fesm2022/nanahoshi-mona-ui-sheet.mjs +461 -283
- package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +2791 -2449
- package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +145 -90
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +1563 -1103
- package/fesm2022/nanahoshi-mona-ui-spinner.mjs +738 -673
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +1287 -647
- package/fesm2022/nanahoshi-mona-ui-splitter.mjs +1313 -909
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +761 -540
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +611 -280
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +1393 -841
- package/fesm2022/nanahoshi-mona-ui-text-area.mjs +142 -73
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +876 -374
- package/fesm2022/nanahoshi-mona-ui-theme.mjs +1465 -1449
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +897 -443
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +1100 -703
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +789 -538
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +1361 -805
- package/fesm2022/nanahoshi-mona-ui-window.mjs +2145 -1531
- package/fesm2022/nanahoshi-mona-ui.mjs +1 -8
- package/llms.txt +6 -2
- package/package.json +62 -23
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +367 -233
- package/types/nanahoshi-mona-ui-avatar.d.ts +722 -649
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +134 -103
- package/types/nanahoshi-mona-ui-button-group.d.ts +213 -152
- package/types/nanahoshi-mona-ui-button.d.ts +227 -166
- package/types/nanahoshi-mona-ui-calendar.d.ts +324 -259
- package/types/nanahoshi-mona-ui-card.d.ts +125 -111
- package/types/nanahoshi-mona-ui-chart.d.ts +10483 -7326
- package/types/nanahoshi-mona-ui-check-box.d.ts +293 -180
- package/types/nanahoshi-mona-ui-chip.d.ts +208 -141
- package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +194 -133
- package/types/nanahoshi-mona-ui-collapsible.d.ts +103 -87
- package/types/nanahoshi-mona-ui-color-gradient.d.ts +281 -213
- package/types/nanahoshi-mona-ui-color-palette.d.ts +201 -138
- package/types/nanahoshi-mona-ui-color-picker.d.ts +283 -194
- package/types/nanahoshi-mona-ui-combo-box.d.ts +401 -262
- package/types/nanahoshi-mona-ui-command.d.ts +279 -191
- package/types/nanahoshi-mona-ui-common.d.ts +354 -385
- package/types/nanahoshi-mona-ui-contextmenu.d.ts +142 -117
- package/types/nanahoshi-mona-ui-date-input.d.ts +79 -96
- package/types/nanahoshi-mona-ui-date-picker.d.ts +338 -208
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +413 -259
- package/types/nanahoshi-mona-ui-dialog.d.ts +470 -381
- package/types/nanahoshi-mona-ui-dropdown-button.d.ts +216 -168
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +369 -243
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +231 -217
- package/types/nanahoshi-mona-ui-editor.d.ts +302 -235
- package/types/nanahoshi-mona-ui-expansion-panel.d.ts +140 -109
- package/types/nanahoshi-mona-ui-fieldset.d.ts +98 -68
- package/types/nanahoshi-mona-ui-filter.d.ts +150 -124
- package/types/nanahoshi-mona-ui-grid.d.ts +1956 -1678
- package/types/nanahoshi-mona-ui-i18n-icu.d.ts +25 -34
- package/types/nanahoshi-mona-ui-i18n.d.ts +987 -1052
- package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +118 -71
- package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +56 -27
- package/types/nanahoshi-mona-ui-internal-list.d.ts +474 -408
- package/types/nanahoshi-mona-ui-internal-popup-menu.d.ts +143 -150
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +493 -506
- package/types/nanahoshi-mona-ui-internal.d.ts +195 -213
- package/types/nanahoshi-mona-ui-label.d.ts +108 -78
- package/types/nanahoshi-mona-ui-list-box.d.ts +392 -322
- package/types/nanahoshi-mona-ui-list-view.d.ts +423 -282
- package/types/nanahoshi-mona-ui-list.d.ts +2 -1
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales.d.ts +17 -19
- package/types/nanahoshi-mona-ui-menubar.d.ts +210 -181
- package/types/nanahoshi-mona-ui-multi-select.d.ts +416 -276
- package/types/nanahoshi-mona-ui-notification.d.ts +140 -151
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +407 -270
- package/types/nanahoshi-mona-ui-otp-input.d.ts +364 -241
- package/types/nanahoshi-mona-ui-pager.d.ts +379 -301
- package/types/nanahoshi-mona-ui-placeholder.d.ts +35 -28
- package/types/nanahoshi-mona-ui-popover.d.ts +176 -134
- package/types/nanahoshi-mona-ui-popup-menu.d.ts +488 -344
- package/types/nanahoshi-mona-ui-popup.d.ts +698 -560
- package/types/nanahoshi-mona-ui-progress-bar.d.ts +197 -137
- package/types/nanahoshi-mona-ui-query.d.ts +82 -88
- package/types/nanahoshi-mona-ui-radio-button.d.ts +434 -269
- package/types/nanahoshi-mona-ui-rating.d.ts +348 -254
- package/types/nanahoshi-mona-ui-scroll-view.d.ts +244 -172
- package/types/nanahoshi-mona-ui-segmented.d.ts +250 -175
- package/types/nanahoshi-mona-ui-sheet.d.ts +115 -63
- package/types/nanahoshi-mona-ui-sidebar.d.ts +653 -493
- package/types/nanahoshi-mona-ui-skeleton.d.ts +55 -39
- package/types/nanahoshi-mona-ui-slider.d.ts +503 -354
- package/types/nanahoshi-mona-ui-spinner.d.ts +125 -112
- package/types/nanahoshi-mona-ui-split-button.d.ts +241 -196
- package/types/nanahoshi-mona-ui-splitter.d.ts +124 -78
- package/types/nanahoshi-mona-ui-stepper.d.ts +206 -181
- package/types/nanahoshi-mona-ui-switch.d.ts +197 -131
- package/types/nanahoshi-mona-ui-tabs.d.ts +349 -248
- package/types/nanahoshi-mona-ui-text-area.d.ts +52 -36
- package/types/nanahoshi-mona-ui-text-box.d.ts +349 -218
- package/types/nanahoshi-mona-ui-theme.d.ts +415 -408
- package/types/nanahoshi-mona-ui-time-picker.d.ts +357 -217
- package/types/nanahoshi-mona-ui-time-selector.d.ts +255 -170
- package/types/nanahoshi-mona-ui-tooltip.d.ts +222 -144
- package/types/nanahoshi-mona-ui-tree-view.d.ts +466 -308
- package/types/nanahoshi-mona-ui-window.d.ts +494 -399
- package/types/nanahoshi-mona-ui.d.ts +1 -2
- package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-DjNnVxHE.mjs +0 -181
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-ihQIKeP-.mjs +0 -208
- package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-BpnybNcs.mjs +0 -1082
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-CYlgfc7c.mjs +0 -186
- package/fesm2022/nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-LCzfCYd3.mjs +0 -7568
|
@@ -1,95 +1,103 @@
|
|
|
1
|
-
import { NgTemplateOutlet } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { ButtonDirective } from
|
|
6
|
-
import { MonaI18nService, formatNumber, getNumberSymbols, validateLocalizedDecimalEdit,
|
|
7
|
-
import { TextBoxDirective } from
|
|
8
|
-
import { FocusMonitor } from
|
|
9
|
-
import { takeUntilDestroyed } from
|
|
10
|
-
import {
|
|
11
|
-
import { Subject,
|
|
12
|
-
import { twMerge } from
|
|
13
|
-
import { cva } from
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Exact arithmetic on canonical decimal strings (see `parseLocalizedDecimal`), using a `bigint` scaled by a power
|
|
17
|
-
* of ten. Only what the decimal text box needs: adding a step and comparing against bounds.
|
|
18
|
-
*/
|
|
1
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { Component, DestroyRef, Directive, ElementRef, TemplateRef, afterNextRender, booleanAttribute, computed, contentChildren, effect, inject, input, model, output, signal, untracked, viewChild } from "@angular/core";
|
|
4
|
+
import { LucideChevronDown, LucideChevronUp } from "@lucide/angular";
|
|
5
|
+
import { ButtonDirective } from "@nanahoshi/mona-ui/button";
|
|
6
|
+
import { MonaI18nService, formatNumber, getNumberSymbols, validateLocalizedDecimal, validateLocalizedDecimalEdit, validateLocalizedNumber, validateLocalizedNumberEdit } from "@nanahoshi/mona-ui/i18n";
|
|
7
|
+
import { TextBoxDirective } from "@nanahoshi/mona-ui/text-box";
|
|
8
|
+
import { FocusMonitor } from "@angular/cdk/a11y";
|
|
9
|
+
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
10
|
+
import { createElementControlId, injectEffectiveDisabled, rxTimeout, themeControlSurfaceClasses } from "@nanahoshi/mona-ui/internal";
|
|
11
|
+
import { Subject, concatMap, delay, filter, map, of, switchMap, takeUntil, tap, timer } from "rxjs";
|
|
12
|
+
import { twMerge } from "tailwind-merge";
|
|
13
|
+
import { cva } from "class-variance-authority";
|
|
19
14
|
const DECIMAL_REGEX = /^(-)?(\d+)(?:\.(\d+))?$/;
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
const PLAIN_NUMBER_FORMAT = new Intl.NumberFormat("en-US", {
|
|
16
|
+
maximumFractionDigits: 100,
|
|
17
|
+
useGrouping: false
|
|
18
|
+
});
|
|
22
19
|
function toScaled(value) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
const match = DECIMAL_REGEX.exec(value);
|
|
21
|
+
if (!match) throw new Error(`"${value}" is not a decimal string.`);
|
|
22
|
+
const fraction = match[3] ?? "";
|
|
23
|
+
const units = BigInt(match[2] + fraction);
|
|
24
|
+
return {
|
|
25
|
+
scale: fraction.length,
|
|
26
|
+
units: match[1] ? -units : units
|
|
27
|
+
};
|
|
30
28
|
}
|
|
31
29
|
function toCommonScale(a, b) {
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
const scale = Math.max(a.scale, b.scale);
|
|
31
|
+
return [
|
|
32
|
+
a.units * 10n ** BigInt(scale - a.scale),
|
|
33
|
+
b.units * 10n ** BigInt(scale - b.scale),
|
|
34
|
+
scale
|
|
35
|
+
];
|
|
34
36
|
}
|
|
35
37
|
function fromScaled(units, scale) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
const negative = units < 0n;
|
|
39
|
+
const digits = (negative ? -units : units).toString().padStart(scale + 1, "0");
|
|
40
|
+
const integer = digits.slice(0, digits.length - scale);
|
|
41
|
+
const fraction = digits.slice(digits.length - scale).replace(/0+$/, "");
|
|
42
|
+
const text = fraction ? `${integer}.${fraction}` : integer;
|
|
43
|
+
return negative ? `-${text}` : text;
|
|
42
44
|
}
|
|
43
|
-
/**
|
|
44
|
-
* Canonical decimal string for a decimal string or a finite number, or `null` for anything else. Leading zeros,
|
|
45
|
-
* trailing fraction zeros and the sign of zero are dropped, so equal values have equal strings.
|
|
46
|
-
*/
|
|
47
45
|
function toDecimalString(value) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const text = value.trim();
|
|
55
|
-
if (!DECIMAL_REGEX.test(text)) {
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
const { scale, units } = toScaled(text);
|
|
59
|
-
return fromScaled(units, scale);
|
|
46
|
+
if (value == null) return null;
|
|
47
|
+
if (typeof value === "number") return Number.isFinite(value) ? toDecimalString(PLAIN_NUMBER_FORMAT.format(value)) : null;
|
|
48
|
+
const text = value.trim();
|
|
49
|
+
if (!DECIMAL_REGEX.test(text)) return null;
|
|
50
|
+
const { scale, units } = toScaled(text);
|
|
51
|
+
return fromScaled(units, scale);
|
|
60
52
|
}
|
|
61
53
|
function addDecimals(a, b) {
|
|
62
|
-
|
|
63
|
-
|
|
54
|
+
const [x, y, scale] = toCommonScale(toScaled(a), toScaled(b));
|
|
55
|
+
return fromScaled(x + y, scale);
|
|
64
56
|
}
|
|
65
57
|
function subtractDecimals(a, b) {
|
|
66
|
-
|
|
67
|
-
|
|
58
|
+
const [x, y, scale] = toCommonScale(toScaled(a), toScaled(b));
|
|
59
|
+
return fromScaled(x - y, scale);
|
|
68
60
|
}
|
|
69
|
-
/** Negative when `a < b`, zero when equal, positive when `a > b`. */
|
|
70
61
|
function compareDecimals(a, b) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
class NumericTextBoxPrefixTemplateDirective {
|
|
76
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NumericTextBoxPrefixTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
77
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: NumericTextBoxPrefixTemplateDirective, isStandalone: true, selector: "ng-template[monaNumericTextBoxPrefixTemplate]", ngImport: i0 }); }
|
|
62
|
+
const [x, y] = toCommonScale(toScaled(a), toScaled(b));
|
|
63
|
+
return x === y ? 0 : x < y ? -1 : 1;
|
|
78
64
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
65
|
+
var NumericTextBoxPrefixTemplateDirective = class NumericTextBoxPrefixTemplateDirective {
|
|
66
|
+
static {
|
|
67
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
68
|
+
minVersion: "12.0.0",
|
|
69
|
+
version: "22.2.6",
|
|
70
|
+
ngImport: i0,
|
|
71
|
+
type: NumericTextBoxPrefixTemplateDirective,
|
|
72
|
+
deps: [],
|
|
73
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
static {
|
|
77
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
78
|
+
minVersion: "14.0.0",
|
|
79
|
+
version: "22.2.6",
|
|
80
|
+
type: NumericTextBoxPrefixTemplateDirective,
|
|
81
|
+
isStandalone: true,
|
|
82
|
+
selector: "ng-template[monaNumericTextBoxPrefixTemplate]",
|
|
83
|
+
ngImport: i0
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
88
|
+
minVersion: "12.0.0",
|
|
89
|
+
version: "22.2.6",
|
|
90
|
+
ngImport: i0,
|
|
91
|
+
type: NumericTextBoxPrefixTemplateDirective,
|
|
92
|
+
decorators: [{
|
|
93
|
+
type: Directive,
|
|
94
|
+
args: [{ selector: "ng-template[monaNumericTextBoxPrefixTemplate]" }]
|
|
95
|
+
}]
|
|
96
|
+
});
|
|
88
97
|
const NUMERIC_TEXT_BOX_DEFAULT_MESSAGES = {
|
|
89
|
-
|
|
90
|
-
|
|
98
|
+
decrease: "Decrease value",
|
|
99
|
+
increase: "Increase value"
|
|
91
100
|
};
|
|
92
|
-
|
|
93
101
|
const numericTextboxThemeVariants = cva(`
|
|
94
102
|
flex w-full min-w-0 items-center
|
|
95
103
|
overflow-hidden p-0
|
|
@@ -114,22 +122,20 @@ const numericTextboxThemeVariants = cva(`
|
|
|
114
122
|
data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
|
|
115
123
|
data-[invalid='true']:focus-within:border-error
|
|
116
124
|
data-[invalid='true']:focus-within:ring-error/35
|
|
117
|
-
`, {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
});
|
|
125
|
+
`, { variants: {
|
|
126
|
+
rounded: {
|
|
127
|
+
full: "rounded-full",
|
|
128
|
+
large: "rounded-lg",
|
|
129
|
+
medium: "rounded-md",
|
|
130
|
+
none: "rounded-none",
|
|
131
|
+
small: "rounded-sm"
|
|
132
|
+
},
|
|
133
|
+
size: {
|
|
134
|
+
large: "h-10 text-base",
|
|
135
|
+
medium: "h-9 text-sm",
|
|
136
|
+
small: "h-8 text-xs"
|
|
137
|
+
}
|
|
138
|
+
} });
|
|
133
139
|
const numericTextboxInputThemeVariants = cva(`
|
|
134
140
|
h-full w-full
|
|
135
141
|
bg-transparent
|
|
@@ -137,39 +143,37 @@ const numericTextboxInputThemeVariants = cva(`
|
|
|
137
143
|
rounded-none
|
|
138
144
|
outline-none focus-visible:outline-hidden ring-0
|
|
139
145
|
focus-visible:border-transparent focus-visible:ring-0
|
|
140
|
-
`, {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
full: `
|
|
146
|
+
`, { variants: {
|
|
147
|
+
startRounded: {
|
|
148
|
+
full: "rounded-s-full",
|
|
149
|
+
large: "rounded-s-lg",
|
|
150
|
+
medium: "rounded-s-md",
|
|
151
|
+
none: "rounded-s-none",
|
|
152
|
+
small: "rounded-s-sm"
|
|
153
|
+
},
|
|
154
|
+
endRounded: {
|
|
155
|
+
full: `
|
|
151
156
|
rounded-e-full
|
|
152
157
|
data-[spinners='true']:rounded-e-none
|
|
153
158
|
`,
|
|
154
|
-
|
|
159
|
+
large: `
|
|
155
160
|
rounded-e-lg
|
|
156
161
|
data-[spinners='true']:rounded-e-none
|
|
157
162
|
`,
|
|
158
|
-
|
|
163
|
+
medium: `
|
|
159
164
|
rounded-e-md
|
|
160
165
|
data-[spinners='true']:rounded-e-none
|
|
161
166
|
`,
|
|
162
|
-
|
|
167
|
+
none: `
|
|
163
168
|
rounded-e-none
|
|
164
169
|
data-[spinners='true']:rounded-e-none
|
|
165
170
|
`,
|
|
166
|
-
|
|
171
|
+
small: `
|
|
167
172
|
rounded-e-sm
|
|
168
173
|
data-[spinners='true']:rounded-e-none
|
|
169
174
|
`
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
});
|
|
175
|
+
}
|
|
176
|
+
} });
|
|
173
177
|
const numericTextboxButtonThemeVariants = cva(`
|
|
174
178
|
flex h-full flex-col
|
|
175
179
|
overflow-y-hidden
|
|
@@ -183,726 +187,1202 @@ const numericTextboxButtonThemeVariants = cva(`
|
|
|
183
187
|
[&>button]:last:rounded-s-none
|
|
184
188
|
[&>button]:last:rounded-t-none
|
|
185
189
|
[&>button]:last:h-1/2
|
|
186
|
-
`, {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
small: "w-8 min-w-8"
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
|
|
196
|
-
/** PageUp and PageDown move by this many steps. */
|
|
190
|
+
`, { variants: { size: {
|
|
191
|
+
large: "w-16 min-w-16",
|
|
192
|
+
medium: "w-10 min-w-10",
|
|
193
|
+
small: "w-8 min-w-8"
|
|
194
|
+
} } });
|
|
197
195
|
const PAGE_STEP_COUNT = 10;
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
196
|
+
var NumericTextBoxBaseComponent = class NumericTextBoxBaseComponent {
|
|
197
|
+
#destroyRef;
|
|
198
|
+
#focusMonitor;
|
|
199
|
+
#hostElementRef;
|
|
200
|
+
#i18n;
|
|
201
|
+
#ownValue;
|
|
202
|
+
#pendingPaste;
|
|
203
|
+
constructor() {
|
|
204
|
+
this.#destroyRef = inject(DestroyRef);
|
|
205
|
+
this.#focusMonitor = inject(FocusMonitor);
|
|
206
|
+
this.#hostElementRef = inject(ElementRef);
|
|
207
|
+
this.#i18n = inject(MonaI18nService);
|
|
208
|
+
this.#ownValue = void 0;
|
|
209
|
+
this.#pendingPaste = false;
|
|
210
|
+
this.beforeInput$ = new Subject();
|
|
211
|
+
this.classes = computed(() => {
|
|
212
|
+
const rounded = this.rounded();
|
|
213
|
+
const size = this.size();
|
|
214
|
+
const classes = numericTextboxThemeVariants({
|
|
215
|
+
rounded,
|
|
216
|
+
size
|
|
217
|
+
});
|
|
218
|
+
const userClass = this.userClass();
|
|
219
|
+
return twMerge(classes, userClass);
|
|
220
|
+
}, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
221
|
+
this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled());
|
|
222
|
+
this.focused = signal(false, ...ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []);
|
|
223
|
+
this.formattedValue = computed(() => {
|
|
224
|
+
if (this.focused() && !this.readonly()) return this.rawInputValue();
|
|
225
|
+
return this.formatValueForDisplay(this.value());
|
|
226
|
+
}, ...ngDevMode ? [{ debugName: "formattedValue" }] : /* istanbul ignore next */ []);
|
|
227
|
+
this.inputClasses = computed(() => {
|
|
228
|
+
const startRounded = this.prefixTemplateList().length > 0 ? "none" : this.rounded();
|
|
229
|
+
const endRounded = this.showSpinners() ? "none" : this.rounded();
|
|
230
|
+
const inputVariants = numericTextboxInputThemeVariants({
|
|
231
|
+
endRounded,
|
|
232
|
+
startRounded
|
|
233
|
+
});
|
|
234
|
+
return twMerge(inputVariants);
|
|
235
|
+
}, ...ngDevMode ? [{ debugName: "inputClasses" }] : /* istanbul ignore next */ []);
|
|
236
|
+
this.invalidInput = computed(() => this.touched() && (this.invalid() || this.required() && this.value() == null), ...ngDevMode ? [{ debugName: "invalidInput" }] : /* istanbul ignore next */ []);
|
|
237
|
+
this.keydown$ = new Subject();
|
|
238
|
+
this.messages = this.#i18n.componentMessages("numericTextBox", NUMERIC_TEXT_BOX_DEFAULT_MESSAGES);
|
|
239
|
+
this.prefixTemplateList = contentChildren(NumericTextBoxPrefixTemplateDirective, {
|
|
240
|
+
...ngDevMode ? { debugName: "prefixTemplateList" } : /* istanbul ignore next */ {},
|
|
241
|
+
read: TemplateRef
|
|
242
|
+
});
|
|
243
|
+
this.rawInputValue = signal("", ...ngDevMode ? [{ debugName: "rawInputValue" }] : /* istanbul ignore next */ []);
|
|
244
|
+
this.showSpinners = computed(() => this.spinners() && !this.readonly(), ...ngDevMode ? [{ debugName: "showSpinners" }] : /* istanbul ignore next */ []);
|
|
245
|
+
this.spin$ = new Subject();
|
|
246
|
+
this.spinButtonClasses = computed(() => {
|
|
247
|
+
const size = this.size();
|
|
248
|
+
return numericTextboxButtonThemeVariants({ size });
|
|
249
|
+
}, ...ngDevMode ? [{ debugName: "spinButtonClasses" }] : /* istanbul ignore next */ []);
|
|
250
|
+
this.spinButtonIconSize = computed(() => {
|
|
251
|
+
const size = this.size();
|
|
252
|
+
return size === "large" ? 20 : size === "medium" ? 16 : 14;
|
|
253
|
+
}, ...ngDevMode ? [{ debugName: "spinButtonIconSize" }] : /* istanbul ignore next */ []);
|
|
254
|
+
this.spinStop$ = new Subject();
|
|
255
|
+
this.valueChange$ = new Subject();
|
|
256
|
+
this.valueTextBoxRef = viewChild.required("valueTextBox", ...ngDevMode ? [{ debugName: "valueTextBoxRef" }] : /* istanbul ignore next */ []);
|
|
257
|
+
this.wheel$ = new Subject();
|
|
258
|
+
this.ariaDescribedBy = input("", {
|
|
259
|
+
...ngDevMode ? { debugName: "ariaDescribedBy" } : /* istanbul ignore next */ {},
|
|
260
|
+
alias: "aria-describedby"
|
|
261
|
+
});
|
|
262
|
+
this.ariaLabel = input(null, {
|
|
263
|
+
...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
|
|
264
|
+
alias: "aria-label"
|
|
265
|
+
});
|
|
266
|
+
this.ariaLabelledBy = input("", {
|
|
267
|
+
...ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {},
|
|
268
|
+
alias: "aria-labelledby"
|
|
269
|
+
});
|
|
270
|
+
this.decimals = input(0, {
|
|
271
|
+
...ngDevMode ? { debugName: "decimals" } : /* istanbul ignore next */ {},
|
|
272
|
+
transform: (value) => {
|
|
273
|
+
const num = Math.trunc(value);
|
|
274
|
+
if (!Number.isFinite(num) || num < 0) return 0;
|
|
275
|
+
return Math.min(20, num);
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
this.disabled = input(false, {
|
|
279
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
280
|
+
transform: booleanAttribute
|
|
281
|
+
});
|
|
282
|
+
this.inputBlur = output();
|
|
283
|
+
this.inputFocus = output();
|
|
284
|
+
this.inputFocusOut = output();
|
|
285
|
+
this.inputId = input(createElementControlId(), ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
|
|
286
|
+
this.invalid = input(false, {
|
|
287
|
+
...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
|
|
288
|
+
transform: booleanAttribute
|
|
289
|
+
});
|
|
290
|
+
this.nullable = input(true, {
|
|
291
|
+
...ngDevMode ? { debugName: "nullable" } : /* istanbul ignore next */ {},
|
|
292
|
+
transform: booleanAttribute
|
|
293
|
+
});
|
|
294
|
+
this.placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
295
|
+
this.readonly = input(false, {
|
|
296
|
+
...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
|
|
297
|
+
transform: booleanAttribute
|
|
298
|
+
});
|
|
299
|
+
this.required = input(false, {
|
|
300
|
+
...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
|
|
301
|
+
transform: booleanAttribute
|
|
302
|
+
});
|
|
303
|
+
this.rounded = input(`medium`, ...ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []);
|
|
304
|
+
this.size = input(`medium`, ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
305
|
+
this.spinners = input(true, {
|
|
306
|
+
...ngDevMode ? { debugName: "spinners" } : /* istanbul ignore next */ {},
|
|
307
|
+
transform: booleanAttribute
|
|
308
|
+
});
|
|
309
|
+
this.tabindex = input(0, ...ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []);
|
|
310
|
+
this.touch = output();
|
|
311
|
+
this.touched = input(false, {
|
|
312
|
+
...ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {},
|
|
313
|
+
transform: booleanAttribute
|
|
314
|
+
});
|
|
315
|
+
this.userClass = input("", {
|
|
316
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
317
|
+
alias: "class"
|
|
318
|
+
});
|
|
319
|
+
effect(() => {
|
|
320
|
+
const value = this.value();
|
|
321
|
+
untracked(() => {
|
|
322
|
+
if (value === this.#ownValue) return;
|
|
323
|
+
this.#ownValue = value;
|
|
324
|
+
if (this.focused() && !this.readonly()) this.rawInputValue.set(this.formatEditValue(value));
|
|
325
|
+
});
|
|
326
|
+
});
|
|
327
|
+
effect(() => {
|
|
328
|
+
this.#i18n.localeId();
|
|
329
|
+
untracked(() => {
|
|
330
|
+
if (this.focused() && !this.readonly()) this.rawInputValue.set(this.formatEditValue(this.value()));
|
|
331
|
+
});
|
|
332
|
+
});
|
|
333
|
+
afterNextRender({ read: () => {
|
|
334
|
+
this.setSubscriptions();
|
|
335
|
+
this.rawInputValue.set(this.formatValueForDisplay(this.value()));
|
|
336
|
+
this.#focusMonitor.monitor(this.#hostElementRef, true).pipe(takeUntilDestroyed(this.#destroyRef)).subscribe((focusOrigin) => {
|
|
337
|
+
const isFocused = focusOrigin !== null;
|
|
338
|
+
this.focused.set(isFocused);
|
|
339
|
+
if (isFocused && !this.readonly()) {
|
|
340
|
+
const currentValue = this.value();
|
|
341
|
+
const rawValue = this.formatEditValue(currentValue);
|
|
342
|
+
this.rawInputValue.set(rawValue);
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
} });
|
|
346
|
+
this.#destroyRef.onDestroy(() => this.#focusMonitor.stopMonitoring(this.#hostElementRef.nativeElement));
|
|
347
|
+
}
|
|
348
|
+
decrease() {
|
|
349
|
+
this.spinValue("-");
|
|
350
|
+
this.focus();
|
|
351
|
+
}
|
|
352
|
+
focus(options) {
|
|
353
|
+
this.#focusMonitor.focusVia(this.valueTextBoxRef(), "keyboard", options);
|
|
354
|
+
rxTimeout(this.#destroyRef, () => {
|
|
355
|
+
this.valueTextBoxRef().nativeElement.scrollLeft = this.valueTextBoxRef().nativeElement.scrollWidth;
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
increase() {
|
|
359
|
+
this.spinValue("+");
|
|
360
|
+
this.focus();
|
|
361
|
+
}
|
|
362
|
+
onBlur(event) {
|
|
363
|
+
if (this.#destroyRef.destroyed) return;
|
|
364
|
+
this.#pendingPaste = false;
|
|
365
|
+
const relatedTarget = event.relatedTarget;
|
|
366
|
+
if (relatedTarget instanceof Node && this.#hostElementRef.nativeElement.contains(relatedTarget)) return;
|
|
367
|
+
this.correctValue();
|
|
368
|
+
this.rawInputValue.set(this.formatValueForDisplay(this.value()));
|
|
369
|
+
this.touch.emit();
|
|
370
|
+
this.inputBlur.emit(event);
|
|
371
|
+
}
|
|
372
|
+
applyRawValue(text) {
|
|
373
|
+
this.rawInputValue.set(text);
|
|
374
|
+
this.valueChange$.next(text);
|
|
375
|
+
}
|
|
376
|
+
onPaste(event) {
|
|
377
|
+
const pastedText = event.clipboardData?.getData("text/plain");
|
|
378
|
+
if (pastedText == null) {
|
|
379
|
+
this.#pendingPaste = false;
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
const inputElement = this.valueTextBoxRef()?.nativeElement;
|
|
383
|
+
if (!inputElement) {
|
|
384
|
+
this.#pendingPaste = false;
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
const { value, selectionStart, selectionEnd } = inputElement;
|
|
388
|
+
const start = selectionStart ?? value.length;
|
|
389
|
+
const end = selectionEnd ?? value.length;
|
|
390
|
+
const proposedValue = value.slice(0, start) + pastedText + value.slice(end);
|
|
391
|
+
const validation = this.readLocaleText(proposedValue, this.#i18n.localeId(), this.decimals());
|
|
392
|
+
if (!validation.valid || validation.value === null) {
|
|
393
|
+
event.preventDefault();
|
|
394
|
+
this.#pendingPaste = false;
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
this.#pendingPaste = true;
|
|
398
|
+
}
|
|
399
|
+
onSpinPointerDown(event, direction) {
|
|
400
|
+
if (event.button !== 0) return;
|
|
401
|
+
this.spin$.next(direction);
|
|
402
|
+
}
|
|
403
|
+
clampValue(value) {
|
|
404
|
+
const min = this.minValue();
|
|
405
|
+
const max = this.maxValue();
|
|
406
|
+
if (min != null && this.compareValues(value, min) < 0) return min;
|
|
407
|
+
if (max != null && this.compareValues(value, max) > 0) return max;
|
|
408
|
+
return value;
|
|
409
|
+
}
|
|
410
|
+
commitValue(value) {
|
|
411
|
+
this.setOwnValue(value);
|
|
412
|
+
this.rawInputValue.set(this.focused() && !this.readonly() ? this.formatEditValue(value) : this.formatValueForDisplay(value));
|
|
413
|
+
}
|
|
414
|
+
correctValue() {
|
|
415
|
+
const value = this.value();
|
|
416
|
+
if (value == null) {
|
|
417
|
+
if (this.nullable()) {
|
|
418
|
+
if (this.rawInputValue() !== "") this.rawInputValue.set("");
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
this.commitValue(this.clampValue(this.minValue() ?? this.zeroValue));
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
const clamped = this.clampValue(value);
|
|
425
|
+
if (this.compareValues(clamped, value) !== 0) this.commitValue(clamped);
|
|
426
|
+
}
|
|
427
|
+
formatEditValue(value) {
|
|
428
|
+
if (value == null) return "";
|
|
429
|
+
return formatNumber(value, this.#i18n.localeId(), {
|
|
430
|
+
maximumFractionDigits: this.editFractionDigits,
|
|
431
|
+
useGrouping: false
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
formatValueForDisplay(value) {
|
|
435
|
+
if (value == null) return "";
|
|
436
|
+
const formatter = this.formatter();
|
|
437
|
+
if (formatter) return formatter(value);
|
|
438
|
+
const decimals = this.decimals();
|
|
439
|
+
return formatNumber(value, this.#i18n.localeId(), {
|
|
440
|
+
minimumFractionDigits: decimals,
|
|
441
|
+
maximumFractionDigits: decimals,
|
|
442
|
+
useGrouping: false
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
insertLocaleDecimal(event) {
|
|
446
|
+
const localeId = this.#i18n.localeId();
|
|
447
|
+
const decimal = getNumberSymbols(localeId).decimal;
|
|
448
|
+
if (event.key.length !== 1 || event.key === decimal || event.ctrlKey || event.altKey || event.metaKey) return;
|
|
449
|
+
event.preventDefault();
|
|
450
|
+
const inputElement = this.valueTextBoxRef().nativeElement;
|
|
451
|
+
const { value, selectionStart, selectionEnd } = inputElement;
|
|
452
|
+
const start = selectionStart ?? value.length;
|
|
453
|
+
const end = selectionEnd ?? value.length;
|
|
454
|
+
const proposedValue = value.slice(0, start) + decimal + value.slice(end);
|
|
455
|
+
if (!this.readEditText(proposedValue, localeId, this.decimals()).valid) return;
|
|
456
|
+
inputElement.setRangeText(decimal, start, end, "end");
|
|
457
|
+
inputElement.dispatchEvent(new Event("input", { bubbles: true }));
|
|
458
|
+
}
|
|
459
|
+
parseValue(value) {
|
|
460
|
+
const raw = value == null ? "" : value;
|
|
461
|
+
this.rawInputValue.set(raw);
|
|
462
|
+
const isPaste = this.#pendingPaste;
|
|
463
|
+
this.#pendingPaste = false;
|
|
464
|
+
if (isPaste) {
|
|
465
|
+
const validation = this.readLocaleText(raw, this.#i18n.localeId(), this.decimals());
|
|
466
|
+
return validation.valid && validation.value !== null ? validation.value : this.value();
|
|
467
|
+
}
|
|
468
|
+
if (raw === "") return null;
|
|
469
|
+
if (raw.trim() !== raw) return this.value();
|
|
470
|
+
const edit = this.readEditText(raw, this.#i18n.localeId(), this.decimals());
|
|
471
|
+
if (edit.valid) return edit.value === null ? this.value() : edit.value;
|
|
472
|
+
const localeValidation = this.readLocaleText(raw, this.#i18n.localeId(), this.decimals());
|
|
473
|
+
if (localeValidation.valid && localeValidation.value !== null) return localeValidation.value;
|
|
474
|
+
return this.value();
|
|
475
|
+
}
|
|
476
|
+
setBeforeInputSubscription() {
|
|
477
|
+
this.beforeInput$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe((event) => {
|
|
478
|
+
const inputElement = event.target;
|
|
479
|
+
const isPaste = event.inputType === "insertFromPaste" || this.#pendingPaste && event.inputType !== "insertText";
|
|
480
|
+
if (!isPaste) this.#pendingPaste = false;
|
|
481
|
+
const insertedText = event.data ?? event.dataTransfer?.getData("text/plain");
|
|
482
|
+
if (insertedText == null) return;
|
|
483
|
+
const { value, selectionStart, selectionEnd } = inputElement;
|
|
484
|
+
if (selectionStart == null || selectionEnd == null) return;
|
|
485
|
+
const proposedValue = value.slice(0, selectionStart) + insertedText + value.slice(selectionEnd);
|
|
486
|
+
const localeId = this.#i18n.localeId();
|
|
487
|
+
const decimals = this.decimals();
|
|
488
|
+
if (isPaste) {
|
|
489
|
+
const validation = this.readLocaleText(proposedValue, localeId, decimals);
|
|
490
|
+
if (!validation.valid || validation.value === null) {
|
|
491
|
+
event.preventDefault();
|
|
492
|
+
this.#pendingPaste = false;
|
|
493
|
+
} else this.#pendingPaste = true;
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
this.#pendingPaste = false;
|
|
497
|
+
if (!this.readEditText(proposedValue, localeId, decimals).valid) event.preventDefault();
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
setKeydownSubscription() {
|
|
501
|
+
this.keydown$.pipe(takeUntilDestroyed(this.#destroyRef), filter((event) => !event.isComposing && event.keyCode !== 229), filter(() => !this.readonly() && !this.effectiveDisabled())).subscribe((event) => {
|
|
502
|
+
switch (event.key) {
|
|
503
|
+
case "ArrowUp":
|
|
504
|
+
event.preventDefault();
|
|
505
|
+
this.increase();
|
|
506
|
+
return;
|
|
507
|
+
case "ArrowDown":
|
|
508
|
+
event.preventDefault();
|
|
509
|
+
this.decrease();
|
|
510
|
+
return;
|
|
511
|
+
case "PageUp":
|
|
512
|
+
event.preventDefault();
|
|
513
|
+
this.spinValue("+", PAGE_STEP_COUNT);
|
|
514
|
+
return;
|
|
515
|
+
case "PageDown":
|
|
516
|
+
event.preventDefault();
|
|
517
|
+
this.spinValue("-", PAGE_STEP_COUNT);
|
|
518
|
+
return;
|
|
519
|
+
case "Home":
|
|
520
|
+
this.spinToBound(event, this.minValue());
|
|
521
|
+
return;
|
|
522
|
+
case "End":
|
|
523
|
+
this.spinToBound(event, this.maxValue());
|
|
524
|
+
return;
|
|
525
|
+
}
|
|
526
|
+
if (event.code === "NumpadDecimal") this.insertLocaleDecimal(event);
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
setOwnValue(value) {
|
|
530
|
+
this.#ownValue = value;
|
|
531
|
+
this.value.set(value);
|
|
532
|
+
}
|
|
533
|
+
setSpinSubscription() {
|
|
534
|
+
this.spin$.pipe(filter(() => !this.readonly() && !this.effectiveDisabled()), switchMap((sign) => of(sign).pipe(tap((sign) => sign === "-" ? this.decrease() : this.increase()), delay(300), concatMap(() => timer(0, 30).pipe(tap(() => sign === "-" ? this.decrease() : this.increase()), takeUntil(this.spinStop$))), takeUntil(this.spinStop$))), takeUntilDestroyed(this.#destroyRef)).subscribe();
|
|
535
|
+
}
|
|
536
|
+
setSubscriptions() {
|
|
537
|
+
this.setValueChangeSubscription();
|
|
538
|
+
this.setKeydownSubscription();
|
|
539
|
+
this.setSpinSubscription();
|
|
540
|
+
this.setWheelSubscription();
|
|
541
|
+
this.setBeforeInputSubscription();
|
|
542
|
+
}
|
|
543
|
+
setValueChangeSubscription() {
|
|
544
|
+
this.valueChange$.pipe(takeUntilDestroyed(this.#destroyRef), map((v) => this.parseValue(v))).subscribe((value) => this.setOwnValue(value));
|
|
545
|
+
}
|
|
546
|
+
setWheelSubscription() {
|
|
547
|
+
this.wheel$.pipe(takeUntilDestroyed(this.#destroyRef), filter((event) => this.focused() && event.deltaY !== 0 && !event.ctrlKey), filter(() => !this.readonly() && !this.effectiveDisabled())).subscribe((event) => {
|
|
548
|
+
event.preventDefault();
|
|
549
|
+
this.spinValue(event.deltaY < 0 ? "+" : "-");
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
spinToBound(event, bound) {
|
|
553
|
+
if (bound == null) return;
|
|
554
|
+
event.preventDefault();
|
|
555
|
+
this.commitValue(bound);
|
|
556
|
+
}
|
|
557
|
+
spinValue(direction, steps = 1) {
|
|
558
|
+
const value = this.value();
|
|
559
|
+
if (value == null) {
|
|
560
|
+
this.commitValue(this.clampValue(this.zeroValue));
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
let result = value;
|
|
564
|
+
for (let index = 0; index < steps; index++) result = this.stepValue(result, direction);
|
|
565
|
+
this.commitValue(this.clampValue(result));
|
|
566
|
+
}
|
|
567
|
+
static {
|
|
568
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
569
|
+
minVersion: "12.0.0",
|
|
570
|
+
version: "22.2.6",
|
|
571
|
+
ngImport: i0,
|
|
572
|
+
type: NumericTextBoxBaseComponent,
|
|
573
|
+
deps: [],
|
|
574
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
static {
|
|
578
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
579
|
+
minVersion: "17.2.0",
|
|
580
|
+
version: "22.2.6",
|
|
581
|
+
type: NumericTextBoxBaseComponent,
|
|
582
|
+
isStandalone: true,
|
|
583
|
+
inputs: {
|
|
584
|
+
ariaDescribedBy: {
|
|
585
|
+
classPropertyName: "ariaDescribedBy",
|
|
586
|
+
publicName: "aria-describedby",
|
|
587
|
+
isSignal: true,
|
|
588
|
+
isRequired: false,
|
|
589
|
+
transformFunction: null
|
|
590
|
+
},
|
|
591
|
+
ariaLabel: {
|
|
592
|
+
classPropertyName: "ariaLabel",
|
|
593
|
+
publicName: "aria-label",
|
|
594
|
+
isSignal: true,
|
|
595
|
+
isRequired: false,
|
|
596
|
+
transformFunction: null
|
|
597
|
+
},
|
|
598
|
+
ariaLabelledBy: {
|
|
599
|
+
classPropertyName: "ariaLabelledBy",
|
|
600
|
+
publicName: "aria-labelledby",
|
|
601
|
+
isSignal: true,
|
|
602
|
+
isRequired: false,
|
|
603
|
+
transformFunction: null
|
|
604
|
+
},
|
|
605
|
+
decimals: {
|
|
606
|
+
classPropertyName: "decimals",
|
|
607
|
+
publicName: "decimals",
|
|
608
|
+
isSignal: true,
|
|
609
|
+
isRequired: false,
|
|
610
|
+
transformFunction: null
|
|
611
|
+
},
|
|
612
|
+
disabled: {
|
|
613
|
+
classPropertyName: "disabled",
|
|
614
|
+
publicName: "disabled",
|
|
615
|
+
isSignal: true,
|
|
616
|
+
isRequired: false,
|
|
617
|
+
transformFunction: null
|
|
618
|
+
},
|
|
619
|
+
inputId: {
|
|
620
|
+
classPropertyName: "inputId",
|
|
621
|
+
publicName: "inputId",
|
|
622
|
+
isSignal: true,
|
|
623
|
+
isRequired: false,
|
|
624
|
+
transformFunction: null
|
|
625
|
+
},
|
|
626
|
+
invalid: {
|
|
627
|
+
classPropertyName: "invalid",
|
|
628
|
+
publicName: "invalid",
|
|
629
|
+
isSignal: true,
|
|
630
|
+
isRequired: false,
|
|
631
|
+
transformFunction: null
|
|
632
|
+
},
|
|
633
|
+
nullable: {
|
|
634
|
+
classPropertyName: "nullable",
|
|
635
|
+
publicName: "nullable",
|
|
636
|
+
isSignal: true,
|
|
637
|
+
isRequired: false,
|
|
638
|
+
transformFunction: null
|
|
639
|
+
},
|
|
640
|
+
placeholder: {
|
|
641
|
+
classPropertyName: "placeholder",
|
|
642
|
+
publicName: "placeholder",
|
|
643
|
+
isSignal: true,
|
|
644
|
+
isRequired: false,
|
|
645
|
+
transformFunction: null
|
|
646
|
+
},
|
|
647
|
+
readonly: {
|
|
648
|
+
classPropertyName: "readonly",
|
|
649
|
+
publicName: "readonly",
|
|
650
|
+
isSignal: true,
|
|
651
|
+
isRequired: false,
|
|
652
|
+
transformFunction: null
|
|
653
|
+
},
|
|
654
|
+
required: {
|
|
655
|
+
classPropertyName: "required",
|
|
656
|
+
publicName: "required",
|
|
657
|
+
isSignal: true,
|
|
658
|
+
isRequired: false,
|
|
659
|
+
transformFunction: null
|
|
660
|
+
},
|
|
661
|
+
rounded: {
|
|
662
|
+
classPropertyName: "rounded",
|
|
663
|
+
publicName: "rounded",
|
|
664
|
+
isSignal: true,
|
|
665
|
+
isRequired: false,
|
|
666
|
+
transformFunction: null
|
|
667
|
+
},
|
|
668
|
+
size: {
|
|
669
|
+
classPropertyName: "size",
|
|
670
|
+
publicName: "size",
|
|
671
|
+
isSignal: true,
|
|
672
|
+
isRequired: false,
|
|
673
|
+
transformFunction: null
|
|
674
|
+
},
|
|
675
|
+
spinners: {
|
|
676
|
+
classPropertyName: "spinners",
|
|
677
|
+
publicName: "spinners",
|
|
678
|
+
isSignal: true,
|
|
679
|
+
isRequired: false,
|
|
680
|
+
transformFunction: null
|
|
681
|
+
},
|
|
682
|
+
tabindex: {
|
|
683
|
+
classPropertyName: "tabindex",
|
|
684
|
+
publicName: "tabindex",
|
|
685
|
+
isSignal: true,
|
|
686
|
+
isRequired: false,
|
|
687
|
+
transformFunction: null
|
|
688
|
+
},
|
|
689
|
+
touched: {
|
|
690
|
+
classPropertyName: "touched",
|
|
691
|
+
publicName: "touched",
|
|
692
|
+
isSignal: true,
|
|
693
|
+
isRequired: false,
|
|
694
|
+
transformFunction: null
|
|
695
|
+
},
|
|
696
|
+
userClass: {
|
|
697
|
+
classPropertyName: "userClass",
|
|
698
|
+
publicName: "class",
|
|
699
|
+
isSignal: true,
|
|
700
|
+
isRequired: false,
|
|
701
|
+
transformFunction: null
|
|
702
|
+
}
|
|
703
|
+
},
|
|
704
|
+
outputs: {
|
|
705
|
+
inputBlur: "inputBlur",
|
|
706
|
+
inputFocus: "inputFocus",
|
|
707
|
+
inputFocusOut: "inputFocusOut",
|
|
708
|
+
touch: "touch"
|
|
709
|
+
},
|
|
710
|
+
host: {
|
|
711
|
+
listeners: { "focusout": "onBlur($event)" },
|
|
712
|
+
properties: {
|
|
713
|
+
"attr.aria-describedby": "null",
|
|
714
|
+
"attr.aria-label": "null",
|
|
715
|
+
"attr.aria-labelledby": "null",
|
|
716
|
+
"class": "classes()",
|
|
717
|
+
"attr.data-disabled": "effectiveDisabled() || null",
|
|
718
|
+
"attr.data-invalid": "invalidInput() || null",
|
|
719
|
+
"attr.data-readonly": "readonly() || null",
|
|
720
|
+
"attr.data-required": "required() || null"
|
|
721
|
+
}
|
|
722
|
+
},
|
|
723
|
+
queries: [{
|
|
724
|
+
propertyName: "prefixTemplateList",
|
|
725
|
+
predicate: NumericTextBoxPrefixTemplateDirective,
|
|
726
|
+
read: TemplateRef,
|
|
727
|
+
isSignal: true
|
|
728
|
+
}],
|
|
729
|
+
viewQueries: [{
|
|
730
|
+
propertyName: "valueTextBoxRef",
|
|
731
|
+
first: true,
|
|
732
|
+
predicate: ["valueTextBox"],
|
|
733
|
+
descendants: true,
|
|
734
|
+
isSignal: true
|
|
735
|
+
}],
|
|
736
|
+
ngImport: i0
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
};
|
|
740
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
741
|
+
minVersion: "12.0.0",
|
|
742
|
+
version: "22.2.6",
|
|
743
|
+
ngImport: i0,
|
|
744
|
+
type: NumericTextBoxBaseComponent,
|
|
745
|
+
decorators: [{
|
|
746
|
+
type: Directive,
|
|
747
|
+
args: [{ host: {
|
|
748
|
+
"[attr.aria-describedby]": "null",
|
|
749
|
+
"[attr.aria-label]": "null",
|
|
750
|
+
"[attr.aria-labelledby]": "null",
|
|
751
|
+
"[class]": "classes()",
|
|
752
|
+
"[attr.data-disabled]": "effectiveDisabled() || null",
|
|
753
|
+
"[attr.data-invalid]": "invalidInput() || null",
|
|
754
|
+
"[attr.data-readonly]": "readonly() || null",
|
|
755
|
+
"[attr.data-required]": "required() || null",
|
|
756
|
+
"(focusout)": "onBlur($event)"
|
|
757
|
+
} }]
|
|
758
|
+
}],
|
|
759
|
+
ctorParameters: () => [],
|
|
760
|
+
propDecorators: {
|
|
761
|
+
prefixTemplateList: [{
|
|
762
|
+
type: i0.ContentChildren,
|
|
763
|
+
args: [i0.forwardRef(() => NumericTextBoxPrefixTemplateDirective), {
|
|
764
|
+
read: TemplateRef,
|
|
765
|
+
isSignal: true
|
|
766
|
+
}]
|
|
767
|
+
}],
|
|
768
|
+
valueTextBoxRef: [{
|
|
769
|
+
type: i0.ViewChild,
|
|
770
|
+
args: ["valueTextBox", { isSignal: true }]
|
|
771
|
+
}],
|
|
772
|
+
ariaDescribedBy: [{
|
|
773
|
+
type: i0.Input,
|
|
774
|
+
args: [{
|
|
775
|
+
isSignal: true,
|
|
776
|
+
alias: "aria-describedby",
|
|
777
|
+
required: false
|
|
778
|
+
}]
|
|
779
|
+
}],
|
|
780
|
+
ariaLabel: [{
|
|
781
|
+
type: i0.Input,
|
|
782
|
+
args: [{
|
|
783
|
+
isSignal: true,
|
|
784
|
+
alias: "aria-label",
|
|
785
|
+
required: false
|
|
786
|
+
}]
|
|
787
|
+
}],
|
|
788
|
+
ariaLabelledBy: [{
|
|
789
|
+
type: i0.Input,
|
|
790
|
+
args: [{
|
|
791
|
+
isSignal: true,
|
|
792
|
+
alias: "aria-labelledby",
|
|
793
|
+
required: false
|
|
794
|
+
}]
|
|
795
|
+
}],
|
|
796
|
+
decimals: [{
|
|
797
|
+
type: i0.Input,
|
|
798
|
+
args: [{
|
|
799
|
+
isSignal: true,
|
|
800
|
+
alias: "decimals",
|
|
801
|
+
required: false
|
|
802
|
+
}]
|
|
803
|
+
}],
|
|
804
|
+
disabled: [{
|
|
805
|
+
type: i0.Input,
|
|
806
|
+
args: [{
|
|
807
|
+
isSignal: true,
|
|
808
|
+
alias: "disabled",
|
|
809
|
+
required: false
|
|
810
|
+
}]
|
|
811
|
+
}],
|
|
812
|
+
inputBlur: [{
|
|
813
|
+
type: i0.Output,
|
|
814
|
+
args: ["inputBlur"]
|
|
815
|
+
}],
|
|
816
|
+
inputFocus: [{
|
|
817
|
+
type: i0.Output,
|
|
818
|
+
args: ["inputFocus"]
|
|
819
|
+
}],
|
|
820
|
+
inputFocusOut: [{
|
|
821
|
+
type: i0.Output,
|
|
822
|
+
args: ["inputFocusOut"]
|
|
823
|
+
}],
|
|
824
|
+
inputId: [{
|
|
825
|
+
type: i0.Input,
|
|
826
|
+
args: [{
|
|
827
|
+
isSignal: true,
|
|
828
|
+
alias: "inputId",
|
|
829
|
+
required: false
|
|
830
|
+
}]
|
|
831
|
+
}],
|
|
832
|
+
invalid: [{
|
|
833
|
+
type: i0.Input,
|
|
834
|
+
args: [{
|
|
835
|
+
isSignal: true,
|
|
836
|
+
alias: "invalid",
|
|
837
|
+
required: false
|
|
838
|
+
}]
|
|
839
|
+
}],
|
|
840
|
+
nullable: [{
|
|
841
|
+
type: i0.Input,
|
|
842
|
+
args: [{
|
|
843
|
+
isSignal: true,
|
|
844
|
+
alias: "nullable",
|
|
845
|
+
required: false
|
|
846
|
+
}]
|
|
847
|
+
}],
|
|
848
|
+
placeholder: [{
|
|
849
|
+
type: i0.Input,
|
|
850
|
+
args: [{
|
|
851
|
+
isSignal: true,
|
|
852
|
+
alias: "placeholder",
|
|
853
|
+
required: false
|
|
854
|
+
}]
|
|
855
|
+
}],
|
|
856
|
+
readonly: [{
|
|
857
|
+
type: i0.Input,
|
|
858
|
+
args: [{
|
|
859
|
+
isSignal: true,
|
|
860
|
+
alias: "readonly",
|
|
861
|
+
required: false
|
|
862
|
+
}]
|
|
863
|
+
}],
|
|
864
|
+
required: [{
|
|
865
|
+
type: i0.Input,
|
|
866
|
+
args: [{
|
|
867
|
+
isSignal: true,
|
|
868
|
+
alias: "required",
|
|
869
|
+
required: false
|
|
870
|
+
}]
|
|
871
|
+
}],
|
|
872
|
+
rounded: [{
|
|
873
|
+
type: i0.Input,
|
|
874
|
+
args: [{
|
|
875
|
+
isSignal: true,
|
|
876
|
+
alias: "rounded",
|
|
877
|
+
required: false
|
|
878
|
+
}]
|
|
879
|
+
}],
|
|
880
|
+
size: [{
|
|
881
|
+
type: i0.Input,
|
|
882
|
+
args: [{
|
|
883
|
+
isSignal: true,
|
|
884
|
+
alias: "size",
|
|
885
|
+
required: false
|
|
886
|
+
}]
|
|
887
|
+
}],
|
|
888
|
+
spinners: [{
|
|
889
|
+
type: i0.Input,
|
|
890
|
+
args: [{
|
|
891
|
+
isSignal: true,
|
|
892
|
+
alias: "spinners",
|
|
893
|
+
required: false
|
|
894
|
+
}]
|
|
895
|
+
}],
|
|
896
|
+
tabindex: [{
|
|
897
|
+
type: i0.Input,
|
|
898
|
+
args: [{
|
|
899
|
+
isSignal: true,
|
|
900
|
+
alias: "tabindex",
|
|
901
|
+
required: false
|
|
902
|
+
}]
|
|
903
|
+
}],
|
|
904
|
+
touch: [{
|
|
905
|
+
type: i0.Output,
|
|
906
|
+
args: ["touch"]
|
|
907
|
+
}],
|
|
908
|
+
touched: [{
|
|
909
|
+
type: i0.Input,
|
|
910
|
+
args: [{
|
|
911
|
+
isSignal: true,
|
|
912
|
+
alias: "touched",
|
|
913
|
+
required: false
|
|
914
|
+
}]
|
|
915
|
+
}],
|
|
916
|
+
userClass: [{
|
|
917
|
+
type: i0.Input,
|
|
918
|
+
args: [{
|
|
919
|
+
isSignal: true,
|
|
920
|
+
alias: "class",
|
|
921
|
+
required: false
|
|
922
|
+
}]
|
|
923
|
+
}]
|
|
924
|
+
}
|
|
925
|
+
});
|
|
745
926
|
function warnInvalidDecimal(name, value) {
|
|
746
|
-
|
|
747
|
-
console.warn(`mona-decimal-text-box: ${name} ${JSON.stringify(value)} is not a decimal string; it is ignored.`);
|
|
748
|
-
}
|
|
927
|
+
if (typeof ngDevMode !== "undefined" && ngDevMode) console.warn(`mona-decimal-text-box: ${name} ${JSON.stringify(value)} is not a decimal string; it is ignored.`);
|
|
749
928
|
}
|
|
750
929
|
function decimalInput(name) {
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
return decimal;
|
|
757
|
-
};
|
|
930
|
+
return (value) => {
|
|
931
|
+
const decimal = toDecimalString(value);
|
|
932
|
+
if (decimal === null && value != null) warnInvalidDecimal(name, value);
|
|
933
|
+
return decimal;
|
|
934
|
+
};
|
|
758
935
|
}
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
*/
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
936
|
+
var DecimalTextBoxComponent = class DecimalTextBoxComponent extends NumericTextBoxBaseComponent {
|
|
937
|
+
constructor() {
|
|
938
|
+
super();
|
|
939
|
+
this.editFractionDigits = 100;
|
|
940
|
+
this.zeroValue = "0";
|
|
941
|
+
this.formatter = input(null, ...ngDevMode ? [{ debugName: "formatter" }] : /* istanbul ignore next */ []);
|
|
942
|
+
this.maxValue = input(null, {
|
|
943
|
+
...ngDevMode ? { debugName: "maxValue" } : /* istanbul ignore next */ {},
|
|
944
|
+
transform: decimalInput("maxValue")
|
|
945
|
+
});
|
|
946
|
+
this.minValue = input(null, {
|
|
947
|
+
...ngDevMode ? { debugName: "minValue" } : /* istanbul ignore next */ {},
|
|
948
|
+
transform: decimalInput("minValue")
|
|
949
|
+
});
|
|
950
|
+
this.step = input("1", {
|
|
951
|
+
...ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {},
|
|
952
|
+
transform: (value) => decimalInput("step")(value) ?? "1"
|
|
953
|
+
});
|
|
954
|
+
this.value = model(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
955
|
+
effect(() => {
|
|
956
|
+
const value = this.value();
|
|
957
|
+
if (value != null && toDecimalString(value) === null) warnInvalidDecimal("value", value);
|
|
958
|
+
});
|
|
959
|
+
}
|
|
960
|
+
compareValues(a, b) {
|
|
961
|
+
return compareDecimals(toDecimalString(a) ?? "0", toDecimalString(b) ?? "0");
|
|
962
|
+
}
|
|
963
|
+
readEditText(text, localeId, decimals) {
|
|
964
|
+
return validateLocalizedDecimalEdit(text, localeId, { decimals });
|
|
965
|
+
}
|
|
966
|
+
readLocaleText(text, localeId, decimals) {
|
|
967
|
+
return validateLocalizedDecimal(text, localeId, {
|
|
968
|
+
mode: "locale",
|
|
969
|
+
decimals
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
stepValue(value, direction) {
|
|
973
|
+
const current = toDecimalString(value) ?? "0";
|
|
974
|
+
return direction === "+" ? addDecimals(current, this.step()) : subtractDecimals(current, this.step());
|
|
975
|
+
}
|
|
976
|
+
static {
|
|
977
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
978
|
+
minVersion: "12.0.0",
|
|
979
|
+
version: "22.2.6",
|
|
980
|
+
ngImport: i0,
|
|
981
|
+
type: DecimalTextBoxComponent,
|
|
982
|
+
deps: [],
|
|
983
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
984
|
+
});
|
|
985
|
+
}
|
|
986
|
+
static {
|
|
987
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
988
|
+
minVersion: "17.0.0",
|
|
989
|
+
version: "22.2.6",
|
|
990
|
+
type: DecimalTextBoxComponent,
|
|
991
|
+
isStandalone: true,
|
|
992
|
+
selector: "mona-decimal-text-box",
|
|
993
|
+
inputs: {
|
|
994
|
+
formatter: {
|
|
995
|
+
classPropertyName: "formatter",
|
|
996
|
+
publicName: "formatter",
|
|
997
|
+
isSignal: true,
|
|
998
|
+
isRequired: false,
|
|
999
|
+
transformFunction: null
|
|
1000
|
+
},
|
|
1001
|
+
maxValue: {
|
|
1002
|
+
classPropertyName: "maxValue",
|
|
1003
|
+
publicName: "maxValue",
|
|
1004
|
+
isSignal: true,
|
|
1005
|
+
isRequired: false,
|
|
1006
|
+
transformFunction: null
|
|
1007
|
+
},
|
|
1008
|
+
minValue: {
|
|
1009
|
+
classPropertyName: "minValue",
|
|
1010
|
+
publicName: "minValue",
|
|
1011
|
+
isSignal: true,
|
|
1012
|
+
isRequired: false,
|
|
1013
|
+
transformFunction: null
|
|
1014
|
+
},
|
|
1015
|
+
step: {
|
|
1016
|
+
classPropertyName: "step",
|
|
1017
|
+
publicName: "step",
|
|
1018
|
+
isSignal: true,
|
|
1019
|
+
isRequired: false,
|
|
1020
|
+
transformFunction: null
|
|
1021
|
+
},
|
|
1022
|
+
value: {
|
|
1023
|
+
classPropertyName: "value",
|
|
1024
|
+
publicName: "value",
|
|
1025
|
+
isSignal: true,
|
|
1026
|
+
isRequired: false,
|
|
1027
|
+
transformFunction: null
|
|
1028
|
+
}
|
|
1029
|
+
},
|
|
1030
|
+
outputs: { value: "valueChange" },
|
|
1031
|
+
usesInheritance: true,
|
|
1032
|
+
ngImport: i0,
|
|
1033
|
+
template: "@for (prefixTemplate of prefixTemplateList(); track $index) {\n <span class=\"flex h-full flex-none flex-wrap items-center overflow-hidden border-none\">\n <ng-container *ngTemplateOutlet=\"prefixTemplate\"></ng-container>\n </span>\n}\n<input\n monaTextBox\n [id]=\"inputId()\"\n [disabled]=\"effectiveDisabled()\"\n [required]=\"required()\"\n [type]=\"'text'\"\n [attr.inputmode]=\"decimals() > 0 ? 'decimal' : 'numeric'\"\n [readonly]=\"readonly()\"\n [tabIndex]=\"tabindex()\"\n [placeholder]=\"placeholder()\"\n [value]=\"formattedValue()\"\n (input)=\"applyRawValue(valueTextBox.value)\"\n (keydown)=\"keydown$.next($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (focusout)=\"inputFocusOut.emit($event)\"\n (beforeinput)=\"beforeInput$.next($event)\"\n (paste)=\"onPaste($event)\"\n (wheel)=\"wheel$.next($event)\"\n [size]=\"size()\"\n [class]=\"inputClasses()\"\n autocomplete=\"off\"\n role=\"spinbutton\"\n [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n [attr.aria-invalid]=\"invalidInput() || null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-valuenow]=\"value()\"\n [attr.aria-valuemin]=\"minValue()\"\n [attr.aria-valuemax]=\"maxValue()\"\n [attr.aria-valuetext]=\"formattedValue() || null\"\n [attr.data-spinners]=\"showSpinners()\"\n #valueTextBox />\n@if (showSpinners()) {\n <div [class]=\"spinButtonClasses()\">\n <button\n monaButton\n [disabled]=\"effectiveDisabled()\"\n [tabindex]=\"-1\"\n look=\"ghost\"\n [size]=\"size()\"\n (mousedown)=\"$event.preventDefault()\"\n (pointerdown)=\"onSpinPointerDown($event, '+')\"\n (pointerup)=\"spinStop$.next()\"\n (pointerleave)=\"spinStop$.next()\"\n [attr.aria-label]=\"messages().increase\">\n <svg lucideChevronUp [size]=\"spinButtonIconSize()\"></svg>\n </button>\n <button\n monaButton\n [disabled]=\"effectiveDisabled()\"\n [tabindex]=\"-1\"\n look=\"ghost\"\n [size]=\"size()\"\n (mousedown)=\"$event.preventDefault()\"\n (pointerdown)=\"onSpinPointerDown($event, '-')\"\n (pointerup)=\"spinStop$.next()\"\n (pointerleave)=\"spinStop$.next()\"\n [attr.aria-label]=\"messages().decrease\">\n <svg lucideChevronDown [size]=\"spinButtonIconSize()\"></svg>\n </button>\n </div>\n}\n",
|
|
1034
|
+
dependencies: [
|
|
1035
|
+
{
|
|
1036
|
+
kind: "directive",
|
|
1037
|
+
type: NgTemplateOutlet,
|
|
1038
|
+
selector: "[ngTemplateOutlet]",
|
|
1039
|
+
inputs: [
|
|
1040
|
+
"ngTemplateOutletContext",
|
|
1041
|
+
"ngTemplateOutlet",
|
|
1042
|
+
"ngTemplateOutletInjector"
|
|
1043
|
+
]
|
|
1044
|
+
},
|
|
1045
|
+
{
|
|
1046
|
+
kind: "directive",
|
|
1047
|
+
type: TextBoxDirective,
|
|
1048
|
+
selector: "input[monaTextBox]",
|
|
1049
|
+
inputs: [
|
|
1050
|
+
"invalid",
|
|
1051
|
+
"rounded",
|
|
1052
|
+
"size",
|
|
1053
|
+
"touched",
|
|
1054
|
+
"class"
|
|
1055
|
+
]
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
kind: "directive",
|
|
1059
|
+
type: ButtonDirective,
|
|
1060
|
+
selector: "button[monaButton]",
|
|
1061
|
+
inputs: [
|
|
1062
|
+
"aria-haspopup",
|
|
1063
|
+
"disabled",
|
|
1064
|
+
"iconOnly",
|
|
1065
|
+
"loading",
|
|
1066
|
+
"look",
|
|
1067
|
+
"rounded",
|
|
1068
|
+
"selected",
|
|
1069
|
+
"size",
|
|
1070
|
+
"tabindex",
|
|
1071
|
+
"toggleable",
|
|
1072
|
+
"type",
|
|
1073
|
+
"class",
|
|
1074
|
+
"value"
|
|
1075
|
+
],
|
|
1076
|
+
outputs: ["lookChange", "selectedChange"]
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
kind: "component",
|
|
1080
|
+
type: LucideChevronUp,
|
|
1081
|
+
selector: "svg[lucideChevronUp]"
|
|
1082
|
+
},
|
|
1083
|
+
{
|
|
1084
|
+
kind: "component",
|
|
1085
|
+
type: LucideChevronDown,
|
|
1086
|
+
selector: "svg[lucideChevronDown]"
|
|
1087
|
+
}
|
|
1088
|
+
]
|
|
1089
|
+
});
|
|
1090
|
+
}
|
|
1091
|
+
};
|
|
1092
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1093
|
+
minVersion: "12.0.0",
|
|
1094
|
+
version: "22.2.6",
|
|
1095
|
+
ngImport: i0,
|
|
1096
|
+
type: DecimalTextBoxComponent,
|
|
1097
|
+
decorators: [{
|
|
1098
|
+
type: Component,
|
|
1099
|
+
args: [{
|
|
1100
|
+
selector: "mona-decimal-text-box",
|
|
1101
|
+
imports: [
|
|
1102
|
+
NgTemplateOutlet,
|
|
1103
|
+
TextBoxDirective,
|
|
1104
|
+
ButtonDirective,
|
|
1105
|
+
LucideChevronUp,
|
|
1106
|
+
LucideChevronDown
|
|
1107
|
+
],
|
|
1108
|
+
template: "@for (prefixTemplate of prefixTemplateList(); track $index) {\n <span class=\"flex h-full flex-none flex-wrap items-center overflow-hidden border-none\">\n <ng-container *ngTemplateOutlet=\"prefixTemplate\"></ng-container>\n </span>\n}\n<input\n monaTextBox\n [id]=\"inputId()\"\n [disabled]=\"effectiveDisabled()\"\n [required]=\"required()\"\n [type]=\"'text'\"\n [attr.inputmode]=\"decimals() > 0 ? 'decimal' : 'numeric'\"\n [readonly]=\"readonly()\"\n [tabIndex]=\"tabindex()\"\n [placeholder]=\"placeholder()\"\n [value]=\"formattedValue()\"\n (input)=\"applyRawValue(valueTextBox.value)\"\n (keydown)=\"keydown$.next($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (focusout)=\"inputFocusOut.emit($event)\"\n (beforeinput)=\"beforeInput$.next($event)\"\n (paste)=\"onPaste($event)\"\n (wheel)=\"wheel$.next($event)\"\n [size]=\"size()\"\n [class]=\"inputClasses()\"\n autocomplete=\"off\"\n role=\"spinbutton\"\n [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n [attr.aria-invalid]=\"invalidInput() || null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-valuenow]=\"value()\"\n [attr.aria-valuemin]=\"minValue()\"\n [attr.aria-valuemax]=\"maxValue()\"\n [attr.aria-valuetext]=\"formattedValue() || null\"\n [attr.data-spinners]=\"showSpinners()\"\n #valueTextBox />\n@if (showSpinners()) {\n <div [class]=\"spinButtonClasses()\">\n <button\n monaButton\n [disabled]=\"effectiveDisabled()\"\n [tabindex]=\"-1\"\n look=\"ghost\"\n [size]=\"size()\"\n (mousedown)=\"$event.preventDefault()\"\n (pointerdown)=\"onSpinPointerDown($event, '+')\"\n (pointerup)=\"spinStop$.next()\"\n (pointerleave)=\"spinStop$.next()\"\n [attr.aria-label]=\"messages().increase\">\n <svg lucideChevronUp [size]=\"spinButtonIconSize()\"></svg>\n </button>\n <button\n monaButton\n [disabled]=\"effectiveDisabled()\"\n [tabindex]=\"-1\"\n look=\"ghost\"\n [size]=\"size()\"\n (mousedown)=\"$event.preventDefault()\"\n (pointerdown)=\"onSpinPointerDown($event, '-')\"\n (pointerup)=\"spinStop$.next()\"\n (pointerleave)=\"spinStop$.next()\"\n [attr.aria-label]=\"messages().decrease\">\n <svg lucideChevronDown [size]=\"spinButtonIconSize()\"></svg>\n </button>\n </div>\n}\n"
|
|
1109
|
+
}]
|
|
1110
|
+
}],
|
|
1111
|
+
ctorParameters: () => [],
|
|
1112
|
+
propDecorators: {
|
|
1113
|
+
formatter: [{
|
|
1114
|
+
type: i0.Input,
|
|
1115
|
+
args: [{
|
|
1116
|
+
isSignal: true,
|
|
1117
|
+
alias: "formatter",
|
|
1118
|
+
required: false
|
|
1119
|
+
}]
|
|
1120
|
+
}],
|
|
1121
|
+
maxValue: [{
|
|
1122
|
+
type: i0.Input,
|
|
1123
|
+
args: [{
|
|
1124
|
+
isSignal: true,
|
|
1125
|
+
alias: "maxValue",
|
|
1126
|
+
required: false
|
|
1127
|
+
}]
|
|
1128
|
+
}],
|
|
1129
|
+
minValue: [{
|
|
1130
|
+
type: i0.Input,
|
|
1131
|
+
args: [{
|
|
1132
|
+
isSignal: true,
|
|
1133
|
+
alias: "minValue",
|
|
1134
|
+
required: false
|
|
1135
|
+
}]
|
|
1136
|
+
}],
|
|
1137
|
+
step: [{
|
|
1138
|
+
type: i0.Input,
|
|
1139
|
+
args: [{
|
|
1140
|
+
isSignal: true,
|
|
1141
|
+
alias: "step",
|
|
1142
|
+
required: false
|
|
1143
|
+
}]
|
|
1144
|
+
}],
|
|
1145
|
+
value: [{
|
|
1146
|
+
type: i0.Input,
|
|
1147
|
+
args: [{
|
|
1148
|
+
isSignal: true,
|
|
1149
|
+
alias: "value",
|
|
1150
|
+
required: false
|
|
1151
|
+
}]
|
|
1152
|
+
}, {
|
|
1153
|
+
type: i0.Output,
|
|
1154
|
+
args: ["valueChange"]
|
|
1155
|
+
}]
|
|
1156
|
+
}
|
|
1157
|
+
});
|
|
1158
|
+
var NumericTextBoxComponent = class NumericTextBoxComponent extends NumericTextBoxBaseComponent {
|
|
1159
|
+
constructor() {
|
|
1160
|
+
super(...arguments);
|
|
1161
|
+
this.editFractionDigits = 20;
|
|
1162
|
+
this.zeroValue = 0;
|
|
1163
|
+
this.formatter = input(null, ...ngDevMode ? [{ debugName: "formatter" }] : /* istanbul ignore next */ []);
|
|
1164
|
+
this.maxValue = input(null, ...ngDevMode ? [{ debugName: "maxValue" }] : /* istanbul ignore next */ []);
|
|
1165
|
+
this.minValue = input(null, ...ngDevMode ? [{ debugName: "minValue" }] : /* istanbul ignore next */ []);
|
|
1166
|
+
this.step = input(1, ...ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []);
|
|
1167
|
+
this.value = model(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
1168
|
+
}
|
|
1169
|
+
static calculate(value, step, type) {
|
|
1170
|
+
const precision = Math.max(NumericTextBoxComponent.getPrecision(value), NumericTextBoxComponent.getPrecision(step));
|
|
1171
|
+
const factor = Math.pow(10, precision);
|
|
1172
|
+
const signFactor = type === "+" ? 1 : -1;
|
|
1173
|
+
const newValue = (value * factor + signFactor * step * factor) / factor;
|
|
1174
|
+
return precision > 0 ? parseFloat(newValue.toFixed(precision)) : newValue;
|
|
1175
|
+
}
|
|
1176
|
+
static getPrecision(value) {
|
|
1177
|
+
const [mantissa, exponent] = value.toString().split("e");
|
|
1178
|
+
const fractionDigits = mantissa.split(".")[1]?.length ?? 0;
|
|
1179
|
+
return Math.max(0, fractionDigits - Number(exponent ?? 0));
|
|
1180
|
+
}
|
|
1181
|
+
static withoutNegativeZero(result) {
|
|
1182
|
+
return Object.is(result.value, -0) ? {
|
|
1183
|
+
...result,
|
|
1184
|
+
value: 0
|
|
1185
|
+
} : result;
|
|
1186
|
+
}
|
|
1187
|
+
compareValues(a, b) {
|
|
1188
|
+
return a - b;
|
|
1189
|
+
}
|
|
1190
|
+
readEditText(text, localeId, decimals) {
|
|
1191
|
+
return NumericTextBoxComponent.withoutNegativeZero(validateLocalizedNumberEdit(text, localeId, { decimals }));
|
|
1192
|
+
}
|
|
1193
|
+
readLocaleText(text, localeId, decimals) {
|
|
1194
|
+
return NumericTextBoxComponent.withoutNegativeZero(validateLocalizedNumber(text, localeId, {
|
|
1195
|
+
mode: "locale",
|
|
1196
|
+
decimals
|
|
1197
|
+
}));
|
|
1198
|
+
}
|
|
1199
|
+
stepValue(value, direction) {
|
|
1200
|
+
const result = NumericTextBoxComponent.calculate(value, this.step(), direction);
|
|
1201
|
+
const limited = Math.min(Math.max(result, Number.MIN_SAFE_INTEGER), Number.MAX_SAFE_INTEGER);
|
|
1202
|
+
if (direction === "+" && limited < value || direction === "-" && limited > value) return value;
|
|
1203
|
+
return limited;
|
|
1204
|
+
}
|
|
1205
|
+
static {
|
|
1206
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1207
|
+
minVersion: "12.0.0",
|
|
1208
|
+
version: "22.2.6",
|
|
1209
|
+
ngImport: i0,
|
|
1210
|
+
type: NumericTextBoxComponent,
|
|
1211
|
+
deps: null,
|
|
1212
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1213
|
+
});
|
|
1214
|
+
}
|
|
1215
|
+
static {
|
|
1216
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1217
|
+
minVersion: "17.0.0",
|
|
1218
|
+
version: "22.2.6",
|
|
1219
|
+
type: NumericTextBoxComponent,
|
|
1220
|
+
isStandalone: true,
|
|
1221
|
+
selector: "mona-numeric-text-box",
|
|
1222
|
+
inputs: {
|
|
1223
|
+
formatter: {
|
|
1224
|
+
classPropertyName: "formatter",
|
|
1225
|
+
publicName: "formatter",
|
|
1226
|
+
isSignal: true,
|
|
1227
|
+
isRequired: false,
|
|
1228
|
+
transformFunction: null
|
|
1229
|
+
},
|
|
1230
|
+
maxValue: {
|
|
1231
|
+
classPropertyName: "maxValue",
|
|
1232
|
+
publicName: "maxValue",
|
|
1233
|
+
isSignal: true,
|
|
1234
|
+
isRequired: false,
|
|
1235
|
+
transformFunction: null
|
|
1236
|
+
},
|
|
1237
|
+
minValue: {
|
|
1238
|
+
classPropertyName: "minValue",
|
|
1239
|
+
publicName: "minValue",
|
|
1240
|
+
isSignal: true,
|
|
1241
|
+
isRequired: false,
|
|
1242
|
+
transformFunction: null
|
|
1243
|
+
},
|
|
1244
|
+
step: {
|
|
1245
|
+
classPropertyName: "step",
|
|
1246
|
+
publicName: "step",
|
|
1247
|
+
isSignal: true,
|
|
1248
|
+
isRequired: false,
|
|
1249
|
+
transformFunction: null
|
|
1250
|
+
},
|
|
1251
|
+
value: {
|
|
1252
|
+
classPropertyName: "value",
|
|
1253
|
+
publicName: "value",
|
|
1254
|
+
isSignal: true,
|
|
1255
|
+
isRequired: false,
|
|
1256
|
+
transformFunction: null
|
|
1257
|
+
}
|
|
1258
|
+
},
|
|
1259
|
+
outputs: { value: "valueChange" },
|
|
1260
|
+
usesInheritance: true,
|
|
1261
|
+
ngImport: i0,
|
|
1262
|
+
template: "@for (prefixTemplate of prefixTemplateList(); track $index) {\n <span class=\"flex h-full flex-none flex-wrap items-center overflow-hidden border-none\">\n <ng-container *ngTemplateOutlet=\"prefixTemplate\"></ng-container>\n </span>\n}\n<input\n monaTextBox\n [id]=\"inputId()\"\n [disabled]=\"effectiveDisabled()\"\n [required]=\"required()\"\n [type]=\"'text'\"\n [attr.inputmode]=\"decimals() > 0 ? 'decimal' : 'numeric'\"\n [readonly]=\"readonly()\"\n [tabIndex]=\"tabindex()\"\n [placeholder]=\"placeholder()\"\n [value]=\"formattedValue()\"\n (input)=\"applyRawValue(valueTextBox.value)\"\n (keydown)=\"keydown$.next($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (focusout)=\"inputFocusOut.emit($event)\"\n (beforeinput)=\"beforeInput$.next($event)\"\n (paste)=\"onPaste($event)\"\n (wheel)=\"wheel$.next($event)\"\n [size]=\"size()\"\n [class]=\"inputClasses()\"\n autocomplete=\"off\"\n role=\"spinbutton\"\n [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n [attr.aria-invalid]=\"invalidInput() || null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-valuenow]=\"value()\"\n [attr.aria-valuemin]=\"minValue()\"\n [attr.aria-valuemax]=\"maxValue()\"\n [attr.aria-valuetext]=\"formattedValue() || null\"\n [attr.data-spinners]=\"showSpinners()\"\n #valueTextBox />\n@if (showSpinners()) {\n <div [class]=\"spinButtonClasses()\">\n <button\n monaButton\n [disabled]=\"effectiveDisabled()\"\n [tabindex]=\"-1\"\n look=\"ghost\"\n [size]=\"size()\"\n (mousedown)=\"$event.preventDefault()\"\n (pointerdown)=\"onSpinPointerDown($event, '+')\"\n (pointerup)=\"spinStop$.next()\"\n (pointerleave)=\"spinStop$.next()\"\n [attr.aria-label]=\"messages().increase\">\n <svg lucideChevronUp [size]=\"spinButtonIconSize()\"></svg>\n </button>\n <button\n monaButton\n [disabled]=\"effectiveDisabled()\"\n [tabindex]=\"-1\"\n look=\"ghost\"\n [size]=\"size()\"\n (mousedown)=\"$event.preventDefault()\"\n (pointerdown)=\"onSpinPointerDown($event, '-')\"\n (pointerup)=\"spinStop$.next()\"\n (pointerleave)=\"spinStop$.next()\"\n [attr.aria-label]=\"messages().decrease\">\n <svg lucideChevronDown [size]=\"spinButtonIconSize()\"></svg>\n </button>\n </div>\n}\n",
|
|
1263
|
+
dependencies: [
|
|
1264
|
+
{
|
|
1265
|
+
kind: "directive",
|
|
1266
|
+
type: NgTemplateOutlet,
|
|
1267
|
+
selector: "[ngTemplateOutlet]",
|
|
1268
|
+
inputs: [
|
|
1269
|
+
"ngTemplateOutletContext",
|
|
1270
|
+
"ngTemplateOutlet",
|
|
1271
|
+
"ngTemplateOutletInjector"
|
|
1272
|
+
]
|
|
1273
|
+
},
|
|
1274
|
+
{
|
|
1275
|
+
kind: "directive",
|
|
1276
|
+
type: TextBoxDirective,
|
|
1277
|
+
selector: "input[monaTextBox]",
|
|
1278
|
+
inputs: [
|
|
1279
|
+
"invalid",
|
|
1280
|
+
"rounded",
|
|
1281
|
+
"size",
|
|
1282
|
+
"touched",
|
|
1283
|
+
"class"
|
|
1284
|
+
]
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
kind: "directive",
|
|
1288
|
+
type: ButtonDirective,
|
|
1289
|
+
selector: "button[monaButton]",
|
|
1290
|
+
inputs: [
|
|
1291
|
+
"aria-haspopup",
|
|
1292
|
+
"disabled",
|
|
1293
|
+
"iconOnly",
|
|
1294
|
+
"loading",
|
|
1295
|
+
"look",
|
|
1296
|
+
"rounded",
|
|
1297
|
+
"selected",
|
|
1298
|
+
"size",
|
|
1299
|
+
"tabindex",
|
|
1300
|
+
"toggleable",
|
|
1301
|
+
"type",
|
|
1302
|
+
"class",
|
|
1303
|
+
"value"
|
|
1304
|
+
],
|
|
1305
|
+
outputs: ["lookChange", "selectedChange"]
|
|
1306
|
+
},
|
|
1307
|
+
{
|
|
1308
|
+
kind: "component",
|
|
1309
|
+
type: LucideChevronUp,
|
|
1310
|
+
selector: "svg[lucideChevronUp]"
|
|
1311
|
+
},
|
|
1312
|
+
{
|
|
1313
|
+
kind: "component",
|
|
1314
|
+
type: LucideChevronDown,
|
|
1315
|
+
selector: "svg[lucideChevronDown]"
|
|
1316
|
+
}
|
|
1317
|
+
]
|
|
1318
|
+
});
|
|
1319
|
+
}
|
|
1320
|
+
};
|
|
1321
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1322
|
+
minVersion: "12.0.0",
|
|
1323
|
+
version: "22.2.6",
|
|
1324
|
+
ngImport: i0,
|
|
1325
|
+
type: NumericTextBoxComponent,
|
|
1326
|
+
decorators: [{
|
|
1327
|
+
type: Component,
|
|
1328
|
+
args: [{
|
|
1329
|
+
selector: "mona-numeric-text-box",
|
|
1330
|
+
imports: [
|
|
1331
|
+
NgTemplateOutlet,
|
|
1332
|
+
TextBoxDirective,
|
|
1333
|
+
ButtonDirective,
|
|
1334
|
+
LucideChevronUp,
|
|
1335
|
+
LucideChevronDown
|
|
1336
|
+
],
|
|
1337
|
+
template: "@for (prefixTemplate of prefixTemplateList(); track $index) {\n <span class=\"flex h-full flex-none flex-wrap items-center overflow-hidden border-none\">\n <ng-container *ngTemplateOutlet=\"prefixTemplate\"></ng-container>\n </span>\n}\n<input\n monaTextBox\n [id]=\"inputId()\"\n [disabled]=\"effectiveDisabled()\"\n [required]=\"required()\"\n [type]=\"'text'\"\n [attr.inputmode]=\"decimals() > 0 ? 'decimal' : 'numeric'\"\n [readonly]=\"readonly()\"\n [tabIndex]=\"tabindex()\"\n [placeholder]=\"placeholder()\"\n [value]=\"formattedValue()\"\n (input)=\"applyRawValue(valueTextBox.value)\"\n (keydown)=\"keydown$.next($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (focusout)=\"inputFocusOut.emit($event)\"\n (beforeinput)=\"beforeInput$.next($event)\"\n (paste)=\"onPaste($event)\"\n (wheel)=\"wheel$.next($event)\"\n [size]=\"size()\"\n [class]=\"inputClasses()\"\n autocomplete=\"off\"\n role=\"spinbutton\"\n [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n [attr.aria-invalid]=\"invalidInput() || null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-valuenow]=\"value()\"\n [attr.aria-valuemin]=\"minValue()\"\n [attr.aria-valuemax]=\"maxValue()\"\n [attr.aria-valuetext]=\"formattedValue() || null\"\n [attr.data-spinners]=\"showSpinners()\"\n #valueTextBox />\n@if (showSpinners()) {\n <div [class]=\"spinButtonClasses()\">\n <button\n monaButton\n [disabled]=\"effectiveDisabled()\"\n [tabindex]=\"-1\"\n look=\"ghost\"\n [size]=\"size()\"\n (mousedown)=\"$event.preventDefault()\"\n (pointerdown)=\"onSpinPointerDown($event, '+')\"\n (pointerup)=\"spinStop$.next()\"\n (pointerleave)=\"spinStop$.next()\"\n [attr.aria-label]=\"messages().increase\">\n <svg lucideChevronUp [size]=\"spinButtonIconSize()\"></svg>\n </button>\n <button\n monaButton\n [disabled]=\"effectiveDisabled()\"\n [tabindex]=\"-1\"\n look=\"ghost\"\n [size]=\"size()\"\n (mousedown)=\"$event.preventDefault()\"\n (pointerdown)=\"onSpinPointerDown($event, '-')\"\n (pointerup)=\"spinStop$.next()\"\n (pointerleave)=\"spinStop$.next()\"\n [attr.aria-label]=\"messages().decrease\">\n <svg lucideChevronDown [size]=\"spinButtonIconSize()\"></svg>\n </button>\n </div>\n}\n"
|
|
1338
|
+
}]
|
|
1339
|
+
}],
|
|
1340
|
+
propDecorators: {
|
|
1341
|
+
formatter: [{
|
|
1342
|
+
type: i0.Input,
|
|
1343
|
+
args: [{
|
|
1344
|
+
isSignal: true,
|
|
1345
|
+
alias: "formatter",
|
|
1346
|
+
required: false
|
|
1347
|
+
}]
|
|
1348
|
+
}],
|
|
1349
|
+
maxValue: [{
|
|
1350
|
+
type: i0.Input,
|
|
1351
|
+
args: [{
|
|
1352
|
+
isSignal: true,
|
|
1353
|
+
alias: "maxValue",
|
|
1354
|
+
required: false
|
|
1355
|
+
}]
|
|
1356
|
+
}],
|
|
1357
|
+
minValue: [{
|
|
1358
|
+
type: i0.Input,
|
|
1359
|
+
args: [{
|
|
1360
|
+
isSignal: true,
|
|
1361
|
+
alias: "minValue",
|
|
1362
|
+
required: false
|
|
1363
|
+
}]
|
|
1364
|
+
}],
|
|
1365
|
+
step: [{
|
|
1366
|
+
type: i0.Input,
|
|
1367
|
+
args: [{
|
|
1368
|
+
isSignal: true,
|
|
1369
|
+
alias: "step",
|
|
1370
|
+
required: false
|
|
1371
|
+
}]
|
|
1372
|
+
}],
|
|
1373
|
+
value: [{
|
|
1374
|
+
type: i0.Input,
|
|
1375
|
+
args: [{
|
|
1376
|
+
isSignal: true,
|
|
1377
|
+
alias: "value",
|
|
1378
|
+
required: false
|
|
1379
|
+
}]
|
|
1380
|
+
}, {
|
|
1381
|
+
type: i0.Output,
|
|
1382
|
+
args: ["valueChange"]
|
|
1383
|
+
}]
|
|
1384
|
+
}
|
|
1385
|
+
});
|
|
907
1386
|
export { DecimalTextBoxComponent, NUMERIC_TEXT_BOX_DEFAULT_MESSAGES, NumericTextBoxComponent, NumericTextBoxPrefixTemplateDirective };
|
|
908
|
-
|
|
1387
|
+
|
|
1388
|
+
//# sourceMappingURL=nanahoshi-mona-ui-numeric-text-box.mjs.map
|