@wakastellar/ui 3.3.3 → 3.5.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/badge-BbwO7QeZ.js +1 -0
- package/dist/badge-BfiocODp.mjs +23 -0
- package/dist/charts.cjs.js +1 -1
- package/dist/charts.es.js +1 -1
- package/dist/chunk-14q5BKub.js +1 -0
- package/dist/{chunk-BH6uBOac.mjs → chunk-Cr9pTUWm.mjs} +5 -5
- package/dist/cn-DEtaFQsA.js +1 -0
- package/dist/cn-DUn6aSIQ.mjs +24 -0
- package/dist/doc.cjs.js +2 -2
- package/dist/doc.es.js +19 -19
- package/dist/editor.cjs.js +48 -0
- package/dist/editor.d.ts +1 -0
- package/dist/editor.es.js +6551 -0
- package/dist/{exceljs.min-DG9M8IZ1.mjs → exceljs.min-DL1XYDll.mjs} +1 -1
- package/dist/{exceljs.min-BuefmDRS.js → exceljs.min-qeIfSCbF.js} +1 -1
- package/dist/export.cjs.js +1 -1
- package/dist/export.es.js +1 -1
- package/dist/index.cjs.js +150 -150
- package/dist/index.es.js +26782 -27591
- package/dist/input-BfaSAGVw.js +1 -0
- package/dist/input-DVr_Qkl8.mjs +14 -0
- package/dist/rich-text.cjs.js +1 -1
- package/dist/rich-text.es.js +1 -1
- package/dist/security-CyBpuklN.mjs +122 -0
- package/dist/security-bFWwDrlg.js +1 -0
- package/dist/separator-NrkltulH.js +1 -0
- package/dist/separator-ibN2mycs.mjs +51 -0
- package/dist/src/components/editor/blocks/index.d.ts +51 -0
- package/dist/src/components/editor/blocks/waka-acceptance-criteria-block.d.ts +60 -0
- package/dist/src/components/editor/blocks/waka-ai-assist-block.d.ts +58 -0
- package/dist/src/components/editor/blocks/waka-api-endpoint-block.d.ts +63 -0
- package/dist/src/components/editor/blocks/waka-code-playground-block.d.ts +61 -0
- package/dist/src/components/editor/blocks/waka-comment-thread-block.d.ts +85 -0
- package/dist/src/components/editor/blocks/waka-diagram-block.d.ts +52 -0
- package/dist/src/components/editor/blocks/waka-embed-block.d.ts +58 -0
- package/dist/src/components/editor/blocks/waka-slash-menu-block.d.ts +67 -0
- package/dist/src/components/editor/blocks/waka-user-story-block.d.ts +79 -0
- package/dist/src/components/editor/blocks/waka-version-diff-block.d.ts +73 -0
- package/dist/src/components/editor/index.d.ts +66 -0
- package/dist/src/components/editor/waka-ai-writer.d.ts +80 -0
- package/dist/src/components/editor/waka-collaborative-editor.d.ts +93 -0
- package/dist/src/components/editor/waka-diff-viewer.d.ts +71 -0
- package/dist/src/components/editor/waka-dnd-editor.d.ts +64 -0
- package/dist/src/components/editor/waka-document-editor.d.ts +92 -0
- package/dist/src/components/editor/waka-editor-elements.d.ts +79 -0
- package/dist/src/components/editor/waka-editor-leaves.d.ts +39 -0
- package/dist/src/components/editor/waka-editor-plugins.d.ts +41 -0
- package/dist/src/components/editor/waka-editor-toolbar.d.ts +20 -0
- package/dist/src/components/editor/waka-editor.d.ts +59 -0
- package/dist/src/components/editor/waka-floating-toolbar.d.ts +47 -0
- package/dist/src/components/editor/waka-markdown-editor.d.ts +60 -0
- package/dist/src/components/editor/waka-mention-editor.d.ts +125 -0
- package/dist/src/components/editor/waka-slash-menu.d.ts +70 -0
- package/dist/src/components/editor/waka-spec-editor.d.ts +88 -0
- package/dist/src/components/index.d.ts +1 -15
- package/dist/src/editor.d.ts +26 -0
- package/dist/textarea-CdQWggYG.js +1 -0
- package/dist/textarea-DJDXJ3nd.mjs +23 -0
- package/dist/types-C2St0wOW.js +1 -0
- package/dist/{types-B6GVaSIP.mjs → types-JnqoLyuv.mjs} +214 -211
- package/dist/{useDataTableImport-BPvfo--2.mjs → useDataTableImport-BWUFesPi.mjs} +3 -3
- package/dist/{useDataTableImport-Cm_pCKnO.js → useDataTableImport-T7ddpN5k.js} +3 -3
- package/dist/waka-doc-renderer-CTxC7Trf.js +3 -0
- package/dist/{waka-doc-renderer-BkIvas3z.mjs → waka-doc-renderer-Cw-Xnyen.mjs} +264 -281
- package/dist/waka-editor-plugins-DR6tpsUC.mjs +135 -0
- package/dist/waka-editor-plugins-sGSh9hn2.js +1 -0
- package/dist/waka-rich-text-editor-BlIdtknG.js +1 -0
- package/dist/waka-rich-text-editor-D1uA3zbB.js +1 -0
- package/dist/waka-rich-text-editor-DgSWiXMW.mjs +342 -0
- package/dist/waka-rich-text-editor-DndVJuDw.mjs +2 -0
- package/package.json +87 -2
- package/src/blocks/footer/index.tsx +1 -6
- package/src/blocks/login/index.tsx +1 -7
- package/src/blocks/profile/index.tsx +3 -5
- package/src/components/editor/blocks/index.ts +182 -0
- package/src/components/editor/blocks/waka-acceptance-criteria-block.tsx +326 -0
- package/src/components/editor/blocks/waka-ai-assist-block.tsx +284 -0
- package/src/components/editor/blocks/waka-api-endpoint-block.tsx +382 -0
- package/src/components/editor/blocks/waka-code-playground-block.tsx +331 -0
- package/src/components/editor/blocks/waka-comment-thread-block.tsx +448 -0
- package/src/components/editor/blocks/waka-diagram-block.tsx +293 -0
- package/src/components/editor/blocks/waka-embed-block.tsx +416 -0
- package/src/components/editor/blocks/waka-slash-menu-block.tsx +432 -0
- package/src/components/editor/blocks/waka-user-story-block.tsx +295 -0
- package/src/components/editor/blocks/waka-version-diff-block.tsx +426 -0
- package/src/components/editor/index.ts +279 -0
- package/src/components/editor/waka-ai-writer.tsx +434 -0
- package/src/components/editor/waka-collaborative-editor.tsx +426 -0
- package/src/components/editor/waka-diff-viewer.tsx +352 -0
- package/src/components/editor/waka-dnd-editor.tsx +284 -0
- package/src/components/editor/waka-document-editor.tsx +502 -0
- package/src/components/editor/waka-editor-elements.tsx +312 -0
- package/src/components/editor/waka-editor-leaves.tsx +101 -0
- package/src/components/editor/waka-editor-plugins.ts +207 -0
- package/src/components/editor/waka-editor-toolbar.tsx +358 -0
- package/src/components/editor/waka-editor.tsx +431 -0
- package/src/components/editor/waka-floating-toolbar.tsx +268 -0
- package/src/components/editor/waka-markdown-editor.tsx +395 -0
- package/src/components/editor/waka-mention-editor.tsx +459 -0
- package/src/components/editor/waka-slash-menu.tsx +392 -0
- package/src/components/editor/waka-spec-editor.tsx +657 -0
- package/src/components/index.ts +1 -18
- package/dist/chunk-BDDJmn7V.js +0 -1
- package/dist/cn-DnPbmOCy.js +0 -1
- package/dist/cn-DpLcAzrf.mjs +0 -22
- package/dist/separator-BDReXBvI.mjs +0 -59
- package/dist/separator-BKjNl9sI.js +0 -1
- package/dist/src/components/waka-actor-badge/index.d.ts +0 -8
- package/dist/src/components/waka-actors-list/index.d.ts +0 -18
- package/dist/src/components/waka-ai-assistant-button/index.d.ts +0 -8
- package/dist/src/components/waka-document-flyover/index.d.ts +0 -10
- package/dist/src/components/waka-document-preview-popup/index.d.ts +0 -26
- package/dist/src/components/waka-hour-balance-badge/index.d.ts +0 -8
- package/dist/src/components/waka-hour-consumption-table/index.d.ts +0 -15
- package/dist/src/components/waka-hour-pack-dialog/index.d.ts +0 -8
- package/dist/src/components/waka-project-stats-header/index.d.ts +0 -15
- package/dist/src/components/waka-step-comment-bubble/index.d.ts +0 -13
- package/dist/src/components/waka-step-comment-panel/index.d.ts +0 -20
- package/dist/src/components/waka-step-permission-matrix/index.d.ts +0 -12
- package/dist/src/components/waka-time-entry-dialog/index.d.ts +0 -16
- package/dist/src/components/waka-time-tracking-flyover/index.d.ts +0 -11
- package/dist/types-BH9cQRqZ.js +0 -1
- package/dist/waka-doc-renderer-BZ2-SqyT.js +0 -3
- package/dist/waka-rich-text-editor-BJGlQgpq.js +0 -1
- package/dist/waka-rich-text-editor-BJzzxeP1.mjs +0 -361
- package/dist/waka-rich-text-editor-wnXLwvUo.js +0 -1
- package/src/components/waka-actor-badge/index.tsx +0 -34
- package/src/components/waka-actors-list/index.tsx +0 -125
- package/src/components/waka-ai-assistant-button/index.tsx +0 -31
- package/src/components/waka-document-flyover/index.tsx +0 -36
- package/src/components/waka-document-preview-popup/index.tsx +0 -103
- package/src/components/waka-hour-balance-badge/index.tsx +0 -43
- package/src/components/waka-hour-consumption-table/index.tsx +0 -72
- package/src/components/waka-hour-pack-dialog/index.tsx +0 -72
- package/src/components/waka-project-stats-header/index.tsx +0 -69
- package/src/components/waka-step-comment-bubble/index.tsx +0 -71
- package/src/components/waka-step-comment-panel/index.tsx +0 -106
- package/src/components/waka-step-permission-matrix/index.tsx +0 -65
- package/src/components/waka-time-entry-dialog/index.tsx +0 -131
- package/src/components/waka-time-tracking-flyover/index.tsx +0 -41
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "../dialog"
|
|
5
|
-
import { ActorBadge } from "../waka-actor-badge"
|
|
6
|
-
import { formatMinutes } from "../waka-hour-balance-badge"
|
|
7
|
-
|
|
8
|
-
export interface TimeActor {
|
|
9
|
-
id: string
|
|
10
|
-
name: string
|
|
11
|
-
role: string
|
|
12
|
-
totalMinutes: number
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface TimeEntryDialogProps {
|
|
16
|
-
open: boolean
|
|
17
|
-
onOpenChange: (open: boolean) => void
|
|
18
|
-
actors: TimeActor[]
|
|
19
|
-
onSubmit: (actorId: string, minutes: number, comment: string, isBillable: boolean) => void
|
|
20
|
-
showBillable?: boolean
|
|
21
|
-
isLoading?: boolean
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function TimeEntryDialog({ open, onOpenChange, actors, onSubmit, showBillable, isLoading }: TimeEntryDialogProps) {
|
|
25
|
-
const [selectedActor, setSelectedActor] = React.useState<string | null>(null)
|
|
26
|
-
const [hours, setHours] = React.useState(0)
|
|
27
|
-
const [mins, setMins] = React.useState(0)
|
|
28
|
-
const [comment, setComment] = React.useState("")
|
|
29
|
-
const [billable, setBillable] = React.useState(false)
|
|
30
|
-
|
|
31
|
-
const resetForm = () => {
|
|
32
|
-
setSelectedActor(null)
|
|
33
|
-
setHours(0)
|
|
34
|
-
setMins(0)
|
|
35
|
-
setComment("")
|
|
36
|
-
setBillable(false)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const handleSubmit = () => {
|
|
40
|
-
if (!selectedActor) return
|
|
41
|
-
const totalMins = hours * 60 + mins
|
|
42
|
-
if (totalMins < 15) return
|
|
43
|
-
onSubmit(selectedActor, totalMins, comment, billable)
|
|
44
|
-
resetForm()
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
49
|
-
<DialogContent className="sm:max-w-lg">
|
|
50
|
-
<DialogHeader>
|
|
51
|
-
<DialogTitle>Saisie de temps</DialogTitle>
|
|
52
|
-
</DialogHeader>
|
|
53
|
-
|
|
54
|
-
<div className="space-y-3 max-h-[300px] overflow-y-auto">
|
|
55
|
-
{actors.map((a) => (
|
|
56
|
-
<div
|
|
57
|
-
key={a.id}
|
|
58
|
-
className={`flex items-center justify-between rounded-lg border p-2.5 cursor-pointer transition-colors ${
|
|
59
|
-
selectedActor === a.id ? "border-primary bg-primary/5" : "hover:bg-muted/50"
|
|
60
|
-
}`}
|
|
61
|
-
onClick={() => setSelectedActor(a.id)}
|
|
62
|
-
>
|
|
63
|
-
<ActorBadge role={a.role} name={a.name} />
|
|
64
|
-
<span className="text-sm text-muted-foreground tabular-nums">{formatMinutes(a.totalMinutes)}</span>
|
|
65
|
-
</div>
|
|
66
|
-
))}
|
|
67
|
-
</div>
|
|
68
|
-
|
|
69
|
-
{selectedActor && (
|
|
70
|
-
<div className="space-y-3 border-t pt-3">
|
|
71
|
-
<div className="flex items-center gap-3">
|
|
72
|
-
<div className="flex items-center gap-1.5">
|
|
73
|
-
<label className="text-sm font-medium">Heures</label>
|
|
74
|
-
<input
|
|
75
|
-
type="number"
|
|
76
|
-
min={0}
|
|
77
|
-
max={99}
|
|
78
|
-
value={hours}
|
|
79
|
-
onChange={(e) => setHours(Math.max(0, parseInt(e.target.value) || 0))}
|
|
80
|
-
className="w-16 rounded-md border bg-background px-2 py-1.5 text-sm text-center"
|
|
81
|
-
/>
|
|
82
|
-
</div>
|
|
83
|
-
<div className="flex items-center gap-1.5">
|
|
84
|
-
<label className="text-sm font-medium">Minutes</label>
|
|
85
|
-
<select
|
|
86
|
-
value={mins}
|
|
87
|
-
onChange={(e) => setMins(parseInt(e.target.value))}
|
|
88
|
-
className="rounded-md border bg-background px-2 py-1.5 text-sm"
|
|
89
|
-
>
|
|
90
|
-
<option value={0}>00</option>
|
|
91
|
-
<option value={15}>15</option>
|
|
92
|
-
<option value={30}>30</option>
|
|
93
|
-
<option value={45}>45</option>
|
|
94
|
-
</select>
|
|
95
|
-
</div>
|
|
96
|
-
</div>
|
|
97
|
-
<input
|
|
98
|
-
value={comment}
|
|
99
|
-
onChange={(e) => setComment(e.target.value)}
|
|
100
|
-
placeholder="Commentaire (optionnel)"
|
|
101
|
-
className="w-full rounded-md border bg-background px-3 py-1.5 text-sm"
|
|
102
|
-
/>
|
|
103
|
-
{showBillable && (
|
|
104
|
-
<label className="flex items-center gap-2 text-sm">
|
|
105
|
-
<input
|
|
106
|
-
type="checkbox"
|
|
107
|
-
checked={billable}
|
|
108
|
-
onChange={(e) => setBillable(e.target.checked)}
|
|
109
|
-
className="rounded border-input"
|
|
110
|
-
/>
|
|
111
|
-
<span className="font-medium text-amber-600">Heures facturables</span>
|
|
112
|
-
</label>
|
|
113
|
-
)}
|
|
114
|
-
</div>
|
|
115
|
-
)}
|
|
116
|
-
|
|
117
|
-
<DialogFooter>
|
|
118
|
-
<button
|
|
119
|
-
onClick={handleSubmit}
|
|
120
|
-
disabled={!selectedActor || (hours * 60 + mins < 15) || isLoading}
|
|
121
|
-
className="rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50"
|
|
122
|
-
>
|
|
123
|
-
Ajouter
|
|
124
|
-
</button>
|
|
125
|
-
</DialogFooter>
|
|
126
|
-
</DialogContent>
|
|
127
|
-
</Dialog>
|
|
128
|
-
)
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export { TimeEntryDialog }
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { HoverCard, HoverCardContent, HoverCardTrigger } from "../hover-card"
|
|
5
|
-
import { formatMinutes } from "../waka-hour-balance-badge"
|
|
6
|
-
|
|
7
|
-
export interface TimeTrackingEntry {
|
|
8
|
-
role: string
|
|
9
|
-
totalMinutes: number
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface TimeTrackingFlyoverProps {
|
|
13
|
-
entries: TimeTrackingEntry[]
|
|
14
|
-
children: React.ReactNode
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function TimeTrackingFlyover({ entries, children }: TimeTrackingFlyoverProps) {
|
|
18
|
-
const total = entries.reduce((sum, e) => sum + e.totalMinutes, 0)
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<HoverCard openDelay={200}>
|
|
22
|
-
<HoverCardTrigger asChild>{children}</HoverCardTrigger>
|
|
23
|
-
<HoverCardContent className="w-52 p-3" side="top">
|
|
24
|
-
<div className="space-y-1 text-xs">
|
|
25
|
-
{entries.map((e) => (
|
|
26
|
-
<div key={e.role} className="flex justify-between">
|
|
27
|
-
<span className="font-medium">{e.role}</span>
|
|
28
|
-
<span className="tabular-nums text-muted-foreground">{formatMinutes(e.totalMinutes)}</span>
|
|
29
|
-
</div>
|
|
30
|
-
))}
|
|
31
|
-
<div className="border-t pt-1 flex justify-between font-medium">
|
|
32
|
-
<span>Total</span>
|
|
33
|
-
<span className="tabular-nums">{formatMinutes(total)}</span>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</HoverCardContent>
|
|
37
|
-
</HoverCard>
|
|
38
|
-
)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export { TimeTrackingFlyover }
|