@btst/stack 1.5.2 → 1.6.0

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 (201) hide show
  1. package/dist/node_modules/.pnpm/@dnd-kit_accessibility@3.1.1_react@19.2.0/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.cjs +68 -0
  2. package/dist/node_modules/.pnpm/@dnd-kit_accessibility@3.1.1_react@19.2.0/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.mjs +60 -0
  3. package/dist/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@dnd-kit/core/dist/core.esm.cjs +3937 -0
  4. package/dist/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +3907 -0
  5. package/dist/node_modules/.pnpm/@dnd-kit_modifiers@9.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0__react@19.2.0/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.cjs +30 -0
  6. package/dist/node_modules/.pnpm/@dnd-kit_modifiers@9.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0__react@19.2.0/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs +28 -0
  7. package/dist/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0__react@19.2.0/node_modules/@dnd-kit/sortable/dist/sortable.esm.cjs +675 -0
  8. package/dist/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0__react@19.2.0/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs +661 -0
  9. package/dist/node_modules/.pnpm/@dnd-kit_utilities@3.2.2_react@19.2.0/node_modules/@dnd-kit/utilities/dist/utilities.esm.cjs +358 -0
  10. package/dist/node_modules/.pnpm/@dnd-kit_utilities@3.2.2_react@19.2.0/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs +332 -0
  11. package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.13_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@1_865f042350eb43f3338b0fffb33f6246/node_modules/@radix-ui/react-tabs/dist/index.cjs +211 -0
  12. package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.13_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@1_865f042350eb43f3338b0fffb33f6246/node_modules/@radix-ui/react-tabs/dist/index.mjs +188 -0
  13. package/dist/packages/better-stack/src/plugins/cms/api/plugin.cjs +3 -2
  14. package/dist/packages/better-stack/src/plugins/cms/api/plugin.mjs +3 -2
  15. package/dist/packages/better-stack/src/plugins/cms/client/components/forms/content-form.cjs +15 -15
  16. package/dist/packages/better-stack/src/plugins/cms/client/components/forms/content-form.mjs +16 -16
  17. package/dist/packages/better-stack/src/plugins/form-builder/api/plugin.cjs +588 -0
  18. package/dist/packages/better-stack/src/plugins/form-builder/api/plugin.mjs +586 -0
  19. package/dist/packages/better-stack/src/plugins/form-builder/client/components/forms/form-renderer.cjs +131 -0
  20. package/dist/packages/better-stack/src/plugins/form-builder/client/components/forms/form-renderer.mjs +129 -0
  21. package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/form-builder-skeleton.cjs +32 -0
  22. package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/form-builder-skeleton.mjs +30 -0
  23. package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/form-list-skeleton.cjs +21 -0
  24. package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/form-list-skeleton.mjs +19 -0
  25. package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/submissions-skeleton.cjs +34 -0
  26. package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/submissions-skeleton.mjs +32 -0
  27. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/404-page.cjs +20 -0
  28. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/404-page.mjs +18 -0
  29. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-builder-page.cjs +19 -0
  30. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-builder-page.internal.cjs +186 -0
  31. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-builder-page.internal.mjs +184 -0
  32. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-builder-page.mjs +17 -0
  33. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-list-page.cjs +19 -0
  34. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-list-page.internal.cjs +165 -0
  35. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-list-page.internal.mjs +163 -0
  36. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-list-page.mjs +17 -0
  37. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/submissions-page.cjs +19 -0
  38. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/submissions-page.internal.cjs +177 -0
  39. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/submissions-page.internal.mjs +175 -0
  40. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/submissions-page.mjs +17 -0
  41. package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/default-error.cjs +17 -0
  42. package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/default-error.mjs +15 -0
  43. package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/empty-state.cjs +16 -0
  44. package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/empty-state.mjs +14 -0
  45. package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/page-wrapper.cjs +27 -0
  46. package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/page-wrapper.mjs +25 -0
  47. package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/pagination.cjs +39 -0
  48. package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/pagination.mjs +37 -0
  49. package/dist/packages/better-stack/src/plugins/form-builder/client/hooks/form-builder-hooks.cjs +551 -0
  50. package/dist/packages/better-stack/src/plugins/form-builder/client/hooks/form-builder-hooks.mjs +537 -0
  51. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-common.cjs +36 -0
  52. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-common.mjs +34 -0
  53. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-editor.cjs +19 -0
  54. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-editor.mjs +17 -0
  55. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-list.cjs +21 -0
  56. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-list.mjs +19 -0
  57. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-submissions.cjs +19 -0
  58. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-submissions.mjs +17 -0
  59. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-toasts.cjs +14 -0
  60. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-toasts.mjs +12 -0
  61. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/index.cjs +17 -0
  62. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/index.mjs +15 -0
  63. package/dist/packages/better-stack/src/plugins/form-builder/client/plugin.cjs +278 -0
  64. package/dist/packages/better-stack/src/plugins/form-builder/client/plugin.mjs +276 -0
  65. package/dist/packages/better-stack/src/plugins/form-builder/db.cjs +99 -0
  66. package/dist/packages/better-stack/src/plugins/form-builder/db.mjs +97 -0
  67. package/dist/packages/better-stack/src/plugins/form-builder/schemas.cjs +82 -0
  68. package/dist/packages/better-stack/src/plugins/form-builder/schemas.mjs +74 -0
  69. package/dist/packages/better-stack/src/plugins/form-builder/utils.cjs +37 -0
  70. package/dist/packages/better-stack/src/plugins/form-builder/utils.mjs +29 -0
  71. package/dist/packages/ui/src/components/auto-form/index.cjs +2 -12
  72. package/dist/packages/ui/src/components/auto-form/index.mjs +2 -9
  73. package/dist/packages/ui/src/components/auto-form/stepped-auto-form.cjs +377 -0
  74. package/dist/packages/ui/src/components/auto-form/stepped-auto-form.mjs +368 -0
  75. package/dist/packages/ui/src/components/auto-form/utils.cjs +1 -56
  76. package/dist/packages/ui/src/components/auto-form/utils.mjs +2 -56
  77. package/dist/packages/ui/src/components/form-builder/canvas.cjs +111 -0
  78. package/dist/packages/ui/src/components/form-builder/canvas.mjs +109 -0
  79. package/dist/packages/ui/src/components/form-builder/components/index.cjs +570 -0
  80. package/dist/packages/ui/src/components/form-builder/components/index.mjs +553 -0
  81. package/dist/packages/ui/src/components/form-builder/edit-field-dialog.cjs +131 -0
  82. package/dist/packages/ui/src/components/form-builder/edit-field-dialog.mjs +129 -0
  83. package/dist/packages/ui/src/components/form-builder/form-preview.cjs +73 -0
  84. package/dist/packages/ui/src/components/form-builder/form-preview.mjs +71 -0
  85. package/dist/packages/ui/src/components/form-builder/index.cjs +353 -0
  86. package/dist/packages/ui/src/components/form-builder/index.mjs +344 -0
  87. package/dist/packages/ui/src/components/form-builder/nested-field-editor-dialog.cjs +263 -0
  88. package/dist/packages/ui/src/components/form-builder/nested-field-editor-dialog.mjs +261 -0
  89. package/dist/packages/ui/src/components/form-builder/palette.cjs +52 -0
  90. package/dist/packages/ui/src/components/form-builder/palette.mjs +49 -0
  91. package/dist/packages/ui/src/components/form-builder/schema-utils.cjs +120 -0
  92. package/dist/packages/ui/src/components/form-builder/schema-utils.mjs +114 -0
  93. package/dist/packages/ui/src/components/form-builder/sortable-field.cjs +151 -0
  94. package/dist/packages/ui/src/components/form-builder/sortable-field.mjs +148 -0
  95. package/dist/packages/ui/src/components/form-builder/step-tabs.cjs +180 -0
  96. package/dist/packages/ui/src/components/form-builder/step-tabs.mjs +178 -0
  97. package/dist/packages/ui/src/components/form-builder/types.cjs +7 -0
  98. package/dist/packages/ui/src/components/form-builder/types.mjs +5 -0
  99. package/dist/packages/ui/src/components/form-builder/validation-schemas.cjs +67 -0
  100. package/dist/packages/ui/src/components/form-builder/validation-schemas.mjs +56 -0
  101. package/dist/packages/ui/src/components/tabs.cjs +70 -0
  102. package/dist/packages/ui/src/components/tabs.mjs +65 -0
  103. package/dist/packages/ui/src/lib/schema-converter.cjs +130 -0
  104. package/dist/packages/ui/src/lib/schema-converter.mjs +124 -0
  105. package/dist/plugins/blog/api/index.d.cts +1 -1
  106. package/dist/plugins/blog/api/index.d.mts +1 -1
  107. package/dist/plugins/blog/api/index.d.ts +1 -1
  108. package/dist/plugins/blog/client/hooks/index.d.cts +2 -2
  109. package/dist/plugins/blog/client/hooks/index.d.mts +2 -2
  110. package/dist/plugins/blog/client/hooks/index.d.ts +2 -2
  111. package/dist/plugins/blog/client/index.d.cts +1 -1
  112. package/dist/plugins/blog/client/index.d.mts +1 -1
  113. package/dist/plugins/blog/client/index.d.ts +1 -1
  114. package/dist/plugins/blog/query-keys.d.cts +2 -2
  115. package/dist/plugins/blog/query-keys.d.mts +2 -2
  116. package/dist/plugins/blog/query-keys.d.ts +2 -2
  117. package/dist/plugins/cms/client/index.cjs +6 -0
  118. package/dist/plugins/cms/client/index.d.cts +6 -113
  119. package/dist/plugins/cms/client/index.d.mts +6 -113
  120. package/dist/plugins/cms/client/index.d.ts +6 -113
  121. package/dist/plugins/cms/client/index.mjs +1 -0
  122. package/dist/plugins/form-builder/api/index.cjs +7 -0
  123. package/dist/plugins/form-builder/api/index.d.cts +141 -0
  124. package/dist/plugins/form-builder/api/index.d.mts +141 -0
  125. package/dist/plugins/form-builder/api/index.d.ts +141 -0
  126. package/dist/plugins/form-builder/api/index.mjs +1 -0
  127. package/dist/plugins/form-builder/client/components/index.cjs +29 -0
  128. package/dist/plugins/form-builder/client/components/index.d.cts +93 -0
  129. package/dist/plugins/form-builder/client/components/index.d.mts +93 -0
  130. package/dist/plugins/form-builder/client/components/index.d.ts +93 -0
  131. package/dist/plugins/form-builder/client/components/index.mjs +18 -0
  132. package/dist/plugins/form-builder/client/hooks/index.cjs +19 -0
  133. package/dist/plugins/form-builder/client/hooks/index.d.cts +154 -0
  134. package/dist/plugins/form-builder/client/hooks/index.d.mts +154 -0
  135. package/dist/plugins/form-builder/client/hooks/index.d.ts +154 -0
  136. package/dist/plugins/form-builder/client/hooks/index.mjs +1 -0
  137. package/dist/plugins/form-builder/client/index.cjs +13 -0
  138. package/dist/plugins/form-builder/client/index.d.cts +381 -0
  139. package/dist/plugins/form-builder/client/index.d.mts +381 -0
  140. package/dist/plugins/form-builder/client/index.d.ts +381 -0
  141. package/dist/plugins/form-builder/client/index.mjs +2 -0
  142. package/dist/plugins/form-builder/client.css +3 -0
  143. package/dist/plugins/form-builder/query-keys.cjs +143 -0
  144. package/dist/plugins/form-builder/query-keys.d.cts +74 -0
  145. package/dist/plugins/form-builder/query-keys.d.mts +74 -0
  146. package/dist/plugins/form-builder/query-keys.d.ts +74 -0
  147. package/dist/plugins/form-builder/query-keys.mjs +141 -0
  148. package/dist/plugins/form-builder/style.css +19 -0
  149. package/dist/shared/stack.AX5nZ6A3.d.cts +86 -0
  150. package/dist/shared/stack.AX5nZ6A3.d.mts +86 -0
  151. package/dist/shared/stack.AX5nZ6A3.d.ts +86 -0
  152. package/dist/shared/stack.BIh2AXaW.d.cts +123 -0
  153. package/dist/shared/stack.BIh2AXaW.d.mts +123 -0
  154. package/dist/shared/stack.BIh2AXaW.d.ts +123 -0
  155. package/dist/shared/stack.DzH_wcvr.d.cts +195 -0
  156. package/dist/shared/stack.DzH_wcvr.d.mts +195 -0
  157. package/dist/shared/stack.DzH_wcvr.d.ts +195 -0
  158. package/package.json +54 -1
  159. package/src/plugins/cms/api/plugin.ts +9 -4
  160. package/src/plugins/cms/client/components/forms/content-form.tsx +23 -25
  161. package/src/plugins/cms/client/index.ts +11 -0
  162. package/src/plugins/form-builder/api/index.ts +1 -0
  163. package/src/plugins/form-builder/api/plugin.ts +776 -0
  164. package/src/plugins/form-builder/client/components/forms/form-renderer.tsx +253 -0
  165. package/src/plugins/form-builder/client/components/index.tsx +24 -0
  166. package/src/plugins/form-builder/client/components/loading/form-builder-skeleton.tsx +42 -0
  167. package/src/plugins/form-builder/client/components/loading/form-list-skeleton.tsx +25 -0
  168. package/src/plugins/form-builder/client/components/loading/index.tsx +3 -0
  169. package/src/plugins/form-builder/client/components/loading/submissions-skeleton.tsx +40 -0
  170. package/src/plugins/form-builder/client/components/pages/404-page.tsx +28 -0
  171. package/src/plugins/form-builder/client/components/pages/form-builder-page.internal.tsx +253 -0
  172. package/src/plugins/form-builder/client/components/pages/form-builder-page.tsx +26 -0
  173. package/src/plugins/form-builder/client/components/pages/form-list-page.internal.tsx +231 -0
  174. package/src/plugins/form-builder/client/components/pages/form-list-page.tsx +22 -0
  175. package/src/plugins/form-builder/client/components/pages/submissions-page.internal.tsx +268 -0
  176. package/src/plugins/form-builder/client/components/pages/submissions-page.tsx +26 -0
  177. package/src/plugins/form-builder/client/components/shared/default-error.tsx +30 -0
  178. package/src/plugins/form-builder/client/components/shared/empty-state.tsx +26 -0
  179. package/src/plugins/form-builder/client/components/shared/page-wrapper.tsx +32 -0
  180. package/src/plugins/form-builder/client/components/shared/pagination.tsx +52 -0
  181. package/src/plugins/form-builder/client/hooks/form-builder-hooks.tsx +799 -0
  182. package/src/plugins/form-builder/client/hooks/index.tsx +1 -0
  183. package/src/plugins/form-builder/client/index.ts +22 -0
  184. package/src/plugins/form-builder/client/localization/form-builder-common.ts +36 -0
  185. package/src/plugins/form-builder/client/localization/form-builder-editor.ts +18 -0
  186. package/src/plugins/form-builder/client/localization/form-builder-list.ts +17 -0
  187. package/src/plugins/form-builder/client/localization/form-builder-submissions.ts +17 -0
  188. package/src/plugins/form-builder/client/localization/form-builder-toasts.ts +10 -0
  189. package/src/plugins/form-builder/client/localization/index.ts +15 -0
  190. package/src/plugins/form-builder/client/overrides.ts +146 -0
  191. package/src/plugins/form-builder/client/plugin.tsx +488 -0
  192. package/src/plugins/form-builder/client.css +3 -0
  193. package/src/plugins/form-builder/db.ts +99 -0
  194. package/src/plugins/form-builder/query-keys.ts +198 -0
  195. package/src/plugins/form-builder/schemas.ts +122 -0
  196. package/src/plugins/form-builder/style.css +19 -0
  197. package/src/plugins/form-builder/types.ts +317 -0
  198. package/src/plugins/form-builder/utils.ts +63 -0
  199. package/dist/shared/{stack.DLhzx1-D.d.cts → stack.CcI4sYJP.d.cts} +1 -1
  200. package/dist/shared/{stack.DLhzx1-D.d.mts → stack.CcI4sYJP.d.mts} +1 -1
  201. package/dist/shared/{stack.DLhzx1-D.d.ts → stack.CcI4sYJP.d.ts} +1 -1
@@ -0,0 +1,537 @@
1
+ "use client";
2
+ import { useInfiniteQuery, useSuspenseInfiniteQuery, useQuery, useSuspenseQuery, useQueryClient, useMutation } from '@tanstack/react-query';
3
+ import { createApiClient } from '@btst/stack/plugins/client';
4
+ import { usePluginOverrides } from '@btst/stack/context';
5
+ import { createFormBuilderQueryKeys } from '../../../../../../../plugins/form-builder/query-keys.mjs';
6
+
7
+ function isErrorResponse(response) {
8
+ if (typeof response !== "object" || response === null) {
9
+ return false;
10
+ }
11
+ const obj = response;
12
+ return "error" in obj && obj.error !== null && obj.error !== void 0;
13
+ }
14
+ function toError(error) {
15
+ if (error instanceof Error) {
16
+ return error;
17
+ }
18
+ if (typeof error === "object" && error !== null) {
19
+ const errorObj = error;
20
+ const message = (typeof errorObj.message === "string" ? errorObj.message : null) || (typeof errorObj.error === "string" ? errorObj.error : null) || JSON.stringify(error);
21
+ const err = new Error(message);
22
+ Object.assign(err, error);
23
+ return err;
24
+ }
25
+ return new Error(String(error));
26
+ }
27
+ const SHARED_QUERY_CONFIG = {
28
+ retry: false,
29
+ refetchOnWindowFocus: false,
30
+ refetchOnMount: false,
31
+ refetchOnReconnect: false,
32
+ staleTime: 1e3 * 60 * 5,
33
+ // 5 minutes
34
+ gcTime: 1e3 * 60 * 10
35
+ // 10 minutes
36
+ };
37
+ function useForms(options = {}) {
38
+ const { apiBaseURL, apiBasePath, headers } = usePluginOverrides("form-builder");
39
+ const client = createApiClient({
40
+ baseURL: apiBaseURL,
41
+ basePath: apiBasePath
42
+ });
43
+ const queries = createFormBuilderQueryKeys(client, headers);
44
+ const { status, limit = 20, enabled = true } = options;
45
+ const baseQuery = queries.forms.list({ status, limit, offset: 0 });
46
+ const {
47
+ data,
48
+ isLoading,
49
+ error,
50
+ fetchNextPage,
51
+ hasNextPage,
52
+ isFetchingNextPage,
53
+ refetch
54
+ } = useInfiniteQuery({
55
+ queryKey: baseQuery.queryKey,
56
+ queryFn: async ({ pageParam = 0 }) => {
57
+ const response = await client("/forms", {
58
+ method: "GET",
59
+ query: { status, limit, offset: pageParam },
60
+ headers
61
+ });
62
+ if (isErrorResponse(response)) {
63
+ throw toError(response.error);
64
+ }
65
+ return response.data;
66
+ },
67
+ ...SHARED_QUERY_CONFIG,
68
+ initialPageParam: 0,
69
+ getNextPageParam: (lastPage, allPages) => {
70
+ if (!lastPage || typeof lastPage !== "object") return void 0;
71
+ const items = lastPage?.items;
72
+ if (!Array.isArray(items) || items.length < limit) return void 0;
73
+ const loadedCount = (allPages || []).reduce(
74
+ (sum, page) => sum + (Array.isArray(page?.items) ? page.items.length : 0),
75
+ 0
76
+ );
77
+ const total2 = lastPage?.total ?? 0;
78
+ if (loadedCount >= total2) return void 0;
79
+ return loadedCount;
80
+ },
81
+ enabled
82
+ });
83
+ const pages = data?.pages;
84
+ const forms = pages?.flatMap(
85
+ (page) => Array.isArray(page?.items) ? page.items : []
86
+ ) ?? [];
87
+ const total = pages?.[0]?.total ?? 0;
88
+ return {
89
+ forms,
90
+ total,
91
+ isLoading,
92
+ error,
93
+ loadMore: fetchNextPage,
94
+ hasMore: !!hasNextPage,
95
+ isLoadingMore: isFetchingNextPage,
96
+ refetch
97
+ };
98
+ }
99
+ function useSuspenseForms(options = {}) {
100
+ const { apiBaseURL, apiBasePath, headers } = usePluginOverrides("form-builder");
101
+ const client = createApiClient({
102
+ baseURL: apiBaseURL,
103
+ basePath: apiBasePath
104
+ });
105
+ const queries = createFormBuilderQueryKeys(client, headers);
106
+ const { status, limit = 20 } = options;
107
+ const baseQuery = queries.forms.list({ status, limit, offset: 0 });
108
+ const {
109
+ data,
110
+ fetchNextPage,
111
+ hasNextPage,
112
+ isFetchingNextPage,
113
+ refetch,
114
+ error,
115
+ isFetching
116
+ } = useSuspenseInfiniteQuery({
117
+ queryKey: baseQuery.queryKey,
118
+ queryFn: async ({ pageParam = 0 }) => {
119
+ const response = await client("/forms", {
120
+ method: "GET",
121
+ query: { status, limit, offset: pageParam },
122
+ headers
123
+ });
124
+ if (isErrorResponse(response)) {
125
+ throw toError(response.error);
126
+ }
127
+ return response.data;
128
+ },
129
+ ...SHARED_QUERY_CONFIG,
130
+ initialPageParam: 0,
131
+ getNextPageParam: (lastPage, allPages) => {
132
+ if (!lastPage || typeof lastPage !== "object") return void 0;
133
+ const items = lastPage?.items;
134
+ if (!Array.isArray(items) || items.length < limit) return void 0;
135
+ const loadedCount = (allPages || []).reduce(
136
+ (sum, page) => sum + (Array.isArray(page?.items) ? page.items.length : 0),
137
+ 0
138
+ );
139
+ const total2 = lastPage?.total ?? 0;
140
+ if (loadedCount >= total2) return void 0;
141
+ return loadedCount;
142
+ }
143
+ });
144
+ if (error && !isFetching) {
145
+ throw error;
146
+ }
147
+ const pages = data.pages;
148
+ const forms = pages?.flatMap(
149
+ (page) => Array.isArray(page?.items) ? page.items : []
150
+ ) ?? [];
151
+ const total = pages?.[0]?.total ?? 0;
152
+ return {
153
+ forms,
154
+ total,
155
+ loadMore: fetchNextPage,
156
+ hasMore: !!hasNextPage,
157
+ isLoadingMore: isFetchingNextPage,
158
+ refetch
159
+ };
160
+ }
161
+ function useFormById(id) {
162
+ const { apiBaseURL, apiBasePath, headers } = usePluginOverrides("form-builder");
163
+ const client = createApiClient({
164
+ baseURL: apiBaseURL,
165
+ basePath: apiBasePath
166
+ });
167
+ const queries = createFormBuilderQueryKeys(client, headers);
168
+ const baseQuery = queries.forms.byId(id);
169
+ const { data, isLoading, error, refetch } = useQuery({
170
+ ...baseQuery,
171
+ ...SHARED_QUERY_CONFIG,
172
+ enabled: !!id
173
+ });
174
+ return {
175
+ form: data ?? null,
176
+ isLoading,
177
+ error,
178
+ refetch
179
+ };
180
+ }
181
+ function useSuspenseFormById(id) {
182
+ const { apiBaseURL, apiBasePath, headers } = usePluginOverrides("form-builder");
183
+ const client = createApiClient({
184
+ baseURL: apiBaseURL,
185
+ basePath: apiBasePath
186
+ });
187
+ const queries = createFormBuilderQueryKeys(client, headers);
188
+ const baseQuery = queries.forms.byId(id);
189
+ const { data, refetch, error, isFetching } = useSuspenseQuery({
190
+ ...baseQuery,
191
+ ...SHARED_QUERY_CONFIG
192
+ });
193
+ if (error && !isFetching) {
194
+ throw error;
195
+ }
196
+ return {
197
+ form: data ?? null,
198
+ refetch
199
+ };
200
+ }
201
+ function useFormBySlug(slug) {
202
+ const { apiBaseURL, apiBasePath, headers } = usePluginOverrides("form-builder");
203
+ const client = createApiClient({
204
+ baseURL: apiBaseURL,
205
+ basePath: apiBasePath
206
+ });
207
+ const queries = createFormBuilderQueryKeys(client, headers);
208
+ const baseQuery = queries.forms.bySlug(slug);
209
+ const { data, isLoading, error, refetch } = useQuery({
210
+ ...baseQuery,
211
+ ...SHARED_QUERY_CONFIG,
212
+ enabled: !!slug
213
+ });
214
+ return {
215
+ form: data ?? null,
216
+ isLoading,
217
+ error,
218
+ refetch
219
+ };
220
+ }
221
+ function useSuspenseFormBySlug(slug) {
222
+ const { apiBaseURL, apiBasePath, headers } = usePluginOverrides("form-builder");
223
+ const client = createApiClient({
224
+ baseURL: apiBaseURL,
225
+ basePath: apiBasePath
226
+ });
227
+ const queries = createFormBuilderQueryKeys(client, headers);
228
+ const baseQuery = queries.forms.bySlug(slug);
229
+ const { data, refetch, error, isFetching } = useSuspenseQuery({
230
+ ...baseQuery,
231
+ ...SHARED_QUERY_CONFIG
232
+ });
233
+ if (error && !isFetching) {
234
+ throw error;
235
+ }
236
+ return {
237
+ form: data ?? null,
238
+ refetch
239
+ };
240
+ }
241
+ function useCreateForm() {
242
+ const { refresh, apiBaseURL, apiBasePath, headers } = usePluginOverrides("form-builder");
243
+ const client = createApiClient({
244
+ baseURL: apiBaseURL,
245
+ basePath: apiBasePath
246
+ });
247
+ const queryClient = useQueryClient();
248
+ const queries = createFormBuilderQueryKeys(client, headers);
249
+ return useMutation({
250
+ mutationKey: [...queries.forms._def, "create"],
251
+ mutationFn: async (data) => {
252
+ const response = await client("@post/forms", {
253
+ method: "POST",
254
+ body: data,
255
+ headers
256
+ });
257
+ if (isErrorResponse(response)) {
258
+ throw toError(response.error);
259
+ }
260
+ return response.data;
261
+ },
262
+ onSuccess: async () => {
263
+ await queryClient.invalidateQueries({
264
+ queryKey: queries.forms._def
265
+ });
266
+ if (refresh) {
267
+ await refresh();
268
+ }
269
+ }
270
+ });
271
+ }
272
+ function useUpdateForm() {
273
+ const { refresh, apiBaseURL, apiBasePath, headers } = usePluginOverrides("form-builder");
274
+ const client = createApiClient({
275
+ baseURL: apiBaseURL,
276
+ basePath: apiBasePath
277
+ });
278
+ const queryClient = useQueryClient();
279
+ const queries = createFormBuilderQueryKeys(client, headers);
280
+ return useMutation({
281
+ mutationKey: [...queries.forms._def, "update"],
282
+ mutationFn: async ({ id, data }) => {
283
+ const response = await client("@put/forms/:id", {
284
+ method: "PUT",
285
+ params: { id },
286
+ body: data,
287
+ headers
288
+ });
289
+ if (isErrorResponse(response)) {
290
+ throw toError(response.error);
291
+ }
292
+ return response.data;
293
+ },
294
+ onSuccess: async (updated) => {
295
+ if (updated) {
296
+ queryClient.setQueryData(
297
+ queries.forms.byId(updated.id).queryKey,
298
+ updated
299
+ );
300
+ queryClient.setQueryData(
301
+ queries.forms.bySlug(updated.slug).queryKey,
302
+ updated
303
+ );
304
+ }
305
+ await queryClient.invalidateQueries({
306
+ queryKey: queries.forms._def
307
+ });
308
+ if (refresh) {
309
+ await refresh();
310
+ }
311
+ }
312
+ });
313
+ }
314
+ function useDeleteForm() {
315
+ const { refresh, apiBaseURL, apiBasePath, headers } = usePluginOverrides("form-builder");
316
+ const client = createApiClient({
317
+ baseURL: apiBaseURL,
318
+ basePath: apiBasePath
319
+ });
320
+ const queryClient = useQueryClient();
321
+ const queries = createFormBuilderQueryKeys(client, headers);
322
+ return useMutation({
323
+ mutationKey: [...queries.forms._def, "delete"],
324
+ mutationFn: async (id) => {
325
+ const response = await client("@delete/forms/:id", {
326
+ method: "DELETE",
327
+ params: { id },
328
+ headers
329
+ });
330
+ if (isErrorResponse(response)) {
331
+ throw toError(response.error);
332
+ }
333
+ return response.data;
334
+ },
335
+ onSuccess: async () => {
336
+ await queryClient.invalidateQueries({
337
+ queryKey: queries.forms._def
338
+ });
339
+ if (refresh) {
340
+ await refresh();
341
+ }
342
+ }
343
+ });
344
+ }
345
+ function useSubmitForm(slug) {
346
+ const { apiBaseURL, apiBasePath, headers } = usePluginOverrides("form-builder");
347
+ const client = createApiClient({
348
+ baseURL: apiBaseURL,
349
+ basePath: apiBasePath
350
+ });
351
+ const queries = createFormBuilderQueryKeys(client, headers);
352
+ return useMutation({
353
+ mutationKey: [...queries.forms._def, slug, "submit"],
354
+ mutationFn: async ({ data }) => {
355
+ const response = await client("@post/forms/:slug/submit", {
356
+ method: "POST",
357
+ params: { slug },
358
+ body: { data },
359
+ headers
360
+ });
361
+ if (isErrorResponse(response)) {
362
+ throw toError(response.error);
363
+ }
364
+ return response.data;
365
+ }
366
+ });
367
+ }
368
+ function useSubmissions(formId, options = {}) {
369
+ const { apiBaseURL, apiBasePath, headers } = usePluginOverrides("form-builder");
370
+ const client = createApiClient({
371
+ baseURL: apiBaseURL,
372
+ basePath: apiBasePath
373
+ });
374
+ const queries = createFormBuilderQueryKeys(client, headers);
375
+ const { limit = 20, enabled = true } = options;
376
+ const baseQuery = queries.formSubmissions.list({
377
+ formId,
378
+ limit,
379
+ offset: 0
380
+ });
381
+ const {
382
+ data,
383
+ isLoading,
384
+ error,
385
+ fetchNextPage,
386
+ hasNextPage,
387
+ isFetchingNextPage,
388
+ refetch
389
+ } = useInfiniteQuery({
390
+ queryKey: baseQuery.queryKey,
391
+ queryFn: async ({ pageParam = 0 }) => {
392
+ const response = await client("/forms/:formId/submissions", {
393
+ method: "GET",
394
+ params: { formId },
395
+ query: { limit, offset: pageParam },
396
+ headers
397
+ });
398
+ if (isErrorResponse(response)) {
399
+ throw toError(response.error);
400
+ }
401
+ return response.data;
402
+ },
403
+ ...SHARED_QUERY_CONFIG,
404
+ initialPageParam: 0,
405
+ getNextPageParam: (lastPage, allPages) => {
406
+ if (!lastPage || typeof lastPage !== "object") return void 0;
407
+ const items = lastPage?.items;
408
+ if (!Array.isArray(items) || items.length < limit) return void 0;
409
+ const loadedCount = (allPages || []).reduce(
410
+ (sum, page) => sum + (Array.isArray(page?.items) ? page.items.length : 0),
411
+ 0
412
+ );
413
+ const total2 = lastPage?.total ?? 0;
414
+ if (loadedCount >= total2) return void 0;
415
+ return loadedCount;
416
+ },
417
+ enabled: enabled && !!formId
418
+ });
419
+ const pages = data?.pages;
420
+ const submissions = pages?.flatMap(
421
+ (page) => Array.isArray(page?.items) ? page.items : []
422
+ ) ?? [];
423
+ const total = pages?.[0]?.total ?? 0;
424
+ return {
425
+ submissions,
426
+ total,
427
+ isLoading,
428
+ error,
429
+ loadMore: fetchNextPage,
430
+ hasMore: !!hasNextPage,
431
+ isLoadingMore: isFetchingNextPage,
432
+ refetch
433
+ };
434
+ }
435
+ function useSuspenseSubmissions(formId, options = {}) {
436
+ const { apiBaseURL, apiBasePath, headers } = usePluginOverrides("form-builder");
437
+ const client = createApiClient({
438
+ baseURL: apiBaseURL,
439
+ basePath: apiBasePath
440
+ });
441
+ const queries = createFormBuilderQueryKeys(client, headers);
442
+ const { limit = 20 } = options;
443
+ const baseQuery = queries.formSubmissions.list({
444
+ formId,
445
+ limit,
446
+ offset: 0
447
+ });
448
+ const {
449
+ data,
450
+ fetchNextPage,
451
+ hasNextPage,
452
+ isFetchingNextPage,
453
+ refetch,
454
+ error,
455
+ isFetching
456
+ } = useSuspenseInfiniteQuery({
457
+ queryKey: baseQuery.queryKey,
458
+ queryFn: async ({ pageParam = 0 }) => {
459
+ const response = await client("/forms/:formId/submissions", {
460
+ method: "GET",
461
+ params: { formId },
462
+ query: { limit, offset: pageParam },
463
+ headers
464
+ });
465
+ if (isErrorResponse(response)) {
466
+ throw toError(response.error);
467
+ }
468
+ return response.data;
469
+ },
470
+ ...SHARED_QUERY_CONFIG,
471
+ initialPageParam: 0,
472
+ getNextPageParam: (lastPage, allPages) => {
473
+ if (!lastPage || typeof lastPage !== "object") return void 0;
474
+ const items = lastPage?.items;
475
+ if (!Array.isArray(items) || items.length < limit) return void 0;
476
+ const loadedCount = (allPages || []).reduce(
477
+ (sum, page) => sum + (Array.isArray(page?.items) ? page.items.length : 0),
478
+ 0
479
+ );
480
+ const total2 = lastPage?.total ?? 0;
481
+ if (loadedCount >= total2) return void 0;
482
+ return loadedCount;
483
+ }
484
+ });
485
+ if (error && !isFetching) {
486
+ throw error;
487
+ }
488
+ const pages = data.pages;
489
+ const submissions = pages?.flatMap(
490
+ (page) => Array.isArray(page?.items) ? page.items : []
491
+ ) ?? [];
492
+ const total = pages?.[0]?.total ?? 0;
493
+ return {
494
+ submissions,
495
+ total,
496
+ loadMore: fetchNextPage,
497
+ hasMore: !!hasNextPage,
498
+ isLoadingMore: isFetchingNextPage,
499
+ refetch
500
+ };
501
+ }
502
+ function useDeleteSubmission(formId) {
503
+ const { refresh, apiBaseURL, apiBasePath, headers } = usePluginOverrides("form-builder");
504
+ const client = createApiClient({
505
+ baseURL: apiBaseURL,
506
+ basePath: apiBasePath
507
+ });
508
+ const queryClient = useQueryClient();
509
+ const queries = createFormBuilderQueryKeys(client, headers);
510
+ return useMutation({
511
+ mutationKey: [...queries.formSubmissions._def, formId, "delete"],
512
+ mutationFn: async (subId) => {
513
+ const response = await client(
514
+ "@delete/forms/:formId/submissions/:subId",
515
+ {
516
+ method: "DELETE",
517
+ params: { formId, subId },
518
+ headers
519
+ }
520
+ );
521
+ if (isErrorResponse(response)) {
522
+ throw toError(response.error);
523
+ }
524
+ return response.data;
525
+ },
526
+ onSuccess: async () => {
527
+ await queryClient.invalidateQueries({
528
+ queryKey: queries.formSubmissions._def
529
+ });
530
+ if (refresh) {
531
+ await refresh();
532
+ }
533
+ }
534
+ });
535
+ }
536
+
537
+ export { useCreateForm, useDeleteForm, useDeleteSubmission, useFormById, useFormBySlug, useForms, useSubmissions, useSubmitForm, useSuspenseFormById, useSuspenseFormBySlug, useSuspenseForms, useSuspenseSubmissions, useUpdateForm };
@@ -0,0 +1,36 @@
1
+ 'use strict';
2
+
3
+ const FORM_BUILDER_COMMON = {
4
+ // Buttons
5
+ FORM_BUILDER_BUTTON_SAVE: "Save",
6
+ FORM_BUILDER_BUTTON_CANCEL: "Cancel",
7
+ FORM_BUILDER_BUTTON_DELETE: "Delete",
8
+ FORM_BUILDER_BUTTON_CREATE: "Create",
9
+ FORM_BUILDER_BUTTON_BACK: "Back",
10
+ FORM_BUILDER_BUTTON_NEW_FORM: "New Form",
11
+ FORM_BUILDER_BUTTON_SUBMIT: "Submit",
12
+ // Labels
13
+ FORM_BUILDER_LABEL_NAME: "Name",
14
+ FORM_BUILDER_LABEL_SLUG: "Slug",
15
+ FORM_BUILDER_LABEL_SLUG_DESCRIPTION: "URL-friendly identifier for this form",
16
+ FORM_BUILDER_LABEL_DESCRIPTION: "Description",
17
+ FORM_BUILDER_LABEL_STATUS: "Status",
18
+ FORM_BUILDER_LABEL_CREATED_AT: "Created",
19
+ FORM_BUILDER_LABEL_UPDATED_AT: "Last Updated",
20
+ FORM_BUILDER_LABEL_ACTIONS: "Actions",
21
+ // Status
22
+ FORM_BUILDER_STATUS_LOADING: "Loading...",
23
+ FORM_BUILDER_STATUS_SAVING: "Saving...",
24
+ FORM_BUILDER_STATUS_DELETING: "Deleting...",
25
+ FORM_BUILDER_STATUS_ACTIVE: "Active",
26
+ FORM_BUILDER_STATUS_INACTIVE: "Inactive",
27
+ FORM_BUILDER_STATUS_ARCHIVED: "Archived",
28
+ // Errors
29
+ FORM_BUILDER_ERROR_GENERIC: "Something went wrong",
30
+ FORM_BUILDER_ERROR_NOT_FOUND: "Not found",
31
+ FORM_BUILDER_ERROR_VALIDATION: "Please fix the errors above",
32
+ // Attribution
33
+ FORM_BUILDER_ATTRIBUTION: "Powered by Better Stack"
34
+ };
35
+
36
+ exports.FORM_BUILDER_COMMON = FORM_BUILDER_COMMON;
@@ -0,0 +1,34 @@
1
+ const FORM_BUILDER_COMMON = {
2
+ // Buttons
3
+ FORM_BUILDER_BUTTON_SAVE: "Save",
4
+ FORM_BUILDER_BUTTON_CANCEL: "Cancel",
5
+ FORM_BUILDER_BUTTON_DELETE: "Delete",
6
+ FORM_BUILDER_BUTTON_CREATE: "Create",
7
+ FORM_BUILDER_BUTTON_BACK: "Back",
8
+ FORM_BUILDER_BUTTON_NEW_FORM: "New Form",
9
+ FORM_BUILDER_BUTTON_SUBMIT: "Submit",
10
+ // Labels
11
+ FORM_BUILDER_LABEL_NAME: "Name",
12
+ FORM_BUILDER_LABEL_SLUG: "Slug",
13
+ FORM_BUILDER_LABEL_SLUG_DESCRIPTION: "URL-friendly identifier for this form",
14
+ FORM_BUILDER_LABEL_DESCRIPTION: "Description",
15
+ FORM_BUILDER_LABEL_STATUS: "Status",
16
+ FORM_BUILDER_LABEL_CREATED_AT: "Created",
17
+ FORM_BUILDER_LABEL_UPDATED_AT: "Last Updated",
18
+ FORM_BUILDER_LABEL_ACTIONS: "Actions",
19
+ // Status
20
+ FORM_BUILDER_STATUS_LOADING: "Loading...",
21
+ FORM_BUILDER_STATUS_SAVING: "Saving...",
22
+ FORM_BUILDER_STATUS_DELETING: "Deleting...",
23
+ FORM_BUILDER_STATUS_ACTIVE: "Active",
24
+ FORM_BUILDER_STATUS_INACTIVE: "Inactive",
25
+ FORM_BUILDER_STATUS_ARCHIVED: "Archived",
26
+ // Errors
27
+ FORM_BUILDER_ERROR_GENERIC: "Something went wrong",
28
+ FORM_BUILDER_ERROR_NOT_FOUND: "Not found",
29
+ FORM_BUILDER_ERROR_VALIDATION: "Please fix the errors above",
30
+ // Attribution
31
+ FORM_BUILDER_ATTRIBUTION: "Powered by Better Stack"
32
+ };
33
+
34
+ export { FORM_BUILDER_COMMON };
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ const FORM_BUILDER_EDITOR = {
4
+ FORM_BUILDER_EDITOR_TITLE_NEW: "New Form",
5
+ FORM_BUILDER_EDITOR_TITLE_EDIT: "Edit Form",
6
+ FORM_BUILDER_EDITOR_SLUG_AUTO: "Auto-generated from name",
7
+ FORM_BUILDER_EDITOR_SLUG_MANUAL: "Manually set",
8
+ FORM_BUILDER_EDITOR_DELETE_CONFIRM: "Are you sure you want to delete this form? All submissions will also be deleted.",
9
+ FORM_BUILDER_EDITOR_UNSAVED_CHANGES: "You have unsaved changes",
10
+ FORM_BUILDER_EDITOR_NAME_PLACEHOLDER: "Enter form name",
11
+ FORM_BUILDER_EDITOR_SLUG_PLACEHOLDER: "enter-form-slug",
12
+ FORM_BUILDER_EDITOR_DESCRIPTION_PLACEHOLDER: "Optional description for this form",
13
+ FORM_BUILDER_EDITOR_SUCCESS_MESSAGE_LABEL: "Success Message",
14
+ FORM_BUILDER_EDITOR_SUCCESS_MESSAGE_PLACEHOLDER: "Thank you for your submission!",
15
+ FORM_BUILDER_EDITOR_REDIRECT_URL_LABEL: "Redirect URL (optional)",
16
+ FORM_BUILDER_EDITOR_REDIRECT_URL_PLACEHOLDER: "https://example.com/thank-you"
17
+ };
18
+
19
+ exports.FORM_BUILDER_EDITOR = FORM_BUILDER_EDITOR;
@@ -0,0 +1,17 @@
1
+ const FORM_BUILDER_EDITOR = {
2
+ FORM_BUILDER_EDITOR_TITLE_NEW: "New Form",
3
+ FORM_BUILDER_EDITOR_TITLE_EDIT: "Edit Form",
4
+ FORM_BUILDER_EDITOR_SLUG_AUTO: "Auto-generated from name",
5
+ FORM_BUILDER_EDITOR_SLUG_MANUAL: "Manually set",
6
+ FORM_BUILDER_EDITOR_DELETE_CONFIRM: "Are you sure you want to delete this form? All submissions will also be deleted.",
7
+ FORM_BUILDER_EDITOR_UNSAVED_CHANGES: "You have unsaved changes",
8
+ FORM_BUILDER_EDITOR_NAME_PLACEHOLDER: "Enter form name",
9
+ FORM_BUILDER_EDITOR_SLUG_PLACEHOLDER: "enter-form-slug",
10
+ FORM_BUILDER_EDITOR_DESCRIPTION_PLACEHOLDER: "Optional description for this form",
11
+ FORM_BUILDER_EDITOR_SUCCESS_MESSAGE_LABEL: "Success Message",
12
+ FORM_BUILDER_EDITOR_SUCCESS_MESSAGE_PLACEHOLDER: "Thank you for your submission!",
13
+ FORM_BUILDER_EDITOR_REDIRECT_URL_LABEL: "Redirect URL (optional)",
14
+ FORM_BUILDER_EDITOR_REDIRECT_URL_PLACEHOLDER: "https://example.com/thank-you"
15
+ };
16
+
17
+ export { FORM_BUILDER_EDITOR };
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ const FORM_BUILDER_LIST = {
4
+ FORM_BUILDER_LIST_TITLE: "Forms",
5
+ FORM_BUILDER_LIST_SUBTITLE: "Manage your forms",
6
+ FORM_BUILDER_LIST_EMPTY: "No forms yet",
7
+ FORM_BUILDER_LIST_EMPTY_DESCRIPTION: "Create your first form to get started.",
8
+ FORM_BUILDER_LIST_COLUMN_NAME: "Name",
9
+ FORM_BUILDER_LIST_COLUMN_SLUG: "Slug",
10
+ FORM_BUILDER_LIST_COLUMN_STATUS: "Status",
11
+ FORM_BUILDER_LIST_COLUMN_CREATED: "Created",
12
+ FORM_BUILDER_LIST_COLUMN_ACTIONS: "Actions",
13
+ FORM_BUILDER_LIST_ACTION_EDIT: "Edit",
14
+ FORM_BUILDER_LIST_ACTION_DELETE: "Delete",
15
+ FORM_BUILDER_LIST_ACTION_SUBMISSIONS: "Submissions",
16
+ FORM_BUILDER_LIST_PAGINATION_SHOWING: "Showing {from}-{to} of {total}",
17
+ FORM_BUILDER_LIST_PAGINATION_PREVIOUS: "Previous",
18
+ FORM_BUILDER_LIST_PAGINATION_NEXT: "Next"
19
+ };
20
+
21
+ exports.FORM_BUILDER_LIST = FORM_BUILDER_LIST;
@@ -0,0 +1,19 @@
1
+ const FORM_BUILDER_LIST = {
2
+ FORM_BUILDER_LIST_TITLE: "Forms",
3
+ FORM_BUILDER_LIST_SUBTITLE: "Manage your forms",
4
+ FORM_BUILDER_LIST_EMPTY: "No forms yet",
5
+ FORM_BUILDER_LIST_EMPTY_DESCRIPTION: "Create your first form to get started.",
6
+ FORM_BUILDER_LIST_COLUMN_NAME: "Name",
7
+ FORM_BUILDER_LIST_COLUMN_SLUG: "Slug",
8
+ FORM_BUILDER_LIST_COLUMN_STATUS: "Status",
9
+ FORM_BUILDER_LIST_COLUMN_CREATED: "Created",
10
+ FORM_BUILDER_LIST_COLUMN_ACTIONS: "Actions",
11
+ FORM_BUILDER_LIST_ACTION_EDIT: "Edit",
12
+ FORM_BUILDER_LIST_ACTION_DELETE: "Delete",
13
+ FORM_BUILDER_LIST_ACTION_SUBMISSIONS: "Submissions",
14
+ FORM_BUILDER_LIST_PAGINATION_SHOWING: "Showing {from}-{to} of {total}",
15
+ FORM_BUILDER_LIST_PAGINATION_PREVIOUS: "Previous",
16
+ FORM_BUILDER_LIST_PAGINATION_NEXT: "Next"
17
+ };
18
+
19
+ export { FORM_BUILDER_LIST };