@project-sunbird/collection-editor-react 0.1.3 → 0.1.5

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.
@@ -6,5 +6,9 @@ interface LibraryPreviewPanelProps {
6
6
  onAdd: (item: IContent) => void;
7
7
  onClose: () => void;
8
8
  }
9
+ /**
10
+ * Content preview shown when a library item is selected. Opens directly as a
11
+ * centered modal (portaled to body so it escapes the dock's stacking context).
12
+ */
9
13
  export declare const LibraryPreviewPanel: React.FC<LibraryPreviewPanelProps>;
10
14
  export {};
@@ -5,5 +5,10 @@ interface PublishChecklistProps {
5
5
  onConfirm: () => void;
6
6
  onCancel: () => void;
7
7
  }
8
+ /**
9
+ * Publish confirmation — mirrors the Angular publish-checklist popup.
10
+ * - With no checklist items: a simple "Are you sure you want to publish this {objectType}?"
11
+ * - With checklist items: the reviewer must tick every item before "Yes" is enabled.
12
+ */
8
13
  export declare const PublishChecklist: React.FC<PublishChecklistProps>;
9
14
  export {};
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface UnsavedChangesModalProps {
4
+ onSave: () => void;
5
+ onDiscard: () => void;
6
+ onCancel: () => void;
7
+ isSaving?: boolean;
8
+ }
9
+ /**
10
+ * Shown when the user clicks Back with unsaved changes. Lets them save and
11
+ * leave, discard and leave, or stay on the page.
12
+ */
13
+ export declare const UnsavedChangesModal: React.FC<UnsavedChangesModalProps>;
14
+ export {};
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Reads the root collection's status from the tree and reports whether it is
3
+ * still in "Draft". Adding units / content is only allowed for Draft content —
4
+ * once it moves to Review / Live, the add affordances are disabled.
5
+ */
6
+ export declare function useIsDraftStatus(): boolean;
7
+ /**
8
+ * Returns true only when the currently selected tree node is a Unit or
9
+ * Sub-Unit (isFolder, but NOT the root). Used to gate the Library + button —
10
+ * content should only be addable to units, not directly to the course root or
11
+ * to individual leaf content nodes.
12
+ */
13
+ export declare function useSelectedNodeIsUnit(): boolean;