@shwfed/config 2.10.10 → 2.10.12

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 (79) hide show
  1. package/dist/mcp.mjs +1043 -880
  2. package/dist/module.json +1 -1
  3. package/dist/preview/assets/{FieldGroup.vue_vue_type_script_setup_true_lang-CsPU4iZU.js → FieldGroup.vue_vue_type_script_setup_true_lang-BeqytPDr.js} +1 -1
  4. package/dist/preview/assets/{badge-B953zx7V.js → badge-DkHwLDps.js} +1 -1
  5. package/dist/preview/assets/{config-B-o7DV04.js → config-7KeAl8UU.js} +1 -1
  6. package/dist/preview/assets/{config-D5m2C0xK.js → config-CVPVYMuh.js} +1 -1
  7. package/dist/preview/assets/{config-BajA-dJ1.js → config-CZ1e9utV.js} +1 -1
  8. package/dist/preview/assets/{config-C2-lrcCq.js → config-Cedm-E2H.js} +1 -1
  9. package/dist/preview/assets/{config-CFWXRIOe.js → config-Cft-srKd.js} +1 -1
  10. package/dist/preview/assets/{config-DAJ25V43.js → config-Cy6Eix27.js} +1 -1
  11. package/dist/preview/assets/{config-DqAigk_E.js → config-DAZ2Uj6B.js} +1 -1
  12. package/dist/preview/assets/{config-DmgHMdSz.js → config-DCANpbtq.js} +1 -1
  13. package/dist/preview/assets/{config-CqMqqE_9.js → config-DJQ2LOWo.js} +1 -1
  14. package/dist/preview/assets/{config-C4Twz5UA.js → config-DQVKd54J.js} +1 -1
  15. package/dist/preview/assets/{config-BjdMNJwa.js → config-DbV3RlZz.js} +1 -1
  16. package/dist/preview/assets/{config-C3v6QvLS.js → config-Dx1SXsSf.js} +1 -1
  17. package/dist/preview/assets/{config-DpEkjTKt.js → config-OPQWANCx.js} +1 -1
  18. package/dist/preview/assets/{config-C0xCcVfy.js → config-Uw4cvZGX.js} +1 -1
  19. package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-WNrh1xWy.js → definition.vue_vue_type_script_setup_true_lang-D4Gh9PzS.js} +1 -1
  20. package/dist/preview/assets/{index-BdS7dokp.js → index-B3HnlKis.js} +193 -193
  21. package/dist/preview/assets/index-BAY6NLoo.css +1 -0
  22. package/dist/preview/assets/{index-Bv_Ig-Tl.js → index-Cum0oK9u.js} +1 -1
  23. package/dist/preview/assets/index-CxUuhfsO.js +1 -0
  24. package/dist/preview/assets/{item-caTb4x-x.js → item-H4QeOpnC.js} +1 -1
  25. package/dist/preview/assets/{runtime-7ThCZ17X.js → runtime-BotFX6qJ.js} +1 -1
  26. package/dist/preview/assets/{runtime-DELhNsaH.js → runtime-C3532B0Y.js} +1 -1
  27. package/dist/preview/assets/{runtime-Bnaxoocd.js → runtime-CNMjRr9Y.js} +1 -1
  28. package/dist/preview/assets/{runtime-d4XHvjgW.js → runtime-CTnwTJlw.js} +1 -1
  29. package/dist/preview/assets/{runtime-CIWhgS6a.js → runtime-CwgX0PuH.js} +1 -1
  30. package/dist/preview/assets/{runtime-C8_u1NyC.js → runtime-D5HcLLLR.js} +1 -1
  31. package/dist/preview/assets/{runtime-B-tUuLEY.js → runtime-DvCHNIPq.js} +1 -1
  32. package/dist/preview/assets/{runtime-C9lZq_oo.js → runtime-cKOD2A6u.js} +1 -1
  33. package/dist/preview/assets/{runtime-D6EIpId9.js → runtime-ibuFFD1K.js} +1 -1
  34. package/dist/preview/assets/{runtime-CZrQz2RJ.js → runtime-sPGVp7yA.js} +1 -1
  35. package/dist/preview/assets/{schema-meta-Cf59HabB.js → schema-meta-DtZNwp3h.js} +1 -1
  36. package/dist/preview/index.html +2 -2
  37. package/dist/runtime/components/actions/components/group.d.vue.ts +2 -2
  38. package/dist/runtime/components/actions/components/group.vue.d.ts +2 -2
  39. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/runtime.vue +1 -0
  40. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +22 -22
  41. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +22 -22
  42. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +22 -22
  43. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +22 -22
  44. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +22 -22
  45. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +22 -22
  46. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +22 -22
  47. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +22 -22
  48. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +22 -22
  49. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +22 -22
  50. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +22 -22
  51. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +22 -22
  52. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +22 -22
  53. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +22 -22
  54. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/config.vue +83 -3
  55. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/runtime.vue +28 -0
  56. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.d.ts +132 -0
  57. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.js +19 -2
  58. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/config.vue +82 -2
  59. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/runtime.vue +28 -0
  60. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.d.ts +132 -0
  61. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.js +19 -2
  62. package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/runtime.vue +8 -0
  63. package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/config.d.vue.ts +10 -0
  64. package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/config.vue +717 -0
  65. package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/config.vue.d.ts +10 -0
  66. package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/runtime.d.vue.ts +9 -0
  67. package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/runtime.vue +152 -0
  68. package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/runtime.vue.d.ts +9 -0
  69. package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/schema.d.ts +87 -0
  70. package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/schema.js +122 -0
  71. package/dist/runtime/components/ui/date-picker/DatePicker.d.vue.ts +1 -0
  72. package/dist/runtime/components/ui/date-picker/DatePicker.vue +3 -0
  73. package/dist/runtime/components/ui/date-picker/DatePicker.vue.d.ts +1 -0
  74. package/dist/runtime/components/ui/date-range-picker/DateRangePicker.d.vue.ts +1 -0
  75. package/dist/runtime/components/ui/date-range-picker/DateRangePicker.vue +2 -0
  76. package/dist/runtime/components/ui/date-range-picker/DateRangePicker.vue.d.ts +1 -0
  77. package/package.json +1 -1
  78. package/dist/preview/assets/index-BkwnC_tl.js +0 -1
  79. package/dist/preview/assets/index-Cc4BT5dc.css +0 -1
@@ -1,13 +1,29 @@
1
1
  import { Schema } from "effect";
2
2
  import { getProperty } from "dot-prop";
3
3
  import { Locale } from "../../../../../share/locale.js";
4
- import { CelRowAccess, derivedRowField, editableColumnFields, editableHeader } from "../../../utils/shared.js";
4
+ import { ActionSchemaFields } from "../../../../actions/schema.js";
5
+ import { CelRowAccess, derivedRowField, editableColumnFields, editableHeader, registerRowVariablesIfAbsent } from "../../../utils/shared.js";
5
6
  export const type = "com.shwfed.table.column.number-input";
6
7
  export const compatibilityDate = "2026-05-20";
7
8
  export const metadata = {
8
9
  name: "\u6570\u503C\u8F93\u5165",
9
10
  icon: "fluent:number-symbol-20-regular"
10
11
  };
12
+ function AddonActions(configure) {
13
+ const configureWithRow = (env) => {
14
+ configure(env);
15
+ registerRowVariablesIfAbsent(env);
16
+ };
17
+ const { groups, items, ...rest } = ActionSchemaFields(configureWithRow).fields;
18
+ return Schema.Struct({
19
+ ...rest,
20
+ groups: Schema.optionalWith(groups, { default: () => [] }),
21
+ items: Schema.optionalWith(items, { default: () => [] })
22
+ }).annotations({
23
+ title: "\u8F93\u5165\u6846\u5185\u6309\u94AE",
24
+ description: "\u5728\u8F93\u5165\u6846\u53F3\u4FA7\u5185\u5D4C\u4E00\u7EC4\u64CD\u4F5C\u6309\u94AE"
25
+ });
26
+ }
11
27
  export function schema(configure) {
12
28
  const CelBool = CelRowAccess(configure, { resultType: "bool" });
13
29
  const CelNumber = CelRowAccess(configure, { resultType: "number" });
@@ -55,7 +71,8 @@ export function schema(configure) {
55
71
  title: "\u6700\u5927\u503C",
56
72
  description: "\u5141\u8BB8\u8F93\u5165\u7684\u6700\u5927\u503C\u8868\u8FBE\u5F0F\uFF0C\u53EF\u8BBF\u95EE `row` / `index` \u548C `form`\uFF1B\u7559\u7A7A\u65F6\u4E0D\u9650\u5236\u4E0A\u9650"
57
73
  })),
58
- derived: derivedRowField(configure, "number")
74
+ derived: derivedRowField(configure, "number"),
75
+ addon: Schema.optional(AddonActions(configure))
59
76
  }).annotations({ title: "NumberInputRenderer", description: "\u6570\u503C\u8F93\u5165\u6E32\u67D3\u5668\uFF08\u53EF\u7F16\u8F91\uFF09" });
60
77
  }
61
78
  export function defaults() {
@@ -1,8 +1,9 @@
1
1
  <script setup>
2
- import { computed } from "vue";
2
+ import { computed, inject, onBeforeUnmount, ref, watch } from "vue";
3
3
  import { Icon } from "@iconify/vue";
4
4
  import { ExpressionEditor } from "../../../../ui/expression-editor";
5
5
  import { Separator } from "../../../../ui/separator";
6
+ import { Button } from "../../../../ui/button";
6
7
  import { Field, FieldLabel } from "../../../../ui/field";
7
8
  import { Locale } from "../../../../ui/locale";
8
9
  import {
@@ -12,9 +13,13 @@ import {
12
13
  InputGroupInput,
13
14
  InputGroupNumberField
14
15
  } from "../../../../ui/input-group";
16
+ import ActionsConfigEditor from "../../../../actions/config.vue";
15
17
  import { getStructFieldDescription, getStructFieldTitle } from "../../../utils/schema-meta";
16
18
  import { Markdown } from "../../../../ui/markdown";
17
19
  import DerivedValueEditor from "../../../../form/DerivedValueEditor.vue";
20
+ import { TABLE_COLUMN_LAYOUT_KEY } from "../../../column-layout";
21
+ import { BREADCRUMB_EXTENSION_KEY } from "../../../../config/breadcrumb-extension";
22
+ import { registerRowVariablesIfAbsent } from "../../../utils/shared";
18
23
  import { schema } from "./schema";
19
24
  defineOptions({ name: "ShwfedTableTextInputRendererConfig" });
20
25
  const value = defineModel({ type: Object, ...{ required: true } });
@@ -26,6 +31,47 @@ const ROW_VARS = {
26
31
  row: { type: "dyn", label: "\u5F53\u524D\u884C\u6570\u636E" },
27
32
  index: { type: "number", label: "\u884C\u7D22\u5F15" }
28
33
  };
34
+ const layout = inject(TABLE_COLUMN_LAYOUT_KEY, null);
35
+ const breadcrumbExt = inject(BREADCRUMB_EXTENSION_KEY, null);
36
+ const editingAddon = ref(false);
37
+ function closeAddon() {
38
+ editingAddon.value = false;
39
+ }
40
+ const addonCrumb = breadcrumbExt?.add();
41
+ watch(editingAddon, (on) => {
42
+ if (layout) layout.fullPane.value = on;
43
+ if (addonCrumb) {
44
+ addonCrumb.label.value = on ? "\u8F93\u5165\u6846\u5185\u6309\u94AE" : null;
45
+ addonCrumb.back.value = on ? closeAddon : null;
46
+ }
47
+ });
48
+ onBeforeUnmount(() => {
49
+ if (layout) layout.fullPane.value = false;
50
+ addonCrumb?.dispose();
51
+ });
52
+ const addonItemCount = computed(() => value.value.addon?.items.length ?? 0);
53
+ const addonValue = computed({
54
+ get: () => ({
55
+ kind: "shwfed.component.action",
56
+ size: value.value.addon?.size ?? "xs",
57
+ gap: value.value.addon?.gap ?? 4,
58
+ style: value.value.addon?.style,
59
+ groups: value.value.addon?.groups ?? [],
60
+ items: value.value.addon?.items ?? []
61
+ }),
62
+ set: (next) => {
63
+ const { size, gap, style, groups, items } = next;
64
+ if (groups.length === 0 && items.length === 0) {
65
+ const { addon: _omit, ...rest } = value.value;
66
+ value.value = rest;
67
+ return;
68
+ }
69
+ value.value = {
70
+ ...value.value,
71
+ addon: { size, gap, groups, items, ...style === void 0 ? {} : { style } }
72
+ };
73
+ }
74
+ });
29
75
  const bindingText = computed({
30
76
  get: () => value.value.binding ?? "",
31
77
  set: (v) => {
@@ -85,7 +131,17 @@ const derivedModel = computed({
85
131
  </script>
86
132
 
87
133
  <template>
88
- <div class="space-y-5">
134
+ <ActionsConfigEditor
135
+ v-if="editingAddon"
136
+ v-model="addonValue"
137
+ :configure="registerRowVariablesIfAbsent"
138
+ hide-size
139
+ />
140
+
141
+ <div
142
+ v-else
143
+ class="space-y-5"
144
+ >
89
145
  <div class="grid grid-cols-2 gap-x-6 gap-y-4">
90
146
  <Field orientation="vertical">
91
147
  <FieldLabel class="text-xs text-zinc-500">
@@ -327,5 +383,29 @@ const derivedModel = computed({
327
383
  </InputGroup>
328
384
  </Field>
329
385
  </div>
386
+ <Separator />
387
+ <Field orientation="vertical">
388
+ <FieldLabel class="text-xs text-zinc-500">
389
+ <template
390
+ v-if="fieldDescription('addon')"
391
+ #tooltip
392
+ >
393
+ <Markdown
394
+ :source="fieldDescription('addon')"
395
+ block
396
+ class="prose prose-sm prose-zinc"
397
+ />
398
+ </template>
399
+ {{ fieldTitle("addon") }}
400
+ </FieldLabel>
401
+ <Button
402
+ type="button"
403
+ class="w-full justify-center"
404
+ @click="editingAddon = true"
405
+ >
406
+ <Icon icon="fluent:add-20-regular" />
407
+ <span>{{ addonItemCount > 0 ? "\u914D\u7F6E\u6309\u94AE" : "\u6DFB\u52A0\u6309\u94AE" }}</span>
408
+ </Button>
409
+ </Field>
330
410
  </div>
331
411
  </template>
@@ -13,6 +13,7 @@ import {
13
13
  InputGroupButton,
14
14
  InputGroupInput
15
15
  } from "../../../../ui/input-group";
16
+ import ShwfedActions from "../../../../actions/components/group.vue";
16
17
  import { useFormState } from "../../../../form/utils/state";
17
18
  defineOptions({ name: "ShwfedTableTextInputRendererRuntime" });
18
19
  const props = defineProps({
@@ -64,6 +65,18 @@ function onBlur() {
64
65
  isFocused.value = false;
65
66
  commit();
66
67
  }
68
+ const addonConfig = computed(() => {
69
+ const addon = props.column.addon;
70
+ if (!addon || addon.items.length === 0) return null;
71
+ return {
72
+ kind: "shwfed.component.action",
73
+ size: addon.size ?? "xs",
74
+ gap: addon.gap,
75
+ style: addon.style,
76
+ groups: addon.groups.map((group) => ({ ...group, variant: group.variant ?? "ghost" })),
77
+ items: addon.items
78
+ };
79
+ });
67
80
  const showClear = computed(() => !isDisabled.value && draft.value.length > 0);
68
81
  function handleClear() {
69
82
  draft.value = "";
@@ -149,6 +162,21 @@ function handleClear() {
149
162
  />
150
163
  </InputGroupButton>
151
164
  </InputGroupAddon>
165
+ <!-- `mr-[-0.45rem]` mirrors the clear addon's `has-[>button]:mr-[-0.45rem]`
166
+ pull-back: that compensation only fires when the addon's direct child
167
+ is a `<button>`, but `ShwfedActions` roots a `<div>`, so without it the
168
+ `inline-end` `pr-3` would leave a ~12px dead gap before the border. -->
169
+ <InputGroupAddon
170
+ v-if="addonConfig"
171
+ align="inline-end"
172
+ class="field-addon-actions mr-[-0.45rem]"
173
+ >
174
+ <ShwfedActions :config="addonConfig" />
175
+ </InputGroupAddon>
152
176
  </InputGroup>
153
177
  </div>
154
178
  </template>
179
+
180
+ <style scoped>
181
+ .field-addon-actions :deep([data-slot=buttons]){align-items:center;gap:.125rem}.field-addon-actions :deep([data-slot=buttons-dropdown-trigger]),.field-addon-actions :deep([data-slot=buttons-item]){border-radius:.125rem;color:#71717a;height:1rem;min-width:1rem;padding:0}.field-addon-actions :deep([data-slot=buttons-dropdown-trigger] svg),.field-addon-actions :deep([data-slot=buttons-item] svg){height:.75rem;width:.75rem}.field-addon-actions :deep([data-slot=buttons-dropdown-trigger]:hover:not(:disabled)),.field-addon-actions :deep([data-slot=buttons-item]:hover:not(:disabled)){color:#3f3f46}
182
+ </style>
@@ -23,6 +23,138 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
23
23
  mode: Schema.Literal<["formula", "prefill"]>;
24
24
  expression: Schema.Schema<string, string, never>;
25
25
  }>>;
26
+ addon: Schema.optional<Schema.Struct<{
27
+ groups: Schema.optionalWith<Schema.Array$<Schema.Struct<{
28
+ id: Schema.refine<string, typeof Schema.String>;
29
+ variant: Schema.optional<Schema.Literal<["default", "primary", "destructive", "ghost", "link"]>>;
30
+ }>>, {
31
+ default: () => never[];
32
+ }>;
33
+ items: Schema.optionalWith<Schema.Array$<Schema.Schema<import("../../../../actions/schema.js").RegistryItemValue | {
34
+ readonly disabled?: string | undefined;
35
+ readonly id: string;
36
+ readonly title: readonly [{
37
+ readonly locale: "zh";
38
+ readonly message: string;
39
+ }, ...{
40
+ readonly locale: "en" | "ja" | "ko";
41
+ readonly message: string;
42
+ }[]];
43
+ readonly icon?: string | undefined;
44
+ readonly hidden?: string | undefined;
45
+ readonly tooltip?: readonly [{
46
+ readonly locale: "zh";
47
+ readonly message: string;
48
+ }, ...{
49
+ readonly locale: "en" | "ja" | "ko";
50
+ readonly message: string;
51
+ }[]] | undefined;
52
+ readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
53
+ readonly action?: any;
54
+ readonly groupId: string;
55
+ readonly hideTitle?: boolean | undefined;
56
+ } | {
57
+ readonly id: string;
58
+ readonly title: readonly [{
59
+ readonly locale: "zh";
60
+ readonly message: string;
61
+ }, ...{
62
+ readonly locale: "en" | "ja" | "ko";
63
+ readonly message: string;
64
+ }[]];
65
+ readonly icon?: string | undefined;
66
+ readonly items: readonly (import("../../../../actions/schema.js").RegistrySubItemValue | {
67
+ readonly disabled?: string | undefined;
68
+ readonly id: string;
69
+ readonly title: readonly [{
70
+ readonly locale: "zh";
71
+ readonly message: string;
72
+ }, ...{
73
+ readonly locale: "en" | "ja" | "ko";
74
+ readonly message: string;
75
+ }[]];
76
+ readonly icon?: string | undefined;
77
+ readonly hidden?: string | undefined;
78
+ readonly tooltip?: readonly [{
79
+ readonly locale: "zh";
80
+ readonly message: string;
81
+ }, ...{
82
+ readonly locale: "en" | "ja" | "ko";
83
+ readonly message: string;
84
+ }[]] | undefined;
85
+ readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
86
+ readonly action?: any;
87
+ })[];
88
+ readonly groupId: string;
89
+ readonly hideTitle?: boolean | undefined;
90
+ }, import("../../../../actions/schema.js").RegistryItemValue | {
91
+ readonly id: string;
92
+ readonly title: readonly [{
93
+ readonly locale: "zh";
94
+ readonly message: string;
95
+ }, ...{
96
+ readonly locale: "en" | "ja" | "ko";
97
+ readonly message: string;
98
+ }[]];
99
+ readonly groupId: string;
100
+ readonly disabled?: string | undefined;
101
+ readonly icon?: string | undefined;
102
+ readonly hidden?: string | undefined;
103
+ readonly tooltip?: readonly [{
104
+ readonly locale: "zh";
105
+ readonly message: string;
106
+ }, ...{
107
+ readonly locale: "en" | "ja" | "ko";
108
+ readonly message: string;
109
+ }[]] | undefined;
110
+ readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
111
+ readonly action?: any;
112
+ readonly hideTitle?: boolean | undefined;
113
+ } | {
114
+ readonly id: string;
115
+ readonly title: readonly [{
116
+ readonly locale: "zh";
117
+ readonly message: string;
118
+ }, ...{
119
+ readonly locale: "en" | "ja" | "ko";
120
+ readonly message: string;
121
+ }[]];
122
+ readonly items: readonly (import("../../../../actions/schema.js").RegistrySubItemValue | {
123
+ readonly id: string;
124
+ readonly title: readonly [{
125
+ readonly locale: "zh";
126
+ readonly message: string;
127
+ }, ...{
128
+ readonly locale: "en" | "ja" | "ko";
129
+ readonly message: string;
130
+ }[]];
131
+ readonly disabled?: string | undefined;
132
+ readonly icon?: string | undefined;
133
+ readonly hidden?: string | undefined;
134
+ readonly tooltip?: readonly [{
135
+ readonly locale: "zh";
136
+ readonly message: string;
137
+ }, ...{
138
+ readonly locale: "en" | "ja" | "ko";
139
+ readonly message: string;
140
+ }[]] | undefined;
141
+ readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
142
+ readonly action?: any;
143
+ })[];
144
+ readonly groupId: string;
145
+ readonly icon?: string | undefined;
146
+ readonly hideTitle?: boolean | undefined;
147
+ }, never>>, {
148
+ default: () => never[];
149
+ }>;
150
+ size: Schema.optionalWith<Schema.Literal<["default", "sm", "xs"]>, {
151
+ default: () => "default";
152
+ }>;
153
+ gap: Schema.optionalWith<Schema.filter<Schema.filter<typeof Schema.Number>>, {
154
+ default: () => number;
155
+ }>;
156
+ style: Schema.optional<typeof Schema.String>;
157
+ }>>;
26
158
  title: Schema.TupleType<readonly [Schema.Struct<{
27
159
  locale: Schema.Literal<["zh"]>;
28
160
  message: Schema.SchemaClass<string, string, never>;
@@ -1,13 +1,29 @@
1
1
  import { Schema } from "effect";
2
2
  import { getProperty } from "dot-prop";
3
3
  import { Locale } from "../../../../../share/locale.js";
4
- import { CelRowAccess, derivedRowField, editableColumnFields, editableHeader } from "../../../utils/shared.js";
4
+ import { ActionSchemaFields } from "../../../../actions/schema.js";
5
+ import { CelRowAccess, derivedRowField, editableColumnFields, editableHeader, registerRowVariablesIfAbsent } from "../../../utils/shared.js";
5
6
  export const type = "com.shwfed.table.column.text-input";
6
7
  export const compatibilityDate = "2026-05-20";
7
8
  export const metadata = {
8
9
  name: "\u6587\u672C\u8F93\u5165",
9
10
  icon: "fluent:text-field-20-regular"
10
11
  };
12
+ function AddonActions(configure) {
13
+ const configureWithRow = (env) => {
14
+ configure(env);
15
+ registerRowVariablesIfAbsent(env);
16
+ };
17
+ const { groups, items, ...rest } = ActionSchemaFields(configureWithRow).fields;
18
+ return Schema.Struct({
19
+ ...rest,
20
+ groups: Schema.optionalWith(groups, { default: () => [] }),
21
+ items: Schema.optionalWith(items, { default: () => [] })
22
+ }).annotations({
23
+ title: "\u8F93\u5165\u6846\u5185\u6309\u94AE",
24
+ description: "\u5728\u8F93\u5165\u6846\u53F3\u4FA7\u5185\u5D4C\u4E00\u7EC4\u64CD\u4F5C\u6309\u94AE"
25
+ });
26
+ }
11
27
  export function schema(configure) {
12
28
  const CelBool = CelRowAccess(configure, { resultType: "bool" });
13
29
  return Schema.Struct({
@@ -30,7 +46,8 @@ export function schema(configure) {
30
46
  title: "\u53EA\u8BFB\u6761\u4EF6",
31
47
  description: "\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u7EAF\u6587\u672C\u5C55\u793A\u5F53\u524D\u503C"
32
48
  })),
33
- derived: derivedRowField(configure, "string")
49
+ derived: derivedRowField(configure, "string"),
50
+ addon: Schema.optional(AddonActions(configure))
34
51
  }).annotations({ title: "TextInputRenderer", description: "\u6587\u672C\u8F93\u5165\u6E32\u67D3\u5668\uFF08\u53EF\u7F16\u8F91\uFF09" });
35
52
  }
36
53
  export function defaults() {
@@ -94,12 +94,20 @@ const model = computed({
94
94
  >
95
95
  {{ model || "-" }}
96
96
  </span>
97
+ <!--
98
+ Idle border is faded to 30% so a whole grid of date cells reads as data,
99
+ not chrome — `hover:` / `focus-within:` snap it back to full so the active
100
+ cell stands out. Mirrors the `text-input` column exactly; routed to the
101
+ inner `InputGroup` via `input-class` because `class` lands on the
102
+ DatePicker's anchor wrapper, not the input.
103
+ -->
97
104
  <DatePicker
98
105
  v-else
99
106
  v-model="model"
100
107
  type="date"
101
108
  size="sm"
102
109
  class="w-full"
110
+ input-class="border-zinc-200/30 hover:border-zinc-200 focus-within:border-zinc-200 transition-colors ease-out duration-180"
103
111
  :format="column.format"
104
112
  :value-format="column.valueFormat"
105
113
  :placeholder="placeholderText"
@@ -0,0 +1,10 @@
1
+ type __VLS_ModelProps = {
2
+ modelValue: Record<string, any>;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ "update:modelValue": (value: Record<string, any>) => any;
6
+ }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
7
+ "onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
8
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;