@shwfed/config 1.1.0 → 1.1.2
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.json +1 -1
- package/dist/runtime/components/actions/utils/resolve.js +5 -3
- package/dist/runtime/components/block-layout-editor/meta-strip.vue +7 -8
- package/dist/runtime/components/config/utils/resolve.js +3 -3
- package/dist/runtime/components/form/utils/resolve.js +3 -3
- package/dist/runtime/components/table/utils/resolve.js +3 -3
- package/dist/runtime/middleware/token.js +1 -1
- package/dist/runtime/types.d.ts +2 -0
- package/package.json +2 -1
package/dist/module.json
CHANGED
|
@@ -4,13 +4,15 @@ import { toast } from "vue-sonner";
|
|
|
4
4
|
import { defineRegistry } from "../../../share/define-registry.js";
|
|
5
5
|
const schemaModules = import.meta.glob(
|
|
6
6
|
"../buttons/*/*/schema.ts",
|
|
7
|
-
{ eager: true }
|
|
7
|
+
{ eager: true, exhaustive: true }
|
|
8
8
|
);
|
|
9
9
|
const configModuleLoaders = import.meta.glob(
|
|
10
|
-
"../buttons/*/*/config.vue"
|
|
10
|
+
"../buttons/*/*/config.vue",
|
|
11
|
+
{ exhaustive: true }
|
|
11
12
|
);
|
|
12
13
|
const runtimeModuleLoaders = import.meta.glob(
|
|
13
|
-
"../buttons/*/*/runtime.vue"
|
|
14
|
+
"../buttons/*/*/runtime.vue",
|
|
15
|
+
{ exhaustive: true }
|
|
14
16
|
);
|
|
15
17
|
const configModules = Object.fromEntries(
|
|
16
18
|
Object.entries(configModuleLoaders).map(([path, loader]) => [
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from "vue";
|
|
3
|
+
import { ExpressionEditor } from "../ui/expression-editor";
|
|
3
4
|
import { Field, FieldLabel } from "../ui/field";
|
|
4
5
|
import { InputGroup, InputGroupInput } from "../ui/input-group";
|
|
5
6
|
import { Markdown } from "../ui/markdown";
|
|
@@ -70,14 +71,12 @@ function updateMedia(value) {
|
|
|
70
71
|
</template>
|
|
71
72
|
匹配条件
|
|
72
73
|
</FieldLabel>
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
/>
|
|
80
|
-
</InputGroup>
|
|
74
|
+
<ExpressionEditor
|
|
75
|
+
:model-value="layout.media ?? ''"
|
|
76
|
+
placeholder="media('(min-width: 1024px)')"
|
|
77
|
+
result-type="bool"
|
|
78
|
+
@update:model-value="(v) => updateMedia(v)"
|
|
79
|
+
/>
|
|
81
80
|
</Field>
|
|
82
81
|
</div>
|
|
83
82
|
</div>
|
|
@@ -3,15 +3,15 @@ import { defineRegistry } from "../../../share/define-registry.js";
|
|
|
3
3
|
import { registerBlockRef, registerFindBlock } from "./block-ref-cache.js";
|
|
4
4
|
const schemaModules = import.meta.glob(
|
|
5
5
|
"../blocks/*/*/schema.ts",
|
|
6
|
-
{ eager: true }
|
|
6
|
+
{ eager: true, exhaustive: true }
|
|
7
7
|
);
|
|
8
8
|
const configModules = import.meta.glob(
|
|
9
9
|
"../blocks/*/*/config.vue",
|
|
10
|
-
{ eager: true, import: "default" }
|
|
10
|
+
{ eager: true, import: "default", exhaustive: true }
|
|
11
11
|
);
|
|
12
12
|
const runtimeModules = import.meta.glob(
|
|
13
13
|
"../blocks/*/*/runtime.vue",
|
|
14
|
-
{ eager: true, import: "default" }
|
|
14
|
+
{ eager: true, import: "default", exhaustive: true }
|
|
15
15
|
);
|
|
16
16
|
const registry = defineRegistry({
|
|
17
17
|
hostName: "shwfed-config",
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineRegistry } from "../../../share/define-registry.js";
|
|
2
2
|
const schemaModules = import.meta.glob(
|
|
3
3
|
"../fields/*/*/schema.ts",
|
|
4
|
-
{ eager: true }
|
|
4
|
+
{ eager: true, exhaustive: true }
|
|
5
5
|
);
|
|
6
6
|
const configModules = import.meta.glob(
|
|
7
7
|
"../fields/*/*/config.vue",
|
|
8
|
-
{ eager: true, import: "default" }
|
|
8
|
+
{ eager: true, import: "default", exhaustive: true }
|
|
9
9
|
);
|
|
10
10
|
const runtimeModules = import.meta.glob(
|
|
11
11
|
"../fields/*/*/runtime.vue",
|
|
12
|
-
{ eager: true, import: "default" }
|
|
12
|
+
{ eager: true, import: "default", exhaustive: true }
|
|
13
13
|
);
|
|
14
14
|
const registry = defineRegistry({
|
|
15
15
|
hostName: "shwfed-form",
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineRegistry } from "../../../share/define-registry.js";
|
|
2
2
|
const schemaModules = import.meta.glob(
|
|
3
3
|
"../columns/*/*/schema.ts",
|
|
4
|
-
{ eager: true }
|
|
4
|
+
{ eager: true, exhaustive: true }
|
|
5
5
|
);
|
|
6
6
|
const configModules = import.meta.glob(
|
|
7
7
|
"../columns/*/*/config.vue",
|
|
8
|
-
{ eager: true, import: "default" }
|
|
8
|
+
{ eager: true, import: "default", exhaustive: true }
|
|
9
9
|
);
|
|
10
10
|
const runtimeModules = import.meta.glob(
|
|
11
11
|
"../columns/*/*/runtime.vue",
|
|
12
|
-
{ eager: true, import: "default" }
|
|
12
|
+
{ eager: true, import: "default", exhaustive: true }
|
|
13
13
|
);
|
|
14
14
|
const registry = defineRegistry({
|
|
15
15
|
hostName: "shwfed-table",
|
|
@@ -13,7 +13,7 @@ export default defineNuxtRouteMiddleware((to, from) => {
|
|
|
13
13
|
if (!value || Array.isArray(value)) return;
|
|
14
14
|
if (import.meta.client) {
|
|
15
15
|
const config = useRuntimeConfig().public.shwfed;
|
|
16
|
-
localStorage.setItem(config.ci.job, value);
|
|
16
|
+
localStorage.setItem(config.ci.job || "token", value);
|
|
17
17
|
}
|
|
18
18
|
const { [matchedKey]: _, ...remainingQuery } = to.query;
|
|
19
19
|
return navigateTo({ ...to, query: remainingQuery }, { replace: true });
|
package/dist/runtime/types.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { HttpRequestBuilder } from './plugins/http/builder'
|
|
|
2
2
|
import type { Effect, Either } from 'effect'
|
|
3
3
|
import type { toast } from 'vue-sonner'
|
|
4
4
|
import type { ParseError, TypeError, EvaluationError } from './vendor/cel-js/lib/errors'
|
|
5
|
+
import type { Ai } from './plugins/ai'
|
|
5
6
|
|
|
6
7
|
interface HttpService {
|
|
7
8
|
get: (endpoint: string) => HttpRequestBuilder
|
|
@@ -17,6 +18,7 @@ declare module '#app' {
|
|
|
17
18
|
$cel: <T>(expression: string, context?: Record<string, unknown>) => Effect.Effect<T, ParseError | TypeError | EvaluationError>
|
|
18
19
|
$celCheck: (expression: string) => Either.Either<string, ParseError | TypeError>
|
|
19
20
|
$toast: typeof toast
|
|
21
|
+
$ai: Ai
|
|
20
22
|
}
|
|
21
23
|
}
|
|
22
24
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shwfed/config",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Configurable UI for SHWFED",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"typescript": "~6.0.3",
|
|
90
90
|
"vitest": "^4.1.6",
|
|
91
91
|
"vue": "^3.5.34",
|
|
92
|
+
"vue-router": "^5.0.7",
|
|
92
93
|
"vue-tsc": "^3.2.8"
|
|
93
94
|
},
|
|
94
95
|
"lint-staged": {
|