@eui/mobile-core 20.0.2 → 22.0.0-alpha.1

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 (196) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/docs/architecture.html +223 -0
  3. package/docs/changelog.html +69 -4
  4. package/docs/components/EuiMUserProfileActionComponent.html +80 -130
  5. package/docs/components/EuiMUserProfileAvatarComponent.html +74 -129
  6. package/docs/components/EuiMUserProfileInfosComponent.html +117 -117
  7. package/docs/components/EuiMUserProfileInfosItemComponent.html +74 -129
  8. package/docs/components/EuimAboutComponent.html +108 -28
  9. package/docs/components/EuimAboutContentLoadingComponent.html +107 -33
  10. package/docs/components/EuimAlertMessageComponent.html +161 -90
  11. package/docs/components/EuimAppComponent.html +105 -27
  12. package/docs/components/EuimAvatarBadgeComponent.html +120 -72
  13. package/docs/components/EuimAvatarComponent.html +123 -121
  14. package/docs/components/EuimAvatarIconComponent.html +74 -129
  15. package/docs/components/EuimAvatarIconSubComponent.html +123 -121
  16. package/docs/components/EuimAvatarImageComponent.html +91 -121
  17. package/docs/components/EuimAvatarTextComponent.html +115 -117
  18. package/docs/components/EuimBadgeComponent.html +121 -43
  19. package/docs/components/EuimCardComponent.html +123 -71
  20. package/docs/components/EuimCardListComponent.html +118 -118
  21. package/docs/components/EuimChangelogComponent.html +131 -128
  22. package/docs/components/EuimChipSelectorComponent.html +257 -184
  23. package/docs/components/EuimDataSummaryColComponent.html +92 -25
  24. package/docs/components/EuimDataSummaryComponent.html +127 -44
  25. package/docs/components/EuimEmptyListPlaceholderComponent.html +176 -156
  26. package/docs/components/EuimHeaderDetailsComponent.html +130 -49
  27. package/docs/components/EuimHelpSupportComponent.html +159 -130
  28. package/docs/components/EuimHelperTextComponent.html +161 -66
  29. package/docs/components/EuimLabelComponent.html +134 -53
  30. package/docs/components/EuimLanguageListComponent.html +185 -31
  31. package/docs/components/EuimLanguageSelectorComponent.html +156 -54
  32. package/docs/components/EuimMediaHeaderComponent.html +137 -52
  33. package/docs/components/EuimMessageComponent.html +130 -47
  34. package/docs/components/EuimMessageTitleComponent.html +92 -25
  35. package/docs/components/EuimMultiselectComponent.html +160 -131
  36. package/docs/components/EuimMultiselectFilterComponent.html +103 -123
  37. package/docs/components/EuimMultiselectInfoComponent.html +91 -125
  38. package/docs/components/EuimMultiselectListComponent.html +85 -122
  39. package/docs/components/EuimMultiselectToolbarComponent.html +126 -134
  40. package/docs/components/EuimNotificationItemComponent.html +121 -43
  41. package/docs/components/EuimOpenSourceLicencesComponent.html +127 -137
  42. package/docs/components/EuimPdfViewerComponent.html +214 -141
  43. package/docs/components/EuimScrollerXComponent.html +78 -130
  44. package/docs/components/EuimSidebarComponent.html +125 -114
  45. package/docs/components/EuimSidebarContentComponent.html +151 -124
  46. package/docs/components/EuimSkeletonListComponent.html +127 -42
  47. package/docs/components/EuimSkeletonListItemComponent.html +159 -56
  48. package/docs/components/EuimSlideInfoScreenComponent.html +74 -129
  49. package/docs/components/EuimSliderInfoScreenComponent.html +247 -174
  50. package/docs/components/EuimSpinnerComponent.html +131 -119
  51. package/docs/components/EuimSpinnerDescriptionComponent.html +74 -129
  52. package/docs/components/EuimSpinnerMessageComponent.html +74 -129
  53. package/docs/components/EuimToolbarActionItemsComponent.html +74 -129
  54. package/docs/components/EuimToolbarComponent.html +150 -140
  55. package/docs/components/EuimToolbarDatepickerComponent.html +291 -114
  56. package/docs/components/EuimToolbarQrcodeComponent.html +100 -32
  57. package/docs/components/EuimToolbarTitleComponent.html +121 -43
  58. package/docs/components/EuimUserProfileComponent.html +117 -117
  59. package/docs/dependencies.html +56 -4
  60. package/docs/directives/BaseStatesDirective.html +175 -62
  61. package/docs/directives/EuimAlignCenterDirective.html +92 -23
  62. package/docs/directives/EuimAlignTopDirective.html +92 -23
  63. package/docs/directives/EuimAvatarMainIconDirective.html +73 -23
  64. package/docs/directives/EuimAvatarSubIconDirective.html +73 -23
  65. package/docs/directives/EuimCardImageDirective.html +86 -118
  66. package/docs/directives/EuimChipSelectorItemDirective.html +104 -108
  67. package/docs/directives/EuimDataSummaryColLabelDirective.html +121 -41
  68. package/docs/directives/EuimDataSummaryColValueDirective.html +117 -41
  69. package/docs/directives/EuimDividerDirective.html +118 -42
  70. package/docs/directives/EuimEmptyListPlaceholderIconDirective.html +92 -23
  71. package/docs/directives/EuimEmptyListPlaceholderSubtitleDirective.html +92 -23
  72. package/docs/directives/EuimEmptyListPlaceholderTitleDirective.html +92 -23
  73. package/docs/directives/EuimFooterTransparentDirective.html +92 -23
  74. package/docs/directives/EuimHeaderDetailsIconDirective.html +66 -126
  75. package/docs/directives/EuimHeaderDetailsMetaDirective.html +66 -126
  76. package/docs/directives/EuimHeaderDetailsTitleDirective.html +66 -126
  77. package/docs/directives/EuimListHeaderDirective.html +118 -42
  78. package/docs/directives/EuimListItemNoPaddingsDirective.html +92 -23
  79. package/docs/directives/EuimMediaHeaderCustomContentDirective.html +95 -23
  80. package/docs/directives/EuimMediaHeaderImageDirective.html +92 -23
  81. package/docs/directives/EuimMediaHeaderSubTitleDirective.html +92 -23
  82. package/docs/directives/EuimMediaHeaderTitleDirective.html +66 -126
  83. package/docs/directives/EuimMinWidthDirective.html +105 -29
  84. package/docs/directives/EuimMultiselectAllDirective.html +138 -101
  85. package/docs/directives/EuimMultiselectSelectFieldDirective.html +102 -127
  86. package/docs/directives/EuimReadOnlyFormDirective.html +66 -126
  87. package/docs/directives/EuimReadOnlyFormLabelDirective.html +92 -23
  88. package/docs/directives/EuimReadOnlyFormValueDirective.html +66 -126
  89. package/docs/directives/EuimSidebarFooterNoBordersDirective.html +92 -23
  90. package/docs/directives/EuimSkeletonTextAvatarDirective.html +92 -23
  91. package/docs/directives/EuimSliderInfoScreenContentDirective.html +112 -114
  92. package/docs/directives/EuimSliderInfoScreenSubTitleDirective.html +66 -126
  93. package/docs/directives/EuimSliderInfoScreenTitleDirective.html +66 -126
  94. package/docs/directives/EuimToolbarDatepickerDatetimeDirective.html +122 -43
  95. package/docs/directives/EuimToolbarTransparentDirective.html +140 -54
  96. package/docs/index.html +54 -2
  97. package/docs/injectables/EuimAppService.html +102 -38
  98. package/docs/interfaces/ActionBtnsIconsNames.html +169 -123
  99. package/docs/interfaces/ActionBtnsNames.html +169 -123
  100. package/docs/interfaces/FilteredData.html +138 -92
  101. package/docs/interfaces/HelpAndSupportItem.html +145 -99
  102. package/docs/interfaces/Item.html +504 -458
  103. package/docs/interfaces/MenuItem.html +408 -362
  104. package/docs/interfaces/UIState.html +109 -63
  105. package/docs/js/architecture-graph.js +288 -0
  106. package/docs/js/libs/bootstrap-native.js +4 -2
  107. package/docs/js/libs/jszip.min.js +13 -0
  108. package/docs/js/libs/svg-pan-zoom.min.js +3 -3
  109. package/docs/js/libs/tablesort.min.js +3 -3
  110. package/docs/js/libs/tablesort.number.min.js +3 -3
  111. package/docs/js/libs/vis-network.min.js +78 -0
  112. package/docs/js/menu-wc.js +25 -13
  113. package/docs/js/routes/routes_index.js +1 -0
  114. package/docs/js/routes.js +142 -34
  115. package/docs/js/search/search.js +62 -0
  116. package/docs/js/search/search_index.js +2 -2
  117. package/docs/js/tabs.js +98 -15
  118. package/docs/js/tree.js +44 -7
  119. package/docs/json/EuimAlertMessageComponent.md +1 -1
  120. package/docs/json/EuimAvatarImageComponent.md +1 -1
  121. package/docs/json/EuimCardListComponent.md +1 -1
  122. package/docs/json/EuimChangelogComponent.md +1 -1
  123. package/docs/json/EuimChipSelectorComponent.md +4 -4
  124. package/docs/json/EuimHeaderDetailsComponent.md +1 -1
  125. package/docs/json/EuimHelperTextComponent.md +1 -0
  126. package/docs/json/EuimMultiselectComponent.md +1 -1
  127. package/docs/json/EuimMultiselectToolbarComponent.md +2 -2
  128. package/docs/json/EuimOpenSourceLicencesComponent.md +2 -2
  129. package/docs/json/EuimPdfViewerComponent.md +0 -1
  130. package/docs/json/EuimSidebarContentComponent.md +3 -4
  131. package/docs/json/EuimSliderInfoScreenComponent.md +3 -3
  132. package/docs/json/EuimToolbarComponent.md +1 -1
  133. package/docs/json/EuimToolbarDatepickerComponent.md +5 -4
  134. package/docs/json/EuimToolbarQrcodeComponent.md +1 -1
  135. package/docs/json/HbsRenderService.md +6 -0
  136. package/docs/json/TemplateEditorService.md +6 -0
  137. package/docs/json/TemplatePlaygroundComponent.md +8 -0
  138. package/docs/json/ZipExportService.md +6 -0
  139. package/docs/json/documentation.json +6868 -3891
  140. package/docs/license.html +46 -4
  141. package/docs/llms.txt +1527 -0
  142. package/docs/miscellaneous/typealiases.html +53 -8
  143. package/docs/miscellaneous/variables.html +320 -36
  144. package/docs/modules/EuimAboutModule.html +87 -10
  145. package/docs/modules/EuimAlertMessageModule.html +75 -10
  146. package/docs/modules/EuimAllModule.html +190 -9
  147. package/docs/modules/EuimAppModule.html +75 -10
  148. package/docs/modules/EuimAvatarModule.html +99 -10
  149. package/docs/modules/EuimBadgeModule.html +75 -10
  150. package/docs/modules/EuimCardListModule.html +75 -10
  151. package/docs/modules/EuimCardModule.html +78 -10
  152. package/docs/modules/EuimChipSelectorComponentModule.html +74 -10
  153. package/docs/modules/EuimDataSummaryModule.html +84 -10
  154. package/docs/modules/EuimDividerModule.html +75 -10
  155. package/docs/modules/EuimEmptyListPlaceholderModule.html +90 -10
  156. package/docs/modules/EuimHeaderDetailsModule.html +84 -10
  157. package/docs/modules/EuimLabelModule.html +87 -10
  158. package/docs/modules/EuimLanguageSelectorModule.html +81 -10
  159. package/docs/modules/EuimListHeaderModule.html +75 -10
  160. package/docs/modules/EuimMediaHeaderModule.html +87 -10
  161. package/docs/modules/EuimMessageModule.html +78 -10
  162. package/docs/modules/EuimMultiselectModule.html +93 -10
  163. package/docs/modules/EuimNotificationItemModule.html +75 -10
  164. package/docs/modules/EuimPdfViewerModule.html +75 -10
  165. package/docs/modules/EuimScrollerXComponentModule.html +75 -10
  166. package/docs/modules/EuimSidebarModule.html +78 -10
  167. package/docs/modules/EuimSkeletonListItemModule.html +75 -10
  168. package/docs/modules/EuimSkeletonListModule.html +75 -10
  169. package/docs/modules/EuimSkeletonTextAvatarModule.html +75 -10
  170. package/docs/modules/EuimSliderInfoScreenModule.html +87 -10
  171. package/docs/modules/EuimSpinnerComponentModule.html +81 -10
  172. package/docs/modules/EuimToolbarComponentModule.html +81 -10
  173. package/docs/modules/EuimToolbarDatepickerModule.html +75 -10
  174. package/docs/modules/EuimToolbarQrcodeModule.html +75 -10
  175. package/docs/modules/EuimUserProfileModule.html +87 -10
  176. package/docs/modules.html +44 -2
  177. package/docs/properties.html +45 -3
  178. package/docs/routes.html +228 -0
  179. package/docs/styles/compodoc.css +365 -44
  180. package/docs/styles/dark.css +16 -0
  181. package/docs/template-playground/default-templates.json +192 -0
  182. package/docs/template-playground/hbs-render.service.ts +217 -0
  183. package/docs/template-playground/main.ts +9 -0
  184. package/docs/template-playground/template-editor.service.ts +173 -0
  185. package/docs/template-playground/template-playground.component.ts +614 -0
  186. package/docs/template-playground/template-playground.module.ts +29 -0
  187. package/docs/template-playground/zip-export.service.ts +86 -0
  188. package/docs/template-playground-app/app.js +1389 -0
  189. package/docs/template-playground-app/index.html +462 -0
  190. package/fesm2022/eui-mobile-core.mjs +870 -1214
  191. package/fesm2022/eui-mobile-core.mjs.map +1 -1
  192. package/package.json +12 -11
  193. package/{index.d.ts → types/eui-mobile-core.d.ts} +143 -215
  194. package/types/eui-mobile-core.d.ts.map +1 -0
  195. package/docs/js/libs/vis.min.js +0 -47
  196. package/docs/js/menu-wc_es5.js +0 -40
@@ -19,15 +19,23 @@ customElements.define('compodoc-menu', class extends HTMLElement {
19
19
  </li>
20
20
 
21
21
  <li class="divider"></li>
22
- ${ isNormalMode ? `<div id="book-search-input" role="search"><input type="text" placeholder="Type to search"></div>` : '' }
22
+ ${ isNormalMode ? `<div id="book-search-input" role="search">
23
+ <input type="text" placeholder="Type to search">
24
+ <button type="button"
25
+ class="search-input-clear"
26
+ aria-label="Clear search"
27
+ data-search-input-clear>&times;</button>
28
+ </div>
29
+ ` : '' }
23
30
  <li class="chapter">
24
31
  <a data-type="chapter-link" href="index.html"><span class="icon ion-ios-home"></span>Getting started</a>
25
32
  <ul class="links">
26
- <li class="link">
27
- <a href="index.html" data-type="chapter-link">
28
- <span class="icon ion-ios-keypad"></span>Overview
29
- </a>
30
- </li>
33
+ <li class="link">
34
+ <a href="index.html" data-type="chapter-link">
35
+ <span class="icon ion-ios-keypad"></span>Overview
36
+ </a>
37
+ </li>
38
+
31
39
  <li class="link">
32
40
  <a href="changelog.html" data-type="chapter-link">
33
41
  <span class="icon ion-ios-paper"></span>CHANGELOG
@@ -43,6 +51,7 @@ customElements.define('compodoc-menu', class extends HTMLElement {
43
51
  <span class="icon ion-ios-apps"></span>Properties
44
52
  </a>
45
53
  </li>
54
+
46
55
  </ul>
47
56
  </li>
48
57
  <li class="chapter modules">
@@ -59,13 +68,13 @@ customElements.define('compodoc-menu', class extends HTMLElement {
59
68
  <a href="modules/EuimAboutModule.html" data-type="entity-link" class="deprecated-name">EuimAboutModule</a>
60
69
  <li class="chapter inner">
61
70
  <div class="simple menu-toggler" data-bs-toggle="collapse" ${ isNormalMode ?
62
- 'data-bs-target="#components-links-module-EuimAboutModule-644754ba65e7d7ebec8981d615c461cc9db6a1c0c6920175d9ae172d693fb2a8ec3f5ef1bd0f45089e7a4d4062161f331f909fa735686bef3914264738e80752"' : 'data-bs-target="#xs-components-links-module-EuimAboutModule-644754ba65e7d7ebec8981d615c461cc9db6a1c0c6920175d9ae172d693fb2a8ec3f5ef1bd0f45089e7a4d4062161f331f909fa735686bef3914264738e80752"' }>
71
+ 'data-bs-target="#components-links-module-EuimAboutModule-e549eda796d29eb893d705b09af578fd5d529da57401d5c9525694f9dc23942b01fff10f794419dfacd3a309c3f9728674fe116a2434c2c80768b8f121b64a6e"' : 'data-bs-target="#xs-components-links-module-EuimAboutModule-e549eda796d29eb893d705b09af578fd5d529da57401d5c9525694f9dc23942b01fff10f794419dfacd3a309c3f9728674fe116a2434c2c80768b8f121b64a6e"' }>
63
72
  <span class="icon ion-md-cog"></span>
64
73
  <span>Components</span>
65
74
  <span class="icon ion-ios-arrow-down"></span>
66
75
  </div>
67
- <ul class="links collapse" ${ isNormalMode ? 'id="components-links-module-EuimAboutModule-644754ba65e7d7ebec8981d615c461cc9db6a1c0c6920175d9ae172d693fb2a8ec3f5ef1bd0f45089e7a4d4062161f331f909fa735686bef3914264738e80752"' :
68
- 'id="xs-components-links-module-EuimAboutModule-644754ba65e7d7ebec8981d615c461cc9db6a1c0c6920175d9ae172d693fb2a8ec3f5ef1bd0f45089e7a4d4062161f331f909fa735686bef3914264738e80752"' }>
76
+ <ul class="links collapse" ${ isNormalMode ? 'id="components-links-module-EuimAboutModule-e549eda796d29eb893d705b09af578fd5d529da57401d5c9525694f9dc23942b01fff10f794419dfacd3a309c3f9728674fe116a2434c2c80768b8f121b64a6e"' :
77
+ 'id="xs-components-links-module-EuimAboutModule-e549eda796d29eb893d705b09af578fd5d529da57401d5c9525694f9dc23942b01fff10f794419dfacd3a309c3f9728674fe116a2434c2c80768b8f121b64a6e"' }>
69
78
  <li class="link">
70
79
  <a href="components/EuimAboutComponent.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules" >EuimAboutComponent</a>
71
80
  </li>
@@ -185,9 +194,6 @@ customElements.define('compodoc-menu', class extends HTMLElement {
185
194
  <li class="link">
186
195
  <a href="components/EuimChipSelectorComponent.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules" >EuimChipSelectorComponent</a>
187
196
  </li>
188
- <li class="link">
189
- <a href="components/EuimHelperTextComponent.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules" >EuimHelperTextComponent</a>
190
- </li>
191
197
  <li class="link">
192
198
  <a href="components/EuimScrollerXComponent.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules" >EuimScrollerXComponent</a>
193
199
  </li>
@@ -214,6 +220,9 @@ customElements.define('compodoc-menu', class extends HTMLElement {
214
220
  <li class="link">
215
221
  <a href="directives/EuimAlignTopDirective.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules" >EuimAlignTopDirective</a>
216
222
  </li>
223
+ <li class="link">
224
+ <a href="directives/EuimFooterTransparentDirective.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules" >EuimFooterTransparentDirective</a>
225
+ </li>
217
226
  <li class="link">
218
227
  <a href="directives/EuimListItemNoPaddingsDirective.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules" >EuimListItemNoPaddingsDirective</a>
219
228
  </li>
@@ -1300,9 +1309,12 @@ customElements.define('compodoc-menu', class extends HTMLElement {
1300
1309
  </li>
1301
1310
  </ul>
1302
1311
  </li>
1312
+ <li class="chapter">
1313
+ <a data-type="chapter-link" href="routes.html"><span class="icon ion-ios-git-branch"></span>Routes</a>
1314
+ </li>
1303
1315
  </ul>
1304
1316
  </nav>
1305
1317
  `);
1306
1318
  this.innerHTML = tp.strings;
1307
1319
  }
1308
- });
1320
+ });
@@ -0,0 +1 @@
1
+ var ROUTES_INDEX = {"name":"<root>","kind":"module","children":[{"name":"EuimAboutModule","kind":"module","filename":"packages/core/src/lib/components/euim-about/euim-about.module.ts"}]}
package/docs/js/routes.js CHANGED
@@ -15,6 +15,65 @@ document.addEventListener('DOMContentLoaded', function () {
15
15
  return lazyModuleName;
16
16
  }
17
17
 
18
+ function foundLazyComponentWithPath(path) {
19
+ var split = path.split('#'),
20
+ lazyComponentName = split[1];
21
+ return lazyComponentName;
22
+ }
23
+
24
+ function safeHref(href) {
25
+ return String(href || '').replace(/"/g, '&quot;');
26
+ }
27
+
28
+ function resolveNodeHref(d) {
29
+ if (!d) {
30
+ return '';
31
+ }
32
+
33
+ if (d.href) {
34
+ return d.href;
35
+ }
36
+
37
+ if (d.component && d.component !== 'default') {
38
+ return './components/' + d.component + '.html';
39
+ }
40
+
41
+ if (d.module && d.module !== 'default') {
42
+ return './modules/' + d.module + '.html';
43
+ }
44
+
45
+ if (d.loadComponent) {
46
+ var lazyComponent = foundLazyComponentWithPath(d.loadComponent);
47
+ if (lazyComponent && lazyComponent !== 'default') {
48
+ return './components/' + lazyComponent + '.html';
49
+ }
50
+ }
51
+
52
+ if (d.loadChildren) {
53
+ var lazyModule = foundLazyModuleWithPath(d.loadChildren);
54
+ if (lazyModule && lazyModule !== 'default') {
55
+ return './modules/' + lazyModule + '.html';
56
+ }
57
+ }
58
+
59
+ return '';
60
+ }
61
+
62
+ function wrapLabelWithLink(label, href) {
63
+ if (!href) {
64
+ return label;
65
+ }
66
+ return '<a href="' + safeHref(href) + '" target="_top">' + label + '</a>';
67
+ }
68
+
69
+ function withLeadingSlash(routeValue) {
70
+ var value = String(routeValue || '');
71
+ if (value.length === 0) {
72
+ return '/';
73
+ }
74
+ return value.charAt(0) === '/' ? value : '/' + value;
75
+ }
76
+
18
77
  function getBB(selection) {
19
78
  selection.each(function (d) {
20
79
  d.bbox = this.getBBox();
@@ -26,16 +85,32 @@ document.addEventListener('DOMContentLoaded', function () {
26
85
  var tree = ROUTES_INDEX;
27
86
 
28
87
  function cleanStringChildren(obj) {
88
+ if (!obj || typeof obj !== 'object') {
89
+ return;
90
+ }
29
91
  for (var property in obj) {
30
- if (obj.hasOwnProperty(property)) {
31
- if (property === 'children' && typeof obj[property] === 'object') {
32
- for (var i = obj[property].length - 1; i >= 0; i--) {
33
- if (typeof obj[property][i] === 'string') {
34
- obj[property].splice(i, 1);
92
+ if (Object.prototype.hasOwnProperty.call(obj, property)) {
93
+ if (property === 'children') {
94
+ if (typeof obj[property] === 'string') {
95
+ obj[property] = [];
96
+ continue;
97
+ }
98
+
99
+ if (Array.isArray(obj[property])) {
100
+ for (var i = obj[property].length - 1; i >= 0; i--) {
101
+ if (
102
+ typeof obj[property][i] !== 'object' ||
103
+ obj[property][i] === null
104
+ ) {
105
+ obj[property].splice(i, 1);
106
+ }
35
107
  }
108
+ } else if (obj[property] && typeof obj[property] === 'object') {
109
+ obj[property] = [];
36
110
  }
37
111
  }
38
- if (typeof obj[property] === 'object') {
112
+
113
+ if (obj[property] && typeof obj[property] === 'object') {
39
114
  cleanStringChildren(obj[property]);
40
115
  }
41
116
  }
@@ -84,6 +159,17 @@ document.addEventListener('DOMContentLoaded', function () {
84
159
  dy: 0
85
160
  });
86
161
 
162
+ infos_group
163
+ .style('cursor', function (d) {
164
+ return resolveNodeHref(d) ? 'pointer' : null;
165
+ })
166
+ .on('click', function (d) {
167
+ var href = resolveNodeHref(d);
168
+ if (href) {
169
+ window.location.href = href;
170
+ }
171
+ });
172
+
87
173
  //Node icon
88
174
  infos_group
89
175
  .append('text')
@@ -118,49 +204,66 @@ document.addEventListener('DOMContentLoaded', function () {
118
204
  // if kind === module name + module
119
205
  // if kind === component component + path
120
206
  var _name = '';
207
+ var nodeHref = resolveNodeHref(d);
121
208
  if (d.kind === 'module') {
122
209
  if (d.module) {
123
210
  _name +=
124
- '<tspan x="0" dy="1.4em"><a href="./modules/' +
125
- d.module +
126
- '.html">' +
127
- d.module +
128
- '</a></tspan>';
211
+ '<tspan x="0" dy="1.4em">' +
212
+ wrapLabelWithLink(d.module, nodeHref || './modules/' + d.module + '.html') +
213
+ '</tspan>';
129
214
  if (d.name) {
130
215
  _name += '<tspan x="0" dy="1.4em">' + d.name + '</tspan>';
131
216
  }
132
217
  } else {
133
- _name += '<tspan x="0" dy="1.4em">' + htmlEntities(d.name) + '</tspan>';
218
+ _name +=
219
+ '<tspan x="0" dy="1.4em">' +
220
+ wrapLabelWithLink(htmlEntities(d.name), nodeHref) +
221
+ '</tspan>';
134
222
  }
135
223
  } else if (d.kind === 'component') {
136
- _name += '<tspan x="0" dy="1.4em">' + d.path + '</tspan>';
137
224
  _name +=
138
- '<tspan x="0" dy="1.4em"><a href="./components/' +
139
- d.component +
140
- '.html">' +
141
- d.component +
142
- '</a></tspan>';
225
+ '<tspan x="0" dy="1.4em">' +
226
+ wrapLabelWithLink(d.path || d.name, nodeHref) +
227
+ '</tspan>';
228
+ if (d.component) {
229
+ _name +=
230
+ '<tspan x="0" dy="1.4em">' +
231
+ wrapLabelWithLink(d.component, nodeHref) +
232
+ '</tspan>';
233
+ } else if (d.name && d.name.includes('Component')) {
234
+ _name += '<tspan x="0" dy="1.4em">' + wrapLabelWithLink(d.name, nodeHref) + '</tspan>';
235
+ }
143
236
  if (d.outlet) {
144
237
  _name += '<tspan x="0" dy="1.4em">&lt;outlet&gt; : ' + d.outlet + '</tspan>';
145
238
  }
146
239
  } else {
147
- _name += '<tspan x="0" dy="1.4em">/' + d.path + '</tspan>';
240
+ if (d.kind === 'route-redirect') {
241
+ var fromPath = d.path === '' ? "''" : withLeadingSlash(d.path || '');
242
+ var redirectTo = withLeadingSlash(d.redirectTo || d.name);
243
+ _name += '<tspan x="0" dy="1.4em">' + fromPath + ' &rarr; ' + redirectTo + '</tspan>';
244
+ if (d.pathMatch) {
245
+ _name += '<tspan x="0" dy="1.4em">pathMatch: ' + d.pathMatch + '</tspan>';
246
+ }
247
+ } else {
248
+ _name +=
249
+ '<tspan x="0" dy="1.4em">' +
250
+ wrapLabelWithLink(withLeadingSlash(d.path || d.name), nodeHref) +
251
+ '</tspan>';
252
+ }
148
253
  if (d.component) {
149
254
  _name +=
150
- '<tspan x="0" dy="1.4em"><a href="./components/' +
151
- d.component +
152
- '.html">' +
153
- d.component +
154
- '</a></tspan>';
255
+ '<tspan x="0" dy="1.4em">' +
256
+ wrapLabelWithLink(d.component, nodeHref) +
257
+ '</tspan>';
155
258
  }
156
259
  if (d.loadChildren) {
157
260
  var moduleName = foundLazyModuleWithPath(d.loadChildren);
158
- _name +=
159
- '<tspan x="0" dy="1.4em"><a href="./modules/' +
160
- moduleName +
161
- '.html">' +
162
- moduleName +
163
- '</a></tspan>';
261
+ if (moduleName && moduleName !== 'default') {
262
+ _name +=
263
+ '<tspan x="0" dy="1.4em">' +
264
+ wrapLabelWithLink(moduleName, './modules/' + moduleName + '.html') +
265
+ '</tspan>';
266
+ }
164
267
  }
165
268
  if (d.canActivate) {
166
269
  _name += '<tspan x="0" dy="1.4em">&#10003; canActivate</tspan>';
@@ -174,10 +277,10 @@ document.addEventListener('DOMContentLoaded', function () {
174
277
  if (d.canLoad) {
175
278
  _name += '<tspan x="0" dy="1.4em">&#8594; canLoad</tspan>';
176
279
  }
177
- if (d.redirectTo) {
280
+ if (d.kind !== 'route-redirect' && d.redirectTo) {
178
281
  _name += '<tspan x="0" dy="1.4em">&rarr; ' + d.redirectTo + '</tspan>';
179
282
  }
180
- if (d.pathMatch) {
283
+ if (d.kind !== 'route-redirect' && d.pathMatch) {
181
284
  _name += '<tspan x="0" dy="1.4em">&gt; ' + d.pathMatch + '</tspan>';
182
285
  }
183
286
  if (d.outlet) {
@@ -259,11 +362,16 @@ document.addEventListener('DOMContentLoaded', function () {
259
362
 
260
363
  var area_ave = area_sum / nodes.length;
261
364
  var scale = 80 / Math.sqrt(area_ave);
365
+ var depthHorizontalSpacing = 40;
262
366
 
263
367
  function svg_x(node_y) {
264
368
  return node_y - ymin;
265
369
  }
266
370
 
371
+ function projected_x(node) {
372
+ return svg_x(node.y) + (node.depth || 0) * depthHorizontalSpacing;
373
+ }
374
+
267
375
  function svg_y(node_x) {
268
376
  return (node_x - xmin) * scale;
269
377
  }
@@ -272,11 +380,11 @@ document.addEventListener('DOMContentLoaded', function () {
272
380
  var nodebox_vertical_margin = Math.min(y_size_min * scale, 3);
273
381
 
274
382
  node.attr('transform', function (d) {
275
- return 'translate(' + svg_x(d.y) + ',' + svg_y(d.x) + ')';
383
+ return 'translate(' + projected_x(d) + ',' + svg_y(d.x) + ')';
276
384
  });
277
385
 
278
386
  var diagonal = d3.svg.diagonal().projection(function (d) {
279
- return [svg_x(d.y), svg_y(d.x)];
387
+ return [projected_x(d), svg_y(d.x)];
280
388
  });
281
389
 
282
390
  var links = engine.links(nodes);
@@ -8,6 +8,8 @@
8
8
  $searchTitle,
9
9
  $searchResultsCount,
10
10
  $searchQuery,
11
+ $searchInputs,
12
+ $searchClearButtons,
11
13
  $mainContainer,
12
14
  $xsMenu;
13
15
 
@@ -160,12 +162,44 @@
160
162
  $searchInputs.forEach((item, index) => {
161
163
  item.value = '';
162
164
  });
165
+ syncSearchClearButtons();
166
+ });
167
+ }
168
+
169
+ function getSearchInputContainer(element) {
170
+ var current = element;
171
+ while (current && current !== document) {
172
+ if (current.id === 'book-search-input') {
173
+ return current;
174
+ }
175
+ current = current.parentNode;
176
+ }
177
+ return null;
178
+ }
179
+
180
+ function syncSearchClearButtons() {
181
+ if (!$searchInputs || !$searchClearButtons) {
182
+ return;
183
+ }
184
+
185
+ var hasValue = false;
186
+ $searchInputs.forEach((input) => {
187
+ if (input.value && input.value.length > 0) {
188
+ hasValue = true;
189
+ }
190
+ });
191
+
192
+ $searchClearButtons.forEach((button) => {
193
+ button.classList.toggle('is-visible', hasValue);
163
194
  });
164
195
  }
165
196
 
166
197
  function bindSearch() {
167
198
  // Bind DOM
168
199
  $searchInputs = document.querySelectorAll('#book-search-input input');
200
+ $searchClearButtons = document.querySelectorAll(
201
+ '#book-search-input [data-search-input-clear]'
202
+ );
169
203
 
170
204
  $searchResults = document.querySelector('.search-results');
171
205
  $searchList = $searchResults.querySelector('.search-results-list');
@@ -194,11 +228,13 @@
194
228
  // HTML5 (IE9 & others)
195
229
  item.addEventListener('input', function (e) {
196
230
  handleUpdate(this);
231
+ syncSearchClearButtons();
197
232
  });
198
233
  // Workaround for IE < 9
199
234
  item.addEventListener('propertychange', function (e) {
200
235
  if (e.originalEvent.propertyName == 'value') {
201
236
  handleUpdate(this);
237
+ syncSearchClearButtons();
202
238
  }
203
239
  });
204
240
  // Push to history on blur
@@ -212,6 +248,31 @@
212
248
  }
213
249
  });
214
250
  });
251
+
252
+ $searchClearButtons.forEach((button) => {
253
+ button.addEventListener('click', function (e) {
254
+ e.preventDefault();
255
+
256
+ var container = getSearchInputContainer(this);
257
+ var containerInput = container ? container.querySelector('input') : null;
258
+ var nextValue = '';
259
+
260
+ $searchInputs.forEach((input) => {
261
+ input.value = nextValue;
262
+ });
263
+
264
+ if (containerInput) {
265
+ handleUpdate(containerInput);
266
+ containerInput.focus();
267
+ } else if ($searchInputs.length > 0) {
268
+ handleUpdate($searchInputs[0]);
269
+ }
270
+
271
+ syncSearchClearButtons();
272
+ });
273
+ });
274
+
275
+ syncSearchClearButtons();
215
276
  }
216
277
 
217
278
  function launchSearchFromQueryString() {
@@ -221,6 +282,7 @@
221
282
  $searchInputs.forEach((item, index) => {
222
283
  item.value = q;
223
284
  });
285
+ syncSearchClearButtons();
224
286
  // Launch search
225
287
  launchSearch(q);
226
288
  }