@project-sunbird/sunbird-questionset-editor-web-component-react 0.1.13 → 0.1.15
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-styles.css +20 -20
- package/dist/assets/sunbird-quml-player.js +3 -43
- package/dist/components/LibraryDock/LibraryDock.d.ts +0 -1
- package/dist/components/SparkMetaForm/SparkMetaForm.d.ts +26 -0
- package/dist/components/Topbar/Topbar.d.ts +5 -0
- package/dist/hooks/useLibrary.d.ts +7 -0
- package/dist/index.js +7047 -5724
- package/dist/locales/label.config.ar.json.d.ts +37 -4
- package/dist/locales/label.config.fr.json.d.ts +37 -4
- package/dist/locales/label.config.json.d.ts +37 -4
- package/dist/locales/label.config.pt.json.d.ts +37 -4
- 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/editor.d.ts +3 -0
- package/dist/utils/labels.d.ts +2 -1
- package/dist/utils/notify.d.ts +9 -1
- package/dist/utils/notify.test.d.ts +1 -0
- package/dist/utils/telemetry.d.ts +18 -2
- package/package.json +2 -2
|
@@ -33,7 +33,33 @@ export interface SparkMetaFormProps {
|
|
|
33
33
|
* — `identifier` is used as the option value, `name` as the visible label.
|
|
34
34
|
*/
|
|
35
35
|
frameworkTerms?: Map<string, FrameworkTerm[]>;
|
|
36
|
+
/**
|
|
37
|
+
* True for the root (questionset-level) form only. The "framework" field
|
|
38
|
+
* (code: 'framework') is special-cased to live-update which framework's
|
|
39
|
+
* terms populate every other category dropdown on this same form — see
|
|
40
|
+
* editor.store.ts's contentFramework — but that only makes sense at the
|
|
41
|
+
* root, so section/question forms never have this set.
|
|
42
|
+
*/
|
|
43
|
+
isRoot?: boolean;
|
|
36
44
|
}
|
|
45
|
+
/** Exported so callers (e.g. ContextualEditor's tab bar) can check whether a
|
|
46
|
+
* given tab's section has any required field, using the exact same
|
|
47
|
+
* matching rule the tab's own <SparkMetaForm section="..."/> render uses. */
|
|
48
|
+
export declare function fieldMatchesSection(field: ICategoryField, section?: string): boolean;
|
|
37
49
|
export declare function findMissingRequiredFields(fields: ICategoryField[], values: Record<string, unknown>): ICategoryField[];
|
|
50
|
+
export interface SelectOption {
|
|
51
|
+
value: string;
|
|
52
|
+
label: string;
|
|
53
|
+
}
|
|
54
|
+
export interface SingleSelectDropdownProps {
|
|
55
|
+
fieldId: string;
|
|
56
|
+
value: string;
|
|
57
|
+
options: SelectOption[];
|
|
58
|
+
onChange: (v: string) => void;
|
|
59
|
+
disabled?: boolean;
|
|
60
|
+
placeholder?: string;
|
|
61
|
+
hasError?: boolean;
|
|
62
|
+
}
|
|
63
|
+
export declare const SingleSelectDropdown: React.FC<SingleSelectDropdownProps>;
|
|
38
64
|
declare const SparkMetaForm: React.FC<SparkMetaFormProps>;
|
|
39
65
|
export default SparkMetaForm;
|
|
@@ -11,6 +11,11 @@ interface TopbarProps {
|
|
|
11
11
|
onToolbarEvent: (event: {
|
|
12
12
|
action: ToolbarAction;
|
|
13
13
|
data?: unknown;
|
|
14
|
+
telemetry?: {
|
|
15
|
+
id: string;
|
|
16
|
+
subtype?: string;
|
|
17
|
+
extra?: Record<string, unknown>;
|
|
18
|
+
};
|
|
14
19
|
}) => void;
|
|
15
20
|
}
|
|
16
21
|
export declare const Topbar: React.FC<TopbarProps>;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { LibraryFilters } from '../store/library.store';
|
|
2
|
+
/**
|
|
3
|
+
* Re-run the library search with whatever query/filter is currently active —
|
|
4
|
+
* e.g. after a new standalone question is created, so it shows up without
|
|
5
|
+
* the user having to re-search manually. Callable from outside a component
|
|
6
|
+
* (not a hook), unlike `useLibrary()`'s `refetch`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function refreshLibrary(): void;
|
|
2
9
|
export declare function useLibrary(): {
|
|
3
10
|
content: import('../types/content').IContent[];
|
|
4
11
|
isLoading: boolean;
|