@enspiredigital/xlms-headless 0.0.9 → 0.0.11

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 (42) hide show
  1. package/dist/components/DragDrop.d.ts +4 -0
  2. package/dist/components/DragDrop.d.ts.map +1 -0
  3. package/dist/components/Grouping.d.ts +4 -0
  4. package/dist/components/Grouping.d.ts.map +1 -0
  5. package/dist/components/Labeling.d.ts +4 -0
  6. package/dist/components/Labeling.d.ts.map +1 -0
  7. package/dist/components/Ordering.d.ts +4 -0
  8. package/dist/components/Ordering.d.ts.map +1 -0
  9. package/dist/components/Powerpoint.d.ts +4 -0
  10. package/dist/components/Powerpoint.d.ts.map +1 -0
  11. package/dist/components/index.d.ts +5 -0
  12. package/dist/components/index.d.ts.map +1 -1
  13. package/dist/hooks/index.d.ts +5 -0
  14. package/dist/hooks/index.d.ts.map +1 -1
  15. package/dist/hooks/useDragDrop.d.ts +25 -0
  16. package/dist/hooks/useDragDrop.d.ts.map +1 -0
  17. package/dist/hooks/useFillInBlank.d.ts +4 -4
  18. package/dist/hooks/useFillInBlank.d.ts.map +1 -1
  19. package/dist/hooks/useGrouping.d.ts +29 -0
  20. package/dist/hooks/useGrouping.d.ts.map +1 -0
  21. package/dist/hooks/useLabeling.d.ts +27 -0
  22. package/dist/hooks/useLabeling.d.ts.map +1 -0
  23. package/dist/hooks/useOrdering.d.ts +24 -0
  24. package/dist/hooks/useOrdering.d.ts.map +1 -0
  25. package/dist/hooks/usePowerpoint.d.ts +13 -0
  26. package/dist/hooks/usePowerpoint.d.ts.map +1 -0
  27. package/dist/index.js +577 -178
  28. package/dist/types/common.d.ts +1 -1
  29. package/dist/types/common.d.ts.map +1 -1
  30. package/dist/types/dragDrop.d.ts +27 -0
  31. package/dist/types/dragDrop.d.ts.map +1 -0
  32. package/dist/types/fillInBlank.d.ts +20 -9
  33. package/dist/types/fillInBlank.d.ts.map +1 -1
  34. package/dist/types/grouping.d.ts +24 -0
  35. package/dist/types/grouping.d.ts.map +1 -0
  36. package/dist/types/index.d.ts +4 -0
  37. package/dist/types/index.d.ts.map +1 -1
  38. package/dist/types/labeling.d.ts +30 -0
  39. package/dist/types/labeling.d.ts.map +1 -0
  40. package/dist/types/ordering.d.ts +16 -0
  41. package/dist/types/ordering.d.ts.map +1 -0
  42. package/package.json +23 -23
@@ -0,0 +1,4 @@
1
+ import { DragDropQuestionType, PropsComponent } from '../types';
2
+ import { useDragDrop } from '../hooks';
3
+ export declare function DragDropQuestion({ getData, children, }: PropsComponent<DragDropQuestionType, ReturnType<typeof useDragDrop>>): import('react').ReactNode;
4
+ //# sourceMappingURL=DragDrop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DragDrop.d.ts","sourceRoot":"","sources":["../../src/components/DragDrop.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,QAAQ,GACT,EAAE,cAAc,CACf,oBAAoB,EACpB,UAAU,CAAC,OAAO,WAAW,CAAC,CAC/B,6BAGA"}
@@ -0,0 +1,4 @@
1
+ import { GroupingQuestionType, PropsComponent } from '../types';
2
+ import { useGrouping } from '../hooks';
3
+ export declare function GroupingQuestion({ getData, children, }: PropsComponent<GroupingQuestionType, ReturnType<typeof useGrouping>>): import('react').ReactNode;
4
+ //# sourceMappingURL=Grouping.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Grouping.d.ts","sourceRoot":"","sources":["../../src/components/Grouping.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,QAAQ,GACT,EAAE,cAAc,CAAC,oBAAoB,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,6BAGtE"}
@@ -0,0 +1,4 @@
1
+ import { LabelingQuestionType, PropsComponent } from '../types';
2
+ import { useLabeling } from '../hooks';
3
+ export declare function LabelingQuestion({ getData, children, }: PropsComponent<LabelingQuestionType, ReturnType<typeof useLabeling>>): import('react').ReactNode;
4
+ //# sourceMappingURL=Labeling.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Labeling.d.ts","sourceRoot":"","sources":["../../src/components/Labeling.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,QAAQ,GACT,EAAE,cAAc,CACf,oBAAoB,EACpB,UAAU,CAAC,OAAO,WAAW,CAAC,CAC/B,6BAGA"}
@@ -0,0 +1,4 @@
1
+ import { OrderingQuestionType, PropsComponent } from '../types';
2
+ import { useOrdering } from '../hooks';
3
+ export declare function OrderingQuestion({ getData, children, }: PropsComponent<OrderingQuestionType, ReturnType<typeof useOrdering>>): import('react').ReactNode;
4
+ //# sourceMappingURL=Ordering.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Ordering.d.ts","sourceRoot":"","sources":["../../src/components/Ordering.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,QAAQ,GACT,EAAE,cAAc,CACf,oBAAoB,EACpB,UAAU,CAAC,OAAO,WAAW,CAAC,CAC/B,6BAGA"}
@@ -0,0 +1,4 @@
1
+ import { PropsComponent, UrlQuestionType } from '../types';
2
+ import { usePowerpoint } from '../hooks';
3
+ export declare function PowerpointQuestion({ getData, children, }: PropsComponent<UrlQuestionType, ReturnType<typeof usePowerpoint>>): import('react').ReactNode;
4
+ //# sourceMappingURL=Powerpoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Powerpoint.d.ts","sourceRoot":"","sources":["../../src/components/Powerpoint.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,QAAQ,GACT,EAAE,cAAc,CAAC,eAAe,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,6BAGnE"}
@@ -1,5 +1,10 @@
1
1
  export * from './MultipleChoices';
2
2
  export * from './Matching';
3
3
  export * from './Video';
4
+ export * from './DragDrop';
5
+ export * from './Ordering';
6
+ export * from './Labeling';
4
7
  export * from './FillInBlank';
8
+ export * from './Grouping';
9
+ export * from './Powerpoint';
5
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
@@ -2,5 +2,10 @@ export * from './useMultipleChoices';
2
2
  export * from './useBaseQuestion';
3
3
  export * from './useMatching';
4
4
  export * from './useVideo';
5
+ export * from './useDragDrop';
6
+ export * from './useOrdering';
7
+ export * from './useLabeling';
5
8
  export * from './useFillInBlank';
9
+ export * from './useGrouping';
10
+ export * from './usePowerpoint';
6
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { DragDropQuestionType, DragDropAnswer, DragDropItem } from '../types';
2
+ export declare function useDragDrop(question: DragDropQuestionType): {
3
+ items: DragDropItem[];
4
+ dropZones: import('..').DragDropZone[];
5
+ answers: DragDropAnswer[];
6
+ availableItems: DragDropItem[];
7
+ question: DragDropQuestionType;
8
+ draggingItemId: string | null;
9
+ submitted: boolean | null;
10
+ isCorrect: boolean | null;
11
+ attempts: number;
12
+ canAnswer: boolean;
13
+ dropItem: (itemId: string, zoneId: string) => void;
14
+ removeItem: (itemId: string) => void;
15
+ moveItem: (itemId: string, newZoneId: string) => void;
16
+ getItemsInZone: (zoneId: string) => DragDropItem[];
17
+ setDraggingItemId: import('react').Dispatch<import('react').SetStateAction<string | null>>;
18
+ submit: () => {
19
+ isCorrect: boolean;
20
+ score: number;
21
+ maxScore: number;
22
+ };
23
+ reset: () => void;
24
+ };
25
+ //# sourceMappingURL=useDragDrop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDragDrop.d.ts","sourceRoot":"","sources":["../../src/hooks/useDragDrop.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,YAAY,EACb,MAAM,UAAU,CAAC;AAElB,wBAAgB,WAAW,CAAC,QAAQ,EAAE,oBAAoB;;;;;;;;;;;uBAwB9B,MAAM,UAAU,MAAM;yBAwBpB,MAAM;uBAKR,MAAM,aAAa,MAAM;6BAKnB,MAAM,KAAG,YAAY,EAAE;;;;;;;;EAsFxD"}
@@ -1,13 +1,13 @@
1
- import { FillInBlankAnswer, FillInBlankQuestionType } from '../types/fillInBlank';
1
+ import { FillInBlankUserAnswer, FillInBlankQuestionType } from '../types/fillInBlank';
2
2
  export declare function useFillInBlank(question: FillInBlankQuestionType): {
3
- targets: import('..').FillInBlankTarget[];
4
- answers: FillInBlankAnswer[];
3
+ groups: import('..').FillInBlankGroup[];
4
+ answers: FillInBlankUserAnswer[];
5
5
  question: FillInBlankQuestionType;
6
6
  submitted: boolean | null;
7
7
  isCorrect: boolean | null;
8
8
  attempts: number;
9
9
  canAnswer: boolean;
10
- answer: (targetId: string, value: string) => void;
10
+ answer: (blankId: string, value: string) => void;
11
11
  submit: () => {
12
12
  isCorrect: boolean;
13
13
  score: number;
@@ -1 +1 @@
1
- {"version":3,"file":"useFillInBlank.d.ts","sourceRoot":"","sources":["../../src/hooks/useFillInBlank.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAElF,wBAAgB,cAAc,CAAC,QAAQ,EAAE,uBAAuB;;;;;;;;uBAYpC,MAAM,SAAS,MAAM;;;;;;;EAoEhD"}
1
+ {"version":3,"file":"useFillInBlank.d.ts","sourceRoot":"","sources":["../../src/hooks/useFillInBlank.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEtF,wBAAgB,cAAc,CAAC,QAAQ,EAAE,uBAAuB;;;;;;;;sBAYrC,MAAM,SAAS,MAAM;;;;;;;EA8E/C"}
@@ -0,0 +1,29 @@
1
+ import { GroupingAnswer, GroupingQuestionType } from '../types/grouping';
2
+ export declare function useGrouping(question: GroupingQuestionType): {
3
+ categories: import('..').GroupingCategory[];
4
+ allItems: import('..').GroupingItem[];
5
+ question: GroupingQuestionType;
6
+ categoriesWithItems: {
7
+ items: {
8
+ item: import('..').GroupingItem | undefined;
9
+ }[];
10
+ id: string;
11
+ name: string;
12
+ media?: import('..').Media;
13
+ }[];
14
+ answers: GroupingAnswer[];
15
+ unassignedItems: import('..').GroupingItem[];
16
+ submitted: boolean | null;
17
+ isCorrect: boolean | null;
18
+ attempts: number;
19
+ canAnswer: boolean;
20
+ move: (itemId: string, categoryId: string) => void;
21
+ remove: (itemId: string) => void;
22
+ submit: () => {
23
+ isCorrect: boolean;
24
+ score: number;
25
+ maxScore: number;
26
+ };
27
+ reset: () => void;
28
+ };
29
+ //# sourceMappingURL=useGrouping.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGrouping.d.ts","sourceRoot":"","sources":["../../src/hooks/useGrouping.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,wBAAgB,WAAW,CAAC,QAAQ,EAAE,oBAAoB;;;;;;;;;;;;;;;;;;mBAYlC,MAAM,cAAc,MAAM;qBAYxB,MAAM;;;;;;;EAqG/B"}
@@ -0,0 +1,27 @@
1
+ import { LabelingQuestionType, LabelingAnswer, LabelingLabel } from '../types';
2
+ export declare function useLabeling(question: LabelingQuestionType): {
3
+ image: import('..').Media;
4
+ labels: LabelingLabel[];
5
+ points: import('..').LabelingPoint[];
6
+ answers: LabelingAnswer[];
7
+ availableLabels: LabelingLabel[];
8
+ question: LabelingQuestionType;
9
+ draggingLabelId: string | null;
10
+ submitted: boolean | null;
11
+ isCorrect: boolean | null;
12
+ attempts: number;
13
+ canAnswer: boolean;
14
+ attachLabel: (labelId: string, pointId: string, x?: number, y?: number) => void;
15
+ removeLabel: (labelId: string) => void;
16
+ moveLabel: (labelId: string, newPointId: string, x?: number, y?: number) => void;
17
+ getLabelAtPoint: (pointId: string) => LabelingLabel | null;
18
+ getPointForLabel: (labelId: string) => string | null;
19
+ setDraggingLabelId: import('react').Dispatch<import('react').SetStateAction<string | null>>;
20
+ submit: () => {
21
+ isCorrect: boolean;
22
+ score: number;
23
+ maxScore: number;
24
+ };
25
+ reset: () => void;
26
+ };
27
+ //# sourceMappingURL=useLabeling.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLabeling.d.ts","sourceRoot":"","sources":["../../src/hooks/useLabeling.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,aAAa,EACd,MAAM,UAAU,CAAC;AAElB,wBAAgB,WAAW,CAAC,QAAQ,EAAE,oBAAoB;;;;;;;;;;;;2BA0B1B,MAAM,WAAW,MAAM,MAAM,MAAM,MAAM,MAAM;2BAqB/C,MAAM;yBAKR,MAAM,cAAc,MAAM,MAAM,MAAM,MAAM,MAAM;+BAK5C,MAAM,KAAG,aAAa,GAAG,IAAI;gCAW5B,MAAM,KAAG,MAAM,GAAG,IAAI;;;;;;;;EAyE1D"}
@@ -0,0 +1,24 @@
1
+ import { OrderingQuestionType, OrderingItem } from '../types';
2
+ export declare function useOrdering(question: OrderingQuestionType): {
3
+ items: OrderingItem[];
4
+ orderedItems: OrderingItem[];
5
+ orderedItemIds: string[];
6
+ question: OrderingQuestionType;
7
+ draggingItemId: string | null;
8
+ submitted: boolean | null;
9
+ isCorrect: boolean | null;
10
+ attempts: number;
11
+ canAnswer: boolean;
12
+ moveItem: (fromIndex: number, toIndex: number) => void;
13
+ moveUp: (itemId: string) => void;
14
+ moveDown: (itemId: string) => void;
15
+ moveToPosition: (itemId: string, newPosition: number) => void;
16
+ setDraggingItemId: import('react').Dispatch<import('react').SetStateAction<string | null>>;
17
+ submit: () => {
18
+ isCorrect: boolean;
19
+ score: number;
20
+ maxScore: number;
21
+ };
22
+ reset: () => void;
23
+ };
24
+ //# sourceMappingURL=useOrdering.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOrdering.d.ts","sourceRoot":"","sources":["../../src/hooks/useOrdering.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE9D,wBAAgB,WAAW,CAAC,QAAQ,EAAE,oBAAoB;;;;;;;;;;0BA0B3B,MAAM,WAAW,MAAM;qBAU5B,MAAM;uBAQJ,MAAM;6BAQA,MAAM,eAAe,MAAM;;;;;;;;EAuE5D"}
@@ -0,0 +1,13 @@
1
+ import { UrlQuestionType } from '../types';
2
+ export declare function usePowerpoint(question: UrlQuestionType): {
3
+ question: UrlQuestionType;
4
+ url: string;
5
+ type: string;
6
+ submit: () => void;
7
+ reset: () => void;
8
+ submitted: boolean | null;
9
+ isCorrect: boolean | null;
10
+ attempts: number;
11
+ canAnswer: boolean;
12
+ };
13
+ //# sourceMappingURL=usePowerpoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePowerpoint.d.ts","sourceRoot":"","sources":["../../src/hooks/usePowerpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG3C,wBAAgB,aAAa,CAAC,QAAQ,EAAE,eAAe;;;;;;;;;;EAmCtD"}