@eui/core 21.0.0-alpha.9 → 21.0.0-next.10
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 +799 -5265
- package/docs/changelog.html +947 -7522
- package/docs/classes/ActivatedRouteAction.html +18 -0
- package/docs/classes/AddApiQueueItemAction.html +18 -0
- package/docs/classes/AddAppLoadedConfigModulesAction.html +18 -0
- package/docs/classes/ApiQueueServiceMock.html +18 -0
- package/docs/classes/AsyncStorageService.html +18 -0
- package/docs/classes/AsyncStorageServiceMock.html +18 -0
- package/docs/classes/CssUtils.html +45 -0
- package/docs/classes/EmptyApiQueueAction.html +18 -0
- package/docs/classes/ErrorSubClass.html +18 -0
- package/docs/classes/EuiCoreRootGuardClass.html +18 -0
- package/docs/classes/EuiError.html +18 -0
- package/docs/classes/I18nResourceImpl.html +18 -0
- package/docs/classes/InitStoreAction.html +18 -0
- package/docs/classes/LogServiceMock.html +18 -0
- package/docs/classes/RemoveApiQueueItemAction.html +18 -0
- package/docs/classes/StorageService.html +18 -0
- package/docs/classes/StorageServiceMock.html +18 -0
- package/docs/classes/TranslateServiceMock.html +18 -0
- package/docs/classes/UpdateAppConnectionAction.html +18 -0
- package/docs/classes/UpdateAppStatusAction.html +18 -0
- package/docs/classes/UpdateAppVersionAction.html +18 -0
- package/docs/classes/UpdateCurrentModuleAction.html +18 -0
- package/docs/classes/UpdateI18nStateAction.html +18 -0
- package/docs/classes/UpdateLocaleStateAction.html +18 -0
- package/docs/classes/UpdateNotificationsListAction.html +18 -0
- package/docs/classes/UpdateUserDashboardAction.html +18 -0
- package/docs/classes/UpdateUserDetailsAction.html +18 -0
- package/docs/classes/UpdateUserPreferencesAction.html +18 -0
- package/docs/classes/UpdateUserRightsAction.html +18 -0
- package/docs/classes/UpdateUserStateAction.html +18 -0
- package/docs/dependencies.html +18 -0
- package/docs/directives/TranslateMockDirective.html +18 -0
- package/docs/index.html +20 -2
- package/docs/injectables/ApiQueueService.html +18 -0
- package/docs/injectables/EuiAppShellService.html +55 -0
- package/docs/injectables/EuiDynamicComponentService.html +18 -0
- package/docs/injectables/EuiDynamicMenuService.html +18 -0
- package/docs/injectables/EuiGrowlService.html +18 -0
- package/docs/injectables/EuiLoaderService.html +18 -0
- package/docs/injectables/EuiPermissionService.html +18 -0
- package/docs/injectables/EuiThemeService.html +18 -0
- package/docs/injectables/EuiTimezoneService.html +18 -0
- package/docs/injectables/GlobalErrorHandler.html +18 -0
- package/docs/injectables/I18nLoader.html +18 -0
- package/docs/injectables/I18nService.html +18 -0
- package/docs/injectables/I18nServiceMock.html +18 -0
- package/docs/injectables/LocalForageService.html +18 -0
- package/docs/injectables/LocalStorageService.html +18 -0
- package/docs/injectables/LocaleService.html +18 -0
- package/docs/injectables/LocaleServiceMock.html +18 -0
- package/docs/injectables/LogService.html +18 -0
- package/docs/injectables/SessionStorageService.html +18 -0
- package/docs/injectables/StoreService.html +18 -0
- package/docs/injectables/StoreServiceMock.html +18 -0
- package/docs/injectables/UserService.html +18 -0
- package/docs/injectables/UserServiceMock.html +18 -0
- package/docs/interceptors/AddLangParamInterceptor.html +18 -0
- package/docs/interceptors/CachePreventionInterceptor.html +18 -0
- package/docs/interceptors/CorsSecurityInterceptor.html +18 -0
- package/docs/interceptors/CsrfPreventionInterceptor.html +18 -0
- package/docs/interceptors/EuLoginSessionTimeoutHandlingInterceptor.html +18 -0
- package/docs/interceptors/HttpErrorHandlerInterceptor.html +18 -0
- package/docs/interceptors/UxRequestErrorModelInterceptor.html +18 -0
- package/docs/interfaces/Action.html +18 -0
- package/docs/interfaces/ActionReducer.html +18 -0
- package/docs/interfaces/Dependency.html +18 -0
- package/docs/interfaces/EuiTimeZone.html +18 -0
- package/docs/interfaces/IEuiTheme.html +18 -0
- package/docs/interfaces/Library.html +18 -0
- package/docs/interfaces/LoadedResources.html +18 -0
- package/docs/interfaces/LoadedResourcesError.html +18 -0
- package/docs/interfaces/MemoizedSelector.html +18 -0
- package/docs/interfaces/MemoizedSelectorWithProps.html +18 -0
- package/docs/interfaces/ModuleLoadEvent.html +18 -0
- package/docs/interfaces/Policy.html +18 -0
- package/docs/interfaces/ResourceError.html +18 -0
- package/docs/interfaces/ThemeState.html +18 -0
- package/docs/interfaces/TranslationKeys.html +18 -0
- package/docs/interfaces/UIState.html +108 -0
- package/docs/interfaces/body.html +18 -0
- package/docs/js/libs/bootstrap-native.js +1 -1
- package/docs/js/libs/jszip.min.js +13 -0
- package/docs/js/libs/svg-pan-zoom.min.js +3 -3
- package/docs/js/libs/tablesort.min.js +3 -3
- package/docs/js/libs/tablesort.number.min.js +3 -3
- package/docs/js/menu-wc.js +16 -20
- package/docs/js/menu-wc_es5.js +1 -1
- package/docs/js/routes/routes_index.js +1 -0
- package/docs/js/routes.js +15 -8
- package/docs/js/search/search_index.js +2 -2
- package/docs/license.html +20 -2
- package/docs/miscellaneous/enumerations.html +18 -0
- package/docs/miscellaneous/functions.html +18 -0
- package/docs/miscellaneous/typealiases.html +18 -0
- package/docs/miscellaneous/variables.html +48 -53
- package/docs/modules/CoreModule.html +18 -0
- package/docs/modules/I18nModule.html +18 -0
- package/docs/modules/LogModule.html +18 -0
- package/docs/modules/TranslateMockModule.html +18 -0
- package/docs/modules.html +18 -0
- package/docs/overview.html +28 -0
- package/docs/pipes/TranslateMockPipe.html +18 -0
- package/docs/properties.html +19 -1
- package/docs/routes.html +204 -0
- package/docs/template-playground/default-templates.json +192 -0
- package/docs/template-playground/hbs-render.service.ts +212 -0
- package/docs/template-playground/main.ts +9 -0
- package/docs/template-playground/template-editor.service.ts +173 -0
- package/docs/template-playground/template-playground.component.ts +614 -0
- package/docs/template-playground/template-playground.module.ts +29 -0
- package/docs/template-playground/zip-export.service.ts +86 -0
- package/docs/template-playground-app/app.js +1389 -0
- package/docs/template-playground-app/index.html +462 -0
- package/fesm2022/eui-core.mjs +150 -110
- package/fesm2022/eui-core.mjs.map +1 -1
- package/package.json +44 -45
- package/{index.d.ts → types/eui-core.d.ts} +13 -1
- package/types/eui-core.d.ts.map +1 -0
- package/index.d.ts.map +0 -1
package/docs/routes.html
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html class="no-js" lang="">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
6
|
+
<title>eui documentation</title>
|
|
7
|
+
<meta name="description" content="">
|
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
+
|
|
10
|
+
<link rel="icon" type="image/x-icon" href="./images/favicon.ico">
|
|
11
|
+
<link rel="stylesheet" href="./styles/style.css">
|
|
12
|
+
<link rel="stylesheet" href="./styles/dark.css">
|
|
13
|
+
<link rel="stylesheet" href="./styles/material.css">
|
|
14
|
+
</head>
|
|
15
|
+
<body>
|
|
16
|
+
<script>
|
|
17
|
+
// Blocking script to avoid flickering dark mode
|
|
18
|
+
// Dark mode toggle button
|
|
19
|
+
var useDark = window.matchMedia('(prefers-color-scheme: dark)');
|
|
20
|
+
var darkModeState = useDark.matches;
|
|
21
|
+
var $darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
|
|
22
|
+
var $darkModeToggles = document.querySelectorAll('.dark-mode-switch');
|
|
23
|
+
var darkModeStateLocal = localStorage.getItem('compodoc_darkmode-state');
|
|
24
|
+
|
|
25
|
+
function checkToggle(check) {
|
|
26
|
+
for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
|
|
27
|
+
$darkModeToggleSwitchers[i].checked = check;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function toggleDarkMode(state) {
|
|
32
|
+
if (window.localStorage) {
|
|
33
|
+
localStorage.setItem('compodoc_darkmode-state', state);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
checkToggle(state);
|
|
37
|
+
|
|
38
|
+
const hasClass = document.body.classList.contains('dark');
|
|
39
|
+
|
|
40
|
+
if (state) {
|
|
41
|
+
for (var i = 0; i < $darkModeToggles.length; i++) {
|
|
42
|
+
$darkModeToggles[i].classList.add('dark');
|
|
43
|
+
}
|
|
44
|
+
if (!hasClass) {
|
|
45
|
+
document.body.classList.add('dark');
|
|
46
|
+
}
|
|
47
|
+
} else {
|
|
48
|
+
for (var i = 0; i < $darkModeToggles.length; i++) {
|
|
49
|
+
$darkModeToggles[i].classList.remove('dark');
|
|
50
|
+
}
|
|
51
|
+
if (hasClass) {
|
|
52
|
+
document.body.classList.remove('dark');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
useDark.addEventListener('change', function (evt) {
|
|
58
|
+
toggleDarkMode(evt.matches);
|
|
59
|
+
});
|
|
60
|
+
if (darkModeStateLocal) {
|
|
61
|
+
darkModeState = darkModeStateLocal === 'true';
|
|
62
|
+
}
|
|
63
|
+
toggleDarkMode(darkModeState);
|
|
64
|
+
</script>
|
|
65
|
+
<script>
|
|
66
|
+
// --- Iframe navigation tracking for Template Playground ---
|
|
67
|
+
function sendCurrentUrlToParent() {
|
|
68
|
+
if (window.parent && window.parent !== window) {
|
|
69
|
+
window.parent.postMessage({
|
|
70
|
+
type: 'compodoc-iframe-navigate',
|
|
71
|
+
url: window.location.pathname + window.location.hash
|
|
72
|
+
}, '*');
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
window.addEventListener('hashchange', sendCurrentUrlToParent, false);
|
|
76
|
+
window.addEventListener('popstate', sendCurrentUrlToParent, false);
|
|
77
|
+
window.addEventListener('DOMContentLoaded', sendCurrentUrlToParent, false);
|
|
78
|
+
</script>
|
|
79
|
+
|
|
80
|
+
<div class="navbar navbar-default navbar-fixed-top d-md-none p-0">
|
|
81
|
+
<div class="d-flex">
|
|
82
|
+
<a href="./" class="navbar-brand">eui documentation</a>
|
|
83
|
+
<button type="button" class="btn btn-default btn-menu ion-ios-menu" id="btn-menu"></button>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<div class="xs-menu menu" id="mobile-menu">
|
|
88
|
+
<div id="book-search-input" role="search"><input type="text" placeholder="Type to search"></div> <compodoc-menu></compodoc-menu>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
<div class="container-fluid main">
|
|
92
|
+
<div class="row main">
|
|
93
|
+
<div class="d-none d-md-block menu">
|
|
94
|
+
<compodoc-menu mode="normal"></compodoc-menu>
|
|
95
|
+
</div>
|
|
96
|
+
<!-- START CONTENT -->
|
|
97
|
+
<div class="content routes">
|
|
98
|
+
<div class="content-data">
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
<ol class="breadcrumb">
|
|
118
|
+
<li class="breadcrumb-item">Routes</li>
|
|
119
|
+
</ol>
|
|
120
|
+
|
|
121
|
+
<div id="body-routes"></div>
|
|
122
|
+
|
|
123
|
+
<script src="./js/libs/d3.v3.min.js"></script>
|
|
124
|
+
<script src="./js/libs/innersvg.js"></script>
|
|
125
|
+
|
|
126
|
+
<script src="./js/routes/routes_index.js"></script>
|
|
127
|
+
<script src="./js/routes.js"></script>
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
</div><div class="search-results">
|
|
135
|
+
<div class="has-results">
|
|
136
|
+
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
|
137
|
+
<ul class="search-results-list"></ul>
|
|
138
|
+
</div>
|
|
139
|
+
<div class="no-results">
|
|
140
|
+
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
<!-- END CONTENT -->
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
|
|
148
|
+
<label class="dark-mode-switch">
|
|
149
|
+
<input type="checkbox">
|
|
150
|
+
<span class="slider">
|
|
151
|
+
<svg class="slider-icon" viewBox="0 0 24 24" fill="none" height="20" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" width="20" xmlns="http://www.w3.org/2000/svg">
|
|
152
|
+
<path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"></path>
|
|
153
|
+
</svg>
|
|
154
|
+
</span>
|
|
155
|
+
</label>
|
|
156
|
+
|
|
157
|
+
<script>
|
|
158
|
+
var COMPODOC_CURRENT_PAGE_DEPTH = 0;
|
|
159
|
+
var COMPODOC_CURRENT_PAGE_CONTEXT = 'routes';
|
|
160
|
+
var COMPODOC_CURRENT_PAGE_URL = 'routes.html';
|
|
161
|
+
var MAX_SEARCH_RESULTS = 15;
|
|
162
|
+
</script>
|
|
163
|
+
|
|
164
|
+
<script>
|
|
165
|
+
$darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
|
|
166
|
+
checkToggle(darkModeState);
|
|
167
|
+
if ($darkModeToggleSwitchers.length > 0) {
|
|
168
|
+
for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
|
|
169
|
+
$darkModeToggleSwitchers[i].addEventListener('change', function (event) {
|
|
170
|
+
darkModeState = !darkModeState;
|
|
171
|
+
toggleDarkMode(darkModeState);
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
</script>
|
|
176
|
+
|
|
177
|
+
<script src="./js/libs/custom-elements.min.js"></script>
|
|
178
|
+
<script src="./js/libs/lit-html.js"></script>
|
|
179
|
+
|
|
180
|
+
<script src="./js/menu-wc.js" defer></script>
|
|
181
|
+
<script nomodule src="./js/menu-wc_es5.js" defer></script>
|
|
182
|
+
|
|
183
|
+
<script src="./js/libs/bootstrap-native.js"></script>
|
|
184
|
+
|
|
185
|
+
<script src="./js/libs/es6-shim.min.js"></script>
|
|
186
|
+
<script src="./js/libs/EventDispatcher.js"></script>
|
|
187
|
+
<script src="./js/libs/promise.min.js"></script>
|
|
188
|
+
|
|
189
|
+
<script src="./js/compodoc.js"></script>
|
|
190
|
+
|
|
191
|
+
<script src="./js/tabs.js"></script>
|
|
192
|
+
<script src="./js/menu.js"></script>
|
|
193
|
+
<script src="./js/libs/clipboard.min.js"></script>
|
|
194
|
+
<script src="./js/libs/prism.js"></script>
|
|
195
|
+
<script src="./js/sourceCode.js"></script>
|
|
196
|
+
<script src="./js/search/search.js"></script>
|
|
197
|
+
<script src="./js/search/lunr.min.js"></script>
|
|
198
|
+
<script src="./js/search/search-lunr.js"></script>
|
|
199
|
+
<script src="./js/search/search_index.js"></script>
|
|
200
|
+
<script src="./js/lazy-load-graphs.js"></script>
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
</body>
|
|
204
|
+
</html>
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
{
|
|
2
|
+
"templates": [
|
|
3
|
+
{
|
|
4
|
+
"name": "page.hbs",
|
|
5
|
+
"path": "page.hbs",
|
|
6
|
+
"description": "Main page template - the base layout for all documentation pages",
|
|
7
|
+
"type": "hbs",
|
|
8
|
+
"category": "core",
|
|
9
|
+
"content": "<!-- This will be populated with the actual page.hbs content -->"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "component.hbs",
|
|
13
|
+
"path": "partials/component.hbs",
|
|
14
|
+
"description": "Component detail template - displays Angular component documentation",
|
|
15
|
+
"type": "hbs",
|
|
16
|
+
"category": "partials",
|
|
17
|
+
"content": "<!-- This will be populated with the actual component.hbs content -->"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "module.hbs",
|
|
21
|
+
"path": "partials/module.hbs",
|
|
22
|
+
"description": "Module detail template - displays Angular module documentation",
|
|
23
|
+
"type": "hbs",
|
|
24
|
+
"category": "partials",
|
|
25
|
+
"content": "<!-- This will be populated with the actual module.hbs content -->"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "overview.hbs",
|
|
29
|
+
"path": "partials/overview.hbs",
|
|
30
|
+
"description": "Overview template - displays the main overview page",
|
|
31
|
+
"type": "hbs",
|
|
32
|
+
"category": "partials",
|
|
33
|
+
"content": "<!-- This will be populated with the actual overview.hbs content -->"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "class.hbs",
|
|
37
|
+
"path": "partials/class.hbs",
|
|
38
|
+
"description": "Class detail template - displays TypeScript class documentation",
|
|
39
|
+
"type": "hbs",
|
|
40
|
+
"category": "partials",
|
|
41
|
+
"content": "<!-- This will be populated with the actual class.hbs content -->"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "interface.hbs",
|
|
45
|
+
"path": "partials/interface.hbs",
|
|
46
|
+
"description": "Interface detail template - displays TypeScript interface documentation",
|
|
47
|
+
"type": "hbs",
|
|
48
|
+
"category": "partials",
|
|
49
|
+
"content": "<!-- This will be populated with the actual interface.hbs content -->"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "injectable.hbs",
|
|
53
|
+
"path": "partials/injectable.hbs",
|
|
54
|
+
"description": "Injectable service template - displays Angular service documentation",
|
|
55
|
+
"type": "hbs",
|
|
56
|
+
"category": "partials",
|
|
57
|
+
"content": "<!-- This will be populated with the actual injectable.hbs content -->"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "directive.hbs",
|
|
61
|
+
"path": "partials/directive.hbs",
|
|
62
|
+
"description": "Directive template - displays Angular directive documentation",
|
|
63
|
+
"type": "hbs",
|
|
64
|
+
"category": "partials",
|
|
65
|
+
"content": "<!-- This will be populated with the actual directive.hbs content -->"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "pipe.hbs",
|
|
69
|
+
"path": "partials/pipe.hbs",
|
|
70
|
+
"description": "Pipe template - displays Angular pipe documentation",
|
|
71
|
+
"type": "hbs",
|
|
72
|
+
"category": "partials",
|
|
73
|
+
"content": "<!-- This will be populated with the actual pipe.hbs content -->"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "guard.hbs",
|
|
77
|
+
"path": "partials/guard.hbs",
|
|
78
|
+
"description": "Guard template - displays Angular guard documentation",
|
|
79
|
+
"type": "hbs",
|
|
80
|
+
"category": "partials",
|
|
81
|
+
"content": "<!-- This will be populated with the actual guard.hbs content -->"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "interceptor.hbs",
|
|
85
|
+
"path": "partials/interceptor.hbs",
|
|
86
|
+
"description": "Interceptor template - displays Angular interceptor documentation",
|
|
87
|
+
"type": "hbs",
|
|
88
|
+
"category": "partials",
|
|
89
|
+
"content": "<!-- This will be populated with the actual interceptor.hbs content -->"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "menu.hbs",
|
|
93
|
+
"path": "partials/menu.hbs",
|
|
94
|
+
"description": "Navigation menu template - displays the sidebar navigation",
|
|
95
|
+
"type": "hbs",
|
|
96
|
+
"category": "partials",
|
|
97
|
+
"content": "<!-- This will be populated with the actual menu.hbs content -->"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"styles": [
|
|
101
|
+
{
|
|
102
|
+
"name": "compodoc.css",
|
|
103
|
+
"path": "styles/compodoc.css",
|
|
104
|
+
"description": "Main stylesheet - contains the core styles for Compodoc",
|
|
105
|
+
"type": "css",
|
|
106
|
+
"category": "core",
|
|
107
|
+
"content": "/* This will be populated with the actual compodoc.css content */"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "bootstrap.min.css",
|
|
111
|
+
"path": "styles/bootstrap.min.css",
|
|
112
|
+
"description": "Bootstrap CSS framework - provides base styling components",
|
|
113
|
+
"type": "css",
|
|
114
|
+
"category": "vendor",
|
|
115
|
+
"content": "/* This will be populated with the actual bootstrap.min.css content */"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "dark.css",
|
|
119
|
+
"path": "styles/dark.css",
|
|
120
|
+
"description": "Dark mode styles - contains dark theme styling",
|
|
121
|
+
"type": "css",
|
|
122
|
+
"category": "theme",
|
|
123
|
+
"content": "/* This will be populated with the actual dark.css content */"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "gitbook.css",
|
|
127
|
+
"path": "styles/gitbook.css",
|
|
128
|
+
"description": "GitBook theme styles - alternative theme styling",
|
|
129
|
+
"type": "css",
|
|
130
|
+
"category": "theme",
|
|
131
|
+
"content": "/* This will be populated with the actual gitbook.css content */"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "material.css",
|
|
135
|
+
"path": "styles/material.css",
|
|
136
|
+
"description": "Material design theme styles - Material theme styling",
|
|
137
|
+
"type": "css",
|
|
138
|
+
"category": "theme",
|
|
139
|
+
"content": "/* This will be populated with the actual material.css content */"
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
"scripts": [
|
|
143
|
+
{
|
|
144
|
+
"name": "compodoc.js",
|
|
145
|
+
"path": "js/compodoc.js",
|
|
146
|
+
"description": "Main JavaScript file - contains core Compodoc functionality",
|
|
147
|
+
"type": "js",
|
|
148
|
+
"category": "core",
|
|
149
|
+
"content": "// This will be populated with the actual compodoc.js content"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"name": "menu.js",
|
|
153
|
+
"path": "js/menu.js",
|
|
154
|
+
"description": "Menu functionality - handles navigation menu interactions",
|
|
155
|
+
"type": "js",
|
|
156
|
+
"category": "core",
|
|
157
|
+
"content": "// This will be populated with the actual menu.js content"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "tabs.js",
|
|
161
|
+
"path": "js/tabs.js",
|
|
162
|
+
"description": "Tab functionality - handles tab navigation in documentation pages",
|
|
163
|
+
"type": "js",
|
|
164
|
+
"category": "core",
|
|
165
|
+
"content": "// This will be populated with the actual tabs.js content"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "search.js",
|
|
169
|
+
"path": "js/search/search.js",
|
|
170
|
+
"description": "Search functionality - handles documentation search features",
|
|
171
|
+
"type": "js",
|
|
172
|
+
"category": "feature",
|
|
173
|
+
"content": "// This will be populated with the actual search.js content"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"name": "sourceCode.js",
|
|
177
|
+
"path": "js/sourceCode.js",
|
|
178
|
+
"description": "Source code display - handles syntax highlighting and code display",
|
|
179
|
+
"type": "js",
|
|
180
|
+
"category": "feature",
|
|
181
|
+
"content": "// This will be populated with the actual sourceCode.js content"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "lazy-load-graphs.js",
|
|
185
|
+
"path": "js/lazy-load-graphs.js",
|
|
186
|
+
"description": "Graph loading - handles lazy loading of dependency graphs",
|
|
187
|
+
"type": "js",
|
|
188
|
+
"category": "feature",
|
|
189
|
+
"content": "// This will be populated with the actual lazy-load-graphs.js content"
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
declare const Handlebars: any;
|
|
4
|
+
|
|
5
|
+
@Injectable({
|
|
6
|
+
providedIn: 'root'
|
|
7
|
+
})
|
|
8
|
+
export class HbsRenderService {
|
|
9
|
+
private handlebarsInstance: any;
|
|
10
|
+
|
|
11
|
+
constructor() {
|
|
12
|
+
this.initializeHandlebars();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
private initializeHandlebars() {
|
|
16
|
+
// Create a new Handlebars instance for the playground
|
|
17
|
+
this.handlebarsInstance = Handlebars.create();
|
|
18
|
+
|
|
19
|
+
// Register common helpers used in Compodoc templates
|
|
20
|
+
this.registerHelpers();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
private registerHelpers() {
|
|
24
|
+
// Register the 'compare' helper
|
|
25
|
+
this.handlebarsInstance.registerHelper('compare', (left: any, operator: string, right: any, options: any) => {
|
|
26
|
+
let result;
|
|
27
|
+
switch (operator) {
|
|
28
|
+
case '===':
|
|
29
|
+
result = left === right;
|
|
30
|
+
break;
|
|
31
|
+
case '!==':
|
|
32
|
+
result = left !== right;
|
|
33
|
+
break;
|
|
34
|
+
case '<':
|
|
35
|
+
result = left < right;
|
|
36
|
+
break;
|
|
37
|
+
case '>':
|
|
38
|
+
result = left > right;
|
|
39
|
+
break;
|
|
40
|
+
case '<=':
|
|
41
|
+
result = left <= right;
|
|
42
|
+
break;
|
|
43
|
+
case '>=':
|
|
44
|
+
result = left >= right;
|
|
45
|
+
break;
|
|
46
|
+
default:
|
|
47
|
+
result = false;
|
|
48
|
+
}
|
|
49
|
+
return result ? options.fn(this) : options.inverse(this);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// Register the 'unless' helper
|
|
53
|
+
this.handlebarsInstance.registerHelper('unless', (conditional: any, options: any) => {
|
|
54
|
+
return !conditional ? options.fn(this) : options.inverse(this);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// Register the 'each' helper with index
|
|
58
|
+
this.handlebarsInstance.registerHelper('each', (context: any, options: any) => {
|
|
59
|
+
let ret = '';
|
|
60
|
+
for (let i = 0; i < context.length; i++) {
|
|
61
|
+
ret += options.fn(context[i], { data: { index: i } });
|
|
62
|
+
}
|
|
63
|
+
return ret;
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
// Register the 'if' helper
|
|
67
|
+
this.handlebarsInstance.registerHelper('if', (conditional: any, options: any) => {
|
|
68
|
+
return conditional ? options.fn(this) : options.inverse(this);
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
// Register the 'relativeURL' helper
|
|
72
|
+
this.handlebarsInstance.registerHelper('relativeURL', (depth: number, page?: string) => {
|
|
73
|
+
let url = '';
|
|
74
|
+
for (let i = 0; i < depth; i++) {
|
|
75
|
+
url += '../';
|
|
76
|
+
}
|
|
77
|
+
return url + (page || '');
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// Register the 't' helper for translations
|
|
81
|
+
this.handlebarsInstance.registerHelper('t', (key: string) => {
|
|
82
|
+
// Simple translation mapping for preview
|
|
83
|
+
const translations: { [key: string]: string } = {
|
|
84
|
+
'info': 'Information',
|
|
85
|
+
'source': 'Source',
|
|
86
|
+
'example': 'Example',
|
|
87
|
+
'template': 'Template',
|
|
88
|
+
'styles': 'Styles',
|
|
89
|
+
'component': 'Component',
|
|
90
|
+
'module': 'Module',
|
|
91
|
+
'overview': 'Overview',
|
|
92
|
+
'components': 'Components',
|
|
93
|
+
'modules': 'Modules',
|
|
94
|
+
'file': 'File',
|
|
95
|
+
'description': 'Description',
|
|
96
|
+
'selector': 'Selector',
|
|
97
|
+
'properties': 'Properties',
|
|
98
|
+
'methods': 'Methods',
|
|
99
|
+
'inputs': 'Inputs',
|
|
100
|
+
'outputs': 'Outputs'
|
|
101
|
+
};
|
|
102
|
+
return translations[key] || key;
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
// Register the 'orLength' helper
|
|
106
|
+
this.handlebarsInstance.registerHelper('orLength', (...args: any[]) => {
|
|
107
|
+
const options = args[args.length - 1];
|
|
108
|
+
const values = args.slice(0, -1);
|
|
109
|
+
|
|
110
|
+
for (const value of values) {
|
|
111
|
+
if (value && value.length && value.length > 0) {
|
|
112
|
+
return options.fn(this);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return options.inverse(this);
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
// Register the 'isTabEnabled' helper
|
|
119
|
+
this.handlebarsInstance.registerHelper('isTabEnabled', (navTabs: any[], tabId: string, options: any) => {
|
|
120
|
+
const tab = navTabs && navTabs.find((t: any) => t.id === tabId);
|
|
121
|
+
return tab ? options.fn(this) : options.inverse(this);
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// Register the 'isInitialTab' helper
|
|
125
|
+
this.handlebarsInstance.registerHelper('isInitialTab', (navTabs: any[], tabId: string, options: any) => {
|
|
126
|
+
const isInitial = navTabs && navTabs.length > 0 && navTabs[0].id === tabId;
|
|
127
|
+
return isInitial ? options.fn(this) : options.inverse(this);
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
renderTemplate(templateContent: string, data: any): string {
|
|
132
|
+
try {
|
|
133
|
+
// Create a complete HTML document for preview
|
|
134
|
+
const template = this.handlebarsInstance.compile(templateContent);
|
|
135
|
+
const rendered = template({ data });
|
|
136
|
+
|
|
137
|
+
// Wrap in a basic HTML structure for preview
|
|
138
|
+
return `
|
|
139
|
+
<!DOCTYPE html>
|
|
140
|
+
<html>
|
|
141
|
+
<head>
|
|
142
|
+
<meta charset="utf-8">
|
|
143
|
+
<title>Template Preview</title>
|
|
144
|
+
<style>
|
|
145
|
+
body { font-family: Arial, sans-serif; margin: 20px; }
|
|
146
|
+
.preview-wrapper { border: 1px solid #ddd; padding: 20px; }
|
|
147
|
+
.preview-notice { background: #f0f8ff; padding: 10px; margin-bottom: 20px; border-left: 4px solid #007bff; }
|
|
148
|
+
</style>
|
|
149
|
+
</head>
|
|
150
|
+
<body>
|
|
151
|
+
<div class="preview-notice">
|
|
152
|
+
<strong>Template Preview:</strong> This is a live preview of your template with mock data.
|
|
153
|
+
</div>
|
|
154
|
+
<div class="preview-wrapper">
|
|
155
|
+
${rendered}
|
|
156
|
+
</div>
|
|
157
|
+
</body>
|
|
158
|
+
</html>
|
|
159
|
+
`;
|
|
160
|
+
} catch (error) {
|
|
161
|
+
return `
|
|
162
|
+
<!DOCTYPE html>
|
|
163
|
+
<html>
|
|
164
|
+
<head>
|
|
165
|
+
<meta charset="utf-8">
|
|
166
|
+
<title>Template Preview - Error</title>
|
|
167
|
+
<style>
|
|
168
|
+
body { font-family: Arial, sans-serif; margin: 20px; }
|
|
169
|
+
.error { color: red; background: #fff5f5; padding: 20px; border: 1px solid #red; }
|
|
170
|
+
</style>
|
|
171
|
+
</head>
|
|
172
|
+
<body>
|
|
173
|
+
<div class="error">
|
|
174
|
+
<h3>Template Error</h3>
|
|
175
|
+
<p><strong>Error:</strong> ${error.message}</p>
|
|
176
|
+
<p>Please check your template syntax and try again.</p>
|
|
177
|
+
</div>
|
|
178
|
+
</body>
|
|
179
|
+
</html>
|
|
180
|
+
`;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
getMockData(): any {
|
|
185
|
+
return {
|
|
186
|
+
documentationMainName: 'Sample Documentation',
|
|
187
|
+
depth: 0,
|
|
188
|
+
context: 'component',
|
|
189
|
+
components: [
|
|
190
|
+
{
|
|
191
|
+
name: 'SampleComponent',
|
|
192
|
+
selector: 'app-sample',
|
|
193
|
+
file: 'src/app/sample/sample.component.ts',
|
|
194
|
+
description: 'A sample component for demonstration',
|
|
195
|
+
properties: [
|
|
196
|
+
{ name: 'title', type: 'string', description: 'The component title' },
|
|
197
|
+
{ name: 'isVisible', type: 'boolean', description: 'Whether the component is visible' }
|
|
198
|
+
],
|
|
199
|
+
methods: [
|
|
200
|
+
{ name: 'ngOnInit', description: 'Lifecycle hook', signature: 'ngOnInit(): void' },
|
|
201
|
+
{ name: 'onClick', description: 'Handle click events', signature: 'onClick(event: MouseEvent): void' }
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
navTabs: [
|
|
206
|
+
{ id: 'info', label: 'Info', href: '#info' },
|
|
207
|
+
{ id: 'source', label: 'Source', href: '#source' },
|
|
208
|
+
{ id: 'example', label: 'Example', href: '#example' }
|
|
209
|
+
]
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
2
|
+
import { TemplatePlaygroundModule } from './template-playground.module';
|
|
3
|
+
|
|
4
|
+
// Bootstrap the Angular application when the DOM is ready
|
|
5
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
6
|
+
platformBrowserDynamic()
|
|
7
|
+
.bootstrapModule(TemplatePlaygroundModule)
|
|
8
|
+
.catch(err => console.error('Error starting template playground:', err));
|
|
9
|
+
});
|