@rxap/forms 19.0.0-dev.1 → 19.0.0-dev.2
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 +44 -0
- package/compodoc/classes/RxapFormArray.html +77 -76
- package/compodoc/classes/RxapFormControl.html +75 -74
- package/compodoc/classes/RxapFormGroup.html +135 -134
- package/compodoc/dependencies.html +13 -13
- package/compodoc/directives/FormControlErrorDirective.html +4 -5
- package/compodoc/directives/FormDirective.html +273 -76
- package/compodoc/directives/FormLoadedDirective.html +1 -1
- package/compodoc/directives/FormLoadingDirective.html +1 -1
- package/compodoc/directives/FormLoadingErrorDirective.html +1 -1
- package/compodoc/directives/FormResetDirective.html +450 -0
- package/compodoc/directives/FormSubmitDirective.html +5 -5
- package/compodoc/directives/FormSubmitFailedDirective.html +1 -1
- package/compodoc/directives/FormSubmitInvalidDirective.html +1 -1
- package/compodoc/directives/FormSubmitSuccessfulDirective.html +1 -1
- package/compodoc/directives/FormSubmittingDirective.html +1 -1
- package/compodoc/index.html +1 -1
- package/compodoc/interfaces/ControlSetValueOptions.html +2 -2
- package/compodoc/interfaces/FormLoadFailedMethod.html +11 -8
- package/compodoc/interfaces/FormLoadMethod.html +10 -7
- package/compodoc/interfaces/FormLoadSuccessfulMethod.html +10 -7
- package/compodoc/interfaces/FormSubmitFailedMethod.html +11 -8
- package/compodoc/interfaces/FormSubmitMethod.html +24 -9
- package/compodoc/interfaces/FormSubmitSuccessfulMethod.html +10 -7
- package/compodoc/js/menu-wc.js +6 -3
- package/compodoc/js/menu-wc_es5.js +2 -2
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/miscellaneous/functions.html +178 -0
- package/compodoc/modules/RxapFormsModule.html +11 -11
- package/compodoc/overview.html +1 -1
- package/compodoc/properties.html +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/ControlValueAccessor.html +2 -2
- package/docs/classes/FormArrayControlManager.html +2 -2
- package/docs/classes/FormControlErrorDirective.html +2 -2
- package/docs/classes/FormControlMarkDirtyDirective.html +2 -2
- package/docs/classes/FormControlMarkPristineDirective.html +2 -2
- package/docs/classes/FormControlMarkTouchedDirective.html +2 -2
- package/docs/classes/FormControlMarkUntouchedDirective.html +2 -2
- package/docs/classes/FormControlNameDirective.html +28 -28
- package/docs/classes/FormDirective.html +47 -47
- package/docs/classes/FormGroupNameDirective.html +23 -23
- package/docs/classes/FormLoadedDirective.html +2 -2
- package/docs/classes/FormLoadingDirective.html +2 -2
- package/docs/classes/FormLoadingErrorDirective.html +2 -2
- package/docs/classes/FormResetDirective.html +8 -0
- package/docs/classes/FormSubmitDirective.html +2 -2
- package/docs/classes/FormSubmitFailedDirective.html +2 -2
- package/docs/classes/FormSubmitInvalidDirective.html +2 -2
- package/docs/classes/FormSubmitSuccessfulDirective.html +2 -2
- package/docs/classes/FormSubmittingDirective.html +2 -2
- package/docs/classes/ParentControlContainerDirective.html +1 -1
- package/docs/classes/RxapFormArray.html +67 -71
- package/docs/classes/RxapFormBuilder.html +8 -8
- package/docs/classes/RxapFormControl.html +50 -50
- package/docs/classes/RxapFormGroup.html +46 -46
- package/docs/classes/RxapFormsModule.html +1 -1
- package/docs/documentation.json +10310 -9109
- package/docs/enums/MetadataKeys.html +2 -2
- package/docs/functions/ControlAsyncValidator.html +1 -1
- package/docs/functions/ControlChange.html +1 -1
- package/docs/functions/ControlSetValue.html +1 -1
- package/docs/functions/ControlValidator.html +1 -1
- package/docs/functions/IsArray.html +1 -1
- package/docs/functions/IsBoolean.html +1 -1
- package/docs/functions/IsComplex.html +1 -1
- package/docs/functions/IsDate.html +1 -1
- package/docs/functions/IsEmail.html +1 -1
- package/docs/functions/IsEnum.html +1 -1
- package/docs/functions/IsIP.html +1 -1
- package/docs/functions/IsInt.html +1 -1
- package/docs/functions/IsNumber.html +1 -1
- package/docs/functions/IsObject.html +1 -1
- package/docs/functions/IsPhoneNumber.html +1 -1
- package/docs/functions/IsPort.html +1 -1
- package/docs/functions/IsString.html +1 -1
- package/docs/functions/IsUUID.html +1 -1
- package/docs/functions/IsUrl.html +1 -1
- package/docs/functions/RxapForm.html +1 -1
- package/docs/functions/ToFormMethod.html +1 -1
- package/docs/functions/ToFormSubmitMethod.html +1 -1
- package/docs/functions/ToMethodWithInjectionContext.html +1 -1
- package/docs/functions/ToMethodWithInjectionContextFactory.html +1 -1
- package/docs/functions/UseFormArrayControl.html +1 -1
- package/docs/functions/UseFormArrayGroup.html +1 -1
- package/docs/functions/UseFormControl.html +1 -1
- package/docs/functions/UseFormGroup.html +1 -1
- package/docs/functions/_IsNumber.html +1 -1
- package/docs/functions/controlDisabledWhile.html +1 -1
- package/docs/functions/controlDisabled_.html +1 -1
- package/docs/functions/controlEnabledWhile.html +1 -1
- package/docs/functions/controlEnabled_.html +1 -1
- package/docs/functions/controlErrorChanges_.html +1 -1
- package/docs/functions/controlReadonly_.html +1 -1
- package/docs/functions/controlStatusChanges_.html +1 -1
- package/docs/functions/controlValueChanges_.html +1 -1
- package/docs/functions/disableControl.html +1 -1
- package/docs/functions/enableControl.html +1 -1
- package/docs/functions/hasErrorAndDirty.html +1 -1
- package/docs/functions/hasErrorAndTouched.html +1 -1
- package/docs/functions/isNumber-1.html +1 -1
- package/docs/functions/markAllDirty.html +1 -1
- package/docs/functions/markAllPristine.html +1 -1
- package/docs/functions/markAllUntouched.html +1 -1
- package/docs/functions/mergeControlValidators.html +1 -1
- package/docs/functions/selectControlValue_.html +1 -1
- package/docs/functions/validateControlOn.html +1 -1
- package/docs/index.html +1 -1
- package/docs/interfaces/AbstractControl.html +67 -67
- package/docs/interfaces/AbstractControlOptions.html +3 -3
- package/docs/interfaces/BoxedValue.html +2 -2
- package/docs/interfaces/ComplexityOptions.html +2 -2
- package/docs/interfaces/ControlOptions.html +3 -3
- package/docs/interfaces/ControlSetValueOptions.html +2 -2
- package/docs/interfaces/FormArrayOptions.html +4 -4
- package/docs/interfaces/FormDefinition.html +6 -6
- package/docs/interfaces/FormDefinitionArray.html +11 -15
- package/docs/interfaces/FormDefinitionMetadata.html +5 -5
- package/docs/interfaces/FormGroupOptions.html +4 -4
- package/docs/interfaces/FormLoadFailedMethod.html +2 -2
- package/docs/interfaces/FormLoadMethod.html +2 -2
- package/docs/interfaces/FormLoadSuccessfulMethod.html +2 -2
- package/docs/interfaces/FormOptions.html +4 -4
- package/docs/interfaces/FormSubmitFailedMethod.html +2 -2
- package/docs/interfaces/FormSubmitMethod.html +2 -2
- package/docs/interfaces/FormSubmitSuccessfulMethod.html +2 -2
- package/docs/interfaces/InjectableValidator.html +2 -2
- package/docs/interfaces/IsNumberOptions.html +2 -2
- package/docs/interfaces/NgValidatorsErrors.html +2 -2
- package/docs/interfaces/RxapAbstractControlOptionsWithDefinition.html +4 -4
- package/docs/interfaces/_RxapAbstractControlOptions.html +4 -4
- package/docs/modules.html +1 -0
- package/docs/types/AsyncValidator.html +1 -1
- package/docs/types/AsyncValidatorFn.html +1 -1
- package/docs/types/ChangeFn.html +1 -1
- package/docs/types/ControlEventOptions.html +1 -1
- package/docs/types/ControlInsertedFn.html +1 -1
- package/docs/types/ControlPath.html +1 -1
- package/docs/types/ControlRemovedFn.html +1 -1
- package/docs/types/ControlState.html +1 -1
- package/docs/types/EmitEvent.html +1 -1
- package/docs/types/ExtractAbstractControl.html +1 -1
- package/docs/types/ExtractStrings.html +1 -1
- package/docs/types/FormBuilderFn.html +1 -1
- package/docs/types/FormType.html +1 -1
- package/docs/types/KeyValueControls.html +1 -1
- package/docs/types/OnlySelf.html +1 -1
- package/docs/types/OrBoxedValue.html +1 -1
- package/docs/types/RxapAbstractControlOptions.html +1 -1
- package/docs/types/SetValueFn.html +1 -1
- package/docs/types/ValidationErrors.html +1 -1
- package/docs/types/Validator.html +1 -1
- package/docs/types/ValidatorFn.html +1 -1
- package/docs/types/ValidatorOrOpts.html +1 -1
- package/docs/variables/RXAP_FORM_CONTEXT.html +1 -1
- package/docs/variables/RXAP_FORM_DEFINITION.html +1 -1
- package/docs/variables/RXAP_FORM_DEFINITION_BUILDER.html +1 -1
- package/docs/variables/RXAP_FORM_INITIAL_STATE.html +1 -1
- package/docs/variables/RXAP_FORM_LOAD_FAILED_METHOD.html +1 -1
- package/docs/variables/RXAP_FORM_LOAD_METHOD.html +1 -1
- package/docs/variables/RXAP_FORM_LOAD_SUCCESSFUL_METHOD.html +1 -1
- package/docs/variables/RXAP_FORM_SUBMIT_FAILED_METHOD.html +1 -1
- package/docs/variables/RXAP_FORM_SUBMIT_METHOD.html +1 -1
- package/docs/variables/RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD.html +1 -1
- package/docs/variables/RxapValidators.html +1 -1
- package/package.json +22 -23
- package/theme.css +95 -1
|
@@ -243,12 +243,12 @@
|
|
|
243
243
|
TemplateRef,
|
|
244
244
|
ViewContainerRef,
|
|
245
245
|
} from '@angular/core';
|
|
246
|
-
import { FormDirective } from './form.directive';
|
|
247
246
|
import { Subscription } from 'rxjs';
|
|
248
247
|
import {
|
|
249
248
|
distinctUntilChanged,
|
|
250
249
|
tap,
|
|
251
250
|
} from 'rxjs/operators';
|
|
251
|
+
import { FormDirective } from './form.directive';
|
|
252
252
|
|
|
253
253
|
@Directive({
|
|
254
254
|
selector: '[rxapFormLoaded]',
|
|
@@ -243,12 +243,12 @@
|
|
|
243
243
|
TemplateRef,
|
|
244
244
|
ViewContainerRef,
|
|
245
245
|
} from '@angular/core';
|
|
246
|
-
import { FormDirective } from './form.directive';
|
|
247
246
|
import { Subscription } from 'rxjs';
|
|
248
247
|
import {
|
|
249
248
|
distinctUntilChanged,
|
|
250
249
|
tap,
|
|
251
250
|
} from 'rxjs/operators';
|
|
251
|
+
import { FormDirective } from './form.directive';
|
|
252
252
|
|
|
253
253
|
@Directive({
|
|
254
254
|
selector: '[rxapFormLoading]',
|
|
@@ -243,9 +243,9 @@
|
|
|
243
243
|
TemplateRef,
|
|
244
244
|
ViewContainerRef,
|
|
245
245
|
} from '@angular/core';
|
|
246
|
-
import { FormDirective } from './form.directive';
|
|
247
246
|
import { Subscription } from 'rxjs';
|
|
248
247
|
import { tap } from 'rxjs/operators';
|
|
248
|
+
import { FormDirective } from './form.directive';
|
|
249
249
|
|
|
250
250
|
@Directive({
|
|
251
251
|
selector: '[rxapFormLoadingError]',
|
|
@@ -0,0 +1,450 @@
|
|
|
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 directive">
|
|
83
|
+
<div class="content-data">
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
<ol class="breadcrumb">
|
|
92
|
+
<li class="breadcrumb-item">Directives</li>
|
|
93
|
+
<li class="breadcrumb-item" >FormResetDirective</li>
|
|
94
|
+
</ol>
|
|
95
|
+
|
|
96
|
+
<ul class="nav nav-tabs" role="tablist">
|
|
97
|
+
<li class="nav-item">
|
|
98
|
+
<a href="#info"
|
|
99
|
+
class="nav-link"
|
|
100
|
+
class="nav-link active"
|
|
101
|
+
role="tab" id="info-tab" data-bs-toggle="tab" data-link="info">Info</a>
|
|
102
|
+
</li>
|
|
103
|
+
<li class="nav-item">
|
|
104
|
+
<a href="#source"
|
|
105
|
+
class="nav-link"
|
|
106
|
+
|
|
107
|
+
role="tab" id="source-tab" data-bs-toggle="tab" data-link="source">Source</a>
|
|
108
|
+
</li>
|
|
109
|
+
</ul>
|
|
110
|
+
|
|
111
|
+
<div class="tab-content">
|
|
112
|
+
<div class="tab-pane fade active in" id="info">
|
|
113
|
+
<p class="comment">
|
|
114
|
+
<h3>File</h3>
|
|
115
|
+
</p>
|
|
116
|
+
<p class="comment">
|
|
117
|
+
<code>src/lib/directives/form-reset.directive.ts</code>
|
|
118
|
+
</p>
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
<p class="comment">
|
|
123
|
+
<h3>Extends</h3>
|
|
124
|
+
</p>
|
|
125
|
+
<p class="comment">
|
|
126
|
+
<code>ConfirmClick</code>
|
|
127
|
+
</p>
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
<section data-compodoc="block-metadata">
|
|
132
|
+
<h3>Metadata</h3>
|
|
133
|
+
<table class="table table-sm table-hover metadata">
|
|
134
|
+
<tbody>
|
|
135
|
+
|
|
136
|
+
<tr>
|
|
137
|
+
<td class="col-md-3">Selector</td>
|
|
138
|
+
<td class="col-md-9"><code>[rxapFormReset]</code></td>
|
|
139
|
+
</tr>
|
|
140
|
+
|
|
141
|
+
<tr>
|
|
142
|
+
<td class="col-md-3">Standalone</td>
|
|
143
|
+
<td class="col-md-9"><code>true</code></td>
|
|
144
|
+
</tr>
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
</tbody>
|
|
149
|
+
</table>
|
|
150
|
+
</section>
|
|
151
|
+
|
|
152
|
+
<section data-compodoc="block-index">
|
|
153
|
+
<h3 id="index">Index</h3>
|
|
154
|
+
<table class="table table-sm table-bordered index-table">
|
|
155
|
+
<tbody>
|
|
156
|
+
|
|
157
|
+
<tr>
|
|
158
|
+
<td class="col-md-4">
|
|
159
|
+
<h6><b>Methods</b></h6>
|
|
160
|
+
</td>
|
|
161
|
+
</tr>
|
|
162
|
+
<tr>
|
|
163
|
+
<td class="col-md-4">
|
|
164
|
+
<ul class="index-list">
|
|
165
|
+
<li>
|
|
166
|
+
<span class="modifier">Protected</span>
|
|
167
|
+
<a href="#execute" >execute</a>
|
|
168
|
+
</li>
|
|
169
|
+
</ul>
|
|
170
|
+
</td>
|
|
171
|
+
</tr>
|
|
172
|
+
|
|
173
|
+
<tr>
|
|
174
|
+
<td class="col-md-4">
|
|
175
|
+
<h6><b>Inputs</b></h6>
|
|
176
|
+
</td>
|
|
177
|
+
</tr>
|
|
178
|
+
<tr>
|
|
179
|
+
<td class="col-md-4">
|
|
180
|
+
<ul class="index-list">
|
|
181
|
+
<li>
|
|
182
|
+
<a href="#type" >type</a>
|
|
183
|
+
</li>
|
|
184
|
+
</ul>
|
|
185
|
+
</td>
|
|
186
|
+
</tr>
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
</tbody>
|
|
192
|
+
</table>
|
|
193
|
+
</section>
|
|
194
|
+
|
|
195
|
+
<section data-compodoc="block-constructor">
|
|
196
|
+
<h3 id="constructor">Constructor</h3>
|
|
197
|
+
<table class="table table-sm table-bordered">
|
|
198
|
+
<tbody>
|
|
199
|
+
<tr>
|
|
200
|
+
<td class="col-md-4">
|
|
201
|
+
<code>constructor(formDirective: <a href="../directives/FormDirective.html" target="_self">FormDirective</a>)</code>
|
|
202
|
+
</td>
|
|
203
|
+
</tr>
|
|
204
|
+
<tr>
|
|
205
|
+
<td class="col-md-4">
|
|
206
|
+
<div class="io-line">Defined in <a href="" data-line="22" class="link-to-prism">src/lib/directives/form-reset.directive.ts:22</a></div>
|
|
207
|
+
</td>
|
|
208
|
+
</tr>
|
|
209
|
+
|
|
210
|
+
<tr>
|
|
211
|
+
<td class="col-md-4">
|
|
212
|
+
<div>
|
|
213
|
+
<b>Parameters :</b>
|
|
214
|
+
<table class="params">
|
|
215
|
+
<thead>
|
|
216
|
+
<tr>
|
|
217
|
+
<td>Name</td>
|
|
218
|
+
<td>Type</td>
|
|
219
|
+
<td>Optional</td>
|
|
220
|
+
</tr>
|
|
221
|
+
</thead>
|
|
222
|
+
<tbody>
|
|
223
|
+
<tr>
|
|
224
|
+
<td>formDirective</td>
|
|
225
|
+
|
|
226
|
+
<td>
|
|
227
|
+
<code><a href="../directives/FormDirective.html" target="_self" >FormDirective</a></code>
|
|
228
|
+
</td>
|
|
229
|
+
|
|
230
|
+
<td>
|
|
231
|
+
No
|
|
232
|
+
</td>
|
|
233
|
+
|
|
234
|
+
</tr>
|
|
235
|
+
</tbody>
|
|
236
|
+
</table>
|
|
237
|
+
</div>
|
|
238
|
+
</td>
|
|
239
|
+
</tr>
|
|
240
|
+
</tbody>
|
|
241
|
+
</table>
|
|
242
|
+
</section>
|
|
243
|
+
|
|
244
|
+
<section data-compodoc="block-inputs">
|
|
245
|
+
<h3 id="inputs">Inputs</h3>
|
|
246
|
+
<table class="table table-sm table-bordered">
|
|
247
|
+
<tbody>
|
|
248
|
+
<tr>
|
|
249
|
+
<td class="col-md-4">
|
|
250
|
+
<a name="type"></a>
|
|
251
|
+
<b>type</b>
|
|
252
|
+
</td>
|
|
253
|
+
</tr>
|
|
254
|
+
<tr>
|
|
255
|
+
<td class="col-md-4">
|
|
256
|
+
<i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
|
|
257
|
+
|
|
258
|
+
</td>
|
|
259
|
+
</tr>
|
|
260
|
+
<tr>
|
|
261
|
+
<td class="col-md-4">
|
|
262
|
+
<i>Default value : </i><code>'button'</code>
|
|
263
|
+
</td>
|
|
264
|
+
</tr>
|
|
265
|
+
<tr>
|
|
266
|
+
<td class="col-md-2" colspan="2">
|
|
267
|
+
<div class="io-line">Defined in <a href="" data-line="22" class="link-to-prism">src/lib/directives/form-reset.directive.ts:22</a></div>
|
|
268
|
+
</td>
|
|
269
|
+
</tr>
|
|
270
|
+
</tbody>
|
|
271
|
+
</table>
|
|
272
|
+
</section>
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
<section data-compodoc="block-methods">
|
|
277
|
+
|
|
278
|
+
<h3 id="methods">
|
|
279
|
+
Methods
|
|
280
|
+
</h3>
|
|
281
|
+
<table class="table table-sm table-bordered">
|
|
282
|
+
<tbody>
|
|
283
|
+
<tr>
|
|
284
|
+
<td class="col-md-4">
|
|
285
|
+
<a name="execute"></a>
|
|
286
|
+
<span class="name">
|
|
287
|
+
<span class="modifier">Protected</span>
|
|
288
|
+
<span ><b>execute</b></span>
|
|
289
|
+
<a href="#execute"><span class="icon ion-ios-link"></span></a>
|
|
290
|
+
</span>
|
|
291
|
+
</td>
|
|
292
|
+
</tr>
|
|
293
|
+
<tr>
|
|
294
|
+
<td class="col-md-4">
|
|
295
|
+
<span class="modifier-icon icon ion-ios-reset"></span>
|
|
296
|
+
<code>execute()</code>
|
|
297
|
+
</td>
|
|
298
|
+
</tr>
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
<tr>
|
|
302
|
+
<td class="col-md-4">
|
|
303
|
+
<div class="io-line">Defined in <a href="" data-line="30"
|
|
304
|
+
class="link-to-prism">src/lib/directives/form-reset.directive.ts:30</a></div>
|
|
305
|
+
</td>
|
|
306
|
+
</tr>
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
<tr>
|
|
310
|
+
<td class="col-md-4">
|
|
311
|
+
|
|
312
|
+
<div class="io-description">
|
|
313
|
+
<b>Returns : </b> <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >void</a></code>
|
|
314
|
+
|
|
315
|
+
</div>
|
|
316
|
+
</td>
|
|
317
|
+
</tr>
|
|
318
|
+
</tbody>
|
|
319
|
+
</table>
|
|
320
|
+
</section>
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
</div>
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
<div class="tab-pane fade tab-source-code" id="source">
|
|
327
|
+
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
328
|
+
Directive,
|
|
329
|
+
HostBinding,
|
|
330
|
+
Inject,
|
|
331
|
+
Input,
|
|
332
|
+
} from '@angular/core';
|
|
333
|
+
import { ConfirmClick } from '@rxap/directives';
|
|
334
|
+
import { FormDirective } from './form.directive';
|
|
335
|
+
|
|
336
|
+
@Directive({
|
|
337
|
+
selector: '[rxapFormReset]',
|
|
338
|
+
host: {
|
|
339
|
+
'(click)': 'onClick()',
|
|
340
|
+
'(confirmed)': 'onConfirm()',
|
|
341
|
+
},
|
|
342
|
+
standalone: true,
|
|
343
|
+
})
|
|
344
|
+
export class FormResetDirective extends ConfirmClick {
|
|
345
|
+
|
|
346
|
+
@HostBinding('type')
|
|
347
|
+
@Input()
|
|
348
|
+
public type = 'button';
|
|
349
|
+
|
|
350
|
+
constructor(
|
|
351
|
+
@Inject(FormDirective) private readonly formDirective: FormDirective,
|
|
352
|
+
) {
|
|
353
|
+
super();
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
protected execute() {
|
|
357
|
+
this.formDirective.reset();
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
}
|
|
361
|
+
</code></pre>
|
|
362
|
+
</div>
|
|
363
|
+
|
|
364
|
+
</div>
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
</div><div class="search-results">
|
|
380
|
+
<div class="has-results">
|
|
381
|
+
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
|
382
|
+
<ul class="search-results-list"></ul>
|
|
383
|
+
</div>
|
|
384
|
+
<div class="no-results">
|
|
385
|
+
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
|
386
|
+
</div>
|
|
387
|
+
</div>
|
|
388
|
+
</div>
|
|
389
|
+
<!-- END CONTENT -->
|
|
390
|
+
</div>
|
|
391
|
+
</div>
|
|
392
|
+
|
|
393
|
+
<label class="dark-mode-switch">
|
|
394
|
+
<input type="checkbox">
|
|
395
|
+
<span class="slider">
|
|
396
|
+
<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">
|
|
397
|
+
<path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"></path>
|
|
398
|
+
</svg>
|
|
399
|
+
</span>
|
|
400
|
+
</label>
|
|
401
|
+
|
|
402
|
+
<script>
|
|
403
|
+
var COMPODOC_CURRENT_PAGE_DEPTH = 1;
|
|
404
|
+
var COMPODOC_CURRENT_PAGE_CONTEXT = 'directive';
|
|
405
|
+
var COMPODOC_CURRENT_PAGE_URL = 'FormResetDirective.html';
|
|
406
|
+
var MAX_SEARCH_RESULTS = 15;
|
|
407
|
+
</script>
|
|
408
|
+
|
|
409
|
+
<script>
|
|
410
|
+
$darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
|
|
411
|
+
checkToggle(darkModeState);
|
|
412
|
+
if ($darkModeToggleSwitchers.length > 0) {
|
|
413
|
+
for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
|
|
414
|
+
$darkModeToggleSwitchers[i].addEventListener('change', function (event) {
|
|
415
|
+
darkModeState = !darkModeState;
|
|
416
|
+
toggleDarkMode(darkModeState);
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
</script>
|
|
421
|
+
|
|
422
|
+
<script src="../js/libs/custom-elements.min.js"></script>
|
|
423
|
+
<script src="../js/libs/lit-html.js"></script>
|
|
424
|
+
|
|
425
|
+
<script src="../js/menu-wc.js" defer></script>
|
|
426
|
+
<script nomodule src="../js/menu-wc_es5.js" defer></script>
|
|
427
|
+
|
|
428
|
+
<script src="../js/libs/bootstrap-native.js"></script>
|
|
429
|
+
|
|
430
|
+
<script src="../js/libs/es6-shim.min.js"></script>
|
|
431
|
+
<script src="../js/libs/EventDispatcher.js"></script>
|
|
432
|
+
<script src="../js/libs/promise.min.js"></script>
|
|
433
|
+
<script src="../js/libs/zepto.min.js"></script>
|
|
434
|
+
|
|
435
|
+
<script src="../js/compodoc.js"></script>
|
|
436
|
+
|
|
437
|
+
<script src="../js/tabs.js"></script>
|
|
438
|
+
<script src="../js/menu.js"></script>
|
|
439
|
+
<script src="../js/libs/clipboard.min.js"></script>
|
|
440
|
+
<script src="../js/libs/prism.js"></script>
|
|
441
|
+
<script src="../js/sourceCode.js"></script>
|
|
442
|
+
<script src="../js/search/search.js"></script>
|
|
443
|
+
<script src="../js/search/lunr.min.js"></script>
|
|
444
|
+
<script src="../js/search/search-lunr.js"></script>
|
|
445
|
+
<script src="../js/search/search_index.js"></script>
|
|
446
|
+
<script src="../js/lazy-load-graphs.js"></script>
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
</body>
|
|
450
|
+
</html>
|
|
@@ -515,22 +515,22 @@
|
|
|
515
515
|
Optional,
|
|
516
516
|
Output,
|
|
517
517
|
} from '@angular/core';
|
|
518
|
+
import { Router } from '@angular/router';
|
|
519
|
+
import { ConfirmClick } from '@rxap/directives';
|
|
518
520
|
import {
|
|
519
521
|
clone,
|
|
520
522
|
coerceBoolean,
|
|
521
523
|
} from '@rxap/utilities';
|
|
522
|
-
import {
|
|
524
|
+
import { Subscription } from 'rxjs';
|
|
523
525
|
import {
|
|
524
526
|
take,
|
|
525
527
|
tap,
|
|
526
528
|
} from 'rxjs/operators';
|
|
527
|
-
import {
|
|
528
|
-
import { Router } from '@angular/router';
|
|
529
|
-
import { ConfirmClick } from '@rxap/directives';
|
|
529
|
+
import { FormDirective } from './form.directive';
|
|
530
530
|
|
|
531
531
|
@Directive({
|
|
532
532
|
selector: '[rxapFormSubmit]',
|
|
533
|
-
|
|
533
|
+
|
|
534
534
|
host: {
|
|
535
535
|
'(click)': 'onClick()',
|
|
536
536
|
'(confirmed)': 'onConfirm()',
|
|
@@ -243,9 +243,9 @@
|
|
|
243
243
|
TemplateRef,
|
|
244
244
|
ViewContainerRef,
|
|
245
245
|
} from '@angular/core';
|
|
246
|
-
import { FormDirective } from './form.directive';
|
|
247
246
|
import { Subscription } from 'rxjs';
|
|
248
247
|
import { tap } from 'rxjs/operators';
|
|
248
|
+
import { FormDirective } from './form.directive';
|
|
249
249
|
|
|
250
250
|
@Directive({
|
|
251
251
|
selector: '[rxapFormSubmitFailed]',
|
|
@@ -243,9 +243,9 @@
|
|
|
243
243
|
TemplateRef,
|
|
244
244
|
ViewContainerRef,
|
|
245
245
|
} from '@angular/core';
|
|
246
|
-
import { FormDirective } from './form.directive';
|
|
247
246
|
import { Subscription } from 'rxjs';
|
|
248
247
|
import { tap } from 'rxjs/operators';
|
|
248
|
+
import { FormDirective } from './form.directive';
|
|
249
249
|
|
|
250
250
|
@Directive({
|
|
251
251
|
selector: '[rxapFormSubmitInvalid]',
|
|
@@ -243,9 +243,9 @@
|
|
|
243
243
|
TemplateRef,
|
|
244
244
|
ViewContainerRef,
|
|
245
245
|
} from '@angular/core';
|
|
246
|
-
import { FormDirective } from './form.directive';
|
|
247
246
|
import { Subscription } from 'rxjs';
|
|
248
247
|
import { tap } from 'rxjs/operators';
|
|
248
|
+
import { FormDirective } from './form.directive';
|
|
249
249
|
|
|
250
250
|
@Directive({
|
|
251
251
|
selector: '[rxapFormSubmitSuccessful]',
|
|
@@ -243,12 +243,12 @@
|
|
|
243
243
|
TemplateRef,
|
|
244
244
|
ViewContainerRef,
|
|
245
245
|
} from '@angular/core';
|
|
246
|
-
import { FormDirective } from './form.directive';
|
|
247
246
|
import { Subscription } from 'rxjs';
|
|
248
247
|
import {
|
|
249
248
|
distinctUntilChanged,
|
|
250
249
|
tap,
|
|
251
250
|
} from 'rxjs/operators';
|
|
251
|
+
import { FormDirective } from './form.directive';
|
|
252
252
|
|
|
253
253
|
@Directive({
|
|
254
254
|
selector: '[rxapFormSubmitting]',
|
package/compodoc/index.html
CHANGED
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
<h1>Installation</h1>
|
|
97
97
|
<p><strong>Add the package to your workspace:</strong></p>
|
|
98
98
|
<b>Example :</b><div><pre class="line-numbers"><code class="language-bash">yarn add @rxap/forms</code></pre></div><p><strong>Install peer dependencies:</strong></p>
|
|
99
|
-
<b>Example :</b><div><pre class="line-numbers"><code class="language-bash">yarn add @angular/core@
|
|
99
|
+
<b>Example :</b><div><pre class="line-numbers"><code class="language-bash">yarn add @angular/core@19.0.3 @angular/forms@19.0.3 @angular/router@19.0.3 @rxap/definition@^19.0.0-dev.2 @rxap/directives@^19.0.0-dev.2 @rxap/pattern@^1.1.10-dev.2 @rxap/reflect-metadata@^1.0.12-dev.2 @rxap/rxjs@^1.1.11-dev.2 @rxap/services@^19.0.0-dev.2 @rxap/utilities@^16.4.1-dev.2 @rxap/validator@^3.0.10-dev.2 rxjs@7.8.1 </code></pre></div><p><strong>Execute the init generator:</strong></p>
|
|
100
100
|
<b>Example :</b><div><pre class="line-numbers"><code class="language-bash">yarn nx g @rxap/forms:init</code></pre></div><h1>Generators</h1>
|
|
101
101
|
<h2>init</h2>
|
|
102
102
|
<blockquote>
|
|
@@ -240,8 +240,8 @@
|
|
|
240
240
|
|
|
241
241
|
|
|
242
242
|
<div class="tab-pane fade tab-source-code" id="source">
|
|
243
|
-
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
244
|
-
import {
|
|
243
|
+
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { setMetadataMapSet } from '@rxap/reflect-metadata';
|
|
244
|
+
import { MetadataKeys } from './metadata-keys';
|
|
245
245
|
|
|
246
246
|
export interface ControlSetValueOptions {
|
|
247
247
|
propertyKey: string;
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
<h3>Extends</h3>
|
|
132
132
|
</p>
|
|
133
133
|
<p class="comment">
|
|
134
|
-
<code>
|
|
134
|
+
<code>MethodWithParameters</code>
|
|
135
135
|
</p>
|
|
136
136
|
|
|
137
137
|
<section data-compodoc="block-index">
|
|
@@ -184,8 +184,8 @@
|
|
|
184
184
|
|
|
185
185
|
<tr>
|
|
186
186
|
<td class="col-md-4">
|
|
187
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
188
|
-
class="link-to-prism">src/lib/directives/models.ts:
|
|
187
|
+
<div class="io-line">Defined in <a href="" data-line="15"
|
|
188
|
+
class="link-to-prism">src/lib/directives/models.ts:15</a></div>
|
|
189
189
|
</td>
|
|
190
190
|
</tr>
|
|
191
191
|
|
|
@@ -237,17 +237,20 @@
|
|
|
237
237
|
|
|
238
238
|
|
|
239
239
|
<div class="tab-pane fade tab-source-code" id="source">
|
|
240
|
-
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
240
|
+
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
241
|
+
Method,
|
|
242
|
+
MethodWithParameters,
|
|
243
|
+
} from '@rxap/pattern';
|
|
241
244
|
|
|
242
|
-
export interface FormSubmitMethod<T> extends
|
|
243
|
-
call(parameters: T): any | Promise<any>;
|
|
245
|
+
export interface FormSubmitMethod<T> extends MethodWithParameters<any, T> {
|
|
246
|
+
call(parameters: T, context?: Record<string, unknown>): any | Promise<any>;
|
|
244
247
|
}
|
|
245
248
|
|
|
246
249
|
export interface FormLoadMethod<T = any> extends Method<T> {
|
|
247
250
|
call(): T | Promise<T>;
|
|
248
251
|
}
|
|
249
252
|
|
|
250
|
-
export interface FormLoadFailedMethod extends
|
|
253
|
+
export interface FormLoadFailedMethod extends MethodWithParameters {
|
|
251
254
|
call(error: Error): Promise<any> | any;
|
|
252
255
|
}
|
|
253
256
|
|
|
@@ -255,7 +258,7 @@ export interface FormLoadSuccessfulMethod<T = any> extends Method {
|
|
|
255
258
|
call(value: T): Promise<any> | any;
|
|
256
259
|
}
|
|
257
260
|
|
|
258
|
-
export interface FormSubmitFailedMethod extends
|
|
261
|
+
export interface FormSubmitFailedMethod extends MethodWithParameters {
|
|
259
262
|
call(error: Error): Promise<any> | any;
|
|
260
263
|
}
|
|
261
264
|
|