@eui/core 23.0.0-alpha.2 → 23.0.0-alpha.4
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 +61 -0
- package/docs/architecture.html +223 -0
- package/docs/changelog.html +126 -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 +50 -17
- 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/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 +26 -2
- package/docs/injectables/ApiQueueService.html +97 -20
- package/docs/injectables/EuiAppShellService.html +147 -68
- 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 +89 -34
- 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 +101 -23
- 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 +91 -22
- package/docs/injectables/StoreServiceMock.html +72 -17
- package/docs/injectables/UserService.html +97 -23
- 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 +48 -17
- package/docs/interceptors/UxRequestErrorModelInterceptor.html +48 -17
- 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.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-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 +1669 -1641
- 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 +3 -3
- 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 +47 -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 +6691 -1067
- package/docs/license.html +26 -2
- package/docs/llms.txt +2282 -0
- package/docs/miscellaneous/enumerations.html +34 -10
- package/docs/miscellaneous/functions.html +550 -394
- package/docs/miscellaneous/typealiases.html +59 -27
- package/docs/miscellaneous/variables.html +196 -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 +27 -3
- 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 +26 -27
- package/fesm2022/eui-core.mjs.map +1 -1
- package/package.json +2 -2
- package/types/eui-core.d.ts +9 -11
- 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-122e1233e0226f3d4845fe147f00c71799dba241400e43adaa9e1d027893b9f37898c84a06ccf2f4066e84d56cb07c916b81b5f72e167551cac8fdc9dfe93a24"' : 'data-bs-target="#xs-directives-links-module-TranslateMockModule-122e1233e0226f3d4845fe147f00c71799dba241400e43adaa9e1d027893b9f37898c84a06ccf2f4066e84d56cb07c916b81b5f72e167551cac8fdc9dfe93a24"' }>
|
|
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-122e1233e0226f3d4845fe147f00c71799dba241400e43adaa9e1d027893b9f37898c84a06ccf2f4066e84d56cb07c916b81b5f72e167551cac8fdc9dfe93a24"' :
|
|
92
|
+
'id="xs-directives-links-module-TranslateMockModule-122e1233e0226f3d4845fe147f00c71799dba241400e43adaa9e1d027893b9f37898c84a06ccf2f4066e84d56cb07c916b81b5f72e167551cac8fdc9dfe93a24"' }>
|
|
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-122e1233e0226f3d4845fe147f00c71799dba241400e43adaa9e1d027893b9f37898c84a06ccf2f4066e84d56cb07c916b81b5f72e167551cac8fdc9dfe93a24"' : 'data-bs-target="#xs-pipes-links-module-TranslateMockModule-122e1233e0226f3d4845fe147f00c71799dba241400e43adaa9e1d027893b9f37898c84a06ccf2f4066e84d56cb07c916b81b5f72e167551cac8fdc9dfe93a24"' }>
|
|
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-122e1233e0226f3d4845fe147f00c71799dba241400e43adaa9e1d027893b9f37898c84a06ccf2f4066e84d56cb07c916b81b5f72e167551cac8fdc9dfe93a24"' :
|
|
106
|
+
'id="xs-pipes-links-module-TranslateMockModule-122e1233e0226f3d4845fe147f00c71799dba241400e43adaa9e1d027893b9f37898c84a06ccf2f4066e84d56cb07c916b81b5f72e167551cac8fdc9dfe93a24"' }>
|
|
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"' }>
|
|
@@ -327,10 +347,10 @@ customElements.define('compodoc-menu', class extends HTMLElement {
|
|
|
327
347
|
</div>
|
|
328
348
|
<ul class="links collapse " ${ isNormalMode ? ' id="interfaces-links"' : 'id="xs-interfaces-links"' }>
|
|
329
349
|
<li class="link">
|
|
330
|
-
<a href="interfaces/Action.html" data-type="entity-link" >Action
|
|
350
|
+
<a href="interfaces/Action.html" data-type="entity-link" >Action<Type extends string = string></a>
|
|
331
351
|
</li>
|
|
332
352
|
<li class="link">
|
|
333
|
-
<a href="interfaces/ActionReducer.html" data-type="entity-link" >ActionReducer
|
|
353
|
+
<a href="interfaces/ActionReducer.html" data-type="entity-link" >ActionReducer<T, V extends Action = Action></a>
|
|
334
354
|
</li>
|
|
335
355
|
<li class="link">
|
|
336
356
|
<a href="interfaces/body.html" data-type="entity-link" >body</a>
|
|
@@ -375,10 +395,10 @@ customElements.define('compodoc-menu', class extends HTMLElement {
|
|
|
375
395
|
<a href="interfaces/LoadedResourcesError.html" data-type="entity-link" >LoadedResourcesError</a>
|
|
376
396
|
</li>
|
|
377
397
|
<li class="link">
|
|
378
|
-
<a href="interfaces/MemoizedSelector.html" data-type="entity-link" >MemoizedSelector
|
|
398
|
+
<a href="interfaces/MemoizedSelector.html" data-type="entity-link" >MemoizedSelector<State, Result, ProjectorFn = DefaultProjectorFn<Result>></a>
|
|
379
399
|
</li>
|
|
380
400
|
<li class="link">
|
|
381
|
-
<a href="interfaces/MemoizedSelectorWithProps.html" data-type="entity-link" class="deprecated-name">MemoizedSelectorWithProps
|
|
401
|
+
<a href="interfaces/MemoizedSelectorWithProps.html" data-type="entity-link" class="deprecated-name">MemoizedSelectorWithProps<State, Props, Result, ProjectorFn = DefaultProjectorFn<Result>></a>
|
|
382
402
|
</li>
|
|
383
403
|
<li class="link">
|
|
384
404
|
<a href="interfaces/MigrateAllSchema.html" data-type="entity-link" >MigrateAllSchema</a>
|
|
@@ -477,10 +497,23 @@ customElements.define('compodoc-menu', class extends HTMLElement {
|
|
|
477
497
|
<a href="interfaces/TranslationKeys.html" data-type="entity-link" >TranslationKeys</a>
|
|
478
498
|
</li>
|
|
479
499
|
<li class="link">
|
|
480
|
-
<a href="interfaces/UIState.html" data-type="entity-link" >UIState
|
|
500
|
+
<a href="interfaces/UIState.html" data-type="entity-link" >UIState<BP = any, DI = any, AMD =any, BPV = any></a>
|
|
481
501
|
</li>
|
|
482
502
|
</ul>
|
|
483
503
|
</li>
|
|
504
|
+
<li class="chapter">
|
|
505
|
+
<div class="simple menu-toggler" data-bs-toggle="collapse" ${ isNormalMode ? 'data-bs-target="#pipes-links"' :
|
|
506
|
+
'data-bs-target="#xs-pipes-links"' }>
|
|
507
|
+
<span class="icon ion-md-funnel"></span>
|
|
508
|
+
<span>Pipes</span>
|
|
509
|
+
<span class="icon ion-ios-arrow-down"></span>
|
|
510
|
+
</div>
|
|
511
|
+
<ul class="links collapse " ${ isNormalMode ? 'id="pipes-links"' : 'id="xs-pipes-links"' }>
|
|
512
|
+
<li class="link">
|
|
513
|
+
<a href="pipes/TranslateMockPipe.html" data-type="entity-link" >TranslateMockPipe</a>
|
|
514
|
+
</li>
|
|
515
|
+
</ul>
|
|
516
|
+
</li>
|
|
484
517
|
<li class="chapter">
|
|
485
518
|
<div class="simple menu-toggler" data-bs-toggle="collapse" ${ isNormalMode ? 'data-bs-target="#miscellaneous-links"'
|
|
486
519
|
: 'data-bs-target="#xs-miscellaneous-links"' }>
|
|
@@ -511,4 +544,4 @@ customElements.define('compodoc-menu', class extends HTMLElement {
|
|
|
511
544
|
`);
|
|
512
545
|
this.innerHTML = tp.strings;
|
|
513
546
|
}
|
|
514
|
-
});
|
|
547
|
+
});
|
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
|
}
|