@shwfed/config 2.9.13 → 2.10.0

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 +1553 -1112
  2. package/dist/module.json +1 -1
  3. package/dist/preview/assets/{FieldGroup.vue_vue_type_script_setup_true_lang-DZ_H-YRf.js → FieldGroup.vue_vue_type_script_setup_true_lang-CCaOWk_7.js} +1 -1
  4. package/dist/preview/assets/{badge-DoNuZh0A.js → badge-D9_7atSJ.js} +1 -1
  5. package/dist/preview/assets/{config-DTEJOYqA.js → config-B2d8SiPi.js} +1 -1
  6. package/dist/preview/assets/{config-D4rFsdGO.js → config-BLEovXei.js} +1 -1
  7. package/dist/preview/assets/{config-BrNZsgV0.js → config-Bf5Vckj3.js} +1 -1
  8. package/dist/preview/assets/{config-ugF_BOWz.js → config-Bk2VSNeu.js} +1 -1
  9. package/dist/preview/assets/{config-Cla0Qngs.js → config-C8lCItmz.js} +1 -1
  10. package/dist/preview/assets/{config-BDDuqAht.js → config-C9WPOoA7.js} +1 -1
  11. package/dist/preview/assets/{config-YGBoSq6x.js → config-CNKb25Qo.js} +1 -1
  12. package/dist/preview/assets/{config-CLsjWZz2.js → config-CQrqVV1U.js} +1 -1
  13. package/dist/preview/assets/{config-CIYui2J_.js → config-DWA385pD.js} +1 -1
  14. package/dist/preview/assets/{config-C6Cm7DWx.js → config-DYxMKhCU.js} +1 -1
  15. package/dist/preview/assets/{config-Bhc_Vu67.js → config-DZlaJUlF.js} +1 -1
  16. package/dist/preview/assets/{config-tdZMdIN3.js → config-DyPl6K2G.js} +1 -1
  17. package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-CgNXv26P.js → definition.vue_vue_type_script_setup_true_lang-CFzQ7icU.js} +1 -1
  18. package/dist/preview/assets/index-7BE56IYF.js +739 -0
  19. package/dist/preview/assets/{index-CzzwZ7bp.css → index-BnJ5p1Mx.css} +1 -1
  20. package/dist/preview/assets/index-Bwv0Yz_L.js +1 -0
  21. package/dist/preview/assets/{index-C3FdepLE.js → index-CXOEVGFP.js} +1 -1
  22. package/dist/preview/assets/{item-DecwNzYq.js → item-DCVX69_o.js} +1 -1
  23. package/dist/preview/assets/{runtime-C3dmOj9s.js → runtime-BD1A-g1h.js} +1 -1
  24. package/dist/preview/assets/{runtime-C8Ufkmiw.js → runtime-BNk4EliL.js} +1 -1
  25. package/dist/preview/assets/{runtime-BK7KNEyN.js → runtime-BO-KY3T_.js} +1 -1
  26. package/dist/preview/assets/{runtime-DZ_AwduQ.js → runtime-BsNSI1XP.js} +1 -1
  27. package/dist/preview/assets/{runtime-blb90Fhv.js → runtime-Cbc5NH57.js} +1 -1
  28. package/dist/preview/assets/{runtime-CYpXd7Pq.js → runtime-DEWGIyvr.js} +1 -1
  29. package/dist/preview/assets/{runtime-CjPtRd-T.js → runtime-DJ9ElxWB.js} +1 -1
  30. package/dist/preview/assets/{runtime-C5hqSHRW.js → runtime-DSfMvph3.js} +1 -1
  31. package/dist/preview/assets/{runtime-DSUjc0Pk.js → runtime-O6MNC3GA.js} +1 -1
  32. package/dist/preview/assets/{runtime-DtP98Km5.js → runtime-r1wbrr4k.js} +1 -1
  33. package/dist/preview/assets/{schema-meta-DWUHNP8E.js → schema-meta-ovcuERKg.js} +1 -1
  34. package/dist/preview/index.html +2 -2
  35. package/dist/runtime/components/actions/components/triggers-field.vue +12 -12
  36. package/dist/runtime/components/config/use-editor.js +1 -1
  37. package/dist/runtime/components/config/utils/validation-error.d.ts +1 -1
  38. package/dist/runtime/components/config/utils/validation-error.js +40 -7
  39. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/runtime.vue +3 -3
  40. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/runtime.vue +6 -5
  41. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/runtime.vue +6 -5
  42. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/runtime.vue +10 -8
  43. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/runtime.vue +8 -6
  44. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue +10 -8
  45. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/runtime.vue +8 -6
  46. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/runtime.vue +10 -8
  47. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/runtime.vue +7 -5
  48. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/runtime.vue +8 -6
  49. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/runtime.vue +7 -6
  50. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/runtime.vue +9 -7
  51. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/runtime.vue +4 -3
  52. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/runtime.vue +8 -6
  53. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/runtime.vue +5 -4
  54. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/runtime.vue +12 -10
  55. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/runtime.vue +5 -4
  56. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/runtime.vue +9 -7
  57. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue +9 -7
  58. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/runtime.vue +13 -15
  59. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/runtime.vue +8 -6
  60. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/runtime.vue +10 -8
  61. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/runtime.vue +10 -8
  62. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/runtime.vue +13 -14
  63. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/runtime.vue +13 -14
  64. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue +14 -12
  65. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue +14 -12
  66. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue +13 -14
  67. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue +13 -14
  68. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue +13 -15
  69. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue +15 -16
  70. package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/runtime.vue +8 -7
  71. package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/config.d.vue.ts +175 -0
  72. package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/config.vue +782 -0
  73. package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/config.vue.d.ts +175 -0
  74. package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/runtime.d.vue.ts +8 -0
  75. package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/runtime.vue +413 -0
  76. package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/runtime.vue.d.ts +8 -0
  77. package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/schema.d.ts +214 -0
  78. package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/schema.js +191 -0
  79. package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/config.d.vue.ts +175 -0
  80. package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/config.vue +782 -0
  81. package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/config.vue.d.ts +175 -0
  82. package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/runtime.d.vue.ts +8 -0
  83. package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/runtime.vue +426 -0
  84. package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/runtime.vue.d.ts +8 -0
  85. package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/schema.d.ts +214 -0
  86. package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/schema.js +191 -0
  87. package/dist/runtime/components/form/fields/2026-06-14/combobox-migrate.d.ts +18 -0
  88. package/dist/runtime/components/form/fields/2026-06-14/combobox-migrate.js +36 -0
  89. package/dist/runtime/components/form/utils/state.d.ts +11 -0
  90. package/dist/runtime/components/form/utils/state.js +5 -0
  91. package/dist/runtime/components/ui/input-group/InputGroupNumberField.vue +1 -1
  92. package/dist/runtime/share/expression.js +1 -0
  93. package/package.json +1 -1
  94. package/dist/preview/assets/index-B-QhiviS.js +0 -1
  95. package/dist/preview/assets/index-CWMhB7z4.js +0 -735
@@ -12,14 +12,15 @@ import { Markdown } from "../../../../ui/markdown";
12
12
  import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
13
13
  import { useFieldValidation } from "../../../utils/validation";
14
14
  import { useFormReadonly } from "../../../utils/readonly";
15
- import { useFormState } from "../../../utils/state";
15
+ import { useFormScope, useFormState } from "../../../utils/state";
16
16
  defineOptions({ name: "ShwfedDateRangeFieldRuntime" });
17
17
  const props = defineProps({
18
18
  fieldId: { type: String, required: true },
19
19
  config: { type: null, required: true }
20
20
  });
21
21
  const { locale } = useI18n();
22
- const { state, getAt, setAt } = useFormState();
22
+ const { getAt, setAt } = useFormState();
23
+ const formScope = useFormScope();
23
24
  const inherited = injectCELContext();
24
25
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
25
26
  const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
@@ -35,7 +36,7 @@ const tooltipText = computed(
35
36
  function evalBool(expression, label) {
36
37
  if (!expression) return false;
37
38
  try {
38
- return Effect.runSync($cel(expression, { form: state.value ?? {} }));
39
+ return Effect.runSync($cel(expression, { form: formScope.state.value ?? {} }));
39
40
  } catch (err) {
40
41
  console.error(`[shwfed-form] failed to evaluate ${label} for ${props.fieldId}:`, err);
41
42
  return false;
@@ -57,8 +58,8 @@ const shortcuts = computed(() => {
57
58
  name: preset.label,
58
59
  value: () => {
59
60
  try {
60
- const start = Effect.runSync($cel(preset.start, { form: state.value ?? {} }));
61
- const end = Effect.runSync($cel(preset.end, { form: state.value ?? {} }));
61
+ const start = Effect.runSync($cel(preset.start, { form: formScope.state.value ?? {} }));
62
+ const end = Effect.runSync($cel(preset.end, { form: formScope.state.value ?? {} }));
62
63
  return [
63
64
  formatDate(start, resolvedValueFormat.value),
64
65
  formatDate(end, resolvedValueFormat.value)
@@ -113,7 +114,7 @@ const { isRequired, errors, warnings, visible } = useFieldValidation({
113
114
  });
114
115
  const readonlyText = computed(() => {
115
116
  const v = model.value;
116
- if (!v) return "\u2014";
117
+ if (!v) return null;
117
118
  return `${v[0]} ~ ${v[1]}`;
118
119
  });
119
120
  </script>
@@ -145,9 +146,10 @@ const readonlyText = computed(() => {
145
146
  </FieldLabel>
146
147
  <div
147
148
  v-if="effectiveReadonly"
148
- class="min-h-9 py-1.5 text-sm text-zinc-700"
149
+ class="min-h-9 py-1.5 text-sm"
150
+ :class="readonlyText ? 'text-zinc-700' : 'font-mono text-zinc-300 select-none'"
149
151
  >
150
- {{ readonlyText }}
152
+ {{ readonlyText || "-" }}
151
153
  </div>
152
154
  <DateRangePicker
153
155
  v-else
@@ -12,14 +12,15 @@ import { Markdown } from "../../../../ui/markdown";
12
12
  import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
13
13
  import { useFieldValidation } from "../../../utils/validation";
14
14
  import { useFormReadonly } from "../../../utils/readonly";
15
- import { useFormState } from "../../../utils/state";
15
+ import { useFormScope, useFormState } from "../../../utils/state";
16
16
  defineOptions({ name: "ShwfedDateTimeFieldRuntime" });
17
17
  const props = defineProps({
18
18
  fieldId: { type: String, required: true },
19
19
  config: { type: null, required: true }
20
20
  });
21
21
  const { locale } = useI18n();
22
- const { state, getAt, setAt } = useFormState();
22
+ const { getAt, setAt } = useFormState();
23
+ const formScope = useFormScope();
23
24
  const inherited = injectCELContext();
24
25
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
25
26
  const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
@@ -32,7 +33,7 @@ const tooltipText = computed(
32
33
  function evalBool(expression, label) {
33
34
  if (!expression) return false;
34
35
  try {
35
- return Effect.runSync($cel(expression, { form: state.value ?? {} }));
36
+ return Effect.runSync($cel(expression, { form: formScope.state.value ?? {} }));
36
37
  } catch (err) {
37
38
  console.error(`[shwfed-form] failed to evaluate ${label} for ${props.fieldId}:`, err);
38
39
  return false;
@@ -54,7 +55,7 @@ const shortcuts = computed(() => {
54
55
  name: preset.label,
55
56
  value: () => {
56
57
  try {
57
- const d = Effect.runSync($cel(preset.value, { form: state.value ?? {} }));
58
+ const d = Effect.runSync($cel(preset.value, { form: formScope.state.value ?? {} }));
58
59
  return formatDate(d, resolvedValueFormat.value);
59
60
  } catch (err) {
60
61
  console.error(`[shwfed-form] failed to evaluate preset "${preset.value}" for ${props.fieldId}:`, err);
@@ -115,9 +116,10 @@ const { isRequired, errors, warnings, visible } = useFieldValidation({
115
116
  </FieldLabel>
116
117
  <div
117
118
  v-if="effectiveReadonly"
118
- class="min-h-9 py-1.5 text-sm text-zinc-700"
119
+ class="min-h-9 py-1.5 text-sm"
120
+ :class="model ? 'text-zinc-700' : 'font-mono text-zinc-300 select-none'"
119
121
  >
120
- {{ model || "\u2014" }}
122
+ {{ model || "-" }}
121
123
  </div>
122
124
  <DatePicker
123
125
  v-else
@@ -12,14 +12,15 @@ import { Markdown } from "../../../../ui/markdown";
12
12
  import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
13
13
  import { useFieldValidation } from "../../../utils/validation";
14
14
  import { useFormReadonly } from "../../../utils/readonly";
15
- import { useFormState } from "../../../utils/state";
15
+ import { useFormScope, useFormState } from "../../../utils/state";
16
16
  defineOptions({ name: "ShwfedDateTimeRangeFieldRuntime" });
17
17
  const props = defineProps({
18
18
  fieldId: { type: String, required: true },
19
19
  config: { type: null, required: true }
20
20
  });
21
21
  const { locale } = useI18n();
22
- const { state, getAt, setAt } = useFormState();
22
+ const { getAt, setAt } = useFormState();
23
+ const formScope = useFormScope();
23
24
  const inherited = injectCELContext();
24
25
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
25
26
  const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
@@ -35,7 +36,7 @@ const tooltipText = computed(
35
36
  function evalBool(expression, label) {
36
37
  if (!expression) return false;
37
38
  try {
38
- return Effect.runSync($cel(expression, { form: state.value ?? {} }));
39
+ return Effect.runSync($cel(expression, { form: formScope.state.value ?? {} }));
39
40
  } catch (err) {
40
41
  console.error(`[shwfed-form] failed to evaluate ${label} for ${props.fieldId}:`, err);
41
42
  return false;
@@ -57,8 +58,8 @@ const shortcuts = computed(() => {
57
58
  name: preset.label,
58
59
  value: () => {
59
60
  try {
60
- const start = Effect.runSync($cel(preset.start, { form: state.value ?? {} }));
61
- const end = Effect.runSync($cel(preset.end, { form: state.value ?? {} }));
61
+ const start = Effect.runSync($cel(preset.start, { form: formScope.state.value ?? {} }));
62
+ const end = Effect.runSync($cel(preset.end, { form: formScope.state.value ?? {} }));
62
63
  return [
63
64
  formatDate(start, resolvedValueFormat.value),
64
65
  formatDate(end, resolvedValueFormat.value)
@@ -113,7 +114,7 @@ const { isRequired, errors, warnings, visible } = useFieldValidation({
113
114
  });
114
115
  const readonlyText = computed(() => {
115
116
  const v = model.value;
116
- if (!v) return "\u2014";
117
+ if (!v) return null;
117
118
  return `${v[0]} ~ ${v[1]}`;
118
119
  });
119
120
  </script>
@@ -145,9 +146,10 @@ const readonlyText = computed(() => {
145
146
  </FieldLabel>
146
147
  <div
147
148
  v-if="effectiveReadonly"
148
- class="min-h-9 py-1.5 text-sm text-zinc-700"
149
+ class="min-h-9 py-1.5 text-sm"
150
+ :class="readonlyText ? 'text-zinc-700' : 'font-mono text-zinc-300 select-none'"
149
151
  >
150
- {{ readonlyText }}
152
+ {{ readonlyText || "-" }}
151
153
  </div>
152
154
  <DateRangePicker
153
155
  v-else
@@ -11,14 +11,15 @@ import { Markdown } from "../../../../ui/markdown";
11
11
  import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
12
12
  import { useFieldValidation } from "../../../utils/validation";
13
13
  import { useFormReadonly } from "../../../utils/readonly";
14
- import { useFormState } from "../../../utils/state";
14
+ import { useFormScope, useFormState } from "../../../utils/state";
15
15
  defineOptions({ name: "ShwfedTimeFieldRuntime" });
16
16
  const props = defineProps({
17
17
  fieldId: { type: String, required: true },
18
18
  config: { type: null, required: true }
19
19
  });
20
20
  const { locale } = useI18n();
21
- const { state, getAt, setAt } = useFormState();
21
+ const { getAt, setAt } = useFormState();
22
+ const formScope = useFormScope();
22
23
  const inherited = injectCELContext();
23
24
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
24
25
  const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
@@ -28,7 +29,7 @@ const tooltipText = computed(
28
29
  function evalBool(expression, label) {
29
30
  if (!expression) return false;
30
31
  try {
31
- return Effect.runSync($cel(expression, { form: state.value ?? {} }));
32
+ return Effect.runSync($cel(expression, { form: formScope.state.value ?? {} }));
32
33
  } catch (err) {
33
34
  console.error(`[shwfed-form] failed to evaluate ${label} for ${props.fieldId}:`, err);
34
35
  return false;
@@ -92,9 +93,10 @@ const { isRequired, errors, warnings, visible } = useFieldValidation({
92
93
  </FieldLabel>
93
94
  <div
94
95
  v-if="effectiveReadonly"
95
- class="min-h-9 py-1.5 text-sm text-zinc-700"
96
+ class="min-h-9 py-1.5 text-sm"
97
+ :class="model ? 'text-zinc-700' : 'font-mono text-zinc-300 select-none'"
96
98
  >
97
- {{ model || "\u2014" }}
99
+ {{ model || "-" }}
98
100
  </div>
99
101
  <DatePicker
100
102
  v-else
@@ -11,14 +11,15 @@ import { Markdown } from "../../../../ui/markdown";
11
11
  import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
12
12
  import { useFieldValidation } from "../../../utils/validation";
13
13
  import { useFormReadonly } from "../../../utils/readonly";
14
- import { useFormState } from "../../../utils/state";
14
+ import { useFormScope, useFormState } from "../../../utils/state";
15
15
  defineOptions({ name: "ShwfedTimeRangeFieldRuntime" });
16
16
  const props = defineProps({
17
17
  fieldId: { type: String, required: true },
18
18
  config: { type: null, required: true }
19
19
  });
20
20
  const { locale } = useI18n();
21
- const { state, getAt, setAt } = useFormState();
21
+ const { getAt, setAt } = useFormState();
22
+ const formScope = useFormScope();
22
23
  const inherited = injectCELContext();
23
24
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
24
25
  const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
@@ -28,7 +29,7 @@ const tooltipText = computed(
28
29
  function evalBool(expression, label) {
29
30
  if (!expression) return false;
30
31
  try {
31
- return Effect.runSync($cel(expression, { form: state.value ?? {} }));
32
+ return Effect.runSync($cel(expression, { form: formScope.state.value ?? {} }));
32
33
  } catch (err) {
33
34
  console.error(`[shwfed-form] failed to evaluate ${label} for ${props.fieldId}:`, err);
34
35
  return false;
@@ -83,7 +84,7 @@ const { isRequired, errors, warnings, visible } = useFieldValidation({
83
84
  });
84
85
  const readonlyText = computed(() => {
85
86
  const v = model.value;
86
- if (!v) return "\u2014";
87
+ if (!v) return null;
87
88
  return `${v[0]} ~ ${v[1]}`;
88
89
  });
89
90
  </script>
@@ -115,9 +116,10 @@ const readonlyText = computed(() => {
115
116
  </FieldLabel>
116
117
  <div
117
118
  v-if="effectiveReadonly"
118
- class="min-h-9 py-1.5 text-sm text-zinc-700"
119
+ class="min-h-9 py-1.5 text-sm"
120
+ :class="readonlyText ? 'text-zinc-700' : 'font-mono text-zinc-300 select-none'"
119
121
  >
120
- {{ readonlyText }}
122
+ {{ readonlyText || "-" }}
121
123
  </div>
122
124
  <DateRangePicker
123
125
  v-else
@@ -13,14 +13,14 @@ import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
13
13
  import { useFieldValue } from "../../../utils/field-value";
14
14
  import { useFieldValidation } from "../../../utils/validation";
15
15
  import { useFormReadonly } from "../../../utils/readonly";
16
- import { useFormState } from "../../../utils/state";
16
+ import { useFormScope } from "../../../utils/state";
17
17
  defineOptions({ name: "ShwfedNumberFieldRuntime" });
18
18
  const props = defineProps({
19
19
  fieldId: { type: String, required: true },
20
20
  config: { type: null, required: true }
21
21
  });
22
22
  const { locale } = useI18n();
23
- const { state } = useFormState();
23
+ const formScope = useFormScope();
24
24
  const inherited = injectCELContext();
25
25
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
26
26
  const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
@@ -33,7 +33,7 @@ const tooltipText = computed(
33
33
  function evalBool(expression, label) {
34
34
  if (!expression) return false;
35
35
  try {
36
- return Effect.runSync($cel(expression, { form: state.value ?? {} }));
36
+ return Effect.runSync($cel(expression, { form: formScope.state.value ?? {} }));
37
37
  } catch (err) {
38
38
  console.error(`[shwfed-form] failed to evaluate ${label} for ${props.fieldId}:`, err);
39
39
  return false;
@@ -42,7 +42,7 @@ function evalBool(expression, label) {
42
42
  function evalNumber(expression, label) {
43
43
  if (!expression) return void 0;
44
44
  try {
45
- const result = Effect.runSync($cel(expression, { form: state.value ?? {} }));
45
+ const result = Effect.runSync($cel(expression, { form: formScope.state.value ?? {} }));
46
46
  return typeof result === "number" && Number.isFinite(result) ? result : void 0;
47
47
  } catch (err) {
48
48
  console.error(`[shwfed-form] failed to evaluate ${label} for ${props.fieldId}:`, err);
@@ -139,9 +139,10 @@ async function onBlur() {
139
139
  </FieldLabel>
140
140
  <div
141
141
  v-if="effectiveReadonly"
142
- class="min-h-9 py-1.5 text-sm text-zinc-700"
142
+ class="min-h-9 py-1.5 text-sm"
143
+ :class="draft != null ? 'text-zinc-700' : 'font-mono text-zinc-300 select-none'"
143
144
  >
144
- {{ draft ?? "\u2014" }}
145
+ {{ draft ?? "-" }}
145
146
  </div>
146
147
  <InputGroup
147
148
  v-else
@@ -13,14 +13,15 @@ import { useCommitBus } from "../../../utils/commit-bus";
13
13
  import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
14
14
  import { useFieldValidation } from "../../../utils/validation";
15
15
  import { useFormReadonly } from "../../../utils/readonly";
16
- import { useFormState } from "../../../utils/state";
16
+ import { useFormScope, useFormState } from "../../../utils/state";
17
17
  defineOptions({ name: "ShwfedNumberRangeFieldRuntime" });
18
18
  const props = defineProps({
19
19
  fieldId: { type: String, required: true },
20
20
  config: { type: null, required: true }
21
21
  });
22
22
  const { locale } = useI18n();
23
- const { state, getAt, setAt } = useFormState();
23
+ const { getAt, setAt } = useFormState();
24
+ const formScope = useFormScope();
24
25
  const inherited = injectCELContext();
25
26
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
26
27
  const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
@@ -36,7 +37,7 @@ const tooltipText = computed(
36
37
  function evalBool(expression, label) {
37
38
  if (!expression) return false;
38
39
  try {
39
- return Effect.runSync($cel(expression, { form: state.value ?? {} }));
40
+ return Effect.runSync($cel(expression, { form: formScope.state.value ?? {} }));
40
41
  } catch (err) {
41
42
  console.error(`[shwfed-form] failed to evaluate ${label} for ${props.fieldId}:`, err);
42
43
  return false;
@@ -45,7 +46,7 @@ function evalBool(expression, label) {
45
46
  function evalNumber(expression, label) {
46
47
  if (!expression) return void 0;
47
48
  try {
48
- const result = Effect.runSync($cel(expression, { form: state.value ?? {} }));
49
+ const result = Effect.runSync($cel(expression, { form: formScope.state.value ?? {} }));
49
50
  return typeof result === "number" && Number.isFinite(result) ? result : void 0;
50
51
  } catch (err) {
51
52
  console.error(`[shwfed-form] failed to evaluate ${label} for ${props.fieldId}:`, err);
@@ -189,7 +190,7 @@ function handleClear() {
189
190
  }
190
191
  const readonlyText = computed(() => {
191
192
  const v = model.value;
192
- if (!v) return "\u2014";
193
+ if (!v) return null;
193
194
  return `${v[0]} ~ ${v[1]}`;
194
195
  });
195
196
  </script>
@@ -221,9 +222,10 @@ const readonlyText = computed(() => {
221
222
  </FieldLabel>
222
223
  <div
223
224
  v-if="effectiveReadonly"
224
- class="min-h-9 py-1.5 text-sm text-zinc-700"
225
+ class="min-h-9 py-1.5 text-sm"
226
+ :class="readonlyText ? 'text-zinc-700' : 'font-mono text-zinc-300 select-none'"
225
227
  >
226
- {{ readonlyText }}
228
+ {{ readonlyText || "-" }}
227
229
  </div>
228
230
  <InputGroup
229
231
  v-else
@@ -10,14 +10,15 @@ import { Markdown } from "../../../../ui/markdown";
10
10
  import { Switch } from "../../../../ui/switch";
11
11
  import { useFieldValidation } from "../../../utils/validation";
12
12
  import { useFormReadonly } from "../../../utils/readonly";
13
- import { useFormState } from "../../../utils/state";
13
+ import { useFormScope, useFormState } from "../../../utils/state";
14
14
  defineOptions({ name: "ShwfedSwitchFieldRuntime" });
15
15
  const props = defineProps({
16
16
  fieldId: { type: String, required: true },
17
17
  config: { type: null, required: true }
18
18
  });
19
19
  const { locale } = useI18n();
20
- const { state, getAt, setAt } = useFormState();
20
+ const { getAt, setAt } = useFormState();
21
+ const formScope = useFormScope();
21
22
  const inherited = injectCELContext();
22
23
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
23
24
  const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
@@ -33,7 +34,7 @@ const falseText = computed(
33
34
  function evalBool(expression, label) {
34
35
  if (!expression) return false;
35
36
  try {
36
- return Effect.runSync($cel(expression, { form: state.value ?? {} }));
37
+ return Effect.runSync($cel(expression, { form: formScope.state.value ?? {} }));
37
38
  } catch (err) {
38
39
  console.error(`[shwfed-form] failed to evaluate ${label} for ${props.fieldId}:`, err);
39
40
  return false;
@@ -21,7 +21,7 @@ import { Markdown } from "../../../../ui/markdown";
21
21
  import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "../../../../ui/popover";
22
22
  import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
23
23
  import { useFormReadonly } from "../../../utils/readonly";
24
- import { useFormState } from "../../../utils/state";
24
+ import { useFormScope, useFormState } from "../../../utils/state";
25
25
  defineOptions({ name: "ShwfedComboboxSingleFieldRuntime" });
26
26
  const props = defineProps({
27
27
  fieldId: { type: String, required: true },
@@ -47,7 +47,8 @@ const { locale, t } = useI18n({
47
47
  }
48
48
  }
49
49
  });
50
- const { state, getAt, setAt } = useFormState();
50
+ const { getAt, setAt } = useFormState();
51
+ const formScope = useFormScope();
51
52
  const inherited = injectCELContext();
52
53
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
53
54
  const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
@@ -60,7 +61,7 @@ const tooltipText = computed(
60
61
  function evalBool(expression, label) {
61
62
  if (!expression) return false;
62
63
  try {
63
- return Effect.runSync($cel(expression, { form: state.value ?? {} }));
64
+ return Effect.runSync($cel(expression, { form: formScope.state.value ?? {} }));
64
65
  } catch (err) {
65
66
  console.error(`[shwfed-form] failed to evaluate ${label} for ${props.fieldId}:`, err);
66
67
  return false;
@@ -84,7 +85,7 @@ const entries = computed(
84
85
  () => (props.config.items ?? []).map((item) => {
85
86
  const labelTpl = getLocalizedText(item.label, locale.value) ?? "";
86
87
  const tooltipTpl = item.tooltip ? getLocalizedText(item.tooltip, locale.value) : void 0;
87
- const ctx = { form: state.value ?? {} };
88
+ const ctx = { form: formScope.state.value ?? {} };
88
89
  return {
89
90
  key: item.id,
90
91
  value: item.value.value,
@@ -179,9 +180,10 @@ const anyHasTooltip = computed(
179
180
  </FieldLabel>
180
181
  <div
181
182
  v-if="effectiveReadonly"
182
- class="min-h-9 py-1.5 text-sm text-zinc-700"
183
+ class="min-h-9 py-1.5 text-sm"
184
+ :class="selectedLabel ? 'text-zinc-700' : 'font-mono text-zinc-300 select-none'"
183
185
  >
184
- {{ selectedLabel || "\u2014" }}
186
+ {{ selectedLabel || "-" }}
185
187
  </div>
186
188
  <Popover
187
189
  v-else
@@ -14,7 +14,7 @@ import { Markdown } from "../../../../ui/markdown";
14
14
  import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
15
15
  import { useFieldValidation } from "../../../utils/validation";
16
16
  import { useFormReadonly } from "../../../utils/readonly";
17
- import { useFormState } from "../../../utils/state";
17
+ import { useFormScope, useFormState } from "../../../utils/state";
18
18
  const ICONS = {
19
19
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "vscode-icons:file-type-excel",
20
20
  "application/vnd.ms-excel": "vscode-icons:file-type-excel",
@@ -85,7 +85,8 @@ const { locale, t } = useI18n({
85
85
  }
86
86
  }
87
87
  });
88
- const { state, getAt, setAt } = useFormState();
88
+ const { getAt, setAt } = useFormState();
89
+ const formScope = useFormScope();
89
90
  const inherited = injectCELContext();
90
91
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
91
92
  const labelText = computed(
@@ -103,7 +104,7 @@ const templateLabelText = computed(
103
104
  function evalBool(expression, label) {
104
105
  if (!expression) return false;
105
106
  try {
106
- return Effect.runSync($cel(expression, { form: state.value ?? {} }));
107
+ return Effect.runSync($cel(expression, { form: formScope.state.value ?? {} }));
107
108
  } catch (err) {
108
109
  console.error(`[shwfed-form] failed to evaluate ${label} for ${props.fieldId}:`, err);
109
110
  return false;
@@ -225,7 +226,7 @@ const templateIcon = computed(() => props.config.templateIcon ?? "fluent:arrow-d
225
226
  async function onDownloadTemplate() {
226
227
  const template = props.config.template;
227
228
  if (!template) return;
228
- const ctx = { form: state.value ?? {} };
229
+ const ctx = { form: formScope.state.value ?? {} };
229
230
  const program = Effect.gen(function* () {
230
231
  const requestBuilder = yield* $cel(template.request, ctx);
231
232
  if (!template.download) {
@@ -25,7 +25,7 @@ import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "../../..
25
25
  import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
26
26
  import { useFieldValidation } from "../../../utils/validation";
27
27
  import { useFormReadonly } from "../../../utils/readonly";
28
- import { useFormState } from "../../../utils/state";
28
+ import { useFormScope, useFormState } from "../../../utils/state";
29
29
  defineOptions({ name: "ShwfedComboboxSingleRemoteFieldRuntime" });
30
30
  const props = defineProps({
31
31
  fieldId: { type: String, required: true },
@@ -51,7 +51,8 @@ const { locale, t } = useI18n({
51
51
  }
52
52
  }
53
53
  });
54
- const { state, getAt, setAt, setAtSilent } = useFormState();
54
+ const { getAt, setAt, setAtSilent } = useFormState();
55
+ const formScope = useFormScope();
55
56
  const inherited = injectCELContext();
56
57
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
57
58
  const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
@@ -64,7 +65,7 @@ const tooltipText = computed(
64
65
  function evalBool(expression, label) {
65
66
  if (!expression) return false;
66
67
  try {
67
- return Effect.runSync($cel(expression, { form: state.value ?? {} }));
68
+ return Effect.runSync($cel(expression, { form: formScope.state.value ?? {} }));
68
69
  } catch (err) {
69
70
  console.error(`[shwfed-form] failed to evaluate ${label} for ${props.fieldId}:`, err);
70
71
  return false;
@@ -84,7 +85,7 @@ const isReadonly = computed(
84
85
  const effectiveReadonly = computed(() => isReadonly.value || props.config.derived?.mode === "formula");
85
86
  function valueOf(option) {
86
87
  try {
87
- return Effect.runSync($cel(props.config.optionValue, { form: state.value ?? {}, option }));
88
+ return Effect.runSync($cel(props.config.optionValue, { form: formScope.state.value ?? {}, option }));
88
89
  } catch (err) {
89
90
  console.error(`[shwfed-form] failed to evaluate optionValue for ${props.fieldId}:`, err);
90
91
  return void 0;
@@ -93,7 +94,7 @@ function valueOf(option) {
93
94
  function labelOf(option) {
94
95
  const tpl = getLocalizedText(props.config.optionLabel, locale.value) ?? "";
95
96
  if (!tpl) return "";
96
- return interpolateMarkdown(tpl, $cel, { form: state.value ?? {}, option });
97
+ return interpolateMarkdown(tpl, $cel, { form: formScope.state.value ?? {}, option });
97
98
  }
98
99
  const json = ref(null);
99
100
  const isLoading = ref(false);
@@ -101,7 +102,7 @@ const requestSignature = computed(() => {
101
102
  const expr = props.config.request;
102
103
  if (!expr) return null;
103
104
  try {
104
- const req = asRequest(Effect.runSync($cel(expr, { form: state.value ?? {} })));
105
+ const req = asRequest(Effect.runSync($cel(expr, { form: formScope.state.value ?? {} })));
105
106
  return Option.isSome(req) ? JSON.stringify(req.value.describe()) : null;
106
107
  } catch {
107
108
  return null;
@@ -118,7 +119,7 @@ async function fetchOptions() {
118
119
  const expr = props.config.request;
119
120
  isLoading.value = true;
120
121
  const program = Effect.gen(function* () {
121
- const body = yield* fetchJsonOption(yield* $cel(expr, { form: state.value ?? {} }));
122
+ const body = yield* fetchJsonOption(yield* $cel(expr, { form: formScope.state.value ?? {} }));
122
123
  return Option.getOrNull(body);
123
124
  });
124
125
  try {
@@ -133,7 +134,7 @@ async function fetchOptions() {
133
134
  const entries = computed(() => {
134
135
  let raw;
135
136
  try {
136
- raw = Effect.runSync($cel(props.config.options, { form: state.value ?? {}, json: json.value }));
137
+ raw = Effect.runSync($cel(props.config.options, { form: formScope.state.value ?? {}, json: json.value }));
137
138
  } catch (err) {
138
139
  console.error(`[shwfed-form] failed to evaluate options for ${props.fieldId}:`, err);
139
140
  return [];
@@ -238,14 +239,15 @@ function handleClear() {
238
239
  </FieldLabel>
239
240
  <div
240
241
  v-if="effectiveReadonly"
241
- class="min-h-9 py-1.5 text-sm text-zinc-700"
242
+ class="min-h-9 py-1.5 text-sm"
243
+ :class="selectedLabel ? 'text-zinc-700' : 'font-mono text-zinc-300 select-none'"
242
244
  >
243
245
  <Markdown
244
246
  v-if="selectedLabel"
245
247
  :source="selectedLabel"
246
248
  />
247
249
  <template v-else>
248
-
250
+ -
249
251
  </template>
250
252
  </div>
251
253
  <Popover
@@ -15,7 +15,7 @@ import { Field, FieldLabel, FieldMessages } from "../../../../ui/field";
15
15
  import { InputGroupButton } from "../../../../ui/input-group";
16
16
  import { Markdown } from "../../../../ui/markdown";
17
17
  import { useFieldValidation } from "../../../utils/validation";
18
- import { SELF_BINDING, useFormState } from "../../../utils/state";
18
+ import { SELF_BINDING, useFormScope, useFormState } from "../../../utils/state";
19
19
  import Row from "./row.vue";
20
20
  defineOptions({ name: "ShwfedListFieldRuntime" });
21
21
  const props = defineProps({
@@ -23,7 +23,8 @@ const props = defineProps({
23
23
  config: { type: null, required: true }
24
24
  });
25
25
  const { locale } = useI18n();
26
- const { state, getAt, setAt } = useFormState();
26
+ const { getAt, setAt } = useFormState();
27
+ const formScope = useFormScope();
27
28
  const inherited = injectCELContext();
28
29
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
29
30
  const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
@@ -38,7 +39,7 @@ const collapsible = computed(() => !!summaryTemplate.value);
38
39
  function evalBool(expression, label) {
39
40
  if (!expression) return false;
40
41
  try {
41
- return Effect.runSync($cel(expression, { form: state.value ?? {} }));
42
+ return Effect.runSync($cel(expression, { form: formScope.state.value ?? {} }));
42
43
  } catch (err) {
43
44
  console.error(`[shwfed-form] failed to evaluate ${label} for ${props.fieldId}:`, err);
44
45
  return false;
@@ -73,7 +74,7 @@ const rowSummaries = computed(() => {
73
74
  (item, i) => interpolate(template, (expression) => {
74
75
  try {
75
76
  const out = Effect.runSync($cel(expression, {
76
- form: state.value ?? {},
77
+ form: formScope.state.value ?? {},
77
78
  item: item ?? {},
78
79
  index: i
79
80
  }));
@@ -11,7 +11,7 @@ import { Field, FieldLabel, FieldMessages } from "../../../../ui/field";
11
11
  import { Markdown } from "../../../../ui/markdown";
12
12
  import { useFieldValidation } from "../../../utils/validation";
13
13
  import { useFormReadonly } from "../../../utils/readonly";
14
- import { useFormState } from "../../../utils/state";
14
+ import { useFormScope, useFormState } from "../../../utils/state";
15
15
  defineOptions({ name: "ShwfedCheckboxGroupFieldRuntime" });
16
16
  const props = defineProps({
17
17
  fieldId: { type: String, required: true },
@@ -25,7 +25,8 @@ const { locale, t } = useI18n({
25
25
  ja: { "checkbox-group-empty": "\u9078\u629E\u80A2\u306A\u3057" }
26
26
  }
27
27
  });
28
- const { state, getAt, setAt } = useFormState();
28
+ const { getAt, setAt } = useFormState();
29
+ const formScope = useFormScope();
29
30
  const inherited = injectCELContext();
30
31
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
31
32
  const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
@@ -35,7 +36,7 @@ const tooltipText = computed(
35
36
  function evalBool(expression, label) {
36
37
  if (!expression) return false;
37
38
  try {
38
- return Effect.runSync($cel(expression, { form: state.value ?? {} }));
39
+ return Effect.runSync($cel(expression, { form: formScope.state.value ?? {} }));
39
40
  } catch (err) {
40
41
  console.error(`[shwfed-form] failed to evaluate ${label} for ${props.fieldId}:`, err);
41
42
  return false;
@@ -65,7 +66,7 @@ const entries = computed(
65
66
  () => (props.config.items ?? []).map((item) => {
66
67
  const labelTpl = getLocalizedText(item.label, locale.value) ?? "";
67
68
  const tooltipTpl = item.tooltip ? getLocalizedText(item.tooltip, locale.value) : void 0;
68
- const ctx = { form: state.value ?? {} };
69
+ const ctx = { form: formScope.state.value ?? {} };
69
70
  return {
70
71
  key: item.id,
71
72
  value: item.value.value,
@@ -115,7 +116,7 @@ function toggle(entry) {
115
116
  }
116
117
  const readonlyText = computed(() => {
117
118
  const labels = entries.value.filter(isChecked).map((e) => e.label).filter((l) => l.length > 0);
118
- return labels.join("\u3001") || "\u2014";
119
+ return labels.join("\u3001") || null;
119
120
  });
120
121
  </script>
121
122
 
@@ -145,9 +146,10 @@ const readonlyText = computed(() => {
145
146
  </FieldLabel>
146
147
  <div
147
148
  v-if="effectiveReadonly"
148
- class="min-h-9 py-1.5 text-sm text-zinc-700"
149
+ class="min-h-9 py-1.5 text-sm"
150
+ :class="readonlyText ? 'text-zinc-700' : 'font-mono text-zinc-300 select-none'"
149
151
  >
150
- {{ readonlyText }}
152
+ {{ readonlyText || "-" }}
151
153
  </div>
152
154
  <div
153
155
  v-else-if="entries.length === 0"