web-mojo 2.1.774 → 2.1.783

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 (59) hide show
  1. package/dist/admin.cjs.js +1 -1
  2. package/dist/admin.es.js +10 -10
  3. package/dist/auth.cjs.js +1 -1
  4. package/dist/auth.cjs.js.map +1 -1
  5. package/dist/auth.es.js +3 -3
  6. package/dist/auth.es.js.map +1 -1
  7. package/dist/charts.cjs.js +1 -1
  8. package/dist/charts.es.js +2 -2
  9. package/dist/chat.css +2 -0
  10. package/dist/chunks/{ChatView-DLHcXrOd.js → ChatView-DnlFXNbs.js} +6 -6
  11. package/dist/chunks/{ChatView-DLHcXrOd.js.map → ChatView-DnlFXNbs.js.map} +1 -1
  12. package/dist/chunks/{ChatView-C5Wlnls-.js → ChatView-DrBUQ373.js} +2 -2
  13. package/dist/chunks/{ChatView-C5Wlnls-.js.map → ChatView-DrBUQ373.js.map} +1 -1
  14. package/dist/chunks/{ContextMenu-xEFt_e2R.js → ContextMenu-BnUxQSjf.js} +2 -2
  15. package/dist/chunks/{ContextMenu-xEFt_e2R.js.map → ContextMenu-BnUxQSjf.js.map} +1 -1
  16. package/dist/chunks/{ContextMenu-BbRMlTIh.js → ContextMenu-b_OrhKHs.js} +2 -2
  17. package/dist/chunks/{ContextMenu-BbRMlTIh.js.map → ContextMenu-b_OrhKHs.js.map} +1 -1
  18. package/dist/chunks/{DataView-C6IXIAYw.js → DataView-DrEVJtrm.js} +2 -2
  19. package/dist/chunks/{DataView-C6IXIAYw.js.map → DataView-DrEVJtrm.js.map} +1 -1
  20. package/dist/chunks/{DataView-DLiiJKUT.js → DataView-t3OBXM-2.js} +2 -2
  21. package/dist/chunks/{DataView-DLiiJKUT.js.map → DataView-t3OBXM-2.js.map} +1 -1
  22. package/dist/chunks/{Dialog-CSY1llns.js → Dialog-CCLikhVB.js} +5 -5
  23. package/dist/chunks/{Dialog-CSY1llns.js.map → Dialog-CCLikhVB.js.map} +1 -1
  24. package/dist/chunks/{Dialog-BAjbZRH3.js → Dialog-DmXdNWsq.js} +2 -2
  25. package/dist/chunks/{Dialog-BAjbZRH3.js.map → Dialog-DmXdNWsq.js.map} +1 -1
  26. package/dist/chunks/{FormView-CDa3JEgn.js → FormView-CDR6Tkde.js} +2 -2
  27. package/dist/chunks/{FormView-CDa3JEgn.js.map → FormView-CDR6Tkde.js.map} +1 -1
  28. package/dist/chunks/{FormView-D9lB4HNY.js → FormView-DMyXiDWu.js} +2 -2
  29. package/dist/chunks/{FormView-D9lB4HNY.js.map → FormView-DMyXiDWu.js.map} +1 -1
  30. package/dist/chunks/{MetricsMiniChartWidget-RyACPsGk.js → MetricsMiniChartWidget-BmY66k1F.js} +3 -3
  31. package/dist/chunks/{MetricsMiniChartWidget-RyACPsGk.js.map → MetricsMiniChartWidget-BmY66k1F.js.map} +1 -1
  32. package/dist/chunks/{MetricsMiniChartWidget-De93KoBV.js → MetricsMiniChartWidget-CZ2J2Hc2.js} +2 -2
  33. package/dist/chunks/{MetricsMiniChartWidget-De93KoBV.js.map → MetricsMiniChartWidget-CZ2J2Hc2.js.map} +1 -1
  34. package/dist/chunks/{PDFViewer-BCAdNjUg.js → PDFViewer-B6e5yweS.js} +3 -3
  35. package/dist/chunks/{PDFViewer-BCAdNjUg.js.map → PDFViewer-B6e5yweS.js.map} +1 -1
  36. package/dist/chunks/{PDFViewer-B3RjsTuN.js → PDFViewer-B8AW4CBc.js} +2 -2
  37. package/dist/chunks/{PDFViewer-B3RjsTuN.js.map → PDFViewer-B8AW4CBc.js.map} +1 -1
  38. package/dist/chunks/{Page-DXE5-iMb.js → Page-Bv3lkFL5.js} +2 -2
  39. package/dist/chunks/{Page-DXE5-iMb.js.map → Page-Bv3lkFL5.js.map} +1 -1
  40. package/dist/chunks/{Page-DJ9v7mzu.js → Page-DEBpjrLS.js} +2 -2
  41. package/dist/chunks/{Page-DJ9v7mzu.js.map → Page-DEBpjrLS.js.map} +1 -1
  42. package/dist/chunks/{TopNav-Dr6SpoR6.js → TopNav-BLY2EcD5.js} +5 -5
  43. package/dist/chunks/{TopNav-Dr6SpoR6.js.map → TopNav-BLY2EcD5.js.map} +1 -1
  44. package/dist/chunks/{TopNav-ImcCHAH0.js → TopNav-DNUFKcWJ.js} +2 -2
  45. package/dist/chunks/{TopNav-ImcCHAH0.js.map → TopNav-DNUFKcWJ.js.map} +1 -1
  46. package/dist/chunks/{WebApp-DtLBT6Lp.js → WebApp-AGmBnM8H.js} +13 -13
  47. package/dist/chunks/{WebApp-DtLBT6Lp.js.map → WebApp-AGmBnM8H.js.map} +1 -1
  48. package/dist/chunks/{WebApp-BZqZu9Du.js → WebApp-BR_7YgWu.js} +2 -2
  49. package/dist/chunks/{WebApp-BZqZu9Du.js.map → WebApp-BR_7YgWu.js.map} +1 -1
  50. package/dist/css/web-mojo.css +1 -1
  51. package/dist/docit.cjs.js +1 -1
  52. package/dist/docit.es.js +5 -5
  53. package/dist/index.cjs.js +1 -1
  54. package/dist/index.cjs.js.map +1 -1
  55. package/dist/index.es.js +74 -17
  56. package/dist/index.es.js.map +1 -1
  57. package/dist/lightbox.cjs.js +1 -1
  58. package/dist/lightbox.es.js +4 -4
  59. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -1,15 +1,15 @@
1
- import { V as View, W as WebApp, d as dataFormatter, M as Mustache } from "./chunks/WebApp-DtLBT6Lp.js";
2
- import { B, D, g, E, h, r, R, b, a, c, e, f } from "./chunks/WebApp-DtLBT6Lp.js";
3
- import { P as Page } from "./chunks/Page-DXE5-iMb.js";
4
- import { G as GroupList, T as ToastService, U as User, a as Group } from "./chunks/ContextMenu-BbRMlTIh.js";
5
- import { C, b as b2, c as c2, M, f as f2, g as g2, h as h2, i, j, e as e2, d } from "./chunks/ContextMenu-BbRMlTIh.js";
6
- import { M as Member } from "./chunks/ChatView-DLHcXrOd.js";
7
- import { f as f3, e as e3, C as C2, E as E2, k, j as j2, r as r2, t, s, x, z, y, u, w, v, F, g as g3, ap, aq, D as D2, I, B as B2, A, H, Q, R as R2, G, N, O, J, K, Y, Z, a2, a3, $, _, a0, a1, a5, a7, a6, a4, L, c as c3, a8, a9, l, n, m, ab, aa, ae, ac, ad, P, aj, an, ak, al, am, af, ag, ah, ao, ai, W, X, U, V, S, i as i2, h as h3, o, q, p, d as d2, b as b3, a as a10, T, ar, aw, av, as, at, au } from "./chunks/ChatView-DLHcXrOd.js";
8
- import { S as SimpleSearchView, T as TopNav } from "./chunks/TopNav-Dr6SpoR6.js";
1
+ import { V as View, W as WebApp, d as dataFormatter, M as Mustache } from "./chunks/WebApp-AGmBnM8H.js";
2
+ import { B, D, g, E, h, r, R, b, a, c, e, f } from "./chunks/WebApp-AGmBnM8H.js";
3
+ import { P as Page } from "./chunks/Page-Bv3lkFL5.js";
4
+ import { G as GroupList, T as ToastService, U as User, a as Group } from "./chunks/ContextMenu-b_OrhKHs.js";
5
+ import { C, b as b2, c as c2, M, f as f2, g as g2, h as h2, i, j, e as e2, d } from "./chunks/ContextMenu-b_OrhKHs.js";
6
+ import { M as Member } from "./chunks/ChatView-DnlFXNbs.js";
7
+ import { f as f3, e as e3, C as C2, E as E2, k, j as j2, r as r2, t, s, x, z, y, u, w, v, F, g as g3, ap, aq, D as D2, I, B as B2, A, H, Q, R as R2, G, N, O, J, K, Y, Z, a2, a3, $, _, a0, a1, a5, a7, a6, a4, L, c as c3, a8, a9, l, n, m, ab, aa, ae, ac, ad, P, aj, an, ak, al, am, af, ag, ah, ao, ai, W, X, U, V, S, i as i2, h as h3, o, q, p, d as d2, b as b3, a as a10, T, ar, aw, av, as, at, au } from "./chunks/ChatView-DnlFXNbs.js";
8
+ import { S as SimpleSearchView, T as TopNav } from "./chunks/TopNav-BLY2EcD5.js";
9
+ import Dialog from "./chunks/Dialog-CCLikhVB.js";
9
10
  import { T as TokenManager } from "./chunks/TokenManager-CAZNcCMs.js";
10
- import Dialog from "./chunks/Dialog-CSY1llns.js";
11
- import { default as default2 } from "./chunks/DataView-C6IXIAYw.js";
12
- import { F as F2, a as a11 } from "./chunks/FormView-D9lB4HNY.js";
11
+ import { default as default2 } from "./chunks/DataView-DrEVJtrm.js";
12
+ import { F as F2, a as a11 } from "./chunks/FormView-DMyXiDWu.js";
13
13
  import { W as W2 } from "./chunks/WebSocketClient-B6ribe3B.js";
14
14
  const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false };
15
15
  const LEVELS = Object.freeze({
@@ -266,6 +266,8 @@ class Sidebar extends View {
266
266
  this.sidebarTheme = options.theme || "sidebar-light";
267
267
  this.customView = null;
268
268
  if (this.options.groupHeader) this.groupHeader = this.options.groupHeader;
269
+ this.groupSelectorMode = options.groupSelectorMode || "inline";
270
+ this.groupSelectorDialog = null;
269
271
  if (this.sidebarTheme) {
270
272
  this.addClass(this.sidebarTheme);
271
273
  }
@@ -319,18 +321,72 @@ class Sidebar extends View {
319
321
  });
320
322
  }
321
323
  showGroupSearch() {
322
- this.setClass("sidebar");
323
- this.showSearch = true;
324
- this.render();
324
+ if (this.groupSelectorMode === "dialog") {
325
+ this.showGroupSearchDialog();
326
+ } else {
327
+ this.setClass("sidebar");
328
+ this.showSearch = true;
329
+ this.render();
330
+ }
325
331
  }
326
332
  hideGroupSearch() {
327
- this.setClass("sidebar");
328
- this.showSearch = false;
329
- this.render();
333
+ if (this.groupSelectorMode === "dialog") {
334
+ if (this.groupSelectorDialog) {
335
+ this.groupSelectorDialog.hide();
336
+ }
337
+ } else {
338
+ this.setClass("sidebar");
339
+ this.showSearch = false;
340
+ this.render();
341
+ }
330
342
  }
331
343
  onActionShowGroupSearch() {
332
344
  this.showGroupSearch();
333
345
  }
346
+ /**
347
+ * Show group selector in a dialog (like TopNav)
348
+ */
349
+ async showGroupSearchDialog() {
350
+ const collection = new GroupList();
351
+ const searchView = new SimpleSearchView({
352
+ Collection: GroupList,
353
+ collection,
354
+ // Pass the collection instance
355
+ itemTemplate: `
356
+ <div class="p-3 border-bottom">
357
+ <div class="fw-semibold text-dark">{{name}}</div>
358
+ <small class="text-muted">#{{id}} {{kind}}</small>
359
+ </div>
360
+ `,
361
+ searchFields: ["name"],
362
+ headerText: "Select Group",
363
+ searchPlaceholder: "Search groups...",
364
+ headerIcon: "bi-building",
365
+ showExitButton: false
366
+ });
367
+ this.groupSelectorDialog = new Dialog({
368
+ title: "Select Group",
369
+ body: searchView,
370
+ size: "md",
371
+ scrollable: true,
372
+ noBodyPadding: true,
373
+ buttons: [],
374
+ closeButton: true
375
+ });
376
+ searchView.on("item:selected", (evt) => {
377
+ console.log(evt);
378
+ this.getApp().setActiveGroup(evt.model);
379
+ if (this.groupSelectorDialog) {
380
+ this.groupSelectorDialog.hide();
381
+ }
382
+ });
383
+ this.groupSelectorDialog.on("hidden", () => {
384
+ this.groupSelectorDialog.destroy();
385
+ this.groupSelectorDialog = null;
386
+ });
387
+ await this.groupSelectorDialog.render(true, document.body);
388
+ this.groupSelectorDialog.show();
389
+ }
334
390
  /**
335
391
  * Find and switch to the menu that contains the given route
336
392
  */
@@ -1807,6 +1863,7 @@ class PortalApp extends WebApp {
1807
1863
  this.sidebarConfig = {};
1808
1864
  if (config.sidebar && config.sidebar.menus) {
1809
1865
  this.sidebarConfig.menus = config.sidebar.menus;
1866
+ this.sidebarConfig.groupSelectorMode = config.sidebar.groupSelectorMode || "inline";
1810
1867
  } else if (config.sidebar.menu) {
1811
1868
  this.sidebarConfig.menu = config.sidebar.menu;
1812
1869
  } else if (config.sidebar.items) {