@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.
Files changed (140) hide show
  1. package/dist/badge-BbwO7QeZ.js +1 -0
  2. package/dist/badge-BfiocODp.mjs +23 -0
  3. package/dist/charts.cjs.js +1 -1
  4. package/dist/charts.es.js +1 -1
  5. package/dist/chunk-14q5BKub.js +1 -0
  6. package/dist/{chunk-BH6uBOac.mjs → chunk-Cr9pTUWm.mjs} +5 -5
  7. package/dist/cn-DEtaFQsA.js +1 -0
  8. package/dist/cn-DUn6aSIQ.mjs +24 -0
  9. package/dist/doc.cjs.js +2 -2
  10. package/dist/doc.es.js +19 -19
  11. package/dist/editor.cjs.js +48 -0
  12. package/dist/editor.d.ts +1 -0
  13. package/dist/editor.es.js +6551 -0
  14. package/dist/{exceljs.min-DG9M8IZ1.mjs → exceljs.min-DL1XYDll.mjs} +1 -1
  15. package/dist/{exceljs.min-BuefmDRS.js → exceljs.min-qeIfSCbF.js} +1 -1
  16. package/dist/export.cjs.js +1 -1
  17. package/dist/export.es.js +1 -1
  18. package/dist/index.cjs.js +150 -150
  19. package/dist/index.es.js +26782 -27591
  20. package/dist/input-BfaSAGVw.js +1 -0
  21. package/dist/input-DVr_Qkl8.mjs +14 -0
  22. package/dist/rich-text.cjs.js +1 -1
  23. package/dist/rich-text.es.js +1 -1
  24. package/dist/security-CyBpuklN.mjs +122 -0
  25. package/dist/security-bFWwDrlg.js +1 -0
  26. package/dist/separator-NrkltulH.js +1 -0
  27. package/dist/separator-ibN2mycs.mjs +51 -0
  28. package/dist/src/components/editor/blocks/index.d.ts +51 -0
  29. package/dist/src/components/editor/blocks/waka-acceptance-criteria-block.d.ts +60 -0
  30. package/dist/src/components/editor/blocks/waka-ai-assist-block.d.ts +58 -0
  31. package/dist/src/components/editor/blocks/waka-api-endpoint-block.d.ts +63 -0
  32. package/dist/src/components/editor/blocks/waka-code-playground-block.d.ts +61 -0
  33. package/dist/src/components/editor/blocks/waka-comment-thread-block.d.ts +85 -0
  34. package/dist/src/components/editor/blocks/waka-diagram-block.d.ts +52 -0
  35. package/dist/src/components/editor/blocks/waka-embed-block.d.ts +58 -0
  36. package/dist/src/components/editor/blocks/waka-slash-menu-block.d.ts +67 -0
  37. package/dist/src/components/editor/blocks/waka-user-story-block.d.ts +79 -0
  38. package/dist/src/components/editor/blocks/waka-version-diff-block.d.ts +73 -0
  39. package/dist/src/components/editor/index.d.ts +66 -0
  40. package/dist/src/components/editor/waka-ai-writer.d.ts +80 -0
  41. package/dist/src/components/editor/waka-collaborative-editor.d.ts +93 -0
  42. package/dist/src/components/editor/waka-diff-viewer.d.ts +71 -0
  43. package/dist/src/components/editor/waka-dnd-editor.d.ts +64 -0
  44. package/dist/src/components/editor/waka-document-editor.d.ts +92 -0
  45. package/dist/src/components/editor/waka-editor-elements.d.ts +79 -0
  46. package/dist/src/components/editor/waka-editor-leaves.d.ts +39 -0
  47. package/dist/src/components/editor/waka-editor-plugins.d.ts +41 -0
  48. package/dist/src/components/editor/waka-editor-toolbar.d.ts +20 -0
  49. package/dist/src/components/editor/waka-editor.d.ts +59 -0
  50. package/dist/src/components/editor/waka-floating-toolbar.d.ts +47 -0
  51. package/dist/src/components/editor/waka-markdown-editor.d.ts +60 -0
  52. package/dist/src/components/editor/waka-mention-editor.d.ts +125 -0
  53. package/dist/src/components/editor/waka-slash-menu.d.ts +70 -0
  54. package/dist/src/components/editor/waka-spec-editor.d.ts +88 -0
  55. package/dist/src/components/index.d.ts +1 -15
  56. package/dist/src/editor.d.ts +26 -0
  57. package/dist/textarea-CdQWggYG.js +1 -0
  58. package/dist/textarea-DJDXJ3nd.mjs +23 -0
  59. package/dist/types-C2St0wOW.js +1 -0
  60. package/dist/{types-B6GVaSIP.mjs → types-JnqoLyuv.mjs} +214 -211
  61. package/dist/{useDataTableImport-BPvfo--2.mjs → useDataTableImport-BWUFesPi.mjs} +3 -3
  62. package/dist/{useDataTableImport-Cm_pCKnO.js → useDataTableImport-T7ddpN5k.js} +3 -3
  63. package/dist/waka-doc-renderer-CTxC7Trf.js +3 -0
  64. package/dist/{waka-doc-renderer-BkIvas3z.mjs → waka-doc-renderer-Cw-Xnyen.mjs} +264 -281
  65. package/dist/waka-editor-plugins-DR6tpsUC.mjs +135 -0
  66. package/dist/waka-editor-plugins-sGSh9hn2.js +1 -0
  67. package/dist/waka-rich-text-editor-BlIdtknG.js +1 -0
  68. package/dist/waka-rich-text-editor-D1uA3zbB.js +1 -0
  69. package/dist/waka-rich-text-editor-DgSWiXMW.mjs +342 -0
  70. package/dist/waka-rich-text-editor-DndVJuDw.mjs +2 -0
  71. package/package.json +87 -2
  72. package/src/blocks/footer/index.tsx +1 -6
  73. package/src/blocks/login/index.tsx +1 -7
  74. package/src/blocks/profile/index.tsx +3 -5
  75. package/src/components/editor/blocks/index.ts +182 -0
  76. package/src/components/editor/blocks/waka-acceptance-criteria-block.tsx +326 -0
  77. package/src/components/editor/blocks/waka-ai-assist-block.tsx +284 -0
  78. package/src/components/editor/blocks/waka-api-endpoint-block.tsx +382 -0
  79. package/src/components/editor/blocks/waka-code-playground-block.tsx +331 -0
  80. package/src/components/editor/blocks/waka-comment-thread-block.tsx +448 -0
  81. package/src/components/editor/blocks/waka-diagram-block.tsx +293 -0
  82. package/src/components/editor/blocks/waka-embed-block.tsx +416 -0
  83. package/src/components/editor/blocks/waka-slash-menu-block.tsx +432 -0
  84. package/src/components/editor/blocks/waka-user-story-block.tsx +295 -0
  85. package/src/components/editor/blocks/waka-version-diff-block.tsx +426 -0
  86. package/src/components/editor/index.ts +279 -0
  87. package/src/components/editor/waka-ai-writer.tsx +434 -0
  88. package/src/components/editor/waka-collaborative-editor.tsx +426 -0
  89. package/src/components/editor/waka-diff-viewer.tsx +352 -0
  90. package/src/components/editor/waka-dnd-editor.tsx +284 -0
  91. package/src/components/editor/waka-document-editor.tsx +502 -0
  92. package/src/components/editor/waka-editor-elements.tsx +312 -0
  93. package/src/components/editor/waka-editor-leaves.tsx +101 -0
  94. package/src/components/editor/waka-editor-plugins.ts +207 -0
  95. package/src/components/editor/waka-editor-toolbar.tsx +358 -0
  96. package/src/components/editor/waka-editor.tsx +431 -0
  97. package/src/components/editor/waka-floating-toolbar.tsx +268 -0
  98. package/src/components/editor/waka-markdown-editor.tsx +395 -0
  99. package/src/components/editor/waka-mention-editor.tsx +459 -0
  100. package/src/components/editor/waka-slash-menu.tsx +392 -0
  101. package/src/components/editor/waka-spec-editor.tsx +657 -0
  102. package/src/components/index.ts +1 -18
  103. package/dist/chunk-BDDJmn7V.js +0 -1
  104. package/dist/cn-DnPbmOCy.js +0 -1
  105. package/dist/cn-DpLcAzrf.mjs +0 -22
  106. package/dist/separator-BDReXBvI.mjs +0 -59
  107. package/dist/separator-BKjNl9sI.js +0 -1
  108. package/dist/src/components/waka-actor-badge/index.d.ts +0 -8
  109. package/dist/src/components/waka-actors-list/index.d.ts +0 -18
  110. package/dist/src/components/waka-ai-assistant-button/index.d.ts +0 -8
  111. package/dist/src/components/waka-document-flyover/index.d.ts +0 -10
  112. package/dist/src/components/waka-document-preview-popup/index.d.ts +0 -26
  113. package/dist/src/components/waka-hour-balance-badge/index.d.ts +0 -8
  114. package/dist/src/components/waka-hour-consumption-table/index.d.ts +0 -15
  115. package/dist/src/components/waka-hour-pack-dialog/index.d.ts +0 -8
  116. package/dist/src/components/waka-project-stats-header/index.d.ts +0 -15
  117. package/dist/src/components/waka-step-comment-bubble/index.d.ts +0 -13
  118. package/dist/src/components/waka-step-comment-panel/index.d.ts +0 -20
  119. package/dist/src/components/waka-step-permission-matrix/index.d.ts +0 -12
  120. package/dist/src/components/waka-time-entry-dialog/index.d.ts +0 -16
  121. package/dist/src/components/waka-time-tracking-flyover/index.d.ts +0 -11
  122. package/dist/types-BH9cQRqZ.js +0 -1
  123. package/dist/waka-doc-renderer-BZ2-SqyT.js +0 -3
  124. package/dist/waka-rich-text-editor-BJGlQgpq.js +0 -1
  125. package/dist/waka-rich-text-editor-BJzzxeP1.mjs +0 -361
  126. package/dist/waka-rich-text-editor-wnXLwvUo.js +0 -1
  127. package/src/components/waka-actor-badge/index.tsx +0 -34
  128. package/src/components/waka-actors-list/index.tsx +0 -125
  129. package/src/components/waka-ai-assistant-button/index.tsx +0 -31
  130. package/src/components/waka-document-flyover/index.tsx +0 -36
  131. package/src/components/waka-document-preview-popup/index.tsx +0 -103
  132. package/src/components/waka-hour-balance-badge/index.tsx +0 -43
  133. package/src/components/waka-hour-consumption-table/index.tsx +0 -72
  134. package/src/components/waka-hour-pack-dialog/index.tsx +0 -72
  135. package/src/components/waka-project-stats-header/index.tsx +0 -69
  136. package/src/components/waka-step-comment-bubble/index.tsx +0 -71
  137. package/src/components/waka-step-comment-panel/index.tsx +0 -106
  138. package/src/components/waka-step-permission-matrix/index.tsx +0 -65
  139. package/src/components/waka-time-entry-dialog/index.tsx +0 -131
  140. 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 }