@project-sunbird/sunbird-questionset-editor-web-component-react 0.1.14 → 0.1.16
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.
- package/dist/api/framework.d.ts +14 -0
- package/dist/api/hierarchy.d.ts +4 -0
- package/dist/api/question.d.ts +18 -0
- package/dist/assets/sunbird-quml-player.js +2 -2
- package/dist/components/LibraryDock/LibraryDock.d.ts +0 -1
- package/dist/components/SparkMetaForm/SparkMetaForm.d.ts +46 -0
- package/dist/hooks/useFramework.d.ts +19 -1
- package/dist/hooks/useLibrary.d.ts +7 -0
- package/dist/index.js +6661 -5394
- package/dist/locales/label.config.ar.json.d.ts +39 -4
- package/dist/locales/label.config.fr.json.d.ts +39 -4
- package/dist/locales/label.config.json.d.ts +39 -4
- package/dist/locales/label.config.pt.json.d.ts +39 -4
- package/dist/queryClient.d.ts +2 -0
- package/dist/store/copyRegistry.store.d.ts +29 -0
- package/dist/store/editor.store.d.ts +9 -0
- package/dist/store/tree.store.d.ts +10 -0
- package/dist/style.css +1 -1
- package/dist/types/content.d.ts +4 -0
- package/dist/types/framework.d.ts +4 -0
- package/dist/utils/labels.d.ts +2 -1
- package/package.json +2 -2
package/dist/api/framework.d.ts
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
1
|
import { IFramework, ITerm } from '../types/framework';
|
|
2
2
|
export declare function getFramework(frameworkId: string): Promise<IFramework>;
|
|
3
|
+
/** Live frameworks available for the Framework picker — channel is scoped
|
|
4
|
+
* via apiClient's own X-Channel-Id header, not a body filter (matches how
|
|
5
|
+
* the backend actually expects this search). `type`/`systemDefault` are
|
|
6
|
+
* caller-supplied (see useFrameworkOptions.ts) rather than hardcoded here —
|
|
7
|
+
* which types are relevant comes from the category definition's own
|
|
8
|
+
* orgFWType, the same way the collection editor derives it. */
|
|
9
|
+
export declare function searchFrameworks(filters?: {
|
|
10
|
+
type?: string[];
|
|
11
|
+
systemDefault?: string;
|
|
12
|
+
}): Promise<Array<{
|
|
13
|
+
identifier: string;
|
|
14
|
+
name: string;
|
|
15
|
+
type?: string;
|
|
16
|
+
}>>;
|
|
3
17
|
export declare function searchTerms(frameworkId: string, categoryCode: string, query?: string): Promise<ITerm[]>;
|
package/dist/api/hierarchy.d.ts
CHANGED
|
@@ -7,6 +7,10 @@ export declare function readHierarchy(contentId: string): Promise<{
|
|
|
7
7
|
export declare function updateHierarchy(_contentId: string, nodesModified: Record<string, unknown>, hierarchy: Record<string, unknown>, lastUpdatedBy?: string): Promise<{
|
|
8
8
|
identifiers: Record<string, string>;
|
|
9
9
|
}>;
|
|
10
|
+
/** `PATCH questionset/v2/add` — attaches existing questions to a section; appends after maxIndex. */
|
|
11
|
+
export declare function addQuestionsToSet(rootId: string, collectionId: string, children: string[]): Promise<void>;
|
|
12
|
+
/** `DELETE questionset/v2/remove` — detaches questions from a section (never retires them). */
|
|
13
|
+
export declare function removeQuestionsFromSet(rootId: string, collectionId: string, children: string[]): Promise<void>;
|
|
10
14
|
export declare function publishContent(contentId: string, lastPublishedBy?: string): Promise<void>;
|
|
11
15
|
export declare function sendForReview(contentId: string): Promise<void>;
|
|
12
16
|
export declare function rejectContent(contentId: string, comment: string): Promise<void>;
|
package/dist/api/question.d.ts
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
export interface ICreateQuestionResult {
|
|
2
|
+
identifier: string;
|
|
3
|
+
versionKey: string;
|
|
4
|
+
}
|
|
5
|
+
/** `POST question/v2/create` — metadata must set visibility: "Default". */
|
|
6
|
+
export declare function createQuestion(metadata: Record<string, unknown>): Promise<ICreateQuestionResult>;
|
|
7
|
+
/** `PATCH question/v2/update/:id` — rejects visibility:"Parent" nodes. */
|
|
8
|
+
export declare function updateQuestion(questionId: string, versionKey: string, metadata: Record<string, unknown>): Promise<{
|
|
9
|
+
versionKey: string;
|
|
10
|
+
}>;
|
|
11
|
+
/**
|
|
12
|
+
* `POST question/v2/publish` — moves a Draft standalone question to Live.
|
|
13
|
+
* The library search (composite/v3/search) only surfaces status:"Live"
|
|
14
|
+
* questions, so a newly-created standalone question needs this right away —
|
|
15
|
+
* like the old AssessmentItem flow, where every created item was usable
|
|
16
|
+
* immediately, not left in an invisible Draft state.
|
|
17
|
+
*/
|
|
18
|
+
export declare function publishQuestion(questionId: string): Promise<void>;
|
|
1
19
|
/**
|
|
2
20
|
* Fields requested on question read — the old editor's
|
|
3
21
|
* `editor.config.json → readQuestionFields` list, verbatim.
|