@rxap/directives 18.0.2-dev.1 → 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 (149) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +1 -1
  3. package/compodoc/changelog.html +489 -0
  4. package/compodoc/dependencies.html +203 -0
  5. package/compodoc/directives/AvatarBackgroundImageDirective.html +785 -0
  6. package/compodoc/directives/BackgroundImageDirective.html +641 -0
  7. package/compodoc/directives/ContenteditableDirective.html +946 -0
  8. package/compodoc/directives/FullWidthDirective.html +389 -0
  9. package/compodoc/directives/IfTruthyDirective.html +746 -0
  10. package/compodoc/directives/IsDevModeDirective.html +350 -0
  11. package/compodoc/directives/MethodDirective.html +1324 -0
  12. package/compodoc/directives/MethodTemplateDirective.html +1634 -0
  13. package/compodoc/directives/MovableDividerDirective.html +731 -0
  14. package/compodoc/directives/PreventDefaultDirective.html +423 -0
  15. package/compodoc/directives/ShareButtonDirective.html +603 -0
  16. package/compodoc/directives/StopImmediatePropagationDirective.html +423 -0
  17. package/compodoc/directives/StopPropagationDirective.html +423 -0
  18. package/compodoc/fonts/ionicons.eot +0 -0
  19. package/compodoc/fonts/ionicons.svg +2090 -0
  20. package/compodoc/fonts/ionicons.ttf +0 -0
  21. package/compodoc/fonts/ionicons.woff +0 -0
  22. package/compodoc/fonts/ionicons.woff2 +0 -0
  23. package/compodoc/fonts/roboto-v15-latin-300.eot +0 -0
  24. package/compodoc/fonts/roboto-v15-latin-300.svg +314 -0
  25. package/compodoc/fonts/roboto-v15-latin-300.ttf +0 -0
  26. package/compodoc/fonts/roboto-v15-latin-300.woff +0 -0
  27. package/compodoc/fonts/roboto-v15-latin-300.woff2 +0 -0
  28. package/compodoc/fonts/roboto-v15-latin-700.eot +0 -0
  29. package/compodoc/fonts/roboto-v15-latin-700.svg +310 -0
  30. package/compodoc/fonts/roboto-v15-latin-700.ttf +0 -0
  31. package/compodoc/fonts/roboto-v15-latin-700.woff +0 -0
  32. package/compodoc/fonts/roboto-v15-latin-700.woff2 +0 -0
  33. package/compodoc/fonts/roboto-v15-latin-italic.eot +0 -0
  34. package/compodoc/fonts/roboto-v15-latin-italic.svg +323 -0
  35. package/compodoc/fonts/roboto-v15-latin-italic.ttf +0 -0
  36. package/compodoc/fonts/roboto-v15-latin-italic.woff +0 -0
  37. package/compodoc/fonts/roboto-v15-latin-italic.woff2 +0 -0
  38. package/compodoc/fonts/roboto-v15-latin-regular.eot +0 -0
  39. package/compodoc/fonts/roboto-v15-latin-regular.svg +308 -0
  40. package/compodoc/fonts/roboto-v15-latin-regular.ttf +0 -0
  41. package/compodoc/fonts/roboto-v15-latin-regular.woff +0 -0
  42. package/compodoc/fonts/roboto-v15-latin-regular.woff2 +0 -0
  43. package/compodoc/graph/dependencies.svg +24 -0
  44. package/compodoc/images/compodoc-vectorise-inverted.png +0 -0
  45. package/compodoc/images/compodoc-vectorise-inverted.svg +201 -0
  46. package/compodoc/images/compodoc-vectorise.png +0 -0
  47. package/compodoc/images/compodoc-vectorise.svg +201 -0
  48. package/compodoc/images/favicon.ico +0 -0
  49. package/compodoc/index.html +193 -0
  50. package/compodoc/injectables/ConfirmClick.html +509 -0
  51. package/compodoc/injectables/ShareService.html +397 -0
  52. package/compodoc/interfaces/ContenteditableEvent.html +398 -0
  53. package/compodoc/interfaces/IfTruthyDirectiveTemplateContext.html +371 -0
  54. package/compodoc/interfaces/MethodTemplateDirectiveContext.html +454 -0
  55. package/compodoc/interfaces/MethodTemplateDirectiveErrorContext.html +493 -0
  56. package/compodoc/js/compodoc.js +14 -0
  57. package/compodoc/js/lazy-load-graphs.js +44 -0
  58. package/compodoc/js/libs/EventDispatcher.js +5 -0
  59. package/compodoc/js/libs/bootstrap-native.js +2 -0
  60. package/compodoc/js/libs/clipboard.min.js +7 -0
  61. package/compodoc/js/libs/custom-elements-es5-adapter.js +15 -0
  62. package/compodoc/js/libs/custom-elements.min.js +38 -0
  63. package/compodoc/js/libs/d3.v3.min.js +2 -0
  64. package/compodoc/js/libs/deep-iterator.js +2 -0
  65. package/compodoc/js/libs/es6-shim.min.js +12 -0
  66. package/compodoc/js/libs/htmlparser.js +23 -0
  67. package/compodoc/js/libs/innersvg.js +9 -0
  68. package/compodoc/js/libs/lit-html.js +1 -0
  69. package/compodoc/js/libs/prism.js +46 -0
  70. package/compodoc/js/libs/promise.min.js +6 -0
  71. package/compodoc/js/libs/svg-pan-zoom.min.js +3 -0
  72. package/compodoc/js/libs/tablesort.min.js +6 -0
  73. package/compodoc/js/libs/tablesort.number.min.js +6 -0
  74. package/compodoc/js/libs/vis.min.js +47 -0
  75. package/compodoc/js/libs/zepto.min.js +2 -0
  76. package/compodoc/js/menu-wc.js +172 -0
  77. package/compodoc/js/menu-wc_es5.js +40 -0
  78. package/compodoc/js/menu.js +270 -0
  79. package/compodoc/js/routes.js +301 -0
  80. package/compodoc/js/search/lunr.min.js +6 -0
  81. package/compodoc/js/search/search-lunr.js +67 -0
  82. package/compodoc/js/search/search.js +283 -0
  83. package/compodoc/js/search/search_index.js +4 -0
  84. package/compodoc/js/sourceCode.js +58 -0
  85. package/compodoc/js/svg-pan-zoom.controls.js +53 -0
  86. package/compodoc/js/tabs.js +21 -0
  87. package/compodoc/js/tree.js +147 -0
  88. package/compodoc/license.html +731 -0
  89. package/compodoc/miscellaneous/enumerations.html +330 -0
  90. package/compodoc/miscellaneous/typealiases.html +254 -0
  91. package/compodoc/modules.html +183 -0
  92. package/compodoc/overview.html +209 -0
  93. package/compodoc/properties.html +197 -0
  94. package/compodoc/styles/bootstrap-card.css +219 -0
  95. package/compodoc/styles/bootstrap.min.css +6 -0
  96. package/compodoc/styles/compodoc.css +1124 -0
  97. package/compodoc/styles/dark.css +121 -0
  98. package/compodoc/styles/ionicons.min.css +11 -0
  99. package/compodoc/styles/laravel.css +113 -0
  100. package/compodoc/styles/material.css +131 -0
  101. package/compodoc/styles/original.css +51 -0
  102. package/compodoc/styles/postmark.css +238 -0
  103. package/compodoc/styles/prism.css +301 -0
  104. package/compodoc/styles/readthedocs.css +117 -0
  105. package/compodoc/styles/reset.css +129 -0
  106. package/compodoc/styles/stripe.css +106 -0
  107. package/compodoc/styles/style.css +7 -0
  108. package/compodoc/styles/tablesort.css +33 -0
  109. package/compodoc/styles/vagrant.css +130 -0
  110. package/docs/.nojekyll +1 -0
  111. package/docs/assets/highlight.css +43 -0
  112. package/docs/assets/icons.js +15 -0
  113. package/docs/assets/icons.svg +1 -0
  114. package/docs/assets/main.js +59 -0
  115. package/docs/assets/navigation.js +1 -0
  116. package/docs/assets/search.js +1 -0
  117. package/docs/assets/style.css +1412 -0
  118. package/docs/classes/AvatarBackgroundImageDirective.html +11 -0
  119. package/docs/classes/BackgroundImageDirective.html +16 -0
  120. package/docs/classes/ConfirmClick.html +7 -0
  121. package/docs/classes/ContenteditableDirective.html +11 -0
  122. package/docs/classes/FullWidthDirective.html +3 -0
  123. package/docs/classes/IfTruthyDirective.html +16 -0
  124. package/docs/classes/IsDevModeDirective.html +7 -0
  125. package/docs/classes/MethodDirective.html +21 -0
  126. package/docs/classes/MethodTemplateDirective.html +30 -0
  127. package/docs/classes/MovableDividerDirective.html +17 -0
  128. package/docs/classes/PreventDefaultDirective.html +3 -0
  129. package/docs/classes/ShareButtonDirective.html +8 -0
  130. package/docs/classes/ShareService.html +4 -0
  131. package/docs/classes/StopImmediatePropagationDirective.html +3 -0
  132. package/docs/classes/StopPropagationDirective.html +3 -0
  133. package/docs/documentation.json +8846 -0
  134. package/docs/enums/BackgroundPositionOptions.html +3 -0
  135. package/docs/enums/BackgroundRepeatOptions.html +2 -0
  136. package/docs/enums/BackgroundSizeOptions.html +4 -0
  137. package/docs/enums/GlobalStyleOptions.html +3 -0
  138. package/docs/hierarchy.html +1 -0
  139. package/docs/index.html +19 -0
  140. package/docs/interfaces/ContenteditableEvent.html +3 -0
  141. package/docs/interfaces/IfTruthyDirectiveTemplateContext.html +2 -0
  142. package/docs/interfaces/MethodTemplateDirectiveContext.html +2 -0
  143. package/docs/interfaces/MethodTemplateDirectiveErrorContext.html +3 -0
  144. package/docs/modules.html +27 -0
  145. package/docs/types/BackgroundPosition.html +1 -0
  146. package/docs/types/BackgroundRepeat.html +1 -0
  147. package/docs/types/BackgroundSize.html +1 -0
  148. package/package.json +10 -10
  149. package/theme.css +1 -1
@@ -0,0 +1,641 @@
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-directives</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-directives</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" >BackgroundImageDirective</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/background-image.directive.ts</code>
118
+ </p>
119
+
120
+
121
+
122
+
123
+ <p class="comment">
124
+ <h3>Implements</h3>
125
+ </p>
126
+ <p class="comment">
127
+ <code>OnChanges</code>
128
+ <code>OnInit</code>
129
+ </p>
130
+
131
+
132
+ <section data-compodoc="block-metadata">
133
+ <h3>Metadata</h3>
134
+ <table class="table table-sm table-hover metadata">
135
+ <tbody>
136
+
137
+ <tr>
138
+ <td class="col-md-3">Selector</td>
139
+ <td class="col-md-9"><code>[rxapBackgroundImage]</code></td>
140
+ </tr>
141
+
142
+ <tr>
143
+ <td class="col-md-3">Standalone</td>
144
+ <td class="col-md-9"><code>true</code></td>
145
+ </tr>
146
+
147
+
148
+
149
+ </tbody>
150
+ </table>
151
+ </section>
152
+
153
+ <section data-compodoc="block-index">
154
+ <h3 id="index">Index</h3>
155
+ <table class="table table-sm table-bordered index-table">
156
+ <tbody>
157
+
158
+
159
+ <tr>
160
+ <td class="col-md-4">
161
+ <h6><b>Inputs</b></h6>
162
+ </td>
163
+ </tr>
164
+ <tr>
165
+ <td class="col-md-4">
166
+ <ul class="index-list">
167
+ <li>
168
+ <a href="#placeholderImageUrl" >placeholderImageUrl</a>
169
+ </li>
170
+ <li>
171
+ <a href="#position" >position</a>
172
+ </li>
173
+ <li>
174
+ <a href="#repeat" >repeat</a>
175
+ </li>
176
+ <li>
177
+ <a href="#rxapBackgroundImage" >rxapBackgroundImage</a>
178
+ </li>
179
+ <li>
180
+ <a href="#size" >size</a>
181
+ </li>
182
+ </ul>
183
+ </td>
184
+ </tr>
185
+
186
+
187
+
188
+
189
+ </tbody>
190
+ </table>
191
+ </section>
192
+
193
+ <section data-compodoc="block-constructor">
194
+ <h3 id="constructor">Constructor</h3>
195
+ <table class="table table-sm table-bordered">
196
+ <tbody>
197
+ <tr>
198
+ <td class="col-md-4">
199
+ <code>constructor(host: ElementRef, renderer: Renderer2, imageLoader: ImageLoaderService)</code>
200
+ </td>
201
+ </tr>
202
+ <tr>
203
+ <td class="col-md-4">
204
+ <div class="io-line">Defined in <a href="" data-line="70" class="link-to-prism">src/lib/background-image.directive.ts:70</a></div>
205
+ </td>
206
+ </tr>
207
+
208
+ <tr>
209
+ <td class="col-md-4">
210
+ <div>
211
+ <b>Parameters :</b>
212
+ <table class="params">
213
+ <thead>
214
+ <tr>
215
+ <td>Name</td>
216
+ <td>Type</td>
217
+ <td>Optional</td>
218
+ </tr>
219
+ </thead>
220
+ <tbody>
221
+ <tr>
222
+ <td>host</td>
223
+
224
+ <td>
225
+ <code>ElementRef</code>
226
+ </td>
227
+
228
+ <td>
229
+ No
230
+ </td>
231
+
232
+ </tr>
233
+ <tr>
234
+ <td>renderer</td>
235
+
236
+ <td>
237
+ <code>Renderer2</code>
238
+ </td>
239
+
240
+ <td>
241
+ No
242
+ </td>
243
+
244
+ </tr>
245
+ <tr>
246
+ <td>imageLoader</td>
247
+
248
+ <td>
249
+ <code>ImageLoaderService</code>
250
+ </td>
251
+
252
+ <td>
253
+ No
254
+ </td>
255
+
256
+ </tr>
257
+ </tbody>
258
+ </table>
259
+ </div>
260
+ </td>
261
+ </tr>
262
+ </tbody>
263
+ </table>
264
+ </section>
265
+
266
+ <section data-compodoc="block-inputs">
267
+ <h3 id="inputs">Inputs</h3>
268
+ <table class="table table-sm table-bordered">
269
+ <tbody>
270
+ <tr>
271
+ <td class="col-md-4">
272
+ <a name="placeholderImageUrl"></a>
273
+ <b>placeholderImageUrl</b>
274
+ </td>
275
+ </tr>
276
+ <tr>
277
+ <td class="col-md-4">
278
+ <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
279
+
280
+ </td>
281
+ </tr>
282
+ <tr>
283
+ <td class="col-md-2" colspan="2">
284
+ <div class="io-line">Defined in <a href="" data-line="61" class="link-to-prism">src/lib/background-image.directive.ts:61</a></div>
285
+ </td>
286
+ </tr>
287
+ </tbody>
288
+ </table>
289
+ <table class="table table-sm table-bordered">
290
+ <tbody>
291
+ <tr>
292
+ <td class="col-md-4">
293
+ <a name="position"></a>
294
+ <b>position</b>
295
+ </td>
296
+ </tr>
297
+ <tr>
298
+ <td class="col-md-4">
299
+ <i>Type : </i> <code><a href="../miscellaneous/typealiases.html#BackgroundPosition" target="_self" >BackgroundPosition</a></code>
300
+
301
+ </td>
302
+ </tr>
303
+ <tr>
304
+ <td class="col-md-2" colspan="2">
305
+ <div class="io-line">Defined in <a href="" data-line="70" class="link-to-prism">src/lib/background-image.directive.ts:70</a></div>
306
+ </td>
307
+ </tr>
308
+ </tbody>
309
+ </table>
310
+ <table class="table table-sm table-bordered">
311
+ <tbody>
312
+ <tr>
313
+ <td class="col-md-4">
314
+ <a name="repeat"></a>
315
+ <b>repeat</b>
316
+ </td>
317
+ </tr>
318
+ <tr>
319
+ <td class="col-md-4">
320
+ <i>Type : </i> <code><a href="../miscellaneous/typealiases.html#BackgroundRepeat" target="_self" >BackgroundRepeat</a></code>
321
+
322
+ </td>
323
+ </tr>
324
+ <tr>
325
+ <td class="col-md-2" colspan="2">
326
+ <div class="io-line">Defined in <a href="" data-line="67" class="link-to-prism">src/lib/background-image.directive.ts:67</a></div>
327
+ </td>
328
+ </tr>
329
+ </tbody>
330
+ </table>
331
+ <table class="table table-sm table-bordered">
332
+ <tbody>
333
+ <tr>
334
+ <td class="col-md-4">
335
+ <a name="rxapBackgroundImage"></a>
336
+ <b>rxapBackgroundImage</b>
337
+ </td>
338
+ </tr>
339
+ <tr>
340
+ <td class="col-md-4">
341
+ <i>Type : </i> <code>string | null | undefined</code>
342
+
343
+ </td>
344
+ </tr>
345
+ <tr>
346
+ <td class="col-md-4">
347
+ <i>Default value : </i><code>null</code>
348
+ </td>
349
+ </tr>
350
+ <tr>
351
+ <td class="col-md-2" colspan="2">
352
+ <div class="io-line">Defined in <a href="" data-line="58" class="link-to-prism">src/lib/background-image.directive.ts:58</a></div>
353
+ </td>
354
+ </tr>
355
+ </tbody>
356
+ </table>
357
+ <table class="table table-sm table-bordered">
358
+ <tbody>
359
+ <tr>
360
+ <td class="col-md-4">
361
+ <a name="size"></a>
362
+ <b>size</b>
363
+ </td>
364
+ </tr>
365
+ <tr>
366
+ <td class="col-md-4">
367
+ <i>Type : </i> <code><a href="../miscellaneous/typealiases.html#BackgroundSize" target="_self" >BackgroundSize</a></code>
368
+
369
+ </td>
370
+ </tr>
371
+ <tr>
372
+ <td class="col-md-2" colspan="2">
373
+ <div class="io-line">Defined in <a href="" data-line="64" class="link-to-prism">src/lib/background-image.directive.ts:64</a></div>
374
+ </td>
375
+ </tr>
376
+ </tbody>
377
+ </table>
378
+ </section>
379
+
380
+
381
+
382
+
383
+
384
+
385
+ </div>
386
+
387
+
388
+ <div class="tab-pane fade tab-source-code" id="source">
389
+ <pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
390
+ Directive,
391
+ ElementRef,
392
+ Inject,
393
+ Input,
394
+ isDevMode,
395
+ OnChanges,
396
+ OnInit,
397
+ Renderer2,
398
+ SimpleChanges,
399
+ } from &#x27;@angular/core&#x27;;
400
+ import { ImageLoaderService } from &#x27;@rxap/services&#x27;;
401
+
402
+ export enum GlobalStyleOptions {
403
+ INITIAL &#x3D; &#x27;initial&#x27;,
404
+ INHERIT &#x3D; &#x27;inherit&#x27;,
405
+ }
406
+
407
+ // TODO : complete description
408
+ // https://www.w3schools.com/cssref/css3_pr_background-size.asp
409
+ export enum BackgroundSizeOptions {
410
+ AUTO &#x3D; &#x27;auto&#x27;,
411
+ COVER &#x3D; &#x27;cover&#x27;,
412
+ CONTAIN &#x3D; &#x27;contain&#x27;,
413
+ }
414
+
415
+ export type BackgroundSize &#x3D;
416
+ | GlobalStyleOptions
417
+ | BackgroundSizeOptions
418
+ | string;
419
+
420
+ // TODO : complete options and description
421
+ // https://www.w3schools.com/cssref/pr_background-repeat.asp
422
+ export enum BackgroundRepeatOptions {
423
+ NO_REPEAT &#x3D; &#x27;no-repeat&#x27;,
424
+ }
425
+
426
+ export type BackgroundRepeat &#x3D; GlobalStyleOptions | BackgroundRepeatOptions;
427
+
428
+ // TODO : complete options and description
429
+ // https://www.w3schools.com/cssref/pr_background-position.asp
430
+ export enum BackgroundPositionOptions {
431
+ CENTER &#x3D; &#x27;center&#x27;,
432
+ CENTER_CENTER &#x3D; &#x27;center center&#x27;,
433
+ }
434
+
435
+ export type BackgroundPosition &#x3D;
436
+ | GlobalStyleOptions
437
+ | BackgroundPositionOptions
438
+ | string;
439
+
440
+ @Directive({
441
+ selector: &#x27;[rxapBackgroundImage]&#x27;,
442
+ standalone: true,
443
+ })
444
+ export class BackgroundImageDirective implements OnChanges, OnInit {
445
+ @Input(&#x27;rxapBackgroundImage&#x27;)
446
+ public imageUrl: string | null | undefined &#x3D; null;
447
+
448
+ @Input()
449
+ public placeholderImageUrl!: string;
450
+
451
+ @Input()
452
+ public size?: BackgroundSize;
453
+
454
+ @Input()
455
+ public repeat?: BackgroundRepeat;
456
+
457
+ @Input()
458
+ public position?: BackgroundPosition;
459
+
460
+ // TODO : add inputs for all &#x27;background-*&#x27; styles
461
+
462
+ constructor(
463
+ @Inject(ElementRef)
464
+ private readonly host: ElementRef,
465
+ @Inject(Renderer2)
466
+ private readonly renderer: Renderer2,
467
+ @Inject(ImageLoaderService)
468
+ private readonly imageLoader: ImageLoaderService,
469
+ ) {
470
+ }
471
+
472
+ public ngOnInit() {
473
+ if (this.size) {
474
+ this.sizeChange(this.size);
475
+ }
476
+ if (this.position) {
477
+ this.positionChange(this.position);
478
+ }
479
+ if (this.repeat) {
480
+ this.repeatChange(this.repeat);
481
+ }
482
+ }
483
+
484
+ public ngOnChanges(changes: SimpleChanges) {
485
+ for (const propertyKey of Object.keys(changes)) {
486
+ switch (propertyKey) {
487
+ case &#x27;imageUrl&#x27;:
488
+ if (changes[&#x27;imageUrl&#x27;].currentValue) {
489
+ this.imageUrlChange(changes[&#x27;imageUrl&#x27;].currentValue);
490
+ }
491
+ break;
492
+
493
+ case &#x27;size&#x27;:
494
+ this.sizeChange(changes[&#x27;size&#x27;].currentValue);
495
+ break;
496
+
497
+ case &#x27;repeat&#x27;:
498
+ this.repeatChange(changes[&#x27;repeat&#x27;].currentValue);
499
+ break;
500
+
501
+ case &#x27;position&#x27;:
502
+ this.positionChange(changes[&#x27;position&#x27;].currentValue);
503
+ break;
504
+ }
505
+ }
506
+ }
507
+
508
+ private repeatChange(repeat: string): void {
509
+ this.renderer.setStyle(
510
+ this.host.nativeElement,
511
+ &#x27;background-repeat&#x27;,
512
+ repeat,
513
+ );
514
+ }
515
+
516
+ private positionChange(position: string): void {
517
+ this.renderer.setStyle(
518
+ this.host.nativeElement,
519
+ &#x27;background-position&#x27;,
520
+ position,
521
+ );
522
+ }
523
+
524
+ private sizeChange(size: string): void {
525
+ this.renderer.setStyle(this.host.nativeElement, &#x27;background-size&#x27;, size);
526
+ }
527
+
528
+ private async imageUrlChange(imageUrl: string): Promise&lt;void&gt; {
529
+ if (this.placeholderImageUrl) {
530
+ this.renderer.setStyle(
531
+ this.host.nativeElement,
532
+ &#x27;background-image&#x27;,
533
+ &#x60;url(&quot;${ this.placeholderImageUrl }&quot;)&#x60;,
534
+ );
535
+ }
536
+ if (imageUrl) {
537
+ await this.imageLoader.load(imageUrl);
538
+ this.renderer.setStyle(
539
+ this.host.nativeElement,
540
+ &#x27;background-image&#x27;,
541
+ &#x60;url(&quot;${ imageUrl }&quot;)&#x60;,
542
+ );
543
+ } else {
544
+ if (isDevMode()) {
545
+ console.warn(&#x27;background image url is not defined&#x27;);
546
+ }
547
+ }
548
+ }
549
+ }
550
+
551
+
552
+ </code></pre>
553
+ </div>
554
+
555
+ </div>
556
+
557
+
558
+
559
+
560
+
561
+
562
+
563
+
564
+
565
+
566
+
567
+
568
+
569
+
570
+ </div><div class="search-results">
571
+ <div class="has-results">
572
+ <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
573
+ <ul class="search-results-list"></ul>
574
+ </div>
575
+ <div class="no-results">
576
+ <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
577
+ </div>
578
+ </div>
579
+ </div>
580
+ <!-- END CONTENT -->
581
+ </div>
582
+ </div>
583
+
584
+ <label class="dark-mode-switch">
585
+ <input type="checkbox">
586
+ <span class="slider">
587
+ <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">
588
+ <path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"></path>
589
+ </svg>
590
+ </span>
591
+ </label>
592
+
593
+ <script>
594
+ var COMPODOC_CURRENT_PAGE_DEPTH = 1;
595
+ var COMPODOC_CURRENT_PAGE_CONTEXT = 'directive';
596
+ var COMPODOC_CURRENT_PAGE_URL = 'BackgroundImageDirective.html';
597
+ var MAX_SEARCH_RESULTS = 15;
598
+ </script>
599
+
600
+ <script>
601
+ $darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
602
+ checkToggle(darkModeState);
603
+ if ($darkModeToggleSwitchers.length > 0) {
604
+ for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
605
+ $darkModeToggleSwitchers[i].addEventListener('change', function (event) {
606
+ darkModeState = !darkModeState;
607
+ toggleDarkMode(darkModeState);
608
+ });
609
+ }
610
+ }
611
+ </script>
612
+
613
+ <script src="../js/libs/custom-elements.min.js"></script>
614
+ <script src="../js/libs/lit-html.js"></script>
615
+
616
+ <script src="../js/menu-wc.js" defer></script>
617
+ <script nomodule src="../js/menu-wc_es5.js" defer></script>
618
+
619
+ <script src="../js/libs/bootstrap-native.js"></script>
620
+
621
+ <script src="../js/libs/es6-shim.min.js"></script>
622
+ <script src="../js/libs/EventDispatcher.js"></script>
623
+ <script src="../js/libs/promise.min.js"></script>
624
+ <script src="../js/libs/zepto.min.js"></script>
625
+
626
+ <script src="../js/compodoc.js"></script>
627
+
628
+ <script src="../js/tabs.js"></script>
629
+ <script src="../js/menu.js"></script>
630
+ <script src="../js/libs/clipboard.min.js"></script>
631
+ <script src="../js/libs/prism.js"></script>
632
+ <script src="../js/sourceCode.js"></script>
633
+ <script src="../js/search/search.js"></script>
634
+ <script src="../js/search/lunr.min.js"></script>
635
+ <script src="../js/search/search-lunr.js"></script>
636
+ <script src="../js/search/search_index.js"></script>
637
+ <script src="../js/lazy-load-graphs.js"></script>
638
+
639
+
640
+ </body>
641
+ </html>