@eui/base 17.0.0-next.1 → 17.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.
Files changed (193) hide show
  1. package/esm2022/lib/eui-models/eui-growl-message.model.mjs +2 -0
  2. package/esm2022/lib/eui-models/eui-pagination/eui-pagination.model.mjs +1 -1
  3. package/esm2022/lib/eui-models/eui-service.model.mjs +2 -2
  4. package/esm2022/lib/eui-models/index.mjs +2 -1
  5. package/esm2022/lib/eui-models/log/log.appender.mjs +1 -1
  6. package/esm2022/lib/eui-models/log/log.logger.mjs +1 -1
  7. package/esm2022/lib/eui-models/log/log.logger.mock.mjs +22 -8
  8. package/esm2022/lib/eui-models/log/url.appender.mjs +4 -2
  9. package/esm2022/lib/util/coerce-decorator/coerce.mjs +1 -1
  10. package/esm2022/lib/util/xhr.mjs +2 -2
  11. package/esm2022/lib/ux-models/index.mjs +1 -12
  12. package/esm2022/lib/ux-models/ux-error-feedback.model.mjs +1 -1
  13. package/esm2022/lib/ux-models/ux-link-legacy.model.mjs +1 -1
  14. package/fesm2022/eui-base.mjs +26 -13
  15. package/fesm2022/eui-base.mjs.map +1 -1
  16. package/lib/eui-models/eui-growl-message.model.d.ts +9 -0
  17. package/lib/eui-models/eui-growl-message.model.d.ts.map +1 -0
  18. package/lib/eui-models/eui-pagination/eui-pagination.model.d.ts.map +1 -1
  19. package/lib/eui-models/eui-service.model.d.ts.map +1 -1
  20. package/lib/eui-models/index.d.ts +1 -0
  21. package/lib/eui-models/index.d.ts.map +1 -1
  22. package/lib/eui-models/log/log.appender.d.ts.map +1 -1
  23. package/lib/eui-models/log/log.logger.d.ts.map +1 -1
  24. package/lib/eui-models/log/log.logger.mock.d.ts.map +1 -1
  25. package/lib/eui-models/log/url.appender.d.ts.map +1 -1
  26. package/lib/util/coerce-decorator/coerce.d.ts.map +1 -1
  27. package/lib/ux-models/index.d.ts.map +1 -1
  28. package/lib/ux-models/ux-error-feedback.model.d.ts.map +1 -1
  29. package/lib/ux-models/ux-link-legacy.model.d.ts +1 -0
  30. package/lib/ux-models/ux-link-legacy.model.d.ts.map +1 -1
  31. package/package.json +2 -2
  32. package/docs/classes/ConsoleAppender.html +0 -397
  33. package/docs/classes/EuiEuLanguages.html +0 -650
  34. package/docs/classes/EuiLazyService.html +0 -565
  35. package/docs/classes/EuiMenuItem.html +0 -1065
  36. package/docs/classes/EuiPagination.html +0 -1100
  37. package/docs/classes/EuiService.html +0 -683
  38. package/docs/classes/LogAppender.html +0 -363
  39. package/docs/classes/Logger.html +0 -1253
  40. package/docs/classes/LoggerMock.html +0 -821
  41. package/docs/classes/UrlAppender.html +0 -404
  42. package/docs/classes/UxClearErrorFeedbackEvent.html +0 -295
  43. package/docs/classes/UxErrorGroupOnClickEvent.html +0 -293
  44. package/docs/classes/UxErrorOutput.html +0 -579
  45. package/docs/classes/UxPublishErrorFeedbackEvent.html +0 -373
  46. package/docs/classes/UxValidationErrorClass.html +0 -435
  47. package/docs/dependencies.html +0 -319
  48. package/docs/fonts/ionicons.eot +0 -0
  49. package/docs/fonts/ionicons.svg +0 -2090
  50. package/docs/fonts/ionicons.ttf +0 -0
  51. package/docs/fonts/ionicons.woff +0 -0
  52. package/docs/fonts/ionicons.woff2 +0 -0
  53. package/docs/fonts/roboto-v15-latin-300.eot +0 -0
  54. package/docs/fonts/roboto-v15-latin-300.svg +0 -314
  55. package/docs/fonts/roboto-v15-latin-300.ttf +0 -0
  56. package/docs/fonts/roboto-v15-latin-300.woff +0 -0
  57. package/docs/fonts/roboto-v15-latin-300.woff2 +0 -0
  58. package/docs/fonts/roboto-v15-latin-700.eot +0 -0
  59. package/docs/fonts/roboto-v15-latin-700.svg +0 -310
  60. package/docs/fonts/roboto-v15-latin-700.ttf +0 -0
  61. package/docs/fonts/roboto-v15-latin-700.woff +0 -0
  62. package/docs/fonts/roboto-v15-latin-700.woff2 +0 -0
  63. package/docs/fonts/roboto-v15-latin-italic.eot +0 -0
  64. package/docs/fonts/roboto-v15-latin-italic.svg +0 -323
  65. package/docs/fonts/roboto-v15-latin-italic.ttf +0 -0
  66. package/docs/fonts/roboto-v15-latin-italic.woff +0 -0
  67. package/docs/fonts/roboto-v15-latin-italic.woff2 +0 -0
  68. package/docs/fonts/roboto-v15-latin-regular.eot +0 -0
  69. package/docs/fonts/roboto-v15-latin-regular.svg +0 -308
  70. package/docs/fonts/roboto-v15-latin-regular.ttf +0 -0
  71. package/docs/fonts/roboto-v15-latin-regular.woff +0 -0
  72. package/docs/fonts/roboto-v15-latin-regular.woff2 +0 -0
  73. package/docs/images/compodoc-vectorise-inverted.png +0 -0
  74. package/docs/images/compodoc-vectorise-inverted.svg +0 -201
  75. package/docs/images/compodoc-vectorise.png +0 -0
  76. package/docs/images/compodoc-vectorise.svg +0 -201
  77. package/docs/images/favicon.ico +0 -0
  78. package/docs/index.html +0 -137
  79. package/docs/interfaces/ApiQueue.html +0 -161
  80. package/docs/interfaces/ApiQueueItem.html +0 -337
  81. package/docs/interfaces/AppState.html +0 -458
  82. package/docs/interfaces/ConnectionStatus.html +0 -247
  83. package/docs/interfaces/ConsoleAppenderConfig.html +0 -284
  84. package/docs/interfaces/ConsoleAppenderTypeConfig.html +0 -227
  85. package/docs/interfaces/CoreState.html +0 -407
  86. package/docs/interfaces/EnvDynamicConfig.html +0 -373
  87. package/docs/interfaces/EuiAppHandlersConfig.html +0 -349
  88. package/docs/interfaces/EuiAppJsonConfig.html +0 -311
  89. package/docs/interfaces/EuiAuthConfig.html +0 -304
  90. package/docs/interfaces/EuiConfig.html +0 -247
  91. package/docs/interfaces/EuiEnvConfig.html +0 -317
  92. package/docs/interfaces/EuiGlobalConfig.html +0 -259
  93. package/docs/interfaces/EuiLanguage.html +0 -259
  94. package/docs/interfaces/EuiPaginationConfig.html +0 -349
  95. package/docs/interfaces/EuiServiceModel.html +0 -589
  96. package/docs/interfaces/EuiServiceStatus.html +0 -253
  97. package/docs/interfaces/EuiStoreServiceModel.html +0 -248
  98. package/docs/interfaces/EuiUserRight.html +0 -253
  99. package/docs/interfaces/GlobalConfig.html +0 -413
  100. package/docs/interfaces/HttpErrorHandlerConfig.html +0 -214
  101. package/docs/interfaces/HttpErrorRouteConfig.html +0 -287
  102. package/docs/interfaces/I18nConfig.html +0 -247
  103. package/docs/interfaces/I18nLoaderConfig.html +0 -311
  104. package/docs/interfaces/I18nResource.html +0 -316
  105. package/docs/interfaces/I18nServiceConfig.html +0 -271
  106. package/docs/interfaces/I18nState.html +0 -208
  107. package/docs/interfaces/LoadedConfigModules.html +0 -253
  108. package/docs/interfaces/LocaleServiceConfig.html +0 -310
  109. package/docs/interfaces/LocaleState.html +0 -221
  110. package/docs/interfaces/LogAppenderConfig.html +0 -220
  111. package/docs/interfaces/LogAppenderTypeConfig.html +0 -246
  112. package/docs/interfaces/LogConfig.html +0 -329
  113. package/docs/interfaces/LogEvent.html +0 -401
  114. package/docs/interfaces/LogPosition.html +0 -293
  115. package/docs/interfaces/ModuleConfig.html +0 -167
  116. package/docs/interfaces/ModulesConfig.html +0 -161
  117. package/docs/interfaces/NotificationsState.html +0 -227
  118. package/docs/interfaces/UrlAppenderConfig.html +0 -278
  119. package/docs/interfaces/UrlAppenderTypeConfig.html +0 -227
  120. package/docs/interfaces/UrlLogEvent.html +0 -284
  121. package/docs/interfaces/UserConfig.html +0 -214
  122. package/docs/interfaces/UserDetails.html +0 -356
  123. package/docs/interfaces/UserPreferences.html +0 -272
  124. package/docs/interfaces/UserState.html +0 -452
  125. package/docs/interfaces/UxErrorFeedback.html +0 -400
  126. package/docs/interfaces/UxErrorFollowMap.html +0 -161
  127. package/docs/interfaces/UxErrorInfo.html +0 -304
  128. package/docs/interfaces/UxErrorMessage.html +0 -253
  129. package/docs/interfaces/UxFormValidationError.html +0 -208
  130. package/docs/interfaces/UxHttpErrorInfo.html +0 -214
  131. package/docs/interfaces/UxHttpErrorResponse.html +0 -214
  132. package/docs/interfaces/UxMessage.html +0 -407
  133. package/docs/interfaces/UxModal.html +0 -292
  134. package/docs/interfaces/UxOrgChartNode.html +0 -889
  135. package/docs/interfaces/UxValidationErrorAttribute.html +0 -247
  136. package/docs/interfaces/UxValidationErrorFeedback.html +0 -253
  137. package/docs/interfaces/UxValidationErrorI18nMessage.html +0 -253
  138. package/docs/interfaces/VersionsConfig.html +0 -227
  139. package/docs/interfaces/XHRConfig.html +0 -492
  140. package/docs/js/compodoc.js +0 -14
  141. package/docs/js/lazy-load-graphs.js +0 -44
  142. package/docs/js/libs/EventDispatcher.js +0 -5
  143. package/docs/js/libs/bootstrap-native.js +0 -1
  144. package/docs/js/libs/clipboard.min.js +0 -7
  145. package/docs/js/libs/custom-elements-es5-adapter.js +0 -15
  146. package/docs/js/libs/custom-elements.min.js +0 -38
  147. package/docs/js/libs/d3.v3.min.js +0 -2
  148. package/docs/js/libs/deep-iterator.js +0 -2
  149. package/docs/js/libs/es6-shim.min.js +0 -11
  150. package/docs/js/libs/htmlparser.js +0 -23
  151. package/docs/js/libs/innersvg.js +0 -9
  152. package/docs/js/libs/lit-html.js +0 -1
  153. package/docs/js/libs/prism.js +0 -46
  154. package/docs/js/libs/promise.min.js +0 -6
  155. package/docs/js/libs/svg-pan-zoom.min.js +0 -3
  156. package/docs/js/libs/tablesort.min.js +0 -6
  157. package/docs/js/libs/tablesort.number.min.js +0 -6
  158. package/docs/js/libs/vis.min.js +0 -47
  159. package/docs/js/libs/zepto.min.js +0 -2
  160. package/docs/js/menu-wc.js +0 -323
  161. package/docs/js/menu.js +0 -325
  162. package/docs/js/routes.js +0 -301
  163. package/docs/js/search/lunr.min.js +0 -6
  164. package/docs/js/search/search-lunr.js +0 -67
  165. package/docs/js/search/search.js +0 -268
  166. package/docs/js/search/search_index.js +0 -4
  167. package/docs/js/sourceCode.js +0 -58
  168. package/docs/js/svg-pan-zoom.controls.js +0 -53
  169. package/docs/js/tabs.js +0 -21
  170. package/docs/js/tree.js +0 -147
  171. package/docs/license.html +0 -379
  172. package/docs/miscellaneous/enumerations.html +0 -412
  173. package/docs/miscellaneous/functions.html +0 -1084
  174. package/docs/miscellaneous/typealiases.html +0 -390
  175. package/docs/miscellaneous/variables.html +0 -1906
  176. package/docs/modules.html +0 -120
  177. package/docs/properties.html +0 -124
  178. package/docs/styles/bootstrap-card.css +0 -219
  179. package/docs/styles/bootstrap.min.css +0 -6
  180. package/docs/styles/compodoc.css +0 -1121
  181. package/docs/styles/dark.css +0 -121
  182. package/docs/styles/ionicons.min.css +0 -11
  183. package/docs/styles/laravel.css +0 -113
  184. package/docs/styles/material.css +0 -131
  185. package/docs/styles/original.css +0 -51
  186. package/docs/styles/postmark.css +0 -238
  187. package/docs/styles/prism.css +0 -301
  188. package/docs/styles/readthedocs.css +0 -117
  189. package/docs/styles/reset.css +0 -129
  190. package/docs/styles/stripe.css +0 -106
  191. package/docs/styles/style.css +0 -7
  192. package/docs/styles/tablesort.css +0 -33
  193. package/docs/styles/vagrant.css +0 -130
package/docs/js/menu.js DELETED
@@ -1,325 +0,0 @@
1
- document.addEventListener('DOMContentLoaded', function () {
2
- var menuCollapsed = false,
3
- mobileMenu = document.getElementById('mobile-menu');
4
-
5
- var localContextInUrl = '';
6
-
7
- if (COMPODOC_CURRENT_PAGE_CONTEXT !== '') {
8
- switch (COMPODOC_CURRENT_PAGE_CONTEXT) {
9
- case 'additional-page':
10
- localContextInUrl = 'additional-documentation';
11
- break;
12
- case 'class':
13
- localContextInUrl = 'classes';
14
- break;
15
- case 'miscellaneous-functions':
16
- case 'miscellaneous-variables':
17
- case 'miscellaneous-typealiases':
18
- case 'miscellaneous-enumerations':
19
- localContextInUrl = 'miscellaneous';
20
- default:
21
- break;
22
- }
23
- }
24
-
25
- function hasClass(el, cls) {
26
- return el.className && new RegExp('(\\s|^)' + cls + '(\\s|$)').test(el.className);
27
- }
28
-
29
- var processLink = function (link, url) {
30
- if (url.charAt(0) !== '.') {
31
- var prefix = '';
32
- switch (COMPODOC_CURRENT_PAGE_DEPTH) {
33
- case 5:
34
- prefix = '../../../../../';
35
- break;
36
- case 4:
37
- prefix = '../../../../';
38
- break;
39
- case 3:
40
- prefix = '../../../';
41
- break;
42
- case 2:
43
- prefix = '../../';
44
- break;
45
- case 1:
46
- prefix = '../';
47
- break;
48
- case 0:
49
- prefix = './';
50
- break;
51
- }
52
- link.setAttribute('href', prefix + url);
53
- }
54
- };
55
-
56
- var processMenuLinks = function (links, dontAddClass) {
57
- for (var i = 0; i < links.length; i++) {
58
- var link = links[i];
59
- var linkHref = link.getAttribute('href');
60
- if (linkHref) {
61
- var linkHrefFile = linkHref.substr(linkHref.lastIndexOf('/') + 1, linkHref.length);
62
- if (
63
- linkHrefFile.toLowerCase() === COMPODOC_CURRENT_PAGE_URL.toLowerCase() &&
64
- link.innerHTML.indexOf('Getting started') == -1 &&
65
- !dontAddClass &&
66
- linkHref.toLowerCase().indexOf(localContextInUrl.toLowerCase()) !== -1
67
- ) {
68
- link.classList.add('active');
69
- }
70
- processLink(link, linkHref);
71
- }
72
- }
73
- };
74
- var chapterLinks = document.querySelectorAll('[data-type="chapter-link"]');
75
- processMenuLinks(chapterLinks);
76
- var entityLinks = document.querySelectorAll('[data-type="entity-link"]');
77
- processMenuLinks(entityLinks);
78
- var indexLinks = document.querySelectorAll('[data-type="index-link"]');
79
- processMenuLinks(indexLinks, true);
80
- var compodocLogos = document.querySelectorAll('[data-type="compodoc-logo"]');
81
- var customLogo = document.querySelectorAll('[data-type="custom-logo"]');
82
- var processLogos = function (entityLogos) {
83
- for (var i = 0; i < entityLogos.length; i++) {
84
- var entityLogo = entityLogos[i];
85
- if (entityLogo) {
86
- var url = entityLogo.getAttribute('data-src');
87
- // Dark mode + logo
88
- let isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;
89
- if (isDarkMode && url.indexOf('compodoc') !== -1) {
90
- url = 'images/compodoc-vectorise-inverted.png';
91
- }
92
- if (url.charAt(0) !== '.') {
93
- var prefix = '';
94
- switch (COMPODOC_CURRENT_PAGE_DEPTH) {
95
- case 5:
96
- prefix = '../../../../../';
97
- break;
98
- case 4:
99
- prefix = '../../../../';
100
- break;
101
- case 3:
102
- prefix = '../../../';
103
- break;
104
- case 2:
105
- prefix = '../../';
106
- break;
107
- case 1:
108
- prefix = '../';
109
- break;
110
- case 0:
111
- prefix = './';
112
- break;
113
- }
114
- entityLogo.src = prefix + url;
115
- }
116
- }
117
- }
118
- };
119
- processLogos(compodocLogos);
120
- processLogos(customLogo);
121
-
122
- setTimeout(function () {
123
- document.getElementById('btn-menu').addEventListener('click', function () {
124
- if (menuCollapsed) {
125
- mobileMenu.style.display = 'none';
126
- } else {
127
- mobileMenu.style.display = 'block';
128
- document.getElementsByTagName('body')[0].style['overflow-y'] = 'hidden';
129
- }
130
- menuCollapsed = !menuCollapsed;
131
- });
132
-
133
- /**
134
- * Native bootstrap doesn't wait DOMContentLoaded event to start his job, re do it here
135
- */
136
- var Collapses = document.querySelectorAll('[data-bs-toggle="collapse"]');
137
- for (var o = 0, cll = Collapses.length; o < cll; o++) {
138
- var collapse = Collapses[o],
139
- options = {};
140
- options.duration = collapse.getAttribute('data-duration');
141
- const targetId = collapse.getAttribute('data-bs-target');
142
- if (targetId !== '') {
143
- options.parent = collapse;
144
- const c = new BSN.Collapse(targetId, options);
145
- }
146
- }
147
-
148
- // collapse menu
149
- var classnameMenuToggler = document.getElementsByClassName('menu-toggler'),
150
- faAngleUpClass = 'ion-ios-arrow-up',
151
- faAngleDownClass = 'ion-ios-arrow-down',
152
- toggleItemMenu = function (e) {
153
- var element = $(e.target),
154
- parent = element[0].parentNode,
155
- parentLink,
156
- elementIconChild;
157
- if (parent) {
158
- if (!$(parent).hasClass('linked')) {
159
- e.preventDefault();
160
- } else {
161
- parentLink = parent.parentNode;
162
- if (parentLink && element.hasClass('link-name')) {
163
- $(parentLink).trigger('click');
164
- }
165
- }
166
- elementIconChild = parent.getElementsByClassName(faAngleUpClass)[0];
167
- if (!elementIconChild) {
168
- elementIconChild = parent.getElementsByClassName(faAngleDownClass)[0];
169
- }
170
- if (elementIconChild) {
171
- elementIconChild = $(elementIconChild);
172
- if (elementIconChild.hasClass(faAngleUpClass)) {
173
- elementIconChild.addClass(faAngleDownClass);
174
- elementIconChild.removeClass(faAngleUpClass);
175
- } else {
176
- elementIconChild.addClass(faAngleUpClass);
177
- elementIconChild.removeClass(faAngleDownClass);
178
- }
179
- }
180
- }
181
- };
182
-
183
- for (var i = 0; i < classnameMenuToggler.length; i++) {
184
- classnameMenuToggler[i].addEventListener('click', toggleItemMenu, false);
185
- }
186
-
187
- // Scroll to active link
188
- var menus = document.querySelectorAll('.menu'),
189
- i = 0,
190
- len = menus.length,
191
- activeMenu,
192
- activeMenuClass,
193
- activeLink;
194
-
195
- for (i; i < len; i++) {
196
- if (getComputedStyle(menus[i]).display != 'none') {
197
- activeMenu = menus[i];
198
- activeMenuClass = activeMenu.getAttribute('class').split(' ')[0];
199
- }
200
- }
201
-
202
- if (activeMenu) {
203
- activeLink = document.querySelector('.' + activeMenuClass + ' .active');
204
- if (activeLink) {
205
- var linkType = activeLink.getAttribute('data-type');
206
- var linkContext = activeLink.getAttribute('data-context');
207
- if (linkType === 'entity-link') {
208
- var parentLi = activeLink.parentNode,
209
- parentUl,
210
- parentChapterMenu;
211
- if (parentLi) {
212
- parentUl = parentLi.parentNode;
213
- if (parentUl) {
214
- parentChapterMenu = parentUl.parentNode;
215
- if (parentChapterMenu) {
216
- var toggler = parentChapterMenu.querySelector('.menu-toggler'),
217
- elementIconChild =
218
- toggler.getElementsByClassName(faAngleUpClass)[0];
219
- if (toggler && !elementIconChild) {
220
- toggler.click();
221
- }
222
- }
223
- }
224
- }
225
- if (linkContext && linkContext === 'sub-entity') {
226
- // Toggle also the master parent menu
227
- var linkContextId = activeLink.getAttribute('data-context-id');
228
- var toggler = activeMenu.querySelector(
229
- '.chapter.' + linkContextId + ' a .menu-toggler'
230
- );
231
- if (toggler) {
232
- toggler.click();
233
- }
234
- if (linkContextId === 'additional') {
235
- var mainToggler = activeMenu.querySelector(
236
- '.chapter.' + linkContextId + ' div.menu-toggler'
237
- );
238
- if (mainToggler) {
239
- mainToggler.click();
240
- }
241
- }
242
- }
243
- } else if (linkType === 'chapter-link') {
244
- var linkContextId = activeLink.getAttribute('data-context-id');
245
- var toggler = activeLink.querySelector('.menu-toggler');
246
- if (toggler) {
247
- toggler.click();
248
- }
249
- if (linkContextId === 'additional') {
250
- var mainToggler = activeMenu.querySelector(
251
- '.chapter.' + linkContextId + ' div.menu-toggler'
252
- );
253
- if (mainToggler) {
254
- mainToggler.click();
255
- }
256
- }
257
- }
258
- setTimeout(function () {
259
- activeMenu.scrollTop = activeLink.offsetTop;
260
- if (
261
- activeLink.innerHTML.toLowerCase().indexOf('readme') != -1 ||
262
- activeLink.innerHTML.toLowerCase().indexOf('overview') != -1
263
- ) {
264
- activeMenu.scrollTop = 0;
265
- }
266
- }, 300);
267
- }
268
- }
269
- // Dark mode toggle button
270
- var useDark = window.matchMedia('(prefers-color-scheme: dark)');
271
- var darkModeState = useDark.matches;
272
- var $darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
273
- var $darkModeToggles = document.querySelectorAll('.dark-mode-switch');
274
- var darkModeStateLocal = localStorage.getItem('compodoc_darkmode-state');
275
-
276
- function checkToggle(check) {
277
- for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
278
- $darkModeToggleSwitchers[i].checked = check;
279
- }
280
- }
281
-
282
- function toggleDarkMode(state) {
283
- if (window.localStorage) {
284
- localStorage.setItem('compodoc_darkmode-state', state);
285
- }
286
-
287
- checkToggle(state);
288
-
289
- const hasClass = document.body.classList.contains('dark');
290
-
291
- if (state) {
292
- for (var i = 0; i < $darkModeToggles.length; i++) {
293
- $darkModeToggles[i].classList.add('dark');
294
- }
295
- if (!hasClass) {
296
- document.body.classList.add('dark');
297
- }
298
- } else {
299
- for (var i = 0; i < $darkModeToggles.length; i++) {
300
- $darkModeToggles[i].classList.remove('dark');
301
- }
302
- if (hasClass) {
303
- document.body.classList.remove('dark');
304
- }
305
- }
306
- }
307
-
308
- useDark.addEventListener('change', function (evt) {
309
- toggleDarkMode(evt.matches);
310
- });
311
- if (darkModeStateLocal) {
312
- darkModeState = darkModeStateLocal === 'true';
313
- }
314
- toggleDarkMode(darkModeState);
315
-
316
- if ($darkModeToggles.length > 0) {
317
- for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
318
- $darkModeToggleSwitchers[i].addEventListener('change', function (event) {
319
- darkModeState = !darkModeState;
320
- toggleDarkMode(darkModeState);
321
- });
322
- }
323
- }
324
- }, 0);
325
- });
package/docs/js/routes.js DELETED
@@ -1,301 +0,0 @@
1
- document.addEventListener('DOMContentLoaded', function () {
2
- function htmlEntities(str) {
3
- return String(str)
4
- .replace(/&/g, '&amp;')
5
- .replace(/</g, '&lt;')
6
- .replace(/>/g, '&gt;')
7
- .replace(/"/g, '&quot;');
8
- }
9
-
10
- function foundLazyModuleWithPath(path) {
11
- //path is like app/customers/customers.module#CustomersModule
12
- var split = path.split('#'),
13
- lazyModulePath = split[0],
14
- lazyModuleName = split[1];
15
- return lazyModuleName;
16
- }
17
-
18
- function getBB(selection) {
19
- selection.each(function (d) {
20
- d.bbox = this.getBBox();
21
- });
22
- }
23
-
24
- var test_cases, test_case, test_case_num, engine;
25
-
26
- var tree = ROUTES_INDEX;
27
-
28
- function cleanStringChildren(obj) {
29
- for (var property in obj) {
30
- if (obj.hasOwnProperty(property)) {
31
- if (property === 'children' && typeof obj[property] === 'object') {
32
- for (var i = obj[property].length - 1; i >= 0; i--) {
33
- if (typeof obj[property][i] === 'string') {
34
- obj[property].splice(i, 1);
35
- }
36
- }
37
- }
38
- if (typeof obj[property] === 'object') {
39
- cleanStringChildren(obj[property]);
40
- }
41
- }
42
- }
43
- }
44
- cleanStringChildren(tree);
45
-
46
- engine = d3.layout.tree().setNodeSizes(true);
47
-
48
- engine.spacing(function (a, b) {
49
- return a.parent == b.parent ? 0 : engine.rootXSize();
50
- });
51
-
52
- engine.nodeSize(function (d) {
53
- return [
54
- document.getElementById(d.id).getBBox()['height'] + 70,
55
- document.getElementById(d.id).getBBox()['width'] + 30
56
- ];
57
- });
58
-
59
- var nodes = d3.layout.hierarchy()(tree),
60
- svg = d3.select('#body-routes').append('svg'),
61
- svg_g = svg.append('g'),
62
- svg_p = svg.append('g'),
63
- last_id = 0,
64
- node = svg_g
65
- .selectAll('.node')
66
- .data(nodes, function (d) {
67
- return d.id || (d.id = ++last_id);
68
- })
69
- .enter()
70
- .append('g')
71
- .attr('class', 'node');
72
-
73
- svg.attr('id', 'main');
74
-
75
- svg_g.attr('transform', 'translate(20,0)').attr('id', 'main-group');
76
-
77
- svg_p.attr('transform', 'translate(20,0)').attr('id', 'paths');
78
-
79
- var infos_group = node.append('g').attr({
80
- id: function (d) {
81
- return d.id;
82
- },
83
- dx: 0,
84
- dy: 0
85
- });
86
-
87
- //Node icon
88
- infos_group
89
- .append('text')
90
- .attr('font-family', 'Ionicons')
91
- .attr('y', 5)
92
- .attr('x', 0)
93
- .attr('class', function (d) {
94
- return d.children || d._children ? 'icon has-children' : 'icon';
95
- })
96
- .attr('font-size', function (d) {
97
- return '15px';
98
- })
99
- .text(function (d) {
100
- return '\uf183';
101
- });
102
-
103
- //node infos
104
- infos_group
105
- .append('svg:text')
106
- .attr('x', function (d) {
107
- return 0;
108
- })
109
- .attr('y', function (d) {
110
- return 10;
111
- })
112
- .attr('dy', '.35em')
113
- .attr('class', 'text')
114
- .attr('text-anchor', function (d) {
115
- return 'start';
116
- })
117
- .html(function (d) {
118
- // if kind === module name + module
119
- // if kind === component component + path
120
- var _name = '';
121
- if (d.kind === 'module') {
122
- if (d.module) {
123
- _name +=
124
- '<tspan x="0" dy="1.4em"><a href="./modules/' +
125
- d.module +
126
- '.html">' +
127
- d.module +
128
- '</a></tspan>';
129
- if (d.name) {
130
- _name += '<tspan x="0" dy="1.4em">' + d.name + '</tspan>';
131
- }
132
- } else {
133
- _name += '<tspan x="0" dy="1.4em">' + htmlEntities(d.name) + '</tspan>';
134
- }
135
- } else if (d.kind === 'component') {
136
- _name += '<tspan x="0" dy="1.4em">' + d.path + '</tspan>';
137
- _name +=
138
- '<tspan x="0" dy="1.4em"><a href="./components/' +
139
- d.component +
140
- '.html">' +
141
- d.component +
142
- '</a></tspan>';
143
- if (d.outlet) {
144
- _name += '<tspan x="0" dy="1.4em">&lt;outlet&gt; : ' + d.outlet + '</tspan>';
145
- }
146
- } else {
147
- _name += '<tspan x="0" dy="1.4em">/' + d.path + '</tspan>';
148
- if (d.component) {
149
- _name +=
150
- '<tspan x="0" dy="1.4em"><a href="./components/' +
151
- d.component +
152
- '.html">' +
153
- d.component +
154
- '</a></tspan>';
155
- }
156
- if (d.loadChildren) {
157
- var moduleName = foundLazyModuleWithPath(d.loadChildren);
158
- _name +=
159
- '<tspan x="0" dy="1.4em"><a href="./modules/' +
160
- moduleName +
161
- '.html">' +
162
- moduleName +
163
- '</a></tspan>';
164
- }
165
- if (d.canActivate) {
166
- _name += '<tspan x="0" dy="1.4em">&#10003; canActivate</tspan>';
167
- }
168
- if (d.canDeactivate) {
169
- _name += '<tspan x="0" dy="1.4em">&#215;&nbsp;&nbsp;canDeactivate</tspan>';
170
- }
171
- if (d.canActivateChild) {
172
- _name += '<tspan x="0" dy="1.4em">&#10003; canActivateChild</tspan>';
173
- }
174
- if (d.canLoad) {
175
- _name += '<tspan x="0" dy="1.4em">&#8594; canLoad</tspan>';
176
- }
177
- if (d.redirectTo) {
178
- _name += '<tspan x="0" dy="1.4em">&rarr; ' + d.redirectTo + '</tspan>';
179
- }
180
- if (d.pathMatch) {
181
- _name += '<tspan x="0" dy="1.4em">&gt; ' + d.pathMatch + '</tspan>';
182
- }
183
- if (d.outlet) {
184
- _name += '<tspan x="0" dy="1.4em">&lt;outlet&gt; : ' + d.outlet + '</tspan>';
185
- }
186
- }
187
- return _name;
188
- })
189
- .call(getBB);
190
-
191
- //
192
- // Node lazy loaded ?
193
- //
194
- infos_group
195
- .append('svg:text')
196
- .attr('y', function (d) {
197
- return 45;
198
- })
199
- .attr('x', function (d) {
200
- return -18;
201
- })
202
- .attr('font-family', 'Ionicons')
203
- .attr('class', function (d) {
204
- return 'icon';
205
- })
206
- .attr('font-size', function (d) {
207
- return '15px';
208
- })
209
- .text(function (d) {
210
- var _text = '';
211
- if (d.loadChildren || d.loadComponent) {
212
- _text = '\uf4c1';
213
- }
214
- if (d.guarded) {
215
- _text = '\uf1b0';
216
- }
217
- return _text;
218
- });
219
-
220
- //Node text background
221
- infos_group
222
- .insert('rect', 'text')
223
- .attr('width', function (d) {
224
- return d.bbox.width;
225
- })
226
- .attr('height', function (d) {
227
- return d.bbox.height;
228
- })
229
- .attr('y', function (d) {
230
- return 15;
231
- })
232
- .style('fill', 'white')
233
- .style('fill-opacity', 0.75);
234
-
235
- nodes = engine.nodes(tree);
236
-
237
- function node_extents(n) {
238
- return [n.x - n.x_size / 2, n.y, n.x + n.x_size / 2, n.y + n.y_size];
239
- }
240
- var root_extents = node_extents(nodes[0]);
241
- var xmin = root_extents[0],
242
- ymin = root_extents[1],
243
- xmax = root_extents[2],
244
- ymax = root_extents[3],
245
- area_sum = (xmax - xmin) * (ymax - ymin),
246
- x_size_min = nodes[0].x_size,
247
- y_size_min = nodes[0].y_size;
248
-
249
- nodes.slice(1).forEach(function (n) {
250
- var ne = node_extents(n);
251
- xmin = Math.min(xmin, ne[0]);
252
- ymin = Math.min(ymin, ne[1]);
253
- xmax = Math.max(xmax, ne[2]);
254
- ymax = Math.max(ymax, ne[3]);
255
- area_sum += (ne[2] - ne[0]) * (ne[3] - ne[1]);
256
- x_size_min = Math.min(x_size_min, n.x_size);
257
- y_size_min = Math.min(y_size_min, n.y_size);
258
- });
259
-
260
- var area_ave = area_sum / nodes.length;
261
- var scale = 80 / Math.sqrt(area_ave);
262
-
263
- function svg_x(node_y) {
264
- return node_y - ymin;
265
- }
266
-
267
- function svg_y(node_x) {
268
- return (node_x - xmin) * scale;
269
- }
270
-
271
- var nodebox_right_margin = Math.min(x_size_min * scale, 10);
272
- var nodebox_vertical_margin = Math.min(y_size_min * scale, 3);
273
-
274
- node.attr('transform', function (d) {
275
- return 'translate(' + svg_x(d.y) + ',' + svg_y(d.x) + ')';
276
- });
277
-
278
- var diagonal = d3.svg.diagonal().projection(function (d) {
279
- return [svg_x(d.y), svg_y(d.x)];
280
- });
281
-
282
- var links = engine.links(nodes);
283
- var links = svg_p
284
- .selectAll('.link')
285
- .data(links)
286
- .enter()
287
- .append('path')
288
- .attr('class', 'link')
289
- .attr('d', diagonal);
290
-
291
- var _svg = document.getElementById('main'),
292
- main_g = _svg.childNodes[0];
293
-
294
- _svg.removeChild(main_g);
295
- _svg.appendChild(main_g);
296
-
297
- svg.attr({
298
- width: document.getElementById('main-group').getBBox()['width'] + 30,
299
- height: document.getElementById('main-group').getBBox()['height'] + 50
300
- });
301
- });