web-mojo 2.1.174 → 2.1.219

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 (73) hide show
  1. package/README.md +25 -41
  2. package/dist/admin.cjs.js +1 -1
  3. package/dist/admin.cjs.js.map +1 -1
  4. package/dist/admin.es.js +27 -13
  5. package/dist/admin.es.js.map +1 -1
  6. package/dist/auth.cjs.js +1 -1
  7. package/dist/auth.cjs.js.map +1 -1
  8. package/dist/auth.es.js +3 -3
  9. package/dist/auth.es.js.map +1 -1
  10. package/dist/charts.cjs.js +1 -1
  11. package/dist/charts.es.js +2 -2
  12. package/dist/chunks/{ContextMenu-CnmtsPSr.js → ContextMenu-BGstYX-N.js} +2 -2
  13. package/dist/chunks/{ContextMenu-CnmtsPSr.js.map → ContextMenu-BGstYX-N.js.map} +1 -1
  14. package/dist/chunks/{ContextMenu-C6vZYbuB.js → ContextMenu-DjS0WgXA.js} +2 -2
  15. package/dist/chunks/{ContextMenu-C6vZYbuB.js.map → ContextMenu-DjS0WgXA.js.map} +1 -1
  16. package/dist/chunks/{DataView-BlAus9s2.js → DataView-Dmobu7T8.js} +2 -2
  17. package/dist/chunks/{DataView-BlAus9s2.js.map → DataView-Dmobu7T8.js.map} +1 -1
  18. package/dist/chunks/{DataView-B2nY3dq5.js → DataView-LCk00Xma.js} +2 -2
  19. package/dist/chunks/{DataView-B2nY3dq5.js.map → DataView-LCk00Xma.js.map} +1 -1
  20. package/dist/chunks/{Dialog-CL9gqpvo.js → Dialog-Bu9EGh-z.js} +62 -16
  21. package/dist/chunks/Dialog-Bu9EGh-z.js.map +1 -0
  22. package/dist/chunks/Dialog-CxJjXDJ-.js +2 -0
  23. package/dist/chunks/Dialog-CxJjXDJ-.js.map +1 -0
  24. package/dist/chunks/{FilePreviewView-CyzeF558.js → FilePreviewView-C-VswdQl.js} +578 -20
  25. package/dist/chunks/FilePreviewView-C-VswdQl.js.map +1 -0
  26. package/dist/chunks/FilePreviewView-CxT-vXFS.js +2 -0
  27. package/dist/chunks/FilePreviewView-CxT-vXFS.js.map +1 -0
  28. package/dist/chunks/FormView-DWV5Lhc3.js +2 -0
  29. package/dist/chunks/FormView-DWV5Lhc3.js.map +1 -0
  30. package/dist/chunks/{FormView-Bj69VGzX.js → FormView-DhZi_-D_.js} +8 -8
  31. package/dist/chunks/FormView-DhZi_-D_.js.map +1 -0
  32. package/dist/chunks/{MetricsChart-BPSEtSzA.js → MetricsChart-BOSgjGoW.js} +3 -3
  33. package/dist/chunks/{MetricsChart-BPSEtSzA.js.map → MetricsChart-BOSgjGoW.js.map} +1 -1
  34. package/dist/chunks/{MetricsChart-xQThioRH.js → MetricsChart-CHQmuqGa.js} +2 -2
  35. package/dist/chunks/{MetricsChart-xQThioRH.js.map → MetricsChart-CHQmuqGa.js.map} +1 -1
  36. package/dist/chunks/{PDFViewer-Caz8EFtn.js → PDFViewer-C7_03lr6.js} +3 -3
  37. package/dist/chunks/{PDFViewer-Caz8EFtn.js.map → PDFViewer-C7_03lr6.js.map} +1 -1
  38. package/dist/chunks/{PDFViewer-Dze8LXFl.js → PDFViewer-CTQ_WArl.js} +2 -2
  39. package/dist/chunks/{PDFViewer-Dze8LXFl.js.map → PDFViewer-CTQ_WArl.js.map} +1 -1
  40. package/dist/chunks/{Page-B6WTO7aL.js → Page-7mRcLFeD.js} +2 -2
  41. package/dist/chunks/{Page-B6WTO7aL.js.map → Page-7mRcLFeD.js.map} +1 -1
  42. package/dist/chunks/{Page-CdWer0mN.js → Page-CG1u27-d.js} +2 -2
  43. package/dist/chunks/{Page-CdWer0mN.js.map → Page-CG1u27-d.js.map} +1 -1
  44. package/dist/chunks/{TopNav-B9X2hkdY.js → TopNav-CF1Ic6Ty.js} +2 -2
  45. package/dist/chunks/{TopNav-B9X2hkdY.js.map → TopNav-CF1Ic6Ty.js.map} +1 -1
  46. package/dist/chunks/{TopNav-C4y8gzmV.js → TopNav-CprY7p9c.js} +2 -2
  47. package/dist/chunks/{TopNav-C4y8gzmV.js.map → TopNav-CprY7p9c.js.map} +1 -1
  48. package/dist/chunks/{User-DRzR1tz9.js → User-CgSxo-iW.js} +2 -2
  49. package/dist/chunks/{User-DRzR1tz9.js.map → User-CgSxo-iW.js.map} +1 -1
  50. package/dist/chunks/{User-C75UgBN5.js → User-DPWffTVQ.js} +2 -2
  51. package/dist/chunks/{User-C75UgBN5.js.map → User-DPWffTVQ.js.map} +1 -1
  52. package/dist/chunks/{WebApp-BPseqdDI.js → WebApp-D35UJNMm.js} +2 -2
  53. package/dist/chunks/{WebApp-BPseqdDI.js.map → WebApp-D35UJNMm.js.map} +1 -1
  54. package/dist/chunks/{WebApp-4EVJnYOy.js → WebApp-DDt4Ihy7.js} +12 -12
  55. package/dist/chunks/{WebApp-4EVJnYOy.js.map → WebApp-DDt4Ihy7.js.map} +1 -1
  56. package/dist/css/web-mojo.css +1 -1
  57. package/dist/docit.cjs.js +1 -1
  58. package/dist/docit.es.js +6 -6
  59. package/dist/index.cjs.js +1 -1
  60. package/dist/index.es.js +11 -11
  61. package/dist/lightbox.cjs.js +1 -1
  62. package/dist/lightbox.es.js +4 -4
  63. package/dist/table.css +267 -0
  64. package/package.json +1 -1
  65. package/dist/chunks/Dialog-6U0yV2yE.js +0 -2
  66. package/dist/chunks/Dialog-6U0yV2yE.js.map +0 -1
  67. package/dist/chunks/Dialog-CL9gqpvo.js.map +0 -1
  68. package/dist/chunks/FilePreviewView-BsQsP94L.js +0 -2
  69. package/dist/chunks/FilePreviewView-BsQsP94L.js.map +0 -1
  70. package/dist/chunks/FilePreviewView-CyzeF558.js.map +0 -1
  71. package/dist/chunks/FormView-Bcfb2o5E.js +0 -2
  72. package/dist/chunks/FormView-Bcfb2o5E.js.map +0 -1
  73. package/dist/chunks/FormView-Bj69VGzX.js.map +0 -1
package/README.md CHANGED
@@ -7,11 +7,11 @@
7
7
 
8
8
  ## ✨ What's New in 2.1.0
9
9
 
10
- 🏗️ **Core + Extensions Architecture** - Clean separation with plugin system
11
- 📦 **Subpath Exports** - Import exactly what you need
12
- ⚡ **Lazy Loading** - Reduced bundle sizes with dynamic imports
13
- 🔌 **Plugin System** - Extensions enhance core without dependencies
14
- 🎯 **Tree Shaking** - Optimized builds with modern bundlers
10
+ 🏗️ **Core + Extensions Architecture** - Clean separation with plugin system
11
+ 📦 **Subpath Exports** - Import exactly what you need
12
+ ⚡ **Lazy Loading** - Reduced bundle sizes with dynamic imports
13
+ 🔌 **Plugin System** - Extensions enhance core without dependencies
14
+ 🎯 **Tree Shaking** - Optimized builds with modern bundlers
15
15
 
16
16
  ## 🚀 Quick Start
17
17
 
@@ -72,7 +72,7 @@ const app = new AuthApp({
72
72
  });
73
73
  ```
74
74
 
75
- #### 🖼️ Lightbox (`web-mojo/lightbox`)
75
+ #### 🖼️ Lightbox (`web-mojo/lightbox`)
76
76
  Image and PDF viewers with editing capabilities:
77
77
 
78
78
  ```javascript
@@ -159,13 +159,8 @@ class DashboardPage extends Page {
159
159
  ...options
160
160
  });
161
161
  }
162
-
163
- getTemplateData() {
164
- return {
165
- message: 'Your application is ready!'
166
- };
167
- }
168
-
162
+
163
+
169
164
  async onActionShowDialog() {
170
165
  const { Dialog } = await import('web-mojo');
171
166
  Dialog.showInfo('Hello from MOJO!');
@@ -194,7 +189,7 @@ const authApp = new AuthApp({
194
189
  // Main app (after authentication)
195
190
  const mainApp = new WebApp({
196
191
  name: 'Acme Portal',
197
- api: {
192
+ api: {
198
193
  baseURL: 'https://api.example.com',
199
194
  token: localStorage.getItem('auth_token')
200
195
  }
@@ -236,8 +231,8 @@ class UserTableView extends View {
236
231
  <td>{{name}}</td>
237
232
  <td>{{email}}</td>
238
233
  <td>
239
- <button class="btn btn-sm btn-primary"
240
- data-action="edit-user"
234
+ <button class="btn btn-sm btn-primary"
235
+ data-action="edit-user"
241
236
  data-user-id="{{id}}">Edit</button>
242
237
  </td>
243
238
  </tr>
@@ -247,25 +242,19 @@ class UserTableView extends View {
247
242
  `,
248
243
  ...options
249
244
  });
250
-
245
+
251
246
  this.collection = new UserList();
252
247
  }
253
-
248
+
254
249
  async onMount() {
255
250
  await this.collection.fetch();
256
251
  this.render();
257
252
  }
258
-
259
- getTemplateData() {
260
- return {
261
- users: this.collection.toJSON()
262
- };
263
- }
264
-
253
+
265
254
  async onActionEditUser(action, event, element) {
266
255
  const userId = element.dataset.userId;
267
256
  const user = this.collection.get(userId);
268
-
257
+
269
258
  const { Dialog } = await import('web-mojo');
270
259
  Dialog.showModelForm(user, {
271
260
  title: 'Edit User',
@@ -370,8 +359,8 @@ const app = new PortalApp({
370
359
  name: 'main',
371
360
  items: [
372
361
  { text: 'Home', route: 'home', icon: 'bi-house' },
373
- {
374
- text: 'Admin',
362
+ {
363
+ text: 'Admin',
375
364
  icon: 'bi-gear',
376
365
  children: [
377
366
  { text: 'Users', route: 'users' },
@@ -407,21 +396,16 @@ class MyView extends View {
407
396
  ...options
408
397
  });
409
398
  }
410
-
399
+
411
400
  // Lifecycle hooks
412
401
  async onMount() { /* Called when mounted to DOM */ }
413
402
  async onUnmount() { /* Called when removed */ }
414
-
415
- // Template data
416
- getTemplateData() {
417
- return { title: 'My View' };
418
- }
419
-
403
+
420
404
  // Event handlers
421
405
  async onActionClickMe(action, event, element) {
422
406
  this.showRegion('content', new AnotherView());
423
407
  }
424
-
408
+
425
409
  // Custom events
426
410
  onCustomEvent(data) { /* Handle custom events */ }
427
411
  }
@@ -435,11 +419,11 @@ For modern build tools:
435
419
  ```javascript
436
420
  // vite.config.js
437
421
  export default {
438
- optimizeDeps: {
439
- exclude: ['web-mojo']
422
+ optimizeDeps: {
423
+ exclude: ['web-mojo']
440
424
  },
441
- ssr: {
442
- noExternal: ['web-mojo']
425
+ ssr: {
426
+ noExternal: ['web-mojo']
443
427
  }
444
428
  }
445
429
  ```
@@ -507,4 +491,4 @@ This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENS
507
491
 
508
492
  ---
509
493
 
510
- Built with ❤️ by the MOJO Framework Team
494
+ Built with ❤️ by the MOJO Framework Team