@project-sunbird/collection-editor-react 0.1.10 → 0.1.12

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.
@@ -28,6 +28,7 @@ interface EditorState {
28
28
  };
29
29
  sourcingSettings: Record<string, unknown>;
30
30
  } | null;
31
+ formStatusMapper: Record<string, boolean>;
31
32
  setEditorConfig: (config: IEditorConfig) => void;
32
33
  setEditorMode: (mode: EditorMode) => void;
33
34
  setButtonLoader: (key: keyof IButtonLoaders, value: boolean) => void;
@@ -41,6 +42,8 @@ interface EditorState {
41
42
  setLastSaved: (ts: string) => void;
42
43
  setIsDirty: (dirty: boolean) => void;
43
44
  setCategoryDefinition: (parsed: IParsedCategoryDefinition) => void;
45
+ setFormStatus: (nodeId: string, isValid: boolean) => void;
46
+ validateAllForms: (treeNodes: import('../types/editor').INode[]) => boolean;
44
47
  }
45
48
  export declare const useEditorStore: import('zustand').UseBoundStore<import('zustand').StoreApi<EditorState>>;
46
49
  export declare const getEditorStore: () => () => EditorState;
@@ -25,6 +25,7 @@ interface TreeState {
25
25
  name: string;
26
26
  }>;
27
27
  moveNode: (nodeId: string, fromParentId: string, toParentId: string) => void;
28
+ replaceNodeIds: (identifiers: Record<string, string>) => void;
28
29
  }
29
30
  export declare const useTreeStore: import('zustand').UseBoundStore<import('zustand').StoreApi<TreeState>>;
30
31
  export declare const getTreeStore: () => () => TreeState;
@@ -49,6 +49,15 @@ export interface IConfig {
49
49
  * Set to 'v4' only if your backend specifically requires it.
50
50
  */
51
51
  categoryDefinitionApiVersion?: 'v1' | 'v4';
52
+ /**
53
+ * Asset upload constraints for the app icon picker.
54
+ * Defaults: size = 1 MB, accepted = 'image/png,image/jpeg'.
55
+ * SVG is intentionally excluded to prevent active-content / XSS vectors.
56
+ */
57
+ assetConfig?: {
58
+ size?: number;
59
+ accepted?: string;
60
+ };
52
61
  }
53
62
  export interface IEditorConfig {
54
63
  context: IContext;
@@ -20,4 +20,12 @@ export interface IFramework {
20
20
  export interface IFrameworkDetails {
21
21
  organisationFramework?: IFramework;
22
22
  targetFrameworks?: IFramework[];
23
+ /** Options for the 'framework' (Course Type) field — built from channel.frameworks
24
+ * filtered/extended by orgFWType from the category definition. */
25
+ orgFrameworks?: Array<{
26
+ label: string;
27
+ value: string;
28
+ }>;
29
+ /** Options for the 'additionalCategories' field — from channel.collectionAdditionalCategories. */
30
+ channelAdditionalCategories?: string[];
23
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@project-sunbird/collection-editor-react",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",