underpost 2.8.881 → 2.8.883
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/.github/workflows/release.cd.yml +1 -2
- package/README.md +50 -36
- package/bin/db.js +1 -4
- package/cli.md +86 -86
- package/conf.js +1 -0
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
- package/manifests/deployment/dd-test-development/deployment.yaml +6 -6
- package/manifests/maas/device-scan.sh +1 -1
- package/package.json +1 -1
- package/src/api/document/document.service.js +9 -1
- package/src/cli/repository.js +2 -0
- package/src/client/components/core/Auth.js +258 -89
- package/src/client/components/core/BtnIcon.js +10 -1
- package/src/client/components/core/CssCore.js +36 -27
- package/src/client/components/core/Docs.js +188 -85
- package/src/client/components/core/LoadingAnimation.js +5 -10
- package/src/client/components/core/Modal.js +262 -120
- package/src/client/components/core/ObjectLayerEngine.js +154 -158
- package/src/client/components/core/Panel.js +2 -0
- package/src/client/components/core/PanelForm.js +94 -60
- package/src/client/components/core/Router.js +15 -15
- package/src/client/components/core/ToolTip.js +83 -19
- package/src/client/components/core/Translate.js +1 -1
- package/src/client/components/core/VanillaJs.js +4 -3
- package/src/client/components/core/windowGetDimensions.js +202 -0
- package/src/client/components/default/MenuDefault.js +11 -0
- package/src/client/ssr/Render.js +1 -1
- package/src/index.js +1 -1
- package/src/runtime/lampp/Lampp.js +253 -128
- package/src/server/auth.js +68 -17
- package/src/server/crypto.js +195 -76
- package/src/server/peer.js +47 -5
- package/src/server/process.js +85 -1
- package/src/server/runtime.js +13 -32
- package/test/crypto.test.js +117 -0
- package/src/runtime/xampp/Xampp.js +0 -83
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { Badge } from './Badge.js';
|
|
2
2
|
import { BtnIcon } from './BtnIcon.js';
|
|
3
3
|
import { Css, renderCssAttr, simpleIconsRender, ThemeEvents, Themes } from './Css.js';
|
|
4
|
-
import {
|
|
5
|
-
import { buildBadgeToolTipMenuOption, Modal, renderMenuLabel, renderViewTitle } from './Modal.js';
|
|
4
|
+
import { buildBadgeToolTipMenuOption, Modal, renderViewTitle } from './Modal.js';
|
|
6
5
|
import { listenQueryPathInstance, setQueryPath, closeModalRouteChangeEvent, getProxyPath } from './Router.js';
|
|
7
|
-
import { Translate } from './Translate.js';
|
|
8
6
|
import { htmls, s } from './VanillaJs.js';
|
|
9
|
-
import Sortable from 'sortablejs';
|
|
10
7
|
|
|
11
8
|
// https://mintlify.com/docs/quickstart
|
|
12
9
|
|
|
@@ -160,6 +157,11 @@ const Docs = {
|
|
|
160
157
|
routeId: 'docs',
|
|
161
158
|
event: (path) => {
|
|
162
159
|
if (s(`.btn-docs-${path}`)) s(`.btn-docs-${path}`).click();
|
|
160
|
+
if (Modal.mobileModal()) {
|
|
161
|
+
setTimeout(() => {
|
|
162
|
+
s(`.btn-close-modal-menu`).click();
|
|
163
|
+
});
|
|
164
|
+
}
|
|
163
165
|
},
|
|
164
166
|
});
|
|
165
167
|
});
|
|
@@ -183,98 +185,199 @@ const Docs = {
|
|
|
183
185
|
tabHref = docData.url();
|
|
184
186
|
docMenuRender += html`
|
|
185
187
|
${await BtnIcon.Render({
|
|
186
|
-
class: `in wfa main-btn-menu btn-docs-${docData.type}`,
|
|
187
|
-
label: html`<span class="menu-btn-icon">${docData.icon}</span
|
|
188
|
-
><span class="menu-label-text"> ${docData.text} </span>`,
|
|
188
|
+
class: `in wfa main-btn-menu submenu-btn btn-docs btn-docs-${docData.type}`,
|
|
189
|
+
label: html`<span class="inl menu-btn-icon">${docData.icon}</span
|
|
190
|
+
><span class="menu-label-text menu-label-text-docs"> ${docData.text} </span>`,
|
|
189
191
|
tabHref,
|
|
190
|
-
handleContainerClass: 'handle-btn-container',
|
|
191
192
|
tooltipHtml: await Badge.Render(buildBadgeToolTipMenuOption(docData.text, 'right')),
|
|
192
|
-
|
|
193
|
-
handleContainerClass: 'handle-btn-container',
|
|
193
|
+
useMenuBtn: true,
|
|
194
194
|
})}
|
|
195
195
|
`;
|
|
196
196
|
}
|
|
197
|
+
// s(`.menu-btn-container-children`).classList.remove('hide');
|
|
198
|
+
// htmls(`.nav-path-display-${'modal-menu'}`, location.pathname);
|
|
197
199
|
|
|
198
|
-
htmls('.menu-btn-container-children',
|
|
199
|
-
if (s(`.menu-btn-container-main`)) s(`.menu-btn-container-main`).classList.add('hide');
|
|
200
|
-
htmls(`.nav-path-display-${'modal-menu'}`, location.pathname);
|
|
200
|
+
htmls('.menu-btn-container-children-docs', docMenuRender);
|
|
201
201
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* Get the order of elements. Called once during initialization.
|
|
211
|
-
* @param {Sortable} sortable
|
|
212
|
-
* @returns {Array}
|
|
213
|
-
*/
|
|
214
|
-
get: function (sortable) {
|
|
215
|
-
const order = localStorage.getItem(sortable.options.group.name);
|
|
216
|
-
return order ? order.split('|') : [];
|
|
202
|
+
{
|
|
203
|
+
const docsData = [
|
|
204
|
+
{
|
|
205
|
+
id: 'getting-started',
|
|
206
|
+
icon: 'rocket',
|
|
207
|
+
title: 'Getting Started',
|
|
208
|
+
description: 'Learn the basics and get started with our platform',
|
|
217
209
|
},
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
set: function (sortable) {
|
|
224
|
-
const order = sortable.toArray();
|
|
225
|
-
localStorage.setItem(sortable.options.group.name, order.join('|'));
|
|
210
|
+
{
|
|
211
|
+
id: 'api-docs',
|
|
212
|
+
icon: 'code',
|
|
213
|
+
title: 'API Reference',
|
|
214
|
+
description: 'Detailed documentation of our API endpoints',
|
|
226
215
|
},
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
216
|
+
{
|
|
217
|
+
id: 'guides',
|
|
218
|
+
icon: 'book',
|
|
219
|
+
title: 'Guides',
|
|
220
|
+
description: 'Step-by-step tutorials and how-to guides',
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
id: 'demo',
|
|
224
|
+
icon: 'laptop-code',
|
|
225
|
+
title: 'Demo',
|
|
226
|
+
description: 'Practical examples and code snippets',
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
id: 'faq',
|
|
230
|
+
icon: 'question-circle',
|
|
231
|
+
title: 'FAQ',
|
|
232
|
+
description: 'Frequently asked questions',
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
id: 'community',
|
|
236
|
+
icon: 'users',
|
|
237
|
+
title: 'Community',
|
|
238
|
+
description: 'Join our developer community',
|
|
239
|
+
},
|
|
240
|
+
];
|
|
238
241
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
242
|
+
return html`
|
|
243
|
+
<style>
|
|
244
|
+
.docs-landing {
|
|
245
|
+
padding: 2rem;
|
|
246
|
+
max-width: 1200px;
|
|
247
|
+
margin: 0 auto;
|
|
248
|
+
height: 100%;
|
|
249
|
+
box-sizing: border-box;
|
|
250
|
+
}
|
|
251
|
+
.docs-header {
|
|
252
|
+
text-align: center;
|
|
253
|
+
margin-bottom: 3rem;
|
|
254
|
+
opacity: 0;
|
|
255
|
+
animation: fadeInUp 0.6s ease-out forwards;
|
|
256
|
+
}
|
|
257
|
+
.docs-header h1 {
|
|
258
|
+
font-size: 2.5rem;
|
|
259
|
+
margin: 0 0 1rem;
|
|
260
|
+
line-height: 1.2;
|
|
261
|
+
}
|
|
262
|
+
.docs-header p {
|
|
263
|
+
font-size: 1.2rem;
|
|
264
|
+
max-width: 700px;
|
|
265
|
+
margin: 0 auto 2rem;
|
|
266
|
+
line-height: 1.6;
|
|
267
|
+
}
|
|
268
|
+
.docs-grid {
|
|
269
|
+
display: grid;
|
|
270
|
+
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
271
|
+
gap: 1.5rem;
|
|
272
|
+
margin: 0;
|
|
273
|
+
padding: 0;
|
|
274
|
+
list-style: none;
|
|
275
|
+
}
|
|
276
|
+
.docs-card-container {
|
|
277
|
+
cursor: pointer;
|
|
278
|
+
opacity: 0;
|
|
279
|
+
margin-bottom: 3rem;
|
|
280
|
+
animation: fadeInUp 0.6s ease-out forwards;
|
|
281
|
+
}
|
|
282
|
+
.docs-card {
|
|
283
|
+
border-radius: 8px;
|
|
284
|
+
padding: 1.5rem;
|
|
285
|
+
display: flex;
|
|
286
|
+
flex-direction: column;
|
|
287
|
+
height: 100%;
|
|
288
|
+
position: relative;
|
|
289
|
+
transition: all 0.3s ease-in-out;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.card-icon {
|
|
293
|
+
font-size: 1.75rem;
|
|
294
|
+
width: 56px;
|
|
295
|
+
height: 56px;
|
|
296
|
+
border-radius: 12px;
|
|
297
|
+
display: flex;
|
|
298
|
+
align-items: center;
|
|
299
|
+
justify-content: center;
|
|
300
|
+
margin: 0 0 1.25rem;
|
|
301
|
+
transition: transform 0.2s ease;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.card-content {
|
|
305
|
+
flex: 1;
|
|
306
|
+
}
|
|
307
|
+
.card-content h3 {
|
|
308
|
+
margin: 0 0 0.5rem;
|
|
309
|
+
font-size: 1.25rem;
|
|
310
|
+
font-weight: 600;
|
|
311
|
+
}
|
|
312
|
+
.card-content p {
|
|
313
|
+
margin: 0;
|
|
314
|
+
font-size: 0.95rem;
|
|
315
|
+
transition: color 0.3s ease;
|
|
316
|
+
}
|
|
317
|
+
</style>
|
|
318
|
+
|
|
319
|
+
<style>
|
|
320
|
+
${docsData
|
|
321
|
+
.map(
|
|
322
|
+
(_, index) => css`
|
|
323
|
+
.docs-card-container:nth-child(${index + 1}) {
|
|
324
|
+
animation-delay: ${0.1 * (index + 1)}s;
|
|
325
|
+
}
|
|
326
|
+
`,
|
|
327
|
+
)
|
|
328
|
+
.join('')}
|
|
329
|
+
</style>
|
|
250
330
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
331
|
+
<div class="docs-landing">
|
|
332
|
+
<div class="docs-header">
|
|
333
|
+
<h1>Documentation</h1>
|
|
334
|
+
<p>
|
|
335
|
+
Find everything you need to build amazing applications with our platform. Get started with our guides, API
|
|
336
|
+
reference, and examples.
|
|
337
|
+
</p>
|
|
338
|
+
<!--
|
|
339
|
+
<div class="search-bar">
|
|
340
|
+
<i class="fas fa-search"></i>
|
|
341
|
+
<input type="text" placeholder="Search documentation..." id="docs-search">
|
|
342
|
+
</div>
|
|
343
|
+
-->
|
|
344
|
+
</div>
|
|
345
|
+
|
|
346
|
+
<ul class="docs-grid">
|
|
347
|
+
${docsData
|
|
348
|
+
.map((item) => {
|
|
349
|
+
setTimeout(() => {
|
|
350
|
+
if (s(`.docs-card-container-${item.id}`)) {
|
|
351
|
+
s(`.docs-card-container-${item.id}`).onclick = () => {
|
|
352
|
+
if (item.id.match('demo')) {
|
|
353
|
+
location.href = 'https://underpostnet.github.io/pwa-microservices-template-ghpkg/';
|
|
354
|
+
} else if (item.id.match('api')) {
|
|
355
|
+
if (s(`.btn-docs-api`)) s(`.btn-docs-api`).click();
|
|
356
|
+
} else {
|
|
357
|
+
if (s(`.btn-docs-src`)) s(`.btn-docs-src`).click();
|
|
358
|
+
}
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
});
|
|
362
|
+
return html`
|
|
363
|
+
<div class="in docs-card-container docs-card-container-${item.id}">
|
|
364
|
+
<li class="docs-card">
|
|
365
|
+
<div class="card-icon">
|
|
366
|
+
<i class="fas fa-${item.icon}"></i>
|
|
367
|
+
</div>
|
|
368
|
+
<div class="card-content">
|
|
369
|
+
<h3>${item.title}</h3>
|
|
370
|
+
<p>${item.description}</p>
|
|
371
|
+
</div>
|
|
372
|
+
</li>
|
|
373
|
+
</div>
|
|
374
|
+
`;
|
|
375
|
+
})
|
|
376
|
+
.join('')}
|
|
377
|
+
</ul>
|
|
378
|
+
</div>
|
|
379
|
+
`;
|
|
380
|
+
}
|
|
278
381
|
},
|
|
279
382
|
};
|
|
280
383
|
|
|
@@ -129,16 +129,11 @@ const LoadingAnimation = {
|
|
|
129
129
|
removeSplashScreen: function (backgroundContainer, callBack) {
|
|
130
130
|
if (s(`.clean-cache-container`)) s(`.clean-cache-container`).style.display = 'none';
|
|
131
131
|
if (!backgroundContainer) backgroundContainer = '.ssr-background';
|
|
132
|
-
if (s(backgroundContainer))
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
if (s(`.modal-menu`)) s(`.modal-menu`).classList.remove('hide');
|
|
138
|
-
if (s(`.main-body-btn-container`)) s(`.main-body-btn-container`).classList.remove('hide');
|
|
139
|
-
if (callBack) callBack();
|
|
140
|
-
}, 300);
|
|
141
|
-
});
|
|
132
|
+
if (s(backgroundContainer)) {
|
|
133
|
+
s(backgroundContainer).style.display = 'none';
|
|
134
|
+
if (s(`.main-body-btn-container`)) s(`.main-body-btn-container`).classList.remove('hide');
|
|
135
|
+
if (callBack) callBack();
|
|
136
|
+
}
|
|
142
137
|
},
|
|
143
138
|
|
|
144
139
|
RenderCurrentSrcLoad: function (event) {
|