@quesmed/types-rn 2.6.75 → 2.6.76
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
|
@@ -19,3 +19,4 @@ export declare const handleSampleChapterHighlights: (client: ApolloClient<any>,
|
|
|
19
19
|
export declare const handleSampleQuestionHighlights: (client: ApolloClient<any>, highlights: IHighlightNode[], questionId: number, questionTypeId: EQuestionType) => void;
|
|
20
20
|
export declare const startSampleStationTimer: (client: ApolloClient<any>, osceMarkhseetId?: number) => void;
|
|
21
21
|
export declare const strikeSampleChoice: (client: ApolloClient<any>, id: number, striked: number[]) => void;
|
|
22
|
+
export declare const toggleSampleFlaggedState: (client: ApolloClient<any>, markId: number, flagged: boolean) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.strikeSampleChoice = exports.startSampleStationTimer = exports.handleSampleQuestionHighlights = exports.handleSampleChapterHighlights = exports.endSampleStation = exports.endSampleMarksheet = exports.checkSampleOsceMark = exports.MARK_OSCE_MARK_FRAGMENT = exports.changeSampleQuestion = exports.saveSampleTodoMark = exports.saveSampleMarksheets = void 0;
|
|
3
|
+
exports.toggleSampleFlaggedState = exports.strikeSampleChoice = exports.startSampleStationTimer = exports.handleSampleQuestionHighlights = exports.handleSampleChapterHighlights = exports.endSampleStation = exports.endSampleMarksheet = exports.checkSampleOsceMark = exports.MARK_OSCE_MARK_FRAGMENT = exports.changeSampleQuestion = exports.saveSampleTodoMark = exports.saveSampleMarksheets = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
const fragments_1 = require("../fragments");
|
|
6
6
|
const marksheet_1 = require("../fragments/marksheet");
|
|
@@ -246,3 +246,16 @@ const strikeSampleChoice = (client, id, striked) => {
|
|
|
246
246
|
});
|
|
247
247
|
};
|
|
248
248
|
exports.strikeSampleChoice = strikeSampleChoice;
|
|
249
|
+
const toggleSampleFlaggedState = (client, markId, flagged) => {
|
|
250
|
+
client.cache.writeFragment({
|
|
251
|
+
id: client.cache.identify({
|
|
252
|
+
id: Number(markId),
|
|
253
|
+
__typename: 'MarksheetMark',
|
|
254
|
+
}),
|
|
255
|
+
data: {
|
|
256
|
+
flagged: !flagged,
|
|
257
|
+
},
|
|
258
|
+
fragment: marksheet_1.MARK_FLAGGED_FIELD,
|
|
259
|
+
});
|
|
260
|
+
};
|
|
261
|
+
exports.toggleSampleFlaggedState = toggleSampleFlaggedState;
|