@shwfed/config 3.0.12 → 3.0.14
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/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.d.vue.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue.d.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.d.vue.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue.d.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/config.d.vue.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/config.vue.d.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-06-25/com.shwfed.actions.button.state.write/config.d.vue.ts +8 -8
- package/dist/runtime/components/actions/buttons/2026-06-25/com.shwfed.actions.button.state.write/config.vue.d.ts +8 -8
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/config.d.vue.ts +10 -8
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/config.vue +272 -286
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/config.vue.d.ts +10 -8
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/runtime.d.vue.ts +10 -8
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/runtime.vue +91 -291
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/runtime.vue.d.ts +10 -8
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/schema.d.ts +4 -28
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/schema.js +14 -33
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/config.d.vue.ts +96 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/config.vue +385 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/config.vue.d.ts +96 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/items-colgroup.d.vue.ts +3 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/items-colgroup.vue +20 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/items-colgroup.vue.d.ts +3 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/runtime.d.vue.ts +96 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/runtime.vue +177 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/runtime.vue.d.ts +96 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/schema.d.ts +102 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/schema.js +186 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/utils/validation.js +9 -7
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/config.vue +57 -247
- package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/prompt.md +2 -2
- package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/runtime.vue +29 -126
- package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/schema.d.ts +5 -27
- package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/schema.js +10 -37
- package/dist/runtime/components/ui/invoice/InvoiceSheet.d.vue.ts +66 -0
- package/dist/runtime/components/ui/invoice/InvoiceSheet.vue +182 -0
- package/dist/runtime/components/ui/invoice/InvoiceSheet.vue.d.ts +66 -0
- package/dist/runtime/components/ui/invoice/index.d.ts +1 -0
- package/dist/runtime/components/ui/invoice/index.js +1 -0
- package/dist/runtime/components/ui/invoice-config/InvoiceConfigShell.d.vue.ts +36 -0
- package/dist/runtime/components/ui/invoice-config/InvoiceConfigShell.vue +41 -0
- package/dist/runtime/components/ui/invoice-config/InvoiceConfigShell.vue.d.ts +36 -0
- package/dist/runtime/components/{config/blocks/2026-07-17/com.shwfed.block.invoice.digital/expr-field.vue → ui/invoice-config/InvoiceExprField.vue} +4 -4
- package/dist/runtime/components/{config/blocks/2026-07-17/com.shwfed.block.invoice.digital/json-scope-provider.vue → ui/invoice-config/InvoiceJsonScope.vue} +3 -3
- package/dist/runtime/components/{config/blocks/2026-07-17/com.shwfed.block.invoice.digital/row-scope-provider.vue → ui/invoice-config/InvoiceRowScope.vue} +2 -2
- package/dist/runtime/components/ui/invoice-config/index.d.ts +4 -0
- package/dist/runtime/components/ui/invoice-config/index.js +4 -0
- package/dist/runtime/share/invoice-eval.d.ts +13 -0
- package/dist/runtime/share/invoice-eval.js +88 -0
- package/dist/runtime/share/invoice.d.ts +68 -0
- package/dist/runtime/share/invoice.js +35 -0
- package/dist/runtime/share/slot-renderer.vue +83 -24
- package/dist/runtime/vendor/cel-js/CLAUDE.md +3 -1
- package/dist/runtime/vendor/cel-js/PROMPT.md +31 -2
- package/dist/runtime/vendor/cel-js/lib/functions.js +28 -1
- package/dist/runtime/vendor/cel-js/lib/registry.js +2 -1
- package/package.json +1 -1
- /package/dist/runtime/components/{config/blocks/2026-07-17/com.shwfed.block.invoice.digital/expr-field.d.vue.ts → ui/invoice-config/InvoiceExprField.d.vue.ts} +0 -0
- /package/dist/runtime/components/{config/blocks/2026-07-17/com.shwfed.block.invoice.digital/expr-field.vue.d.ts → ui/invoice-config/InvoiceExprField.vue.d.ts} +0 -0
- /package/dist/runtime/components/{config/blocks/2026-07-17/com.shwfed.block.invoice.digital/json-scope-provider.d.vue.ts → ui/invoice-config/InvoiceJsonScope.d.vue.ts} +0 -0
- /package/dist/runtime/components/{config/blocks/2026-07-17/com.shwfed.block.invoice.digital/json-scope-provider.vue.d.ts → ui/invoice-config/InvoiceJsonScope.vue.d.ts} +0 -0
- /package/dist/runtime/components/{config/blocks/2026-07-17/com.shwfed.block.invoice.digital/row-scope-provider.d.vue.ts → ui/invoice-config/InvoiceRowScope.d.vue.ts} +0 -0
- /package/dist/runtime/components/{config/blocks/2026-07-17/com.shwfed.block.invoice.digital/row-scope-provider.vue.d.ts → ui/invoice-config/InvoiceRowScope.vue.d.ts} +0 -0
- /package/dist/runtime/{components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital → share}/rmb.d.ts +0 -0
- /package/dist/runtime/{components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital → share}/rmb.js +0 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { Expression, HttpRequestResult } from "../../../../../share/expression.js";
|
|
3
|
+
import {
|
|
4
|
+
boolResult,
|
|
5
|
+
listResult,
|
|
6
|
+
moneyResult,
|
|
7
|
+
partySchema,
|
|
8
|
+
registerJsonIfAbsent,
|
|
9
|
+
textResult
|
|
10
|
+
} from "../../../../../share/invoice.js";
|
|
11
|
+
import { registerLoopVariablesIfAbsent } from "../../../../../share/loop-item-var.js";
|
|
12
|
+
export { getStructFieldDescription, getStructFieldTitle } from "../../../../table/utils/schema-meta.js";
|
|
13
|
+
export { JSON_VAR, partySchema } from "../../../../../share/invoice.js";
|
|
14
|
+
export const type = "com.shwfed.block.invoice.realestate.lease";
|
|
15
|
+
export const compatibilityDate = "2026-07-17";
|
|
16
|
+
export const BUSINESS_LABEL = "\u4E0D\u52A8\u4EA7\u7ECF\u8425\u79DF\u8D41\u670D\u52A1";
|
|
17
|
+
export const metadata = {
|
|
18
|
+
name: "\u6570\u7535\u7968\uFF08\u4E0D\u52A8\u4EA7\u7ECF\u8425\u79DF\u8D41\u670D\u52A1\uFF09",
|
|
19
|
+
icon: "fluent:building-20-regular",
|
|
20
|
+
description: "\u6309\u56FD\u5BB6\u7A0E\u52A1\u603B\u5C40\u7248\u5F0F\u6E32\u67D3\u4E00\u5F20\u4E0D\u52A8\u4EA7\u7ECF\u8425\u79DF\u8D41\u670D\u52A1\u6570\u7535\u7968\uFF0C\u7968\u9762\u5404\u680F\u7531 CEL \u8868\u8FBE\u5F0F\u6620\u5C04",
|
|
21
|
+
w: { initial: 24, min: 12, max: Infinity },
|
|
22
|
+
// 与数电票块同理:票面高度由明细行数决定,需顶部锚定向下生长。
|
|
23
|
+
h: { initial: 12, min: 8, max: Infinity, grow: true }
|
|
24
|
+
};
|
|
25
|
+
export function lineSchema(configure) {
|
|
26
|
+
const rowConfigure = (env) => {
|
|
27
|
+
configure(env);
|
|
28
|
+
registerLoopVariablesIfAbsent(env);
|
|
29
|
+
};
|
|
30
|
+
const CelText = Expression({ configure: rowConfigure, resultType: textResult });
|
|
31
|
+
const CelMoney = Expression({ configure: rowConfigure, resultType: moneyResult });
|
|
32
|
+
return Schema.Struct({
|
|
33
|
+
name: CelText.annotations({
|
|
34
|
+
title: "\u9879\u76EE\u540D\u79F0",
|
|
35
|
+
description: "\u8FD4\u56DE\u9879\u76EE\u540D\u79F0\uFF08`string`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u5982 `item.xmmc`\u3002\u7968\u9762\u60EF\u4F8B\u5E26\u7C7B\u76EE\u524D\u7F00\uFF0C\u5982 `*\u7ECF\u8425\u79DF\u8D41*\u623F\u5C4B\u79DF\u8D41\u8D39`"
|
|
36
|
+
}),
|
|
37
|
+
certNo: Schema.optional(CelText.annotations({
|
|
38
|
+
title: "\u4EA7\u6743\u8BC1\u4E66/\u4E0D\u52A8\u4EA7\u6743\u8BC1\u53F7",
|
|
39
|
+
description: "\u8FD4\u56DE\u4EA7\u6743\u8BC1\u4E66\u53F7\u6216\u4E0D\u52A8\u4EA7\u6743\u8BC1\u53F7\uFF08`string`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF1B\u7559\u7A7A\u5219\u8BE5\u680F\u4E3A\u7A7A"
|
|
40
|
+
})),
|
|
41
|
+
areaUnit: Schema.optional(CelText.annotations({
|
|
42
|
+
title: "\u9762\u79EF\u5355\u4F4D",
|
|
43
|
+
description: "\u8FD4\u56DE\u9762\u79EF\u5355\u4F4D\uFF08`string`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u5982 `\u5E73\u65B9\u7C73`\uFF1B\u7559\u7A7A\u5219\u8BE5\u680F\u4E3A\u7A7A"
|
|
44
|
+
})),
|
|
45
|
+
quantity: Schema.optional(CelMoney.annotations({
|
|
46
|
+
title: "\u6570\u91CF",
|
|
47
|
+
description: "\u8FD4\u56DE\u6570\u91CF\u7684 CEL \u8868\u8FBE\u5F0F\u3002\u8FD4\u56DE `number` \u65F6\u539F\u6837\u5C55\u793A\uFF08\u4E0D\u8865\u5C0F\u6570\u4F4D\uFF09\uFF0C\u8FD4\u56DE `string` \u65F6\u539F\u6837\u6253\u5370\uFF1B\u7559\u7A7A\u5219\u8BE5\u680F\u4E3A\u7A7A"
|
|
48
|
+
})),
|
|
49
|
+
unitPrice: Schema.optional(CelMoney.annotations({
|
|
50
|
+
title: "\u5355\u4EF7",
|
|
51
|
+
description: "\u8FD4\u56DE\u5355\u4EF7\u7684 CEL \u8868\u8FBE\u5F0F\u3002\u8FD4\u56DE `number` \u65F6\u539F\u6837\u5C55\u793A\uFF08\u7968\u9762\u5355\u4EF7\u5E38\u5E26\u591A\u4F4D\u5C0F\u6570\uFF0C\u5982 `272.5663716814`\uFF0C\u6545\u4E0D\u505A\u56DB\u820D\u4E94\u5165\uFF09\uFF1B\u7559\u7A7A\u5219\u8BE5\u680F\u4E3A\u7A7A"
|
|
52
|
+
})),
|
|
53
|
+
amount: CelMoney.annotations({
|
|
54
|
+
title: "\u91D1\u989D",
|
|
55
|
+
description: "\u8FD4\u56DE\u4E0D\u542B\u7A0E\u91D1\u989D\u7684 CEL \u8868\u8FBE\u5F0F\u3002\u8FD4\u56DE `number` \u65F6\u683C\u5F0F\u5316\u4E3A\u4E24\u4F4D\u5C0F\u6570\u5E76\u52A0\u5343\u5206\u4F4D\uFF1B\u8FD4\u56DE `string` \u65F6\u539F\u6837\u6253\u5370"
|
|
56
|
+
}),
|
|
57
|
+
taxRate: Schema.optional(CelText.annotations({
|
|
58
|
+
title: "\u7A0E\u7387/\u5F81\u6536\u7387",
|
|
59
|
+
description: "\u8FD4\u56DE\u7A0E\u7387\uFF08`string`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u539F\u6837\u6253\u5370\uFF0C\u5982 `5%`\u3002\u523B\u610F\u4E0D\u662F\u6570\u5B57 \u2014\u2014 \u8BE5\u680F\u5408\u6CD5\u53D6\u503C\u8FD8\u5305\u62EC `\u514D\u7A0E` / `\u4E0D\u5F81\u7A0E` / `***`"
|
|
60
|
+
})),
|
|
61
|
+
taxAmount: Schema.optional(CelMoney.annotations({
|
|
62
|
+
title: "\u7A0E\u989D",
|
|
63
|
+
description: "\u8FD4\u56DE\u7A0E\u989D\u7684 CEL \u8868\u8FBE\u5F0F\u3002\u8FD4\u56DE `number` \u65F6\u683C\u5F0F\u5316\u4E3A\u4E24\u4F4D\u5C0F\u6570\u5E76\u52A0\u5343\u5206\u4F4D\uFF1B\u7559\u7A7A\u5219\u8BE5\u680F\u4E3A\u7A7A"
|
|
64
|
+
}))
|
|
65
|
+
}).annotations({
|
|
66
|
+
title: "\u660E\u7EC6\u884C",
|
|
67
|
+
description: "\u660E\u7EC6\u5404\u680F\u7684\u53D6\u503C\u8868\u8FBE\u5F0F\uFF0C\u5BF9\u6BCF\u4E00\u884C\u6C42\u503C\uFF1B\u53EF\u8BBF\u95EE `item`\uFF08\u5F53\u524D\u660E\u7EC6\u9879\uFF09\u4E0E `index`\uFF08\u5E8F\u53F7\uFF0C\u4ECE 0 \u5F00\u59CB\uFF09"
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
export function remarkSchema(configure) {
|
|
71
|
+
const CelText = Expression({ configure, resultType: textResult });
|
|
72
|
+
const CelBool = Expression({ configure, resultType: boolResult });
|
|
73
|
+
return Schema.Struct({
|
|
74
|
+
address: CelText.annotations({
|
|
75
|
+
title: "\u4E0D\u52A8\u4EA7\u5730\u5740",
|
|
76
|
+
description: "\u8FD4\u56DE\u4E0D\u52A8\u4EA7\u8BE6\u7EC6\u5730\u5740\uFF08`string`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u5982 `json.bdcdz`"
|
|
77
|
+
}),
|
|
78
|
+
leasePeriod: CelText.annotations({
|
|
79
|
+
title: "\u79DF\u8D41\u671F\u8D77\u6B62",
|
|
80
|
+
description: "\u8FD4\u56DE\u79DF\u8D41\u671F\u8D77\u6B62\uFF08`string`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u539F\u6837\u6253\u5370\u3002\u7968\u9762\u60EF\u4F8B\u4E3A `2026\u5E7401\u670801\u65E5-2026\u5E7412\u670831\u65E5`\uFF0C\u683C\u5F0F\u5316\u8BF7\u5728\u8868\u8FBE\u5F0F\u5185\u5B8C\u6210"
|
|
81
|
+
}),
|
|
82
|
+
crossCity: CelBool.annotations({
|
|
83
|
+
title: "\u8DE8\u5730\uFF08\u5E02\uFF09\u6807\u5FD7",
|
|
84
|
+
description: "\u8FD4\u56DE `bool` \u7684 CEL \u8868\u8FBE\u5F0F\uFF1A`true` \u5370\u300C\u662F\u300D\uFF0C`false` \u5370\u300C\u5426\u300D\u3002\u6C42\u503C\u5931\u8D25\u65F6\u6574\u680F\uFF08\u542B\u6807\u7B7E\uFF09\u4E0D\u5370 \u2014\u2014 \u89C1 runtime.vue"
|
|
85
|
+
})
|
|
86
|
+
}).annotations({
|
|
87
|
+
title: "\u5907\u6CE8",
|
|
88
|
+
description: "\u7A0E\u603B\u89C4\u5B9A\u8FD9\u5F20\u7968\u7684\u5907\u6CE8\u987B\u542B\u4E0D\u52A8\u4EA7\u5730\u5740\u3001\u79DF\u8D41\u671F\u8D77\u6B62\u3001\u8DE8\u5730\uFF08\u5E02\uFF09\u6807\u5FD7\u4E09\u680F"
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
export function schema(configure, _blockRef) {
|
|
92
|
+
const CelRequest = Expression({ configure, resultType: HttpRequestResult });
|
|
93
|
+
const CelHidden = Expression({ configure, resultType: boolResult });
|
|
94
|
+
const bodyConfigure = (env) => {
|
|
95
|
+
configure(env);
|
|
96
|
+
registerJsonIfAbsent(env);
|
|
97
|
+
};
|
|
98
|
+
const CelText = Expression({ configure: bodyConfigure, resultType: textResult });
|
|
99
|
+
const CelMoney = Expression({ configure: bodyConfigure, resultType: moneyResult });
|
|
100
|
+
const CelItems = Expression({ configure: bodyConfigure, resultType: listResult });
|
|
101
|
+
const CelBool = Expression({ configure: bodyConfigure, resultType: boolResult });
|
|
102
|
+
return Schema.Struct({
|
|
103
|
+
id: Schema.UUID.annotations({ description: "\u5757\u552F\u4E00\u6807\u8BC6" }),
|
|
104
|
+
type: Schema.tag(type),
|
|
105
|
+
compatibilityDate: Schema.tag(compatibilityDate),
|
|
106
|
+
displayName: Schema.optional(Schema.String.annotations({
|
|
107
|
+
title: "\u5185\u90E8\u540D\u79F0",
|
|
108
|
+
description: "\u4EC5\u5728\u7F16\u8F91\u5668\u5185\u53EF\u89C1\u7684\u5757\u540D\uFF0C\u7528\u4E8E\u5728\u4FA7\u8FB9\u680F\u548C\u5E03\u5C40\u7F16\u8F91\u5668\u4E2D\u8BC6\u522B\u5757\uFF1B\u8FD0\u884C\u65F6\u4E0D\u5C55\u793A"
|
|
109
|
+
})),
|
|
110
|
+
hidden: Schema.optional(CelHidden.annotations({
|
|
111
|
+
title: "\u9690\u85CF\u6761\u4EF6",
|
|
112
|
+
description: "\u8FD4\u56DE `true` \u65F6\u8BE5\u5757\u5728\u6240\u6709\u5E03\u5C40\u4E2D\u90FD\u4E0D\u6E32\u67D3\uFF0C\u5B83\u5360\u7528\u7684\u884C/\u5217\u8F68\u9053\u4F1A\u81EA\u52A8\u6536\u62E2\uFF08\u540C\u4E00\u7247\u533A\u57DF\u5185\u53E6\u4E00\u5F20\u7968\u53EF\u9876\u4E0A\u6765\uFF09\u3002\u5728**\u9875\u9762\u4F5C\u7528\u57DF**\u6C42\u503C \u2014\u2014 \u8BFB\u4E0D\u5230\u672C\u5757 `\u8BF7\u6C42` \u4EA7\u51FA\u7684 `json`\uFF0C\u7968\u79CD\u5224\u65AD\u9700\u53D6\u81EA\u5916\u5C42\u4E0A\u4E0B\u6587"
|
|
113
|
+
})),
|
|
114
|
+
// 刻意不叫 `kind`:数电票块的 `kind` 是静态枚举(`special` / `normal`),同名不同
|
|
115
|
+
// 类型是个陷阱 —— 两个块的配置若被互相复制粘贴,同名字段会被静默当成同一个东西。
|
|
116
|
+
kindLabel: CelText.annotations({
|
|
117
|
+
title: "\u7968\u79CD",
|
|
118
|
+
description: "\u8FD4\u56DE\u7968\u79CD\uFF08`string`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u586B\u5165\u6807\u9898\u62EC\u53F7\u5185\uFF0C\u5982 `'\u589E\u503C\u7A0E\u4E13\u7528\u53D1\u7968'`\u3002\u62EC\u53F7\u5185\u5B8C\u5168\u81EA\u7531 \u2014\u2014 \u771F\u7968\u4E0A\u8FD9\u91CC\u8FD8\u53EF\u80FD\u662F\u300C\u589E\u503C\u7A0E\u7535\u5B50\u666E\u901A\u53D1\u7968\u300D\u7B49\u5B57\u6837\uFF1B\u6C42\u503C\u4E3A\u7A7A\u5219\u6807\u9898\u53EA\u5370\u300C\u7535\u5B50\u53D1\u7968\u300D"
|
|
119
|
+
}),
|
|
120
|
+
request: Schema.optional(CelRequest.annotations({
|
|
121
|
+
title: "\u8BF7\u6C42",
|
|
122
|
+
description: "\u53EF\u9009\u7684 HTTP \u8BF7\u6C42\u8868\u8FBE\u5F0F\uFF08\u8FD4\u56DE `HttpRequest`\uFF09\uFF1B\u54CD\u5E94\u4F53\u4EE5 `json` \u63D0\u4F9B\u7ED9\u7968\u9762\u6240\u6709\u680F\u4F4D\uFF08\u542B\u660E\u7EC6\u5217\u8868\u4E0E\u9010\u884C\u680F\u4F4D\uFF09\u3002\u7559\u7A7A\u5219 `json` \u4E3A none\uFF0C\u5404\u680F\u4ECE\u5916\u5C42\u4E0A\u4E0B\u6587\u53D6\u503C"
|
|
123
|
+
})),
|
|
124
|
+
itemsMaxHeight: Schema.optional(Schema.String.annotations({
|
|
125
|
+
title: "\u660E\u7EC6\u533A\u9AD8\u5EA6",
|
|
126
|
+
description: "\u660E\u7EC6\u533A\u7684\u6700\u5927\u9AD8\u5EA6\uFF08CSS \u957F\u5EA6\uFF0C\u5982 `24rem` / `50vh`\uFF09\uFF1B\u8D85\u51FA\u540E\u660E\u7EC6\u5185\u5BB9\u6EDA\u52A8\uFF0C\u5217\u6807\u9898\u4E0E\u5408\u8BA1\u884C\u4FDD\u6301\u53EF\u89C1\u3002\u7559\u7A7A\u5219\u660E\u7EC6\u533A\u968F\u884C\u6570\u589E\u957F\uFF0C\u7968\u9762\u6574\u4F53\u53D8\u9AD8"
|
|
127
|
+
})),
|
|
128
|
+
invoiceNumber: CelText.annotations({
|
|
129
|
+
title: "\u53D1\u7968\u53F7\u7801",
|
|
130
|
+
description: "\u8FD4\u56DE\u53D1\u7968\u53F7\u7801\uFF08`string`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u5C55\u793A\u5728\u7968\u9762\u53F3\u4E0A\u89D2"
|
|
131
|
+
}),
|
|
132
|
+
issueDate: CelText.annotations({
|
|
133
|
+
title: "\u5F00\u7968\u65E5\u671F",
|
|
134
|
+
description: "\u8FD4\u56DE\u5F00\u7968\u65E5\u671F\uFF08`string`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u539F\u6837\u6253\u5370\u3002\u7968\u9762\u60EF\u4F8B\u4E3A `2026\u5E7406\u670801\u65E5`\uFF0C\u683C\u5F0F\u5316\u8BF7\u5728\u8868\u8FBE\u5F0F\u5185\u5B8C\u6210"
|
|
135
|
+
}),
|
|
136
|
+
buyer: partySchema(bodyConfigure, "\u8D2D\u4E70\u65B9"),
|
|
137
|
+
seller: partySchema(bodyConfigure, "\u9500\u552E\u65B9"),
|
|
138
|
+
items: CelItems.annotations({
|
|
139
|
+
title: "\u660E\u7EC6\u5217\u8868",
|
|
140
|
+
description: "\u8FD4\u56DE\u660E\u7EC6\u884C\u5217\u8868\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u5982 `json.mxList`\uFF1B\u6BCF\u4E00\u9879\u6309\u300C\u660E\u7EC6\u884C\u300D\u7684\u5217\u6620\u5C04\u6E32\u67D3\u4E00\u884C\u3002\u8FD4\u56DE `none` / \u975E\u5217\u8868\u65F6\u4E0D\u6E32\u67D3\u4EFB\u4F55\u660E\u7EC6\u884C"
|
|
141
|
+
}),
|
|
142
|
+
line: lineSchema(bodyConfigure).annotations({
|
|
143
|
+
title: "\u660E\u7EC6\u884C",
|
|
144
|
+
description: "\u660E\u7EC6\u5404\u680F\u7684\u53D6\u503C\u8868\u8FBE\u5F0F\uFF0C\u5BF9\u300C\u660E\u7EC6\u5217\u8868\u300D\u7684\u6BCF\u4E00\u9879\u6C42\u503C"
|
|
145
|
+
}),
|
|
146
|
+
totalAmount: CelMoney.annotations({
|
|
147
|
+
title: "\u5408\u8BA1\u91D1\u989D",
|
|
148
|
+
description: "\u8FD4\u56DE\u5408\u8BA1\u680F\u4E0D\u542B\u7A0E\u91D1\u989D\u7684 CEL \u8868\u8FBE\u5F0F\u3002\u523B\u610F\u4E0D\u7531\u660E\u7EC6\u81EA\u52A8\u6C42\u548C \u2014\u2014 \u7968\u9762\u5408\u8BA1\u4EE5\u5F00\u7968\u6570\u636E\u4E3A\u51C6\uFF0C\u4E0D\u5E94\u7531\u524D\u7AEF\u91CD\u7B97"
|
|
149
|
+
}),
|
|
150
|
+
totalTax: CelMoney.annotations({
|
|
151
|
+
title: "\u5408\u8BA1\u7A0E\u989D",
|
|
152
|
+
description: "\u8FD4\u56DE\u5408\u8BA1\u680F\u7A0E\u989D\u7684 CEL \u8868\u8FBE\u5F0F"
|
|
153
|
+
}),
|
|
154
|
+
grandTotal: CelMoney.annotations({
|
|
155
|
+
title: "\u4EF7\u7A0E\u5408\u8BA1",
|
|
156
|
+
description: "\u8FD4\u56DE\u4EF7\u7A0E\u5408\u8BA1\uFF08\u5C0F\u5199\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\u3002\u5927\u5199\u680F\u7531\u8BE5\u503C\u672C\u5730\u63A8\u5BFC\uFF08\u5982 `\u9646\u4EDF\u67D2\u4F70\u96F6\u9646\u5706\u58F9\u89D2\u6574`\u3001\u8D1F\u6570\u4E3A `\uFF08\u8D1F\u6570\uFF09\u53C1\u4F70\u96F6\u634C\u5706\u6574`\uFF09\uFF0C\u65E0\u9700\u53E6\u884C\u914D\u7F6E"
|
|
157
|
+
}),
|
|
158
|
+
remark: remarkSchema(bodyConfigure),
|
|
159
|
+
issuer: Schema.optional(CelText.annotations({
|
|
160
|
+
title: "\u5F00\u7968\u4EBA",
|
|
161
|
+
description: "\u8FD4\u56DE\u5F00\u7968\u4EBA\u59D3\u540D\uFF08`string`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF1B\u7559\u7A7A\u5219\u4E0D\u5C55\u793A"
|
|
162
|
+
})),
|
|
163
|
+
redLetter: Schema.optional(CelBool.annotations({
|
|
164
|
+
title: "\u7EA2\u5B57\u53D1\u7968",
|
|
165
|
+
description: "\u8FD4\u56DE `bool` \u7684 CEL \u8868\u8FBE\u5F0F\uFF1B\u4E3A `true` \u65F6\u7968\u9762\u4E2D\u592E\u53E0\u52A0\u300C\u7EA2\u5B57\u53D1\u7968\u300D\u6C34\u5370\u3002\u7559\u7A7A\u5219\u4E0D\u5C55\u793A\u6C34\u5370"
|
|
166
|
+
}))
|
|
167
|
+
}).annotations({
|
|
168
|
+
title: "\u4E0D\u52A8\u4EA7\u7ECF\u8425\u79DF\u8D41\u670D\u52A1\u6570\u7535\u7968\u5757",
|
|
169
|
+
description: "\u6309\u56FD\u5BB6\u7A0E\u52A1\u603B\u5C40\u7248\u5F0F\u6E32\u67D3\u4E00\u5F20\u4E0D\u52A8\u4EA7\u7ECF\u8425\u79DF\u8D41\u670D\u52A1\u6570\u7535\u7968\uFF0C\u7968\u9762\u5404\u680F\u7531 CEL \u8868\u8FBE\u5F0F\u6620\u5C04"
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
export function defaultBody() {
|
|
173
|
+
return {
|
|
174
|
+
kindLabel: "",
|
|
175
|
+
invoiceNumber: "",
|
|
176
|
+
issueDate: "",
|
|
177
|
+
buyer: { name: "", taxId: "" },
|
|
178
|
+
seller: { name: "", taxId: "" },
|
|
179
|
+
items: "[]",
|
|
180
|
+
line: { name: "", amount: "" },
|
|
181
|
+
totalAmount: "",
|
|
182
|
+
totalTax: "",
|
|
183
|
+
grandTotal: "",
|
|
184
|
+
remark: { address: "", leasePeriod: "", crossCity: "" }
|
|
185
|
+
};
|
|
186
|
+
}
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts
CHANGED
|
@@ -39,17 +39,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
39
39
|
readonly mode: "formula" | "prefill";
|
|
40
40
|
readonly expression: string;
|
|
41
41
|
} | undefined;
|
|
42
|
-
readonly validations?: readonly {
|
|
43
|
-
readonly message: readonly [{
|
|
44
|
-
readonly locale: "zh";
|
|
45
|
-
readonly message: string;
|
|
46
|
-
}, ...{
|
|
47
|
-
readonly locale: "en" | "ja" | "ko";
|
|
48
|
-
readonly message: string;
|
|
49
|
-
}[]];
|
|
50
|
-
readonly warning?: boolean | undefined;
|
|
51
|
-
readonly when: string;
|
|
52
|
-
}[] | undefined;
|
|
53
42
|
readonly addon?: {
|
|
54
43
|
readonly size: "default" | "sm" | "xs";
|
|
55
44
|
readonly style?: string | undefined;
|
|
@@ -117,6 +106,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
117
106
|
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
118
107
|
}[];
|
|
119
108
|
} | undefined;
|
|
109
|
+
readonly validations?: readonly {
|
|
110
|
+
readonly message: readonly [{
|
|
111
|
+
readonly locale: "zh";
|
|
112
|
+
readonly message: string;
|
|
113
|
+
}, ...{
|
|
114
|
+
readonly locale: "en" | "ja" | "ko";
|
|
115
|
+
readonly message: string;
|
|
116
|
+
}[]];
|
|
117
|
+
readonly warning?: boolean | undefined;
|
|
118
|
+
readonly when: string;
|
|
119
|
+
}[] | undefined;
|
|
120
120
|
}) => any;
|
|
121
121
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
122
122
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -155,17 +155,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
155
155
|
readonly mode: "formula" | "prefill";
|
|
156
156
|
readonly expression: string;
|
|
157
157
|
} | undefined;
|
|
158
|
-
readonly validations?: readonly {
|
|
159
|
-
readonly message: readonly [{
|
|
160
|
-
readonly locale: "zh";
|
|
161
|
-
readonly message: string;
|
|
162
|
-
}, ...{
|
|
163
|
-
readonly locale: "en" | "ja" | "ko";
|
|
164
|
-
readonly message: string;
|
|
165
|
-
}[]];
|
|
166
|
-
readonly warning?: boolean | undefined;
|
|
167
|
-
readonly when: string;
|
|
168
|
-
}[] | undefined;
|
|
169
158
|
readonly addon?: {
|
|
170
159
|
readonly size: "default" | "sm" | "xs";
|
|
171
160
|
readonly style?: string | undefined;
|
|
@@ -233,6 +222,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
233
222
|
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
234
223
|
}[];
|
|
235
224
|
} | undefined;
|
|
225
|
+
readonly validations?: readonly {
|
|
226
|
+
readonly message: readonly [{
|
|
227
|
+
readonly locale: "zh";
|
|
228
|
+
readonly message: string;
|
|
229
|
+
}, ...{
|
|
230
|
+
readonly locale: "en" | "ja" | "ko";
|
|
231
|
+
readonly message: string;
|
|
232
|
+
}[]];
|
|
233
|
+
readonly warning?: boolean | undefined;
|
|
234
|
+
readonly when: string;
|
|
235
|
+
}[] | undefined;
|
|
236
236
|
}) => any) | undefined;
|
|
237
237
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
238
238
|
declare const _default: typeof __VLS_export;
|
package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts
CHANGED
|
@@ -39,17 +39,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
39
39
|
readonly mode: "formula" | "prefill";
|
|
40
40
|
readonly expression: string;
|
|
41
41
|
} | undefined;
|
|
42
|
-
readonly validations?: readonly {
|
|
43
|
-
readonly message: readonly [{
|
|
44
|
-
readonly locale: "zh";
|
|
45
|
-
readonly message: string;
|
|
46
|
-
}, ...{
|
|
47
|
-
readonly locale: "en" | "ja" | "ko";
|
|
48
|
-
readonly message: string;
|
|
49
|
-
}[]];
|
|
50
|
-
readonly warning?: boolean | undefined;
|
|
51
|
-
readonly when: string;
|
|
52
|
-
}[] | undefined;
|
|
53
42
|
readonly addon?: {
|
|
54
43
|
readonly size: "default" | "sm" | "xs";
|
|
55
44
|
readonly style?: string | undefined;
|
|
@@ -117,6 +106,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
117
106
|
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
118
107
|
}[];
|
|
119
108
|
} | undefined;
|
|
109
|
+
readonly validations?: readonly {
|
|
110
|
+
readonly message: readonly [{
|
|
111
|
+
readonly locale: "zh";
|
|
112
|
+
readonly message: string;
|
|
113
|
+
}, ...{
|
|
114
|
+
readonly locale: "en" | "ja" | "ko";
|
|
115
|
+
readonly message: string;
|
|
116
|
+
}[]];
|
|
117
|
+
readonly warning?: boolean | undefined;
|
|
118
|
+
readonly when: string;
|
|
119
|
+
}[] | undefined;
|
|
120
120
|
}) => any;
|
|
121
121
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
122
122
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -155,17 +155,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
155
155
|
readonly mode: "formula" | "prefill";
|
|
156
156
|
readonly expression: string;
|
|
157
157
|
} | undefined;
|
|
158
|
-
readonly validations?: readonly {
|
|
159
|
-
readonly message: readonly [{
|
|
160
|
-
readonly locale: "zh";
|
|
161
|
-
readonly message: string;
|
|
162
|
-
}, ...{
|
|
163
|
-
readonly locale: "en" | "ja" | "ko";
|
|
164
|
-
readonly message: string;
|
|
165
|
-
}[]];
|
|
166
|
-
readonly warning?: boolean | undefined;
|
|
167
|
-
readonly when: string;
|
|
168
|
-
}[] | undefined;
|
|
169
158
|
readonly addon?: {
|
|
170
159
|
readonly size: "default" | "sm" | "xs";
|
|
171
160
|
readonly style?: string | undefined;
|
|
@@ -233,6 +222,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
233
222
|
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
234
223
|
}[];
|
|
235
224
|
} | undefined;
|
|
225
|
+
readonly validations?: readonly {
|
|
226
|
+
readonly message: readonly [{
|
|
227
|
+
readonly locale: "zh";
|
|
228
|
+
readonly message: string;
|
|
229
|
+
}, ...{
|
|
230
|
+
readonly locale: "en" | "ja" | "ko";
|
|
231
|
+
readonly message: string;
|
|
232
|
+
}[]];
|
|
233
|
+
readonly warning?: boolean | undefined;
|
|
234
|
+
readonly when: string;
|
|
235
|
+
}[] | undefined;
|
|
236
236
|
}) => any) | undefined;
|
|
237
237
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
238
238
|
declare const _default: typeof __VLS_export;
|
|
@@ -39,7 +39,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
39
39
|
readonly mode: "formula" | "prefill";
|
|
40
40
|
readonly expression: string;
|
|
41
41
|
} | undefined;
|
|
42
|
-
readonly maxLength?: number | undefined;
|
|
43
42
|
readonly validations?: readonly {
|
|
44
43
|
readonly message: readonly [{
|
|
45
44
|
readonly locale: "zh";
|
|
@@ -51,6 +50,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
51
50
|
readonly warning?: boolean | undefined;
|
|
52
51
|
readonly when: string;
|
|
53
52
|
}[] | undefined;
|
|
53
|
+
readonly maxLength?: number | undefined;
|
|
54
54
|
}) => any;
|
|
55
55
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
56
56
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -89,7 +89,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
89
89
|
readonly mode: "formula" | "prefill";
|
|
90
90
|
readonly expression: string;
|
|
91
91
|
} | undefined;
|
|
92
|
-
readonly maxLength?: number | undefined;
|
|
93
92
|
readonly validations?: readonly {
|
|
94
93
|
readonly message: readonly [{
|
|
95
94
|
readonly locale: "zh";
|
|
@@ -101,6 +100,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
101
100
|
readonly warning?: boolean | undefined;
|
|
102
101
|
readonly when: string;
|
|
103
102
|
}[] | undefined;
|
|
103
|
+
readonly maxLength?: number | undefined;
|
|
104
104
|
}) => any) | undefined;
|
|
105
105
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
106
106
|
declare const _default: typeof __VLS_export;
|
|
@@ -39,7 +39,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
39
39
|
readonly mode: "formula" | "prefill";
|
|
40
40
|
readonly expression: string;
|
|
41
41
|
} | undefined;
|
|
42
|
-
readonly maxLength?: number | undefined;
|
|
43
42
|
readonly validations?: readonly {
|
|
44
43
|
readonly message: readonly [{
|
|
45
44
|
readonly locale: "zh";
|
|
@@ -51,6 +50,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
51
50
|
readonly warning?: boolean | undefined;
|
|
52
51
|
readonly when: string;
|
|
53
52
|
}[] | undefined;
|
|
53
|
+
readonly maxLength?: number | undefined;
|
|
54
54
|
}) => any;
|
|
55
55
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
56
56
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -89,7 +89,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
89
89
|
readonly mode: "formula" | "prefill";
|
|
90
90
|
readonly expression: string;
|
|
91
91
|
} | undefined;
|
|
92
|
-
readonly maxLength?: number | undefined;
|
|
93
92
|
readonly validations?: readonly {
|
|
94
93
|
readonly message: readonly [{
|
|
95
94
|
readonly locale: "zh";
|
|
@@ -101,6 +100,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
101
100
|
readonly warning?: boolean | undefined;
|
|
102
101
|
readonly when: string;
|
|
103
102
|
}[] | undefined;
|
|
103
|
+
readonly maxLength?: number | undefined;
|
|
104
104
|
}) => any) | undefined;
|
|
105
105
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
106
106
|
declare const _default: typeof __VLS_export;
|
package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts
CHANGED
|
@@ -42,17 +42,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
42
42
|
readonly mode: "formula" | "prefill";
|
|
43
43
|
readonly expression: string;
|
|
44
44
|
} | undefined;
|
|
45
|
-
readonly validations?: readonly {
|
|
46
|
-
readonly message: readonly [{
|
|
47
|
-
readonly locale: "zh";
|
|
48
|
-
readonly message: string;
|
|
49
|
-
}, ...{
|
|
50
|
-
readonly locale: "en" | "ja" | "ko";
|
|
51
|
-
readonly message: string;
|
|
52
|
-
}[]];
|
|
53
|
-
readonly warning?: boolean | undefined;
|
|
54
|
-
readonly when: string;
|
|
55
|
-
}[] | undefined;
|
|
56
45
|
readonly addon?: {
|
|
57
46
|
readonly size: "default" | "sm" | "xs";
|
|
58
47
|
readonly style?: string | undefined;
|
|
@@ -120,6 +109,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
120
109
|
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
121
110
|
}[];
|
|
122
111
|
} | undefined;
|
|
112
|
+
readonly validations?: readonly {
|
|
113
|
+
readonly message: readonly [{
|
|
114
|
+
readonly locale: "zh";
|
|
115
|
+
readonly message: string;
|
|
116
|
+
}, ...{
|
|
117
|
+
readonly locale: "en" | "ja" | "ko";
|
|
118
|
+
readonly message: string;
|
|
119
|
+
}[]];
|
|
120
|
+
readonly warning?: boolean | undefined;
|
|
121
|
+
readonly when: string;
|
|
122
|
+
}[] | undefined;
|
|
123
123
|
readonly precision?: number | undefined;
|
|
124
124
|
readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
|
|
125
125
|
readonly valueAsString?: boolean | undefined;
|
|
@@ -165,17 +165,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
165
165
|
readonly mode: "formula" | "prefill";
|
|
166
166
|
readonly expression: string;
|
|
167
167
|
} | undefined;
|
|
168
|
-
readonly validations?: readonly {
|
|
169
|
-
readonly message: readonly [{
|
|
170
|
-
readonly locale: "zh";
|
|
171
|
-
readonly message: string;
|
|
172
|
-
}, ...{
|
|
173
|
-
readonly locale: "en" | "ja" | "ko";
|
|
174
|
-
readonly message: string;
|
|
175
|
-
}[]];
|
|
176
|
-
readonly warning?: boolean | undefined;
|
|
177
|
-
readonly when: string;
|
|
178
|
-
}[] | undefined;
|
|
179
168
|
readonly addon?: {
|
|
180
169
|
readonly size: "default" | "sm" | "xs";
|
|
181
170
|
readonly style?: string | undefined;
|
|
@@ -243,6 +232,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
243
232
|
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
244
233
|
}[];
|
|
245
234
|
} | undefined;
|
|
235
|
+
readonly validations?: readonly {
|
|
236
|
+
readonly message: readonly [{
|
|
237
|
+
readonly locale: "zh";
|
|
238
|
+
readonly message: string;
|
|
239
|
+
}, ...{
|
|
240
|
+
readonly locale: "en" | "ja" | "ko";
|
|
241
|
+
readonly message: string;
|
|
242
|
+
}[]];
|
|
243
|
+
readonly warning?: boolean | undefined;
|
|
244
|
+
readonly when: string;
|
|
245
|
+
}[] | undefined;
|
|
246
246
|
readonly precision?: number | undefined;
|
|
247
247
|
readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
|
|
248
248
|
readonly valueAsString?: boolean | undefined;
|
package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts
CHANGED
|
@@ -42,17 +42,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
42
42
|
readonly mode: "formula" | "prefill";
|
|
43
43
|
readonly expression: string;
|
|
44
44
|
} | undefined;
|
|
45
|
-
readonly validations?: readonly {
|
|
46
|
-
readonly message: readonly [{
|
|
47
|
-
readonly locale: "zh";
|
|
48
|
-
readonly message: string;
|
|
49
|
-
}, ...{
|
|
50
|
-
readonly locale: "en" | "ja" | "ko";
|
|
51
|
-
readonly message: string;
|
|
52
|
-
}[]];
|
|
53
|
-
readonly warning?: boolean | undefined;
|
|
54
|
-
readonly when: string;
|
|
55
|
-
}[] | undefined;
|
|
56
45
|
readonly addon?: {
|
|
57
46
|
readonly size: "default" | "sm" | "xs";
|
|
58
47
|
readonly style?: string | undefined;
|
|
@@ -120,6 +109,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
120
109
|
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
121
110
|
}[];
|
|
122
111
|
} | undefined;
|
|
112
|
+
readonly validations?: readonly {
|
|
113
|
+
readonly message: readonly [{
|
|
114
|
+
readonly locale: "zh";
|
|
115
|
+
readonly message: string;
|
|
116
|
+
}, ...{
|
|
117
|
+
readonly locale: "en" | "ja" | "ko";
|
|
118
|
+
readonly message: string;
|
|
119
|
+
}[]];
|
|
120
|
+
readonly warning?: boolean | undefined;
|
|
121
|
+
readonly when: string;
|
|
122
|
+
}[] | undefined;
|
|
123
123
|
readonly precision?: number | undefined;
|
|
124
124
|
readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
|
|
125
125
|
readonly valueAsString?: boolean | undefined;
|
|
@@ -165,17 +165,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
165
165
|
readonly mode: "formula" | "prefill";
|
|
166
166
|
readonly expression: string;
|
|
167
167
|
} | undefined;
|
|
168
|
-
readonly validations?: readonly {
|
|
169
|
-
readonly message: readonly [{
|
|
170
|
-
readonly locale: "zh";
|
|
171
|
-
readonly message: string;
|
|
172
|
-
}, ...{
|
|
173
|
-
readonly locale: "en" | "ja" | "ko";
|
|
174
|
-
readonly message: string;
|
|
175
|
-
}[]];
|
|
176
|
-
readonly warning?: boolean | undefined;
|
|
177
|
-
readonly when: string;
|
|
178
|
-
}[] | undefined;
|
|
179
168
|
readonly addon?: {
|
|
180
169
|
readonly size: "default" | "sm" | "xs";
|
|
181
170
|
readonly style?: string | undefined;
|
|
@@ -243,6 +232,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
243
232
|
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
244
233
|
}[];
|
|
245
234
|
} | undefined;
|
|
235
|
+
readonly validations?: readonly {
|
|
236
|
+
readonly message: readonly [{
|
|
237
|
+
readonly locale: "zh";
|
|
238
|
+
readonly message: string;
|
|
239
|
+
}, ...{
|
|
240
|
+
readonly locale: "en" | "ja" | "ko";
|
|
241
|
+
readonly message: string;
|
|
242
|
+
}[]];
|
|
243
|
+
readonly warning?: boolean | undefined;
|
|
244
|
+
readonly when: string;
|
|
245
|
+
}[] | undefined;
|
|
246
246
|
readonly precision?: number | undefined;
|
|
247
247
|
readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
|
|
248
248
|
readonly valueAsString?: boolean | undefined;
|
|
@@ -63,23 +63,25 @@ function isEmptyValue(value) {
|
|
|
63
63
|
export function useFieldValidation(options) {
|
|
64
64
|
const { getAt, dirty } = useFormState();
|
|
65
65
|
const provider = useValidationProvider();
|
|
66
|
-
function evalBool(expression) {
|
|
66
|
+
function evalBool(expression, label) {
|
|
67
67
|
if (!expression) return false;
|
|
68
68
|
try {
|
|
69
69
|
return Effect.runSync(options.$cel(expression));
|
|
70
|
-
} catch {
|
|
70
|
+
} catch (err) {
|
|
71
|
+
console.error(`[shwfed-form] failed to evaluate ${label} for ${options.fieldId()}:`, err);
|
|
71
72
|
return false;
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
|
-
const isRequired = computed(() => evalBool(options.config().required));
|
|
75
|
-
function resolveMessage(message) {
|
|
75
|
+
const isRequired = computed(() => evalBool(options.config().required, "required"));
|
|
76
|
+
function resolveMessage(message, label) {
|
|
76
77
|
const template = getLocalizedText(message, options.locale()) ?? "";
|
|
77
78
|
if (!template) return "";
|
|
78
79
|
return interpolate(template, (expression) => {
|
|
79
80
|
try {
|
|
80
81
|
const out = Effect.runSync(options.$cel(expression));
|
|
81
82
|
return out == null ? "" : String(out);
|
|
82
|
-
} catch {
|
|
83
|
+
} catch (err) {
|
|
84
|
+
console.error(`[shwfed-form] failed to interpolate ${label} for ${options.fieldId()}:`, err);
|
|
83
85
|
return "";
|
|
84
86
|
}
|
|
85
87
|
});
|
|
@@ -92,9 +94,9 @@ export function useFieldValidation(options) {
|
|
|
92
94
|
}
|
|
93
95
|
const rules = config.validations ?? [];
|
|
94
96
|
rules.forEach((rule, ruleIndex) => {
|
|
95
|
-
if (!evalBool(rule.when)) return;
|
|
97
|
+
if (!evalBool(rule.when, `validations[${ruleIndex}].when`)) return;
|
|
96
98
|
const severity = rule.warning ? "warning" : "error";
|
|
97
|
-
out.push({ severity, message: resolveMessage(rule.message), ruleIndex });
|
|
99
|
+
out.push({ severity, message: resolveMessage(rule.message, `validations[${ruleIndex}].message`), ruleIndex });
|
|
98
100
|
});
|
|
99
101
|
return out;
|
|
100
102
|
});
|
|
@@ -53,9 +53,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
53
53
|
readonly locale: "en" | "ja" | "ko";
|
|
54
54
|
readonly message: string;
|
|
55
55
|
}[]];
|
|
56
|
+
readonly successMessage?: string | undefined;
|
|
56
57
|
readonly accessor?: string | undefined;
|
|
57
58
|
readonly sortKey?: string | undefined;
|
|
58
|
-
readonly successMessage?: string | undefined;
|
|
59
59
|
}) => any;
|
|
60
60
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
61
61
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -108,9 +108,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
108
108
|
readonly locale: "en" | "ja" | "ko";
|
|
109
109
|
readonly message: string;
|
|
110
110
|
}[]];
|
|
111
|
+
readonly successMessage?: string | undefined;
|
|
111
112
|
readonly accessor?: string | undefined;
|
|
112
113
|
readonly sortKey?: string | undefined;
|
|
113
|
-
readonly successMessage?: string | undefined;
|
|
114
114
|
}) => any) | undefined;
|
|
115
115
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
116
116
|
declare const _default: typeof __VLS_export;
|
|
@@ -53,9 +53,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
53
53
|
readonly locale: "en" | "ja" | "ko";
|
|
54
54
|
readonly message: string;
|
|
55
55
|
}[]];
|
|
56
|
+
readonly successMessage?: string | undefined;
|
|
56
57
|
readonly accessor?: string | undefined;
|
|
57
58
|
readonly sortKey?: string | undefined;
|
|
58
|
-
readonly successMessage?: string | undefined;
|
|
59
59
|
}) => any;
|
|
60
60
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
61
61
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -108,9 +108,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
108
108
|
readonly locale: "en" | "ja" | "ko";
|
|
109
109
|
readonly message: string;
|
|
110
110
|
}[]];
|
|
111
|
+
readonly successMessage?: string | undefined;
|
|
111
112
|
readonly accessor?: string | undefined;
|
|
112
113
|
readonly sortKey?: string | undefined;
|
|
113
|
-
readonly successMessage?: string | undefined;
|
|
114
114
|
}) => any) | undefined;
|
|
115
115
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
116
116
|
declare const _default: typeof __VLS_export;
|
|
@@ -67,9 +67,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
67
67
|
}[]] | undefined;
|
|
68
68
|
readonly readonly?: string | undefined;
|
|
69
69
|
readonly enableSorting?: boolean | undefined;
|
|
70
|
+
readonly successMessage?: string | undefined;
|
|
70
71
|
readonly accessor?: string | undefined;
|
|
71
72
|
readonly sortKey?: string | undefined;
|
|
72
|
-
readonly successMessage?: string | undefined;
|
|
73
73
|
}) => any;
|
|
74
74
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
75
75
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -136,9 +136,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
136
136
|
}[]] | undefined;
|
|
137
137
|
readonly readonly?: string | undefined;
|
|
138
138
|
readonly enableSorting?: boolean | undefined;
|
|
139
|
+
readonly successMessage?: string | undefined;
|
|
139
140
|
readonly accessor?: string | undefined;
|
|
140
141
|
readonly sortKey?: string | undefined;
|
|
141
|
-
readonly successMessage?: string | undefined;
|
|
142
142
|
}) => any) | undefined;
|
|
143
143
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
144
144
|
declare const _default: typeof __VLS_export;
|