@rxap/form-system 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.
Files changed (220) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +1 -1
  3. package/compodoc/changelog.html +559 -0
  4. package/compodoc/classes/ExtractControlFromParentMixin.html +376 -0
  5. package/compodoc/classes/ExtractControlMixin.html +483 -0
  6. package/compodoc/classes/ExtractDataSourcesMixin.html +366 -0
  7. package/compodoc/classes/ExtractFormDefinitionMixin.html +348 -0
  8. package/compodoc/classes/ExtractMethodMixin.html +427 -0
  9. package/compodoc/classes/ExtractMethodsMixin.html +408 -0
  10. package/compodoc/classes/ExtractOptionsDataSourceMixin.html +710 -0
  11. package/compodoc/classes/ExtractOptionsMethodMixin.html +382 -0
  12. package/compodoc/classes/ExtractRemoteMethodsMixin.html +520 -0
  13. package/compodoc/classes/ExtractResolveMethodMixin.html +392 -0
  14. package/compodoc/classes/RxapFormSystemError.html +313 -0
  15. package/compodoc/classes/TestNgControl.html +443 -0
  16. package/compodoc/dependencies.html +219 -0
  17. package/compodoc/directives/ControlHideShowDirective.html +814 -0
  18. package/compodoc/directives/ForFormArrayItemsDirective.html +442 -0
  19. package/compodoc/directives/FormArrayAddItemButtonDirective.html +736 -0
  20. package/compodoc/directives/FormArrayItemButton.html +849 -0
  21. package/compodoc/directives/FormArrayItemRemoveButtonDirective.html +701 -0
  22. package/compodoc/directives/FormArrayItemRestoreButtonDirective.html +701 -0
  23. package/compodoc/directives/FormArrayRemovableDirective.html +539 -0
  24. package/compodoc/directives/FormSystemControlDirective.html +1108 -0
  25. package/compodoc/directives/InputSelectOptionsDirective.html +1089 -0
  26. package/compodoc/directives/IsEqualToDirective.html +633 -0
  27. package/compodoc/directives/IsSelectableValueDirective.html +934 -0
  28. package/compodoc/directives/OptionsFromMethodDirective.html +1059 -0
  29. package/compodoc/directives/OptionsFromRemoteMethodDirective.html +653 -0
  30. package/compodoc/fonts/ionicons.eot +0 -0
  31. package/compodoc/fonts/ionicons.svg +2090 -0
  32. package/compodoc/fonts/ionicons.ttf +0 -0
  33. package/compodoc/fonts/ionicons.woff +0 -0
  34. package/compodoc/fonts/ionicons.woff2 +0 -0
  35. package/compodoc/fonts/roboto-v15-latin-300.eot +0 -0
  36. package/compodoc/fonts/roboto-v15-latin-300.svg +314 -0
  37. package/compodoc/fonts/roboto-v15-latin-300.ttf +0 -0
  38. package/compodoc/fonts/roboto-v15-latin-300.woff +0 -0
  39. package/compodoc/fonts/roboto-v15-latin-300.woff2 +0 -0
  40. package/compodoc/fonts/roboto-v15-latin-700.eot +0 -0
  41. package/compodoc/fonts/roboto-v15-latin-700.svg +310 -0
  42. package/compodoc/fonts/roboto-v15-latin-700.ttf +0 -0
  43. package/compodoc/fonts/roboto-v15-latin-700.woff +0 -0
  44. package/compodoc/fonts/roboto-v15-latin-700.woff2 +0 -0
  45. package/compodoc/fonts/roboto-v15-latin-italic.eot +0 -0
  46. package/compodoc/fonts/roboto-v15-latin-italic.svg +323 -0
  47. package/compodoc/fonts/roboto-v15-latin-italic.ttf +0 -0
  48. package/compodoc/fonts/roboto-v15-latin-italic.woff +0 -0
  49. package/compodoc/fonts/roboto-v15-latin-italic.woff2 +0 -0
  50. package/compodoc/fonts/roboto-v15-latin-regular.eot +0 -0
  51. package/compodoc/fonts/roboto-v15-latin-regular.svg +308 -0
  52. package/compodoc/fonts/roboto-v15-latin-regular.ttf +0 -0
  53. package/compodoc/fonts/roboto-v15-latin-regular.woff +0 -0
  54. package/compodoc/fonts/roboto-v15-latin-regular.woff2 +0 -0
  55. package/compodoc/graph/dependencies.svg +90 -0
  56. package/compodoc/images/compodoc-vectorise-inverted.png +0 -0
  57. package/compodoc/images/compodoc-vectorise-inverted.svg +201 -0
  58. package/compodoc/images/compodoc-vectorise.png +0 -0
  59. package/compodoc/images/compodoc-vectorise.svg +201 -0
  60. package/compodoc/images/favicon.ico +0 -0
  61. package/compodoc/index.html +190 -0
  62. package/compodoc/injectables/ControlDataSource.html +419 -0
  63. package/compodoc/injectables/SubmitContextFormAdapter.html +434 -0
  64. package/compodoc/interfaces/ControlHideShowOptions.html +555 -0
  65. package/compodoc/interfaces/ControlWithDataSource.html +346 -0
  66. package/compodoc/interfaces/ForFormArrayItemsDirectiveContext.html +617 -0
  67. package/compodoc/interfaces/InputSelectOptionsSettings.html +668 -0
  68. package/compodoc/interfaces/InputSelectOptionsTemplateContext.html +537 -0
  69. package/compodoc/interfaces/OptionsFromMethodDirectiveSettings.html +344 -0
  70. package/compodoc/interfaces/OptionsFromMethodTemplateContext.html +404 -0
  71. package/compodoc/interfaces/OptionsFromRemoteMethodTemplateContext.html +460 -0
  72. package/compodoc/interfaces/UseDataSourceSettings.html +318 -0
  73. package/compodoc/interfaces/UseDataSourceValue.html +408 -0
  74. package/compodoc/interfaces/UseMethodConfig.html +354 -0
  75. package/compodoc/interfaces/UseMethodDefinition.html +393 -0
  76. package/compodoc/js/compodoc.js +14 -0
  77. package/compodoc/js/lazy-load-graphs.js +44 -0
  78. package/compodoc/js/libs/EventDispatcher.js +5 -0
  79. package/compodoc/js/libs/bootstrap-native.js +2 -0
  80. package/compodoc/js/libs/clipboard.min.js +7 -0
  81. package/compodoc/js/libs/custom-elements-es5-adapter.js +15 -0
  82. package/compodoc/js/libs/custom-elements.min.js +38 -0
  83. package/compodoc/js/libs/d3.v3.min.js +2 -0
  84. package/compodoc/js/libs/deep-iterator.js +2 -0
  85. package/compodoc/js/libs/es6-shim.min.js +12 -0
  86. package/compodoc/js/libs/htmlparser.js +23 -0
  87. package/compodoc/js/libs/innersvg.js +9 -0
  88. package/compodoc/js/libs/lit-html.js +1 -0
  89. package/compodoc/js/libs/prism.js +46 -0
  90. package/compodoc/js/libs/promise.min.js +6 -0
  91. package/compodoc/js/libs/svg-pan-zoom.min.js +3 -0
  92. package/compodoc/js/libs/tablesort.min.js +6 -0
  93. package/compodoc/js/libs/tablesort.number.min.js +6 -0
  94. package/compodoc/js/libs/vis.min.js +47 -0
  95. package/compodoc/js/libs/zepto.min.js +2 -0
  96. package/compodoc/js/menu-wc.js +280 -0
  97. package/compodoc/js/menu-wc_es5.js +40 -0
  98. package/compodoc/js/menu.js +270 -0
  99. package/compodoc/js/routes.js +301 -0
  100. package/compodoc/js/search/lunr.min.js +6 -0
  101. package/compodoc/js/search/search-lunr.js +67 -0
  102. package/compodoc/js/search/search.js +283 -0
  103. package/compodoc/js/search/search_index.js +4 -0
  104. package/compodoc/js/sourceCode.js +58 -0
  105. package/compodoc/js/svg-pan-zoom.controls.js +53 -0
  106. package/compodoc/js/tabs.js +21 -0
  107. package/compodoc/js/tree.js +147 -0
  108. package/compodoc/license.html +731 -0
  109. package/compodoc/miscellaneous/enumerations.html +251 -0
  110. package/compodoc/miscellaneous/functions.html +1651 -0
  111. package/compodoc/miscellaneous/typealiases.html +277 -0
  112. package/compodoc/miscellaneous/variables.html +528 -0
  113. package/compodoc/modules/FormSystemDirectivesModule/dependencies.svg +90 -0
  114. package/compodoc/modules/FormSystemDirectivesModule.html +367 -0
  115. package/compodoc/modules.html +200 -0
  116. package/compodoc/overview.html +329 -0
  117. package/compodoc/properties.html +195 -0
  118. package/compodoc/styles/bootstrap-card.css +219 -0
  119. package/compodoc/styles/bootstrap.min.css +6 -0
  120. package/compodoc/styles/compodoc.css +1124 -0
  121. package/compodoc/styles/dark.css +121 -0
  122. package/compodoc/styles/ionicons.min.css +11 -0
  123. package/compodoc/styles/laravel.css +113 -0
  124. package/compodoc/styles/material.css +131 -0
  125. package/compodoc/styles/original.css +51 -0
  126. package/compodoc/styles/postmark.css +238 -0
  127. package/compodoc/styles/prism.css +301 -0
  128. package/compodoc/styles/readthedocs.css +117 -0
  129. package/compodoc/styles/reset.css +129 -0
  130. package/compodoc/styles/stripe.css +106 -0
  131. package/compodoc/styles/style.css +7 -0
  132. package/compodoc/styles/tablesort.css +33 -0
  133. package/compodoc/styles/vagrant.css +130 -0
  134. package/docs/.nojekyll +1 -0
  135. package/docs/assets/highlight.css +57 -0
  136. package/docs/assets/icons.js +15 -0
  137. package/docs/assets/icons.svg +1 -0
  138. package/docs/assets/main.js +59 -0
  139. package/docs/assets/navigation.js +1 -0
  140. package/docs/assets/search.js +1 -0
  141. package/docs/assets/style.css +1412 -0
  142. package/docs/classes/ControlDataSource.html +63 -0
  143. package/docs/classes/ControlHideShowDirective.html +19 -0
  144. package/docs/classes/ExtractControlFromParentMixin.html +3 -0
  145. package/docs/classes/ExtractControlMixin.html +6 -0
  146. package/docs/classes/ExtractDataSourcesMixin.html +3 -0
  147. package/docs/classes/ExtractFormDefinitionMixin.html +3 -0
  148. package/docs/classes/ExtractMethodMixin.html +5 -0
  149. package/docs/classes/ExtractMethodsMixin.html +3 -0
  150. package/docs/classes/ExtractOptionsDataSourceMixin.html +16 -0
  151. package/docs/classes/ExtractOptionsMethodMixin.html +11 -0
  152. package/docs/classes/ExtractRemoteMethodsMixin.html +3 -0
  153. package/docs/classes/ExtractResolveMethodMixin.html +11 -0
  154. package/docs/classes/ForFormArrayItemsDirective.html +11 -0
  155. package/docs/classes/FormArrayAddItemButtonDirective.html +12 -0
  156. package/docs/classes/FormArrayItemButton.html +19 -0
  157. package/docs/classes/FormArrayItemRemoveButtonDirective.html +17 -0
  158. package/docs/classes/FormArrayItemRestoreButtonDirective.html +17 -0
  159. package/docs/classes/FormArrayRemovableDirective.html +10 -0
  160. package/docs/classes/FormSystemControlDirective.html +24 -0
  161. package/docs/classes/FormSystemDirectivesModule.html +2 -0
  162. package/docs/classes/InputSelectOptionsDirective.html +33 -0
  163. package/docs/classes/IsEqualToDirective.html +9 -0
  164. package/docs/classes/IsSelectableValueDirective.html +17 -0
  165. package/docs/classes/OptionsFromMethodDirective.html +25 -0
  166. package/docs/classes/OptionsFromRemoteMethodDirective.html +23 -0
  167. package/docs/classes/RxapFormSystemError.html +32 -0
  168. package/docs/classes/SubmitContextFormAdapter.html +37 -0
  169. package/docs/classes/TestNgControl.html +98 -0
  170. package/docs/documentation.json +33682 -0
  171. package/docs/enums/FormSystemMetadataKeys.html +5 -0
  172. package/docs/functions/ApplyUseMethodAdapters.html +1 -0
  173. package/docs/functions/ComposeOptionsTransformers.html +1 -0
  174. package/docs/functions/FormContextFromActivatedRouteFactory.html +1 -0
  175. package/docs/functions/ResolveByUuidParameter.html +1 -0
  176. package/docs/functions/ResolveByUuidResultFactory.html +1 -0
  177. package/docs/functions/SubmitContextFormAdapterFactory.html +1 -0
  178. package/docs/functions/UseComponent.html +1 -0
  179. package/docs/functions/UseDataSource.html +1 -0
  180. package/docs/functions/UseFormComponent.html +2 -0
  181. package/docs/functions/UseHideFunction.html +1 -0
  182. package/docs/functions/UseMethod.html +1 -0
  183. package/docs/functions/UseOptionsDataSource.html +1 -0
  184. package/docs/functions/UseOptionsMethod.html +1 -0
  185. package/docs/functions/UseOptionsRemoteMethod.html +1 -0
  186. package/docs/functions/UseRemoteMethod.html +1 -0
  187. package/docs/functions/UseResolveMethod.html +1 -0
  188. package/docs/functions/UseShowFunction.html +1 -0
  189. package/docs/functions/controlDataSource-1.html +1 -0
  190. package/docs/hierarchy.html +1 -0
  191. package/docs/index.html +16 -0
  192. package/docs/interfaces/ControlHideShowOptions.html +3 -0
  193. package/docs/interfaces/ControlWithDataSource.html +2 -0
  194. package/docs/interfaces/ForFormArrayItemsDirectiveContext.html +8 -0
  195. package/docs/interfaces/InputSelectOptionsSettings.html +19 -0
  196. package/docs/interfaces/InputSelectOptionsTemplateContext.html +2 -0
  197. package/docs/interfaces/OptionsFromMethodDirectiveSettings.html +1 -0
  198. package/docs/interfaces/OptionsFromMethodTemplateContext.html +2 -0
  199. package/docs/interfaces/OptionsFromRemoteMethodTemplateContext.html +2 -0
  200. package/docs/interfaces/UseDataSourceSettings.html +2 -0
  201. package/docs/interfaces/UseDataSourceValue.html +5 -0
  202. package/docs/interfaces/UseMethodConfig.html +2 -0
  203. package/docs/interfaces/UseMethodDefinition.html +3 -0
  204. package/docs/modules.html +75 -0
  205. package/docs/types/ControlHideShowFunction.html +1 -0
  206. package/docs/types/MethodParameterAdapterFunction.html +1 -0
  207. package/docs/types/MethodResultAdapterFunction.html +1 -0
  208. package/docs/types/UseOptionsDataSourceSettings.html +1 -0
  209. package/docs/variables/DATA_SOURCE_NAME.html +1 -0
  210. package/docs/variables/OPTIONS_METHOD_NAME.html +1 -0
  211. package/docs/variables/REMOTE_METHOD_NAME.html +1 -0
  212. package/docs/variables/RESOLVE_METHOD_NAME.html +1 -0
  213. package/docs/variables/RXAP_FORM_CONTROL_SOURCE.html +1 -0
  214. package/docs/variables/RXAP_FORM_SYSTEM_HIDE_METADATA.html +1 -0
  215. package/docs/variables/RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS.html +1 -0
  216. package/docs/variables/RXAP_FORM_SYSTEM_SHOW_METADATA.html +1 -0
  217. package/docs/variables/RXAP_USE_METHOD.html +1 -0
  218. package/docs/variables/RXAP_USE_REMOTE_METHOD.html +1 -0
  219. package/docs/variables/SUBMIT_CONTEXT_FORM_ADAPTER_METHOD.html +1 -0
  220. package/package.json +27 -27
@@ -0,0 +1,537 @@
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 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
+ InputSelectOptionsTemplateContext</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/directives/input-select-options.directive.ts</code>
126
+ </p>
127
+
128
+
129
+
130
+
131
+ <section data-compodoc="block-index">
132
+ <h3 id="index">Index</h3>
133
+ <table class="table table-sm table-bordered index-table">
134
+ <tbody>
135
+ <tr>
136
+ <td class="col-md-4">
137
+ <h6><b>Properties</b></h6>
138
+ </td>
139
+ </tr>
140
+ <tr>
141
+ <td class="col-md-4">
142
+ <ul class="index-list">
143
+ <li>
144
+ <a href="#$implicit"
145
+ >
146
+ $implicit
147
+ </a>
148
+ </li>
149
+ </ul>
150
+ </td>
151
+ </tr>
152
+ </tbody>
153
+ </table>
154
+ </section>
155
+
156
+
157
+
158
+ <section data-compodoc="block-properties">
159
+ <h3 id="inputs">Properties</h3>
160
+ <table class="table table-sm table-bordered">
161
+ <tbody>
162
+ <tr>
163
+ <td class="col-md-4">
164
+ <a name="$implicit"></a>
165
+ <span class="name "><b>$implicit</b>
166
+ <a href="#$implicit">
167
+ <span class="icon ion-ios-link"></span>
168
+ </a>
169
+ </span>
170
+ </td>
171
+ </tr>
172
+ <tr>
173
+ <td class="col-md-4">
174
+ <code>$implicit: <code>ControlOption</code>
175
+ </code>
176
+ </td>
177
+ </tr>
178
+
179
+
180
+ <tr>
181
+ <td class="col-md-4">
182
+ <i>Type : </i> <code>ControlOption</code>
183
+
184
+ </td>
185
+ </tr>
186
+
187
+
188
+
189
+
190
+
191
+ </tbody>
192
+ </table>
193
+ </section>
194
+ </div>
195
+
196
+
197
+ <div class="tab-pane fade tab-source-code" id="source">
198
+ <pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
199
+ AfterViewInit,
200
+ ChangeDetectorRef,
201
+ Directive,
202
+ Inject,
203
+ Injector,
204
+ INJECTOR,
205
+ Input,
206
+ isDevMode,
207
+ OnDestroy,
208
+ Optional,
209
+ TemplateRef,
210
+ ViewContainerRef,
211
+ } from &#x27;@angular/core&#x27;;
212
+ import { NgControl } from &#x27;@angular/forms&#x27;;
213
+ import {
214
+ BaseDataSource,
215
+ BaseDataSourceMetadata,
216
+ BaseDataSourceViewer,
217
+ DataSourceLoader,
218
+ } from &#x27;@rxap/data-source&#x27;;
219
+ import { RxapFormControl } from &#x27;@rxap/forms&#x27;;
220
+ import {
221
+ ControlOption,
222
+ ControlOptions,
223
+ equals,
224
+ Required,
225
+ } from &#x27;@rxap/utilities&#x27;;
226
+ import { Mixin } from &#x27;@rxap/mixin&#x27;;
227
+ import {
228
+ EMPTY,
229
+ of,
230
+ Subscription,
231
+ } from &#x27;rxjs&#x27;;
232
+ import {
233
+ distinctUntilChanged,
234
+ map,
235
+ switchMap,
236
+ tap,
237
+ throttleTime,
238
+ } from &#x27;rxjs/operators&#x27;;
239
+ import {
240
+ MAT_FORM_FIELD,
241
+ MatFormField,
242
+ } from &#x27;@angular/material/form-field&#x27;;
243
+ import { MatAutocomplete } from &#x27;@angular/material/autocomplete&#x27;;
244
+ import {
245
+ ExtractOptionsDataSourceMixin,
246
+ UseOptionsDataSourceSettings,
247
+ } from &#x27;../mixins/extract-options-data-source.mixin&#x27;;
248
+
249
+ export interface InputSelectOptionsTemplateContext {
250
+ $implicit: ControlOption;
251
+ }
252
+
253
+ export interface InputSelectOptionsSettings&lt;Source&gt; extends UseOptionsDataSourceSettings&lt;Source&gt; {
254
+ /**
255
+ * true - the selected value is not send to the data source with the viewChange event.
256
+ * Instead an empty object {} is send to trigger a data source refresh.
257
+ *
258
+ * The OpenApiDataSource expects a Paramters Object in the viewChange event. This
259
+ * can couse issue if the select value object as a property that is also a parameter for
260
+ * the open-api operation. For instaed the select object has the property company and
261
+ * the open-api operation has a query parameter company. Then the BuildOptions method
262
+ * in the OpenApiDataSource would create a HttpParams object with the param company and the
263
+ * value from the select object property company. This will result in unpredictable behaviors.
264
+ */
265
+ ignoreSelectedValue?: boolean;
266
+
267
+ /**
268
+ * true - the options list is filtered by the current control value if the
269
+ * control value is of type string. Then the display value of each option is
270
+ * compared to the control value. If the display value of an option includes
271
+ * the control value, then the option is used. This comprehensions it not type
272
+ * sensitive
273
+ */
274
+ filteredOptions?: boolean;
275
+
276
+ /**
277
+ * true - the options list is only loaded once and not refreshed on each value change
278
+ */
279
+ loadOnce?: boolean;
280
+ }
281
+
282
+ export interface InputSelectOptionsDirective extends OnDestroy, AfterViewInit,
283
+ ExtractOptionsDataSourceMixin {
284
+ }
285
+
286
+ @Mixin(ExtractOptionsDataSourceMixin)
287
+ @Directive({
288
+ selector: &#x27;[rxapInputSelectOptions]&#x27;,
289
+ standalone: true,
290
+ })
291
+ export class InputSelectOptionsDirective implements OnDestroy, AfterViewInit {
292
+
293
+ @Input(&#x27;rxapInputSelectOptionsViewer&#x27;)
294
+ public viewer: BaseDataSourceViewer &#x3D; { id: &#x27;[rxapInputSelectOptions]&#x27; };
295
+
296
+ @Input(&#x27;rxapInputSelectOptionsMetadata&#x27;)
297
+ public metadata?: BaseDataSourceMetadata;
298
+
299
+ @Input(&#x27;rxapInputSelectOptionsMatAutocomplete&#x27;)
300
+ public matAutocomplete?: MatAutocomplete;
301
+
302
+ protected readonly subscription &#x3D; new Subscription();
303
+
304
+ protected control!: RxapFormControl;
305
+
306
+ protected dataSource!: BaseDataSource&lt;ControlOptions | Record&lt;string, any&gt;&gt;;
307
+
308
+ protected options: ControlOptions | Record&lt;string, any&gt; | null &#x3D; null;
309
+
310
+ protected settings?: InputSelectOptionsSettings&lt;any&gt;;
311
+
312
+ /**
313
+ * This flag is used to prevent the setValue is called for each refresh
314
+ * of the options list. This is needed because the setValue method will
315
+ * trigger a new refresh of the options list. This results in an endless
316
+ * call stack. This flag is set to true if the setValue method is called
317
+ * once.
318
+ */
319
+ private isAutocompleteToDisplayTriggered &#x3D; false;
320
+
321
+ constructor(
322
+ @Inject(TemplateRef)
323
+ protected readonly template: TemplateRef&lt;InputSelectOptionsTemplateContext&gt;,
324
+ @Inject(DataSourceLoader)
325
+ protected readonly dataSourceLoader: DataSourceLoader,
326
+ @Inject(ViewContainerRef)
327
+ protected readonly viewContainerRef: ViewContainerRef,
328
+ @Inject(INJECTOR)
329
+ protected readonly injector: Injector,
330
+ @Inject(ChangeDetectorRef)
331
+ protected readonly cdr: ChangeDetectorRef,
332
+ // The ngControl could be unknown on construction
333
+ // bc it is available after the content is init
334
+ @Optional()
335
+ @Inject(NgControl)
336
+ protected ngControl: NgControl | null &#x3D; null,
337
+ @Optional()
338
+ @Inject(MAT_FORM_FIELD)
339
+ protected matFormField: MatFormField | null &#x3D; null,
340
+ ) {
341
+ }
342
+
343
+ public ngAfterViewInit() {
344
+ this.extractOptionsDatasource();
345
+ this.viewer &#x3D; {
346
+ id: &#x27;[rxapInputSelectOptions]&#x27; + this.control.controlId,
347
+ viewChange: this.settings?.loadOnce ? EMPTY : this.control.value$.pipe(
348
+ throttleTime(1000),
349
+ distinctUntilChanged((a, b) &#x3D;&gt; equals(a, b)),
350
+ map(value &#x3D;&gt; {
351
+ if (this.settings?.ignoreSelectedValue) {
352
+ return {};
353
+ }
354
+ return value;
355
+ }),
356
+ ),
357
+ control: this.control,
358
+ };
359
+ if (this.matAutocomplete) {
360
+ this.matAutocomplete.displayWith &#x3D; this.toDisplay.bind(this);
361
+ this.settings ??&#x3D; {};
362
+ this.settings.filteredOptions ??&#x3D; true;
363
+ }
364
+ this.loadOptions();
365
+ }
366
+
367
+ public toDisplay(value: any): string {
368
+ if (!value) {
369
+ return &#x27;&#x27;;
370
+ }
371
+ return this.options?.find((option: any) &#x3D;&gt; option.value &#x3D;&#x3D;&#x3D; value)?.display ??
372
+ (isDevMode() ? &#x27;to display error&#x27; : &#x27;&#x27;);
373
+ }
374
+
375
+ public ngOnDestroy() {
376
+ this.subscription?.unsubscribe();
377
+ }
378
+
379
+ private loadOptions(dataSource: BaseDataSource&lt;ControlOptions | Record&lt;string, any&gt;&gt; &#x3D; this.dataSource) {
380
+ this.subscription.add(dataSource.connect(this.viewer).pipe(
381
+ switchMap(options &#x3D;&gt; {
382
+ if (this.settings?.filteredOptions) {
383
+ return this.control.value$.pipe(
384
+ map(controlValue &#x3D;&gt; {
385
+ if (typeof controlValue &#x3D;&#x3D;&#x3D; &#x27;string&#x27; &amp;&amp; controlValue) {
386
+ controlValue &#x3D; controlValue.toLowerCase();
387
+ if (Array.isArray(options)) {
388
+ return options.filter(option &#x3D;&gt; option.display.toLowerCase().includes(controlValue));
389
+ } else {
390
+ return Object.entries(options)
391
+ .filter(([ value, display ]) &#x3D;&gt; typeof display &#x3D;&#x3D;&#x3D;
392
+ &#x27;string&#x27; &amp;&amp;
393
+ display.toLowerCase().includes(controlValue))
394
+ .map(([ value, display ]) &#x3D;&gt; ({
395
+ value,
396
+ display,
397
+ }));
398
+ }
399
+ }
400
+ return options;
401
+ }),
402
+ );
403
+ }
404
+ return of(options);
405
+ }),
406
+ tap(options &#x3D;&gt; this.renderTemplate(this.options &#x3D; options)),
407
+ tap(() &#x3D;&gt; {
408
+ if (this.matAutocomplete &amp;&amp; !this.isAutocompleteToDisplayTriggered) {
409
+ this.isAutocompleteToDisplayTriggered &#x3D; true;
410
+ // trigger a change detection after the options are rendered
411
+ // this is needed to trigger the mat-autocomplete options to display function
412
+ this.ngControl?.control?.setValue(this.ngControl?.control?.value);
413
+ }
414
+ }),
415
+ ).subscribe());
416
+ }
417
+
418
+ protected renderTemplate(options: ControlOptions | Record&lt;string, any&gt; | null &#x3D; this.options) {
419
+ this.viewContainerRef.clear();
420
+
421
+ if (options) {
422
+ if (!Array.isArray(options)) {
423
+
424
+ for (const [ value, display ] of Object.entries(options)) {
425
+ this.viewContainerRef.createEmbeddedView(
426
+ this.template,
427
+ {
428
+ $implicit: {
429
+ value,
430
+ display,
431
+ },
432
+ },
433
+ );
434
+ }
435
+
436
+ } else {
437
+
438
+ for (const option of options) {
439
+ this.viewContainerRef.createEmbeddedView(this.template, { $implicit: option });
440
+ }
441
+
442
+ }
443
+ } else {
444
+ if (isDevMode()) {
445
+ console.warn(&#x60;The options for the control ${ this.control.fullControlPath } is empty/null/undefined!&#x60;);
446
+ }
447
+ }
448
+
449
+ this.cdr.detectChanges();
450
+ }
451
+
452
+ }
453
+
454
+
455
+ </code></pre>
456
+ </div>
457
+ </div>
458
+
459
+
460
+
461
+
462
+
463
+
464
+
465
+
466
+ </div><div class="search-results">
467
+ <div class="has-results">
468
+ <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
469
+ <ul class="search-results-list"></ul>
470
+ </div>
471
+ <div class="no-results">
472
+ <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
473
+ </div>
474
+ </div>
475
+ </div>
476
+ <!-- END CONTENT -->
477
+ </div>
478
+ </div>
479
+
480
+ <label class="dark-mode-switch">
481
+ <input type="checkbox">
482
+ <span class="slider">
483
+ <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">
484
+ <path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"></path>
485
+ </svg>
486
+ </span>
487
+ </label>
488
+
489
+ <script>
490
+ var COMPODOC_CURRENT_PAGE_DEPTH = 1;
491
+ var COMPODOC_CURRENT_PAGE_CONTEXT = 'interface';
492
+ var COMPODOC_CURRENT_PAGE_URL = 'InputSelectOptionsTemplateContext.html';
493
+ var MAX_SEARCH_RESULTS = 15;
494
+ </script>
495
+
496
+ <script>
497
+ $darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
498
+ checkToggle(darkModeState);
499
+ if ($darkModeToggleSwitchers.length > 0) {
500
+ for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
501
+ $darkModeToggleSwitchers[i].addEventListener('change', function (event) {
502
+ darkModeState = !darkModeState;
503
+ toggleDarkMode(darkModeState);
504
+ });
505
+ }
506
+ }
507
+ </script>
508
+
509
+ <script src="../js/libs/custom-elements.min.js"></script>
510
+ <script src="../js/libs/lit-html.js"></script>
511
+
512
+ <script src="../js/menu-wc.js" defer></script>
513
+ <script nomodule src="../js/menu-wc_es5.js" defer></script>
514
+
515
+ <script src="../js/libs/bootstrap-native.js"></script>
516
+
517
+ <script src="../js/libs/es6-shim.min.js"></script>
518
+ <script src="../js/libs/EventDispatcher.js"></script>
519
+ <script src="../js/libs/promise.min.js"></script>
520
+ <script src="../js/libs/zepto.min.js"></script>
521
+
522
+ <script src="../js/compodoc.js"></script>
523
+
524
+ <script src="../js/tabs.js"></script>
525
+ <script src="../js/menu.js"></script>
526
+ <script src="../js/libs/clipboard.min.js"></script>
527
+ <script src="../js/libs/prism.js"></script>
528
+ <script src="../js/sourceCode.js"></script>
529
+ <script src="../js/search/search.js"></script>
530
+ <script src="../js/search/lunr.min.js"></script>
531
+ <script src="../js/search/search-lunr.js"></script>
532
+ <script src="../js/search/search_index.js"></script>
533
+ <script src="../js/lazy-load-graphs.js"></script>
534
+
535
+
536
+ </body>
537
+ </html>