@quesmed/types-rn 2.4.16 → 2.4.17

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
3
- "version": "2.4.16",
3
+ "version": "2.4.17",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -1,17 +1,12 @@
1
- import { graphqlNormalize, RestrictedData } from "../../types";
2
- export declare type IQuesBookDict = Record<string, {
3
- conceptId: number;
1
+ import { graphqlNormalize, RestrictedData } from '../../types';
2
+ export interface IQuesBookDict {
4
3
  topicId: number;
4
+ conceptId: number;
5
5
  chapterId: number;
6
6
  explanation: string;
7
- }>;
7
+ }
8
8
  export interface IConceptExplanationVar {
9
- input: {
10
- conceptName: string;
11
- conceptId: number;
12
- topicId: number;
13
- chapterId: number;
14
- };
9
+ chapterId: number;
15
10
  }
16
- export declare type IConceptExplanationData = RestrictedData<graphqlNormalize & string, "conceptExplanation">;
11
+ export declare type IConceptExplanationData = RestrictedData<graphqlNormalize & string, 'conceptExplanation'>;
17
12
  export declare const CONCEPT_EXPLANATION: import("@apollo/client").DocumentNode;
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CONCEPT_EXPLANATION = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  exports.CONCEPT_EXPLANATION = (0, client_1.gql) `
6
- query conceptExplanation($input: ConceptExplanationInput!) {
6
+ query conceptExplanation($chapterId: Int!) {
7
7
  restricted {
8
- conceptExplanation(input: $input)
8
+ conceptExplanation(chapterId: $chapterId)
9
9
  }
10
10
  }
11
11
  `;
@@ -32,6 +32,9 @@ const Small = {
32
32
  ninety: 90,
33
33
  };
34
34
  function wordsToNumber(s, checkForDigits = false) {
35
+ if (!s) {
36
+ return 0;
37
+ }
35
38
  const words = s.toString().split(/[\s-]+/);
36
39
  let total = 0;
37
40
  words.forEach((word) => {