@project-sunbird/collection-editor-react 1.0.0 → 1.0.3

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 (108) hide show
  1. package/README.md +55 -0
  2. package/dist/api/content.d.ts +1 -1
  3. package/dist/api/framework.d.ts +0 -1
  4. package/dist/api/hierarchy.d.ts +7 -1
  5. package/dist/collection-editor.umd.js +144 -104
  6. package/dist/components/AssetBrowser/AssetBrowser.d.ts +0 -1
  7. package/dist/components/AssignPageNumber/AssignPageNumber.d.ts +0 -1
  8. package/dist/components/BulkUpload/CsvUpload.d.ts +0 -1
  9. package/dist/components/Collaborators/ManageCollaborators.d.ts +0 -1
  10. package/dist/components/CollectionEditor/CollectionEditor.d.ts +0 -1
  11. package/dist/components/ContentPlayer/ContentPlayer.d.ts +0 -1
  12. package/dist/components/ContextualEditor/AssessmentDetailPanel.d.ts +7 -0
  13. package/dist/components/ContextualEditor/Breadcrumb.d.ts +0 -1
  14. package/dist/components/ContextualEditor/ContentEditForm.d.ts +0 -1
  15. package/dist/components/ContextualEditor/ContextualEditor.d.ts +0 -1
  16. package/dist/components/ContextualEditor/TabBar.d.ts +0 -1
  17. package/dist/components/ContextualEditor/TitleAppIcon.d.ts +0 -1
  18. package/dist/components/Dialcode/DialcodePanel.d.ts +0 -1
  19. package/dist/components/LibraryDock/FilterChips.d.ts +0 -1
  20. package/dist/components/LibraryDock/LibraryCard.d.ts +0 -1
  21. package/dist/components/LibraryDock/LibraryDock.d.ts +0 -1
  22. package/dist/components/LibraryDock/LibraryFilterPanel.d.ts +0 -1
  23. package/dist/components/LibraryDock/LibraryPreviewPanel.d.ts +0 -1
  24. package/dist/components/OutlineTree/OutlineTree.d.ts +0 -1
  25. package/dist/components/OutlineTree/TreeNode.d.ts +0 -1
  26. package/dist/components/ProgressStatus/ProgressStatus.d.ts +0 -1
  27. package/dist/components/ResourceReorder/ResourceReorderDialog.d.ts +0 -1
  28. package/dist/components/SparkMetaForm/FormSection.d.ts +0 -1
  29. package/dist/components/SparkMetaForm/SparkMetaForm.d.ts +0 -1
  30. package/dist/components/SparkMetaForm/fields/AppIconField.d.ts +0 -1
  31. package/dist/components/SparkMetaForm/fields/AppIconPickerModal.d.ts +0 -1
  32. package/dist/components/SparkMetaForm/fields/ChipGroupField.d.ts +0 -1
  33. package/dist/components/SparkMetaForm/fields/DateTimeField.d.ts +0 -1
  34. package/dist/components/SparkMetaForm/fields/DialcodeInputField.d.ts +0 -1
  35. package/dist/components/SparkMetaForm/fields/KeywordSuggestField.d.ts +0 -1
  36. package/dist/components/SparkMetaForm/fields/LicenseSelectField.d.ts +0 -1
  37. package/dist/components/SparkMetaForm/fields/MultiSelectField.d.ts +0 -1
  38. package/dist/components/SparkMetaForm/fields/NestedSelectField.d.ts +0 -1
  39. package/dist/components/SparkMetaForm/fields/PolicyCardField.d.ts +9 -0
  40. package/dist/components/SparkMetaForm/fields/RadioField.d.ts +0 -1
  41. package/dist/components/SparkMetaForm/fields/SelectField.d.ts +0 -1
  42. package/dist/components/SparkMetaForm/fields/TextField.d.ts +0 -1
  43. package/dist/components/SparkMetaForm/hooks/useCascade.d.ts +0 -1
  44. package/dist/components/SparkMetaForm/hooks/useFieldPrepare.d.ts +9 -1
  45. package/dist/components/SparkMetaForm/hooks/useFieldPrepare.learningPath.test.d.ts +1 -0
  46. package/dist/components/SplitBuilderShell/SplitBuilderShell.d.ts +0 -1
  47. package/dist/components/Topbar/Topbar.d.ts +0 -1
  48. package/dist/components/UnitContentList/AssessmentSlotItem.d.ts +7 -0
  49. package/dist/components/UnitContentList/ContentRow.d.ts +0 -1
  50. package/dist/components/UnitContentList/SkillPicker.d.ts +15 -0
  51. package/dist/components/UnitContentList/UnitContentList.d.ts +1 -1
  52. package/dist/components/modals/ConfirmDialog.d.ts +0 -1
  53. package/dist/components/modals/PublishChecklist.d.ts +0 -1
  54. package/dist/components/modals/QualityParamsModal.d.ts +0 -1
  55. package/dist/components/modals/UnsavedChangesModal.d.ts +0 -1
  56. package/dist/components/shared/Button.d.ts +0 -1
  57. package/dist/components/shared/Card.d.ts +0 -1
  58. package/dist/components/shared/Chip.d.ts +0 -1
  59. package/dist/components/shared/CourseDetailsPanel.d.ts +11 -0
  60. package/dist/components/shared/DropZone.d.ts +0 -1
  61. package/dist/components/shared/LanguageSelector/LanguageSelector.d.ts +0 -1
  62. package/dist/components/shared/LearningPathIcon.d.ts +6 -0
  63. package/dist/components/shared/Spinner.d.ts +0 -1
  64. package/dist/components/shared/index.d.ts +2 -0
  65. package/dist/dev-mock-api.d.ts +1 -0
  66. package/dist/hooks/useAssessmentSlots.d.ts +16 -0
  67. package/dist/hooks/useChannelData.d.ts +0 -1
  68. package/dist/hooks/useContentType.d.ts +0 -1
  69. package/dist/hooks/useEditorInit.d.ts +0 -1
  70. package/dist/hooks/useFramework.d.ts +0 -1
  71. package/dist/hooks/useLabels.d.ts +0 -1
  72. package/dist/hooks/useLibrary.d.ts +30 -1
  73. package/dist/hooks/useLibrary.test.d.ts +1 -0
  74. package/dist/hooks/useLibraryTargetLabel.d.ts +1 -0
  75. package/dist/hooks/useQumlContent.d.ts +0 -1
  76. package/dist/hooks/useSaveHierarchy.d.ts +6 -0
  77. package/dist/hooks/useSaveHierarchy.test.d.ts +1 -0
  78. package/dist/hooks/useSkillCategory.d.ts +24 -0
  79. package/dist/hooks/useSkillCategory.test.d.ts +1 -0
  80. package/dist/hooks/useSkillScope.d.ts +14 -0
  81. package/dist/hooks/useSkillScope.test.d.ts +1 -0
  82. package/dist/hooks/useToolbarActions.d.ts +0 -1
  83. package/dist/hooks/useTree.d.ts +0 -1
  84. package/dist/i18n/index.d.ts +0 -1
  85. package/dist/i18n/locales/ar.json.d.ts +92 -0
  86. package/dist/i18n/locales/en.json.d.ts +92 -0
  87. package/dist/i18n/locales/fr.json.d.ts +92 -0
  88. package/dist/i18n/locales/pt.json.d.ts +92 -0
  89. package/dist/index.cjs +144 -104
  90. package/dist/index.d.ts +1 -0
  91. package/dist/index.js +10861 -11055
  92. package/dist/services/quml/QumlPlayerService.d.ts +0 -1
  93. package/dist/store/editor.store.d.ts +3 -1
  94. package/dist/store/i18n.store.d.ts +0 -1
  95. package/dist/store/library.store.d.ts +0 -1
  96. package/dist/store/tree.store.d.ts +8 -3
  97. package/dist/store/tree.store.learningPath.test.d.ts +1 -0
  98. package/dist/store/ui.store.d.ts +2 -0
  99. package/dist/style.css +1 -1
  100. package/dist/types/content.d.ts +2 -0
  101. package/dist/types/framework.d.ts +4 -0
  102. package/dist/types/profile.d.ts +30 -0
  103. package/dist/types/profile.test.d.ts +1 -0
  104. package/dist/utils/lpStructure.d.ts +151 -0
  105. package/dist/utils/lpStructure.test.d.ts +1 -0
  106. package/dist/utils/validateRequiredFields.d.ts +0 -1
  107. package/dist/web-component/configRoundTrip.test.d.ts +1 -0
  108. package/package.json +13 -4
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface AssetBrowserProps {
4
3
  type?: 'image' | 'video' | 'audio' | 'all';
5
4
  onSelect: (url: string, asset: Record<string, unknown>) => void;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface AssignPageNumberProps {
4
3
  contentId: string;
5
4
  onClose: () => void;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface CsvUploadProps {
4
3
  contentId: string;
5
4
  onComplete: () => void;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface ManageCollaboratorsProps {
4
3
  contentId: string;
5
4
  onClose: () => void;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
  import { IEditorConfig, IEditorEvents } from '../../types/editor';
3
-
4
3
  export type CollectionEditorProps = IEditorConfig & IEditorEvents;
5
4
  export declare const CollectionEditor: React.FC<CollectionEditorProps>;
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { INode, EditorMode } from '../../types/editor';
3
-
4
3
  interface ContentPlayerProps {
5
4
  node: INode;
6
5
  editorMode: EditorMode;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ interface AssessmentDetailPanelProps {
3
+ slot: 'pre' | 'post';
4
+ isEditable: boolean;
5
+ }
6
+ export declare const AssessmentDetailPanel: React.FC<AssessmentDetailPanelProps>;
7
+ export {};
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface BreadcrumbProps {
4
3
  crumbs: Array<{
5
4
  id: string;
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { INode, EditorMode } from '../../types/editor';
3
-
4
3
  interface ContentEditFormProps {
5
4
  node: INode;
6
5
  editorMode: EditorMode;
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { EditorMode, ToolbarAction } from '../../types/editor';
3
-
4
3
  interface ContextualEditorProps {
5
4
  editorMode: EditorMode;
6
5
  onToolbarEvent: (event: {
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  declare const TAB_IDS: readonly ["details", "audience", "licensing"];
4
3
  type TabId = typeof TAB_IDS[number];
5
4
  interface TabBarProps {
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface TitleAppIconProps {
4
3
  nodeId: string;
5
4
  value?: string;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface DialcodePanelProps {
4
3
  contentId: string;
5
4
  existingDialcode?: string;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface FilterChip {
4
3
  label: string;
5
4
  value: string;
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { IContent } from '../../types/content';
3
-
4
3
  interface LibraryCardProps {
5
4
  item: IContent;
6
5
  onAdd: (item: IContent) => void;
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { EditorMode } from '../../types/editor';
3
-
4
3
  interface LibraryDockProps {
5
4
  collapsed?: boolean;
6
5
  onToggleCollapse?: () => void;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export interface LibraryFilters {
4
3
  board?: string[];
5
4
  medium?: string[];
@@ -1,7 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { IContent } from '../../types/content';
3
3
  import { EditorMode } from '../../types/editor';
4
-
5
4
  interface LibraryPreviewPanelProps {
6
5
  content: IContent | null;
7
6
  editorMode: EditorMode;
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { EditorMode } from '../../types/editor';
3
-
4
3
  interface OutlineTreeProps {
5
4
  editorMode: EditorMode;
6
5
  collapsed?: boolean;
@@ -1,7 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { NodeRendererProps } from 'react-arborist';
3
3
  import { INode, EditorMode } from '../../types/editor';
4
-
5
4
  interface TreeNodeProps extends NodeRendererProps<INode> {
6
5
  editorMode: EditorMode;
7
6
  }
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface Criterion {
4
3
  label: string;
5
4
  current: number;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface ResourceReorderDialogProps {
4
3
  resourceId: string;
5
4
  resourceName: string;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface FormSectionProps {
4
3
  title: string;
5
4
  description?: string;
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { EditorMode } from '../../types/editor';
3
-
4
3
  interface SparkMetaFormProps {
5
4
  nodeMetadata: Record<string, unknown>;
6
5
  activeTab: 'details' | 'audience' | 'licensing';
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface AppIconFieldProps {
4
3
  name: string;
5
4
  label: string;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface AppIconPickerModalProps {
4
3
  nodeId: string;
5
4
  currentValue?: string;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface ChipGroupFieldProps {
4
3
  name: string;
5
4
  label: string;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface DateTimeFieldProps {
4
3
  name: string;
5
4
  label: string;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface DialcodeInputFieldProps {
4
3
  name: string;
5
4
  label: string;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface KeywordSuggestFieldProps {
4
3
  name: string;
5
4
  label: string;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface LicenseSelectFieldProps {
4
3
  name: string;
5
4
  label: string;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface Option {
4
3
  label: string;
5
4
  value: string;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface LevelOption {
4
3
  label: string;
5
4
  value: string;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ interface PolicyCardFieldProps {
3
+ name: string;
4
+ label: string;
5
+ required?: boolean;
6
+ disabled?: boolean;
7
+ }
8
+ export declare const PolicyCardField: React.FC<PolicyCardFieldProps>;
9
+ export {};
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface Option {
4
3
  label: string;
5
4
  value: string;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface Option {
4
3
  label: string;
5
4
  value: string;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface TextFieldProps {
4
3
  name: string;
5
4
  label: string;
@@ -1,6 +1,5 @@
1
1
  import { UseFormReturn } from 'react-hook-form';
2
2
  import { IFieldConfig } from './useFieldPrepare';
3
-
4
3
  export type { IFieldConfig } from './useFieldPrepare';
5
4
  /**
6
5
  * useCascade
@@ -1,5 +1,9 @@
1
1
  import { IFrameworkDetails } from '../../../types/framework';
2
-
2
+ import { IEditorProfile } from '../../../types/profile';
3
+ export declare const POLICY_OPTIONS: Array<{
4
+ label: string;
5
+ value: string;
6
+ }>;
3
7
  export interface NestedSelectLevel {
4
8
  code: string;
5
9
  label: string;
@@ -69,6 +73,10 @@ export interface IPrepareContext {
69
73
  contentAdditionalCategories?: string[];
70
74
  /** Count of the active node's direct children — feeds maxQuestions range. */
71
75
  childCount?: number;
76
+ /** Active editor profile — used to render profile-specific fallback fields
77
+ * (e.g. the LP root's `policy` field) when no category-definition form
78
+ * config is available yet. */
79
+ profile?: IEditorProfile;
72
80
  }
73
81
  export declare function useFieldPrepare(formConfig: Array<Record<string, unknown>>, nodeMetadata: Record<string, unknown>, frameworkDetails: IFrameworkDetails, isRoot: boolean, ctx?: IPrepareContext): PreparedField[];
74
82
  export declare function __computeFieldOptionsForTest(field: Record<string, unknown>, fw: IFrameworkDetails, nodeMetadata: Record<string, unknown>, siblingFields?: Array<Record<string, unknown>>): Array<{
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { EditorMode, ToolbarAction } from '../../types/editor';
3
-
4
3
  interface SplitBuilderShellProps {
5
4
  editorMode: EditorMode;
6
5
  onToolbarEvent?: (event: {
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { EditorMode, ToolbarAction } from '../../types/editor';
3
-
4
3
  interface TopbarProps {
5
4
  editorMode: EditorMode;
6
5
  isSaving: boolean;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ interface AssessmentSlotItemProps {
3
+ slot: 'pre' | 'post';
4
+ isEditable: boolean;
5
+ }
6
+ export declare const AssessmentSlotItem: React.FC<AssessmentSlotItemProps>;
7
+ export {};
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { INode } from '../../types/editor';
3
-
4
3
  interface ContentRowProps {
5
4
  item: INode;
6
5
  onRemove: (id: string) => void;
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ interface SkillPickerProps {
3
+ options: string[];
4
+ selected: string[];
5
+ /** Selected skills that fell outside the scope after the prior assessment changed —
6
+ * flagged for re-selection rather than silently dropped. */
7
+ outOfScope: string[];
8
+ onChange: (skills: string[]) => void;
9
+ isEditable: boolean;
10
+ /** Explains where the options come from — prior assessment scope, or the
11
+ * manual-selection fallback. Rendered directly under the heading. */
12
+ description: string;
13
+ }
14
+ export declare const SkillPicker: React.FC<SkillPickerProps>;
15
+ export {};
@@ -1,8 +1,8 @@
1
1
  import { default as React } from 'react';
2
2
  import { EditorMode } from '../../types/editor';
3
-
4
3
  interface UnitContentListProps {
5
4
  editorMode: EditorMode;
5
+ isRoot?: boolean;
6
6
  }
7
7
  export declare const UnitContentList: React.FC<UnitContentListProps>;
8
8
  export {};
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface ConfirmDialogProps {
4
3
  title: string;
5
4
  message: React.ReactNode;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface PublishChecklistProps {
4
3
  contentId: string;
5
4
  onConfirm: () => void;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface QualityParamsModalProps {
4
3
  contentId: string;
5
4
  action: 'approve' | 'reject';
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface UnsavedChangesModalProps {
4
3
  onSave: () => void;
5
4
  onDiscard: () => void;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface ButtonProps {
4
3
  variant?: 'primary' | 'ghost' | 'danger';
5
4
  size?: 'sm' | 'md';
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface CardProps {
4
3
  className?: string;
5
4
  children: React.ReactNode;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface ChipProps {
4
3
  variant?: 'filled' | 'outline';
5
4
  active?: boolean;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ interface CourseDetailsPanelProps {
3
+ courseId: string;
4
+ variant?: 'compact' | 'full';
5
+ title?: string;
6
+ onLoaded?: (info: {
7
+ totalContents: number;
8
+ }) => void;
9
+ }
10
+ export declare const CourseDetailsPanel: React.FC<CourseDetailsPanelProps>;
11
+ export {};
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface DropZoneProps {
4
3
  isActive: boolean;
5
4
  label?: string;
@@ -1,3 +1,2 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export declare const LanguageSelector: React.FC;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface LearningPathIconProps extends React.SVGProps<SVGSVGElement> {
3
+ size?: number | string;
4
+ }
5
+ export declare const LearningPathIcon: React.FC<LearningPathIconProps>;
6
+ export {};
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface SpinnerProps {
4
3
  size?: number;
5
4
  color?: string;
@@ -4,3 +4,5 @@ export { Button } from './Button';
4
4
  export { Card } from './Card';
5
5
  export { DropZone } from './DropZone';
6
6
  export { LanguageSelector } from './LanguageSelector/LanguageSelector';
7
+ export { CourseDetailsPanel } from './CourseDetailsPanel';
8
+ export { LearningPathIcon } from './LearningPathIcon';
@@ -0,0 +1 @@
1
+ export declare function installMockApi(): void;
@@ -0,0 +1,16 @@
1
+ import { INode } from '../types/editor';
2
+ export interface AssessmentSlotInfo {
3
+ level: INode | undefined;
4
+ filled: boolean;
5
+ courseName: string | undefined;
6
+ }
7
+ export interface UseAssessmentSlotsResult {
8
+ pre: AssessmentSlotInfo;
9
+ post: AssessmentSlotInfo;
10
+ activeAssessmentSlot: 'pre' | 'post' | null;
11
+ setActiveAssessmentSlot: (slot: 'pre' | 'post' | null) => void;
12
+ /** Deletes the pre/post slot's Level, confirming first if it's the Prior
13
+ * Assessment under the Diagnostic policy (it drives the Adaptive skip). */
14
+ deleteSlot: (slot: 'pre' | 'post') => void;
15
+ }
16
+ export declare function useAssessmentSlots(): UseAssessmentSlotsResult;
@@ -1,5 +1,4 @@
1
1
  import { IChannelData } from '../api/channel';
2
-
3
2
  export declare function useChannelData(channelId?: string): IChannelData & {
4
3
  isLoading: boolean;
5
4
  };
@@ -1,6 +1,5 @@
1
1
  import { INode } from '../types/editor';
2
2
  import { IContent } from '../types/content';
3
-
4
3
  type ContentLike = Partial<INode> | Partial<IContent>;
5
4
  export interface CtStyle {
6
5
  key: string;
@@ -1,5 +1,4 @@
1
1
  import { IEditorConfig } from '../types/editor';
2
-
3
2
  interface UseEditorInitOptions {
4
3
  config: IEditorConfig;
5
4
  onError?: (e: Error) => void;
@@ -1,5 +1,4 @@
1
1
  import { IFrameworkDetails } from '../types/framework';
2
-
3
2
  export declare function useFramework(frameworkId?: string, targetFWIds?: string[]): IFrameworkDetails & {
4
3
  isLoading: boolean;
5
4
  };
@@ -1,3 +1,2 @@
1
1
  import { LabelConfig } from '../i18n';
2
-
3
2
  export declare function useLabels(): LabelConfig;
@@ -1,5 +1,32 @@
1
1
  import { LibraryFilters } from '../components/LibraryDock/LibraryFilterPanel';
2
-
2
+ /**
3
+ * LP profile library filters: search is strictly constrained to Courses.
4
+ * Filling the pre/post assessment slot has no competency constraint (the
5
+ * prior assessment *defines* the skill scope, so it can't be filtered by
6
+ * it). Browsing a Level otherwise shows every Course by default, narrowed
7
+ * to the selected skills once the author has picked any.
8
+ */
9
+ export declare function buildLpLibraryFilters(activeAssessmentSlot: 'pre' | 'post' | null, selectedSkills: string[], skillCategoryCode: string | undefined, frameworkId?: string): Record<string, unknown>;
10
+ /**
11
+ * LP profile search fields: append the resolved skill-category code so each
12
+ * returned course carries its own skill tags in `metadata` — Skills
13
+ * covered, useSkillScope, and the publish-time "course has no skill tag"
14
+ * check all read that field off the linked course node, and it's otherwise
15
+ * absent from the default search field set (Collection profile leaves the
16
+ * default fields untouched).
17
+ */
18
+ export declare function buildSearchFields(competencyScoped: boolean, skillCategoryCode: string | undefined): string[] | undefined;
19
+ /**
20
+ * Why the Library is (or would be) empty for the LP profile, so the dock can
21
+ * show a guiding message instead of the generic "no results" empty state —
22
+ * mandatory per learning_path_plan.md §3 item 3: with no Curriculum chosen
23
+ * there's no framework to scope search by, and with no skills selected on a
24
+ * content Level there's nothing to filter by, so browsing must show nothing
25
+ * rather than every course. Doesn't apply to Collection, root, an assessment
26
+ * Level, or while filling the Prior/Outcome Assessment slot (that course
27
+ * *defines* the skill scope, so it can't be filtered by it).
28
+ */
29
+ export declare function computeLibraryEmptyReason(competencyScoped: boolean, frameworkId: string | undefined, isLpLevel: boolean, activeAssessmentSlot: 'pre' | 'post' | null, selectedSkills: string[]): 'noCurriculum' | 'noSkills' | null;
3
30
  /**
4
31
  * Returns allowed primaryCategory values for the currently selected unit,
5
32
  * driven by editorConfig.config.hierarchy.levelN.children.Content.
@@ -21,4 +48,6 @@ export declare function useLibrary(): {
21
48
  toggleSort: () => void;
22
49
  loadMore: () => void;
23
50
  refetch: () => Promise<void>;
51
+ activeAssessmentSlot: "pre" | "post" | null;
52
+ emptyReason: "noCurriculum" | "noSkills" | null;
24
53
  };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export declare function useLibraryTargetLabel(): string | null;
@@ -1,5 +1,4 @@
1
1
  import { UseQueryResult } from '@tanstack/react-query';
2
-
3
2
  interface UseQumlContentOptions {
4
3
  enabled?: boolean;
5
4
  }
@@ -1,3 +1,9 @@
1
+ import { INode } from '../types/editor';
2
+ import { IEditorProfile } from '../types/profile';
3
+ export declare function buildSavePayload(nodes: INode[], treeCache: Record<string, Record<string, unknown>>, channel: string, profile?: IEditorProfile): {
4
+ nodesModified: Record<string, unknown>;
5
+ hierarchy: Record<string, unknown>;
6
+ };
1
7
  export declare function useSaveHierarchy(): {
2
8
  save: () => Promise<void>;
3
9
  isSaving: boolean;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ import { ICategory, ITerm } from '../types/framework';
2
+ import { INode } from '../types/editor';
3
+ export interface ISkillCategory {
4
+ /** The metadata field used for tagging Levels/Courses and filtering course search. */
5
+ code: string;
6
+ /** The skill catalog — this category's terms. */
7
+ terms: ITerm[];
8
+ }
9
+ /**
10
+ * Skills are not a fixed field: resolve the active framework's
11
+ * skill-equivalent category. USF exposes it directly as the `skill`
12
+ * category; any other framework's highest-index category is the
13
+ * skill-equivalent (USF's `skill` category also has the highest index, so
14
+ * one rule covers both — see learning_path_plan.md §3 item 0). Categories
15
+ * missing `index` are treated as lower priority than any category that
16
+ * declares one, rather than crashing the comparison.
17
+ */
18
+ export declare function resolveSkillCategory(categories: ICategory[] | undefined): ISkillCategory | null;
19
+ /** The prior-assessment course's own framework, when one is linked. Its skill
20
+ * tags live under *that* framework's skill category — an LP whose own
21
+ * framework is a fallback (e.g. context default) must not resolve the skill
22
+ * field against the wrong taxonomy. */
23
+ export declare function resolvePriorCourseFramework(rootNode: INode | undefined): string | undefined;
24
+ export declare function useSkillCategory(): ISkillCategory | null;
@@ -0,0 +1 @@
1
+ export {};