@shwfed/config 2.12.7 → 2.12.9

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 (68) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +68 -68
  3. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +68 -68
  4. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +68 -68
  5. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +68 -68
  6. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +34 -34
  7. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +6 -6
  8. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +6 -6
  9. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +8 -8
  10. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +8 -8
  11. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +2 -2
  12. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +2 -2
  13. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +6 -6
  14. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +6 -6
  15. package/dist/runtime/components/operations/2026-07-06/com.shwfed.operation.table.add-row/config.d.vue.ts +15 -0
  16. package/dist/runtime/components/operations/2026-07-06/com.shwfed.operation.table.add-row/config.vue +47 -0
  17. package/dist/runtime/components/operations/2026-07-06/com.shwfed.operation.table.add-row/config.vue.d.ts +15 -0
  18. package/dist/runtime/components/operations/2026-07-06/com.shwfed.operation.table.add-row/schema.d.ts +12 -0
  19. package/dist/runtime/components/operations/2026-07-06/com.shwfed.operation.table.add-row/schema.js +28 -0
  20. package/dist/runtime/components/operations/utils/resolve.d.ts +7 -1
  21. package/dist/runtime/components/operations/utils/resolve.js +14 -6
  22. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -2
  23. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -2
  24. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -2
  25. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -2
  26. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -2
  27. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -2
  28. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -2
  29. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -2
  30. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -2
  31. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -2
  32. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -2
  33. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -2
  34. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -2
  35. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -2
  36. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
  37. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -2
  38. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
  39. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
  40. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
  41. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
  42. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -2
  43. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -2
  44. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
  45. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -2
  46. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
  47. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
  48. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
  49. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
  50. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -2
  51. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -2
  52. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
  53. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -2
  54. package/dist/runtime/components/table/config.vue +93 -4
  55. package/dist/runtime/components/table/index.vue +207 -168
  56. package/dist/runtime/components/table/schema.d.ts +70 -69
  57. package/dist/runtime/components/table/schema.js +13 -1
  58. package/dist/runtime/components/ui/date-picker/DatePickerInput.d.vue.ts +1 -1
  59. package/dist/runtime/components/ui/date-picker/DatePickerInput.vue.d.ts +1 -1
  60. package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.d.vue.ts +1 -1
  61. package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.vue.d.ts +1 -1
  62. package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.d.vue.ts +1 -1
  63. package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue.d.ts +1 -1
  64. package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.d.vue.ts +2 -2
  65. package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.vue.d.ts +2 -2
  66. package/dist/runtime/share/clipboard.d.ts +1 -1
  67. package/dist/runtime/share/clipboard.js +1 -1
  68. package/package.json +1 -1
@@ -12,18 +12,20 @@ import {
12
12
  import { useVirtualizer } from "@tanstack/vue-virtual";
13
13
  import { Effect, Fiber, Option } from "effect";
14
14
  import { Fetch } from "fx-fetch";
15
- import { Pagination } from "reka-ui/namespaced";
15
+ import { Pagination, ScrollArea } from "reka-ui/namespaced";
16
16
  import { computed, h, onMounted, ref, toRaw, watch } from "vue";
17
17
  import { fetchJsonOption } from "../../share/request";
18
18
  import { useI18n } from "vue-i18n";
19
19
  import { celBindings, provideCELContext, injectCELContext } from "../../utils/cel-context";
20
20
  import TableRowProvider from "./row-provider.vue";
21
+ import * as addRowOp from "../operations/2026-07-06/com.shwfed.operation.table.add-row/schema";
21
22
  import { getLocalizedText } from "../../share/locale";
22
23
  import { Button } from "../ui/button";
23
24
  import { Markdown } from "../ui/markdown";
24
25
  import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../ui/select";
25
26
  import { NumberField, NumberFieldInput } from "../ui/number-field";
26
27
  import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip";
28
+ import { ScrollBar } from "../ui/scroll-area";
27
29
  import ShwfedActions from "../actions/components/group.vue";
28
30
  import ShwfedForm from "../form/index.vue";
29
31
  import { evaluateInitial } from "../form/utils/initial";
@@ -105,7 +107,8 @@ const { t, locale } = useI18n({
105
107
  }
106
108
  });
107
109
  const inheritedContext = injectCELContext();
108
- const containerRef = ref(null);
110
+ const viewportRef = ref(null);
111
+ const containerRef = computed(() => viewportRef.value?.viewportElement ?? null);
109
112
  const appliedInitialStateKey = ref("");
110
113
  const frozenGrowColumns = ref(/* @__PURE__ */ new Set());
111
114
  function isEffectiveGrow(column) {
@@ -490,6 +493,32 @@ provideEventTarget(tableInstanceId, {
490
493
  // `table` form field) sees the live list. Intended for client-side data:
491
494
  // with server pagination (`dataSource.total`) `rowData` is only the
492
495
  // current page, so a fetch will overwrite these edits.
496
+ // `add-row` is a host-coupled operation: it is declared in the operations
497
+ // registry for its param editor, but ships no generic `runtime.ts` (the
498
+ // append touches THIS instance's private `rowData`), so the handler is
499
+ // hand-wired here. Its optional `newRow` param is a CEL expression evaluated
500
+ // at click time against the *emit-site* scope (the dispatching button's own
501
+ // `cel`, where a row action's `row` is live). An object result seeds the new
502
+ // row; absent / non-object / evaluation error → a bare `{}` (the param-less
503
+ // default). Falls back to the table's own evaluator when no emit-site `cel`.
504
+ [addRowOp.type]: (params, cel) => {
505
+ const expr = params?.newRow;
506
+ if (!expr) {
507
+ return Effect.sync(() => {
508
+ rowData.value = [...rowData.value, {}];
509
+ });
510
+ }
511
+ return (cel ? cel(expr) : $cel(expr, mergeCelContext({}))).pipe(
512
+ Effect.map((result) => result !== null && typeof result === "object" && !Array.isArray(result) ? { ...result } : {}),
513
+ Effect.catchAll(() => Effect.succeed({})),
514
+ Effect.map((seed) => {
515
+ rowData.value = [...rowData.value, seed];
516
+ })
517
+ );
518
+ },
519
+ // Back-compat: triggers authored before `add-row` moved into the operations
520
+ // registry carry the bare `operation: 'add-row'` (no params). Keep appending
521
+ // an empty row for them.
493
522
  "add-row": () => Effect.sync(() => {
494
523
  rowData.value = [...rowData.value, {}];
495
524
  }),
@@ -788,29 +817,35 @@ export { TableConfig, createTableConfig, getColumnTechnicalKey } from "./schema"
788
817
  @reset="resetCustomization"
789
818
  />
790
819
  <ClientOnly>
791
- <!-- Scrollable table container -->
792
- <div
793
- ref="containerRef"
794
- class="overflow-scroll overscroll-none flex-1 border border-zinc-200 rounded relative"
820
+ <!-- Scrollable table container: reka-ui ScrollArea replaces the native
821
+ scrollbar. The Viewport is the real scroll element (both axes, since
822
+ both ScrollBars are mounted) and the sticky thead / pinned columns
823
+ resolve against it. -->
824
+ <ScrollArea.Root
825
+ class="flex-1 min-h-0 border border-zinc-200 rounded relative overflow-hidden"
795
826
  >
796
- <div :style="{ height: `${rowTotalSize}px` }">
797
- <table class="grid">
798
- <!-- Header -->
799
- <thead
800
- v-if="columns.length > 0"
801
- class="grid sticky top-0 z-10 select-none"
802
- >
803
- <tr
804
- v-for="group in tableApi.getHeaderGroups()"
805
- :key="group.id"
806
- class="flex w-full border-b border-zinc-200"
827
+ <ScrollArea.Viewport
828
+ ref="viewportRef"
829
+ class="size-full overscroll-none"
830
+ >
831
+ <div :style="{ height: `${rowTotalSize}px` }">
832
+ <table class="grid">
833
+ <!-- Header -->
834
+ <thead
835
+ v-if="columns.length > 0"
836
+ class="grid sticky top-0 z-10 select-none"
807
837
  >
808
- <th
809
- v-for="header in group.headers"
810
- :key="header.id"
811
- :colspan="header.colSpan"
812
- :data-col-id="header.column.id"
813
- :class="[
838
+ <tr
839
+ v-for="group in tableApi.getHeaderGroups()"
840
+ :key="group.id"
841
+ class="flex w-full border-b border-zinc-200"
842
+ >
843
+ <th
844
+ v-for="header in group.headers"
845
+ :key="header.id"
846
+ :colspan="header.colSpan"
847
+ :data-col-id="header.column.id"
848
+ :class="[
814
849
  'flex items-center gap-2 border-zinc-300 py-2 text-zinc-600',
815
850
  'text-xs flex items-center justify-center relative',
816
851
  'bg-[color-mix(in_srgb,var(--primary)_7%,white)] group',
@@ -818,7 +853,7 @@ export { TableConfig, createTableConfig, getColumnTechnicalKey } from "./schema"
818
853
  shouldHaveRightBorder(header.column) && 'border-r',
819
854
  shouldHaveLeftBorder(header.column) && 'border-l'
820
855
  ]"
821
- :style="{
856
+ :style="{
822
857
  // Grow until first resize (see freezeGrowColumns): fill the
823
858
  // remaining space, with `width` as the flex-basis so the
824
859
  // configured size acts as a floor. Group headers grow by
@@ -827,82 +862,82 @@ export { TableConfig, createTableConfig, getColumnTechnicalKey } from "./schema"
827
862
  ...headerGrowStyle(header),
828
863
  ...pinnedStyle(header.column)
829
864
  }"
830
- >
831
- <!-- Column header with tooltip: dashed underline + Markdown tooltip -->
832
- <Tooltip
833
- v-if="!header.isPlaceholder && header.column.columnDef.meta?.tooltip"
834
- :delay-duration="180"
835
865
  >
836
- <TooltipTrigger as-child>
837
- <span class="decoration-dashed underline decoration-(--primary) underline-offset-4 px-4 cursor-help">
838
- <FlexRender
839
- :render="header.column.columnDef.header"
840
- :props="header.getContext()"
841
- />
842
- </span>
843
- </TooltipTrigger>
844
- <TooltipContent
845
- align="center"
846
- side="top"
847
- class="max-w-xs text-xs"
866
+ <!-- Column header with tooltip: dashed underline + Markdown tooltip -->
867
+ <Tooltip
868
+ v-if="!header.isPlaceholder && header.column.columnDef.meta?.tooltip"
869
+ :delay-duration="180"
848
870
  >
849
- <Markdown
850
- :source="header.column.columnDef.meta.tooltip"
851
- class="prose prose-xs prose-zinc"
852
- />
853
- </TooltipContent>
854
- </Tooltip>
871
+ <TooltipTrigger as-child>
872
+ <span class="decoration-dashed underline decoration-(--primary) underline-offset-4 px-4 cursor-help">
873
+ <FlexRender
874
+ :render="header.column.columnDef.header"
875
+ :props="header.getContext()"
876
+ />
877
+ </span>
878
+ </TooltipTrigger>
879
+ <TooltipContent
880
+ align="center"
881
+ side="top"
882
+ class="max-w-xs text-xs"
883
+ >
884
+ <Markdown
885
+ :source="header.column.columnDef.meta.tooltip"
886
+ class="prose prose-xs prose-zinc"
887
+ />
888
+ </TooltipContent>
889
+ </Tooltip>
855
890
 
856
- <!-- Column header without tooltip: plain render -->
857
- <FlexRender
858
- v-else-if="!header.isPlaceholder"
859
- :render="header.column.columnDef.header"
860
- :props="header.getContext()"
861
- />
891
+ <!-- Column header without tooltip: plain render -->
892
+ <FlexRender
893
+ v-else-if="!header.isPlaceholder"
894
+ :render="header.column.columnDef.header"
895
+ :props="header.getContext()"
896
+ />
862
897
 
863
- <!-- Edit affordance: marks an editable column, hidden when
898
+ <!-- Edit affordance: marks an editable column, hidden when
864
899
  the column reads as readonly (form-wide or its own
865
900
  `readonly` condition). -->
866
- <Icon
867
- v-if="!header.isPlaceholder && header.column.columnDef.meta?.editable && !isHeaderReadonly(header.column.columnDef.meta?.readonlyExpr)"
868
- icon="fluent:edit-20-regular"
869
- class="size-3 shrink-0 text-zinc-400"
870
- aria-hidden="true"
871
- />
901
+ <Icon
902
+ v-if="!header.isPlaceholder && header.column.columnDef.meta?.editable && !isHeaderReadonly(header.column.columnDef.meta?.readonlyExpr)"
903
+ icon="fluent:edit-20-regular"
904
+ class="size-3 shrink-0 text-zinc-400"
905
+ aria-hidden="true"
906
+ />
872
907
 
873
- <!-- Sort toggle -->
874
- <Tooltip
875
- v-if="!header.isPlaceholder && header.column.getCanSort()"
876
- :delay-duration="800"
877
- >
878
- <TooltipTrigger as-child>
879
- <Button
880
- variant="ghost"
881
- size="xs"
882
- :class="[
908
+ <!-- Sort toggle -->
909
+ <Tooltip
910
+ v-if="!header.isPlaceholder && header.column.getCanSort()"
911
+ :delay-duration="800"
912
+ >
913
+ <TooltipTrigger as-child>
914
+ <Button
915
+ variant="ghost"
916
+ size="xs"
917
+ :class="[
883
918
  'absolute hover:bg-transparent right-1 top-1/2 -translate-y-1/2 transform-3d transition-opacity duration-180',
884
919
  !header.column.getIsSorted() ? 'opacity-30 hover:opacity-60' : 'text-(--primary)/80 hover:text-(--primary)'
885
920
  ]"
886
- as-child
887
- >
888
- <button
889
- type="button"
890
- :aria-label="getSortLabel(header.column)"
891
- @click="header.column.getToggleSortingHandler()?.($event)"
921
+ as-child
892
922
  >
893
- <Icon :icon="getSortIcon(header.column)" />
894
- </button>
895
- </Button>
896
- </TooltipTrigger>
897
- <TooltipContent>
898
- {{ getSortLabel(header.column) }}
899
- </TooltipContent>
900
- </Tooltip>
923
+ <button
924
+ type="button"
925
+ :aria-label="getSortLabel(header.column)"
926
+ @click="header.column.getToggleSortingHandler()?.($event)"
927
+ >
928
+ <Icon :icon="getSortIcon(header.column)" />
929
+ </button>
930
+ </Button>
931
+ </TooltipTrigger>
932
+ <TooltipContent>
933
+ {{ getSortLabel(header.column) }}
934
+ </TooltipContent>
935
+ </Tooltip>
901
936
 
902
- <!-- Resize handle -->
903
- <div
904
- v-if="!header.isPlaceholder && header.column.getCanResize() && shouldShowResizeHandle(header.column)"
905
- :class="[
937
+ <!-- Resize handle -->
938
+ <div
939
+ v-if="!header.isPlaceholder && header.column.getCanResize() && shouldShowResizeHandle(header.column)"
940
+ :class="[
906
941
  'group',
907
942
  'absolute',
908
943
  'top-0',
@@ -918,40 +953,40 @@ export { TableConfig, createTableConfig, getColumnTechnicalKey } from "./schema"
918
953
  'hover:opacity-100',
919
954
  'cursor-col-resize'
920
955
  ]"
921
- @mousedown="onResizeMouseDown(header, $event)"
922
- >
923
- <div class="w-2pt h-full translate-x-1pt transform-3d bg-[color-mix(in_srgb,var(--primary)_80%,white)]" />
924
- </div>
925
- </th>
926
- </tr>
927
- </thead>
956
+ @mousedown="onResizeMouseDown(header, $event)"
957
+ >
958
+ <div class="w-2pt h-full translate-x-1pt transform-3d bg-[color-mix(in_srgb,var(--primary)_80%,white)]" />
959
+ </div>
960
+ </th>
961
+ </tr>
962
+ </thead>
928
963
 
929
- <!-- Body -->
930
- <tbody
931
- v-if="columns.length > 0"
932
- class="grid relative"
933
- :style="{ height: `${rowTotalSize}px` }"
934
- >
935
- <template
936
- v-for="r in rowWindow"
937
- :key="rows[r.index]?.id ?? r.index"
964
+ <!-- Body -->
965
+ <tbody
966
+ v-if="columns.length > 0"
967
+ class="grid relative"
968
+ :style="{ height: `${rowTotalSize}px` }"
938
969
  >
939
- <TableRowProvider
940
- v-if="rows[r.index]"
941
- :source-index="rows[r.index].index"
942
- :display-index="getDisplayIndex(rows[r.index])"
943
- :derived-columns="derivedEditableColumns"
944
- :get-row="getRowAt"
945
- :set-row="setRowAt"
946
- :scope-id="config?.id"
970
+ <template
971
+ v-for="r in rowWindow"
972
+ :key="rows[r.index]?.id ?? r.index"
947
973
  >
948
- <tr
949
- :ref="getRowRefFn(rows[r.index].id)"
950
- class="flex absolute w-full border-b border-zinc-300"
951
- :data-index="rows[r.index].index"
952
- :style="{ transform: `translate3d(0, ${r.start}px, 0)` }"
974
+ <TableRowProvider
975
+ v-if="rows[r.index]"
976
+ :source-index="rows[r.index].index"
977
+ :display-index="getDisplayIndex(rows[r.index])"
978
+ :derived-columns="derivedEditableColumns"
979
+ :get-row="getRowAt"
980
+ :set-row="setRowAt"
981
+ :scope-id="config?.id"
953
982
  >
954
- <!--
983
+ <tr
984
+ :ref="getRowRefFn(rows[r.index].id)"
985
+ class="flex absolute w-full border-b border-zinc-300"
986
+ :data-index="rows[r.index].index"
987
+ :style="{ transform: `translate3d(0, ${r.start}px, 0)` }"
988
+ >
989
+ <!--
955
990
  Drop indicator. Absolutely positioned so it overlays
956
991
  the row without affecting flex layout, and sits at
957
992
  z-30 above sticky pinned cells (which use z-15) so
@@ -962,54 +997,54 @@ export { TableConfig, createTableConfig, getColumnTechnicalKey } from "./schema"
962
997
  to the same pixel band, so the indicator doesn't
963
998
  jitter as the hitbox flips between them.
964
999
  -->
965
- <span
966
- v-if="rowReorder.instructionFor(rows[r.index].id) === 'reorder-above'"
967
- aria-hidden="true"
968
- class="absolute left-0 right-0 -top-px h-0.5 z-30 pointer-events-none bg-(--primary)"
969
- />
970
- <span
971
- v-else-if="rowReorder.instructionFor(rows[r.index].id) === 'reorder-below'"
972
- aria-hidden="true"
973
- class="absolute left-0 right-0 -bottom-px h-0.5 z-30 pointer-events-none bg-(--primary)"
974
- />
975
- <td
976
- v-for="cell in rows[r.index].getVisibleCells()"
977
- :key="cell.id"
978
- :class="[
1000
+ <span
1001
+ v-if="rowReorder.instructionFor(rows[r.index].id) === 'reorder-above'"
1002
+ aria-hidden="true"
1003
+ class="absolute left-0 right-0 -top-px h-0.5 z-30 pointer-events-none bg-(--primary)"
1004
+ />
1005
+ <span
1006
+ v-else-if="rowReorder.instructionFor(rows[r.index].id) === 'reorder-below'"
1007
+ aria-hidden="true"
1008
+ class="absolute left-0 right-0 -bottom-px h-0.5 z-30 pointer-events-none bg-(--primary)"
1009
+ />
1010
+ <td
1011
+ v-for="cell in rows[r.index].getVisibleCells()"
1012
+ :key="cell.id"
1013
+ :class="[
979
1014
  'border-zinc-300',
980
1015
  isEffectiveGrow(cell.column) && 'flex-[1_1_auto]',
981
1016
  cell.column.getIsPinned() && 'sticky z-15',
982
1017
  shouldHaveRightBorder(cell.column) && 'border-r',
983
1018
  shouldHaveLeftBorder(cell.column) && 'border-l'
984
1019
  ]"
985
- :style="{
1020
+ :style="{
986
1021
  width: `${cell.column.getSize()}px`,
987
1022
  ...pinnedStyle(cell.column),
988
1023
  ...getCellStyles(cell.getContext())
989
1024
  }"
990
- >
991
- <FlexRender
992
- :render="cell.column.columnDef.cell"
993
- :props="cell.getContext()"
994
- />
995
- </td>
996
- </tr>
997
- </TableRowProvider>
998
- </template>
999
- </tbody>
1025
+ >
1026
+ <FlexRender
1027
+ :render="cell.column.columnDef.cell"
1028
+ :props="cell.getContext()"
1029
+ />
1030
+ </td>
1031
+ </tr>
1032
+ </TableRowProvider>
1033
+ </template>
1034
+ </tbody>
1000
1035
 
1001
- <!-- Footer -->
1002
- <tfoot class="hidden has-data-footer:grid sticky bottom-0 z-10 select-none border-t border-zinc-200">
1003
- <tr
1004
- v-for="group in tableApi.getFooterGroups()"
1005
- :key="group.id"
1006
- class="flex w-full border-zinc-200"
1007
- >
1008
- <th
1009
- v-for="header in group.headers"
1010
- :key="header.id"
1011
- :colspan="header.colSpan"
1012
- :class="[
1036
+ <!-- Footer -->
1037
+ <tfoot class="hidden has-data-footer:grid sticky bottom-0 z-10 select-none border-t border-zinc-200">
1038
+ <tr
1039
+ v-for="group in tableApi.getFooterGroups()"
1040
+ :key="group.id"
1041
+ class="flex w-full border-zinc-200"
1042
+ >
1043
+ <th
1044
+ v-for="header in group.headers"
1045
+ :key="header.id"
1046
+ :colspan="header.colSpan"
1047
+ :class="[
1013
1048
  'flex items-center gap-2 border-zinc-300 text-zinc-600 p-0',
1014
1049
  'text-xs flex items-center justify-center relative',
1015
1050
  'bg-[color-mix(in_srgb,var(--primary)_7%,white)] group',
@@ -1017,23 +1052,27 @@ export { TableConfig, createTableConfig, getColumnTechnicalKey } from "./schema"
1017
1052
  shouldHaveRightBorder(header.column) && 'border-r',
1018
1053
  shouldHaveLeftBorder(header.column) && 'border-l'
1019
1054
  ]"
1020
- :style="{
1055
+ :style="{
1021
1056
  width: `${header.getSize()}px`,
1022
1057
  ...headerGrowStyle(header),
1023
1058
  ...pinnedStyle(header.column)
1024
1059
  }"
1025
- >
1026
- <FlexRender
1027
- v-if="!header.isPlaceholder"
1028
- :render="header.column.columnDef.footer"
1029
- :props="header.getContext()"
1030
- />
1031
- </th>
1032
- </tr>
1033
- </tfoot>
1034
- </table>
1035
- </div>
1036
- </div>
1060
+ >
1061
+ <FlexRender
1062
+ v-if="!header.isPlaceholder"
1063
+ :render="header.column.columnDef.footer"
1064
+ :props="header.getContext()"
1065
+ />
1066
+ </th>
1067
+ </tr>
1068
+ </tfoot>
1069
+ </table>
1070
+ </div>
1071
+ </ScrollArea.Viewport>
1072
+ <ScrollBar orientation="vertical" />
1073
+ <ScrollBar orientation="horizontal" />
1074
+ <ScrollArea.Corner />
1075
+ </ScrollArea.Root>
1037
1076
  </ClientOnly>
1038
1077
 
1039
1078
  <!-- Pagination -->
@@ -24,7 +24,8 @@ export declare const metadata: {
24
24
  readonly name: "清空所有选中行";
25
25
  readonly icon: "fluent:select-all-off-20-regular";
26
26
  }, {
27
- readonly id: "add-row";
27
+ readonly id: "com.shwfed.operation.table.add-row";
28
+ readonly compatibilityDate: "2026-07-06";
28
29
  readonly name: "新增一行";
29
30
  readonly icon: "fluent:add-20-regular";
30
31
  }, {
@@ -157,40 +158,6 @@ export declare function TableConfig(configure: (env: Environment) => void): Sche
157
158
  readonly message: string;
158
159
  }[]] | undefined;
159
160
  }[];
160
- readonly query?: {
161
- readonly style?: string | undefined;
162
- readonly id?: string | undefined;
163
- readonly initial?: {
164
- readonly data: string;
165
- readonly request?: string | undefined;
166
- } | undefined;
167
- readonly displayName?: string | undefined;
168
- readonly kind: "shwfed.component.form";
169
- readonly fields: readonly any[];
170
- readonly layouts: readonly {
171
- readonly name: string;
172
- readonly layout: {
173
- readonly style?: string | undefined;
174
- readonly columns: number;
175
- readonly gap?: number | undefined;
176
- readonly rows?: number | undefined;
177
- readonly placements: {
178
- readonly [x: string]: {
179
- readonly area: readonly [readonly [number, number], readonly [number, number]];
180
- readonly v?: "stretch" | "center" | "end" | "start" | undefined;
181
- readonly h?: "stretch" | "center" | "end" | "start" | undefined;
182
- };
183
- };
184
- };
185
- readonly media?: string | undefined;
186
- }[];
187
- readonly readonly?: string | undefined;
188
- } | undefined;
189
- readonly dataSource?: {
190
- readonly data: string;
191
- readonly total?: string | undefined;
192
- readonly request?: string | undefined;
193
- } | undefined;
194
161
  readonly actions?: {
195
162
  readonly size: "default" | "sm" | "xs";
196
163
  readonly style?: string | undefined;
@@ -258,6 +225,40 @@ export declare function TableConfig(configure: (env: Environment) => void): Sche
258
225
  readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
259
226
  }[];
260
227
  } | undefined;
228
+ readonly query?: {
229
+ readonly style?: string | undefined;
230
+ readonly id?: string | undefined;
231
+ readonly initial?: {
232
+ readonly data: string;
233
+ readonly request?: string | undefined;
234
+ } | undefined;
235
+ readonly displayName?: string | undefined;
236
+ readonly kind: "shwfed.component.form";
237
+ readonly fields: readonly any[];
238
+ readonly layouts: readonly {
239
+ readonly name: string;
240
+ readonly layout: {
241
+ readonly style?: string | undefined;
242
+ readonly columns: number;
243
+ readonly gap?: number | undefined;
244
+ readonly rows?: number | undefined;
245
+ readonly placements: {
246
+ readonly [x: string]: {
247
+ readonly area: readonly [readonly [number, number], readonly [number, number]];
248
+ readonly v?: "stretch" | "center" | "end" | "start" | undefined;
249
+ readonly h?: "stretch" | "center" | "end" | "start" | undefined;
250
+ };
251
+ };
252
+ };
253
+ readonly media?: string | undefined;
254
+ }[];
255
+ readonly readonly?: string | undefined;
256
+ } | undefined;
257
+ readonly dataSource?: {
258
+ readonly data: string;
259
+ readonly total?: string | undefined;
260
+ readonly request?: string | undefined;
261
+ } | undefined;
261
262
  readonly bottomActions?: {
262
263
  readonly size: "default" | "sm" | "xs";
263
264
  readonly style?: string | undefined;
@@ -826,40 +827,6 @@ export declare function createTableConfig(body: Omit<Schema.Schema.Type<ReturnTy
826
827
  readonly message: string;
827
828
  }[]] | undefined;
828
829
  }[];
829
- query?: {
830
- readonly style?: string | undefined;
831
- readonly id?: string | undefined;
832
- readonly initial?: {
833
- readonly data: string;
834
- readonly request?: string | undefined;
835
- } | undefined;
836
- readonly displayName?: string | undefined;
837
- readonly kind: "shwfed.component.form";
838
- readonly fields: readonly any[];
839
- readonly layouts: readonly {
840
- readonly name: string;
841
- readonly layout: {
842
- readonly style?: string | undefined;
843
- readonly columns: number;
844
- readonly gap?: number | undefined;
845
- readonly rows?: number | undefined;
846
- readonly placements: {
847
- readonly [x: string]: {
848
- readonly area: readonly [readonly [number, number], readonly [number, number]];
849
- readonly v?: "stretch" | "center" | "end" | "start" | undefined;
850
- readonly h?: "stretch" | "center" | "end" | "start" | undefined;
851
- };
852
- };
853
- };
854
- readonly media?: string | undefined;
855
- }[];
856
- readonly readonly?: string | undefined;
857
- } | undefined;
858
- dataSource?: {
859
- readonly data: string;
860
- readonly total?: string | undefined;
861
- readonly request?: string | undefined;
862
- } | undefined;
863
830
  actions?: {
864
831
  readonly size: "default" | "sm" | "xs";
865
832
  readonly style?: string | undefined;
@@ -927,6 +894,40 @@ export declare function createTableConfig(body: Omit<Schema.Schema.Type<ReturnTy
927
894
  readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
928
895
  }[];
929
896
  } | undefined;
897
+ query?: {
898
+ readonly style?: string | undefined;
899
+ readonly id?: string | undefined;
900
+ readonly initial?: {
901
+ readonly data: string;
902
+ readonly request?: string | undefined;
903
+ } | undefined;
904
+ readonly displayName?: string | undefined;
905
+ readonly kind: "shwfed.component.form";
906
+ readonly fields: readonly any[];
907
+ readonly layouts: readonly {
908
+ readonly name: string;
909
+ readonly layout: {
910
+ readonly style?: string | undefined;
911
+ readonly columns: number;
912
+ readonly gap?: number | undefined;
913
+ readonly rows?: number | undefined;
914
+ readonly placements: {
915
+ readonly [x: string]: {
916
+ readonly area: readonly [readonly [number, number], readonly [number, number]];
917
+ readonly v?: "stretch" | "center" | "end" | "start" | undefined;
918
+ readonly h?: "stretch" | "center" | "end" | "start" | undefined;
919
+ };
920
+ };
921
+ };
922
+ readonly media?: string | undefined;
923
+ }[];
924
+ readonly readonly?: string | undefined;
925
+ } | undefined;
926
+ dataSource?: {
927
+ readonly data: string;
928
+ readonly total?: string | undefined;
929
+ readonly request?: string | undefined;
930
+ } | undefined;
930
931
  bottomActions?: {
931
932
  readonly size: "default" | "sm" | "xs";
932
933
  readonly style?: string | undefined;