underpost 2.8.871 → 2.8.872

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 (37) hide show
  1. package/.github/workflows/release.cd.yml +3 -1
  2. package/README.md +46 -36
  3. package/cli.md +86 -86
  4. package/conf.js +2 -1
  5. package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
  6. package/package.json +2 -3
  7. package/src/cli/repository.js +1 -0
  8. package/src/cli/run.js +1 -0
  9. package/src/client/components/core/Account.js +2 -1
  10. package/src/client/components/core/AgGrid.js +2 -2
  11. package/src/client/components/core/CalendarCore.js +3 -4
  12. package/src/client/components/core/CommonJs.js +1 -2
  13. package/src/client/components/core/Content.js +2 -1
  14. package/src/client/components/core/Css.js +2 -1
  15. package/src/client/components/core/CssCore.js +2 -1
  16. package/src/client/components/core/Docs.js +4 -4
  17. package/src/client/components/core/FileExplorer.js +3 -3
  18. package/src/client/components/core/JoyStick.js +2 -2
  19. package/src/client/components/core/LoadingAnimation.js +2 -2
  20. package/src/client/components/core/Logger.js +4 -1
  21. package/src/client/components/core/Modal.js +17 -27
  22. package/src/client/components/core/ObjectLayerEngineModal.js +2 -1
  23. package/src/client/components/core/Pagination.js +14 -0
  24. package/src/client/components/core/Panel.js +3 -11
  25. package/src/client/components/core/PanelForm.js +6 -15
  26. package/src/client/components/core/Recover.js +2 -2
  27. package/src/client/components/core/Router.js +178 -33
  28. package/src/client/components/core/Stream.js +1 -1
  29. package/src/client/components/core/VanillaJs.js +0 -83
  30. package/src/client/components/core/Worker.js +2 -2
  31. package/src/client/components/default/MenuDefault.js +4 -3
  32. package/src/client/components/default/RoutesDefault.js +3 -2
  33. package/src/client/services/core/core.service.js +1 -1
  34. package/src/client/ssr/head/DefaultScripts.js +1 -0
  35. package/src/index.js +1 -1
  36. package/src/server/runtime.js +7 -0
  37. package/src/server/ssl.js +1 -2
@@ -7,9 +7,9 @@ import { Modal } from './Modal.js';
7
7
  import { NotificationManager } from './NotificationManager.js';
8
8
  import { Panel } from './Panel.js';
9
9
  import { Responsive } from './Responsive.js';
10
- import { listenQueryPathInstance, RouterEvents, setQueryPath } from './Router.js';
10
+ import { listenQueryPathInstance, RouterEvents, setQueryPath, getQueryParams } from './Router.js';
11
11
  import { Translate } from './Translate.js';
12
- import { append, getQueryParams, getTimeZone, htmls, s, sa } from './VanillaJs.js';
12
+ import { append, getTimeZone, htmls, s, sa } from './VanillaJs.js';
13
13
 
14
14
  // https://fullcalendar.io/docs/event-object
15
15
 
@@ -346,7 +346,7 @@ const CalendarCore = {
346
346
  status,
347
347
  });
348
348
 
349
- setQueryPath({ path: options.route, queryPath: '', replace: true });
349
+ setQueryPath({ path: options.route, queryPath: '' });
350
350
  await CalendarCore.Data[options.idModal].updatePanel();
351
351
 
352
352
  return { status };
@@ -363,7 +363,6 @@ const CalendarCore = {
363
363
  const cid = getQueryParams().cid ? getQueryParams().cid : '';
364
364
  if (lastCid === cid) return;
365
365
  lastCid = cid;
366
- if (options.route === 'home') Modal.homeCid = newInstance(cid);
367
366
  if (s(`.main-body-calendar-${options.idModal}`)) {
368
367
  // if (Auth.getToken())
369
368
  // else getSrrData();
@@ -577,8 +577,7 @@ const getCurrentTrace = () => {
577
577
  try {
578
578
  _stack;
579
579
  } catch (error) {
580
- console.error(error);
581
- return error;
580
+ return error.stack;
582
581
  }
583
582
  };
584
583
 
@@ -1,6 +1,6 @@
1
1
  import { marked } from 'marked';
2
2
  import { FileService } from '../../services/file/file.service.js';
3
- import { append, getBlobFromUint8ArrayFile, getQueryParams, getRawContentFile, htmls, s } from './VanillaJs.js';
3
+ import { append, getBlobFromUint8ArrayFile, getRawContentFile, htmls, s } from './VanillaJs.js';
4
4
  import { titleFormatted } from './CommonJs.js';
5
5
  import { Translate } from './Translate.js';
6
6
  import { Modal, renderViewTitle } from './Modal.js';
@@ -8,6 +8,7 @@ import { DocumentService } from '../../services/document/document.service.js';
8
8
  import { CoreService, getApiBaseUrl } from '../../services/core/core.service.js';
9
9
  import { loggerFactory } from './Logger.js';
10
10
  import { imageShimmer, renderChessPattern, renderCssAttr, styleFactory } from './Css.js';
11
+ import { getQueryParams } from './Router.js';
11
12
 
12
13
  const logger = loggerFactory(import.meta);
13
14
 
@@ -3,7 +3,8 @@ import { CssCoreDark, CssCoreLight } from './CssCore.js';
3
3
  import { DropDown } from './DropDown.js';
4
4
  import { Modal } from './Modal.js';
5
5
  import { Translate } from './Translate.js';
6
- import { append, getProxyPath, htmls, s, sa } from './VanillaJs.js';
6
+ import { append, htmls, s, sa } from './VanillaJs.js';
7
+ import { getProxyPath } from './Router.js';
7
8
 
8
9
  let ThemesScope = [];
9
10
 
@@ -1,7 +1,8 @@
1
1
  import { AgGrid } from './AgGrid.js';
2
2
  import { borderChar, boxShadow, scrollBarDarkRender, scrollBarLightRender } from './Css.js';
3
3
  import { LoadingAnimation } from './LoadingAnimation.js';
4
- import { append, getProxyPath, s } from './VanillaJs.js';
4
+ import { append, s } from './VanillaJs.js';
5
+ import { getProxyPath } from './Router.js';
5
6
 
6
7
  const CssCommonCore = async () => {
7
8
  if (!s(`.fa-link`))
@@ -1,12 +1,11 @@
1
1
  import { Badge } from './Badge.js';
2
2
  import { BtnIcon } from './BtnIcon.js';
3
- import { rgbToHex } from './CommonJs.js';
4
- import { Css, darkTheme, dynamicCol, renderCssAttr, simpleIconsRender, ThemeEvents, Themes } from './Css.js';
3
+ import { Css, renderCssAttr, simpleIconsRender, ThemeEvents, Themes } from './Css.js';
5
4
  import { DropDown } from './DropDown.js';
6
5
  import { buildBadgeToolTipMenuOption, Modal, renderMenuLabel, renderViewTitle } from './Modal.js';
7
- import { listenQueryPathInstance, setQueryPath, closeModalRouteChangeEvent } from './Router.js';
6
+ import { listenQueryPathInstance, setQueryPath, closeModalRouteChangeEvent, getProxyPath } from './Router.js';
8
7
  import { Translate } from './Translate.js';
9
- import { getProxyPath, getQueryParams, htmls, s, sa } from './VanillaJs.js';
8
+ import { htmls, s } from './VanillaJs.js';
10
9
  import Sortable from 'sortablejs';
11
10
 
12
11
  // https://mintlify.com/docs/quickstart
@@ -34,6 +33,7 @@ const Docs = {
34
33
  },
35
34
  maximize: true,
36
35
  mode: 'view',
36
+ route: 'docs',
37
37
  slideMenu: 'modal-menu',
38
38
  observer: true,
39
39
  barMode: 'top-bottom-bar',
@@ -4,8 +4,7 @@ import { FileService } from '../../services/file/file.service.js';
4
4
  import { AgGrid } from './AgGrid.js';
5
5
  import { Auth } from './Auth.js';
6
6
  import { BtnIcon } from './BtnIcon.js';
7
- import { getSubpaths, timer, uniqueArray } from './CommonJs.js';
8
- import { Content } from './Content.js';
7
+ import { getSubpaths, uniqueArray } from './CommonJs.js';
9
8
  import { darkTheme, renderCssAttr } from './Css.js';
10
9
  import { EventsUI } from './EventsUI.js';
11
10
  import { fileFormDataFactory, Input, InputFile } from './Input.js';
@@ -15,7 +14,8 @@ import { NotificationManager } from './NotificationManager.js';
15
14
  import { RouterEvents } from './Router.js';
16
15
  import { Translate } from './Translate.js';
17
16
  import { Validator } from './Validator.js';
18
- import { copyData, downloadFile, getProxyPath, getQueryParams, s, setPath } from './VanillaJs.js';
17
+ import { copyData, downloadFile, s } from './VanillaJs.js';
18
+ import { getProxyPath, getQueryParams, setPath } from './Router.js';
19
19
 
20
20
  const logger = loggerFactory(import.meta);
21
21
 
@@ -1,7 +1,7 @@
1
1
  import JoystickController from 'joystick-controller';
2
2
  import { getDirection, getId } from './CommonJs.js';
3
- import { loggerFactory } from './Logger.js';
4
- import { append, getProxyPath, s } from './VanillaJs.js';
3
+ import { append, s } from './VanillaJs.js';
4
+ import { getProxyPath } from './Router.js';
5
5
 
6
6
  const logger = loggerFactory(import.meta);
7
7
 
@@ -1,9 +1,9 @@
1
- import { CoreService } from '../../services/core/core.service.js';
2
1
  import { BtnIcon } from './BtnIcon.js';
3
2
  import { s4 } from './CommonJs.js';
4
3
  import { darkTheme, renderCssAttr, subThemeManager } from './Css.js';
5
4
  import { loggerFactory } from './Logger.js';
6
- import { append, getAllChildNodes, getProxyPath, htmls, s, sa } from './VanillaJs.js';
5
+ import { append, htmls, s } from './VanillaJs.js';
6
+ import { getProxyPath } from './Router.js';
7
7
 
8
8
  const logger = loggerFactory(import.meta);
9
9
 
@@ -1,4 +1,6 @@
1
- const loggerFactory = (meta) => {
1
+ import { getCurrentTrace } from './CommonJs.js';
2
+
3
+ const loggerFactory = (meta, options = { trace: false }) => {
2
4
  meta = meta.url.split('/').pop();
3
5
  const types = ['error', 'warn', 'info', 'debug'];
4
6
  const logger = {
@@ -9,6 +11,7 @@ const loggerFactory = (meta) => {
9
11
  console.info = () => null;
10
12
  console.warn = () => null;
11
13
  }
14
+ if (options.trace === true) args.push(getCurrentTrace().split('Logger.js:23')[1]);
12
15
  return location.hostname === 'localhost'
13
16
  ? console[type](`[${meta}] ${new Date().toISOString()} ${type}:`, ...args)
14
17
  : null;
@@ -1,16 +1,6 @@
1
- import { cap, getId, newInstance } from './CommonJs.js';
1
+ import { getId, newInstance } from './CommonJs.js';
2
2
  import { Draggable } from '@neodrag/vanilla';
3
- import {
4
- append,
5
- s,
6
- prepend,
7
- setPath,
8
- getProxyPath,
9
- htmls,
10
- sa,
11
- getAllChildNodes,
12
- isActiveElement,
13
- } from './VanillaJs.js';
3
+ import { append, s, prepend, htmls, sa, getAllChildNodes, isActiveElement } from './VanillaJs.js';
14
4
  import { BtnIcon } from './BtnIcon.js';
15
5
  import { Responsive } from './Responsive.js';
16
6
  import { loggerFactory } from './Logger.js';
@@ -24,12 +14,18 @@ import {
24
14
  renderStatus,
25
15
  renderCssAttr,
26
16
  } from './Css.js';
27
- import { setDocTitle, closeModalRouteChangeEvent, handleModalViewRoute } from './Router.js';
17
+ import {
18
+ setDocTitle,
19
+ closeModalRouteChangeEvent,
20
+ handleModalViewRoute,
21
+ getProxyPath,
22
+ setPath,
23
+ coreUI,
24
+ } from './Router.js';
28
25
  import { NotificationManager } from './NotificationManager.js';
29
26
  import { EventsUI } from './EventsUI.js';
30
27
  import { Translate } from './Translate.js';
31
28
  import { Input, isTextInputFocused } from './Input.js';
32
- import { Validator } from './Validator.js';
33
29
  import { DropDown } from './DropDown.js';
34
30
  import { Keyboard } from './Keyboard.js';
35
31
  import { Badge } from './Badge.js';
@@ -186,9 +182,7 @@ const Modal = {
186
182
  htmls(
187
183
  `.default-slide-menu-top-bar-fix-title-container`,
188
184
  html`
189
- <div class="inl default-slide-menu-top-bar-fix-title-container-text">
190
- ${options.RouterInstance.BannerAppTemplate}
191
- </div>
185
+ <div class="inl default-slide-menu-top-bar-fix-title-container-text">${options.title}</div>
192
186
  `,
193
187
  );
194
188
  } else
@@ -274,6 +268,7 @@ const Modal = {
274
268
  s(`.btn-menu-${idModal}`).classList.remove('hide');
275
269
  s(`.${idModal}`).style.width = `${this.Data[idModal][options.mode].width}px`;
276
270
  s(`.html-${idModal}`).style.display = 'none';
271
+ // s(`.title-modal-${idModal}`).style.display = 'none';
277
272
  setTimeout(() => {
278
273
  s(`.main-body-btn-ui-menu-close`).classList.add('hide');
279
274
  s(`.main-body-btn-ui-menu-menu`).classList.remove('hide');
@@ -281,9 +276,6 @@ const Modal = {
281
276
  s(`.btn-bar-center-icon-menu`).classList.remove('hide');
282
277
  s(`.btn-bar-center-icon-close`).classList.add('hide');
283
278
  }
284
- });
285
- // s(`.title-modal-${idModal}`).style.display = 'none';
286
- setTimeout(() => {
287
279
  s(`.main-body-btn-container`).style[
288
280
  true || (options.mode && options.mode.match('right')) ? 'right' : 'left'
289
281
  ] = `${0}px`;
@@ -787,8 +779,7 @@ const Modal = {
787
779
  dragDisabled: true,
788
780
  maximize: true,
789
781
  heightBottomBar: 0,
790
- heightTopBar: originHeightTopBar,
791
- barMode: options.barMode,
782
+ heightTopBar: options.heightTopBar,
792
783
  });
793
784
 
794
785
  // Bind hover/focus and click-outside to dismiss
@@ -1755,9 +1746,8 @@ const Modal = {
1755
1746
  if (!s(`.${idModal}`)) return;
1756
1747
  this.removeModal(idModal);
1757
1748
  // Handle modal route change
1758
- if (options.route || options.query) {
1759
- closeModalRouteChangeEvent({ closedId: idModal, homeCid: Modal.homeCid });
1760
- }
1749
+ closeModalRouteChangeEvent({ closedId: idModal });
1750
+ // history.back();
1761
1751
  }, 300);
1762
1752
  };
1763
1753
  s(`.btn-close-${idModal}`).onclick = btnCloseEvent;
@@ -1957,7 +1947,7 @@ const Modal = {
1957
1947
  const modal = Modal.Data[idModal];
1958
1948
  if (!modal) return false;
1959
1949
  // Don't close the core UI elements
1960
- const coreUI = ['modal-menu', 'main-body', 'main-body-top', 'bottom-bar', 'board-notification'];
1950
+
1961
1951
  if (coreUI.find((id) => idModal.startsWith(id))) {
1962
1952
  return false;
1963
1953
  }
@@ -1970,7 +1960,7 @@ const Modal = {
1970
1960
  });
1971
1961
 
1972
1962
  // 2. Navigate to home first, creating a new history entry.
1973
- setPath(getProxyPath());
1963
+ setPath(`${getProxyPath()}${location.search ?? ''}${location.hash ?? ''}`);
1974
1964
  setDocTitle();
1975
1965
 
1976
1966
  // 3. Close the modals without them affecting the URL.
@@ -4,7 +4,8 @@ import { borderChar, dynamicCol } from './Css.js';
4
4
  import { DropDown } from './DropDown.js';
5
5
  import { EventsUI } from './EventsUI.js';
6
6
  import { Translate } from './Translate.js';
7
- import { getProxyPath, s, append, hexToRgbA } from './VanillaJs.js';
7
+ import { s, append, hexToRgbA } from './VanillaJs.js';
8
+ import { getProxyPath } from './Router.js';
8
9
  import { s4 } from './CommonJs.js';
9
10
  import { Input } from './Input.js';
10
11
  import { ToggleSwitch } from './ToggleSwitch.js';
@@ -0,0 +1,14 @@
1
+ const Pagination = {
2
+ Render: async ({ id }) => {
3
+ return html`
4
+ <style>
5
+ .pagination-container-${id} {
6
+ }
7
+ </style>
8
+
9
+ <div class="in pagination-container-${id}">test pagination</div>
10
+ `;
11
+ },
12
+ };
13
+
14
+ export { Pagination };
@@ -2,17 +2,14 @@ import { getId, isValidDate, newInstance } from './CommonJs.js';
2
2
  import { LoadingAnimation } from '../core/LoadingAnimation.js';
3
3
  import { Validator } from '../core/Validator.js';
4
4
  import { Input } from '../core/Input.js';
5
- import { Responsive } from '../core/Responsive.js';
6
5
  import { darkTheme, ThemeEvents } from './Css.js';
7
- import { append, getDataFromInputFile, getQueryParams, htmls, prepend, s } from './VanillaJs.js';
6
+ import { append, getDataFromInputFile, htmls, s } from './VanillaJs.js';
8
7
  import { BtnIcon } from './BtnIcon.js';
9
8
  import { Translate } from './Translate.js';
10
9
  import { DropDown } from './DropDown.js';
11
- import { dynamicCol, renderCssAttr } from './Css.js';
10
+ import { dynamicCol } from './Css.js';
12
11
  import { EventsUI } from './EventsUI.js';
13
12
  import { ToggleSwitch } from './ToggleSwitch.js';
14
- import { Modal } from './Modal.js';
15
- import { RouterEvents, setQueryPath } from './Router.js';
16
13
  import { RichText } from './RichText.js';
17
14
  import { loggerFactory } from './Logger.js';
18
15
  import { Badge } from './Badge.js';
@@ -470,12 +467,7 @@ const Panel = {
470
467
  s(`.${btnSelector}`).classList.remove('hide');
471
468
  }
472
469
  }
473
- setTimeout(() => {
474
- s(`.${idPanel}-form-body`).classList.add('hide');
475
- });
476
- if (options.route && getQueryParams().cid) {
477
- setQueryPath({ path: options.route, queryPath: '', replace: true });
478
- }
470
+ s(`.${idPanel}-form-body`).classList.add('hide');
479
471
  };
480
472
  s(`.btn-${idPanel}-add`).onclick = (e) => {
481
473
  e.preventDefault();
@@ -1,12 +1,6 @@
1
1
  import { getCapVariableName, newInstance, random, range, uniqueArray } from './CommonJs.js';
2
2
  import { marked } from 'marked';
3
- import {
4
- getBlobFromUint8ArrayFile,
5
- getDataFromInputFile,
6
- getQueryParams,
7
- getRawContentFile,
8
- htmls,
9
- } from './VanillaJs.js';
3
+ import { getBlobFromUint8ArrayFile, getDataFromInputFile, getRawContentFile, htmls } from './VanillaJs.js';
10
4
  import { Panel } from './Panel.js';
11
5
  import { NotificationManager } from './NotificationManager.js';
12
6
  import { DocumentService } from '../../services/document/document.service.js';
@@ -15,7 +9,7 @@ import { getSrcFromFileData } from './Input.js';
15
9
  import { imageShimmer, renderCssAttr } from './Css.js';
16
10
  import { Translate } from './Translate.js';
17
11
  import { Modal } from './Modal.js';
18
- import { closeModalRouteChangeEvents, listenQueryPathInstance, setQueryPath } from './Router.js';
12
+ import { closeModalRouteChangeEvents, listenQueryPathInstance, setQueryPath, getQueryParams } from './Router.js';
19
13
 
20
14
  const PanelForm = {
21
15
  Data: {},
@@ -170,7 +164,7 @@ const PanelForm = {
170
164
  status,
171
165
  });
172
166
  if (getQueryParams().cid === data.id) {
173
- setQueryPath({ path: options.route, queryPath: '', replace: true });
167
+ setQueryPath({ path: options.route, queryPath: '' });
174
168
  if (PanelForm.Data[idPanel].updatePanel) await PanelForm.Data[idPanel].updatePanel();
175
169
  }
176
170
 
@@ -426,10 +420,8 @@ const PanelForm = {
426
420
  let firsUpdateEvent = false;
427
421
  let lastCid;
428
422
  let lastUserId;
429
- closeModalRouteChangeEvents[idPanel] = (newPath) => {
430
- if (newPath.split('?')[0] === '/' && PanelForm.Data[idPanel].data && PanelForm.Data[idPanel].data.length === 0) {
431
- this.Data[idPanel].updatePanel();
432
- }
423
+ closeModalRouteChangeEvents[idPanel] = () => {
424
+ this.Data[idPanel].updatePanel();
433
425
  };
434
426
  this.Data[idPanel].updatePanel = async () => {
435
427
  const cid = getQueryParams().cid ? getQueryParams().cid : '';
@@ -437,7 +429,6 @@ const PanelForm = {
437
429
  if (lastCid === cid && !forceUpdate) return;
438
430
  lastUserId = newInstance(Elements.Data.user.main.model.user._id);
439
431
  lastCid = cid;
440
- if (options.route === 'home') Modal.homeCid = newInstance(cid);
441
432
  htmls(`.${options.parentIdModal ? 'html-' + options.parentIdModal : 'main-body'}`, await renderSrrPanelData());
442
433
  await getPanelData();
443
434
  htmls(
@@ -461,7 +452,7 @@ const PanelForm = {
461
452
  Modal.Data['modal-menu'].onHome[idPanel] = async () => {
462
453
  lastCid = undefined;
463
454
  lastUserId = undefined;
464
- setQueryPath({ path: options.route, queryPath: '' });
455
+ setQueryPath({ path: options.route, queryPath: options.route === 'home' ? '?' : '' });
465
456
  await this.Data[idPanel].updatePanel();
466
457
  };
467
458
  }
@@ -3,11 +3,11 @@ import { Auth } from './Auth.js';
3
3
  import { BtnIcon } from './BtnIcon.js';
4
4
  import { EventsUI } from './EventsUI.js';
5
5
  import { Input } from './Input.js';
6
- import { LogIn } from './LogIn.js';
7
6
  import { NotificationManager } from './NotificationManager.js';
8
7
  import { Translate } from './Translate.js';
9
8
  import { Validator } from './Validator.js';
10
- import { getProxyPath, getQueryParams, s } from './VanillaJs.js';
9
+ import { s } from './VanillaJs.js';
10
+ import { getProxyPath, getQueryParams } from './Router.js';
11
11
 
12
12
  const Recover = {
13
13
  Event: {},