@quesmed/types-rn 2.1.10 → 2.1.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.
package/package.json
CHANGED
|
@@ -32,7 +32,7 @@ export interface IMarksheetInput {
|
|
|
32
32
|
}
|
|
33
33
|
export declare const SAVE_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
34
34
|
export declare const updateMarksheets: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<ISaveMarksheetsData>, options: ApolloUpdateOptions) => void;
|
|
35
|
-
export declare const
|
|
35
|
+
export declare const optimisticSaveMarksheets: (client: ApolloClient<any>, marksheetInput: IMarksheetInput, questionIndex: number) => ISaveMarksheetsData;
|
|
36
36
|
export interface ISaveMarksheetsVar {
|
|
37
37
|
marksheetInput: IMarksheetInput[];
|
|
38
38
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.REMOVE_FLAGGED_QUESTION = exports.ADD_FLAGGED_QUESTION = exports.
|
|
3
|
+
exports.REMOVE_FLAGGED_QUESTION = exports.ADD_FLAGGED_QUESTION = exports.optimisticSaveMarksheets = exports.updateMarksheets = exports.SAVE_MARKSHEET = exports.RE_BUILD_MARKSHEET = exports.BUILD_MARKSHEET = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
const marksheet_1 = require("../../fragments/marksheet");
|
|
6
6
|
const restricted_1 = require("../../query/restricted");
|
|
@@ -99,7 +99,7 @@ const updateMarksheets = (cache, result, options) => {
|
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
exports.updateMarksheets = updateMarksheets;
|
|
102
|
-
const
|
|
102
|
+
const optimisticSaveMarksheets = (client, marksheetInput, questionIndex) => {
|
|
103
103
|
const { timeTaken, choiceId, mark, marksheetId } = marksheetInput;
|
|
104
104
|
const data = client.readQuery({
|
|
105
105
|
variables: { id: marksheetId },
|
|
@@ -112,7 +112,7 @@ const optimisticSaveMarkseehts = (client, marksheetInput, questionIndex) => {
|
|
|
112
112
|
...marks[questionIndex],
|
|
113
113
|
marksheetId,
|
|
114
114
|
timeTaken,
|
|
115
|
-
questionChoiceId: choiceId
|
|
115
|
+
questionChoiceId: choiceId ?? null,
|
|
116
116
|
mark: mark || null,
|
|
117
117
|
};
|
|
118
118
|
const udatedMarks = [
|
|
@@ -132,7 +132,7 @@ const optimisticSaveMarkseehts = (client, marksheetInput, questionIndex) => {
|
|
|
132
132
|
},
|
|
133
133
|
};
|
|
134
134
|
};
|
|
135
|
-
exports.
|
|
135
|
+
exports.optimisticSaveMarksheets = optimisticSaveMarksheets;
|
|
136
136
|
exports.ADD_FLAGGED_QUESTION = (0, client_1.gql) `
|
|
137
137
|
mutation AddFlaggedQuestion($markId: Int!, $questionId: Int!) {
|
|
138
138
|
restricted {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ApolloClient } from '@apollo/client';
|
|
2
2
|
import { IMarksheetInput } from './restricted';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const saveSampleMarksheets: (client: ApolloClient<any>, marksheetInput: IMarksheetInput, questionIndex: number) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.saveSampleMarksheets = void 0;
|
|
4
4
|
const query_1 = require("../query");
|
|
5
|
-
const
|
|
5
|
+
const saveSampleMarksheets = (client, marksheetInput, questionIndex) => {
|
|
6
6
|
const { timeTaken, choiceId, mark, marksheetId } = marksheetInput;
|
|
7
7
|
const prevData = client.readQuery({
|
|
8
8
|
variables: { marksheetId },
|
|
@@ -33,4 +33,4 @@ const saveSampleMarkseehts = (client, marksheetInput, questionIndex) => {
|
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
exports.
|
|
36
|
+
exports.saveSampleMarksheets = saveSampleMarksheets;
|