herum-types 1.0.8 → 1.0.9

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.
@@ -3,4 +3,5 @@ export type HadrachaPageStyle<T> = {
3
3
  coverImage: T;
4
4
  items: HadrachaViewStyle<T>;
5
5
  hierarchies: HadrachaViewStyle<T>;
6
+ showItemsViewByDefault?: boolean;
6
7
  };
@@ -4,4 +4,5 @@ export type HadrachaPageStylePatch = {
4
4
  coverImage?: FileData | File;
5
5
  items?: HadrachaViewStylePatch;
6
6
  hierarchies?: HadrachaViewStylePatch;
7
+ showItemsViewByDefault?: boolean;
7
8
  };
@@ -1,7 +1,7 @@
1
1
  import { MicroResourceAuthorizationBase, StudentMicroResourceAuthorization } from "../../Lessons/MicroResourceAuthorization";
2
2
  import { ResourceAdditionalFile } from "../ResourceAdditionalFile";
3
3
  import { UserQuestionData } from "../../User/QuizSubscription/UserQuestionData";
4
- import { Question } from "../Quiz/Question.model";
4
+ import { Question } from "../Quiz/Question";
5
5
  export type MicroResourceFrontData = MicroResourceAuthorizationBase & {
6
6
  id?: string;
7
7
  icon?: string;
@@ -0,0 +1,8 @@
1
+ export declare class Answer {
2
+ index?: number;
3
+ content?: string;
4
+ isCorrect?: boolean;
5
+ note?: string;
6
+ id: string;
7
+ isCollapsed?: boolean;
8
+ }
@@ -0,0 +1,8 @@
1
+ export class Answer {
2
+ index;
3
+ content;
4
+ isCorrect;
5
+ note;
6
+ id;
7
+ isCollapsed;
8
+ }
@@ -1,4 +1,4 @@
1
- import { Answer } from "./Answer.model";
1
+ import { Answer } from "./Answer";
2
2
  export type ClosedQuestionContent = {
3
3
  answers?: Answer[];
4
4
  numberOfCorrectAnswers?: number;
@@ -0,0 +1,5 @@
1
+ import { MatchingQuestionItem } from "./MatchingQuestionItem";
2
+ export type MatchingQuestionContent = {
3
+ sources?: MatchingQuestionItem[];
4
+ targets?: MatchingQuestionItem[];
5
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,18 @@
1
+ import { FileData } from "../../Shared/FileData";
2
+ import { ClosedQuestionContent } from "./ClosedQuestionContent";
3
+ import { FreeAnswerQuestionContent } from "./FreeAnswerQuestionContent";
4
+ import { MatchingQuestionContent } from "./MatchingQuestionContent";
5
+ export declare class Question {
6
+ id: string;
7
+ text?: string;
8
+ index?: number;
9
+ closedContent?: ClosedQuestionContent;
10
+ freeAnswerContent?: FreeAnswerQuestionContent;
11
+ matchingContent?: MatchingQuestionContent;
12
+ questionType?: string;
13
+ answerNote?: string;
14
+ weight?: number;
15
+ fileData?: Partial<FileData>;
16
+ isSkipped?: boolean;
17
+ isValid?: boolean;
18
+ }
@@ -0,0 +1,14 @@
1
+ export class Question {
2
+ id;
3
+ text;
4
+ index;
5
+ closedContent;
6
+ freeAnswerContent;
7
+ matchingContent;
8
+ questionType;
9
+ answerNote;
10
+ weight;
11
+ fileData;
12
+ isSkipped;
13
+ isValid;
14
+ }
@@ -0,0 +1,9 @@
1
+ import { Question } from "./Question";
2
+ export declare class Quiz {
3
+ numberOfRequiredQuestions?: number;
4
+ displayName: string;
5
+ questions: Question[];
6
+ hasSubmitted: boolean;
7
+ areQuestionsOrdered: boolean;
8
+ displayCorrectAnswersAfterSubmission?: boolean;
9
+ }
@@ -0,0 +1,8 @@
1
+ export class Quiz {
2
+ numberOfRequiredQuestions;
3
+ displayName;
4
+ questions;
5
+ hasSubmitted;
6
+ areQuestionsOrdered;
7
+ displayCorrectAnswersAfterSubmission;
8
+ }
@@ -1,5 +1,5 @@
1
1
  import { UserQuestionData } from "../../User/QuizSubscription/UserQuestionData";
2
- import { Question } from "./Question.model";
2
+ import { Question } from "./Question";
3
3
  export type QuizData = {
4
4
  minGrade: number;
5
5
  resourceName: string;
@@ -1,15 +1,16 @@
1
1
  /**
2
2
  * @file Automatically generated by barrelsby.
3
3
  */
4
- export * from "./Answer.model";
4
+ export * from "./Answer";
5
5
  export * from "./AnswerData";
6
6
  export * from "./ClosedQuestionContent";
7
7
  export * from "./FreeAnswerQuestionContent";
8
8
  export * from "./MatchingQuestionAnswer";
9
+ export * from "./MatchingQuestionContent";
9
10
  export * from "./MatchingQuestionItem";
10
- export * from "./Question.model";
11
+ export * from "./Question";
11
12
  export * from "./QuestionIdToAnswerData";
12
- export * from "./Quiz.model";
13
+ export * from "./Quiz";
13
14
  export * from "./QuizData";
14
15
  export * from "./QuizGradeData";
15
16
  export * from "./QuizUserAnswer";
@@ -1,15 +1,16 @@
1
1
  /**
2
2
  * @file Automatically generated by barrelsby.
3
3
  */
4
- export * from "./Answer.model";
4
+ export * from "./Answer";
5
5
  export * from "./AnswerData";
6
6
  export * from "./ClosedQuestionContent";
7
7
  export * from "./FreeAnswerQuestionContent";
8
8
  export * from "./MatchingQuestionAnswer";
9
+ export * from "./MatchingQuestionContent";
9
10
  export * from "./MatchingQuestionItem";
10
- export * from "./Question.model";
11
+ export * from "./Question";
11
12
  export * from "./QuestionIdToAnswerData";
12
- export * from "./Quiz.model";
13
+ export * from "./Quiz";
13
14
  export * from "./QuizData";
14
15
  export * from "./QuizGradeData";
15
16
  export * from "./QuizUserAnswer";
@@ -1,5 +1,4 @@
1
1
  import { Question } from "./Quiz";
2
- import { MatchingQuestionItem } from "./Quiz/MatchingQuestionItem";
3
2
  export type ServerQuizData = {
4
3
  numberOfRequiredQuestions?: number;
5
4
  questions?: Question[];
@@ -8,7 +7,3 @@ export type ServerQuizData = {
8
7
  displayCorrectAnswersAfterSubmission?: boolean;
9
8
  isAutoGraded?: boolean;
10
9
  };
11
- export type MatchingQuestionContent = {
12
- sources?: MatchingQuestionItem[];
13
- targets?: MatchingQuestionItem[];
14
- };
@@ -3,6 +3,8 @@ export type MenuItem = {
3
3
  id?: string;
4
4
  label: string;
5
5
  iconName: string;
6
+ displayOnlyInEditMode?: boolean;
7
+ isValid?: boolean;
6
8
  accessValidator?: (user?: User) => {
7
9
  error: string;
8
10
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "herum-types",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "files": [
@@ -20,7 +20,8 @@
20
20
  "npm": "^10.8.3"
21
21
  },
22
22
  "scripts": {
23
- "build": "npm run barrels && npm version patch && tsc -p tsconfig.build.json",
23
+ "version-patch": "npm version patch",
24
+ "build": "npm run barrels && tsc -p tsconfig.build.json",
24
25
  "barrels": "barrelsby --config ./barrelsby.json"
25
26
  },
26
27
  "peerDependencies": {