@mongoosejs/studio 0.0.118 → 0.0.119

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.
@@ -1018,6 +1018,37 @@ module.exports = app => app.component('dashboard-document', {
1018
1018
  });
1019
1019
 
1020
1020
 
1021
+ /***/ }),
1022
+
1023
+ /***/ "./frontend/src/dashboard-result/dashboard-grid/dashboard-grid.js":
1024
+ /*!************************************************************************!*\
1025
+ !*** ./frontend/src/dashboard-result/dashboard-grid/dashboard-grid.js ***!
1026
+ \************************************************************************/
1027
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1028
+
1029
+ "use strict";
1030
+
1031
+
1032
+ const template = __webpack_require__(/*! ./dashboard-grid.html */ "./frontend/src/dashboard-result/dashboard-grid/dashboard-grid.html");
1033
+
1034
+ module.exports = app => app.component('dashboard-grid', {
1035
+ template: template,
1036
+ props: ['value'],
1037
+ computed: {
1038
+ columns() {
1039
+ const grid = this.value && this.value.$grid;
1040
+ if (!Array.isArray(grid) || grid.length === 0) {
1041
+ return 1;
1042
+ }
1043
+ return Math.max(1, ...grid.map(row => Array.isArray(row) ? row.length : 0));
1044
+ },
1045
+ gridTemplateColumns() {
1046
+ return `repeat(${this.columns}, minmax(0, 1fr))`;
1047
+ }
1048
+ }
1049
+ });
1050
+
1051
+
1021
1052
  /***/ }),
1022
1053
 
1023
1054
  /***/ "./frontend/src/dashboard-result/dashboard-map/dashboard-map.js":
@@ -1139,6 +1170,9 @@ module.exports = app => app.component('dashboard-result', {
1139
1170
  if (value.$text) {
1140
1171
  return 'dashboard-text';
1141
1172
  }
1173
+ if (value.$grid) {
1174
+ return 'dashboard-grid';
1175
+ }
1142
1176
  }
1143
1177
  }
1144
1178
  });
@@ -3439,6 +3473,9 @@ var map = {
3439
3473
  "./dashboard-result/dashboard-document/dashboard-document": "./frontend/src/dashboard-result/dashboard-document/dashboard-document.js",
3440
3474
  "./dashboard-result/dashboard-document/dashboard-document.html": "./frontend/src/dashboard-result/dashboard-document/dashboard-document.html",
3441
3475
  "./dashboard-result/dashboard-document/dashboard-document.js": "./frontend/src/dashboard-result/dashboard-document/dashboard-document.js",
3476
+ "./dashboard-result/dashboard-grid/dashboard-grid": "./frontend/src/dashboard-result/dashboard-grid/dashboard-grid.js",
3477
+ "./dashboard-result/dashboard-grid/dashboard-grid.html": "./frontend/src/dashboard-result/dashboard-grid/dashboard-grid.html",
3478
+ "./dashboard-result/dashboard-grid/dashboard-grid.js": "./frontend/src/dashboard-result/dashboard-grid/dashboard-grid.js",
3442
3479
  "./dashboard-result/dashboard-map/dashboard-map": "./frontend/src/dashboard-result/dashboard-map/dashboard-map.js",
3443
3480
  "./dashboard-result/dashboard-map/dashboard-map.html": "./frontend/src/dashboard-result/dashboard-map/dashboard-map.html",
3444
3481
  "./dashboard-result/dashboard-map/dashboard-map.js": "./frontend/src/dashboard-result/dashboard-map/dashboard-map.js",
@@ -4306,6 +4343,17 @@ module.exports = "<div class=\"py-2\">\n <div v-if=\"header\" class=\"border-b
4306
4343
 
4307
4344
  /***/ }),
4308
4345
 
4346
+ /***/ "./frontend/src/dashboard-result/dashboard-grid/dashboard-grid.html":
4347
+ /*!**************************************************************************!*\
4348
+ !*** ./frontend/src/dashboard-result/dashboard-grid/dashboard-grid.html ***!
4349
+ \**************************************************************************/
4350
+ /***/ ((module) => {
4351
+
4352
+ "use strict";
4353
+ module.exports = "<div class=\"grid gap-2\" :style=\"{ gridTemplateColumns: gridTemplateColumns }\">\n <template v-for=\"(row, rowIndex) in value.$grid\" :key=\"rowIndex\">\n <dashboard-result\n v-for=\"(cell, colIndex) in row\"\n :key=\"rowIndex + '-' + colIndex\"\n :result=\"cell\">\n </dashboard-result>\n </template>\n</div>\n";
4354
+
4355
+ /***/ }),
4356
+
4309
4357
  /***/ "./frontend/src/dashboard-result/dashboard-map/dashboard-map.html":
4310
4358
  /*!************************************************************************!*\
4311
4359
  !*** ./frontend/src/dashboard-result/dashboard-map/dashboard-map.html ***!
@@ -14871,7 +14919,7 @@ var bson = /*#__PURE__*/Object.freeze({
14871
14919
  /***/ ((module) => {
14872
14920
 
14873
14921
  "use strict";
14874
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@mongoosejs/studio","version":"0.0.118","description":"A sleek, powerful MongoDB UI with built-in dashboarding and auth, seamlessly integrated with your Express, Vercel, or Netlify app.","homepage":"https://studio.mongoosejs.io/","repository":{"type":"git","url":"https://github.com/mongoosejs/studio"},"dependencies":{"archetype":"0.13.1","csv-stringify":"6.3.0","ejson":"^2.2.3","extrovert":"0.0.26","marked":"15.0.12","node-inspect-extracted":"3.x","tailwindcss":"3.4.0","vanillatoasts":"^1.6.0","vue":"3.x","webpack":"5.x"},"peerDependencies":{"bson":"^5.5.1 || 6.x","express":"4.x","mongoose":"7.x || 8.x"},"devDependencies":{"@masteringjs/eslint-config":"0.1.1","axios":"1.2.2","dedent":"^1.6.0","eslint":"9.30.0","express":"4.x","mocha":"10.2.0","mongoose":"8.x"},"scripts":{"lint":"eslint .","tailwind":"tailwindcss -o ./frontend/public/tw.css","tailwind:watch":"tailwindcss -o ./frontend/public/tw.css --watch","test":"mocha test/*.test.js"}}');
14922
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@mongoosejs/studio","version":"0.0.119","description":"A sleek, powerful MongoDB UI with built-in dashboarding and auth, seamlessly integrated with your Express, Vercel, or Netlify app.","homepage":"https://studio.mongoosejs.io/","repository":{"type":"git","url":"https://github.com/mongoosejs/studio"},"dependencies":{"archetype":"0.13.1","csv-stringify":"6.3.0","ejson":"^2.2.3","extrovert":"0.0.26","marked":"15.0.12","node-inspect-extracted":"3.x","tailwindcss":"3.4.0","vanillatoasts":"^1.6.0","vue":"3.x","webpack":"5.x"},"peerDependencies":{"bson":"^5.5.1 || 6.x","express":"4.x","mongoose":"7.x || 8.x"},"devDependencies":{"@masteringjs/eslint-config":"0.1.1","axios":"1.2.2","dedent":"^1.6.0","eslint":"9.30.0","express":"4.x","mocha":"10.2.0","mongoose":"8.x"},"scripts":{"lint":"eslint .","tailwind":"tailwindcss -o ./frontend/public/tw.css","tailwind:watch":"tailwindcss -o ./frontend/public/tw.css --watch","test":"mocha test/*.test.js"}}');
14875
14923
 
14876
14924
  /***/ })
14877
14925
 
@@ -0,0 +1,9 @@
1
+ <div class="grid gap-2" :style="{ gridTemplateColumns: gridTemplateColumns }">
2
+ <template v-for="(row, rowIndex) in value.$grid" :key="rowIndex">
3
+ <dashboard-result
4
+ v-for="(cell, colIndex) in row"
5
+ :key="rowIndex + '-' + colIndex"
6
+ :result="cell">
7
+ </dashboard-result>
8
+ </template>
9
+ </div>
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ const template = require('./dashboard-grid.html');
4
+
5
+ module.exports = app => app.component('dashboard-grid', {
6
+ template: template,
7
+ props: ['value'],
8
+ computed: {
9
+ columns() {
10
+ const grid = this.value && this.value.$grid;
11
+ if (!Array.isArray(grid) || grid.length === 0) {
12
+ return 1;
13
+ }
14
+ return Math.max(1, ...grid.map(row => Array.isArray(row) ? row.length : 0));
15
+ },
16
+ gridTemplateColumns() {
17
+ return `repeat(${this.columns}, minmax(0, 1fr))`;
18
+ }
19
+ }
20
+ });
@@ -31,6 +31,9 @@ module.exports = app => app.component('dashboard-result', {
31
31
  if (value.$text) {
32
32
  return 'dashboard-text';
33
33
  }
34
+ if (value.$grid) {
35
+ return 'dashboard-grid';
36
+ }
34
37
  }
35
38
  }
36
39
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mongoosejs/studio",
3
- "version": "0.0.118",
3
+ "version": "0.0.119",
4
4
  "description": "A sleek, powerful MongoDB UI with built-in dashboarding and auth, seamlessly integrated with your Express, Vercel, or Netlify app.",
5
5
  "homepage": "https://studio.mongoosejs.io/",
6
6
  "repository": {