@rxap/ngx-memory 21.0.1 → 22.0.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/compodoc/architecture.html +222 -0
- package/compodoc/changelog.html +57 -5
- package/compodoc/classes/MockStorage.html +114 -37
- package/compodoc/dependencies.html +80 -13
- package/compodoc/index.html +46 -5
- package/compodoc/injectables/EphemeralStorageService.html +107 -24
- package/compodoc/injectables/LocalStorageService.html +107 -24
- package/compodoc/injectables/SessionStorageService.html +107 -24
- package/compodoc/injectables/StorageService.html +96 -18
- package/compodoc/js/architecture-graph.js +288 -0
- package/compodoc/js/libs/bootstrap-native.js +4 -2
- package/compodoc/js/libs/jszip.min.js +13 -0
- package/compodoc/js/libs/svg-pan-zoom.min.js +3 -3
- package/compodoc/js/libs/tablesort.min.js +3 -3
- package/compodoc/js/libs/tablesort.number.min.js +3 -3
- package/compodoc/js/libs/vis-network.min.js +78 -0
- package/compodoc/js/menu-wc.js +25 -12
- package/compodoc/js/menu.js +10 -11
- package/compodoc/js/routes/routes_index.js +1 -0
- package/compodoc/js/routes.js +142 -34
- package/compodoc/js/search/search-lunr.js +6 -8
- package/compodoc/js/search/search.js +118 -66
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/js/tabs.js +98 -15
- package/compodoc/js/tree.js +44 -7
- package/compodoc/license.html +48 -6
- package/compodoc/llms.txt +106 -0
- package/compodoc/miscellaneous/functions.html +75 -23
- package/compodoc/miscellaneous/typealiases.html +46 -4
- package/compodoc/miscellaneous/variables.html +58 -5
- package/compodoc/modules.html +44 -3
- package/compodoc/overview.html +54 -3
- package/compodoc/properties.html +45 -4
- package/compodoc/routes.html +227 -0
- package/compodoc/styles/compodoc.css +365 -44
- package/compodoc/styles/dark.css +16 -0
- package/compodoc/template-playground/default-templates.json +192 -0
- package/compodoc/template-playground/hbs-render.service.ts +217 -0
- package/compodoc/template-playground/main.ts +9 -0
- package/compodoc/template-playground/template-editor.service.ts +173 -0
- package/compodoc/template-playground/template-playground.component.ts +614 -0
- package/compodoc/template-playground/template-playground.module.ts +29 -0
- package/compodoc/template-playground/zip-export.service.ts +86 -0
- package/compodoc/template-playground-app/app.js +1389 -0
- package/compodoc/template-playground-app/index.html +462 -0
- package/compodoc/todo.html +45 -60
- package/docs/documentation.json +490 -415
- package/docs/html/assets/highlight.css +1 -1
- package/docs/html/assets/icons.js +1 -1
- package/docs/html/assets/icons.svg +1 -1
- package/docs/html/assets/main.js +5 -5
- package/docs/html/assets/search.js +1 -1
- package/docs/html/assets/style.css +265 -228
- package/docs/html/classes/EphemeralStorageService.html +151 -9
- package/docs/html/classes/LocalStorageService.html +151 -9
- package/docs/html/classes/MockStorage.html +185 -15
- package/docs/html/classes/SessionStorageService.html +151 -9
- package/docs/html/classes/StorageService.html +151 -9
- package/docs/html/functions/LocalStorage.html +52 -5
- package/docs/html/functions/SessionStorage.html +52 -5
- package/docs/html/functions/StorageGet.html +43 -1
- package/docs/html/functions/StorageHas.html +43 -1
- package/docs/html/functions/StorageKey.html +43 -1
- package/docs/html/functions/StorageRemove.html +43 -1
- package/docs/html/functions/StorageSet.html +46 -1
- package/docs/html/functions/WebStorage.html +45 -1
- package/docs/html/functions/getExpired.html +43 -1
- package/docs/html/functions/stringify.html +42 -1
- package/docs/html/hierarchy.html +35 -1
- package/docs/html/index.html +40 -4
- package/docs/html/modules.html +48 -1
- package/docs/html/types/ExpiredUnit.html +35 -2
- package/docs/html/variables/isBrowser.html +35 -2
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/EphemeralStorageService.md +17 -17
- package/docs/markdown/classes/LocalStorageService.md +17 -17
- package/docs/markdown/classes/MockStorage.md +22 -22
- package/docs/markdown/classes/SessionStorageService.md +17 -17
- package/docs/markdown/classes/StorageService.md +18 -18
- package/docs/markdown/functions/LocalStorage.md +4 -18
- package/docs/markdown/functions/SessionStorage.md +4 -18
- package/docs/markdown/functions/StorageGet.md +3 -3
- package/docs/markdown/functions/StorageHas.md +3 -3
- package/docs/markdown/functions/StorageKey.md +5 -5
- package/docs/markdown/functions/StorageRemove.md +3 -3
- package/docs/markdown/functions/StorageSet.md +6 -6
- package/docs/markdown/functions/WebStorage.md +5 -19
- package/docs/markdown/functions/getExpired.md +2 -2
- package/docs/markdown/functions/stringify.md +2 -2
- package/docs/markdown/globals.md +2 -2
- package/docs/markdown/type-aliases/ExpiredUnit.md +3 -3
- package/docs/markdown/variables/isBrowser.md +2 -2
- package/docs/wiki/Class.EphemeralStorageService.md +16 -16
- package/docs/wiki/Class.LocalStorageService.md +16 -16
- package/docs/wiki/Class.MockStorage.md +21 -21
- package/docs/wiki/Class.SessionStorageService.md +16 -16
- package/docs/wiki/Class.StorageService.md +17 -17
- package/docs/wiki/Function.LocalStorage.md +3 -17
- package/docs/wiki/Function.SessionStorage.md +3 -17
- package/docs/wiki/Function.StorageGet.md +2 -2
- package/docs/wiki/Function.StorageHas.md +2 -2
- package/docs/wiki/Function.StorageKey.md +4 -4
- package/docs/wiki/Function.StorageRemove.md +2 -2
- package/docs/wiki/Function.StorageSet.md +5 -5
- package/docs/wiki/Function.WebStorage.md +4 -18
- package/docs/wiki/Function.getExpired.md +1 -1
- package/docs/wiki/Function.stringify.md +1 -1
- package/docs/wiki/TypeAlias.ExpiredUnit.md +2 -2
- package/docs/wiki/Variable.isBrowser.md +1 -1
- package/docs/wiki/globals.md +1 -1
- package/fesm2022/rxap-ngx-memory.mjs +260 -258
- package/fesm2022/rxap-ngx-memory.mjs.map +1 -1
- package/package.json +6 -6
- package/types/rxap-ngx-memory.d.ts +53 -61
package/compodoc/js/menu-wc.js
CHANGED
|
@@ -19,20 +19,29 @@ 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">
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
<li class="link">
|
|
34
|
+
<a href="overview.html" data-type="chapter-link">
|
|
35
|
+
<span class="icon ion-ios-keypad"></span>Overview
|
|
36
|
+
</a>
|
|
37
|
+
</li>
|
|
38
|
+
|
|
39
|
+
<li class="link">
|
|
40
|
+
<a href="index.html" data-type="chapter-link">
|
|
41
|
+
<span class="icon ion-ios-paper"></span>
|
|
42
|
+
README
|
|
43
|
+
</a>
|
|
44
|
+
</li>
|
|
36
45
|
<li class="link">
|
|
37
46
|
<a href="changelog.html" data-type="chapter-link">
|
|
38
47
|
<span class="icon ion-ios-paper"></span>CHANGELOG
|
|
@@ -58,6 +67,7 @@ customElements.define('compodoc-menu', class extends HTMLElement {
|
|
|
58
67
|
<span class="icon ion-ios-apps"></span>Properties
|
|
59
68
|
</a>
|
|
60
69
|
</li>
|
|
70
|
+
|
|
61
71
|
</ul>
|
|
62
72
|
</li>
|
|
63
73
|
<li class="chapter">
|
|
@@ -114,6 +124,9 @@ customElements.define('compodoc-menu', class extends HTMLElement {
|
|
|
114
124
|
</li>
|
|
115
125
|
</ul>
|
|
116
126
|
</li>
|
|
127
|
+
<li class="chapter">
|
|
128
|
+
<a data-type="chapter-link" href="routes.html"><span class="icon ion-ios-git-branch"></span>Routes</a>
|
|
129
|
+
</li>
|
|
117
130
|
<li class="divider"></li>
|
|
118
131
|
<li class="copyright">
|
|
119
132
|
Documentation generated using <a href="https://compodoc.app/" target="_blank" rel="noopener noreferrer">
|
|
@@ -125,4 +138,4 @@ customElements.define('compodoc-menu', class extends HTMLElement {
|
|
|
125
138
|
`);
|
|
126
139
|
this.innerHTML = tp.strings;
|
|
127
140
|
}
|
|
128
|
-
});
|
|
141
|
+
});
|
package/compodoc/js/menu.js
CHANGED
|
@@ -150,17 +150,17 @@ document.addEventListener('DOMContentLoaded', function () {
|
|
|
150
150
|
faAngleUpClass = 'ion-ios-arrow-up',
|
|
151
151
|
faAngleDownClass = 'ion-ios-arrow-down',
|
|
152
152
|
toggleItemMenu = function (e) {
|
|
153
|
-
var element =
|
|
154
|
-
parent = element
|
|
153
|
+
var element = e.target,
|
|
154
|
+
parent = element.parentNode,
|
|
155
155
|
parentLink,
|
|
156
156
|
elementIconChild;
|
|
157
157
|
if (parent) {
|
|
158
|
-
if (
|
|
158
|
+
if (!parent.classList.contains('linked')) {
|
|
159
159
|
e.preventDefault();
|
|
160
160
|
} else {
|
|
161
161
|
parentLink = parent.parentNode;
|
|
162
|
-
if (parentLink && element.
|
|
163
|
-
|
|
162
|
+
if (parentLink && element.classList.contains('link-name')) {
|
|
163
|
+
parentLink.trigger('click');
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
elementIconChild = parent.getElementsByClassName(faAngleUpClass)[0];
|
|
@@ -168,13 +168,12 @@ document.addEventListener('DOMContentLoaded', function () {
|
|
|
168
168
|
elementIconChild = parent.getElementsByClassName(faAngleDownClass)[0];
|
|
169
169
|
}
|
|
170
170
|
if (elementIconChild) {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
elementIconChild.
|
|
174
|
-
elementIconChild.removeClass(faAngleUpClass);
|
|
171
|
+
if (elementIconChild.classList.contains(faAngleUpClass)) {
|
|
172
|
+
elementIconChild.classList.add(faAngleDownClass);
|
|
173
|
+
elementIconChild.classList.remove(faAngleUpClass);
|
|
175
174
|
} else {
|
|
176
|
-
elementIconChild.
|
|
177
|
-
elementIconChild.
|
|
175
|
+
elementIconChild.classList.add(faAngleUpClass);
|
|
176
|
+
elementIconChild.classList.remove(faAngleDownClass);
|
|
178
177
|
}
|
|
179
178
|
}
|
|
180
179
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var ROUTES_INDEX = {"name":"<root>","kind":"module","children":[]}
|
package/compodoc/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,49 +204,66 @@ document.addEventListener('DOMContentLoaded', function () {
|
|
|
118
204
|
// if kind === module name + module
|
|
119
205
|
// if kind === component component + path
|
|
120
206
|
var _name = '';
|
|
207
|
+
var nodeHref = resolveNodeHref(d);
|
|
121
208
|
if (d.kind === 'module') {
|
|
122
209
|
if (d.module) {
|
|
123
210
|
_name +=
|
|
124
|
-
'<tspan x="0" dy="1.4em"
|
|
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 += '<tspan x="0" dy="1.4em">' + d.path + '</tspan>';
|
|
137
224
|
_name +=
|
|
138
|
-
'<tspan x="0" dy="1.4em"
|
|
139
|
-
d.
|
|
140
|
-
'
|
|
141
|
-
|
|
142
|
-
|
|
225
|
+
'<tspan x="0" dy="1.4em">' +
|
|
226
|
+
wrapLabelWithLink(d.path || d.name, nodeHref) +
|
|
227
|
+
'</tspan>';
|
|
228
|
+
if (d.component) {
|
|
229
|
+
_name +=
|
|
230
|
+
'<tspan x="0" dy="1.4em">' +
|
|
231
|
+
wrapLabelWithLink(d.component, nodeHref) +
|
|
232
|
+
'</tspan>';
|
|
233
|
+
} else if (d.name && d.name.includes('Component')) {
|
|
234
|
+
_name += '<tspan x="0" dy="1.4em">' + wrapLabelWithLink(d.name, nodeHref) + '</tspan>';
|
|
235
|
+
}
|
|
143
236
|
if (d.outlet) {
|
|
144
237
|
_name += '<tspan x="0" dy="1.4em"><outlet> : ' + d.outlet + '</tspan>';
|
|
145
238
|
}
|
|
146
239
|
} else {
|
|
147
|
-
|
|
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
|
+
}
|
|
148
253
|
if (d.component) {
|
|
149
254
|
_name +=
|
|
150
|
-
'<tspan x="0" dy="1.4em"
|
|
151
|
-
d.component +
|
|
152
|
-
'
|
|
153
|
-
d.component +
|
|
154
|
-
'</a></tspan>';
|
|
255
|
+
'<tspan x="0" dy="1.4em">' +
|
|
256
|
+
wrapLabelWithLink(d.component, nodeHref) +
|
|
257
|
+
'</tspan>';
|
|
155
258
|
}
|
|
156
259
|
if (d.loadChildren) {
|
|
157
260
|
var moduleName = foundLazyModuleWithPath(d.loadChildren);
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
261
|
+
if (moduleName && moduleName !== 'default') {
|
|
262
|
+
_name +=
|
|
263
|
+
'<tspan x="0" dy="1.4em">' +
|
|
264
|
+
wrapLabelWithLink(moduleName, './modules/' + moduleName + '.html') +
|
|
265
|
+
'</tspan>';
|
|
266
|
+
}
|
|
164
267
|
}
|
|
165
268
|
if (d.canActivate) {
|
|
166
269
|
_name += '<tspan x="0" dy="1.4em">✓ canActivate</tspan>';
|
|
@@ -174,10 +277,10 @@ document.addEventListener('DOMContentLoaded', function () {
|
|
|
174
277
|
if (d.canLoad) {
|
|
175
278
|
_name += '<tspan x="0" dy="1.4em">→ canLoad</tspan>';
|
|
176
279
|
}
|
|
177
|
-
if (d.redirectTo) {
|
|
280
|
+
if (d.kind !== 'route-redirect' && d.redirectTo) {
|
|
178
281
|
_name += '<tspan x="0" dy="1.4em">→ ' + d.redirectTo + '</tspan>';
|
|
179
282
|
}
|
|
180
|
-
if (d.pathMatch) {
|
|
283
|
+
if (d.kind !== 'route-redirect' && d.pathMatch) {
|
|
181
284
|
_name += '<tspan x="0" dy="1.4em">> ' + d.pathMatch + '</tspan>';
|
|
182
285
|
}
|
|
183
286
|
if (d.outlet) {
|
|
@@ -259,11 +362,16 @@ document.addEventListener('DOMContentLoaded', function () {
|
|
|
259
362
|
|
|
260
363
|
var area_ave = area_sum / nodes.length;
|
|
261
364
|
var scale = 80 / Math.sqrt(area_ave);
|
|
365
|
+
var depthHorizontalSpacing = 40;
|
|
262
366
|
|
|
263
367
|
function svg_x(node_y) {
|
|
264
368
|
return node_y - ymin;
|
|
265
369
|
}
|
|
266
370
|
|
|
371
|
+
function projected_x(node) {
|
|
372
|
+
return svg_x(node.y) + (node.depth || 0) * depthHorizontalSpacing;
|
|
373
|
+
}
|
|
374
|
+
|
|
267
375
|
function svg_y(node_x) {
|
|
268
376
|
return (node_x - xmin) * scale;
|
|
269
377
|
}
|
|
@@ -272,11 +380,11 @@ document.addEventListener('DOMContentLoaded', function () {
|
|
|
272
380
|
var nodebox_vertical_margin = Math.min(y_size_min * scale, 3);
|
|
273
381
|
|
|
274
382
|
node.attr('transform', function (d) {
|
|
275
|
-
return 'translate(' +
|
|
383
|
+
return 'translate(' + projected_x(d) + ',' + svg_y(d.x) + ')';
|
|
276
384
|
});
|
|
277
385
|
|
|
278
386
|
var diagonal = d3.svg.diagonal().projection(function (d) {
|
|
279
|
-
return [
|
|
387
|
+
return [projected_x(d), svg_y(d.x)];
|
|
280
388
|
});
|
|
281
389
|
|
|
282
390
|
var links = engine.links(nodes);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
(function(compodoc) {
|
|
2
|
-
|
|
1
|
+
(function (compodoc) {
|
|
3
2
|
function LunrSearchEngine() {
|
|
4
3
|
this.index = undefined;
|
|
5
4
|
this.store = {};
|
|
6
5
|
this.name = 'LunrSearchEngine';
|
|
7
6
|
}
|
|
8
7
|
|
|
9
|
-
LunrSearchEngine.prototype.init = function() {
|
|
8
|
+
LunrSearchEngine.prototype.init = function () {
|
|
10
9
|
var that = this,
|
|
11
10
|
d = new promise.Promise();
|
|
12
11
|
|
|
@@ -17,13 +16,13 @@
|
|
|
17
16
|
return d;
|
|
18
17
|
};
|
|
19
18
|
|
|
20
|
-
LunrSearchEngine.prototype.search = function(q, offset, length) {
|
|
19
|
+
LunrSearchEngine.prototype.search = function (q, offset, length) {
|
|
21
20
|
var that = this,
|
|
22
21
|
results = [],
|
|
23
22
|
d = new promise.Promise();
|
|
24
23
|
|
|
25
24
|
if (this.index) {
|
|
26
|
-
results =
|
|
25
|
+
results = this.index.search('*' + q + '*').map(function (result) {
|
|
27
26
|
var doc = that.store[result.ref];
|
|
28
27
|
|
|
29
28
|
return {
|
|
@@ -43,7 +42,7 @@
|
|
|
43
42
|
return d;
|
|
44
43
|
};
|
|
45
44
|
|
|
46
|
-
compodoc.addEventListener(compodoc.EVENTS.READY, function(event) {
|
|
45
|
+
compodoc.addEventListener(compodoc.EVENTS.READY, function (event) {
|
|
47
46
|
var engine = new LunrSearchEngine(),
|
|
48
47
|
initialized = false;
|
|
49
48
|
|
|
@@ -56,8 +55,7 @@
|
|
|
56
55
|
query: query
|
|
57
56
|
};
|
|
58
57
|
|
|
59
|
-
engine.init()
|
|
60
|
-
.then(function() {
|
|
58
|
+
engine.init().then(function () {
|
|
61
59
|
initialized = true;
|
|
62
60
|
compodoc.dispatchEvent({
|
|
63
61
|
type: compodoc.EVENTS.SEARCH_READY
|