@wordrhyme/auto-crud 1.23.2 → 1.23.3
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.
- package/dist/index.cjs +162 -154
- package/dist/index.js +162 -154
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -2098,175 +2098,183 @@ function ViewMenu({ resourceId, table, fieldsReady = true, defaultView, presets,
|
|
|
2098
2098
|
className: cn("pointer-events-none absolute inset-x-0 h-1 bg-primary", linePosition === "top" ? "top-0" : "bottom-0", tabs?.classNames?.indicator)
|
|
2099
2099
|
}) : null;
|
|
2100
2100
|
const triggerLabel = display === "tabs" ? "视图设置" : selected === null ? "切换视图" : void 0;
|
|
2101
|
+
const viewActions = selected && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [canUpdate ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__wordrhyme_shadcn.Button, {
|
|
2102
|
+
type: "button",
|
|
2103
|
+
size: "sm",
|
|
2104
|
+
disabled: mutation.isPending,
|
|
2105
|
+
onClick: () => mutation.mutate({
|
|
2106
|
+
operation: "update",
|
|
2107
|
+
input: {
|
|
2108
|
+
name: selected.name,
|
|
2109
|
+
slug: selected.slug,
|
|
2110
|
+
scope: selected.source === "saved" ? selected.scope : void 0,
|
|
2111
|
+
query: current
|
|
2112
|
+
}
|
|
2113
|
+
}),
|
|
2114
|
+
children: "保存修改"
|
|
2115
|
+
}) : canCreate && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__wordrhyme_shadcn.Button, {
|
|
2116
|
+
type: "button",
|
|
2117
|
+
size: "sm",
|
|
2118
|
+
disabled: mutation.isPending,
|
|
2119
|
+
onClick: () => open("create"),
|
|
2120
|
+
children: "另存为新视图"
|
|
2121
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__wordrhyme_shadcn.Button, {
|
|
2122
|
+
type: "button",
|
|
2123
|
+
size: "sm",
|
|
2124
|
+
variant: "ghost",
|
|
2125
|
+
disabled: mutation.isPending,
|
|
2126
|
+
onClick: () => select(selected),
|
|
2127
|
+
children: "还原"
|
|
2128
|
+
})] });
|
|
2101
2129
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [children(/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2102
2130
|
className: "flex min-w-0 flex-wrap items-center gap-2",
|
|
2103
2131
|
children: [
|
|
2104
2132
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2105
|
-
className: cn("flex min-w-0 max-w-full items-center gap-1", display === "tabs" && lineTabs && ["relative
|
|
2106
|
-
children: [
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
onValueChange: selectValue,
|
|
2114
|
-
disabled: !fieldsReady || views.isPending || mutation.isPending,
|
|
2115
|
-
"aria-label": "已保存的视图",
|
|
2116
|
-
className: cn(lineTabs ? "min-w-full justify-start gap-0 rounded-none bg-transparent p-0" : "rounded-lg bg-muted p-1", tabs?.classNames?.list),
|
|
2117
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.ToggleGroupItem, {
|
|
2118
|
-
value: "all",
|
|
2119
|
-
className: tabClassName,
|
|
2120
|
-
children: [
|
|
2121
|
-
"全部",
|
|
2122
|
-
renderCount("all"),
|
|
2123
|
-
renderIndicator(selected === null)
|
|
2124
|
-
]
|
|
2125
|
-
}), viewItems.map((view, index$1) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.ToggleGroupItem, {
|
|
2126
|
-
value: `view:${view.id}`,
|
|
2127
|
-
title: view.source === "preset" ? `${view.name}(预设视图)` : view.name,
|
|
2128
|
-
className: tabClassName,
|
|
2129
|
-
children: [
|
|
2130
|
-
view.name,
|
|
2131
|
-
renderCount(`view:${index$1}`),
|
|
2132
|
-
renderIndicator(selected?.id === view.id),
|
|
2133
|
-
selected?.id === view.id && dirty && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2134
|
-
"aria-label": "有未保存修改",
|
|
2135
|
-
className: "size-1.5 rounded-full bg-current"
|
|
2136
|
-
})
|
|
2137
|
-
]
|
|
2138
|
-
}, view.id))]
|
|
2139
|
-
})
|
|
2140
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenu, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__wordrhyme_shadcn.DropdownMenuTrigger, {
|
|
2141
|
-
asChild: true,
|
|
2142
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__wordrhyme_shadcn.Button, {
|
|
2143
|
-
type: "button",
|
|
2144
|
-
variant: display === "tabs" ? "ghost" : "outline",
|
|
2145
|
-
size: display === "tabs" || selected === null ? "icon-sm" : "sm",
|
|
2146
|
-
className: cn("relative shrink-0", display === "dropdown" && selected === null && counts && "w-auto px-2"),
|
|
2147
|
-
"aria-label": triggerLabel,
|
|
2148
|
-
title: triggerLabel,
|
|
2149
|
-
disabled: !fieldsReady || views.isPending || mutation.isPending,
|
|
2150
|
-
children: display === "tabs" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Settings, { className: "size-4" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
2151
|
-
selected ? selected.name : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Layers, {
|
|
2152
|
-
"aria-hidden": "true",
|
|
2153
|
-
className: "size-4"
|
|
2154
|
-
}),
|
|
2155
|
-
renderCount(selected ? `view:${viewItems.findIndex((view) => view.id === selected.id)}` : "all"),
|
|
2156
|
-
dirty && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2157
|
-
"aria-label": "有未保存修改",
|
|
2158
|
-
className: cn("size-1.5 rounded-full bg-current", selected === null && "absolute right-1 top-1")
|
|
2159
|
-
}),
|
|
2160
|
-
selected && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDown, { className: "size-4" })
|
|
2161
|
-
] })
|
|
2162
|
-
})
|
|
2163
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuContent, {
|
|
2164
|
-
align: "start",
|
|
2165
|
-
children: [
|
|
2166
|
-
display === "dropdown" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuRadioGroup, {
|
|
2133
|
+
className: cn("flex min-w-0 max-w-full items-center gap-1", display === "tabs" && "w-full", display === "tabs" && lineTabs && ["relative before:pointer-events-none before:absolute before:inset-x-0 before:h-px before:bg-border", linePosition === "top" ? "before:top-0" : "before:bottom-0"]),
|
|
2134
|
+
children: [
|
|
2135
|
+
display === "tabs" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2136
|
+
className: "min-w-0 flex-1 overflow-x-auto",
|
|
2137
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.ToggleGroup, {
|
|
2138
|
+
type: "single",
|
|
2139
|
+
size: "sm",
|
|
2140
|
+
spacing: 1,
|
|
2167
2141
|
value: selected ? `view:${selected.id}` : "all",
|
|
2168
2142
|
onValueChange: selectValue,
|
|
2169
|
-
|
|
2143
|
+
disabled: !fieldsReady || views.isPending || mutation.isPending,
|
|
2144
|
+
"aria-label": "已保存的视图",
|
|
2145
|
+
className: cn(lineTabs ? "min-w-full justify-start gap-0 rounded-none bg-transparent p-0" : "rounded-lg bg-muted p-1", tabs?.classNames?.list),
|
|
2146
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.ToggleGroupItem, {
|
|
2170
2147
|
value: "all",
|
|
2171
|
-
|
|
2172
|
-
|
|
2148
|
+
className: tabClassName,
|
|
2149
|
+
children: [
|
|
2150
|
+
"全部",
|
|
2151
|
+
renderCount("all"),
|
|
2152
|
+
renderIndicator(selected === null)
|
|
2153
|
+
]
|
|
2154
|
+
}), viewItems.map((view, index$1) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.ToggleGroupItem, {
|
|
2173
2155
|
value: `view:${view.id}`,
|
|
2174
|
-
|
|
2156
|
+
title: view.source === "preset" ? `${view.name}(预设视图)` : view.name,
|
|
2157
|
+
className: tabClassName,
|
|
2158
|
+
children: [
|
|
2159
|
+
view.name,
|
|
2160
|
+
renderCount(`view:${index$1}`),
|
|
2161
|
+
renderIndicator(selected?.id === view.id),
|
|
2162
|
+
selected?.id === view.id && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2163
|
+
"aria-label": dirty ? "有未保存修改" : void 0,
|
|
2164
|
+
className: cn("size-1.5 rounded-full bg-current", !dirty && "invisible")
|
|
2165
|
+
})
|
|
2166
|
+
]
|
|
2175
2167
|
}, view.id))]
|
|
2176
|
-
})
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2168
|
+
})
|
|
2169
|
+
}),
|
|
2170
|
+
display === "tabs" && viewActions && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2171
|
+
className: cn("flex shrink-0 items-center gap-1", !dirty && "invisible"),
|
|
2172
|
+
children: viewActions
|
|
2173
|
+
}),
|
|
2174
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenu, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__wordrhyme_shadcn.DropdownMenuTrigger, {
|
|
2175
|
+
asChild: true,
|
|
2176
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__wordrhyme_shadcn.Button, {
|
|
2177
|
+
type: "button",
|
|
2178
|
+
variant: display === "tabs" ? "ghost" : "outline",
|
|
2179
|
+
size: display === "tabs" || selected === null ? "icon-sm" : "sm",
|
|
2180
|
+
className: cn("relative shrink-0", display === "dropdown" && selected === null && counts && "w-auto px-2"),
|
|
2181
|
+
"aria-label": triggerLabel,
|
|
2182
|
+
title: triggerLabel,
|
|
2183
|
+
disabled: !fieldsReady || views.isPending || mutation.isPending,
|
|
2184
|
+
children: display === "tabs" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Settings, { className: "size-4" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
2185
|
+
selected ? selected.name : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Layers, {
|
|
2186
|
+
"aria-hidden": "true",
|
|
2187
|
+
className: "size-4"
|
|
2188
|
+
}),
|
|
2189
|
+
renderCount(selected ? `view:${viewItems.findIndex((view) => view.id === selected.id)}` : "all"),
|
|
2190
|
+
dirty && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2191
|
+
"aria-label": "有未保存修改",
|
|
2192
|
+
className: cn("size-1.5 rounded-full bg-current", selected === null && "absolute right-1 top-1")
|
|
2193
|
+
}),
|
|
2194
|
+
selected && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDown, { className: "size-4" })
|
|
2195
|
+
] })
|
|
2196
|
+
})
|
|
2197
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuContent, {
|
|
2198
|
+
align: "start",
|
|
2199
|
+
children: [
|
|
2200
|
+
display === "dropdown" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuRadioGroup, {
|
|
2201
|
+
value: selected ? `view:${selected.id}` : "all",
|
|
2202
|
+
onValueChange: selectValue,
|
|
2203
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuRadioItem, {
|
|
2204
|
+
value: "all",
|
|
2205
|
+
children: ["全部", renderCount("all")]
|
|
2206
|
+
}), viewItems.map((view, index$1) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuRadioItem, {
|
|
2207
|
+
value: `view:${view.id}`,
|
|
2208
|
+
children: [view.name, renderCount(`view:${index$1}`)]
|
|
2209
|
+
}, view.id))]
|
|
2210
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__wordrhyme_shadcn.DropdownMenuSeparator, {})] }),
|
|
2211
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__wordrhyme_shadcn.DropdownMenuLabel, { children: "视图设置" }),
|
|
2188
2212
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuItem, {
|
|
2189
2213
|
disabled: !ready || !canCreate,
|
|
2190
|
-
onSelect: () => open("
|
|
2191
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.
|
|
2192
|
-
}),
|
|
2193
|
-
canDelete && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuItem, {
|
|
2194
|
-
onSelect: () => open("delete"),
|
|
2195
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Trash2, { className: "size-4" }), "删除视图"]
|
|
2214
|
+
onSelect: () => open("create"),
|
|
2215
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Plus, { className: "size-4" }), "另存为新视图"]
|
|
2196
2216
|
}),
|
|
2217
|
+
selected && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
2218
|
+
canUpdate && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuItem, {
|
|
2219
|
+
onSelect: () => open("rename"),
|
|
2220
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Pencil, { className: "size-4" }), "重命名视图"]
|
|
2221
|
+
}),
|
|
2222
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuItem, {
|
|
2223
|
+
disabled: !ready || !canCreate,
|
|
2224
|
+
onSelect: () => open("duplicate"),
|
|
2225
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Copy, { className: "size-4" }), "复制视图"]
|
|
2226
|
+
}),
|
|
2227
|
+
canDelete && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuItem, {
|
|
2228
|
+
onSelect: () => open("delete"),
|
|
2229
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Trash2, { className: "size-4" }), "删除视图"]
|
|
2230
|
+
}),
|
|
2231
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuItem, {
|
|
2232
|
+
disabled: !ready,
|
|
2233
|
+
onSelect: hideView,
|
|
2234
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.EyeOff, { className: "size-4" }), "隐藏视图"]
|
|
2235
|
+
})
|
|
2236
|
+
] }),
|
|
2237
|
+
selected && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__wordrhyme_shadcn.DropdownMenuSeparator, {}),
|
|
2197
2238
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuItem, {
|
|
2239
|
+
disabled: !ready || viewItems.length < 2,
|
|
2240
|
+
onSelect: () => open("reorder"),
|
|
2241
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ArrowDownUp, { className: "size-4" }), "调整顺序"]
|
|
2242
|
+
}),
|
|
2243
|
+
restorableViews.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuSub, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuSubTrigger, {
|
|
2198
2244
|
disabled: !ready,
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
},
|
|
2231
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuRadioItem, {
|
|
2232
|
-
value: "dropdown",
|
|
2233
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDown, { className: "size-4" }), "下拉"]
|
|
2234
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuRadioItem, {
|
|
2235
|
-
value: "tabs",
|
|
2236
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.AppWindow, { className: "size-4" }), "Tab"]
|
|
2237
|
-
})]
|
|
2238
|
-
}) })] })
|
|
2239
|
-
]
|
|
2240
|
-
})] })]
|
|
2245
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Eye, { className: "size-4" }), "恢复隐藏视图"]
|
|
2246
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__wordrhyme_shadcn.DropdownMenuSubContent, { children: restorableViews.map((view) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuItem, {
|
|
2247
|
+
onSelect: () => {
|
|
2248
|
+
preferencesRestored.current = false;
|
|
2249
|
+
savePreferences({ hiddenViewIds: preferencesRef.current?.hiddenViewIds?.filter((id) => id !== view.id) });
|
|
2250
|
+
setError(null);
|
|
2251
|
+
},
|
|
2252
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Eye, { className: "size-4" }), view.name]
|
|
2253
|
+
}, view.id)) })] }),
|
|
2254
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuSub, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuSubTrigger, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.PanelsTopLeft, { className: "size-4" }), "展示方式"] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__wordrhyme_shadcn.DropdownMenuSubContent, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuRadioGroup, {
|
|
2255
|
+
value: display,
|
|
2256
|
+
onValueChange: (value) => {
|
|
2257
|
+
if (value === "dropdown" || value === "tabs") {
|
|
2258
|
+
setDisplay(value);
|
|
2259
|
+
savePreferences({
|
|
2260
|
+
selector: value,
|
|
2261
|
+
viewId: selected?.id ?? null
|
|
2262
|
+
});
|
|
2263
|
+
}
|
|
2264
|
+
},
|
|
2265
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuRadioItem, {
|
|
2266
|
+
value: "dropdown",
|
|
2267
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDown, { className: "size-4" }), "下拉"]
|
|
2268
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__wordrhyme_shadcn.DropdownMenuRadioItem, {
|
|
2269
|
+
value: "tabs",
|
|
2270
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.AppWindow, { className: "size-4" }), "Tab"]
|
|
2271
|
+
})]
|
|
2272
|
+
}) })] })
|
|
2273
|
+
]
|
|
2274
|
+
})] })
|
|
2275
|
+
]
|
|
2241
2276
|
}),
|
|
2242
|
-
|
|
2243
|
-
type: "button",
|
|
2244
|
-
size: "sm",
|
|
2245
|
-
disabled: mutation.isPending,
|
|
2246
|
-
onClick: () => mutation.mutate({
|
|
2247
|
-
operation: "update",
|
|
2248
|
-
input: {
|
|
2249
|
-
name: selected.name,
|
|
2250
|
-
slug: selected.slug,
|
|
2251
|
-
scope: selected.source === "saved" ? selected.scope : void 0,
|
|
2252
|
-
query: current
|
|
2253
|
-
}
|
|
2254
|
-
}),
|
|
2255
|
-
children: "保存修改"
|
|
2256
|
-
}) : canCreate && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__wordrhyme_shadcn.Button, {
|
|
2257
|
-
type: "button",
|
|
2258
|
-
size: "sm",
|
|
2259
|
-
disabled: mutation.isPending,
|
|
2260
|
-
onClick: () => open("create"),
|
|
2261
|
-
children: "另存为新视图"
|
|
2262
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__wordrhyme_shadcn.Button, {
|
|
2263
|
-
type: "button",
|
|
2264
|
-
size: "sm",
|
|
2265
|
-
variant: "ghost",
|
|
2266
|
-
disabled: mutation.isPending,
|
|
2267
|
-
onClick: () => select(selected),
|
|
2268
|
-
children: "还原"
|
|
2269
|
-
})] }),
|
|
2277
|
+
display === "dropdown" && dirty && viewActions,
|
|
2270
2278
|
(error !== null || views.error !== null || collection.error !== null) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2271
2279
|
role: "alert",
|
|
2272
2280
|
className: "text-sm text-destructive",
|
package/dist/index.js
CHANGED
|
@@ -2082,175 +2082,183 @@ function ViewMenu({ resourceId, table, fieldsReady = true, defaultView, presets,
|
|
|
2082
2082
|
className: cn("pointer-events-none absolute inset-x-0 h-1 bg-primary", linePosition === "top" ? "top-0" : "bottom-0", tabs?.classNames?.indicator)
|
|
2083
2083
|
}) : null;
|
|
2084
2084
|
const triggerLabel = display === "tabs" ? "视图设置" : selected === null ? "切换视图" : void 0;
|
|
2085
|
+
const viewActions = selected && /* @__PURE__ */ jsxs(Fragment$1, { children: [canUpdate ? /* @__PURE__ */ jsx(Button, {
|
|
2086
|
+
type: "button",
|
|
2087
|
+
size: "sm",
|
|
2088
|
+
disabled: mutation.isPending,
|
|
2089
|
+
onClick: () => mutation.mutate({
|
|
2090
|
+
operation: "update",
|
|
2091
|
+
input: {
|
|
2092
|
+
name: selected.name,
|
|
2093
|
+
slug: selected.slug,
|
|
2094
|
+
scope: selected.source === "saved" ? selected.scope : void 0,
|
|
2095
|
+
query: current
|
|
2096
|
+
}
|
|
2097
|
+
}),
|
|
2098
|
+
children: "保存修改"
|
|
2099
|
+
}) : canCreate && /* @__PURE__ */ jsx(Button, {
|
|
2100
|
+
type: "button",
|
|
2101
|
+
size: "sm",
|
|
2102
|
+
disabled: mutation.isPending,
|
|
2103
|
+
onClick: () => open("create"),
|
|
2104
|
+
children: "另存为新视图"
|
|
2105
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
2106
|
+
type: "button",
|
|
2107
|
+
size: "sm",
|
|
2108
|
+
variant: "ghost",
|
|
2109
|
+
disabled: mutation.isPending,
|
|
2110
|
+
onClick: () => select(selected),
|
|
2111
|
+
children: "还原"
|
|
2112
|
+
})] });
|
|
2085
2113
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [children(/* @__PURE__ */ jsxs("div", {
|
|
2086
2114
|
className: "flex min-w-0 flex-wrap items-center gap-2",
|
|
2087
2115
|
children: [
|
|
2088
2116
|
/* @__PURE__ */ jsxs("div", {
|
|
2089
|
-
className: cn("flex min-w-0 max-w-full items-center gap-1", display === "tabs" && lineTabs && ["relative
|
|
2090
|
-
children: [
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
onValueChange: selectValue,
|
|
2098
|
-
disabled: !fieldsReady || views.isPending || mutation.isPending,
|
|
2099
|
-
"aria-label": "已保存的视图",
|
|
2100
|
-
className: cn(lineTabs ? "min-w-full justify-start gap-0 rounded-none bg-transparent p-0" : "rounded-lg bg-muted p-1", tabs?.classNames?.list),
|
|
2101
|
-
children: [/* @__PURE__ */ jsxs(ToggleGroupItem, {
|
|
2102
|
-
value: "all",
|
|
2103
|
-
className: tabClassName,
|
|
2104
|
-
children: [
|
|
2105
|
-
"全部",
|
|
2106
|
-
renderCount("all"),
|
|
2107
|
-
renderIndicator(selected === null)
|
|
2108
|
-
]
|
|
2109
|
-
}), viewItems.map((view, index$1) => /* @__PURE__ */ jsxs(ToggleGroupItem, {
|
|
2110
|
-
value: `view:${view.id}`,
|
|
2111
|
-
title: view.source === "preset" ? `${view.name}(预设视图)` : view.name,
|
|
2112
|
-
className: tabClassName,
|
|
2113
|
-
children: [
|
|
2114
|
-
view.name,
|
|
2115
|
-
renderCount(`view:${index$1}`),
|
|
2116
|
-
renderIndicator(selected?.id === view.id),
|
|
2117
|
-
selected?.id === view.id && dirty && /* @__PURE__ */ jsx("span", {
|
|
2118
|
-
"aria-label": "有未保存修改",
|
|
2119
|
-
className: "size-1.5 rounded-full bg-current"
|
|
2120
|
-
})
|
|
2121
|
-
]
|
|
2122
|
-
}, view.id))]
|
|
2123
|
-
})
|
|
2124
|
-
}), /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
|
|
2125
|
-
asChild: true,
|
|
2126
|
-
children: /* @__PURE__ */ jsx(Button, {
|
|
2127
|
-
type: "button",
|
|
2128
|
-
variant: display === "tabs" ? "ghost" : "outline",
|
|
2129
|
-
size: display === "tabs" || selected === null ? "icon-sm" : "sm",
|
|
2130
|
-
className: cn("relative shrink-0", display === "dropdown" && selected === null && counts && "w-auto px-2"),
|
|
2131
|
-
"aria-label": triggerLabel,
|
|
2132
|
-
title: triggerLabel,
|
|
2133
|
-
disabled: !fieldsReady || views.isPending || mutation.isPending,
|
|
2134
|
-
children: display === "tabs" ? /* @__PURE__ */ jsx(Settings, { className: "size-4" }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
2135
|
-
selected ? selected.name : /* @__PURE__ */ jsx(Layers, {
|
|
2136
|
-
"aria-hidden": "true",
|
|
2137
|
-
className: "size-4"
|
|
2138
|
-
}),
|
|
2139
|
-
renderCount(selected ? `view:${viewItems.findIndex((view) => view.id === selected.id)}` : "all"),
|
|
2140
|
-
dirty && /* @__PURE__ */ jsx("span", {
|
|
2141
|
-
"aria-label": "有未保存修改",
|
|
2142
|
-
className: cn("size-1.5 rounded-full bg-current", selected === null && "absolute right-1 top-1")
|
|
2143
|
-
}),
|
|
2144
|
-
selected && /* @__PURE__ */ jsx(ChevronDown, { className: "size-4" })
|
|
2145
|
-
] })
|
|
2146
|
-
})
|
|
2147
|
-
}), /* @__PURE__ */ jsxs(DropdownMenuContent, {
|
|
2148
|
-
align: "start",
|
|
2149
|
-
children: [
|
|
2150
|
-
display === "dropdown" && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(DropdownMenuRadioGroup, {
|
|
2117
|
+
className: cn("flex min-w-0 max-w-full items-center gap-1", display === "tabs" && "w-full", display === "tabs" && lineTabs && ["relative before:pointer-events-none before:absolute before:inset-x-0 before:h-px before:bg-border", linePosition === "top" ? "before:top-0" : "before:bottom-0"]),
|
|
2118
|
+
children: [
|
|
2119
|
+
display === "tabs" && /* @__PURE__ */ jsx("div", {
|
|
2120
|
+
className: "min-w-0 flex-1 overflow-x-auto",
|
|
2121
|
+
children: /* @__PURE__ */ jsxs(ToggleGroup, {
|
|
2122
|
+
type: "single",
|
|
2123
|
+
size: "sm",
|
|
2124
|
+
spacing: 1,
|
|
2151
2125
|
value: selected ? `view:${selected.id}` : "all",
|
|
2152
2126
|
onValueChange: selectValue,
|
|
2153
|
-
|
|
2127
|
+
disabled: !fieldsReady || views.isPending || mutation.isPending,
|
|
2128
|
+
"aria-label": "已保存的视图",
|
|
2129
|
+
className: cn(lineTabs ? "min-w-full justify-start gap-0 rounded-none bg-transparent p-0" : "rounded-lg bg-muted p-1", tabs?.classNames?.list),
|
|
2130
|
+
children: [/* @__PURE__ */ jsxs(ToggleGroupItem, {
|
|
2154
2131
|
value: "all",
|
|
2155
|
-
|
|
2156
|
-
|
|
2132
|
+
className: tabClassName,
|
|
2133
|
+
children: [
|
|
2134
|
+
"全部",
|
|
2135
|
+
renderCount("all"),
|
|
2136
|
+
renderIndicator(selected === null)
|
|
2137
|
+
]
|
|
2138
|
+
}), viewItems.map((view, index$1) => /* @__PURE__ */ jsxs(ToggleGroupItem, {
|
|
2157
2139
|
value: `view:${view.id}`,
|
|
2158
|
-
|
|
2140
|
+
title: view.source === "preset" ? `${view.name}(预设视图)` : view.name,
|
|
2141
|
+
className: tabClassName,
|
|
2142
|
+
children: [
|
|
2143
|
+
view.name,
|
|
2144
|
+
renderCount(`view:${index$1}`),
|
|
2145
|
+
renderIndicator(selected?.id === view.id),
|
|
2146
|
+
selected?.id === view.id && /* @__PURE__ */ jsx("span", {
|
|
2147
|
+
"aria-label": dirty ? "有未保存修改" : void 0,
|
|
2148
|
+
className: cn("size-1.5 rounded-full bg-current", !dirty && "invisible")
|
|
2149
|
+
})
|
|
2150
|
+
]
|
|
2159
2151
|
}, view.id))]
|
|
2160
|
-
})
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2152
|
+
})
|
|
2153
|
+
}),
|
|
2154
|
+
display === "tabs" && viewActions && /* @__PURE__ */ jsx("div", {
|
|
2155
|
+
className: cn("flex shrink-0 items-center gap-1", !dirty && "invisible"),
|
|
2156
|
+
children: viewActions
|
|
2157
|
+
}),
|
|
2158
|
+
/* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
|
|
2159
|
+
asChild: true,
|
|
2160
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
2161
|
+
type: "button",
|
|
2162
|
+
variant: display === "tabs" ? "ghost" : "outline",
|
|
2163
|
+
size: display === "tabs" || selected === null ? "icon-sm" : "sm",
|
|
2164
|
+
className: cn("relative shrink-0", display === "dropdown" && selected === null && counts && "w-auto px-2"),
|
|
2165
|
+
"aria-label": triggerLabel,
|
|
2166
|
+
title: triggerLabel,
|
|
2167
|
+
disabled: !fieldsReady || views.isPending || mutation.isPending,
|
|
2168
|
+
children: display === "tabs" ? /* @__PURE__ */ jsx(Settings, { className: "size-4" }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
2169
|
+
selected ? selected.name : /* @__PURE__ */ jsx(Layers, {
|
|
2170
|
+
"aria-hidden": "true",
|
|
2171
|
+
className: "size-4"
|
|
2172
|
+
}),
|
|
2173
|
+
renderCount(selected ? `view:${viewItems.findIndex((view) => view.id === selected.id)}` : "all"),
|
|
2174
|
+
dirty && /* @__PURE__ */ jsx("span", {
|
|
2175
|
+
"aria-label": "有未保存修改",
|
|
2176
|
+
className: cn("size-1.5 rounded-full bg-current", selected === null && "absolute right-1 top-1")
|
|
2177
|
+
}),
|
|
2178
|
+
selected && /* @__PURE__ */ jsx(ChevronDown, { className: "size-4" })
|
|
2179
|
+
] })
|
|
2180
|
+
})
|
|
2181
|
+
}), /* @__PURE__ */ jsxs(DropdownMenuContent, {
|
|
2182
|
+
align: "start",
|
|
2183
|
+
children: [
|
|
2184
|
+
display === "dropdown" && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(DropdownMenuRadioGroup, {
|
|
2185
|
+
value: selected ? `view:${selected.id}` : "all",
|
|
2186
|
+
onValueChange: selectValue,
|
|
2187
|
+
children: [/* @__PURE__ */ jsxs(DropdownMenuRadioItem, {
|
|
2188
|
+
value: "all",
|
|
2189
|
+
children: ["全部", renderCount("all")]
|
|
2190
|
+
}), viewItems.map((view, index$1) => /* @__PURE__ */ jsxs(DropdownMenuRadioItem, {
|
|
2191
|
+
value: `view:${view.id}`,
|
|
2192
|
+
children: [view.name, renderCount(`view:${index$1}`)]
|
|
2193
|
+
}, view.id))]
|
|
2194
|
+
}), /* @__PURE__ */ jsx(DropdownMenuSeparator, {})] }),
|
|
2195
|
+
/* @__PURE__ */ jsx(DropdownMenuLabel, { children: "视图设置" }),
|
|
2172
2196
|
/* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
2173
2197
|
disabled: !ready || !canCreate,
|
|
2174
|
-
onSelect: () => open("
|
|
2175
|
-
children: [/* @__PURE__ */ jsx(
|
|
2176
|
-
}),
|
|
2177
|
-
canDelete && /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
2178
|
-
onSelect: () => open("delete"),
|
|
2179
|
-
children: [/* @__PURE__ */ jsx(Trash2, { className: "size-4" }), "删除视图"]
|
|
2198
|
+
onSelect: () => open("create"),
|
|
2199
|
+
children: [/* @__PURE__ */ jsx(Plus, { className: "size-4" }), "另存为新视图"]
|
|
2180
2200
|
}),
|
|
2201
|
+
selected && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
2202
|
+
canUpdate && /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
2203
|
+
onSelect: () => open("rename"),
|
|
2204
|
+
children: [/* @__PURE__ */ jsx(Pencil, { className: "size-4" }), "重命名视图"]
|
|
2205
|
+
}),
|
|
2206
|
+
/* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
2207
|
+
disabled: !ready || !canCreate,
|
|
2208
|
+
onSelect: () => open("duplicate"),
|
|
2209
|
+
children: [/* @__PURE__ */ jsx(Copy, { className: "size-4" }), "复制视图"]
|
|
2210
|
+
}),
|
|
2211
|
+
canDelete && /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
2212
|
+
onSelect: () => open("delete"),
|
|
2213
|
+
children: [/* @__PURE__ */ jsx(Trash2, { className: "size-4" }), "删除视图"]
|
|
2214
|
+
}),
|
|
2215
|
+
/* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
2216
|
+
disabled: !ready,
|
|
2217
|
+
onSelect: hideView,
|
|
2218
|
+
children: [/* @__PURE__ */ jsx(EyeOff, { className: "size-4" }), "隐藏视图"]
|
|
2219
|
+
})
|
|
2220
|
+
] }),
|
|
2221
|
+
selected && /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
2181
2222
|
/* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
2223
|
+
disabled: !ready || viewItems.length < 2,
|
|
2224
|
+
onSelect: () => open("reorder"),
|
|
2225
|
+
children: [/* @__PURE__ */ jsx(ArrowDownUp, { className: "size-4" }), "调整顺序"]
|
|
2226
|
+
}),
|
|
2227
|
+
restorableViews.length > 0 && /* @__PURE__ */ jsxs(DropdownMenuSub, { children: [/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, {
|
|
2182
2228
|
disabled: !ready,
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
},
|
|
2215
|
-
children: [/* @__PURE__ */ jsxs(DropdownMenuRadioItem, {
|
|
2216
|
-
value: "dropdown",
|
|
2217
|
-
children: [/* @__PURE__ */ jsx(ChevronDown, { className: "size-4" }), "下拉"]
|
|
2218
|
-
}), /* @__PURE__ */ jsxs(DropdownMenuRadioItem, {
|
|
2219
|
-
value: "tabs",
|
|
2220
|
-
children: [/* @__PURE__ */ jsx(AppWindow, { className: "size-4" }), "Tab"]
|
|
2221
|
-
})]
|
|
2222
|
-
}) })] })
|
|
2223
|
-
]
|
|
2224
|
-
})] })]
|
|
2229
|
+
children: [/* @__PURE__ */ jsx(Eye, { className: "size-4" }), "恢复隐藏视图"]
|
|
2230
|
+
}), /* @__PURE__ */ jsx(DropdownMenuSubContent, { children: restorableViews.map((view) => /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
2231
|
+
onSelect: () => {
|
|
2232
|
+
preferencesRestored.current = false;
|
|
2233
|
+
savePreferences({ hiddenViewIds: preferencesRef.current?.hiddenViewIds?.filter((id) => id !== view.id) });
|
|
2234
|
+
setError(null);
|
|
2235
|
+
},
|
|
2236
|
+
children: [/* @__PURE__ */ jsx(Eye, { className: "size-4" }), view.name]
|
|
2237
|
+
}, view.id)) })] }),
|
|
2238
|
+
/* @__PURE__ */ jsxs(DropdownMenuSub, { children: [/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { children: [/* @__PURE__ */ jsx(PanelsTopLeft, { className: "size-4" }), "展示方式"] }), /* @__PURE__ */ jsx(DropdownMenuSubContent, { children: /* @__PURE__ */ jsxs(DropdownMenuRadioGroup, {
|
|
2239
|
+
value: display,
|
|
2240
|
+
onValueChange: (value) => {
|
|
2241
|
+
if (value === "dropdown" || value === "tabs") {
|
|
2242
|
+
setDisplay(value);
|
|
2243
|
+
savePreferences({
|
|
2244
|
+
selector: value,
|
|
2245
|
+
viewId: selected?.id ?? null
|
|
2246
|
+
});
|
|
2247
|
+
}
|
|
2248
|
+
},
|
|
2249
|
+
children: [/* @__PURE__ */ jsxs(DropdownMenuRadioItem, {
|
|
2250
|
+
value: "dropdown",
|
|
2251
|
+
children: [/* @__PURE__ */ jsx(ChevronDown, { className: "size-4" }), "下拉"]
|
|
2252
|
+
}), /* @__PURE__ */ jsxs(DropdownMenuRadioItem, {
|
|
2253
|
+
value: "tabs",
|
|
2254
|
+
children: [/* @__PURE__ */ jsx(AppWindow, { className: "size-4" }), "Tab"]
|
|
2255
|
+
})]
|
|
2256
|
+
}) })] })
|
|
2257
|
+
]
|
|
2258
|
+
})] })
|
|
2259
|
+
]
|
|
2225
2260
|
}),
|
|
2226
|
-
|
|
2227
|
-
type: "button",
|
|
2228
|
-
size: "sm",
|
|
2229
|
-
disabled: mutation.isPending,
|
|
2230
|
-
onClick: () => mutation.mutate({
|
|
2231
|
-
operation: "update",
|
|
2232
|
-
input: {
|
|
2233
|
-
name: selected.name,
|
|
2234
|
-
slug: selected.slug,
|
|
2235
|
-
scope: selected.source === "saved" ? selected.scope : void 0,
|
|
2236
|
-
query: current
|
|
2237
|
-
}
|
|
2238
|
-
}),
|
|
2239
|
-
children: "保存修改"
|
|
2240
|
-
}) : canCreate && /* @__PURE__ */ jsx(Button, {
|
|
2241
|
-
type: "button",
|
|
2242
|
-
size: "sm",
|
|
2243
|
-
disabled: mutation.isPending,
|
|
2244
|
-
onClick: () => open("create"),
|
|
2245
|
-
children: "另存为新视图"
|
|
2246
|
-
}), /* @__PURE__ */ jsx(Button, {
|
|
2247
|
-
type: "button",
|
|
2248
|
-
size: "sm",
|
|
2249
|
-
variant: "ghost",
|
|
2250
|
-
disabled: mutation.isPending,
|
|
2251
|
-
onClick: () => select(selected),
|
|
2252
|
-
children: "还原"
|
|
2253
|
-
})] }),
|
|
2261
|
+
display === "dropdown" && dirty && viewActions,
|
|
2254
2262
|
(error !== null || views.error !== null || collection.error !== null) && /* @__PURE__ */ jsxs("span", {
|
|
2255
2263
|
role: "alert",
|
|
2256
2264
|
className: "text-sm text-destructive",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordrhyme/auto-crud",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.23.
|
|
4
|
+
"version": "1.23.3",
|
|
5
5
|
"description": "Schema-first CRUD components with auto-generated tables and forms",
|
|
6
6
|
"author": "wordrhyme",
|
|
7
7
|
"license": "MIT",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"tailwind-merge": "^3.5.0",
|
|
73
73
|
"vaul": "^1.1.2",
|
|
74
74
|
"@wordrhyme/shadcn": "2.0.3",
|
|
75
|
-
"@wordrhyme/
|
|
76
|
-
"@wordrhyme/shadcn
|
|
75
|
+
"@wordrhyme/shadcn-ui": "2.1.4",
|
|
76
|
+
"@wordrhyme/formily-shadcn": "2.1.4"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@storybook/react": "^8.6.18",
|
|
@@ -95,8 +95,8 @@
|
|
|
95
95
|
"typescript": "^5.9.3",
|
|
96
96
|
"vitest": "^3.2.4",
|
|
97
97
|
"@internal/prettier-config": "0.0.1",
|
|
98
|
-
"@internal/eslint-config": "0.3.0",
|
|
99
98
|
"@internal/tsconfig": "0.1.0",
|
|
99
|
+
"@internal/eslint-config": "0.3.0",
|
|
100
100
|
"@internal/tsdown-config": "0.1.0",
|
|
101
101
|
"@internal/vitest-config": "0.1.0"
|
|
102
102
|
},
|