@project-sunbird/collection-editor-react 1.0.15 → 1.0.16-alpha

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 (43) hide show
  1. package/README.md +25 -0
  2. package/dist/api/competencyFramework.d.ts +32 -0
  3. package/dist/collection-editor.umd.js +109 -109
  4. package/dist/components/SparkMetaForm/fields/OptionSearch.d.ts +20 -0
  5. package/dist/components/SparkMetaForm/fields/OptionSearch.test.d.ts +1 -0
  6. package/dist/components/SparkMetaForm/hooks/useFieldPrepare.competency.test.d.ts +1 -0
  7. package/dist/components/SparkMetaForm/hooks/useFieldPrepare.d.ts +34 -1
  8. package/dist/components/SparkMetaForm/hooks/useFieldPrepare.skill.test.d.ts +1 -0
  9. package/dist/components/UnitContentList/LevelCourseItem.d.ts +11 -0
  10. package/dist/components/UnitContentList/LevelExamItem.d.ts +7 -0
  11. package/dist/hooks/useCompetencyFrameworks.d.ts +27 -0
  12. package/dist/hooks/useCourseCompetency.d.ts +31 -0
  13. package/dist/hooks/useCourseCompetency.test.d.ts +1 -0
  14. package/dist/hooks/useLevelExam.d.ts +18 -0
  15. package/dist/hooks/useLibrary.d.ts +98 -16
  16. package/dist/hooks/useLpCompetency.d.ts +13 -0
  17. package/dist/hooks/useSkillCategory.d.ts +15 -1
  18. package/dist/hooks/useSkillScope.d.ts +4 -3
  19. package/dist/hooks/useSkillsCoveredSync.d.ts +10 -0
  20. package/dist/hooks/useSkillsCoveredSync.test.d.ts +1 -0
  21. package/dist/i18n/locales/ar.json.d.ts +59 -27
  22. package/dist/i18n/locales/en.json.d.ts +59 -27
  23. package/dist/i18n/locales/fr.json.d.ts +59 -27
  24. package/dist/i18n/locales/pt.json.d.ts +59 -27
  25. package/dist/index.cjs +112 -112
  26. package/dist/index.js +10882 -10103
  27. package/dist/store/tree.store.d.ts +5 -2
  28. package/dist/store/tree.store.dirty.test.d.ts +1 -0
  29. package/dist/store/ui.store.d.ts +2 -0
  30. package/dist/style.css +1 -1
  31. package/dist/types/framework.d.ts +27 -0
  32. package/dist/types/profile.d.ts +8 -1
  33. package/dist/utils/competencyLeaves.d.ts +44 -0
  34. package/dist/utils/competencyLeaves.test.d.ts +1 -0
  35. package/dist/utils/libraryCardMeta.d.ts +33 -0
  36. package/dist/utils/libraryCardMeta.test.d.ts +1 -0
  37. package/dist/utils/lpCompetency.d.ts +32 -0
  38. package/dist/utils/lpCompetency.test.d.ts +1 -0
  39. package/dist/utils/lpStructure.d.ts +78 -55
  40. package/dist/utils/skillTerms.d.ts +22 -0
  41. package/dist/utils/skillTerms.test.d.ts +1 -0
  42. package/package.json +1 -1
  43. package/dist/components/UnitContentList/SkillPicker.d.ts +0 -19
package/README.md CHANGED
@@ -143,6 +143,31 @@ The equivalent web-component usage is identical to the standard flow — just se
143
143
  `IEditorProfile` (exported for advanced integrations that need to introspect the active profile,
144
144
  e.g. `unitLabelKey`/`features` for a custom host toolbar) is re-exported from the package root.
145
145
 
146
+ ## Evaluation Course profile
147
+
148
+ Setting `config.primaryCategory` to `'Evaluation Course'` authors a normal Course — same unit
149
+ structure, drag/drop, depth, and toolbar as the default profile — except the Library's addable
150
+ content is restricted to exactly `Practice Question Set` and `Course Assessment` (ECML assessment
151
+ content), at every depth in the course, not just the root. This is the category used for a Course
152
+ that will serve as a Learning Path's Prior/Outcome Assessment or a Level Exam course — its content
153
+ must be assessment-only, never regular course material.
154
+
155
+ ```tsx
156
+ const evaluationCourseConfig = {
157
+ context: { /* same shape as any other Course */ },
158
+ config: {
159
+ mode: 'edit',
160
+ objectType: 'Collection',
161
+ primaryCategory: 'Evaluation Course', // the only switch
162
+ },
163
+ };
164
+ ```
165
+
166
+ No new backend object category definition is required beyond the platform accepting
167
+ `'Evaluation Course'` as a `primaryCategory` value on Collection objects — the restriction is
168
+ enforced entirely client-side, via `evaluationCourseProfile.restrictedContentCategories`
169
+ (`IEditorProfile`).
170
+
146
171
  ---
147
172
 
148
173
  ## API
@@ -0,0 +1,32 @@
1
+ import { CompetencyCategoryWire } from '../utils/competencyLeaves';
2
+ export interface ICompetencyFrameworkSummary {
3
+ identifier: string;
4
+ name: string;
5
+ }
6
+ export interface ICompetencyFramework {
7
+ identifier: string;
8
+ name?: string;
9
+ categories?: CompetencyCategoryWire[];
10
+ }
11
+ /**
12
+ * Live competency (skill) frameworks of a channel. These are `CompetencyFramework` objects, not
13
+ * `Framework`s, so they never appear in `channel.frameworks` or the Course Type list.
14
+ */
15
+ export declare function listCompetencyFrameworks(channel?: string): Promise<ICompetencyFrameworkSummary[]>;
16
+ /**
17
+ * Reads a competency framework with its categories and terms. `/framework/v1/read` answers 404
18
+ * for `CompetencyFramework` objects, so this uses the competency-framework read (as lern does).
19
+ */
20
+ export declare function getCompetencyFramework(frameworkId: string): Promise<ICompetencyFramework>;
21
+ export interface ICompetencyRole {
22
+ id: string;
23
+ name: string;
24
+ /** Leaf skill codes the role requires. */
25
+ skills: string[];
26
+ }
27
+ /**
28
+ * Live roles of a competency framework, from lern's `role_skill` (roles don't live in the
29
+ * framework). lern answers 404 when the framework has no roles yet; that is "no roles", not an
30
+ * error.
31
+ */
32
+ export declare function listCompetencyRoles(frameworkId: string): Promise<ICompetencyRole[]>;