@mongoosejs/studio 0.0.38 → 0.0.39
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.
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
exports.createChart = require('./createChart');
|
|
4
3
|
exports.createDocument = require('./createDocument')
|
|
5
4
|
exports.deleteDocument = require('./deleteDocument');
|
|
6
5
|
exports.exportQueryResults = require('./exportQueryResults');
|
|
7
6
|
exports.getDocument = require('./getDocument');
|
|
8
7
|
exports.getDocuments = require('./getDocuments');
|
|
9
8
|
exports.listModels = require('./listModels');
|
|
10
|
-
exports.updateDocument = require('./updateDocument');
|
|
9
|
+
exports.updateDocument = require('./updateDocument');
|
package/frontend/public/app.js
CHANGED
|
@@ -165,35 +165,6 @@ module.exports = app => app.component('async-button', {
|
|
|
165
165
|
|
|
166
166
|
/***/ }),
|
|
167
167
|
|
|
168
|
-
/***/ "./frontend/src/charts/charts.js":
|
|
169
|
-
/*!***************************************!*\
|
|
170
|
-
!*** ./frontend/src/charts/charts.js ***!
|
|
171
|
-
\***************************************/
|
|
172
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
173
|
-
|
|
174
|
-
"use strict";
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
const api = __webpack_require__(/*! ../api */ "./frontend/src/api.js");
|
|
178
|
-
const template = __webpack_require__(/*! ./charts.html */ "./frontend/src/charts/charts.html");
|
|
179
|
-
|
|
180
|
-
const appendCSS = __webpack_require__(/*! ../appendCSS */ "./frontend/src/appendCSS.js");
|
|
181
|
-
|
|
182
|
-
appendCSS(__webpack_require__(/*! ./charts.css */ "./frontend/src/charts/charts.css"));
|
|
183
|
-
|
|
184
|
-
module.exports = app => app.component('charts', {
|
|
185
|
-
template: template,
|
|
186
|
-
data: () => ({ description: '', code: '' }),
|
|
187
|
-
methods: {
|
|
188
|
-
async createChart() {
|
|
189
|
-
const data = await api.Model.createChart({ description: this.description });
|
|
190
|
-
this.code = data.content;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
|
|
195
|
-
/***/ }),
|
|
196
|
-
|
|
197
168
|
/***/ "./frontend/src/create-dashboard/create-dashboard.js":
|
|
198
169
|
/*!***********************************************************!*\
|
|
199
170
|
!*** ./frontend/src/create-dashboard/create-dashboard.js ***!
|
|
@@ -753,7 +724,7 @@ module.exports = app => app.component('document-property', {
|
|
|
753
724
|
dateType: 'picker' // picker, iso
|
|
754
725
|
}
|
|
755
726
|
},
|
|
756
|
-
props: ['document', 'schemaPaths', 'editting', 'changes', 'invalid'],
|
|
727
|
+
props: ['path', 'document', 'schemaPaths', 'editting', 'changes', 'invalid'],
|
|
757
728
|
methods: {
|
|
758
729
|
getComponentForPath(schemaPath) {
|
|
759
730
|
if (schemaPath.instance === 'Array') {
|
|
@@ -1841,11 +1812,6 @@ module.exports = [
|
|
|
1841
1812
|
name: 'model',
|
|
1842
1813
|
component: 'models'
|
|
1843
1814
|
},
|
|
1844
|
-
{
|
|
1845
|
-
path: '/charts',
|
|
1846
|
-
name: 'charts',
|
|
1847
|
-
component: 'charts'
|
|
1848
|
-
},
|
|
1849
1815
|
{
|
|
1850
1816
|
path: '/model/:model/document/:documentId',
|
|
1851
1817
|
name: 'document',
|
|
@@ -2476,28 +2442,6 @@ module.exports = "<button v-bind=\"attrsToBind\" :disabled=\"isDisabled\" @click
|
|
|
2476
2442
|
|
|
2477
2443
|
/***/ }),
|
|
2478
2444
|
|
|
2479
|
-
/***/ "./frontend/src/charts/charts.css":
|
|
2480
|
-
/*!****************************************!*\
|
|
2481
|
-
!*** ./frontend/src/charts/charts.css ***!
|
|
2482
|
-
\****************************************/
|
|
2483
|
-
/***/ ((module) => {
|
|
2484
|
-
|
|
2485
|
-
"use strict";
|
|
2486
|
-
module.exports = ".charts {\n padding: 10px;\n}\n\n.charts .chart-description textarea {\n width: 100%;\n height: 4em;\n border-radius: 4px;\n border: 1px solid #ddd;\n margin-top: 0.5em;\n padding: 0.5em;\n line-height: 1.5em;\n}\n\n.charts .chart-description button {\n margin-top: 0.5em;\n}";
|
|
2487
|
-
|
|
2488
|
-
/***/ }),
|
|
2489
|
-
|
|
2490
|
-
/***/ "./frontend/src/charts/charts.html":
|
|
2491
|
-
/*!*****************************************!*\
|
|
2492
|
-
!*** ./frontend/src/charts/charts.html ***!
|
|
2493
|
-
\*****************************************/
|
|
2494
|
-
/***/ ((module) => {
|
|
2495
|
-
|
|
2496
|
-
"use strict";
|
|
2497
|
-
module.exports = "<div class=\"charts\">\n <h1>Charts</h1>\n <div>\n Describe your chart\n </div>\n <div class=\"chart-description\">\n <textarea\n v-model=\"description\"\n placeholder=\"Please create a bar chart showing users createdAt per day\" />\n <div>\n <async-button @click=\"createChart\">Create Chart</async-button>\n </div>\n </div>\n</div>";
|
|
2498
|
-
|
|
2499
|
-
/***/ }),
|
|
2500
|
-
|
|
2501
2445
|
/***/ "./frontend/src/create-dashboard/create-dashboard.html":
|
|
2502
2446
|
/*!*************************************************************!*\
|
|
2503
2447
|
!*** ./frontend/src/create-dashboard/create-dashboard.html ***!
|
|
@@ -2582,7 +2526,7 @@ module.exports = "<div>\n <div v-if=\"Array.isArray(result)\">\n <div v-for=
|
|
|
2582
2526
|
/***/ ((module) => {
|
|
2583
2527
|
|
|
2584
2528
|
"use strict";
|
|
2585
|
-
module.exports = "<div class=\"dashboard px-1\">\n <div v-if=\"status === 'loading'\" class=\"max-w-5xl mx-auto text-center\">\n <img src=\"images/loader.gif\" class=\"inline\">\n </div>\n <div v-if=\"dashboard && status === 'loaded'\" class=\"max-w-5xl mx-auto\">\n <div class=\"flex items-center w-full\">\n <h2 class=\"mt-4 mb-4 text-gray-900 font-semibold text-xl grow shrink\">{{title}}</h2>\n <div>\n <button\n v-if=\"!showEditor\"\n @click=\"showEditor = true\"\n type=\"button\"\n class=\"rounded-md bg-teal-600 px-2.5 py-1.5 text-sm font-semibold text-white shadow-sm hover:bg-teal-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-teal-600\">\n <img src=\"images/edit.svg\" class=\"inline h-[1em]\" /> Edit\n </button>\n </div>\n </div>\n <div v-if=\"!showEditor\" class=\"mt-4 mb-4\">\n <dashboard-result :result=\"result\"></dashboard-result>\n </div>\n <div v-if=\"showEditor\">\n <edit-dashboard\n :dashboardId=\"dashboard._id\"\n :code=\"code\"\n :currentDescription=\"description\"\n :currentTitle=\"title\"\n @close=\"showEditor=false;\"\n @update=\"updateCode\"></edit-dashboard>\n </div>\n \n </div>\n <div v-if=\"!dashboard && status === 'loaded'\">\n No dashboard with the given id could be found.\n </div>\n</div>\n";
|
|
2529
|
+
module.exports = "<div class=\"dashboard px-1\">\n <div v-if=\"status === 'loading'\" class=\"max-w-5xl mx-auto text-center\">\n <img src=\"images/loader.gif\" class=\"inline mt-10\">\n </div>\n <div v-if=\"dashboard && status === 'loaded'\" class=\"max-w-5xl mx-auto\">\n <div class=\"flex items-center w-full\">\n <h2 class=\"mt-4 mb-4 text-gray-900 font-semibold text-xl grow shrink\">{{title}}</h2>\n <div>\n <button\n v-if=\"!showEditor\"\n @click=\"showEditor = true\"\n type=\"button\"\n class=\"rounded-md bg-teal-600 px-2.5 py-1.5 text-sm font-semibold text-white shadow-sm hover:bg-teal-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-teal-600\">\n <img src=\"images/edit.svg\" class=\"inline h-[1em]\" /> Edit\n </button>\n </div>\n </div>\n <div v-if=\"!showEditor\" class=\"mt-4 mb-4\">\n <dashboard-result :result=\"result\"></dashboard-result>\n </div>\n <div v-if=\"showEditor\">\n <edit-dashboard\n :dashboardId=\"dashboard._id\"\n :code=\"code\"\n :currentDescription=\"description\"\n :currentTitle=\"title\"\n @close=\"showEditor=false;\"\n @update=\"updateCode\"></edit-dashboard>\n </div>\n \n </div>\n <div v-if=\"!dashboard && status === 'loaded'\">\n No dashboard with the given id could be found.\n </div>\n</div>\n";
|
|
2586
2530
|
|
|
2587
2531
|
/***/ }),
|
|
2588
2532
|
|
|
@@ -2648,7 +2592,7 @@ module.exports = ".document-details {\n width: 100%;\n}\n\n.document-details .v
|
|
|
2648
2592
|
/***/ ((module) => {
|
|
2649
2593
|
|
|
2650
2594
|
"use strict";
|
|
2651
|
-
module.exports = "<div class=\"document-details\">\n <document-property\n
|
|
2595
|
+
module.exports = "<div class=\"document-details\">\n <div v-for=\"path in schemaPaths\" class=\"value\">\n <document-property\n :path=\"path\"\n :document=\"document\"\n :schemaPaths=\"schemaPaths\"\n :editting=\"editting\"\n :changes=\"changes\"\n :invalid=\"invalid\"></document-property>\n </div>\n <div v-for=\"path in virtuals\" class=\"mb-2\">\n <div class=\"p-1 mb-1 bg-slate-100\">\n {{path.name}}\n <span class=\"path-type\">\n (virtual)\n </span>\n </div>\n <div v-if=\"path.value == null\" class=\"text-sky-800\">\n {{'' + path.value}}\n </div>\n <div v-else>\n {{path.value}}\n </div>\n </div>\n</div>";
|
|
2652
2596
|
|
|
2653
2597
|
/***/ }),
|
|
2654
2598
|
|
|
@@ -2670,7 +2614,7 @@ module.exports = ".document-details {\n width: 100%;\n }\n \n .document-de
|
|
|
2670
2614
|
/***/ ((module) => {
|
|
2671
2615
|
|
|
2672
2616
|
"use strict";
|
|
2673
|
-
module.exports = "<div>\n <div
|
|
2617
|
+
module.exports = "<div>\n <div class=\"relative path-key p-1 flex\">\n <div class=\"grow\">\n {{path.path}}\n <span class=\"path-type\">\n ({{(path.instance || 'unknown').toLowerCase()}})\n </span>\n </div>\n <div v-if=\"editting && path.instance === 'Date'\" class=\"flex gap-1.5\">\n <div\n @click=\"dateType = 'picker'\"\n :class=\"dateType === 'picker' ? 'bg-teal-600' : ''\"\n class=\"self-stretch px-2 py-1 rounded-sm justify-center items-center gap-1.5 flex cursor-pointer\">\n <div\n :class=\"dateType === 'picker' ? 'text-white' : ''\"\n class=\"text-xs font-medium font-['Lato'] capitalize leading-tight\">\n Date Picker\n </div>\n </div>\n <div\n @click=\"dateType = 'iso'\"\n :class=\"dateType === 'iso' ? 'bg-teal-600' : ''\"\n class=\"self-stretch px-2 py-1 rounded-sm justify-center items-center gap-1.5 flex cursor-pointer\">\n <div\n :class=\"dateType === 'iso' ? 'text-white' : ''\"\n class=\"text-xs font-medium font-['Lato'] capitalize leading-tight\">\n ISO String\n </div>\n </div>\n </div>\n </div>\n <div v-if=\"editting && path.path !== '_id'\" class=\"pl-1\">\n <component\n :is=\"getEditComponentForPath(path)\"\n :value=\"getEditValueForPath(path)\"\n :format=\"dateType\"\n @input=\"changes[path.path] = $event; delete invalid[path.path];\"\n @error=\"invalid[path.path] = $event;\"\n >\n </component>\n </div>\n <div v-else class=\"pl-1\">\n <component :is=\"getComponentForPath(path)\" :value=\"getValueForPath(path.path)\"></component>\n </div>\n</div>";
|
|
2674
2618
|
|
|
2675
2619
|
/***/ }),
|
|
2676
2620
|
|
|
@@ -10646,7 +10590,6 @@ const app = Vue.createApp({
|
|
|
10646
10590
|
});
|
|
10647
10591
|
|
|
10648
10592
|
__webpack_require__(/*! ./async-button/async-button */ "./frontend/src/async-button/async-button.js")(app);
|
|
10649
|
-
__webpack_require__(/*! ./charts/charts */ "./frontend/src/charts/charts.js")(app);
|
|
10650
10593
|
__webpack_require__(/*! ./create-dashboard/create-dashboard */ "./frontend/src/create-dashboard/create-dashboard.js")(app);
|
|
10651
10594
|
__webpack_require__(/*! ./create-document/create-document */ "./frontend/src/create-document/create-document.js")(app);
|
|
10652
10595
|
__webpack_require__(/*! ./dashboards/dashboards */ "./frontend/src/dashboards/dashboards.js")(app);
|
package/frontend/src/index.js
CHANGED
|
@@ -11,7 +11,6 @@ const app = Vue.createApp({
|
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
require('./async-button/async-button')(app);
|
|
14
|
-
require('./charts/charts')(app);
|
|
15
14
|
require('./create-dashboard/create-dashboard')(app);
|
|
16
15
|
require('./create-document/create-document')(app);
|
|
17
16
|
require('./dashboards/dashboards')(app);
|
package/frontend/src/routes.js
CHANGED