@shwfed/config 2.12.16 → 2.12.18

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 (27) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/form/FormUnitRenderer.vue +70 -22
  3. package/dist/runtime/components/form/index.d.vue.ts +2 -0
  4. package/dist/runtime/components/form/index.vue +21 -13
  5. package/dist/runtime/components/form/index.vue.d.ts +2 -0
  6. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -2
  7. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -2
  8. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -2
  9. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -2
  10. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -2
  11. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -2
  12. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -2
  13. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -2
  14. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -2
  15. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -2
  16. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -2
  17. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -2
  18. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
  19. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
  20. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
  21. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
  22. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
  23. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
  24. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
  25. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
  26. package/dist/runtime/components/table/index.vue +2 -14
  27. package/package.json +1 -1
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shwfed",
3
3
  "configKey": "shwfed",
4
- "version": "2.12.16",
4
+ "version": "2.12.18",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -47,9 +47,65 @@ const placedFields = computed(() => {
47
47
  }
48
48
  return out;
49
49
  });
50
- function cellStyle(placement) {
50
+ const authoredAreas = computed(() => {
51
+ const layout = activeLayout.value?.layout;
52
+ if (!layout) return [];
53
+ const out = [];
54
+ for (const field of props.unit.fields) {
55
+ const placement = layout.placements[field.id];
56
+ if (!placement) continue;
57
+ if (!findField(field.type, field.compatibilityDate)) continue;
58
+ out.push(placement.area);
59
+ }
60
+ return out;
61
+ });
62
+ function buildRemap(count, keep) {
63
+ const line = Array.from({ length: count + 2 });
64
+ const keptFlags = [];
65
+ let acc = 1;
66
+ for (let L = 1; L <= count + 1; L++) {
67
+ line[L] = acc;
68
+ if (L <= count) {
69
+ const k = keep(L);
70
+ keptFlags.push(k);
71
+ if (k) acc++;
72
+ }
73
+ }
74
+ return { line, keptFlags, kept: acc - 1 };
75
+ }
76
+ const compaction = computed(() => {
77
+ const l = activeLayout.value?.layout;
78
+ if (!l) return null;
79
+ const authored = authoredAreas.value;
80
+ const visible = placedFields.value.map((p) => p.placement.area);
81
+ const coversCol = (a, c) => a[0][0] <= c && c < a[1][0];
82
+ const coversRow = (a, r) => a[0][1] <= r && r < a[1][1];
83
+ const rowCount = l.rows ?? authored.reduce((m, a) => Math.max(m, a[1][1] - 1), 0);
84
+ const grows = Array.from({ length: rowCount }, () => false);
85
+ for (const p of placedFields.value) {
86
+ if (!p.entry.metadata.h.grow) continue;
87
+ const [[, y1], [, y2]] = p.placement.area;
88
+ const lo = Math.max(1, y1);
89
+ const hi = Math.min(rowCount, y2 - 1);
90
+ for (let r = lo; r <= hi; r++) grows[r - 1] = true;
91
+ }
92
+ const col = buildRemap(l.columns, (c) => visible.some((a) => coversCol(a, c)) || !authored.some((a) => coversCol(a, c)));
93
+ const row = buildRemap(rowCount, (r) => visible.some((a) => coversRow(a, r)) || !authored.some((a) => coversRow(a, r)));
94
+ const rowTemplate = l.rows ? row.keptFlags.map((keep, i) => keep ? grows[i] ? "auto" : "minmax(auto, 1fr)" : null).filter(Boolean).join(" ") : "";
95
+ return {
96
+ colLine: col.line,
97
+ rowLine: row.line,
98
+ keptColumns: Math.max(1, col.kept),
99
+ rowTemplate
100
+ };
101
+ });
102
+ function cellStyle(placement, comp) {
51
103
  const [[x1, y1], [x2, y2]] = placement.area;
52
- const parts = [`grid-column: ${x1} / ${x2}`, `grid-row: ${y1} / ${y2}`, "min-width: 0"];
104
+ const parts = [
105
+ `grid-column: ${comp.colLine[x1]} / ${comp.colLine[x2]}`,
106
+ `grid-row: ${comp.rowLine[y1]} / ${comp.rowLine[y2]}`,
107
+ "min-width: 0"
108
+ ];
53
109
  const h = placement.h && placement.h !== "stretch" ? placement.h : null;
54
110
  const v = placement.v && placement.v !== "stretch" ? placement.v : null;
55
111
  if (h || v) {
@@ -62,22 +118,12 @@ function cellStyle(placement) {
62
118
  }
63
119
  const gridStyle = computed(() => {
64
120
  const l = activeLayout.value?.layout;
65
- if (!l) return "";
66
- const colTemplate = `repeat(${l.columns}, minmax(0, 1fr))`;
67
- let rowTemplate = "";
68
- if (l.rows) {
69
- const grows = Array.from({ length: l.rows }, () => false);
70
- for (const p of placedFields.value) {
71
- if (!p.entry.metadata.h.grow) continue;
72
- const [[, y1], [, y2]] = p.placement.area;
73
- const lo = Math.max(1, y1);
74
- const hi = Math.min(l.rows, y2 - 1);
75
- for (let r = lo; r <= hi; r++) grows[r - 1] = true;
76
- }
77
- rowTemplate = grows.map((g) => g ? "auto" : "minmax(auto, 1fr)").join(" ");
78
- }
121
+ const comp = compaction.value;
122
+ if (!l || !comp) return "";
123
+ const colTemplate = `repeat(${comp.keptColumns}, minmax(0, 1fr))`;
124
+ const rowTemplate = comp.rowTemplate;
79
125
  const gap = `calc(${l.gap ?? DEFAULT_GAP} * 0.25rem)`;
80
- const colGap = l.columns > 1 ? `min(${gap}, calc(100% / ${l.columns - 1}))` : gap;
126
+ const colGap = comp.keptColumns > 1 ? `min(${gap}, calc(100% / ${comp.keptColumns - 1}))` : gap;
81
127
  const parts = [
82
128
  "display: grid",
83
129
  `grid-template-columns: ${colTemplate}`,
@@ -88,15 +134,17 @@ const gridStyle = computed(() => {
88
134
  ].filter(Boolean);
89
135
  return parts.join("; ");
90
136
  });
91
- const rendered = computed(
92
- () => placedFields.value.map((p) => ({
137
+ const rendered = computed(() => {
138
+ const comp = compaction.value;
139
+ if (!comp) return [];
140
+ return placedFields.value.map((p) => ({
93
141
  key: p.field.id,
94
- style: cellStyle(p.placement),
142
+ style: cellStyle(p.placement, comp),
95
143
  component: p.entry.runtime,
96
144
  fieldId: p.field.id,
97
145
  config: p.field
98
- }))
99
- );
146
+ }));
147
+ });
100
148
  </script>
101
149
 
102
150
  <template>
@@ -4,6 +4,7 @@ import type { FormConfigValue } from './schema.js';
4
4
  type __VLS_Props = {
5
5
  configure?: (env: Environment) => void;
6
6
  };
7
+ declare function reseed(): Promise<void>;
7
8
  type __VLS_ModelProps = {
8
9
  modelValue?: FormState;
9
10
  'config': FormConfigValue;
@@ -11,6 +12,7 @@ type __VLS_ModelProps = {
11
12
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
12
13
  declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
13
14
  seeded: Promise<void>;
15
+ reseed: typeof reseed;
14
16
  flush: () => void;
15
17
  settled: () => Promise<void>;
16
18
  validate: () => Promise<boolean>;
@@ -65,22 +65,29 @@ const formReadonly = computed(() => {
65
65
  }
66
66
  });
67
67
  provideFormReadonly(formReadonly);
68
+ async function computeSeed(base) {
69
+ const initial = config.value.initial;
70
+ if (!initial) return null;
71
+ try {
72
+ const program = evaluateInitial(initial, $cel, { form: base });
73
+ const result = await Effect.runPromise(Effect.provide(program, Fetch.layer));
74
+ return result && typeof result === "object" && !Array.isArray(result) ? result : null;
75
+ } catch (err) {
76
+ console.error("[shwfed-form] failed to evaluate initial:", err);
77
+ return null;
78
+ }
79
+ }
68
80
  const seeded = (() => {
69
81
  const current = state.value ?? {};
70
- const initial = config.value.initial;
71
- if (!initial || Object.keys(current).length > 0) return Promise.resolve();
72
- const program = evaluateInitial(initial, $cel, { form: current });
73
- return Effect.runPromise(Effect.provide(program, Fetch.layer)).then(
74
- (result) => {
75
- if (result && typeof result === "object" && !Array.isArray(result)) {
76
- state.value = { ...current, ...result };
77
- }
78
- },
79
- (err) => {
80
- console.error("[shwfed-form] failed to evaluate initial:", err);
81
- }
82
- );
82
+ if (!config.value.initial || Object.keys(current).length > 0) return Promise.resolve();
83
+ return computeSeed(current).then((seed) => {
84
+ if (seed) state.value = { ...current, ...seed };
85
+ });
83
86
  })();
87
+ async function reseed() {
88
+ const seed = await computeSeed({});
89
+ state.value = seed ? { ...seed } : {};
90
+ }
84
91
  useDerived({
85
92
  fields: () => config.value.fields,
86
93
  evaluate: (expression) => $cel(expression),
@@ -113,6 +120,7 @@ provideEventTarget(formInstanceId, {
113
120
  });
114
121
  defineExpose({
115
122
  seeded,
123
+ reseed,
116
124
  flush: commitBus.flushAll,
117
125
  settled: quiescence.settled,
118
126
  validate: validation.validate,
@@ -4,6 +4,7 @@ import type { FormConfigValue } from './schema.js';
4
4
  type __VLS_Props = {
5
5
  configure?: (env: Environment) => void;
6
6
  };
7
+ declare function reseed(): Promise<void>;
7
8
  type __VLS_ModelProps = {
8
9
  modelValue?: FormState;
9
10
  'config': FormConfigValue;
@@ -11,6 +12,7 @@ type __VLS_ModelProps = {
11
12
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
12
13
  declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
13
14
  seeded: Promise<void>;
15
+ reseed: typeof reseed;
14
16
  flush: () => void;
15
17
  settled: () => Promise<void>;
16
18
  validate: () => Promise<boolean>;
@@ -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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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
  }[]] | undefined;
68
68
  readonly readonly?: string | undefined;
69
69
  readonly enableSorting?: boolean | undefined;
70
+ readonly successMessage?: string | undefined;
70
71
  readonly accessor?: string | undefined;
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
  }[]] | undefined;
137
137
  readonly readonly?: string | undefined;
138
138
  readonly enableSorting?: boolean | undefined;
139
+ readonly successMessage?: string | undefined;
139
140
  readonly accessor?: string | undefined;
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
  }[]] | undefined;
68
68
  readonly readonly?: string | undefined;
69
69
  readonly enableSorting?: boolean | undefined;
70
+ readonly successMessage?: string | undefined;
70
71
  readonly accessor?: string | undefined;
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
  }[]] | undefined;
137
137
  readonly readonly?: string | undefined;
138
138
  readonly enableSorting?: boolean | undefined;
139
+ readonly successMessage?: string | undefined;
139
140
  readonly accessor?: string | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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
  }[]] | undefined;
68
68
  readonly readonly?: string | undefined;
69
69
  readonly enableSorting?: boolean | undefined;
70
+ readonly successMessage?: string | undefined;
70
71
  readonly accessor?: string | undefined;
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
  }[]] | undefined;
137
137
  readonly readonly?: string | undefined;
138
138
  readonly enableSorting?: boolean | undefined;
139
+ readonly successMessage?: string | undefined;
139
140
  readonly accessor?: string | undefined;
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
  }[]] | undefined;
68
68
  readonly readonly?: string | undefined;
69
69
  readonly enableSorting?: boolean | undefined;
70
+ readonly successMessage?: string | undefined;
70
71
  readonly accessor?: string | undefined;
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
  }[]] | undefined;
137
137
  readonly readonly?: string | undefined;
138
138
  readonly enableSorting?: boolean | undefined;
139
+ readonly successMessage?: string | undefined;
139
140
  readonly accessor?: string | undefined;
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
  }[]] | undefined;
83
83
  readonly readonly?: string | undefined;
84
84
  readonly enableSorting?: boolean | undefined;
85
+ readonly successMessage?: string | undefined;
85
86
  readonly accessor?: string | undefined;
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
  }[]] | undefined;
167
167
  readonly readonly?: string | undefined;
168
168
  readonly enableSorting?: boolean | undefined;
169
+ readonly successMessage?: string | undefined;
169
170
  readonly accessor?: string | undefined;
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
  }[]] | undefined;
83
83
  readonly readonly?: string | undefined;
84
84
  readonly enableSorting?: boolean | undefined;
85
+ readonly successMessage?: string | undefined;
85
86
  readonly accessor?: string | undefined;
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
  }[]] | undefined;
167
167
  readonly readonly?: string | undefined;
168
168
  readonly enableSorting?: boolean | undefined;
169
+ readonly successMessage?: string | undefined;
169
170
  readonly accessor?: string | undefined;
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
  }[]] | undefined;
83
83
  readonly readonly?: string | undefined;
84
84
  readonly enableSorting?: boolean | undefined;
85
+ readonly successMessage?: string | undefined;
85
86
  readonly accessor?: string | undefined;
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
  }[]] | undefined;
167
167
  readonly readonly?: string | undefined;
168
168
  readonly enableSorting?: boolean | undefined;
169
+ readonly successMessage?: string | undefined;
169
170
  readonly accessor?: string | undefined;
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
  }[]] | undefined;
83
83
  readonly readonly?: string | undefined;
84
84
  readonly enableSorting?: boolean | undefined;
85
+ readonly successMessage?: string | undefined;
85
86
  readonly accessor?: string | undefined;
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
  }[]] | undefined;
167
167
  readonly readonly?: string | undefined;
168
168
  readonly enableSorting?: boolean | undefined;
169
+ readonly successMessage?: string | undefined;
169
170
  readonly accessor?: string | undefined;
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>;
@@ -85,8 +85,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
85
85
  readonly target: string;
86
86
  readonly operation: string;
87
87
  }[] | undefined;
88
- readonly accessor: string;
89
88
  readonly successMessage?: string | undefined;
89
+ readonly accessor: string;
90
90
  };
91
91
  }) => any;
92
92
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
@@ -172,8 +172,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
172
172
  readonly target: string;
173
173
  readonly operation: string;
174
174
  }[] | undefined;
175
- readonly accessor: string;
176
175
  readonly successMessage?: string | undefined;
176
+ readonly accessor: string;
177
177
  };
178
178
  }) => any) | undefined;
179
179
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -85,8 +85,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
85
85
  readonly target: string;
86
86
  readonly operation: string;
87
87
  }[] | undefined;
88
- readonly accessor: string;
89
88
  readonly successMessage?: string | undefined;
89
+ readonly accessor: string;
90
90
  };
91
91
  }) => any;
92
92
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
@@ -172,8 +172,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
172
172
  readonly target: string;
173
173
  readonly operation: string;
174
174
  }[] | undefined;
175
- readonly accessor: string;
176
175
  readonly successMessage?: string | undefined;
176
+ readonly accessor: string;
177
177
  };
178
178
  }) => any) | undefined;
179
179
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -85,8 +85,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
85
85
  readonly target: string;
86
86
  readonly operation: string;
87
87
  }[] | undefined;
88
- readonly accessor: string;
89
88
  readonly successMessage?: string | undefined;
89
+ readonly accessor: string;
90
90
  };
91
91
  }) => any;
92
92
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
@@ -172,8 +172,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
172
172
  readonly target: string;
173
173
  readonly operation: string;
174
174
  }[] | undefined;
175
- readonly accessor: string;
176
175
  readonly successMessage?: string | undefined;
176
+ readonly accessor: string;
177
177
  };
178
178
  }) => any) | undefined;
179
179
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -85,8 +85,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
85
85
  readonly target: string;
86
86
  readonly operation: string;
87
87
  }[] | undefined;
88
- readonly accessor: string;
89
88
  readonly successMessage?: string | undefined;
89
+ readonly accessor: string;
90
90
  };
91
91
  }) => any;
92
92
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
@@ -172,8 +172,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
172
172
  readonly target: string;
173
173
  readonly operation: string;
174
174
  }[] | undefined;
175
- readonly accessor: string;
176
175
  readonly successMessage?: string | undefined;
176
+ readonly accessor: string;
177
177
  };
178
178
  }) => any) | undefined;
179
179
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -29,7 +29,6 @@ import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip";
29
29
  import { ScrollBar } from "../ui/scroll-area";
30
30
  import ShwfedActions from "../actions/components/group.vue";
31
31
  import ShwfedForm from "../form/index.vue";
32
- import { evaluateInitial } from "../form/utils/initial";
33
32
  import { provideTableInstanceId } from "./utils/instance";
34
33
  import {
35
34
  mergeCustomization,
@@ -460,19 +459,8 @@ async function fetchDataSource() {
460
459
  }
461
460
  async function resetQuery() {
462
461
  persistedQuery.clear();
463
- const initial = config.value?.query?.initial;
464
- if (!initial) {
465
- queryState.value = {};
466
- return;
467
- }
468
- try {
469
- const program = evaluateInitial(initial, $cel, { query: {} });
470
- const result = await Effect.runPromise(Effect.provide(program, Fetch.layer));
471
- queryState.value = result && typeof result === "object" && !Array.isArray(result) ? { ...result } : {};
472
- } catch (e) {
473
- console.error("[shwfed-table] resetQuery failed", e);
474
- queryState.value = {};
475
- }
462
+ if (queryRef.value) await queryRef.value.reseed();
463
+ else queryState.value = {};
476
464
  }
477
465
  function cloneRow(row) {
478
466
  if (!row || typeof row !== "object") return row;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shwfed/config",
3
- "version": "2.12.16",
3
+ "version": "2.12.18",
4
4
  "description": "Configurable UI for SHWFED",
5
5
  "type": "module",
6
6
  "publishConfig": {