@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
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Compodoc Template Playground</title>
|
|
7
|
+
<link rel="icon" type="image/x-icon" href="../images/favicon.ico">
|
|
8
|
+
|
|
9
|
+
<!-- Compodoc CSS files -->
|
|
10
|
+
<link rel="stylesheet" href="../styles/bootstrap.min.css">
|
|
11
|
+
<link rel="stylesheet" href="../styles/compodoc.css">
|
|
12
|
+
<link rel="stylesheet" href="../styles/prism.css">
|
|
13
|
+
<link rel="stylesheet" href="../styles/dark.css">
|
|
14
|
+
<link rel="stylesheet" href="../styles/style.css">
|
|
15
|
+
|
|
16
|
+
<!-- Monaco Editor -->
|
|
17
|
+
<script src="https://cdn.jsdelivr.net/npm/monaco-editor@0.45.0/min/vs/loader.js"></script>
|
|
18
|
+
|
|
19
|
+
<!-- JSZip for creating ZIP files -->
|
|
20
|
+
<script src="https://unpkg.com/jszip@3.10.1/dist/jszip.min.js"
|
|
21
|
+
onerror="console.error('Failed to load JSZip from unpkg, trying cdnjs fallback'); this.remove(); var script = document.createElement('script'); script.src = 'https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js'; script.onerror = function() { console.error('Failed to load JSZip from all CDNs'); window.JSZipLoadError = true; }; document.head.appendChild(script);"></script>
|
|
22
|
+
|
|
23
|
+
<!-- Font Awesome for icons -->
|
|
24
|
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
|
|
25
|
+
|
|
26
|
+
<!-- Custom CSS -->
|
|
27
|
+
<style>
|
|
28
|
+
body {
|
|
29
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
30
|
+
background-color: #f8f9fa;
|
|
31
|
+
margin: 0;
|
|
32
|
+
padding: 0;
|
|
33
|
+
height: 100vh;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.playground-container {
|
|
38
|
+
display: flex;
|
|
39
|
+
height: 100vh;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.playground-header {
|
|
44
|
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
45
|
+
color: white;
|
|
46
|
+
padding: 1rem 1.5rem;
|
|
47
|
+
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
|
48
|
+
z-index: 1000;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.playground-title {
|
|
52
|
+
margin: 0;
|
|
53
|
+
font-size: 1.5rem;
|
|
54
|
+
font-weight: 600;
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
gap: 0.5rem;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.playground-subtitle {
|
|
61
|
+
margin: 0.25rem 0 0 0;
|
|
62
|
+
font-size: 0.9rem;
|
|
63
|
+
opacity: 0.9;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.playground-content {
|
|
67
|
+
display: flex;
|
|
68
|
+
flex: 1;
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.variables-panel {
|
|
73
|
+
width: 350px;
|
|
74
|
+
background: white;
|
|
75
|
+
border-right: 1px solid #e9ecef;
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-direction: column;
|
|
78
|
+
height: 100%;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.template-panel {
|
|
82
|
+
flex: 1;
|
|
83
|
+
background: white;
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
height: 100%;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.panel-header {
|
|
90
|
+
background: #f8f9fa;
|
|
91
|
+
border-bottom: 1px solid #e9ecef;
|
|
92
|
+
padding: 1rem 1.5rem;
|
|
93
|
+
font-weight: 600;
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: space-between;
|
|
97
|
+
min-height: 60px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.panel-content {
|
|
101
|
+
flex: 1;
|
|
102
|
+
overflow: auto;
|
|
103
|
+
padding: 1rem;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.template-selection {
|
|
107
|
+
margin-bottom: 1rem;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.template-select {
|
|
111
|
+
width: 100%;
|
|
112
|
+
padding: 0.5rem;
|
|
113
|
+
border: 1px solid #ddd;
|
|
114
|
+
border-radius: 0.375rem;
|
|
115
|
+
font-size: 0.9rem;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.variable-item {
|
|
119
|
+
background: #f8f9fa;
|
|
120
|
+
border: 1px solid #e9ecef;
|
|
121
|
+
border-radius: 0.375rem;
|
|
122
|
+
padding: 0.75rem;
|
|
123
|
+
margin-bottom: 0.5rem;
|
|
124
|
+
position: relative;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.variable-name {
|
|
128
|
+
font-weight: 600;
|
|
129
|
+
font-size: 0.9rem;
|
|
130
|
+
color: #495057;
|
|
131
|
+
margin-bottom: 0.25rem;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.variable-type {
|
|
135
|
+
font-size: 0.8rem;
|
|
136
|
+
color: #6c757d;
|
|
137
|
+
margin-bottom: 0.5rem;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.variable-value {
|
|
141
|
+
width: 100%;
|
|
142
|
+
padding: 0.375rem;
|
|
143
|
+
border: 1px solid #ddd;
|
|
144
|
+
border-radius: 0.25rem;
|
|
145
|
+
font-size: 0.85rem;
|
|
146
|
+
font-family: 'Courier New', monospace;
|
|
147
|
+
background: white;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.variable-actions {
|
|
151
|
+
position: absolute;
|
|
152
|
+
top: 0.5rem;
|
|
153
|
+
right: 0.5rem;
|
|
154
|
+
display: flex;
|
|
155
|
+
gap: 0.25rem;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.btn-icon {
|
|
159
|
+
padding: 0.25rem;
|
|
160
|
+
width: 24px;
|
|
161
|
+
height: 24px;
|
|
162
|
+
border: none;
|
|
163
|
+
border-radius: 0.25rem;
|
|
164
|
+
display: flex;
|
|
165
|
+
align-items: center;
|
|
166
|
+
justify-content: center;
|
|
167
|
+
font-size: 0.7rem;
|
|
168
|
+
cursor: pointer;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.btn-icon:hover {
|
|
172
|
+
transform: scale(1.1);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.add-variable-section {
|
|
176
|
+
border-top: 1px solid #e9ecef;
|
|
177
|
+
padding-top: 1rem;
|
|
178
|
+
margin-top: 1rem;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.add-variable-form {
|
|
182
|
+
display: flex;
|
|
183
|
+
flex-direction: column;
|
|
184
|
+
gap: 0.5rem;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.add-variable-input {
|
|
188
|
+
padding: 0.375rem;
|
|
189
|
+
border: 1px solid #ddd;
|
|
190
|
+
border-radius: 0.25rem;
|
|
191
|
+
font-size: 0.85rem;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.template-preview-container {
|
|
195
|
+
flex: 1;
|
|
196
|
+
display: flex;
|
|
197
|
+
flex-direction: column;
|
|
198
|
+
overflow: hidden;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.template-editor-container {
|
|
202
|
+
height: 40%;
|
|
203
|
+
border-bottom: 1px solid #e9ecef;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.template-preview {
|
|
207
|
+
flex: 1;
|
|
208
|
+
background: white;
|
|
209
|
+
overflow: auto;
|
|
210
|
+
padding: 1rem;
|
|
211
|
+
border: 1px solid #e9ecef;
|
|
212
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.toolbar {
|
|
216
|
+
display: flex;
|
|
217
|
+
gap: 0.5rem;
|
|
218
|
+
align-items: center;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.btn-toolbar {
|
|
222
|
+
padding: 0.5rem 1rem;
|
|
223
|
+
border: 1px solid #ddd;
|
|
224
|
+
border-radius: 0.375rem;
|
|
225
|
+
background: white;
|
|
226
|
+
color: #495057;
|
|
227
|
+
font-size: 0.85rem;
|
|
228
|
+
cursor: pointer;
|
|
229
|
+
display: flex;
|
|
230
|
+
align-items: center;
|
|
231
|
+
gap: 0.5rem;
|
|
232
|
+
transition: all 0.2s;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.btn-toolbar:hover {
|
|
236
|
+
background: #f8f9fa;
|
|
237
|
+
border-color: #007bff;
|
|
238
|
+
color: #007bff;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.btn-primary {
|
|
242
|
+
background: #007bff;
|
|
243
|
+
color: white;
|
|
244
|
+
border-color: #007bff;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.btn-primary:hover {
|
|
248
|
+
background: #0056b3;
|
|
249
|
+
border-color: #0056b3;
|
|
250
|
+
color: white;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.error-message {
|
|
254
|
+
background: #f8d7da;
|
|
255
|
+
color: #721c24;
|
|
256
|
+
padding: 0.75rem;
|
|
257
|
+
border-radius: 0.375rem;
|
|
258
|
+
margin-bottom: 1rem;
|
|
259
|
+
border: 1px solid #f5c6cb;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.success-message {
|
|
263
|
+
background: #d4edda;
|
|
264
|
+
color: #155724;
|
|
265
|
+
padding: 0.75rem;
|
|
266
|
+
border-radius: 0.375rem;
|
|
267
|
+
margin-bottom: 1rem;
|
|
268
|
+
border: 1px solid #c3e6cb;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.resizer {
|
|
272
|
+
width: 4px;
|
|
273
|
+
background: #e9ecef;
|
|
274
|
+
cursor: col-resize;
|
|
275
|
+
transition: background-color 0.2s;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.resizer:hover {
|
|
279
|
+
background: #007bff;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.template-metadata {
|
|
283
|
+
font-size: 0.8rem;
|
|
284
|
+
color: #6c757d;
|
|
285
|
+
margin-bottom: 1rem;
|
|
286
|
+
padding: 0.5rem;
|
|
287
|
+
background: #f8f9fa;
|
|
288
|
+
border-radius: 0.375rem;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.loading {
|
|
292
|
+
display: flex;
|
|
293
|
+
align-items: center;
|
|
294
|
+
justify-content: center;
|
|
295
|
+
flex: 1;
|
|
296
|
+
color: #6c757d;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.spinner {
|
|
300
|
+
width: 20px;
|
|
301
|
+
height: 20px;
|
|
302
|
+
border: 2px solid #f3f3f3;
|
|
303
|
+
border-top: 2px solid #007bff;
|
|
304
|
+
border-radius: 50%;
|
|
305
|
+
animation: spin 1s linear infinite;
|
|
306
|
+
margin-right: 0.5rem;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
@keyframes spin {
|
|
310
|
+
0% { transform: rotate(0deg); }
|
|
311
|
+
100% { transform: rotate(360deg); }
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/* Responsive design */
|
|
315
|
+
@media (max-width: 768px) {
|
|
316
|
+
.playground-content {
|
|
317
|
+
flex-direction: column;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.variables-panel {
|
|
321
|
+
width: 100%;
|
|
322
|
+
height: 40%;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.template-panel {
|
|
326
|
+
height: 60%;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
</style>
|
|
330
|
+
</head>
|
|
331
|
+
<body>
|
|
332
|
+
<div class="playground-container">
|
|
333
|
+
<!-- Header -->
|
|
334
|
+
<div class="playground-header">
|
|
335
|
+
<h1 class="playground-title">
|
|
336
|
+
<i class="fas fa-code"></i>
|
|
337
|
+
Compodoc Template Playground
|
|
338
|
+
</h1>
|
|
339
|
+
<p class="playground-subtitle">
|
|
340
|
+
Customize and preview Handlebars templates with live data
|
|
341
|
+
</p>
|
|
342
|
+
</div>
|
|
343
|
+
|
|
344
|
+
<!-- Main Content -->
|
|
345
|
+
<div class="playground-content">
|
|
346
|
+
<!-- Variables/Properties Panel -->
|
|
347
|
+
<div class="variables-panel">
|
|
348
|
+
<div class="panel-header">
|
|
349
|
+
<span><i class="fas fa-sliders-h"></i> Configuration options</span>
|
|
350
|
+
<div class="toolbar">
|
|
351
|
+
<button class="btn-toolbar" id="resetVariables" title="Reset to default values">
|
|
352
|
+
<i class="fas fa-undo"></i>
|
|
353
|
+
</button>
|
|
354
|
+
<button class="btn-toolbar" id="exportData" title="Export current data">
|
|
355
|
+
<i class="fas fa-download"></i>
|
|
356
|
+
</button>
|
|
357
|
+
</div>
|
|
358
|
+
</div>
|
|
359
|
+
<div class="panel-content">
|
|
360
|
+
<!-- Template Selection -->
|
|
361
|
+
<div class="template-selection">
|
|
362
|
+
<label for="templateSelect" class="form-label">Template Type:</label>
|
|
363
|
+
<select class="template-select" id="templateSelect">
|
|
364
|
+
<option value="">Select a template...</option>
|
|
365
|
+
<option value="component">Component</option>
|
|
366
|
+
<option value="module">Module</option>
|
|
367
|
+
<option value="interface">Interface</option>
|
|
368
|
+
<option value="class">Class</option>
|
|
369
|
+
<option value="injectable">Injectable/Service</option>
|
|
370
|
+
<option value="directive">Directive</option>
|
|
371
|
+
<option value="pipe">Pipe</option>
|
|
372
|
+
<option value="guard">Guard</option>
|
|
373
|
+
<option value="interceptor">Interceptor</option>
|
|
374
|
+
<option value="entity">Entity</option>
|
|
375
|
+
<option value="controller">Controller</option>
|
|
376
|
+
<option value="overview">Overview</option>
|
|
377
|
+
<option value="miscellaneous">Miscellaneous</option>
|
|
378
|
+
</select>
|
|
379
|
+
</div>
|
|
380
|
+
|
|
381
|
+
<!-- Template Metadata -->
|
|
382
|
+
<div class="template-metadata" id="templateMetadata" style="display: none;">
|
|
383
|
+
<strong>Template:</strong> <span id="templateName">-</span><br>
|
|
384
|
+
<strong>File:</strong> <span id="templateFile">-</span><br>
|
|
385
|
+
<strong>Description:</strong> <span id="templateDescription">-</span>
|
|
386
|
+
</div>
|
|
387
|
+
|
|
388
|
+
<!-- Variables List -->
|
|
389
|
+
<div id="variablesList">
|
|
390
|
+
<div class="loading">
|
|
391
|
+
<div class="spinner"></div>
|
|
392
|
+
Select a template to see variables
|
|
393
|
+
</div>
|
|
394
|
+
</div>
|
|
395
|
+
|
|
396
|
+
<!-- Add Variable Section -->
|
|
397
|
+
|
|
398
|
+
</div>
|
|
399
|
+
</div>
|
|
400
|
+
|
|
401
|
+
<!-- Resizer -->
|
|
402
|
+
<div class="resizer" id="resizer"></div>
|
|
403
|
+
|
|
404
|
+
<!-- Template Panel -->
|
|
405
|
+
<div class="template-panel">
|
|
406
|
+
<div class="panel-header">
|
|
407
|
+
<span><i class="fas fa-eye"></i> Template Editor</span>
|
|
408
|
+
<div class="toolbar">
|
|
409
|
+
<button class="btn-toolbar" id="copyTemplate" title="Copy template content">
|
|
410
|
+
<i class="fas fa-copy"></i>
|
|
411
|
+
</button>
|
|
412
|
+
<button class="btn-toolbar" id="downloadTemplate" title="Download as ZIP">
|
|
413
|
+
<i class="fas fa-download"></i> Export
|
|
414
|
+
</button>
|
|
415
|
+
<button class="btn-toolbar btn-primary" id="refreshPreview" title="Refresh preview">
|
|
416
|
+
<i class="fas fa-sync"></i>
|
|
417
|
+
</button>
|
|
418
|
+
</div>
|
|
419
|
+
</div>
|
|
420
|
+
|
|
421
|
+
<div class="template-preview-container">
|
|
422
|
+
<!-- Template Editor -->
|
|
423
|
+
<div class="template-editor-container">
|
|
424
|
+
<div id="templateEditor" style="height: 100%;"></div>
|
|
425
|
+
</div>
|
|
426
|
+
|
|
427
|
+
<!-- Template Preview -->
|
|
428
|
+
<div class="panel-header" style="border-top: 1px solid #e9ecef;">
|
|
429
|
+
<span><i class="fas fa-browser"></i> Live Preview</span>
|
|
430
|
+
<div class="toolbar">
|
|
431
|
+
<span class="btn-toolbar" id="previewStatus">Ready</span>
|
|
432
|
+
</div>
|
|
433
|
+
</div>
|
|
434
|
+
<div class="template-preview-iframe-container" style="flex: 1; overflow: hidden;">
|
|
435
|
+
<iframe id="templatePreviewFrame"
|
|
436
|
+
name="templatePreviewFrame"
|
|
437
|
+
style="width: 100%; height: 100%; border: none; background: white;"
|
|
438
|
+
src="about:blank">
|
|
439
|
+
</iframe>
|
|
440
|
+
<div class="template-preview-loading" id="templatePreviewLoading" style="display: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);">
|
|
441
|
+
<div class="loading">
|
|
442
|
+
<div class="spinner"></div>
|
|
443
|
+
Rendering template...
|
|
444
|
+
</div>
|
|
445
|
+
</div>
|
|
446
|
+
</div>
|
|
447
|
+
</div>
|
|
448
|
+
</div>
|
|
449
|
+
</div>
|
|
450
|
+
</div>
|
|
451
|
+
|
|
452
|
+
<!-- Compodoc JavaScript files -->
|
|
453
|
+
<script src="../js/libs/bootstrap-native.js"></script>
|
|
454
|
+
<script src="../js/libs/prism.js"></script>
|
|
455
|
+
<script src="../js/compodoc.js"></script>
|
|
456
|
+
<script src="../js/tabs.js"></script>
|
|
457
|
+
<script src="../js/sourceCode.js"></script>
|
|
458
|
+
|
|
459
|
+
<!-- Template Playground App -->
|
|
460
|
+
<script src="app.js"></script>
|
|
461
|
+
</body>
|
|
462
|
+
</html>
|
package/compodoc/todo.html
CHANGED
|
@@ -61,6 +61,20 @@
|
|
|
61
61
|
}
|
|
62
62
|
toggleDarkMode(darkModeState);
|
|
63
63
|
</script>
|
|
64
|
+
<script>
|
|
65
|
+
// --- Iframe navigation tracking for Template Playground ---
|
|
66
|
+
function sendCurrentUrlToParent() {
|
|
67
|
+
if (window.parent && window.parent !== window) {
|
|
68
|
+
window.parent.postMessage({
|
|
69
|
+
type: 'compodoc-iframe-navigate',
|
|
70
|
+
url: window.location.pathname + window.location.hash
|
|
71
|
+
}, '*');
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
window.addEventListener('hashchange', sendCurrentUrlToParent, false);
|
|
75
|
+
window.addEventListener('popstate', sendCurrentUrlToParent, false);
|
|
76
|
+
window.addEventListener('DOMContentLoaded', sendCurrentUrlToParent, false);
|
|
77
|
+
</script>
|
|
64
78
|
|
|
65
79
|
<div class="navbar navbar-default navbar-fixed-top d-md-none p-0">
|
|
66
80
|
<div class="d-flex">
|
|
@@ -70,7 +84,14 @@
|
|
|
70
84
|
</div>
|
|
71
85
|
|
|
72
86
|
<div class="xs-menu menu" id="mobile-menu">
|
|
73
|
-
<div id="book-search-input" role="search"
|
|
87
|
+
<div id="book-search-input" role="search">
|
|
88
|
+
<input type="text" placeholder="Type to search">
|
|
89
|
+
<button type="button"
|
|
90
|
+
class="search-input-clear"
|
|
91
|
+
aria-label="Clear search"
|
|
92
|
+
data-search-input-clear>×</button>
|
|
93
|
+
</div>
|
|
94
|
+
<compodoc-menu></compodoc-menu>
|
|
74
95
|
</div>
|
|
75
96
|
|
|
76
97
|
<div class="container-fluid main">
|
|
@@ -79,64 +100,12 @@
|
|
|
79
100
|
<compodoc-menu mode="normal"></compodoc-menu>
|
|
80
101
|
</div>
|
|
81
102
|
<!-- START CONTENT -->
|
|
82
|
-
<div class="content
|
|
103
|
+
<div class="content todo">
|
|
83
104
|
<div class="content-data">
|
|
84
105
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
<h2>๐จ Critical Bugs</h2>
|
|
89
|
-
<h3>1. Silent Interception and Overwrite in <code>WebStorage</code> Decorator Setter</h3>
|
|
90
|
-
<ul>
|
|
91
|
-
<li><strong>Location:</strong> <code>src/lib/decorators/web-storage.ts</code> (Lines 36โ45)</li>
|
|
92
|
-
<li><strong>Problem:</strong>
|
|
93
|
-
The setter in the <code>WebStorage</code> decorator intercepts the initial assignment if the internal <code>propertyValue</code> is <code>undefined</code>. It checks if <code>StorageHas(storage, storageKey)</code> is true. If it is, it loads the storage value and <strong>returns immediately</strong>, ignoring the newly assigned value:<b>Example :</b><div><pre class="line-numbers"><code class="language-typescript">set: (value: unknown) => {
|
|
94
|
-
if (propertyValue === undefined) {
|
|
95
|
-
if (StorageHas(storage, storageKey)) {
|
|
96
|
-
propertyValue = StorageGet(storage, storageKey);
|
|
97
|
-
return; // <--- SILENTLY IGNORES THE ASSIGNED VALUE!
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
propertyValue = value;
|
|
101
|
-
...
|
|
102
|
-
}</code></pre></div>While this was designed to stop TS property initializers (e.g., <code>@LocalStorage() prop = 'default'</code>) from overwriting existing storage values, it introduces a severe race condition and state-dependent bug.
|
|
103
|
-
<strong>If a property is declared without an initializer:</strong><b>Example :</b><div><pre class="line-numbers"><code class="language-typescript">@LocalStorage() myProperty?: string;</code></pre></div>The first call to <code>myComponent.myProperty = 'newValue'</code> will have <code>propertyValue === undefined</code>. If local storage already contains a value (e.g., <code>'oldValue'</code>), the setter will ignore <code>'newValue'</code>, set <code>propertyValue</code> to <code>'oldValue'</code>, and return. The assignment is silently dropped!</li>
|
|
104
|
-
<li><strong>Recommended Fix:</strong>
|
|
105
|
-
Instead of overloading the setter with state checks on <code>propertyValue === undefined</code>, use a unique Symbol or boolean flag (e.g. <code>isInitialized</code>) to track whether the property has been initialized, or avoid setter interception entirely. Let the getter resolve defaults when the underlying storage value is empty, and let the setter always write the value when called explicitly after construction.</li>
|
|
106
|
-
</ul>
|
|
107
|
-
<hr>
|
|
108
|
-
<h2>๐ Architectural Debt & Anti-Patterns</h2>
|
|
109
|
-
<h3>1. Rigid/Incompatible Storage Format in <code>StorageGet</code></h3>
|
|
110
|
-
<ul>
|
|
111
|
-
<li><strong>Location:</strong> <code>src/lib/storage-utility.ts</code> (Lines 20โ35)</li>
|
|
112
|
-
<li><strong>Problem:</strong>
|
|
113
|
-
<code>StorageGet</code> expects every item in storage to be a JSON string representing an object with <code>_value</code> and optional <code>_expired</code> properties. If a value was set externally (by another library, standard Web APIs, or legacy code) as a plain string, number, or standard JSON object without a <code>_value</code> key:<ol>
|
|
114
|
-
<li><code>parse(...)</code> catches the parse error and returns the original string or parsed object.</li>
|
|
115
|
-
<li>The check <code>typeof value === 'object'</code> might fail (for strings) or succeed (for plain objects).</li>
|
|
116
|
-
<li>But finally, it returns <code>value._value ?? null</code>. Since <code>value</code> doesn't have <code>_value</code>, it returns <code>null</code>!
|
|
117
|
-
This makes the library completely incompatible with standard storage entries, reducing interoperability.</li>
|
|
118
|
-
</ol>
|
|
119
|
-
</li>
|
|
120
|
-
<li><strong>Recommended Fix:</strong>
|
|
121
|
-
Make the storage format backward-compatible. If the parsed value is an object containing <code>_value</code>, extract it. Otherwise, return the parsed value (or the plain string) as-is. E.g.:<b>Example :</b><div><pre class="line-numbers"><code class="language-typescript">if (value && typeof value === 'object' && '_value' in value) {
|
|
122
|
-
// Treat as wrapped rxap-memory item with optional expiry
|
|
123
|
-
...
|
|
124
|
-
return value._value;
|
|
125
|
-
}
|
|
126
|
-
// Treat as a standard/external plain value
|
|
127
|
-
return value;</code></pre></div></li>
|
|
128
|
-
</ul>
|
|
129
|
-
<hr>
|
|
130
|
-
<h2>๐งช Test Coverage & Diagnostics</h2>
|
|
131
|
-
<ul>
|
|
132
|
-
<li><strong>Current Status:</strong> All 29 unit tests pass.</li>
|
|
133
|
-
<li><strong>Missing Tests:</strong><ul>
|
|
134
|
-
<li><strong>No Initializer Setter Bug:</strong> There is no unit test confirming that an uninitialized property decorated with <code>@WebStorage</code> can be set when local storage already has a value.</li>
|
|
135
|
-
<li><strong>Peer Dependency / Init Generator Tests:</strong> There are no tests verifying <code>initGenerator</code> behavior, especially around dependency placement and routing.</li>
|
|
136
|
-
</ul>
|
|
137
|
-
</li>
|
|
138
|
-
<li><strong>Action Item:</strong> Add a regression test to <code>src/lib/decorators/web-storage.spec.ts</code> demonstrating the setter override behavior when no initial value is defined on the class property.</li>
|
|
139
|
-
</ul>
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
140
109
|
|
|
141
110
|
|
|
142
111
|
|
|
@@ -183,13 +152,31 @@ return value;</code></pre></div></li>
|
|
|
183
152
|
|
|
184
153
|
<script>
|
|
185
154
|
var COMPODOC_CURRENT_PAGE_DEPTH = 0;
|
|
186
|
-
var COMPODOC_CURRENT_PAGE_CONTEXT = '
|
|
155
|
+
var COMPODOC_CURRENT_PAGE_CONTEXT = 'todo';
|
|
187
156
|
var COMPODOC_CURRENT_PAGE_URL = 'todo.html';
|
|
188
157
|
var MAX_SEARCH_RESULTS = 15;
|
|
189
158
|
</script>
|
|
190
159
|
|
|
191
160
|
<script>
|
|
192
161
|
$darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
|
|
162
|
+
var updateDarkModeSwitchOffset = function () {
|
|
163
|
+
var content = document.querySelector('.content');
|
|
164
|
+
var scrollbarWidth = 0;
|
|
165
|
+
|
|
166
|
+
if (content) {
|
|
167
|
+
scrollbarWidth = Math.max(0, content.offsetWidth - content.clientWidth);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
document.documentElement.style.setProperty(
|
|
171
|
+
'--content-scrollbar-width',
|
|
172
|
+
scrollbarWidth + 'px'
|
|
173
|
+
);
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
updateDarkModeSwitchOffset();
|
|
177
|
+
requestAnimationFrame(updateDarkModeSwitchOffset);
|
|
178
|
+
window.addEventListener('resize', updateDarkModeSwitchOffset);
|
|
179
|
+
|
|
193
180
|
checkToggle(darkModeState);
|
|
194
181
|
if ($darkModeToggleSwitchers.length > 0) {
|
|
195
182
|
for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
|
|
@@ -205,14 +192,12 @@ return value;</code></pre></div></li>
|
|
|
205
192
|
<script src="./js/libs/lit-html.js"></script>
|
|
206
193
|
|
|
207
194
|
<script src="./js/menu-wc.js" defer></script>
|
|
208
|
-
<script nomodule src="./js/menu-wc_es5.js" defer></script>
|
|
209
195
|
|
|
210
196
|
<script src="./js/libs/bootstrap-native.js"></script>
|
|
211
197
|
|
|
212
198
|
<script src="./js/libs/es6-shim.min.js"></script>
|
|
213
199
|
<script src="./js/libs/EventDispatcher.js"></script>
|
|
214
200
|
<script src="./js/libs/promise.min.js"></script>
|
|
215
|
-
<script src="./js/libs/zepto.min.js"></script>
|
|
216
201
|
|
|
217
202
|
<script src="./js/compodoc.js"></script>
|
|
218
203
|
|