@jmruthers/pace-core 0.5.136 → 0.5.139
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-CYOHOX3O.js → DataTable-JXFCA2BJ.js} +10 -9
- package/dist/{EventLogo-801uofbR.d.ts → EventLogo-rFL_kRjk.d.ts} +73 -1
- package/dist/{UnifiedAuthProvider-5E5TUNMS.js → UnifiedAuthProvider-XIQQ7LVU.js} +4 -5
- package/dist/{chunk-YLKIDTUK.js → chunk-22WKWKRX.js} +4 -4
- package/dist/{chunk-TVYPTYOY.js → chunk-4C7EXCAR.js} +60 -24
- package/dist/chunk-4C7EXCAR.js.map +1 -0
- package/dist/{chunk-NOHEVYVX.js → chunk-5JMOHWDI.js} +417 -319
- package/dist/chunk-5JMOHWDI.js.map +1 -0
- package/dist/{chunk-FHWWBIHA.js → chunk-6DXZ6V5Q.js} +5 -5
- package/dist/{chunk-2TWNJ46Y.js → chunk-6LAAY47Q.js} +2 -2
- package/dist/{chunk-444EZN6N.js → chunk-7QCC6MCP.js} +88 -1
- package/dist/chunk-7QCC6MCP.js.map +1 -0
- package/dist/chunk-BJPBT3CU.js +21 -0
- package/dist/chunk-BJPBT3CU.js.map +1 -0
- package/dist/{chunk-L6PGMCMD.js → chunk-BOOI7GK2.js} +38 -12
- package/dist/chunk-BOOI7GK2.js.map +1 -0
- package/dist/{chunk-XARJS7CD.js → chunk-INQLMHPF.js} +2 -2
- package/dist/chunk-JISYG63F.js +70 -0
- package/dist/chunk-JISYG63F.js.map +1 -0
- package/dist/{chunk-SL2YQDR6.js → chunk-MA6EPSGZ.js} +2 -2
- package/dist/{chunk-5DPZ5EAT.js → chunk-OWAG3GSU.js} +1 -3
- package/dist/{chunk-LTV3XIJJ.js → chunk-T6JN6LH6.js} +4 -4
- package/dist/{chunk-HJGGOMQ6.js → chunk-TLT2ZR3L.js} +147 -103
- package/dist/chunk-TLT2ZR3L.js.map +1 -0
- package/dist/{chunk-4MT5BGGL.js → chunk-YCWDTTUK.js} +4 -6
- package/dist/{chunk-4MT5BGGL.js.map → chunk-YCWDTTUK.js.map} +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/components.js +12 -11
- package/dist/components.js.map +1 -1
- package/dist/hooks.js +8 -9
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -14
- package/dist/index.js.map +1 -1
- package/dist/providers.js +3 -4
- package/dist/rbac/index.js +8 -9
- package/dist/schema-DTDZQe2u.d.ts +28 -0
- package/dist/types.d.ts +152 -3
- package/dist/types.js +51 -16
- package/dist/types.js.map +1 -1
- package/dist/utils.d.ts +89 -4
- package/dist/utils.js +214 -96
- package/dist/utils.js.map +1 -1
- package/dist/validation.d.ts +1 -343
- package/dist/validation.js +3 -100
- 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/MissingUserContextError.md +1 -1
- package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
- package/docs/api/classes/PermissionDeniedError.md +1 -1
- package/docs/api/classes/PublicErrorBoundary.md +1 -1
- package/docs/api/classes/RBACAuditManager.md +1 -1
- package/docs/api/classes/RBACCache.md +1 -1
- package/docs/api/classes/RBACEngine.md +1 -1
- package/docs/api/classes/RBACError.md +1 -1
- package/docs/api/classes/RBACNotInitializedError.md +1 -1
- package/docs/api/classes/SecureSupabaseClient.md +1 -1
- package/docs/api/classes/StorageUtils.md +1 -1
- package/docs/api/enums/FileCategory.md +1 -1
- package/docs/api/interfaces/AggregateConfig.md +1 -1
- package/docs/api/interfaces/BadgeProps.md +27 -0
- package/docs/api/interfaces/ButtonProps.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/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/EmptyStateConfig.md +1 -1
- package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
- package/docs/api/interfaces/EventAppRoleData.md +1 -1
- package/docs/api/interfaces/EventLogoProps.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/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/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/PermissionEnforcerProps.md +1 -1
- package/docs/api/interfaces/ProtectedRouteProps.md +1 -1
- package/docs/api/interfaces/PublicErrorBoundaryProps.md +1 -1
- package/docs/api/interfaces/PublicErrorBoundaryState.md +1 -1
- package/docs/api/interfaces/PublicLoadingSpinnerProps.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/RBACConfig.md +1 -1
- package/docs/api/interfaces/RBACLogger.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/SecureDataContextType.md +1 -1
- package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
- package/docs/api/interfaces/SessionRestorationLoaderProps.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/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/UseInactivityTrackerOptions.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerReturn.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 +1 -1
- package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
- package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeOptions.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeReturn.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 +84 -15
- package/docs/architecture/README.md +0 -1
- package/docs/styles/README.md +0 -2
- package/examples/RBAC/CompleteRBACExample.tsx +324 -0
- package/examples/RBAC/EventBasedApp.tsx +239 -0
- package/examples/RBAC/PermissionExample.tsx +151 -0
- package/examples/RBAC/index.ts +13 -0
- package/examples/public-pages/CorrectPublicPageImplementation.tsx +301 -0
- package/examples/public-pages/PublicEventPage.tsx +274 -0
- package/examples/public-pages/PublicPageApp.tsx +308 -0
- package/examples/public-pages/PublicPageUsageExample.tsx +216 -0
- package/examples/public-pages/index.ts +14 -0
- package/package.json +1 -10
- package/src/__tests__/TEST_STANDARD.md +92 -0
- package/src/components/Badge/Badge.test.tsx +314 -0
- package/src/components/Badge/Badge.tsx +304 -0
- package/src/components/Badge/index.ts +3 -0
- package/src/components/DataTable/__tests__/DataTableCore.test-setup.ts +217 -0
- package/src/components/DataTable/__tests__/styles.test.ts +1 -1
- package/src/components/DataTable/components/ColumnFilter.tsx +8 -4
- package/src/components/DataTable/components/DataTableBody.tsx +461 -0
- package/src/components/DataTable/components/DraggableColumnHeader.tsx +144 -0
- package/src/components/DataTable/components/FilterRow.tsx +9 -3
- package/src/components/DataTable/components/PaginationControls.tsx +1 -0
- package/src/components/DataTable/components/VirtualizedDataTable.tsx +513 -0
- package/src/components/DataTable/components/__tests__/AccessDeniedPage.test.tsx +14 -68
- package/src/components/DataTable/components/__tests__/ColumnFilter.test.tsx +62 -0
- package/src/components/DataTable/components/__tests__/FilterRow.test.tsx +43 -0
- package/src/components/DataTable/core/ActionManager.ts +235 -0
- package/src/components/DataTable/core/ColumnManager.ts +205 -0
- package/src/components/DataTable/core/DataManager.ts +188 -0
- package/src/components/DataTable/core/DataTableContext.tsx +181 -0
- package/src/components/DataTable/core/LocalDataAdapter.ts +273 -0
- package/src/components/DataTable/core/PluginRegistry.ts +229 -0
- package/src/components/DataTable/core/StateManager.ts +311 -0
- package/src/components/DataTable/core/interfaces.ts +338 -0
- package/src/components/DataTable/styles.ts +27 -6
- package/src/components/DataTable/utils/__tests__/columnUtils.test.ts +94 -0
- package/src/components/DataTable/utils/columnUtils.ts +40 -0
- package/src/components/DataTable/utils/debugTools.ts +609 -0
- package/src/components/DataTable/utils/index.ts +1 -0
- package/src/components/Dialog/README.md +804 -0
- package/src/components/Dialog/utils/__tests__/safeHtml.unit.test.ts +611 -0
- package/src/components/Dialog/utils/safeHtml.ts +185 -0
- package/src/components/Footer/Footer.test.tsx +1 -1
- package/src/components/Form/Form.test.tsx +1 -1
- package/src/components/Form/FormErrorSummary.tsx +113 -0
- package/src/components/Form/FormFieldset.tsx +127 -0
- package/src/components/Form/FormLiveRegion.tsx +198 -0
- package/src/components/LoginForm/LoginForm.test.tsx +1 -1
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.performance.test.tsx +76 -10
- package/src/components/PaceLoginPage/PaceLoginPage.tsx +1 -1
- package/src/components/PasswordReset/PasswordResetForm.test.tsx +597 -0
- package/src/components/PasswordReset/PasswordResetForm.tsx +201 -0
- package/src/components/PublicLayout/PublicPageDebugger.tsx +104 -0
- package/src/components/PublicLayout/PublicPageDiagnostic.tsx +162 -0
- package/src/components/PublicLayout/__tests__/PublicPageFooter.test.tsx +1 -1
- package/src/components/Select/Select.test.tsx +1 -1
- package/src/components/Select/Select.tsx +20 -8
- package/src/components/Table/__tests__/Table.test.tsx +1 -1
- package/src/components/index.ts +3 -0
- package/src/hooks/__tests__/useFileUrl.unit.test.ts +83 -85
- package/src/index.ts +4 -0
- package/src/rbac/hooks/useCan.test.ts +24 -0
- package/src/rbac/hooks/usePermissions.ts +49 -12
- package/src/styles/core.css +3 -0
- package/src/utils/appConfig.ts +47 -0
- package/src/utils/appIdResolver.test.ts +499 -0
- package/src/utils/appIdResolver.ts +130 -0
- package/src/utils/appNameResolver.simple.test.ts +212 -0
- package/src/utils/appNameResolver.test.ts +121 -0
- package/src/utils/appNameResolver.ts +191 -0
- package/src/utils/audit.ts +127 -0
- package/src/utils/auth-utils.ts +96 -0
- package/src/utils/bundleAnalysis.ts +129 -0
- package/src/utils/cn.ts +7 -0
- package/src/utils/debugLogger.ts +67 -0
- package/src/utils/deviceFingerprint.ts +215 -0
- package/src/utils/dynamicUtils.ts +105 -0
- package/src/utils/file-reference.test.ts +788 -0
- package/src/utils/file-reference.ts +519 -0
- package/src/utils/formatDate.test.ts +237 -0
- package/src/utils/formatting.ts +133 -0
- package/src/utils/index.ts +7 -0
- package/src/utils/lazyLoad.tsx +44 -0
- package/src/utils/logger.ts +179 -0
- package/src/utils/organisationContext.test.ts +322 -0
- package/src/utils/organisationContext.ts +153 -0
- package/src/utils/performanceBenchmark.ts +64 -0
- package/src/utils/performanceBudgets.ts +110 -0
- package/src/utils/permissionTypes.ts +37 -0
- package/src/utils/permissionUtils.test.ts +393 -0
- package/src/utils/permissionUtils.ts +34 -0
- package/src/utils/sanitization.ts +264 -0
- package/src/utils/schemaUtils.ts +37 -0
- package/src/utils/secureDataAccess.test.ts +711 -0
- package/src/utils/secureDataAccess.ts +377 -0
- package/src/utils/secureErrors.ts +79 -0
- package/src/utils/secureStorage.ts +244 -0
- package/src/utils/security.ts +156 -0
- package/src/utils/securityMonitor.ts +45 -0
- package/src/utils/sessionTracking.ts +126 -0
- package/src/utils/validation.ts +111 -0
- package/src/utils/validationUtils.ts +120 -0
- package/src/validation/index.ts +2 -2
- package/dist/chunk-444EZN6N.js.map +0 -1
- package/dist/chunk-APIBCTL2.js +0 -670
- package/dist/chunk-APIBCTL2.js.map +0 -1
- package/dist/chunk-HJGGOMQ6.js.map +0 -1
- package/dist/chunk-K2WWTH7O.js +0 -94
- package/dist/chunk-K2WWTH7O.js.map +0 -1
- package/dist/chunk-L6PGMCMD.js.map +0 -1
- package/dist/chunk-LMC26NLJ.js +0 -84
- package/dist/chunk-LMC26NLJ.js.map +0 -1
- package/dist/chunk-NOHEVYVX.js.map +0 -1
- package/dist/chunk-TVYPTYOY.js.map +0 -1
- package/dist/validation-8npbysjg.d.ts +0 -177
- /package/dist/{DataTable-CYOHOX3O.js.map → DataTable-JXFCA2BJ.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-5E5TUNMS.js.map → UnifiedAuthProvider-XIQQ7LVU.js.map} +0 -0
- /package/dist/{chunk-YLKIDTUK.js.map → chunk-22WKWKRX.js.map} +0 -0
- /package/dist/{chunk-FHWWBIHA.js.map → chunk-6DXZ6V5Q.js.map} +0 -0
- /package/dist/{chunk-2TWNJ46Y.js.map → chunk-6LAAY47Q.js.map} +0 -0
- /package/dist/{chunk-XARJS7CD.js.map → chunk-INQLMHPF.js.map} +0 -0
- /package/dist/{chunk-SL2YQDR6.js.map → chunk-MA6EPSGZ.js.map} +0 -0
- /package/dist/{chunk-5DPZ5EAT.js.map → chunk-OWAG3GSU.js.map} +0 -0
- /package/dist/{chunk-LTV3XIJJ.js.map → chunk-T6JN6LH6.js.map} +0 -0
- /package/examples/{components → components 2}/DataTable/HierarchicalActionsExample.tsx +0 -0
- /package/examples/{components → components 2}/DataTable/HierarchicalExample.tsx +0 -0
- /package/examples/{components → components 2}/DataTable/InitialPageSizeExample.tsx +0 -0
- /package/examples/{components → components 2}/DataTable/PerformanceExample.tsx +0 -0
- /package/examples/{components → components 2}/DataTable/index.ts +0 -0
- /package/examples/{components → components 2}/Dialog/BasicHtmlTest.tsx +0 -0
- /package/examples/{components → components 2}/Dialog/DebugHtmlExample.tsx +0 -0
- /package/examples/{components → components 2}/Dialog/HtmlDialogExample.tsx +0 -0
- /package/examples/{components → components 2}/Dialog/ScrollableDialogExample.tsx +0 -0
- /package/examples/{components → components 2}/Dialog/SimpleHtmlTest.tsx +0 -0
- /package/examples/{components → components 2}/Dialog/SmartDialogExample.tsx +0 -0
- /package/examples/{components → components 2}/Dialog/index.ts +0 -0
- /package/examples/{components → components 2}/index.ts +0 -0
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useCan,
|
|
3
3
|
useResolvedScope
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BOOI7GK2.js";
|
|
5
5
|
import {
|
|
6
6
|
toast,
|
|
7
7
|
useDataTablePerformance
|
|
8
8
|
} from "./chunk-BESYRHQM.js";
|
|
9
9
|
import {
|
|
10
10
|
init_UnifiedAuthProvider
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6LAAY47Q.js";
|
|
12
12
|
import {
|
|
13
13
|
useUnifiedAuth
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YCWDTTUK.js";
|
|
15
15
|
import {
|
|
16
16
|
renderSafeHtml
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-OWAG3GSU.js";
|
|
18
18
|
import {
|
|
19
19
|
cn
|
|
20
20
|
} from "./chunk-56XJ3TU6.js";
|
|
@@ -5509,10 +5509,10 @@ var require_lodash = __commonJS({
|
|
|
5509
5509
|
});
|
|
5510
5510
|
|
|
5511
5511
|
// src/components/DataTable/DataTable.tsx
|
|
5512
|
-
import
|
|
5512
|
+
import React22 from "react";
|
|
5513
5513
|
|
|
5514
5514
|
// src/components/DataTable/components/DataTableCore.tsx
|
|
5515
|
-
import
|
|
5515
|
+
import React21, { useMemo as useMemo14, useCallback as useCallback11, useEffect as useEffect12, useRef as useRef7 } from "react";
|
|
5516
5516
|
import { useReactTable } from "@tanstack/react-table";
|
|
5517
5517
|
import { Edit, Trash, ChevronUp as ChevronUp2, ChevronDown as ChevronDown3, ChevronsUpDown } from "lucide-react";
|
|
5518
5518
|
|
|
@@ -5653,12 +5653,24 @@ var getTableCellClasses = (options = {}) => {
|
|
|
5653
5653
|
};
|
|
5654
5654
|
var getTableClasses = (options = {}) => {
|
|
5655
5655
|
const { isFixed = false, variant = "default", className } = options;
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5656
|
+
if (isFixed) {
|
|
5657
|
+
return cn(
|
|
5658
|
+
tableStyles.tableFixed,
|
|
5659
|
+
variant === "compact" && "text-sm",
|
|
5660
|
+
variant === "spacious" && "text-base",
|
|
5661
|
+
className
|
|
5662
|
+
);
|
|
5663
|
+
}
|
|
5664
|
+
if (variant === "compact") {
|
|
5665
|
+
return cn(tableStyles.table, className);
|
|
5666
|
+
}
|
|
5667
|
+
if (variant === "spacious") {
|
|
5668
|
+
return cn(
|
|
5669
|
+
tableStyles.table.replace("text-sm", "text-base"),
|
|
5670
|
+
className
|
|
5671
|
+
);
|
|
5672
|
+
}
|
|
5673
|
+
return cn(tableStyles.table, className);
|
|
5662
5674
|
};
|
|
5663
5675
|
|
|
5664
5676
|
// src/components/Input/Input.tsx
|
|
@@ -5914,6 +5926,7 @@ var Select = React5.forwardRef(
|
|
|
5914
5926
|
({
|
|
5915
5927
|
children,
|
|
5916
5928
|
className,
|
|
5929
|
+
direction = "down",
|
|
5917
5930
|
...selectProps
|
|
5918
5931
|
}, ref) => {
|
|
5919
5932
|
const internalRef = React5.useRef(null);
|
|
@@ -6012,8 +6025,9 @@ var Select = React5.forwardRef(
|
|
|
6012
6025
|
...state,
|
|
6013
6026
|
actions,
|
|
6014
6027
|
registerItem,
|
|
6015
|
-
unregisterItem
|
|
6016
|
-
|
|
6028
|
+
unregisterItem,
|
|
6029
|
+
direction
|
|
6030
|
+
}), [state, actions, registerItem, unregisterItem, direction]);
|
|
6017
6031
|
return /* @__PURE__ */ jsx4(
|
|
6018
6032
|
"form",
|
|
6019
6033
|
{
|
|
@@ -6029,7 +6043,8 @@ var Select = React5.forwardRef(
|
|
|
6029
6043
|
Select.displayName = "Select";
|
|
6030
6044
|
var SelectTrigger = React5.forwardRef(
|
|
6031
6045
|
({ children, className, variant = "outline", size = "default", asChild = false, ...props }, ref) => {
|
|
6032
|
-
const { open, disabled, value, actions } = useSelectContext();
|
|
6046
|
+
const { open, disabled, value, actions, direction = "down" } = useSelectContext();
|
|
6047
|
+
const opensUpward = direction === "up";
|
|
6033
6048
|
const handleClick = () => {
|
|
6034
6049
|
actions.setOpen(!open);
|
|
6035
6050
|
};
|
|
@@ -6061,7 +6076,8 @@ var SelectTrigger = React5.forwardRef(
|
|
|
6061
6076
|
className: cn(
|
|
6062
6077
|
"!justify-between relative w-full",
|
|
6063
6078
|
"[&_svg]:pointer-events-none",
|
|
6064
|
-
open && "!rounded-b-none !border-b-0",
|
|
6079
|
+
open && !opensUpward && "!rounded-b-none !border-b-0",
|
|
6080
|
+
open && opensUpward && "!rounded-t-none !border-t-0",
|
|
6065
6081
|
className
|
|
6066
6082
|
),
|
|
6067
6083
|
style: {
|
|
@@ -6118,7 +6134,8 @@ var SelectTrigger = React5.forwardRef(
|
|
|
6118
6134
|
className: cn(
|
|
6119
6135
|
"!justify-between relative w-full",
|
|
6120
6136
|
"[&_svg]:pointer-events-none",
|
|
6121
|
-
open && "!rounded-b-none !border-b-0",
|
|
6137
|
+
open && !opensUpward && "!rounded-b-none !border-b-0",
|
|
6138
|
+
open && opensUpward && "!rounded-t-none !border-t-0",
|
|
6122
6139
|
className
|
|
6123
6140
|
),
|
|
6124
6141
|
style: {
|
|
@@ -6162,10 +6179,10 @@ var SelectContent = React5.forwardRef(
|
|
|
6162
6179
|
className,
|
|
6163
6180
|
searchable = false,
|
|
6164
6181
|
searchPlaceholder = "Search...",
|
|
6165
|
-
maxHeight = "20rem",
|
|
6182
|
+
maxHeight = "max(20rem, 50vh)",
|
|
6166
6183
|
style
|
|
6167
6184
|
}, ref) => {
|
|
6168
|
-
const { open, actions } = useSelectContext();
|
|
6185
|
+
const { open, actions, direction = "down" } = useSelectContext();
|
|
6169
6186
|
const { searchTerm, setSearchTerm, filteredChildren, searchInputRef } = useSelectSearch({
|
|
6170
6187
|
children,
|
|
6171
6188
|
searchable
|
|
@@ -6187,17 +6204,19 @@ var SelectContent = React5.forwardRef(
|
|
|
6187
6204
|
}
|
|
6188
6205
|
);
|
|
6189
6206
|
}
|
|
6207
|
+
const opensUpward = direction === "up";
|
|
6190
6208
|
return /* @__PURE__ */ jsxs2(
|
|
6191
6209
|
"ul",
|
|
6192
6210
|
{
|
|
6193
6211
|
ref,
|
|
6194
6212
|
className: cn(
|
|
6195
|
-
"absolute z-[99999] w-full overflow-y-auto
|
|
6213
|
+
"absolute z-[99999] w-full overflow-y-auto border border-main-300 bg-main-50 shadow-lg",
|
|
6196
6214
|
"list-none p-0 m-0",
|
|
6215
|
+
opensUpward ? "rounded-t-md border-b-0" : "rounded-b-md border-t-0",
|
|
6197
6216
|
className
|
|
6198
6217
|
),
|
|
6199
6218
|
style: {
|
|
6200
|
-
top: "100%",
|
|
6219
|
+
[opensUpward ? "bottom" : "top"]: "100%",
|
|
6201
6220
|
left: 0,
|
|
6202
6221
|
right: 0,
|
|
6203
6222
|
maxHeight,
|
|
@@ -6663,7 +6682,7 @@ function DataTableToolbar({
|
|
|
6663
6682
|
}
|
|
6664
6683
|
|
|
6665
6684
|
// src/components/DataTable/components/UnifiedTableBody.tsx
|
|
6666
|
-
import
|
|
6685
|
+
import React11, { useRef as useRef3, useEffect as useEffect3 } from "react";
|
|
6667
6686
|
import { flexRender as flexRender2 } from "@tanstack/react-table";
|
|
6668
6687
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
6669
6688
|
import { ChevronDown as ChevronDown2, ChevronRight } from "lucide-react";
|
|
@@ -6715,10 +6734,32 @@ function EmptyState({
|
|
|
6715
6734
|
}
|
|
6716
6735
|
|
|
6717
6736
|
// src/components/DataTable/components/FilterRow.tsx
|
|
6718
|
-
import
|
|
6737
|
+
import React8 from "react";
|
|
6719
6738
|
|
|
6720
6739
|
// src/components/DataTable/components/ColumnFilter.tsx
|
|
6721
6740
|
import { X as X2 } from "lucide-react";
|
|
6741
|
+
|
|
6742
|
+
// src/components/DataTable/utils/columnUtils.ts
|
|
6743
|
+
import React7 from "react";
|
|
6744
|
+
function getColumnHeaderText(column) {
|
|
6745
|
+
const header = column.columnDef.header;
|
|
6746
|
+
if (typeof header === "string") {
|
|
6747
|
+
return header;
|
|
6748
|
+
}
|
|
6749
|
+
const getAccessorKey = () => {
|
|
6750
|
+
const def = column.columnDef;
|
|
6751
|
+
return "accessorKey" in def && def.accessorKey ? String(def.accessorKey) : void 0;
|
|
6752
|
+
};
|
|
6753
|
+
if (typeof header === "function") {
|
|
6754
|
+
return getAccessorKey() || column.id;
|
|
6755
|
+
}
|
|
6756
|
+
if (React7.isValidElement(header)) {
|
|
6757
|
+
return getAccessorKey() || column.id;
|
|
6758
|
+
}
|
|
6759
|
+
return getAccessorKey() || column.id;
|
|
6760
|
+
}
|
|
6761
|
+
|
|
6762
|
+
// src/components/DataTable/components/ColumnFilter.tsx
|
|
6722
6763
|
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
6723
6764
|
function ColumnFilter({
|
|
6724
6765
|
column,
|
|
@@ -6742,6 +6783,7 @@ function ColumnFilter({
|
|
|
6742
6783
|
column.setFilterValue(void 0);
|
|
6743
6784
|
};
|
|
6744
6785
|
const hasFilter = columnFilterValue !== void 0 && columnFilterValue !== "";
|
|
6786
|
+
const defaultPlaceholder = `Filter ${getColumnHeaderText(column)}...`;
|
|
6745
6787
|
const renderFilterInput = () => {
|
|
6746
6788
|
switch (filterType) {
|
|
6747
6789
|
case "select":
|
|
@@ -6751,7 +6793,7 @@ function ColumnFilter({
|
|
|
6751
6793
|
value: columnFilterValue || "",
|
|
6752
6794
|
onValueChange: handleFilterChange,
|
|
6753
6795
|
children: [
|
|
6754
|
-
/* @__PURE__ */ jsx10(SelectTrigger, { className: "h-8", children: /* @__PURE__ */ jsx10(SelectValue, { placeholder: placeholder ||
|
|
6796
|
+
/* @__PURE__ */ jsx10(SelectTrigger, { className: "h-8", children: /* @__PURE__ */ jsx10(SelectValue, { placeholder: placeholder || defaultPlaceholder }) }),
|
|
6755
6797
|
/* @__PURE__ */ jsxs7(SelectContent, { children: [
|
|
6756
6798
|
/* @__PURE__ */ jsx10(SelectItem, { value: "", children: "All" }),
|
|
6757
6799
|
options.map((option) => /* @__PURE__ */ jsx10(SelectItem, { value: option.value, children: option.label }, option.value))
|
|
@@ -6766,7 +6808,7 @@ function ColumnFilter({
|
|
|
6766
6808
|
type: "number",
|
|
6767
6809
|
value: columnFilterValue || "",
|
|
6768
6810
|
onChange: (e) => handleFilterChange(e.target.value ? Number(e.target.value) : void 0),
|
|
6769
|
-
placeholder: placeholder ||
|
|
6811
|
+
placeholder: placeholder || defaultPlaceholder,
|
|
6770
6812
|
className: "h-8 datatable-number-no-spinners"
|
|
6771
6813
|
}
|
|
6772
6814
|
);
|
|
@@ -6777,7 +6819,7 @@ function ColumnFilter({
|
|
|
6777
6819
|
type: "date",
|
|
6778
6820
|
value: columnFilterValue || "",
|
|
6779
6821
|
onChange: (e) => handleFilterChange(e.target.value || void 0),
|
|
6780
|
-
placeholder: placeholder ||
|
|
6822
|
+
placeholder: placeholder || defaultPlaceholder,
|
|
6781
6823
|
className: "h-8"
|
|
6782
6824
|
}
|
|
6783
6825
|
);
|
|
@@ -6787,7 +6829,7 @@ function ColumnFilter({
|
|
|
6787
6829
|
{
|
|
6788
6830
|
value: columnFilterValue || "",
|
|
6789
6831
|
onChange: (e) => handleFilterChange(e.target.value || void 0),
|
|
6790
|
-
placeholder: placeholder ||
|
|
6832
|
+
placeholder: placeholder || defaultPlaceholder,
|
|
6791
6833
|
className: "h-8"
|
|
6792
6834
|
}
|
|
6793
6835
|
);
|
|
@@ -6812,7 +6854,7 @@ import { jsx as jsx11 } from "react/jsx-runtime";
|
|
|
6812
6854
|
function FilterRow({ table, visibleColumns }) {
|
|
6813
6855
|
const { getState } = table;
|
|
6814
6856
|
const { columnFilters } = getState();
|
|
6815
|
-
const getColumnOptions =
|
|
6857
|
+
const getColumnOptions = React8.useCallback((columnId) => {
|
|
6816
6858
|
const column = table.getColumn(columnId);
|
|
6817
6859
|
if (!column) return [];
|
|
6818
6860
|
const columnDef = column.columnDef;
|
|
@@ -6831,12 +6873,12 @@ function FilterRow({ table, visibleColumns }) {
|
|
|
6831
6873
|
});
|
|
6832
6874
|
return Array.from(uniqueValues).sort().map((value) => ({ value, label: value }));
|
|
6833
6875
|
}, [table]);
|
|
6834
|
-
const getFilterType =
|
|
6876
|
+
const getFilterType = React8.useCallback((columnId) => {
|
|
6835
6877
|
const column = table.getColumn(columnId);
|
|
6836
6878
|
if (!column) return "text";
|
|
6837
6879
|
const columnDef = column.columnDef;
|
|
6838
6880
|
const explicitFilterType = columnDef.filterType;
|
|
6839
|
-
if (explicitFilterType
|
|
6881
|
+
if (explicitFilterType === "text" || explicitFilterType === "select" || explicitFilterType === "number" || explicitFilterType === "date") {
|
|
6840
6882
|
return explicitFilterType;
|
|
6841
6883
|
}
|
|
6842
6884
|
if (columnDef.filterSelectOptions && Array.isArray(columnDef.filterSelectOptions)) {
|
|
@@ -6870,7 +6912,7 @@ function FilterRow({ table, visibleColumns }) {
|
|
|
6870
6912
|
column,
|
|
6871
6913
|
filterType,
|
|
6872
6914
|
options,
|
|
6873
|
-
placeholder: `Filter ${column
|
|
6915
|
+
placeholder: `Filter ${getColumnHeaderText(column)}...`
|
|
6874
6916
|
}
|
|
6875
6917
|
) : /* @__PURE__ */ jsx11("div", { className: "h-8 flex items-center text-sec-400 text-sm", children: "No filter" })
|
|
6876
6918
|
},
|
|
@@ -6880,7 +6922,7 @@ function FilterRow({ table, visibleColumns }) {
|
|
|
6880
6922
|
}
|
|
6881
6923
|
|
|
6882
6924
|
// src/components/DataTable/components/ActionButtons.tsx
|
|
6883
|
-
import
|
|
6925
|
+
import React9, { useMemo as useMemo2 } from "react";
|
|
6884
6926
|
import { MoreHorizontal } from "lucide-react";
|
|
6885
6927
|
import { Fragment, jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
6886
6928
|
var evaluateCondition = (condition, row, defaultValue) => {
|
|
@@ -6997,10 +7039,10 @@ function ActionButtonsComponent({
|
|
|
6997
7039
|
}) })
|
|
6998
7040
|
] });
|
|
6999
7041
|
}
|
|
7000
|
-
var ActionButtons =
|
|
7042
|
+
var ActionButtons = React9.memo(ActionButtonsComponent);
|
|
7001
7043
|
|
|
7002
7044
|
// src/components/DataTable/components/EditableRow.tsx
|
|
7003
|
-
import
|
|
7045
|
+
import React10 from "react";
|
|
7004
7046
|
import { flexRender } from "@tanstack/react-table";
|
|
7005
7047
|
import { X as X3, Check as Check3 } from "lucide-react";
|
|
7006
7048
|
init_logger();
|
|
@@ -7013,14 +7055,14 @@ function SelectEditField({
|
|
|
7013
7055
|
onChange,
|
|
7014
7056
|
className
|
|
7015
7057
|
}) {
|
|
7016
|
-
const logger =
|
|
7058
|
+
const logger = React10.useMemo(() => createLogger("SelectEditField"), []);
|
|
7017
7059
|
const isSearchable = columnDef.selectSearchable !== false;
|
|
7018
7060
|
const isCreatable = columnDef.creatable === true;
|
|
7019
|
-
const selectRef =
|
|
7020
|
-
const [searchTerm, setSearchTerm] =
|
|
7021
|
-
const [isOpen, setIsOpen] =
|
|
7022
|
-
const [showCreateOption, setShowCreateOption] =
|
|
7023
|
-
|
|
7061
|
+
const selectRef = React10.useRef(null);
|
|
7062
|
+
const [searchTerm, setSearchTerm] = React10.useState("");
|
|
7063
|
+
const [isOpen, setIsOpen] = React10.useState(false);
|
|
7064
|
+
const [showCreateOption, setShowCreateOption] = React10.useState(false);
|
|
7065
|
+
React10.useEffect(() => {
|
|
7024
7066
|
if (!isOpen || !isSearchable || !isCreatable) return;
|
|
7025
7067
|
const findAndAttachSearchInput = () => {
|
|
7026
7068
|
let searchInput = null;
|
|
@@ -7098,7 +7140,7 @@ function SelectEditField({
|
|
|
7098
7140
|
}
|
|
7099
7141
|
return cleanup;
|
|
7100
7142
|
}, [isOpen, isSearchable, isCreatable, columnDef.fieldOptions]);
|
|
7101
|
-
const handleCreateNew =
|
|
7143
|
+
const handleCreateNew = React10.useCallback(async () => {
|
|
7102
7144
|
if (!isCreatable || !columnDef.onCreateNew || !searchTerm.trim()) return;
|
|
7103
7145
|
try {
|
|
7104
7146
|
const newValue = await columnDef.onCreateNew(searchTerm.trim());
|
|
@@ -7244,9 +7286,9 @@ function EditableRow({
|
|
|
7244
7286
|
hierarchical = false
|
|
7245
7287
|
}) {
|
|
7246
7288
|
const rowId = getRowId ? getRowId(row.original, row.index) : String(row.id);
|
|
7247
|
-
const firstInputRef =
|
|
7248
|
-
const hasAssignedRef =
|
|
7249
|
-
|
|
7289
|
+
const firstInputRef = React10.useRef(null);
|
|
7290
|
+
const hasAssignedRef = React10.useRef(false);
|
|
7291
|
+
React10.useEffect(() => {
|
|
7250
7292
|
if (firstInputRef.current) {
|
|
7251
7293
|
firstInputRef.current.focus();
|
|
7252
7294
|
firstInputRef.current.select();
|
|
@@ -7525,14 +7567,14 @@ function SelectEditField2({
|
|
|
7525
7567
|
placeholder,
|
|
7526
7568
|
onChange
|
|
7527
7569
|
}) {
|
|
7528
|
-
const logger =
|
|
7570
|
+
const logger = React11.useMemo(() => createLogger("SelectEditField"), []);
|
|
7529
7571
|
const isSearchable = columnDef.selectSearchable !== false;
|
|
7530
7572
|
const isCreatable = columnDef.creatable === true;
|
|
7531
|
-
const selectRef =
|
|
7532
|
-
const [searchTerm, setSearchTerm] =
|
|
7533
|
-
const [isOpen, setIsOpen] =
|
|
7534
|
-
const [showCreateOption, setShowCreateOption] =
|
|
7535
|
-
|
|
7573
|
+
const selectRef = React11.useRef(null);
|
|
7574
|
+
const [searchTerm, setSearchTerm] = React11.useState("");
|
|
7575
|
+
const [isOpen, setIsOpen] = React11.useState(false);
|
|
7576
|
+
const [showCreateOption, setShowCreateOption] = React11.useState(false);
|
|
7577
|
+
React11.useEffect(() => {
|
|
7536
7578
|
if (!isOpen || !isSearchable || !isCreatable || !columnDef.onCreateNew) {
|
|
7537
7579
|
if (!isOpen || !isCreatable || !columnDef.onCreateNew) {
|
|
7538
7580
|
setShowCreateOption(false);
|
|
@@ -7617,7 +7659,7 @@ function SelectEditField2({
|
|
|
7617
7659
|
}
|
|
7618
7660
|
return cleanup;
|
|
7619
7661
|
}, [isOpen, isSearchable, isCreatable, columnDef.fieldOptions, columnDef.onCreateNew]);
|
|
7620
|
-
const handleCreateNew =
|
|
7662
|
+
const handleCreateNew = React11.useCallback(async () => {
|
|
7621
7663
|
if (!isCreatable || !columnDef.onCreateNew || !searchTerm.trim()) return;
|
|
7622
7664
|
try {
|
|
7623
7665
|
const newValue = await columnDef.onCreateNew(searchTerm.trim());
|
|
@@ -7748,7 +7790,7 @@ var renderEditField2 = (column, value, onChange, editingData = {}, placeholder)
|
|
|
7748
7790
|
}
|
|
7749
7791
|
);
|
|
7750
7792
|
};
|
|
7751
|
-
var RowComponent =
|
|
7793
|
+
var RowComponent = React11.memo(({
|
|
7752
7794
|
row,
|
|
7753
7795
|
style,
|
|
7754
7796
|
isEditing,
|
|
@@ -7766,7 +7808,7 @@ var RowComponent = React10.memo(({
|
|
|
7766
7808
|
}) => {
|
|
7767
7809
|
const rowRef = useRef3(null);
|
|
7768
7810
|
const firstInputRef = useRef3(null);
|
|
7769
|
-
const logger =
|
|
7811
|
+
const logger = React11.useMemo(() => createLogger("RowComponent"), []);
|
|
7770
7812
|
const rowId = getRowIdSafe(row.original, row.index, getRowId);
|
|
7771
7813
|
const hierarchicalRow = row.original;
|
|
7772
7814
|
const isHierarchical = hierarchical?.enabled && hierarchicalRow?.isParent !== void 0;
|
|
@@ -8016,7 +8058,7 @@ function UnifiedTableBody({
|
|
|
8016
8058
|
rbac,
|
|
8017
8059
|
permissions
|
|
8018
8060
|
}) {
|
|
8019
|
-
const logger =
|
|
8061
|
+
const logger = React11.useMemo(() => createLogger("UnifiedTableBody"), []);
|
|
8020
8062
|
const headerRef = useRef3(null);
|
|
8021
8063
|
const bodyRef = useRef3(null);
|
|
8022
8064
|
const parentRef = useRef3(null);
|
|
@@ -8218,7 +8260,7 @@ function UnifiedTableBody({
|
|
|
8218
8260
|
}
|
|
8219
8261
|
|
|
8220
8262
|
// src/components/DataTable/components/PaginationControls.tsx
|
|
8221
|
-
import
|
|
8263
|
+
import React12 from "react";
|
|
8222
8264
|
import {
|
|
8223
8265
|
ChevronLeft,
|
|
8224
8266
|
ChevronRight as ChevronRight2,
|
|
@@ -8456,6 +8498,7 @@ function PaginationControls({
|
|
|
8456
8498
|
selectedText: currentPageSize?.toString() || "10",
|
|
8457
8499
|
onValueChange: (value) => setPageSize(Number(value)),
|
|
8458
8500
|
disabled: isLoading,
|
|
8501
|
+
direction: "up",
|
|
8459
8502
|
className: "w-36 h-8",
|
|
8460
8503
|
children: [
|
|
8461
8504
|
/* @__PURE__ */ jsx15(
|
|
@@ -8542,7 +8585,7 @@ function EnhancedPaginationControls({
|
|
|
8542
8585
|
showJumpToPage = false,
|
|
8543
8586
|
...props
|
|
8544
8587
|
}) {
|
|
8545
|
-
const [jumpToPage, setJumpToPage] =
|
|
8588
|
+
const [jumpToPage, setJumpToPage] = React12.useState("");
|
|
8546
8589
|
const { table, paginationMode = "client", serverData, onPageChange, totalCount } = props;
|
|
8547
8590
|
const pagination = getPaginationBinding({
|
|
8548
8591
|
mode: paginationMode,
|
|
@@ -8593,13 +8636,13 @@ function LoadingState() {
|
|
|
8593
8636
|
}
|
|
8594
8637
|
|
|
8595
8638
|
// src/components/DataTable/components/DataTableModals.tsx
|
|
8596
|
-
import
|
|
8639
|
+
import React16, { useEffect as useEffect6 } from "react";
|
|
8597
8640
|
|
|
8598
8641
|
// src/components/DataTable/components/ImportModal.tsx
|
|
8599
8642
|
import { useState as useState4, useRef as useRef4, useEffect as useEffect5 } from "react";
|
|
8600
8643
|
|
|
8601
8644
|
// src/components/Dialog/Dialog.tsx
|
|
8602
|
-
import * as
|
|
8645
|
+
import * as React13 from "react";
|
|
8603
8646
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
8604
8647
|
import { X as X4 } from "lucide-react";
|
|
8605
8648
|
var import_lodash = __toESM(require_lodash(), 1);
|
|
@@ -8617,7 +8660,7 @@ var Dialog = DialogPrimitive.Root;
|
|
|
8617
8660
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
8618
8661
|
var DialogPortal = DialogPrimitive.Portal;
|
|
8619
8662
|
var DialogClose = DialogPrimitive.Close;
|
|
8620
|
-
var DialogOverlay =
|
|
8663
|
+
var DialogOverlay = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
8621
8664
|
DialogPrimitive.Overlay,
|
|
8622
8665
|
{
|
|
8623
8666
|
ref,
|
|
@@ -8694,7 +8737,7 @@ var useSmartDimensions = ({
|
|
|
8694
8737
|
}
|
|
8695
8738
|
return result;
|
|
8696
8739
|
};
|
|
8697
|
-
var DialogContent =
|
|
8740
|
+
var DialogContent = React13.forwardRef(({
|
|
8698
8741
|
className,
|
|
8699
8742
|
children,
|
|
8700
8743
|
size = "md",
|
|
@@ -8721,17 +8764,17 @@ var DialogContent = React12.forwardRef(({
|
|
|
8721
8764
|
minWidth,
|
|
8722
8765
|
enableScrolling
|
|
8723
8766
|
});
|
|
8724
|
-
const handleEscapeKeyDown =
|
|
8767
|
+
const handleEscapeKeyDown = React13.useCallback((event) => {
|
|
8725
8768
|
if (preventCloseOnEscape) {
|
|
8726
8769
|
event.preventDefault();
|
|
8727
8770
|
}
|
|
8728
8771
|
}, [preventCloseOnEscape]);
|
|
8729
|
-
const handlePointerDownOutside =
|
|
8772
|
+
const handlePointerDownOutside = React13.useCallback((event) => {
|
|
8730
8773
|
if (preventCloseOnOutsideClick) {
|
|
8731
8774
|
event.preventDefault();
|
|
8732
8775
|
}
|
|
8733
8776
|
}, [preventCloseOnOutsideClick]);
|
|
8734
|
-
const mergedStyle =
|
|
8777
|
+
const mergedStyle = React13.useMemo(() => {
|
|
8735
8778
|
if (Object.keys(smartDimensions).length === 0) {
|
|
8736
8779
|
return style;
|
|
8737
8780
|
}
|
|
@@ -8809,13 +8852,13 @@ var DialogBody = ({
|
|
|
8809
8852
|
children,
|
|
8810
8853
|
...props
|
|
8811
8854
|
}) => {
|
|
8812
|
-
const mergedStyle =
|
|
8855
|
+
const mergedStyle = React13.useMemo(() => {
|
|
8813
8856
|
return {
|
|
8814
8857
|
...maxHeight && { maxHeight },
|
|
8815
8858
|
...style
|
|
8816
8859
|
};
|
|
8817
8860
|
}, [maxHeight, style]);
|
|
8818
|
-
const processedHtmlContent =
|
|
8861
|
+
const processedHtmlContent = React13.useMemo(() => {
|
|
8819
8862
|
if (!htmlContent || !allowHtml) {
|
|
8820
8863
|
return null;
|
|
8821
8864
|
}
|
|
@@ -8868,8 +8911,8 @@ var DialogFooter = ({
|
|
|
8868
8911
|
}
|
|
8869
8912
|
);
|
|
8870
8913
|
DialogFooter.displayName = "DialogFooter";
|
|
8871
|
-
var DialogTitle =
|
|
8872
|
-
const processedHtmlContent =
|
|
8914
|
+
var DialogTitle = React13.forwardRef(({ className, htmlContent, allowHtml = true, children, ...props }, ref) => {
|
|
8915
|
+
const processedHtmlContent = React13.useMemo(() => {
|
|
8873
8916
|
if (!htmlContent || !allowHtml) {
|
|
8874
8917
|
return null;
|
|
8875
8918
|
}
|
|
@@ -8892,8 +8935,8 @@ var DialogTitle = React12.forwardRef(({ className, htmlContent, allowHtml = true
|
|
|
8892
8935
|
);
|
|
8893
8936
|
});
|
|
8894
8937
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
8895
|
-
var DialogDescription =
|
|
8896
|
-
const processedHtmlContent =
|
|
8938
|
+
var DialogDescription = React13.forwardRef(({ className, htmlContent, allowHtml = true, children, ...props }, ref) => {
|
|
8939
|
+
const processedHtmlContent = React13.useMemo(() => {
|
|
8897
8940
|
if (!htmlContent || !allowHtml) {
|
|
8898
8941
|
return null;
|
|
8899
8942
|
}
|
|
@@ -8916,10 +8959,10 @@ var DialogDescription = React12.forwardRef(({ className, htmlContent, allowHtml
|
|
|
8916
8959
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
8917
8960
|
|
|
8918
8961
|
// src/components/Progress/Progress.tsx
|
|
8919
|
-
import * as
|
|
8962
|
+
import * as React14 from "react";
|
|
8920
8963
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
8921
8964
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
8922
|
-
var Progress =
|
|
8965
|
+
var Progress = React14.forwardRef(({ className, value, max: max2 = 100, ...props }, ref) => /* @__PURE__ */ jsx18(
|
|
8923
8966
|
ProgressPrimitive.Root,
|
|
8924
8967
|
{
|
|
8925
8968
|
ref,
|
|
@@ -9321,7 +9364,7 @@ function DataTableModals({
|
|
|
9321
9364
|
onStoreFocus,
|
|
9322
9365
|
onRestoreFocus
|
|
9323
9366
|
}) {
|
|
9324
|
-
const logger =
|
|
9367
|
+
const logger = React16.useMemo(() => createLogger("DataTableModals"), []);
|
|
9325
9368
|
useEffect6(() => {
|
|
9326
9369
|
if (showImportModal) {
|
|
9327
9370
|
onStoreFocus?.();
|
|
@@ -9365,12 +9408,12 @@ function DataTableModals({
|
|
|
9365
9408
|
}
|
|
9366
9409
|
|
|
9367
9410
|
// src/components/DataTable/components/DataTableErrorBoundary.tsx
|
|
9368
|
-
import
|
|
9411
|
+
import React18, { Component } from "react";
|
|
9369
9412
|
|
|
9370
9413
|
// src/components/Alert/Alert.tsx
|
|
9371
|
-
import * as
|
|
9414
|
+
import * as React17 from "react";
|
|
9372
9415
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
9373
|
-
var AlertContext =
|
|
9416
|
+
var AlertContext = React17.createContext({ variant: "default" });
|
|
9374
9417
|
var getAlertClasses = (variant = "default") => {
|
|
9375
9418
|
const baseClasses = "relative w-full rounded-lg border p-4";
|
|
9376
9419
|
const variantClasses = {
|
|
@@ -9381,10 +9424,10 @@ var getAlertClasses = (variant = "default") => {
|
|
|
9381
9424
|
};
|
|
9382
9425
|
return `${baseClasses} ${variantClasses[variant]}`;
|
|
9383
9426
|
};
|
|
9384
|
-
var Alert =
|
|
9385
|
-
const contextValue =
|
|
9427
|
+
var Alert = React17.forwardRef(({ className, variant = "default", ...props }, ref) => {
|
|
9428
|
+
const contextValue = React17.useMemo(() => ({ variant }), [variant]);
|
|
9386
9429
|
if (variant === "inline") {
|
|
9387
|
-
return /* @__PURE__ */ jsx21(AlertContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx21(
|
|
9430
|
+
return /* @__PURE__ */ jsx21(AlertContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx21(React17.Fragment, { ...props }) });
|
|
9388
9431
|
}
|
|
9389
9432
|
return /* @__PURE__ */ jsx21(AlertContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx21(
|
|
9390
9433
|
"div",
|
|
@@ -9397,8 +9440,8 @@ var Alert = React16.forwardRef(({ className, variant = "default", ...props }, re
|
|
|
9397
9440
|
) });
|
|
9398
9441
|
});
|
|
9399
9442
|
Alert.displayName = "Alert";
|
|
9400
|
-
var AlertTitle =
|
|
9401
|
-
const { variant } =
|
|
9443
|
+
var AlertTitle = React17.forwardRef(({ className, ...props }, ref) => {
|
|
9444
|
+
const { variant } = React17.useContext(AlertContext);
|
|
9402
9445
|
if (variant === "inline") {
|
|
9403
9446
|
return /* @__PURE__ */ jsx21("strong", { ...props });
|
|
9404
9447
|
}
|
|
@@ -9412,8 +9455,8 @@ var AlertTitle = React16.forwardRef(({ className, ...props }, ref) => {
|
|
|
9412
9455
|
);
|
|
9413
9456
|
});
|
|
9414
9457
|
AlertTitle.displayName = "AlertTitle";
|
|
9415
|
-
var AlertDescription =
|
|
9416
|
-
const { variant } =
|
|
9458
|
+
var AlertDescription = React17.forwardRef(({ className, ...props }, ref) => {
|
|
9459
|
+
const { variant } = React17.useContext(AlertContext);
|
|
9417
9460
|
if (variant === "inline") {
|
|
9418
9461
|
return /* @__PURE__ */ jsx21("span", { ...props });
|
|
9419
9462
|
}
|
|
@@ -10391,7 +10434,7 @@ function useDataTableConfiguration({
|
|
|
10391
10434
|
}
|
|
10392
10435
|
|
|
10393
10436
|
// src/components/Card/Card.tsx
|
|
10394
|
-
import * as
|
|
10437
|
+
import * as React19 from "react";
|
|
10395
10438
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
10396
10439
|
function getCardClasses(variant = "default", size = "default") {
|
|
10397
10440
|
const baseClasses = "rounded-lg border bg-card text-card-foreground shadow-sm";
|
|
@@ -10407,7 +10450,7 @@ function getCardClasses(variant = "default", size = "default") {
|
|
|
10407
10450
|
};
|
|
10408
10451
|
return `${baseClasses} ${variantClasses[variant]} ${sizeClasses2[size]}`;
|
|
10409
10452
|
}
|
|
10410
|
-
var Card =
|
|
10453
|
+
var Card = React19.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
10411
10454
|
"article",
|
|
10412
10455
|
{
|
|
10413
10456
|
ref,
|
|
@@ -10420,7 +10463,7 @@ var Card = React18.forwardRef(({ className, variant, size, ...props }, ref) => /
|
|
|
10420
10463
|
}
|
|
10421
10464
|
));
|
|
10422
10465
|
Card.displayName = "Card";
|
|
10423
|
-
var CardHeader =
|
|
10466
|
+
var CardHeader = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
10424
10467
|
"header",
|
|
10425
10468
|
{
|
|
10426
10469
|
ref,
|
|
@@ -10429,7 +10472,7 @@ var CardHeader = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
10429
10472
|
}
|
|
10430
10473
|
));
|
|
10431
10474
|
CardHeader.displayName = "CardHeader";
|
|
10432
|
-
var CardTitle =
|
|
10475
|
+
var CardTitle = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
10433
10476
|
"h3",
|
|
10434
10477
|
{
|
|
10435
10478
|
ref,
|
|
@@ -10441,7 +10484,7 @@ var CardTitle = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
10441
10484
|
}
|
|
10442
10485
|
));
|
|
10443
10486
|
CardTitle.displayName = "CardTitle";
|
|
10444
|
-
var CardDescription =
|
|
10487
|
+
var CardDescription = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
10445
10488
|
"p",
|
|
10446
10489
|
{
|
|
10447
10490
|
ref,
|
|
@@ -10450,7 +10493,7 @@ var CardDescription = React18.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
10450
10493
|
}
|
|
10451
10494
|
));
|
|
10452
10495
|
CardDescription.displayName = "CardDescription";
|
|
10453
|
-
var CardContent =
|
|
10496
|
+
var CardContent = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
10454
10497
|
"main",
|
|
10455
10498
|
{
|
|
10456
10499
|
ref,
|
|
@@ -10459,7 +10502,7 @@ var CardContent = React18.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
10459
10502
|
}
|
|
10460
10503
|
));
|
|
10461
10504
|
CardContent.displayName = "CardContent";
|
|
10462
|
-
var CardFooter =
|
|
10505
|
+
var CardFooter = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
10463
10506
|
"footer",
|
|
10464
10507
|
{
|
|
10465
10508
|
ref,
|
|
@@ -10468,7 +10511,7 @@ var CardFooter = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
10468
10511
|
}
|
|
10469
10512
|
));
|
|
10470
10513
|
CardFooter.displayName = "CardFooter";
|
|
10471
|
-
var CardActions =
|
|
10514
|
+
var CardActions = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
10472
10515
|
"nav",
|
|
10473
10516
|
{
|
|
10474
10517
|
ref,
|
|
@@ -10479,7 +10522,7 @@ var CardActions = React18.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
10479
10522
|
}
|
|
10480
10523
|
));
|
|
10481
10524
|
CardActions.displayName = "CardActions";
|
|
10482
|
-
var HoverCard =
|
|
10525
|
+
var HoverCard = React19.forwardRef(({ children, className, ...props }, ref) => {
|
|
10483
10526
|
return /* @__PURE__ */ jsx23(
|
|
10484
10527
|
"section",
|
|
10485
10528
|
{
|
|
@@ -10491,7 +10534,7 @@ var HoverCard = React18.forwardRef(({ children, className, ...props }, ref) => {
|
|
|
10491
10534
|
);
|
|
10492
10535
|
});
|
|
10493
10536
|
HoverCard.displayName = "HoverCard";
|
|
10494
|
-
var HoverCardTrigger =
|
|
10537
|
+
var HoverCardTrigger = React19.forwardRef(({ className, asChild, children, ...props }, ref) => {
|
|
10495
10538
|
if (asChild) {
|
|
10496
10539
|
return /* @__PURE__ */ jsx23("span", { className: cn("cursor-pointer", className), children });
|
|
10497
10540
|
}
|
|
@@ -10510,7 +10553,7 @@ var HoverCardTrigger = React18.forwardRef(({ className, asChild, children, ...pr
|
|
|
10510
10553
|
);
|
|
10511
10554
|
});
|
|
10512
10555
|
HoverCardTrigger.displayName = "HoverCardTrigger";
|
|
10513
|
-
var HoverCardContent =
|
|
10556
|
+
var HoverCardContent = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
10514
10557
|
"aside",
|
|
10515
10558
|
{
|
|
10516
10559
|
ref,
|
|
@@ -10882,7 +10925,7 @@ function useDataTablePermissions(rbac, features = {}) {
|
|
|
10882
10925
|
}
|
|
10883
10926
|
|
|
10884
10927
|
// src/components/DataTable/hooks/useTableColumns.ts
|
|
10885
|
-
import
|
|
10928
|
+
import React20, { useMemo as useMemo13 } from "react";
|
|
10886
10929
|
|
|
10887
10930
|
// src/components/DataTable/core/ColumnFactory.ts
|
|
10888
10931
|
var ColumnFactory = class {
|
|
@@ -11088,14 +11131,14 @@ function useTableColumns({
|
|
|
11088
11131
|
header: ({ table }) => {
|
|
11089
11132
|
const isAllSelected = table.getIsAllPageRowsSelected();
|
|
11090
11133
|
const isSomeSelected = table.getIsSomePageRowsSelected();
|
|
11091
|
-
return
|
|
11134
|
+
return React20.createElement(Checkbox, {
|
|
11092
11135
|
checked: isAllSelected ? true : isSomeSelected ? "indeterminate" : false,
|
|
11093
11136
|
onCheckedChange: (value) => table.toggleAllPageRowsSelected(!!value),
|
|
11094
11137
|
"aria-label": "Select all"
|
|
11095
11138
|
});
|
|
11096
11139
|
},
|
|
11097
11140
|
cell: ({ row }) => {
|
|
11098
|
-
return
|
|
11141
|
+
return React20.createElement(Checkbox, {
|
|
11099
11142
|
checked: row.getIsSelected(),
|
|
11100
11143
|
onCheckedChange: (value) => row.toggleSelected(!!value),
|
|
11101
11144
|
"aria-label": "Select row"
|
|
@@ -11642,7 +11685,7 @@ function DataTableInternal(props) {
|
|
|
11642
11685
|
storageKey,
|
|
11643
11686
|
onLayoutChange
|
|
11644
11687
|
} = props;
|
|
11645
|
-
const logger =
|
|
11688
|
+
const logger = React21.useMemo(() => createLogger("DataTableCore"), []);
|
|
11646
11689
|
const authResult = useUnifiedAuth();
|
|
11647
11690
|
const user = authResult.user;
|
|
11648
11691
|
const requestedFeatures = useMemo14(
|
|
@@ -12306,7 +12349,7 @@ function DataTableInternal(props) {
|
|
|
12306
12349
|
grouping: state.grouping,
|
|
12307
12350
|
aggregates,
|
|
12308
12351
|
getRowId: resolvedGetRowId,
|
|
12309
|
-
emptyState:
|
|
12352
|
+
emptyState: React21.isValidElement(emptyState) ? void 0 : emptyState,
|
|
12310
12353
|
isFiltered: searchQuery !== "" || state.columnFilters.length > 0,
|
|
12311
12354
|
onClearFilters: () => {
|
|
12312
12355
|
stateActions.setSearchQuery("");
|
|
@@ -12400,20 +12443,20 @@ function DataTableCore(props) {
|
|
|
12400
12443
|
init_logger();
|
|
12401
12444
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
12402
12445
|
function DataTable(props) {
|
|
12403
|
-
const logger =
|
|
12446
|
+
const logger = React22.useMemo(() => createLogger("DataTable"), []);
|
|
12404
12447
|
const { features, ...rest } = props;
|
|
12405
|
-
const normalizedFeatures =
|
|
12448
|
+
const normalizedFeatures = React22.useMemo(
|
|
12406
12449
|
() => normalizeDataTableFeatures(features),
|
|
12407
12450
|
[features]
|
|
12408
12451
|
);
|
|
12409
|
-
|
|
12452
|
+
React22.useEffect(() => {
|
|
12410
12453
|
if (normalizedFeatures.deleteSelected && !normalizedFeatures.deletion) {
|
|
12411
12454
|
logger.warn("deleteSelected requires deletion to be enabled");
|
|
12412
12455
|
}
|
|
12413
12456
|
}, [normalizedFeatures.deleteSelected, normalizedFeatures.deletion, logger]);
|
|
12414
12457
|
return /* @__PURE__ */ jsx26(DataTableCore, { ...rest, features: normalizedFeatures });
|
|
12415
12458
|
}
|
|
12416
|
-
var DataTableComponent =
|
|
12459
|
+
var DataTableComponent = React22.memo(DataTable);
|
|
12417
12460
|
|
|
12418
12461
|
// src/components/DataTable/components/BulkOperationsDropdown.tsx
|
|
12419
12462
|
import {
|
|
@@ -12613,6 +12656,7 @@ export {
|
|
|
12613
12656
|
ColumnVisibilityDropdown,
|
|
12614
12657
|
DataTableToolbar,
|
|
12615
12658
|
EmptyState,
|
|
12659
|
+
getColumnHeaderText,
|
|
12616
12660
|
ActionButtons,
|
|
12617
12661
|
EditableRow,
|
|
12618
12662
|
validateHierarchicalData,
|
|
@@ -12682,4 +12726,4 @@ lodash/lodash.js:
|
|
|
12682
12726
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
12683
12727
|
*)
|
|
12684
12728
|
*/
|
|
12685
|
-
//# sourceMappingURL=chunk-
|
|
12729
|
+
//# sourceMappingURL=chunk-TLT2ZR3L.js.map
|