@uipath/apollo-wind 0.9.0 → 0.10.0-pr257.2a4b17b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/dist/components/forms/field-renderer.cjs +120 -69
  2. package/dist/components/forms/field-renderer.js +120 -69
  3. package/dist/components/forms/form-designer.cjs +2352 -1488
  4. package/dist/components/forms/form-designer.js +2353 -1489
  5. package/dist/components/forms/form-examples.cjs +10 -10
  6. package/dist/components/forms/form-examples.js +10 -10
  7. package/dist/components/forms/form-state-viewer.cjs +988 -433
  8. package/dist/components/forms/form-state-viewer.js +988 -433
  9. package/dist/components/forms/metadata-form.cjs +446 -170
  10. package/dist/components/forms/metadata-form.js +446 -170
  11. package/dist/components/forms/schema-viewer.cjs +173 -80
  12. package/dist/components/forms/schema-viewer.js +173 -80
  13. package/dist/components/ui/accordion.cjs +131 -27
  14. package/dist/components/ui/accordion.js +131 -27
  15. package/dist/components/ui/alert-dialog.cjs +273 -45
  16. package/dist/components/ui/alert-dialog.js +273 -45
  17. package/dist/components/ui/alert.cjs +106 -17
  18. package/dist/components/ui/alert.js +106 -17
  19. package/dist/components/ui/avatar.cjs +100 -15
  20. package/dist/components/ui/avatar.js +100 -15
  21. package/dist/components/ui/badge.cjs +36 -6
  22. package/dist/components/ui/badge.js +36 -6
  23. package/dist/components/ui/breadcrumb.cjs +258 -52
  24. package/dist/components/ui/breadcrumb.js +258 -52
  25. package/dist/components/ui/button-group.cjs +119 -19
  26. package/dist/components/ui/button-group.js +119 -19
  27. package/dist/components/ui/button.cjs +48 -8
  28. package/dist/components/ui/button.js +48 -8
  29. package/dist/components/ui/calendar.cjs +88 -30
  30. package/dist/components/ui/calendar.js +88 -30
  31. package/dist/components/ui/card.cjs +199 -30
  32. package/dist/components/ui/card.js +199 -30
  33. package/dist/components/ui/checkbox.cjs +42 -8
  34. package/dist/components/ui/checkbox.js +42 -8
  35. package/dist/components/ui/combobox.cjs +150 -53
  36. package/dist/components/ui/combobox.js +150 -53
  37. package/dist/components/ui/command.cjs +291 -53
  38. package/dist/components/ui/command.js +291 -53
  39. package/dist/components/ui/context-menu.cjs +370 -72
  40. package/dist/components/ui/context-menu.js +370 -72
  41. package/dist/components/ui/data-table.cjs +76 -39
  42. package/dist/components/ui/data-table.js +76 -39
  43. package/dist/components/ui/date-picker.cjs +179 -68
  44. package/dist/components/ui/date-picker.js +179 -68
  45. package/dist/components/ui/datetime-picker.cjs +225 -104
  46. package/dist/components/ui/datetime-picker.js +225 -104
  47. package/dist/components/ui/dialog.cjs +290 -78
  48. package/dist/components/ui/dialog.js +290 -78
  49. package/dist/components/ui/drawer.cjs +220 -39
  50. package/dist/components/ui/drawer.js +220 -39
  51. package/dist/components/ui/dropdown-menu.cjs +376 -73
  52. package/dist/components/ui/dropdown-menu.js +376 -73
  53. package/dist/components/ui/editable-cell.cjs +106 -42
  54. package/dist/components/ui/editable-cell.js +106 -42
  55. package/dist/components/ui/empty-state.cjs +106 -33
  56. package/dist/components/ui/empty-state.js +106 -33
  57. package/dist/components/ui/file-upload.cjs +405 -187
  58. package/dist/components/ui/file-upload.d.ts +3 -1
  59. package/dist/components/ui/file-upload.js +405 -187
  60. package/dist/components/ui/hover-card.cjs +46 -7
  61. package/dist/components/ui/hover-card.js +46 -7
  62. package/dist/components/ui/index.cjs +4 -4
  63. package/dist/components/ui/input.cjs +39 -6
  64. package/dist/components/ui/input.js +39 -6
  65. package/dist/components/ui/label.cjs +34 -5
  66. package/dist/components/ui/label.js +34 -5
  67. package/dist/components/ui/layout/column.cjs +209 -41
  68. package/dist/components/ui/layout/column.js +209 -41
  69. package/dist/components/ui/layout/grid.cjs +275 -60
  70. package/dist/components/ui/layout/grid.js +275 -60
  71. package/dist/components/ui/layout/row.cjs +209 -41
  72. package/dist/components/ui/layout/row.js +209 -41
  73. package/dist/components/ui/menubar.cjs +540 -106
  74. package/dist/components/ui/menubar.js +540 -106
  75. package/dist/components/ui/multi-select.cjs +289 -135
  76. package/dist/components/ui/multi-select.js +289 -135
  77. package/dist/components/ui/navigation-menu.cjs +244 -47
  78. package/dist/components/ui/navigation-menu.js +244 -47
  79. package/dist/components/ui/pagination.cjs +301 -65
  80. package/dist/components/ui/pagination.js +301 -65
  81. package/dist/components/ui/popover.cjs +48 -9
  82. package/dist/components/ui/popover.js +48 -9
  83. package/dist/components/ui/progress.cjs +48 -8
  84. package/dist/components/ui/progress.js +48 -8
  85. package/dist/components/ui/radio-group.cjs +74 -12
  86. package/dist/components/ui/radio-group.js +74 -12
  87. package/dist/components/ui/resizable.cjs +75 -10
  88. package/dist/components/ui/resizable.js +75 -10
  89. package/dist/components/ui/scroll-area.cjs +113 -21
  90. package/dist/components/ui/scroll-area.js +113 -21
  91. package/dist/components/ui/search.cjs +280 -98
  92. package/dist/components/ui/search.js +280 -98
  93. package/dist/components/ui/select.cjs +334 -68
  94. package/dist/components/ui/select.js +334 -68
  95. package/dist/components/ui/separator.cjs +48 -7
  96. package/dist/components/ui/separator.js +48 -7
  97. package/dist/components/ui/sheet.cjs +236 -50
  98. package/dist/components/ui/sheet.js +236 -50
  99. package/dist/components/ui/skeleton.cjs +31 -5
  100. package/dist/components/ui/skeleton.js +31 -5
  101. package/dist/components/ui/slider.cjs +71 -21
  102. package/dist/components/ui/slider.js +71 -21
  103. package/dist/components/ui/sonner.cjs +43 -15
  104. package/dist/components/ui/sonner.js +43 -15
  105. package/dist/components/ui/spinner.cjs +83 -21
  106. package/dist/components/ui/spinner.js +83 -21
  107. package/dist/components/ui/stats-card.cjs +169 -60
  108. package/dist/components/ui/stats-card.js +169 -60
  109. package/dist/components/ui/stepper.cjs +126 -57
  110. package/dist/components/ui/stepper.js +126 -57
  111. package/dist/components/ui/switch.cjs +42 -8
  112. package/dist/components/ui/switch.js +42 -8
  113. package/dist/components/ui/table.cjs +267 -42
  114. package/dist/components/ui/table.js +267 -42
  115. package/dist/components/ui/tabs.cjs +100 -15
  116. package/dist/components/ui/tabs.js +100 -15
  117. package/dist/components/ui/textarea.cjs +34 -5
  118. package/dist/components/ui/textarea.js +34 -5
  119. package/dist/components/ui/toggle-group.cjs +112 -19
  120. package/dist/components/ui/toggle-group.js +112 -19
  121. package/dist/components/ui/toggle.cjs +43 -6
  122. package/dist/components/ui/toggle.js +43 -6
  123. package/dist/components/ui/tooltip.cjs +40 -6
  124. package/dist/components/ui/tooltip.js +40 -6
  125. package/dist/examples/admin-layout-example.cjs +879 -347
  126. package/dist/examples/admin-layout-example.js +879 -347
  127. package/dist/examples/app-shell-example.cjs +14 -14
  128. package/dist/examples/app-shell-example.js +14 -14
  129. package/dist/examples/dashboard-example.cjs +495 -334
  130. package/dist/examples/dashboard-example.js +495 -334
  131. package/dist/examples/data-management-example.cjs +501 -303
  132. package/dist/examples/data-management-example.js +502 -304
  133. package/dist/examples/flow-editor-layout-example.cjs +435 -231
  134. package/dist/examples/flow-editor-layout-example.js +436 -232
  135. package/dist/examples/flow-start-example.cjs +508 -251
  136. package/dist/examples/flow-start-example.js +509 -252
  137. package/dist/examples/form-builder-example.cjs +1006 -602
  138. package/dist/examples/form-builder-example.js +1007 -603
  139. package/dist/examples/new-project-example.cjs +806 -474
  140. package/dist/examples/new-project-example.js +807 -475
  141. package/dist/examples/settings-example.cjs +792 -704
  142. package/dist/examples/settings-example.js +792 -704
  143. package/dist/examples/vscode-example.cjs +731 -236
  144. package/dist/examples/vscode-example.js +731 -236
  145. package/package.json +4 -1
@@ -42,6 +42,7 @@ __webpack_require__.d(__webpack_exports__, {
42
42
  AdminBreadcrumb: ()=>AdminBreadcrumb
43
43
  });
44
44
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
45
+ const compiler_runtime_namespaceObject = require("react/compiler-runtime");
45
46
  const external_react_namespaceObject = require("react");
46
47
  const index_cjs_namespaceObject = require("../lib/index.cjs");
47
48
  const external_lucide_react_namespaceObject = require("lucide-react");
@@ -53,135 +54,355 @@ const breadcrumb_cjs_namespaceObject = require("../components/ui/breadcrumb.cjs"
53
54
  const data_table_cjs_namespaceObject = require("../components/ui/data-table.cjs");
54
55
  const pagination_cjs_namespaceObject = require("../components/ui/pagination.cjs");
55
56
  const layout_index_cjs_namespaceObject = require("../components/ui/layout/index.cjs");
56
- function AdminLayout({ className, children, ...props }) {
57
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
58
- className: (0, index_cjs_namespaceObject.cn)('flex h-[700px] w-full flex-col overflow-hidden rounded-lg border bg-background', className),
59
- ...props,
60
- children: children
61
- });
57
+ function AdminLayout(t0) {
58
+ const $ = (0, compiler_runtime_namespaceObject.c)(10);
59
+ let children;
60
+ let className;
61
+ let props;
62
+ if ($[0] !== t0) {
63
+ ({ className, children, ...props } = t0);
64
+ $[0] = t0;
65
+ $[1] = children;
66
+ $[2] = className;
67
+ $[3] = props;
68
+ } else {
69
+ children = $[1];
70
+ className = $[2];
71
+ props = $[3];
72
+ }
73
+ let t1;
74
+ if ($[4] !== className) {
75
+ t1 = (0, index_cjs_namespaceObject.cn)("flex h-[700px] w-full flex-col overflow-hidden rounded-lg border bg-background", className);
76
+ $[4] = className;
77
+ $[5] = t1;
78
+ } else t1 = $[5];
79
+ let t2;
80
+ if ($[6] !== children || $[7] !== props || $[8] !== t1) {
81
+ t2 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
82
+ className: t1,
83
+ ...props,
84
+ children: children
85
+ });
86
+ $[6] = children;
87
+ $[7] = props;
88
+ $[8] = t1;
89
+ $[9] = t2;
90
+ } else t2 = $[9];
91
+ return t2;
62
92
  }
63
- function AdminHeader({ className, logo, title, children, ...props }) {
64
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("header", {
65
- className: (0, index_cjs_namespaceObject.cn)('flex h-14 items-center justify-between border-b bg-background px-4', className),
66
- ...props,
67
- children: [
68
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
69
- gap: 3,
70
- align: "center",
71
- children: [
72
- logo,
73
- title && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
74
- className: "text-lg font-semibold",
75
- children: title
76
- })
77
- ]
78
- }),
79
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_index_cjs_namespaceObject.Row, {
80
- gap: 2,
81
- align: "center",
82
- children: children
83
- })
84
- ]
85
- });
93
+ function AdminHeader(t0) {
94
+ const $ = (0, compiler_runtime_namespaceObject.c)(20);
95
+ let children;
96
+ let className;
97
+ let logo;
98
+ let props;
99
+ let title;
100
+ if ($[0] !== t0) {
101
+ ({ className, logo, title, children, ...props } = t0);
102
+ $[0] = t0;
103
+ $[1] = children;
104
+ $[2] = className;
105
+ $[3] = logo;
106
+ $[4] = props;
107
+ $[5] = title;
108
+ } else {
109
+ children = $[1];
110
+ className = $[2];
111
+ logo = $[3];
112
+ props = $[4];
113
+ title = $[5];
114
+ }
115
+ let t1;
116
+ if ($[6] !== className) {
117
+ t1 = (0, index_cjs_namespaceObject.cn)("flex h-14 items-center justify-between border-b bg-background px-4", className);
118
+ $[6] = className;
119
+ $[7] = t1;
120
+ } else t1 = $[7];
121
+ let t2;
122
+ if ($[8] !== title) {
123
+ t2 = title && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
124
+ className: "text-lg font-semibold",
125
+ children: title
126
+ });
127
+ $[8] = title;
128
+ $[9] = t2;
129
+ } else t2 = $[9];
130
+ let t3;
131
+ if ($[10] !== logo || $[11] !== t2) {
132
+ t3 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
133
+ gap: 3,
134
+ align: "center",
135
+ children: [
136
+ logo,
137
+ t2
138
+ ]
139
+ });
140
+ $[10] = logo;
141
+ $[11] = t2;
142
+ $[12] = t3;
143
+ } else t3 = $[12];
144
+ let t4;
145
+ if ($[13] !== children) {
146
+ t4 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_index_cjs_namespaceObject.Row, {
147
+ gap: 2,
148
+ align: "center",
149
+ children: children
150
+ });
151
+ $[13] = children;
152
+ $[14] = t4;
153
+ } else t4 = $[14];
154
+ let t5;
155
+ if ($[15] !== props || $[16] !== t1 || $[17] !== t3 || $[18] !== t4) {
156
+ t5 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("header", {
157
+ className: t1,
158
+ ...props,
159
+ children: [
160
+ t3,
161
+ t4
162
+ ]
163
+ });
164
+ $[15] = props;
165
+ $[16] = t1;
166
+ $[17] = t3;
167
+ $[18] = t4;
168
+ $[19] = t5;
169
+ } else t5 = $[19];
170
+ return t5;
86
171
  }
87
- function AdminHeaderActions({ notifications, avatar }) {
88
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
89
- gap: 1,
90
- align: "center",
91
- children: [
92
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(button_cjs_namespaceObject.Button, {
93
- variant: "ghost",
94
- size: "icon",
95
- className: "relative",
96
- children: [
97
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Bell, {
98
- className: "h-5 w-5"
99
- }),
100
- notifications && notifications > 0 && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
101
- className: "absolute -right-0.5 -top-0.5 flex h-4 w-4 items-center justify-center rounded-full bg-destructive text-[10px] text-destructive-foreground",
102
- children: notifications
103
- })
104
- ]
105
- }),
106
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
107
- variant: "ghost",
108
- size: "icon",
109
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.HelpCircle, {
110
- className: "h-5 w-5"
111
- })
112
- }),
113
- avatar || /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
114
- className: "ml-2 flex h-8 w-8 items-center justify-center rounded-full bg-primary text-xs font-medium text-primary-foreground",
115
- children: "SN"
172
+ function AdminHeaderActions(t0) {
173
+ const $ = (0, compiler_runtime_namespaceObject.c)(11);
174
+ const { notifications, avatar } = t0;
175
+ let t1;
176
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
177
+ t1 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Bell, {
178
+ className: "h-5 w-5"
179
+ });
180
+ $[0] = t1;
181
+ } else t1 = $[0];
182
+ let t2;
183
+ if ($[1] !== notifications) {
184
+ t2 = notifications && notifications > 0 && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
185
+ className: "absolute -right-0.5 -top-0.5 flex h-4 w-4 items-center justify-center rounded-full bg-destructive text-[10px] text-destructive-foreground",
186
+ children: notifications
187
+ });
188
+ $[1] = notifications;
189
+ $[2] = t2;
190
+ } else t2 = $[2];
191
+ let t3;
192
+ if ($[3] !== t2) {
193
+ t3 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(button_cjs_namespaceObject.Button, {
194
+ variant: "ghost",
195
+ size: "icon",
196
+ className: "relative",
197
+ children: [
198
+ t1,
199
+ t2
200
+ ]
201
+ });
202
+ $[3] = t2;
203
+ $[4] = t3;
204
+ } else t3 = $[4];
205
+ let t4;
206
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
207
+ t4 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
208
+ variant: "ghost",
209
+ size: "icon",
210
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.HelpCircle, {
211
+ className: "h-5 w-5"
116
212
  })
117
- ]
118
- });
213
+ });
214
+ $[5] = t4;
215
+ } else t4 = $[5];
216
+ let t5;
217
+ if ($[6] !== avatar) {
218
+ t5 = avatar || /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
219
+ className: "ml-2 flex h-8 w-8 items-center justify-center rounded-full bg-primary text-xs font-medium text-primary-foreground",
220
+ children: "SN"
221
+ });
222
+ $[6] = avatar;
223
+ $[7] = t5;
224
+ } else t5 = $[7];
225
+ let t6;
226
+ if ($[8] !== t3 || $[9] !== t5) {
227
+ t6 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
228
+ gap: 1,
229
+ align: "center",
230
+ children: [
231
+ t3,
232
+ t4,
233
+ t5
234
+ ]
235
+ });
236
+ $[8] = t3;
237
+ $[9] = t5;
238
+ $[10] = t6;
239
+ } else t6 = $[10];
240
+ return t6;
119
241
  }
120
- function AdminContent({ className, children, ...props }) {
121
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_index_cjs_namespaceObject.Row, {
122
- flex: 1,
123
- overflow: "hidden",
124
- className: className,
125
- ...props,
126
- children: children
127
- });
242
+ function AdminContent(t0) {
243
+ const $ = (0, compiler_runtime_namespaceObject.c)(8);
244
+ let children;
245
+ let className;
246
+ let props;
247
+ if ($[0] !== t0) {
248
+ ({ className, children, ...props } = t0);
249
+ $[0] = t0;
250
+ $[1] = children;
251
+ $[2] = className;
252
+ $[3] = props;
253
+ } else {
254
+ children = $[1];
255
+ className = $[2];
256
+ props = $[3];
257
+ }
258
+ let t1;
259
+ if ($[4] !== children || $[5] !== className || $[6] !== props) {
260
+ t1 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_index_cjs_namespaceObject.Row, {
261
+ flex: 1,
262
+ overflow: "hidden",
263
+ className: className,
264
+ ...props,
265
+ children: children
266
+ });
267
+ $[4] = children;
268
+ $[5] = className;
269
+ $[6] = props;
270
+ $[7] = t1;
271
+ } else t1 = $[7];
272
+ return t1;
128
273
  }
129
- function AdminSidebar({ className, children, width = 280, ...props }) {
130
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_index_cjs_namespaceObject.Column, {
131
- className: (0, index_cjs_namespaceObject.cn)('border-r bg-muted/30', className),
132
- style: {
274
+ function AdminSidebar(t0) {
275
+ const $ = (0, compiler_runtime_namespaceObject.c)(14);
276
+ let children;
277
+ let className;
278
+ let props;
279
+ let t1;
280
+ if ($[0] !== t0) {
281
+ ({ className, children, width: t1, ...props } = t0);
282
+ $[0] = t0;
283
+ $[1] = children;
284
+ $[2] = className;
285
+ $[3] = props;
286
+ $[4] = t1;
287
+ } else {
288
+ children = $[1];
289
+ className = $[2];
290
+ props = $[3];
291
+ t1 = $[4];
292
+ }
293
+ const width = void 0 === t1 ? 280 : t1;
294
+ let t2;
295
+ if ($[5] !== className) {
296
+ t2 = (0, index_cjs_namespaceObject.cn)("border-r bg-muted/30", className);
297
+ $[5] = className;
298
+ $[6] = t2;
299
+ } else t2 = $[6];
300
+ let t3;
301
+ if ($[7] !== width) {
302
+ t3 = {
133
303
  width
134
- },
135
- ...props,
136
- children: children
137
- });
304
+ };
305
+ $[7] = width;
306
+ $[8] = t3;
307
+ } else t3 = $[8];
308
+ let t4;
309
+ if ($[9] !== children || $[10] !== props || $[11] !== t2 || $[12] !== t3) {
310
+ t4 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_index_cjs_namespaceObject.Column, {
311
+ className: t2,
312
+ style: t3,
313
+ ...props,
314
+ children: children
315
+ });
316
+ $[9] = children;
317
+ $[10] = props;
318
+ $[11] = t2;
319
+ $[12] = t3;
320
+ $[13] = t4;
321
+ } else t4 = $[13];
322
+ return t4;
138
323
  }
139
- function AdminSidebarHeader({ title, onSearch, onAdd }) {
140
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
141
- justify: "between",
142
- align: "center",
143
- className: "border-b px-4 py-3",
144
- children: [
145
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
146
- className: "text-sm font-medium",
147
- children: title
148
- }),
149
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
150
- gap: 1,
151
- align: "center",
152
- children: [
153
- onSearch && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
154
- variant: "ghost",
155
- size: "icon",
156
- className: "h-7 w-7",
157
- onClick: onSearch,
158
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Search, {
159
- className: "h-4 w-4"
160
- })
161
- }),
162
- onAdd && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
163
- variant: "ghost",
164
- size: "icon",
165
- className: "h-7 w-7",
166
- onClick: onAdd,
167
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Plus, {
168
- className: "h-4 w-4"
169
- })
170
- })
171
- ]
324
+ function AdminSidebarHeader(t0) {
325
+ const $ = (0, compiler_runtime_namespaceObject.c)(12);
326
+ const { title, onSearch, onAdd } = t0;
327
+ let t1;
328
+ if ($[0] !== title) {
329
+ t1 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
330
+ className: "text-sm font-medium",
331
+ children: title
332
+ });
333
+ $[0] = title;
334
+ $[1] = t1;
335
+ } else t1 = $[1];
336
+ let t2;
337
+ if ($[2] !== onSearch) {
338
+ t2 = onSearch && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
339
+ variant: "ghost",
340
+ size: "icon",
341
+ className: "h-7 w-7",
342
+ onClick: onSearch,
343
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Search, {
344
+ className: "h-4 w-4"
345
+ })
346
+ });
347
+ $[2] = onSearch;
348
+ $[3] = t2;
349
+ } else t2 = $[3];
350
+ let t3;
351
+ if ($[4] !== onAdd) {
352
+ t3 = onAdd && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
353
+ variant: "ghost",
354
+ size: "icon",
355
+ className: "h-7 w-7",
356
+ onClick: onAdd,
357
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Plus, {
358
+ className: "h-4 w-4"
172
359
  })
173
- ]
174
- });
360
+ });
361
+ $[4] = onAdd;
362
+ $[5] = t3;
363
+ } else t3 = $[5];
364
+ let t4;
365
+ if ($[6] !== t2 || $[7] !== t3) {
366
+ t4 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
367
+ gap: 1,
368
+ align: "center",
369
+ children: [
370
+ t2,
371
+ t3
372
+ ]
373
+ });
374
+ $[6] = t2;
375
+ $[7] = t3;
376
+ $[8] = t4;
377
+ } else t4 = $[8];
378
+ let t5;
379
+ if ($[9] !== t1 || $[10] !== t4) {
380
+ t5 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
381
+ justify: "between",
382
+ align: "center",
383
+ className: "border-b px-4 py-3",
384
+ children: [
385
+ t1,
386
+ t4
387
+ ]
388
+ });
389
+ $[9] = t1;
390
+ $[10] = t4;
391
+ $[11] = t5;
392
+ } else t5 = $[11];
393
+ return t5;
175
394
  }
176
- function AdminSidebarNav({ items, selectedId, onSelect }) {
177
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(scroll_area_cjs_namespaceObject.ScrollArea, {
178
- className: "flex-1",
179
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("nav", {
180
- className: "p-2",
181
- children: items.map((item)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
395
+ function AdminSidebarNav(t0) {
396
+ const $ = (0, compiler_runtime_namespaceObject.c)(9);
397
+ const { items, selectedId, onSelect } = t0;
398
+ let t1;
399
+ if ($[0] !== items || $[1] !== onSelect || $[2] !== selectedId) {
400
+ let t2;
401
+ if ($[4] !== onSelect || $[5] !== selectedId) {
402
+ t2 = (item)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
182
403
  gap: 2,
183
404
  align: "center",
184
- className: (0, index_cjs_namespaceObject.cn)('cursor-pointer rounded-md px-3 py-2 text-sm transition-colors', selectedId === item.id ? 'bg-primary/10 text-primary' : 'text-muted-foreground hover:bg-muted hover:text-foreground'),
405
+ className: (0, index_cjs_namespaceObject.cn)("cursor-pointer rounded-md px-3 py-2 text-sm transition-colors", selectedId === item.id ? "bg-primary/10 text-primary" : "text-muted-foreground hover:bg-muted hover:text-foreground"),
185
406
  onClick: ()=>onSelect?.(item.id),
186
407
  children: [
187
408
  item.icon,
@@ -191,265 +412,576 @@ function AdminSidebarNav({ items, selectedId, onSelect }) {
191
412
  }),
192
413
  item.badge
193
414
  ]
194
- }, item.id))
195
- })
196
- });
415
+ }, item.id);
416
+ $[4] = onSelect;
417
+ $[5] = selectedId;
418
+ $[6] = t2;
419
+ } else t2 = $[6];
420
+ t1 = items.map(t2);
421
+ $[0] = items;
422
+ $[1] = onSelect;
423
+ $[2] = selectedId;
424
+ $[3] = t1;
425
+ } else t1 = $[3];
426
+ let t2;
427
+ if ($[7] !== t1) {
428
+ t2 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(scroll_area_cjs_namespaceObject.ScrollArea, {
429
+ className: "flex-1",
430
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("nav", {
431
+ className: "p-2",
432
+ children: t1
433
+ })
434
+ });
435
+ $[7] = t1;
436
+ $[8] = t2;
437
+ } else t2 = $[8];
438
+ return t2;
197
439
  }
198
- function AdminMain({ className, children, ...props }) {
199
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_index_cjs_namespaceObject.Column, {
200
- flex: 1,
201
- overflow: "hidden",
202
- className: className,
203
- ...props,
204
- children: children
205
- });
440
+ function AdminMain(t0) {
441
+ const $ = (0, compiler_runtime_namespaceObject.c)(8);
442
+ let children;
443
+ let className;
444
+ let props;
445
+ if ($[0] !== t0) {
446
+ ({ className, children, ...props } = t0);
447
+ $[0] = t0;
448
+ $[1] = children;
449
+ $[2] = className;
450
+ $[3] = props;
451
+ } else {
452
+ children = $[1];
453
+ className = $[2];
454
+ props = $[3];
455
+ }
456
+ let t1;
457
+ if ($[4] !== children || $[5] !== className || $[6] !== props) {
458
+ t1 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_index_cjs_namespaceObject.Column, {
459
+ flex: 1,
460
+ overflow: "hidden",
461
+ className: className,
462
+ ...props,
463
+ children: children
464
+ });
465
+ $[4] = children;
466
+ $[5] = className;
467
+ $[6] = props;
468
+ $[7] = t1;
469
+ } else t1 = $[7];
470
+ return t1;
206
471
  }
207
- function AdminBreadcrumb({ items }) {
208
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(breadcrumb_cjs_namespaceObject.Breadcrumb, {
209
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(breadcrumb_cjs_namespaceObject.BreadcrumbList, {
210
- children: items.map((item, index)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_react_namespaceObject.Fragment, {
472
+ function AdminBreadcrumb(t0) {
473
+ const $ = (0, compiler_runtime_namespaceObject.c)(6);
474
+ const { items } = t0;
475
+ let t1;
476
+ if ($[0] !== items) {
477
+ let t2;
478
+ if ($[2] !== items.length) {
479
+ t2 = (item, index)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_react_namespaceObject.Fragment, {
211
480
  children: [
212
481
  index > 0 && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(breadcrumb_cjs_namespaceObject.BreadcrumbSeparator, {}),
213
482
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(breadcrumb_cjs_namespaceObject.BreadcrumbItem, {
214
483
  children: index === items.length - 1 ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(breadcrumb_cjs_namespaceObject.BreadcrumbPage, {
215
484
  children: item.label
216
485
  }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(breadcrumb_cjs_namespaceObject.BreadcrumbLink, {
217
- href: item.href || '#',
486
+ href: item.href || "#",
218
487
  children: item.label
219
488
  })
220
489
  })
221
490
  ]
222
- }, item.label))
223
- })
224
- });
225
- }
226
- function AdminPageHeader({ title, breadcrumb, actions, tabs, activeTab, onTabChange }) {
227
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
228
- className: "border-b px-6 py-4",
229
- children: [
230
- breadcrumb && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
231
- className: "mb-2",
232
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(AdminBreadcrumb, {
233
- items: breadcrumb
234
- })
235
- }),
236
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
237
- justify: "between",
238
- align: "center",
239
- children: [
240
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("h1", {
241
- className: "text-xl font-semibold",
242
- children: title
243
- }),
244
- actions && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_index_cjs_namespaceObject.Row, {
245
- gap: 2,
246
- align: "center",
247
- children: actions
248
- })
249
- ]
250
- }),
251
- tabs && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tabs_cjs_namespaceObject.Tabs, {
252
- value: activeTab,
253
- onValueChange: onTabChange,
254
- className: "mt-4",
255
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tabs_cjs_namespaceObject.TabsList, {
256
- className: "h-auto bg-transparent p-0",
257
- children: tabs.map((tab)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tabs_cjs_namespaceObject.TabsTrigger, {
258
- value: tab.value,
259
- className: "rounded-none border-b-2 border-transparent px-4 pb-2 pt-1 data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none",
260
- children: tab.label
261
- }, tab.value))
262
- })
491
+ }, item.label);
492
+ $[2] = items.length;
493
+ $[3] = t2;
494
+ } else t2 = $[3];
495
+ t1 = items.map(t2);
496
+ $[0] = items;
497
+ $[1] = t1;
498
+ } else t1 = $[1];
499
+ let t2;
500
+ if ($[4] !== t1) {
501
+ t2 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(breadcrumb_cjs_namespaceObject.Breadcrumb, {
502
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(breadcrumb_cjs_namespaceObject.BreadcrumbList, {
503
+ children: t1
263
504
  })
264
- ]
265
- });
505
+ });
506
+ $[4] = t1;
507
+ $[5] = t2;
508
+ } else t2 = $[5];
509
+ return t2;
266
510
  }
267
- function AdminToolbar({ children, actions }) {
268
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
269
- justify: "between",
270
- align: "center",
271
- className: "border-b px-6 py-3",
272
- children: [
273
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_index_cjs_namespaceObject.Row, {
274
- gap: 3,
275
- align: "center",
276
- children: children
277
- }),
278
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_index_cjs_namespaceObject.Row, {
279
- gap: 2,
280
- align: "center",
281
- children: actions
511
+ function AdminPageHeader(t0) {
512
+ const $ = (0, compiler_runtime_namespaceObject.c)(17);
513
+ const { title, breadcrumb, actions, tabs, activeTab, onTabChange } = t0;
514
+ let t1;
515
+ if ($[0] !== breadcrumb) {
516
+ t1 = breadcrumb && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
517
+ className: "mb-2",
518
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(AdminBreadcrumb, {
519
+ items: breadcrumb
282
520
  })
283
- ]
284
- });
285
- }
286
- function AdminFilter({ label, value, options, onValueChange }) {
287
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
288
- gap: 1.5,
289
- align: "center",
290
- className: "text-sm",
291
- children: [
292
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
293
- className: "text-muted-foreground",
294
- children: [
295
- label,
296
- ":"
297
- ]
298
- }),
299
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(select_cjs_namespaceObject.Select, {
300
- value: value,
301
- onValueChange: onValueChange,
302
- children: [
303
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectTrigger, {
304
- className: "h-7 w-auto gap-1 border-0 bg-transparent px-1 font-medium shadow-none",
305
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectValue, {})
306
- }),
307
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectContent, {
308
- children: options.map((option)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectItem, {
309
- value: option.value,
310
- children: option.label
311
- }, option.value))
312
- })
313
- ]
521
+ });
522
+ $[0] = breadcrumb;
523
+ $[1] = t1;
524
+ } else t1 = $[1];
525
+ let t2;
526
+ if ($[2] !== title) {
527
+ t2 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("h1", {
528
+ className: "text-xl font-semibold",
529
+ children: title
530
+ });
531
+ $[2] = title;
532
+ $[3] = t2;
533
+ } else t2 = $[3];
534
+ let t3;
535
+ if ($[4] !== actions) {
536
+ t3 = actions && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_index_cjs_namespaceObject.Row, {
537
+ gap: 2,
538
+ align: "center",
539
+ children: actions
540
+ });
541
+ $[4] = actions;
542
+ $[5] = t3;
543
+ } else t3 = $[5];
544
+ let t4;
545
+ if ($[6] !== t2 || $[7] !== t3) {
546
+ t4 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
547
+ justify: "between",
548
+ align: "center",
549
+ children: [
550
+ t2,
551
+ t3
552
+ ]
553
+ });
554
+ $[6] = t2;
555
+ $[7] = t3;
556
+ $[8] = t4;
557
+ } else t4 = $[8];
558
+ let t5;
559
+ if ($[9] !== activeTab || $[10] !== onTabChange || $[11] !== tabs) {
560
+ t5 = tabs && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tabs_cjs_namespaceObject.Tabs, {
561
+ value: activeTab,
562
+ onValueChange: onTabChange,
563
+ className: "mt-4",
564
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tabs_cjs_namespaceObject.TabsList, {
565
+ className: "h-auto bg-transparent p-0",
566
+ children: tabs.map(_temp)
314
567
  })
315
- ]
316
- });
568
+ });
569
+ $[9] = activeTab;
570
+ $[10] = onTabChange;
571
+ $[11] = tabs;
572
+ $[12] = t5;
573
+ } else t5 = $[12];
574
+ let t6;
575
+ if ($[13] !== t1 || $[14] !== t4 || $[15] !== t5) {
576
+ t6 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
577
+ className: "border-b px-6 py-4",
578
+ children: [
579
+ t1,
580
+ t4,
581
+ t5
582
+ ]
583
+ });
584
+ $[13] = t1;
585
+ $[14] = t4;
586
+ $[15] = t5;
587
+ $[16] = t6;
588
+ } else t6 = $[16];
589
+ return t6;
590
+ }
591
+ function _temp(tab) {
592
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tabs_cjs_namespaceObject.TabsTrigger, {
593
+ value: tab.value,
594
+ className: "rounded-none border-b-2 border-transparent px-4 pb-2 pt-1 data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none",
595
+ children: tab.label
596
+ }, tab.value);
597
+ }
598
+ function AdminToolbar(t0) {
599
+ const $ = (0, compiler_runtime_namespaceObject.c)(7);
600
+ const { children, actions } = t0;
601
+ let t1;
602
+ if ($[0] !== children) {
603
+ t1 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_index_cjs_namespaceObject.Row, {
604
+ gap: 3,
605
+ align: "center",
606
+ children: children
607
+ });
608
+ $[0] = children;
609
+ $[1] = t1;
610
+ } else t1 = $[1];
611
+ let t2;
612
+ if ($[2] !== actions) {
613
+ t2 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(layout_index_cjs_namespaceObject.Row, {
614
+ gap: 2,
615
+ align: "center",
616
+ children: actions
617
+ });
618
+ $[2] = actions;
619
+ $[3] = t2;
620
+ } else t2 = $[3];
621
+ let t3;
622
+ if ($[4] !== t1 || $[5] !== t2) {
623
+ t3 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
624
+ justify: "between",
625
+ align: "center",
626
+ className: "border-b px-6 py-3",
627
+ children: [
628
+ t1,
629
+ t2
630
+ ]
631
+ });
632
+ $[4] = t1;
633
+ $[5] = t2;
634
+ $[6] = t3;
635
+ } else t3 = $[6];
636
+ return t3;
637
+ }
638
+ function AdminFilter(t0) {
639
+ const $ = (0, compiler_runtime_namespaceObject.c)(14);
640
+ const { label, value, options, onValueChange } = t0;
641
+ let t1;
642
+ if ($[0] !== label) {
643
+ t1 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
644
+ className: "text-muted-foreground",
645
+ children: [
646
+ label,
647
+ ":"
648
+ ]
649
+ });
650
+ $[0] = label;
651
+ $[1] = t1;
652
+ } else t1 = $[1];
653
+ let t2;
654
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
655
+ t2 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectTrigger, {
656
+ className: "h-7 w-auto gap-1 border-0 bg-transparent px-1 font-medium shadow-none",
657
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectValue, {})
658
+ });
659
+ $[2] = t2;
660
+ } else t2 = $[2];
661
+ let t3;
662
+ if ($[3] !== options) {
663
+ t3 = options.map(_temp2);
664
+ $[3] = options;
665
+ $[4] = t3;
666
+ } else t3 = $[4];
667
+ let t4;
668
+ if ($[5] !== t3) {
669
+ t4 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectContent, {
670
+ children: t3
671
+ });
672
+ $[5] = t3;
673
+ $[6] = t4;
674
+ } else t4 = $[6];
675
+ let t5;
676
+ if ($[7] !== onValueChange || $[8] !== t4 || $[9] !== value) {
677
+ t5 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(select_cjs_namespaceObject.Select, {
678
+ value: value,
679
+ onValueChange: onValueChange,
680
+ children: [
681
+ t2,
682
+ t4
683
+ ]
684
+ });
685
+ $[7] = onValueChange;
686
+ $[8] = t4;
687
+ $[9] = value;
688
+ $[10] = t5;
689
+ } else t5 = $[10];
690
+ let t6;
691
+ if ($[11] !== t1 || $[12] !== t5) {
692
+ t6 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
693
+ gap: 1.5,
694
+ align: "center",
695
+ className: "text-sm",
696
+ children: [
697
+ t1,
698
+ t5
699
+ ]
700
+ });
701
+ $[11] = t1;
702
+ $[12] = t5;
703
+ $[13] = t6;
704
+ } else t6 = $[13];
705
+ return t6;
317
706
  }
318
- function AdminPagination({ total, page, pageSize, onPageChange, onPageSizeChange }) {
707
+ function _temp2(option) {
708
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectItem, {
709
+ value: option.value,
710
+ children: option.label
711
+ }, option.value);
712
+ }
713
+ function AdminPagination(t0) {
714
+ const $ = (0, compiler_runtime_namespaceObject.c)(56);
715
+ const { total, page, pageSize, onPageChange, onPageSizeChange } = t0;
319
716
  const totalPages = Math.ceil(total / pageSize);
320
717
  const start = (page - 1) * pageSize + 1;
321
718
  const end = Math.min(page * pageSize, total);
322
- const getPageNumbers = ()=>{
323
- const pages = [];
324
- const delta = 1;
325
- for(let i = 1; i <= totalPages; i++)if (1 === i || i === totalPages || i >= page - delta && i <= page + delta) pages.push(i);
326
- return pages;
327
- };
328
- const pageNumbers = getPageNumbers();
329
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
330
- justify: "between",
331
- align: "center",
332
- className: "border-t px-6 py-3",
333
- children: [
334
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
335
- className: "text-sm text-muted-foreground",
719
+ let t1;
720
+ if ($[0] !== page || $[1] !== totalPages) {
721
+ const getPageNumbers = ()=>{
722
+ const pages = [];
723
+ for(let i = 1; i <= totalPages; i++)if (1 === i || i === totalPages || i >= page - 1 && i <= page + 1) pages.push(i);
724
+ return pages;
725
+ };
726
+ t1 = getPageNumbers();
727
+ $[0] = page;
728
+ $[1] = totalPages;
729
+ $[2] = t1;
730
+ } else t1 = $[2];
731
+ const pageNumbers = t1;
732
+ let t2;
733
+ if ($[3] !== end || $[4] !== start || $[5] !== total) {
734
+ t2 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
735
+ className: "text-sm text-muted-foreground",
736
+ children: [
737
+ start,
738
+ " - ",
739
+ end,
740
+ " / ",
741
+ total
742
+ ]
743
+ });
744
+ $[3] = end;
745
+ $[4] = start;
746
+ $[5] = total;
747
+ $[6] = t2;
748
+ } else t2 = $[6];
749
+ const t3 = 1 === page;
750
+ let t4;
751
+ if ($[7] !== onPageChange) {
752
+ t4 = ()=>onPageChange?.(1);
753
+ $[7] = onPageChange;
754
+ $[8] = t4;
755
+ } else t4 = $[8];
756
+ let t5;
757
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
758
+ t5 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronsLeft, {
759
+ className: "h-4 w-4"
760
+ });
761
+ $[9] = t5;
762
+ } else t5 = $[9];
763
+ let t6;
764
+ if ($[10] !== t3 || $[11] !== t4) {
765
+ t6 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationItem, {
766
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
767
+ variant: "ghost",
768
+ size: "icon",
769
+ className: "h-8 w-8",
770
+ disabled: t3,
771
+ onClick: t4,
772
+ children: t5
773
+ })
774
+ });
775
+ $[10] = t3;
776
+ $[11] = t4;
777
+ $[12] = t6;
778
+ } else t6 = $[12];
779
+ let t7;
780
+ if ($[13] !== onPageChange || $[14] !== page) {
781
+ t7 = ()=>page > 1 && onPageChange?.(page - 1);
782
+ $[13] = onPageChange;
783
+ $[14] = page;
784
+ $[15] = t7;
785
+ } else t7 = $[15];
786
+ const t8 = 1 === page && "pointer-events-none opacity-50";
787
+ let t9;
788
+ if ($[16] !== t8) {
789
+ t9 = (0, index_cjs_namespaceObject.cn)(t8);
790
+ $[16] = t8;
791
+ $[17] = t9;
792
+ } else t9 = $[17];
793
+ let t10;
794
+ if ($[18] !== t7 || $[19] !== t9) {
795
+ t10 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationItem, {
796
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationPrevious, {
797
+ onClick: t7,
798
+ className: t9
799
+ })
800
+ });
801
+ $[18] = t7;
802
+ $[19] = t9;
803
+ $[20] = t10;
804
+ } else t10 = $[20];
805
+ let t11;
806
+ if ($[21] !== onPageChange || $[22] !== page || $[23] !== pageNumbers) {
807
+ t11 = pageNumbers.map((pageNum, index)=>{
808
+ const prevPage = pageNumbers[index - 1];
809
+ const showEllipsis = prevPage && pageNum - prevPage > 1;
810
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_react_namespaceObject.Fragment, {
336
811
  children: [
337
- start,
338
- " - ",
339
- end,
340
- " / ",
341
- total
812
+ showEllipsis && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationItem, {
813
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationEllipsis, {})
814
+ }),
815
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationItem, {
816
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationLink, {
817
+ onClick: ()=>onPageChange?.(pageNum),
818
+ isActive: page === pageNum,
819
+ children: pageNum
820
+ })
821
+ })
342
822
  ]
343
- }),
344
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
345
- gap: 4,
346
- align: "center",
823
+ }, pageNum);
824
+ });
825
+ $[21] = onPageChange;
826
+ $[22] = page;
827
+ $[23] = pageNumbers;
828
+ $[24] = t11;
829
+ } else t11 = $[24];
830
+ let t12;
831
+ if ($[25] !== onPageChange || $[26] !== page || $[27] !== totalPages) {
832
+ t12 = ()=>page < totalPages && onPageChange?.(page + 1);
833
+ $[25] = onPageChange;
834
+ $[26] = page;
835
+ $[27] = totalPages;
836
+ $[28] = t12;
837
+ } else t12 = $[28];
838
+ const t13 = page === totalPages && "pointer-events-none opacity-50";
839
+ let t14;
840
+ if ($[29] !== t13) {
841
+ t14 = (0, index_cjs_namespaceObject.cn)(t13);
842
+ $[29] = t13;
843
+ $[30] = t14;
844
+ } else t14 = $[30];
845
+ let t15;
846
+ if ($[31] !== t12 || $[32] !== t14) {
847
+ t15 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationItem, {
848
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationNext, {
849
+ onClick: t12,
850
+ className: t14
851
+ })
852
+ });
853
+ $[31] = t12;
854
+ $[32] = t14;
855
+ $[33] = t15;
856
+ } else t15 = $[33];
857
+ const t16 = page === totalPages;
858
+ let t17;
859
+ if ($[34] !== onPageChange || $[35] !== totalPages) {
860
+ t17 = ()=>onPageChange?.(totalPages);
861
+ $[34] = onPageChange;
862
+ $[35] = totalPages;
863
+ $[36] = t17;
864
+ } else t17 = $[36];
865
+ let t18;
866
+ if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
867
+ t18 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronsRight, {
868
+ className: "h-4 w-4"
869
+ });
870
+ $[37] = t18;
871
+ } else t18 = $[37];
872
+ let t19;
873
+ if ($[38] !== t16 || $[39] !== t17) {
874
+ t19 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationItem, {
875
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
876
+ variant: "ghost",
877
+ size: "icon",
878
+ className: "h-8 w-8",
879
+ disabled: t16,
880
+ onClick: t17,
881
+ children: t18
882
+ })
883
+ });
884
+ $[38] = t16;
885
+ $[39] = t17;
886
+ $[40] = t19;
887
+ } else t19 = $[40];
888
+ let t20;
889
+ if ($[41] !== t10 || $[42] !== t11 || $[43] !== t15 || $[44] !== t19 || $[45] !== t6) {
890
+ t20 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.Pagination, {
891
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(pagination_cjs_namespaceObject.PaginationContent, {
347
892
  children: [
348
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.Pagination, {
349
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(pagination_cjs_namespaceObject.PaginationContent, {
893
+ t6,
894
+ t10,
895
+ t11,
896
+ t15,
897
+ t19
898
+ ]
899
+ })
900
+ });
901
+ $[41] = t10;
902
+ $[42] = t11;
903
+ $[43] = t15;
904
+ $[44] = t19;
905
+ $[45] = t6;
906
+ $[46] = t20;
907
+ } else t20 = $[46];
908
+ let t21;
909
+ if ($[47] !== onPageSizeChange || $[48] !== pageSize) {
910
+ t21 = onPageSizeChange && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
911
+ gap: 2,
912
+ align: "center",
913
+ className: "text-sm",
914
+ children: [
915
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
916
+ className: "text-muted-foreground",
917
+ children: "Items"
918
+ }),
919
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(select_cjs_namespaceObject.Select, {
920
+ value: String(pageSize),
921
+ onValueChange: (v)=>onPageSizeChange(Number(v)),
922
+ children: [
923
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectTrigger, {
924
+ className: "h-8 w-16",
925
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectValue, {})
926
+ }),
927
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(select_cjs_namespaceObject.SelectContent, {
350
928
  children: [
351
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationItem, {
352
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
353
- variant: "ghost",
354
- size: "icon",
355
- className: "h-8 w-8",
356
- disabled: 1 === page,
357
- onClick: ()=>onPageChange?.(1),
358
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronsLeft, {
359
- className: "h-4 w-4"
360
- })
361
- })
929
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectItem, {
930
+ value: "10",
931
+ children: "10"
362
932
  }),
363
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationItem, {
364
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationPrevious, {
365
- onClick: ()=>page > 1 && onPageChange?.(page - 1),
366
- className: (0, index_cjs_namespaceObject.cn)(1 === page && 'pointer-events-none opacity-50')
367
- })
933
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectItem, {
934
+ value: "25",
935
+ children: "25"
368
936
  }),
369
- pageNumbers.map((pageNum, index)=>{
370
- const prevPage = pageNumbers[index - 1];
371
- const showEllipsis = prevPage && pageNum - prevPage > 1;
372
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_react_namespaceObject.Fragment, {
373
- children: [
374
- showEllipsis && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationItem, {
375
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationEllipsis, {})
376
- }),
377
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationItem, {
378
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationLink, {
379
- onClick: ()=>onPageChange?.(pageNum),
380
- isActive: page === pageNum,
381
- children: pageNum
382
- })
383
- })
384
- ]
385
- }, pageNum);
937
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectItem, {
938
+ value: "50",
939
+ children: "50"
386
940
  }),
387
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationItem, {
388
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationNext, {
389
- onClick: ()=>page < totalPages && onPageChange?.(page + 1),
390
- className: (0, index_cjs_namespaceObject.cn)(page === totalPages && 'pointer-events-none opacity-50')
391
- })
392
- }),
393
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pagination_cjs_namespaceObject.PaginationItem, {
394
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
395
- variant: "ghost",
396
- size: "icon",
397
- className: "h-8 w-8",
398
- disabled: page === totalPages,
399
- onClick: ()=>onPageChange?.(totalPages),
400
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronsRight, {
401
- className: "h-4 w-4"
402
- })
403
- })
941
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectItem, {
942
+ value: "100",
943
+ children: "100"
404
944
  })
405
945
  ]
406
946
  })
407
- }),
408
- onPageSizeChange && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
409
- gap: 2,
410
- align: "center",
411
- className: "text-sm",
412
- children: [
413
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
414
- className: "text-muted-foreground",
415
- children: "Items"
416
- }),
417
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(select_cjs_namespaceObject.Select, {
418
- value: String(pageSize),
419
- onValueChange: (v)=>onPageSizeChange(Number(v)),
420
- children: [
421
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectTrigger, {
422
- className: "h-8 w-16",
423
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectValue, {})
424
- }),
425
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(select_cjs_namespaceObject.SelectContent, {
426
- children: [
427
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectItem, {
428
- value: "10",
429
- children: "10"
430
- }),
431
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectItem, {
432
- value: "25",
433
- children: "25"
434
- }),
435
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectItem, {
436
- value: "50",
437
- children: "50"
438
- }),
439
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectItem, {
440
- value: "100",
441
- children: "100"
442
- })
443
- ]
444
- })
445
- ]
446
- })
447
- ]
448
- })
449
- ]
450
- })
451
- ]
452
- });
947
+ ]
948
+ })
949
+ ]
950
+ });
951
+ $[47] = onPageSizeChange;
952
+ $[48] = pageSize;
953
+ $[49] = t21;
954
+ } else t21 = $[49];
955
+ let t22;
956
+ if ($[50] !== t20 || $[51] !== t21) {
957
+ t22 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
958
+ gap: 4,
959
+ align: "center",
960
+ children: [
961
+ t20,
962
+ t21
963
+ ]
964
+ });
965
+ $[50] = t20;
966
+ $[51] = t21;
967
+ $[52] = t22;
968
+ } else t22 = $[52];
969
+ let t23;
970
+ if ($[53] !== t2 || $[54] !== t22) {
971
+ t23 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(layout_index_cjs_namespaceObject.Row, {
972
+ justify: "between",
973
+ align: "center",
974
+ className: "border-t px-6 py-3",
975
+ children: [
976
+ t2,
977
+ t22
978
+ ]
979
+ });
980
+ $[53] = t2;
981
+ $[54] = t22;
982
+ $[55] = t23;
983
+ } else t23 = $[55];
984
+ return t23;
453
985
  }
454
986
  exports.AdminBreadcrumb = __webpack_exports__.AdminBreadcrumb;
455
987
  exports.AdminContent = __webpack_exports__.AdminContent;