@rxap/forms 18.0.2 → 18.0.3-dev.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/CHANGELOG.md +4 -0
- package/README.md +1 -1
- package/compodoc/changelog.html +775 -0
- package/compodoc/classes/ControlValueAccessor.html +607 -0
- package/compodoc/classes/FormArrayControlManager.html +1177 -0
- package/compodoc/classes/RxapFormArray.html +3898 -0
- package/compodoc/classes/RxapFormBuilder.html +1132 -0
- package/compodoc/classes/RxapFormControl.html +3573 -0
- package/compodoc/classes/RxapFormGroup.html +6619 -0
- package/compodoc/dependencies.html +215 -0
- package/compodoc/directives/FormControlErrorDirective.html +496 -0
- package/compodoc/directives/FormControlMarkDirtyDirective.html +446 -0
- package/compodoc/directives/FormControlMarkPristineDirective.html +445 -0
- package/compodoc/directives/FormControlMarkTouchedDirective.html +438 -0
- package/compodoc/directives/FormControlMarkUntouchedDirective.html +445 -0
- package/compodoc/directives/FormControlNameDirective.html +527 -0
- package/compodoc/directives/FormDirective.html +2415 -0
- package/compodoc/directives/FormGroupNameDirective.html +500 -0
- package/compodoc/directives/FormLoadedDirective.html +374 -0
- package/compodoc/directives/FormLoadingDirective.html +374 -0
- package/compodoc/directives/FormLoadingErrorDirective.html +370 -0
- package/compodoc/directives/FormSubmitDirective.html +690 -0
- package/compodoc/directives/FormSubmitFailedDirective.html +370 -0
- package/compodoc/directives/FormSubmitInvalidDirective.html +368 -0
- package/compodoc/directives/FormSubmitSuccessfulDirective.html +368 -0
- package/compodoc/directives/FormSubmittingDirective.html +374 -0
- package/compodoc/directives/ParentControlContainerDirective.html +274 -0
- package/compodoc/fonts/ionicons.eot +0 -0
- package/compodoc/fonts/ionicons.svg +2090 -0
- package/compodoc/fonts/ionicons.ttf +0 -0
- package/compodoc/fonts/ionicons.woff +0 -0
- package/compodoc/fonts/ionicons.woff2 +0 -0
- package/compodoc/fonts/roboto-v15-latin-300.eot +0 -0
- package/compodoc/fonts/roboto-v15-latin-300.svg +314 -0
- package/compodoc/fonts/roboto-v15-latin-300.ttf +0 -0
- package/compodoc/fonts/roboto-v15-latin-300.woff +0 -0
- package/compodoc/fonts/roboto-v15-latin-300.woff2 +0 -0
- package/compodoc/fonts/roboto-v15-latin-700.eot +0 -0
- package/compodoc/fonts/roboto-v15-latin-700.svg +310 -0
- package/compodoc/fonts/roboto-v15-latin-700.ttf +0 -0
- package/compodoc/fonts/roboto-v15-latin-700.woff +0 -0
- package/compodoc/fonts/roboto-v15-latin-700.woff2 +0 -0
- package/compodoc/fonts/roboto-v15-latin-italic.eot +0 -0
- package/compodoc/fonts/roboto-v15-latin-italic.svg +323 -0
- package/compodoc/fonts/roboto-v15-latin-italic.ttf +0 -0
- package/compodoc/fonts/roboto-v15-latin-italic.woff +0 -0
- package/compodoc/fonts/roboto-v15-latin-italic.woff2 +0 -0
- package/compodoc/fonts/roboto-v15-latin-regular.eot +0 -0
- package/compodoc/fonts/roboto-v15-latin-regular.svg +308 -0
- package/compodoc/fonts/roboto-v15-latin-regular.ttf +0 -0
- package/compodoc/fonts/roboto-v15-latin-regular.woff +0 -0
- package/compodoc/fonts/roboto-v15-latin-regular.woff2 +0 -0
- package/compodoc/graph/dependencies.svg +450 -0
- package/compodoc/images/compodoc-vectorise-inverted.png +0 -0
- package/compodoc/images/compodoc-vectorise-inverted.svg +201 -0
- package/compodoc/images/compodoc-vectorise.png +0 -0
- package/compodoc/images/compodoc-vectorise.svg +201 -0
- package/compodoc/images/favicon.ico +0 -0
- package/compodoc/index.html +190 -0
- package/compodoc/interfaces/AbstractControl.html +622 -0
- package/compodoc/interfaces/AbstractControlOptions.html +448 -0
- package/compodoc/interfaces/BoxedValue.html +436 -0
- package/compodoc/interfaces/ComplexityOptions.html +819 -0
- package/compodoc/interfaces/ControlOptions.html +689 -0
- package/compodoc/interfaces/ControlSetValueOptions.html +345 -0
- package/compodoc/interfaces/FormArrayOptions.html +544 -0
- package/compodoc/interfaces/FormDefinition.html +626 -0
- package/compodoc/interfaces/FormDefinitionArray.html +427 -0
- package/compodoc/interfaces/FormDefinitionMetadata.html +486 -0
- package/compodoc/interfaces/FormGroupOptions.html +427 -0
- package/compodoc/interfaces/FormLoadFailedMethod.html +360 -0
- package/compodoc/interfaces/FormLoadMethod.html +330 -0
- package/compodoc/interfaces/FormLoadSuccessfulMethod.html +360 -0
- package/compodoc/interfaces/FormOptions.html +427 -0
- package/compodoc/interfaces/FormSubmitFailedMethod.html +360 -0
- package/compodoc/interfaces/FormSubmitMethod.html +360 -0
- package/compodoc/interfaces/FormSubmitSuccessfulMethod.html +360 -0
- package/compodoc/interfaces/InjectableValidator.html +472 -0
- package/compodoc/interfaces/IsNumberOptions.html +515 -0
- package/compodoc/interfaces/LengthOptions.html +564 -0
- package/compodoc/interfaces/NgValidatorsErrors.html +613 -0
- package/compodoc/interfaces/RegexOptions.html +603 -0
- package/compodoc/interfaces/RxapAbstractControlOptionsWithDefinition.html +427 -0
- package/compodoc/js/compodoc.js +14 -0
- package/compodoc/js/lazy-load-graphs.js +44 -0
- package/compodoc/js/libs/EventDispatcher.js +5 -0
- package/compodoc/js/libs/bootstrap-native.js +2 -0
- package/compodoc/js/libs/clipboard.min.js +7 -0
- package/compodoc/js/libs/custom-elements-es5-adapter.js +15 -0
- package/compodoc/js/libs/custom-elements.min.js +38 -0
- package/compodoc/js/libs/d3.v3.min.js +2 -0
- package/compodoc/js/libs/deep-iterator.js +2 -0
- package/compodoc/js/libs/es6-shim.min.js +12 -0
- package/compodoc/js/libs/htmlparser.js +23 -0
- package/compodoc/js/libs/innersvg.js +9 -0
- package/compodoc/js/libs/lit-html.js +1 -0
- package/compodoc/js/libs/prism.js +46 -0
- package/compodoc/js/libs/promise.min.js +6 -0
- package/compodoc/js/libs/svg-pan-zoom.min.js +3 -0
- package/compodoc/js/libs/tablesort.min.js +6 -0
- package/compodoc/js/libs/tablesort.number.min.js +6 -0
- package/compodoc/js/libs/vis.min.js +47 -0
- package/compodoc/js/libs/zepto.min.js +2 -0
- package/compodoc/js/menu-wc.js +339 -0
- package/compodoc/js/menu-wc_es5.js +40 -0
- package/compodoc/js/menu.js +270 -0
- package/compodoc/js/routes.js +301 -0
- package/compodoc/js/search/lunr.min.js +6 -0
- package/compodoc/js/search/search-lunr.js +67 -0
- package/compodoc/js/search/search.js +283 -0
- package/compodoc/js/search/search_index.js +4 -0
- package/compodoc/js/sourceCode.js +58 -0
- package/compodoc/js/svg-pan-zoom.controls.js +53 -0
- package/compodoc/js/tabs.js +21 -0
- package/compodoc/js/tree.js +147 -0
- package/compodoc/license.html +731 -0
- package/compodoc/miscellaneous/enumerations.html +291 -0
- package/compodoc/miscellaneous/functions.html +3756 -0
- package/compodoc/miscellaneous/typealiases.html +657 -0
- package/compodoc/miscellaneous/variables.html +554 -0
- package/compodoc/modules/RxapFormsModule/dependencies.svg +450 -0
- package/compodoc/modules/RxapFormsModule.html +864 -0
- package/compodoc/modules.html +200 -0
- package/compodoc/overview.html +681 -0
- package/compodoc/properties.html +195 -0
- package/compodoc/styles/bootstrap-card.css +219 -0
- package/compodoc/styles/bootstrap.min.css +6 -0
- package/compodoc/styles/compodoc.css +1124 -0
- package/compodoc/styles/dark.css +121 -0
- package/compodoc/styles/ionicons.min.css +11 -0
- package/compodoc/styles/laravel.css +113 -0
- package/compodoc/styles/material.css +131 -0
- package/compodoc/styles/original.css +51 -0
- package/compodoc/styles/postmark.css +238 -0
- package/compodoc/styles/prism.css +301 -0
- package/compodoc/styles/readthedocs.css +117 -0
- package/compodoc/styles/reset.css +129 -0
- package/compodoc/styles/stripe.css +106 -0
- package/compodoc/styles/style.css +7 -0
- package/compodoc/styles/tablesort.css +33 -0
- package/compodoc/styles/vagrant.css +130 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +92 -0
- package/docs/assets/icons.js +15 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +59 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1412 -0
- package/docs/classes/ControlValueAccessor.html +8 -0
- package/docs/classes/FormArrayControlManager.html +6 -0
- package/docs/classes/FormControlErrorDirective.html +11 -0
- package/docs/classes/FormControlMarkDirtyDirective.html +4 -0
- package/docs/classes/FormControlMarkPristineDirective.html +4 -0
- package/docs/classes/FormControlMarkTouchedDirective.html +4 -0
- package/docs/classes/FormControlMarkUntouchedDirective.html +4 -0
- package/docs/classes/FormControlNameDirective.html +113 -0
- package/docs/classes/FormDirective.html +187 -0
- package/docs/classes/FormGroupNameDirective.html +101 -0
- package/docs/classes/FormLoadedDirective.html +8 -0
- package/docs/classes/FormLoadingDirective.html +8 -0
- package/docs/classes/FormLoadingErrorDirective.html +8 -0
- package/docs/classes/FormSubmitDirective.html +15 -0
- package/docs/classes/FormSubmitFailedDirective.html +8 -0
- package/docs/classes/FormSubmitInvalidDirective.html +8 -0
- package/docs/classes/FormSubmitSuccessfulDirective.html +8 -0
- package/docs/classes/FormSubmittingDirective.html +8 -0
- package/docs/classes/ParentControlContainerDirective.html +2 -0
- package/docs/classes/RxapFormArray.html +429 -0
- package/docs/classes/RxapFormBuilder.html +65 -0
- package/docs/classes/RxapFormControl.html +264 -0
- package/docs/classes/RxapFormGroup.html +260 -0
- package/docs/classes/RxapFormsModule.html +2 -0
- package/docs/documentation.json +91227 -0
- package/docs/enums/MetadataKeys.html +9 -0
- package/docs/functions/ControlAsyncValidator.html +1 -0
- package/docs/functions/ControlChange.html +1 -0
- package/docs/functions/ControlSetValue.html +1 -0
- package/docs/functions/ControlValidator.html +1 -0
- package/docs/functions/IsArray.html +1 -0
- package/docs/functions/IsBoolean.html +1 -0
- package/docs/functions/IsComplex.html +1 -0
- package/docs/functions/IsDate.html +1 -0
- package/docs/functions/IsEmail.html +1 -0
- package/docs/functions/IsEnum.html +1 -0
- package/docs/functions/IsIP.html +1 -0
- package/docs/functions/IsInt.html +1 -0
- package/docs/functions/IsNumber.html +2 -0
- package/docs/functions/IsObject.html +1 -0
- package/docs/functions/IsPhoneNumber.html +1 -0
- package/docs/functions/IsPort.html +1 -0
- package/docs/functions/IsString.html +1 -0
- package/docs/functions/IsUUID.html +1 -0
- package/docs/functions/IsUrl.html +1 -0
- package/docs/functions/RxapForm.html +1 -0
- package/docs/functions/ToFormMethod.html +1 -0
- package/docs/functions/ToFormSubmitMethod.html +3 -0
- package/docs/functions/UseFormArrayControl.html +1 -0
- package/docs/functions/UseFormArrayGroup.html +1 -0
- package/docs/functions/UseFormControl.html +1 -0
- package/docs/functions/UseFormGroup.html +1 -0
- package/docs/functions/_IsNumber.html +1 -0
- package/docs/functions/controlDisabledWhile.html +1 -0
- package/docs/functions/controlDisabled_.html +1 -0
- package/docs/functions/controlEnabledWhile.html +1 -0
- package/docs/functions/controlEnabled_.html +1 -0
- package/docs/functions/controlErrorChanges_.html +1 -0
- package/docs/functions/controlReadonly_.html +1 -0
- package/docs/functions/controlStatusChanges_.html +1 -0
- package/docs/functions/controlValueChanges_.html +1 -0
- package/docs/functions/disableControl.html +1 -0
- package/docs/functions/enableControl.html +1 -0
- package/docs/functions/hasErrorAndDirty.html +1 -0
- package/docs/functions/hasErrorAndTouched.html +1 -0
- package/docs/functions/isNumber-1.html +2 -0
- package/docs/functions/markAllDirty.html +1 -0
- package/docs/functions/markAllPristine.html +1 -0
- package/docs/functions/markAllUntouched.html +1 -0
- package/docs/functions/mergeControlValidators.html +1 -0
- package/docs/functions/selectControlValue_.html +1 -0
- package/docs/functions/validateControlOn.html +1 -0
- package/docs/hierarchy.html +1 -0
- package/docs/index.html +16 -0
- package/docs/interfaces/AbstractControl.html +373 -0
- package/docs/interfaces/AbstractControlOptions.html +5 -0
- package/docs/interfaces/BoxedValue.html +3 -0
- package/docs/interfaces/ComplexityOptions.html +11 -0
- package/docs/interfaces/ControlOptions.html +20 -0
- package/docs/interfaces/ControlSetValueOptions.html +3 -0
- package/docs/interfaces/FormArrayOptions.html +16 -0
- package/docs/interfaces/FormDefinition.html +13 -0
- package/docs/interfaces/FormDefinitionArray.html +179 -0
- package/docs/interfaces/FormDefinitionMetadata.html +17 -0
- package/docs/interfaces/FormGroupOptions.html +13 -0
- package/docs/interfaces/FormLoadFailedMethod.html +3 -0
- package/docs/interfaces/FormLoadMethod.html +3 -0
- package/docs/interfaces/FormLoadSuccessfulMethod.html +3 -0
- package/docs/interfaces/FormOptions.html +13 -0
- package/docs/interfaces/FormSubmitFailedMethod.html +3 -0
- package/docs/interfaces/FormSubmitMethod.html +3 -0
- package/docs/interfaces/FormSubmitSuccessfulMethod.html +3 -0
- package/docs/interfaces/InjectableValidator.html +3 -0
- package/docs/interfaces/IsNumberOptions.html +6 -0
- package/docs/interfaces/NgValidatorsErrors.html +8 -0
- package/docs/interfaces/RxapAbstractControlOptionsWithDefinition.html +13 -0
- package/docs/interfaces/_RxapAbstractControlOptions.html +12 -0
- package/docs/modules.html +128 -0
- package/docs/types/AsyncValidator.html +1 -0
- package/docs/types/AsyncValidatorFn.html +1 -0
- package/docs/types/ChangeFn.html +1 -0
- package/docs/types/ControlEventOptions.html +1 -0
- package/docs/types/ControlInsertedFn.html +1 -0
- package/docs/types/ControlPath.html +1 -0
- package/docs/types/ControlRemovedFn.html +1 -0
- package/docs/types/ControlState.html +1 -0
- package/docs/types/EmitEvent.html +1 -0
- package/docs/types/ExtractAbstractControl.html +1 -0
- package/docs/types/ExtractStrings.html +1 -0
- package/docs/types/FormBuilderFn.html +1 -0
- package/docs/types/FormType.html +1 -0
- package/docs/types/KeyValueControls.html +1 -0
- package/docs/types/OnlySelf.html +1 -0
- package/docs/types/OrBoxedValue.html +1 -0
- package/docs/types/RxapAbstractControlOptions.html +1 -0
- package/docs/types/SetValueFn.html +1 -0
- package/docs/types/ValidationErrors.html +1 -0
- package/docs/types/Validator.html +1 -0
- package/docs/types/ValidatorFn.html +1 -0
- package/docs/types/ValidatorOrOpts.html +1 -0
- package/docs/variables/RXAP_FORM_CONTEXT.html +1 -0
- package/docs/variables/RXAP_FORM_DEFINITION.html +1 -0
- package/docs/variables/RXAP_FORM_DEFINITION_BUILDER.html +1 -0
- package/docs/variables/RXAP_FORM_INITIAL_STATE.html +1 -0
- package/docs/variables/RXAP_FORM_LOAD_FAILED_METHOD.html +1 -0
- package/docs/variables/RXAP_FORM_LOAD_METHOD.html +1 -0
- package/docs/variables/RXAP_FORM_LOAD_SUCCESSFUL_METHOD.html +1 -0
- package/docs/variables/RXAP_FORM_SUBMIT_FAILED_METHOD.html +1 -0
- package/docs/variables/RXAP_FORM_SUBMIT_METHOD.html +1 -0
- package/docs/variables/RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD.html +1 -0
- package/docs/variables/RxapValidators.html +1 -0
- package/package.json +18 -18
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html class="no-js" lang="">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
6
|
+
<title>angular-forms</title>
|
|
7
|
+
<meta name="description" content="">
|
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
+
|
|
10
|
+
<link rel="icon" type="image/x-icon" href="../images/favicon.ico">
|
|
11
|
+
<link rel="stylesheet" href="../styles/style.css">
|
|
12
|
+
<link rel="stylesheet" href="../styles/dark.css">
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<script>
|
|
16
|
+
// Blocking script to avoid flickering dark mode
|
|
17
|
+
// Dark mode toggle button
|
|
18
|
+
var useDark = window.matchMedia('(prefers-color-scheme: dark)');
|
|
19
|
+
var darkModeState = useDark.matches;
|
|
20
|
+
var $darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
|
|
21
|
+
var $darkModeToggles = document.querySelectorAll('.dark-mode-switch');
|
|
22
|
+
var darkModeStateLocal = localStorage.getItem('compodoc_darkmode-state');
|
|
23
|
+
|
|
24
|
+
function checkToggle(check) {
|
|
25
|
+
for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
|
|
26
|
+
$darkModeToggleSwitchers[i].checked = check;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function toggleDarkMode(state) {
|
|
31
|
+
if (window.localStorage) {
|
|
32
|
+
localStorage.setItem('compodoc_darkmode-state', state);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
checkToggle(state);
|
|
36
|
+
|
|
37
|
+
const hasClass = document.body.classList.contains('dark');
|
|
38
|
+
|
|
39
|
+
if (state) {
|
|
40
|
+
for (var i = 0; i < $darkModeToggles.length; i++) {
|
|
41
|
+
$darkModeToggles[i].classList.add('dark');
|
|
42
|
+
}
|
|
43
|
+
if (!hasClass) {
|
|
44
|
+
document.body.classList.add('dark');
|
|
45
|
+
}
|
|
46
|
+
} else {
|
|
47
|
+
for (var i = 0; i < $darkModeToggles.length; i++) {
|
|
48
|
+
$darkModeToggles[i].classList.remove('dark');
|
|
49
|
+
}
|
|
50
|
+
if (hasClass) {
|
|
51
|
+
document.body.classList.remove('dark');
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
useDark.addEventListener('change', function (evt) {
|
|
57
|
+
toggleDarkMode(evt.matches);
|
|
58
|
+
});
|
|
59
|
+
if (darkModeStateLocal) {
|
|
60
|
+
darkModeState = darkModeStateLocal === 'true';
|
|
61
|
+
}
|
|
62
|
+
toggleDarkMode(darkModeState);
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
<div class="navbar navbar-default navbar-fixed-top d-md-none p-0">
|
|
66
|
+
<div class="d-flex">
|
|
67
|
+
<a href="../" class="navbar-brand">angular-forms</a>
|
|
68
|
+
<button type="button" class="btn btn-default btn-menu ion-ios-menu" id="btn-menu"></button>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<div class="xs-menu menu" id="mobile-menu">
|
|
73
|
+
<div id="book-search-input" role="search"><input type="text" placeholder="Type to search"></div> <compodoc-menu></compodoc-menu>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<div class="container-fluid main">
|
|
77
|
+
<div class="row main">
|
|
78
|
+
<div class="d-none d-md-block menu">
|
|
79
|
+
<compodoc-menu mode="normal"></compodoc-menu>
|
|
80
|
+
</div>
|
|
81
|
+
<!-- START CONTENT -->
|
|
82
|
+
<div class="content interface">
|
|
83
|
+
<div class="content-data">
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
<ol class="breadcrumb">
|
|
98
|
+
<li class="breadcrumb-item">Interfaces</li>
|
|
99
|
+
<li class="breadcrumb-item"
|
|
100
|
+
>
|
|
101
|
+
IsNumberOptions</li>
|
|
102
|
+
</ol>
|
|
103
|
+
|
|
104
|
+
<ul class="nav nav-tabs" role="tablist">
|
|
105
|
+
<li class="nav-item">
|
|
106
|
+
<a href="#info"
|
|
107
|
+
class="nav-link"
|
|
108
|
+
class="nav-link active"
|
|
109
|
+
role="tab" id="info-tab" data-bs-toggle="tab" data-link="info">Info</a>
|
|
110
|
+
</li>
|
|
111
|
+
<li class="nav-item">
|
|
112
|
+
<a href="#source"
|
|
113
|
+
class="nav-link"
|
|
114
|
+
|
|
115
|
+
role="tab" id="source-tab" data-bs-toggle="tab" data-link="source">Source</a>
|
|
116
|
+
</li>
|
|
117
|
+
</ul>
|
|
118
|
+
|
|
119
|
+
<div class="tab-content">
|
|
120
|
+
<div class="tab-pane fade active in" id="info">
|
|
121
|
+
<p class="comment">
|
|
122
|
+
<h3>File</h3>
|
|
123
|
+
</p>
|
|
124
|
+
<p class="comment">
|
|
125
|
+
<code>src/lib/validators/is-number.ts</code>
|
|
126
|
+
</p>
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
<p class="comment">
|
|
130
|
+
<h3>Description</h3>
|
|
131
|
+
</p>
|
|
132
|
+
<p class="comment">
|
|
133
|
+
<p>Options to be passed to IsNumber decorator.</p>
|
|
134
|
+
|
|
135
|
+
</p>
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
<section data-compodoc="block-index">
|
|
139
|
+
<h3 id="index">Index</h3>
|
|
140
|
+
<table class="table table-sm table-bordered index-table">
|
|
141
|
+
<tbody>
|
|
142
|
+
<tr>
|
|
143
|
+
<td class="col-md-4">
|
|
144
|
+
<h6><b>Properties</b></h6>
|
|
145
|
+
</td>
|
|
146
|
+
</tr>
|
|
147
|
+
<tr>
|
|
148
|
+
<td class="col-md-4">
|
|
149
|
+
<ul class="index-list">
|
|
150
|
+
<li>
|
|
151
|
+
<span class="modifier">Optional</span>
|
|
152
|
+
<a href="#allowInfinity"
|
|
153
|
+
>
|
|
154
|
+
allowInfinity
|
|
155
|
+
</a>
|
|
156
|
+
</li>
|
|
157
|
+
<li>
|
|
158
|
+
<span class="modifier">Optional</span>
|
|
159
|
+
<a href="#allowNaN"
|
|
160
|
+
>
|
|
161
|
+
allowNaN
|
|
162
|
+
</a>
|
|
163
|
+
</li>
|
|
164
|
+
<li>
|
|
165
|
+
<span class="modifier">Optional</span>
|
|
166
|
+
<a href="#maxDecimalPlaces"
|
|
167
|
+
>
|
|
168
|
+
maxDecimalPlaces
|
|
169
|
+
</a>
|
|
170
|
+
</li>
|
|
171
|
+
<li>
|
|
172
|
+
<span class="modifier">Optional</span>
|
|
173
|
+
<a href="#strict"
|
|
174
|
+
>
|
|
175
|
+
strict
|
|
176
|
+
</a>
|
|
177
|
+
</li>
|
|
178
|
+
</ul>
|
|
179
|
+
</td>
|
|
180
|
+
</tr>
|
|
181
|
+
</tbody>
|
|
182
|
+
</table>
|
|
183
|
+
</section>
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
<section data-compodoc="block-properties">
|
|
188
|
+
<h3 id="inputs">Properties</h3>
|
|
189
|
+
<table class="table table-sm table-bordered">
|
|
190
|
+
<tbody>
|
|
191
|
+
<tr>
|
|
192
|
+
<td class="col-md-4">
|
|
193
|
+
<a name="allowInfinity"></a>
|
|
194
|
+
<span class="name "><b>allowInfinity</b>
|
|
195
|
+
<a href="#allowInfinity">
|
|
196
|
+
<span class="icon ion-ios-link"></span>
|
|
197
|
+
</a>
|
|
198
|
+
</span>
|
|
199
|
+
</td>
|
|
200
|
+
</tr>
|
|
201
|
+
<tr>
|
|
202
|
+
<td class="col-md-4">
|
|
203
|
+
<code>allowInfinity: <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code>
|
|
204
|
+
</code>
|
|
205
|
+
</td>
|
|
206
|
+
</tr>
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
<tr>
|
|
210
|
+
<td class="col-md-4">
|
|
211
|
+
<i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code>
|
|
212
|
+
|
|
213
|
+
</td>
|
|
214
|
+
</tr>
|
|
215
|
+
|
|
216
|
+
<tr>
|
|
217
|
+
<td class="col-md-4">
|
|
218
|
+
<i>Optional</i>
|
|
219
|
+
</td>
|
|
220
|
+
</tr>
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
</tbody>
|
|
226
|
+
</table>
|
|
227
|
+
<table class="table table-sm table-bordered">
|
|
228
|
+
<tbody>
|
|
229
|
+
<tr>
|
|
230
|
+
<td class="col-md-4">
|
|
231
|
+
<a name="allowNaN"></a>
|
|
232
|
+
<span class="name "><b>allowNaN</b>
|
|
233
|
+
<a href="#allowNaN">
|
|
234
|
+
<span class="icon ion-ios-link"></span>
|
|
235
|
+
</a>
|
|
236
|
+
</span>
|
|
237
|
+
</td>
|
|
238
|
+
</tr>
|
|
239
|
+
<tr>
|
|
240
|
+
<td class="col-md-4">
|
|
241
|
+
<code>allowNaN: <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code>
|
|
242
|
+
</code>
|
|
243
|
+
</td>
|
|
244
|
+
</tr>
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
<tr>
|
|
248
|
+
<td class="col-md-4">
|
|
249
|
+
<i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code>
|
|
250
|
+
|
|
251
|
+
</td>
|
|
252
|
+
</tr>
|
|
253
|
+
|
|
254
|
+
<tr>
|
|
255
|
+
<td class="col-md-4">
|
|
256
|
+
<i>Optional</i>
|
|
257
|
+
</td>
|
|
258
|
+
</tr>
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
</tbody>
|
|
264
|
+
</table>
|
|
265
|
+
<table class="table table-sm table-bordered">
|
|
266
|
+
<tbody>
|
|
267
|
+
<tr>
|
|
268
|
+
<td class="col-md-4">
|
|
269
|
+
<a name="maxDecimalPlaces"></a>
|
|
270
|
+
<span class="name "><b>maxDecimalPlaces</b>
|
|
271
|
+
<a href="#maxDecimalPlaces">
|
|
272
|
+
<span class="icon ion-ios-link"></span>
|
|
273
|
+
</a>
|
|
274
|
+
</span>
|
|
275
|
+
</td>
|
|
276
|
+
</tr>
|
|
277
|
+
<tr>
|
|
278
|
+
<td class="col-md-4">
|
|
279
|
+
<code>maxDecimalPlaces: <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/number" target="_blank" >number</a></code>
|
|
280
|
+
</code>
|
|
281
|
+
</td>
|
|
282
|
+
</tr>
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
<tr>
|
|
286
|
+
<td class="col-md-4">
|
|
287
|
+
<i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/number" target="_blank" >number</a></code>
|
|
288
|
+
|
|
289
|
+
</td>
|
|
290
|
+
</tr>
|
|
291
|
+
|
|
292
|
+
<tr>
|
|
293
|
+
<td class="col-md-4">
|
|
294
|
+
<i>Optional</i>
|
|
295
|
+
</td>
|
|
296
|
+
</tr>
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
</tbody>
|
|
302
|
+
</table>
|
|
303
|
+
<table class="table table-sm table-bordered">
|
|
304
|
+
<tbody>
|
|
305
|
+
<tr>
|
|
306
|
+
<td class="col-md-4">
|
|
307
|
+
<a name="strict"></a>
|
|
308
|
+
<span class="name "><b>strict</b>
|
|
309
|
+
<a href="#strict">
|
|
310
|
+
<span class="icon ion-ios-link"></span>
|
|
311
|
+
</a>
|
|
312
|
+
</span>
|
|
313
|
+
</td>
|
|
314
|
+
</tr>
|
|
315
|
+
<tr>
|
|
316
|
+
<td class="col-md-4">
|
|
317
|
+
<code>strict: <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code>
|
|
318
|
+
</code>
|
|
319
|
+
</td>
|
|
320
|
+
</tr>
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
<tr>
|
|
324
|
+
<td class="col-md-4">
|
|
325
|
+
<i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code>
|
|
326
|
+
|
|
327
|
+
</td>
|
|
328
|
+
</tr>
|
|
329
|
+
|
|
330
|
+
<tr>
|
|
331
|
+
<td class="col-md-4">
|
|
332
|
+
<i>Optional</i>
|
|
333
|
+
</td>
|
|
334
|
+
</tr>
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
</tbody>
|
|
340
|
+
</table>
|
|
341
|
+
</section>
|
|
342
|
+
</div>
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
<div class="tab-pane fade tab-source-code" id="source">
|
|
346
|
+
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
347
|
+
AbstractControl,
|
|
348
|
+
ValidationErrors,
|
|
349
|
+
} from '@angular/forms';
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Options to be passed to IsNumber decorator.
|
|
353
|
+
*/
|
|
354
|
+
export interface IsNumberOptions {
|
|
355
|
+
allowNaN?: boolean;
|
|
356
|
+
allowInfinity?: boolean;
|
|
357
|
+
maxDecimalPlaces?: number;
|
|
358
|
+
strict?: boolean;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Checks if a given value is a number.
|
|
363
|
+
*/
|
|
364
|
+
export function isNumber(value: unknown, options: IsNumberOptions = {}): value is number {
|
|
365
|
+
if (typeof value !== 'number') {
|
|
366
|
+
return false;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
if (value === Infinity || value === -Infinity) {
|
|
370
|
+
return options.allowInfinity ?? false;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
if (Number.isNaN(value)) {
|
|
374
|
+
return options.allowNaN ?? false;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
if (options.maxDecimalPlaces !== undefined) {
|
|
378
|
+
let decimalPlaces = 0;
|
|
379
|
+
if (value % 1 !== 0) {
|
|
380
|
+
decimalPlaces = value.toString().split('.')[1].length;
|
|
381
|
+
}
|
|
382
|
+
if (decimalPlaces > options.maxDecimalPlaces) {
|
|
383
|
+
return false;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
return Number.isFinite(value);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* @deprecated use RxapValidators.isNumber() instead
|
|
392
|
+
* @param control
|
|
393
|
+
* @constructor
|
|
394
|
+
*/
|
|
395
|
+
export function IsNumber(control: AbstractControl): ValidationErrors | null {
|
|
396
|
+
if (control.value === null) {
|
|
397
|
+
return null;
|
|
398
|
+
}
|
|
399
|
+
if (isNaN(Number(control.value))) {
|
|
400
|
+
return {
|
|
401
|
+
isNumber: {
|
|
402
|
+
expected: 'A number or a string representing a number',
|
|
403
|
+
actual: control.value,
|
|
404
|
+
},
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
return null;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
export function _IsNumber({
|
|
411
|
+
message,
|
|
412
|
+
options,
|
|
413
|
+
}: { message?: string, options?: IsNumberOptions } = {}) {
|
|
414
|
+
return (control: AbstractControl): ValidationErrors | null => {
|
|
415
|
+
if (control.value === null) {
|
|
416
|
+
return null;
|
|
417
|
+
}
|
|
418
|
+
if (!isNumber(
|
|
419
|
+
!options?.strict && typeof control.value === 'string' ? Number(control.value) : control.value,
|
|
420
|
+
options,
|
|
421
|
+
)) {
|
|
422
|
+
return {
|
|
423
|
+
isNumber: {
|
|
424
|
+
expected: 'A number value',
|
|
425
|
+
actual: control.value,
|
|
426
|
+
message,
|
|
427
|
+
},
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
return null;
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
</code></pre>
|
|
434
|
+
</div>
|
|
435
|
+
</div>
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
</div><div class="search-results">
|
|
445
|
+
<div class="has-results">
|
|
446
|
+
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
|
447
|
+
<ul class="search-results-list"></ul>
|
|
448
|
+
</div>
|
|
449
|
+
<div class="no-results">
|
|
450
|
+
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
|
451
|
+
</div>
|
|
452
|
+
</div>
|
|
453
|
+
</div>
|
|
454
|
+
<!-- END CONTENT -->
|
|
455
|
+
</div>
|
|
456
|
+
</div>
|
|
457
|
+
|
|
458
|
+
<label class="dark-mode-switch">
|
|
459
|
+
<input type="checkbox">
|
|
460
|
+
<span class="slider">
|
|
461
|
+
<svg class="slider-icon" viewBox="0 0 24 24" fill="none" height="20" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" width="20" xmlns="http://www.w3.org/2000/svg">
|
|
462
|
+
<path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"></path>
|
|
463
|
+
</svg>
|
|
464
|
+
</span>
|
|
465
|
+
</label>
|
|
466
|
+
|
|
467
|
+
<script>
|
|
468
|
+
var COMPODOC_CURRENT_PAGE_DEPTH = 1;
|
|
469
|
+
var COMPODOC_CURRENT_PAGE_CONTEXT = 'interface';
|
|
470
|
+
var COMPODOC_CURRENT_PAGE_URL = 'IsNumberOptions.html';
|
|
471
|
+
var MAX_SEARCH_RESULTS = 15;
|
|
472
|
+
</script>
|
|
473
|
+
|
|
474
|
+
<script>
|
|
475
|
+
$darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
|
|
476
|
+
checkToggle(darkModeState);
|
|
477
|
+
if ($darkModeToggleSwitchers.length > 0) {
|
|
478
|
+
for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
|
|
479
|
+
$darkModeToggleSwitchers[i].addEventListener('change', function (event) {
|
|
480
|
+
darkModeState = !darkModeState;
|
|
481
|
+
toggleDarkMode(darkModeState);
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
</script>
|
|
486
|
+
|
|
487
|
+
<script src="../js/libs/custom-elements.min.js"></script>
|
|
488
|
+
<script src="../js/libs/lit-html.js"></script>
|
|
489
|
+
|
|
490
|
+
<script src="../js/menu-wc.js" defer></script>
|
|
491
|
+
<script nomodule src="../js/menu-wc_es5.js" defer></script>
|
|
492
|
+
|
|
493
|
+
<script src="../js/libs/bootstrap-native.js"></script>
|
|
494
|
+
|
|
495
|
+
<script src="../js/libs/es6-shim.min.js"></script>
|
|
496
|
+
<script src="../js/libs/EventDispatcher.js"></script>
|
|
497
|
+
<script src="../js/libs/promise.min.js"></script>
|
|
498
|
+
<script src="../js/libs/zepto.min.js"></script>
|
|
499
|
+
|
|
500
|
+
<script src="../js/compodoc.js"></script>
|
|
501
|
+
|
|
502
|
+
<script src="../js/tabs.js"></script>
|
|
503
|
+
<script src="../js/menu.js"></script>
|
|
504
|
+
<script src="../js/libs/clipboard.min.js"></script>
|
|
505
|
+
<script src="../js/libs/prism.js"></script>
|
|
506
|
+
<script src="../js/sourceCode.js"></script>
|
|
507
|
+
<script src="../js/search/search.js"></script>
|
|
508
|
+
<script src="../js/search/lunr.min.js"></script>
|
|
509
|
+
<script src="../js/search/search-lunr.js"></script>
|
|
510
|
+
<script src="../js/search/search_index.js"></script>
|
|
511
|
+
<script src="../js/lazy-load-graphs.js"></script>
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
</body>
|
|
515
|
+
</html>
|