@shwfed/config 2.9.11 → 2.9.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 (61) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/preview/assets/{FieldGroup.vue_vue_type_script_setup_true_lang-CN4xD2hQ.js → FieldGroup.vue_vue_type_script_setup_true_lang-CpDhqXJp.js} +1 -1
  3. package/dist/preview/assets/{badge-CzfW1Ked.js → badge-Dsz2Rn8b.js} +1 -1
  4. package/dist/preview/assets/{config-jJQ2fulH.js → config-9-c5e5iP.js} +1 -1
  5. package/dist/preview/assets/{config-CCXJvpik.js → config-BCvaA0as.js} +1 -1
  6. package/dist/preview/assets/{config-jzfHh7bp.js → config-BePS5kQb.js} +1 -1
  7. package/dist/preview/assets/{config-Bzwfqv6w.js → config-CQLR1Zao.js} +1 -1
  8. package/dist/preview/assets/{config-CPuERNUd.js → config-CRD1MpEn.js} +1 -1
  9. package/dist/preview/assets/{config-DbNukLyq.js → config-DY7nQeRd.js} +1 -1
  10. package/dist/preview/assets/{config-e5aOGFb2.js → config-X6-9yQmS.js} +1 -1
  11. package/dist/preview/assets/{config-Op5IHwI_.js → config-Y2YuesjH.js} +1 -1
  12. package/dist/preview/assets/{config-D37gWDMV.js → config-bFWnH6k3.js} +1 -1
  13. package/dist/preview/assets/{config-C2y2XI2Q.js → config-hrBgOr32.js} +1 -1
  14. package/dist/preview/assets/{config-CDYZN7EX.js → config-if9TvUw2.js} +1 -1
  15. package/dist/preview/assets/{config-BdX3zl4t.js → config-vsMk-zRS.js} +1 -1
  16. package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-BgssDGxW.js → definition.vue_vue_type_script_setup_true_lang-CPrYbKjH.js} +1 -1
  17. package/dist/preview/assets/index-BoyzyftU.js +1 -0
  18. package/dist/preview/assets/{index-Cyjm-GKs.js → index-Bvlt8fEt.js} +144 -144
  19. package/dist/preview/assets/{index-CAIvIAWJ.js → index-DFRXx_kG.js} +1 -1
  20. package/dist/preview/assets/index-DJ5rzQJr.css +1 -0
  21. package/dist/preview/assets/{item-CUoRMMz1.js → item-auVJu6jy.js} +1 -1
  22. package/dist/preview/assets/{runtime-C_epees8.js → runtime-1DsatQOR.js} +1 -1
  23. package/dist/preview/assets/{runtime-wAz72cCJ.js → runtime-28a_li4U.js} +1 -1
  24. package/dist/preview/assets/{runtime-BvcTYin8.js → runtime-BDvuTpxY.js} +1 -1
  25. package/dist/preview/assets/{runtime-D3TnRYXn.js → runtime-CBDARlsK.js} +1 -1
  26. package/dist/preview/assets/{runtime-BALr-Cq0.js → runtime-CmgeUPz4.js} +1 -1
  27. package/dist/preview/assets/{runtime-V_usL1Fa.js → runtime-DaaQn8fX.js} +1 -1
  28. package/dist/preview/assets/{runtime-CWt21RRo.js → runtime-Do_KQ5le.js} +1 -1
  29. package/dist/preview/assets/{runtime-DWKqftSK.js → runtime-DyeSWij2.js} +1 -1
  30. package/dist/preview/assets/{runtime-CU5fYNMI.js → runtime-H7c112vi.js} +1 -1
  31. package/dist/preview/assets/{runtime-CHQwYQ80.js → runtime-_5B97gRO.js} +1 -1
  32. package/dist/preview/assets/{schema-meta-DwWuSVqk.js → schema-meta-Dc89aD6v.js} +1 -1
  33. package/dist/preview/index.html +2 -2
  34. package/dist/runtime/components/block-layout-editor/index.vue +10 -2
  35. package/dist/runtime/components/form/config.vue +38 -1
  36. package/dist/runtime/components/form/index.vue +8 -1
  37. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -2
  38. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -2
  39. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -2
  40. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -2
  41. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -2
  42. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -2
  43. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -2
  44. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -2
  45. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -2
  46. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -2
  47. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -2
  48. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -2
  49. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
  50. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
  51. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
  52. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
  53. package/dist/runtime/components/table/config.vue +8 -2
  54. package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue +2 -2
  55. package/dist/runtime/components/ui/expression-editor/picker-entries.d.ts +1 -0
  56. package/dist/runtime/components/ui/expression-editor/picker-entries.js +12 -0
  57. package/dist/runtime/components/ui/expression-editor/scope-refs.js +1 -1
  58. package/dist/runtime/utils/cel-context.d.ts +21 -0
  59. package/package.json +1 -1
  60. package/dist/preview/assets/index-0vF7XQ-J.js +0 -1
  61. package/dist/preview/assets/index-D0eGXK5P.css +0 -1
@@ -477,6 +477,7 @@ function sharedAlignment(axis) {
477
477
  }
478
478
  function beginDrag(kind, itemId, e) {
479
479
  if (e.button !== 0) return;
480
+ if (isSpaceHeld.value) return;
480
481
  const entry = placementEntries.value.find((p) => p.itemId === itemId);
481
482
  if (!entry) return;
482
483
  e.preventDefault();
@@ -976,7 +977,11 @@ function onCanvasKeydown(e) {
976
977
  class="field-block rounded-md"
977
978
  :class="[
978
979
  drag && drag.itemIds.includes(entry.itemId) ? ['shadow-sm backdrop-blur-sm z-50', dragInvalid ? 'bg-red-200/50' : 'bg-white/50'] : ['shadow-xs bg-white'],
979
- isSelected(entry.itemId) ? 'is-selected' : ''
980
+ isSelected(entry.itemId) ? 'is-selected' : '',
981
+ // Pan owns the pointer while Space is held: blocks sit on top of
982
+ // the plane as siblings, so they must let events fall through for
983
+ // the plane\'s pan mousedown (and grab cursor) to engage.
984
+ isSpaceHeld ? 'pan-through' : ''
980
985
  ]"
981
986
  :style="blockStyle(entry)"
982
987
  @mousedown="beginDrag('move', entry.itemId, $event)"
@@ -1542,5 +1547,8 @@ function onCanvasKeydown(e) {
1542
1547
  </template>
1543
1548
 
1544
1549
  <style scoped>
1545
- .field-block{border:1px solid #e4e4e7;cursor:move;position:absolute}.field-block.is-selected{border-color:var(--primary);box-shadow:0 0 0 1px var(--primary)}.frame-outline{border:1px dashed hsla(240,5%,84%,.7)}.resize-handle{background:transparent;position:absolute}.handle-n{top:-3px}.handle-n,.handle-s{cursor:ns-resize;height:6px;left:12px;right:12px}.handle-s{bottom:-3px}.handle-e{right:-3px}.handle-e,.handle-w{bottom:12px;cursor:ew-resize;top:12px;width:6px}.handle-w{left:-3px}.handle-nw{cursor:nwse-resize;left:-3px}.handle-ne,.handle-nw{height:10px;top:-3px;width:10px}.handle-ne{cursor:nesw-resize;right:-3px}.handle-sw{cursor:nesw-resize;left:-3px}.handle-se,.handle-sw{bottom:-3px;height:10px;width:10px}.handle-se{cursor:nwse-resize;right:-3px}.drill-button{align-items:center;background:transparent;border-radius:4px;color:#71717a;cursor:pointer;display:inline-flex;height:22px;justify-content:center;opacity:0;position:absolute;right:4px;top:4px;transition:opacity .12s ease,background-color .12s ease,color .12s ease;width:22px;z-index:5}.drill-button:focus-visible,.field-block:hover .drill-button{opacity:1}.drill-button:hover{background:#f4f4f5;color:var(--primary)}.gap-input :deep(input){text-align:center}.inline-config-pane{background:#fff;border-left:1px solid #e4e4e7;bottom:0;box-shadow:-4px 0 16px -8px rgba(0,0,0,.15);display:flex;flex-direction:column;position:absolute;right:0;top:0;-webkit-user-select:text;-moz-user-select:text;user-select:text;z-index:60}.inline-config-resizer{bottom:0;cursor:ew-resize;left:-3px;position:absolute;top:0;width:7px;z-index:1}.inline-config-resizer:after{background:transparent;bottom:0;content:"";left:3px;position:absolute;top:0;transition:background-color .12s ease;width:1px}.inline-config-resizer:hover:after{background:var(--primary)}.inline-config-header{align-items:center;border-bottom:1px solid #f4f4f5;display:flex;flex-shrink:0;gap:.5rem;padding:.5rem .5rem .5rem .75rem}.inline-config-close{align-items:center;border-radius:4px;color:#71717a;cursor:pointer;display:inline-flex;height:28px;justify-content:center;transition:background-color .12s ease,color .12s ease;width:28px}.inline-config-close:hover{background:#f4f4f5;color:#18181b}.inline-config-body{flex:1 1 0;min-height:0;overflow:auto;padding:1rem}.dist-indicator{align-items:center;color:#f87171;display:flex;justify-content:center;z-index:40}.dist-bottom,.dist-top{flex-direction:column}.dist-left,.dist-right{flex-direction:row}.dist-line{background:currentColor;flex:1 1 0}.dist-bottom .dist-line,.dist-top .dist-line{width:1px}.dist-left .dist-line,.dist-right .dist-line{height:1px}.dist-label{background:#fafafa;border-radius:2px;color:#f87171;font-size:10px;font-variant-numeric:tabular-nums;line-height:1;padding:1px 4px}
1550
+ .field-block{border:1px solid #e4e4e7;cursor:move;position:absolute}.field-block.is-selected{border-color:var(--primary);box-shadow:0 0 0 1px var(--primary)}
1551
+ /* !important because reka-ui's ContextMenuTrigger hardwires an inline
1552
+ `pointer-events: auto` on the trigger element — a plain utility class
1553
+ loses to it and the Space-held pan never sees the mousedown. */.field-block.pan-through{pointer-events:none!important}.frame-outline{border:1px dashed hsla(240,5%,84%,.7)}.resize-handle{background:transparent;position:absolute}.handle-n{top:-3px}.handle-n,.handle-s{cursor:ns-resize;height:6px;left:12px;right:12px}.handle-s{bottom:-3px}.handle-e{right:-3px}.handle-e,.handle-w{bottom:12px;cursor:ew-resize;top:12px;width:6px}.handle-w{left:-3px}.handle-nw{cursor:nwse-resize;left:-3px}.handle-ne,.handle-nw{height:10px;top:-3px;width:10px}.handle-ne{cursor:nesw-resize;right:-3px}.handle-sw{cursor:nesw-resize;left:-3px}.handle-se,.handle-sw{bottom:-3px;height:10px;width:10px}.handle-se{cursor:nwse-resize;right:-3px}.drill-button{align-items:center;background:transparent;border-radius:4px;color:#71717a;cursor:pointer;display:inline-flex;height:22px;justify-content:center;opacity:0;position:absolute;right:4px;top:4px;transition:opacity .12s ease,background-color .12s ease,color .12s ease;width:22px;z-index:5}.drill-button:focus-visible,.field-block:hover .drill-button{opacity:1}.drill-button:hover{background:#f4f4f5;color:var(--primary)}.gap-input :deep(input){text-align:center}.inline-config-pane{background:#fff;border-left:1px solid #e4e4e7;bottom:0;box-shadow:-4px 0 16px -8px rgba(0,0,0,.15);display:flex;flex-direction:column;position:absolute;right:0;top:0;-webkit-user-select:text;-moz-user-select:text;user-select:text;z-index:60}.inline-config-resizer{bottom:0;cursor:ew-resize;left:-3px;position:absolute;top:0;width:7px;z-index:1}.inline-config-resizer:after{background:transparent;bottom:0;content:"";left:3px;position:absolute;top:0;transition:background-color .12s ease;width:1px}.inline-config-resizer:hover:after{background:var(--primary)}.inline-config-header{align-items:center;border-bottom:1px solid #f4f4f5;display:flex;flex-shrink:0;gap:.5rem;padding:.5rem .5rem .5rem .75rem}.inline-config-close{align-items:center;border-radius:4px;color:#71717a;cursor:pointer;display:inline-flex;height:28px;justify-content:center;transition:background-color .12s ease,color .12s ease;width:28px}.inline-config-close:hover{background:#f4f4f5;color:#18181b}.inline-config-body{flex:1 1 0;min-height:0;overflow:auto;padding:1rem}.dist-indicator{align-items:center;color:#f87171;display:flex;justify-content:center;z-index:40}.dist-bottom,.dist-top{flex-direction:column}.dist-left,.dist-right{flex-direction:row}.dist-line{background:currentColor;flex:1 1 0}.dist-bottom .dist-line,.dist-top .dist-line{width:1px}.dist-left .dist-line,.dist-right .dist-line{height:1px}.dist-label{background:#fafafa;border-radius:2px;color:#f87171;font-size:10px;font-variant-numeric:tabular-nums;line-height:1;padding:1px 4px}
1546
1554
  </style>
@@ -1,6 +1,8 @@
1
1
  <script setup>
2
2
  import { computed, ref } from "vue";
3
- import { provideCELContext } from "../../utils/cel-context";
3
+ import { provideCELContext, provideScopeAncestor, SELECTIONS_VAR } from "../../utils/cel-context";
4
+ import { getLocalizedText } from "../../share/locale";
5
+ import { findField } from "./utils/resolve";
4
6
  import { ExpressionEditor } from "../ui/expression-editor";
5
7
  import { Field, FieldLabel } from "../ui/field";
6
8
  import { Input } from "../ui/input";
@@ -45,6 +47,41 @@ const formEventAncestor = computed(() => {
45
47
  };
46
48
  });
47
49
  provideEventAncestor(formEventAncestor);
50
+ function selectionFieldLabel(f) {
51
+ const fa = f;
52
+ if (typeof fa.displayName === "string" && fa.displayName.length > 0) return fa.displayName;
53
+ return getLocalizedText(fa.label, "zh") ?? "\u672A\u547D\u540D\u5B57\u6BB5";
54
+ }
55
+ const formScopeAncestor = computed(() => {
56
+ const id = config.value.id;
57
+ if (!id) return null;
58
+ const displayName = config.value.displayName;
59
+ const selectionMembers = config.value.fields.filter((f) => findField(f.type, f.compatibilityDate)?.metadata?.selection).map((f) => ({
60
+ key: `${SELECTIONS_VAR}[${JSON.stringify(f.id)}]`,
61
+ // Addressed key is the bracket lookup, but it mirrors the relative
62
+ // `selections` map — so the picker offers it only where a nearer row /
63
+ // subform shadows `selections`, not to a plain sibling field of this form.
64
+ shortcut: SELECTIONS_VAR,
65
+ label: selectionFieldLabel(f),
66
+ type: "dyn",
67
+ description: "\u8BE5\u9009\u62E9\u5B57\u6BB5\u5F53\u524D\u9009\u4E2D\u9879\u7684\u5B8C\u6574\u5BF9\u8C61\uFF08\u542B key \u4EE5\u5916\u7684\u5B57\u6BB5\uFF09"
68
+ }));
69
+ return {
70
+ id,
71
+ name: displayName && displayName.length > 0 ? displayName : void 0,
72
+ typeName: formMetadata.name,
73
+ typeIcon: formMetadata.icon,
74
+ members: [
75
+ { key: "form", label: "\u8868\u5355\u503C", type: "dyn", description: "\u8BE5\u8868\u5355\u7684\u5F53\u524D\u6574\u4F53\u72B6\u6001" },
76
+ ...selectionMembers
77
+ ],
78
+ // The form unconditionally rebinds both `form` and `selections` for its
79
+ // subtree (index.vue), so declare them explicitly rather than deriving from
80
+ // `members` — a form with no selection field still shadows `selections`.
81
+ shadows: ["form", SELECTIONS_VAR]
82
+ };
83
+ });
84
+ provideScopeAncestor(formScopeAncestor);
48
85
  const unitModel = computed({
49
86
  get: () => ({ fields: config.value.fields, layouts: config.value.layouts }),
50
87
  set: (next) => {
@@ -7,7 +7,8 @@ import { computed } from "vue";
7
7
  import {
8
8
  celBindings,
9
9
  injectCELContext,
10
- provideCELContext
10
+ provideCELContext,
11
+ provideScopeAddress
11
12
  } from "../../utils/cel-context";
12
13
  import FormUnitRenderer from "./FormUnitRenderer.vue";
13
14
  import { buildFormRuntimeScope } from "./utils/cel-scope";
@@ -39,6 +40,12 @@ provideCELContext(buildFormRuntimeScope({
39
40
  redoable: () => formHistory.canRedo.value,
40
41
  selections: () => selections.entries.value
41
42
  }));
43
+ if (config.value.id) {
44
+ provideScopeAddress(config.value.id, {
45
+ form: () => state.value ?? {},
46
+ selections: () => selections.entries.value
47
+ });
48
+ }
42
49
  const inherited = injectCELContext();
43
50
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
44
51
  const formState = provideFormState(state);
@@ -53,9 +53,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
53
53
  readonly locale: "en" | "ja" | "ko";
54
54
  readonly message: string;
55
55
  }[]];
56
+ readonly successMessage?: string | undefined;
56
57
  readonly accessor: string;
57
58
  readonly sortKey?: string | undefined;
58
- readonly successMessage?: string | undefined;
59
59
  }) => any;
60
60
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
61
61
  "onUpdate:modelValue"?: ((value: {
@@ -108,9 +108,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
108
108
  readonly locale: "en" | "ja" | "ko";
109
109
  readonly message: string;
110
110
  }[]];
111
+ readonly successMessage?: string | undefined;
111
112
  readonly accessor: string;
112
113
  readonly sortKey?: string | undefined;
113
- readonly successMessage?: string | undefined;
114
114
  }) => any) | undefined;
115
115
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
116
116
  declare const _default: typeof __VLS_export;
@@ -53,9 +53,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
53
53
  readonly locale: "en" | "ja" | "ko";
54
54
  readonly message: string;
55
55
  }[]];
56
+ readonly successMessage?: string | undefined;
56
57
  readonly accessor: string;
57
58
  readonly sortKey?: string | undefined;
58
- readonly successMessage?: string | undefined;
59
59
  }) => any;
60
60
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
61
61
  "onUpdate:modelValue"?: ((value: {
@@ -108,9 +108,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
108
108
  readonly locale: "en" | "ja" | "ko";
109
109
  readonly message: string;
110
110
  }[]];
111
+ readonly successMessage?: string | undefined;
111
112
  readonly accessor: string;
112
113
  readonly sortKey?: string | undefined;
113
- readonly successMessage?: string | undefined;
114
114
  }) => any) | undefined;
115
115
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
116
116
  declare const _default: typeof __VLS_export;
@@ -67,9 +67,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
67
67
  readonly readonly?: string | undefined;
68
68
  readonly grow?: boolean | undefined;
69
69
  readonly enableSorting?: boolean | undefined;
70
+ readonly successMessage?: string | undefined;
70
71
  readonly accessor: string;
71
72
  readonly sortKey?: string | undefined;
72
- readonly successMessage?: string | undefined;
73
73
  }) => any;
74
74
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
75
75
  "onUpdate:modelValue"?: ((value: {
@@ -136,9 +136,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
136
136
  readonly readonly?: string | undefined;
137
137
  readonly grow?: boolean | undefined;
138
138
  readonly enableSorting?: boolean | undefined;
139
+ readonly successMessage?: string | undefined;
139
140
  readonly accessor: string;
140
141
  readonly sortKey?: string | undefined;
141
- readonly successMessage?: string | undefined;
142
142
  }) => any) | undefined;
143
143
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
144
144
  declare const _default: typeof __VLS_export;
@@ -67,9 +67,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
67
67
  readonly readonly?: string | undefined;
68
68
  readonly grow?: boolean | undefined;
69
69
  readonly enableSorting?: boolean | undefined;
70
+ readonly successMessage?: string | undefined;
70
71
  readonly accessor: string;
71
72
  readonly sortKey?: string | undefined;
72
- readonly successMessage?: string | undefined;
73
73
  }) => any;
74
74
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
75
75
  "onUpdate:modelValue"?: ((value: {
@@ -136,9 +136,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
136
136
  readonly readonly?: string | undefined;
137
137
  readonly grow?: boolean | undefined;
138
138
  readonly enableSorting?: boolean | undefined;
139
+ readonly successMessage?: string | undefined;
139
140
  readonly accessor: string;
140
141
  readonly sortKey?: string | undefined;
141
- readonly successMessage?: string | undefined;
142
142
  }) => any) | undefined;
143
143
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
144
144
  declare const _default: typeof __VLS_export;
@@ -53,9 +53,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
53
53
  readonly locale: "en" | "ja" | "ko";
54
54
  readonly message: string;
55
55
  }[]];
56
+ readonly successMessage?: string | undefined;
56
57
  readonly accessor: string;
57
58
  readonly sortKey?: string | undefined;
58
- readonly successMessage?: string | undefined;
59
59
  }) => any;
60
60
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
61
61
  "onUpdate:modelValue"?: ((value: {
@@ -108,9 +108,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
108
108
  readonly locale: "en" | "ja" | "ko";
109
109
  readonly message: string;
110
110
  }[]];
111
+ readonly successMessage?: string | undefined;
111
112
  readonly accessor: string;
112
113
  readonly sortKey?: string | undefined;
113
- readonly successMessage?: string | undefined;
114
114
  }) => any) | undefined;
115
115
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
116
116
  declare const _default: typeof __VLS_export;
@@ -53,9 +53,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
53
53
  readonly locale: "en" | "ja" | "ko";
54
54
  readonly message: string;
55
55
  }[]];
56
+ readonly successMessage?: string | undefined;
56
57
  readonly accessor: string;
57
58
  readonly sortKey?: string | undefined;
58
- readonly successMessage?: string | undefined;
59
59
  }) => any;
60
60
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
61
61
  "onUpdate:modelValue"?: ((value: {
@@ -108,9 +108,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
108
108
  readonly locale: "en" | "ja" | "ko";
109
109
  readonly message: string;
110
110
  }[]];
111
+ readonly successMessage?: string | undefined;
111
112
  readonly accessor: string;
112
113
  readonly sortKey?: string | undefined;
113
- readonly successMessage?: string | undefined;
114
114
  }) => any) | undefined;
115
115
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
116
116
  declare const _default: typeof __VLS_export;
@@ -67,9 +67,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
67
67
  readonly readonly?: string | undefined;
68
68
  readonly grow?: boolean | undefined;
69
69
  readonly enableSorting?: boolean | undefined;
70
+ readonly successMessage?: string | undefined;
70
71
  readonly accessor: string;
71
72
  readonly sortKey?: string | undefined;
72
- readonly successMessage?: string | undefined;
73
73
  }) => any;
74
74
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
75
75
  "onUpdate:modelValue"?: ((value: {
@@ -136,9 +136,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
136
136
  readonly readonly?: string | undefined;
137
137
  readonly grow?: boolean | undefined;
138
138
  readonly enableSorting?: boolean | undefined;
139
+ readonly successMessage?: string | undefined;
139
140
  readonly accessor: string;
140
141
  readonly sortKey?: string | undefined;
141
- readonly successMessage?: string | undefined;
142
142
  }) => any) | undefined;
143
143
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
144
144
  declare const _default: typeof __VLS_export;
@@ -67,9 +67,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
67
67
  readonly readonly?: string | undefined;
68
68
  readonly grow?: boolean | undefined;
69
69
  readonly enableSorting?: boolean | undefined;
70
+ readonly successMessage?: string | undefined;
70
71
  readonly accessor: string;
71
72
  readonly sortKey?: string | undefined;
72
- readonly successMessage?: string | undefined;
73
73
  }) => any;
74
74
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
75
75
  "onUpdate:modelValue"?: ((value: {
@@ -136,9 +136,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
136
136
  readonly readonly?: string | undefined;
137
137
  readonly grow?: boolean | undefined;
138
138
  readonly enableSorting?: boolean | undefined;
139
+ readonly successMessage?: string | undefined;
139
140
  readonly accessor: string;
140
141
  readonly sortKey?: string | undefined;
141
- readonly successMessage?: string | undefined;
142
142
  }) => any) | undefined;
143
143
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
144
144
  declare const _default: typeof __VLS_export;
@@ -82,9 +82,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
82
82
  };
83
83
  }[];
84
84
  };
85
+ readonly successMessage?: string | undefined;
85
86
  readonly accessor: string;
86
87
  readonly sortKey?: string | undefined;
87
- readonly successMessage?: string | undefined;
88
88
  }) => any;
89
89
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
90
90
  "onUpdate:modelValue"?: ((value: {
@@ -166,9 +166,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
166
166
  };
167
167
  }[];
168
168
  };
169
+ readonly successMessage?: string | undefined;
169
170
  readonly accessor: string;
170
171
  readonly sortKey?: string | undefined;
171
- readonly successMessage?: string | undefined;
172
172
  }) => any) | undefined;
173
173
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
174
174
  declare const _default: typeof __VLS_export;
@@ -82,9 +82,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
82
82
  };
83
83
  }[];
84
84
  };
85
+ readonly successMessage?: string | undefined;
85
86
  readonly accessor: string;
86
87
  readonly sortKey?: string | undefined;
87
- readonly successMessage?: string | undefined;
88
88
  }) => any;
89
89
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
90
90
  "onUpdate:modelValue"?: ((value: {
@@ -166,9 +166,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
166
166
  };
167
167
  }[];
168
168
  };
169
+ readonly successMessage?: string | undefined;
169
170
  readonly accessor: string;
170
171
  readonly sortKey?: string | undefined;
171
- readonly successMessage?: string | undefined;
172
172
  }) => any) | undefined;
173
173
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
174
174
  declare const _default: typeof __VLS_export;
@@ -82,9 +82,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
82
82
  };
83
83
  }[];
84
84
  };
85
+ readonly successMessage?: string | undefined;
85
86
  readonly accessor: string;
86
87
  readonly sortKey?: string | undefined;
87
- readonly successMessage?: string | undefined;
88
88
  }) => any;
89
89
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
90
90
  "onUpdate:modelValue"?: ((value: {
@@ -166,9 +166,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
166
166
  };
167
167
  }[];
168
168
  };
169
+ readonly successMessage?: string | undefined;
169
170
  readonly accessor: string;
170
171
  readonly sortKey?: string | undefined;
171
- readonly successMessage?: string | undefined;
172
172
  }) => any) | undefined;
173
173
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
174
174
  declare const _default: typeof __VLS_export;
@@ -82,9 +82,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
82
82
  };
83
83
  }[];
84
84
  };
85
+ readonly successMessage?: string | undefined;
85
86
  readonly accessor: string;
86
87
  readonly sortKey?: string | undefined;
87
- readonly successMessage?: string | undefined;
88
88
  }) => any;
89
89
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
90
90
  "onUpdate:modelValue"?: ((value: {
@@ -166,9 +166,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
166
166
  };
167
167
  }[];
168
168
  };
169
+ readonly successMessage?: string | undefined;
169
170
  readonly accessor: string;
170
171
  readonly sortKey?: string | undefined;
171
- readonly successMessage?: string | undefined;
172
172
  }) => any) | undefined;
173
173
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
174
174
  declare const _default: typeof __VLS_export;
@@ -90,8 +90,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
90
90
  readonly target: string;
91
91
  readonly operation: string;
92
92
  }[] | undefined;
93
- readonly accessor: string;
94
93
  readonly successMessage?: string | undefined;
94
+ readonly accessor: string;
95
95
  };
96
96
  }) => any;
97
97
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
@@ -182,8 +182,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
182
182
  readonly target: string;
183
183
  readonly operation: string;
184
184
  }[] | undefined;
185
- readonly accessor: string;
186
185
  readonly successMessage?: string | undefined;
186
+ readonly accessor: string;
187
187
  };
188
188
  }) => any) | undefined;
189
189
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -90,8 +90,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
90
90
  readonly target: string;
91
91
  readonly operation: string;
92
92
  }[] | undefined;
93
- readonly accessor: string;
94
93
  readonly successMessage?: string | undefined;
94
+ readonly accessor: string;
95
95
  };
96
96
  }) => any;
97
97
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
@@ -182,8 +182,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
182
182
  readonly target: string;
183
183
  readonly operation: string;
184
184
  }[] | undefined;
185
- readonly accessor: string;
186
185
  readonly successMessage?: string | undefined;
186
+ readonly accessor: string;
187
187
  };
188
188
  }) => any) | undefined;
189
189
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -90,8 +90,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
90
90
  readonly target: string;
91
91
  readonly operation: string;
92
92
  }[] | undefined;
93
- readonly accessor: string;
94
93
  readonly successMessage?: string | undefined;
94
+ readonly accessor: string;
95
95
  };
96
96
  }) => any;
97
97
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
@@ -182,8 +182,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
182
182
  readonly target: string;
183
183
  readonly operation: string;
184
184
  }[] | undefined;
185
- readonly accessor: string;
186
185
  readonly successMessage?: string | undefined;
186
+ readonly accessor: string;
187
187
  };
188
188
  }) => any) | undefined;
189
189
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -90,8 +90,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
90
90
  readonly target: string;
91
91
  readonly operation: string;
92
92
  }[] | undefined;
93
- readonly accessor: string;
94
93
  readonly successMessage?: string | undefined;
94
+ readonly accessor: string;
95
95
  };
96
96
  }) => any;
97
97
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
@@ -182,8 +182,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
182
182
  readonly target: string;
183
183
  readonly operation: string;
184
184
  }[] | undefined;
185
- readonly accessor: string;
186
185
  readonly successMessage?: string | undefined;
186
+ readonly accessor: string;
187
187
  };
188
188
  }) => any) | undefined;
189
189
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
2
  import { computed, defineComponent, inject, onBeforeUnmount, provide, ref, watch } from "vue";
3
- import { provideCELContext, provideScopeAncestor, provideSelectionRoster } from "../../utils/cel-context";
3
+ import { provideCELContext, provideScopeAncestor, provideSelectionRoster, SELECTIONS_VAR } from "../../utils/cel-context";
4
4
  import { BREADCRUMB_EXTENSION_KEY } from "../config/breadcrumb-extension";
5
5
  import { TABLE_COLUMN_LAYOUT_KEY } from "./column-layout";
6
6
  import { Icon } from "@iconify/vue";
@@ -284,7 +284,13 @@ const tableScopeAncestor = computed(() => {
284
284
  members: [
285
285
  { key: "row", label: "\u5F53\u524D\u884C", type: "dyn", description: "\u8BE5\u8868\u683C\u5F53\u524D\u884C\u7684\u6574\u884C\u6570\u636E" },
286
286
  { key: "index", label: "\u884C\u5E8F\u53F7", type: "number", description: "\u8BE5\u8868\u683C\u5F53\u524D\u884C\u7684\u5E8F\u53F7\uFF0C\u4ECE `0` \u5F00\u59CB" }
287
- ]
287
+ ],
288
+ // Each row-provider rebinds the relative `selections` to its own per-row
289
+ // registry (see row-provider.vue), so a table row shadows an enclosing
290
+ // form's selection options even though the table exposes no `selections`
291
+ // member of its own — list it here so that form's options stay offerable to
292
+ // a cell expression inside this table.
293
+ shadows: ["row", "index", SELECTIONS_VAR]
288
294
  };
289
295
  });
290
296
  provideScopeAncestor(tableScopeAncestor);
@@ -8,7 +8,7 @@ import CodeMirrorInput from "./CodeMirrorInput.vue";
8
8
  import { buildScopeLookup } from "./scope-refs";
9
9
  import { buildSelectionLookup } from "./selection-refs";
10
10
  import { buildStepLookup } from "./step-refs";
11
- import { buildScopeEntries, buildSelectionEntries, buildStepEntries, buildVarEntries } from "./picker-entries";
11
+ import { buildScopeEntries, buildSelectionEntries, buildStepEntries, buildVarEntries, selectShadowedScopes } from "./picker-entries";
12
12
  import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "../command";
13
13
  import { InputGroup, InputGroupAddon, InputGroupButton } from "../input-group";
14
14
  import { Popover, PopoverContent, PopoverTrigger } from "../popover";
@@ -29,7 +29,7 @@ const scopeAncestry = useScopeAncestry();
29
29
  const selectionRoster = useSelectionRoster();
30
30
  const stepRoster = useStepRoster();
31
31
  const varEntries = computed(() => buildVarEntries(celContext, props.extraVars));
32
- const scopeEntries = computed(() => buildScopeEntries(scopeAncestry.value.slice(1)));
32
+ const scopeEntries = computed(() => buildScopeEntries(selectShadowedScopes(scopeAncestry.value)));
33
33
  const selectionEntries = computed(() => buildSelectionEntries(selectionRoster.value));
34
34
  const stepEntries = computed(() => buildStepEntries(stepRoster.value));
35
35
  const scopeLookup = computed(() => buildScopeLookup(scopeAncestry.value));
@@ -16,4 +16,5 @@ export type PickVarMeta = {
16
16
  export declare function buildVarEntries(celContext: Record<string, PickVarMeta>, extraVars?: Record<string, PickVarMeta>): PickEntry[];
17
17
  export declare function buildSelectionEntries(roster: ReadonlyArray<SelectionFieldRef>): PickEntry[];
18
18
  export declare function buildStepEntries(roster: ReadonlyArray<StepRef>): PickEntry[];
19
+ export declare function selectShadowedScopes(ancestry: ReadonlyArray<ScopeAncestor>): ScopeAncestor[];
19
20
  export declare function buildScopeEntries(ancestry: ReadonlyArray<ScopeAncestor>): PickEntry[];
@@ -36,6 +36,18 @@ export function buildStepEntries(roster) {
36
36
  description: step.description
37
37
  }));
38
38
  }
39
+ export function selectShadowedScopes(ancestry) {
40
+ const claimed = /* @__PURE__ */ new Set();
41
+ const out = [];
42
+ for (const frame of ancestry) {
43
+ const members = frame.members.filter((m) => claimed.has(m.shortcut ?? m.key));
44
+ if (members.length > 0) out.push({ ...frame, members });
45
+ for (const s of frame.shadows ?? frame.members.map((m) => m.shortcut ?? m.key)) {
46
+ claimed.add(s);
47
+ }
48
+ }
49
+ return out;
50
+ }
39
51
  export function buildScopeEntries(ancestry) {
40
52
  const out = [];
41
53
  for (const ancestor of ancestry) {
@@ -3,7 +3,7 @@ export function scopeOrigin(ancestor) {
3
3
  return ancestor.name ? `${ancestor.typeName}\u300C${ancestor.name}\u300D` : ancestor.typeName;
4
4
  }
5
5
  const SCOPE_REF_RE = new RegExp(
6
- `${SCOPE_ADDRESS_VAR}\\[("(?:[^"\\\\]|\\\\.)*")\\]\\.([A-Za-z_$][\\w$]*)`,
6
+ `${SCOPE_ADDRESS_VAR}\\[("(?:[^"\\\\]|\\\\.)*")\\]\\.([A-Za-z_$][\\w$]*(?:\\["(?:[^"\\\\]|\\\\.)*"\\])?)`,
7
7
  "g"
8
8
  );
9
9
  export function scanScopeRefs(text) {
@@ -21,6 +21,16 @@ export type ScopeAncestorMember = Readonly<{
21
21
  /** CEL type shown as the picker badge. */
22
22
  type: string;
23
23
  description?: string;
24
+ /**
25
+ * The relative shortcut this member mirrors — used by the picker to decide if
26
+ * the member is worth offering cross-layer (it is, only when a nearer frame
27
+ * shadows that shortcut; otherwise the relative name already reaches it).
28
+ * Defaults to `key`. Set explicitly when the addressed key isn't the bare
29
+ * shortcut — a form's selection member has `key = selections["<uuid>"]` but
30
+ * `shortcut = "selections"`, since it's the relative `selections` map that an
31
+ * inner row/subform shadows.
32
+ */
33
+ shortcut?: string;
24
34
  }>;
25
35
  /** A scope-exposing ancestor instance, as seen by an expression-editor picker. */
26
36
  export type ScopeAncestor = Readonly<{
@@ -33,6 +43,17 @@ export type ScopeAncestor = Readonly<{
33
43
  /** Component type icon (from type metadata). */
34
44
  typeIcon?: string;
35
45
  members: ReadonlyArray<ScopeAncestorMember>;
46
+ /**
47
+ * The relative shortcut names this host *rebinds* at runtime — i.e. the
48
+ * shortcuts it shadows for everything below it. The picker uses this (not the
49
+ * host type) to decide which of a farther frame's members are genuinely
50
+ * shadowed and thus worth offering cross-layer. It is broader than `members`:
51
+ * a table offers only `row`/`index` cross-layer but its row-provider also
52
+ * rebinds `selections`, so a table must list `selections` here to (correctly)
53
+ * shadow an enclosing form's selection options. Defaults to the members'
54
+ * `shortcut`s when omitted.
55
+ */
56
+ shadows?: ReadonlyArray<string>;
36
57
  }>;
37
58
  /**
38
59
  * Contribute one scope-exposing ancestor frame. Descendant editors see it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shwfed/config",
3
- "version": "2.9.11",
3
+ "version": "2.9.12",
4
4
  "description": "Configurable UI for SHWFED",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1 +0,0 @@
1
- import{ba as e}from"./index-Cyjm-GKs.js";import{bb as f,bc as r,bd as s}from"./index-Cyjm-GKs.js";export{f as TableConfig,r as createTableConfig,e as default,s as getColumnTechnicalKey};