@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.
@@ -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
 
@@ -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="dashboard" class="max-w-5xl mx-auto">
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
- <document-property
3
- :document="document"
4
- :schemaPaths="schemaPaths"
5
- :editting="editting"
6
- :changes="changes"
7
- :invalid="invalid"></document-property>
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 v-for="path in schemaPaths" class="value">
3
- <div class="relative path-key p-1 flex">
4
- <div class="grow">
5
- {{path.path}}
6
- <span class="path-type">
7
- ({{(path.instance || 'unknown').toLowerCase()}})
8
- </span>
9
- </div>
10
- <div v-if="editting && path.instance === 'Date'" class="flex gap-1.5">
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
- @click="dateType = 'picker'"
13
- :class="dateType === 'picker' ? 'bg-white' : ''"
14
- class="self-stretch px-2 py-1 rounded-sm justify-center items-center gap-1.5 flex cursor-pointer">
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
- @click="dateType = 'iso'"
23
- :class="dateType === 'iso' ? 'bg-white' : ''"
24
- class="self-stretch px-2 py-1 rounded-sm justify-center items-center gap-1.5 flex cursor-pointer">
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
- <div v-if="editting && path.path !== '_id'" class="pl-1">
34
- <component
35
- :is="getEditComponentForPath(path)"
36
- :value="getEditValueForPath(path)"
37
- :format="dateType"
38
- @input="changes[path.path] = $event; delete invalid[path.path];"
39
- @error="invalid[path.path] = $event;"
40
- >
41
- </component>
42
- </div>
43
- <div v-else class="pl-1">
44
- <component :is="getComponentForPath(path)" :value="getValueForPath(path.path)"></component>
45
- </div>
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.36",
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.2.1",
10
+ "openai": "3.x",
11
11
  "vanillatoasts": "^1.6.0"
12
12
  },
13
13
  "peerDependencies": {