@rxap/form-system 18.2.2-dev.0 → 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 +8 -0
- package/README.md +1 -1
- package/compodoc/changelog.html +43 -0
- package/compodoc/classes/ExtractFunctionMixin.html +466 -0
- package/compodoc/classes/ExtractFunctionsMixin.html +434 -0
- package/compodoc/classes/ExtractIsValueFunctionMixin.html +407 -0
- package/compodoc/classes/ExtractToDisplayFunctionMixin.html +407 -0
- package/compodoc/dependencies.html +17 -17
- package/compodoc/directives/AutocompleteOptionsFromMethodDirective.html +162 -181
- package/compodoc/directives/OptionsFromMethodDirective.html +20 -19
- package/compodoc/index.html +1 -1
- package/compodoc/injectables/NoopResolveMethod.html +622 -0
- package/compodoc/interfaces/AutocompleteOptionsFromMethodDirectiveParameters.html +95 -18
- package/compodoc/interfaces/AutocompleteOptionsFromMethodDirectiveSettings.html +95 -18
- package/compodoc/interfaces/AutocompleteOptionsFromRemoteMethodTemplateContext.html +95 -18
- package/compodoc/interfaces/OptionsFromMethodDirectiveSettings.html +2 -1
- package/compodoc/interfaces/OptionsFromMethodTemplateContext.html +2 -1
- package/compodoc/interfaces/UseFunctionConfig.html +360 -0
- package/compodoc/interfaces/UseFunctionDefinition.html +399 -0
- package/compodoc/js/menu-wc.js +21 -0
- package/compodoc/js/menu-wc_es5.js +2 -2
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/miscellaneous/functions.html +738 -30
- package/compodoc/miscellaneous/typealiases.html +59 -0
- package/compodoc/miscellaneous/variables.html +96 -0
- package/compodoc/overview.html +3 -3
- package/compodoc/properties.html +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/AutocompleteOptionsFromMethodDirective.html +44 -0
- package/docs/classes/ControlDataSource.html +12 -12
- package/docs/classes/ControlHideShowDirective.html +2 -2
- package/docs/classes/ExtractControlFromParentMixin.html +2 -2
- package/docs/classes/ExtractControlMixin.html +2 -2
- package/docs/classes/ExtractDataSourcesMixin.html +2 -2
- package/docs/classes/ExtractFormDefinitionMixin.html +2 -2
- package/docs/classes/ExtractFunctionMixin.html +5 -0
- package/docs/classes/ExtractFunctionsMixin.html +3 -0
- package/docs/classes/ExtractIsValueFunctionMixin.html +11 -0
- package/docs/classes/ExtractMethodMixin.html +2 -2
- package/docs/classes/ExtractMethodsMixin.html +2 -2
- package/docs/classes/ExtractOptionsDataSourceMixin.html +2 -2
- package/docs/classes/ExtractOptionsMethodMixin.html +2 -2
- package/docs/classes/ExtractRemoteMethodsMixin.html +2 -2
- package/docs/classes/ExtractResolveMethodMixin.html +2 -2
- package/docs/classes/ExtractToDisplayFunctionMixin.html +11 -0
- package/docs/classes/ForFormArrayItemsDirective.html +2 -2
- package/docs/classes/FormArrayAddItemButtonDirective.html +2 -2
- package/docs/classes/FormArrayItemButton.html +3 -2
- package/docs/classes/FormArrayItemRemoveButtonDirective.html +7 -2
- package/docs/classes/FormArrayItemRestoreButtonDirective.html +3 -2
- package/docs/classes/FormArrayRemovableDirective.html +3 -3
- package/docs/classes/FormSystemControlDirective.html +3 -3
- package/docs/classes/FormSystemDirectivesModule.html +1 -1
- package/docs/classes/InputSelectOptionsDirective.html +3 -3
- package/docs/classes/IsEqualToDirective.html +3 -3
- package/docs/classes/IsSelectableValueDirective.html +2 -2
- package/docs/classes/NoopResolveMethod.html +3 -0
- package/docs/classes/OptionsFromMethodDirective.html +3 -3
- package/docs/classes/OptionsFromRemoteMethodDirective.html +3 -3
- package/docs/classes/RxapFormSystemError.html +5 -15
- package/docs/classes/SubmitContextFormAdapter.html +9 -9
- package/docs/classes/TestNgControl.html +24 -24
- package/docs/documentation.json +17918 -8072
- package/docs/enums/FormSystemMetadataKeys.html +2 -2
- package/docs/functions/ApplyUseFunctionAdapters.html +1 -0
- package/docs/functions/ApplyUseMethodAdapters.html +1 -1
- package/docs/functions/ComposeOptionsTransformers.html +1 -1
- package/docs/functions/FormContextFromActivatedRouteFactory.html +1 -1
- package/docs/functions/ResolveByUuidParameter.html +1 -1
- package/docs/functions/ResolveByUuidResultFactory.html +1 -1
- package/docs/functions/SubmitContextFormAdapterFactory.html +1 -1
- package/docs/functions/UseAutocompleteIsValueFunction.html +1 -0
- package/docs/functions/UseAutocompleteOptionsMethod.html +1 -0
- package/docs/functions/UseAutocompleteResolveMethod.html +1 -0
- package/docs/functions/UseAutocompleteToDisplayFunction.html +1 -0
- package/docs/functions/UseComponent.html +1 -1
- package/docs/functions/UseDataSource.html +1 -1
- package/docs/functions/UseFormComponent.html +1 -1
- package/docs/functions/UseFunction.html +1 -0
- package/docs/functions/UseHideFunction.html +1 -1
- package/docs/functions/UseIsValueFunction.html +1 -0
- package/docs/functions/UseMethod.html +1 -1
- package/docs/functions/UseOptionsDataSource.html +1 -1
- package/docs/functions/UseOptionsMethod.html +1 -1
- package/docs/functions/UseOptionsRemoteMethod.html +1 -1
- package/docs/functions/UseRemoteMethod.html +1 -1
- package/docs/functions/UseResolveMethod.html +1 -1
- package/docs/functions/UseShowFunction.html +1 -1
- package/docs/functions/UseToDisplayFunction.html +1 -0
- package/docs/functions/controlDataSource-1.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +1 -1
- package/docs/interfaces/AutocompleteOptionsFromMethodDirectiveParameters.html +2 -0
- package/docs/interfaces/AutocompleteOptionsFromMethodDirectiveSettings.html +2 -0
- package/docs/interfaces/AutocompleteOptionsFromRemoteMethodTemplateContext.html +2 -0
- package/docs/interfaces/ControlHideShowOptions.html +2 -2
- package/docs/interfaces/ControlWithDataSource.html +2 -2
- package/docs/interfaces/ForFormArrayItemsDirectiveContext.html +2 -2
- package/docs/interfaces/InputSelectOptionsSettings.html +4 -4
- package/docs/interfaces/InputSelectOptionsTemplateContext.html +2 -2
- package/docs/interfaces/OptionsFromMethodDirectiveSettings.html +1 -1
- package/docs/interfaces/OptionsFromMethodTemplateContext.html +2 -2
- package/docs/interfaces/OptionsFromRemoteMethodTemplateContext.html +2 -2
- package/docs/interfaces/UseDataSourceSettings.html +2 -2
- package/docs/interfaces/UseDataSourceValue.html +3 -3
- package/docs/interfaces/UseFunctionConfig.html +2 -0
- package/docs/interfaces/UseFunctionDefinition.html +3 -0
- package/docs/interfaces/UseMethodConfig.html +2 -2
- package/docs/interfaces/UseMethodDefinition.html +2 -2
- package/docs/modules.html +28 -3
- package/docs/types/ControlHideShowFunction.html +1 -1
- package/docs/types/FunctionParameterAdapterFunction.html +1 -0
- package/docs/types/FunctionResultAdapterFunction.html +1 -0
- package/docs/types/MethodParameterAdapterFunction.html +1 -1
- package/docs/types/MethodResultAdapterFunction.html +1 -1
- package/docs/types/UseFunctionType.html +1 -0
- package/docs/types/UseOptionsDataSourceSettings.html +1 -1
- package/docs/variables/DATA_SOURCE_NAME.html +1 -1
- package/docs/variables/IS_VALUE_FUNCTION_NAME.html +1 -0
- package/docs/variables/OPTIONS_METHOD_NAME.html +1 -1
- package/docs/variables/REMOTE_METHOD_NAME.html +1 -1
- package/docs/variables/RESOLVE_METHOD_NAME.html +1 -1
- package/docs/variables/RXAP_FORM_CONTROL_SOURCE.html +1 -1
- package/docs/variables/RXAP_FORM_SYSTEM_HIDE_METADATA.html +1 -1
- package/docs/variables/RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS.html +1 -1
- package/docs/variables/RXAP_FORM_SYSTEM_SHOW_METADATA.html +1 -1
- package/docs/variables/RXAP_USE_FUNCTION.html +1 -0
- package/docs/variables/RXAP_USE_METHOD.html +1 -1
- package/docs/variables/RXAP_USE_REMOTE_METHOD.html +1 -1
- package/docs/variables/SUBMIT_CONTEXT_FORM_ADAPTER_METHOD.html +1 -1
- package/docs/variables/TO_DISPLAY_FUNCTION_NAME.html +1 -0
- package/fesm2022/rxap-form-system.mjs +55 -55
- package/fesm2022/rxap-form-system.mjs.map +1 -1
- package/lib/directives/array/form-array-item-button.d.ts +1 -1
- package/package.json +42 -45
- package/theme.css +177 -1
- package/esm2022/index.mjs +0 -54
- package/esm2022/lib/control-data-source.mjs +0 -40
- package/esm2022/lib/control-with-data-source.mjs +0 -2
- package/esm2022/lib/decorators/metadata-keys.mjs +0 -8
- package/esm2022/lib/decorators/use-component.mjs +0 -9
- package/esm2022/lib/decorators/use-data-source.mjs +0 -12
- package/esm2022/lib/decorators/use-form-component.mjs +0 -13
- package/esm2022/lib/directives/array/for-form-array-items.directive.mjs +0 -64
- package/esm2022/lib/directives/array/form-array-add-item-button.directive.mjs +0 -61
- package/esm2022/lib/directives/array/form-array-item-button.mjs +0 -80
- package/esm2022/lib/directives/array/form-array-item-remove-button.directive.mjs +0 -47
- package/esm2022/lib/directives/array/form-array-item-restore-button.directive.mjs +0 -30
- package/esm2022/lib/directives/array/form-array-removable.directive.mjs +0 -68
- package/esm2022/lib/directives/autocomplete-options-from-method.directive.mjs +0 -182
- package/esm2022/lib/directives/control-hide-show.directive.mjs +0 -172
- package/esm2022/lib/directives/form-directives.module.mjs +0 -25
- package/esm2022/lib/directives/input-select-options.directive.mjs +0 -181
- package/esm2022/lib/directives/options-from-method.directive.mjs +0 -95
- package/esm2022/lib/directives/options-from-remote-method.directive.mjs +0 -132
- package/esm2022/lib/directives/test-ng-control.mjs +0 -14
- package/esm2022/lib/error.mjs +0 -7
- package/esm2022/lib/form-context-from-activated-route.factory.mjs +0 -4
- package/esm2022/lib/form-system-control.directive.mjs +0 -147
- package/esm2022/lib/mixins/adapters.mjs +0 -13
- package/esm2022/lib/mixins/apply-use-function.adapters.mjs +0 -32
- package/esm2022/lib/mixins/apply-use-method.adapters.mjs +0 -33
- package/esm2022/lib/mixins/extract-control-from-parent.mixin.mjs +0 -23
- package/esm2022/lib/mixins/extract-control.mixin.mjs +0 -17
- package/esm2022/lib/mixins/extract-data-sources.mixin.mjs +0 -16
- package/esm2022/lib/mixins/extract-form-definition.mixin.mjs +0 -12
- package/esm2022/lib/mixins/extract-function.mixin.mjs +0 -22
- package/esm2022/lib/mixins/extract-functions.mixin.mjs +0 -26
- package/esm2022/lib/mixins/extract-is-value-function.mixin.mjs +0 -22
- package/esm2022/lib/mixins/extract-method.mixin.mjs +0 -20
- package/esm2022/lib/mixins/extract-methods.mixin.mjs +0 -21
- package/esm2022/lib/mixins/extract-options-data-source.mixin.mjs +0 -59
- package/esm2022/lib/mixins/extract-options-method.mixin.mjs +0 -22
- package/esm2022/lib/mixins/extract-resolve-method.mixin.mjs +0 -22
- package/esm2022/lib/mixins/extract-to-display-function.mixin.mjs +0 -22
- package/esm2022/lib/submit-context-form-adapter.factory.mjs +0 -32
- package/esm2022/lib/validators/is-equal-to.mjs +0 -60
- package/esm2022/lib/validators/is-selectable-value.directive.mjs +0 -82
- package/esm2022/rxap-form-system.mjs +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [19.0.0-dev.2](https://gitlab.com/rxap/packages/compare/@rxap/form-system@19.0.0-dev.1...@rxap/form-system@19.0.0-dev.2) (2025-01-03)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @rxap/form-system
|
|
9
|
+
|
|
10
|
+
# [19.0.0-dev.1](https://gitlab.com/rxap/packages/compare/@rxap/form-system@18.2.2-dev.0...@rxap/form-system@19.0.0-dev.1) (2024-12-11)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @rxap/form-system
|
|
13
|
+
|
|
6
14
|
## [18.2.2-dev.0](https://gitlab.com/rxap/packages/compare/@rxap/form-system@18.2.1...@rxap/form-system@18.2.2-dev.0) (2024-12-10)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @rxap/form-system
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ yarn add @rxap/form-system
|
|
|
18
18
|
```
|
|
19
19
|
**Install peer dependencies:**
|
|
20
20
|
```bash
|
|
21
|
-
yarn add @angular/core
|
|
21
|
+
yarn add @angular/core@19.0.3 @angular/forms@19.0.3 @angular/material@19.0.2 @angular/router@19.0.3 @rxap/data-source@^19.0.0-dev.2 @rxap/definition@^19.0.0-dev.2 @rxap/forms@^19.0.0-dev.2 @rxap/mixin@^16.0.11-dev.2 @rxap/open-api@^19.0.0-dev.2 @rxap/pattern@^1.1.10-dev.2 @rxap/reflect-metadata@^1.0.12-dev.2 @rxap/remote-method@^19.0.0-dev.2 @rxap/rxjs@^1.1.11-dev.2 @rxap/utilities@^16.4.1-dev.2 @rxap/validator@^3.0.10-dev.2 rxjs@7.8.1
|
|
22
22
|
```
|
|
23
23
|
**Execute the init generator:**
|
|
24
24
|
```bash
|
package/compodoc/changelog.html
CHANGED
|
@@ -85,6 +85,49 @@
|
|
|
85
85
|
<h1>Change Log</h1>
|
|
86
86
|
<p>All notable changes to this project will be documented in this file.
|
|
87
87
|
See <a href="https://conventionalcommits.org">Conventional Commits</a> for commit guidelines.</p>
|
|
88
|
+
<h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/form-system@19.0.0-dev.1...@rxap/form-system@19.0.0-dev.2">19.0.0-dev.2</a> (2025-01-03)</h1>
|
|
89
|
+
<p><strong>Note:</strong> Version bump only for package @rxap/form-system</p>
|
|
90
|
+
<h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/form-system@18.2.2-dev.0...@rxap/form-system@19.0.0-dev.1">19.0.0-dev.1</a> (2024-12-11)</h1>
|
|
91
|
+
<p><strong>Note:</strong> Version bump only for package @rxap/form-system</p>
|
|
92
|
+
<h2><a href="https://gitlab.com/rxap/packages/compare/@rxap/form-system@18.2.1...@rxap/form-system@18.2.2-dev.0">18.2.2-dev.0</a> (2024-12-10)</h2>
|
|
93
|
+
<p><strong>Note:</strong> Version bump only for package @rxap/form-system</p>
|
|
94
|
+
<h2><a href="https://gitlab.com/rxap/packages/compare/@rxap/form-system@18.2.1-dev.0...@rxap/form-system@18.2.1">18.2.1</a> (2024-10-28)</h2>
|
|
95
|
+
<p><strong>Note:</strong> Version bump only for package @rxap/form-system</p>
|
|
96
|
+
<h2><a href="https://gitlab.com/rxap/packages/compare/@rxap/form-system@18.2.0...@rxap/form-system@18.2.1-dev.0">18.2.1-dev.0</a> (2024-10-04)</h2>
|
|
97
|
+
<p><strong>Note:</strong> Version bump only for package @rxap/form-system</p>
|
|
98
|
+
<h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/form-system@18.2.0-dev.6...@rxap/form-system@18.2.0">18.2.0</a> (2024-09-18)</h1>
|
|
99
|
+
<p><strong>Note:</strong> Version bump only for package @rxap/form-system</p>
|
|
100
|
+
<h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/form-system@18.2.0-dev.5...@rxap/form-system@18.2.0-dev.6">18.2.0-dev.6</a> (2024-08-29)</h1>
|
|
101
|
+
<h3>Features</h3>
|
|
102
|
+
<ul>
|
|
103
|
+
<li>support custom toDisplay Function (<a href="https://gitlab.com/rxap/packages/commit/e8c40e41a7112c25726704ab5ea1314138efdba1">e8c40e4</a>)</li>
|
|
104
|
+
</ul>
|
|
105
|
+
<h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/form-system@18.2.0-dev.4...@rxap/form-system@18.2.0-dev.5">18.2.0-dev.5</a> (2024-08-29)</h1>
|
|
106
|
+
<h3>Bug Fixes</h3>
|
|
107
|
+
<ul>
|
|
108
|
+
<li>use the correct types (<a href="https://gitlab.com/rxap/packages/commit/d4ecc4f284ceb70cb045f33e04524763126afa22">d4ecc4f</a>)</li>
|
|
109
|
+
</ul>
|
|
110
|
+
<h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/form-system@18.2.0-dev.3...@rxap/form-system@18.2.0-dev.4">18.2.0-dev.4</a> (2024-08-29)</h1>
|
|
111
|
+
<h3>Bug Fixes</h3>
|
|
112
|
+
<ul>
|
|
113
|
+
<li>use the correct decorator (<a href="https://gitlab.com/rxap/packages/commit/ee5dd1bd2fde25e8bf48551efc13d869ad7f2fd1">ee5dd1b</a>)</li>
|
|
114
|
+
</ul>
|
|
115
|
+
<h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/form-system@18.2.0-dev.2...@rxap/form-system@18.2.0-dev.3">18.2.0-dev.3</a> (2024-08-29)</h1>
|
|
116
|
+
<h3>Bug Fixes</h3>
|
|
117
|
+
<ul>
|
|
118
|
+
<li>add missing defaults (<a href="https://gitlab.com/rxap/packages/commit/5ff7af0cb80258da77a4474fb2241891f63c7da9">5ff7af0</a>)</li>
|
|
119
|
+
</ul>
|
|
120
|
+
<h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/form-system@18.2.0-dev.1...@rxap/form-system@18.2.0-dev.2">18.2.0-dev.2</a> (2024-08-29)</h1>
|
|
121
|
+
<h3>Features</h3>
|
|
122
|
+
<ul>
|
|
123
|
+
<li>support custom is value function (<a href="https://gitlab.com/rxap/packages/commit/3cc456c5489c781414f18020190302fd634b2d4e">3cc456c</a>)</li>
|
|
124
|
+
</ul>
|
|
125
|
+
<h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/form-system@18.2.0-dev.0...@rxap/form-system@18.2.0-dev.1">18.2.0-dev.1</a> (2024-08-29)</h1>
|
|
126
|
+
<h3>Bug Fixes</h3>
|
|
127
|
+
<ul>
|
|
128
|
+
<li>add NoopResolveMethod (<a href="https://gitlab.com/rxap/packages/commit/20654571d201861e3d9130de0dc36b724fde55c5">2065457</a>)</li>
|
|
129
|
+
<li>prefer the ngControl from the next MatFormField (<a href="https://gitlab.com/rxap/packages/commit/c523354395c521750937eb52dcd34cdd2c1d596b">c523354</a>)</li>
|
|
130
|
+
</ul>
|
|
88
131
|
<h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/form-system@18.1.3...@rxap/form-system@18.2.0-dev.0">18.2.0-dev.0</a> (2024-08-27)</h1>
|
|
89
132
|
<h3>Features</h3>
|
|
90
133
|
<ul>
|
|
@@ -0,0 +1,466 @@
|
|
|
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-form-system</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-form-system</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 class">
|
|
83
|
+
<div class="content-data">
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
<ol class="breadcrumb">
|
|
97
|
+
<li class="breadcrumb-item">Classes</li>
|
|
98
|
+
<li class="breadcrumb-item" >ExtractFunctionMixin</li>
|
|
99
|
+
</ol>
|
|
100
|
+
|
|
101
|
+
<ul class="nav nav-tabs" role="tablist">
|
|
102
|
+
<li class="nav-item">
|
|
103
|
+
<a href="#info"
|
|
104
|
+
class="nav-link"
|
|
105
|
+
class="nav-link active"
|
|
106
|
+
role="tab" id="info-tab" data-bs-toggle="tab" data-link="info">Info</a>
|
|
107
|
+
</li>
|
|
108
|
+
<li class="nav-item">
|
|
109
|
+
<a href="#source"
|
|
110
|
+
class="nav-link"
|
|
111
|
+
|
|
112
|
+
role="tab" id="source-tab" data-bs-toggle="tab" data-link="source">Source</a>
|
|
113
|
+
</li>
|
|
114
|
+
</ul>
|
|
115
|
+
|
|
116
|
+
<div class="tab-content">
|
|
117
|
+
<div class="tab-pane fade active in" id="info">
|
|
118
|
+
<p class="comment">
|
|
119
|
+
<h3>File</h3>
|
|
120
|
+
</p>
|
|
121
|
+
<p class="comment">
|
|
122
|
+
<code>src/lib/mixins/extract-function.mixin.ts</code>
|
|
123
|
+
</p>
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
<section data-compodoc="block-index">
|
|
131
|
+
<h3 id="index">Index</h3>
|
|
132
|
+
<table class="table table-sm table-bordered index-table">
|
|
133
|
+
<tbody>
|
|
134
|
+
<tr>
|
|
135
|
+
<td class="col-md-4">
|
|
136
|
+
<h6><b>Properties</b></h6>
|
|
137
|
+
</td>
|
|
138
|
+
</tr>
|
|
139
|
+
<tr>
|
|
140
|
+
<td class="col-md-4">
|
|
141
|
+
<ul class="index-list">
|
|
142
|
+
<li>
|
|
143
|
+
<span class="modifier">Protected</span>
|
|
144
|
+
<a href="#injector" >injector</a>
|
|
145
|
+
</li>
|
|
146
|
+
</ul>
|
|
147
|
+
</td>
|
|
148
|
+
</tr>
|
|
149
|
+
|
|
150
|
+
<tr>
|
|
151
|
+
<td class="col-md-4">
|
|
152
|
+
<h6><b>Methods</b></h6>
|
|
153
|
+
</td>
|
|
154
|
+
</tr>
|
|
155
|
+
<tr>
|
|
156
|
+
<td class="col-md-4">
|
|
157
|
+
<ul class="index-list">
|
|
158
|
+
<li>
|
|
159
|
+
<a href="#extractFunction" >extractFunction</a>
|
|
160
|
+
</li>
|
|
161
|
+
</ul>
|
|
162
|
+
</td>
|
|
163
|
+
</tr>
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
</tbody>
|
|
170
|
+
</table>
|
|
171
|
+
</section>
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
<section data-compodoc="block-properties">
|
|
175
|
+
|
|
176
|
+
<h3 id="inputs">
|
|
177
|
+
Properties
|
|
178
|
+
</h3>
|
|
179
|
+
<table class="table table-sm table-bordered">
|
|
180
|
+
<tbody>
|
|
181
|
+
<tr>
|
|
182
|
+
<td class="col-md-4">
|
|
183
|
+
<a name="injector"></a>
|
|
184
|
+
<span class="name">
|
|
185
|
+
<span class="modifier">Protected</span>
|
|
186
|
+
<span ><b>injector</b></span>
|
|
187
|
+
<a href="#injector"><span class="icon ion-ios-link"></span></a>
|
|
188
|
+
</span>
|
|
189
|
+
</td>
|
|
190
|
+
</tr>
|
|
191
|
+
<tr>
|
|
192
|
+
<td class="col-md-4">
|
|
193
|
+
<i>Type : </i> <code>Injector</code>
|
|
194
|
+
|
|
195
|
+
</td>
|
|
196
|
+
</tr>
|
|
197
|
+
<tr>
|
|
198
|
+
<td class="col-md-4">
|
|
199
|
+
<div class="io-line">Defined in <a href="" data-line="18" class="link-to-prism">src/lib/mixins/extract-function.mixin.ts:18</a></div>
|
|
200
|
+
</td>
|
|
201
|
+
</tr>
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
</tbody>
|
|
205
|
+
</table>
|
|
206
|
+
</section>
|
|
207
|
+
|
|
208
|
+
<section data-compodoc="block-methods">
|
|
209
|
+
|
|
210
|
+
<h3 id="methods">
|
|
211
|
+
Methods
|
|
212
|
+
</h3>
|
|
213
|
+
<table class="table table-sm table-bordered">
|
|
214
|
+
<tbody>
|
|
215
|
+
<tr>
|
|
216
|
+
<td class="col-md-4">
|
|
217
|
+
<a name="extractFunction"></a>
|
|
218
|
+
<span class="name">
|
|
219
|
+
<span ><b>extractFunction</b></span>
|
|
220
|
+
<a href="#extractFunction"><span class="icon ion-ios-link"></span></a>
|
|
221
|
+
</span>
|
|
222
|
+
</td>
|
|
223
|
+
</tr>
|
|
224
|
+
<tr>
|
|
225
|
+
<td class="col-md-4">
|
|
226
|
+
<code>extractFunction(defaultFunction: <a href="../undefineds/UseFunction.html" target="_self">UseFunctionType<Args | Result> | null</a>, formDefinition: FormDefinition, controlId: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank">string</a>, name: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank">string</a>)</code>
|
|
227
|
+
</td>
|
|
228
|
+
</tr>
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
<tr>
|
|
232
|
+
<td class="col-md-4">
|
|
233
|
+
<div class="io-line">Defined in <a href="" data-line="20"
|
|
234
|
+
class="link-to-prism">src/lib/mixins/extract-function.mixin.ts:20</a></div>
|
|
235
|
+
</td>
|
|
236
|
+
</tr>
|
|
237
|
+
|
|
238
|
+
<tr>
|
|
239
|
+
<td class="col-md-4">
|
|
240
|
+
<b>Type parameters :</b>
|
|
241
|
+
<ul class="type-parameters">
|
|
242
|
+
<li>Args</li>
|
|
243
|
+
<li>Result</li>
|
|
244
|
+
</ul>
|
|
245
|
+
</td>
|
|
246
|
+
</tr>
|
|
247
|
+
|
|
248
|
+
<tr>
|
|
249
|
+
<td class="col-md-4">
|
|
250
|
+
|
|
251
|
+
<div class="io-description">
|
|
252
|
+
<b>Parameters :</b>
|
|
253
|
+
|
|
254
|
+
<table class="params">
|
|
255
|
+
<thead>
|
|
256
|
+
<tr>
|
|
257
|
+
<td>Name</td>
|
|
258
|
+
<td>Type</td>
|
|
259
|
+
<td>Optional</td>
|
|
260
|
+
<td>Default value</td>
|
|
261
|
+
</tr>
|
|
262
|
+
</thead>
|
|
263
|
+
<tbody>
|
|
264
|
+
<tr>
|
|
265
|
+
<td>defaultFunction</td>
|
|
266
|
+
<td>
|
|
267
|
+
<code><a href="../miscellaneous/functions.html#UseFunction" target="_self" >UseFunctionType<Args | Result> | null</a></code>
|
|
268
|
+
</td>
|
|
269
|
+
|
|
270
|
+
<td>
|
|
271
|
+
No
|
|
272
|
+
</td>
|
|
273
|
+
|
|
274
|
+
<td>
|
|
275
|
+
<code>null</code>
|
|
276
|
+
</td>
|
|
277
|
+
|
|
278
|
+
</tr>
|
|
279
|
+
<tr>
|
|
280
|
+
<td>formDefinition</td>
|
|
281
|
+
<td>
|
|
282
|
+
<code>FormDefinition</code>
|
|
283
|
+
</td>
|
|
284
|
+
|
|
285
|
+
<td>
|
|
286
|
+
No
|
|
287
|
+
</td>
|
|
288
|
+
|
|
289
|
+
<td>
|
|
290
|
+
</td>
|
|
291
|
+
|
|
292
|
+
</tr>
|
|
293
|
+
<tr>
|
|
294
|
+
<td>controlId</td>
|
|
295
|
+
<td>
|
|
296
|
+
<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
|
|
297
|
+
</td>
|
|
298
|
+
|
|
299
|
+
<td>
|
|
300
|
+
No
|
|
301
|
+
</td>
|
|
302
|
+
|
|
303
|
+
<td>
|
|
304
|
+
</td>
|
|
305
|
+
|
|
306
|
+
</tr>
|
|
307
|
+
<tr>
|
|
308
|
+
<td>name</td>
|
|
309
|
+
<td>
|
|
310
|
+
<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
|
|
311
|
+
</td>
|
|
312
|
+
|
|
313
|
+
<td>
|
|
314
|
+
No
|
|
315
|
+
</td>
|
|
316
|
+
|
|
317
|
+
<td>
|
|
318
|
+
</td>
|
|
319
|
+
|
|
320
|
+
</tr>
|
|
321
|
+
</tbody>
|
|
322
|
+
</table>
|
|
323
|
+
</div>
|
|
324
|
+
<div class="io-description">
|
|
325
|
+
<b>Returns : </b> <code><a href="../miscellaneous/functions.html#UseFunction" target="_self" >UseFunctionType<Args, Result></a></code>
|
|
326
|
+
|
|
327
|
+
</div>
|
|
328
|
+
<div class="io-description">
|
|
329
|
+
|
|
330
|
+
</div>
|
|
331
|
+
</td>
|
|
332
|
+
</tr>
|
|
333
|
+
</tbody>
|
|
334
|
+
</table>
|
|
335
|
+
</section>
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
</div>
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
<div class="tab-pane fade tab-source-code" id="source">
|
|
345
|
+
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Injector } from '@angular/core';
|
|
346
|
+
import { FormDefinition } from '@rxap/forms';
|
|
347
|
+
import { Mixin } from '@rxap/mixin';
|
|
348
|
+
import { ApplyUseFunctionAdapters } from './apply-use-function.adapters';
|
|
349
|
+
import {
|
|
350
|
+
ExtractFunctionsMixin,
|
|
351
|
+
UseFunctionDefinition,
|
|
352
|
+
UseFunctionType,
|
|
353
|
+
} from './extract-functions.mixin';
|
|
354
|
+
|
|
355
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
356
|
+
export interface ExtractFunctionMixin extends ExtractFunctionsMixin {
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
@Mixin(ExtractFunctionsMixin)
|
|
360
|
+
export class ExtractFunctionMixin {
|
|
361
|
+
|
|
362
|
+
protected injector!: Injector;
|
|
363
|
+
|
|
364
|
+
extractFunction<Args extends any[], Result>(
|
|
365
|
+
defaultFunction: UseFunctionType<Args, Result> | null = null,
|
|
366
|
+
formDefinition: FormDefinition,
|
|
367
|
+
controlId: string,
|
|
368
|
+
name: string,
|
|
369
|
+
): UseFunctionType<Args, Result> {
|
|
370
|
+
const map = this.extractFunctions(new Map<string, UseFunctionDefinition>, formDefinition, controlId);
|
|
371
|
+
if (!map.has(name)) {
|
|
372
|
+
if (defaultFunction) {
|
|
373
|
+
return defaultFunction;
|
|
374
|
+
}
|
|
375
|
+
throw new Error(
|
|
376
|
+
`A function with the name '${ name }' is not attached to the control '${ controlId }' use the @UseFunction decorator to attach a function to the control`);
|
|
377
|
+
}
|
|
378
|
+
const {fnc, config} = map.get(name)!;
|
|
379
|
+
return ApplyUseFunctionAdapters<Args, Result>(this.injector, fnc, config);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
}
|
|
383
|
+
</code></pre>
|
|
384
|
+
</div>
|
|
385
|
+
</div>
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
</div><div class="search-results">
|
|
396
|
+
<div class="has-results">
|
|
397
|
+
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
|
398
|
+
<ul class="search-results-list"></ul>
|
|
399
|
+
</div>
|
|
400
|
+
<div class="no-results">
|
|
401
|
+
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
|
402
|
+
</div>
|
|
403
|
+
</div>
|
|
404
|
+
</div>
|
|
405
|
+
<!-- END CONTENT -->
|
|
406
|
+
</div>
|
|
407
|
+
</div>
|
|
408
|
+
|
|
409
|
+
<label class="dark-mode-switch">
|
|
410
|
+
<input type="checkbox">
|
|
411
|
+
<span class="slider">
|
|
412
|
+
<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">
|
|
413
|
+
<path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"></path>
|
|
414
|
+
</svg>
|
|
415
|
+
</span>
|
|
416
|
+
</label>
|
|
417
|
+
|
|
418
|
+
<script>
|
|
419
|
+
var COMPODOC_CURRENT_PAGE_DEPTH = 1;
|
|
420
|
+
var COMPODOC_CURRENT_PAGE_CONTEXT = 'class';
|
|
421
|
+
var COMPODOC_CURRENT_PAGE_URL = 'ExtractFunctionMixin.html';
|
|
422
|
+
var MAX_SEARCH_RESULTS = 15;
|
|
423
|
+
</script>
|
|
424
|
+
|
|
425
|
+
<script>
|
|
426
|
+
$darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
|
|
427
|
+
checkToggle(darkModeState);
|
|
428
|
+
if ($darkModeToggleSwitchers.length > 0) {
|
|
429
|
+
for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
|
|
430
|
+
$darkModeToggleSwitchers[i].addEventListener('change', function (event) {
|
|
431
|
+
darkModeState = !darkModeState;
|
|
432
|
+
toggleDarkMode(darkModeState);
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
</script>
|
|
437
|
+
|
|
438
|
+
<script src="../js/libs/custom-elements.min.js"></script>
|
|
439
|
+
<script src="../js/libs/lit-html.js"></script>
|
|
440
|
+
|
|
441
|
+
<script src="../js/menu-wc.js" defer></script>
|
|
442
|
+
<script nomodule src="../js/menu-wc_es5.js" defer></script>
|
|
443
|
+
|
|
444
|
+
<script src="../js/libs/bootstrap-native.js"></script>
|
|
445
|
+
|
|
446
|
+
<script src="../js/libs/es6-shim.min.js"></script>
|
|
447
|
+
<script src="../js/libs/EventDispatcher.js"></script>
|
|
448
|
+
<script src="../js/libs/promise.min.js"></script>
|
|
449
|
+
<script src="../js/libs/zepto.min.js"></script>
|
|
450
|
+
|
|
451
|
+
<script src="../js/compodoc.js"></script>
|
|
452
|
+
|
|
453
|
+
<script src="../js/tabs.js"></script>
|
|
454
|
+
<script src="../js/menu.js"></script>
|
|
455
|
+
<script src="../js/libs/clipboard.min.js"></script>
|
|
456
|
+
<script src="../js/libs/prism.js"></script>
|
|
457
|
+
<script src="../js/sourceCode.js"></script>
|
|
458
|
+
<script src="../js/search/search.js"></script>
|
|
459
|
+
<script src="../js/search/lunr.min.js"></script>
|
|
460
|
+
<script src="../js/search/search-lunr.js"></script>
|
|
461
|
+
<script src="../js/search/search_index.js"></script>
|
|
462
|
+
<script src="../js/lazy-load-graphs.js"></script>
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
</body>
|
|
466
|
+
</html>
|