@hed-hog/lms 0.0.314 → 0.0.316

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 (67) hide show
  1. package/dist/enterprise/dto/enterprise-profile.dto.d.ts +13 -0
  2. package/dist/enterprise/dto/enterprise-profile.dto.d.ts.map +1 -0
  3. package/dist/enterprise/dto/enterprise-profile.dto.js +3 -0
  4. package/dist/enterprise/dto/enterprise-profile.dto.js.map +1 -0
  5. package/dist/enterprise/enterprise.controller.d.ts +3 -0
  6. package/dist/enterprise/enterprise.controller.d.ts.map +1 -1
  7. package/dist/enterprise/enterprise.controller.js +14 -0
  8. package/dist/enterprise/enterprise.controller.js.map +1 -1
  9. package/dist/enterprise/enterprise.service.d.ts +3 -0
  10. package/dist/enterprise/enterprise.service.d.ts.map +1 -1
  11. package/dist/enterprise/enterprise.service.js +128 -1
  12. package/dist/enterprise/enterprise.service.js.map +1 -1
  13. package/dist/instructor/instructor.controller.d.ts +23 -0
  14. package/dist/instructor/instructor.controller.d.ts.map +1 -1
  15. package/dist/instructor/instructor.controller.js +41 -0
  16. package/dist/instructor/instructor.controller.js.map +1 -1
  17. package/dist/instructor/instructor.service.d.ts +25 -0
  18. package/dist/instructor/instructor.service.d.ts.map +1 -1
  19. package/dist/instructor/instructor.service.js +126 -8
  20. package/dist/instructor/instructor.service.js.map +1 -1
  21. package/hedhog/data/menu.yaml +23 -7
  22. package/hedhog/data/role.yaml +17 -1
  23. package/hedhog/data/route.yaml +48 -0
  24. package/hedhog/frontend/app/_components/class-form-sheet.tsx.ejs +2 -1
  25. package/hedhog/frontend/app/courses/[id]/structure/_components/confirm-dialog.tsx.ejs +44 -44
  26. package/hedhog/frontend/app/courses/[id]/structure/_components/course-tree-dnd.tsx.ejs +362 -362
  27. package/hedhog/frontend/app/courses/[id]/structure/_components/course-tree-panel.tsx.ejs +111 -111
  28. package/hedhog/frontend/app/courses/[id]/structure/_components/course-tree.tsx.ejs +134 -134
  29. package/hedhog/frontend/app/courses/[id]/structure/_components/detail-course.tsx.ejs +113 -113
  30. package/hedhog/frontend/app/courses/[id]/structure/_components/detail-lesson.tsx.ejs +314 -314
  31. package/hedhog/frontend/app/courses/[id]/structure/_components/detail-panel.tsx.ejs +62 -62
  32. package/hedhog/frontend/app/courses/[id]/structure/_components/detail-session.tsx.ejs +173 -173
  33. package/hedhog/frontend/app/courses/[id]/structure/_components/drag-handle.tsx.ejs +58 -58
  34. package/hedhog/frontend/app/courses/[id]/structure/_components/drag-overlay.tsx.ejs +51 -51
  35. package/hedhog/frontend/app/courses/[id]/structure/_components/editor-bulk.tsx.ejs +276 -276
  36. package/hedhog/frontend/app/courses/[id]/structure/_components/editor-course.tsx.ejs +1216 -1216
  37. package/hedhog/frontend/app/courses/[id]/structure/_components/editor-lesson.tsx.ejs +1824 -1824
  38. package/hedhog/frontend/app/courses/[id]/structure/_components/editor-session.tsx.ejs +443 -443
  39. package/hedhog/frontend/app/courses/[id]/structure/_components/highlighted-text.tsx.ejs +40 -40
  40. package/hedhog/frontend/app/courses/[id]/structure/_components/mock-data.ts.ejs +185 -185
  41. package/hedhog/frontend/app/courses/[id]/structure/_components/multi-select-bar.tsx.ejs +264 -264
  42. package/hedhog/frontend/app/courses/[id]/structure/_components/search-filter.tsx.ejs +95 -95
  43. package/hedhog/frontend/app/courses/[id]/structure/_components/session-picker-dialog.tsx.ejs +73 -73
  44. package/hedhog/frontend/app/courses/[id]/structure/_components/shortcuts-help.tsx.ejs +136 -136
  45. package/hedhog/frontend/app/courses/[id]/structure/_components/sortable-tree-row.tsx.ejs +80 -80
  46. package/hedhog/frontend/app/courses/[id]/structure/_components/store.ts.ejs +949 -949
  47. package/hedhog/frontend/app/courses/[id]/structure/_components/tree-context-menu.tsx.ejs +525 -525
  48. package/hedhog/frontend/app/courses/[id]/structure/_components/tree-helpers.ts.ejs +181 -181
  49. package/hedhog/frontend/app/courses/[id]/structure/_components/tree-row-course.tsx.ejs +51 -51
  50. package/hedhog/frontend/app/courses/[id]/structure/_components/tree-row-lesson.tsx.ejs +271 -271
  51. package/hedhog/frontend/app/courses/[id]/structure/_components/tree-row-session.tsx.ejs +167 -167
  52. package/hedhog/frontend/app/courses/[id]/structure/_components/tree-row.tsx.ejs +108 -108
  53. package/hedhog/frontend/app/courses/[id]/structure/_components/use-course-structure-shortcuts.ts.ejs +318 -318
  54. package/hedhog/frontend/app/courses/[id]/structure/page.tsx.ejs +10 -10
  55. package/hedhog/frontend/app/enterprise/_components/enterprise-course-create-sheet.tsx.ejs +2 -1
  56. package/hedhog/frontend/app/instructors/_components/instructor-form-sheet.tsx.ejs +438 -0
  57. package/hedhog/frontend/app/instructors/_components/instructor-types.ts.ejs +40 -0
  58. package/hedhog/frontend/app/instructors/page.tsx.ejs +696 -0
  59. package/hedhog/frontend/app/training/page.tsx.ejs +2339 -0
  60. package/hedhog/query/add_route_role.sql +15 -0
  61. package/hedhog/table/enterprise_user.yaml +1 -1
  62. package/package.json +6 -6
  63. package/src/enterprise/dto/enterprise-profile.dto.ts +17 -0
  64. package/src/enterprise/enterprise.controller.ts +9 -1
  65. package/src/enterprise/enterprise.service.ts +147 -4
  66. package/src/instructor/instructor.controller.ts +36 -9
  67. 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
+ }