web-mojo 2.1.175 → 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.
- package/README.md +25 -41
- package/dist/admin.cjs.js +1 -1
- package/dist/admin.cjs.js.map +1 -1
- package/dist/admin.es.js +27 -13
- package/dist/admin.es.js.map +1 -1
- package/dist/auth.cjs.js +1 -1
- package/dist/auth.cjs.js.map +1 -1
- package/dist/auth.es.js +3 -3
- package/dist/auth.es.js.map +1 -1
- package/dist/charts.cjs.js +1 -1
- package/dist/charts.es.js +2 -2
- package/dist/chunks/{ContextMenu-CvFe_-pA.js → ContextMenu-BGstYX-N.js} +2 -2
- package/dist/chunks/{ContextMenu-CvFe_-pA.js.map → ContextMenu-BGstYX-N.js.map} +1 -1
- package/dist/chunks/{ContextMenu-CuTbtePk.js → ContextMenu-DjS0WgXA.js} +2 -2
- package/dist/chunks/{ContextMenu-CuTbtePk.js.map → ContextMenu-DjS0WgXA.js.map} +1 -1
- package/dist/chunks/{DataView-UjG66gmW.js → DataView-Dmobu7T8.js} +2 -2
- package/dist/chunks/{DataView-UjG66gmW.js.map → DataView-Dmobu7T8.js.map} +1 -1
- package/dist/chunks/{DataView-BwZajXhu.js → DataView-LCk00Xma.js} +2 -2
- package/dist/chunks/{DataView-BwZajXhu.js.map → DataView-LCk00Xma.js.map} +1 -1
- package/dist/chunks/{Dialog-eoLNdg-d.js → Dialog-Bu9EGh-z.js} +62 -16
- package/dist/chunks/Dialog-Bu9EGh-z.js.map +1 -0
- package/dist/chunks/Dialog-CxJjXDJ-.js +2 -0
- package/dist/chunks/Dialog-CxJjXDJ-.js.map +1 -0
- package/dist/chunks/{FilePreviewView-Crpalaos.js → FilePreviewView-C-VswdQl.js} +578 -20
- package/dist/chunks/FilePreviewView-C-VswdQl.js.map +1 -0
- package/dist/chunks/FilePreviewView-CxT-vXFS.js +2 -0
- package/dist/chunks/FilePreviewView-CxT-vXFS.js.map +1 -0
- package/dist/chunks/FormView-DWV5Lhc3.js +2 -0
- package/dist/chunks/FormView-DWV5Lhc3.js.map +1 -0
- package/dist/chunks/{FormView-fUbbKQQU.js → FormView-DhZi_-D_.js} +4 -2
- package/dist/chunks/FormView-DhZi_-D_.js.map +1 -0
- package/dist/chunks/{MetricsChart-DY1w4wC-.js → MetricsChart-BOSgjGoW.js} +3 -3
- package/dist/chunks/{MetricsChart-DY1w4wC-.js.map → MetricsChart-BOSgjGoW.js.map} +1 -1
- package/dist/chunks/{MetricsChart-B_KuNFD-.js → MetricsChart-CHQmuqGa.js} +2 -2
- package/dist/chunks/{MetricsChart-B_KuNFD-.js.map → MetricsChart-CHQmuqGa.js.map} +1 -1
- package/dist/chunks/{PDFViewer-CYaI8u8I.js → PDFViewer-C7_03lr6.js} +3 -3
- package/dist/chunks/{PDFViewer-CYaI8u8I.js.map → PDFViewer-C7_03lr6.js.map} +1 -1
- package/dist/chunks/{PDFViewer-D5SmAaQD.js → PDFViewer-CTQ_WArl.js} +2 -2
- package/dist/chunks/{PDFViewer-D5SmAaQD.js.map → PDFViewer-CTQ_WArl.js.map} +1 -1
- package/dist/chunks/{Page-tbcVc_Wl.js → Page-7mRcLFeD.js} +2 -2
- package/dist/chunks/{Page-tbcVc_Wl.js.map → Page-7mRcLFeD.js.map} +1 -1
- package/dist/chunks/{Page-D5kSAjt8.js → Page-CG1u27-d.js} +2 -2
- package/dist/chunks/{Page-D5kSAjt8.js.map → Page-CG1u27-d.js.map} +1 -1
- package/dist/chunks/{TopNav-DlHcfQbu.js → TopNav-CF1Ic6Ty.js} +2 -2
- package/dist/chunks/{TopNav-DlHcfQbu.js.map → TopNav-CF1Ic6Ty.js.map} +1 -1
- package/dist/chunks/{TopNav-mQvYJp04.js → TopNav-CprY7p9c.js} +2 -2
- package/dist/chunks/{TopNav-mQvYJp04.js.map → TopNav-CprY7p9c.js.map} +1 -1
- package/dist/chunks/{User-DI3U4oRV.js → User-CgSxo-iW.js} +2 -2
- package/dist/chunks/{User-DI3U4oRV.js.map → User-CgSxo-iW.js.map} +1 -1
- package/dist/chunks/{User-CvWFN0ul.js → User-DPWffTVQ.js} +2 -2
- package/dist/chunks/{User-CvWFN0ul.js.map → User-DPWffTVQ.js.map} +1 -1
- package/dist/chunks/{WebApp-sKJf8j1s.js → WebApp-D35UJNMm.js} +2 -2
- package/dist/chunks/{WebApp-sKJf8j1s.js.map → WebApp-D35UJNMm.js.map} +1 -1
- package/dist/chunks/{WebApp-B2r2EDj7.js → WebApp-DDt4Ihy7.js} +12 -12
- package/dist/chunks/{WebApp-B2r2EDj7.js.map → WebApp-DDt4Ihy7.js.map} +1 -1
- package/dist/css/web-mojo.css +1 -1
- package/dist/docit.cjs.js +1 -1
- package/dist/docit.es.js +6 -6
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +11 -11
- package/dist/lightbox.cjs.js +1 -1
- package/dist/lightbox.es.js +4 -4
- package/dist/table.css +267 -0
- package/package.json +1 -1
- package/dist/chunks/Dialog-BmvpkgLD.js +0 -2
- package/dist/chunks/Dialog-BmvpkgLD.js.map +0 -1
- package/dist/chunks/Dialog-eoLNdg-d.js.map +0 -1
- package/dist/chunks/FilePreviewView-Crpalaos.js.map +0 -1
- package/dist/chunks/FilePreviewView-CxplM_0z.js +0 -2
- package/dist/chunks/FilePreviewView-CxplM_0z.js.map +0 -1
- package/dist/chunks/FormView-BDBRWOlR.js +0 -2
- package/dist/chunks/FormView-BDBRWOlR.js.map +0 -1
- package/dist/chunks/FormView-fUbbKQQU.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
|
-
|
|
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
|