@project-sunbird/collection-editor-react 0.1.0

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 (103) hide show
  1. package/dist/api/bulkUpload.d.ts +10 -0
  2. package/dist/api/categoryDefinition.d.ts +45 -0
  3. package/dist/api/client.d.ts +3 -0
  4. package/dist/api/content.d.ts +15 -0
  5. package/dist/api/dialcode.d.ts +12 -0
  6. package/dist/api/framework.d.ts +4 -0
  7. package/dist/api/hierarchy.d.ts +12 -0
  8. package/dist/api/user.d.ts +25 -0
  9. package/dist/collection-editor.umd.js +466 -0
  10. package/dist/components/AssetBrowser/AssetBrowser.d.ts +9 -0
  11. package/dist/components/AssetBrowser/index.d.ts +1 -0
  12. package/dist/components/AssignPageNumber/AssignPageNumber.d.ts +8 -0
  13. package/dist/components/AssignPageNumber/index.d.ts +1 -0
  14. package/dist/components/BulkUpload/CsvUpload.d.ts +10 -0
  15. package/dist/components/BulkUpload/index.d.ts +1 -0
  16. package/dist/components/Collaborators/ManageCollaborators.d.ts +8 -0
  17. package/dist/components/Collaborators/index.d.ts +1 -0
  18. package/dist/components/CollectionEditor/CollectionEditor.d.ts +5 -0
  19. package/dist/components/CollectionEditor/index.d.ts +2 -0
  20. package/dist/components/ContentPlayer/ContentPlayer.d.ts +10 -0
  21. package/dist/components/ContentPlayer/index.d.ts +1 -0
  22. package/dist/components/ContextualEditor/Breadcrumb.d.ts +10 -0
  23. package/dist/components/ContextualEditor/ContentEditForm.d.ts +11 -0
  24. package/dist/components/ContextualEditor/ContextualEditor.d.ts +12 -0
  25. package/dist/components/ContextualEditor/TabBar.d.ts +21 -0
  26. package/dist/components/ContextualEditor/TitleAppIcon.d.ts +9 -0
  27. package/dist/components/ContextualEditor/index.d.ts +1 -0
  28. package/dist/components/Dialcode/DialcodePanel.d.ts +10 -0
  29. package/dist/components/Dialcode/index.d.ts +1 -0
  30. package/dist/components/LibraryDock/FilterChips.d.ts +13 -0
  31. package/dist/components/LibraryDock/LibraryCard.d.ts +12 -0
  32. package/dist/components/LibraryDock/LibraryDock.d.ts +10 -0
  33. package/dist/components/LibraryDock/LibraryFilterPanel.d.ts +19 -0
  34. package/dist/components/LibraryDock/LibraryPreviewPanel.d.ts +10 -0
  35. package/dist/components/LibraryDock/index.d.ts +1 -0
  36. package/dist/components/OutlineTree/OutlineTree.d.ts +10 -0
  37. package/dist/components/OutlineTree/TreeNode.d.ts +9 -0
  38. package/dist/components/OutlineTree/index.d.ts +1 -0
  39. package/dist/components/ProgressStatus/ProgressStatus.d.ts +12 -0
  40. package/dist/components/ProgressStatus/index.d.ts +1 -0
  41. package/dist/components/ResourceReorder/ResourceReorderDialog.d.ts +10 -0
  42. package/dist/components/ResourceReorder/index.d.ts +1 -0
  43. package/dist/components/SparkMetaForm/FormSection.d.ts +9 -0
  44. package/dist/components/SparkMetaForm/SparkMetaForm.d.ts +14 -0
  45. package/dist/components/SparkMetaForm/fields/AppIconField.d.ts +11 -0
  46. package/dist/components/SparkMetaForm/fields/AppIconPickerModal.d.ts +10 -0
  47. package/dist/components/SparkMetaForm/fields/ChipGroupField.d.ts +11 -0
  48. package/dist/components/SparkMetaForm/fields/DateTimeField.d.ts +10 -0
  49. package/dist/components/SparkMetaForm/fields/DialcodeInputField.d.ts +10 -0
  50. package/dist/components/SparkMetaForm/fields/KeywordSuggestField.d.ts +10 -0
  51. package/dist/components/SparkMetaForm/fields/LicenseSelectField.d.ts +10 -0
  52. package/dist/components/SparkMetaForm/fields/MultiSelectField.d.ts +15 -0
  53. package/dist/components/SparkMetaForm/fields/NestedSelectField.d.ts +20 -0
  54. package/dist/components/SparkMetaForm/fields/RadioField.d.ts +15 -0
  55. package/dist/components/SparkMetaForm/fields/SelectField.d.ts +15 -0
  56. package/dist/components/SparkMetaForm/fields/TextField.d.ts +13 -0
  57. package/dist/components/SparkMetaForm/fields/index.d.ts +11 -0
  58. package/dist/components/SparkMetaForm/hooks/index.d.ts +3 -0
  59. package/dist/components/SparkMetaForm/hooks/useCascade.d.ts +16 -0
  60. package/dist/components/SparkMetaForm/hooks/useFieldPrepare.d.ts +42 -0
  61. package/dist/components/SparkMetaForm/index.d.ts +1 -0
  62. package/dist/components/SplitBuilderShell/SplitBuilderShell.d.ts +14 -0
  63. package/dist/components/SplitBuilderShell/index.d.ts +1 -0
  64. package/dist/components/Topbar/Topbar.d.ts +15 -0
  65. package/dist/components/Topbar/index.d.ts +1 -0
  66. package/dist/components/UnitContentList/ContentRow.d.ts +10 -0
  67. package/dist/components/UnitContentList/UnitContentList.d.ts +8 -0
  68. package/dist/components/UnitContentList/index.d.ts +1 -0
  69. package/dist/components/modals/ConfirmDialog.d.ts +13 -0
  70. package/dist/components/modals/PublishChecklist.d.ts +9 -0
  71. package/dist/components/modals/QualityParamsModal.d.ts +10 -0
  72. package/dist/components/modals/index.d.ts +3 -0
  73. package/dist/components/shared/Button.d.ts +14 -0
  74. package/dist/components/shared/Card.d.ts +9 -0
  75. package/dist/components/shared/Chip.d.ts +12 -0
  76. package/dist/components/shared/DropZone.d.ts +10 -0
  77. package/dist/components/shared/Spinner.d.ts +8 -0
  78. package/dist/components/shared/index.d.ts +5 -0
  79. package/dist/dev-main.d.ts +1 -0
  80. package/dist/hooks/index.d.ts +9 -0
  81. package/dist/hooks/useContentType.d.ts +18 -0
  82. package/dist/hooks/useEditorInit.d.ts +12 -0
  83. package/dist/hooks/useFramework.d.ts +5 -0
  84. package/dist/hooks/useLibrary.d.ts +24 -0
  85. package/dist/hooks/useSaveHierarchy.d.ts +6 -0
  86. package/dist/hooks/useTelemetry.d.ts +13 -0
  87. package/dist/hooks/useTree.d.ts +23 -0
  88. package/dist/index.cjs +466 -0
  89. package/dist/index.d.ts +8 -0
  90. package/dist/index.js +20941 -0
  91. package/dist/store/editor.store.d.ts +47 -0
  92. package/dist/store/index.d.ts +3 -0
  93. package/dist/store/library.store.d.ts +25 -0
  94. package/dist/store/tree.store.d.ts +31 -0
  95. package/dist/store/ui.store.d.ts +9 -0
  96. package/dist/style.css +1 -0
  97. package/dist/types/content.d.ts +43 -0
  98. package/dist/types/editor.d.ts +86 -0
  99. package/dist/types/framework.d.ts +23 -0
  100. package/dist/types/index.d.ts +3 -0
  101. package/dist/utils/telemetry.d.ts +18 -0
  102. package/dist/web-component/register.d.ts +1 -0
  103. package/package.json +62 -0
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface AssetBrowserProps {
4
+ type?: 'image' | 'video' | 'audio' | 'all';
5
+ onSelect: (url: string, asset: Record<string, unknown>) => void;
6
+ onClose: () => void;
7
+ }
8
+ export declare const AssetBrowser: React.FC<AssetBrowserProps>;
9
+ export {};
@@ -0,0 +1 @@
1
+ export { AssetBrowser } from './AssetBrowser';
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface AssignPageNumberProps {
4
+ contentId: string;
5
+ onClose: () => void;
6
+ }
7
+ export declare const AssignPageNumber: React.FC<AssignPageNumberProps>;
8
+ export {};
@@ -0,0 +1 @@
1
+ export { AssignPageNumber } from './AssignPageNumber';
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface CsvUploadProps {
4
+ contentId: string;
5
+ onComplete: () => void;
6
+ onClose: () => void;
7
+ mode?: 'create' | 'update';
8
+ }
9
+ export declare const CsvUpload: React.FC<CsvUploadProps>;
10
+ export {};
@@ -0,0 +1 @@
1
+ export { CsvUpload } from './CsvUpload';
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface ManageCollaboratorsProps {
4
+ contentId: string;
5
+ onClose: () => void;
6
+ }
7
+ export declare const ManageCollaborators: React.FC<ManageCollaboratorsProps>;
8
+ export {};
@@ -0,0 +1 @@
1
+ export { ManageCollaborators } from './ManageCollaborators';
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { IEditorConfig, IEditorEvents } from '../../types/editor';
3
+
4
+ export type CollectionEditorProps = IEditorConfig & IEditorEvents;
5
+ export declare const CollectionEditor: React.FC<CollectionEditorProps>;
@@ -0,0 +1,2 @@
1
+ export { CollectionEditor } from './CollectionEditor';
2
+ export type { CollectionEditorProps } from './CollectionEditor';
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { INode, EditorMode } from '../../types/editor';
3
+
4
+ interface ContentPlayerProps {
5
+ node: INode;
6
+ editorMode: EditorMode;
7
+ type: 'content' | 'quml';
8
+ }
9
+ export declare const ContentPlayer: React.FC<ContentPlayerProps>;
10
+ export {};
@@ -0,0 +1 @@
1
+ export { ContentPlayer } from './ContentPlayer';
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface BreadcrumbProps {
4
+ crumbs: Array<{
5
+ id: string;
6
+ name: string;
7
+ }>;
8
+ }
9
+ export declare const Breadcrumb: React.FC<BreadcrumbProps>;
10
+ export {};
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { INode, EditorMode } from '../../types/editor';
3
+
4
+ interface ContentEditFormProps {
5
+ node: INode;
6
+ editorMode: EditorMode;
7
+ onMoveClick: () => void;
8
+ reorderDialog?: React.ReactNode;
9
+ }
10
+ export declare const ContentEditForm: React.FC<ContentEditFormProps>;
11
+ export {};
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ import { EditorMode, ToolbarAction } from '../../types/editor';
3
+
4
+ interface ContextualEditorProps {
5
+ editorMode: EditorMode;
6
+ onToolbarEvent: (event: {
7
+ action: ToolbarAction;
8
+ data?: unknown;
9
+ }) => void;
10
+ }
11
+ export declare const ContextualEditor: React.FC<ContextualEditorProps>;
12
+ export {};
@@ -0,0 +1,21 @@
1
+ import { default as React } from 'react';
2
+
3
+ declare const TABS: readonly [{
4
+ readonly id: "details";
5
+ readonly label: "Details";
6
+ }, {
7
+ readonly id: "audience";
8
+ readonly label: "Audience & Curriculum";
9
+ }, {
10
+ readonly id: "licensing";
11
+ readonly label: "Licensing";
12
+ }];
13
+ type TabId = typeof TABS[number]['id'];
14
+ interface TabBarProps {
15
+ activeTab: TabId;
16
+ onChange: (tab: TabId) => void;
17
+ errorTabs?: string[];
18
+ visibleTabs?: TabId[];
19
+ }
20
+ export declare const TabBar: React.FC<TabBarProps>;
21
+ export {};
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface TitleAppIconProps {
4
+ nodeId: string;
5
+ value?: string;
6
+ editable: boolean;
7
+ }
8
+ export declare const TitleAppIcon: React.FC<TitleAppIconProps>;
9
+ export {};
@@ -0,0 +1 @@
1
+ export { ContextualEditor } from './ContextualEditor';
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface DialcodePanelProps {
4
+ contentId: string;
5
+ existingDialcode?: string;
6
+ editorMode: 'edit' | 'review' | 'read' | 'sourcingreview';
7
+ onDialcodeChange?: (dialcode: string | null) => void;
8
+ }
9
+ export declare const DialcodePanel: React.FC<DialcodePanelProps>;
10
+ export {};
@@ -0,0 +1 @@
1
+ export { DialcodePanel } from './DialcodePanel';
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface FilterChip {
4
+ label: string;
5
+ value: string;
6
+ }
7
+ interface FilterChipsProps {
8
+ filters: readonly FilterChip[];
9
+ active: string;
10
+ onChange: (value: string) => void;
11
+ }
12
+ export declare const FilterChips: React.FC<FilterChipsProps>;
13
+ export {};
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ import { IContent } from '../../types/content';
3
+
4
+ interface LibraryCardProps {
5
+ item: IContent;
6
+ onAdd: (item: IContent) => void;
7
+ onPreview?: (item: IContent) => void;
8
+ isDraggable?: boolean;
9
+ isAdded?: boolean;
10
+ }
11
+ export declare const LibraryCard: React.FC<LibraryCardProps>;
12
+ export {};
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { EditorMode } from '../../types/editor';
3
+
4
+ interface LibraryDockProps {
5
+ collapsed?: boolean;
6
+ onToggleCollapse?: () => void;
7
+ editorMode: EditorMode;
8
+ }
9
+ export declare const LibraryDock: React.FC<LibraryDockProps>;
10
+ export {};
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface LibraryFilters {
4
+ board?: string[];
5
+ medium?: string[];
6
+ gradeLevel?: string[];
7
+ subject?: string[];
8
+ topic?: string[];
9
+ primaryCategory?: string[];
10
+ contentType?: string[];
11
+ }
12
+ interface LibraryFilterPanelProps {
13
+ isOpen: boolean;
14
+ filters: LibraryFilters;
15
+ onApply: (filters: LibraryFilters) => void;
16
+ onClose: () => void;
17
+ }
18
+ export declare const LibraryFilterPanel: React.FC<LibraryFilterPanelProps>;
19
+ export {};
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { IContent } from '../../types/content';
3
+
4
+ interface LibraryPreviewPanelProps {
5
+ content: IContent | null;
6
+ onAdd: (item: IContent) => void;
7
+ onClose: () => void;
8
+ }
9
+ export declare const LibraryPreviewPanel: React.FC<LibraryPreviewPanelProps>;
10
+ export {};
@@ -0,0 +1 @@
1
+ export { LibraryDock } from './LibraryDock';
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { EditorMode } from '../../types/editor';
3
+
4
+ interface OutlineTreeProps {
5
+ editorMode: EditorMode;
6
+ collapsed?: boolean;
7
+ onToggleCollapse?: () => void;
8
+ }
9
+ export declare const OutlineTree: React.FC<OutlineTreeProps>;
10
+ export {};
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { NodeRendererProps } from 'react-arborist';
3
+ import { INode, EditorMode } from '../../types/editor';
4
+
5
+ interface TreeNodeProps extends NodeRendererProps<INode> {
6
+ editorMode: EditorMode;
7
+ }
8
+ export declare const TreeNode: React.FC<TreeNodeProps>;
9
+ export {};
@@ -0,0 +1 @@
1
+ export { OutlineTree } from './OutlineTree';
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface Criterion {
4
+ label: string;
5
+ current: number;
6
+ required: number;
7
+ }
8
+ interface ProgressStatusProps {
9
+ criteria?: Criterion[];
10
+ }
11
+ export declare const ProgressStatus: React.FC<ProgressStatusProps>;
12
+ export {};
@@ -0,0 +1 @@
1
+ export { ProgressStatus } from './ProgressStatus';
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface ResourceReorderDialogProps {
4
+ resourceId: string;
5
+ resourceName: string;
6
+ currentUnitId: string;
7
+ onClose: () => void;
8
+ }
9
+ export declare const ResourceReorderDialog: React.FC<ResourceReorderDialogProps>;
10
+ export {};
@@ -0,0 +1 @@
1
+ export { ResourceReorderDialog } from './ResourceReorderDialog';
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface FormSectionProps {
4
+ title: string;
5
+ description?: string;
6
+ children: React.ReactNode;
7
+ }
8
+ export declare const FormSection: React.FC<FormSectionProps>;
9
+ export {};
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ import { EditorMode } from '../../types/editor';
3
+
4
+ interface SparkMetaFormProps {
5
+ nodeMetadata: Record<string, unknown>;
6
+ activeTab: 'details' | 'audience' | 'licensing';
7
+ isRoot: boolean;
8
+ isFolder: boolean;
9
+ editorMode: EditorMode;
10
+ onFormValueChange: (data: unknown) => void;
11
+ onFormStatusChange: (isValid: boolean, errorTabs: Array<'details' | 'audience' | 'licensing'>) => void;
12
+ }
13
+ export declare const SparkMetaForm: React.FC<SparkMetaFormProps>;
14
+ export {};
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface AppIconFieldProps {
4
+ name: string;
5
+ label: string;
6
+ nodeId: string;
7
+ required?: boolean;
8
+ disabled?: boolean;
9
+ }
10
+ export declare const AppIconField: React.FC<AppIconFieldProps>;
11
+ export {};
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface AppIconPickerModalProps {
4
+ nodeId: string;
5
+ currentValue?: string;
6
+ onSelect: (url: string) => void;
7
+ onClose: () => void;
8
+ }
9
+ export declare const AppIconPickerModal: React.FC<AppIconPickerModalProps>;
10
+ export {};
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface ChipGroupFieldProps {
4
+ name: string;
5
+ label: string;
6
+ required?: boolean;
7
+ disabled?: boolean;
8
+ placeholder?: string;
9
+ }
10
+ export declare const ChipGroupField: React.FC<ChipGroupFieldProps>;
11
+ export {};
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface DateTimeFieldProps {
4
+ name: string;
5
+ label: string;
6
+ required?: boolean;
7
+ disabled?: boolean;
8
+ }
9
+ export declare const DateTimeField: React.FC<DateTimeFieldProps>;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface DialcodeInputFieldProps {
4
+ name: string;
5
+ label: string;
6
+ required?: boolean;
7
+ disabled?: boolean;
8
+ }
9
+ export declare const DialcodeInputField: React.FC<DialcodeInputFieldProps>;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface KeywordSuggestFieldProps {
4
+ name: string;
5
+ label: string;
6
+ required?: boolean;
7
+ disabled?: boolean;
8
+ }
9
+ export declare const KeywordSuggestField: React.FC<KeywordSuggestFieldProps>;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface LicenseSelectFieldProps {
4
+ name: string;
5
+ label: string;
6
+ required?: boolean;
7
+ disabled?: boolean;
8
+ }
9
+ export declare const LicenseSelectField: React.FC<LicenseSelectFieldProps>;
10
+ export {};
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface Option {
4
+ label: string;
5
+ value: string;
6
+ }
7
+ interface MultiSelectFieldProps {
8
+ name: string;
9
+ label: string;
10
+ options: Option[];
11
+ required?: boolean;
12
+ disabled?: boolean;
13
+ }
14
+ export declare const MultiSelectField: React.FC<MultiSelectFieldProps>;
15
+ export {};
@@ -0,0 +1,20 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface LevelOption {
4
+ label: string;
5
+ value: string;
6
+ }
7
+ interface Level {
8
+ code: string;
9
+ label: string;
10
+ options: LevelOption[];
11
+ }
12
+ interface NestedSelectFieldProps {
13
+ name: string;
14
+ label: string;
15
+ levels: Level[];
16
+ required?: boolean;
17
+ disabled?: boolean;
18
+ }
19
+ export declare const NestedSelectField: React.FC<NestedSelectFieldProps>;
20
+ export {};
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface Option {
4
+ label: string;
5
+ value: string;
6
+ }
7
+ interface RadioFieldProps {
8
+ name: string;
9
+ label: string;
10
+ options: Option[];
11
+ required?: boolean;
12
+ disabled?: boolean;
13
+ }
14
+ export declare const RadioField: React.FC<RadioFieldProps>;
15
+ export {};
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface Option {
4
+ label: string;
5
+ value: string;
6
+ }
7
+ interface SelectFieldProps {
8
+ name: string;
9
+ label: string;
10
+ options: Option[];
11
+ required?: boolean;
12
+ disabled?: boolean;
13
+ }
14
+ export declare const SelectField: React.FC<SelectFieldProps>;
15
+ export {};
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface TextFieldProps {
4
+ name: string;
5
+ label: string;
6
+ required?: boolean;
7
+ disabled?: boolean;
8
+ multiline?: boolean;
9
+ maxLength?: number;
10
+ placeholder?: string;
11
+ }
12
+ export declare const TextField: React.FC<TextFieldProps>;
13
+ export {};
@@ -0,0 +1,11 @@
1
+ export { TextField } from './TextField';
2
+ export { SelectField } from './SelectField';
3
+ export { MultiSelectField } from './MultiSelectField';
4
+ export { ChipGroupField } from './ChipGroupField';
5
+ export { RadioField } from './RadioField';
6
+ export { AppIconField } from './AppIconField';
7
+ export { DateTimeField } from './DateTimeField';
8
+ export { KeywordSuggestField } from './KeywordSuggestField';
9
+ export { NestedSelectField } from './NestedSelectField';
10
+ export { LicenseSelectField } from './LicenseSelectField';
11
+ export { DialcodeInputField } from './DialcodeInputField';
@@ -0,0 +1,3 @@
1
+ export { useFieldPrepare } from './useFieldPrepare';
2
+ export type { PreparedField, IFieldConfig } from './useFieldPrepare';
3
+ export { useCascade } from './useCascade';
@@ -0,0 +1,16 @@
1
+ import { UseFormReturn } from 'react-hook-form';
2
+ import { IFieldConfig } from './useFieldPrepare';
3
+
4
+ export type { IFieldConfig } from './useFieldPrepare';
5
+ /**
6
+ * useCascade
7
+ *
8
+ * Resets a child field's value whenever one of its parent fields (declared via
9
+ * `depends`) changes. The child's *options* are recomputed reactively in
10
+ * useFieldPrepare (filtered by the parent's selected value via term
11
+ * associations), so this hook only has to clear the now-stale child value.
12
+ *
13
+ * @param form react-hook-form UseFormReturn instance.
14
+ * @param fields Prepared field list (carries the `depends` graph).
15
+ */
16
+ export declare function useCascade(form: UseFormReturn<Record<string, unknown>>, fields: IFieldConfig[]): void;
@@ -0,0 +1,42 @@
1
+ import { IFrameworkDetails } from '../../../types/framework';
2
+
3
+ export interface NestedSelectLevel {
4
+ code: string;
5
+ label: string;
6
+ options: Array<{
7
+ label: string;
8
+ value: string;
9
+ }>;
10
+ }
11
+ export interface PreparedField {
12
+ code: string;
13
+ label: string;
14
+ inputType: 'text' | 'textarea' | 'select' | 'multiselect' | 'chips' | 'radio' | 'appIcon' | 'datepicker' | 'datetime' | 'keywords' | 'tagsinput' | 'nestedselect' | 'license' | 'dialcode';
15
+ required?: boolean;
16
+ editable?: boolean;
17
+ placeholder?: string;
18
+ maxLength?: number;
19
+ options?: Array<{
20
+ label: string;
21
+ value: string;
22
+ }>;
23
+ levels?: NestedSelectLevel[];
24
+ depends?: string[];
25
+ tab: 'details' | 'audience' | 'licensing';
26
+ section?: string;
27
+ defaultValue?: unknown;
28
+ currentValue?: unknown;
29
+ }
30
+ export declare const SECTION_DISPLAY: Record<string, {
31
+ title: string;
32
+ description?: string;
33
+ }>;
34
+ export interface IFieldConfig extends PreparedField {
35
+ frameworkId?: string;
36
+ categoryCode?: string;
37
+ range?: Array<{
38
+ name: string;
39
+ identifier: string;
40
+ }>;
41
+ }
42
+ export declare function useFieldPrepare(formConfig: Array<Record<string, unknown>>, nodeMetadata: Record<string, unknown>, frameworkDetails: IFrameworkDetails, isRoot: boolean): PreparedField[];
@@ -0,0 +1 @@
1
+ export { SparkMetaForm } from './SparkMetaForm';
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ import { EditorMode, ToolbarAction } from '../../types/editor';
3
+
4
+ interface SplitBuilderShellProps {
5
+ editorMode: EditorMode;
6
+ onToolbarEvent?: (event: {
7
+ action: ToolbarAction;
8
+ data?: unknown;
9
+ }) => void;
10
+ onContentAdded?: (item: unknown, targetNodeId: string) => void;
11
+ onHierarchySaved?: (hierarchy: unknown) => void;
12
+ }
13
+ export declare const SplitBuilderShell: React.FC<SplitBuilderShellProps>;
14
+ export {};
@@ -0,0 +1 @@
1
+ export { SplitBuilderShell } from './SplitBuilderShell';
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ import { EditorMode, ToolbarAction } from '../../types/editor';
3
+
4
+ interface TopbarProps {
5
+ editorMode: EditorMode;
6
+ isSaving: boolean;
7
+ isDirty: boolean;
8
+ lastSaved: string | null;
9
+ onToolbarEvent: (event: {
10
+ action: ToolbarAction;
11
+ data?: unknown;
12
+ }) => void;
13
+ }
14
+ export declare const Topbar: React.FC<TopbarProps>;
15
+ export {};
@@ -0,0 +1 @@
1
+ export { Topbar } from './Topbar';
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { INode } from '../../types/editor';
3
+
4
+ interface ContentRowProps {
5
+ item: INode;
6
+ onRemove: (id: string) => void;
7
+ isEditable: boolean;
8
+ }
9
+ export declare const ContentRow: React.FC<ContentRowProps>;
10
+ export {};
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { EditorMode } from '../../types/editor';
3
+
4
+ interface UnitContentListProps {
5
+ editorMode: EditorMode;
6
+ }
7
+ export declare const UnitContentList: React.FC<UnitContentListProps>;
8
+ export {};
@@ -0,0 +1 @@
1
+ export { UnitContentList } from './UnitContentList';