@shwfed/config 2.10.8 → 2.10.10

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 (95) hide show
  1. package/dist/mcp.mjs +1143 -1024
  2. package/dist/module.json +1 -1
  3. package/dist/preview/assets/{FieldGroup.vue_vue_type_script_setup_true_lang-BX_UfcPb.js → FieldGroup.vue_vue_type_script_setup_true_lang-CsPU4iZU.js} +1 -1
  4. package/dist/preview/assets/{badge-obDKnV3E.js → badge-B953zx7V.js} +1 -1
  5. package/dist/preview/assets/{config-DbdgS5Ng.js → config-B-o7DV04.js} +1 -1
  6. package/dist/preview/assets/{config-C6IfQR2K.js → config-BajA-dJ1.js} +1 -1
  7. package/dist/preview/assets/{config-jBRCpIX5.js → config-BjdMNJwa.js} +1 -1
  8. package/dist/preview/assets/{config-CaaIte9f.js → config-C0xCcVfy.js} +1 -1
  9. package/dist/preview/assets/{config-BYhrPimZ.js → config-C2-lrcCq.js} +1 -1
  10. package/dist/preview/assets/{config-DGJLbdm3.js → config-C3v6QvLS.js} +1 -1
  11. package/dist/preview/assets/{config-DSD3RZZt.js → config-C4Twz5UA.js} +1 -1
  12. package/dist/preview/assets/{config-9weuJKPA.js → config-CFWXRIOe.js} +1 -1
  13. package/dist/preview/assets/{config-BKVK2els.js → config-CqMqqE_9.js} +1 -1
  14. package/dist/preview/assets/{config-DxmfhxW9.js → config-D5m2C0xK.js} +1 -1
  15. package/dist/preview/assets/{config-xdKDKKAa.js → config-DAJ25V43.js} +1 -1
  16. package/dist/preview/assets/{config-CnpY7wA_.js → config-DmgHMdSz.js} +1 -1
  17. package/dist/preview/assets/{config-CYdIN2D7.js → config-DpEkjTKt.js} +1 -1
  18. package/dist/preview/assets/{config-B27gvYuN.js → config-DqAigk_E.js} +1 -1
  19. package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-C97mjLAr.js → definition.vue_vue_type_script_setup_true_lang-WNrh1xWy.js} +1 -1
  20. package/dist/preview/assets/index-BdS7dokp.js +763 -0
  21. package/dist/preview/assets/index-BkwnC_tl.js +1 -0
  22. package/dist/preview/assets/{index-BWc0rZ2y.js → index-Bv_Ig-Tl.js} +1 -1
  23. package/dist/preview/assets/index-Cc4BT5dc.css +1 -0
  24. package/dist/preview/assets/{item-BRGONTEu.js → item-caTb4x-x.js} +1 -1
  25. package/dist/preview/assets/{runtime-Czg0F_NN.js → runtime-7ThCZ17X.js} +1 -1
  26. package/dist/preview/assets/{runtime-CJVZpawP.js → runtime-B-tUuLEY.js} +1 -1
  27. package/dist/preview/assets/{runtime-D-9NZJ0Z.js → runtime-Bnaxoocd.js} +1 -1
  28. package/dist/preview/assets/{runtime-BGRgWBLF.js → runtime-C8_u1NyC.js} +1 -1
  29. package/dist/preview/assets/{runtime-DqhT5NCm.js → runtime-C9lZq_oo.js} +1 -1
  30. package/dist/preview/assets/{runtime-CHOWqPGP.js → runtime-CIWhgS6a.js} +1 -1
  31. package/dist/preview/assets/{runtime-DcQjFFJx.js → runtime-CZrQz2RJ.js} +1 -1
  32. package/dist/preview/assets/{runtime-BoiTEUZt.js → runtime-D6EIpId9.js} +1 -1
  33. package/dist/preview/assets/{runtime-Ci3L--AW.js → runtime-DELhNsaH.js} +1 -1
  34. package/dist/preview/assets/{runtime-DZtGKJgS.js → runtime-d4XHvjgW.js} +1 -1
  35. package/dist/preview/assets/{schema-meta-xFd44RnL.js → schema-meta-Cf59HabB.js} +1 -1
  36. package/dist/preview/index.html +2 -2
  37. package/dist/runtime/components/actions/components/group.d.vue.ts +9 -0
  38. package/dist/runtime/components/actions/components/group.vue +20 -1
  39. package/dist/runtime/components/actions/components/group.vue.d.ts +9 -0
  40. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.actions/runtime.vue +1 -0
  41. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +16 -16
  42. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +16 -16
  43. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +16 -16
  44. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +16 -16
  45. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.d.vue.ts +2 -0
  46. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue +32 -1
  47. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue.d.ts +2 -0
  48. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/runtime.vue +2 -0
  49. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.d.ts +2 -0
  50. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.js +4 -0
  51. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue +202 -112
  52. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue +202 -112
  53. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +16 -16
  54. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +16 -16
  55. package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/config.vue +223 -132
  56. package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/config.vue +223 -132
  57. package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/config.d.vue.ts +59 -0
  58. package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/config.vue +345 -0
  59. package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/config.vue.d.ts +59 -0
  60. package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/runtime.d.vue.ts +8 -0
  61. package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/runtime.vue +113 -0
  62. package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/runtime.vue.d.ts +8 -0
  63. package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/schema.d.ts +79 -0
  64. package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/schema.js +86 -0
  65. package/dist/runtime/components/form/unit-config.d.vue.ts +27 -0
  66. package/dist/runtime/components/form/unit-config.vue +117 -73
  67. package/dist/runtime/components/form/unit-config.vue.d.ts +27 -0
  68. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -2
  69. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -2
  70. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -2
  71. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -2
  72. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -2
  73. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -2
  74. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -2
  75. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -2
  76. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -2
  77. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -2
  78. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -2
  79. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -2
  80. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
  81. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
  82. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
  83. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
  84. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
  85. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
  86. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
  87. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
  88. package/dist/runtime/components/ui/markdown/Markdown.vue +19 -16
  89. package/dist/runtime/style.css +1 -1
  90. package/dist/runtime/utils/markdown.d.ts +5 -2
  91. package/dist/runtime/utils/markdown.js +22 -1
  92. package/package.json +1 -1
  93. package/dist/preview/assets/index-ADrQrdaQ.js +0 -1
  94. package/dist/preview/assets/index-Cj7bRG7B.css +0 -1
  95. package/dist/preview/assets/index-DFmBrVzd.js +0 -763
@@ -4,6 +4,15 @@ import type { ActionsConfig } from '../schema.js';
4
4
  type ActionConfigType = Schema.Schema.Type<ReturnType<typeof ActionsConfig>>;
5
5
  type __VLS_Props = {
6
6
  configure?: (env: Environment) => void;
7
+ /**
8
+ * When set, buttons grow to divide the bar's width instead of left-packing
9
+ * at their natural size. Gated purely by free space: a stretched container
10
+ * (the actions block's default placement) divides; an alignment-shrunk
11
+ * container (`左对齐`/`居中`/`右对齐`) has no slack so buttons stay natural.
12
+ * Hosts that want a compact toolbar (table column, tree node, inline field
13
+ * actions) leave it off; only the actions block opts in.
14
+ */
15
+ fill?: boolean;
7
16
  };
8
17
  type __VLS_ModelProps = {
9
18
  'config': ActionConfigType;
@@ -22,7 +22,8 @@ defineOptions({
22
22
  inheritAttrs: false
23
23
  });
24
24
  defineProps({
25
- configure: { type: Function, required: false }
25
+ configure: { type: Function, required: false },
26
+ fill: { type: Boolean, required: false }
26
27
  });
27
28
  const config = defineModel("config", { type: null, ...{ required: true } });
28
29
  const isDevelopment = import.meta.dev;
@@ -223,6 +224,21 @@ const groupedItems = computed(() => {
223
224
  const rootStyle = computed(() => ({
224
225
  gap: `calc(${config.value.gap ?? 4} * 0.25rem)`
225
226
  }));
227
+ function renderedChildCount(group) {
228
+ let n = 0;
229
+ for (const item of group.items) {
230
+ if (isRegistryItem(item)) {
231
+ if (getItemRuntime(item)) n++;
232
+ continue;
233
+ }
234
+ if (isDropdownItem(item)) {
235
+ if (hasVisibleDropdownItems(item)) n++;
236
+ continue;
237
+ }
238
+ if (!isButtonHidden(item)) n++;
239
+ }
240
+ return n;
241
+ }
226
242
  function getButtonLabel(button) {
227
243
  return getLocalizedText(button.title, locale.value) ?? t("untitled-button");
228
244
  }
@@ -367,6 +383,7 @@ async function runButton(buttonId) {
367
383
  <ClientOnly>
368
384
  <div
369
385
  data-slot="buttons"
386
+ :data-fill="fill || void 0"
370
387
  :class="cn('relative flex flex-wrap items-baseline')"
371
388
  :style="[
372
389
  rootStyle,
@@ -388,6 +405,8 @@ async function runButton(buttonId) {
388
405
  <ButtonGroup
389
406
  v-for="group in groupedItems"
390
407
  :key="group.id"
408
+ class="actions-group"
409
+ :style="{ '--ag-grow': String(renderedChildCount(group)) }"
391
410
  data-slot="buttons-group"
392
411
  orientation="horizontal"
393
412
  >
@@ -4,6 +4,15 @@ import type { ActionsConfig } from '../schema.js';
4
4
  type ActionConfigType = Schema.Schema.Type<ReturnType<typeof ActionsConfig>>;
5
5
  type __VLS_Props = {
6
6
  configure?: (env: Environment) => void;
7
+ /**
8
+ * When set, buttons grow to divide the bar's width instead of left-packing
9
+ * at their natural size. Gated purely by free space: a stretched container
10
+ * (the actions block's default placement) divides; an alignment-shrunk
11
+ * container (`左对齐`/`居中`/`右对齐`) has no slack so buttons stay natural.
12
+ * Hosts that want a compact toolbar (table column, tree node, inline field
13
+ * actions) leave it off; only the actions block opts in.
14
+ */
15
+ fill?: boolean;
7
16
  };
8
17
  type __VLS_ModelProps = {
9
18
  'config': ActionConfigType;
@@ -18,5 +18,6 @@ const actionsConfig = computed({
18
18
  <ActionsRuntime
19
19
  v-model:config="actionsConfig"
20
20
  :configure="configure"
21
+ fill
21
22
  />
22
23
  </template>
@@ -40,14 +40,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
40
40
  readonly expression: string;
41
41
  } | undefined;
42
42
  readonly options: string;
43
- readonly optionValue: string;
44
- readonly optionLabel: readonly [{
45
- readonly locale: "zh";
46
- readonly message: string;
47
- }, ...{
48
- readonly locale: "en" | "ja" | "ko";
49
- readonly message: string;
50
- }[]];
51
43
  readonly validations?: readonly {
52
44
  readonly message: readonly [{
53
45
  readonly locale: "zh";
@@ -59,6 +51,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
59
51
  readonly warning?: boolean | undefined;
60
52
  readonly when: string;
61
53
  }[] | undefined;
54
+ readonly optionValue: string;
55
+ readonly optionLabel: readonly [{
56
+ readonly locale: "zh";
57
+ readonly message: string;
58
+ }, ...{
59
+ readonly locale: "en" | "ja" | "ko";
60
+ readonly message: string;
61
+ }[]];
62
62
  }) => any;
63
63
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
64
64
  "onUpdate:modelValue"?: ((value: {
@@ -98,14 +98,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
98
98
  readonly expression: string;
99
99
  } | undefined;
100
100
  readonly options: string;
101
- readonly optionValue: string;
102
- readonly optionLabel: readonly [{
103
- readonly locale: "zh";
104
- readonly message: string;
105
- }, ...{
106
- readonly locale: "en" | "ja" | "ko";
107
- readonly message: string;
108
- }[]];
109
101
  readonly validations?: readonly {
110
102
  readonly message: readonly [{
111
103
  readonly locale: "zh";
@@ -117,6 +109,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
117
109
  readonly warning?: boolean | undefined;
118
110
  readonly when: string;
119
111
  }[] | undefined;
112
+ readonly optionValue: string;
113
+ readonly optionLabel: readonly [{
114
+ readonly locale: "zh";
115
+ readonly message: string;
116
+ }, ...{
117
+ readonly locale: "en" | "ja" | "ko";
118
+ readonly message: string;
119
+ }[]];
120
120
  }) => any) | undefined;
121
121
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
122
122
  declare const _default: typeof __VLS_export;
@@ -40,14 +40,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
40
40
  readonly expression: string;
41
41
  } | undefined;
42
42
  readonly options: string;
43
- readonly optionValue: string;
44
- readonly optionLabel: readonly [{
45
- readonly locale: "zh";
46
- readonly message: string;
47
- }, ...{
48
- readonly locale: "en" | "ja" | "ko";
49
- readonly message: string;
50
- }[]];
51
43
  readonly validations?: readonly {
52
44
  readonly message: readonly [{
53
45
  readonly locale: "zh";
@@ -59,6 +51,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
59
51
  readonly warning?: boolean | undefined;
60
52
  readonly when: string;
61
53
  }[] | undefined;
54
+ readonly optionValue: string;
55
+ readonly optionLabel: readonly [{
56
+ readonly locale: "zh";
57
+ readonly message: string;
58
+ }, ...{
59
+ readonly locale: "en" | "ja" | "ko";
60
+ readonly message: string;
61
+ }[]];
62
62
  }) => any;
63
63
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
64
64
  "onUpdate:modelValue"?: ((value: {
@@ -98,14 +98,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
98
98
  readonly expression: string;
99
99
  } | undefined;
100
100
  readonly options: string;
101
- readonly optionValue: string;
102
- readonly optionLabel: readonly [{
103
- readonly locale: "zh";
104
- readonly message: string;
105
- }, ...{
106
- readonly locale: "en" | "ja" | "ko";
107
- readonly message: string;
108
- }[]];
109
101
  readonly validations?: readonly {
110
102
  readonly message: readonly [{
111
103
  readonly locale: "zh";
@@ -117,6 +109,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
117
109
  readonly warning?: boolean | undefined;
118
110
  readonly when: string;
119
111
  }[] | undefined;
112
+ readonly optionValue: string;
113
+ readonly optionLabel: readonly [{
114
+ readonly locale: "zh";
115
+ readonly message: string;
116
+ }, ...{
117
+ readonly locale: "en" | "ja" | "ko";
118
+ readonly message: string;
119
+ }[]];
120
120
  }) => any) | undefined;
121
121
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
122
122
  declare const _default: typeof __VLS_export;
@@ -41,14 +41,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
41
41
  readonly expression: string;
42
42
  } | undefined;
43
43
  readonly options: string;
44
- readonly optionValue: string;
45
- readonly optionLabel: readonly [{
46
- readonly locale: "zh";
47
- readonly message: string;
48
- }, ...{
49
- readonly locale: "en" | "ja" | "ko";
50
- readonly message: string;
51
- }[]];
52
44
  readonly validations?: readonly {
53
45
  readonly message: readonly [{
54
46
  readonly locale: "zh";
@@ -60,6 +52,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
60
52
  readonly warning?: boolean | undefined;
61
53
  readonly when: string;
62
54
  }[] | undefined;
55
+ readonly optionValue: string;
56
+ readonly optionLabel: readonly [{
57
+ readonly locale: "zh";
58
+ readonly message: string;
59
+ }, ...{
60
+ readonly locale: "en" | "ja" | "ko";
61
+ readonly message: string;
62
+ }[]];
63
63
  }) => any;
64
64
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
65
65
  "onUpdate:modelValue"?: ((value: {
@@ -100,14 +100,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
100
100
  readonly expression: string;
101
101
  } | undefined;
102
102
  readonly options: string;
103
- readonly optionValue: string;
104
- readonly optionLabel: readonly [{
105
- readonly locale: "zh";
106
- readonly message: string;
107
- }, ...{
108
- readonly locale: "en" | "ja" | "ko";
109
- readonly message: string;
110
- }[]];
111
103
  readonly validations?: readonly {
112
104
  readonly message: readonly [{
113
105
  readonly locale: "zh";
@@ -119,6 +111,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
119
111
  readonly warning?: boolean | undefined;
120
112
  readonly when: string;
121
113
  }[] | undefined;
114
+ readonly optionValue: string;
115
+ readonly optionLabel: readonly [{
116
+ readonly locale: "zh";
117
+ readonly message: string;
118
+ }, ...{
119
+ readonly locale: "en" | "ja" | "ko";
120
+ readonly message: string;
121
+ }[]];
122
122
  }) => any) | undefined;
123
123
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
124
124
  declare const _default: typeof __VLS_export;
@@ -41,14 +41,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
41
41
  readonly expression: string;
42
42
  } | undefined;
43
43
  readonly options: string;
44
- readonly optionValue: string;
45
- readonly optionLabel: readonly [{
46
- readonly locale: "zh";
47
- readonly message: string;
48
- }, ...{
49
- readonly locale: "en" | "ja" | "ko";
50
- readonly message: string;
51
- }[]];
52
44
  readonly validations?: readonly {
53
45
  readonly message: readonly [{
54
46
  readonly locale: "zh";
@@ -60,6 +52,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
60
52
  readonly warning?: boolean | undefined;
61
53
  readonly when: string;
62
54
  }[] | undefined;
55
+ readonly optionValue: string;
56
+ readonly optionLabel: readonly [{
57
+ readonly locale: "zh";
58
+ readonly message: string;
59
+ }, ...{
60
+ readonly locale: "en" | "ja" | "ko";
61
+ readonly message: string;
62
+ }[]];
63
63
  }) => any;
64
64
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
65
65
  "onUpdate:modelValue"?: ((value: {
@@ -100,14 +100,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
100
100
  readonly expression: string;
101
101
  } | undefined;
102
102
  readonly options: string;
103
- readonly optionValue: string;
104
- readonly optionLabel: readonly [{
105
- readonly locale: "zh";
106
- readonly message: string;
107
- }, ...{
108
- readonly locale: "en" | "ja" | "ko";
109
- readonly message: string;
110
- }[]];
111
103
  readonly validations?: readonly {
112
104
  readonly message: readonly [{
113
105
  readonly locale: "zh";
@@ -119,6 +111,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
119
111
  readonly warning?: boolean | undefined;
120
112
  readonly when: string;
121
113
  }[] | undefined;
114
+ readonly optionValue: string;
115
+ readonly optionLabel: readonly [{
116
+ readonly locale: "zh";
117
+ readonly message: string;
118
+ }, ...{
119
+ readonly locale: "en" | "ja" | "ko";
120
+ readonly message: string;
121
+ }[]];
122
122
  }) => any) | undefined;
123
123
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
124
124
  declare const _default: typeof __VLS_export;
@@ -69,6 +69,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
69
69
  readonly message: string;
70
70
  }[]] | undefined;
71
71
  readonly reorderable?: boolean | undefined;
72
+ readonly addable?: boolean | undefined;
72
73
  }) => any;
73
74
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
74
75
  "onUpdate:modelValue"?: ((value: {
@@ -137,6 +138,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
137
138
  readonly message: string;
138
139
  }[]] | undefined;
139
140
  readonly reorderable?: boolean | undefined;
141
+ readonly addable?: boolean | undefined;
140
142
  }) => any) | undefined;
141
143
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
142
144
  declare const _default: typeof __VLS_export;
@@ -87,6 +87,17 @@ const reorderable = computed({
87
87
  }
88
88
  }
89
89
  });
90
+ const addable = computed({
91
+ get: () => value.value.addable ?? true,
92
+ set: (next) => {
93
+ if (next === true) {
94
+ const { addable: _omit, ...rest } = value.value;
95
+ value.value = rest;
96
+ } else {
97
+ value.value = { ...value.value, addable: false };
98
+ }
99
+ }
100
+ });
90
101
  </script>
91
102
 
92
103
  <template>
@@ -256,7 +267,7 @@ const reorderable = computed({
256
267
  />
257
268
  </Field>
258
269
 
259
- <div class="grid grid-cols-3 gap-3">
270
+ <div class="grid grid-cols-4 gap-3">
260
271
  <Field orientation="vertical">
261
272
  <FieldLabel class="text-xs text-zinc-500">
262
273
  <template
@@ -322,6 +333,26 @@ const reorderable = computed({
322
333
  {{ fieldTitle("reorderable") }}
323
334
  </FieldLabel>
324
335
  </Field>
336
+
337
+ <Field
338
+ orientation="horizontal"
339
+ class="h-9 w-auto gap-2 self-end"
340
+ >
341
+ <Switch v-model="addable" />
342
+ <FieldLabel class="text-sm text-zinc-600">
343
+ <template
344
+ v-if="fieldDescription('addable')"
345
+ #tooltip
346
+ >
347
+ <Markdown
348
+ :source="fieldDescription('addable')"
349
+ block
350
+ class="prose prose-sm prose-zinc"
351
+ />
352
+ </template>
353
+ {{ fieldTitle("addable") }}
354
+ </FieldLabel>
355
+ </Field>
325
356
  </div>
326
357
 
327
358
  <div class="grid grid-cols-2 gap-3">
@@ -69,6 +69,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
69
69
  readonly message: string;
70
70
  }[]] | undefined;
71
71
  readonly reorderable?: boolean | undefined;
72
+ readonly addable?: boolean | undefined;
72
73
  }) => any;
73
74
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
74
75
  "onUpdate:modelValue"?: ((value: {
@@ -137,6 +138,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
137
138
  readonly message: string;
138
139
  }[]] | undefined;
139
140
  readonly reorderable?: boolean | undefined;
141
+ readonly addable?: boolean | undefined;
140
142
  }) => any) | undefined;
141
143
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
142
144
  declare const _default: typeof __VLS_export;
@@ -53,6 +53,7 @@ const { isRequired, errors, warnings, visible } = useFieldValidation({
53
53
  });
54
54
  const isDisabled = computed(() => evalBool(props.config.disabled, "disabled"));
55
55
  const reorderable = computed(() => props.config.reorderable ?? true);
56
+ const addable = computed(() => props.config.addable ?? true);
56
57
  const isScalarRow = computed(() => {
57
58
  const fields = props.config.unit.fields;
58
59
  if (fields.length !== 1) return false;
@@ -311,6 +312,7 @@ function rowConfig(i) {
311
312
  </div>
312
313
 
313
314
  <Button
315
+ v-if="addable"
314
316
  type="button"
315
317
  :disabled="!canAdd"
316
318
  data-slot="list-add"
@@ -80,6 +80,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.re
80
80
  readonly message: string;
81
81
  }[]] | undefined;
82
82
  readonly reorderable?: boolean | undefined;
83
+ readonly addable?: boolean | undefined;
83
84
  }, Schema.Struct<{
84
85
  label: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
85
86
  locale: Schema.Literal<["zh"]>;
@@ -111,6 +112,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.re
111
112
  message: Schema.SchemaClass<string, string, never>;
112
113
  }>]>>;
113
114
  reorderable: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
115
+ addable: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
114
116
  min: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
115
117
  max: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
116
118
  disabled: Schema.optional<Schema.Schema<string, string, never>>;
@@ -55,6 +55,10 @@ export function schema(configure) {
55
55
  title: "\u5141\u8BB8\u91CD\u6392",
56
56
  description: "\u5173\u95ED\u540E\u7528\u6237\u65E0\u6CD5\u4E0A\u4E0B\u79FB\u52A8\u5217\u8868\u9879\uFF1B\u9ED8\u8BA4\u5F00\u542F"
57
57
  })),
58
+ addable: Schema.optional(Schema.Boolean.annotations({
59
+ title: "\u663E\u793A\u65B0\u589E\u6309\u94AE",
60
+ description: "\u5173\u95ED\u540E\u4E0D\u6E32\u67D3\u5185\u7F6E\u7684\u65B0\u589E\u6309\u94AE\uFF1B\u9ED8\u8BA4\u5F00\u542F\u3002\u5173\u95ED\u65F6\u53EF\u6539\u7531\u5916\u90E8\u6309\u94AE\u5411\u7ED1\u5B9A\u8DEF\u5F84\u8FFD\u52A0\u5217\u8868\u9879\uFF08\u4F8B\u5982 `state.write` \u5199\u5165 `form.<\u8DEF\u5F84> + [{}]`\uFF09"
61
+ })),
58
62
  min: Schema.optional(Schema.Number.pipe(Schema.int(), Schema.nonNegative()).annotations({
59
63
  title: "\u6700\u5C11\u6570\u91CF",
60
64
  description: "\u5217\u8868\u9879\u6570\u91CF\u7684\u4E0B\u9650\uFF1B\u4F4E\u4E8E\u8BE5\u503C\u65F6\u65E0\u6CD5\u5220\u9664"