@nestledjs/data-browser 0.1.18 → 0.1.21

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, Fragment } from "react/jsx-dev-runtime";
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useCallback, useEffect, useMemo } from "react";
3
3
  import { useQuery } from "@apollo/client/react";
4
4
  import { DataTable, ErrorBoundary } from "@nestledjs/shared-components";
@@ -318,260 +318,120 @@ function AdminDataListPage({ modelName: propModelName } = {}) {
318
318
  const items = validatedItems;
319
319
  const pagination = validatedPagination;
320
320
  if (!model) {
321
- return /* @__PURE__ */ jsxDEV("div", { className: "min-h-screen bg-gray-50 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-md", children: /* @__PURE__ */ jsxDEV("div", { className: "bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10", children: /* @__PURE__ */ jsxDEV("div", { className: "text-center", children: [
322
- /* @__PURE__ */ jsxDEV(
321
+ return /* @__PURE__ */ jsx("div", { className: "min-h-screen bg-gray-50 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-md", children: /* @__PURE__ */ jsx("div", { className: "bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
322
+ /* @__PURE__ */ jsx(
323
323
  "svg",
324
324
  {
325
325
  className: "mx-auto h-12 w-12 text-red-400",
326
326
  fill: "none",
327
327
  stroke: "currentColor",
328
328
  viewBox: "0 0 24 24",
329
- children: /* @__PURE__ */ jsxDEV(
329
+ children: /* @__PURE__ */ jsx(
330
330
  "path",
331
331
  {
332
332
  strokeLinecap: "round",
333
333
  strokeLinejoin: "round",
334
334
  strokeWidth: 2,
335
335
  d: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
336
- },
337
- void 0,
338
- false,
339
- {
340
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
341
- lineNumber: 458,
342
- columnNumber: 17
343
- },
344
- this
336
+ }
345
337
  )
346
- },
347
- void 0,
348
- false,
349
- {
350
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
351
- lineNumber: 452,
352
- columnNumber: 15
353
- },
354
- this
338
+ }
355
339
  ),
356
- /* @__PURE__ */ jsxDEV("h2", { className: "mt-4 text-lg font-medium text-gray-900", children: "Invalid Data Type" }, void 0, false, {
357
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
358
- lineNumber: 465,
359
- columnNumber: 15
360
- }, this),
361
- /* @__PURE__ */ jsxDEV("p", { className: "mt-2 text-sm text-gray-600", children: [
340
+ /* @__PURE__ */ jsx("h2", { className: "mt-4 text-lg font-medium text-gray-900", children: "Invalid Data Type" }),
341
+ /* @__PURE__ */ jsxs("p", { className: "mt-2 text-sm text-gray-600", children: [
362
342
  'The data type "',
363
343
  pluralParam,
364
344
  '" is not recognized.'
365
- ] }, void 0, true, {
366
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
367
- lineNumber: 466,
368
- columnNumber: 15
369
- }, this),
370
- /* @__PURE__ */ jsxDEV("div", { className: "mt-6", children: /* @__PURE__ */ jsxDEV(
345
+ ] }),
346
+ /* @__PURE__ */ jsx("div", { className: "mt-6", children: /* @__PURE__ */ jsx(
371
347
  Link,
372
348
  {
373
349
  to: basePath,
374
350
  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",
375
351
  children: "Return to Data Browser"
376
- },
377
- void 0,
378
- false,
379
- {
380
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
381
- lineNumber: 470,
382
- columnNumber: 17
383
- },
384
- this
385
- ) }, void 0, false, {
386
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
387
- lineNumber: 469,
388
- columnNumber: 15
389
- }, this)
390
- ] }, void 0, true, {
391
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
392
- lineNumber: 451,
393
- columnNumber: 13
394
- }, this) }, void 0, false, {
395
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
396
- lineNumber: 450,
397
- columnNumber: 11
398
- }, this) }, void 0, false, {
399
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
400
- lineNumber: 449,
401
- columnNumber: 9
402
- }, this) }, void 0, false, {
403
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
404
- lineNumber: 448,
405
- columnNumber: 7
406
- }, this);
352
+ }
353
+ ) })
354
+ ] }) }) }) });
407
355
  }
408
356
  if (!query) {
409
- return /* @__PURE__ */ jsxDEV("div", { className: "min-h-screen bg-gray-50 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-md", children: /* @__PURE__ */ jsxDEV("div", { className: "bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10", children: /* @__PURE__ */ jsxDEV("div", { className: "text-center", children: [
410
- /* @__PURE__ */ jsxDEV(
357
+ return /* @__PURE__ */ jsx("div", { className: "min-h-screen bg-gray-50 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-md", children: /* @__PURE__ */ jsx("div", { className: "bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
358
+ /* @__PURE__ */ jsx(
411
359
  "svg",
412
360
  {
413
361
  className: "mx-auto h-12 w-12 text-yellow-400",
414
362
  fill: "none",
415
363
  stroke: "currentColor",
416
364
  viewBox: "0 0 24 24",
417
- children: /* @__PURE__ */ jsxDEV(
365
+ children: /* @__PURE__ */ jsx(
418
366
  "path",
419
367
  {
420
368
  strokeLinecap: "round",
421
369
  strokeLinejoin: "round",
422
370
  strokeWidth: 2,
423
371
  d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.728-.833-2.498 0L5.316 15c-.77.833.192 2.5 1.732 2.5z"
424
- },
425
- void 0,
426
- false,
427
- {
428
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
429
- lineNumber: 496,
430
- columnNumber: 17
431
- },
432
- this
372
+ }
433
373
  )
434
- },
435
- void 0,
436
- false,
437
- {
438
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
439
- lineNumber: 490,
440
- columnNumber: 15
441
- },
442
- this
374
+ }
443
375
  ),
444
- /* @__PURE__ */ jsxDEV("h2", { className: "mt-4 text-lg font-medium text-gray-900", children: "GraphQL Schema Not Available" }, void 0, false, {
445
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
446
- lineNumber: 503,
447
- columnNumber: 15
448
- }, this),
449
- /* @__PURE__ */ jsxDEV("p", { className: "mt-2 text-sm text-gray-600", children: [
376
+ /* @__PURE__ */ jsx("h2", { className: "mt-4 text-lg font-medium text-gray-900", children: "GraphQL Schema Not Available" }),
377
+ /* @__PURE__ */ jsxs("p", { className: "mt-2 text-sm text-gray-600", children: [
450
378
  'No GraphQL query found for "',
451
379
  model.name,
452
380
  '". The admin schema may need to be regenerated.'
453
- ] }, void 0, true, {
454
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
455
- lineNumber: 506,
456
- columnNumber: 15
457
- }, this),
458
- /* @__PURE__ */ jsxDEV("div", { className: "mt-6 space-y-3", children: [
459
- /* @__PURE__ */ jsxDEV(
381
+ ] }),
382
+ /* @__PURE__ */ jsxs("div", { className: "mt-6 space-y-3", children: [
383
+ /* @__PURE__ */ jsx(
460
384
  "button",
461
385
  {
462
386
  onClick: () => window.location.reload(),
463
387
  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",
464
388
  children: "Reload Page"
465
- },
466
- void 0,
467
- false,
468
- {
469
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
470
- lineNumber: 511,
471
- columnNumber: 17
472
- },
473
- this
389
+ }
474
390
  ),
475
- /* @__PURE__ */ jsxDEV(
391
+ /* @__PURE__ */ jsx(
476
392
  Link,
477
393
  {
478
394
  to: basePath,
479
395
  className: "w-full flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-web",
480
396
  children: "Return to Data Browser"
481
- },
482
- void 0,
483
- false,
484
- {
485
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
486
- lineNumber: 517,
487
- columnNumber: 17
488
- },
489
- this
397
+ }
490
398
  )
491
- ] }, void 0, true, {
492
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
493
- lineNumber: 510,
494
- columnNumber: 15
495
- }, this)
496
- ] }, void 0, true, {
497
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
498
- lineNumber: 489,
499
- columnNumber: 13
500
- }, this) }, void 0, false, {
501
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
502
- lineNumber: 488,
503
- columnNumber: 11
504
- }, this) }, void 0, false, {
505
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
506
- lineNumber: 487,
507
- columnNumber: 9
508
- }, this) }, void 0, false, {
509
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
510
- lineNumber: 486,
511
- columnNumber: 7
512
- }, this);
399
+ ] })
400
+ ] }) }) }) });
513
401
  }
514
402
  const createLink = `${basePath}/${kebabCase(model.name)}/create`;
515
- const columnSelector = /* @__PURE__ */ jsxDEV("div", { className: "relative", "data-dropdown": "column-selector", children: [
516
- /* @__PURE__ */ jsxDEV(
403
+ const columnSelector = /* @__PURE__ */ jsxs("div", { className: "relative", "data-dropdown": "column-selector", children: [
404
+ /* @__PURE__ */ jsxs(
517
405
  "button",
518
406
  {
519
407
  onClick: () => setShowColumnSelector(!showColumnSelector),
520
408
  className: "inline-flex items-center px-3 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-web",
521
409
  children: [
522
410
  "Columns",
523
- /* @__PURE__ */ jsxDEV(
411
+ /* @__PURE__ */ jsx(
524
412
  "svg",
525
413
  {
526
414
  className: "-mr-0.5 ml-2 h-4 w-4",
527
415
  xmlns: "http://www.w3.org/2000/svg",
528
416
  viewBox: "0 0 20 20",
529
417
  fill: "currentColor",
530
- children: /* @__PURE__ */ jsxDEV(
418
+ children: /* @__PURE__ */ jsx(
531
419
  "path",
532
420
  {
533
421
  fillRule: "evenodd",
534
422
  d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
535
423
  clipRule: "evenodd"
536
- },
537
- void 0,
538
- false,
539
- {
540
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
541
- lineNumber: 548,
542
- columnNumber: 11
543
- },
544
- this
424
+ }
545
425
  )
546
- },
547
- void 0,
548
- false,
549
- {
550
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
551
- lineNumber: 542,
552
- columnNumber: 9
553
- },
554
- this
426
+ }
555
427
  )
556
428
  ]
557
- },
558
- void 0,
559
- true,
560
- {
561
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
562
- lineNumber: 537,
563
- columnNumber: 7
564
- },
565
- this
429
+ }
566
430
  ),
567
- showColumnSelector && /* @__PURE__ */ jsxDEV("div", { className: "absolute right-0 mt-2 w-80 bg-white rounded-md shadow-lg z-50 border border-gray-200", children: /* @__PURE__ */ jsxDEV("div", { className: "p-4", children: [
568
- /* @__PURE__ */ jsxDEV("h3", { className: "text-sm font-medium text-gray-900 mb-3", children: "Visible Columns" }, void 0, false, {
569
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
570
- lineNumber: 559,
571
- columnNumber: 13
572
- }, this),
573
- /* @__PURE__ */ jsxDEV("div", { className: "space-y-2 max-h-64 overflow-y-auto", children: fieldNames.map((field) => /* @__PURE__ */ jsxDEV("label", { className: "flex items-start gap-2 cursor-pointer", children: [
574
- /* @__PURE__ */ jsxDEV(
431
+ showColumnSelector && /* @__PURE__ */ jsx("div", { className: "absolute right-0 mt-2 w-80 bg-white rounded-md shadow-lg z-50 border border-gray-200", children: /* @__PURE__ */ jsxs("div", { className: "p-4", children: [
432
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-medium text-gray-900 mb-3", children: "Visible Columns" }),
433
+ /* @__PURE__ */ jsx("div", { className: "space-y-2 max-h-64 overflow-y-auto", children: fieldNames.map((field) => /* @__PURE__ */ jsxs("label", { className: "flex items-start gap-2 cursor-pointer", children: [
434
+ /* @__PURE__ */ jsx(
575
435
  "input",
576
436
  {
577
437
  type: "checkbox",
@@ -582,32 +442,12 @@ function AdminDataListPage({ modelName: propModelName } = {}) {
582
442
  AdminLocalStorage.setColumnVisibility(model.name, newColumns);
583
443
  },
584
444
  className: "h-4 w-4 mt-0.5 flex-shrink-0 text-green-web focus:ring-green-web border-gray-300 rounded"
585
- },
586
- void 0,
587
- false,
588
- {
589
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
590
- lineNumber: 563,
591
- columnNumber: 19
592
- },
593
- this
445
+ }
594
446
  ),
595
- /* @__PURE__ */ jsxDEV("span", { className: "text-sm text-gray-700 leading-5", children: formatFieldName(field) }, void 0, false, {
596
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
597
- lineNumber: 575,
598
- columnNumber: 19
599
- }, this)
600
- ] }, field, true, {
601
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
602
- lineNumber: 562,
603
- columnNumber: 17
604
- }, this)) }, void 0, false, {
605
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
606
- lineNumber: 560,
607
- columnNumber: 13
608
- }, this),
609
- /* @__PURE__ */ jsxDEV("div", { className: "mt-3 pt-3 border-t border-gray-200 flex justify-between", children: [
610
- /* @__PURE__ */ jsxDEV(
447
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-700 leading-5", children: formatFieldName(field) })
448
+ ] }, field)) }),
449
+ /* @__PURE__ */ jsxs("div", { className: "mt-3 pt-3 border-t border-gray-200 flex justify-between", children: [
450
+ /* @__PURE__ */ jsx(
611
451
  "button",
612
452
  {
613
453
  onClick: () => {
@@ -616,17 +456,9 @@ function AdminDataListPage({ modelName: propModelName } = {}) {
616
456
  },
617
457
  className: "text-xs text-green-web hover:text-green-web-800",
618
458
  children: "Select All"
619
- },
620
- void 0,
621
- false,
622
- {
623
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
624
- lineNumber: 580,
625
- columnNumber: 15
626
- },
627
- this
459
+ }
628
460
  ),
629
- /* @__PURE__ */ jsxDEV(
461
+ /* @__PURE__ */ jsx(
630
462
  "button",
631
463
  {
632
464
  onClick: () => {
@@ -636,94 +468,42 @@ function AdminDataListPage({ modelName: propModelName } = {}) {
636
468
  },
637
469
  className: "text-xs text-gray-600 hover:text-gray-800",
638
470
  children: "Reset to Defaults"
639
- },
640
- void 0,
641
- false,
642
- {
643
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
644
- lineNumber: 589,
645
- columnNumber: 15
646
- },
647
- this
471
+ }
648
472
  )
649
- ] }, void 0, true, {
650
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
651
- lineNumber: 579,
652
- columnNumber: 13
653
- }, this)
654
- ] }, void 0, true, {
655
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
656
- lineNumber: 558,
657
- columnNumber: 11
658
- }, this) }, void 0, false, {
659
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
660
- lineNumber: 557,
661
- columnNumber: 9
662
- }, this)
663
- ] }, void 0, true, {
664
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
665
- lineNumber: 536,
666
- columnNumber: 5
667
- }, this);
668
- const searchFieldSelector = /* @__PURE__ */ jsxDEV("div", { className: "relative", "data-dropdown": "search-field-selector", children: [
669
- /* @__PURE__ */ jsxDEV(
473
+ ] })
474
+ ] }) })
475
+ ] });
476
+ const searchFieldSelector = /* @__PURE__ */ jsxs("div", { className: "relative", "data-dropdown": "search-field-selector", children: [
477
+ /* @__PURE__ */ jsx(
670
478
  "button",
671
479
  {
672
480
  onClick: () => setShowSearchFieldSelector(!showSearchFieldSelector),
673
481
  className: "h-full px-3 border-l border-gray-300 text-gray-400 hover:text-gray-600 focus:outline-none focus:text-gray-600",
674
482
  "aria-label": "Configure search fields",
675
- children: /* @__PURE__ */ jsxDEV(
483
+ children: /* @__PURE__ */ jsx(
676
484
  "svg",
677
485
  {
678
486
  className: "h-4 w-4",
679
487
  xmlns: "http://www.w3.org/2000/svg",
680
488
  viewBox: "0 0 20 20",
681
489
  fill: "currentColor",
682
- children: /* @__PURE__ */ jsxDEV(
490
+ children: /* @__PURE__ */ jsx(
683
491
  "path",
684
492
  {
685
493
  fillRule: "evenodd",
686
494
  d: "M3 3a1 1 0 000 2v8a2 2 0 002 2h2.586l-1.293 1.293a1 1 0 101.414 1.414L10 15.414l2.293 2.293a1 1 0 001.414-1.414L12.414 15H15a2 2 0 002-2V5a1 1 0 100-2H3zm11.707 4.707a1 1 0 00-1.414-1.414L10 9.586 8.707 8.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
687
495
  clipRule: "evenodd"
688
- },
689
- void 0,
690
- false,
691
- {
692
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
693
- lineNumber: 620,
694
- columnNumber: 11
695
- },
696
- this
496
+ }
697
497
  )
698
- },
699
- void 0,
700
- false,
701
- {
702
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
703
- lineNumber: 614,
704
- columnNumber: 9
705
- },
706
- this
498
+ }
707
499
  )
708
- },
709
- void 0,
710
- false,
711
- {
712
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
713
- lineNumber: 609,
714
- columnNumber: 7
715
- },
716
- this
500
+ }
717
501
  ),
718
- showSearchFieldSelector && /* @__PURE__ */ jsxDEV("div", { className: "absolute right-0 mt-2 w-72 bg-white rounded-md shadow-lg z-50 border border-gray-200", children: /* @__PURE__ */ jsxDEV("div", { className: "p-4", children: [
719
- /* @__PURE__ */ jsxDEV("h3", { className: "text-sm font-medium text-gray-900 mb-3", children: "Search Fields" }, void 0, false, {
720
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
721
- lineNumber: 631,
722
- columnNumber: 13
723
- }, this),
724
- searchableFieldNames.length > 0 ? /* @__PURE__ */ jsxDEV(Fragment, { children: [
725
- /* @__PURE__ */ jsxDEV("div", { className: "space-y-2 max-h-48 overflow-y-auto", children: searchableFieldNames.map((field) => /* @__PURE__ */ jsxDEV("label", { className: "flex items-start gap-2 cursor-pointer", children: [
726
- /* @__PURE__ */ jsxDEV(
502
+ showSearchFieldSelector && /* @__PURE__ */ jsx("div", { className: "absolute right-0 mt-2 w-72 bg-white rounded-md shadow-lg z-50 border border-gray-200", children: /* @__PURE__ */ jsxs("div", { className: "p-4", children: [
503
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-medium text-gray-900 mb-3", children: "Search Fields" }),
504
+ searchableFieldNames.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
505
+ /* @__PURE__ */ jsx("div", { className: "space-y-2 max-h-48 overflow-y-auto", children: searchableFieldNames.map((field) => /* @__PURE__ */ jsxs("label", { className: "flex items-start gap-2 cursor-pointer", children: [
506
+ /* @__PURE__ */ jsx(
727
507
  "input",
728
508
  {
729
509
  type: "checkbox",
@@ -734,32 +514,12 @@ function AdminDataListPage({ modelName: propModelName } = {}) {
734
514
  AdminLocalStorage.setSearchFields(model.name, newFields);
735
515
  },
736
516
  className: "h-4 w-4 mt-0.5 flex-shrink-0 text-green-web focus:ring-green-web border-gray-300 rounded"
737
- },
738
- void 0,
739
- false,
740
- {
741
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
742
- lineNumber: 637,
743
- columnNumber: 23
744
- },
745
- this
517
+ }
746
518
  ),
747
- /* @__PURE__ */ jsxDEV("span", { className: "text-sm text-gray-700 leading-5", children: formatFieldName(field) }, void 0, false, {
748
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
749
- lineNumber: 649,
750
- columnNumber: 23
751
- }, this)
752
- ] }, field, true, {
753
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
754
- lineNumber: 636,
755
- columnNumber: 21
756
- }, this)) }, void 0, false, {
757
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
758
- lineNumber: 634,
759
- columnNumber: 17
760
- }, this),
761
- /* @__PURE__ */ jsxDEV("div", { className: "mt-3 pt-3 border-t border-gray-200 flex justify-between", children: [
762
- /* @__PURE__ */ jsxDEV(
519
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-700 leading-5", children: formatFieldName(field) })
520
+ ] }, field)) }),
521
+ /* @__PURE__ */ jsxs("div", { className: "mt-3 pt-3 border-t border-gray-200 flex justify-between", children: [
522
+ /* @__PURE__ */ jsx(
763
523
  "button",
764
524
  {
765
525
  onClick: () => {
@@ -768,17 +528,9 @@ function AdminDataListPage({ modelName: propModelName } = {}) {
768
528
  },
769
529
  className: "text-xs text-green-web hover:text-green-web-800 mr-3",
770
530
  children: "Select All"
771
- },
772
- void 0,
773
- false,
774
- {
775
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
776
- lineNumber: 656,
777
- columnNumber: 19
778
- },
779
- this
531
+ }
780
532
  ),
781
- /* @__PURE__ */ jsxDEV(
533
+ /* @__PURE__ */ jsx(
782
534
  "button",
783
535
  {
784
536
  onClick: () => {
@@ -788,53 +540,17 @@ function AdminDataListPage({ modelName: propModelName } = {}) {
788
540
  },
789
541
  className: "text-xs text-gray-600 hover:text-gray-800",
790
542
  children: "Reset to Defaults"
791
- },
792
- void 0,
793
- false,
794
- {
795
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
796
- lineNumber: 665,
797
- columnNumber: 19
798
- },
799
- this
543
+ }
800
544
  )
801
- ] }, void 0, true, {
802
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
803
- lineNumber: 655,
804
- columnNumber: 17
805
- }, this)
806
- ] }, void 0, true, {
807
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
808
- lineNumber: 633,
809
- columnNumber: 15
810
- }, this) : /* @__PURE__ */ jsxDEV("div", { className: "text-sm text-gray-500", children: "No searchable text fields available" }, void 0, false, {
811
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
812
- lineNumber: 678,
813
- columnNumber: 15
814
- }, this)
815
- ] }, void 0, true, {
816
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
817
- lineNumber: 630,
818
- columnNumber: 11
819
- }, this) }, void 0, false, {
820
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
821
- lineNumber: 629,
822
- columnNumber: 9
823
- }, this)
824
- ] }, void 0, true, {
825
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
826
- lineNumber: 608,
827
- columnNumber: 5
828
- }, this);
829
- const filterPanel = showFilters && /* @__PURE__ */ jsxDEV("div", { className: "mb-4 bg-gray-50 border border-gray-200 rounded-lg p-4", children: [
830
- /* @__PURE__ */ jsxDEV("div", { className: "flex items-center justify-between mb-3", children: [
831
- /* @__PURE__ */ jsxDEV("h3", { className: "text-sm font-medium text-gray-900", children: "Filters" }, void 0, false, {
832
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
833
- lineNumber: 690,
834
- columnNumber: 9
835
- }, this),
836
- /* @__PURE__ */ jsxDEV("div", { className: "flex items-center space-x-2", children: [
837
- /* @__PURE__ */ jsxDEV(
545
+ ] })
546
+ ] }) : /* @__PURE__ */ jsx("div", { className: "text-sm text-gray-500", children: "No searchable text fields available" })
547
+ ] }) })
548
+ ] });
549
+ const filterPanel = showFilters && /* @__PURE__ */ jsxs("div", { className: "mb-4 bg-gray-50 border border-gray-200 rounded-lg p-4", children: [
550
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-3", children: [
551
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-medium text-gray-900", children: "Filters" }),
552
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
553
+ /* @__PURE__ */ jsx(
838
554
  "button",
839
555
  {
840
556
  onClick: () => {
@@ -843,75 +559,35 @@ function AdminDataListPage({ modelName: propModelName } = {}) {
843
559
  },
844
560
  className: "text-xs text-gray-600 hover:text-gray-800",
845
561
  children: "Clear All"
846
- },
847
- void 0,
848
- false,
849
- {
850
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
851
- lineNumber: 692,
852
- columnNumber: 11
853
- },
854
- this
562
+ }
855
563
  ),
856
- /* @__PURE__ */ jsxDEV(
564
+ /* @__PURE__ */ jsx(
857
565
  "button",
858
566
  {
859
567
  onClick: () => setShowFilters(false),
860
568
  className: "text-gray-400 hover:text-gray-600",
861
- children: /* @__PURE__ */ jsxDEV(
569
+ children: /* @__PURE__ */ jsx(
862
570
  "svg",
863
571
  {
864
572
  className: "h-5 w-5",
865
573
  xmlns: "http://www.w3.org/2000/svg",
866
574
  viewBox: "0 0 20 20",
867
575
  fill: "currentColor",
868
- children: /* @__PURE__ */ jsxDEV(
576
+ children: /* @__PURE__ */ jsx(
869
577
  "path",
870
578
  {
871
579
  fillRule: "evenodd",
872
580
  d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
873
581
  clipRule: "evenodd"
874
- },
875
- void 0,
876
- false,
877
- {
878
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
879
- lineNumber: 711,
880
- columnNumber: 15
881
- },
882
- this
582
+ }
883
583
  )
884
- },
885
- void 0,
886
- false,
887
- {
888
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
889
- lineNumber: 705,
890
- columnNumber: 13
891
- },
892
- this
584
+ }
893
585
  )
894
- },
895
- void 0,
896
- false,
897
- {
898
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
899
- lineNumber: 701,
900
- columnNumber: 11
901
- },
902
- this
586
+ }
903
587
  )
904
- ] }, void 0, true, {
905
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
906
- lineNumber: 691,
907
- columnNumber: 9
908
- }, this)
909
- ] }, void 0, true, {
910
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
911
- lineNumber: 689,
912
- columnNumber: 7
913
- }, this),
914
- /* @__PURE__ */ jsxDEV("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", children: filterableFieldNames.map((fieldName) => {
588
+ ] })
589
+ ] }),
590
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", children: filterableFieldNames.map((fieldName) => {
915
591
  const field = model.fields.find((f) => f.name === fieldName);
916
592
  if (!field) return null;
917
593
  const currentValue = filters[fieldName];
@@ -926,7 +602,7 @@ function AdminDataListPage({ modelName: propModelName } = {}) {
926
602
  dispatch({ type: "RESET_PAGINATION" });
927
603
  };
928
604
  if (field.relationName && !field.isList) {
929
- return /* @__PURE__ */ jsxDEV(
605
+ return /* @__PURE__ */ jsx(
930
606
  RelationFilterField,
931
607
  {
932
608
  fieldName,
@@ -934,36 +610,22 @@ function AdminDataListPage({ modelName: propModelName } = {}) {
934
610
  currentValue,
935
611
  onChange: handleChange
936
612
  },
937
- fieldName,
938
- false,
939
- {
940
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
941
- lineNumber: 741,
942
- columnNumber: 15
943
- },
944
- this
613
+ fieldName
945
614
  );
946
615
  }
947
616
  if (field.type.toLowerCase() === "datetime" || field.type.toLowerCase() === "date") {
948
- return /* @__PURE__ */ jsxDEV(
617
+ return /* @__PURE__ */ jsx(
949
618
  DateRangeFilter,
950
619
  {
951
620
  fieldName,
952
621
  currentValue,
953
622
  onChange: handleChange
954
623
  },
955
- fieldName,
956
- false,
957
- {
958
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
959
- lineNumber: 754,
960
- columnNumber: 15
961
- },
962
- this
624
+ fieldName
963
625
  );
964
626
  }
965
627
  if (["int", "bigint", "float", "decimal"].includes(field.type.toLowerCase())) {
966
- return /* @__PURE__ */ jsxDEV(
628
+ return /* @__PURE__ */ jsx(
967
629
  NumberRangeFilter,
968
630
  {
969
631
  fieldName,
@@ -971,68 +633,33 @@ function AdminDataListPage({ modelName: propModelName } = {}) {
971
633
  currentValue,
972
634
  onChange: handleChange
973
635
  },
974
- fieldName,
975
- false,
976
- {
977
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
978
- lineNumber: 766,
979
- columnNumber: 15
980
- },
981
- this
636
+ fieldName
982
637
  );
983
638
  }
984
639
  if (field.kind === "enum") {
985
640
  const enumValues = getEnumValues(field.type);
986
641
  if (enumValues) {
987
- return /* @__PURE__ */ jsxDEV("div", { className: "space-y-1", children: [
988
- /* @__PURE__ */ jsxDEV("label", { className: "block text-sm font-medium text-gray-700", children: formatFieldName(fieldName) }, void 0, false, {
989
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
990
- lineNumber: 782,
991
- columnNumber: 19
992
- }, this),
993
- /* @__PURE__ */ jsxDEV(
642
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
643
+ /* @__PURE__ */ jsx("label", { className: "block text-sm font-medium text-gray-700", children: formatFieldName(fieldName) }),
644
+ /* @__PURE__ */ jsxs(
994
645
  "select",
995
646
  {
996
647
  value: typeof currentValue === "string" ? currentValue : "",
997
648
  onChange: (e) => handleChange(e.target.value || void 0),
998
649
  className: "w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-web focus:border-green-web text-sm",
999
650
  children: [
1000
- /* @__PURE__ */ jsxDEV("option", { value: "", children: "All" }, void 0, false, {
1001
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1002
- lineNumber: 790,
1003
- columnNumber: 21
1004
- }, this),
1005
- enumValues.map((val) => /* @__PURE__ */ jsxDEV("option", { value: val, children: val }, val, false, {
1006
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1007
- lineNumber: 792,
1008
- columnNumber: 23
1009
- }, this))
651
+ /* @__PURE__ */ jsx("option", { value: "", children: "All" }),
652
+ enumValues.map((val) => /* @__PURE__ */ jsx("option", { value: val, children: val }, val))
1010
653
  ]
1011
- },
1012
- void 0,
1013
- true,
1014
- {
1015
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1016
- lineNumber: 785,
1017
- columnNumber: 19
1018
- },
1019
- this
654
+ }
1020
655
  )
1021
- ] }, fieldName, true, {
1022
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1023
- lineNumber: 781,
1024
- columnNumber: 17
1025
- }, this);
656
+ ] }, fieldName);
1026
657
  }
1027
658
  }
1028
659
  if (field.type.toLowerCase() === "boolean") {
1029
- return /* @__PURE__ */ jsxDEV("div", { className: "space-y-1", children: [
1030
- /* @__PURE__ */ jsxDEV("label", { className: "block text-sm font-medium text-gray-700", children: formatFieldName(fieldName) }, void 0, false, {
1031
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1032
- lineNumber: 806,
1033
- columnNumber: 17
1034
- }, this),
1035
- /* @__PURE__ */ jsxDEV(
660
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
661
+ /* @__PURE__ */ jsx("label", { className: "block text-sm font-medium text-gray-700", children: formatFieldName(fieldName) }),
662
+ /* @__PURE__ */ jsxs(
1036
663
  "select",
1037
664
  {
1038
665
  value: currentValue === void 0 || currentValue === null ? "" : currentValue.toString(),
@@ -1042,45 +669,17 @@ function AdminDataListPage({ modelName: propModelName } = {}) {
1042
669
  },
1043
670
  className: "w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-web focus:border-green-web text-sm",
1044
671
  children: [
1045
- /* @__PURE__ */ jsxDEV("option", { value: "", children: "All" }, void 0, false, {
1046
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1047
- lineNumber: 817,
1048
- columnNumber: 19
1049
- }, this),
1050
- /* @__PURE__ */ jsxDEV("option", { value: "true", children: "Yes" }, void 0, false, {
1051
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1052
- lineNumber: 818,
1053
- columnNumber: 19
1054
- }, this),
1055
- /* @__PURE__ */ jsxDEV("option", { value: "false", children: "No" }, void 0, false, {
1056
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1057
- lineNumber: 819,
1058
- columnNumber: 19
1059
- }, this)
672
+ /* @__PURE__ */ jsx("option", { value: "", children: "All" }),
673
+ /* @__PURE__ */ jsx("option", { value: "true", children: "Yes" }),
674
+ /* @__PURE__ */ jsx("option", { value: "false", children: "No" })
1060
675
  ]
1061
- },
1062
- void 0,
1063
- true,
1064
- {
1065
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1066
- lineNumber: 809,
1067
- columnNumber: 17
1068
- },
1069
- this
676
+ }
1070
677
  )
1071
- ] }, fieldName, true, {
1072
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1073
- lineNumber: 805,
1074
- columnNumber: 15
1075
- }, this);
678
+ ] }, fieldName);
1076
679
  }
1077
- return /* @__PURE__ */ jsxDEV("div", { className: "space-y-1", children: [
1078
- /* @__PURE__ */ jsxDEV("label", { className: "block text-sm font-medium text-gray-700", children: formatFieldName(fieldName) }, void 0, false, {
1079
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1080
- lineNumber: 828,
1081
- columnNumber: 15
1082
- }, this),
1083
- /* @__PURE__ */ jsxDEV(
680
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
681
+ /* @__PURE__ */ jsx("label", { className: "block text-sm font-medium text-gray-700", children: formatFieldName(fieldName) }),
682
+ /* @__PURE__ */ jsx(
1084
683
  "input",
1085
684
  {
1086
685
  type: "text",
@@ -1088,40 +687,16 @@ function AdminDataListPage({ modelName: propModelName } = {}) {
1088
687
  onChange: (e) => handleChange(e.target.value || void 0),
1089
688
  placeholder: `Filter by ${formatFieldName(fieldName).toLowerCase()}...`,
1090
689
  className: "w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-web focus:border-green-web text-sm"
1091
- },
1092
- void 0,
1093
- false,
1094
- {
1095
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1096
- lineNumber: 831,
1097
- columnNumber: 15
1098
- },
1099
- this
690
+ }
1100
691
  )
1101
- ] }, fieldName, true, {
1102
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1103
- lineNumber: 827,
1104
- columnNumber: 13
1105
- }, this);
1106
- }) }, void 0, false, {
1107
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1108
- lineNumber: 721,
1109
- columnNumber: 7
1110
- }, this)
1111
- ] }, void 0, true, {
1112
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1113
- lineNumber: 688,
1114
- columnNumber: 5
1115
- }, this);
1116
- const searchFilter = /* @__PURE__ */ jsxDEV("div", { className: "mb-4 flex items-center justify-between", children: [
1117
- /* @__PURE__ */ jsxDEV("div", { className: "flex-1 max-w-lg", children: [
1118
- /* @__PURE__ */ jsxDEV("label", { htmlFor: "search", className: "sr-only", children: "Search" }, void 0, false, {
1119
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1120
- lineNumber: 848,
1121
- columnNumber: 9
1122
- }, this),
1123
- /* @__PURE__ */ jsxDEV("div", { className: "relative", children: [
1124
- /* @__PURE__ */ jsxDEV("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: loading && search !== debouncedSearch ? /* @__PURE__ */ jsxDEV(
692
+ ] }, fieldName);
693
+ }) })
694
+ ] });
695
+ const searchFilter = /* @__PURE__ */ jsxs("div", { className: "mb-4 flex items-center justify-between", children: [
696
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 max-w-lg", children: [
697
+ /* @__PURE__ */ jsx("label", { htmlFor: "search", className: "sr-only", children: "Search" }),
698
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
699
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: loading && search !== debouncedSearch ? /* @__PURE__ */ jsxs(
1125
700
  "svg",
1126
701
  {
1127
702
  className: "animate-spin h-5 w-5 text-gray-400",
@@ -1129,7 +704,7 @@ function AdminDataListPage({ modelName: propModelName } = {}) {
1129
704
  fill: "none",
1130
705
  viewBox: "0 0 24 24",
1131
706
  children: [
1132
- /* @__PURE__ */ jsxDEV(
707
+ /* @__PURE__ */ jsx(
1133
708
  "circle",
1134
709
  {
1135
710
  className: "opacity-25",
@@ -1138,43 +713,19 @@ function AdminDataListPage({ modelName: propModelName } = {}) {
1138
713
  r: "10",
1139
714
  stroke: "currentColor",
1140
715
  strokeWidth: "4"
1141
- },
1142
- void 0,
1143
- false,
1144
- {
1145
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1146
- lineNumber: 860,
1147
- columnNumber: 17
1148
- },
1149
- this
716
+ }
1150
717
  ),
1151
- /* @__PURE__ */ jsxDEV(
718
+ /* @__PURE__ */ jsx(
1152
719
  "path",
1153
720
  {
1154
721
  className: "opacity-75",
1155
722
  fill: "currentColor",
1156
723
  d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
1157
- },
1158
- void 0,
1159
- false,
1160
- {
1161
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1162
- lineNumber: 868,
1163
- columnNumber: 17
1164
- },
1165
- this
724
+ }
1166
725
  )
1167
726
  ]
1168
- },
1169
- void 0,
1170
- true,
1171
- {
1172
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1173
- lineNumber: 854,
1174
- columnNumber: 15
1175
- },
1176
- this
1177
- ) : /* @__PURE__ */ jsxDEV(
727
+ }
728
+ ) : /* @__PURE__ */ jsx(
1178
729
  "svg",
1179
730
  {
1180
731
  className: "h-5 w-5 text-gray-400",
@@ -1182,37 +733,17 @@ function AdminDataListPage({ modelName: propModelName } = {}) {
1182
733
  viewBox: "0 0 20 20",
1183
734
  fill: "currentColor",
1184
735
  "aria-hidden": "true",
1185
- children: /* @__PURE__ */ jsxDEV(
736
+ children: /* @__PURE__ */ jsx(
1186
737
  "path",
1187
738
  {
1188
739
  fillRule: "evenodd",
1189
740
  d: "M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",
1190
741
  clipRule: "evenodd"
1191
- },
1192
- void 0,
1193
- false,
1194
- {
1195
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1196
- lineNumber: 882,
1197
- columnNumber: 17
1198
- },
1199
- this
742
+ }
1200
743
  )
1201
- },
1202
- void 0,
1203
- false,
1204
- {
1205
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1206
- lineNumber: 875,
1207
- columnNumber: 15
1208
- },
1209
- this
1210
- ) }, void 0, false, {
1211
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1212
- lineNumber: 852,
1213
- columnNumber: 11
1214
- }, this),
1215
- /* @__PURE__ */ jsxDEV(
744
+ }
745
+ ) }),
746
+ /* @__PURE__ */ jsx(
1216
747
  "input",
1217
748
  {
1218
749
  id: "search",
@@ -1222,107 +753,47 @@ function AdminDataListPage({ modelName: propModelName } = {}) {
1222
753
  type: "search",
1223
754
  value: state.search || "",
1224
755
  onChange: (e) => dispatch({ type: "SET_SEARCH", payload: e.target.value })
1225
- },
1226
- void 0,
1227
- false,
1228
- {
1229
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1230
- lineNumber: 890,
1231
- columnNumber: 11
1232
- },
1233
- this
756
+ }
1234
757
  ),
1235
- searchableFieldNames.length > 0 && /* @__PURE__ */ jsxDEV("div", { className: "absolute inset-y-0 right-0 flex items-center", children: searchFieldSelector }, void 0, false, {
1236
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1237
- lineNumber: 900,
1238
- columnNumber: 13
1239
- }, this)
1240
- ] }, void 0, true, {
1241
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1242
- lineNumber: 851,
1243
- columnNumber: 9
1244
- }, this)
1245
- ] }, void 0, true, {
1246
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1247
- lineNumber: 847,
1248
- columnNumber: 7
1249
- }, this),
1250
- /* @__PURE__ */ jsxDEV("div", { className: "ml-4 flex space-x-2", children: [
1251
- /* @__PURE__ */ jsxDEV(
758
+ searchableFieldNames.length > 0 && /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 flex items-center", children: searchFieldSelector })
759
+ ] })
760
+ ] }),
761
+ /* @__PURE__ */ jsxs("div", { className: "ml-4 flex space-x-2", children: [
762
+ /* @__PURE__ */ jsxs(
1252
763
  "button",
1253
764
  {
1254
765
  onClick: () => setShowFilters(!showFilters),
1255
766
  className: `inline-flex items-center px-3 py-2 border text-sm font-medium rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-web ${showFilters || Object.keys(filters).length > 0 ? "border-green-web text-green-web bg-green-50 hover:bg-green-100" : "border-gray-300 text-gray-700 bg-white hover:bg-gray-50"}`,
1256
767
  children: [
1257
- /* @__PURE__ */ jsxDEV("svg", { className: "w-4 h-4 mr-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxDEV(
768
+ /* @__PURE__ */ jsx("svg", { className: "w-4 h-4 mr-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx(
1258
769
  "path",
1259
770
  {
1260
771
  strokeLinecap: "round",
1261
772
  strokeLinejoin: "round",
1262
773
  strokeWidth: 2,
1263
774
  d: "M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"
1264
- },
1265
- void 0,
1266
- false,
1267
- {
1268
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1269
- lineNumber: 916,
1270
- columnNumber: 13
1271
- },
1272
- this
1273
- ) }, void 0, false, {
1274
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1275
- lineNumber: 915,
1276
- columnNumber: 11
1277
- }, this),
775
+ }
776
+ ) }),
1278
777
  "Filters",
1279
- Object.keys(filters).length > 0 && /* @__PURE__ */ jsxDEV("span", { className: "ml-1 inline-flex items-center justify-center px-2 py-1 text-xs font-bold leading-none text-white bg-green-web rounded-full", children: Object.keys(filters).length }, void 0, false, {
1280
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1281
- lineNumber: 925,
1282
- columnNumber: 13
1283
- }, this)
778
+ Object.keys(filters).length > 0 && /* @__PURE__ */ jsx("span", { className: "ml-1 inline-flex items-center justify-center px-2 py-1 text-xs font-bold leading-none text-white bg-green-web rounded-full", children: Object.keys(filters).length })
1284
779
  ]
1285
- },
1286
- void 0,
1287
- true,
1288
- {
1289
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1290
- lineNumber: 907,
1291
- columnNumber: 9
1292
- },
1293
- this
780
+ }
1294
781
  ),
1295
782
  columnSelector,
1296
- /* @__PURE__ */ jsxDEV(
783
+ /* @__PURE__ */ jsx(
1297
784
  Link,
1298
785
  {
1299
786
  to: createLink,
1300
787
  className: "inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-600",
1301
788
  children: "Create New"
1302
- },
1303
- void 0,
1304
- false,
1305
- {
1306
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1307
- lineNumber: 931,
1308
- columnNumber: 9
1309
- },
1310
- this
789
+ }
1311
790
  )
1312
- ] }, void 0, true, {
1313
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1314
- lineNumber: 906,
1315
- columnNumber: 7
1316
- }, this)
1317
- ] }, void 0, true, {
1318
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1319
- lineNumber: 846,
1320
- columnNumber: 5
1321
- }, this);
1322
- return /* @__PURE__ */ jsxDEV(Fragment, { children: [
791
+ ] })
792
+ ] });
793
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1323
794
  filterPanel,
1324
795
  searchFilter,
1325
- /* @__PURE__ */ jsxDEV(
796
+ /* @__PURE__ */ jsx(
1326
797
  DataTable,
1327
798
  {
1328
799
  data: items,
@@ -1332,28 +803,12 @@ function AdminDataListPage({ modelName: propModelName } = {}) {
1332
803
  setSkip: (skip2) => dispatch({ type: "SET_SKIP", payload: skip2 }),
1333
804
  sort: state.sort,
1334
805
  setSort: setSortSafely
1335
- },
1336
- void 0,
1337
- false,
1338
- {
1339
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1340
- lineNumber: 945,
1341
- columnNumber: 7
1342
- },
1343
- this
806
+ }
1344
807
  )
1345
- ] }, void 0, true, {
1346
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1347
- lineNumber: 942,
1348
- columnNumber: 5
1349
- }, this);
808
+ ] });
1350
809
  }
1351
810
  function AdminDataErrorBoundary({ error }) {
1352
- return /* @__PURE__ */ jsxDEV(ErrorBoundary, { error }, void 0, false, {
1353
- fileName: "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/pages/AdminDataListPage.tsx",
1354
- lineNumber: 959,
1355
- columnNumber: 10
1356
- }, this);
811
+ return /* @__PURE__ */ jsx(ErrorBoundary, { error });
1357
812
  }
1358
813
  export {
1359
814
  AdminDataErrorBoundary,