@mongoosejs/studio 0.0.36 → 0.0.37
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 +1 -1
- package/frontend/public/tw.css +0 -5
- package/frontend/src/dashboard/dashboard.html +5 -2
- package/frontend/src/document-details/document-details.html +9 -6
- package/frontend/src/document-details/document-property/document-property.html +36 -38
- package/frontend/src/document-details/document-property/document-property.js +1 -1
- package/package.json +2 -2
package/frontend/public/app.js
CHANGED
|
@@ -2582,7 +2582,7 @@ module.exports = "<div>\n <div v-if=\"Array.isArray(result)\">\n <div v-for=
|
|
|
2582
2582
|
/***/ ((module) => {
|
|
2583
2583
|
|
|
2584
2584
|
"use strict";
|
|
2585
|
-
module.exports = "<div class=\"dashboard px-1\">\n <div v-if=\"dashboard\" 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
|
|
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";
|
|
2586
2586
|
|
|
2587
2587
|
/***/ }),
|
|
2588
2588
|
|
package/frontend/public/tw.css
CHANGED
|
@@ -1227,11 +1227,6 @@ video {
|
|
|
1227
1227
|
color: rgb(153 27 27 / var(--tw-text-opacity));
|
|
1228
1228
|
}
|
|
1229
1229
|
|
|
1230
|
-
.text-sky-600 {
|
|
1231
|
-
--tw-text-opacity: 1;
|
|
1232
|
-
color: rgb(2 132 199 / var(--tw-text-opacity));
|
|
1233
|
-
}
|
|
1234
|
-
|
|
1235
1230
|
.text-sky-800 {
|
|
1236
1231
|
--tw-text-opacity: 1;
|
|
1237
1232
|
color: rgb(7 89 133 / var(--tw-text-opacity));
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<div class="dashboard px-1">
|
|
2
|
-
<div v-if="
|
|
2
|
+
<div v-if="status === 'loading'" class="max-w-5xl mx-auto text-center">
|
|
3
|
+
<img src="images/loader.gif" class="inline mt-10">
|
|
4
|
+
</div>
|
|
5
|
+
<div v-if="dashboard && status === 'loaded'" class="max-w-5xl mx-auto">
|
|
3
6
|
<div class="flex items-center w-full">
|
|
4
7
|
<h2 class="mt-4 mb-4 text-gray-900 font-semibold text-xl grow shrink">{{title}}</h2>
|
|
5
8
|
<div>
|
|
@@ -29,4 +32,4 @@
|
|
|
29
32
|
<div v-if="!dashboard && status === 'loaded'">
|
|
30
33
|
No dashboard with the given id could be found.
|
|
31
34
|
</div>
|
|
32
|
-
</div>
|
|
35
|
+
</div>
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
<div class="document-details">
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
<div v-for="path in schemaPaths" class="value">
|
|
3
|
+
<document-property
|
|
4
|
+
:path="path"
|
|
5
|
+
:document="document"
|
|
6
|
+
:schemaPaths="schemaPaths"
|
|
7
|
+
:editting="editting"
|
|
8
|
+
:changes="changes"
|
|
9
|
+
:invalid="invalid"></document-property>
|
|
10
|
+
</div>
|
|
8
11
|
<div v-for="path in virtuals" class="mb-2">
|
|
9
12
|
<div class="p-1 mb-1 bg-slate-100">
|
|
10
13
|
{{path.name}}
|
|
@@ -1,47 +1,45 @@
|
|
|
1
1
|
<div>
|
|
2
|
-
<div
|
|
3
|
-
<div class="
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<div
|
|
2
|
+
<div class="relative path-key p-1 flex">
|
|
3
|
+
<div class="grow">
|
|
4
|
+
{{path.path}}
|
|
5
|
+
<span class="path-type">
|
|
6
|
+
({{(path.instance || 'unknown').toLowerCase()}})
|
|
7
|
+
</span>
|
|
8
|
+
</div>
|
|
9
|
+
<div v-if="editting && path.instance === 'Date'" class="flex gap-1.5">
|
|
10
|
+
<div
|
|
11
|
+
@click="dateType = 'picker'"
|
|
12
|
+
:class="dateType === 'picker' ? 'bg-teal-600' : ''"
|
|
13
|
+
class="self-stretch px-2 py-1 rounded-sm justify-center items-center gap-1.5 flex cursor-pointer">
|
|
11
14
|
<div
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<div
|
|
16
|
-
:class="dateType === 'picker' ? 'text-sky-600' : 'text-black'"
|
|
17
|
-
class="text-xs font-medium font-['Lato'] capitalize leading-tight">
|
|
18
|
-
Date Picker
|
|
19
|
-
</div>
|
|
15
|
+
:class="dateType === 'picker' ? 'text-white' : ''"
|
|
16
|
+
class="text-xs font-medium font-['Lato'] capitalize leading-tight">
|
|
17
|
+
Date Picker
|
|
20
18
|
</div>
|
|
19
|
+
</div>
|
|
20
|
+
<div
|
|
21
|
+
@click="dateType = 'iso'"
|
|
22
|
+
:class="dateType === 'iso' ? 'bg-teal-600' : ''"
|
|
23
|
+
class="self-stretch px-2 py-1 rounded-sm justify-center items-center gap-1.5 flex cursor-pointer">
|
|
21
24
|
<div
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<div
|
|
26
|
-
:class="dateType === 'iso' ? 'text-sky-600' : 'text-black'"
|
|
27
|
-
class="text-xs font-medium font-['Lato'] capitalize leading-tight">
|
|
28
|
-
ISO String
|
|
29
|
-
</div>
|
|
25
|
+
:class="dateType === 'iso' ? 'text-white' : ''"
|
|
26
|
+
class="text-xs font-medium font-['Lato'] capitalize leading-tight">
|
|
27
|
+
ISO String
|
|
30
28
|
</div>
|
|
31
29
|
</div>
|
|
32
30
|
</div>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
</
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
31
|
+
</div>
|
|
32
|
+
<div v-if="editting && path.path !== '_id'" class="pl-1">
|
|
33
|
+
<component
|
|
34
|
+
:is="getEditComponentForPath(path)"
|
|
35
|
+
:value="getEditValueForPath(path)"
|
|
36
|
+
:format="dateType"
|
|
37
|
+
@input="changes[path.path] = $event; delete invalid[path.path];"
|
|
38
|
+
@error="invalid[path.path] = $event;"
|
|
39
|
+
>
|
|
40
|
+
</component>
|
|
41
|
+
</div>
|
|
42
|
+
<div v-else class="pl-1">
|
|
43
|
+
<component :is="getComponentForPath(path)" :value="getValueForPath(path.path)"></component>
|
|
46
44
|
</div>
|
|
47
45
|
</div>
|
|
@@ -14,7 +14,7 @@ module.exports = app => app.component('document-property', {
|
|
|
14
14
|
dateType: 'picker' // picker, iso
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
|
-
props: ['document', 'schemaPaths', 'editting', 'changes', 'invalid'],
|
|
17
|
+
props: ['path', 'document', 'schemaPaths', 'editting', 'changes', 'invalid'],
|
|
18
18
|
methods: {
|
|
19
19
|
getComponentForPath(schemaPath) {
|
|
20
20
|
if (schemaPath.instance === 'Array') {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mongoosejs/studio",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.37",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"archetype": "0.13.0",
|
|
6
6
|
"csv-stringify": "6.3.0",
|
|
7
7
|
"ejson": "^2.2.3",
|
|
8
8
|
"extrovert": "0.0.24",
|
|
9
9
|
"node-inspect-extracted": "3.x",
|
|
10
|
-
"openai": "3.
|
|
10
|
+
"openai": "3.x",
|
|
11
11
|
"vanillatoasts": "^1.6.0"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|