@formsort/custom-question-api
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -5,3 +5,3 @@ declare type AnswerPrimitiveType = number | string | boolean; | ||
export declare const getAnswerValue: () => Promise<AnswerType>; | ||
export declare const getAnswers: () => Promise<{ | ||
export declare const getAllAnswerValues: () => Promise<{ | ||
[key: string]: AnswerType; | ||
@@ -8,0 +8,0 @@ }>; |
@@ -14,3 +14,3 @@ "use strict"; | ||
}; | ||
exports.getAnswers = function () { | ||
exports.getAllAnswerValues = function () { | ||
return utils_1.getValueFromWindowParent(constants_1.CustomQuestionMessage.REQUEST_ANSWERS_MSG, constants_1.CustomQuestionMessage.SET_ANSWERS_MSG); | ||
@@ -17,0 +17,0 @@ }; |
{ | ||
"name": "@formsort/custom-question-api", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "Helpers for implementing custom questions in Formsort", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -19,3 +19,3 @@ # @formsort/custom-question-api | ||
``` | ||
```shell | ||
npm install --save @formsort/custom-question-api | ||
@@ -26,6 +26,6 @@ ``` | ||
``` | ||
```javascript | ||
import { | ||
getAnswerValue, | ||
getAnswers, | ||
getAllAnswerValues, | ||
getResponderUuid, | ||
@@ -46,3 +46,3 @@ setAnswerValue, | ||
### `getAnswers() => Promise<{ [key: string]: any}>` | ||
### `getAllAnswerValues() => Promise<{ [key: string]: any}>` | ||
@@ -71,3 +71,3 @@ Returns a promise for an object containing _all_ of the answers provided by the receipient thus far in filling out their flow. The keys are the variable names as defined within Formsort. | ||
``` | ||
```tsx | ||
import * as React from 'react'; | ||
@@ -74,0 +74,0 @@ import { |
10851