@nestledjs/data-browser 0.1.18 → 0.1.20

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.
@@ -1,4 +1,4 @@
1
- import { jsxDEV } from "react/jsx-dev-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useState, useMemo, useEffect } from "react";
3
3
  import { gql } from "@apollo/client";
4
4
  import { useMutation } from "@apollo/client/react";
@@ -36,124 +36,40 @@ function AdminDataCreatePage() {
36
36
  const model = validatedDataType ? findModelByName(validatedDataType) : null;
37
37
  const shouldShowModelNotFound = validatedDataType && true && !model;
38
38
  if (shouldShowUnauthorized) {
39
- return /* @__PURE__ */ jsxDEV("div", { className: "flex flex-col justify-center py-12", children: /* @__PURE__ */ jsxDEV("div", { className: "mt-8 mx-auto w-full max-w-md", children: /* @__PURE__ */ jsxDEV("div", { className: "bg-white dark:bg-gray-800 py-8 px-4 shadow sm:rounded-lg sm:px-10", children: /* @__PURE__ */ jsxDEV("div", { className: "text-center", children: [
40
- /* @__PURE__ */ jsxDEV(ExclamationCircleIcon, { className: "mx-auto h-12 w-12 text-red-400" }, void 0, false, {
41
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
42
- lineNumber: 94,
43
- columnNumber: 15
44
- }, this),
45
- /* @__PURE__ */ jsxDEV("h2", { className: "mt-4 text-lg font-medium text-gray-900 dark:text-gray-100", children: "Unauthorized" }, void 0, false, {
46
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
47
- lineNumber: 95,
48
- columnNumber: 15
49
- }, this),
50
- /* @__PURE__ */ jsxDEV("p", { className: "mt-2 text-sm text-gray-600 dark:text-gray-400", children: "Invalid data type or insufficient permissions." }, void 0, false, {
51
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
52
- lineNumber: 96,
53
- columnNumber: 15
54
- }, this),
55
- /* @__PURE__ */ jsxDEV("div", { className: "mt-6", children: /* @__PURE__ */ jsxDEV(
39
+ return /* @__PURE__ */ jsx("div", { className: "flex flex-col justify-center py-12", children: /* @__PURE__ */ jsx("div", { className: "mt-8 mx-auto w-full max-w-md", children: /* @__PURE__ */ jsx("div", { className: "bg-white dark:bg-gray-800 py-8 px-4 shadow sm:rounded-lg sm:px-10", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
40
+ /* @__PURE__ */ jsx(ExclamationCircleIcon, { className: "mx-auto h-12 w-12 text-red-400" }),
41
+ /* @__PURE__ */ jsx("h2", { className: "mt-4 text-lg font-medium text-gray-900 dark:text-gray-100", children: "Unauthorized" }),
42
+ /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm text-gray-600 dark:text-gray-400", children: "Invalid data type or insufficient permissions." }),
43
+ /* @__PURE__ */ jsx("div", { className: "mt-6", children: /* @__PURE__ */ jsx(
56
44
  Link,
57
45
  {
58
46
  to: basePath,
59
47
  className: "w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-green-web hover:bg-green-web-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-web",
60
48
  children: "Return to Data Browser"
61
- },
62
- void 0,
63
- false,
64
- {
65
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
66
- lineNumber: 100,
67
- columnNumber: 17
68
- },
69
- this
70
- ) }, void 0, false, {
71
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
72
- lineNumber: 99,
73
- columnNumber: 15
74
- }, this)
75
- ] }, void 0, true, {
76
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
77
- lineNumber: 93,
78
- columnNumber: 13
79
- }, this) }, void 0, false, {
80
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
81
- lineNumber: 92,
82
- columnNumber: 11
83
- }, this) }, void 0, false, {
84
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
85
- lineNumber: 91,
86
- columnNumber: 9
87
- }, this) }, void 0, false, {
88
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
89
- lineNumber: 90,
90
- columnNumber: 7
91
- }, this);
49
+ }
50
+ ) })
51
+ ] }) }) }) });
92
52
  }
93
53
  if (shouldShowModelNotFound) {
94
- return /* @__PURE__ */ jsxDEV("div", { className: "flex flex-col justify-center py-12", children: /* @__PURE__ */ jsxDEV("div", { className: "mt-8 mx-auto w-full max-w-md", children: /* @__PURE__ */ jsxDEV("div", { className: "bg-white dark:bg-gray-800 py-8 px-4 shadow sm:rounded-lg sm:px-10", children: /* @__PURE__ */ jsxDEV("div", { className: "text-center", children: [
95
- /* @__PURE__ */ jsxDEV(ExclamationCircleIcon, { className: "mx-auto h-12 w-12 text-yellow-400" }, void 0, false, {
96
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
97
- lineNumber: 146,
98
- columnNumber: 15
99
- }, this),
100
- /* @__PURE__ */ jsxDEV("h2", { className: "mt-4 text-lg font-medium text-gray-900 dark:text-gray-100", children: "Model Not Found" }, void 0, false, {
101
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
102
- lineNumber: 147,
103
- columnNumber: 15
104
- }, this),
105
- /* @__PURE__ */ jsxDEV("p", { className: "mt-2 text-sm text-gray-600 dark:text-gray-400", children: [
54
+ return /* @__PURE__ */ jsx("div", { className: "flex flex-col justify-center py-12", children: /* @__PURE__ */ jsx("div", { className: "mt-8 mx-auto w-full max-w-md", children: /* @__PURE__ */ jsx("div", { className: "bg-white dark:bg-gray-800 py-8 px-4 shadow sm:rounded-lg sm:px-10", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
55
+ /* @__PURE__ */ jsx(ExclamationCircleIcon, { className: "mx-auto h-12 w-12 text-yellow-400" }),
56
+ /* @__PURE__ */ jsx("h2", { className: "mt-4 text-lg font-medium text-gray-900 dark:text-gray-100", children: "Model Not Found" }),
57
+ /* @__PURE__ */ jsxs("p", { className: "mt-2 text-sm text-gray-600 dark:text-gray-400", children: [
106
58
  'The data model for "',
107
59
  validatedDataType,
108
60
  '" could not be found.'
109
- ] }, void 0, true, {
110
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
111
- lineNumber: 148,
112
- columnNumber: 15
113
- }, this),
114
- /* @__PURE__ */ jsxDEV("div", { className: "mt-6", children: /* @__PURE__ */ jsxDEV(
61
+ ] }),
62
+ /* @__PURE__ */ jsx("div", { className: "mt-6", children: /* @__PURE__ */ jsx(
115
63
  Link,
116
64
  {
117
65
  to: basePath,
118
66
  className: "w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-green-web hover:bg-green-web-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-web",
119
67
  children: "Return to Data Browser"
120
- },
121
- void 0,
122
- false,
123
- {
124
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
125
- lineNumber: 152,
126
- columnNumber: 17
127
- },
128
- this
129
- ) }, void 0, false, {
130
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
131
- lineNumber: 151,
132
- columnNumber: 15
133
- }, this)
134
- ] }, void 0, true, {
135
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
136
- lineNumber: 145,
137
- columnNumber: 13
138
- }, this) }, void 0, false, {
139
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
140
- lineNumber: 144,
141
- columnNumber: 11
142
- }, this) }, void 0, false, {
143
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
144
- lineNumber: 143,
145
- columnNumber: 9
146
- }, this) }, void 0, false, {
147
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
148
- lineNumber: 142,
149
- columnNumber: 7
150
- }, this);
68
+ }
69
+ ) })
70
+ ] }) }) }) });
151
71
  }
152
- return /* @__PURE__ */ jsxDEV(AdminDataCreatePageContent, { model, basePath, formTheme }, void 0, false, {
153
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
154
- lineNumber: 167,
155
- columnNumber: 10
156
- }, this);
72
+ return /* @__PURE__ */ jsx(AdminDataCreatePageContent, { model, basePath, formTheme });
157
73
  }
158
74
  function AdminDataCreatePageContent({ model, basePath, formTheme }) {
159
75
  const navigate = useNavigate();
@@ -186,59 +102,19 @@ function AdminDataCreatePageContent({ model, basePath, formTheme }) {
186
102
  `
187
103
  );
188
104
  if (!documents || !CREATE_MUTATION) {
189
- return /* @__PURE__ */ jsxDEV("div", { className: "min-h-screen bg-gray-50 dark:bg-gray-900 flex flex-col justify-center py-12 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxDEV("div", { className: "mt-8 sm:mx-auto sm:w-full sm:max-w-2xl", children: /* @__PURE__ */ jsxDEV("div", { className: "bg-white dark:bg-gray-800 py-8 px-4 shadow sm:rounded-lg sm:px-10", children: /* @__PURE__ */ jsxDEV("div", { className: "text-center", children: [
190
- /* @__PURE__ */ jsxDEV(ExclamationCircleIcon, { className: "mx-auto h-12 w-12 text-red-400" }, void 0, false, {
191
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
192
- lineNumber: 224,
193
- columnNumber: 15
194
- }, this),
195
- /* @__PURE__ */ jsxDEV("h2", { className: "mt-4 text-lg font-medium text-gray-900 dark:text-gray-100", children: "GraphQL Schema Error" }, void 0, false, {
196
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
197
- lineNumber: 225,
198
- columnNumber: 15
199
- }, this),
200
- /* @__PURE__ */ jsxDEV("p", { className: "mt-2 text-sm text-gray-600 dark:text-gray-400", children: "Unable to load GraphQL documents for this model. Please ensure the API server is running and the GraphQL schema is up to date." }, void 0, false, {
201
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
202
- lineNumber: 226,
203
- columnNumber: 15
204
- }, this),
205
- /* @__PURE__ */ jsxDEV("div", { className: "mt-6", children: /* @__PURE__ */ jsxDEV(
105
+ return /* @__PURE__ */ jsx("div", { className: "min-h-screen bg-gray-50 dark:bg-gray-900 flex flex-col justify-center py-12 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsx("div", { className: "mt-8 sm:mx-auto sm:w-full sm:max-w-2xl", children: /* @__PURE__ */ jsx("div", { className: "bg-white dark:bg-gray-800 py-8 px-4 shadow sm:rounded-lg sm:px-10", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
106
+ /* @__PURE__ */ jsx(ExclamationCircleIcon, { className: "mx-auto h-12 w-12 text-red-400" }),
107
+ /* @__PURE__ */ jsx("h2", { className: "mt-4 text-lg font-medium text-gray-900 dark:text-gray-100", children: "GraphQL Schema Error" }),
108
+ /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm text-gray-600 dark:text-gray-400", children: "Unable to load GraphQL documents for this model. Please ensure the API server is running and the GraphQL schema is up to date." }),
109
+ /* @__PURE__ */ jsx("div", { className: "mt-6", children: /* @__PURE__ */ jsx(
206
110
  Link,
207
111
  {
208
112
  to: basePath,
209
113
  className: "w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-green-web hover:bg-green-web-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-web",
210
114
  children: "Return to Data Browser"
211
- },
212
- void 0,
213
- false,
214
- {
215
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
216
- lineNumber: 231,
217
- columnNumber: 17
218
- },
219
- this
220
- ) }, void 0, false, {
221
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
222
- lineNumber: 230,
223
- columnNumber: 15
224
- }, this)
225
- ] }, void 0, true, {
226
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
227
- lineNumber: 223,
228
- columnNumber: 13
229
- }, this) }, void 0, false, {
230
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
231
- lineNumber: 222,
232
- columnNumber: 11
233
- }, this) }, void 0, false, {
234
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
235
- lineNumber: 221,
236
- columnNumber: 9
237
- }, this) }, void 0, false, {
238
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
239
- lineNumber: 220,
240
- columnNumber: 7
241
- }, this);
115
+ }
116
+ ) })
117
+ ] }) }) }) });
242
118
  }
243
119
  const formFields = buildFormFields(sdk, model, "create", void 0, submissionState.status === "loading", basePath, databaseModels);
244
120
  const handleSubmit = async (formData) => {
@@ -279,202 +155,78 @@ function AdminDataCreatePageContent({ model, basePath, formTheme }) {
279
155
  return () => clearTimeout(timer);
280
156
  }
281
157
  }, [submissionState.status]);
282
- return /* @__PURE__ */ jsxDEV("div", { className: "space-y-6", children: [
283
- /* @__PURE__ */ jsxDEV("div", { className: "mb-8", children: [
284
- /* @__PURE__ */ jsxDEV("nav", { className: "flex mb-6", "aria-label": "Breadcrumb", children: /* @__PURE__ */ jsxDEV("ol", { className: "flex items-center space-x-4", children: [
285
- /* @__PURE__ */ jsxDEV("li", { children: /* @__PURE__ */ jsxDEV(Link, { to: basePath, className: "text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400", children: "Data Browser" }, void 0, false, {
286
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
287
- lineNumber: 305,
288
- columnNumber: 17
289
- }, this) }, void 0, false, {
290
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
291
- lineNumber: 304,
292
- columnNumber: 15
293
- }, this),
294
- /* @__PURE__ */ jsxDEV("li", { children: /* @__PURE__ */ jsxDEV("div", { className: "flex items-center", children: [
295
- /* @__PURE__ */ jsxDEV(
158
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
159
+ /* @__PURE__ */ jsxs("div", { className: "mb-8", children: [
160
+ /* @__PURE__ */ jsx("nav", { className: "flex mb-6", "aria-label": "Breadcrumb", children: /* @__PURE__ */ jsxs("ol", { className: "flex items-center space-x-4", children: [
161
+ /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Link, { to: basePath, className: "text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400", children: "Data Browser" }) }),
162
+ /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
163
+ /* @__PURE__ */ jsx(
296
164
  "svg",
297
165
  {
298
166
  className: "flex-shrink-0 h-5 w-5 text-gray-300 dark:text-gray-600",
299
167
  fill: "currentColor",
300
168
  viewBox: "0 0 20 20",
301
- children: /* @__PURE__ */ jsxDEV(
169
+ children: /* @__PURE__ */ jsx(
302
170
  "path",
303
171
  {
304
172
  fillRule: "evenodd",
305
173
  d: "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 111.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",
306
174
  clipRule: "evenodd"
307
- },
308
- void 0,
309
- false,
310
- {
311
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
312
- lineNumber: 316,
313
- columnNumber: 21
314
- },
315
- this
175
+ }
316
176
  )
317
- },
318
- void 0,
319
- false,
320
- {
321
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
322
- lineNumber: 311,
323
- columnNumber: 19
324
- },
325
- this
177
+ }
326
178
  ),
327
- /* @__PURE__ */ jsxDEV(
179
+ /* @__PURE__ */ jsx(
328
180
  Link,
329
181
  {
330
182
  to: `${basePath}/${toKebabCase(model.pluralName)}`,
331
183
  className: "ml-4 text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400",
332
184
  children: toReadableText(model.pluralName)
333
- },
334
- void 0,
335
- false,
336
- {
337
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
338
- lineNumber: 322,
339
- columnNumber: 19
340
- },
341
- this
185
+ }
342
186
  )
343
- ] }, void 0, true, {
344
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
345
- lineNumber: 310,
346
- columnNumber: 17
347
- }, this) }, void 0, false, {
348
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
349
- lineNumber: 309,
350
- columnNumber: 15
351
- }, this),
352
- /* @__PURE__ */ jsxDEV("li", { children: /* @__PURE__ */ jsxDEV("div", { className: "flex items-center", children: [
353
- /* @__PURE__ */ jsxDEV(
187
+ ] }) }),
188
+ /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
189
+ /* @__PURE__ */ jsx(
354
190
  "svg",
355
191
  {
356
192
  className: "flex-shrink-0 h-5 w-5 text-gray-300 dark:text-gray-600",
357
193
  fill: "currentColor",
358
194
  viewBox: "0 0 20 20",
359
- children: /* @__PURE__ */ jsxDEV(
195
+ children: /* @__PURE__ */ jsx(
360
196
  "path",
361
197
  {
362
198
  fillRule: "evenodd",
363
199
  d: "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 111.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",
364
200
  clipRule: "evenodd"
365
- },
366
- void 0,
367
- false,
368
- {
369
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
370
- lineNumber: 337,
371
- columnNumber: 21
372
- },
373
- this
201
+ }
374
202
  )
375
- },
376
- void 0,
377
- false,
378
- {
379
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
380
- lineNumber: 332,
381
- columnNumber: 19
382
- },
383
- this
203
+ }
384
204
  ),
385
- /* @__PURE__ */ jsxDEV("span", { className: "ml-4 text-gray-500 dark:text-gray-400", children: "Create New" }, void 0, false, {
386
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
387
- lineNumber: 343,
388
- columnNumber: 19
389
- }, this)
390
- ] }, void 0, true, {
391
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
392
- lineNumber: 331,
393
- columnNumber: 17
394
- }, this) }, void 0, false, {
395
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
396
- lineNumber: 330,
397
- columnNumber: 15
398
- }, this)
399
- ] }, void 0, true, {
400
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
401
- lineNumber: 303,
402
- columnNumber: 13
403
- }, this) }, void 0, false, {
404
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
405
- lineNumber: 302,
406
- columnNumber: 11
407
- }, this),
408
- /* @__PURE__ */ jsxDEV("h1", { className: "mt-4 text-3xl font-bold text-gray-900 dark:text-gray-100", children: [
205
+ /* @__PURE__ */ jsx("span", { className: "ml-4 text-gray-500 dark:text-gray-400", children: "Create New" })
206
+ ] }) })
207
+ ] }) }),
208
+ /* @__PURE__ */ jsxs("h1", { className: "mt-4 text-3xl font-bold text-gray-900 dark:text-gray-100", children: [
409
209
  "Create ",
410
210
  toReadableText(model.name)
411
- ] }, void 0, true, {
412
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
413
- lineNumber: 348,
414
- columnNumber: 11
415
- }, this)
416
- ] }, void 0, true, {
417
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
418
- lineNumber: 301,
419
- columnNumber: 7
420
- }, this),
421
- submissionState.status !== "idle" && /* @__PURE__ */ jsxDEV(
211
+ ] })
212
+ ] }),
213
+ submissionState.status !== "idle" && /* @__PURE__ */ jsx(
422
214
  "div",
423
215
  {
424
216
  className: `mb-6 rounded-md p-4 ${submissionState.status === "success" ? "bg-green-50 border border-green-200" : submissionState.status === "error" ? "bg-red-50 border border-red-200" : "bg-blue-50 border border-blue-200"}`,
425
- children: /* @__PURE__ */ jsxDEV("div", { className: "flex", children: [
426
- /* @__PURE__ */ jsxDEV("div", { className: "flex-shrink-0", children: submissionState.status === "success" ? /* @__PURE__ */ jsxDEV(CheckCircleIcon, { className: "h-5 w-5 text-green-400" }, void 0, false, {
427
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
428
- lineNumber: 367,
429
- columnNumber: 19
430
- }, this) : submissionState.status === "error" ? /* @__PURE__ */ jsxDEV(ExclamationCircleIcon, { className: "h-5 w-5 text-red-400" }, void 0, false, {
431
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
432
- lineNumber: 369,
433
- columnNumber: 19
434
- }, this) : /* @__PURE__ */ jsxDEV("div", { className: "h-5 w-5 border-2 border-blue-400 border-t-transparent rounded-full animate-spin" }, void 0, false, {
435
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
436
- lineNumber: 371,
437
- columnNumber: 19
438
- }, this) }, void 0, false, {
439
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
440
- lineNumber: 365,
441
- columnNumber: 15
442
- }, this),
443
- /* @__PURE__ */ jsxDEV("div", { className: "ml-3", children: /* @__PURE__ */ jsxDEV(
217
+ children: /* @__PURE__ */ jsxs("div", { className: "flex", children: [
218
+ /* @__PURE__ */ jsx("div", { className: "flex-shrink-0", children: submissionState.status === "success" ? /* @__PURE__ */ jsx(CheckCircleIcon, { className: "h-5 w-5 text-green-400" }) : submissionState.status === "error" ? /* @__PURE__ */ jsx(ExclamationCircleIcon, { className: "h-5 w-5 text-red-400" }) : /* @__PURE__ */ jsx("div", { className: "h-5 w-5 border-2 border-blue-400 border-t-transparent rounded-full animate-spin" }) }),
219
+ /* @__PURE__ */ jsx("div", { className: "ml-3", children: /* @__PURE__ */ jsx(
444
220
  "p",
445
221
  {
446
222
  className: `text-sm font-medium ${submissionState.status === "success" ? "text-green-800" : submissionState.status === "error" ? "text-red-800" : "text-blue-800"}`,
447
223
  children: submissionState.status === "loading" ? `Creating ${toReadableText(model.name)}...` : submissionState.message
448
- },
449
- void 0,
450
- false,
451
- {
452
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
453
- lineNumber: 375,
454
- columnNumber: 17
455
- },
456
- this
457
- ) }, void 0, false, {
458
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
459
- lineNumber: 374,
460
- columnNumber: 15
461
- }, this)
462
- ] }, void 0, true, {
463
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
464
- lineNumber: 364,
465
- columnNumber: 13
466
- }, this)
467
- },
468
- void 0,
469
- false,
470
- {
471
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
472
- lineNumber: 355,
473
- columnNumber: 11
474
- },
475
- this
224
+ }
225
+ ) })
226
+ ] })
227
+ }
476
228
  ),
477
- /* @__PURE__ */ jsxDEV("div", { className: "bg-white dark:bg-gray-800 shadow-sm rounded-lg", children: /* @__PURE__ */ jsxDEV("div", { className: "px-6 py-8", children: /* @__PURE__ */ jsxDEV(
229
+ /* @__PURE__ */ jsx("div", { className: "bg-white dark:bg-gray-800 shadow-sm rounded-lg", children: /* @__PURE__ */ jsx("div", { className: "px-6 py-8", children: /* @__PURE__ */ jsx(
478
230
  Form,
479
231
  {
480
232
  id: `create-${model.name.toLowerCase()}-form`,
@@ -482,36 +234,12 @@ function AdminDataCreatePageContent({ model, basePath, formTheme }) {
482
234
  submit: handleSubmit,
483
235
  disabled: submissionState.status === "loading",
484
236
  theme: formTheme
485
- },
486
- void 0,
487
- false,
488
- {
489
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
490
- lineNumber: 396,
491
- columnNumber: 13
492
- },
493
- this
494
- ) }, void 0, false, {
495
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
496
- lineNumber: 395,
497
- columnNumber: 11
498
- }, this) }, void 0, false, {
499
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
500
- lineNumber: 394,
501
- columnNumber: 9
502
- }, this)
503
- ] }, void 0, true, {
504
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
505
- lineNumber: 299,
506
- columnNumber: 5
507
- }, this);
237
+ }
238
+ ) }) })
239
+ ] });
508
240
  }
509
241
  function AdminDataCreateErrorBoundary({ error }) {
510
- return /* @__PURE__ */ jsxDEV(ErrorBoundary, { error }, void 0, false, {
511
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataCreatePage.tsx",
512
- lineNumber: 410,
513
- columnNumber: 10
514
- }, this);
242
+ return /* @__PURE__ */ jsx(ErrorBoundary, { error });
515
243
  }
516
244
  export {
517
245
  AdminDataCreateErrorBoundary,