@nestledjs/data-browser 0.1.17 → 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,9 +1,9 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
1
2
  import { useState, useRef, useCallback, useMemo } from "react";
2
3
  import { useClickOutside } from "../../hooks/useClickOutside.js";
3
4
  import { useRelationData } from "../../hooks/useRelationData.js";
4
5
  import { formatFieldName } from "../../utils/string-utils.js";
5
6
  import { RelationDropdownButton, RelationDropdownContent } from "./RelationComponents.js";
6
- var _jsxFileName = "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/components/filters/RelationFilterField.tsx";
7
7
  function RelationFilterField({
8
8
  fieldName,
9
9
  relatedModelName,
@@ -17,23 +17,19 @@ function RelationFilterField({
17
17
  setIsOpen(false);
18
18
  }, []);
19
19
  useClickOutside(dropdownRef, handleCloseDropdown, isOpen);
20
- const {
21
- relatedItems,
22
- loading,
23
- error: relationError,
24
- hasDocument
25
- } = useRelationData(
20
+ const { relatedItems, loading, error: relationError, hasDocument } = useRelationData(
26
21
  relatedModelName,
27
22
  searchTerm,
28
23
  isOpen,
29
24
  currentValue == null ? void 0 : currentValue.id
30
25
  // Pass current value ID so it can be loaded even when dropdown is closed
31
26
  );
32
- const currentItem = useMemo(() => (currentValue == null ? void 0 : currentValue.id) ? relatedItems.find((item) => item.id === currentValue.id) : null, [currentValue == null ? void 0 : currentValue.id, relatedItems]);
27
+ const currentItem = useMemo(
28
+ () => (currentValue == null ? void 0 : currentValue.id) ? relatedItems.find((item) => item.id === currentValue.id) : null,
29
+ [currentValue == null ? void 0 : currentValue.id, relatedItems]
30
+ );
33
31
  const handleSelect = useCallback((item) => {
34
- onChange({
35
- id: item.id
36
- });
32
+ onChange({ id: item.id });
37
33
  setIsOpen(false);
38
34
  setSearchTerm("");
39
35
  }, [onChange]);
@@ -49,43 +45,50 @@ function RelationFilterField({
49
45
  }
50
46
  }, [isOpen]);
51
47
  if (!hasDocument) {
52
- return /* @__PURE__ */ React.createElement("div", { className: "space-y-1", __self: this, __source: {
53
- fileName: _jsxFileName,
54
- lineNumber: 68,
55
- columnNumber: 7
56
- } }, /* @__PURE__ */ React.createElement("label", { className: "block text-sm font-medium text-gray-700", __self: this, __source: {
57
- fileName: _jsxFileName,
58
- lineNumber: 69,
59
- columnNumber: 9
60
- } }, formatFieldName(fieldName), " ID"), /* @__PURE__ */ React.createElement("input", { type: "text", value: (currentValue == null ? void 0 : currentValue.id) || "", onChange: (e) => onChange(e.target.value ? {
61
- id: e.target.value
62
- } : void 0), placeholder: "Enter ID...", 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", __self: this, __source: {
63
- fileName: _jsxFileName,
64
- lineNumber: 72,
65
- columnNumber: 9
66
- } }));
48
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
49
+ /* @__PURE__ */ jsxs("label", { className: "block text-sm font-medium text-gray-700", children: [
50
+ formatFieldName(fieldName),
51
+ " ID"
52
+ ] }),
53
+ /* @__PURE__ */ jsx(
54
+ "input",
55
+ {
56
+ type: "text",
57
+ value: (currentValue == null ? void 0 : currentValue.id) || "",
58
+ onChange: (e) => onChange(e.target.value ? { id: e.target.value } : void 0),
59
+ placeholder: "Enter ID...",
60
+ 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"
61
+ }
62
+ )
63
+ ] });
67
64
  }
68
- return /* @__PURE__ */ React.createElement("div", { className: "space-y-1", ref: dropdownRef, __self: this, __source: {
69
- fileName: _jsxFileName,
70
- lineNumber: 84,
71
- columnNumber: 5
72
- } }, /* @__PURE__ */ React.createElement("label", { className: "block text-sm font-medium text-gray-700", __self: this, __source: {
73
- fileName: _jsxFileName,
74
- lineNumber: 85,
75
- columnNumber: 7
76
- } }, formatFieldName(fieldName)), /* @__PURE__ */ React.createElement("div", { className: "relative", __self: this, __source: {
77
- fileName: _jsxFileName,
78
- lineNumber: 88,
79
- columnNumber: 7
80
- } }, /* @__PURE__ */ React.createElement(RelationDropdownButton, { currentItem, relatedModelName, isOpen, onClick: handleToggleOpen, __self: this, __source: {
81
- fileName: _jsxFileName,
82
- lineNumber: 89,
83
- columnNumber: 9
84
- } }), isOpen && /* @__PURE__ */ React.createElement(RelationDropdownContent, { searchTerm, onSearchChange: setSearchTerm, relatedModelName, items: relatedItems, loading, error: relationError, onSelect: handleSelect, onClear: handleClear, __self: this, __source: {
85
- fileName: _jsxFileName,
86
- lineNumber: 97,
87
- columnNumber: 11
88
- } })));
65
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-1", ref: dropdownRef, children: [
66
+ /* @__PURE__ */ jsx("label", { className: "block text-sm font-medium text-gray-700", children: formatFieldName(fieldName) }),
67
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
68
+ /* @__PURE__ */ jsx(
69
+ RelationDropdownButton,
70
+ {
71
+ currentItem,
72
+ relatedModelName,
73
+ isOpen,
74
+ onClick: handleToggleOpen
75
+ }
76
+ ),
77
+ isOpen && /* @__PURE__ */ jsx(
78
+ RelationDropdownContent,
79
+ {
80
+ searchTerm,
81
+ onSearchChange: setSearchTerm,
82
+ relatedModelName,
83
+ items: relatedItems,
84
+ loading,
85
+ error: relationError,
86
+ onSelect: handleSelect,
87
+ onClear: handleClear
88
+ }
89
+ )
90
+ ] })
91
+ ] });
89
92
  }
90
93
  export {
91
94
  RelationFilterField
@@ -1,7 +1,6 @@
1
- import React from "react";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Link } from "react-router";
3
3
  import { HomeIcon, ChevronRightIcon } from "@heroicons/react/24/outline";
4
- var _jsxFileName = "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/components/shared/AdminBreadcrumbs.tsx";
5
4
  function AdminBreadcrumbs({
6
5
  items,
7
6
  showHome = true,
@@ -10,52 +9,49 @@ function AdminBreadcrumbs({
10
9
  }) {
11
10
  const renderHomeLink = () => {
12
11
  if (!showHome) return null;
13
- return /* @__PURE__ */ React.createElement("li", { key: "home", className: "flex items-center", __self: this, __source: {
14
- fileName: _jsxFileName,
15
- lineNumber: 30,
16
- columnNumber: 7
17
- } }, /* @__PURE__ */ React.createElement(Link, { to: homeHref, className: "text-gray-400 hover:text-gray-500", "aria-label": "Home", __self: this, __source: {
18
- fileName: _jsxFileName,
19
- lineNumber: 31,
20
- columnNumber: 9
21
- } }, /* @__PURE__ */ React.createElement(HomeIcon, { className: "h-5 w-5 flex-shrink-0", __self: this, __source: {
22
- fileName: _jsxFileName,
23
- lineNumber: 36,
24
- columnNumber: 11
25
- } })));
12
+ return /* @__PURE__ */ jsx("li", { className: "flex items-center", children: /* @__PURE__ */ jsx(
13
+ Link,
14
+ {
15
+ to: homeHref,
16
+ className: "text-gray-400 hover:text-gray-500",
17
+ "aria-label": "Home",
18
+ children: /* @__PURE__ */ jsx(HomeIcon, { className: "h-5 w-5 flex-shrink-0" })
19
+ }
20
+ ) }, "home");
26
21
  };
27
22
  const renderBreadcrumbItem = (item, index, isLast) => {
28
- const content = item.href && !item.isActive ? /* @__PURE__ */ React.createElement(Link, { to: item.href, className: "text-sm font-medium text-gray-500 hover:text-gray-700", __self: this, __source: {
29
- fileName: _jsxFileName,
30
- lineNumber: 44,
31
- columnNumber: 7
32
- } }, item.label) : /* @__PURE__ */ React.createElement("span", { className: `text-sm font-medium ${item.isActive ? "text-gray-900" : "text-gray-500"}`, __self: this, __source: {
33
- fileName: _jsxFileName,
34
- lineNumber: 51,
35
- columnNumber: 7
36
- } }, item.label);
37
- return /* @__PURE__ */ React.createElement("li", { key: item.id, className: "flex items-center", __self: this, __source: {
38
- fileName: _jsxFileName,
39
- lineNumber: 61,
40
- columnNumber: 7
41
- } }, (showHome || index > 0) && /* @__PURE__ */ React.createElement(ChevronRightIcon, { className: "h-5 w-5 flex-shrink-0 text-gray-400 mr-4", "aria-hidden": "true", __self: this, __source: {
42
- fileName: _jsxFileName,
43
- lineNumber: 63,
44
- columnNumber: 11
45
- } }), content);
23
+ const content = item.href && !item.isActive ? /* @__PURE__ */ jsx(
24
+ Link,
25
+ {
26
+ to: item.href,
27
+ className: "text-sm font-medium text-gray-500 hover:text-gray-700",
28
+ children: item.label
29
+ }
30
+ ) : /* @__PURE__ */ jsx(
31
+ "span",
32
+ {
33
+ className: `text-sm font-medium ${item.isActive ? "text-gray-900" : "text-gray-500"}`,
34
+ children: item.label
35
+ }
36
+ );
37
+ return /* @__PURE__ */ jsxs("li", { className: "flex items-center", children: [
38
+ (showHome || index > 0) && /* @__PURE__ */ jsx(
39
+ ChevronRightIcon,
40
+ {
41
+ className: "h-5 w-5 flex-shrink-0 text-gray-400 mr-4",
42
+ "aria-hidden": "true"
43
+ }
44
+ ),
45
+ content
46
+ ] }, item.id);
46
47
  };
47
- return /* @__PURE__ */ React.createElement("nav", { className: `flex ${className}`, "aria-label": "Breadcrumb", __self: this, __source: {
48
- fileName: _jsxFileName,
49
- lineNumber: 74,
50
- columnNumber: 5
51
- } }, /* @__PURE__ */ React.createElement("ol", { className: "flex items-center space-x-4", __self: this, __source: {
52
- fileName: _jsxFileName,
53
- lineNumber: 75,
54
- columnNumber: 7
55
- } }, renderHomeLink(), items.map((item, index) => {
56
- index === items.length - 1;
57
- return renderBreadcrumbItem(item, index);
58
- })));
48
+ return /* @__PURE__ */ jsx("nav", { className: `flex ${className}`, "aria-label": "Breadcrumb", children: /* @__PURE__ */ jsxs("ol", { className: "flex items-center space-x-4", children: [
49
+ renderHomeLink(),
50
+ items.map((item, index) => {
51
+ index === items.length - 1;
52
+ return renderBreadcrumbItem(item, index);
53
+ })
54
+ ] }) });
59
55
  }
60
56
  export {
61
57
  AdminBreadcrumbs
@@ -1,6 +1,5 @@
1
- import React from "react";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { XCircleIcon, ExclamationCircleIcon, ExclamationTriangleIcon } from "@heroicons/react/24/outline";
3
- var _jsxFileName = "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/components/shared/AdminErrorStates.tsx";
4
3
  const getSeverityConfig = (severity) => {
5
4
  const configs = {
6
5
  warning: {
@@ -44,55 +43,33 @@ function AdminErrorState({
44
43
  }) {
45
44
  const config = getSeverityConfig(severity);
46
45
  const IconComponent = config.icon;
47
- return /* @__PURE__ */ React.createElement("div", { className: `rounded-md border p-4 ${config.bgColor} ${config.borderColor} ${className}`, __self: this, __source: {
48
- fileName: _jsxFileName,
49
- lineNumber: 78,
50
- columnNumber: 5
51
- } }, /* @__PURE__ */ React.createElement("div", { className: "flex", __self: this, __source: {
52
- fileName: _jsxFileName,
53
- lineNumber: 79,
54
- columnNumber: 7
55
- } }, showIcon && /* @__PURE__ */ React.createElement("div", { className: "flex-shrink-0", __self: this, __source: {
56
- fileName: _jsxFileName,
57
- lineNumber: 81,
58
- columnNumber: 11
59
- } }, /* @__PURE__ */ React.createElement(IconComponent, { className: `h-5 w-5 ${config.iconColor}`, "aria-hidden": "true", __self: this, __source: {
60
- fileName: _jsxFileName,
61
- lineNumber: 82,
62
- columnNumber: 13
63
- } })), /* @__PURE__ */ React.createElement("div", { className: showIcon ? "ml-3" : "", __self: this, __source: {
64
- fileName: _jsxFileName,
65
- lineNumber: 85,
66
- columnNumber: 9
67
- } }, /* @__PURE__ */ React.createElement("h3", { className: `text-sm font-medium ${config.titleColor}`, __self: this, __source: {
68
- fileName: _jsxFileName,
69
- lineNumber: 86,
70
- columnNumber: 11
71
- } }, title), message && /* @__PURE__ */ React.createElement("div", { className: `mt-2 text-sm ${config.messageColor}`, __self: this, __source: {
72
- fileName: _jsxFileName,
73
- lineNumber: 90,
74
- columnNumber: 13
75
- } }, /* @__PURE__ */ React.createElement("p", { __self: this, __source: {
76
- fileName: _jsxFileName,
77
- lineNumber: 91,
78
- columnNumber: 15
79
- } }, message)), (onRetry || onDismiss) && /* @__PURE__ */ React.createElement("div", { className: "mt-4", __self: this, __source: {
80
- fileName: _jsxFileName,
81
- lineNumber: 95,
82
- columnNumber: 13
83
- } }, /* @__PURE__ */ React.createElement("div", { className: "-mx-2 -my-1.5 flex", __self: this, __source: {
84
- fileName: _jsxFileName,
85
- lineNumber: 96,
86
- columnNumber: 15
87
- } }, onRetry && /* @__PURE__ */ React.createElement("button", { type: "button", onClick: onRetry, className: `rounded-md px-2 py-1.5 text-sm font-medium ${config.buttonColor} focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500`, __self: this, __source: {
88
- fileName: _jsxFileName,
89
- lineNumber: 98,
90
- columnNumber: 19
91
- } }, "Try Again"), onDismiss && /* @__PURE__ */ React.createElement("button", { type: "button", onClick: onDismiss, className: `ml-3 rounded-md px-2 py-1.5 text-sm font-medium ${config.buttonColor} focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500`, __self: this, __source: {
92
- fileName: _jsxFileName,
93
- lineNumber: 107,
94
- columnNumber: 19
95
- } }, "Dismiss"))))));
46
+ return /* @__PURE__ */ jsx("div", { className: `rounded-md border p-4 ${config.bgColor} ${config.borderColor} ${className}`, children: /* @__PURE__ */ jsxs("div", { className: "flex", children: [
47
+ showIcon && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx(IconComponent, { className: `h-5 w-5 ${config.iconColor}`, "aria-hidden": "true" }) }),
48
+ /* @__PURE__ */ jsxs("div", { className: showIcon ? "ml-3" : "", children: [
49
+ /* @__PURE__ */ jsx("h3", { className: `text-sm font-medium ${config.titleColor}`, children: title }),
50
+ message && /* @__PURE__ */ jsx("div", { className: `mt-2 text-sm ${config.messageColor}`, children: /* @__PURE__ */ jsx("p", { children: message }) }),
51
+ (onRetry || onDismiss) && /* @__PURE__ */ jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsxs("div", { className: "-mx-2 -my-1.5 flex", children: [
52
+ onRetry && /* @__PURE__ */ jsx(
53
+ "button",
54
+ {
55
+ type: "button",
56
+ onClick: onRetry,
57
+ className: `rounded-md px-2 py-1.5 text-sm font-medium ${config.buttonColor} focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500`,
58
+ children: "Try Again"
59
+ }
60
+ ),
61
+ onDismiss && /* @__PURE__ */ jsx(
62
+ "button",
63
+ {
64
+ type: "button",
65
+ onClick: onDismiss,
66
+ className: `ml-3 rounded-md px-2 py-1.5 text-sm font-medium ${config.buttonColor} focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500`,
67
+ children: "Dismiss"
68
+ }
69
+ )
70
+ ] }) })
71
+ ] })
72
+ ] }) });
96
73
  }
97
74
  function AdminEmptyState({
98
75
  title,
@@ -102,31 +79,20 @@ function AdminEmptyState({
102
79
  className = "",
103
80
  icon: IconComponent
104
81
  }) {
105
- return /* @__PURE__ */ React.createElement("div", { className: `text-center ${className}`, __self: this, __source: {
106
- fileName: _jsxFileName,
107
- lineNumber: 133,
108
- columnNumber: 5
109
- } }, IconComponent && /* @__PURE__ */ React.createElement(IconComponent, { className: "mx-auto h-12 w-12 text-gray-400", __self: this, __source: {
110
- fileName: _jsxFileName,
111
- lineNumber: 135,
112
- columnNumber: 9
113
- } }), /* @__PURE__ */ React.createElement("h3", { className: "mt-2 text-sm font-medium text-gray-900", __self: this, __source: {
114
- fileName: _jsxFileName,
115
- lineNumber: 137,
116
- columnNumber: 7
117
- } }, title), message && /* @__PURE__ */ React.createElement("p", { className: "mt-1 text-sm text-gray-500", __self: this, __source: {
118
- fileName: _jsxFileName,
119
- lineNumber: 139,
120
- columnNumber: 9
121
- } }, message), actionLabel && onAction && /* @__PURE__ */ React.createElement("div", { className: "mt-6", __self: this, __source: {
122
- fileName: _jsxFileName,
123
- lineNumber: 142,
124
- columnNumber: 9
125
- } }, /* @__PURE__ */ React.createElement("button", { type: "button", onClick: onAction, className: "inline-flex items-center rounded-md bg-green-web px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-green-web-800 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-green-web", __self: this, __source: {
126
- fileName: _jsxFileName,
127
- lineNumber: 143,
128
- columnNumber: 11
129
- } }, actionLabel)));
82
+ return /* @__PURE__ */ jsxs("div", { className: `text-center ${className}`, children: [
83
+ IconComponent && /* @__PURE__ */ jsx(IconComponent, { className: "mx-auto h-12 w-12 text-gray-400" }),
84
+ /* @__PURE__ */ jsx("h3", { className: "mt-2 text-sm font-medium text-gray-900", children: title }),
85
+ message && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-gray-500", children: message }),
86
+ actionLabel && onAction && /* @__PURE__ */ jsx("div", { className: "mt-6", children: /* @__PURE__ */ jsx(
87
+ "button",
88
+ {
89
+ type: "button",
90
+ onClick: onAction,
91
+ className: "inline-flex items-center rounded-md bg-green-web px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-green-web-800 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-green-web",
92
+ children: actionLabel
93
+ }
94
+ ) })
95
+ ] });
130
96
  }
131
97
  function AdminLoadingState({
132
98
  title = "Loading...",
@@ -142,23 +108,11 @@ function AdminLoadingState({
142
108
  };
143
109
  return sizes[size];
144
110
  };
145
- return /* @__PURE__ */ React.createElement("div", { className: `flex flex-col items-center justify-center p-8 ${className}`, __self: this, __source: {
146
- fileName: _jsxFileName,
147
- lineNumber: 172,
148
- columnNumber: 5
149
- } }, /* @__PURE__ */ React.createElement("div", { className: `animate-spin rounded-full border-b-2 border-green-web ${getSizeClasses()}`, __self: this, __source: {
150
- fileName: _jsxFileName,
151
- lineNumber: 173,
152
- columnNumber: 7
153
- } }), /* @__PURE__ */ React.createElement("h3", { className: "mt-4 text-sm font-medium text-gray-900", __self: this, __source: {
154
- fileName: _jsxFileName,
155
- lineNumber: 174,
156
- columnNumber: 7
157
- } }, title), message && /* @__PURE__ */ React.createElement("p", { className: "mt-1 text-sm text-gray-500", __self: this, __source: {
158
- fileName: _jsxFileName,
159
- lineNumber: 176,
160
- columnNumber: 9
161
- } }, message));
111
+ return /* @__PURE__ */ jsxs("div", { className: `flex flex-col items-center justify-center p-8 ${className}`, children: [
112
+ /* @__PURE__ */ jsx("div", { className: `animate-spin rounded-full border-b-2 border-green-web ${getSizeClasses()}` }),
113
+ /* @__PURE__ */ jsx("h3", { className: "mt-4 text-sm font-medium text-gray-900", children: title }),
114
+ message && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-gray-500", children: message })
115
+ ] });
162
116
  }
163
117
  export {
164
118
  AdminEmptyState,
@@ -1,6 +1,5 @@
1
- import React from "react";
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { QuestionMarkCircleIcon, PauseCircleIcon, CheckCircleIcon, XCircleIcon, ExclamationTriangleIcon, ClockIcon } from "@heroicons/react/24/solid";
3
- var _jsxFileName = "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/components/shared/AdminStatusDisplay.tsx";
4
3
  const getStatusConfig = (status) => {
5
4
  const configs = {
6
5
  active: {
@@ -152,38 +151,35 @@ function AdminStatusDisplay({
152
151
  const finalClasses = `${baseClasses} ${interactiveClasses} ${className}`.trim();
153
152
  const renderDot = () => {
154
153
  if (!shouldShowDot) return null;
155
- return /* @__PURE__ */ React.createElement("span", { className: `inline-block rounded-full mr-2 ${config.bgColor.replace("bg-", "bg-").replace("-100", "-400")} ${sizeClasses.dot}`, __self: this, __source: {
156
- fileName: _jsxFileName,
157
- lineNumber: 221,
158
- columnNumber: 7
159
- } });
154
+ return /* @__PURE__ */ jsx("span", { className: `inline-block rounded-full mr-2 ${config.bgColor.replace("bg-", "bg-").replace("-100", "-400")} ${sizeClasses.dot}` });
160
155
  };
161
156
  const renderIcon = () => {
162
157
  if (!shouldShowIcon) return null;
163
- return /* @__PURE__ */ React.createElement(IconComponent, { className: `${sizeClasses.icon} ${displayLabel ? "mr-1.5" : ""}`, __self: this, __source: {
164
- fileName: _jsxFileName,
165
- lineNumber: 229,
166
- columnNumber: 7
167
- } });
158
+ return /* @__PURE__ */ jsx(IconComponent, { className: `${sizeClasses.icon} ${displayLabel ? "mr-1.5" : ""}` });
168
159
  };
169
- const content = /* @__PURE__ */ React.createElement(React.Fragment, null, renderDot(), renderIcon(), displayLabel);
160
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
161
+ renderDot(),
162
+ renderIcon(),
163
+ displayLabel
164
+ ] });
170
165
  const handleClick = () => {
171
166
  if (onClick) {
172
167
  onClick();
173
168
  }
174
169
  };
175
170
  if (isClickable) {
176
- return /* @__PURE__ */ React.createElement("button", { type: "button", onClick: handleClick, className: finalClasses, title: tooltip, __self: this, __source: {
177
- fileName: _jsxFileName,
178
- lineNumber: 249,
179
- columnNumber: 7
180
- } }, content);
171
+ return /* @__PURE__ */ jsx(
172
+ "button",
173
+ {
174
+ type: "button",
175
+ onClick: handleClick,
176
+ className: finalClasses,
177
+ title: tooltip,
178
+ children: content
179
+ }
180
+ );
181
181
  }
182
- return /* @__PURE__ */ React.createElement("span", { className: finalClasses, title: tooltip, __self: this, __source: {
183
- fileName: _jsxFileName,
184
- lineNumber: 261,
185
- columnNumber: 5
186
- } }, content);
182
+ return /* @__PURE__ */ jsx("span", { className: finalClasses, title: tooltip, children: content });
187
183
  }
188
184
  function AdminUserStatus({
189
185
  status,
@@ -195,19 +191,16 @@ function AdminUserStatus({
195
191
  const sizeClasses = getSizeClasses(size);
196
192
  const dotSizeClass = sizeClasses.dot;
197
193
  const textSizeClass = showLabel ? sizeClasses.text : "";
198
- return /* @__PURE__ */ React.createElement("div", { className: `inline-flex items-center ${className}`, __self: this, __source: {
199
- fileName: _jsxFileName,
200
- lineNumber: 280,
201
- columnNumber: 5
202
- } }, /* @__PURE__ */ React.createElement("span", { className: `inline-block rounded-full ${config.color} ${dotSizeClass}`, "aria-label": config.label, __self: this, __source: {
203
- fileName: _jsxFileName,
204
- lineNumber: 281,
205
- columnNumber: 7
206
- } }), showLabel && /* @__PURE__ */ React.createElement("span", { className: `ml-2 text-gray-700 ${textSizeClass}`, __self: this, __source: {
207
- fileName: _jsxFileName,
208
- lineNumber: 286,
209
- columnNumber: 9
210
- } }, config.label));
194
+ return /* @__PURE__ */ jsxs("div", { className: `inline-flex items-center ${className}`, children: [
195
+ /* @__PURE__ */ jsx(
196
+ "span",
197
+ {
198
+ className: `inline-block rounded-full ${config.color} ${dotSizeClass}`,
199
+ "aria-label": config.label
200
+ }
201
+ ),
202
+ showLabel && /* @__PURE__ */ jsx("span", { className: `ml-2 text-gray-700 ${textSizeClass}`, children: config.label })
203
+ ] });
211
204
  }
212
205
  export {
213
206
  AdminStatusDisplay,
@@ -1,5 +1,5 @@
1
- import React, { createContext, useMemo, useContext } from "react";
2
- var _jsxFileName = "/Users/justinhandley/IdeaProjects/nestled_template/libs/data-browser/src/lib/context/AdminDataContext.tsx";
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { createContext, useMemo, useContext } from "react";
3
3
  const AdminDataContext = createContext(null);
4
4
  function AdminDataProvider({
5
5
  children,
@@ -8,22 +8,18 @@ function AdminDataProvider({
8
8
  basePath = "/admin/data",
9
9
  formTheme
10
10
  }) {
11
- const value = useMemo(() => ({
12
- sdk,
13
- databaseModels,
14
- basePath,
15
- formTheme
16
- }), [sdk, databaseModels, basePath, formTheme]);
17
- return /* @__PURE__ */ React.createElement(AdminDataContext.Provider, { value, __self: this, __source: {
18
- fileName: _jsxFileName,
19
- lineNumber: 60,
20
- columnNumber: 5
21
- } }, children);
11
+ const value = useMemo(
12
+ () => ({ sdk, databaseModels, basePath, formTheme }),
13
+ [sdk, databaseModels, basePath, formTheme]
14
+ );
15
+ return /* @__PURE__ */ jsx(AdminDataContext.Provider, { value, children });
22
16
  }
23
17
  function useAdminDataContext() {
24
18
  const context = useContext(AdminDataContext);
25
19
  if (!context) {
26
- throw new Error("useAdminDataContext must be used within AdminDataProvider. Make sure to wrap your admin data routes with <AdminDataProvider>.");
20
+ throw new Error(
21
+ "useAdminDataContext must be used within AdminDataProvider. Make sure to wrap your admin data routes with <AdminDataProvider>."
22
+ );
27
23
  }
28
24
  return context;
29
25
  }