@mongoosejs/studio 0.1.8 → 0.1.10
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/frontend/public/app.js +189 -49
- package/frontend/public/tw.css +4 -0
- package/frontend/src/chat/chat-message-script/chat-message-script.html +4 -0
- package/frontend/src/create-document/create-document.js +2 -2
- package/frontend/src/dashboard-result/dashboard-map/dashboard-map.html +3 -3
- package/frontend/src/dashboard-result/dashboard-map/dashboard-map.js +4 -1
- package/frontend/src/edit-array/edit-array.js +1 -1
- package/frontend/src/edit-subdocument/edit-subdocument.js +1 -1
- package/frontend/src/update-document/update-document.js +2 -2
- package/package.json +1 -3
package/frontend/public/app.js
CHANGED
|
@@ -612,7 +612,7 @@ module.exports = app => app.component('async-button', {
|
|
|
612
612
|
/***/ ((module) => {
|
|
613
613
|
|
|
614
614
|
"use strict";
|
|
615
|
-
module.exports = "<div class=\"relative border rounded bg-gray-100 text-black text-sm overflow-hidden\">\n <div class=\"flex border-b pt-[1px] text-xs font-medium bg-gray-200\">\n <button\n class=\"px-3 py-1 border-r border-gray-300 hover:bg-green-300\"\n :class=\"{'bg-gray-300': activeTab === 'code', 'bg-green-300': activeTab === 'code'}\"\n @click=\"activeTab = 'code'\">\n Code\n </button>\n <button\n class=\"px-3 py-1 hover:bg-green-300\"\n :class=\"{'bg-green-300': activeTab === 'output'}\"\n @click=\"activeTab = 'output'\">\n Output\n </button>\n <div class=\"ml-auto mr-1 flex\">\n <button\n v-if=\"activeTab === 'output'\"\n class=\"px-2 py-1 mr-1 text-xs bg-gray-500 text-white border-none rounded cursor-pointer hover:bg-gray-600 transition-colors flex items-center\"\n @click=\"copyOutput\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-3 w-3\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3\" />\n </svg>\n </button>\n <button\n v-if=\"activeTab === 'output'\"\n class=\"px-2 py-1 mr-1 text-xs bg-blue-500 text-white border-none rounded cursor-pointer hover:bg-blue-600 transition-colors flex items-center\"\n @click=\"openDetailModal\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-3 w-3\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 1v4m0 0h-4m4 0l-5-5\" />\n </svg>\n </button>\n <button\n v-if=\"activeTab === 'code' && !isEditing\"\n class=\"px-2 py-1 mr-1 text-xs bg-gray-500 text-white border-none rounded cursor-pointer hover:bg-gray-600 transition-colors flex items-center\"\n @click.stop=\"startEditing\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-3 w-3\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n <path d=\"M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM4 13.5V16h2.5l7.086-7.086-2.828-2.828L4 13.5z\" />\n </svg>\n </button>\n <async-button\n v-if=\"!isEditing\"\n class=\"px-2 py-1 text-xs bg-green-500 text-white border-none rounded cursor-pointer hover:bg-green-600 transition-colors disabled:bg-gray-400\"\n @click=\"executeScript\">\n Execute\n </async-button>\n <div class=\"relative ml-1\" ref=\"dropdown\">\n <button\n @click.stop=\"toggleDropdown\"\n class=\"px-1 py-1 text-xs hover:bg-gray-300 rounded flex items-center\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n <path d=\"M10 6a2 2 0 110-4 2 2 0 010 4zm0 6a2 2 0 110-4 2 2 0 010 4zm0 6a2 2 0 110-4 2 2 0 010 4z\" />\n </svg>\n </button>\n <div\n v-if=\"showDropdown\"\n class=\"absolute right-0 z-10 mt-1 w-64 origin-top-right rounded-md bg-white py-1 shadow-lg ring-1 ring-black/5\">\n <button\n class=\"block w-full text-left px-4 py-2 text-xs text-gray-700 hover:bg-gray-100\"\n @click=\"openCreateDashboardModal(); showDropdown = false\">\n Create Dashboard\n </button>\n <button\n class=\"block w-full text-left px-4 py-2 text-xs text-gray-700 hover:bg-gray-100\"\n @click=\"$emit('copyMessage'); showDropdown = false\">\n Copy Full Message\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"p-3 max-h-[50vh] max-w-[calc(100vw-4rem)] lg:max-w-[calc(100vw-20rem)] overflow-y-auto\" v-show=\"activeTab === 'code'\">\n <div v-if=\"isEditing\" class=\"flex flex-col space-y-2\">\n <div class=\"border border-gray-200\">\n <textarea ref=\"scriptEditor\" class=\"w-full h-[45vh]\" @input=\"handleScriptInput\"></textarea>\n </div>\n <div class=\"flex justify-end gap-2\">\n <button\n class=\"px-2 py-1 text-xs bg-gray-300 text-gray-800 border-none rounded cursor-pointer hover:bg-gray-400 transition-colors\"\n @click.stop=\"cancelEditing\">\n Cancel\n </button>\n <async-button\n class=\"px-2 py-1 text-xs bg-green-500 text-white border-none rounded cursor-pointer hover:bg-green-600 transition-colors disabled:bg-gray-400\"\n @click=\"executeScript\">\n Execute\n </async-button>\n </div>\n </div>\n <pre v-else class=\"whitespace-pre-wrap\"><code v-text=\"script\" ref=\"code\" :class=\"'language-' + language\"></code></pre>\n </div>\n\n <div class=\"p-3 whitespace-pre-wrap max-h-[50vh] overflow-y-auto bg-white border-t max-w-[calc(100vw-4rem)] lg:max-w-[calc(100vw-20rem)] relative\" v-show=\"activeTab === 'output'\">\n <dashboard-chart v-if=\"message.executionResult?.output?.$chart\" :value=\"message.executionResult?.output\" />\n <dashboard-map v-else-if=\"message.executionResult?.output?.$featureCollection\" :value=\"message.executionResult?.output\" />\n <pre v-else>{{ message.executionResult?.output || 'No output' }}</pre>\n\n <div v-if=\"message.executionResult?.logs?.length\" class=\"mt-3 pt-3 border-t border-gray-200\">\n <div class=\"text-xs font-semibold text-gray-600 uppercase tracking-wide\">Console</div>\n <pre class=\"mt-1 bg-gray-100 text-gray-900 p-3 rounded whitespace-pre-wrap overflow-x-auto max-h-[280px]\">{{ message.executionResult.logs }}</pre>\n </div>\n </div>\n\n <modal ref=\"outputModal\" v-if=\"showDetailModal\" containerClass=\"!h-[90vh] !w-[90vw]\">\n <template #body>\n <div class=\"absolute font-mono right-1 top-1 cursor-pointer text-xl\" @click=\"showDetailModal = false;\">×</div>\n <div class=\"h-full overflow-auto\">\n <dashboard-chart v-if=\"message.executionResult?.output?.$chart\" :value=\"message.executionResult?.output\" :responsive=\"true\" />\n <pre v-else class=\"whitespace-pre-wrap\">{{ message.executionResult?.output || 'No output' }}</pre>\n </div>\n </template>\n </modal>\n <modal v-if=\"showCreateDashboardModal\">\n <template #body>\n <div class=\"modal-exit\" @click=\"showCreateDashboardModal = false\">×</div>\n <div>\n <div class=\"mt-4 text-gray-900 font-semibold\">Create Dashboard</div>\n <div class=\"mt-4\">\n <label class=\"block text-sm font-medium leading-6 text-gray-900\">Title</label>\n <div class=\"mt-2\">\n <div class=\"w-full flex rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-inset focus-within:ring-teal-600\">\n <input type=\"text\" v-model=\"newDashboardTitle\" class=\"outline-none block flex-1 border-0 bg-transparent py-1.5 pl-1 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm sm:leading-6\" placeholder=\"My Dashboard\">\n </div>\n </div>\n </div>\n <div class=\"my-4\">\n <label class=\"block text-sm font-medium leading-6 text-gray-900\">Code</label>\n <div class=\"border border-gray-200\">\n <textarea class=\"p-2 h-[300px] w-full\" ref=\"dashboardCodeEditor\"></textarea>\n </div>\n </div>\n <async-button\n @click=\"createDashboardFromScript\"\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 Submit\n </async-button>\n <div v-if=\"createErrors.length > 0\" class=\"rounded-md bg-red-50 p-4 mt-1\">\n <div class=\"flex\">\n <div class=\"flex-shrink-0\">\n <svg class=\"h-5 w-5 text-red-400\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\n <path fill-rule=\"evenodd\" d=\"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z\" clip-rule=\"evenodd\" />\n </svg>\n </div>\n <div class=\"ml-3\">\n <h3 class=\"text-sm font-medium text-red-800\">Error</h3>\n <div class=\"mt-2 text-sm text-red-700\">\n {{createError}}\n </div>\n </div>\n </div>\n </div>\n </div>\n </template>\n </modal>\n</div>\n";
|
|
615
|
+
module.exports = "<div class=\"relative border rounded bg-gray-100 text-black text-sm overflow-hidden\">\n <div class=\"flex border-b pt-[1px] text-xs font-medium bg-gray-200\">\n <button\n class=\"px-3 py-1 border-r border-gray-300 hover:bg-green-300\"\n :class=\"{'bg-gray-300': activeTab === 'code', 'bg-green-300': activeTab === 'code'}\"\n @click=\"activeTab = 'code'\">\n Code\n </button>\n <button\n class=\"px-3 py-1 hover:bg-green-300\"\n :class=\"{'bg-green-300': activeTab === 'output'}\"\n @click=\"activeTab = 'output'\">\n Output\n </button>\n <div class=\"ml-auto mr-1 flex\">\n <button\n v-if=\"activeTab === 'output'\"\n class=\"px-2 py-1 mr-1 text-xs bg-gray-500 text-white border-none rounded cursor-pointer hover:bg-gray-600 transition-colors flex items-center\"\n @click=\"copyOutput\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-3 w-3\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3\" />\n </svg>\n </button>\n <button\n v-if=\"activeTab === 'output'\"\n class=\"px-2 py-1 mr-1 text-xs bg-blue-500 text-white border-none rounded cursor-pointer hover:bg-blue-600 transition-colors flex items-center\"\n @click=\"openDetailModal\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-3 w-3\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 1v4m0 0h-4m4 0l-5-5\" />\n </svg>\n </button>\n <button\n v-if=\"activeTab === 'code' && !isEditing\"\n class=\"px-2 py-1 mr-1 text-xs bg-gray-500 text-white border-none rounded cursor-pointer hover:bg-gray-600 transition-colors flex items-center\"\n @click.stop=\"startEditing\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-3 w-3\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n <path d=\"M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM4 13.5V16h2.5l7.086-7.086-2.828-2.828L4 13.5z\" />\n </svg>\n </button>\n <async-button\n v-if=\"!isEditing\"\n class=\"px-2 py-1 text-xs bg-green-500 text-white border-none rounded cursor-pointer hover:bg-green-600 transition-colors disabled:bg-gray-400\"\n @click=\"executeScript\">\n Execute\n </async-button>\n <div class=\"relative ml-1\" ref=\"dropdown\">\n <button\n @click.stop=\"toggleDropdown\"\n class=\"px-1 py-1 text-xs hover:bg-gray-300 rounded flex items-center\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n <path d=\"M10 6a2 2 0 110-4 2 2 0 010 4zm0 6a2 2 0 110-4 2 2 0 010 4zm0 6a2 2 0 110-4 2 2 0 010 4z\" />\n </svg>\n </button>\n <div\n v-if=\"showDropdown\"\n class=\"absolute right-0 z-10 mt-1 w-64 origin-top-right rounded-md bg-white py-1 shadow-lg ring-1 ring-black/5\">\n <button\n class=\"block w-full text-left px-4 py-2 text-xs text-gray-700 hover:bg-gray-100\"\n @click=\"openCreateDashboardModal(); showDropdown = false\">\n Create Dashboard\n </button>\n <button\n class=\"block w-full text-left px-4 py-2 text-xs text-gray-700 hover:bg-gray-100\"\n @click=\"$emit('copyMessage'); showDropdown = false\">\n Copy Full Message\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"p-3 max-h-[50vh] max-w-[calc(100vw-4rem)] lg:max-w-[calc(100vw-20rem)] overflow-y-auto\" v-show=\"activeTab === 'code'\">\n <div v-if=\"isEditing\" class=\"flex flex-col space-y-2\">\n <div class=\"border border-gray-200\">\n <textarea ref=\"scriptEditor\" class=\"w-full h-[45vh]\" @input=\"handleScriptInput\"></textarea>\n </div>\n <div class=\"flex justify-end gap-2\">\n <button\n class=\"px-2 py-1 text-xs bg-gray-300 text-gray-800 border-none rounded cursor-pointer hover:bg-gray-400 transition-colors\"\n @click.stop=\"cancelEditing\">\n Cancel\n </button>\n <async-button\n class=\"px-2 py-1 text-xs bg-green-500 text-white border-none rounded cursor-pointer hover:bg-green-600 transition-colors disabled:bg-gray-400\"\n @click=\"executeScript\">\n Execute\n </async-button>\n </div>\n </div>\n <pre v-else class=\"whitespace-pre-wrap\"><code v-text=\"script\" ref=\"code\" :class=\"'language-' + language\"></code></pre>\n </div>\n\n <div class=\"p-3 whitespace-pre-wrap max-h-[50vh] overflow-y-auto bg-white border-t max-w-[calc(100vw-4rem)] lg:max-w-[calc(100vw-20rem)] relative\" v-show=\"activeTab === 'output'\">\n <dashboard-chart v-if=\"message.executionResult?.output?.$chart\" :value=\"message.executionResult?.output\" />\n <dashboard-map v-else-if=\"message.executionResult?.output?.$featureCollection\" :value=\"message.executionResult?.output\" />\n <pre v-else>{{ message.executionResult?.output || 'No output' }}</pre>\n\n <div v-if=\"message.executionResult?.logs?.length\" class=\"mt-3 pt-3 border-t border-gray-200\">\n <div class=\"text-xs font-semibold text-gray-600 uppercase tracking-wide\">Console</div>\n <pre class=\"mt-1 bg-gray-100 text-gray-900 p-3 rounded whitespace-pre-wrap overflow-x-auto max-h-[280px]\">{{ message.executionResult.logs }}</pre>\n </div>\n </div>\n\n <modal ref=\"outputModal\" v-if=\"showDetailModal\" containerClass=\"!h-[90vh] !w-[90vw]\">\n <template #body>\n <div class=\"absolute font-mono right-1 top-1 cursor-pointer text-xl\" @click=\"showDetailModal = false;\">×</div>\n <div class=\"h-full overflow-auto\">\n <dashboard-chart v-if=\"message.executionResult?.output?.$chart\" :value=\"message.executionResult?.output\" :responsive=\"true\" />\n <dashboard-map\n v-else-if=\"message.executionResult?.output?.$featureCollection\"\n :value=\"message.executionResult?.output\"\n height=\"80vh\" />\n <pre v-else class=\"whitespace-pre-wrap\">{{ message.executionResult?.output || 'No output' }}</pre>\n </div>\n </template>\n </modal>\n <modal v-if=\"showCreateDashboardModal\">\n <template #body>\n <div class=\"modal-exit\" @click=\"showCreateDashboardModal = false\">×</div>\n <div>\n <div class=\"mt-4 text-gray-900 font-semibold\">Create Dashboard</div>\n <div class=\"mt-4\">\n <label class=\"block text-sm font-medium leading-6 text-gray-900\">Title</label>\n <div class=\"mt-2\">\n <div class=\"w-full flex rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-inset focus-within:ring-teal-600\">\n <input type=\"text\" v-model=\"newDashboardTitle\" class=\"outline-none block flex-1 border-0 bg-transparent py-1.5 pl-1 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm sm:leading-6\" placeholder=\"My Dashboard\">\n </div>\n </div>\n </div>\n <div class=\"my-4\">\n <label class=\"block text-sm font-medium leading-6 text-gray-900\">Code</label>\n <div class=\"border border-gray-200\">\n <textarea class=\"p-2 h-[300px] w-full\" ref=\"dashboardCodeEditor\"></textarea>\n </div>\n </div>\n <async-button\n @click=\"createDashboardFromScript\"\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 Submit\n </async-button>\n <div v-if=\"createErrors.length > 0\" class=\"rounded-md bg-red-50 p-4 mt-1\">\n <div class=\"flex\">\n <div class=\"flex-shrink-0\">\n <svg class=\"h-5 w-5 text-red-400\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\n <path fill-rule=\"evenodd\" d=\"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z\" clip-rule=\"evenodd\" />\n </svg>\n </div>\n <div class=\"ml-3\">\n <h3 class=\"text-sm font-medium text-red-800\">Error</h3>\n <div class=\"mt-2 text-sm text-red-700\">\n {{createError}}\n </div>\n </div>\n </div>\n </div>\n </div>\n </template>\n </modal>\n</div>\n";
|
|
616
616
|
|
|
617
617
|
/***/ }),
|
|
618
618
|
|
|
@@ -1324,7 +1324,7 @@ module.exports = "<div>\n <div class=\"mb-2\">\n <textarea class=\"border bo
|
|
|
1324
1324
|
|
|
1325
1325
|
const api = __webpack_require__(/*! ../api */ "./frontend/src/api.js");
|
|
1326
1326
|
|
|
1327
|
-
const { BSON, EJSON } = __webpack_require__(/*! bson */ "./node_modules/
|
|
1327
|
+
const { BSON, EJSON } = __webpack_require__(/*! mongodb/lib/bson */ "./node_modules/mongodb/lib/bson.js");
|
|
1328
1328
|
|
|
1329
1329
|
const ObjectId = new Proxy(BSON.ObjectId, {
|
|
1330
1330
|
apply(target, thisArg, argumentsList) {
|
|
@@ -1383,6 +1383,7 @@ module.exports = app => app.component('create-document', {
|
|
|
1383
1383
|
}
|
|
1384
1384
|
});
|
|
1385
1385
|
|
|
1386
|
+
|
|
1386
1387
|
/***/ }),
|
|
1387
1388
|
|
|
1388
1389
|
/***/ "./frontend/src/dashboard-result/dashboard-chart/dashboard-chart.html":
|
|
@@ -1546,7 +1547,7 @@ module.exports = app => app.component('dashboard-grid', {
|
|
|
1546
1547
|
/***/ ((module) => {
|
|
1547
1548
|
|
|
1548
1549
|
"use strict";
|
|
1549
|
-
module.exports = "<div class=\"py-2\">\n <div v-if=\"header\" class=\"border-b border-gray-100 px-2 pb-2 text-xl font-bold\">\n {{header}}\n </div>\n <div class=\"text-xl\">\n <div ref=\"map\" class=\"w-full\" style=\"
|
|
1550
|
+
module.exports = "<div class=\"py-2 h-full flex flex-col\">\n <div v-if=\"header\" class=\"border-b border-gray-100 px-2 pb-2 text-xl font-bold\">\n {{header}}\n </div>\n <div class=\"text-xl flex-1 min-h-[200px]\">\n <div ref=\"map\" class=\"w-full h-full\" :style=\"mapStyle\"></div>\n </div>\n</div>\n";
|
|
1550
1551
|
|
|
1551
1552
|
/***/ }),
|
|
1552
1553
|
|
|
@@ -1564,7 +1565,7 @@ const template = __webpack_require__(/*! ./dashboard-map.html */ "./frontend/src
|
|
|
1564
1565
|
|
|
1565
1566
|
module.exports = app => app.component('dashboard-map', {
|
|
1566
1567
|
template: template,
|
|
1567
|
-
props: ['value'],
|
|
1568
|
+
props: ['value', 'height'],
|
|
1568
1569
|
mounted() {
|
|
1569
1570
|
const fc = this.value.$featureCollection.featureCollection || this.value.$featureCollection;
|
|
1570
1571
|
const map = L.map(this.$refs.map).setView([0, 0], 1);
|
|
@@ -1582,6 +1583,9 @@ module.exports = app => app.component('dashboard-map', {
|
|
|
1582
1583
|
});
|
|
1583
1584
|
},
|
|
1584
1585
|
computed: {
|
|
1586
|
+
mapStyle() {
|
|
1587
|
+
return { height: this.height || '300px' };
|
|
1588
|
+
},
|
|
1585
1589
|
header() {
|
|
1586
1590
|
if (this.value != null && this.value.$featureCollection.header) {
|
|
1587
1591
|
return this.value.$featureCollection.header;
|
|
@@ -3011,7 +3015,7 @@ module.exports = "<div class=\"edit-array\">\n <textarea\n ref=\"arrayEditor
|
|
|
3011
3015
|
|
|
3012
3016
|
const template = __webpack_require__(/*! ./edit-array.html */ "./frontend/src/edit-array/edit-array.html");
|
|
3013
3017
|
|
|
3014
|
-
const { BSON } = __webpack_require__(/*! bson */ "./node_modules/
|
|
3018
|
+
const { BSON } = __webpack_require__(/*! mongodb/lib/bson */ "./node_modules/mongodb/lib/bson.js");
|
|
3015
3019
|
|
|
3016
3020
|
const ObjectId = new Proxy(BSON.ObjectId, {
|
|
3017
3021
|
apply(target, thisArg, argumentsList) {
|
|
@@ -3479,7 +3483,7 @@ module.exports = "<div class=\"edit-subdocument\">\n <textarea\n ref=\"edito
|
|
|
3479
3483
|
|
|
3480
3484
|
const template = __webpack_require__(/*! ./edit-subdocument.html */ "./frontend/src/edit-subdocument/edit-subdocument.html");
|
|
3481
3485
|
|
|
3482
|
-
const { BSON, EJSON } = __webpack_require__(/*! bson */ "./node_modules/
|
|
3486
|
+
const { BSON, EJSON } = __webpack_require__(/*! mongodb/lib/bson */ "./node_modules/mongodb/lib/bson.js");
|
|
3483
3487
|
|
|
3484
3488
|
const ObjectId = new Proxy(BSON.ObjectId, {
|
|
3485
3489
|
apply(target, thisArg, argumentsList) {
|
|
@@ -5998,7 +6002,7 @@ module.exports = "<div>\n <div class=\"mb-2\">\n <textarea class=\"borde
|
|
|
5998
6002
|
|
|
5999
6003
|
const api = __webpack_require__(/*! ../api */ "./frontend/src/api.js");
|
|
6000
6004
|
|
|
6001
|
-
const { BSON, EJSON } = __webpack_require__(/*! bson */ "./node_modules/
|
|
6005
|
+
const { BSON, EJSON } = __webpack_require__(/*! mongodb/lib/bson */ "./node_modules/mongodb/lib/bson.js");
|
|
6002
6006
|
|
|
6003
6007
|
const ObjectId = new Proxy(BSON.ObjectId, {
|
|
6004
6008
|
apply(target, thisArg, argumentsList) {
|
|
@@ -6065,6 +6069,7 @@ module.exports = app => app.component('update-document', {
|
|
|
6065
6069
|
}
|
|
6066
6070
|
});
|
|
6067
6071
|
|
|
6072
|
+
|
|
6068
6073
|
/***/ }),
|
|
6069
6074
|
|
|
6070
6075
|
/***/ "./node_modules/axios/dist/browser/axios.cjs":
|
|
@@ -9264,6 +9269,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9264
9269
|
/* harmony export */ ObjectId: () => (/* binding */ ObjectId),
|
|
9265
9270
|
/* harmony export */ Timestamp: () => (/* binding */ Timestamp),
|
|
9266
9271
|
/* harmony export */ UUID: () => (/* binding */ UUID),
|
|
9272
|
+
/* harmony export */ bsonType: () => (/* binding */ bsonType),
|
|
9267
9273
|
/* harmony export */ calculateObjectSize: () => (/* binding */ calculateObjectSize),
|
|
9268
9274
|
/* harmony export */ deserialize: () => (/* binding */ deserialize),
|
|
9269
9275
|
/* harmony export */ deserializeStream: () => (/* binding */ deserializeStream),
|
|
@@ -9319,7 +9325,7 @@ function getStylizeFunction(options) {
|
|
|
9319
9325
|
}
|
|
9320
9326
|
}
|
|
9321
9327
|
|
|
9322
|
-
const BSON_MAJOR_VERSION =
|
|
9328
|
+
const BSON_MAJOR_VERSION = 7;
|
|
9323
9329
|
const BSON_VERSION_SYMBOL = Symbol.for('@@mdb.bson.version');
|
|
9324
9330
|
const BSON_INT32_MAX = 0x7fffffff;
|
|
9325
9331
|
const BSON_INT32_MIN = -2147483648;
|
|
@@ -9414,6 +9420,7 @@ class BSONOffsetError extends BSONError {
|
|
|
9414
9420
|
get name() {
|
|
9415
9421
|
return 'BSONOffsetError';
|
|
9416
9422
|
}
|
|
9423
|
+
offset;
|
|
9417
9424
|
constructor(message, offset, options) {
|
|
9418
9425
|
super(`${message}. offset: ${offset}`, options);
|
|
9419
9426
|
this.offset = offset;
|
|
@@ -9490,7 +9497,18 @@ function tryWriteBasicLatin(destination, source, offset) {
|
|
|
9490
9497
|
function nodejsMathRandomBytes(byteLength) {
|
|
9491
9498
|
return nodeJsByteUtils.fromNumberArray(Array.from({ length: byteLength }, () => Math.floor(Math.random() * 256)));
|
|
9492
9499
|
}
|
|
9493
|
-
|
|
9500
|
+
function nodejsSecureRandomBytes(byteLength) {
|
|
9501
|
+
return crypto.getRandomValues(nodeJsByteUtils.allocate(byteLength));
|
|
9502
|
+
}
|
|
9503
|
+
const nodejsRandomBytes = (() => {
|
|
9504
|
+
const { crypto } = globalThis;
|
|
9505
|
+
if (crypto != null && typeof crypto.getRandomValues === 'function') {
|
|
9506
|
+
return nodejsSecureRandomBytes;
|
|
9507
|
+
}
|
|
9508
|
+
else {
|
|
9509
|
+
return nodejsMathRandomBytes;
|
|
9510
|
+
}
|
|
9511
|
+
})();
|
|
9494
9512
|
const nodeJsByteUtils = {
|
|
9495
9513
|
toLocalBufferType(potentialBuffer) {
|
|
9496
9514
|
if (Buffer.isBuffer(potentialBuffer)) {
|
|
@@ -9706,7 +9724,11 @@ const webByteUtils = {
|
|
|
9706
9724
|
const hasGlobalBuffer = typeof Buffer === 'function' && Buffer.prototype?._isBuffer !== true;
|
|
9707
9725
|
const ByteUtils = hasGlobalBuffer ? nodeJsByteUtils : webByteUtils;
|
|
9708
9726
|
|
|
9727
|
+
const bsonType = Symbol.for('@@mdb.bson.type');
|
|
9709
9728
|
class BSONValue {
|
|
9729
|
+
get [bsonType]() {
|
|
9730
|
+
return this._bsontype;
|
|
9731
|
+
}
|
|
9710
9732
|
get [BSON_VERSION_SYMBOL]() {
|
|
9711
9733
|
return BSON_MAJOR_VERSION;
|
|
9712
9734
|
}
|
|
@@ -9757,7 +9779,7 @@ const NumberUtils = {
|
|
|
9757
9779
|
source[offset + 1] * 256 +
|
|
9758
9780
|
source[offset + 2] * 65536 +
|
|
9759
9781
|
source[offset + 3] * 16777216);
|
|
9760
|
-
return (hi <<
|
|
9782
|
+
return (hi << 32n) + lo;
|
|
9761
9783
|
},
|
|
9762
9784
|
getFloat64LE: isBigEndian
|
|
9763
9785
|
? (source, offset) => {
|
|
@@ -9803,7 +9825,7 @@ const NumberUtils = {
|
|
|
9803
9825
|
return 4;
|
|
9804
9826
|
},
|
|
9805
9827
|
setBigInt64LE(destination, offset, value) {
|
|
9806
|
-
const mask32bits =
|
|
9828
|
+
const mask32bits = 0xffffffffn;
|
|
9807
9829
|
let lo = Number(value & mask32bits);
|
|
9808
9830
|
destination[offset] = lo;
|
|
9809
9831
|
lo >>= 8;
|
|
@@ -9812,7 +9834,7 @@ const NumberUtils = {
|
|
|
9812
9834
|
destination[offset + 2] = lo;
|
|
9813
9835
|
lo >>= 8;
|
|
9814
9836
|
destination[offset + 3] = lo;
|
|
9815
|
-
let hi = Number((value >>
|
|
9837
|
+
let hi = Number((value >> 32n) & mask32bits);
|
|
9816
9838
|
destination[offset + 4] = hi;
|
|
9817
9839
|
hi >>= 8;
|
|
9818
9840
|
destination[offset + 5] = hi;
|
|
@@ -9853,6 +9875,27 @@ class Binary extends BSONValue {
|
|
|
9853
9875
|
get _bsontype() {
|
|
9854
9876
|
return 'Binary';
|
|
9855
9877
|
}
|
|
9878
|
+
static BSON_BINARY_SUBTYPE_DEFAULT = 0;
|
|
9879
|
+
static BUFFER_SIZE = 256;
|
|
9880
|
+
static SUBTYPE_DEFAULT = 0;
|
|
9881
|
+
static SUBTYPE_FUNCTION = 1;
|
|
9882
|
+
static SUBTYPE_BYTE_ARRAY = 2;
|
|
9883
|
+
static SUBTYPE_UUID_OLD = 3;
|
|
9884
|
+
static SUBTYPE_UUID = 4;
|
|
9885
|
+
static SUBTYPE_MD5 = 5;
|
|
9886
|
+
static SUBTYPE_ENCRYPTED = 6;
|
|
9887
|
+
static SUBTYPE_COLUMN = 7;
|
|
9888
|
+
static SUBTYPE_SENSITIVE = 8;
|
|
9889
|
+
static SUBTYPE_VECTOR = 9;
|
|
9890
|
+
static SUBTYPE_USER_DEFINED = 128;
|
|
9891
|
+
static VECTOR_TYPE = Object.freeze({
|
|
9892
|
+
Int8: 0x03,
|
|
9893
|
+
Float32: 0x27,
|
|
9894
|
+
PackedBit: 0x10
|
|
9895
|
+
});
|
|
9896
|
+
buffer;
|
|
9897
|
+
sub_type;
|
|
9898
|
+
position;
|
|
9856
9899
|
constructor(buffer, subType) {
|
|
9857
9900
|
super();
|
|
9858
9901
|
if (!(buffer == null) &&
|
|
@@ -10112,24 +10155,6 @@ class Binary extends BSONValue {
|
|
|
10112
10155
|
return new this(bytes, Binary.SUBTYPE_VECTOR);
|
|
10113
10156
|
}
|
|
10114
10157
|
}
|
|
10115
|
-
Binary.BSON_BINARY_SUBTYPE_DEFAULT = 0;
|
|
10116
|
-
Binary.BUFFER_SIZE = 256;
|
|
10117
|
-
Binary.SUBTYPE_DEFAULT = 0;
|
|
10118
|
-
Binary.SUBTYPE_FUNCTION = 1;
|
|
10119
|
-
Binary.SUBTYPE_BYTE_ARRAY = 2;
|
|
10120
|
-
Binary.SUBTYPE_UUID_OLD = 3;
|
|
10121
|
-
Binary.SUBTYPE_UUID = 4;
|
|
10122
|
-
Binary.SUBTYPE_MD5 = 5;
|
|
10123
|
-
Binary.SUBTYPE_ENCRYPTED = 6;
|
|
10124
|
-
Binary.SUBTYPE_COLUMN = 7;
|
|
10125
|
-
Binary.SUBTYPE_SENSITIVE = 8;
|
|
10126
|
-
Binary.SUBTYPE_VECTOR = 9;
|
|
10127
|
-
Binary.SUBTYPE_USER_DEFINED = 128;
|
|
10128
|
-
Binary.VECTOR_TYPE = Object.freeze({
|
|
10129
|
-
Int8: 0x03,
|
|
10130
|
-
Float32: 0x27,
|
|
10131
|
-
PackedBit: 0x10
|
|
10132
|
-
});
|
|
10133
10158
|
function validateBinaryVector(vector) {
|
|
10134
10159
|
if (vector.sub_type !== Binary.SUBTYPE_VECTOR)
|
|
10135
10160
|
return;
|
|
@@ -10266,6 +10291,8 @@ class Code extends BSONValue {
|
|
|
10266
10291
|
get _bsontype() {
|
|
10267
10292
|
return 'Code';
|
|
10268
10293
|
}
|
|
10294
|
+
code;
|
|
10295
|
+
scope;
|
|
10269
10296
|
constructor(code, scope) {
|
|
10270
10297
|
super();
|
|
10271
10298
|
this.code = code.toString();
|
|
@@ -10311,6 +10338,10 @@ class DBRef extends BSONValue {
|
|
|
10311
10338
|
get _bsontype() {
|
|
10312
10339
|
return 'DBRef';
|
|
10313
10340
|
}
|
|
10341
|
+
collection;
|
|
10342
|
+
oid;
|
|
10343
|
+
db;
|
|
10344
|
+
fields;
|
|
10314
10345
|
constructor(collection, oid, db, fields) {
|
|
10315
10346
|
super();
|
|
10316
10347
|
const parts = collection.split('.');
|
|
@@ -10420,6 +10451,9 @@ class Long extends BSONValue {
|
|
|
10420
10451
|
get __isLong__() {
|
|
10421
10452
|
return true;
|
|
10422
10453
|
}
|
|
10454
|
+
high;
|
|
10455
|
+
low;
|
|
10456
|
+
unsigned;
|
|
10423
10457
|
constructor(lowOrValue = 0, highOrUnsigned, unsigned) {
|
|
10424
10458
|
super();
|
|
10425
10459
|
const unsignedBool = typeof highOrUnsigned === 'boolean' ? highOrUnsigned : Boolean(unsigned);
|
|
@@ -10433,6 +10467,15 @@ class Long extends BSONValue {
|
|
|
10433
10467
|
this.high = res.high;
|
|
10434
10468
|
this.unsigned = res.unsigned;
|
|
10435
10469
|
}
|
|
10470
|
+
static TWO_PWR_24 = Long.fromInt(TWO_PWR_24_DBL);
|
|
10471
|
+
static MAX_UNSIGNED_VALUE = Long.fromBits(0xffffffff | 0, 0xffffffff | 0, true);
|
|
10472
|
+
static ZERO = Long.fromInt(0);
|
|
10473
|
+
static UZERO = Long.fromInt(0, true);
|
|
10474
|
+
static ONE = Long.fromInt(1);
|
|
10475
|
+
static UONE = Long.fromInt(1, true);
|
|
10476
|
+
static NEG_ONE = Long.fromInt(-1);
|
|
10477
|
+
static MAX_VALUE = Long.fromBits(0xffffffff | 0, 0x7fffffff | 0, false);
|
|
10478
|
+
static MIN_VALUE = Long.fromBits(0, 0x80000000 | 0, false);
|
|
10436
10479
|
static fromBits(lowBits, highBits, unsigned) {
|
|
10437
10480
|
return new Long(lowBits, highBits, unsigned);
|
|
10438
10481
|
}
|
|
@@ -10473,7 +10516,7 @@ class Long extends BSONValue {
|
|
|
10473
10516
|
return Long.MAX_UNSIGNED_VALUE;
|
|
10474
10517
|
}
|
|
10475
10518
|
else {
|
|
10476
|
-
if (value <= -
|
|
10519
|
+
if (value <= -TWO_PWR_63_DBL)
|
|
10477
10520
|
return Long.MIN_VALUE;
|
|
10478
10521
|
if (value + 1 >= TWO_PWR_63_DBL)
|
|
10479
10522
|
return Long.MAX_VALUE;
|
|
@@ -10483,8 +10526,8 @@ class Long extends BSONValue {
|
|
|
10483
10526
|
return Long.fromBits(value % TWO_PWR_32_DBL | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);
|
|
10484
10527
|
}
|
|
10485
10528
|
static fromBigInt(value, unsigned) {
|
|
10486
|
-
const FROM_BIGINT_BIT_MASK =
|
|
10487
|
-
const FROM_BIGINT_BIT_SHIFT =
|
|
10529
|
+
const FROM_BIGINT_BIT_MASK = 0xffffffffn;
|
|
10530
|
+
const FROM_BIGINT_BIT_SHIFT = 32n;
|
|
10488
10531
|
return new Long(Number(value & FROM_BIGINT_BIT_MASK), Number((value >> FROM_BIGINT_BIT_SHIFT) & FROM_BIGINT_BIT_MASK), unsigned);
|
|
10489
10532
|
}
|
|
10490
10533
|
static _fromString(str, unsigned, radix) {
|
|
@@ -10517,7 +10560,7 @@ class Long extends BSONValue {
|
|
|
10517
10560
|
static fromStringStrict(str, unsignedOrRadix, radix) {
|
|
10518
10561
|
let unsigned = false;
|
|
10519
10562
|
if (typeof unsignedOrRadix === 'number') {
|
|
10520
|
-
(radix = unsignedOrRadix), (unsignedOrRadix = false);
|
|
10563
|
+
((radix = unsignedOrRadix), (unsignedOrRadix = false));
|
|
10521
10564
|
}
|
|
10522
10565
|
else {
|
|
10523
10566
|
unsigned = !!unsignedOrRadix;
|
|
@@ -10539,7 +10582,7 @@ class Long extends BSONValue {
|
|
|
10539
10582
|
static fromString(str, unsignedOrRadix, radix) {
|
|
10540
10583
|
let unsigned = false;
|
|
10541
10584
|
if (typeof unsignedOrRadix === 'number') {
|
|
10542
|
-
(radix = unsignedOrRadix), (unsignedOrRadix = false);
|
|
10585
|
+
((radix = unsignedOrRadix), (unsignedOrRadix = false));
|
|
10543
10586
|
}
|
|
10544
10587
|
else {
|
|
10545
10588
|
unsigned = !!unsignedOrRadix;
|
|
@@ -11059,15 +11102,6 @@ class Long extends BSONValue {
|
|
|
11059
11102
|
return `new Long(${longVal}${unsignedVal})`;
|
|
11060
11103
|
}
|
|
11061
11104
|
}
|
|
11062
|
-
Long.TWO_PWR_24 = Long.fromInt(TWO_PWR_24_DBL);
|
|
11063
|
-
Long.MAX_UNSIGNED_VALUE = Long.fromBits(0xffffffff | 0, 0xffffffff | 0, true);
|
|
11064
|
-
Long.ZERO = Long.fromInt(0);
|
|
11065
|
-
Long.UZERO = Long.fromInt(0, true);
|
|
11066
|
-
Long.ONE = Long.fromInt(1);
|
|
11067
|
-
Long.UONE = Long.fromInt(1, true);
|
|
11068
|
-
Long.NEG_ONE = Long.fromInt(-1);
|
|
11069
|
-
Long.MAX_VALUE = Long.fromBits(0xffffffff | 0, 0x7fffffff | 0, false);
|
|
11070
|
-
Long.MIN_VALUE = Long.fromBits(0, 0x80000000 | 0, false);
|
|
11071
11105
|
|
|
11072
11106
|
const PARSE_STRING_REGEXP = /^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/;
|
|
11073
11107
|
const PARSE_INF_REGEXP = /^(\+|-)?(Infinity|inf)$/i;
|
|
@@ -11148,6 +11182,7 @@ class Decimal128 extends BSONValue {
|
|
|
11148
11182
|
get _bsontype() {
|
|
11149
11183
|
return 'Decimal128';
|
|
11150
11184
|
}
|
|
11185
|
+
bytes;
|
|
11151
11186
|
constructor(bytes) {
|
|
11152
11187
|
super();
|
|
11153
11188
|
if (typeof bytes === 'string') {
|
|
@@ -11623,6 +11658,7 @@ class Double extends BSONValue {
|
|
|
11623
11658
|
get _bsontype() {
|
|
11624
11659
|
return 'Double';
|
|
11625
11660
|
}
|
|
11661
|
+
value;
|
|
11626
11662
|
constructor(value) {
|
|
11627
11663
|
super();
|
|
11628
11664
|
if (value instanceof Number) {
|
|
@@ -11686,6 +11722,7 @@ class Int32 extends BSONValue {
|
|
|
11686
11722
|
get _bsontype() {
|
|
11687
11723
|
return 'Int32';
|
|
11688
11724
|
}
|
|
11725
|
+
value;
|
|
11689
11726
|
constructor(value) {
|
|
11690
11727
|
super();
|
|
11691
11728
|
if (value instanceof Number) {
|
|
@@ -11769,6 +11806,9 @@ class ObjectId extends BSONValue {
|
|
|
11769
11806
|
get _bsontype() {
|
|
11770
11807
|
return 'ObjectId';
|
|
11771
11808
|
}
|
|
11809
|
+
static index = Math.floor(Math.random() * 0xffffff);
|
|
11810
|
+
static cacheHexString;
|
|
11811
|
+
buffer;
|
|
11772
11812
|
constructor(inputId) {
|
|
11773
11813
|
super();
|
|
11774
11814
|
let workingId;
|
|
@@ -11786,8 +11826,8 @@ class ObjectId extends BSONValue {
|
|
|
11786
11826
|
else {
|
|
11787
11827
|
workingId = inputId;
|
|
11788
11828
|
}
|
|
11789
|
-
if (workingId == null
|
|
11790
|
-
this.buffer = ObjectId.generate(
|
|
11829
|
+
if (workingId == null) {
|
|
11830
|
+
this.buffer = ObjectId.generate();
|
|
11791
11831
|
}
|
|
11792
11832
|
else if (ArrayBuffer.isView(workingId) && workingId.byteLength === 12) {
|
|
11793
11833
|
this.buffer = ByteUtils.toLocalBufferType(workingId);
|
|
@@ -11970,7 +12010,6 @@ class ObjectId extends BSONValue {
|
|
|
11970
12010
|
return `new ObjectId(${inspect(this.toHexString(), options)})`;
|
|
11971
12011
|
}
|
|
11972
12012
|
}
|
|
11973
|
-
ObjectId.index = Math.floor(Math.random() * 0xffffff);
|
|
11974
12013
|
|
|
11975
12014
|
function internalCalculateObjectSize(object, serializeFunctions, ignoreUndefined) {
|
|
11976
12015
|
let totalLength = 4 + 1;
|
|
@@ -12139,6 +12178,8 @@ class BSONRegExp extends BSONValue {
|
|
|
12139
12178
|
get _bsontype() {
|
|
12140
12179
|
return 'BSONRegExp';
|
|
12141
12180
|
}
|
|
12181
|
+
pattern;
|
|
12182
|
+
options;
|
|
12142
12183
|
constructor(pattern, options) {
|
|
12143
12184
|
super();
|
|
12144
12185
|
this.pattern = pattern;
|
|
@@ -12199,6 +12240,7 @@ class BSONSymbol extends BSONValue {
|
|
|
12199
12240
|
get _bsontype() {
|
|
12200
12241
|
return 'BSONSymbol';
|
|
12201
12242
|
}
|
|
12243
|
+
value;
|
|
12202
12244
|
constructor(value) {
|
|
12203
12245
|
super();
|
|
12204
12246
|
this.value = value;
|
|
@@ -12229,6 +12271,10 @@ class Timestamp extends LongWithoutOverridesClass {
|
|
|
12229
12271
|
get _bsontype() {
|
|
12230
12272
|
return 'Timestamp';
|
|
12231
12273
|
}
|
|
12274
|
+
get [bsonType]() {
|
|
12275
|
+
return 'Timestamp';
|
|
12276
|
+
}
|
|
12277
|
+
static MAX_VALUE = Long.MAX_UNSIGNED_VALUE;
|
|
12232
12278
|
get i() {
|
|
12233
12279
|
return this.low >>> 0;
|
|
12234
12280
|
}
|
|
@@ -12308,7 +12354,6 @@ class Timestamp extends LongWithoutOverridesClass {
|
|
|
12308
12354
|
return `new Timestamp({ t: ${t}, i: ${i} })`;
|
|
12309
12355
|
}
|
|
12310
12356
|
}
|
|
12311
|
-
Timestamp.MAX_VALUE = Long.MAX_UNSIGNED_VALUE;
|
|
12312
12357
|
|
|
12313
12358
|
const JS_INT_MAX_LONG = Long.fromNumber(JS_INT_MAX);
|
|
12314
12359
|
const JS_INT_MIN_LONG = Long.fromNumber(JS_INT_MIN);
|
|
@@ -13860,6 +13905,7 @@ var bson = /*#__PURE__*/Object.freeze({
|
|
|
13860
13905
|
ObjectId: ObjectId,
|
|
13861
13906
|
Timestamp: Timestamp,
|
|
13862
13907
|
UUID: UUID,
|
|
13908
|
+
bsonType: bsonType,
|
|
13863
13909
|
calculateObjectSize: calculateObjectSize,
|
|
13864
13910
|
deserialize: deserialize,
|
|
13865
13911
|
deserializeStream: deserializeStream,
|
|
@@ -16095,6 +16141,100 @@ var lexer = _Lexer.lex;
|
|
|
16095
16141
|
//# sourceMappingURL=marked.cjs.map
|
|
16096
16142
|
|
|
16097
16143
|
|
|
16144
|
+
/***/ }),
|
|
16145
|
+
|
|
16146
|
+
/***/ "./node_modules/mongodb/lib/bson.js":
|
|
16147
|
+
/*!******************************************!*\
|
|
16148
|
+
!*** ./node_modules/mongodb/lib/bson.js ***!
|
|
16149
|
+
\******************************************/
|
|
16150
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
16151
|
+
|
|
16152
|
+
"use strict";
|
|
16153
|
+
|
|
16154
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
16155
|
+
exports.toUTF8 = exports.getBigInt64LE = exports.getFloat64LE = exports.getInt32LE = exports.UUID = exports.Timestamp = exports.serialize = exports.ObjectId = exports.MinKey = exports.MaxKey = exports.Long = exports.Int32 = exports.EJSON = exports.Double = exports.deserialize = exports.Decimal128 = exports.DBRef = exports.Code = exports.calculateObjectSize = exports.BSONType = exports.BSONSymbol = exports.BSONRegExp = exports.BSONError = exports.BSON = exports.Binary = void 0;
|
|
16156
|
+
exports.parseToElementsToArray = parseToElementsToArray;
|
|
16157
|
+
exports.pluckBSONSerializeOptions = pluckBSONSerializeOptions;
|
|
16158
|
+
exports.resolveBSONOptions = resolveBSONOptions;
|
|
16159
|
+
exports.parseUtf8ValidationOption = parseUtf8ValidationOption;
|
|
16160
|
+
/* eslint-disable no-restricted-imports */
|
|
16161
|
+
const bson_1 = __webpack_require__(/*! bson */ "./node_modules/bson/lib/bson.mjs");
|
|
16162
|
+
var bson_2 = __webpack_require__(/*! bson */ "./node_modules/bson/lib/bson.mjs");
|
|
16163
|
+
Object.defineProperty(exports, "Binary", ({ enumerable: true, get: function () { return bson_2.Binary; } }));
|
|
16164
|
+
Object.defineProperty(exports, "BSON", ({ enumerable: true, get: function () { return bson_2.BSON; } }));
|
|
16165
|
+
Object.defineProperty(exports, "BSONError", ({ enumerable: true, get: function () { return bson_2.BSONError; } }));
|
|
16166
|
+
Object.defineProperty(exports, "BSONRegExp", ({ enumerable: true, get: function () { return bson_2.BSONRegExp; } }));
|
|
16167
|
+
Object.defineProperty(exports, "BSONSymbol", ({ enumerable: true, get: function () { return bson_2.BSONSymbol; } }));
|
|
16168
|
+
Object.defineProperty(exports, "BSONType", ({ enumerable: true, get: function () { return bson_2.BSONType; } }));
|
|
16169
|
+
Object.defineProperty(exports, "calculateObjectSize", ({ enumerable: true, get: function () { return bson_2.calculateObjectSize; } }));
|
|
16170
|
+
Object.defineProperty(exports, "Code", ({ enumerable: true, get: function () { return bson_2.Code; } }));
|
|
16171
|
+
Object.defineProperty(exports, "DBRef", ({ enumerable: true, get: function () { return bson_2.DBRef; } }));
|
|
16172
|
+
Object.defineProperty(exports, "Decimal128", ({ enumerable: true, get: function () { return bson_2.Decimal128; } }));
|
|
16173
|
+
Object.defineProperty(exports, "deserialize", ({ enumerable: true, get: function () { return bson_2.deserialize; } }));
|
|
16174
|
+
Object.defineProperty(exports, "Double", ({ enumerable: true, get: function () { return bson_2.Double; } }));
|
|
16175
|
+
Object.defineProperty(exports, "EJSON", ({ enumerable: true, get: function () { return bson_2.EJSON; } }));
|
|
16176
|
+
Object.defineProperty(exports, "Int32", ({ enumerable: true, get: function () { return bson_2.Int32; } }));
|
|
16177
|
+
Object.defineProperty(exports, "Long", ({ enumerable: true, get: function () { return bson_2.Long; } }));
|
|
16178
|
+
Object.defineProperty(exports, "MaxKey", ({ enumerable: true, get: function () { return bson_2.MaxKey; } }));
|
|
16179
|
+
Object.defineProperty(exports, "MinKey", ({ enumerable: true, get: function () { return bson_2.MinKey; } }));
|
|
16180
|
+
Object.defineProperty(exports, "ObjectId", ({ enumerable: true, get: function () { return bson_2.ObjectId; } }));
|
|
16181
|
+
Object.defineProperty(exports, "serialize", ({ enumerable: true, get: function () { return bson_2.serialize; } }));
|
|
16182
|
+
Object.defineProperty(exports, "Timestamp", ({ enumerable: true, get: function () { return bson_2.Timestamp; } }));
|
|
16183
|
+
Object.defineProperty(exports, "UUID", ({ enumerable: true, get: function () { return bson_2.UUID; } }));
|
|
16184
|
+
function parseToElementsToArray(bytes, offset) {
|
|
16185
|
+
const res = bson_1.BSON.onDemand.parseToElements(bytes, offset);
|
|
16186
|
+
return Array.isArray(res) ? res : [...res];
|
|
16187
|
+
}
|
|
16188
|
+
exports.getInt32LE = bson_1.BSON.onDemand.NumberUtils.getInt32LE;
|
|
16189
|
+
exports.getFloat64LE = bson_1.BSON.onDemand.NumberUtils.getFloat64LE;
|
|
16190
|
+
exports.getBigInt64LE = bson_1.BSON.onDemand.NumberUtils.getBigInt64LE;
|
|
16191
|
+
exports.toUTF8 = bson_1.BSON.onDemand.ByteUtils.toUTF8;
|
|
16192
|
+
function pluckBSONSerializeOptions(options) {
|
|
16193
|
+
const { fieldsAsRaw, useBigInt64, promoteValues, promoteBuffers, promoteLongs, serializeFunctions, ignoreUndefined, bsonRegExp, raw, enableUtf8Validation } = options;
|
|
16194
|
+
return {
|
|
16195
|
+
fieldsAsRaw,
|
|
16196
|
+
useBigInt64,
|
|
16197
|
+
promoteValues,
|
|
16198
|
+
promoteBuffers,
|
|
16199
|
+
promoteLongs,
|
|
16200
|
+
serializeFunctions,
|
|
16201
|
+
ignoreUndefined,
|
|
16202
|
+
bsonRegExp,
|
|
16203
|
+
raw,
|
|
16204
|
+
enableUtf8Validation
|
|
16205
|
+
};
|
|
16206
|
+
}
|
|
16207
|
+
/**
|
|
16208
|
+
* Merge the given BSONSerializeOptions, preferring options over the parent's options, and
|
|
16209
|
+
* substituting defaults for values not set.
|
|
16210
|
+
*
|
|
16211
|
+
* @internal
|
|
16212
|
+
*/
|
|
16213
|
+
function resolveBSONOptions(options, parent) {
|
|
16214
|
+
const parentOptions = parent?.bsonOptions;
|
|
16215
|
+
return {
|
|
16216
|
+
raw: options?.raw ?? parentOptions?.raw ?? false,
|
|
16217
|
+
useBigInt64: options?.useBigInt64 ?? parentOptions?.useBigInt64 ?? false,
|
|
16218
|
+
promoteLongs: options?.promoteLongs ?? parentOptions?.promoteLongs ?? true,
|
|
16219
|
+
promoteValues: options?.promoteValues ?? parentOptions?.promoteValues ?? true,
|
|
16220
|
+
promoteBuffers: options?.promoteBuffers ?? parentOptions?.promoteBuffers ?? false,
|
|
16221
|
+
ignoreUndefined: options?.ignoreUndefined ?? parentOptions?.ignoreUndefined ?? false,
|
|
16222
|
+
bsonRegExp: options?.bsonRegExp ?? parentOptions?.bsonRegExp ?? false,
|
|
16223
|
+
serializeFunctions: options?.serializeFunctions ?? parentOptions?.serializeFunctions ?? false,
|
|
16224
|
+
fieldsAsRaw: options?.fieldsAsRaw ?? parentOptions?.fieldsAsRaw ?? {},
|
|
16225
|
+
enableUtf8Validation: options?.enableUtf8Validation ?? parentOptions?.enableUtf8Validation ?? true
|
|
16226
|
+
};
|
|
16227
|
+
}
|
|
16228
|
+
/** @internal */
|
|
16229
|
+
function parseUtf8ValidationOption(options) {
|
|
16230
|
+
const enableUtf8Validation = options?.enableUtf8Validation;
|
|
16231
|
+
if (enableUtf8Validation === false) {
|
|
16232
|
+
return { utf8: false };
|
|
16233
|
+
}
|
|
16234
|
+
return { utf8: { writeErrors: false } };
|
|
16235
|
+
}
|
|
16236
|
+
//# sourceMappingURL=bson.js.map
|
|
16237
|
+
|
|
16098
16238
|
/***/ }),
|
|
16099
16239
|
|
|
16100
16240
|
/***/ "./node_modules/mpath/index.js":
|
|
@@ -16709,7 +16849,7 @@ module.exports = function stringToParts(str) {
|
|
|
16709
16849
|
/***/ ((module) => {
|
|
16710
16850
|
|
|
16711
16851
|
"use strict";
|
|
16712
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@mongoosejs/studio","version":"0.1.
|
|
16852
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@mongoosejs/studio","version":"0.1.10","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"},"license":"Apache-2.0","dependencies":{"@ai-sdk/openai":"2.x","@ai-sdk/anthropic":"2.x","ai":"5.x","archetype":"0.13.1","csv-stringify":"6.3.0","ejson":"^2.2.3","extrovert":"^0.2.0","marked":"15.0.12","node-inspect-extracted":"3.x","tailwindcss":"3.4.0","vanillatoasts":"^1.6.0","vue":"3.x","webpack":"5.x"},"peerDependencies":{"mongoose":"7.x || 8.x || ^9.0.0-0"},"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":"9.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"}}');
|
|
16713
16853
|
|
|
16714
16854
|
/***/ })
|
|
16715
16855
|
|
package/frontend/public/tw.css
CHANGED
|
@@ -106,6 +106,10 @@
|
|
|
106
106
|
<div class="absolute font-mono right-1 top-1 cursor-pointer text-xl" @click="showDetailModal = false;">×</div>
|
|
107
107
|
<div class="h-full overflow-auto">
|
|
108
108
|
<dashboard-chart v-if="message.executionResult?.output?.$chart" :value="message.executionResult?.output" :responsive="true" />
|
|
109
|
+
<dashboard-map
|
|
110
|
+
v-else-if="message.executionResult?.output?.$featureCollection"
|
|
111
|
+
:value="message.executionResult?.output"
|
|
112
|
+
height="80vh" />
|
|
109
113
|
<pre v-else class="whitespace-pre-wrap">{{ message.executionResult?.output || 'No output' }}</pre>
|
|
110
114
|
</div>
|
|
111
115
|
</template>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const api = require('../api');
|
|
4
4
|
|
|
5
|
-
const { BSON, EJSON } = require('bson');
|
|
5
|
+
const { BSON, EJSON } = require('mongodb/lib/bson');
|
|
6
6
|
|
|
7
7
|
const ObjectId = new Proxy(BSON.ObjectId, {
|
|
8
8
|
apply(target, thisArg, argumentsList) {
|
|
@@ -59,4 +59,4 @@ module.exports = app => app.component('create-document', {
|
|
|
59
59
|
smartIndent: false
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
});
|
|
62
|
+
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<div class="py-2">
|
|
1
|
+
<div class="py-2 h-full flex flex-col">
|
|
2
2
|
<div v-if="header" class="border-b border-gray-100 px-2 pb-2 text-xl font-bold">
|
|
3
3
|
{{header}}
|
|
4
4
|
</div>
|
|
5
|
-
<div class="text-xl">
|
|
6
|
-
<div ref="map" class="w-full" style="
|
|
5
|
+
<div class="text-xl flex-1 min-h-[200px]">
|
|
6
|
+
<div ref="map" class="w-full h-full" :style="mapStyle"></div>
|
|
7
7
|
</div>
|
|
8
8
|
</div>
|
|
@@ -5,7 +5,7 @@ const template = require('./dashboard-map.html');
|
|
|
5
5
|
|
|
6
6
|
module.exports = app => app.component('dashboard-map', {
|
|
7
7
|
template: template,
|
|
8
|
-
props: ['value'],
|
|
8
|
+
props: ['value', 'height'],
|
|
9
9
|
mounted() {
|
|
10
10
|
const fc = this.value.$featureCollection.featureCollection || this.value.$featureCollection;
|
|
11
11
|
const map = L.map(this.$refs.map).setView([0, 0], 1);
|
|
@@ -23,6 +23,9 @@ module.exports = app => app.component('dashboard-map', {
|
|
|
23
23
|
});
|
|
24
24
|
},
|
|
25
25
|
computed: {
|
|
26
|
+
mapStyle() {
|
|
27
|
+
return { height: this.height || '300px' };
|
|
28
|
+
},
|
|
26
29
|
header() {
|
|
27
30
|
if (this.value != null && this.value.$featureCollection.header) {
|
|
28
31
|
return this.value.$featureCollection.header;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const api = require('../api');
|
|
4
4
|
|
|
5
|
-
const { BSON, EJSON } = require('bson');
|
|
5
|
+
const { BSON, EJSON } = require('mongodb/lib/bson');
|
|
6
6
|
|
|
7
7
|
const ObjectId = new Proxy(BSON.ObjectId, {
|
|
8
8
|
apply(target, thisArg, argumentsList) {
|
|
@@ -67,4 +67,4 @@ module.exports = app => app.component('update-document', {
|
|
|
67
67
|
smartIndent: false
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
});
|
|
70
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mongoosejs/studio",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
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": {
|
|
@@ -24,8 +24,6 @@
|
|
|
24
24
|
"webpack": "5.x"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"bson": "^5.5.1 || 6.x",
|
|
28
|
-
"express": "4.x",
|
|
29
27
|
"mongoose": "7.x || 8.x || ^9.0.0-0"
|
|
30
28
|
},
|
|
31
29
|
"devDependencies": {
|