@hed-hog/lms 0.0.312 → 0.0.315

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 (68) hide show
  1. package/dist/class-group/class-group.controller.d.ts +2 -2
  2. package/dist/class-group/class-group.service.d.ts +2 -2
  3. package/dist/enterprise/dto/enterprise-profile.dto.d.ts +13 -0
  4. package/dist/enterprise/dto/enterprise-profile.dto.d.ts.map +1 -0
  5. package/dist/enterprise/dto/enterprise-profile.dto.js +3 -0
  6. package/dist/enterprise/dto/enterprise-profile.dto.js.map +1 -0
  7. package/dist/enterprise/enterprise.controller.d.ts +3 -0
  8. package/dist/enterprise/enterprise.controller.d.ts.map +1 -1
  9. package/dist/enterprise/enterprise.controller.js +14 -0
  10. package/dist/enterprise/enterprise.controller.js.map +1 -1
  11. package/dist/enterprise/enterprise.service.d.ts +3 -0
  12. package/dist/enterprise/enterprise.service.d.ts.map +1 -1
  13. package/dist/enterprise/enterprise.service.js +128 -1
  14. package/dist/enterprise/enterprise.service.js.map +1 -1
  15. package/dist/instructor/instructor.controller.d.ts +23 -0
  16. package/dist/instructor/instructor.controller.d.ts.map +1 -1
  17. package/dist/instructor/instructor.controller.js +41 -0
  18. package/dist/instructor/instructor.controller.js.map +1 -1
  19. package/dist/instructor/instructor.service.d.ts +25 -0
  20. package/dist/instructor/instructor.service.d.ts.map +1 -1
  21. package/dist/instructor/instructor.service.js +126 -8
  22. package/dist/instructor/instructor.service.js.map +1 -1
  23. package/hedhog/data/menu.yaml +23 -7
  24. package/hedhog/data/role.yaml +9 -1
  25. package/hedhog/data/route.yaml +54 -0
  26. package/hedhog/frontend/app/_components/class-form-sheet.tsx.ejs +2 -1
  27. package/hedhog/frontend/app/courses/[id]/structure/_components/confirm-dialog.tsx.ejs +44 -44
  28. package/hedhog/frontend/app/courses/[id]/structure/_components/course-tree-dnd.tsx.ejs +362 -362
  29. package/hedhog/frontend/app/courses/[id]/structure/_components/course-tree-panel.tsx.ejs +111 -111
  30. package/hedhog/frontend/app/courses/[id]/structure/_components/course-tree.tsx.ejs +134 -134
  31. package/hedhog/frontend/app/courses/[id]/structure/_components/detail-course.tsx.ejs +113 -113
  32. package/hedhog/frontend/app/courses/[id]/structure/_components/detail-lesson.tsx.ejs +314 -314
  33. package/hedhog/frontend/app/courses/[id]/structure/_components/detail-panel.tsx.ejs +62 -62
  34. package/hedhog/frontend/app/courses/[id]/structure/_components/detail-session.tsx.ejs +173 -173
  35. package/hedhog/frontend/app/courses/[id]/structure/_components/drag-handle.tsx.ejs +58 -58
  36. package/hedhog/frontend/app/courses/[id]/structure/_components/drag-overlay.tsx.ejs +51 -51
  37. package/hedhog/frontend/app/courses/[id]/structure/_components/editor-bulk.tsx.ejs +276 -276
  38. package/hedhog/frontend/app/courses/[id]/structure/_components/editor-course.tsx.ejs +1216 -1216
  39. package/hedhog/frontend/app/courses/[id]/structure/_components/editor-lesson.tsx.ejs +1824 -1824
  40. package/hedhog/frontend/app/courses/[id]/structure/_components/editor-session.tsx.ejs +443 -443
  41. package/hedhog/frontend/app/courses/[id]/structure/_components/highlighted-text.tsx.ejs +40 -40
  42. package/hedhog/frontend/app/courses/[id]/structure/_components/mock-data.ts.ejs +185 -185
  43. package/hedhog/frontend/app/courses/[id]/structure/_components/multi-select-bar.tsx.ejs +264 -264
  44. package/hedhog/frontend/app/courses/[id]/structure/_components/search-filter.tsx.ejs +95 -95
  45. package/hedhog/frontend/app/courses/[id]/structure/_components/session-picker-dialog.tsx.ejs +73 -73
  46. package/hedhog/frontend/app/courses/[id]/structure/_components/shortcuts-help.tsx.ejs +136 -136
  47. package/hedhog/frontend/app/courses/[id]/structure/_components/sortable-tree-row.tsx.ejs +80 -80
  48. package/hedhog/frontend/app/courses/[id]/structure/_components/store.ts.ejs +949 -949
  49. package/hedhog/frontend/app/courses/[id]/structure/_components/tree-context-menu.tsx.ejs +525 -525
  50. package/hedhog/frontend/app/courses/[id]/structure/_components/tree-helpers.ts.ejs +181 -181
  51. package/hedhog/frontend/app/courses/[id]/structure/_components/tree-row-course.tsx.ejs +51 -51
  52. package/hedhog/frontend/app/courses/[id]/structure/_components/tree-row-lesson.tsx.ejs +271 -271
  53. package/hedhog/frontend/app/courses/[id]/structure/_components/tree-row-session.tsx.ejs +167 -167
  54. package/hedhog/frontend/app/courses/[id]/structure/_components/tree-row.tsx.ejs +108 -108
  55. package/hedhog/frontend/app/courses/[id]/structure/_components/use-course-structure-shortcuts.ts.ejs +318 -318
  56. package/hedhog/frontend/app/courses/[id]/structure/page.tsx.ejs +10 -10
  57. package/hedhog/frontend/app/enterprise/_components/enterprise-course-create-sheet.tsx.ejs +2 -1
  58. package/hedhog/frontend/app/instructors/_components/instructor-form-sheet.tsx.ejs +438 -0
  59. package/hedhog/frontend/app/instructors/_components/instructor-types.ts.ejs +40 -0
  60. package/hedhog/frontend/app/instructors/page.tsx.ejs +696 -0
  61. package/hedhog/frontend/app/training/page.tsx.ejs +2339 -0
  62. package/hedhog/table/enterprise_user.yaml +1 -1
  63. package/package.json +8 -8
  64. package/src/enterprise/dto/enterprise-profile.dto.ts +17 -0
  65. package/src/enterprise/enterprise.controller.ts +9 -1
  66. package/src/enterprise/enterprise.service.ts +147 -4
  67. package/src/instructor/instructor.controller.ts +36 -9
  68. package/src/instructor/instructor.service.ts +140 -10
@@ -1,80 +1,80 @@
1
- 'use client';
2
-
3
- import { useSortable } from '@dnd-kit/sortable';
4
- import { CSS } from '@dnd-kit/utilities';
5
-
6
- import { DragHandle } from './drag-handle';
7
- import { TreeRow } from './tree-row';
8
- import type { FlatItem } from './types';
9
-
10
- interface SortableTreeRowProps {
11
- item: FlatItem;
12
- isActive: boolean;
13
- isSelected: boolean;
14
- query: string;
15
- isMatched: boolean;
16
- isEffectivelyExpanded: boolean;
17
- lessonCountMap: Map<string, number>;
18
- visibleItems: FlatItem[];
19
- /** When true (filter active) drag is disabled. */
20
- dragDisabled: boolean;
21
- }
22
-
23
- export function SortableTreeRow({
24
- item,
25
- isActive,
26
- isSelected,
27
- query,
28
- isMatched,
29
- isEffectivelyExpanded,
30
- lessonCountMap,
31
- visibleItems,
32
- dragDisabled,
33
- }: SortableTreeRowProps) {
34
- const {
35
- attributes,
36
- listeners,
37
- setNodeRef,
38
- transform,
39
- transition,
40
- isDragging,
41
- } = useSortable({
42
- id: `${item.type}:${item.id}`,
43
- disabled: dragDisabled || item.type === 'course',
44
- data: { item },
45
- });
46
-
47
- const style: React.CSSProperties = {
48
- transform: CSS.Transform.toString(transform),
49
- transition,
50
- opacity: isDragging ? 0.35 : undefined,
51
- };
52
-
53
- return (
54
- <div ref={setNodeRef} style={style} className="flex items-stretch h-full">
55
- {/* Drag handle — only for sortable types */}
56
- {item.type !== 'course' && (
57
- <DragHandle
58
- listeners={listeners}
59
- attributes={attributes}
60
- disabled={dragDisabled}
61
- className="my-auto"
62
- />
63
- )}
64
-
65
- {/* Row content fills remaining space */}
66
- <div className="flex-1 min-w-0">
67
- <TreeRow
68
- item={item}
69
- isActive={isActive}
70
- isSelected={isSelected}
71
- query={query}
72
- isMatched={isMatched}
73
- isEffectivelyExpanded={isEffectivelyExpanded}
74
- lessonCountMap={lessonCountMap}
75
- visibleItems={visibleItems}
76
- />
77
- </div>
78
- </div>
79
- );
80
- }
1
+ 'use client';
2
+
3
+ import { useSortable } from '@dnd-kit/sortable';
4
+ import { CSS } from '@dnd-kit/utilities';
5
+
6
+ import { DragHandle } from './drag-handle';
7
+ import { TreeRow } from './tree-row';
8
+ import type { FlatItem } from './types';
9
+
10
+ interface SortableTreeRowProps {
11
+ item: FlatItem;
12
+ isActive: boolean;
13
+ isSelected: boolean;
14
+ query: string;
15
+ isMatched: boolean;
16
+ isEffectivelyExpanded: boolean;
17
+ lessonCountMap: Map<string, number>;
18
+ visibleItems: FlatItem[];
19
+ /** When true (filter active) drag is disabled. */
20
+ dragDisabled: boolean;
21
+ }
22
+
23
+ export function SortableTreeRow({
24
+ item,
25
+ isActive,
26
+ isSelected,
27
+ query,
28
+ isMatched,
29
+ isEffectivelyExpanded,
30
+ lessonCountMap,
31
+ visibleItems,
32
+ dragDisabled,
33
+ }: SortableTreeRowProps) {
34
+ const {
35
+ attributes,
36
+ listeners,
37
+ setNodeRef,
38
+ transform,
39
+ transition,
40
+ isDragging,
41
+ } = useSortable({
42
+ id: `${item.type}:${item.id}`,
43
+ disabled: dragDisabled || item.type === 'course',
44
+ data: { item },
45
+ });
46
+
47
+ const style: React.CSSProperties = {
48
+ transform: CSS.Transform.toString(transform),
49
+ transition,
50
+ opacity: isDragging ? 0.35 : undefined,
51
+ };
52
+
53
+ return (
54
+ <div ref={setNodeRef} style={style} className="flex items-stretch h-full">
55
+ {/* Drag handle — only for sortable types */}
56
+ {item.type !== 'course' && (
57
+ <DragHandle
58
+ listeners={listeners}
59
+ attributes={attributes}
60
+ disabled={dragDisabled}
61
+ className="my-auto"
62
+ />
63
+ )}
64
+
65
+ {/* Row content fills remaining space */}
66
+ <div className="flex-1 min-w-0">
67
+ <TreeRow
68
+ item={item}
69
+ isActive={isActive}
70
+ isSelected={isSelected}
71
+ query={query}
72
+ isMatched={isMatched}
73
+ isEffectivelyExpanded={isEffectivelyExpanded}
74
+ lessonCountMap={lessonCountMap}
75
+ visibleItems={visibleItems}
76
+ />
77
+ </div>
78
+ </div>
79
+ );
80
+ }