@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.
- package/dist/blocks/antivirus-dashboard/index.d.ts +44 -0
- package/dist/blocks/clamav-service-status/index.d.ts +35 -0
- package/dist/blocks/file-scan-uploader/index.d.ts +29 -0
- package/dist/blocks/index.d.ts +18 -9
- package/dist/blocks/quarantine-manager/index.d.ts +27 -0
- package/dist/blocks/scan-history-log/index.d.ts +28 -0
- package/dist/blocks/scan-policy-editor/index.d.ts +27 -0
- package/dist/blocks/scan-report-generator/index.d.ts +47 -0
- package/dist/blocks/signature-database-manager/index.d.ts +39 -0
- package/dist/blocks/threat-alert-banner/index.d.ts +26 -0
- package/dist/components/index.d.ts +4 -4
- package/dist/components/waka-signature-pad/index.d.ts +1 -1
- package/dist/exceljs.min-BcLLX0PC.js +29 -0
- package/dist/exceljs.min-KOayaaQ4.mjs +23013 -0
- package/dist/export.cjs.js +1 -1
- package/dist/export.d.ts +2 -2
- package/dist/export.es.js +1 -1
- package/dist/index.cjs.js +136 -136
- package/dist/index.es.js +29978 -27215
- package/dist/stories/Button.stories.d.ts +1 -1
- package/dist/stories/Header.stories.d.ts +1 -1
- package/dist/stories/Page.stories.d.ts +1 -1
- package/dist/useDataTableImport-COVnvslz.js +9 -0
- package/dist/useDataTableImport-DAlxBY8w.mjs +237 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/logger.d.ts +9 -0
- package/package.json +6 -5
- package/src/blocks/antivirus-dashboard/AntivirusDashboard.stories.tsx +291 -0
- package/src/blocks/antivirus-dashboard/index.tsx +525 -0
- package/src/blocks/clamav-service-status/ClamAVServiceStatus.stories.tsx +195 -0
- package/src/blocks/clamav-service-status/index.tsx +370 -0
- package/src/blocks/file-scan-uploader/FileScanUploader.stories.tsx +257 -0
- package/src/blocks/file-scan-uploader/index.tsx +311 -0
- package/src/blocks/index.ts +163 -11
- package/src/blocks/quarantine-manager/QuarantineManager.stories.tsx +209 -0
- package/src/blocks/quarantine-manager/index.tsx +435 -0
- package/src/blocks/scan-history-log/ScanHistoryLog.stories.tsx +231 -0
- package/src/blocks/scan-history-log/index.tsx +406 -0
- package/src/blocks/scan-policy-editor/ScanPolicyEditor.stories.tsx +106 -0
- package/src/blocks/scan-policy-editor/index.tsx +418 -0
- package/src/blocks/scan-report-generator/ScanReportGenerator.stories.tsx +232 -0
- package/src/blocks/scan-report-generator/index.tsx +612 -0
- package/src/blocks/sidebar/index.tsx +2 -1
- package/src/blocks/signature-database-manager/SignatureDatabaseManager.stories.tsx +279 -0
- package/src/blocks/signature-database-manager/index.tsx +470 -0
- package/src/blocks/theme-creator-block/index.tsx +16 -2
- package/src/blocks/threat-alert-banner/ThreatAlertBanner.stories.tsx +152 -0
- package/src/blocks/threat-alert-banner/index.tsx +320 -0
- package/src/components/DataTable/DataTable.stories.tsx +203 -0
- package/src/components/DataTable/hooks/useDataTableExport.ts +38 -31
- package/src/components/DataTable/hooks/useDataTableImport.ts +31 -20
- package/src/components/error-boundary/ErrorBoundary.stories.tsx +125 -0
- package/src/components/index.ts +45 -4
- package/src/components/language-selector/LanguageSelector.stories.tsx +112 -0
- package/src/components/theme-selector/ThemeSelector.stories.tsx +77 -0
- package/src/components/toaster/Toaster.stories.tsx +67 -0
- package/src/components/waka-activity-feed/WakaActivityFeed.stories.tsx +116 -0
- package/src/components/waka-ad-banner/WakaAdBanner.stories.tsx +102 -0
- package/src/components/waka-ad-fallback/WakaAdFallback.stories.tsx +117 -0
- package/src/components/waka-ad-inline/WakaAdInline.stories.tsx +105 -0
- package/src/components/waka-ad-interstitial/WakaAdInterstitial.stories.tsx +92 -0
- package/src/components/waka-ad-placeholder/WakaAdPlaceholder.stories.tsx +89 -0
- package/src/components/waka-ad-provider/WakaAdProvider.stories.tsx +110 -0
- package/src/components/waka-ad-sidebar/WakaAdSidebar.stories.tsx +89 -0
- package/src/components/waka-ad-sidebar/index.tsx +3 -2
- package/src/components/waka-ad-sticky-footer/WakaAdStickyFooter.stories.tsx +88 -0
- package/src/components/waka-address-autocomplete/WakaAddressAutocomplete.stories.tsx +46 -0
- package/src/components/waka-admincrumb/WakaAdmincrumb.stories.tsx +166 -0
- package/src/components/waka-alert-panel/WakaAlertPanel.stories.tsx +45 -0
- package/src/components/waka-alert-stack/WakaAlertStack.stories.tsx +62 -0
- package/src/components/waka-allocation-matrix/WakaAllocationMatrix.stories.tsx +68 -0
- package/src/components/waka-approval-chain/WakaApprovalChain.stories.tsx +63 -0
- package/src/components/waka-audit-log/WakaAuditLog.stories.tsx +73 -0
- package/src/components/waka-autocomplete/WakaAutocomplete.stories.tsx +132 -172
- package/src/components/waka-biometric-prompt/WakaBiometricPrompt.stories.tsx +48 -0
- package/src/components/waka-breadcrumb/WakaBreadcrumb.stories.tsx +74 -191
- package/src/components/waka-breadcrumb-path/WakaBreadcrumbPath.stories.tsx +40 -0
- package/src/components/waka-budget-burn/WakaBudgetBurn.stories.tsx +86 -0
- package/src/components/waka-capacity-planner/WakaCapacityPlanner.stories.tsx +273 -0
- package/src/components/waka-cart-summary/WakaCartSummary.stories.tsx +176 -0
- package/src/components/waka-cart-summary/index.tsx +19 -10
- package/src/components/waka-challenge-timer/WakaChallengeTimer.stories.tsx +98 -0
- package/src/components/waka-chat-bubble/WakaChatBubble.stories.tsx +118 -0
- package/src/components/waka-checklist/WakaChecklist.stories.tsx +71 -0
- package/src/components/waka-checkout-stepper/WakaCheckoutStepper.stories.tsx +102 -0
- package/src/components/waka-cohort-table/WakaCohortTable.stories.tsx +56 -0
- package/src/components/waka-color-picker/WakaColorPicker.stories.tsx +99 -155
- package/src/components/waka-combo-counter/WakaComboCounter.stories.tsx +128 -0
- package/src/components/waka-command-bar/WakaCommandBar.stories.tsx +45 -0
- package/src/components/waka-compare-period/WakaComparePeriod.stories.tsx +76 -0
- package/src/components/waka-config-comparator/WakaConfigComparator.stories.tsx +143 -0
- package/src/components/waka-connection-matrix/WakaConnectionMatrix.stories.tsx +52 -0
- package/src/components/waka-content-recommendation/WakaContentRecommendation.stories.tsx +41 -0
- package/src/components/waka-coupon-input/WakaCouponInput.stories.tsx +126 -0
- package/src/components/waka-credit-card-input/WakaCreditCardInput.stories.tsx +120 -0
- package/src/components/waka-datetime-picker.form-integration/WakaDateTimePickerForm.stories.tsx +79 -0
- package/src/components/waka-dependency-tree/WakaDependencyTree.stories.tsx +72 -0
- package/src/components/waka-device-trust/WakaDeviceTrust.stories.tsx +109 -0
- package/src/components/waka-empty-state/WakaEmptyState.stories.tsx +87 -0
- package/src/components/waka-feature-announcement/WakaFeatureAnnouncement.stories.tsx +47 -0
- package/src/components/waka-feature-flag-row/WakaFeatureFlagRow.stories.tsx +188 -0
- package/src/components/waka-file-upload/WakaFileUpload.stories.tsx +118 -174
- package/src/components/waka-floating-nav/WakaFloatingNav.stories.tsx +53 -0
- package/src/components/waka-goal-progress/WakaGoalProgress.stories.tsx +137 -0
- package/src/components/waka-hotspot/WakaHotspot.stories.tsx +56 -0
- package/src/components/waka-invoice-preview/WakaInvoicePreview.stories.tsx +169 -0
- package/src/components/waka-kpi-dashboard/WakaKpiDashboard.stories.tsx +46 -0
- package/src/components/waka-level-progress/WakaLevelProgress.stories.tsx +94 -75
- package/src/components/waka-liquid-button/WakaLiquidButton.stories.tsx +45 -0
- package/src/components/waka-magic-link/WakaMagicLink.stories.tsx +61 -0
- package/src/components/waka-magnetic-button/WakaMagneticButton.stories.tsx +40 -0
- package/src/components/waka-mention-input/WakaMentionInput.stories.tsx +140 -0
- package/src/components/waka-milestone-road/WakaMilestoneRoad.stories.tsx +143 -0
- package/src/components/waka-orbital-menu/WakaOrbitalMenu.stories.tsx +54 -0
- package/src/components/waka-order-tracker/WakaOrderTracker.stories.tsx +163 -0
- package/src/components/waka-outstream-video/WakaOutstreamVideo.stories.tsx +94 -0
- package/src/components/waka-pagination/WakaPagination.stories.tsx +110 -280
- package/src/components/waka-password-strength/WakaPasswordStrength.stories.tsx +132 -268
- package/src/components/waka-payment-method-picker/WakaPaymentMethodPicker.stories.tsx +141 -0
- package/src/components/waka-permission-matrix/WakaPermissionMatrix.stories.tsx +124 -0
- package/src/components/waka-phone-input/WakaPhoneInput.stories.tsx +56 -0
- package/src/components/waka-points-popup/WakaPointsPopup.stories.tsx +96 -0
- package/src/components/waka-power-up/WakaPowerUp.stories.tsx +121 -0
- package/src/components/waka-presence-indicator/WakaPresenceIndicator.stories.tsx +49 -0
- package/src/components/waka-pricing-table/WakaPricingTable.stories.tsx +159 -0
- package/src/components/waka-product-card/WakaProductCard.stories.tsx +202 -0
- package/src/components/waka-progress-onboarding/WakaProgressOnboarding.stories.tsx +57 -0
- package/src/components/waka-pull-to-refresh/WakaPullToRefresh.stories.tsx +51 -0
- package/src/components/waka-rank-badge/WakaRankBadge.stories.tsx +108 -0
- package/src/components/waka-rating-input/WakaRatingInput.stories.tsx +51 -0
- package/src/components/waka-reaction-picker/WakaReactionPicker.stories.tsx +52 -0
- package/src/components/waka-region-map/WakaRegionMap.stories.tsx +181 -0
- package/src/components/waka-resource-pool/WakaResourcePool.stories.tsx +70 -0
- package/src/components/waka-rich-text-editor/WakaRichTextEditor.stories.tsx +108 -197
- package/src/components/waka-rollback-slider/WakaRollbackSlider.stories.tsx +41 -0
- package/src/components/waka-schedule-picker/WakaSchedulePicker.stories.tsx +64 -0
- package/src/components/waka-season-pass/WakaSeasonPass.stories.tsx +107 -0
- package/src/components/waka-security-scan-result/WakaSecurityScanResult.stories.tsx +146 -0
- package/src/components/waka-security-score/WakaSecurityScore.stories.tsx +63 -0
- package/src/components/waka-session-manager/WakaSessionManager.stories.tsx +68 -0
- package/src/components/waka-signature-pad/WakaSignaturePad.stories.tsx +159 -0
- package/src/components/waka-signature-pad/index.tsx +5 -3
- package/src/components/waka-sla-tracker/WakaSlaTracker.stories.tsx +65 -0
- package/src/components/waka-slider-range/WakaSliderRange.stories.tsx +66 -0
- package/src/components/waka-sponsored-badge/WakaSponsoredBadge.stories.tsx +60 -0
- package/src/components/waka-sponsored-card/WakaSponsoredCard.stories.tsx +64 -0
- package/src/components/waka-sponsored-feed/WakaSponsoredFeed.stories.tsx +58 -0
- package/src/components/waka-spotlight/WakaSpotlight.stories.tsx +53 -0
- package/src/components/waka-stats-hexagon/WakaStatsHexagon.stories.tsx +161 -0
- package/src/components/waka-stepper/WakaStepper.stories.tsx +137 -410
- package/src/components/waka-swipe-card/WakaSwipeCard.stories.tsx +51 -0
- package/src/components/waka-tag-input/WakaTagInput.stories.tsx +224 -0
- package/src/components/waka-team-banner/WakaTeamBanner.stories.tsx +50 -0
- package/src/components/waka-theme-creator/WakaThemeCreator.stories.tsx +58 -0
- package/src/components/waka-theme-manager/WakaThemeManager.stories.tsx +298 -0
- package/src/components/waka-theme-manager/index.tsx +6 -11
- package/src/components/waka-thread-view/WakaThreadView.stories.tsx +143 -0
- package/src/components/waka-timeline/WakaTimeline.stories.tsx +171 -324
- package/src/components/waka-tooltip-tour/WakaTooltipTour.stories.tsx +92 -0
- package/src/components/waka-tour-guide/WakaTourGuide.stories.tsx +89 -0
- package/src/components/waka-treemap-chart/WakaTreemapChart.stories.tsx +234 -129
- package/src/components/waka-treemap-chart/index.tsx +2 -2
- package/src/components/waka-two-factor-setup/WakaTwoFactorSetup.stories.tsx +142 -0
- package/src/components/waka-typing-indicator/WakaTypingIndicator.stories.tsx +134 -0
- package/src/components/waka-video-ad/WakaVideoAd.stories.tsx +138 -0
- package/src/components/waka-video-call/WakaVideoCall.stories.tsx +186 -0
- package/src/components/waka-video-overlay/WakaVideoOverlay.stories.tsx +100 -0
- package/src/components/waka-voice-message/WakaVoiceMessage.stories.tsx +190 -0
- package/src/components/waka-welcome-modal/WakaWelcomeModal.stories.tsx +87 -0
- package/src/components/waka-xp-bar/WakaXPBar.stories.tsx +29 -29
- package/dist/useDataTableImport-D8R2HQl6.mjs +0 -229
- package/dist/useDataTableImport-S_hhA5Wo.js +0 -9
- package/src/components/DataTable/README.md +0 -446
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaAddressAutocomplete } from "./index"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof WakaAddressAutocomplete> = {
|
|
5
|
+
title: "Forms/WakaAddressAutocomplete",
|
|
6
|
+
component: WakaAddressAutocomplete,
|
|
7
|
+
parameters: { layout: "centered" },
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
argTypes: {
|
|
10
|
+
placeholder: { control: "text", description: "Placeholder" },
|
|
11
|
+
disabled: { control: "boolean", description: "Désactivé" },
|
|
12
|
+
showRecent: { control: "boolean", description: "Afficher les récents" },
|
|
13
|
+
showCurrentLocation: { control: "boolean", description: "Position actuelle" },
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default meta
|
|
18
|
+
type Story = StoryObj<typeof WakaAddressAutocomplete>
|
|
19
|
+
|
|
20
|
+
export const Default: Story = {
|
|
21
|
+
args: { placeholder: "Rechercher une adresse...", showRecent: true, showCurrentLocation: true },
|
|
22
|
+
render: (args) => (
|
|
23
|
+
<div style={{ width: 400 }}>
|
|
24
|
+
<WakaAddressAutocomplete {...args} />
|
|
25
|
+
</div>
|
|
26
|
+
),
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const Disabled: Story = {
|
|
30
|
+
args: { placeholder: "Adresse", disabled: true },
|
|
31
|
+
render: (args) => (
|
|
32
|
+
<div style={{ width: 400 }}>
|
|
33
|
+
<WakaAddressAutocomplete {...args} />
|
|
34
|
+
</div>
|
|
35
|
+
),
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const Minimal: Story = {
|
|
39
|
+
args: { placeholder: "Entrez une adresse", showRecent: false, showCurrentLocation: false },
|
|
40
|
+
render: (args) => (
|
|
41
|
+
<div style={{ width: 400 }}>
|
|
42
|
+
<WakaAddressAutocomplete {...args} />
|
|
43
|
+
</div>
|
|
44
|
+
),
|
|
45
|
+
}
|
|
46
|
+
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import * as React from "react"
|
|
3
|
+
import { WakaAdmincrumb, useAdmincrumb, type AdmincrumbLevel, type AdmincrumbItem } from "./index"
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof WakaAdmincrumb> = {
|
|
6
|
+
title: "Admin/WakaAdmincrumb",
|
|
7
|
+
component: WakaAdmincrumb,
|
|
8
|
+
parameters: { layout: "padded" },
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
argTypes: {
|
|
11
|
+
showIcons: { control: "boolean", description: "Afficher les icônes" },
|
|
12
|
+
showBadges: { control: "boolean", description: "Afficher les badges de type" },
|
|
13
|
+
showHome: { control: "boolean", description: "Afficher le bouton Home" },
|
|
14
|
+
resetable: { control: "boolean", description: "Afficher le bouton réinitialiser" },
|
|
15
|
+
variant: {
|
|
16
|
+
control: "select",
|
|
17
|
+
options: ["default", "minimal", "pills", "inline", "compact"],
|
|
18
|
+
description: "Style du breadcrumb"
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default meta
|
|
24
|
+
type Story = StoryObj<typeof WakaAdmincrumb>
|
|
25
|
+
|
|
26
|
+
const partnerItems: AdmincrumbItem[] = [
|
|
27
|
+
{ id: "partner1", name: "Partenaire Alpha", type: "partner" },
|
|
28
|
+
{ id: "partner2", name: "Partenaire Beta", type: "partner" },
|
|
29
|
+
{ id: "partner3", name: "Partenaire Gamma", type: "partner" },
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
const networkItems: AdmincrumbItem[] = [
|
|
33
|
+
{ id: "network1", name: "Réseau France", type: "network" },
|
|
34
|
+
{ id: "network2", name: "Réseau Europe", type: "network" },
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
const customerItems: AdmincrumbItem[] = [
|
|
38
|
+
{ id: "customer1", name: "Client Entreprise", type: "customer" },
|
|
39
|
+
{ id: "customer2", name: "Client PME", type: "customer" },
|
|
40
|
+
{ id: "customer3", name: "Client Startup", type: "customer" },
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
// Composant wrapper interactif qui gère l'état
|
|
44
|
+
function InteractiveAdmincrumb({
|
|
45
|
+
showIcons = true,
|
|
46
|
+
showBadges = false,
|
|
47
|
+
showHome = false,
|
|
48
|
+
resetable = false,
|
|
49
|
+
variant = "default",
|
|
50
|
+
initialPartner,
|
|
51
|
+
initialNetwork,
|
|
52
|
+
}: {
|
|
53
|
+
showIcons?: boolean
|
|
54
|
+
showBadges?: boolean
|
|
55
|
+
showHome?: boolean
|
|
56
|
+
resetable?: boolean
|
|
57
|
+
variant?: "default" | "minimal" | "pills" | "inline" | "compact"
|
|
58
|
+
initialPartner?: AdmincrumbItem
|
|
59
|
+
initialNetwork?: AdmincrumbItem
|
|
60
|
+
}) {
|
|
61
|
+
const { partner, network, customer, handleLevelChange, reset } = useAdmincrumb()
|
|
62
|
+
|
|
63
|
+
// Initialisation au premier rendu si des valeurs initiales sont fournies
|
|
64
|
+
const [initialized, setInitialized] = React.useState(false)
|
|
65
|
+
React.useEffect(() => {
|
|
66
|
+
if (!initialized) {
|
|
67
|
+
if (initialPartner) handleLevelChange(0, initialPartner)
|
|
68
|
+
if (initialNetwork) handleLevelChange(1, initialNetwork)
|
|
69
|
+
setInitialized(true)
|
|
70
|
+
}
|
|
71
|
+
}, [initialized, initialPartner, initialNetwork, handleLevelChange])
|
|
72
|
+
|
|
73
|
+
const levels: AdmincrumbLevel[] = [
|
|
74
|
+
{
|
|
75
|
+
type: "partner",
|
|
76
|
+
items: partnerItems,
|
|
77
|
+
selected: partner,
|
|
78
|
+
onSelect: (item) => handleLevelChange(0, item),
|
|
79
|
+
placeholder: "Sélectionner un partenaire",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
type: "network",
|
|
83
|
+
items: networkItems,
|
|
84
|
+
selected: network,
|
|
85
|
+
onSelect: (item) => handleLevelChange(1, item),
|
|
86
|
+
placeholder: "Sélectionner un réseau",
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
type: "customer",
|
|
90
|
+
items: customerItems,
|
|
91
|
+
selected: customer,
|
|
92
|
+
onSelect: (item) => handleLevelChange(2, item),
|
|
93
|
+
placeholder: "Sélectionner un client",
|
|
94
|
+
},
|
|
95
|
+
]
|
|
96
|
+
|
|
97
|
+
return (
|
|
98
|
+
<WakaAdmincrumb
|
|
99
|
+
levels={levels}
|
|
100
|
+
showIcons={showIcons}
|
|
101
|
+
showBadges={showBadges}
|
|
102
|
+
showHome={showHome}
|
|
103
|
+
resetable={resetable}
|
|
104
|
+
variant={variant}
|
|
105
|
+
onLevelChange={handleLevelChange}
|
|
106
|
+
onReset={reset}
|
|
107
|
+
/>
|
|
108
|
+
)
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export const Default: Story = {
|
|
112
|
+
render: () => <InteractiveAdmincrumb showIcons showBadges />,
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export const WithSelection: Story = {
|
|
116
|
+
render: () => (
|
|
117
|
+
<InteractiveAdmincrumb
|
|
118
|
+
showIcons
|
|
119
|
+
showBadges
|
|
120
|
+
initialPartner={partnerItems[0]}
|
|
121
|
+
initialNetwork={networkItems[0]}
|
|
122
|
+
/>
|
|
123
|
+
),
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export const NoBadges: Story = {
|
|
127
|
+
render: () => <InteractiveAdmincrumb showIcons showBadges={false} />,
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export const WithHomeButton: Story = {
|
|
131
|
+
render: () => (
|
|
132
|
+
<InteractiveAdmincrumb
|
|
133
|
+
showIcons
|
|
134
|
+
showBadges
|
|
135
|
+
showHome
|
|
136
|
+
initialPartner={partnerItems[0]}
|
|
137
|
+
/>
|
|
138
|
+
),
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export const Resetable: Story = {
|
|
142
|
+
render: () => (
|
|
143
|
+
<InteractiveAdmincrumb
|
|
144
|
+
showIcons
|
|
145
|
+
resetable
|
|
146
|
+
initialPartner={partnerItems[0]}
|
|
147
|
+
initialNetwork={networkItems[0]}
|
|
148
|
+
/>
|
|
149
|
+
),
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export const MinimalVariant: Story = {
|
|
153
|
+
render: () => <InteractiveAdmincrumb variant="minimal" showIcons />,
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export const PillsVariant: Story = {
|
|
157
|
+
render: () => <InteractiveAdmincrumb variant="pills" showIcons />,
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export const InlineVariant: Story = {
|
|
161
|
+
render: () => <InteractiveAdmincrumb variant="inline" showIcons={false} />,
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export const CompactVariant: Story = {
|
|
165
|
+
render: () => <InteractiveAdmincrumb variant="compact" showIcons showBadges={false} />,
|
|
166
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaAlertPanel } from "./index"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof WakaAlertPanel> = {
|
|
5
|
+
title: "Admin/WakaAlertPanel",
|
|
6
|
+
component: WakaAlertPanel,
|
|
7
|
+
parameters: { layout: "padded" },
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
argTypes: {
|
|
10
|
+
showFilters: { control: "boolean", description: "Afficher les filtres" },
|
|
11
|
+
showActions: { control: "boolean", description: "Afficher les actions" },
|
|
12
|
+
maxHeight: { control: "number", description: "Hauteur max (px)" },
|
|
13
|
+
},
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default meta
|
|
17
|
+
type Story = StoryObj<typeof WakaAlertPanel>
|
|
18
|
+
|
|
19
|
+
const alerts = [
|
|
20
|
+
{ id: "1", title: "Serveur en surcharge", severity: "critical" as const, message: "CPU > 95%", timestamp: new Date() },
|
|
21
|
+
{ id: "2", title: "Certificat expire bientôt", severity: "warning" as const, message: "Expiration dans 7 jours", timestamp: new Date(Date.now() - 3600000) },
|
|
22
|
+
{ id: "3", title: "Nouveau déploiement", severity: "info" as const, message: "v2.1.0 déployée", timestamp: new Date(Date.now() - 7200000) },
|
|
23
|
+
{ id: "4", title: "Espace disque faible", severity: "warning" as const, message: "< 10% disponible", timestamp: new Date(Date.now() - 86400000) },
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
export const Default: Story = {
|
|
27
|
+
args: { alerts, showFilters: true, showActions: true },
|
|
28
|
+
render: (args) => <WakaAlertPanel {...args} />,
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const CriticalOnly: Story = {
|
|
32
|
+
args: { alerts: alerts.filter(a => a.severity === "critical"), showActions: true },
|
|
33
|
+
render: (args) => <WakaAlertPanel {...args} />,
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const Empty: Story = {
|
|
37
|
+
args: { alerts: [], showFilters: true },
|
|
38
|
+
render: (args) => <WakaAlertPanel {...args} />,
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export const Compact: Story = {
|
|
42
|
+
args: { alerts, showFilters: false, showActions: false, maxHeight: 200 },
|
|
43
|
+
render: (args) => <WakaAlertPanel {...args} />,
|
|
44
|
+
}
|
|
45
|
+
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaAlertStack, type Alert } from "./index"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof WakaAlertStack> = {
|
|
5
|
+
title: "Admin/WakaAlertStack",
|
|
6
|
+
component: WakaAlertStack,
|
|
7
|
+
parameters: { layout: "centered" },
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
argTypes: {
|
|
10
|
+
position: { control: "select", options: ["top-right", "top-left", "bottom-right", "bottom-left"], description: "Position" },
|
|
11
|
+
maxVisible: { control: "number", description: "Alertes visibles max" },
|
|
12
|
+
showDismiss: { control: "boolean", description: "Bouton fermer" },
|
|
13
|
+
autoHide: { control: "boolean", description: "Masquage auto" },
|
|
14
|
+
autoHideDuration: { control: "number", description: "Durée (ms)" },
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default meta
|
|
19
|
+
type Story = StoryObj<typeof WakaAlertStack>
|
|
20
|
+
|
|
21
|
+
const alerts: Alert[] = [
|
|
22
|
+
{ id: "1", title: "Alerte critique", message: "Service non disponible", severity: "critical", timestamp: new Date() },
|
|
23
|
+
{ id: "2", title: "Attention", message: "Maintenance prévue demain", severity: "warning", timestamp: new Date() },
|
|
24
|
+
{ id: "3", title: "Information", message: "Mise à jour disponible", severity: "info", timestamp: new Date() },
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
export const Default: Story = {
|
|
28
|
+
args: { alerts, position: "top-right", maxVisible: 5, showDismiss: true },
|
|
29
|
+
render: (args) => (
|
|
30
|
+
<div style={{ width: 400, height: 300, position: "relative" }}>
|
|
31
|
+
<WakaAlertStack {...args} />
|
|
32
|
+
</div>
|
|
33
|
+
),
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const BottomLeft: Story = {
|
|
37
|
+
args: { alerts, position: "bottom-left", showDismiss: true },
|
|
38
|
+
render: (args) => (
|
|
39
|
+
<div style={{ width: 400, height: 300, position: "relative" }}>
|
|
40
|
+
<WakaAlertStack {...args} />
|
|
41
|
+
</div>
|
|
42
|
+
),
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const AutoHide: Story = {
|
|
46
|
+
args: { alerts: [alerts[2]], autoHide: true, autoHideDuration: 3000 },
|
|
47
|
+
render: (args) => (
|
|
48
|
+
<div style={{ width: 400, height: 200, position: "relative" }}>
|
|
49
|
+
<WakaAlertStack {...args} />
|
|
50
|
+
</div>
|
|
51
|
+
),
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const Stacked: Story = {
|
|
55
|
+
args: { alerts: [...alerts, ...alerts.map(a => ({ ...a, id: a.id + "-2" }))], maxVisible: 3 },
|
|
56
|
+
render: (args) => (
|
|
57
|
+
<div style={{ width: 400, height: 400, position: "relative" }}>
|
|
58
|
+
<WakaAlertStack {...args} />
|
|
59
|
+
</div>
|
|
60
|
+
),
|
|
61
|
+
}
|
|
62
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaAllocationMatrix, type Resource, type Consumer } from "./index"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof WakaAllocationMatrix> = {
|
|
5
|
+
title: "DevOps/WakaAllocationMatrix",
|
|
6
|
+
component: WakaAllocationMatrix,
|
|
7
|
+
parameters: { layout: "padded" },
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
argTypes: {
|
|
10
|
+
showFilters: { control: "boolean", description: "Afficher les filtres" },
|
|
11
|
+
editable: { control: "boolean", description: "Mode édition" },
|
|
12
|
+
showCapacity: { control: "boolean", description: "Afficher la capacité" },
|
|
13
|
+
},
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default meta
|
|
17
|
+
type Story = StoryObj<typeof WakaAllocationMatrix>
|
|
18
|
+
|
|
19
|
+
const resources: Resource[] = [
|
|
20
|
+
{ id: "dev1", name: "Alice", category: "Frontend", capacity: 100 },
|
|
21
|
+
{ id: "dev2", name: "Bob", category: "Backend", capacity: 100 },
|
|
22
|
+
{ id: "dev3", name: "Charlie", category: "DevOps", capacity: 100 },
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
const consumers: Consumer[] = [
|
|
26
|
+
{ id: "proj1", name: "Projet Alpha" },
|
|
27
|
+
{ id: "proj2", name: "Projet Beta" },
|
|
28
|
+
{ id: "proj3", name: "Support" },
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
const allocations = [
|
|
32
|
+
{ resourceId: "dev1", consumerId: "proj1", value: 60 },
|
|
33
|
+
{ resourceId: "dev1", consumerId: "proj2", value: 30 },
|
|
34
|
+
{ resourceId: "dev2", consumerId: "proj1", value: 80 },
|
|
35
|
+
{ resourceId: "dev2", consumerId: "proj3", value: 20 },
|
|
36
|
+
{ resourceId: "dev3", consumerId: "proj2", value: 50 },
|
|
37
|
+
{ resourceId: "dev3", consumerId: "proj3", value: 40 },
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
export const Default: Story = {
|
|
41
|
+
args: {
|
|
42
|
+
resources,
|
|
43
|
+
consumers,
|
|
44
|
+
allocations,
|
|
45
|
+
showFilters: true,
|
|
46
|
+
showCapacity: true,
|
|
47
|
+
},
|
|
48
|
+
render: (args) => <WakaAllocationMatrix {...args} />,
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export const Editable: Story = {
|
|
52
|
+
args: { resources, consumers, allocations, editable: true, showCapacity: true },
|
|
53
|
+
render: (args) => <WakaAllocationMatrix {...args} />,
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const Overallocated: Story = {
|
|
57
|
+
args: {
|
|
58
|
+
resources,
|
|
59
|
+
consumers,
|
|
60
|
+
allocations: [
|
|
61
|
+
{ resourceId: "dev1", consumerId: "proj1", value: 70 },
|
|
62
|
+
{ resourceId: "dev1", consumerId: "proj2", value: 50 },
|
|
63
|
+
],
|
|
64
|
+
showCapacity: true,
|
|
65
|
+
},
|
|
66
|
+
render: (args) => <WakaAllocationMatrix {...args} />,
|
|
67
|
+
}
|
|
68
|
+
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaApprovalChain, type Approver } from "./index"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof WakaApprovalChain> = {
|
|
5
|
+
title: "Admin/WakaApprovalChain",
|
|
6
|
+
component: WakaApprovalChain,
|
|
7
|
+
parameters: { layout: "padded" },
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
argTypes: {
|
|
10
|
+
orientation: { control: "select", options: ["horizontal", "vertical"], description: "Orientation" },
|
|
11
|
+
showComments: { control: "boolean", description: "Afficher les commentaires" },
|
|
12
|
+
interactive: { control: "boolean", description: "Mode interactif" },
|
|
13
|
+
},
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default meta
|
|
17
|
+
type Story = StoryObj<typeof WakaApprovalChain>
|
|
18
|
+
|
|
19
|
+
const approvers: Approver[] = [
|
|
20
|
+
{ id: "1", name: "Alice Martin", role: "Manager", status: "approved", date: new Date(Date.now() - 86400000), comment: "Approuvé" },
|
|
21
|
+
{ id: "2", name: "Bob Dupont", role: "Finance", status: "approved", date: new Date(Date.now() - 43200000) },
|
|
22
|
+
{ id: "3", name: "Charlie Bernard", role: "Directeur", status: "pending" },
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
export const Default: Story = {
|
|
26
|
+
args: { approvers, orientation: "horizontal", showComments: true },
|
|
27
|
+
render: (args) => <WakaApprovalChain {...args} />,
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const Vertical: Story = {
|
|
31
|
+
args: { approvers, orientation: "vertical", showComments: true },
|
|
32
|
+
render: (args) => (
|
|
33
|
+
<div style={{ maxWidth: 400 }}>
|
|
34
|
+
<WakaApprovalChain {...args} />
|
|
35
|
+
</div>
|
|
36
|
+
),
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const AllApproved: Story = {
|
|
40
|
+
args: {
|
|
41
|
+
approvers: approvers.map(a => ({ ...a, status: "approved" as const, date: new Date() })),
|
|
42
|
+
orientation: "horizontal",
|
|
43
|
+
},
|
|
44
|
+
render: (args) => <WakaApprovalChain {...args} />,
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const Rejected: Story = {
|
|
48
|
+
args: {
|
|
49
|
+
approvers: [
|
|
50
|
+
{ ...approvers[0], status: "approved" as const },
|
|
51
|
+
{ ...approvers[1], status: "rejected" as const, comment: "Budget insuffisant" },
|
|
52
|
+
{ ...approvers[2], status: "skipped" as const },
|
|
53
|
+
],
|
|
54
|
+
showComments: true,
|
|
55
|
+
},
|
|
56
|
+
render: (args) => <WakaApprovalChain {...args} />,
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const Interactive: Story = {
|
|
60
|
+
args: { approvers, interactive: true, showComments: true },
|
|
61
|
+
render: (args) => <WakaApprovalChain {...args} />,
|
|
62
|
+
}
|
|
63
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { WakaAuditLog, type AuditEvent } from "./index"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof WakaAuditLog> = {
|
|
5
|
+
title: "DevOps/WakaAuditLog",
|
|
6
|
+
component: WakaAuditLog,
|
|
7
|
+
parameters: { layout: "padded" },
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
argTypes: {
|
|
10
|
+
showFilters: { control: "boolean", description: "Afficher les filtres" },
|
|
11
|
+
showExport: { control: "boolean", description: "Afficher l'export" },
|
|
12
|
+
showSearch: { control: "boolean", description: "Afficher la recherche" },
|
|
13
|
+
loading: { control: "boolean", description: "Etat de chargement" },
|
|
14
|
+
hasMore: { control: "boolean", description: "Plus d'evenements disponibles" },
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default meta
|
|
19
|
+
type Story = StoryObj<typeof WakaAuditLog>
|
|
20
|
+
|
|
21
|
+
const events: AuditEvent[] = [
|
|
22
|
+
{
|
|
23
|
+
id: "1",
|
|
24
|
+
type: "login",
|
|
25
|
+
user: { id: "u1", name: "Alice", email: "alice@example.com" },
|
|
26
|
+
timestamp: new Date(Date.now() - 1000 * 60 * 5),
|
|
27
|
+
severity: "info",
|
|
28
|
+
description: "User logged in successfully",
|
|
29
|
+
ipAddress: "192.168.1.1",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: "2",
|
|
33
|
+
type: "update",
|
|
34
|
+
user: { id: "u2", name: "Bob", email: "bob@example.com" },
|
|
35
|
+
timestamp: new Date(Date.now() - 1000 * 60 * 30),
|
|
36
|
+
severity: "warning",
|
|
37
|
+
description: "Changed email notification preferences",
|
|
38
|
+
resource: "User Settings",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: "3",
|
|
42
|
+
type: "delete",
|
|
43
|
+
user: { id: "u1", name: "Alice", email: "alice@example.com" },
|
|
44
|
+
timestamp: new Date(Date.now() - 1000 * 60 * 60),
|
|
45
|
+
severity: "critical",
|
|
46
|
+
description: "API Key deleted",
|
|
47
|
+
resource: "API Key",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: "4",
|
|
51
|
+
type: "create",
|
|
52
|
+
user: { id: "u3", name: "Charlie", email: "charlie@example.com" },
|
|
53
|
+
timestamp: new Date(Date.now() - 1000 * 60 * 120),
|
|
54
|
+
severity: "info",
|
|
55
|
+
description: "Created new project",
|
|
56
|
+
resource: "New Project",
|
|
57
|
+
},
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
export const Default: Story = {
|
|
61
|
+
args: { events, showFilters: true, showSearch: true, showExport: true },
|
|
62
|
+
render: (args) => <WakaAuditLog {...args} />,
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export const Minimal: Story = {
|
|
66
|
+
args: { events, showFilters: false, showSearch: false, showExport: false },
|
|
67
|
+
render: (args) => <WakaAuditLog {...args} />,
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const Empty: Story = {
|
|
71
|
+
args: { events: [], showFilters: true, showSearch: true },
|
|
72
|
+
render: (args) => <WakaAuditLog {...args} />,
|
|
73
|
+
}
|