@wakastellar/ui 2.4.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/dist/blocks/antivirus-dashboard/index.d.ts +44 -0
  2. package/dist/blocks/clamav-service-status/index.d.ts +35 -0
  3. package/dist/blocks/file-scan-uploader/index.d.ts +29 -0
  4. package/dist/blocks/index.d.ts +18 -9
  5. package/dist/blocks/quarantine-manager/index.d.ts +27 -0
  6. package/dist/blocks/scan-history-log/index.d.ts +28 -0
  7. package/dist/blocks/scan-policy-editor/index.d.ts +27 -0
  8. package/dist/blocks/scan-report-generator/index.d.ts +47 -0
  9. package/dist/blocks/signature-database-manager/index.d.ts +39 -0
  10. package/dist/blocks/threat-alert-banner/index.d.ts +26 -0
  11. package/dist/components/index.d.ts +4 -4
  12. package/dist/components/waka-signature-pad/index.d.ts +1 -1
  13. package/dist/exceljs.min-BcLLX0PC.js +29 -0
  14. package/dist/exceljs.min-KOayaaQ4.mjs +23013 -0
  15. package/dist/export.cjs.js +1 -1
  16. package/dist/export.d.ts +2 -2
  17. package/dist/export.es.js +1 -1
  18. package/dist/index.cjs.js +136 -136
  19. package/dist/index.es.js +29978 -27215
  20. package/dist/stories/Button.stories.d.ts +1 -1
  21. package/dist/stories/Header.stories.d.ts +1 -1
  22. package/dist/stories/Page.stories.d.ts +1 -1
  23. package/dist/useDataTableImport-COVnvslz.js +9 -0
  24. package/dist/useDataTableImport-DAlxBY8w.mjs +237 -0
  25. package/dist/utils/index.d.ts +1 -0
  26. package/dist/utils/logger.d.ts +9 -0
  27. package/package.json +6 -5
  28. package/src/blocks/antivirus-dashboard/AntivirusDashboard.stories.tsx +291 -0
  29. package/src/blocks/antivirus-dashboard/index.tsx +525 -0
  30. package/src/blocks/clamav-service-status/ClamAVServiceStatus.stories.tsx +195 -0
  31. package/src/blocks/clamav-service-status/index.tsx +370 -0
  32. package/src/blocks/file-scan-uploader/FileScanUploader.stories.tsx +257 -0
  33. package/src/blocks/file-scan-uploader/index.tsx +311 -0
  34. package/src/blocks/index.ts +163 -11
  35. package/src/blocks/quarantine-manager/QuarantineManager.stories.tsx +209 -0
  36. package/src/blocks/quarantine-manager/index.tsx +435 -0
  37. package/src/blocks/scan-history-log/ScanHistoryLog.stories.tsx +231 -0
  38. package/src/blocks/scan-history-log/index.tsx +406 -0
  39. package/src/blocks/scan-policy-editor/ScanPolicyEditor.stories.tsx +106 -0
  40. package/src/blocks/scan-policy-editor/index.tsx +418 -0
  41. package/src/blocks/scan-report-generator/ScanReportGenerator.stories.tsx +232 -0
  42. package/src/blocks/scan-report-generator/index.tsx +612 -0
  43. package/src/blocks/sidebar/index.tsx +2 -1
  44. package/src/blocks/signature-database-manager/SignatureDatabaseManager.stories.tsx +279 -0
  45. package/src/blocks/signature-database-manager/index.tsx +470 -0
  46. package/src/blocks/theme-creator-block/index.tsx +16 -2
  47. package/src/blocks/threat-alert-banner/ThreatAlertBanner.stories.tsx +152 -0
  48. package/src/blocks/threat-alert-banner/index.tsx +320 -0
  49. package/src/components/DataTable/DataTable.stories.tsx +203 -0
  50. package/src/components/DataTable/hooks/useDataTableExport.ts +38 -31
  51. package/src/components/DataTable/hooks/useDataTableImport.ts +31 -20
  52. package/src/components/error-boundary/ErrorBoundary.stories.tsx +125 -0
  53. package/src/components/index.ts +45 -4
  54. package/src/components/language-selector/LanguageSelector.stories.tsx +112 -0
  55. package/src/components/theme-selector/ThemeSelector.stories.tsx +77 -0
  56. package/src/components/toaster/Toaster.stories.tsx +67 -0
  57. package/src/components/waka-activity-feed/WakaActivityFeed.stories.tsx +116 -0
  58. package/src/components/waka-ad-banner/WakaAdBanner.stories.tsx +102 -0
  59. package/src/components/waka-ad-fallback/WakaAdFallback.stories.tsx +117 -0
  60. package/src/components/waka-ad-inline/WakaAdInline.stories.tsx +105 -0
  61. package/src/components/waka-ad-interstitial/WakaAdInterstitial.stories.tsx +92 -0
  62. package/src/components/waka-ad-placeholder/WakaAdPlaceholder.stories.tsx +89 -0
  63. package/src/components/waka-ad-provider/WakaAdProvider.stories.tsx +110 -0
  64. package/src/components/waka-ad-sidebar/WakaAdSidebar.stories.tsx +89 -0
  65. package/src/components/waka-ad-sidebar/index.tsx +3 -2
  66. package/src/components/waka-ad-sticky-footer/WakaAdStickyFooter.stories.tsx +88 -0
  67. package/src/components/waka-address-autocomplete/WakaAddressAutocomplete.stories.tsx +46 -0
  68. package/src/components/waka-admincrumb/WakaAdmincrumb.stories.tsx +166 -0
  69. package/src/components/waka-alert-panel/WakaAlertPanel.stories.tsx +45 -0
  70. package/src/components/waka-alert-stack/WakaAlertStack.stories.tsx +62 -0
  71. package/src/components/waka-allocation-matrix/WakaAllocationMatrix.stories.tsx +68 -0
  72. package/src/components/waka-approval-chain/WakaApprovalChain.stories.tsx +63 -0
  73. package/src/components/waka-audit-log/WakaAuditLog.stories.tsx +73 -0
  74. package/src/components/waka-autocomplete/WakaAutocomplete.stories.tsx +132 -172
  75. package/src/components/waka-biometric-prompt/WakaBiometricPrompt.stories.tsx +48 -0
  76. package/src/components/waka-breadcrumb/WakaBreadcrumb.stories.tsx +74 -191
  77. package/src/components/waka-breadcrumb-path/WakaBreadcrumbPath.stories.tsx +40 -0
  78. package/src/components/waka-budget-burn/WakaBudgetBurn.stories.tsx +86 -0
  79. package/src/components/waka-capacity-planner/WakaCapacityPlanner.stories.tsx +273 -0
  80. package/src/components/waka-cart-summary/WakaCartSummary.stories.tsx +176 -0
  81. package/src/components/waka-cart-summary/index.tsx +19 -10
  82. package/src/components/waka-challenge-timer/WakaChallengeTimer.stories.tsx +98 -0
  83. package/src/components/waka-chat-bubble/WakaChatBubble.stories.tsx +118 -0
  84. package/src/components/waka-checklist/WakaChecklist.stories.tsx +71 -0
  85. package/src/components/waka-checkout-stepper/WakaCheckoutStepper.stories.tsx +102 -0
  86. package/src/components/waka-cohort-table/WakaCohortTable.stories.tsx +56 -0
  87. package/src/components/waka-color-picker/WakaColorPicker.stories.tsx +99 -155
  88. package/src/components/waka-combo-counter/WakaComboCounter.stories.tsx +128 -0
  89. package/src/components/waka-command-bar/WakaCommandBar.stories.tsx +45 -0
  90. package/src/components/waka-compare-period/WakaComparePeriod.stories.tsx +76 -0
  91. package/src/components/waka-config-comparator/WakaConfigComparator.stories.tsx +143 -0
  92. package/src/components/waka-connection-matrix/WakaConnectionMatrix.stories.tsx +52 -0
  93. package/src/components/waka-content-recommendation/WakaContentRecommendation.stories.tsx +41 -0
  94. package/src/components/waka-coupon-input/WakaCouponInput.stories.tsx +126 -0
  95. package/src/components/waka-credit-card-input/WakaCreditCardInput.stories.tsx +120 -0
  96. package/src/components/waka-datetime-picker.form-integration/WakaDateTimePickerForm.stories.tsx +79 -0
  97. package/src/components/waka-dependency-tree/WakaDependencyTree.stories.tsx +72 -0
  98. package/src/components/waka-device-trust/WakaDeviceTrust.stories.tsx +109 -0
  99. package/src/components/waka-empty-state/WakaEmptyState.stories.tsx +87 -0
  100. package/src/components/waka-feature-announcement/WakaFeatureAnnouncement.stories.tsx +47 -0
  101. package/src/components/waka-feature-flag-row/WakaFeatureFlagRow.stories.tsx +188 -0
  102. package/src/components/waka-file-upload/WakaFileUpload.stories.tsx +118 -174
  103. package/src/components/waka-floating-nav/WakaFloatingNav.stories.tsx +53 -0
  104. package/src/components/waka-goal-progress/WakaGoalProgress.stories.tsx +137 -0
  105. package/src/components/waka-hotspot/WakaHotspot.stories.tsx +56 -0
  106. package/src/components/waka-invoice-preview/WakaInvoicePreview.stories.tsx +169 -0
  107. package/src/components/waka-kpi-dashboard/WakaKpiDashboard.stories.tsx +46 -0
  108. package/src/components/waka-level-progress/WakaLevelProgress.stories.tsx +94 -75
  109. package/src/components/waka-liquid-button/WakaLiquidButton.stories.tsx +45 -0
  110. package/src/components/waka-magic-link/WakaMagicLink.stories.tsx +61 -0
  111. package/src/components/waka-magnetic-button/WakaMagneticButton.stories.tsx +40 -0
  112. package/src/components/waka-mention-input/WakaMentionInput.stories.tsx +140 -0
  113. package/src/components/waka-milestone-road/WakaMilestoneRoad.stories.tsx +143 -0
  114. package/src/components/waka-orbital-menu/WakaOrbitalMenu.stories.tsx +54 -0
  115. package/src/components/waka-order-tracker/WakaOrderTracker.stories.tsx +163 -0
  116. package/src/components/waka-outstream-video/WakaOutstreamVideo.stories.tsx +94 -0
  117. package/src/components/waka-pagination/WakaPagination.stories.tsx +110 -280
  118. package/src/components/waka-password-strength/WakaPasswordStrength.stories.tsx +132 -268
  119. package/src/components/waka-payment-method-picker/WakaPaymentMethodPicker.stories.tsx +141 -0
  120. package/src/components/waka-permission-matrix/WakaPermissionMatrix.stories.tsx +124 -0
  121. package/src/components/waka-phone-input/WakaPhoneInput.stories.tsx +56 -0
  122. package/src/components/waka-points-popup/WakaPointsPopup.stories.tsx +96 -0
  123. package/src/components/waka-power-up/WakaPowerUp.stories.tsx +121 -0
  124. package/src/components/waka-presence-indicator/WakaPresenceIndicator.stories.tsx +49 -0
  125. package/src/components/waka-pricing-table/WakaPricingTable.stories.tsx +159 -0
  126. package/src/components/waka-product-card/WakaProductCard.stories.tsx +202 -0
  127. package/src/components/waka-progress-onboarding/WakaProgressOnboarding.stories.tsx +57 -0
  128. package/src/components/waka-pull-to-refresh/WakaPullToRefresh.stories.tsx +51 -0
  129. package/src/components/waka-rank-badge/WakaRankBadge.stories.tsx +108 -0
  130. package/src/components/waka-rating-input/WakaRatingInput.stories.tsx +51 -0
  131. package/src/components/waka-reaction-picker/WakaReactionPicker.stories.tsx +52 -0
  132. package/src/components/waka-region-map/WakaRegionMap.stories.tsx +181 -0
  133. package/src/components/waka-resource-pool/WakaResourcePool.stories.tsx +70 -0
  134. package/src/components/waka-rich-text-editor/WakaRichTextEditor.stories.tsx +108 -197
  135. package/src/components/waka-rollback-slider/WakaRollbackSlider.stories.tsx +41 -0
  136. package/src/components/waka-schedule-picker/WakaSchedulePicker.stories.tsx +64 -0
  137. package/src/components/waka-season-pass/WakaSeasonPass.stories.tsx +107 -0
  138. package/src/components/waka-security-scan-result/WakaSecurityScanResult.stories.tsx +146 -0
  139. package/src/components/waka-security-score/WakaSecurityScore.stories.tsx +63 -0
  140. package/src/components/waka-session-manager/WakaSessionManager.stories.tsx +68 -0
  141. package/src/components/waka-signature-pad/WakaSignaturePad.stories.tsx +159 -0
  142. package/src/components/waka-signature-pad/index.tsx +5 -3
  143. package/src/components/waka-sla-tracker/WakaSlaTracker.stories.tsx +65 -0
  144. package/src/components/waka-slider-range/WakaSliderRange.stories.tsx +66 -0
  145. package/src/components/waka-sponsored-badge/WakaSponsoredBadge.stories.tsx +60 -0
  146. package/src/components/waka-sponsored-card/WakaSponsoredCard.stories.tsx +64 -0
  147. package/src/components/waka-sponsored-feed/WakaSponsoredFeed.stories.tsx +58 -0
  148. package/src/components/waka-spotlight/WakaSpotlight.stories.tsx +53 -0
  149. package/src/components/waka-stats-hexagon/WakaStatsHexagon.stories.tsx +161 -0
  150. package/src/components/waka-stepper/WakaStepper.stories.tsx +137 -410
  151. package/src/components/waka-swipe-card/WakaSwipeCard.stories.tsx +51 -0
  152. package/src/components/waka-tag-input/WakaTagInput.stories.tsx +224 -0
  153. package/src/components/waka-team-banner/WakaTeamBanner.stories.tsx +50 -0
  154. package/src/components/waka-theme-creator/WakaThemeCreator.stories.tsx +58 -0
  155. package/src/components/waka-theme-manager/WakaThemeManager.stories.tsx +298 -0
  156. package/src/components/waka-theme-manager/index.tsx +6 -11
  157. package/src/components/waka-thread-view/WakaThreadView.stories.tsx +143 -0
  158. package/src/components/waka-timeline/WakaTimeline.stories.tsx +171 -324
  159. package/src/components/waka-tooltip-tour/WakaTooltipTour.stories.tsx +92 -0
  160. package/src/components/waka-tour-guide/WakaTourGuide.stories.tsx +89 -0
  161. package/src/components/waka-treemap-chart/WakaTreemapChart.stories.tsx +234 -129
  162. package/src/components/waka-treemap-chart/index.tsx +2 -2
  163. package/src/components/waka-two-factor-setup/WakaTwoFactorSetup.stories.tsx +142 -0
  164. package/src/components/waka-typing-indicator/WakaTypingIndicator.stories.tsx +134 -0
  165. package/src/components/waka-video-ad/WakaVideoAd.stories.tsx +138 -0
  166. package/src/components/waka-video-call/WakaVideoCall.stories.tsx +186 -0
  167. package/src/components/waka-video-overlay/WakaVideoOverlay.stories.tsx +100 -0
  168. package/src/components/waka-voice-message/WakaVoiceMessage.stories.tsx +190 -0
  169. package/src/components/waka-welcome-modal/WakaWelcomeModal.stories.tsx +87 -0
  170. package/src/components/waka-xp-bar/WakaXPBar.stories.tsx +29 -29
  171. package/dist/useDataTableImport-D8R2HQl6.mjs +0 -229
  172. package/dist/useDataTableImport-S_hhA5Wo.js +0 -9
  173. package/src/components/DataTable/README.md +0 -446
@@ -38,8 +38,37 @@ export * from './user-management'
38
38
  // Content Blocks
39
39
  export * from './activity-timeline'
40
40
  export * from './calendar-view'
41
- export * from './chat'
42
- export * from './empty-states'
41
+ // Chat - explicit exports to avoid conflicts with waka-chat-bubble (ChatUser, MessageStatus)
42
+ export {
43
+ WakaChat,
44
+ defaultChatUser,
45
+ defaultChatConversations,
46
+ defaultChatMessages,
47
+ WakaChatWidget,
48
+ useChatWidget,
49
+ type MessageStatus as ChatBlockMessageStatus,
50
+ type ChatUser as ChatBlockUser,
51
+ type ChatMessage,
52
+ type ChatConversation,
53
+ type WakaChatProps,
54
+ type WakaChatWidgetProps,
55
+ type UseChatWidgetOptions,
56
+ } from './chat'
57
+
58
+ // Empty States - explicit exports to avoid conflicts with waka-empty-state (EmptyStateAction, WakaEmptyStateProps)
59
+ export {
60
+ WakaEmptyState as BlockEmptyState,
61
+ NoDataState,
62
+ NoResultsState,
63
+ NoMessagesState,
64
+ NoFilesState,
65
+ EmptyCartState,
66
+ NoNotificationsState,
67
+ ErrorState,
68
+ type EmptyStateType,
69
+ type EmptyStateAction as BlockEmptyStateAction,
70
+ type WakaEmptyStateProps as BlockEmptyStateProps,
71
+ } from './empty-states'
43
72
  export * from './error-pages'
44
73
  export * from './faq'
45
74
 
@@ -72,7 +101,16 @@ export type {
72
101
  } from './kanban-board'
73
102
 
74
103
  export * from './landing'
75
- export * from './pricing'
104
+ // Pricing - explicit exports to avoid conflict with waka-pricing-table (PricingFeature)
105
+ export {
106
+ WakaPricing,
107
+ defaultPricingPlans,
108
+ defaultPricingFAQ,
109
+ type PricingFeature as BlockPricingFeature,
110
+ type PricingPlan,
111
+ type PricingFAQ,
112
+ type WakaPricingProps,
113
+ } from './pricing'
76
114
  export * from './wizard'
77
115
 
78
116
  // Theme & i18n
@@ -81,9 +119,29 @@ export * from './i18n-editor'
81
119
 
82
120
  // New Blocks - KPI, E-commerce, Gaming, Security, Communication, DevOps
83
121
  export * from './dashboard-kpi'
84
- export * from './checkout-flow'
122
+ // Checkout Flow - explicit exports to avoid conflict with waka-cart-summary (CartItem)
123
+ export {
124
+ CheckoutFlow,
125
+ defaultShippingMethods,
126
+ defaultPaymentMethods,
127
+ defaultCartItems,
128
+ type CartItem as CheckoutCartItem,
129
+ type ShippingMethod,
130
+ type PaymentMethod,
131
+ type CheckoutAddress,
132
+ type CheckoutFlowProps,
133
+ } from './checkout-flow'
85
134
  export * from './player-profile'
86
- export * from './auth-2fa'
135
+ // Auth 2FA - explicit exports to avoid conflict with waka-two-factor-setup (BackupCode)
136
+ export {
137
+ Auth2FA,
138
+ defaultBackupCodes,
139
+ defaultStatus as defaultAuth2FAStatus,
140
+ type BackupCode as Auth2FABackupCode,
141
+ type TwoFactorMethod,
142
+ type TwoFactorStatus,
143
+ type Auth2FAProps,
144
+ } from './auth-2fa'
87
145
 
88
146
  // Chat Interface - export with aliases to avoid conflicts with ./chat block
89
147
  export {
@@ -101,15 +159,28 @@ export type {
101
159
  ChatReaction as ChatInterfaceReaction,
102
160
  } from './chat-interface'
103
161
 
104
- export * from './deployment-dashboard'
162
+ // Deployment Dashboard - explicit exports to avoid conflicts with waka-deployment-lane (Deployment, DeploymentStatus, Environment, PipelineStage)
163
+ export {
164
+ DeploymentDashboard,
165
+ defaultDeployments,
166
+ defaultPipelines,
167
+ defaultEnvironments,
168
+ type Deployment as BlockDeployment,
169
+ type DeploymentStatus as BlockDeploymentStatus,
170
+ type Environment as BlockEnvironment,
171
+ type PipelineStage as BlockPipelineStage,
172
+ type Pipeline as DeploymentPipeline,
173
+ type EnvironmentStatus,
174
+ type DeploymentDashboardProps,
175
+ } from './deployment-dashboard'
105
176
 
106
177
  // DevOps Blocks
107
178
  export {
108
179
  IncidentManager,
109
180
  defaultIncidents,
110
- type Incident,
111
- type IncidentSeverity,
112
- type IncidentStatus,
181
+ type Incident as BlockIncident,
182
+ type IncidentSeverity as BlockIncidentSeverity,
183
+ type IncidentStatus as BlockIncidentStatus,
113
184
  type IncidentResponder,
114
185
  type IncidentEvent,
115
186
  type IncidentManagerProps,
@@ -165,7 +236,7 @@ export {
165
236
  defaultCloudCostItems,
166
237
  defaultCostAnomalies,
167
238
  type CostSummary,
168
- type CostItem,
239
+ type CostItem as CloudCostItem,
169
240
  type CostAnomaly,
170
241
  type CostCategory,
171
242
  type CloudProvider as CostCloudProvider,
@@ -204,7 +275,7 @@ export {
204
275
  type OrchestratorContainer,
205
276
  type ContainerStatus as OrchestratorContainerStatus,
206
277
  type ServiceStatus as OrchestratorServiceStatus,
207
- type ContainerResource,
278
+ type ContainerResource as OrchestratorContainerResource,
208
279
  type ContainerOrchestratorProps,
209
280
  } from './container-orchestrator'
210
281
 
@@ -221,3 +292,84 @@ export {
221
292
  type QueryStatus,
222
293
  type DatabaseAdminProps,
223
294
  } from './database-admin'
295
+
296
+ // Antivirus / ClamAV Blocks
297
+ export {
298
+ AntivirusDashboard,
299
+ defaultRecentScans,
300
+ defaultWeeklyStats,
301
+ defaultTopThreats,
302
+ type ServiceHealth as AVServiceHealth,
303
+ type ScanResult as AVScanResult,
304
+ type ThreatSeverity as AVThreatSeverity,
305
+ type ScanEntry,
306
+ type ThreatInfo,
307
+ type WeeklyStat,
308
+ type AntivirusDashboardProps,
309
+ } from './antivirus-dashboard'
310
+
311
+ export {
312
+ FileScanUploader,
313
+ type FileScanStatus,
314
+ type ScannedFile,
315
+ type FileScanUploaderProps,
316
+ } from './file-scan-uploader'
317
+
318
+ export {
319
+ QuarantineManager,
320
+ type ThreatSeverity as QuarantineThreatSeverity,
321
+ type QuarantinedFile,
322
+ type QuarantineManagerProps,
323
+ } from './quarantine-manager'
324
+
325
+ export {
326
+ ScanHistoryLog,
327
+ type ScanResult as ScanLogResult,
328
+ type ScanLogEntry,
329
+ type ScanHistoryLogProps,
330
+ } from './scan-history-log'
331
+
332
+ export {
333
+ ClamAVServiceStatus,
334
+ type DaemonStatus,
335
+ type FreshclamStatus,
336
+ type ClamAVMetrics,
337
+ type SignatureInfo as ClamAVSignatureInfo,
338
+ type UptimeEntry,
339
+ type ClamAVServiceStatusProps,
340
+ } from './clamav-service-status'
341
+
342
+ export {
343
+ SignatureDatabaseManager,
344
+ type UpdateStatus as SignatureUpdateStatus,
345
+ type SignatureDatabase,
346
+ type SignatureUpdate,
347
+ type FreshclamConfig,
348
+ type SignatureDatabaseManagerProps,
349
+ } from './signature-database-manager'
350
+
351
+ export {
352
+ ScanPolicyEditor,
353
+ defaultScanPolicy,
354
+ type DetectionAction,
355
+ type ScanPolicy,
356
+ type ScanPolicyEditorProps,
357
+ } from './scan-policy-editor'
358
+
359
+ export {
360
+ ThreatAlertBanner,
361
+ defaultThreatAlerts,
362
+ type AlertSeverity as ThreatAlertSeverity,
363
+ type ThreatAction,
364
+ type ThreatAlert,
365
+ type ThreatAlertBannerProps,
366
+ } from './threat-alert-banner'
367
+
368
+ export {
369
+ ScanReportGenerator,
370
+ type ReportFormat,
371
+ type ReportType,
372
+ type ReportConfig,
373
+ type ReportPreview,
374
+ type ScanReportGeneratorProps,
375
+ } from './scan-report-generator'
@@ -0,0 +1,209 @@
1
+ import type { Meta, StoryObj } from "@storybook/react"
2
+ import { QuarantineManager, QuarantinedFile } from "./index"
3
+
4
+ const meta = {
5
+ title: "Blocks/Antivirus/QuarantineManager",
6
+ component: QuarantineManager,
7
+ parameters: {
8
+ layout: "padded",
9
+ },
10
+ tags: ["autodocs"],
11
+ } satisfies Meta<typeof QuarantineManager>
12
+
13
+ export default meta
14
+ type Story = StoryObj<typeof meta>
15
+
16
+ const mockFiles: QuarantinedFile[] = [
17
+ {
18
+ id: "1",
19
+ originalName: "invoice_2024_malicious.pdf",
20
+ originalPath: "/uploads/invoices/2024/invoice_2024_malicious.pdf",
21
+ threatName: "Win.Trojan.Agent-123456",
22
+ severity: "critical",
23
+ quarantinedAt: new Date("2024-02-10T14:30:00"),
24
+ fileSize: 2457600,
25
+ fileHash: "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6",
26
+ uploadedBy: "john.doe@company.com",
27
+ scanEngine: "ClamAV",
28
+ signatureVersion: "27145",
29
+ },
30
+ {
31
+ id: "2",
32
+ originalName: "test_file.txt",
33
+ originalPath: "/uploads/documents/test_file.txt",
34
+ threatName: "Eicar-Test-Signature",
35
+ severity: "high",
36
+ quarantinedAt: new Date("2024-02-11T09:15:00"),
37
+ fileSize: 68,
38
+ fileHash: "44d88612fea8a8f36de82e1278abb02f",
39
+ uploadedBy: "test.user@company.com",
40
+ scanEngine: "ClamAV",
41
+ signatureVersion: "27145",
42
+ },
43
+ {
44
+ id: "3",
45
+ originalName: "archive_compressed.zip",
46
+ originalPath: "/uploads/archives/archive_compressed.zip",
47
+ threatName: "PUA.Win.Packer.Upx-1",
48
+ severity: "medium",
49
+ quarantinedAt: new Date("2024-02-11T10:45:00"),
50
+ fileSize: 5242880,
51
+ fileHash: "b3c4d5e6f7g8h9i0j1k2l3m4n5o6p7q8r9s0t1u2v3w4x5y6z7",
52
+ uploadedBy: "admin@company.com",
53
+ scanEngine: "ClamAV",
54
+ signatureVersion: "27144",
55
+ },
56
+ {
57
+ id: "4",
58
+ originalName: "script_suspicious.js",
59
+ originalPath: "/uploads/scripts/script_suspicious.js",
60
+ threatName: "Js.Trojan.Cryxos-2",
61
+ severity: "critical",
62
+ quarantinedAt: new Date("2024-02-12T08:00:00"),
63
+ fileSize: 15360,
64
+ fileHash: "c4d5e6f7g8h9i0j1k2l3m4n5o6p7q8r9s0t1u2v3w4x5y6z7a8",
65
+ uploadedBy: "developer@company.com",
66
+ scanEngine: "ClamAV",
67
+ signatureVersion: "27145",
68
+ },
69
+ {
70
+ id: "5",
71
+ originalName: "document_exploit.docx",
72
+ originalPath: "/uploads/documents/2024/document_exploit.docx",
73
+ threatName: "Doc.Exploit.CVE_2017_11882-1",
74
+ severity: "high",
75
+ quarantinedAt: new Date("2024-02-12T11:20:00"),
76
+ fileSize: 1048576,
77
+ fileHash: "d5e6f7g8h9i0j1k2l3m4n5o6p7q8r9s0t1u2v3w4x5y6z7a8b9",
78
+ uploadedBy: "manager@company.com",
79
+ scanEngine: "ClamAV",
80
+ signatureVersion: "27145",
81
+ },
82
+ {
83
+ id: "6",
84
+ originalName: "adware_installer.exe",
85
+ originalPath: "/uploads/software/adware_installer.exe",
86
+ threatName: "PUA.Win.Adware.Generic-1",
87
+ severity: "low",
88
+ quarantinedAt: new Date("2024-02-09T16:30:00"),
89
+ fileSize: 3145728,
90
+ fileHash: "e6f7g8h9i0j1k2l3m4n5o6p7q8r9s0t1u2v3w4x5y6z7a8b9c0",
91
+ uploadedBy: "user@company.com",
92
+ scanEngine: "ClamAV",
93
+ signatureVersion: "27143",
94
+ },
95
+ {
96
+ id: "7",
97
+ originalName: "phishing_page.html",
98
+ originalPath: "/uploads/web/phishing_page.html",
99
+ threatName: "Html.Phishing.Bank-5",
100
+ severity: "medium",
101
+ quarantinedAt: new Date("2024-02-10T13:45:00"),
102
+ fileSize: 8192,
103
+ fileHash: "f7g8h9i0j1k2l3m4n5o6p7q8r9s0t1u2v3w4x5y6z7a8b9c0d1",
104
+ uploadedBy: "webmaster@company.com",
105
+ scanEngine: "ClamAV",
106
+ signatureVersion: "27144",
107
+ },
108
+ {
109
+ id: "8",
110
+ originalName: "ransomware_sample.bin",
111
+ originalPath: "/uploads/samples/ransomware_sample.bin",
112
+ threatName: "Win.Ransomware.WannaCry-2",
113
+ severity: "critical",
114
+ quarantinedAt: new Date("2024-02-08T10:00:00"),
115
+ fileSize: 4194304,
116
+ fileHash: "g8h9i0j1k2l3m4n5o6p7q8r9s0t1u2v3w4x5y6z7a8b9c0d1e2",
117
+ uploadedBy: "security@company.com",
118
+ scanEngine: "ClamAV",
119
+ signatureVersion: "27142",
120
+ },
121
+ ]
122
+
123
+ export const Default: Story = {
124
+ args: {
125
+ files: mockFiles,
126
+ totalCount: mockFiles.length,
127
+ onDelete: (fileId: string) => {
128
+ console.log("Delete file:", fileId)
129
+ },
130
+ onRestore: (fileId: string) => {
131
+ console.log("Restore file:", fileId)
132
+ },
133
+ onRescan: (fileId: string) => {
134
+ console.log("Rescan file:", fileId)
135
+ },
136
+ onPurgeAll: () => {
137
+ console.log("Purge all files")
138
+ },
139
+ onDownloadReport: (fileId: string) => {
140
+ console.log("Download report for file:", fileId)
141
+ },
142
+ },
143
+ }
144
+
145
+ export const Empty: Story = {
146
+ args: {
147
+ files: [],
148
+ totalCount: 0,
149
+ onDelete: (fileId: string) => {
150
+ console.log("Delete file:", fileId)
151
+ },
152
+ onRestore: (fileId: string) => {
153
+ console.log("Restore file:", fileId)
154
+ },
155
+ onRescan: (fileId: string) => {
156
+ console.log("Rescan file:", fileId)
157
+ },
158
+ onPurgeAll: () => {
159
+ console.log("Purge all files")
160
+ },
161
+ onDownloadReport: (fileId: string) => {
162
+ console.log("Download report for file:", fileId)
163
+ },
164
+ },
165
+ }
166
+
167
+ export const CriticalOnly: Story = {
168
+ args: {
169
+ files: mockFiles.filter((f) => f.severity === "critical"),
170
+ totalCount: mockFiles.filter((f) => f.severity === "critical").length,
171
+ onDelete: (fileId: string) => {
172
+ console.log("Delete file:", fileId)
173
+ },
174
+ onRestore: (fileId: string) => {
175
+ console.log("Restore file:", fileId)
176
+ },
177
+ onRescan: (fileId: string) => {
178
+ console.log("Rescan file:", fileId)
179
+ },
180
+ onPurgeAll: () => {
181
+ console.log("Purge all files")
182
+ },
183
+ onDownloadReport: (fileId: string) => {
184
+ console.log("Download report for file:", fileId)
185
+ },
186
+ },
187
+ }
188
+
189
+ export const SingleFile: Story = {
190
+ args: {
191
+ files: [mockFiles[0]],
192
+ totalCount: 1,
193
+ onDelete: (fileId: string) => {
194
+ console.log("Delete file:", fileId)
195
+ },
196
+ onRestore: (fileId: string) => {
197
+ console.log("Restore file:", fileId)
198
+ },
199
+ onRescan: (fileId: string) => {
200
+ console.log("Rescan file:", fileId)
201
+ },
202
+ onPurgeAll: () => {
203
+ console.log("Purge all files")
204
+ },
205
+ onDownloadReport: (fileId: string) => {
206
+ console.log("Download report for file:", fileId)
207
+ },
208
+ },
209
+ }