@jmruthers/pace-core 0.5.190 → 0.5.191
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/dist/{DataTable-IVYljGJ6.d.ts → DataTable-Be6dH_dR.d.ts} +1 -1
- package/dist/{DataTable-ON3IXISJ.js → DataTable-WKRZD47S.js} +6 -6
- package/dist/{PublicPageProvider-C4uxosp6.d.ts → PublicPageProvider-ULXC_u6U.d.ts} +1 -1
- package/dist/{UnifiedAuthProvider-X5NXANVI.js → UnifiedAuthProvider-FTSG5XH7.js} +3 -3
- package/dist/{api-I6UCQ5S6.js → api-IHKALJZD.js} +2 -2
- package/dist/{chunk-J2XXC7R5.js → chunk-6LTQQAT6.js} +77 -111
- package/dist/chunk-6LTQQAT6.js.map +1 -0
- package/dist/{chunk-STYK4OH2.js → chunk-6TQDD426.js} +10 -10
- package/dist/chunk-6TQDD426.js.map +1 -0
- package/dist/{chunk-DZWK57KZ.js → chunk-G37KK66H.js} +1 -1
- package/dist/{chunk-DZWK57KZ.js.map → chunk-G37KK66H.js.map} +1 -1
- package/dist/{chunk-73HSNNOQ.js → chunk-LOMZXPSN.js} +13 -13
- package/dist/{chunk-Y4BUBBHD.js → chunk-OETXORNB.js} +3 -3
- package/dist/{chunk-RUYZKXOD.js → chunk-ROXMHMY2.js} +5 -3
- package/dist/chunk-ROXMHMY2.js.map +1 -0
- package/dist/{chunk-SDMHPX3X.js → chunk-ULHIJK66.js} +56 -21
- package/dist/{chunk-SDMHPX3X.js.map → chunk-ULHIJK66.js.map} +1 -1
- package/dist/{chunk-VVBAW5A5.js → chunk-VKB2CO4Z.js} +46 -35
- package/dist/chunk-VKB2CO4Z.js.map +1 -0
- package/dist/{chunk-HQVPB5MZ.js → chunk-VRGWKHDB.js} +6 -6
- package/dist/{chunk-NIU6J6OX.js → chunk-XNYQOL3Z.js} +16 -16
- package/dist/chunk-XNYQOL3Z.js.map +1 -0
- package/dist/{chunk-4QYC5L4K.js → chunk-XYXSXPUK.js} +22 -27
- package/dist/chunk-XYXSXPUK.js.map +1 -0
- package/dist/components.d.ts +3 -3
- package/dist/components.js +8 -8
- package/dist/{database.generated-DI89OQeI.d.ts → database.generated-CzIvgcPu.d.ts} +165 -201
- package/dist/hooks.d.ts +12 -12
- package/dist/hooks.js +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +18 -23
- package/dist/index.js.map +1 -1
- package/dist/providers.js +2 -2
- package/dist/rbac/index.d.ts +1 -1
- package/dist/rbac/index.js +6 -6
- package/dist/{types-Bwgl--Xo.d.ts → types-CEpcvwwF.d.ts} +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/{usePublicRouteParams-DxIDS4bC.d.ts → usePublicRouteParams-TZe0gy-4.d.ts} +1 -1
- package/dist/utils.d.ts +8 -8
- package/dist/utils.js +2 -2
- package/docs/api/classes/ColumnFactory.md +1 -1
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/classes/InvalidScopeError.md +1 -1
- package/docs/api/classes/Logger.md +1 -1
- package/docs/api/classes/MissingUserContextError.md +1 -1
- package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
- package/docs/api/classes/PermissionDeniedError.md +1 -1
- package/docs/api/classes/RBACAuditManager.md +2 -2
- package/docs/api/classes/RBACCache.md +1 -1
- package/docs/api/classes/RBACEngine.md +2 -2
- package/docs/api/classes/RBACError.md +1 -1
- package/docs/api/classes/RBACNotInitializedError.md +1 -1
- package/docs/api/classes/SecureSupabaseClient.md +5 -5
- package/docs/api/classes/StorageUtils.md +1 -1
- package/docs/api/enums/FileCategory.md +1 -1
- package/docs/api/enums/LogLevel.md +1 -1
- package/docs/api/enums/RBACErrorCode.md +1 -1
- package/docs/api/enums/RPCFunction.md +1 -1
- package/docs/api/interfaces/AddressFieldProps.md +1 -1
- package/docs/api/interfaces/AddressFieldRef.md +1 -1
- package/docs/api/interfaces/AggregateConfig.md +1 -1
- package/docs/api/interfaces/AutocompleteOptions.md +1 -1
- package/docs/api/interfaces/AvatarProps.md +1 -1
- package/docs/api/interfaces/BadgeProps.md +1 -1
- package/docs/api/interfaces/ButtonProps.md +1 -1
- package/docs/api/interfaces/CalendarProps.md +1 -1
- package/docs/api/interfaces/CardProps.md +1 -1
- package/docs/api/interfaces/ColorPalette.md +1 -1
- package/docs/api/interfaces/ColorShade.md +1 -1
- package/docs/api/interfaces/ComplianceResult.md +1 -1
- package/docs/api/interfaces/DataAccessRecord.md +1 -1
- package/docs/api/interfaces/DataRecord.md +1 -1
- package/docs/api/interfaces/DataTableAction.md +1 -1
- package/docs/api/interfaces/DataTableColumn.md +1 -1
- package/docs/api/interfaces/DataTableProps.md +1 -1
- package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
- package/docs/api/interfaces/DatabaseComplianceResult.md +1 -1
- package/docs/api/interfaces/DatabaseIssue.md +1 -1
- package/docs/api/interfaces/EmptyStateConfig.md +1 -1
- package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
- package/docs/api/interfaces/EventAppRoleData.md +1 -1
- package/docs/api/interfaces/ExportColumn.md +1 -1
- package/docs/api/interfaces/ExportOptions.md +1 -1
- package/docs/api/interfaces/FileDisplayProps.md +1 -1
- package/docs/api/interfaces/FileMetadata.md +1 -1
- package/docs/api/interfaces/FileReference.md +1 -1
- package/docs/api/interfaces/FileSizeLimits.md +1 -1
- package/docs/api/interfaces/FileUploadOptions.md +1 -1
- package/docs/api/interfaces/FileUploadProps.md +1 -1
- package/docs/api/interfaces/FooterProps.md +1 -1
- package/docs/api/interfaces/FormFieldProps.md +1 -1
- package/docs/api/interfaces/FormProps.md +1 -1
- package/docs/api/interfaces/GrantEventAppRoleParams.md +1 -1
- package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
- package/docs/api/interfaces/InputProps.md +1 -1
- package/docs/api/interfaces/LabelProps.md +1 -1
- package/docs/api/interfaces/LoggerConfig.md +1 -1
- package/docs/api/interfaces/LoginFormProps.md +1 -1
- package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
- package/docs/api/interfaces/NavigationContextType.md +1 -1
- package/docs/api/interfaces/NavigationGuardProps.md +1 -1
- package/docs/api/interfaces/NavigationItem.md +1 -1
- package/docs/api/interfaces/NavigationMenuProps.md +1 -1
- package/docs/api/interfaces/NavigationProviderProps.md +1 -1
- package/docs/api/interfaces/Organisation.md +1 -1
- package/docs/api/interfaces/OrganisationContextType.md +1 -1
- package/docs/api/interfaces/OrganisationMembership.md +1 -1
- package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
- package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
- package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
- package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
- package/docs/api/interfaces/PageAccessRecord.md +1 -1
- package/docs/api/interfaces/PagePermissionContextType.md +1 -1
- package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
- package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
- package/docs/api/interfaces/PaletteData.md +1 -1
- package/docs/api/interfaces/ParsedAddress.md +2 -2
- package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
- package/docs/api/interfaces/ProgressProps.md +1 -1
- package/docs/api/interfaces/ProtectedRouteProps.md +1 -1
- package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
- package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
- package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
- package/docs/api/interfaces/QuickFix.md +1 -1
- package/docs/api/interfaces/RBACAccessValidateParams.md +1 -1
- package/docs/api/interfaces/RBACAccessValidateResult.md +1 -1
- package/docs/api/interfaces/RBACAuditLogParams.md +1 -1
- package/docs/api/interfaces/RBACAuditLogResult.md +1 -1
- package/docs/api/interfaces/RBACConfig.md +2 -2
- package/docs/api/interfaces/RBACContext.md +1 -1
- package/docs/api/interfaces/RBACLogger.md +1 -1
- package/docs/api/interfaces/RBACPageAccessCheckParams.md +1 -1
- package/docs/api/interfaces/RBACPerformanceMetrics.md +1 -1
- package/docs/api/interfaces/RBACPermissionCheckParams.md +1 -1
- package/docs/api/interfaces/RBACPermissionCheckResult.md +1 -1
- package/docs/api/interfaces/RBACPermissionsGetParams.md +1 -1
- package/docs/api/interfaces/RBACPermissionsGetResult.md +1 -1
- package/docs/api/interfaces/RBACResult.md +1 -1
- package/docs/api/interfaces/RBACRoleGrantParams.md +1 -1
- package/docs/api/interfaces/RBACRoleGrantResult.md +1 -1
- package/docs/api/interfaces/RBACRoleRevokeParams.md +1 -1
- package/docs/api/interfaces/RBACRoleRevokeResult.md +1 -1
- package/docs/api/interfaces/RBACRoleValidateParams.md +1 -1
- package/docs/api/interfaces/RBACRoleValidateResult.md +1 -1
- package/docs/api/interfaces/RBACRolesListParams.md +1 -1
- package/docs/api/interfaces/RBACRolesListResult.md +1 -1
- package/docs/api/interfaces/RBACSessionTrackParams.md +1 -1
- package/docs/api/interfaces/RBACSessionTrackResult.md +1 -1
- package/docs/api/interfaces/ResourcePermissions.md +1 -1
- package/docs/api/interfaces/RevokeEventAppRoleParams.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
- package/docs/api/interfaces/RoleManagementResult.md +1 -1
- package/docs/api/interfaces/RouteAccessRecord.md +1 -1
- package/docs/api/interfaces/RouteConfig.md +1 -1
- package/docs/api/interfaces/RuntimeComplianceResult.md +1 -1
- package/docs/api/interfaces/SecureDataContextType.md +1 -1
- package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
- package/docs/api/interfaces/SessionRestorationLoaderProps.md +1 -1
- package/docs/api/interfaces/SetupIssue.md +1 -1
- package/docs/api/interfaces/StorageConfig.md +1 -1
- package/docs/api/interfaces/StorageFileInfo.md +1 -1
- package/docs/api/interfaces/StorageFileMetadata.md +1 -1
- package/docs/api/interfaces/StorageListOptions.md +1 -1
- package/docs/api/interfaces/StorageListResult.md +1 -1
- package/docs/api/interfaces/StorageUploadOptions.md +1 -1
- package/docs/api/interfaces/StorageUploadResult.md +1 -1
- package/docs/api/interfaces/StorageUrlOptions.md +1 -1
- package/docs/api/interfaces/StyleImport.md +1 -1
- package/docs/api/interfaces/SwitchProps.md +1 -1
- package/docs/api/interfaces/TabsContentProps.md +1 -1
- package/docs/api/interfaces/TabsListProps.md +1 -1
- package/docs/api/interfaces/TabsProps.md +1 -1
- package/docs/api/interfaces/TabsTriggerProps.md +1 -1
- package/docs/api/interfaces/TextareaProps.md +1 -1
- package/docs/api/interfaces/ToastActionElement.md +1 -1
- package/docs/api/interfaces/ToastProps.md +1 -1
- package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
- package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
- package/docs/api/interfaces/UseFormDialogOptions.md +1 -1
- package/docs/api/interfaces/UseFormDialogReturn.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoOptions.md +2 -2
- package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
- package/docs/api/interfaces/UsePublicFileDisplayOptions.md +2 -2
- package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
- package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeOptions.md +2 -2
- package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
- package/docs/api/interfaces/UseResourcePermissionsOptions.md +1 -1
- package/docs/api/interfaces/UserEventAccess.md +1 -1
- package/docs/api/interfaces/UserMenuProps.md +1 -1
- package/docs/api/interfaces/UserProfile.md +1 -1
- package/docs/api/modules.md +16 -16
- package/docs/migration/README.md +18 -0
- package/docs/migration/database-changes-december-2025.md +767 -0
- package/docs/migration/person-scoped-profiles-migration-guide.md +472 -0
- package/package.json +1 -1
- package/src/__tests__/public-recipe-view.test.ts +10 -10
- package/src/__tests__/rls-policies.test.ts +13 -13
- package/src/components/AddressField/README.md +6 -6
- package/src/components/OrganisationSelector/OrganisationSelector.tsx +35 -15
- package/src/components/Select/Select.test.tsx +4 -1
- package/src/components/Select/Select.tsx +60 -15
- package/src/hooks/__tests__/usePermissionCache.simple.test.ts +192 -0
- package/src/hooks/__tests__/usePermissionCache.unit.test.ts +741 -0
- package/src/hooks/__tests__/usePublicEvent.simple.test.ts +703 -0
- package/src/hooks/__tests__/usePublicEvent.unit.test.ts +581 -0
- package/src/hooks/__tests__/useSecureDataAccess.unit.test.tsx +9 -8
- package/src/hooks/public/usePublicEvent.ts +8 -8
- package/src/hooks/public/usePublicFileDisplay.ts +2 -2
- package/src/hooks/useFileDisplay.ts +8 -9
- package/src/hooks/useQueryCache.ts +6 -6
- package/src/hooks/useSecureDataAccess.test.ts +8 -8
- package/src/hooks/useSecureDataAccess.ts +15 -11
- package/src/providers/__tests__/OrganisationProvider.test.tsx +27 -21
- package/src/rbac/hooks/useRBAC.simple.test.ts +95 -0
- package/src/rbac/utils/__tests__/eventContext.test.ts +2 -2
- package/src/rbac/utils/__tests__/eventContext.unit.test.ts +490 -0
- package/src/rbac/utils/eventContext.ts +5 -2
- package/src/services/AuthService.ts +37 -8
- package/src/services/OrganisationService.ts +92 -139
- package/src/services/__tests__/OrganisationService.pagination.test.ts +34 -8
- package/src/services/__tests__/OrganisationService.test.ts +218 -86
- package/src/types/database.generated.ts +166 -201
- package/src/types/supabase.ts +2 -2
- package/src/utils/__tests__/secureDataAccess.unit.test.ts +3 -2
- package/src/utils/file-reference/index.ts +4 -4
- package/src/utils/google-places/googlePlacesUtils.ts +1 -1
- package/src/utils/google-places/types.ts +1 -1
- package/src/utils/request-deduplication.ts +4 -4
- package/src/utils/security/secureDataAccess.test.ts +1 -1
- package/src/utils/security/secureDataAccess.ts +7 -4
- package/src/utils/storage/README.md +1 -1
- package/dist/chunk-4QYC5L4K.js.map +0 -1
- package/dist/chunk-J2XXC7R5.js.map +0 -1
- package/dist/chunk-NIU6J6OX.js.map +0 -1
- package/dist/chunk-RUYZKXOD.js.map +0 -1
- package/dist/chunk-STYK4OH2.js.map +0 -1
- package/dist/chunk-VVBAW5A5.js.map +0 -1
- /package/dist/{DataTable-ON3IXISJ.js.map → DataTable-WKRZD47S.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-X5NXANVI.js.map → UnifiedAuthProvider-FTSG5XH7.js.map} +0 -0
- /package/dist/{api-I6UCQ5S6.js.map → api-IHKALJZD.js.map} +0 -0
- /package/dist/{chunk-73HSNNOQ.js.map → chunk-LOMZXPSN.js.map} +0 -0
- /package/dist/{chunk-Y4BUBBHD.js.map → chunk-OETXORNB.js.map} +0 -0
- /package/dist/{chunk-HQVPB5MZ.js.map → chunk-VRGWKHDB.js.map} +0 -0
|
@@ -25,12 +25,12 @@ import {
|
|
|
25
25
|
SelectSeparator,
|
|
26
26
|
SelectTrigger,
|
|
27
27
|
SelectValue
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-ULHIJK66.js";
|
|
29
29
|
import {
|
|
30
30
|
useCan,
|
|
31
31
|
usePermissions,
|
|
32
32
|
useRBAC
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-VRGWKHDB.js";
|
|
34
34
|
import {
|
|
35
35
|
createFileReferenceService,
|
|
36
36
|
generateFileUrlsBatch,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
useFileDisplay,
|
|
43
43
|
usePreventTabReload,
|
|
44
44
|
usePublicFileDisplay
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-XNYQOL3Z.js";
|
|
46
46
|
import {
|
|
47
47
|
useToast
|
|
48
48
|
} from "./chunk-6C4YBBJM.js";
|
|
@@ -53,16 +53,16 @@ import {
|
|
|
53
53
|
useEvents,
|
|
54
54
|
useIsPublicPage,
|
|
55
55
|
useResolvedScope
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-OETXORNB.js";
|
|
57
57
|
import {
|
|
58
58
|
EventServiceContext,
|
|
59
59
|
useOrganisations,
|
|
60
60
|
useSessionRestoration,
|
|
61
61
|
useUnifiedAuth
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-6LTQQAT6.js";
|
|
63
63
|
import {
|
|
64
64
|
isSuperAdmin
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-ROXMHMY2.js";
|
|
66
66
|
import {
|
|
67
67
|
assertAppId
|
|
68
68
|
} from "./chunk-QXHPKYJV.js";
|
|
@@ -2560,7 +2560,7 @@ function EventSelector({
|
|
|
2560
2560
|
}
|
|
2561
2561
|
|
|
2562
2562
|
// src/components/OrganisationSelector/OrganisationSelector.tsx
|
|
2563
|
-
import { useState as useState8, useCallback as useCallback8 } from "react";
|
|
2563
|
+
import { useState as useState8, useCallback as useCallback8, useMemo as useMemo6 } from "react";
|
|
2564
2564
|
import { RefreshCw as RefreshCw2, AlertCircle as AlertCircle2, Building2, Shield } from "lucide-react";
|
|
2565
2565
|
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2566
2566
|
function OrganisationSelector({
|
|
@@ -2685,18 +2685,29 @@ function OrganisationSelector({
|
|
|
2685
2685
|
/* @__PURE__ */ jsx14(AlertCircle2, { className: "size-4" }),
|
|
2686
2686
|
/* @__PURE__ */ jsx14(AlertDescription, { children: switchError })
|
|
2687
2687
|
] });
|
|
2688
|
-
|
|
2688
|
+
const isSelectDisabled = disabled || isLoading;
|
|
2689
|
+
const selectValue = useMemo6(() => {
|
|
2690
|
+
return selectedOrganisation?.id || "";
|
|
2691
|
+
}, [selectedOrganisation?.id]);
|
|
2692
|
+
return /* @__PURE__ */ jsxs9("div", { className, children: [
|
|
2689
2693
|
/* @__PURE__ */ jsxs9(
|
|
2690
2694
|
Select,
|
|
2691
2695
|
{
|
|
2692
|
-
value:
|
|
2696
|
+
value: selectValue,
|
|
2693
2697
|
onValueChange: handleOrganisationChange,
|
|
2694
|
-
disabled:
|
|
2698
|
+
disabled: isSelectDisabled,
|
|
2695
2699
|
children: [
|
|
2696
|
-
/* @__PURE__ */ jsx14(
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
+
/* @__PURE__ */ jsx14(
|
|
2701
|
+
SelectTrigger,
|
|
2702
|
+
{
|
|
2703
|
+
className: "text-left",
|
|
2704
|
+
variant: "outline",
|
|
2705
|
+
children: /* @__PURE__ */ jsx14(SelectValue, { placeholder, children: selectedOrganisation && /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2", children: [
|
|
2706
|
+
isLoading ? /* @__PURE__ */ jsx14(LoadingSpinner, { size: "sm" }) : /* @__PURE__ */ jsx14(Building2, { className: "size-4 flex-shrink-0" }),
|
|
2707
|
+
/* @__PURE__ */ jsx14("span", { className: "truncate", children: selectedOrganisation.display_name })
|
|
2708
|
+
] }) })
|
|
2709
|
+
}
|
|
2710
|
+
),
|
|
2700
2711
|
/* @__PURE__ */ jsx14(SelectContent, { children: organisations.map((org) => {
|
|
2701
2712
|
const userRole = getUserRole(org.id);
|
|
2702
2713
|
const hasAccess = validateOrganisationAccess(org.id);
|
|
@@ -2726,7 +2737,7 @@ function OrganisationSelector({
|
|
|
2726
2737
|
]
|
|
2727
2738
|
}
|
|
2728
2739
|
),
|
|
2729
|
-
switchErrorDisplay
|
|
2740
|
+
switchErrorDisplay && /* @__PURE__ */ jsx14("div", { className: "mt-2", children: switchErrorDisplay })
|
|
2730
2741
|
] });
|
|
2731
2742
|
}
|
|
2732
2743
|
|
|
@@ -2805,7 +2816,7 @@ function PasswordChangeForm({ onSubmit, className }) {
|
|
|
2805
2816
|
}
|
|
2806
2817
|
|
|
2807
2818
|
// src/components/UserMenu/UserMenu.tsx
|
|
2808
|
-
import React14, { useCallback as useCallback9, useMemo as
|
|
2819
|
+
import React14, { useCallback as useCallback9, useMemo as useMemo7, useState as useState10 } from "react";
|
|
2809
2820
|
import { ChevronDown, LogOut, KeyRound } from "lucide-react";
|
|
2810
2821
|
import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2811
2822
|
var UserMenu = React14.memo(function UserMenu2({
|
|
@@ -2816,7 +2827,7 @@ var UserMenu = React14.memo(function UserMenu2({
|
|
|
2816
2827
|
showAvatar = true
|
|
2817
2828
|
}) {
|
|
2818
2829
|
const [isPasswordDialogOpen, setPasswordDialogOpen] = useState10(false);
|
|
2819
|
-
const userInfo =
|
|
2830
|
+
const userInfo = useMemo7(() => {
|
|
2820
2831
|
if (!user) return null;
|
|
2821
2832
|
return {
|
|
2822
2833
|
email: user.email,
|
|
@@ -2959,7 +2970,7 @@ var NavigationMenu = React15.forwardRef(({
|
|
|
2959
2970
|
}
|
|
2960
2971
|
const userId2 = authContext.user.id;
|
|
2961
2972
|
const appName = authContext.appName;
|
|
2962
|
-
import("./api-
|
|
2973
|
+
import("./api-IHKALJZD.js").then(({ resolveAppContext }) => {
|
|
2963
2974
|
resolveAppContext({
|
|
2964
2975
|
userId: userId2,
|
|
2965
2976
|
appName
|
|
@@ -3528,7 +3539,7 @@ var Footer = React16.memo(FooterComponent);
|
|
|
3528
3539
|
Footer.displayName = "Footer";
|
|
3529
3540
|
|
|
3530
3541
|
// src/components/PaceAppLayout/PaceAppLayout.tsx
|
|
3531
|
-
import { useState as useState12, useEffect as useEffect8, useMemo as
|
|
3542
|
+
import { useState as useState12, useEffect as useEffect8, useMemo as useMemo9 } from "react";
|
|
3532
3543
|
import { Outlet, useNavigate, useLocation } from "react-router-dom";
|
|
3533
3544
|
import { Fragment as Fragment7, jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3534
3545
|
var EMPTY_PAGE_ID_MAPPING = {};
|
|
@@ -3586,7 +3597,7 @@ function PaceAppLayout({
|
|
|
3586
3597
|
selectedEventId: selectedEvent?.event_id || null
|
|
3587
3598
|
});
|
|
3588
3599
|
const resolvedAppId = contextAppId || resolvedScope?.appId;
|
|
3589
|
-
const scope =
|
|
3600
|
+
const scope = useMemo9(() => {
|
|
3590
3601
|
if (resolvedScope?.organisationId) {
|
|
3591
3602
|
return resolvedScope;
|
|
3592
3603
|
}
|
|
@@ -3603,19 +3614,19 @@ function PaceAppLayout({
|
|
|
3603
3614
|
appId: resolvedAppId || resolvedScope?.appId || void 0
|
|
3604
3615
|
};
|
|
3605
3616
|
}, [resolvedScope, selectedOrganisation?.id, selectedEvent?.event_id, resolvedAppId]);
|
|
3606
|
-
const defaultNavItems =
|
|
3617
|
+
const defaultNavItems = useMemo9(() => [
|
|
3607
3618
|
{ id: "home", label: "Home", href: "/", icon: "Home" },
|
|
3608
3619
|
{ id: "dashboard", label: "Dashboard", href: "/dashboard", icon: "LayoutDashboard" },
|
|
3609
3620
|
{ id: "settings", label: "Settings", href: "/settings", icon: "Settings" },
|
|
3610
3621
|
{ id: "ui-showcase", label: "UI Showcase", href: "/ui-showcase", icon: "Component" },
|
|
3611
3622
|
{ id: "data-table-showcase", label: "DataTable Showcase", href: "/data-table-showcase", icon: "Table" }
|
|
3612
3623
|
], []);
|
|
3613
|
-
const baseMenuItems =
|
|
3614
|
-
const currentRoutePermission =
|
|
3624
|
+
const baseMenuItems = useMemo9(() => navItems || defaultNavItems, [navItems]);
|
|
3625
|
+
const currentRoutePermission = useMemo9(() => {
|
|
3615
3626
|
const currentPath = location.pathname;
|
|
3616
3627
|
return routePermissions[currentPath] || defaultPermission;
|
|
3617
3628
|
}, [location.pathname, routePermissions, defaultPermission]);
|
|
3618
|
-
const currentPageId =
|
|
3629
|
+
const currentPageId = useMemo9(() => {
|
|
3619
3630
|
const currentPath = location.pathname;
|
|
3620
3631
|
if (pageIdMapping[currentPath]) {
|
|
3621
3632
|
return pageIdMapping[currentPath];
|
|
@@ -3623,7 +3634,7 @@ function PaceAppLayout({
|
|
|
3623
3634
|
const pathSegments = currentPath.slice(1).split("/").filter(Boolean);
|
|
3624
3635
|
return pathSegments[0] || "home";
|
|
3625
3636
|
}, [location.pathname, pageIdMapping]);
|
|
3626
|
-
const currentPermission =
|
|
3637
|
+
const currentPermission = useMemo9(() => {
|
|
3627
3638
|
if (!enforcePermissions) {
|
|
3628
3639
|
return "read:page.home";
|
|
3629
3640
|
}
|
|
@@ -3714,7 +3725,7 @@ function PaceAppLayout({
|
|
|
3714
3725
|
return;
|
|
3715
3726
|
}
|
|
3716
3727
|
try {
|
|
3717
|
-
const { isSuperAdmin: isSuperAdmin2 } = await import("./api-
|
|
3728
|
+
const { isSuperAdmin: isSuperAdmin2 } = await import("./api-IHKALJZD.js");
|
|
3718
3729
|
const isSuper = await isSuperAdmin2(user.id);
|
|
3719
3730
|
if (isSuper) {
|
|
3720
3731
|
if (isMounted) {
|
|
@@ -3729,7 +3740,7 @@ function PaceAppLayout({
|
|
|
3729
3740
|
}
|
|
3730
3741
|
}
|
|
3731
3742
|
try {
|
|
3732
|
-
const { getPermissionMap } = await import("./api-
|
|
3743
|
+
const { getPermissionMap } = await import("./api-IHKALJZD.js");
|
|
3733
3744
|
const permissionScope = {
|
|
3734
3745
|
organisationId: currentScope.organisationId,
|
|
3735
3746
|
eventId: currentScope.eventId,
|
|
@@ -3785,7 +3796,7 @@ function PaceAppLayout({
|
|
|
3785
3796
|
let hasAccess = true;
|
|
3786
3797
|
if (currentRoute.pageId && currentRoute.permissions && currentRoute.permissions.length > 0) {
|
|
3787
3798
|
try {
|
|
3788
|
-
const { isPermittedCached } = await import("./api-
|
|
3799
|
+
const { isPermittedCached } = await import("./api-IHKALJZD.js");
|
|
3789
3800
|
const hasPagePermission = await isPermittedCached({
|
|
3790
3801
|
userId: user?.id || "",
|
|
3791
3802
|
scope,
|
|
@@ -3801,7 +3812,7 @@ function PaceAppLayout({
|
|
|
3801
3812
|
}
|
|
3802
3813
|
}
|
|
3803
3814
|
if (hasAccess && currentRoute.roles && currentRoute.roles.length > 0 && user?.id) {
|
|
3804
|
-
const { useUnifiedAuth: useUnifiedAuth2 } = await import("./UnifiedAuthProvider-
|
|
3815
|
+
const { useUnifiedAuth: useUnifiedAuth2 } = await import("./UnifiedAuthProvider-FTSG5XH7.js");
|
|
3805
3816
|
hasAccess = true;
|
|
3806
3817
|
}
|
|
3807
3818
|
if (!isMounted) return;
|
|
@@ -4113,7 +4124,7 @@ var SessionRestorationLoader = ({
|
|
|
4113
4124
|
};
|
|
4114
4125
|
|
|
4115
4126
|
// src/components/ProtectedRoute/ProtectedRoute.tsx
|
|
4116
|
-
import { useMemo as
|
|
4127
|
+
import { useMemo as useMemo10, useEffect as useEffect10, useRef as useRef8, useState as useState14 } from "react";
|
|
4117
4128
|
import { Navigate, Outlet as Outlet2 } from "react-router-dom";
|
|
4118
4129
|
import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4119
4130
|
function ProtectedRoute({
|
|
@@ -4190,7 +4201,7 @@ function ProtectedRoute({
|
|
|
4190
4201
|
tabJustBecameVisibleRef.current = false;
|
|
4191
4202
|
}
|
|
4192
4203
|
}, [isAuthenticated]);
|
|
4193
|
-
const isRestoringSession =
|
|
4204
|
+
const isRestoringSession = useMemo10(() => {
|
|
4194
4205
|
return sessionRestoration.isRestoring && !sessionRestoration.restorationComplete && !sessionRestoration.restorationError && !sessionRestoration.hasTimedOut;
|
|
4195
4206
|
}, [
|
|
4196
4207
|
sessionRestoration.isRestoring,
|
|
@@ -4247,7 +4258,7 @@ function ProtectedRoute({
|
|
|
4247
4258
|
}
|
|
4248
4259
|
|
|
4249
4260
|
// src/components/FileUpload/FileUpload.tsx
|
|
4250
|
-
import { useState as useState15, useCallback as useCallback11, useRef as useRef9, useEffect as useEffect11, useMemo as
|
|
4261
|
+
import { useState as useState15, useCallback as useCallback11, useRef as useRef9, useEffect as useEffect11, useMemo as useMemo11 } from "react";
|
|
4251
4262
|
import { Fragment as Fragment8, jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4252
4263
|
function FileUpload({
|
|
4253
4264
|
supabase,
|
|
@@ -4316,12 +4327,12 @@ function FileUpload({
|
|
|
4316
4327
|
};
|
|
4317
4328
|
resolveAppId();
|
|
4318
4329
|
}, [app_id, supabase]);
|
|
4319
|
-
const isUploading =
|
|
4330
|
+
const isUploading = useMemo11(() => {
|
|
4320
4331
|
return uploadStates.size > 0 && Array.from(uploadStates.values()).some(
|
|
4321
4332
|
(state) => state.progress.status === "uploading" || state.progress.status === "processing"
|
|
4322
4333
|
);
|
|
4323
4334
|
}, [uploadStates]);
|
|
4324
|
-
const isDisabled =
|
|
4335
|
+
const isDisabled = useMemo11(() => {
|
|
4325
4336
|
return disabled || isUploading || isResolvingAppId || !resolvedAppId;
|
|
4326
4337
|
}, [disabled, isUploading, isResolvingAppId, resolvedAppId]);
|
|
4327
4338
|
const generatePreview = useCallback11((file) => {
|
|
@@ -4982,4 +4993,4 @@ export {
|
|
|
4982
4993
|
PublicPageFooter,
|
|
4983
4994
|
PublicPageLayout
|
|
4984
4995
|
};
|
|
4985
|
-
//# sourceMappingURL=chunk-
|
|
4996
|
+
//# sourceMappingURL=chunk-VKB2CO4Z.js.map
|