@verikit/vue 0.23.1

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 (104) hide show
  1. package/LICENSE.md +9 -0
  2. package/dist/client/index.d.ts +3 -0
  3. package/dist/client/index.d.ts.map +1 -0
  4. package/dist/client/index.js +1 -0
  5. package/dist/client/use-verikit-client.d.ts +42 -0
  6. package/dist/client/use-verikit-client.d.ts.map +1 -0
  7. package/dist/client/use-verikit-client.js +39 -0
  8. package/dist/components/button.d.ts +36 -0
  9. package/dist/components/button.d.ts.map +1 -0
  10. package/dist/components/button.js +53 -0
  11. package/dist/components/checkbox.d.ts +45 -0
  12. package/dist/components/checkbox.d.ts.map +1 -0
  13. package/dist/components/checkbox.js +44 -0
  14. package/dist/components/dialog.d.ts +86 -0
  15. package/dist/components/dialog.d.ts.map +1 -0
  16. package/dist/components/dialog.js +157 -0
  17. package/dist/components/input.d.ts +5 -0
  18. package/dist/components/input.d.ts.map +1 -0
  19. package/dist/components/input.js +17 -0
  20. package/dist/components/label.d.ts +5 -0
  21. package/dist/components/label.d.ts.map +1 -0
  22. package/dist/components/label.js +17 -0
  23. package/dist/components/select.d.ts +164 -0
  24. package/dist/components/select.d.ts.map +1 -0
  25. package/dist/components/select.js +219 -0
  26. package/dist/components/textarea.d.ts +5 -0
  27. package/dist/components/textarea.d.ts.map +1 -0
  28. package/dist/components/textarea.js +17 -0
  29. package/dist/fields/field-shell.d.ts +64 -0
  30. package/dist/fields/field-shell.d.ts.map +1 -0
  31. package/dist/fields/field-shell.js +61 -0
  32. package/dist/fields/index.d.ts +7 -0
  33. package/dist/fields/index.d.ts.map +1 -0
  34. package/dist/fields/index.js +3 -0
  35. package/dist/fields/inputs.d.ts +372 -0
  36. package/dist/fields/inputs.d.ts.map +1 -0
  37. package/dist/fields/inputs.js +306 -0
  38. package/dist/fields/registry.d.ts +382 -0
  39. package/dist/fields/registry.d.ts.map +1 -0
  40. package/dist/fields/registry.js +31 -0
  41. package/dist/fields/types.d.ts +36 -0
  42. package/dist/fields/types.d.ts.map +1 -0
  43. package/dist/fields/types.js +1 -0
  44. package/dist/form/index.d.ts +11 -0
  45. package/dist/form/index.d.ts.map +1 -0
  46. package/dist/form/index.js +5 -0
  47. package/dist/form/use-verikit-form.d.ts +40 -0
  48. package/dist/form/use-verikit-form.d.ts.map +1 -0
  49. package/dist/form/use-verikit-form.js +72 -0
  50. package/dist/form/use-verikit-schema-tree-form.d.ts +47 -0
  51. package/dist/form/use-verikit-schema-tree-form.d.ts.map +1 -0
  52. package/dist/form/use-verikit-schema-tree-form.js +96 -0
  53. package/dist/index.d.ts +9 -0
  54. package/dist/index.d.ts.map +1 -0
  55. package/dist/index.js +8 -0
  56. package/dist/layout/index.d.ts +5 -0
  57. package/dist/layout/index.d.ts.map +1 -0
  58. package/dist/layout/index.js +2 -0
  59. package/dist/layout/render-schema-node.d.ts +9 -0
  60. package/dist/layout/render-schema-node.d.ts.map +1 -0
  61. package/dist/layout/render-schema-node.js +265 -0
  62. package/dist/layout/types.d.ts +68 -0
  63. package/dist/layout/types.d.ts.map +1 -0
  64. package/dist/layout/types.js +1 -0
  65. package/dist/lib/utils.d.ts +4 -0
  66. package/dist/lib/utils.d.ts.map +1 -0
  67. package/dist/lib/utils.js +6 -0
  68. package/dist/query/index.d.ts +13 -0
  69. package/dist/query/index.d.ts.map +1 -0
  70. package/dist/query/index.js +6 -0
  71. package/dist/query/use-resource-form.d.ts +39 -0
  72. package/dist/query/use-resource-form.d.ts.map +1 -0
  73. package/dist/query/use-resource-form.js +32 -0
  74. package/dist/query/use-resource-mutations.d.ts +40 -0
  75. package/dist/query/use-resource-mutations.d.ts.map +1 -0
  76. package/dist/query/use-resource-mutations.js +104 -0
  77. package/dist/query/use-resource-queries.d.ts +15 -0
  78. package/dist/query/use-resource-queries.d.ts.map +1 -0
  79. package/dist/query/use-resource-queries.js +35 -0
  80. package/dist/query/use-resource-schema-tree-form.d.ts +36 -0
  81. package/dist/query/use-resource-schema-tree-form.d.ts.map +1 -0
  82. package/dist/query/use-resource-schema-tree-form.js +42 -0
  83. package/dist/query/use-resource-table.d.ts +48 -0
  84. package/dist/query/use-resource-table.d.ts.map +1 -0
  85. package/dist/query/use-resource-table.js +104 -0
  86. package/dist/relationships/belongs-to-field.d.ts +91 -0
  87. package/dist/relationships/belongs-to-field.d.ts.map +1 -0
  88. package/dist/relationships/belongs-to-field.js +107 -0
  89. package/dist/relationships/index.d.ts +2 -0
  90. package/dist/relationships/index.d.ts.map +1 -0
  91. package/dist/relationships/index.js +1 -0
  92. package/dist/resource/index.d.ts +5 -0
  93. package/dist/resource/index.d.ts.map +1 -0
  94. package/dist/resource/index.js +2 -0
  95. package/dist/resource/resource-form.d.ts +122 -0
  96. package/dist/resource/resource-form.d.ts.map +1 -0
  97. package/dist/resource/resource-form.js +83 -0
  98. package/dist/resource/resource-table-filters.d.ts +54 -0
  99. package/dist/resource/resource-table-filters.d.ts.map +1 -0
  100. package/dist/resource/resource-table-filters.js +283 -0
  101. package/dist/resource/resource-table.d.ts +93 -0
  102. package/dist/resource/resource-table.d.ts.map +1 -0
  103. package/dist/resource/resource-table.js +562 -0
  104. package/package.json +86 -0
@@ -0,0 +1,40 @@
1
+ import type { MutationOptions, UseMutationReturnType } from "@tanstack/vue-query";
2
+ import type { ActionOptions, ActionResult } from "@verikit/client";
3
+ import { type ResourceQuerySnapshot } from "@verikit/ui-core/query/optimistic";
4
+ export type UseCreateResourceOptions<TRecord> = Omit<MutationOptions<TRecord, Error, Record<string, unknown>>, "mutationFn">;
5
+ /**
6
+ * Creates a resource record, invalidating that resource's list/search queries on success.
7
+ */
8
+ export declare function useCreateResource<TRecord = Record<string, unknown>>(name: string, options?: UseCreateResourceOptions<TRecord>): UseMutationReturnType<TRecord, Error, Record<string, unknown>, unknown>;
9
+ export interface UpdateResourceVariables {
10
+ id: string;
11
+ input: Record<string, unknown>;
12
+ }
13
+ export type UseUpdateResourceOptions<TRecord> = Omit<MutationOptions<TRecord, Error, UpdateResourceVariables>, "mutationFn">;
14
+ interface UpdateResourceContext {
15
+ snapshot: ResourceQuerySnapshot;
16
+ caller: unknown;
17
+ }
18
+ /**
19
+ * Updates a resource record. Optimistically merges `input` into the cached `find(id)` record and any matching row in a cached list, rolling back to the pre-mutation snapshot on error; invalidates its list/search and find(id) queries on success (so any field the server computed, not just what was sent, ends up correct).
20
+ */
21
+ export declare function useUpdateResource<TRecord = Record<string, unknown>>(name: string, options?: UseUpdateResourceOptions<TRecord>): UseMutationReturnType<TRecord, Error, UpdateResourceVariables, UpdateResourceContext>;
22
+ export type UseDeleteResourceOptions = Omit<MutationOptions<void, Error, string>, "mutationFn">;
23
+ interface DeleteResourceContext {
24
+ snapshot: ResourceQuerySnapshot;
25
+ caller: unknown;
26
+ }
27
+ /**
28
+ * Deletes a resource record by id. Optimistically removes it from any cached list and evicts its `find(id)` cache entry outright. On error it restores only that record from its snapshot, preserving concurrent sibling deletes; on success, it invalidates list/search queries and (redundantly but harmlessly) re-evicts `find(id)`, since refetching a known-deleted record would just 404.
29
+ */
30
+ export declare function useDeleteResource(name: string, options?: UseDeleteResourceOptions): UseMutationReturnType<void, Error, string, DeleteResourceContext>;
31
+ export interface ActionResourceVariables extends ActionOptions {
32
+ input?: Record<string, unknown>;
33
+ }
34
+ export type UseActionResourceOptions<TResult> = Omit<MutationOptions<ActionResult<TResult>, Error, ActionResourceVariables>, "mutationFn">;
35
+ /**
36
+ * Runs a named runtime action, invalidating the resource's cached queries on success.
37
+ */
38
+ export declare function useActionResource<TResult = unknown>(name: string, actionName: string, options?: UseActionResourceOptions<TResult>): UseMutationReturnType<ActionResult<TResult>, Error, ActionResourceVariables, unknown>;
39
+ export {};
40
+ //# sourceMappingURL=use-resource-mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-resource-mutations.d.ts","sourceRoot":"","sources":["../../src/query/use-resource-mutations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,eAAe,EACf,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,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,EACpC,YAAY,CACb,CAAC;AAEF,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,qBAAqB,CAAC;IAChC,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,wBAAwB,GACjC,qBAAqB,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,qBAAqB,CAAC,CA2DnE;AAED,MAAM,WAAW,uBAAwB,SAAQ,aAAa;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED,MAAM,MAAM,wBAAwB,CAAC,OAAO,IAAI,IAAI,CAClD,eAAe,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,uBAAuB,CAAC,EACtE,YAAY,CACb,CAAC;AAEF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,GAAG,OAAO,EACjD,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,wBAAwB,CAAC,OAAO,CAAC,GAC1C,qBAAqB,CACtB,YAAY,CAAC,OAAO,CAAC,EACrB,KAAK,EACL,uBAAuB,EACvB,OAAO,CACR,CAmBA"}
@@ -0,0 +1,104 @@
1
+ import { useMutation, useQueryClient } from "@tanstack/vue-query";
2
+ import { useVerikitClient } from "../client/use-verikit-client.js";
3
+ import { patchCachedListRecord, removeCachedListRecord, restoreDeletedRecord, restoreResourceQueries, snapshotResourceQueries, } from "@verikit/ui-core/query/optimistic";
4
+ import { resourceQueryKeys } from "@verikit/ui-core/query/query-keys";
5
+ /**
6
+ * Creates a resource record, invalidating that resource's list/search queries on success.
7
+ */
8
+ export function useCreateResource(name, options) {
9
+ const client = useVerikitClient();
10
+ const queryClient = useQueryClient();
11
+ const keys = resourceQueryKeys(name);
12
+ return useMutation({
13
+ ...options,
14
+ mutationFn: (input) => client.resource(name).create(input),
15
+ onSuccess: (data, variables, onMutateResult, context) => {
16
+ void queryClient.invalidateQueries({ queryKey: keys.all });
17
+ return options?.onSuccess?.(data, variables, onMutateResult, context);
18
+ },
19
+ });
20
+ }
21
+ /**
22
+ * Updates a resource record. Optimistically merges `input` into the cached `find(id)` record and any matching row in a cached list, rolling back to the pre-mutation snapshot on error; invalidates its list/search and find(id) queries on success (so any field the server computed, not just what was sent, ends up correct).
23
+ */
24
+ export function useUpdateResource(name, options) {
25
+ const client = useVerikitClient();
26
+ const queryClient = useQueryClient();
27
+ const keys = resourceQueryKeys(name);
28
+ return useMutation({
29
+ ...options,
30
+ mutationFn: ({ id, input }) => client.resource(name).update(id, input),
31
+ onMutate: async (variables, context) => {
32
+ await queryClient.cancelQueries({ queryKey: keys.all });
33
+ const snapshot = snapshotResourceQueries(queryClient, keys);
34
+ queryClient.setQueryData(keys.find(variables.id), (current) => current ? { ...current, ...variables.input } : current);
35
+ patchCachedListRecord(queryClient, keys, variables.id, (record) => ({ ...record, ...variables.input }));
36
+ const caller = await options?.onMutate?.(variables, context);
37
+ return { snapshot, caller };
38
+ },
39
+ onError: (error, variables, onMutateResult, context) => {
40
+ if (onMutateResult) {
41
+ restoreResourceQueries(queryClient, onMutateResult.snapshot);
42
+ }
43
+ return options?.onError?.(error, variables, onMutateResult?.caller, context);
44
+ },
45
+ // `keys.all` prefixes `keys.find(id)`, so this one invalidate covers
46
+ // both. Runs in onSettled (not onSuccess) so a failed mutation still
47
+ // forces a refetch, since onError's rollback can be stale by then.
48
+ onSettled: (data, error, variables, onMutateResult, context) => {
49
+ void queryClient.invalidateQueries({ queryKey: keys.all });
50
+ return options?.onSettled?.(data, error, variables, onMutateResult?.caller, context);
51
+ },
52
+ });
53
+ }
54
+ /**
55
+ * Deletes a resource record by id. Optimistically removes it from any cached list and evicts its `find(id)` cache entry outright. On error it restores only that record from its snapshot, preserving concurrent sibling deletes; on success, it invalidates list/search queries and (redundantly but harmlessly) re-evicts `find(id)`, since refetching a known-deleted record would just 404.
56
+ */
57
+ export function useDeleteResource(name, options) {
58
+ const client = useVerikitClient();
59
+ const queryClient = useQueryClient();
60
+ const keys = resourceQueryKeys(name);
61
+ return useMutation({
62
+ ...options,
63
+ mutationFn: (id) => client.resource(name).delete(id),
64
+ onMutate: async (id, context) => {
65
+ await queryClient.cancelQueries({ queryKey: keys.all });
66
+ const snapshot = snapshotResourceQueries(queryClient, keys);
67
+ queryClient.removeQueries({ queryKey: keys.find(id), exact: true });
68
+ removeCachedListRecord(queryClient, keys, id);
69
+ const caller = await options?.onMutate?.(id, context);
70
+ return { snapshot, caller };
71
+ },
72
+ onError: (error, id, onMutateResult, context) => {
73
+ if (onMutateResult) {
74
+ restoreDeletedRecord(queryClient, onMutateResult.snapshot, id);
75
+ }
76
+ return options?.onError?.(error, id, onMutateResult?.caller, context);
77
+ },
78
+ onSuccess: (data, id, onMutateResult, context) => {
79
+ queryClient.removeQueries({ queryKey: keys.find(id) });
80
+ return options?.onSuccess?.(data, id, onMutateResult?.caller, context);
81
+ },
82
+ // Always refetch after deletion to reconcile optimistic state with the server.
83
+ onSettled: (data, error, id, onMutateResult, context) => {
84
+ void queryClient.invalidateQueries({ queryKey: keys.all });
85
+ return options?.onSettled?.(data, error, id, onMutateResult?.caller, context);
86
+ },
87
+ });
88
+ }
89
+ /**
90
+ * Runs a named runtime action, invalidating the resource's cached queries on success.
91
+ */
92
+ export function useActionResource(name, actionName, options) {
93
+ const client = useVerikitClient();
94
+ const queryClient = useQueryClient();
95
+ const keys = resourceQueryKeys(name);
96
+ return useMutation({
97
+ ...options,
98
+ mutationFn: ({ input, ...actionOptions }) => client.resource(name).action(actionName, input, actionOptions),
99
+ onSuccess: (data, variables, onMutateResult, context) => {
100
+ void queryClient.invalidateQueries({ queryKey: keys.all });
101
+ return options?.onSuccess?.(data, variables, onMutateResult, context);
102
+ },
103
+ });
104
+ }
@@ -0,0 +1,15 @@
1
+ import type { UseQueryOptions, UseQueryReturnType } from "@tanstack/vue-query";
2
+ import type { ListParams, ListResponse } from "@verikit/client";
3
+ export type UseListResourceOptions<TRecord> = Omit<UseQueryOptions<ListResponse<TRecord>, Error>, "queryKey" | "queryFn">;
4
+ /** Lists a resource's records, cached per resource name + params. */
5
+ export declare function useListResource<TRecord = Record<string, unknown>>(name: string, params?: ListParams, options?: UseListResourceOptions<TRecord>): UseQueryReturnType<ListResponse<TRecord>, Error>;
6
+ export type UseFindResourceOptions<TRecord> = Omit<UseQueryOptions<TRecord, Error>, "queryKey" | "queryFn">;
7
+ /** Fetches a single resource record by id, cached per resource name + id. */
8
+ export declare function useResourceFind<TRecord = Record<string, unknown>>(name: string, id: string, options?: UseFindResourceOptions<TRecord>): UseQueryReturnType<TRecord, Error>;
9
+ export type UseResourceRelationshipOptions<TTarget> = Omit<UseQueryOptions<ListResponse<TTarget>, Error>, "queryKey" | "queryFn">;
10
+ /**
11
+ * Lists selectable records for a `belongsTo` relationship, cached by
12
+ * resource, relationship, and params. Server-side permissions and scopes apply.
13
+ */
14
+ export declare function useResourceRelationship<TTarget = Record<string, unknown>>(name: string, relationshipName: string, params?: ListParams, options?: UseResourceRelationshipOptions<TTarget>): UseQueryReturnType<ListResponse<TTarget>, Error>;
15
+ //# sourceMappingURL=use-resource-queries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-resource-queries.d.ts","sourceRoot":"","sources":["../../src/query/use-resource-queries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE/E,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIhE,MAAM,MAAM,sBAAsB,CAAC,OAAO,IAAI,IAAI,CAChD,eAAe,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,EAC7C,UAAU,GAAG,SAAS,CACvB,CAAC;AAEF,qEAAqE;AACrE,wBAAgB,eAAe,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/D,IAAI,EAAE,MAAM,EACZ,MAAM,GAAE,UAAe,EACvB,OAAO,CAAC,EAAE,sBAAsB,CAAC,OAAO,CAAC,GACxC,kBAAkB,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,CASlD;AAED,MAAM,MAAM,sBAAsB,CAAC,OAAO,IAAI,IAAI,CAChD,eAAe,CAAC,OAAO,EAAE,KAAK,CAAC,EAC/B,UAAU,GAAG,SAAS,CACvB,CAAC;AAEF,6EAA6E;AAC7E,wBAAgB,eAAe,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/D,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,sBAAsB,CAAC,OAAO,CAAC,GACxC,kBAAkB,CAAC,OAAO,EAAE,KAAK,CAAC,CASpC;AAED,MAAM,MAAM,8BAA8B,CAAC,OAAO,IAAI,IAAI,CACxD,eAAe,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,EAC7C,UAAU,GAAG,SAAS,CACvB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvE,IAAI,EAAE,MAAM,EACZ,gBAAgB,EAAE,MAAM,EACxB,MAAM,GAAE,UAAe,EACvB,OAAO,CAAC,EAAE,8BAA8B,CAAC,OAAO,CAAC,GAChD,kBAAkB,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,CAWlD"}
@@ -0,0 +1,35 @@
1
+ import { useQuery } from "@tanstack/vue-query";
2
+ import { useVerikitClient } from "../client/use-verikit-client.js";
3
+ import { resourceQueryKeys } from "@verikit/ui-core/query/query-keys";
4
+ /** Lists a resource's records, cached per resource name + params. */
5
+ export function useListResource(name, params = {}, options) {
6
+ const client = useVerikitClient();
7
+ return useQuery({
8
+ queryKey: resourceQueryKeys(name).list(params),
9
+ queryFn: ({ signal }) => client.resource(name).list(params, { signal }),
10
+ ...options,
11
+ });
12
+ }
13
+ /** Fetches a single resource record by id, cached per resource name + id. */
14
+ export function useResourceFind(name, id, options) {
15
+ const client = useVerikitClient();
16
+ return useQuery({
17
+ queryKey: resourceQueryKeys(name).find(id),
18
+ queryFn: ({ signal }) => client.resource(name).find(id, { signal }),
19
+ ...options,
20
+ });
21
+ }
22
+ /**
23
+ * Lists selectable records for a `belongsTo` relationship, cached by
24
+ * resource, relationship, and params. Server-side permissions and scopes apply.
25
+ */
26
+ export function useResourceRelationship(name, relationshipName, params = {}, options) {
27
+ const client = useVerikitClient();
28
+ return useQuery({
29
+ queryKey: resourceQueryKeys(name).relationship(relationshipName, params),
30
+ queryFn: ({ signal }) => client
31
+ .resource(name)
32
+ .relationship(relationshipName, params, { signal }),
33
+ ...options,
34
+ });
35
+ }
@@ -0,0 +1,36 @@
1
+ import type { SchemaActionRegistry } from "../layout/types.js";
2
+ import { type ComputedRef } from "vue";
3
+ import { type UseVerikitSchemaTreeFormResult, type VerikitSchemaTreeSource } from "../form/use-verikit-schema-tree-form.js";
4
+ import { type VerikitFormValues } from "@verikit/ui-core/form/submission";
5
+ /** Options for creating a schema-tree resource form that submits over `@verikit/client`. */
6
+ export interface UseResourceSchemaTreeFormOptions<TRecord> {
7
+ /** Updates the record with this id instead of creating a new one. */
8
+ id?: string;
9
+ /** Runtime actions whose forms should render for matching action nodes. */
10
+ actions?: SchemaActionRegistry;
11
+ /** Initial values passed to TanStack Form. */
12
+ defaultValues?: VerikitFormValues;
13
+ /** Called with the created or updated record after a successful submit. */
14
+ onSuccess?: (record: TRecord) => void;
15
+ /**
16
+ * Called when the create/update mutation fails, excluding client-side
17
+ * validation errors surfaced through `fieldErrors` or `submitError`.
18
+ */
19
+ onError?: (error: Error) => void;
20
+ }
21
+ /** State and helpers returned by {@link useResourceSchemaTreeForm}. */
22
+ export interface UseResourceSchemaTreeFormResult<TRecord = Record<string, unknown>> extends UseVerikitSchemaTreeFormResult<TRecord> {
23
+ /** Whether the create/update mutation is currently in flight. */
24
+ isSubmitting: ComputedRef<boolean>;
25
+ /** Error from the most recent create/update mutation, if any. */
26
+ submitError: ComputedRef<Error | null>;
27
+ }
28
+ /**
29
+ * Schema-tree sibling of `useResourceForm`: same resource-backed
30
+ * create/update wiring, but built on `useVerikitSchemaTreeForm` so the
31
+ * rendered tree and therefore relationships and conditional fields is
32
+ * available to a tree-aware renderer like `ResourceForm`, instead of the
33
+ * flat field list `useResourceForm` exposes.
34
+ */
35
+ export declare function useResourceSchemaTreeForm<TRecord = Record<string, unknown>>(resource: VerikitSchemaTreeSource, { id, actions, defaultValues, onSuccess, onError, }?: UseResourceSchemaTreeFormOptions<TRecord>): UseResourceSchemaTreeFormResult<TRecord>;
36
+ //# sourceMappingURL=use-resource-schema-tree-form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-resource-schema-tree-form.d.ts","sourceRoot":"","sources":["../../src/query/use-resource-schema-tree-form.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC;AACxD,OAAO,EAEL,KAAK,8BAA8B,EACnC,KAAK,uBAAuB,EAC7B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,kCAAkC,CAAC;AAM1C,4FAA4F;AAC5F,MAAM,WAAW,gCAAgC,CAAC,OAAO;IACvD,qEAAqE;IACrE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,2EAA2E;IAC3E,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,8CAA8C;IAC9C,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,2EAA2E;IAC3E,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED,uEAAuE;AACvE,MAAM,WAAW,+BAA+B,CAC9C,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CACjC,SAAQ,8BAA8B,CAAC,OAAO,CAAC;IAC/C,iEAAiE;IACjE,YAAY,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACnC,iEAAiE;IACjE,WAAW,EAAE,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;CACxC;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACzE,QAAQ,EAAE,uBAAuB,EACjC,EACE,EAAE,EACF,OAAO,EACP,aAAa,EACb,SAAS,EACT,OAAO,GACR,GAAE,gCAAgC,CAAC,OAAO,CAAM,GAChD,+BAA+B,CAAC,OAAO,CAAC,CAoC1C"}
@@ -0,0 +1,42 @@
1
+ import { VerikitClientError } from "@verikit/client";
2
+ import { computed, watch } from "vue";
3
+ import { useVerikitSchemaTreeForm, } from "../form/use-verikit-schema-tree-form.js";
4
+ import { validationIssuesToFieldErrors, } from "@verikit/ui-core/form/submission";
5
+ import { useCreateResource, useUpdateResource, } from "./use-resource-mutations.js";
6
+ /**
7
+ * Schema-tree sibling of `useResourceForm`: same resource-backed
8
+ * create/update wiring, but built on `useVerikitSchemaTreeForm` so the
9
+ * rendered tree and therefore relationships and conditional fields is
10
+ * available to a tree-aware renderer like `ResourceForm`, instead of the
11
+ * flat field list `useResourceForm` exposes.
12
+ */
13
+ export function useResourceSchemaTreeForm(resource, { id, actions, defaultValues, onSuccess, onError, } = {}) {
14
+ const create = useCreateResource(resource.name, { onError });
15
+ const update = useUpdateResource(resource.name, { onError });
16
+ const form = useVerikitSchemaTreeForm({
17
+ resource,
18
+ actions,
19
+ defaultValues,
20
+ onSubmit: async (values) => {
21
+ const record = id
22
+ ? await update.mutateAsync({ id, input: values })
23
+ : await create.mutateAsync(values);
24
+ onSuccess?.(record);
25
+ return record;
26
+ },
27
+ });
28
+ const mutationError = computed(() => id ? update.error.value : create.error.value);
29
+ // Only fires on an actual change of `mutationError` (Vue's `watch` skips
30
+ // no-op calls when the computed's value is unchanged), so a structured
31
+ // server error is mapped onto the form's field errors exactly once.
32
+ watch(mutationError, (error) => {
33
+ if (error instanceof VerikitClientError && error.issues) {
34
+ form.setFieldErrors(validationIssuesToFieldErrors(error.issues));
35
+ }
36
+ });
37
+ return {
38
+ ...form,
39
+ isSubmitting: computed(() => create.isPending.value || update.isPending.value),
40
+ submitError: mutationError,
41
+ };
42
+ }
@@ -0,0 +1,48 @@
1
+ import { type RowData, type Table } from "@tanstack/vue-table";
2
+ import { type UseQueryReturnType } from "@tanstack/vue-query";
3
+ import type { ListParams, ListResponse } from "@verikit/client";
4
+ import type { FieldSchema, Resource, ResourceSchema } from "@verikit/core";
5
+ import { type Ref } from "vue";
6
+ declare const resourceTableFeatures: {
7
+ rowSortingFeature: import("@tanstack/vue-table").TableFeature;
8
+ rowPaginationFeature: import("@tanstack/vue-table").TableFeature;
9
+ rowSelectionFeature: import("@tanstack/vue-table").TableFeature;
10
+ columnFilteringFeature: import("@tanstack/vue-table").TableFeature;
11
+ globalFilteringFeature: import("@tanstack/vue-table").TableFeature;
12
+ };
13
+ type ResourceTableFeatures = typeof resourceTableFeatures;
14
+ /** A resource builder or its finalized schema — either carries its own name. */
15
+ export type UseResourceTableSource = Resource | ResourceSchema;
16
+ /** Active per-field filters, keyed by field name — the same shape `ListParams.filters` sends to the server. */
17
+ export type ResourceTableFilters = NonNullable<ListParams["filters"]>;
18
+ /** Options for creating a resource-backed table. */
19
+ export interface UseResourceTableOptions {
20
+ /** Initial page size, before the user (or caller) changes it. Defaults to 25. */
21
+ pageSize?: number;
22
+ }
23
+ /** State and helpers returned by {@link useResourceTable}. */
24
+ export interface UseResourceTableResult<TRecord extends RowData = Record<string, unknown>> {
25
+ /** The TanStack Table instance — headless: render your own markup from it. */
26
+ table: Table<ResourceTableFeatures, TRecord>;
27
+ /** Whether the current page's initial fetch is still in flight. */
28
+ isLoading: UseQueryReturnType<ListResponse<TRecord>, Error>["isLoading"];
29
+ /** Whether a fetch (initial or background) is currently in flight. */
30
+ isFetching: UseQueryReturnType<ListResponse<TRecord>, Error>["isFetching"];
31
+ /** Error from the underlying list request, if any. */
32
+ error: UseQueryReturnType<ListResponse<TRecord>, Error>["error"];
33
+ /**
34
+ * Resolved field schemas for table columns, including metadata used by filters.
35
+ */
36
+ fields: Record<string, FieldSchema>;
37
+ /** Active per-field filters sent with the list request. */
38
+ filters: Ref<ResourceTableFilters>;
39
+ /** Replaces the active per-field filters wholesale. */
40
+ setFilters: (filters: ResourceTableFilters) => void;
41
+ }
42
+ /**
43
+ * Creates a TanStack Table from a resource's schema, with automatic columns
44
+ * and server-side pagination, sorting, and search.
45
+ */
46
+ export declare function useResourceTable<TRecord extends RowData = Record<string, unknown>>(resource: UseResourceTableSource, { pageSize }?: UseResourceTableOptions): UseResourceTableResult<TRecord>;
47
+ export {};
48
+ //# sourceMappingURL=use-resource-table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-resource-table.d.ts","sourceRoot":"","sources":["../../src/query/use-resource-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAYL,KAAK,OAAO,EAGZ,KAAK,KAAK,EACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAY,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAI3E,OAAO,EAAiB,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAK9C,QAAA,MAAM,qBAAqB;;;;;;CAMzB,CAAC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AA4B,GAC9C,sBAAsB,CAAC,OAAO,CAAC,CAkGjC"}
@@ -0,0 +1,104 @@
1
+ import { columnFilteringFeature, functionalUpdate, globalFilteringFeature, rowPaginationFeature, rowSelectionFeature, rowSortingFeature, tableFeatures, useTable, } from "@tanstack/vue-table";
2
+ import { useQuery } from "@tanstack/vue-query";
3
+ import { recordId } from "@verikit/ui-core/query/optimistic";
4
+ import { resolveVerikitFields } from "@verikit/ui-core/form/resolve-fields";
5
+ import { resourceQueryKeys } from "@verikit/ui-core/query/query-keys";
6
+ import { computed, ref } from "vue";
7
+ import { useVerikitClient } from "../client/use-verikit-client.js";
8
+ // `columnFilteringFeature` is required by TanStack's global filtering feature.
9
+ // VeriKit manages field filters separately to support range operators.
10
+ const resourceTableFeatures = tableFeatures({
11
+ rowSortingFeature,
12
+ rowPaginationFeature,
13
+ rowSelectionFeature,
14
+ columnFilteringFeature,
15
+ globalFilteringFeature,
16
+ });
17
+ /**
18
+ * Creates a TanStack Table from a resource's schema, with automatic columns
19
+ * and server-side pagination, sorting, and search.
20
+ */
21
+ export function useResourceTable(resource, { pageSize = 25 } = {}) {
22
+ const client = useVerikitClient();
23
+ const fields = resolveVerikitFields(resource);
24
+ const columns = computed(() => Object.values(fields)
25
+ .filter((field) => !field.hidden && !field.tableHidden)
26
+ .map((field) => ({
27
+ accessorKey: field.name,
28
+ header: field.label ?? field.name,
29
+ enableSorting: field.sortable ?? false,
30
+ })));
31
+ const sorting = ref([]);
32
+ const pagination = ref({ pageIndex: 0, pageSize });
33
+ const globalFilter = ref("");
34
+ const filters = ref({});
35
+ const rowSelection = ref({});
36
+ // Reset to page 1 when filters or search change to avoid empty stale pages.
37
+ function resetToFirstPage() {
38
+ if (pagination.value.pageIndex !== 0) {
39
+ pagination.value = { ...pagination.value, pageIndex: 0 };
40
+ }
41
+ }
42
+ const handleGlobalFilterChange = (updater) => {
43
+ globalFilter.value = functionalUpdate(updater, globalFilter.value);
44
+ resetToFirstPage();
45
+ };
46
+ function handleFiltersChange(next) {
47
+ filters.value = next;
48
+ resetToFirstPage();
49
+ }
50
+ const listParams = computed(() => {
51
+ const activeSort = sorting.value[0];
52
+ const hasFilters = Object.keys(filters.value).length > 0;
53
+ return {
54
+ page: pagination.value.pageIndex + 1,
55
+ pageSize: pagination.value.pageSize,
56
+ search: globalFilter.value || undefined,
57
+ sort: activeSort
58
+ ? { field: activeSort.id, direction: activeSort.desc ? "desc" : "asc" }
59
+ : undefined,
60
+ ...(hasFilters ? { filters: filters.value } : {}),
61
+ };
62
+ });
63
+ const list = useQuery({
64
+ queryKey: computed(() => resourceQueryKeys(resource.name).list(listParams.value)),
65
+ queryFn: ({ signal }) => client
66
+ .resource(resource.name)
67
+ .list(listParams.value, { signal }),
68
+ });
69
+ const table = useTable({
70
+ features: resourceTableFeatures,
71
+ columns,
72
+ data: computed(() => list.data.value?.records ?? []),
73
+ manualSorting: true,
74
+ manualPagination: true,
75
+ rowCount: computed(() => list.data.value?.total ?? 0),
76
+ // Use record IDs so row selection remains stable across paginated pages.
77
+ getRowId: (row, index) => recordId(row) ?? String(index),
78
+ state: computed(() => ({
79
+ sorting: sorting.value,
80
+ pagination: pagination.value,
81
+ globalFilter: globalFilter.value,
82
+ rowSelection: rowSelection.value,
83
+ })),
84
+ onSortingChange: (updater) => {
85
+ sorting.value = functionalUpdate(updater, sorting.value);
86
+ },
87
+ onPaginationChange: (updater) => {
88
+ pagination.value = functionalUpdate(updater, pagination.value);
89
+ },
90
+ onGlobalFilterChange: handleGlobalFilterChange,
91
+ onRowSelectionChange: (updater) => {
92
+ rowSelection.value = functionalUpdate(updater, rowSelection.value);
93
+ },
94
+ });
95
+ return {
96
+ table,
97
+ isLoading: list.isLoading,
98
+ isFetching: list.isFetching,
99
+ error: list.error,
100
+ fields,
101
+ filters,
102
+ setFilters: handleFiltersChange,
103
+ };
104
+ }
@@ -0,0 +1,91 @@
1
+ import type { BelongsToRelationshipSchema } from "@verikit/core";
2
+ import { type PropType, type VNodeChild } from "vue";
3
+ /**
4
+ * Renders a `belongsTo` relationship as a permission-aware combobox,
5
+ * reading and writing the related record's ID through its `.via()` field.
6
+ */
7
+ export declare const BelongsToRelationshipField: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
8
+ relationship: {
9
+ type: PropType<BelongsToRelationshipSchema>;
10
+ required: true;
11
+ };
12
+ id: {
13
+ type: PropType<string | undefined>;
14
+ default: undefined;
15
+ };
16
+ value: {
17
+ type: PropType<unknown>;
18
+ required: false;
19
+ };
20
+ error: {
21
+ type: PropType<VNodeChild>;
22
+ required: false;
23
+ };
24
+ disabled: {
25
+ type: PropType<boolean | undefined>;
26
+ default: undefined;
27
+ };
28
+ readOnly: {
29
+ type: PropType<boolean | undefined>;
30
+ default: undefined;
31
+ };
32
+ className: {
33
+ type: PropType<string | undefined>;
34
+ default: undefined;
35
+ };
36
+ onValueChange: {
37
+ type: PropType<((value: string | null) => void) | undefined>;
38
+ default: undefined;
39
+ };
40
+ onBlur: {
41
+ type: PropType<(() => void) | undefined>;
42
+ default: undefined;
43
+ };
44
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
45
+ [key: string]: any;
46
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
47
+ relationship: {
48
+ type: PropType<BelongsToRelationshipSchema>;
49
+ required: true;
50
+ };
51
+ id: {
52
+ type: PropType<string | undefined>;
53
+ default: undefined;
54
+ };
55
+ value: {
56
+ type: PropType<unknown>;
57
+ required: false;
58
+ };
59
+ error: {
60
+ type: PropType<VNodeChild>;
61
+ required: false;
62
+ };
63
+ disabled: {
64
+ type: PropType<boolean | undefined>;
65
+ default: undefined;
66
+ };
67
+ readOnly: {
68
+ type: PropType<boolean | undefined>;
69
+ default: undefined;
70
+ };
71
+ className: {
72
+ type: PropType<string | undefined>;
73
+ default: undefined;
74
+ };
75
+ onValueChange: {
76
+ type: PropType<((value: string | null) => void) | undefined>;
77
+ default: undefined;
78
+ };
79
+ onBlur: {
80
+ type: PropType<(() => void) | undefined>;
81
+ default: undefined;
82
+ };
83
+ }>> & Readonly<{}>, {
84
+ onBlur: (() => void) | undefined;
85
+ id: string | undefined;
86
+ className: string | undefined;
87
+ disabled: boolean | undefined;
88
+ onValueChange: ((value: string | null) => void) | undefined;
89
+ readOnly: boolean | undefined;
90
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
91
+ //# sourceMappingURL=belongs-to-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"belongs-to-field.d.ts","sourceRoot":"","sources":["../../src/relationships/belongs-to-field.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAsB,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,KAAK,CAAC;AA6BzE;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;cAIjB,QAAQ,CAAC,2BAA2B,CAAC;;;;cAGjC,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC;;;;cAChB,QAAQ,CAAC,OAAO,CAAC;;;;cACjB,QAAQ,CAAC,UAAU,CAAC;;;;cAEnC,QAAQ,CAAC,OAAO,GAAG,SAAS,CAAC;;;;cAI7B,QAAQ,CAAC,OAAO,GAAG,SAAS,CAAC;;;;cAI9B,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC;;;;cAI1B,QAAQ,CAAC,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;;;;cAItD,QAAQ,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;;;;;;;cAvBpC,QAAQ,CAAC,2BAA2B,CAAC;;;;cAGjC,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC;;;;cAChB,QAAQ,CAAC,OAAO,CAAC;;;;cACjB,QAAQ,CAAC,UAAU,CAAC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