@eui/core 21.4.2-snapshot-1787737932680 → 22.0.0-alpha.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 +375 -0
- package/docs/architecture.html +223 -0
- package/docs/changelog.html +510 -2
- package/docs/classes/ActivatedRouteAction.html +70 -20
- package/docs/classes/AddApiQueueItemAction.html +70 -20
- package/docs/classes/AddAppLoadedConfigModulesAction.html +70 -20
- package/docs/classes/ApiQueueServiceMock.html +77 -20
- package/docs/classes/AsyncStorageService.html +86 -20
- package/docs/classes/AsyncStorageServiceMock.html +73 -17
- package/docs/classes/CssUtils.html +74 -20
- package/docs/classes/EmptyApiQueueAction.html +67 -17
- package/docs/classes/ErrorSubClass.html +68 -16
- package/docs/classes/EuiAppShellServiceMock.html +58 -20
- package/docs/classes/EuiCoreRootGuardClass.html +39 -8
- package/docs/classes/EuiError.html +69 -17
- package/docs/classes/I18nResourceImpl.html +49 -16
- package/docs/classes/InitStoreAction.html +70 -20
- package/docs/classes/LogServiceMock.html +67 -17
- package/docs/classes/RemoveApiQueueItemAction.html +67 -17
- package/docs/classes/StorageService.html +83 -19
- package/docs/classes/StorageServiceMock.html +70 -17
- package/docs/classes/TranslateLoaderMock.html +354 -0
- package/docs/classes/TranslateServiceMock.html +90 -35
- package/docs/classes/UpdateAppConnectionAction.html +67 -17
- package/docs/classes/UpdateAppStatusAction.html +67 -17
- package/docs/classes/UpdateAppVersionAction.html +67 -17
- package/docs/classes/UpdateCurrentModuleAction.html +67 -17
- package/docs/classes/UpdateI18nStateAction.html +67 -17
- package/docs/classes/UpdateLocaleStateAction.html +67 -17
- package/docs/classes/UpdateNotificationsListAction.html +67 -17
- package/docs/classes/UpdateUserDashboardAction.html +67 -17
- package/docs/classes/UpdateUserDetailsAction.html +67 -17
- package/docs/classes/UpdateUserPreferencesAction.html +67 -17
- package/docs/classes/UpdateUserRightsAction.html +67 -17
- package/docs/classes/UpdateUserStateAction.html +67 -17
- package/docs/dependencies.html +38 -4
- package/docs/directives/TranslateMockDirective.html +72 -19
- package/docs/index.html +27 -3
- package/docs/injectables/ApiQueueService.html +97 -20
- package/docs/injectables/EuiAppShellService.html +149 -70
- package/docs/injectables/EuiDynamicComponentService.html +51 -18
- package/docs/injectables/EuiDynamicMenuService.html +67 -20
- package/docs/injectables/EuiGrowlService.html +85 -21
- package/docs/injectables/EuiLoaderService.html +65 -17
- package/docs/injectables/EuiPermissionService.html +95 -20
- package/docs/injectables/EuiThemeService.html +88 -33
- package/docs/injectables/EuiTimezoneService.html +51 -16
- package/docs/injectables/GlobalErrorHandler.html +79 -17
- package/docs/injectables/I18nLoader.html +53 -17
- package/docs/injectables/I18nService.html +100 -22
- package/docs/injectables/I18nServiceMock.html +96 -34
- package/docs/injectables/LocalForageService.html +81 -21
- package/docs/injectables/LocalStorageService.html +78 -21
- package/docs/injectables/LocaleService.html +124 -41
- package/docs/injectables/LocaleServiceMock.html +72 -18
- package/docs/injectables/LogService.html +68 -17
- package/docs/injectables/SessionStorageService.html +78 -21
- package/docs/injectables/StoreService.html +88 -19
- package/docs/injectables/StoreServiceMock.html +72 -17
- package/docs/injectables/UserService.html +96 -22
- package/docs/injectables/UserServiceMock.html +81 -23
- package/docs/interceptors/AddLangParamInterceptor.html +49 -18
- package/docs/interceptors/CachePreventionInterceptor.html +48 -17
- package/docs/interceptors/CorsSecurityInterceptor.html +48 -17
- package/docs/interceptors/CsrfPreventionInterceptor.html +48 -17
- package/docs/interceptors/EuLoginSessionTimeoutHandlingInterceptor.html +48 -17
- package/docs/interceptors/HttpErrorHandlerInterceptor.html +47 -16
- package/docs/interceptors/UxRequestErrorModelInterceptor.html +47 -16
- package/docs/interfaces/Action.html +158 -60
- package/docs/interfaces/ActionReducer.html +84 -55
- package/docs/interfaces/ComponentInfo.html +151 -123
- package/docs/interfaces/Dependency.html +278 -250
- package/docs/interfaces/Edit-1.html +151 -123
- package/docs/interfaces/Edit-2.html +151 -123
- package/docs/interfaces/Edit-3.html +395 -0
- package/docs/interfaces/Edit.html +151 -123
- package/docs/interfaces/EuiComponentEntry.html +230 -202
- package/docs/interfaces/EuiTimeZone.html +121 -93
- package/docs/interfaces/IEuiTheme.html +181 -153
- package/docs/interfaces/ImportToAdd.html +164 -136
- package/docs/interfaces/ImportsArrayInfo.html +121 -93
- package/docs/interfaces/Library.html +169 -137
- package/docs/interfaces/LoadedResources.html +164 -136
- package/docs/interfaces/LoadedResourcesError.html +121 -93
- package/docs/interfaces/MemoizedSelector.html +187 -138
- package/docs/interfaces/MemoizedSelectorWithProps.html +188 -139
- package/docs/interfaces/MigrateAllSchema.html +228 -200
- package/docs/interfaces/MigrationResult.html +151 -123
- package/docs/interfaces/ModuleLoadEvent.html +164 -136
- package/docs/interfaces/ModuleMapping.html +121 -93
- package/docs/interfaces/NgModuleInfo.html +151 -123
- package/docs/interfaces/Policy.html +164 -136
- package/docs/interfaces/ResourceError.html +170 -142
- package/docs/interfaces/Schema-1.html +140 -112
- package/docs/interfaces/Schema-10.html +140 -112
- package/docs/interfaces/Schema-11.html +140 -112
- package/docs/interfaces/Schema-12.html +140 -112
- package/docs/interfaces/Schema-13.html +140 -112
- package/docs/interfaces/Schema-14.html +140 -112
- package/docs/interfaces/Schema-15.html +140 -112
- package/docs/interfaces/Schema-16.html +140 -112
- package/docs/interfaces/Schema-17.html +140 -112
- package/docs/interfaces/Schema-18.html +140 -112
- package/docs/interfaces/Schema-19.html +140 -112
- package/docs/interfaces/Schema-2.html +141 -113
- package/docs/interfaces/Schema-20.html +140 -112
- package/docs/interfaces/Schema-21.html +368 -0
- package/docs/interfaces/Schema-3.html +180 -152
- package/docs/interfaces/Schema-4.html +140 -112
- package/docs/interfaces/Schema-5.html +140 -112
- package/docs/interfaces/Schema-6.html +140 -112
- package/docs/interfaces/Schema-7.html +140 -112
- package/docs/interfaces/Schema-8.html +140 -112
- package/docs/interfaces/Schema-9.html +140 -112
- package/docs/interfaces/Schema.html +184 -156
- package/docs/interfaces/SelectorEntry.html +230 -202
- package/docs/interfaces/TextChange.html +151 -123
- package/docs/interfaces/ThemeState.html +121 -93
- package/docs/interfaces/TranslationKeys.html +41 -11
- package/docs/interfaces/UIState.html +1757 -1684
- package/docs/interfaces/body.html +181 -153
- package/docs/js/architecture-graph.js +288 -0
- package/docs/js/libs/bootstrap-native.js +4 -2
- package/docs/js/libs/tablesort.min.js +2 -2
- package/docs/js/libs/tablesort.number.min.js +2 -2
- package/docs/js/libs/vis-network.min.js +7 -7
- package/docs/js/menu-wc.js +56 -14
- package/docs/js/routes.js +138 -37
- package/docs/js/search/search.js +62 -0
- package/docs/js/search/search_index.js +2 -2
- package/docs/js/tabs.js +98 -15
- package/docs/js/tree.js +44 -7
- package/docs/json/EuiPermissionService.md +1 -0
- package/docs/json/LocaleService.md +1 -0
- package/docs/json/documentation.json +6494 -1009
- package/docs/license.html +26 -2
- package/docs/llms.txt +2326 -0
- package/docs/miscellaneous/enumerations.html +34 -10
- package/docs/miscellaneous/functions.html +1189 -517
- package/docs/miscellaneous/typealiases.html +59 -27
- package/docs/miscellaneous/variables.html +257 -175
- package/docs/modules/CoreModule.html +34 -9
- package/docs/modules/I18nModule.html +34 -9
- package/docs/modules/LogModule.html +34 -9
- package/docs/modules/TranslateMockModule.html +60 -13
- package/docs/modules.html +26 -2
- package/docs/overview.html +29 -5
- package/docs/pipes/TranslateMockPipe.html +87 -9
- package/docs/properties.html +27 -3
- package/docs/routes.html +26 -2
- package/docs/styles/compodoc.css +365 -44
- package/docs/styles/dark.css +16 -0
- package/docs/template-playground/hbs-render.service.ts +6 -1
- package/fesm2022/eui-core.mjs +144 -135
- package/fesm2022/eui-core.mjs.map +1 -1
- package/package.json +11 -11
- package/schematics/collection.json +5 -0
- package/schematics/migrate/index.js +2 -1
- package/schematics/migrate/index.js.map +1 -1
- package/schematics/migrate/replacements/eui-modules.js +6 -2
- package/schematics/migrate/replacements/eui-modules.js.map +1 -1
- package/schematics/migrate-all/index.js +1 -0
- package/schematics/migrate-all/index.js.map +1 -1
- package/schematics/migrate-eui-tooltip/index.d.ts +7 -0
- package/schematics/migrate-eui-tooltip/index.js +263 -0
- package/schematics/migrate-eui-tooltip/index.js.map +1 -0
- package/types/eui-core.d.ts +15 -13
- package/types/eui-core.d.ts.map +1 -1
- package/docs/js/menu-wc_es5.js +0 -40
package/docs/js/menu-wc.js
CHANGED
|
@@ -19,7 +19,14 @@ 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"
|
|
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>×</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">
|
|
@@ -76,13 +83,13 @@ customElements.define('compodoc-menu', class extends HTMLElement {
|
|
|
76
83
|
<a href="modules/TranslateMockModule.html" data-type="entity-link" >TranslateMockModule</a>
|
|
77
84
|
<li class="chapter inner">
|
|
78
85
|
<div class="simple menu-toggler" data-bs-toggle="collapse" ${ isNormalMode ?
|
|
79
|
-
'data-bs-target="#directives-links-module-TranslateMockModule-
|
|
86
|
+
'data-bs-target="#directives-links-module-TranslateMockModule-a6db37044983724bfab8f8eb6fbaf6bb1f4b1de1651ef5303a344a4b606cbe68e1bf0bdbe45bd473e1c77e446058e133e85517ed7e8fda4b4be59a70ef96bd06"' : 'data-bs-target="#xs-directives-links-module-TranslateMockModule-a6db37044983724bfab8f8eb6fbaf6bb1f4b1de1651ef5303a344a4b606cbe68e1bf0bdbe45bd473e1c77e446058e133e85517ed7e8fda4b4be59a70ef96bd06"' }>
|
|
80
87
|
<span class="icon ion-md-code-working"></span>
|
|
81
88
|
<span>Directives</span>
|
|
82
89
|
<span class="icon ion-ios-arrow-down"></span>
|
|
83
90
|
</div>
|
|
84
|
-
<ul class="links collapse" ${ isNormalMode ? 'id="directives-links-module-TranslateMockModule-
|
|
85
|
-
'id="xs-directives-links-module-TranslateMockModule-
|
|
91
|
+
<ul class="links collapse" ${ isNormalMode ? 'id="directives-links-module-TranslateMockModule-a6db37044983724bfab8f8eb6fbaf6bb1f4b1de1651ef5303a344a4b606cbe68e1bf0bdbe45bd473e1c77e446058e133e85517ed7e8fda4b4be59a70ef96bd06"' :
|
|
92
|
+
'id="xs-directives-links-module-TranslateMockModule-a6db37044983724bfab8f8eb6fbaf6bb1f4b1de1651ef5303a344a4b606cbe68e1bf0bdbe45bd473e1c77e446058e133e85517ed7e8fda4b4be59a70ef96bd06"' }>
|
|
86
93
|
<li class="link">
|
|
87
94
|
<a href="directives/TranslateMockDirective.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules" >TranslateMockDirective</a>
|
|
88
95
|
</li>
|
|
@@ -90,13 +97,13 @@ customElements.define('compodoc-menu', class extends HTMLElement {
|
|
|
90
97
|
</li>
|
|
91
98
|
<li class="chapter inner">
|
|
92
99
|
<div class="simple menu-toggler" data-bs-toggle="collapse" ${ isNormalMode ?
|
|
93
|
-
'data-bs-target="#pipes-links-module-TranslateMockModule-
|
|
94
|
-
<span class="icon ion-md-
|
|
100
|
+
'data-bs-target="#pipes-links-module-TranslateMockModule-a6db37044983724bfab8f8eb6fbaf6bb1f4b1de1651ef5303a344a4b606cbe68e1bf0bdbe45bd473e1c77e446058e133e85517ed7e8fda4b4be59a70ef96bd06"' : 'data-bs-target="#xs-pipes-links-module-TranslateMockModule-a6db37044983724bfab8f8eb6fbaf6bb1f4b1de1651ef5303a344a4b606cbe68e1bf0bdbe45bd473e1c77e446058e133e85517ed7e8fda4b4be59a70ef96bd06"' }>
|
|
101
|
+
<span class="icon ion-md-funnel"></span>
|
|
95
102
|
<span>Pipes</span>
|
|
96
103
|
<span class="icon ion-ios-arrow-down"></span>
|
|
97
104
|
</div>
|
|
98
|
-
<ul class="links collapse" ${ isNormalMode ? 'id="pipes-links-module-TranslateMockModule-
|
|
99
|
-
'id="xs-pipes-links-module-TranslateMockModule-
|
|
105
|
+
<ul class="links collapse" ${ isNormalMode ? 'id="pipes-links-module-TranslateMockModule-a6db37044983724bfab8f8eb6fbaf6bb1f4b1de1651ef5303a344a4b606cbe68e1bf0bdbe45bd473e1c77e446058e133e85517ed7e8fda4b4be59a70ef96bd06"' :
|
|
106
|
+
'id="xs-pipes-links-module-TranslateMockModule-a6db37044983724bfab8f8eb6fbaf6bb1f4b1de1651ef5303a344a4b606cbe68e1bf0bdbe45bd473e1c77e446058e133e85517ed7e8fda4b4be59a70ef96bd06"' }>
|
|
100
107
|
<li class="link">
|
|
101
108
|
<a href="pipes/TranslateMockPipe.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules" >TranslateMockPipe</a>
|
|
102
109
|
</li>
|
|
@@ -105,6 +112,19 @@ customElements.define('compodoc-menu', class extends HTMLElement {
|
|
|
105
112
|
</li>
|
|
106
113
|
</ul>
|
|
107
114
|
</li>
|
|
115
|
+
<li class="chapter">
|
|
116
|
+
<div class="simple menu-toggler" data-bs-toggle="collapse" ${ isNormalMode ? 'data-bs-target="#directives-links"' :
|
|
117
|
+
'data-bs-target="#xs-directives-links"' }>
|
|
118
|
+
<span class="icon ion-md-code-working"></span>
|
|
119
|
+
<span>Directives</span>
|
|
120
|
+
<span class="icon ion-ios-arrow-down"></span>
|
|
121
|
+
</div>
|
|
122
|
+
<ul class="links collapse " ${ isNormalMode ? 'id="directives-links"' : 'id="xs-directives-links"' }>
|
|
123
|
+
<li class="link">
|
|
124
|
+
<a href="directives/TranslateMockDirective.html" data-type="entity-link" >TranslateMockDirective</a>
|
|
125
|
+
</li>
|
|
126
|
+
</ul>
|
|
127
|
+
</li>
|
|
108
128
|
<li class="chapter">
|
|
109
129
|
<div class="simple menu-toggler" data-bs-toggle="collapse" ${ isNormalMode ? 'data-bs-target="#classes-links"' :
|
|
110
130
|
'data-bs-target="#xs-classes-links"' }>
|
|
@@ -167,6 +187,9 @@ customElements.define('compodoc-menu', class extends HTMLElement {
|
|
|
167
187
|
<li class="link">
|
|
168
188
|
<a href="classes/StorageServiceMock.html" data-type="entity-link" >StorageServiceMock</a>
|
|
169
189
|
</li>
|
|
190
|
+
<li class="link">
|
|
191
|
+
<a href="classes/TranslateLoaderMock.html" data-type="entity-link" >TranslateLoaderMock</a>
|
|
192
|
+
</li>
|
|
170
193
|
<li class="link">
|
|
171
194
|
<a href="classes/TranslateServiceMock.html" data-type="entity-link" >TranslateServiceMock</a>
|
|
172
195
|
</li>
|
|
@@ -327,10 +350,10 @@ customElements.define('compodoc-menu', class extends HTMLElement {
|
|
|
327
350
|
</div>
|
|
328
351
|
<ul class="links collapse " ${ isNormalMode ? ' id="interfaces-links"' : 'id="xs-interfaces-links"' }>
|
|
329
352
|
<li class="link">
|
|
330
|
-
<a href="interfaces/Action.html" data-type="entity-link" >Action
|
|
353
|
+
<a href="interfaces/Action.html" data-type="entity-link" >Action<Type extends string = string></a>
|
|
331
354
|
</li>
|
|
332
355
|
<li class="link">
|
|
333
|
-
<a href="interfaces/ActionReducer.html" data-type="entity-link" >ActionReducer
|
|
356
|
+
<a href="interfaces/ActionReducer.html" data-type="entity-link" >ActionReducer<T, V extends Action = Action></a>
|
|
334
357
|
</li>
|
|
335
358
|
<li class="link">
|
|
336
359
|
<a href="interfaces/body.html" data-type="entity-link" >body</a>
|
|
@@ -350,6 +373,9 @@ customElements.define('compodoc-menu', class extends HTMLElement {
|
|
|
350
373
|
<li class="link">
|
|
351
374
|
<a href="interfaces/Edit-2.html" data-type="entity-link" >Edit</a>
|
|
352
375
|
</li>
|
|
376
|
+
<li class="link">
|
|
377
|
+
<a href="interfaces/Edit-3.html" data-type="entity-link" >Edit</a>
|
|
378
|
+
</li>
|
|
353
379
|
<li class="link">
|
|
354
380
|
<a href="interfaces/EuiComponentEntry.html" data-type="entity-link" >EuiComponentEntry</a>
|
|
355
381
|
</li>
|
|
@@ -375,10 +401,10 @@ customElements.define('compodoc-menu', class extends HTMLElement {
|
|
|
375
401
|
<a href="interfaces/LoadedResourcesError.html" data-type="entity-link" >LoadedResourcesError</a>
|
|
376
402
|
</li>
|
|
377
403
|
<li class="link">
|
|
378
|
-
<a href="interfaces/MemoizedSelector.html" data-type="entity-link" >MemoizedSelector
|
|
404
|
+
<a href="interfaces/MemoizedSelector.html" data-type="entity-link" >MemoizedSelector<State, Result, ProjectorFn = DefaultProjectorFn<Result>></a>
|
|
379
405
|
</li>
|
|
380
406
|
<li class="link">
|
|
381
|
-
<a href="interfaces/MemoizedSelectorWithProps.html" data-type="entity-link" class="deprecated-name">MemoizedSelectorWithProps
|
|
407
|
+
<a href="interfaces/MemoizedSelectorWithProps.html" data-type="entity-link" class="deprecated-name">MemoizedSelectorWithProps<State, Props, Result, ProjectorFn = DefaultProjectorFn<Result>></a>
|
|
382
408
|
</li>
|
|
383
409
|
<li class="link">
|
|
384
410
|
<a href="interfaces/MigrateAllSchema.html" data-type="entity-link" >MigrateAllSchema</a>
|
|
@@ -464,6 +490,9 @@ customElements.define('compodoc-menu', class extends HTMLElement {
|
|
|
464
490
|
<li class="link">
|
|
465
491
|
<a href="interfaces/Schema-20.html" data-type="entity-link" >Schema</a>
|
|
466
492
|
</li>
|
|
493
|
+
<li class="link">
|
|
494
|
+
<a href="interfaces/Schema-21.html" data-type="entity-link" >Schema</a>
|
|
495
|
+
</li>
|
|
467
496
|
<li class="link">
|
|
468
497
|
<a href="interfaces/SelectorEntry.html" data-type="entity-link" >SelectorEntry</a>
|
|
469
498
|
</li>
|
|
@@ -477,10 +506,23 @@ customElements.define('compodoc-menu', class extends HTMLElement {
|
|
|
477
506
|
<a href="interfaces/TranslationKeys.html" data-type="entity-link" >TranslationKeys</a>
|
|
478
507
|
</li>
|
|
479
508
|
<li class="link">
|
|
480
|
-
<a href="interfaces/UIState.html" data-type="entity-link" >UIState
|
|
509
|
+
<a href="interfaces/UIState.html" data-type="entity-link" >UIState<BP = any, DI = any, AMD =any, BPV = any></a>
|
|
481
510
|
</li>
|
|
482
511
|
</ul>
|
|
483
512
|
</li>
|
|
513
|
+
<li class="chapter">
|
|
514
|
+
<div class="simple menu-toggler" data-bs-toggle="collapse" ${ isNormalMode ? 'data-bs-target="#pipes-links"' :
|
|
515
|
+
'data-bs-target="#xs-pipes-links"' }>
|
|
516
|
+
<span class="icon ion-md-funnel"></span>
|
|
517
|
+
<span>Pipes</span>
|
|
518
|
+
<span class="icon ion-ios-arrow-down"></span>
|
|
519
|
+
</div>
|
|
520
|
+
<ul class="links collapse " ${ isNormalMode ? 'id="pipes-links"' : 'id="xs-pipes-links"' }>
|
|
521
|
+
<li class="link">
|
|
522
|
+
<a href="pipes/TranslateMockPipe.html" data-type="entity-link" >TranslateMockPipe</a>
|
|
523
|
+
</li>
|
|
524
|
+
</ul>
|
|
525
|
+
</li>
|
|
484
526
|
<li class="chapter">
|
|
485
527
|
<div class="simple menu-toggler" data-bs-toggle="collapse" ${ isNormalMode ? 'data-bs-target="#miscellaneous-links"'
|
|
486
528
|
: 'data-bs-target="#xs-miscellaneous-links"' }>
|
|
@@ -511,4 +553,4 @@ customElements.define('compodoc-menu', class extends HTMLElement {
|
|
|
511
553
|
`);
|
|
512
554
|
this.innerHTML = tp.strings;
|
|
513
555
|
}
|
|
514
|
-
});
|
|
556
|
+
});
|
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, '"');
|
|
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 (
|
|
31
|
-
if (property === 'children'
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
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,56 +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"
|
|
125
|
-
d.module +
|
|
126
|
-
'
|
|
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 +=
|
|
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 +=
|
|
224
|
+
_name +=
|
|
225
|
+
'<tspan x="0" dy="1.4em">' +
|
|
226
|
+
wrapLabelWithLink(d.path || d.name, nodeHref) +
|
|
227
|
+
'</tspan>';
|
|
137
228
|
if (d.component) {
|
|
138
|
-
_name +=
|
|
139
|
-
'<tspan x="0" dy="1.4em"><a href="./components/' +
|
|
140
|
-
d.component +
|
|
141
|
-
'.html">' +
|
|
142
|
-
d.component +
|
|
143
|
-
'</a></tspan>';
|
|
144
|
-
} else if (d.name && d.name.includes('Component')) {
|
|
145
229
|
_name +=
|
|
146
230
|
'<tspan x="0" dy="1.4em">' +
|
|
147
|
-
d.
|
|
231
|
+
wrapLabelWithLink(d.component, nodeHref) +
|
|
148
232
|
'</tspan>';
|
|
233
|
+
} else if (d.name && d.name.includes('Component')) {
|
|
234
|
+
_name += '<tspan x="0" dy="1.4em">' + wrapLabelWithLink(d.name, nodeHref) + '</tspan>';
|
|
149
235
|
}
|
|
150
236
|
if (d.outlet) {
|
|
151
237
|
_name += '<tspan x="0" dy="1.4em"><outlet> : ' + d.outlet + '</tspan>';
|
|
152
238
|
}
|
|
153
239
|
} else {
|
|
154
|
-
|
|
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 + ' → ' + 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
|
+
}
|
|
155
253
|
if (d.component) {
|
|
156
254
|
_name +=
|
|
157
|
-
'<tspan x="0" dy="1.4em"
|
|
158
|
-
d.component +
|
|
159
|
-
'
|
|
160
|
-
d.component +
|
|
161
|
-
'</a></tspan>';
|
|
255
|
+
'<tspan x="0" dy="1.4em">' +
|
|
256
|
+
wrapLabelWithLink(d.component, nodeHref) +
|
|
257
|
+
'</tspan>';
|
|
162
258
|
}
|
|
163
259
|
if (d.loadChildren) {
|
|
164
260
|
var moduleName = foundLazyModuleWithPath(d.loadChildren);
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
261
|
+
if (moduleName && moduleName !== 'default') {
|
|
262
|
+
_name +=
|
|
263
|
+
'<tspan x="0" dy="1.4em">' +
|
|
264
|
+
wrapLabelWithLink(moduleName, './modules/' + moduleName + '.html') +
|
|
265
|
+
'</tspan>';
|
|
266
|
+
}
|
|
171
267
|
}
|
|
172
268
|
if (d.canActivate) {
|
|
173
269
|
_name += '<tspan x="0" dy="1.4em">✓ canActivate</tspan>';
|
|
@@ -181,10 +277,10 @@ document.addEventListener('DOMContentLoaded', function () {
|
|
|
181
277
|
if (d.canLoad) {
|
|
182
278
|
_name += '<tspan x="0" dy="1.4em">→ canLoad</tspan>';
|
|
183
279
|
}
|
|
184
|
-
if (d.redirectTo) {
|
|
280
|
+
if (d.kind !== 'route-redirect' && d.redirectTo) {
|
|
185
281
|
_name += '<tspan x="0" dy="1.4em">→ ' + d.redirectTo + '</tspan>';
|
|
186
282
|
}
|
|
187
|
-
if (d.pathMatch) {
|
|
283
|
+
if (d.kind !== 'route-redirect' && d.pathMatch) {
|
|
188
284
|
_name += '<tspan x="0" dy="1.4em">> ' + d.pathMatch + '</tspan>';
|
|
189
285
|
}
|
|
190
286
|
if (d.outlet) {
|
|
@@ -266,11 +362,16 @@ document.addEventListener('DOMContentLoaded', function () {
|
|
|
266
362
|
|
|
267
363
|
var area_ave = area_sum / nodes.length;
|
|
268
364
|
var scale = 80 / Math.sqrt(area_ave);
|
|
365
|
+
var depthHorizontalSpacing = 40;
|
|
269
366
|
|
|
270
367
|
function svg_x(node_y) {
|
|
271
368
|
return node_y - ymin;
|
|
272
369
|
}
|
|
273
370
|
|
|
371
|
+
function projected_x(node) {
|
|
372
|
+
return svg_x(node.y) + (node.depth || 0) * depthHorizontalSpacing;
|
|
373
|
+
}
|
|
374
|
+
|
|
274
375
|
function svg_y(node_x) {
|
|
275
376
|
return (node_x - xmin) * scale;
|
|
276
377
|
}
|
|
@@ -279,11 +380,11 @@ document.addEventListener('DOMContentLoaded', function () {
|
|
|
279
380
|
var nodebox_vertical_margin = Math.min(y_size_min * scale, 3);
|
|
280
381
|
|
|
281
382
|
node.attr('transform', function (d) {
|
|
282
|
-
return 'translate(' +
|
|
383
|
+
return 'translate(' + projected_x(d) + ',' + svg_y(d.x) + ')';
|
|
283
384
|
});
|
|
284
385
|
|
|
285
386
|
var diagonal = d3.svg.diagonal().projection(function (d) {
|
|
286
|
-
return [
|
|
387
|
+
return [projected_x(d), svg_y(d.x)];
|
|
287
388
|
});
|
|
288
389
|
|
|
289
390
|
var links = engine.links(nodes);
|
package/docs/js/search/search.js
CHANGED
|
@@ -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
|
}
|