@shwfed/config 2.12.6 → 2.12.7

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.
Files changed (70) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +68 -68
  3. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +68 -68
  4. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +68 -68
  5. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +68 -68
  6. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +34 -34
  7. package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/runtime.vue +54 -50
  8. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +6 -6
  9. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +6 -6
  10. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +8 -8
  11. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +8 -8
  12. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +2 -2
  13. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +2 -2
  14. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +2 -0
  15. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue +38 -0
  16. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +2 -0
  17. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/runtime.vue +11 -2
  18. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +3 -0
  19. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.js +7 -0
  20. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +6 -6
  21. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +6 -6
  22. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/runtime.vue +6 -73
  23. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/config.vue +44 -0
  24. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/runtime.vue +8 -2
  25. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.d.ts +3 -0
  26. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.js +7 -0
  27. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -2
  28. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -2
  29. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -2
  30. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -2
  31. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -2
  32. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -2
  33. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -2
  34. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -2
  35. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -2
  36. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -2
  37. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -2
  38. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -2
  39. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -2
  40. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -2
  41. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
  42. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -2
  43. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
  44. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
  45. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
  46. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
  47. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -2
  48. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -2
  49. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
  50. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -2
  51. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
  52. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
  53. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
  54. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
  55. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -2
  56. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -2
  57. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
  58. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -2
  59. package/dist/runtime/components/table/schema.d.ts +68 -68
  60. package/dist/runtime/components/ui/date-picker/DatePickerInput.d.vue.ts +1 -1
  61. package/dist/runtime/components/ui/date-picker/DatePickerInput.vue.d.ts +1 -1
  62. package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.d.vue.ts +1 -1
  63. package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.vue.d.ts +1 -1
  64. package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.d.vue.ts +1 -1
  65. package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue.d.ts +1 -1
  66. package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.d.vue.ts +2 -2
  67. package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.vue.d.ts +2 -2
  68. package/dist/runtime/share/number-format.d.ts +7 -0
  69. package/dist/runtime/share/number-format.js +72 -0
  70. package/package.json +1 -1
@@ -47,6 +47,40 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
47
47
  readonly message: string;
48
48
  }[]] | undefined;
49
49
  }[];
50
+ readonly query?: {
51
+ readonly style?: string | undefined;
52
+ readonly id?: string | undefined;
53
+ readonly initial?: {
54
+ readonly data: string;
55
+ readonly request?: string | undefined;
56
+ } | undefined;
57
+ readonly displayName?: string | undefined;
58
+ readonly kind: "shwfed.component.form";
59
+ readonly fields: readonly any[];
60
+ readonly layouts: readonly {
61
+ readonly name: string;
62
+ readonly layout: {
63
+ readonly style?: string | undefined;
64
+ readonly columns: number;
65
+ readonly gap?: number | undefined;
66
+ readonly rows?: number | undefined;
67
+ readonly placements: {
68
+ readonly [x: string]: {
69
+ readonly area: readonly [readonly [number, number], readonly [number, number]];
70
+ readonly v?: "stretch" | "center" | "end" | "start" | undefined;
71
+ readonly h?: "stretch" | "center" | "end" | "start" | undefined;
72
+ };
73
+ };
74
+ };
75
+ readonly media?: string | undefined;
76
+ }[];
77
+ readonly readonly?: string | undefined;
78
+ } | undefined;
79
+ readonly dataSource?: {
80
+ readonly data: string;
81
+ readonly total?: string | undefined;
82
+ readonly request?: string | undefined;
83
+ } | undefined;
50
84
  readonly actions?: {
51
85
  readonly size: "default" | "sm" | "xs";
52
86
  readonly style?: string | undefined;
@@ -114,40 +148,6 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
114
148
  readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
115
149
  }[];
116
150
  } | undefined;
117
- readonly query?: {
118
- readonly style?: string | undefined;
119
- readonly id?: string | undefined;
120
- readonly initial?: {
121
- readonly data: string;
122
- readonly request?: string | undefined;
123
- } | undefined;
124
- readonly displayName?: string | undefined;
125
- readonly kind: "shwfed.component.form";
126
- readonly fields: readonly any[];
127
- readonly layouts: readonly {
128
- readonly name: string;
129
- readonly layout: {
130
- readonly style?: string | undefined;
131
- readonly columns: number;
132
- readonly gap?: number | undefined;
133
- readonly rows?: number | undefined;
134
- readonly placements: {
135
- readonly [x: string]: {
136
- readonly area: readonly [readonly [number, number], readonly [number, number]];
137
- readonly v?: "stretch" | "center" | "end" | "start" | undefined;
138
- readonly h?: "stretch" | "center" | "end" | "start" | undefined;
139
- };
140
- };
141
- };
142
- readonly media?: string | undefined;
143
- }[];
144
- readonly readonly?: string | undefined;
145
- } | undefined;
146
- readonly dataSource?: {
147
- readonly data: string;
148
- readonly total?: string | undefined;
149
- readonly request?: string | undefined;
150
- } | undefined;
151
151
  readonly bottomActions?: {
152
152
  readonly size: "default" | "sm" | "xs";
153
153
  readonly style?: string | undefined;
@@ -13,6 +13,7 @@ import { getLocalizedText } from "../../../../../share/locale";
13
13
  import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "../../../../ui/input-group";
14
14
  import { Field, FieldLabel } from "../../../../ui/field";
15
15
  import { Markdown } from "../../../../ui/markdown";
16
+ import { ScrollArea } from "../../../../ui/scroll-area";
16
17
  import { Skeleton } from "../../../../ui/skeleton";
17
18
  import { Tree as UiTree } from "../../../../ui/tree";
18
19
  import { interpolateMarkdown } from "../../../../table/utils/runtime";
@@ -280,60 +281,63 @@ const hasNodeActions = computed(() => block.value.nodeActions.items.length > 0);
280
281
  <Skeleton class="h-6 w-2/5" />
281
282
  </div>
282
283
 
283
- <UiTree
284
+ <ScrollArea
284
285
  v-else
285
- v-model="model"
286
- :roots="roots"
287
- :get-key="getKey"
288
- :get-children="getChildren"
289
- selection-mode="single"
290
- select-cursor="default"
291
- single-toggle
292
- :selectable="nodeSelectable"
293
- :filter-predicate="filterPredicate"
294
- :filter-query="filterQuery"
295
- :initial-expanded="initialExpanded"
296
- class="min-h-0 flex-1 overflow-auto"
286
+ class="min-h-0 flex-1"
297
287
  >
298
- <template #node="{ node }">
299
- <!-- Selection is conveyed solely by the row highlight (UiTree paints
300
- the selected row's background) — no explicit radio glyph. -->
301
- <span class="flex flex-col gap-0.5">
302
- <Markdown
303
- :source="nodeLabelText(node)"
304
- class="prose prose-sm prose-zinc text-zinc-700"
305
- />
306
- <Markdown
307
- v-if="nodeTooltipText(node)"
308
- :source="nodeTooltipText(node)"
309
- block
310
- class="prose prose-xs prose-zinc text-zinc-400"
311
- />
312
- </span>
313
- </template>
314
-
315
- <template
316
- v-if="hasNodeActions"
317
- #actions="{ node }"
288
+ <UiTree
289
+ v-model="model"
290
+ :roots="roots"
291
+ :get-key="getKey"
292
+ :get-children="getChildren"
293
+ selection-mode="single"
294
+ select-cursor="default"
295
+ single-toggle
296
+ :selectable="nodeSelectable"
297
+ :filter-predicate="filterPredicate"
298
+ :filter-query="filterQuery"
299
+ :initial-expanded="initialExpanded"
318
300
  >
319
- <!-- Hover/focus-revealed: hidden by default, fades in when the row
320
- (which carries `group`) is hovered or an action button is focused.
321
- `pointer-events-none` while hidden so the invisible buttons don't
322
- swallow row clicks. -->
323
- <span
324
- class="opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-hover:pointer-events-auto focus-within:opacity-100 focus-within:pointer-events-auto pointer-events-none"
301
+ <template #node="{ node }">
302
+ <!-- Selection is conveyed solely by the row highlight (UiTree paints
303
+ the selected row's background) no explicit radio glyph. -->
304
+ <span class="flex flex-col gap-0.5">
305
+ <Markdown
306
+ :source="nodeLabelText(node)"
307
+ class="prose prose-sm prose-zinc text-zinc-700"
308
+ />
309
+ <Markdown
310
+ v-if="nodeTooltipText(node)"
311
+ :source="nodeTooltipText(node)"
312
+ block
313
+ class="prose prose-xs prose-zinc text-zinc-400"
314
+ />
315
+ </span>
316
+ </template>
317
+
318
+ <template
319
+ v-if="hasNodeActions"
320
+ #actions="{ node }"
325
321
  >
326
- <NodeActions
327
- :node="node"
328
- :config="block.nodeActions"
329
- :configure="configure"
330
- />
331
- </span>
332
- </template>
322
+ <!-- Hover/focus-revealed: hidden by default, fades in when the row
323
+ (which carries `group`) is hovered or an action button is focused.
324
+ `pointer-events-none` while hidden so the invisible buttons don't
325
+ swallow row clicks. -->
326
+ <span
327
+ class="opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-hover:pointer-events-auto focus-within:opacity-100 focus-within:pointer-events-auto pointer-events-none"
328
+ >
329
+ <NodeActions
330
+ :node="node"
331
+ :config="block.nodeActions"
332
+ :configure="configure"
333
+ />
334
+ </span>
335
+ </template>
333
336
 
334
- <template #empty>
335
- <span />
336
- </template>
337
- </UiTree>
337
+ <template #empty>
338
+ <span />
339
+ </template>
340
+ </UiTree>
341
+ </ScrollArea>
338
342
  </div>
339
343
  </template>
@@ -33,10 +33,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
33
33
  readonly expression: string;
34
34
  } | undefined;
35
35
  readonly numberOfMonths?: number | undefined;
36
- readonly format?: string | undefined;
37
- readonly valueFormat?: string | undefined;
38
- readonly disabledDate?: string | undefined;
39
36
  readonly rangeSeparatorIcon?: string | undefined;
37
+ readonly format?: string | undefined;
40
38
  readonly startPlaceholder?: readonly [{
41
39
  readonly locale: "zh";
42
40
  readonly message: string;
@@ -51,6 +49,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
51
49
  readonly locale: "en" | "ja" | "ko";
52
50
  readonly message: string;
53
51
  }[]] | undefined;
52
+ readonly valueFormat?: string | undefined;
53
+ readonly disabledDate?: string | undefined;
54
54
  readonly validations?: readonly {
55
55
  readonly message: readonly [{
56
56
  readonly locale: "zh";
@@ -106,10 +106,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
106
106
  readonly expression: string;
107
107
  } | undefined;
108
108
  readonly numberOfMonths?: number | undefined;
109
- readonly format?: string | undefined;
110
- readonly valueFormat?: string | undefined;
111
- readonly disabledDate?: string | undefined;
112
109
  readonly rangeSeparatorIcon?: string | undefined;
110
+ readonly format?: string | undefined;
113
111
  readonly startPlaceholder?: readonly [{
114
112
  readonly locale: "zh";
115
113
  readonly message: string;
@@ -124,6 +122,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
124
122
  readonly locale: "en" | "ja" | "ko";
125
123
  readonly message: string;
126
124
  }[]] | undefined;
125
+ readonly valueFormat?: string | undefined;
126
+ readonly disabledDate?: string | undefined;
127
127
  readonly validations?: readonly {
128
128
  readonly message: readonly [{
129
129
  readonly locale: "zh";
@@ -33,10 +33,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
33
33
  readonly expression: string;
34
34
  } | undefined;
35
35
  readonly numberOfMonths?: number | undefined;
36
- readonly format?: string | undefined;
37
- readonly valueFormat?: string | undefined;
38
- readonly disabledDate?: string | undefined;
39
36
  readonly rangeSeparatorIcon?: string | undefined;
37
+ readonly format?: string | undefined;
40
38
  readonly startPlaceholder?: readonly [{
41
39
  readonly locale: "zh";
42
40
  readonly message: string;
@@ -51,6 +49,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
51
49
  readonly locale: "en" | "ja" | "ko";
52
50
  readonly message: string;
53
51
  }[]] | undefined;
52
+ readonly valueFormat?: string | undefined;
53
+ readonly disabledDate?: string | undefined;
54
54
  readonly validations?: readonly {
55
55
  readonly message: readonly [{
56
56
  readonly locale: "zh";
@@ -106,10 +106,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
106
106
  readonly expression: string;
107
107
  } | undefined;
108
108
  readonly numberOfMonths?: number | undefined;
109
- readonly format?: string | undefined;
110
- readonly valueFormat?: string | undefined;
111
- readonly disabledDate?: string | undefined;
112
109
  readonly rangeSeparatorIcon?: string | undefined;
110
+ readonly format?: string | undefined;
113
111
  readonly startPlaceholder?: readonly [{
114
112
  readonly locale: "zh";
115
113
  readonly message: string;
@@ -124,6 +122,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
124
122
  readonly locale: "en" | "ja" | "ko";
125
123
  readonly message: string;
126
124
  }[]] | undefined;
125
+ readonly valueFormat?: string | undefined;
126
+ readonly disabledDate?: string | undefined;
127
127
  readonly validations?: readonly {
128
128
  readonly message: readonly [{
129
129
  readonly locale: "zh";
@@ -34,11 +34,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
34
34
  } | undefined;
35
35
  readonly numberOfMonths?: number | undefined;
36
36
  readonly hourCycle?: 12 | 24 | undefined;
37
- readonly format?: string | undefined;
38
- readonly valueFormat?: string | undefined;
39
- readonly disabledDate?: string | undefined;
40
- readonly timeGranularity?: "second" | "minute" | "hour" | undefined;
41
37
  readonly rangeSeparatorIcon?: string | undefined;
38
+ readonly format?: string | undefined;
42
39
  readonly startPlaceholder?: readonly [{
43
40
  readonly locale: "zh";
44
41
  readonly message: string;
@@ -53,6 +50,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
53
50
  readonly locale: "en" | "ja" | "ko";
54
51
  readonly message: string;
55
52
  }[]] | undefined;
53
+ readonly valueFormat?: string | undefined;
54
+ readonly disabledDate?: string | undefined;
55
+ readonly timeGranularity?: "second" | "minute" | "hour" | undefined;
56
56
  readonly validations?: readonly {
57
57
  readonly message: readonly [{
58
58
  readonly locale: "zh";
@@ -109,11 +109,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
109
109
  } | undefined;
110
110
  readonly numberOfMonths?: number | undefined;
111
111
  readonly hourCycle?: 12 | 24 | undefined;
112
- readonly format?: string | undefined;
113
- readonly valueFormat?: string | undefined;
114
- readonly disabledDate?: string | undefined;
115
- readonly timeGranularity?: "second" | "minute" | "hour" | undefined;
116
112
  readonly rangeSeparatorIcon?: string | undefined;
113
+ readonly format?: string | undefined;
117
114
  readonly startPlaceholder?: readonly [{
118
115
  readonly locale: "zh";
119
116
  readonly message: string;
@@ -128,6 +125,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
128
125
  readonly locale: "en" | "ja" | "ko";
129
126
  readonly message: string;
130
127
  }[]] | undefined;
128
+ readonly valueFormat?: string | undefined;
129
+ readonly disabledDate?: string | undefined;
130
+ readonly timeGranularity?: "second" | "minute" | "hour" | undefined;
131
131
  readonly validations?: readonly {
132
132
  readonly message: readonly [{
133
133
  readonly locale: "zh";
@@ -34,11 +34,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
34
34
  } | undefined;
35
35
  readonly numberOfMonths?: number | undefined;
36
36
  readonly hourCycle?: 12 | 24 | undefined;
37
- readonly format?: string | undefined;
38
- readonly valueFormat?: string | undefined;
39
- readonly disabledDate?: string | undefined;
40
- readonly timeGranularity?: "second" | "minute" | "hour" | undefined;
41
37
  readonly rangeSeparatorIcon?: string | undefined;
38
+ readonly format?: string | undefined;
42
39
  readonly startPlaceholder?: readonly [{
43
40
  readonly locale: "zh";
44
41
  readonly message: string;
@@ -53,6 +50,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
53
50
  readonly locale: "en" | "ja" | "ko";
54
51
  readonly message: string;
55
52
  }[]] | undefined;
53
+ readonly valueFormat?: string | undefined;
54
+ readonly disabledDate?: string | undefined;
55
+ readonly timeGranularity?: "second" | "minute" | "hour" | undefined;
56
56
  readonly validations?: readonly {
57
57
  readonly message: readonly [{
58
58
  readonly locale: "zh";
@@ -109,11 +109,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
109
109
  } | undefined;
110
110
  readonly numberOfMonths?: number | undefined;
111
111
  readonly hourCycle?: 12 | 24 | undefined;
112
- readonly format?: string | undefined;
113
- readonly valueFormat?: string | undefined;
114
- readonly disabledDate?: string | undefined;
115
- readonly timeGranularity?: "second" | "minute" | "hour" | undefined;
116
112
  readonly rangeSeparatorIcon?: string | undefined;
113
+ readonly format?: string | undefined;
117
114
  readonly startPlaceholder?: readonly [{
118
115
  readonly locale: "zh";
119
116
  readonly message: string;
@@ -128,6 +125,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
128
125
  readonly locale: "en" | "ja" | "ko";
129
126
  readonly message: string;
130
127
  }[]] | undefined;
128
+ readonly valueFormat?: string | undefined;
129
+ readonly disabledDate?: string | undefined;
130
+ readonly timeGranularity?: "second" | "minute" | "hour" | undefined;
131
131
  readonly validations?: readonly {
132
132
  readonly message: readonly [{
133
133
  readonly locale: "zh";
@@ -33,9 +33,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
33
33
  readonly expression: string;
34
34
  } | undefined;
35
35
  readonly hourCycle?: 12 | 24 | undefined;
36
+ readonly rangeSeparatorIcon?: string | undefined;
36
37
  readonly valueFormat?: string | undefined;
37
38
  readonly timeGranularity?: "second" | "minute" | "hour" | undefined;
38
- readonly rangeSeparatorIcon?: string | undefined;
39
39
  readonly validations?: readonly {
40
40
  readonly message: readonly [{
41
41
  readonly locale: "zh";
@@ -79,9 +79,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
79
79
  readonly expression: string;
80
80
  } | undefined;
81
81
  readonly hourCycle?: 12 | 24 | undefined;
82
+ readonly rangeSeparatorIcon?: string | undefined;
82
83
  readonly valueFormat?: string | undefined;
83
84
  readonly timeGranularity?: "second" | "minute" | "hour" | undefined;
84
- readonly rangeSeparatorIcon?: string | undefined;
85
85
  readonly validations?: readonly {
86
86
  readonly message: readonly [{
87
87
  readonly locale: "zh";
@@ -33,9 +33,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
33
33
  readonly expression: string;
34
34
  } | undefined;
35
35
  readonly hourCycle?: 12 | 24 | undefined;
36
+ readonly rangeSeparatorIcon?: string | undefined;
36
37
  readonly valueFormat?: string | undefined;
37
38
  readonly timeGranularity?: "second" | "minute" | "hour" | undefined;
38
- readonly rangeSeparatorIcon?: string | undefined;
39
39
  readonly validations?: readonly {
40
40
  readonly message: readonly [{
41
41
  readonly locale: "zh";
@@ -79,9 +79,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
79
79
  readonly expression: string;
80
80
  } | undefined;
81
81
  readonly hourCycle?: 12 | 24 | undefined;
82
+ readonly rangeSeparatorIcon?: string | undefined;
82
83
  readonly valueFormat?: string | undefined;
83
84
  readonly timeGranularity?: "second" | "minute" | "hour" | undefined;
84
- readonly rangeSeparatorIcon?: string | undefined;
85
85
  readonly validations?: readonly {
86
86
  readonly message: readonly [{
87
87
  readonly locale: "zh";
@@ -123,6 +123,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
123
123
  readonly precision?: number | undefined;
124
124
  readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
125
125
  readonly valueAsString?: boolean | undefined;
126
+ readonly displayMode: "plain" | "uppercaseChinese" | "monoThousand";
126
127
  }) => any;
127
128
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
128
129
  "onUpdate:modelValue"?: ((value: {
@@ -245,6 +246,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
245
246
  readonly precision?: number | undefined;
246
247
  readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
247
248
  readonly valueAsString?: boolean | undefined;
249
+ readonly displayMode: "plain" | "uppercaseChinese" | "monoThousand";
248
250
  }) => any) | undefined;
249
251
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
250
252
  declare const _default: typeof __VLS_export;
@@ -87,6 +87,11 @@ const ROUNDING_MODE_OPTIONS = [
87
87
  { value: "floor", label: "\u5411\u4E0B\u53D6\u6574" },
88
88
  { value: "ceil", label: "\u5411\u4E0A\u53D6\u6574" }
89
89
  ];
90
+ const DISPLAY_MODE_OPTIONS = [
91
+ { value: "plain", label: "\u6570\u503C" },
92
+ { value: "uppercaseChinese", label: "\u4E2D\u6587\u5927\u5199" },
93
+ { value: "monoThousand", label: "\u7B49\u5BBD\u5B57\u4F53\u52A0\u5343\u5206\u4F4D" }
94
+ ];
90
95
  const pathText = computed({
91
96
  get: () => value.value.binding ?? "",
92
97
  set: (next) => {
@@ -364,6 +369,39 @@ function onValueAsStringChange(next) {
364
369
  </Field>
365
370
  </div>
366
371
 
372
+ <Field orientation="vertical">
373
+ <FieldLabel class="text-xs text-zinc-500">
374
+ <template
375
+ v-if="fieldDescription('displayMode')"
376
+ #tooltip
377
+ >
378
+ <Markdown
379
+ :source="fieldDescription('displayMode')"
380
+ block
381
+ class="prose prose-sm prose-zinc"
382
+ />
383
+ </template>
384
+ {{ fieldTitle("displayMode") }}
385
+ </FieldLabel>
386
+ <Select
387
+ :model-value="value.displayMode ?? 'plain'"
388
+ @update:model-value="(v) => value = { ...value, displayMode: v }"
389
+ >
390
+ <SelectTrigger class="w-full">
391
+ <SelectValue />
392
+ </SelectTrigger>
393
+ <SelectContent>
394
+ <SelectItem
395
+ v-for="opt in DISPLAY_MODE_OPTIONS"
396
+ :key="opt.value"
397
+ :value="opt.value"
398
+ >
399
+ {{ opt.label }}
400
+ </SelectItem>
401
+ </SelectContent>
402
+ </Select>
403
+ </Field>
404
+
367
405
  <Field orientation="vertical">
368
406
  <FieldLabel class="text-xs text-zinc-500">
369
407
  <template
@@ -123,6 +123,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
123
123
  readonly precision?: number | undefined;
124
124
  readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
125
125
  readonly valueAsString?: boolean | undefined;
126
+ readonly displayMode: "plain" | "uppercaseChinese" | "monoThousand";
126
127
  }) => any;
127
128
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
128
129
  "onUpdate:modelValue"?: ((value: {
@@ -245,6 +246,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
245
246
  readonly precision?: number | undefined;
246
247
  readonly roundingMode?: "round" | "floor" | "ceil" | undefined;
247
248
  readonly valueAsString?: boolean | undefined;
249
+ readonly displayMode: "plain" | "uppercaseChinese" | "monoThousand";
248
250
  }) => any) | undefined;
249
251
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
250
252
  declare const _default: typeof __VLS_export;
@@ -7,6 +7,7 @@ import { cel as _rawCel } from "../../../../../utils/cel";
7
7
  import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
8
8
  import { getLocalizedText } from "../../../../../share/locale";
9
9
  import { interpolateMarkdown } from "../../../../table/utils/runtime";
10
+ import { formatNumberDisplay } from "../../../../../share/number-format";
10
11
  import { Field, FieldLabel, FieldMessages } from "../../../../ui/field";
11
12
  import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupNumberField } from "../../../../ui/input-group";
12
13
  import { Markdown } from "../../../../ui/markdown";
@@ -85,6 +86,11 @@ const { draft, commit } = useFieldValue({
85
86
  return props.config.valueAsString ? String(next) : next;
86
87
  }
87
88
  });
89
+ const readonlyDisplay = computed(() => formatNumberDisplay(draft.value, {
90
+ displayMode: props.config.displayMode,
91
+ precision: props.config.precision,
92
+ roundingMode: props.config.roundingMode
93
+ }));
88
94
  function applyRounding(n, precision, mode) {
89
95
  const factor = 10 ** precision;
90
96
  switch (mode) {
@@ -155,9 +161,12 @@ async function onBlur() {
155
161
  <div
156
162
  v-if="effectiveReadonly"
157
163
  class="min-h-9 py-1.5 text-sm"
158
- :class="draft != null ? 'text-zinc-700' : 'font-mono text-zinc-300 select-none'"
164
+ :class="[
165
+ draft != null ? 'text-zinc-700' : 'font-mono text-zinc-300 select-none',
166
+ draft != null && config.displayMode === 'monoThousand' && 'font-mono'
167
+ ]"
159
168
  >
160
- {{ draft ?? "-" }}
169
+ {{ readonlyDisplay }}
161
170
  </div>
162
171
  <InputGroup
163
172
  v-else
@@ -76,6 +76,9 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
76
76
  valueAsString: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
77
77
  min: Schema.optional<Schema.Schema<string, string, never>>;
78
78
  max: Schema.optional<Schema.Schema<string, string, never>>;
79
+ displayMode: Schema.optionalWith<Schema.Literal<["plain", "uppercaseChinese", "monoThousand"]>, {
80
+ default: () => "plain";
81
+ }>;
79
82
  addon: Schema.optional<Schema.Struct<{
80
83
  groups: Schema.optionalWith<Schema.Array$<Schema.Struct<{
81
84
  id: Schema.refine<string, typeof Schema.String>;
@@ -79,6 +79,13 @@ export function schema(configure) {
79
79
  title: "\u6700\u5927\u503C",
80
80
  description: "\u5141\u8BB8\u8F93\u5165\u7684\u6700\u5927\u503C\u8868\u8FBE\u5F0F\uFF1B\u7559\u7A7A\u65F6\u4E0D\u9650\u5236\u4E0A\u9650"
81
81
  })),
82
+ displayMode: Schema.optionalWith(
83
+ Schema.Literal("plain", "uppercaseChinese", "monoThousand").annotations({
84
+ title: "\u6A21\u5F0F",
85
+ description: "\u53EA\u8BFB\u5C55\u793A\u65F6\u7684\u6A21\u5F0F\uFF1A\u6570\u503C\uFF08\u539F\u6837\uFF09\u3001\u4E2D\u6587\u5927\u5199\uFF08\u5982 4200 \u2192 `\u8086\u4EDF\u8D30\u4F70\u96F6\u62FE`\uFF09\u3001\u7B49\u5BBD\u5B57\u4F53\u52A0\u5343\u5206\u4F4D\uFF08\u5982 `4,200`\uFF09\uFF1B\u7F16\u8F91\u6001\u4E0D\u53D7\u5F71\u54CD"
86
+ }),
87
+ { default: () => "plain" }
88
+ ),
82
89
  // `Schema.optional` rebuilds the struct's union member, and because the
83
90
  // `optionalWith`-default fields make `AddonActions` a `Transformation`, the
84
91
  // inner struct's `title`/`description` don't survive onto the rebuilt
@@ -32,10 +32,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
32
32
  readonly mode: "formula" | "prefill";
33
33
  readonly expression: string;
34
34
  } | undefined;
35
- readonly format?: string | undefined;
36
- readonly valueFormat?: string | undefined;
37
- readonly disabledDate?: string | undefined;
38
35
  readonly rangeSeparatorIcon?: string | undefined;
36
+ readonly format?: string | undefined;
39
37
  readonly startPlaceholder?: readonly [{
40
38
  readonly locale: "zh";
41
39
  readonly message: string;
@@ -50,6 +48,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
50
48
  readonly locale: "en" | "ja" | "ko";
51
49
  readonly message: string;
52
50
  }[]] | undefined;
51
+ readonly valueFormat?: string | undefined;
52
+ readonly disabledDate?: string | undefined;
53
53
  readonly validations?: readonly {
54
54
  readonly message: readonly [{
55
55
  readonly locale: "zh";
@@ -104,10 +104,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
104
104
  readonly mode: "formula" | "prefill";
105
105
  readonly expression: string;
106
106
  } | undefined;
107
- readonly format?: string | undefined;
108
- readonly valueFormat?: string | undefined;
109
- readonly disabledDate?: string | undefined;
110
107
  readonly rangeSeparatorIcon?: string | undefined;
108
+ readonly format?: string | undefined;
111
109
  readonly startPlaceholder?: readonly [{
112
110
  readonly locale: "zh";
113
111
  readonly message: string;
@@ -122,6 +120,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
122
120
  readonly locale: "en" | "ja" | "ko";
123
121
  readonly message: string;
124
122
  }[]] | undefined;
123
+ readonly valueFormat?: string | undefined;
124
+ readonly disabledDate?: string | undefined;
125
125
  readonly validations?: readonly {
126
126
  readonly message: readonly [{
127
127
  readonly locale: "zh";
@@ -32,10 +32,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
32
32
  readonly mode: "formula" | "prefill";
33
33
  readonly expression: string;
34
34
  } | undefined;
35
- readonly format?: string | undefined;
36
- readonly valueFormat?: string | undefined;
37
- readonly disabledDate?: string | undefined;
38
35
  readonly rangeSeparatorIcon?: string | undefined;
36
+ readonly format?: string | undefined;
39
37
  readonly startPlaceholder?: readonly [{
40
38
  readonly locale: "zh";
41
39
  readonly message: string;
@@ -50,6 +48,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
50
48
  readonly locale: "en" | "ja" | "ko";
51
49
  readonly message: string;
52
50
  }[]] | undefined;
51
+ readonly valueFormat?: string | undefined;
52
+ readonly disabledDate?: string | undefined;
53
53
  readonly validations?: readonly {
54
54
  readonly message: readonly [{
55
55
  readonly locale: "zh";
@@ -104,10 +104,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
104
104
  readonly mode: "formula" | "prefill";
105
105
  readonly expression: string;
106
106
  } | undefined;
107
- readonly format?: string | undefined;
108
- readonly valueFormat?: string | undefined;
109
- readonly disabledDate?: string | undefined;
110
107
  readonly rangeSeparatorIcon?: string | undefined;
108
+ readonly format?: string | undefined;
111
109
  readonly startPlaceholder?: readonly [{
112
110
  readonly locale: "zh";
113
111
  readonly message: string;
@@ -122,6 +120,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
122
120
  readonly locale: "en" | "ja" | "ko";
123
121
  readonly message: string;
124
122
  }[]] | undefined;
123
+ readonly valueFormat?: string | undefined;
124
+ readonly disabledDate?: string | undefined;
125
125
  readonly validations?: readonly {
126
126
  readonly message: readonly [{
127
127
  readonly locale: "zh";