@stonecrop/nuxt 0.16.3 → 0.16.5
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/dist/module.d.mts
CHANGED
|
@@ -87,7 +87,8 @@ interface ModuleOptions {
|
|
|
87
87
|
*/
|
|
88
88
|
theme?: string | false;
|
|
89
89
|
}
|
|
90
|
+
declare const STONECROP_PACKAGES: string[];
|
|
90
91
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
91
92
|
|
|
92
|
-
export { _default as default };
|
|
93
|
+
export { STONECROP_PACKAGES, _default as default };
|
|
93
94
|
export type { ModuleOptions, ParsedDoctype, RouteStrategyFn };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -7,6 +7,8 @@ const { resolve } = createResolver(import.meta.url);
|
|
|
7
7
|
const STONECROP_PACKAGES = [
|
|
8
8
|
"@stonecrop/aform",
|
|
9
9
|
"@stonecrop/atable",
|
|
10
|
+
"@stonecrop/code-editor",
|
|
11
|
+
"@stonecrop/desktop",
|
|
10
12
|
"@stonecrop/stonecrop",
|
|
11
13
|
"@stonecrop/node-editor",
|
|
12
14
|
"@stonecrop/utilities",
|
|
@@ -251,4 +253,4 @@ const module$1 = defineNuxtModule({
|
|
|
251
253
|
}
|
|
252
254
|
});
|
|
253
255
|
|
|
254
|
-
export { module$1 as default };
|
|
256
|
+
export { STONECROP_PACKAGES, module$1 as default };
|
|
@@ -70,14 +70,14 @@
|
|
|
70
70
|
<input
|
|
71
71
|
type="text"
|
|
72
72
|
:value="str(row.__field[p.key])"
|
|
73
|
-
:disabled="
|
|
73
|
+
:disabled="isIdentity(p.key) && isLocked(row.__field)"
|
|
74
74
|
@input="update(row.__realIndex, p.key, value($event) || void 0)" />
|
|
75
75
|
</label>
|
|
76
76
|
<label v-for="p in SELECT_PROPS" :key="p.key" class="field-prop">
|
|
77
77
|
<span>{{ p.label }}</span>
|
|
78
78
|
<select
|
|
79
79
|
:value="str(row.__field[p.key])"
|
|
80
|
-
:disabled="
|
|
80
|
+
:disabled="isIdentity(p.key) && isLocked(row.__field)"
|
|
81
81
|
@change="update(row.__realIndex, p.key, value($event) || void 0)">
|
|
82
82
|
<option value="">—</option>
|
|
83
83
|
<option v-for="o in p.options" :key="o" :value="o">{{ o }}</option>
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
<input
|
|
88
88
|
type="checkbox"
|
|
89
89
|
:checked="bool(row.__field[p.key])"
|
|
90
|
-
:disabled="
|
|
90
|
+
:disabled="isIdentity(p.key) && isLocked(row.__field)"
|
|
91
91
|
@change="update(row.__realIndex, p.key, checked($event) || void 0)" />
|
|
92
92
|
<span>{{ p.label }}</span>
|
|
93
93
|
</label>
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
<input
|
|
97
97
|
type="text"
|
|
98
98
|
:value="jsonStr(row.__field[p.key])"
|
|
99
|
-
:disabled="
|
|
99
|
+
:disabled="isIdentity(p.key) && isLocked(row.__field)"
|
|
100
100
|
:class="{ 'json-invalid': jsonErrors[`${row.__realIndex}:${p.key}`] }"
|
|
101
101
|
@change="updateJson(row.__realIndex, p.key, value($event))" />
|
|
102
102
|
</label>
|
|
@@ -127,11 +127,13 @@
|
|
|
127
127
|
|
|
128
128
|
<script setup>
|
|
129
129
|
import { ATable, ARow } from "@stonecrop/atable";
|
|
130
|
-
import { CANONICAL_COMPONENTS } from "@stonecrop/schema";
|
|
130
|
+
import { CANONICAL_COMPONENTS, INTROSPECTED_IDENTITY_PROPS } from "@stonecrop/schema";
|
|
131
131
|
import { computed, nextTick, ref, useId } from "vue";
|
|
132
|
+
const IDENTITY_PROPS = new Set(INTROSPECTED_IDENTITY_PROPS);
|
|
133
|
+
const isIdentity = (key) => IDENTITY_PROPS.has(key);
|
|
132
134
|
const componentListId = useId();
|
|
133
135
|
const TEXT_PROPS = [
|
|
134
|
-
{ key: "doctype", label: "Link target"
|
|
136
|
+
{ key: "doctype", label: "Link target" },
|
|
135
137
|
{ key: "width", label: "Width" },
|
|
136
138
|
{ key: "mask", label: "Mask" },
|
|
137
139
|
{ key: "format", label: "Format" },
|
|
@@ -143,19 +145,18 @@ const SELECT_PROPS = [
|
|
|
143
145
|
{
|
|
144
146
|
key: "cardinality",
|
|
145
147
|
label: "Cardinality",
|
|
146
|
-
options: ["atMostOne", "one", "noneOrMany", "atLeastOne"]
|
|
147
|
-
identity: true
|
|
148
|
+
options: ["atMostOne", "one", "noneOrMany", "atLeastOne"]
|
|
148
149
|
}
|
|
149
150
|
];
|
|
150
151
|
const BOOL_PROPS = [
|
|
151
152
|
{ key: "readOnly", label: "Read only" },
|
|
152
153
|
{ key: "hidden", label: "Hidden" },
|
|
153
154
|
{ key: "edit", label: "Editable in table" },
|
|
154
|
-
{ key: "primaryKey", label: "Primary key"
|
|
155
|
+
{ key: "primaryKey", label: "Primary key" },
|
|
155
156
|
{ key: "computed", label: "Computed (no DB column)" }
|
|
156
157
|
];
|
|
157
158
|
const JSON_PROPS = [
|
|
158
|
-
{ key: "options", label: "Options"
|
|
159
|
+
{ key: "options", label: "Options" },
|
|
159
160
|
{ key: "default", label: "Default" }
|
|
160
161
|
];
|
|
161
162
|
const FIELD_COLUMNS = [
|
package/dist/types.d.mts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stonecrop/nuxt",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.5",
|
|
4
4
|
"description": "Nuxt module for Stonecrop",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -45,18 +45,18 @@
|
|
|
45
45
|
"pathe": "^2.0.3",
|
|
46
46
|
"pinia": "^3.0.4",
|
|
47
47
|
"prompts": "^2.4.2",
|
|
48
|
-
"@stonecrop/
|
|
49
|
-
"@stonecrop/
|
|
50
|
-
"@stonecrop/
|
|
51
|
-
"@stonecrop/code-editor": "0.16.
|
|
52
|
-
"@stonecrop/
|
|
53
|
-
"@stonecrop/
|
|
54
|
-
"@stonecrop/node-editor": "0.16.
|
|
55
|
-
"@stonecrop/graphql-
|
|
56
|
-
"@stonecrop/
|
|
57
|
-
"@stonecrop/
|
|
58
|
-
"@stonecrop/stonecrop": "0.16.
|
|
59
|
-
"@stonecrop/themes": "0.16.
|
|
48
|
+
"@stonecrop/casl-middleware": "0.16.5",
|
|
49
|
+
"@stonecrop/aform": "0.16.5",
|
|
50
|
+
"@stonecrop/atable": "0.16.5",
|
|
51
|
+
"@stonecrop/code-editor": "0.16.5",
|
|
52
|
+
"@stonecrop/desktop": "0.16.5",
|
|
53
|
+
"@stonecrop/graphql-middleware": "0.16.5",
|
|
54
|
+
"@stonecrop/node-editor": "0.16.5",
|
|
55
|
+
"@stonecrop/graphql-client": "0.16.5",
|
|
56
|
+
"@stonecrop/schema": "0.16.5",
|
|
57
|
+
"@stonecrop/nuxt-grafserv": "0.16.5",
|
|
58
|
+
"@stonecrop/stonecrop": "0.16.5",
|
|
59
|
+
"@stonecrop/themes": "0.16.5"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@eslint/js": "^10.0.1",
|
|
@@ -10,6 +10,7 @@ import consola from 'consola'
|
|
|
10
10
|
import { addDependencies } from '../utils/package'
|
|
11
11
|
import { updateNuxtConfig } from '../utils/config'
|
|
12
12
|
import { loadTemplate } from '../utils/templates'
|
|
13
|
+
import { STONECROP_PACKAGES } from '../../module'
|
|
13
14
|
|
|
14
15
|
export interface FrontendInstallerOptions {
|
|
15
16
|
cwd: string
|
|
@@ -60,15 +61,11 @@ export async function installFrontend(options: FrontendInstallerOptions): Promis
|
|
|
60
61
|
// This is required because the packages use vite-plugin-lib-inject-css which adds
|
|
61
62
|
// CSS imports to the JavaScript bundles. Node.js ESM loader doesn't understand .css files,
|
|
62
63
|
// so we need Nitro to bundle these packages (allowing Vite to process the CSS)
|
|
64
|
+
// Shares the module's list rather than restating it: the two previously disagreed
|
|
65
|
+
// (this one had `desktop` but not `themes`; the module's had the reverse), so a
|
|
66
|
+
// scaffolded app and the module inlined different sets.
|
|
63
67
|
nitroConfig: {
|
|
64
|
-
externalsInline: [
|
|
65
|
-
'@stonecrop/aform',
|
|
66
|
-
'@stonecrop/atable',
|
|
67
|
-
'@stonecrop/stonecrop',
|
|
68
|
-
'@stonecrop/node-editor',
|
|
69
|
-
'@stonecrop/utilities',
|
|
70
|
-
'@stonecrop/desktop',
|
|
71
|
-
],
|
|
68
|
+
externalsInline: [...STONECROP_PACKAGES],
|
|
72
69
|
},
|
|
73
70
|
css: ['@stonecrop/desktop/styles'],
|
|
74
71
|
})
|