@wordrhyme/auto-crud 1.2.1 → 1.2.4
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/README.md +44 -12
- package/dist/index.cjs +131 -42
- package/dist/index.d.cts +58 -28
- package/dist/index.d.ts +74 -44
- package/dist/index.js +130 -43
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -4864,7 +4864,7 @@ const filterModeConfig = {
|
|
|
4864
4864
|
tooltip: "Linear-style command filters"
|
|
4865
4865
|
}
|
|
4866
4866
|
};
|
|
4867
|
-
function AutoTable({ schema, data, pageCount = 1, overrides, enableRowSelection = true, exclude, actions, pinnedColumns, filterMode = "simple", search = false, onDeleteSelected, onUpdateSelected, batchUpdateFields, actionBarExtra, actionBarActions, initialSorting, enableExport = true, showDefaultExport = true, onSelectedCountChange, getSelectedRows }) {
|
|
4867
|
+
function AutoTable({ schema, data, pageCount = 1, overrides, enableRowSelection = true, exclude, actions, pinnedColumns, filterMode = "simple", search = false, onDeleteSelected, onUpdateSelected, batchUpdateFields, actionBarExtra, actionBarActions, initialSorting, enableExport = true, showDefaultExport = true, onSelectedCountChange, onSelectedRowsChange, getSelectedRows }) {
|
|
4868
4868
|
const modes = filterMode ? Array.isArray(filterMode) ? filterMode : [filterMode] : DEFAULT_MODES;
|
|
4869
4869
|
const [currentMode, setCurrentMode] = useQueryState("filterMode", parseAsStringEnum(modes).withDefault(modes[0] ?? "simple"));
|
|
4870
4870
|
const showToggle = modes.length > 1;
|
|
@@ -4913,17 +4913,28 @@ function AutoTable({ schema, data, pageCount = 1, overrides, enableRowSelection
|
|
|
4913
4913
|
shallow: false,
|
|
4914
4914
|
clearOnDefault: true
|
|
4915
4915
|
});
|
|
4916
|
-
const
|
|
4916
|
+
const rowSelection = table.getState().rowSelection;
|
|
4917
|
+
const columnFilters = table.getState().columnFilters;
|
|
4918
|
+
const selectedRows = useMemo(() => table.getFilteredSelectedRowModel().rows.map((row) => row.original), [
|
|
4919
|
+
table,
|
|
4920
|
+
rowSelection,
|
|
4921
|
+
columnFilters,
|
|
4922
|
+
data
|
|
4923
|
+
]);
|
|
4924
|
+
const getSelectedRowsFn = useCallback(() => selectedRows, [selectedRows]);
|
|
4917
4925
|
useEffect(() => {
|
|
4918
4926
|
if (getSelectedRows) getSelectedRows.current = getSelectedRowsFn;
|
|
4919
4927
|
return () => {
|
|
4920
4928
|
if (getSelectedRows) getSelectedRows.current = null;
|
|
4921
4929
|
};
|
|
4922
4930
|
}, [getSelectedRows, getSelectedRowsFn]);
|
|
4923
|
-
const selectedRowCount =
|
|
4931
|
+
const selectedRowCount = selectedRows.length;
|
|
4924
4932
|
useEffect(() => {
|
|
4925
4933
|
onSelectedCountChange?.(selectedRowCount);
|
|
4926
4934
|
}, [selectedRowCount, onSelectedCountChange]);
|
|
4935
|
+
useEffect(() => {
|
|
4936
|
+
onSelectedRowsChange?.(selectedRows);
|
|
4937
|
+
}, [selectedRows, onSelectedRowsChange]);
|
|
4927
4938
|
const FilterModeSelect = showToggle ? /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
|
|
4928
4939
|
asChild: true,
|
|
4929
4940
|
children: /* @__PURE__ */ jsx(Button, {
|
|
@@ -5192,8 +5203,12 @@ function createEditFormSchema(schema, options) {
|
|
|
5192
5203
|
function createRegistry(label) {
|
|
5193
5204
|
const entries = /* @__PURE__ */ new Map();
|
|
5194
5205
|
const listeners = /* @__PURE__ */ new Set();
|
|
5206
|
+
let notifyScheduled = false;
|
|
5195
5207
|
const notify = () => {
|
|
5208
|
+
if (notifyScheduled) return;
|
|
5209
|
+
notifyScheduled = true;
|
|
5196
5210
|
queueMicrotask(() => {
|
|
5211
|
+
notifyScheduled = false;
|
|
5197
5212
|
for (const listener of listeners) listener();
|
|
5198
5213
|
});
|
|
5199
5214
|
};
|
|
@@ -5223,20 +5238,32 @@ function createRegistry(label) {
|
|
|
5223
5238
|
};
|
|
5224
5239
|
}
|
|
5225
5240
|
const formComponents = createRegistry("form component");
|
|
5226
|
-
const
|
|
5227
|
-
function
|
|
5228
|
-
if (typeof
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
}
|
|
5233
|
-
if (!config?.key) return void 0;
|
|
5241
|
+
const components = formComponents;
|
|
5242
|
+
function normalizeDataSourceRegistration(registration) {
|
|
5243
|
+
if (typeof registration === "function") return {
|
|
5244
|
+
dependencies: [],
|
|
5245
|
+
reset: false,
|
|
5246
|
+
load: registration
|
|
5247
|
+
};
|
|
5234
5248
|
return {
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5249
|
+
dependencies: Array.isArray(registration.dependencies) ? registration.dependencies : [],
|
|
5250
|
+
reset: registration.reset === true,
|
|
5251
|
+
load: registration.load
|
|
5238
5252
|
};
|
|
5239
5253
|
}
|
|
5254
|
+
const dataSourceRegistry = createRegistry("data source");
|
|
5255
|
+
const dataSources = {
|
|
5256
|
+
register(name, registration) {
|
|
5257
|
+
dataSourceRegistry.register(name, normalizeDataSourceRegistration(registration));
|
|
5258
|
+
},
|
|
5259
|
+
unregister: dataSourceRegistry.unregister,
|
|
5260
|
+
get: dataSourceRegistry.get,
|
|
5261
|
+
all: dataSourceRegistry.all,
|
|
5262
|
+
subscribe: dataSourceRegistry.subscribe
|
|
5263
|
+
};
|
|
5264
|
+
function normalizeDataSourceConfig(config) {
|
|
5265
|
+
if (typeof config === "string") return config.length > 0 ? { key: config } : void 0;
|
|
5266
|
+
}
|
|
5240
5267
|
function normalizeOptions(result) {
|
|
5241
5268
|
const options = Array.isArray(result) ? result : result?.options;
|
|
5242
5269
|
if (!Array.isArray(options)) return [];
|
|
@@ -5302,9 +5329,7 @@ function useRegistryVersion$1(subscribe) {
|
|
|
5302
5329
|
return version;
|
|
5303
5330
|
}
|
|
5304
5331
|
function isDataSourceConfig(value) {
|
|
5305
|
-
|
|
5306
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
5307
|
-
return typeof value.key === "string";
|
|
5332
|
+
return typeof value === "string" && value.length > 0;
|
|
5308
5333
|
}
|
|
5309
5334
|
function collectDataSourceConfigs(schema, result = {}) {
|
|
5310
5335
|
const properties = schema.properties;
|
|
@@ -5334,17 +5359,17 @@ function useFormDataSources(form, schema) {
|
|
|
5334
5359
|
const loadFieldOptions = async (fieldName, source) => {
|
|
5335
5360
|
const version = (loadVersions.get(fieldName) ?? 0) + 1;
|
|
5336
5361
|
loadVersions.set(fieldName, version);
|
|
5337
|
-
const
|
|
5338
|
-
if (!
|
|
5362
|
+
const entry = dataSources.get(source.key);
|
|
5363
|
+
if (!entry) {
|
|
5339
5364
|
form.setFieldState(fieldName, (state) => {
|
|
5340
5365
|
state.dataSource = [];
|
|
5341
5366
|
});
|
|
5342
5367
|
return;
|
|
5343
5368
|
}
|
|
5344
5369
|
try {
|
|
5345
|
-
const options = normalizeOptions(await
|
|
5370
|
+
const options = normalizeOptions(await entry.load({
|
|
5346
5371
|
field: fieldName,
|
|
5347
|
-
values: Object.fromEntries(
|
|
5372
|
+
values: Object.fromEntries(entry.dependencies.map((dependency) => [dependency, form.getValuesIn(dependency)])),
|
|
5348
5373
|
signal: controller?.signal
|
|
5349
5374
|
}));
|
|
5350
5375
|
if (!active || loadVersions.get(fieldName) !== version) return;
|
|
@@ -5361,10 +5386,11 @@ function useFormDataSources(form, schema) {
|
|
|
5361
5386
|
};
|
|
5362
5387
|
for (const [fieldName, source] of sourceEntries) loadFieldOptions(fieldName, source);
|
|
5363
5388
|
form.addEffects(effectId, () => {
|
|
5364
|
-
for (const dependency of new Set(sourceEntries.flatMap(([, source]) => source.
|
|
5389
|
+
for (const dependency of new Set(sourceEntries.flatMap(([, source]) => dataSources.get(source.key)?.dependencies ?? []))) onFieldValueChange(dependency, () => {
|
|
5365
5390
|
for (const [fieldName, source] of sourceEntries) {
|
|
5366
|
-
|
|
5367
|
-
if (
|
|
5391
|
+
const entry = dataSources.get(source.key);
|
|
5392
|
+
if (!entry?.dependencies.includes(dependency)) continue;
|
|
5393
|
+
if (entry.reset) form.setValuesIn(fieldName, void 0);
|
|
5368
5394
|
loadFieldOptions(fieldName, source);
|
|
5369
5395
|
}
|
|
5370
5396
|
});
|
|
@@ -5403,8 +5429,8 @@ function AutoFormInner({ schema: zodSchema, initialValues, onSubmit, overrides,
|
|
|
5403
5429
|
}, [labelAlign, labelWidth]);
|
|
5404
5430
|
const fieldComponents = useMemo(() => ({ fields: {
|
|
5405
5431
|
...defaultFieldComponents,
|
|
5406
|
-
...
|
|
5407
|
-
} }), [useRegistryVersion$1(
|
|
5432
|
+
...components.all()
|
|
5433
|
+
} }), [useRegistryVersion$1(components.subscribe)]);
|
|
5408
5434
|
useFormDataSources(form, formSchema);
|
|
5409
5435
|
const handleSubmit = async () => {
|
|
5410
5436
|
await form.validate();
|
|
@@ -6217,6 +6243,44 @@ function ImportDialog({ open, onOpenChange, onImport, columns = [], title, local
|
|
|
6217
6243
|
|
|
6218
6244
|
//#endregion
|
|
6219
6245
|
//#region src/components/auto-crud/auto-crud-table.tsx
|
|
6246
|
+
let autoCrudToolbarResolver = null;
|
|
6247
|
+
function setAutoCrudToolbarResolver(resolver) {
|
|
6248
|
+
autoCrudToolbarResolver = resolver;
|
|
6249
|
+
}
|
|
6250
|
+
function getDefaultToolbarActions() {
|
|
6251
|
+
return [
|
|
6252
|
+
{ type: "import" },
|
|
6253
|
+
{ type: "export" },
|
|
6254
|
+
{ type: "create" }
|
|
6255
|
+
];
|
|
6256
|
+
}
|
|
6257
|
+
function resolveOwnerToolbarActions(toolbar) {
|
|
6258
|
+
const resolved = typeof toolbar === "function" ? toolbar(getDefaultToolbarActions()) : toolbar;
|
|
6259
|
+
return resolved !== void 0 && resolved.length > 0 ? [...resolved] : getDefaultToolbarActions();
|
|
6260
|
+
}
|
|
6261
|
+
function readRowIds(rows, idKey) {
|
|
6262
|
+
return rows.flatMap((row) => {
|
|
6263
|
+
const value = row[idKey];
|
|
6264
|
+
return value === null || value === void 0 ? [] : [String(value)];
|
|
6265
|
+
});
|
|
6266
|
+
}
|
|
6267
|
+
function areStringArraysEqual(left, right) {
|
|
6268
|
+
return left.length === right.length && left.every((value, index) => value === right[index]);
|
|
6269
|
+
}
|
|
6270
|
+
function haveSameRowSelection(left, right, idKey) {
|
|
6271
|
+
if (left.length !== right.length) return false;
|
|
6272
|
+
const leftIds = readRowIds(left, idKey);
|
|
6273
|
+
const rightIds = readRowIds(right, idKey);
|
|
6274
|
+
if (leftIds.length === left.length && rightIds.length === right.length) return areStringArraysEqual(leftIds, rightIds);
|
|
6275
|
+
return left.every((row, index) => row === right[index]);
|
|
6276
|
+
}
|
|
6277
|
+
function readCreateAction(actions) {
|
|
6278
|
+
return actions.find((action) => action.type === "create");
|
|
6279
|
+
}
|
|
6280
|
+
function resolveToolbarActionsWithResolver(targetId, ownerActions, context) {
|
|
6281
|
+
const resolver = autoCrudToolbarResolver;
|
|
6282
|
+
return targetId !== void 0 && targetId.length > 0 && resolver !== null ? resolver(targetId, ownerActions, context) : ownerActions;
|
|
6283
|
+
}
|
|
6220
6284
|
function mergeFieldPart(base, override) {
|
|
6221
6285
|
if (override === void 0) return base;
|
|
6222
6286
|
if (override === false || base === false || typeof base !== "object" || typeof override !== "object" || base === null || override === null || Array.isArray(base) || Array.isArray(override)) return override;
|
|
@@ -6303,10 +6367,10 @@ function useDynamicFilterOptions(fields) {
|
|
|
6303
6367
|
let active = true;
|
|
6304
6368
|
const controller = typeof AbortController === "undefined" ? void 0 : new AbortController();
|
|
6305
6369
|
Promise.all(sourceEntries.map(async ({ field, source }) => {
|
|
6306
|
-
const
|
|
6307
|
-
if (!
|
|
6370
|
+
const entry = dataSources.get(source.key);
|
|
6371
|
+
if (!entry) return [field, []];
|
|
6308
6372
|
try {
|
|
6309
|
-
return [field, normalizeOptions(await
|
|
6373
|
+
return [field, normalizeOptions(await entry.load({
|
|
6310
6374
|
field,
|
|
6311
6375
|
values: {},
|
|
6312
6376
|
signal: controller?.signal
|
|
@@ -6540,7 +6604,7 @@ function renderFieldValue(value, type, booleanLocale, options) {
|
|
|
6540
6604
|
/**
|
|
6541
6605
|
* ViewModal 组件 - 详情查看弹窗
|
|
6542
6606
|
*/
|
|
6543
|
-
function ViewModal({ open, onOpenChange, variant, data, schema, fields: fieldConfig, denyFields, locale }) {
|
|
6607
|
+
function ViewModal({ open, onOpenChange, variant, data, schema, fields: fieldConfig, dynamicOptions, denyFields, locale }) {
|
|
6544
6608
|
if (!data) return null;
|
|
6545
6609
|
const shape = schema.shape;
|
|
6546
6610
|
const denySet = new Set(denyFields ?? []);
|
|
@@ -6553,7 +6617,7 @@ function ViewModal({ open, onOpenChange, variant, data, schema, fields: fieldCon
|
|
|
6553
6617
|
const parsed = parseZodField(fieldSchema);
|
|
6554
6618
|
const label = fieldConfig?.[key]?.label ?? humanize(key);
|
|
6555
6619
|
const value = data[key];
|
|
6556
|
-
const options = normalizeFieldOptions(fieldConfig?.[key]?.enum);
|
|
6620
|
+
const options = normalizeFieldOptions(fieldConfig?.[key]?.enum) ?? normalizeFieldOptions(dynamicOptions?.[key]);
|
|
6557
6621
|
return /* @__PURE__ */ jsxs("div", {
|
|
6558
6622
|
className: "grid grid-cols-3 items-start gap-4",
|
|
6559
6623
|
children: [/* @__PURE__ */ jsx("dt", {
|
|
@@ -6575,6 +6639,7 @@ function ViewModal({ open, onOpenChange, variant, data, schema, fields: fieldCon
|
|
|
6575
6639
|
open,
|
|
6576
6640
|
onOpenChange,
|
|
6577
6641
|
children: /* @__PURE__ */ jsxs(DialogContent, {
|
|
6642
|
+
"aria-describedby": void 0,
|
|
6578
6643
|
className: "max-w-2xl max-h-[80vh] overflow-y-auto",
|
|
6579
6644
|
children: [/* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: locale.viewModal.title }) }), content]
|
|
6580
6645
|
})
|
|
@@ -6666,7 +6731,7 @@ function resolveActions(actionsOrFn, defaults, rowActionsLocale) {
|
|
|
6666
6731
|
*
|
|
6667
6732
|
* 高级 CRUD 表格组件,封装了完整的增删改查流程
|
|
6668
6733
|
*/
|
|
6669
|
-
function AutoCrudTable({ title, description, schema, resource, fields, table: tableConfig, form: formConfig, permissions, actions: actionItems, toolbarActions, locale: localeProp, onCreate }) {
|
|
6734
|
+
function AutoCrudTable({ id, title, description, schema, resource, fields, table: tableConfig, form: formConfig, permissions, actions: actionItems, toolbar, toolbarActions, locale: localeProp, onCreate }) {
|
|
6670
6735
|
const locale = resolveLocale(localeProp);
|
|
6671
6736
|
const resolvedSchema = resource.schema ?? schema;
|
|
6672
6737
|
const resolvedFields = React.useMemo(() => mergeFields(resource.fields, fields) ?? {}, [fields, resource.fields]);
|
|
@@ -6681,10 +6746,35 @@ function AutoCrudTable({ title, description, schema, resource, fields, table: ta
|
|
|
6681
6746
|
const canImport = can.import && !!resource.handlers.import;
|
|
6682
6747
|
const canExport = can.export;
|
|
6683
6748
|
const [importOpen, setImportOpen] = React.useState(false);
|
|
6684
|
-
const [
|
|
6749
|
+
const [selectedRows, setSelectedRows] = React.useState([]);
|
|
6685
6750
|
const [exporting, setExporting] = React.useState(false);
|
|
6686
6751
|
const getSelectedRowsRef = React.useRef(null);
|
|
6687
6752
|
const dynamicFilterOptions = useDynamicFilterOptions(resolvedFields);
|
|
6753
|
+
const resourceIdKey = resource.idKey ?? "id";
|
|
6754
|
+
const ownerToolbarActions = React.useMemo(() => resolveOwnerToolbarActions(toolbar ?? toolbarActions), [toolbar, toolbarActions]);
|
|
6755
|
+
const selectedCount = selectedRows.length;
|
|
6756
|
+
const selectedRowIds = React.useMemo(() => readRowIds(selectedRows, resourceIdKey), [selectedRows, resourceIdKey]);
|
|
6757
|
+
const rowIds = React.useMemo(() => readRowIds(resource.tableData.data, resourceIdKey), [resource.tableData.data, resourceIdKey]);
|
|
6758
|
+
const handleSelectedRowsChange = React.useCallback((rows) => {
|
|
6759
|
+
setSelectedRows((currentRows) => haveSameRowSelection(currentRows, rows, resourceIdKey) ? currentRows : rows);
|
|
6760
|
+
}, [resourceIdKey]);
|
|
6761
|
+
const ownerCreateAction = React.useMemo(() => readCreateAction(ownerToolbarActions), [ownerToolbarActions]);
|
|
6762
|
+
const toolbarOpenCreate = can.create ? ownerCreateAction?.onClick ?? onCreate ?? resource.handlers.openCreate : void 0;
|
|
6763
|
+
const resolvedToolbarActions = resolveToolbarActionsWithResolver(id, ownerToolbarActions, React.useMemo(() => ({
|
|
6764
|
+
crudId: id ?? "",
|
|
6765
|
+
idKey: resourceIdKey,
|
|
6766
|
+
rowIds,
|
|
6767
|
+
selectedRowIds,
|
|
6768
|
+
selectedCount,
|
|
6769
|
+
...toolbarOpenCreate ? { openCreate: toolbarOpenCreate } : {}
|
|
6770
|
+
}), [
|
|
6771
|
+
id,
|
|
6772
|
+
resourceIdKey,
|
|
6773
|
+
rowIds,
|
|
6774
|
+
selectedRowIds,
|
|
6775
|
+
selectedCount,
|
|
6776
|
+
toolbarOpenCreate
|
|
6777
|
+
]));
|
|
6688
6778
|
const importColumns = React.useMemo(() => {
|
|
6689
6779
|
const shape = resolvedSchema.shape;
|
|
6690
6780
|
const denySet = new Set(denyFields ?? []);
|
|
@@ -6694,9 +6784,9 @@ function AutoCrudTable({ title, description, schema, resource, fields, table: ta
|
|
|
6694
6784
|
const filename = title ?? "export";
|
|
6695
6785
|
const excludeColumns = denyFields;
|
|
6696
6786
|
if (mode === "selected") {
|
|
6697
|
-
const selectedRows = getSelectedRowsRef.current?.();
|
|
6698
|
-
if (!selectedRows || selectedRows.length === 0) return;
|
|
6699
|
-
exportAllToCSV(selectedRows, {
|
|
6787
|
+
const selectedRows$1 = getSelectedRowsRef.current?.();
|
|
6788
|
+
if (!selectedRows$1 || selectedRows$1.length === 0) return;
|
|
6789
|
+
exportAllToCSV(selectedRows$1, {
|
|
6700
6790
|
filename,
|
|
6701
6791
|
excludeColumns
|
|
6702
6792
|
});
|
|
@@ -6790,11 +6880,6 @@ function AutoCrudTable({ title, description, schema, resource, fields, table: ta
|
|
|
6790
6880
|
}, "create");
|
|
6791
6881
|
return null;
|
|
6792
6882
|
};
|
|
6793
|
-
const resolvedToolbarActions = typeof toolbarActions === "function" ? toolbarActions([
|
|
6794
|
-
{ type: "import" },
|
|
6795
|
-
{ type: "export" },
|
|
6796
|
-
{ type: "create" }
|
|
6797
|
-
]) : toolbarActions;
|
|
6798
6883
|
if (!resolvedToolbarActions || resolvedToolbarActions.length === 0) return /* @__PURE__ */ jsxs("div", {
|
|
6799
6884
|
className: "flex items-center gap-2",
|
|
6800
6885
|
children: [
|
|
@@ -6852,7 +6937,7 @@ function AutoCrudTable({ title, description, schema, resource, fields, table: ta
|
|
|
6852
6937
|
enableExport: canExport,
|
|
6853
6938
|
showDefaultExport: false,
|
|
6854
6939
|
initialSorting: tableConfig?.defaultSort,
|
|
6855
|
-
|
|
6940
|
+
onSelectedRowsChange: handleSelectedRowsChange,
|
|
6856
6941
|
getSelectedRows: getSelectedRowsRef
|
|
6857
6942
|
}),
|
|
6858
6943
|
/* @__PURE__ */ jsx(CrudFormModal, {
|
|
@@ -6879,6 +6964,7 @@ function AutoCrudTable({ title, description, schema, resource, fields, table: ta
|
|
|
6879
6964
|
data: resource.modal.selected,
|
|
6880
6965
|
schema: resolvedSchema,
|
|
6881
6966
|
fields: resolvedFields,
|
|
6967
|
+
dynamicOptions: dynamicFilterOptions,
|
|
6882
6968
|
denyFields,
|
|
6883
6969
|
locale
|
|
6884
6970
|
}),
|
|
@@ -7926,6 +8012,7 @@ function useAutoCrudResource({ router, schema, query: queryTransform, options =
|
|
|
7926
8012
|
]);
|
|
7927
8013
|
const canExport = !!(exportFetcher || exportQuery);
|
|
7928
8014
|
return {
|
|
8015
|
+
idKey,
|
|
7929
8016
|
tableData: {
|
|
7930
8017
|
data: tableRows,
|
|
7931
8018
|
pageCount: listQuery.data?.pageCount ?? 0,
|
|
@@ -8265,4 +8352,4 @@ function createMemoryDataSource(initialData = []) {
|
|
|
8265
8352
|
}
|
|
8266
8353
|
|
|
8267
8354
|
//#endregion
|
|
8268
|
-
export { AutoCrudTable, AutoForm, AutoTable, AutoTableActionBar, AutoTableSimpleFilters, CrudFormModal, DataTable, DataTableAdvancedToolbar, DataTableColumnHeader, DataTableFacetedFilter, DataTablePagination, DataTableToolbar, DataTableViewOptions, ExportDialog, ImportDialog, MultiCombobox, SchemaAdapter, cn, coerceRowValues, createActionsColumn, createEditFormSchema, createFormSchema, createMemoryDataSource, createSelectColumn, createTRPCDataSource, createTableSchema, dataSources, dataToCSV, deDE, downloadCSVTemplate, enUS, esES, exportAllToCSV, exportTableToCSV, formComponents, formatDate, frFR, generateCSVTemplate, getUrlParams, humanize, jaJP, koKR, noopToastAdapter, normalizeDataSourceConfig, normalizeOptions, parseAsArrayOf, parseAsInteger, parseAsString, parseAsStringEnum, parseCSV, parseImportFile, parseJSON, parseZodField, resolveLocale, setSearchParams, useAutoCrudResource, useDataTable, useQueryState, useQueryStates, useReadableFilters, useUrlState, useUrlStates, zhCN };
|
|
8355
|
+
export { AutoCrudTable, AutoForm, AutoTable, AutoTableActionBar, AutoTableSimpleFilters, CrudFormModal, DataTable, DataTableAdvancedToolbar, DataTableColumnHeader, DataTableFacetedFilter, DataTablePagination, DataTableToolbar, DataTableViewOptions, ExportDialog, ImportDialog, MultiCombobox, SchemaAdapter, cn, coerceRowValues, components, createActionsColumn, createEditFormSchema, createFormSchema, createMemoryDataSource, createSelectColumn, createTRPCDataSource, createTableSchema, dataSources, dataToCSV, deDE, downloadCSVTemplate, enUS, esES, exportAllToCSV, exportTableToCSV, formComponents, formatDate, frFR, generateCSVTemplate, getUrlParams, humanize, jaJP, koKR, noopToastAdapter, normalizeDataSourceConfig, normalizeOptions, parseAsArrayOf, parseAsInteger, parseAsString, parseAsStringEnum, parseCSV, parseImportFile, parseJSON, parseZodField, resolveLocale, setAutoCrudToolbarResolver, setSearchParams, useAutoCrudResource, useDataTable, useQueryState, useQueryStates, useReadableFilters, useUrlState, useUrlStates, zhCN };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordrhyme/auto-crud",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.4",
|
|
5
5
|
"description": "Schema-first CRUD components with auto-generated tables and forms",
|
|
6
6
|
"author": "wordrhyme",
|
|
7
7
|
"license": "MIT",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"tailwind-merge": "^3.5.0",
|
|
68
68
|
"vaul": "^1.1.2",
|
|
69
69
|
"@pixpilot/formily-shadcn": "1.11.20",
|
|
70
|
-
"@pixpilot/shadcn": "1.
|
|
71
|
-
"@pixpilot/shadcn
|
|
70
|
+
"@pixpilot/shadcn-ui": "1.21.1",
|
|
71
|
+
"@pixpilot/shadcn": "1.2.7"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@tanstack/react-query": "^5.90.15",
|
|
@@ -86,11 +86,11 @@
|
|
|
86
86
|
"tsdown": "^0.15.12",
|
|
87
87
|
"typescript": "^5.9.3",
|
|
88
88
|
"vitest": "^3.2.4",
|
|
89
|
-
"@internal/
|
|
89
|
+
"@internal/eslint-config": "0.3.0",
|
|
90
90
|
"@internal/prettier-config": "0.0.1",
|
|
91
|
+
"@internal/tsdown-config": "0.1.0",
|
|
91
92
|
"@internal/vitest-config": "0.1.0",
|
|
92
|
-
"@internal/
|
|
93
|
-
"@internal/tsdown-config": "0.1.0"
|
|
93
|
+
"@internal/tsconfig": "0.1.0"
|
|
94
94
|
},
|
|
95
95
|
"prettier": "@internal/prettier-config",
|
|
96
96
|
"scripts": {
|