@questpie/admin 3.0.3 → 3.0.5
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.
- package/README.md +34 -5
- package/dist/client/blocks/block-renderer.d.mts +2 -2
- package/dist/client/blocks/block-renderer.mjs +4 -1
- package/dist/client/builder/types/action-types.d.mts +31 -3
- package/dist/client/builder/types/collection-types.d.mts +140 -0
- package/dist/client/builder/types/ui-config.d.mts +16 -2
- package/dist/client/builder/types/views.d.mts +57 -0
- package/dist/client/builder/types/widget-types.d.mts +5 -0
- package/dist/client/components/actions/action-button.mjs +137 -199
- package/dist/client/components/actions/action-dialog.mjs +198 -156
- package/dist/client/components/actions/confirmation-dialog.mjs +2 -2
- package/dist/client/components/actions/header-actions.mjs +52 -53
- package/dist/client/components/admin-link.d.mts +2 -2
- package/dist/client/components/auth/auth-loading.mjs +41 -18
- package/dist/client/components/blocks/block-editor-layout.mjs +2 -2
- package/dist/client/components/blocks/block-fields-renderer.mjs +64 -28
- package/dist/client/components/blocks/block-insert-button.mjs +4 -4
- package/dist/client/components/blocks/block-item.mjs +2 -2
- package/dist/client/components/blocks/block-library-sidebar.mjs +91 -63
- package/dist/client/components/component-renderer.mjs +1 -1
- package/dist/client/components/fields/array-field.mjs +14 -14
- package/dist/client/components/fields/asset-preview-field.mjs +1 -1
- package/dist/client/components/fields/blocks-field/blocks-field.mjs +84 -104
- package/dist/client/components/fields/json-field.mjs +2 -2
- package/dist/client/components/fields/object-array-field.mjs +22 -22
- package/dist/client/components/fields/object-field.mjs +5 -5
- package/dist/client/components/fields/relation/displays/cards-display.mjs +16 -9
- package/dist/client/components/fields/relation/displays/chips-display.mjs +15 -12
- package/dist/client/components/fields/relation/displays/grid-display.mjs +15 -11
- package/dist/client/components/fields/relation/displays/list-display.mjs +33 -20
- package/dist/client/components/fields/relation/displays/table-display.mjs +62 -93
- package/dist/client/components/fields/relation/relation-items-display.mjs +1 -1
- package/dist/client/components/fields/relation-picker.mjs +7 -6
- package/dist/client/components/fields/relation-select.mjs +71 -47
- package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +392 -82
- package/dist/client/components/fields/rich-text-editor/extensions.mjs +54 -23
- package/dist/client/components/fields/rich-text-editor/image-popover.mjs +24 -50
- package/dist/client/components/fields/rich-text-editor/image-upload.mjs +66 -0
- package/dist/client/components/fields/rich-text-editor/index.d.mts +38 -0
- package/dist/client/components/fields/rich-text-editor/index.mjs +637 -376
- package/dist/client/components/fields/rich-text-editor/link-utils.mjs +26 -0
- package/dist/client/components/fields/rich-text-editor/presets.d.mts +10 -0
- package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +27 -6
- package/dist/client/components/fields/rich-text-editor/toolbar.mjs +464 -346
- package/dist/client/components/fields/rich-text-editor/types.d.mts +77 -0
- package/dist/client/components/fields/upload-field.mjs +45 -49
- package/dist/client/components/filter-builder/columns-tab.mjs +69 -62
- package/dist/client/components/filter-builder/filter-builder-sheet.mjs +473 -308
- package/dist/client/components/filter-builder/filters-tab.mjs +109 -82
- package/dist/client/components/filter-builder/saved-views-tab.mjs +300 -198
- package/dist/client/components/history-sidebar.mjs +850 -340
- package/dist/client/components/layout/field-layout-renderer.mjs +6 -5
- package/dist/client/components/locale-switcher.mjs +8 -8
- package/dist/client/components/media/media-grid.mjs +106 -86
- package/dist/client/components/media/media-picker-dialog.mjs +242 -230
- package/dist/client/components/preview/live-preview-mode.mjs +1 -1
- package/dist/client/components/primitives/asset-preview.mjs +37 -22
- package/dist/client/components/primitives/date-input.mjs +212 -249
- package/dist/client/components/primitives/dropzone.mjs +192 -159
- package/dist/client/components/primitives/field-select-control.mjs +93 -0
- package/dist/client/components/primitives/select-multi.mjs +406 -365
- package/dist/client/components/primitives/select-single.mjs +391 -323
- package/dist/client/components/primitives/time-input.mjs +2 -2
- package/dist/client/components/sheets/resource-sheet.mjs +2 -0
- package/dist/client/components/ui/accordion.mjs +4 -4
- package/dist/client/components/ui/alert.mjs +3 -3
- package/dist/client/components/ui/badge.mjs +4 -4
- package/dist/client/components/ui/button.mjs +47 -37
- package/dist/client/components/ui/card.mjs +2 -2
- package/dist/client/components/ui/checkbox.mjs +1 -1
- package/dist/client/components/ui/command.mjs +5 -5
- package/dist/client/components/ui/dialog.mjs +3 -3
- package/dist/client/components/ui/drawer.mjs +1 -1
- package/dist/client/components/ui/dropdown-menu.mjs +157 -15
- package/dist/client/components/ui/empty-state.mjs +88 -59
- package/dist/client/components/ui/field.mjs +2 -2
- package/dist/client/components/ui/input-group.mjs +3 -3
- package/dist/client/components/ui/input.mjs +1 -1
- package/dist/client/components/ui/kbd.mjs +1 -1
- package/dist/client/components/ui/label.mjs +1 -1
- package/dist/client/components/ui/popover.mjs +19 -11
- package/dist/client/components/ui/scroll-fade.mjs +170 -0
- package/dist/client/components/ui/search-input.mjs +1 -1
- package/dist/client/components/ui/select.mjs +129 -27
- package/dist/client/components/ui/sheet.mjs +54 -34
- package/dist/client/components/ui/sidebar.mjs +15 -14
- package/dist/client/components/ui/skeleton.mjs +28 -12
- package/dist/client/components/ui/switch.mjs +2 -2
- package/dist/client/components/ui/table.mjs +82 -74
- package/dist/client/components/ui/tabs.mjs +26 -31
- package/dist/client/components/ui/textarea.mjs +1 -1
- package/dist/client/components/ui/tooltip.mjs +1 -1
- package/dist/client/components/widgets/chart-widget.mjs +154 -100
- package/dist/client/components/widgets/progress-widget.mjs +63 -36
- package/dist/client/components/widgets/quick-actions-widget.mjs +207 -115
- package/dist/client/components/widgets/recent-items-widget.mjs +147 -103
- package/dist/client/components/widgets/stats-widget.mjs +91 -72
- package/dist/client/components/widgets/table-widget.mjs +161 -247
- package/dist/client/components/widgets/timeline-widget.mjs +119 -78
- package/dist/client/components/widgets/value-widget.mjs +286 -157
- package/dist/client/components/widgets/widget-empty-state.mjs +88 -0
- package/dist/client/components/widgets/widget-skeletons.mjs +53 -20
- package/dist/client/contexts/focus-context.d.mts +2 -2
- package/dist/client/hooks/use-action.mjs +63 -55
- package/dist/client/hooks/use-audit-history.mjs +1 -65
- package/dist/client/hooks/use-collection-validation.mjs +36 -23
- package/dist/client/hooks/use-collection.mjs +96 -1
- package/dist/client/hooks/use-saved-views.mjs +70 -49
- package/dist/client/hooks/use-server-actions.mjs +70 -46
- package/dist/client/hooks/use-server-validation.mjs +156 -41
- package/dist/client/hooks/use-server-widget-data.mjs +1 -1
- package/dist/client/hooks/use-setup-status.d.mts +3 -3
- package/dist/client/hooks/use-setup-status.mjs +2 -2
- package/dist/client/hooks/use-transition-stage.mjs +2 -10
- package/dist/client/hooks/use-validation-error-map.mjs +31 -13
- package/dist/client/hooks/use-view-state.mjs +238 -174
- package/dist/client/i18n/date-locale.mjs +33 -0
- package/dist/client/i18n/hooks.mjs +17 -1
- package/dist/client/lib/utils.mjs +3 -2
- package/dist/client/preview/block-scope-context.d.mts +2 -2
- package/dist/client/preview/preview-banner.d.mts +2 -2
- package/dist/client/preview/preview-banner.mjs +75 -46
- package/dist/client/preview/preview-field.d.mts +4 -4
- package/dist/client/preview/preview-field.mjs +2 -2
- package/dist/client/runtime/provider.mjs +8 -1
- package/dist/client/runtime/translations-provider.mjs +1 -1
- package/dist/client/scope/picker.d.mts +2 -2
- package/dist/client/scope/provider.d.mts +2 -2
- package/dist/client/styles/base.css +1022 -0
- package/dist/client/styles/index.css +3 -589
- package/dist/client/utils/auto-expand-fields.mjs +4 -2
- package/dist/client/utils/keyboard-shortcuts.mjs +26 -0
- package/dist/client/utils/use-lazy-component.mjs +80 -0
- package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
- package/dist/client/views/auth/auth-layout.d.mts +17 -10
- package/dist/client/views/auth/auth-layout.mjs +291 -80
- package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
- package/dist/client/views/auth/forgot-password-form.mjs +2 -2
- package/dist/client/views/auth/login-form.d.mts +2 -2
- package/dist/client/views/auth/login-form.mjs +1 -1
- package/dist/client/views/auth/reset-password-form.d.mts +2 -2
- package/dist/client/views/auth/reset-password-form.mjs +2 -2
- package/dist/client/views/auth/setup-form.d.mts +2 -2
- package/dist/client/views/collection/auto-form-fields.mjs +11 -9
- package/dist/client/views/collection/bulk-action-toolbar.mjs +173 -138
- package/dist/client/views/collection/cells/complex-cells.mjs +22 -22
- package/dist/client/views/collection/cells/primitive-cells.mjs +1 -1
- package/dist/client/views/collection/cells/relation-cells.mjs +147 -129
- package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +224 -278
- package/dist/client/views/collection/cells/shared/relation-chip.mjs +64 -36
- package/dist/client/views/collection/cells/upload-cells.mjs +199 -9
- package/dist/client/views/collection/columns/build-columns.mjs +29 -9
- package/dist/client/views/collection/columns/column-defaults.mjs +2 -2
- package/dist/client/views/collection/field-renderer.mjs +50 -89
- package/dist/client/views/collection/form-view.mjs +237 -227
- package/dist/client/views/collection/table-view.mjs +1167 -234
- package/dist/client/views/collection/view-skeletons.mjs +222 -79
- package/dist/client/views/common/global-search.mjs +29 -18
- package/dist/client/views/dashboard/dashboard-grid.mjs +678 -501
- package/dist/client/views/dashboard/dashboard-widget.mjs +6 -3
- package/dist/client/views/dashboard/widget-card.mjs +23 -14
- package/dist/client/views/globals/global-form-view.mjs +634 -589
- package/dist/client/views/layout/admin-layout-provider.mjs +67 -70
- package/dist/client/views/layout/admin-layout.d.mts +3 -6
- package/dist/client/views/layout/admin-layout.mjs +152 -155
- package/dist/client/views/layout/admin-router.mjs +936 -616
- package/dist/client/views/layout/admin-sidebar.d.mts +38 -1
- package/dist/client/views/layout/admin-sidebar.mjs +762 -592
- package/dist/client/views/layout/admin-theme.d.mts +10 -0
- package/dist/client/views/layout/admin-theme.mjs +84 -0
- package/dist/client/views/layout/admin-view-layout.mjs +161 -0
- package/dist/client/views/pages/accept-invite-page.d.mts +2 -2
- package/dist/client/views/pages/accept-invite-page.mjs +49 -26
- package/dist/client/views/pages/dashboard-page.d.mts +2 -2
- package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
- package/dist/client/views/pages/forgot-password-page.mjs +2 -19
- package/dist/client/views/pages/invite-page.d.mts +2 -2
- package/dist/client/views/pages/invite-page.mjs +2 -19
- package/dist/client/views/pages/login-page.d.mts +3 -3
- package/dist/client/views/pages/login-page.mjs +4 -21
- package/dist/client/views/pages/reset-password-page.d.mts +2 -2
- package/dist/client/views/pages/reset-password-page.mjs +3 -20
- package/dist/client/views/pages/setup-page.d.mts +2 -2
- package/dist/client/views/pages/setup-page.mjs +70 -71
- package/dist/client.d.mts +6 -2
- package/dist/client.mjs +2 -1
- package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
- package/dist/index.d.mts +6 -2
- package/dist/index.mjs +2 -1
- package/dist/server/augmentation/dashboard.d.mts +67 -3
- package/dist/server/augmentation/form-layout.d.mts +21 -0
- package/dist/server/augmentation/index.d.mts +1 -1
- package/dist/server/codegen/admin-client-template.mjs +4 -0
- package/dist/server/fields/blocks.d.mts +1 -1
- package/dist/server/fields/blocks.mjs +12 -0
- package/dist/server/fields/rich-text.d.mts +1 -1
- package/dist/server/fields/rich-text.mjs +8 -0
- package/dist/server/i18n/index.mjs +29 -7
- package/dist/server/i18n/messages/cs.mjs +414 -1
- package/dist/server/i18n/messages/de.mjs +412 -1
- package/dist/server/i18n/messages/en.mjs +166 -1
- package/dist/server/i18n/messages/es.mjs +412 -1
- package/dist/server/i18n/messages/fr.mjs +412 -1
- package/dist/server/i18n/messages/pl.mjs +416 -1
- package/dist/server/i18n/messages/pt.mjs +409 -1
- package/dist/server/i18n/messages/sk.mjs +216 -2
- package/dist/server/modules/admin/block/introspection.mjs +4 -1
- package/dist/server/modules/admin/block/prefetch.mjs +12 -2
- package/dist/server/modules/admin/collections/account.d.mts +2 -2
- package/dist/server/modules/admin/collections/admin-locks.d.mts +2 -2
- package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
- package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
- package/dist/server/modules/admin/collections/apikey.d.mts +42 -42
- package/dist/server/modules/admin/collections/assets.d.mts +20 -20
- package/dist/server/modules/admin/collections/assets.mjs +0 -1
- package/dist/server/modules/admin/collections/session.d.mts +42 -42
- package/dist/server/modules/admin/collections/user.d.mts +40 -28
- package/dist/server/modules/admin/collections/user.mjs +40 -9
- package/dist/server/modules/admin/collections/verification.d.mts +36 -36
- package/dist/server/modules/admin/dto/admin-config.dto.mjs +2 -0
- package/dist/server/modules/admin/factories.mjs +7 -18
- package/dist/server/modules/admin/index.d.mts +1 -1
- package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
- package/dist/server/modules/admin/routes/admin-config.mjs +34 -16
- package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
- package/dist/server/modules/admin/routes/execute-action.mjs +67 -28
- package/dist/server/modules/admin/routes/i18n-helpers.mjs +34 -0
- package/dist/server/modules/admin/routes/locales.d.mts +2 -2
- package/dist/server/modules/admin/routes/preview.mjs +25 -17
- package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
- package/dist/server/modules/admin/routes/route-helpers.mjs +1 -1
- package/dist/server/modules/admin/routes/setup.d.mts +10 -10
- package/dist/server/modules/admin/routes/setup.mjs +16 -13
- package/dist/server/modules/admin/routes/translations.d.mts +4 -4
- package/dist/server/modules/admin/routes/translations.mjs +5 -1
- package/dist/server/modules/admin-preferences/collections/admin-preferences.mjs +1 -1
- package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +2 -2
- package/dist/server/modules/audit/.generated/module.d.mts +1 -1
- package/dist/server/modules/audit/.generated/module.mjs +1 -1
- package/dist/server/modules/audit/collections/audit-log.d.mts +2 -2
- package/dist/server/modules/audit/collections/audit-log.mjs +1 -1
- package/dist/server/modules/audit/config/app.mjs +99 -42
- package/dist/server/modules/audit/jobs/audit-cleanup.mjs +1 -1
- package/dist/server/plugin.mjs +4 -2
- package/dist/server/proxy-factories.d.mts +4 -3
- package/dist/server/proxy-factories.mjs +34 -8
- package/dist/shared/types/saved-views.types.d.mts +2 -0
- package/package.json +6 -4
- package/dist/client/components/fields/rich-text-editor/link-popover.mjs +0 -85
- package/dist/client/components/ui/spinner.mjs +0 -52
- package/dist/client/components/ui/toolbar.mjs +0 -136
- package/dist/client/contexts/breadcrumb-context.mjs +0 -60
- package/dist/client/views/layout/admin-topbar.mjs +0 -236
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { useResolveText, useSafeI18n, useTranslation } from "../../i18n/hooks.mjs";
|
|
2
2
|
import { cn, formatLabel } from "../../lib/utils.mjs";
|
|
3
|
-
import { selectAdmin, selectBasePath, selectContentLocale, selectNavigate, selectSetContentLocale, useAdminStore } from "../../runtime/provider.mjs";
|
|
3
|
+
import { selectAdmin, selectBasePath, selectContentLocale, selectNavigate, selectSetContentLocale, useAdminStore, useAdminStoreRaw } from "../../runtime/provider.mjs";
|
|
4
4
|
import { useSafeContentLocales } from "../../runtime/content-locales-provider.mjs";
|
|
5
5
|
import { ComponentRenderer } from "../../components/component-renderer.mjs";
|
|
6
|
+
import { Button } from "../../components/ui/button.mjs";
|
|
6
7
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../../components/ui/tooltip.mjs";
|
|
7
8
|
import { useAdminConfig } from "../../hooks/use-admin-config.mjs";
|
|
8
9
|
import { getFlagUrl } from "../../utils/locale-to-flag.mjs";
|
|
9
10
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "../../components/ui/dropdown-menu.mjs";
|
|
11
|
+
import { useLazyComponent } from "../../utils/use-lazy-component.mjs";
|
|
12
|
+
import { Skeleton } from "../../components/ui/skeleton.mjs";
|
|
10
13
|
import { useAuthClientSafe } from "../../hooks/use-auth.mjs";
|
|
11
14
|
import { useCurrentUser, useSessionState } from "../../hooks/use-current-user.mjs";
|
|
12
|
-
import {
|
|
13
|
-
import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarMenu, SidebarMenuItem, SidebarSeparator, useSidebar } from "../../components/ui/sidebar.mjs";
|
|
15
|
+
import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarMenu, SidebarMenuItem, SidebarSeparator, SidebarTrigger, useSidebar } from "../../components/ui/sidebar.mjs";
|
|
14
16
|
import { getAdminPreferenceQueryKey, useAdminPreference, useSetAdminPreference } from "../../hooks/use-admin-preferences.mjs";
|
|
15
17
|
import { c } from "react/compiler-runtime";
|
|
16
18
|
import { Icon } from "@iconify/react";
|
|
@@ -265,7 +267,7 @@ function QuestpieSymbol(t0) {
|
|
|
265
267
|
stroke: "currentColor",
|
|
266
268
|
strokeWidth: "2",
|
|
267
269
|
strokeLinecap: "square",
|
|
268
|
-
className: "text-
|
|
270
|
+
className: "text-foreground"
|
|
269
271
|
});
|
|
270
272
|
t4 = /* @__PURE__ */ jsx("path", {
|
|
271
273
|
d: "M23 13H13V23H23V13Z",
|
|
@@ -319,114 +321,76 @@ function isRouteActive(activeRoute, itemHref, basePath, exact = false) {
|
|
|
319
321
|
/**
|
|
320
322
|
* Menu button styles - QUESTPIE design: clean, technical look
|
|
321
323
|
*/
|
|
322
|
-
const menuButtonStyles = cn("flex w-full items-center gap-2
|
|
323
|
-
const menuButtonActiveStyles = cn("bg-sidebar-
|
|
324
|
-
/**
|
|
325
|
-
* Active indicator bar positioned at the sidebar group edge.
|
|
326
|
-
* Uses negative left offset to compensate for SidebarGroupContent nesting padding.
|
|
327
|
-
*/
|
|
328
|
-
function ActiveIndicator(t0) {
|
|
329
|
-
const $ = c(2);
|
|
330
|
-
const { depth } = t0;
|
|
331
|
-
const t1 = `${-depth * .75}rem`;
|
|
332
|
-
let t2;
|
|
333
|
-
if ($[0] !== t1) {
|
|
334
|
-
t2 = /* @__PURE__ */ jsx("div", {
|
|
335
|
-
className: "bg-sidebar-primary absolute top-0 bottom-0 w-0.5",
|
|
336
|
-
style: { left: t1 },
|
|
337
|
-
"aria-hidden": "true"
|
|
338
|
-
});
|
|
339
|
-
$[0] = t1;
|
|
340
|
-
$[1] = t2;
|
|
341
|
-
} else t2 = $[1];
|
|
342
|
-
return t2;
|
|
343
|
-
}
|
|
324
|
+
const menuButtonStyles = cn("item-surface font-chrome flex w-full items-center gap-2 px-2 py-2 text-[13px] font-medium transition-[background-color,color,border-color,transform] duration-[var(--motion-duration-base)] ease-[var(--motion-ease-standard)] active:scale-[0.96] motion-reduce:transition-none motion-reduce:active:scale-100", "text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-foreground", "focus-visible:ring-sidebar-ring focus-visible:ring-1 focus-visible:outline-none", "group-data-[collapsible=icon]:size-8 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-2");
|
|
325
|
+
const menuButtonActiveStyles = cn("border-transparent bg-[var(--sidebar-active-background)] text-[var(--sidebar-active-foreground)]");
|
|
344
326
|
function NavItem(t0) {
|
|
345
|
-
const $ = c(
|
|
327
|
+
const $ = c(45);
|
|
346
328
|
const { item, isActive, LinkComponent, renderNavItem, useActiveProps, className, depth: t1 } = t0;
|
|
347
|
-
const depth = t1 === void 0 ? 0 : t1;
|
|
348
329
|
const { state, isMobile, setOpenMobile } = useSidebar();
|
|
349
330
|
const collapsed = state === "collapsed";
|
|
350
331
|
const resolveText = useResolveText();
|
|
351
332
|
let t2;
|
|
352
|
-
if ($[0] !==
|
|
353
|
-
t2 = ()
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
$[0] = isMobile;
|
|
357
|
-
$[1] = setOpenMobile;
|
|
333
|
+
if ($[0] !== item.label || $[1] !== resolveText) {
|
|
334
|
+
t2 = resolveText(item.label);
|
|
335
|
+
$[0] = item.label;
|
|
336
|
+
$[1] = resolveText;
|
|
358
337
|
$[2] = t2;
|
|
359
338
|
} else t2 = $[2];
|
|
360
|
-
const
|
|
361
|
-
if (renderNavItem) {
|
|
362
|
-
const NavItemRenderer = renderNavItem;
|
|
363
|
-
let t3$1;
|
|
364
|
-
if ($[3] !== NavItemRenderer || $[4] !== collapsed || $[5] !== isActive || $[6] !== item) {
|
|
365
|
-
t3$1 = /* @__PURE__ */ jsx(NavItemRenderer, {
|
|
366
|
-
item,
|
|
367
|
-
isActive,
|
|
368
|
-
collapsed
|
|
369
|
-
});
|
|
370
|
-
$[3] = NavItemRenderer;
|
|
371
|
-
$[4] = collapsed;
|
|
372
|
-
$[5] = isActive;
|
|
373
|
-
$[6] = item;
|
|
374
|
-
$[7] = t3$1;
|
|
375
|
-
} else t3$1 = $[7];
|
|
376
|
-
return t3$1;
|
|
377
|
-
}
|
|
378
|
-
let t3;
|
|
379
|
-
if ($[8] !== item.label || $[9] !== resolveText) {
|
|
380
|
-
t3 = resolveText(item.label);
|
|
381
|
-
$[8] = item.label;
|
|
382
|
-
$[9] = resolveText;
|
|
383
|
-
$[10] = t3;
|
|
384
|
-
} else t3 = $[10];
|
|
385
|
-
const label = t3;
|
|
339
|
+
const label = t2;
|
|
386
340
|
const shouldUseExact = item.type === "link" || item.type === "page";
|
|
387
|
-
let
|
|
388
|
-
if ($[
|
|
389
|
-
|
|
341
|
+
let t3;
|
|
342
|
+
if ($[3] !== shouldUseExact || $[4] !== useActiveProps) {
|
|
343
|
+
t3 = useActiveProps ? {
|
|
390
344
|
activeProps: { className: menuButtonActiveStyles },
|
|
391
345
|
activeOptions: { exact: shouldUseExact }
|
|
392
346
|
} : {};
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
395
|
-
$[
|
|
396
|
-
} else
|
|
397
|
-
const linkActiveProps =
|
|
347
|
+
$[3] = shouldUseExact;
|
|
348
|
+
$[4] = useActiveProps;
|
|
349
|
+
$[5] = t3;
|
|
350
|
+
} else t3 = $[5];
|
|
351
|
+
const linkActiveProps = t3;
|
|
398
352
|
const ariaCurrent = isActive ? "page" : void 0;
|
|
353
|
+
let t4;
|
|
354
|
+
if ($[6] !== isMobile || $[7] !== setOpenMobile) {
|
|
355
|
+
t4 = () => {
|
|
356
|
+
if (isMobile) setOpenMobile(false);
|
|
357
|
+
};
|
|
358
|
+
$[6] = isMobile;
|
|
359
|
+
$[7] = setOpenMobile;
|
|
360
|
+
$[8] = t4;
|
|
361
|
+
} else t4 = $[8];
|
|
362
|
+
const handleClick = t4;
|
|
399
363
|
const t5 = item.href;
|
|
400
364
|
const t6 = collapsed ? label : void 0;
|
|
401
365
|
const t7 = isActive && "qa-sidebar__nav-link--active";
|
|
402
366
|
const t8 = isActive && menuButtonActiveStyles;
|
|
403
367
|
let t9;
|
|
404
|
-
if ($[
|
|
368
|
+
if ($[9] !== t7 || $[10] !== t8) {
|
|
405
369
|
t9 = cn("qa-sidebar__nav-link", menuButtonStyles, t7, t8);
|
|
406
|
-
$[
|
|
407
|
-
$[
|
|
408
|
-
$[
|
|
409
|
-
} else t9 = $[
|
|
370
|
+
$[9] = t7;
|
|
371
|
+
$[10] = t8;
|
|
372
|
+
$[11] = t9;
|
|
373
|
+
} else t9 = $[11];
|
|
410
374
|
let t10;
|
|
411
|
-
if ($[
|
|
375
|
+
if ($[12] !== item.icon) {
|
|
412
376
|
t10 = item.icon && /* @__PURE__ */ jsx(RenderIcon, {
|
|
413
377
|
icon: item.icon,
|
|
414
378
|
className: "qa-sidebar__nav-icon"
|
|
415
379
|
});
|
|
416
|
-
$[
|
|
417
|
-
$[
|
|
418
|
-
} else t10 = $[
|
|
380
|
+
$[12] = item.icon;
|
|
381
|
+
$[13] = t10;
|
|
382
|
+
} else t10 = $[13];
|
|
419
383
|
let t11;
|
|
420
|
-
if ($[
|
|
384
|
+
if ($[14] !== label) {
|
|
421
385
|
t11 = /* @__PURE__ */ jsx("span", {
|
|
422
386
|
className: "qa-sidebar__nav-label truncate group-data-[collapsible=icon]:hidden",
|
|
423
387
|
children: label
|
|
424
388
|
});
|
|
425
|
-
$[
|
|
426
|
-
$[
|
|
427
|
-
} else t11 = $[
|
|
389
|
+
$[14] = label;
|
|
390
|
+
$[15] = t11;
|
|
391
|
+
} else t11 = $[15];
|
|
428
392
|
let t12;
|
|
429
|
-
if ($[
|
|
393
|
+
if ($[16] !== LinkComponent || $[17] !== item.href || $[18] !== linkActiveProps || $[19] !== t10 || $[20] !== t11 || $[21] !== t6 || $[22] !== t9) {
|
|
430
394
|
t12 = /* @__PURE__ */ jsxs(LinkComponent, {
|
|
431
395
|
to: t5,
|
|
432
396
|
"aria-label": t6,
|
|
@@ -434,126 +398,83 @@ function NavItem(t0) {
|
|
|
434
398
|
...linkActiveProps,
|
|
435
399
|
children: [t10, t11]
|
|
436
400
|
});
|
|
437
|
-
$[
|
|
438
|
-
$[
|
|
439
|
-
$[
|
|
440
|
-
$[
|
|
441
|
-
$[
|
|
442
|
-
$[
|
|
443
|
-
$[
|
|
444
|
-
$[
|
|
445
|
-
} else t12 = $[
|
|
401
|
+
$[16] = LinkComponent;
|
|
402
|
+
$[17] = item.href;
|
|
403
|
+
$[18] = linkActiveProps;
|
|
404
|
+
$[19] = t10;
|
|
405
|
+
$[20] = t11;
|
|
406
|
+
$[21] = t6;
|
|
407
|
+
$[22] = t9;
|
|
408
|
+
$[23] = t12;
|
|
409
|
+
} else t12 = $[23];
|
|
446
410
|
const linkContent = t12;
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
const t16 = isActive && menuButtonActiveStyles;
|
|
457
|
-
let t17;
|
|
458
|
-
if ($[31] !== t15$1 || $[32] !== t16) {
|
|
459
|
-
t17 = cn("qa-sidebar__nav-link", menuButtonStyles, t15$1, t16);
|
|
460
|
-
$[31] = t15$1;
|
|
461
|
-
$[32] = t16;
|
|
462
|
-
$[33] = t17;
|
|
463
|
-
} else t17 = $[33];
|
|
464
|
-
let t18;
|
|
465
|
-
if ($[34] !== item.icon) {
|
|
466
|
-
t18 = item.icon && /* @__PURE__ */ jsx(RenderIcon, { icon: item.icon });
|
|
467
|
-
$[34] = item.icon;
|
|
468
|
-
$[35] = t18;
|
|
469
|
-
} else t18 = $[35];
|
|
470
|
-
let t19;
|
|
471
|
-
if ($[36] !== label) {
|
|
472
|
-
t19 = /* @__PURE__ */ jsx("span", {
|
|
473
|
-
className: "truncate group-data-[collapsible=icon]:hidden",
|
|
474
|
-
children: label
|
|
475
|
-
});
|
|
476
|
-
$[36] = label;
|
|
477
|
-
$[37] = t19;
|
|
478
|
-
} else t19 = $[37];
|
|
479
|
-
let t20;
|
|
480
|
-
if ($[38] !== LinkComponent || $[39] !== item.href || $[40] !== linkActiveProps || $[41] !== t17 || $[42] !== t18 || $[43] !== t19) {
|
|
481
|
-
t20 = /* @__PURE__ */ jsx(TooltipTrigger, { render: /* @__PURE__ */ jsxs(LinkComponent, {
|
|
482
|
-
to: t14$1,
|
|
483
|
-
className: t17,
|
|
411
|
+
let t13;
|
|
412
|
+
if ($[24] !== LinkComponent || $[25] !== ariaCurrent || $[26] !== className || $[27] !== collapsed || $[28] !== handleClick || $[29] !== isActive || $[30] !== isMobile || $[31] !== item.href || $[32] !== item.icon || $[33] !== label || $[34] !== linkActiveProps || $[35] !== linkContent) {
|
|
413
|
+
t13 = collapsed && !isMobile ? /* @__PURE__ */ jsx(SidebarMenuItem, {
|
|
414
|
+
className: "qa-sidebar__nav-item",
|
|
415
|
+
onClickCapture: handleClick,
|
|
416
|
+
"aria-current": ariaCurrent,
|
|
417
|
+
children: /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, { render: /* @__PURE__ */ jsxs(LinkComponent, {
|
|
418
|
+
to: item.href,
|
|
419
|
+
className: cn("qa-sidebar__nav-link", menuButtonStyles, isActive && "qa-sidebar__nav-link--active", isActive && menuButtonActiveStyles),
|
|
484
420
|
...linkActiveProps,
|
|
485
|
-
children: [
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
$[41] = t17;
|
|
491
|
-
$[42] = t18;
|
|
492
|
-
$[43] = t19;
|
|
493
|
-
$[44] = t20;
|
|
494
|
-
} else t20 = $[44];
|
|
495
|
-
let t21;
|
|
496
|
-
if ($[45] !== label) {
|
|
497
|
-
t21 = /* @__PURE__ */ jsx(TooltipContent, {
|
|
421
|
+
children: [item.icon && /* @__PURE__ */ jsx(RenderIcon, { icon: item.icon }), /* @__PURE__ */ jsx("span", {
|
|
422
|
+
className: "truncate group-data-[collapsible=icon]:hidden",
|
|
423
|
+
children: label
|
|
424
|
+
})]
|
|
425
|
+
}) }), /* @__PURE__ */ jsx(TooltipContent, {
|
|
498
426
|
side: "right",
|
|
499
427
|
align: "center",
|
|
500
428
|
children: label
|
|
501
|
-
})
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
} else t21 = $[46];
|
|
505
|
-
let t22;
|
|
506
|
-
if ($[47] !== t20 || $[48] !== t21) {
|
|
507
|
-
t22 = /* @__PURE__ */ jsxs(Tooltip, { children: [t20, t21] });
|
|
508
|
-
$[47] = t20;
|
|
509
|
-
$[48] = t21;
|
|
510
|
-
$[49] = t22;
|
|
511
|
-
} else t22 = $[49];
|
|
512
|
-
let t23;
|
|
513
|
-
if ($[50] !== ariaCurrent || $[51] !== handleClick || $[52] !== t13$1 || $[53] !== t22) {
|
|
514
|
-
t23 = /* @__PURE__ */ jsxs(SidebarMenuItem, {
|
|
515
|
-
className: "qa-sidebar__nav-item",
|
|
516
|
-
onClickCapture: handleClick,
|
|
517
|
-
"aria-current": ariaCurrent,
|
|
518
|
-
children: [t13$1, t22]
|
|
519
|
-
});
|
|
520
|
-
$[50] = ariaCurrent;
|
|
521
|
-
$[51] = handleClick;
|
|
522
|
-
$[52] = t13$1;
|
|
523
|
-
$[53] = t22;
|
|
524
|
-
$[54] = t23;
|
|
525
|
-
} else t23 = $[54];
|
|
526
|
-
return t23;
|
|
527
|
-
}
|
|
528
|
-
let t13;
|
|
529
|
-
if ($[55] !== className) {
|
|
530
|
-
t13 = cn("qa-sidebar__nav-item", className);
|
|
531
|
-
$[55] = className;
|
|
532
|
-
$[56] = t13;
|
|
533
|
-
} else t13 = $[56];
|
|
534
|
-
let t14;
|
|
535
|
-
if ($[57] !== depth || $[58] !== isActive) {
|
|
536
|
-
t14 = isActive && /* @__PURE__ */ jsx(ActiveIndicator, { depth });
|
|
537
|
-
$[57] = depth;
|
|
538
|
-
$[58] = isActive;
|
|
539
|
-
$[59] = t14;
|
|
540
|
-
} else t14 = $[59];
|
|
541
|
-
let t15;
|
|
542
|
-
if ($[60] !== ariaCurrent || $[61] !== handleClick || $[62] !== linkContent || $[63] !== t13 || $[64] !== t14) {
|
|
543
|
-
t15 = /* @__PURE__ */ jsxs(SidebarMenuItem, {
|
|
544
|
-
className: t13,
|
|
429
|
+
})] })
|
|
430
|
+
}) : /* @__PURE__ */ jsx(SidebarMenuItem, {
|
|
431
|
+
className: cn("qa-sidebar__nav-item", className),
|
|
545
432
|
onClickCapture: handleClick,
|
|
546
433
|
"aria-current": ariaCurrent,
|
|
547
|
-
children:
|
|
434
|
+
children: linkContent
|
|
548
435
|
});
|
|
549
|
-
$[
|
|
550
|
-
$[
|
|
551
|
-
$[
|
|
552
|
-
$[
|
|
553
|
-
$[
|
|
554
|
-
$[
|
|
555
|
-
|
|
556
|
-
|
|
436
|
+
$[24] = LinkComponent;
|
|
437
|
+
$[25] = ariaCurrent;
|
|
438
|
+
$[26] = className;
|
|
439
|
+
$[27] = collapsed;
|
|
440
|
+
$[28] = handleClick;
|
|
441
|
+
$[29] = isActive;
|
|
442
|
+
$[30] = isMobile;
|
|
443
|
+
$[31] = item.href;
|
|
444
|
+
$[32] = item.icon;
|
|
445
|
+
$[33] = label;
|
|
446
|
+
$[34] = linkActiveProps;
|
|
447
|
+
$[35] = linkContent;
|
|
448
|
+
$[36] = t13;
|
|
449
|
+
} else t13 = $[36];
|
|
450
|
+
const builtInNavItem = t13;
|
|
451
|
+
if (renderNavItem) {
|
|
452
|
+
let t14;
|
|
453
|
+
if ($[37] !== collapsed || $[38] !== isActive || $[39] !== item || $[40] !== renderNavItem) {
|
|
454
|
+
t14 = renderNavItem({
|
|
455
|
+
item,
|
|
456
|
+
isActive,
|
|
457
|
+
collapsed
|
|
458
|
+
});
|
|
459
|
+
$[37] = collapsed;
|
|
460
|
+
$[38] = isActive;
|
|
461
|
+
$[39] = item;
|
|
462
|
+
$[40] = renderNavItem;
|
|
463
|
+
$[41] = t14;
|
|
464
|
+
} else t14 = $[41];
|
|
465
|
+
let t15;
|
|
466
|
+
if ($[42] !== builtInNavItem || $[43] !== t14) {
|
|
467
|
+
t15 = /* @__PURE__ */ jsx(React.Suspense, {
|
|
468
|
+
fallback: builtInNavItem,
|
|
469
|
+
children: t14
|
|
470
|
+
});
|
|
471
|
+
$[42] = builtInNavItem;
|
|
472
|
+
$[43] = t14;
|
|
473
|
+
$[44] = t15;
|
|
474
|
+
} else t15 = $[44];
|
|
475
|
+
return t15;
|
|
476
|
+
}
|
|
477
|
+
return builtInNavItem;
|
|
557
478
|
}
|
|
558
479
|
const SIDEBAR_COLLAPSED_SECTIONS_KEY = "sidebar:collapsed-sections";
|
|
559
480
|
/**
|
|
@@ -667,7 +588,7 @@ function NavGroup(t0) {
|
|
|
667
588
|
className: "size-3.5"
|
|
668
589
|
}),
|
|
669
590
|
/* @__PURE__ */ jsx("span", {
|
|
670
|
-
className: "flex-1 text-left
|
|
591
|
+
className: "flex-1 text-left",
|
|
671
592
|
children: groupLabel
|
|
672
593
|
}),
|
|
673
594
|
group.collapsible && /* @__PURE__ */ jsx(Icon, {
|
|
@@ -689,7 +610,7 @@ function NavGroup(t0) {
|
|
|
689
610
|
isActive: isRouteActive(activeRoute, element.href, basePath, shouldUseExact),
|
|
690
611
|
LinkComponent,
|
|
691
612
|
renderNavItem,
|
|
692
|
-
useActiveProps,
|
|
613
|
+
useActiveProps: useActiveProps && !activeRoute,
|
|
693
614
|
depth
|
|
694
615
|
}, element.id);
|
|
695
616
|
}) }), sections.map((subSection) => /* @__PURE__ */ jsx(NavGroup, {
|
|
@@ -742,7 +663,7 @@ function UserFooterSkeleton(t0) {
|
|
|
742
663
|
const t1 = collapsed && "justify-center";
|
|
743
664
|
let t2;
|
|
744
665
|
if ($[0] !== t1) {
|
|
745
|
-
t2 = cn("flex items-center gap-2.5 p-2", t1);
|
|
666
|
+
t2 = cn("item-surface border-sidebar-border/40 flex items-center gap-2.5 p-2", t1);
|
|
746
667
|
$[0] = t1;
|
|
747
668
|
$[1] = t2;
|
|
748
669
|
} else t2 = $[1];
|
|
@@ -755,7 +676,13 @@ function UserFooterSkeleton(t0) {
|
|
|
755
676
|
if ($[3] !== collapsed) {
|
|
756
677
|
t4 = !collapsed && /* @__PURE__ */ jsxs("div", {
|
|
757
678
|
className: "grid flex-1 gap-1",
|
|
758
|
-
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
679
|
+
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
680
|
+
variant: "text",
|
|
681
|
+
className: "h-3 w-24"
|
|
682
|
+
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
683
|
+
variant: "text",
|
|
684
|
+
className: "h-2 w-32"
|
|
685
|
+
})]
|
|
759
686
|
});
|
|
760
687
|
$[3] = collapsed;
|
|
761
688
|
$[4] = t4;
|
|
@@ -775,8 +702,10 @@ function UserFooterSkeleton(t0) {
|
|
|
775
702
|
} else t5 = $[7];
|
|
776
703
|
return t5;
|
|
777
704
|
}
|
|
778
|
-
function UserFooter() {
|
|
779
|
-
const $ = c(
|
|
705
|
+
function UserFooter(t0) {
|
|
706
|
+
const $ = c(109);
|
|
707
|
+
const { theme: t1, setTheme, showThemeToggle } = t0;
|
|
708
|
+
const theme = t1 === void 0 ? "system" : t1;
|
|
780
709
|
const { state, isMobile, setOpenMobile } = useSidebar();
|
|
781
710
|
const collapsed = state === "collapsed";
|
|
782
711
|
const authClient = useAuthClientSafe();
|
|
@@ -789,116 +718,183 @@ function UserFooter() {
|
|
|
789
718
|
const localeConfig = admin.getLocale();
|
|
790
719
|
const uiLocales = i18nAdapter?.locales ?? localeConfig.supported ?? ["en"];
|
|
791
720
|
const hasMultipleUiLocales = uiLocales.length > 1;
|
|
792
|
-
let
|
|
721
|
+
let t2;
|
|
793
722
|
if ($[0] !== getLocaleName) {
|
|
794
|
-
|
|
723
|
+
t2 = (code) => ({
|
|
795
724
|
code,
|
|
796
725
|
label: getLocaleName(code)
|
|
797
726
|
});
|
|
798
727
|
$[0] = getLocaleName;
|
|
799
|
-
$[1] =
|
|
800
|
-
} else
|
|
801
|
-
const uiLocaleOptions = uiLocales.map(
|
|
728
|
+
$[1] = t2;
|
|
729
|
+
} else t2 = $[1];
|
|
730
|
+
const uiLocaleOptions = uiLocales.map(t2);
|
|
802
731
|
const contentLocales = useSafeContentLocales();
|
|
803
732
|
const contentLocale = useAdminStore(selectContentLocale);
|
|
804
733
|
const setContentLocale = useAdminStore(selectSetContentLocale);
|
|
805
734
|
const hasMultipleContentLocales = (contentLocales?.locales?.length ?? 0) > 1;
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
735
|
+
const shouldShowThemeToggle = !!setTheme && showThemeToggle !== false;
|
|
736
|
+
let t3;
|
|
737
|
+
if ($[2] !== t) {
|
|
738
|
+
t3 = t("ui.themeLight");
|
|
739
|
+
$[2] = t;
|
|
740
|
+
$[3] = t3;
|
|
741
|
+
} else t3 = $[3];
|
|
742
|
+
let t4;
|
|
743
|
+
if ($[4] !== t3) {
|
|
744
|
+
t4 = {
|
|
745
|
+
value: "light",
|
|
746
|
+
label: t3,
|
|
747
|
+
icon: "ph:sun"
|
|
748
|
+
};
|
|
749
|
+
$[4] = t3;
|
|
750
|
+
$[5] = t4;
|
|
751
|
+
} else t4 = $[5];
|
|
752
|
+
let t5;
|
|
753
|
+
if ($[6] !== t) {
|
|
754
|
+
t5 = t("ui.themeDark");
|
|
755
|
+
$[6] = t;
|
|
756
|
+
$[7] = t5;
|
|
757
|
+
} else t5 = $[7];
|
|
758
|
+
let t6;
|
|
759
|
+
if ($[8] !== t5) {
|
|
760
|
+
t6 = {
|
|
761
|
+
value: "dark",
|
|
762
|
+
label: t5,
|
|
763
|
+
icon: "ph:moon"
|
|
764
|
+
};
|
|
765
|
+
$[8] = t5;
|
|
766
|
+
$[9] = t6;
|
|
767
|
+
} else t6 = $[9];
|
|
768
|
+
let t7;
|
|
769
|
+
if ($[10] !== t) {
|
|
770
|
+
t7 = t("ui.themeSystem");
|
|
771
|
+
$[10] = t;
|
|
772
|
+
$[11] = t7;
|
|
773
|
+
} else t7 = $[11];
|
|
774
|
+
let t8;
|
|
775
|
+
if ($[12] !== t7) {
|
|
776
|
+
t8 = {
|
|
777
|
+
value: "system",
|
|
778
|
+
label: t7,
|
|
779
|
+
icon: "ph:monitor"
|
|
780
|
+
};
|
|
781
|
+
$[12] = t7;
|
|
782
|
+
$[13] = t8;
|
|
783
|
+
} else t8 = $[13];
|
|
784
|
+
let t9;
|
|
785
|
+
if ($[14] !== t4 || $[15] !== t6 || $[16] !== t8) {
|
|
786
|
+
t9 = [
|
|
787
|
+
t4,
|
|
788
|
+
t6,
|
|
789
|
+
t8
|
|
790
|
+
];
|
|
791
|
+
$[14] = t4;
|
|
792
|
+
$[15] = t6;
|
|
793
|
+
$[16] = t8;
|
|
794
|
+
$[17] = t9;
|
|
795
|
+
} else t9 = $[17];
|
|
796
|
+
const themeOptions = t9;
|
|
797
|
+
let t10;
|
|
798
|
+
if ($[18] !== isMobile || $[19] !== setOpenMobile) {
|
|
799
|
+
t10 = () => {
|
|
809
800
|
if (isMobile) setOpenMobile(false);
|
|
810
801
|
};
|
|
811
|
-
$[
|
|
812
|
-
$[
|
|
813
|
-
$[
|
|
814
|
-
} else
|
|
815
|
-
const closeSidebarOnMobile =
|
|
816
|
-
let
|
|
817
|
-
if ($[
|
|
818
|
-
|
|
802
|
+
$[18] = isMobile;
|
|
803
|
+
$[19] = setOpenMobile;
|
|
804
|
+
$[20] = t10;
|
|
805
|
+
} else t10 = $[20];
|
|
806
|
+
const closeSidebarOnMobile = t10;
|
|
807
|
+
let t11;
|
|
808
|
+
if ($[21] !== authClient || $[22] !== basePath || $[23] !== closeSidebarOnMobile || $[24] !== navigate || $[25] !== t) {
|
|
809
|
+
t11 = async () => {
|
|
819
810
|
if (!authClient) return;
|
|
820
811
|
try {
|
|
821
812
|
await authClient.signOut();
|
|
822
813
|
closeSidebarOnMobile();
|
|
823
814
|
navigate(`${basePath}/login`);
|
|
824
|
-
} catch (
|
|
815
|
+
} catch (t12$1) {
|
|
825
816
|
toast.error(t("auth.logoutFailed"));
|
|
826
817
|
}
|
|
827
818
|
};
|
|
828
|
-
$[
|
|
829
|
-
$[
|
|
830
|
-
$[
|
|
831
|
-
$[
|
|
832
|
-
$[
|
|
833
|
-
$[
|
|
834
|
-
} else
|
|
835
|
-
const handleLogout =
|
|
836
|
-
let
|
|
837
|
-
if ($[
|
|
838
|
-
|
|
819
|
+
$[21] = authClient;
|
|
820
|
+
$[22] = basePath;
|
|
821
|
+
$[23] = closeSidebarOnMobile;
|
|
822
|
+
$[24] = navigate;
|
|
823
|
+
$[25] = t;
|
|
824
|
+
$[26] = t11;
|
|
825
|
+
} else t11 = $[26];
|
|
826
|
+
const handleLogout = t11;
|
|
827
|
+
let t12;
|
|
828
|
+
if ($[27] !== basePath || $[28] !== closeSidebarOnMobile || $[29] !== navigate || $[30] !== user) {
|
|
829
|
+
t12 = () => {
|
|
839
830
|
if (user?.id) {
|
|
840
831
|
closeSidebarOnMobile();
|
|
841
832
|
navigate(`${basePath}/collections/user/${user.id}`);
|
|
842
833
|
}
|
|
843
834
|
};
|
|
844
|
-
$[
|
|
845
|
-
$[
|
|
846
|
-
$[
|
|
847
|
-
$[
|
|
848
|
-
$[
|
|
849
|
-
} else
|
|
850
|
-
const handleMyAccount =
|
|
835
|
+
$[27] = basePath;
|
|
836
|
+
$[28] = closeSidebarOnMobile;
|
|
837
|
+
$[29] = navigate;
|
|
838
|
+
$[30] = user;
|
|
839
|
+
$[31] = t12;
|
|
840
|
+
} else t12 = $[31];
|
|
841
|
+
const handleMyAccount = t12;
|
|
851
842
|
if (isPending) {
|
|
852
|
-
let
|
|
853
|
-
if ($[
|
|
854
|
-
|
|
855
|
-
$[
|
|
856
|
-
$[
|
|
857
|
-
} else
|
|
858
|
-
return
|
|
843
|
+
let t13$1;
|
|
844
|
+
if ($[32] !== collapsed) {
|
|
845
|
+
t13$1 = /* @__PURE__ */ jsx(UserFooterSkeleton, { collapsed });
|
|
846
|
+
$[32] = collapsed;
|
|
847
|
+
$[33] = t13$1;
|
|
848
|
+
} else t13$1 = $[33];
|
|
849
|
+
return t13$1;
|
|
859
850
|
}
|
|
860
851
|
if (!authClient || !user) return null;
|
|
861
|
-
let
|
|
862
|
-
if ($[
|
|
863
|
-
|
|
864
|
-
$[
|
|
865
|
-
$[
|
|
866
|
-
$[
|
|
867
|
-
} else
|
|
868
|
-
const displayName =
|
|
852
|
+
let t13;
|
|
853
|
+
if ($[34] !== user.email || $[35] !== user.name) {
|
|
854
|
+
t13 = user.name || user.email?.split("@")[0] || "User";
|
|
855
|
+
$[34] = user.email;
|
|
856
|
+
$[35] = user.name;
|
|
857
|
+
$[36] = t13;
|
|
858
|
+
} else t13 = $[36];
|
|
859
|
+
const displayName = t13;
|
|
869
860
|
const displayEmail = user.email || "";
|
|
870
861
|
const T0 = SidebarFooter;
|
|
871
|
-
const
|
|
862
|
+
const t14 = "qa-sidebar__footer border-sidebar-border/70 border-t p-2";
|
|
872
863
|
const T1 = SidebarMenu;
|
|
873
864
|
const T2 = SidebarMenuItem;
|
|
874
865
|
const T3 = DropdownMenu;
|
|
875
|
-
const
|
|
876
|
-
let
|
|
877
|
-
if ($[
|
|
878
|
-
|
|
879
|
-
$[
|
|
880
|
-
$[
|
|
881
|
-
} else
|
|
882
|
-
let
|
|
883
|
-
if ($[
|
|
884
|
-
|
|
885
|
-
className: "qa-sidebar__user-avatar
|
|
886
|
-
children: /* @__PURE__ */ jsx(
|
|
866
|
+
const t15 = collapsed && "justify-center";
|
|
867
|
+
let t16;
|
|
868
|
+
if ($[37] !== t15) {
|
|
869
|
+
t16 = cn("qa-sidebar__user-trigger flex w-full items-center gap-2.5 rounded-md p-2 text-left transition-[background-color,color,transform] duration-150 ease-out active:scale-[0.96]", "hover:bg-sidebar-accent text-sidebar-foreground", "focus-visible:ring-sidebar-ring focus-visible:ring-1 focus-visible:outline-none", t15);
|
|
870
|
+
$[37] = t15;
|
|
871
|
+
$[38] = t16;
|
|
872
|
+
} else t16 = $[38];
|
|
873
|
+
let t17;
|
|
874
|
+
if ($[39] !== user.image) {
|
|
875
|
+
t17 = /* @__PURE__ */ jsx("div", {
|
|
876
|
+
className: "qa-sidebar__user-avatar border-sidebar-border bg-sidebar-accent text-sidebar-accent-foreground flex size-8 shrink-0 items-center justify-center rounded-md border",
|
|
877
|
+
children: user.image ? /* @__PURE__ */ jsx("img", {
|
|
878
|
+
src: user.image,
|
|
879
|
+
alt: "",
|
|
880
|
+
className: "image-outline size-full rounded-md object-cover"
|
|
881
|
+
}) : /* @__PURE__ */ jsx(Icon, {
|
|
887
882
|
icon: "ph:user-bold",
|
|
888
883
|
className: "size-4"
|
|
889
884
|
})
|
|
890
885
|
});
|
|
891
|
-
$[
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
886
|
+
$[39] = user.image;
|
|
887
|
+
$[40] = t17;
|
|
888
|
+
} else t17 = $[40];
|
|
889
|
+
let t18;
|
|
890
|
+
if ($[41] !== collapsed || $[42] !== displayEmail || $[43] !== displayName) {
|
|
891
|
+
t18 = !collapsed && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
896
892
|
className: "grid flex-1 text-left leading-tight",
|
|
897
893
|
children: [/* @__PURE__ */ jsx("span", {
|
|
898
|
-
className: "qa-sidebar__user-name truncate text-
|
|
894
|
+
className: "qa-sidebar__user-name truncate text-sm font-medium",
|
|
899
895
|
children: displayName
|
|
900
896
|
}), /* @__PURE__ */ jsx("span", {
|
|
901
|
-
className: "qa-sidebar__user-email text-sidebar-foreground/
|
|
897
|
+
className: "qa-sidebar__user-email text-sidebar-foreground/55 truncate text-xs",
|
|
902
898
|
children: displayEmail
|
|
903
899
|
})]
|
|
904
900
|
}), /* @__PURE__ */ jsx(Icon, {
|
|
@@ -906,107 +902,134 @@ function UserFooter() {
|
|
|
906
902
|
className: "text-sidebar-foreground/60 ml-auto size-3.5",
|
|
907
903
|
"aria-hidden": "true"
|
|
908
904
|
})] });
|
|
909
|
-
$[
|
|
910
|
-
$[
|
|
911
|
-
$[
|
|
912
|
-
$[
|
|
913
|
-
} else
|
|
914
|
-
let
|
|
915
|
-
if ($[
|
|
916
|
-
|
|
917
|
-
className:
|
|
918
|
-
children: [
|
|
905
|
+
$[41] = collapsed;
|
|
906
|
+
$[42] = displayEmail;
|
|
907
|
+
$[43] = displayName;
|
|
908
|
+
$[44] = t18;
|
|
909
|
+
} else t18 = $[44];
|
|
910
|
+
let t19;
|
|
911
|
+
if ($[45] !== t16 || $[46] !== t17 || $[47] !== t18) {
|
|
912
|
+
t19 = /* @__PURE__ */ jsxs(DropdownMenuTrigger, {
|
|
913
|
+
className: t16,
|
|
914
|
+
children: [t17, t18]
|
|
919
915
|
});
|
|
920
|
-
$[
|
|
921
|
-
$[
|
|
922
|
-
$[
|
|
923
|
-
|
|
916
|
+
$[45] = t16;
|
|
917
|
+
$[46] = t17;
|
|
918
|
+
$[47] = t18;
|
|
919
|
+
$[48] = t19;
|
|
920
|
+
} else t19 = $[48];
|
|
924
921
|
const T4 = DropdownMenuContent;
|
|
925
|
-
const
|
|
926
|
-
const
|
|
927
|
-
const
|
|
928
|
-
let
|
|
929
|
-
if ($[
|
|
930
|
-
|
|
931
|
-
className: "text-
|
|
922
|
+
const t20 = collapsed ? "right" : "top";
|
|
923
|
+
const t21 = collapsed ? "start" : "start";
|
|
924
|
+
const t22 = "w-56";
|
|
925
|
+
let t23;
|
|
926
|
+
if ($[49] !== displayName) {
|
|
927
|
+
t23 = /* @__PURE__ */ jsx("p", {
|
|
928
|
+
className: "text-sm font-medium",
|
|
932
929
|
children: displayName
|
|
933
930
|
});
|
|
934
|
-
$[
|
|
935
|
-
$[
|
|
936
|
-
} else
|
|
937
|
-
let
|
|
938
|
-
if ($[
|
|
939
|
-
|
|
940
|
-
className: "text-muted-foreground text-
|
|
931
|
+
$[49] = displayName;
|
|
932
|
+
$[50] = t23;
|
|
933
|
+
} else t23 = $[50];
|
|
934
|
+
let t24;
|
|
935
|
+
if ($[51] !== displayEmail) {
|
|
936
|
+
t24 = /* @__PURE__ */ jsx("p", {
|
|
937
|
+
className: "text-muted-foreground text-xs",
|
|
941
938
|
children: displayEmail
|
|
942
939
|
});
|
|
943
|
-
$[
|
|
944
|
-
$[
|
|
945
|
-
} else
|
|
946
|
-
let
|
|
947
|
-
if ($[
|
|
948
|
-
|
|
949
|
-
className: "text-muted-foreground mt-0.5 text-
|
|
940
|
+
$[51] = displayEmail;
|
|
941
|
+
$[52] = t24;
|
|
942
|
+
} else t24 = $[52];
|
|
943
|
+
let t25;
|
|
944
|
+
if ($[53] !== user.role) {
|
|
945
|
+
t25 = user.role && /* @__PURE__ */ jsx("p", {
|
|
946
|
+
className: "text-muted-foreground mt-0.5 text-xs capitalize",
|
|
950
947
|
children: user.role
|
|
951
948
|
});
|
|
952
|
-
$[
|
|
953
|
-
$[
|
|
954
|
-
} else
|
|
955
|
-
let
|
|
956
|
-
if ($[
|
|
957
|
-
|
|
949
|
+
$[53] = user.role;
|
|
950
|
+
$[54] = t25;
|
|
951
|
+
} else t25 = $[54];
|
|
952
|
+
let t26;
|
|
953
|
+
if ($[55] !== t23 || $[56] !== t24 || $[57] !== t25) {
|
|
954
|
+
t26 = /* @__PURE__ */ jsxs("div", {
|
|
958
955
|
className: "px-2 py-1.5",
|
|
959
956
|
children: [
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
957
|
+
t23,
|
|
958
|
+
t24,
|
|
959
|
+
t25
|
|
963
960
|
]
|
|
964
961
|
});
|
|
965
|
-
$[
|
|
966
|
-
$[
|
|
967
|
-
$[
|
|
968
|
-
$[
|
|
969
|
-
} else
|
|
970
|
-
let
|
|
971
|
-
if ($[
|
|
972
|
-
|
|
973
|
-
$[
|
|
974
|
-
} else
|
|
975
|
-
let
|
|
976
|
-
if ($[
|
|
977
|
-
|
|
962
|
+
$[55] = t23;
|
|
963
|
+
$[56] = t24;
|
|
964
|
+
$[57] = t25;
|
|
965
|
+
$[58] = t26;
|
|
966
|
+
} else t26 = $[58];
|
|
967
|
+
let t27;
|
|
968
|
+
if ($[59] === Symbol.for("react.memo_cache_sentinel")) {
|
|
969
|
+
t27 = /* @__PURE__ */ jsx(DropdownMenuSeparator, {});
|
|
970
|
+
$[59] = t27;
|
|
971
|
+
} else t27 = $[59];
|
|
972
|
+
let t28;
|
|
973
|
+
if ($[60] === Symbol.for("react.memo_cache_sentinel")) {
|
|
974
|
+
t28 = /* @__PURE__ */ jsx(Icon, {
|
|
978
975
|
icon: "ph:user-circle",
|
|
979
976
|
className: "size-4"
|
|
980
977
|
});
|
|
981
|
-
$[
|
|
982
|
-
} else
|
|
983
|
-
let
|
|
984
|
-
if ($[
|
|
985
|
-
|
|
986
|
-
$[
|
|
987
|
-
$[
|
|
988
|
-
} else
|
|
989
|
-
let
|
|
990
|
-
if ($[
|
|
991
|
-
|
|
978
|
+
$[60] = t28;
|
|
979
|
+
} else t28 = $[60];
|
|
980
|
+
let t29;
|
|
981
|
+
if ($[61] !== t) {
|
|
982
|
+
t29 = t("auth.myAccount");
|
|
983
|
+
$[61] = t;
|
|
984
|
+
$[62] = t29;
|
|
985
|
+
} else t29 = $[62];
|
|
986
|
+
let t30;
|
|
987
|
+
if ($[63] !== handleMyAccount || $[64] !== t29) {
|
|
988
|
+
t30 = /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
992
989
|
onClick: handleMyAccount,
|
|
993
|
-
children: [
|
|
990
|
+
children: [t28, t29]
|
|
994
991
|
});
|
|
995
|
-
$[
|
|
996
|
-
$[
|
|
997
|
-
$[
|
|
998
|
-
} else
|
|
999
|
-
|
|
992
|
+
$[63] = handleMyAccount;
|
|
993
|
+
$[64] = t29;
|
|
994
|
+
$[65] = t30;
|
|
995
|
+
} else t30 = $[65];
|
|
996
|
+
let t31;
|
|
997
|
+
if ($[66] !== setTheme || $[67] !== shouldShowThemeToggle || $[68] !== t || $[69] !== theme || $[70] !== themeOptions) {
|
|
998
|
+
t31 = shouldShowThemeToggle && /* @__PURE__ */ jsxs(DropdownMenuSub, { children: [/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { children: [/* @__PURE__ */ jsx(Icon, { icon: "ph:circle-half" }), t("ui.toggleTheme")] }), /* @__PURE__ */ jsx(DropdownMenuSubContent, { children: themeOptions.map((option) => /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
999
|
+
onClick: () => setTheme(option.value),
|
|
1000
|
+
children: [
|
|
1001
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
1002
|
+
icon: option.icon,
|
|
1003
|
+
className: "size-4"
|
|
1004
|
+
}),
|
|
1005
|
+
/* @__PURE__ */ jsx("span", {
|
|
1006
|
+
className: "flex-1",
|
|
1007
|
+
children: option.label
|
|
1008
|
+
}),
|
|
1009
|
+
theme === option.value && /* @__PURE__ */ jsx(Icon, {
|
|
1010
|
+
icon: "ph:check",
|
|
1011
|
+
className: "text-foreground size-4"
|
|
1012
|
+
})
|
|
1013
|
+
]
|
|
1014
|
+
}, option.value)) })] });
|
|
1015
|
+
$[66] = setTheme;
|
|
1016
|
+
$[67] = shouldShowThemeToggle;
|
|
1017
|
+
$[68] = t;
|
|
1018
|
+
$[69] = theme;
|
|
1019
|
+
$[70] = themeOptions;
|
|
1020
|
+
$[71] = t31;
|
|
1021
|
+
} else t31 = $[71];
|
|
1022
|
+
const t32 = hasMultipleUiLocales && /* @__PURE__ */ jsxs(DropdownMenuSub, { children: [/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { children: [/* @__PURE__ */ jsx(Icon, { icon: "ph:globe" }), t("locale.uiLanguage")] }), /* @__PURE__ */ jsx(DropdownMenuSubContent, { children: uiLocaleOptions.map((locale) => /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
1000
1023
|
onClick: () => setUiLocale(locale.code),
|
|
1001
1024
|
children: [
|
|
1002
1025
|
/* @__PURE__ */ jsx("img", {
|
|
1003
1026
|
src: getFlagUrl(locale.code),
|
|
1004
1027
|
alt: locale.code,
|
|
1005
|
-
className: "h-3 w-4 object-cover",
|
|
1028
|
+
className: "image-outline h-3 w-4 object-cover",
|
|
1006
1029
|
onError: _temp5
|
|
1007
1030
|
}),
|
|
1008
1031
|
/* @__PURE__ */ jsx("span", {
|
|
1009
|
-
className: "w-6 text-xs font-medium
|
|
1032
|
+
className: "font-chrome chrome-meta w-6 text-xs font-medium",
|
|
1010
1033
|
children: locale.code
|
|
1011
1034
|
}),
|
|
1012
1035
|
/* @__PURE__ */ jsx("span", {
|
|
@@ -1015,23 +1038,23 @@ function UserFooter() {
|
|
|
1015
1038
|
}),
|
|
1016
1039
|
locale.code === uiLocale && /* @__PURE__ */ jsx(Icon, {
|
|
1017
1040
|
icon: "ph:check",
|
|
1018
|
-
className: "text-
|
|
1041
|
+
className: "text-foreground size-4"
|
|
1019
1042
|
})
|
|
1020
1043
|
]
|
|
1021
1044
|
}, locale.code)) })] });
|
|
1022
|
-
let
|
|
1023
|
-
if ($[
|
|
1024
|
-
|
|
1045
|
+
let t33;
|
|
1046
|
+
if ($[72] !== contentLocale || $[73] !== contentLocales || $[74] !== hasMultipleContentLocales || $[75] !== setContentLocale || $[76] !== t) {
|
|
1047
|
+
t33 = hasMultipleContentLocales && /* @__PURE__ */ jsxs(DropdownMenuSub, { children: [/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { children: [/* @__PURE__ */ jsx(Icon, { icon: "ph:translate" }), t("locale.contentLanguage")] }), /* @__PURE__ */ jsx(DropdownMenuSubContent, { children: contentLocales.locales.map((locale_0) => /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
1025
1048
|
onClick: () => setContentLocale(locale_0.code),
|
|
1026
1049
|
children: [
|
|
1027
1050
|
/* @__PURE__ */ jsx("img", {
|
|
1028
1051
|
src: getFlagUrl(locale_0.flagCountryCode ?? locale_0.code),
|
|
1029
1052
|
alt: locale_0.code,
|
|
1030
|
-
className: "h-3 w-4 object-cover",
|
|
1053
|
+
className: "image-outline h-3 w-4 object-cover",
|
|
1031
1054
|
onError: _temp6
|
|
1032
1055
|
}),
|
|
1033
1056
|
/* @__PURE__ */ jsx("span", {
|
|
1034
|
-
className: "w-6 text-xs font-medium
|
|
1057
|
+
className: "font-chrome chrome-meta w-6 text-xs font-medium",
|
|
1035
1058
|
children: locale_0.code
|
|
1036
1059
|
}),
|
|
1037
1060
|
/* @__PURE__ */ jsx("span", {
|
|
@@ -1040,107 +1063,109 @@ function UserFooter() {
|
|
|
1040
1063
|
}),
|
|
1041
1064
|
locale_0.code === contentLocale && /* @__PURE__ */ jsx(Icon, {
|
|
1042
1065
|
icon: "ph:check",
|
|
1043
|
-
className: "text-
|
|
1066
|
+
className: "text-foreground size-4"
|
|
1044
1067
|
})
|
|
1045
1068
|
]
|
|
1046
1069
|
}, locale_0.code)) })] });
|
|
1047
|
-
$[
|
|
1048
|
-
$[
|
|
1049
|
-
$[
|
|
1050
|
-
$[
|
|
1051
|
-
$[
|
|
1052
|
-
$[
|
|
1053
|
-
} else
|
|
1054
|
-
let
|
|
1055
|
-
if ($[
|
|
1056
|
-
|
|
1057
|
-
$[
|
|
1058
|
-
} else
|
|
1059
|
-
let
|
|
1060
|
-
if ($[
|
|
1061
|
-
|
|
1070
|
+
$[72] = contentLocale;
|
|
1071
|
+
$[73] = contentLocales;
|
|
1072
|
+
$[74] = hasMultipleContentLocales;
|
|
1073
|
+
$[75] = setContentLocale;
|
|
1074
|
+
$[76] = t;
|
|
1075
|
+
$[77] = t33;
|
|
1076
|
+
} else t33 = $[77];
|
|
1077
|
+
let t34;
|
|
1078
|
+
if ($[78] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1079
|
+
t34 = /* @__PURE__ */ jsx(DropdownMenuSeparator, {});
|
|
1080
|
+
$[78] = t34;
|
|
1081
|
+
} else t34 = $[78];
|
|
1082
|
+
let t35;
|
|
1083
|
+
if ($[79] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1084
|
+
t35 = /* @__PURE__ */ jsx(Icon, {
|
|
1062
1085
|
icon: "ph:sign-out",
|
|
1063
1086
|
className: "size-4"
|
|
1064
1087
|
});
|
|
1065
|
-
$[
|
|
1066
|
-
} else
|
|
1067
|
-
let
|
|
1068
|
-
if ($[
|
|
1069
|
-
|
|
1070
|
-
$[
|
|
1071
|
-
$[
|
|
1072
|
-
} else
|
|
1073
|
-
let
|
|
1074
|
-
if ($[
|
|
1075
|
-
|
|
1088
|
+
$[79] = t35;
|
|
1089
|
+
} else t35 = $[79];
|
|
1090
|
+
let t36;
|
|
1091
|
+
if ($[80] !== t) {
|
|
1092
|
+
t36 = t("auth.logout");
|
|
1093
|
+
$[80] = t;
|
|
1094
|
+
$[81] = t36;
|
|
1095
|
+
} else t36 = $[81];
|
|
1096
|
+
let t37;
|
|
1097
|
+
if ($[82] !== handleLogout || $[83] !== t36) {
|
|
1098
|
+
t37 = /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
1076
1099
|
variant: "destructive",
|
|
1077
1100
|
onClick: handleLogout,
|
|
1078
|
-
children: [
|
|
1101
|
+
children: [t35, t36]
|
|
1079
1102
|
});
|
|
1080
|
-
$[
|
|
1081
|
-
$[
|
|
1082
|
-
$[
|
|
1083
|
-
} else
|
|
1084
|
-
let
|
|
1085
|
-
if ($[
|
|
1086
|
-
|
|
1087
|
-
side:
|
|
1088
|
-
align:
|
|
1089
|
-
className:
|
|
1103
|
+
$[82] = handleLogout;
|
|
1104
|
+
$[83] = t36;
|
|
1105
|
+
$[84] = t37;
|
|
1106
|
+
} else t37 = $[84];
|
|
1107
|
+
let t38;
|
|
1108
|
+
if ($[85] !== T4 || $[86] !== t20 || $[87] !== t21 || $[88] !== t26 || $[89] !== t27 || $[90] !== t30 || $[91] !== t31 || $[92] !== t32 || $[93] !== t33 || $[94] !== t37) {
|
|
1109
|
+
t38 = /* @__PURE__ */ jsxs(T4, {
|
|
1110
|
+
side: t20,
|
|
1111
|
+
align: t21,
|
|
1112
|
+
className: t22,
|
|
1090
1113
|
children: [
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1114
|
+
t26,
|
|
1115
|
+
t27,
|
|
1116
|
+
t30,
|
|
1117
|
+
t31,
|
|
1118
|
+
t32,
|
|
1119
|
+
t33,
|
|
1120
|
+
t34,
|
|
1121
|
+
t37
|
|
1098
1122
|
]
|
|
1099
1123
|
});
|
|
1100
|
-
$[
|
|
1101
|
-
$[
|
|
1102
|
-
$[
|
|
1103
|
-
$[
|
|
1104
|
-
$[
|
|
1105
|
-
$[
|
|
1106
|
-
$[
|
|
1107
|
-
$[
|
|
1108
|
-
$[
|
|
1109
|
-
$[
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
$[
|
|
1116
|
-
$[
|
|
1117
|
-
$[
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
$[
|
|
1124
|
-
$[
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
$[
|
|
1131
|
-
$[
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1124
|
+
$[85] = T4;
|
|
1125
|
+
$[86] = t20;
|
|
1126
|
+
$[87] = t21;
|
|
1127
|
+
$[88] = t26;
|
|
1128
|
+
$[89] = t27;
|
|
1129
|
+
$[90] = t30;
|
|
1130
|
+
$[91] = t31;
|
|
1131
|
+
$[92] = t32;
|
|
1132
|
+
$[93] = t33;
|
|
1133
|
+
$[94] = t37;
|
|
1134
|
+
$[95] = t38;
|
|
1135
|
+
} else t38 = $[95];
|
|
1136
|
+
let t39;
|
|
1137
|
+
if ($[96] !== T3 || $[97] !== t19 || $[98] !== t38) {
|
|
1138
|
+
t39 = /* @__PURE__ */ jsxs(T3, { children: [t19, t38] });
|
|
1139
|
+
$[96] = T3;
|
|
1140
|
+
$[97] = t19;
|
|
1141
|
+
$[98] = t38;
|
|
1142
|
+
$[99] = t39;
|
|
1143
|
+
} else t39 = $[99];
|
|
1144
|
+
let t40;
|
|
1145
|
+
if ($[100] !== T2 || $[101] !== t39) {
|
|
1146
|
+
t40 = /* @__PURE__ */ jsx(T2, { children: t39 });
|
|
1147
|
+
$[100] = T2;
|
|
1148
|
+
$[101] = t39;
|
|
1149
|
+
$[102] = t40;
|
|
1150
|
+
} else t40 = $[102];
|
|
1151
|
+
let t41;
|
|
1152
|
+
if ($[103] !== T1 || $[104] !== t40) {
|
|
1153
|
+
t41 = /* @__PURE__ */ jsx(T1, { children: t40 });
|
|
1154
|
+
$[103] = T1;
|
|
1155
|
+
$[104] = t40;
|
|
1156
|
+
$[105] = t41;
|
|
1157
|
+
} else t41 = $[105];
|
|
1158
|
+
let t42;
|
|
1159
|
+
if ($[106] !== T0 || $[107] !== t41) {
|
|
1160
|
+
t42 = /* @__PURE__ */ jsx(T0, {
|
|
1161
|
+
className: t14,
|
|
1162
|
+
children: t41
|
|
1138
1163
|
});
|
|
1139
|
-
$[
|
|
1140
|
-
$[
|
|
1141
|
-
$[
|
|
1142
|
-
} else
|
|
1143
|
-
return
|
|
1164
|
+
$[106] = T0;
|
|
1165
|
+
$[107] = t41;
|
|
1166
|
+
$[108] = t42;
|
|
1167
|
+
} else t42 = $[108];
|
|
1168
|
+
return t42;
|
|
1144
1169
|
}
|
|
1145
1170
|
/**
|
|
1146
1171
|
* AdminSidebar Component
|
|
@@ -1174,8 +1199,8 @@ function _temp5(e) {
|
|
|
1174
1199
|
e.currentTarget.style.display = "none";
|
|
1175
1200
|
}
|
|
1176
1201
|
function AdminSidebar(t0) {
|
|
1177
|
-
const $ = c(
|
|
1178
|
-
const { LinkComponent, activeRoute, basePath: t1, brandName: brandNameProp, className, renderBrand, renderNavItem, footer, afterBrand, beforeFooter, useActiveProps: t2 } = t0;
|
|
1202
|
+
const $ = c(98);
|
|
1203
|
+
const { LinkComponent, activeRoute, basePath: t1, brandName: brandNameProp, className, renderBrand, renderNavItem, footer, onSearchOpen, afterBrand, beforeFooter, theme, setTheme, showThemeToggle, useActiveProps: t2 } = t0;
|
|
1179
1204
|
const basePath = t1 === void 0 ? "/admin" : t1;
|
|
1180
1205
|
const useActiveProps = t2 === void 0 ? true : t2;
|
|
1181
1206
|
let t3;
|
|
@@ -1185,194 +1210,339 @@ function AdminSidebar(t0) {
|
|
|
1185
1210
|
$[1] = t3;
|
|
1186
1211
|
} else t3 = $[1];
|
|
1187
1212
|
const { navigation, brandName } = useSidebarProps(t3);
|
|
1188
|
-
const {
|
|
1213
|
+
const { t } = useTranslation();
|
|
1214
|
+
const { state, isMobile, setOpenMobile, toggleSidebar } = useSidebar();
|
|
1189
1215
|
const collapsed = state === "collapsed";
|
|
1216
|
+
const currentActiveRoute = activeRoute ?? (typeof window !== "undefined" ? window.location.pathname : void 0);
|
|
1190
1217
|
const { isSectionCollapsed, toggleSection } = useSidebarCollapsedSections();
|
|
1218
|
+
const admin = useAdminStoreRaw()?.getState().admin;
|
|
1191
1219
|
let t4;
|
|
1192
|
-
if ($[2]
|
|
1193
|
-
t4 =
|
|
1220
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1221
|
+
t4 = { allowDynamicImportLoaders: false };
|
|
1222
|
+
$[2] = t4;
|
|
1223
|
+
} else t4 = $[2];
|
|
1224
|
+
const { Component: BrandOverride } = useLazyComponent(admin?.getComponent("adminSidebarBrand"), t4);
|
|
1225
|
+
let t5;
|
|
1226
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1227
|
+
t5 = { allowDynamicImportLoaders: false };
|
|
1228
|
+
$[3] = t5;
|
|
1229
|
+
} else t5 = $[3];
|
|
1230
|
+
const { Component: NavItemOverride } = useLazyComponent(admin?.getComponent("adminSidebarNavItem"), t5);
|
|
1231
|
+
let t6;
|
|
1232
|
+
if ($[4] !== BrandOverride || $[5] !== renderBrand) {
|
|
1233
|
+
t6 = renderBrand ?? (BrandOverride ? (props) => /* @__PURE__ */ jsx(BrandOverride, { ...props }) : void 0);
|
|
1234
|
+
$[4] = BrandOverride;
|
|
1235
|
+
$[5] = renderBrand;
|
|
1236
|
+
$[6] = t6;
|
|
1237
|
+
} else t6 = $[6];
|
|
1238
|
+
const effectiveRenderBrand = t6;
|
|
1239
|
+
let t7;
|
|
1240
|
+
if ($[7] !== NavItemOverride || $[8] !== renderNavItem) {
|
|
1241
|
+
t7 = renderNavItem ?? (NavItemOverride ? (props_0) => /* @__PURE__ */ jsx(NavItemOverride, { ...props_0 }) : void 0);
|
|
1242
|
+
$[7] = NavItemOverride;
|
|
1243
|
+
$[8] = renderNavItem;
|
|
1244
|
+
$[9] = t7;
|
|
1245
|
+
} else t7 = $[9];
|
|
1246
|
+
const effectiveRenderNavItem = t7;
|
|
1247
|
+
let t8;
|
|
1248
|
+
if ($[10] !== isMobile || $[11] !== setOpenMobile) {
|
|
1249
|
+
t8 = () => {
|
|
1194
1250
|
if (isMobile) setOpenMobile(false);
|
|
1195
1251
|
};
|
|
1196
|
-
$[
|
|
1197
|
-
$[
|
|
1198
|
-
$[
|
|
1199
|
-
} else
|
|
1200
|
-
const handleBrandClick =
|
|
1201
|
-
let
|
|
1202
|
-
if ($[
|
|
1203
|
-
|
|
1204
|
-
name: brandName,
|
|
1205
|
-
collapsed
|
|
1206
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(QuestpieSymbol, {}), !collapsed && /* @__PURE__ */ jsx("div", {
|
|
1252
|
+
$[10] = isMobile;
|
|
1253
|
+
$[11] = setOpenMobile;
|
|
1254
|
+
$[12] = t8;
|
|
1255
|
+
} else t8 = $[12];
|
|
1256
|
+
const handleBrandClick = t8;
|
|
1257
|
+
let t9;
|
|
1258
|
+
if ($[13] !== brandName) {
|
|
1259
|
+
t9 = (isCollapsed) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(QuestpieSymbol, {}), !isCollapsed && /* @__PURE__ */ jsx("div", {
|
|
1207
1260
|
className: "grid flex-1 text-left leading-tight",
|
|
1208
1261
|
children: /* @__PURE__ */ jsx("span", {
|
|
1209
|
-
className: "
|
|
1262
|
+
className: "qa-sidebar__brand-name font-chrome truncate text-sm font-medium",
|
|
1210
1263
|
children: brandName
|
|
1211
1264
|
})
|
|
1212
1265
|
})] });
|
|
1213
|
-
$[
|
|
1214
|
-
$[
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1266
|
+
$[13] = brandName;
|
|
1267
|
+
$[14] = t9;
|
|
1268
|
+
} else t9 = $[14];
|
|
1269
|
+
const renderBuiltInBrand = t9;
|
|
1270
|
+
let t10;
|
|
1271
|
+
if ($[15] !== brandName || $[16] !== effectiveRenderBrand || $[17] !== renderBuiltInBrand) {
|
|
1272
|
+
t10 = (isCollapsed_0) => {
|
|
1273
|
+
const builtInBrand = renderBuiltInBrand(isCollapsed_0);
|
|
1274
|
+
if (!effectiveRenderBrand) return builtInBrand;
|
|
1275
|
+
return /* @__PURE__ */ jsx(React.Suspense, {
|
|
1276
|
+
fallback: builtInBrand,
|
|
1277
|
+
children: effectiveRenderBrand({
|
|
1278
|
+
name: brandName,
|
|
1279
|
+
collapsed: isCollapsed_0
|
|
1280
|
+
})
|
|
1281
|
+
});
|
|
1282
|
+
};
|
|
1283
|
+
$[15] = brandName;
|
|
1284
|
+
$[16] = effectiveRenderBrand;
|
|
1285
|
+
$[17] = renderBuiltInBrand;
|
|
1286
|
+
$[18] = t10;
|
|
1287
|
+
} else t10 = $[18];
|
|
1288
|
+
const renderBrandContent = t10;
|
|
1289
|
+
let t11;
|
|
1290
|
+
if ($[19] !== collapsed || $[20] !== renderBrandContent) {
|
|
1291
|
+
t11 = renderBrandContent(collapsed);
|
|
1292
|
+
$[19] = collapsed;
|
|
1293
|
+
$[20] = renderBrandContent;
|
|
1294
|
+
$[21] = t11;
|
|
1295
|
+
} else t11 = $[21];
|
|
1296
|
+
const brandContent = t11;
|
|
1297
|
+
const t12 = collapsed && "justify-center";
|
|
1298
|
+
let t13;
|
|
1299
|
+
if ($[22] !== t12) {
|
|
1300
|
+
t13 = cn("qa-sidebar__brand flex items-center gap-2 rounded-md p-2 transition-[background-color,color,transform] duration-[var(--motion-duration-base)] ease-[var(--motion-ease-standard)] active:scale-[0.96] motion-reduce:transition-none motion-reduce:active:scale-100", "hover:bg-sidebar-accent", t12);
|
|
1301
|
+
$[22] = t12;
|
|
1302
|
+
$[23] = t13;
|
|
1303
|
+
} else t13 = $[23];
|
|
1304
|
+
let t14;
|
|
1305
|
+
if ($[24] !== LinkComponent || $[25] !== basePath || $[26] !== brandContent || $[27] !== t13) {
|
|
1306
|
+
t14 = /* @__PURE__ */ jsx(LinkComponent, {
|
|
1229
1307
|
to: basePath,
|
|
1230
|
-
className:
|
|
1308
|
+
className: t13,
|
|
1231
1309
|
children: brandContent
|
|
1232
1310
|
});
|
|
1233
|
-
$[
|
|
1234
|
-
$[
|
|
1235
|
-
$[
|
|
1236
|
-
$[
|
|
1237
|
-
$[
|
|
1238
|
-
} else
|
|
1239
|
-
const brandLink =
|
|
1240
|
-
let
|
|
1241
|
-
if ($[
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1311
|
+
$[24] = LinkComponent;
|
|
1312
|
+
$[25] = basePath;
|
|
1313
|
+
$[26] = brandContent;
|
|
1314
|
+
$[27] = t13;
|
|
1315
|
+
$[28] = t14;
|
|
1316
|
+
} else t14 = $[28];
|
|
1317
|
+
const brandLink = t14;
|
|
1318
|
+
let t15;
|
|
1319
|
+
if ($[29] !== onSearchOpen || $[30] !== t) {
|
|
1320
|
+
t15 = onSearchOpen && /* @__PURE__ */ jsx(Button, {
|
|
1321
|
+
type: "button",
|
|
1322
|
+
variant: "ghost",
|
|
1323
|
+
size: "icon-xs",
|
|
1324
|
+
className: "text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground",
|
|
1325
|
+
onClick: onSearchOpen,
|
|
1326
|
+
title: t("common.search"),
|
|
1327
|
+
"aria-label": t("common.search"),
|
|
1328
|
+
children: /* @__PURE__ */ jsx(Icon, { icon: "ph:magnifying-glass" })
|
|
1329
|
+
});
|
|
1330
|
+
$[29] = onSearchOpen;
|
|
1331
|
+
$[30] = t;
|
|
1332
|
+
$[31] = t15;
|
|
1333
|
+
} else t15 = $[31];
|
|
1334
|
+
let t16;
|
|
1335
|
+
if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1336
|
+
t16 = /* @__PURE__ */ jsx(SidebarTrigger, { className: "text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground" });
|
|
1337
|
+
$[32] = t16;
|
|
1338
|
+
} else t16 = $[32];
|
|
1339
|
+
let t17;
|
|
1340
|
+
if ($[33] !== t15) {
|
|
1341
|
+
t17 = /* @__PURE__ */ jsxs("div", {
|
|
1342
|
+
className: "qa-sidebar__header-actions flex shrink-0 items-center gap-1",
|
|
1343
|
+
children: [t15, t16]
|
|
1344
|
+
});
|
|
1345
|
+
$[33] = t15;
|
|
1346
|
+
$[34] = t17;
|
|
1347
|
+
} else t17 = $[34];
|
|
1348
|
+
const sidebarActions = t17;
|
|
1349
|
+
let t18;
|
|
1350
|
+
if ($[35] !== className) {
|
|
1351
|
+
t18 = cn("qa-sidebar bg-sidebar relative border-none", className);
|
|
1352
|
+
$[35] = className;
|
|
1353
|
+
$[36] = t18;
|
|
1354
|
+
} else t18 = $[36];
|
|
1355
|
+
let t19;
|
|
1356
|
+
if ($[37] !== LinkComponent || $[38] !== basePath || $[39] !== brandLink || $[40] !== brandName || $[41] !== collapsed || $[42] !== isMobile || $[43] !== renderBrandContent) {
|
|
1357
|
+
t19 = collapsed && !isMobile ? /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, { render: /* @__PURE__ */ jsx(LinkComponent, {
|
|
1249
1358
|
to: basePath,
|
|
1250
|
-
className: cn("flex items-center gap-2
|
|
1251
|
-
children:
|
|
1252
|
-
name: brandName,
|
|
1253
|
-
collapsed: true
|
|
1254
|
-
}) : /* @__PURE__ */ jsx(QuestpieSymbol, {})
|
|
1359
|
+
className: cn("flex items-center gap-2 rounded-md p-2 transition-[background-color,color,transform] duration-[var(--motion-duration-base)] ease-[var(--motion-ease-standard)] active:scale-[0.96] motion-reduce:transition-none motion-reduce:active:scale-100", "hover:bg-sidebar-accent", "justify-center"),
|
|
1360
|
+
children: renderBrandContent(true)
|
|
1255
1361
|
}) }), /* @__PURE__ */ jsx(TooltipContent, {
|
|
1256
1362
|
side: "right",
|
|
1257
1363
|
children: brandName
|
|
1258
1364
|
})] }) : brandLink;
|
|
1259
|
-
$[
|
|
1260
|
-
$[
|
|
1261
|
-
$[
|
|
1262
|
-
$[
|
|
1263
|
-
$[
|
|
1264
|
-
$[
|
|
1265
|
-
$[
|
|
1266
|
-
$[
|
|
1267
|
-
} else
|
|
1268
|
-
let
|
|
1269
|
-
if ($[
|
|
1270
|
-
|
|
1271
|
-
className: "
|
|
1272
|
-
children: /* @__PURE__ */ jsx(
|
|
1365
|
+
$[37] = LinkComponent;
|
|
1366
|
+
$[38] = basePath;
|
|
1367
|
+
$[39] = brandLink;
|
|
1368
|
+
$[40] = brandName;
|
|
1369
|
+
$[41] = collapsed;
|
|
1370
|
+
$[42] = isMobile;
|
|
1371
|
+
$[43] = renderBrandContent;
|
|
1372
|
+
$[44] = t19;
|
|
1373
|
+
} else t19 = $[44];
|
|
1374
|
+
let t20;
|
|
1375
|
+
if ($[45] !== handleBrandClick || $[46] !== t19) {
|
|
1376
|
+
t20 = /* @__PURE__ */ jsx(SidebarMenu, {
|
|
1377
|
+
className: "min-w-0 flex-1",
|
|
1378
|
+
children: /* @__PURE__ */ jsx(SidebarMenuItem, {
|
|
1273
1379
|
onClickCapture: handleBrandClick,
|
|
1274
|
-
children:
|
|
1275
|
-
})
|
|
1380
|
+
children: t19
|
|
1381
|
+
})
|
|
1276
1382
|
});
|
|
1277
|
-
$[
|
|
1278
|
-
$[
|
|
1279
|
-
$[
|
|
1280
|
-
} else
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1383
|
+
$[45] = handleBrandClick;
|
|
1384
|
+
$[46] = t19;
|
|
1385
|
+
$[47] = t20;
|
|
1386
|
+
} else t20 = $[47];
|
|
1387
|
+
const t21 = !collapsed && sidebarActions;
|
|
1388
|
+
let t22;
|
|
1389
|
+
if ($[48] !== t20 || $[49] !== t21) {
|
|
1390
|
+
t22 = /* @__PURE__ */ jsxs(SidebarHeader, {
|
|
1391
|
+
className: "qa-sidebar__header h-auto flex-row items-center gap-2 border-none px-3 pt-3 pb-1",
|
|
1392
|
+
children: [t20, t21]
|
|
1393
|
+
});
|
|
1394
|
+
$[48] = t20;
|
|
1395
|
+
$[49] = t21;
|
|
1396
|
+
$[50] = t22;
|
|
1397
|
+
} else t22 = $[50];
|
|
1398
|
+
let t23;
|
|
1399
|
+
if ($[51] !== collapsed || $[52] !== isMobile || $[53] !== onSearchOpen || $[54] !== t || $[55] !== toggleSidebar) {
|
|
1400
|
+
t23 = collapsed && !isMobile && /* @__PURE__ */ jsxs("div", {
|
|
1401
|
+
className: "qa-sidebar__collapsed-peek group/peek absolute top-4 -right-3 z-50 flex items-center",
|
|
1402
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
1403
|
+
type: "button",
|
|
1404
|
+
variant: "ghost",
|
|
1405
|
+
size: "icon-xs",
|
|
1406
|
+
className: "border-sidebar-border/70 bg-sidebar text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground h-8 w-3 rounded-l-none rounded-r-md border border-l-0 p-0 shadow-[var(--floating-shadow)]",
|
|
1407
|
+
onClick: toggleSidebar,
|
|
1408
|
+
"aria-label": t("ui.expandSidebar"),
|
|
1409
|
+
children: /* @__PURE__ */ jsx("span", { className: "h-3 w-0.5 rounded-full bg-current opacity-55" })
|
|
1410
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
1411
|
+
className: "floating-surface ml-1 flex scale-95 items-center gap-1 p-1 opacity-0 transition-[opacity,transform] duration-[var(--motion-duration-base)] ease-[var(--motion-ease-enter)] group-focus-within/peek:scale-100 group-focus-within/peek:opacity-100 group-hover/peek:scale-100 group-hover/peek:opacity-100 motion-reduce:scale-100 motion-reduce:transition-none",
|
|
1412
|
+
children: [/* @__PURE__ */ jsx(SidebarTrigger, {
|
|
1413
|
+
className: "text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
1414
|
+
"aria-label": t("ui.expandSidebar")
|
|
1415
|
+
}), onSearchOpen && /* @__PURE__ */ jsx(Button, {
|
|
1416
|
+
type: "button",
|
|
1417
|
+
variant: "ghost",
|
|
1418
|
+
size: "icon-sm",
|
|
1419
|
+
className: "text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
1420
|
+
onClick: onSearchOpen,
|
|
1421
|
+
title: t("common.search"),
|
|
1422
|
+
"aria-label": t("common.search"),
|
|
1423
|
+
children: /* @__PURE__ */ jsx(Icon, { icon: "ph:magnifying-glass" })
|
|
1424
|
+
})]
|
|
1425
|
+
})]
|
|
1426
|
+
});
|
|
1427
|
+
$[51] = collapsed;
|
|
1428
|
+
$[52] = isMobile;
|
|
1429
|
+
$[53] = onSearchOpen;
|
|
1430
|
+
$[54] = t;
|
|
1431
|
+
$[55] = toggleSidebar;
|
|
1432
|
+
$[56] = t23;
|
|
1433
|
+
} else t23 = $[56];
|
|
1434
|
+
let t24;
|
|
1435
|
+
if ($[57] !== afterBrand || $[58] !== collapsed) {
|
|
1436
|
+
t24 = afterBrand && !collapsed && /* @__PURE__ */ jsx("div", {
|
|
1437
|
+
className: "qa-sidebar__after-brand border-sidebar-border/70 border-b px-3 py-2",
|
|
1285
1438
|
children: afterBrand
|
|
1286
1439
|
});
|
|
1287
|
-
$[
|
|
1288
|
-
$[
|
|
1289
|
-
$[
|
|
1290
|
-
} else
|
|
1291
|
-
let
|
|
1292
|
-
if ($[
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1440
|
+
$[57] = afterBrand;
|
|
1441
|
+
$[58] = collapsed;
|
|
1442
|
+
$[59] = t24;
|
|
1443
|
+
} else t24 = $[59];
|
|
1444
|
+
let t25;
|
|
1445
|
+
if ($[60] !== t) {
|
|
1446
|
+
t25 = t("nav.adminNavigation");
|
|
1447
|
+
$[60] = t;
|
|
1448
|
+
$[61] = t25;
|
|
1449
|
+
} else t25 = $[61];
|
|
1450
|
+
let t26;
|
|
1451
|
+
if ($[62] !== LinkComponent || $[63] !== basePath || $[64] !== currentActiveRoute || $[65] !== effectiveRenderNavItem || $[66] !== isSectionCollapsed || $[67] !== navigation || $[68] !== toggleSection || $[69] !== useActiveProps) {
|
|
1452
|
+
let t27$1;
|
|
1453
|
+
if ($[71] !== LinkComponent || $[72] !== basePath || $[73] !== currentActiveRoute || $[74] !== effectiveRenderNavItem || $[75] !== isSectionCollapsed || $[76] !== toggleSection || $[77] !== useActiveProps) {
|
|
1454
|
+
t27$1 = (group, index) => /* @__PURE__ */ jsx(NavGroup, {
|
|
1296
1455
|
group,
|
|
1297
|
-
activeRoute,
|
|
1456
|
+
activeRoute: currentActiveRoute,
|
|
1298
1457
|
LinkComponent,
|
|
1299
|
-
renderNavItem,
|
|
1458
|
+
renderNavItem: effectiveRenderNavItem,
|
|
1300
1459
|
basePath,
|
|
1301
|
-
useActiveProps,
|
|
1460
|
+
useActiveProps: useActiveProps && !currentActiveRoute,
|
|
1302
1461
|
isSectionCollapsed,
|
|
1303
1462
|
toggleSection
|
|
1304
1463
|
}, group.id ?? `group-${index}`);
|
|
1305
|
-
$[
|
|
1306
|
-
$[
|
|
1307
|
-
$[
|
|
1308
|
-
$[
|
|
1309
|
-
$[
|
|
1310
|
-
$[
|
|
1311
|
-
$[
|
|
1312
|
-
$[
|
|
1313
|
-
} else
|
|
1314
|
-
|
|
1315
|
-
$[
|
|
1316
|
-
$[
|
|
1317
|
-
$[
|
|
1318
|
-
$[
|
|
1319
|
-
$[
|
|
1320
|
-
$[
|
|
1321
|
-
$[
|
|
1322
|
-
$[
|
|
1323
|
-
$[
|
|
1324
|
-
} else
|
|
1325
|
-
let
|
|
1326
|
-
if ($[
|
|
1327
|
-
|
|
1328
|
-
className: "qa-sidebar__content",
|
|
1464
|
+
$[71] = LinkComponent;
|
|
1465
|
+
$[72] = basePath;
|
|
1466
|
+
$[73] = currentActiveRoute;
|
|
1467
|
+
$[74] = effectiveRenderNavItem;
|
|
1468
|
+
$[75] = isSectionCollapsed;
|
|
1469
|
+
$[76] = toggleSection;
|
|
1470
|
+
$[77] = useActiveProps;
|
|
1471
|
+
$[78] = t27$1;
|
|
1472
|
+
} else t27$1 = $[78];
|
|
1473
|
+
t26 = navigation.map(t27$1);
|
|
1474
|
+
$[62] = LinkComponent;
|
|
1475
|
+
$[63] = basePath;
|
|
1476
|
+
$[64] = currentActiveRoute;
|
|
1477
|
+
$[65] = effectiveRenderNavItem;
|
|
1478
|
+
$[66] = isSectionCollapsed;
|
|
1479
|
+
$[67] = navigation;
|
|
1480
|
+
$[68] = toggleSection;
|
|
1481
|
+
$[69] = useActiveProps;
|
|
1482
|
+
$[70] = t26;
|
|
1483
|
+
} else t26 = $[70];
|
|
1484
|
+
let t27;
|
|
1485
|
+
if ($[79] !== t25 || $[80] !== t26) {
|
|
1486
|
+
t27 = /* @__PURE__ */ jsx(SidebarContent, {
|
|
1487
|
+
className: "qa-sidebar__content gap-3 px-2 py-3 group-data-[collapsible=icon]:gap-2",
|
|
1329
1488
|
children: /* @__PURE__ */ jsx("nav", {
|
|
1330
|
-
"aria-label":
|
|
1489
|
+
"aria-label": t25,
|
|
1331
1490
|
className: "qa-sidebar__nav",
|
|
1332
|
-
children:
|
|
1491
|
+
children: t26
|
|
1333
1492
|
})
|
|
1334
1493
|
});
|
|
1335
|
-
$[
|
|
1336
|
-
$[
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1494
|
+
$[79] = t25;
|
|
1495
|
+
$[80] = t26;
|
|
1496
|
+
$[81] = t27;
|
|
1497
|
+
} else t27 = $[81];
|
|
1498
|
+
let t28;
|
|
1499
|
+
if ($[82] !== beforeFooter || $[83] !== collapsed) {
|
|
1500
|
+
t28 = beforeFooter && !collapsed && /* @__PURE__ */ jsx("div", {
|
|
1501
|
+
className: "qa-sidebar__before-footer border-sidebar-border/70 border-t px-3 py-2",
|
|
1342
1502
|
children: beforeFooter
|
|
1343
1503
|
});
|
|
1344
|
-
$[
|
|
1345
|
-
$[
|
|
1346
|
-
$[
|
|
1347
|
-
} else
|
|
1348
|
-
let
|
|
1349
|
-
if ($[
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1504
|
+
$[82] = beforeFooter;
|
|
1505
|
+
$[83] = collapsed;
|
|
1506
|
+
$[84] = t28;
|
|
1507
|
+
} else t28 = $[84];
|
|
1508
|
+
let t29;
|
|
1509
|
+
if ($[85] !== footer || $[86] !== setTheme || $[87] !== showThemeToggle || $[88] !== theme) {
|
|
1510
|
+
t29 = footer ?? /* @__PURE__ */ jsx(UserFooter, {
|
|
1511
|
+
theme,
|
|
1512
|
+
setTheme,
|
|
1513
|
+
showThemeToggle
|
|
1514
|
+
});
|
|
1515
|
+
$[85] = footer;
|
|
1516
|
+
$[86] = setTheme;
|
|
1517
|
+
$[87] = showThemeToggle;
|
|
1518
|
+
$[88] = theme;
|
|
1519
|
+
$[89] = t29;
|
|
1520
|
+
} else t29 = $[89];
|
|
1521
|
+
let t30;
|
|
1522
|
+
if ($[90] !== t18 || $[91] !== t22 || $[92] !== t23 || $[93] !== t24 || $[94] !== t27 || $[95] !== t28 || $[96] !== t29) {
|
|
1523
|
+
t30 = /* @__PURE__ */ jsxs(Sidebar, {
|
|
1357
1524
|
collapsible: "icon",
|
|
1358
|
-
|
|
1525
|
+
variant: "inset",
|
|
1526
|
+
className: t18,
|
|
1359
1527
|
children: [
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1528
|
+
t22,
|
|
1529
|
+
t23,
|
|
1530
|
+
t24,
|
|
1531
|
+
t27,
|
|
1532
|
+
t28,
|
|
1533
|
+
t29
|
|
1365
1534
|
]
|
|
1366
1535
|
});
|
|
1367
|
-
$[
|
|
1368
|
-
$[
|
|
1369
|
-
$[
|
|
1370
|
-
$[
|
|
1371
|
-
$[
|
|
1372
|
-
$[
|
|
1373
|
-
$[
|
|
1374
|
-
|
|
1375
|
-
|
|
1536
|
+
$[90] = t18;
|
|
1537
|
+
$[91] = t22;
|
|
1538
|
+
$[92] = t23;
|
|
1539
|
+
$[93] = t24;
|
|
1540
|
+
$[94] = t27;
|
|
1541
|
+
$[95] = t28;
|
|
1542
|
+
$[96] = t29;
|
|
1543
|
+
$[97] = t30;
|
|
1544
|
+
} else t30 = $[97];
|
|
1545
|
+
return t30;
|
|
1376
1546
|
}
|
|
1377
1547
|
|
|
1378
1548
|
//#endregion
|