@constructor-io/constructorio-ui-quizzes 1.7.1 → 1.7.3

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RequestStates = exports.changePrimaryColorDescription = exports.smallContainerDescription = exports.cioJsClientDescription = exports.basicDescription = exports.hookDescription = exports.componentDescription = exports.quizSessionStateKey = exports.quizId = exports.apiKey = void 0;
3
+ exports.RequestStates = exports.callbacksDescription = exports.changePrimaryColorDescription = exports.smallContainerDescription = exports.cioJsClientDescription = exports.basicDescription = exports.hookDescription = exports.componentDescription = exports.quizSessionStateKey = exports.quizId = exports.apiKey = void 0;
4
4
  // Autocomplete key index
5
5
  exports.apiKey = 'key_wJSdZSiesX5hiVLt';
6
6
  exports.quizId = 'coffee-quiz';
@@ -23,6 +23,8 @@ exports.componentDescription = `- import \`CioQuiz\` to render in your JSX.
23
23
  - \`resultCardRatingScoreKey\` is an optional parameter that specifies the metadata field name for the ratings score
24
24
  - \`renderResultCardPriceDetails\` is an optional render function to render custom prices section in result card
25
25
  - \`numResultsToDisplay\` is an optional parameter that determines how many results should be displayed on results page
26
+ - \`callbacks\` lets you pass callback functions that will be called on certain actions
27
+ - \`onQuizNextQuestion\` is an optional callback function that will be called when user moves to the next question
26
28
  - \`sessionStateOptions\` lets you configure the session modal behavior
27
29
  - \`showSessionModal\` is a boolean used to decide whether to show the session modal. The default behavior is to show the session modal
28
30
  - \`showSessionModalOnResults\` is a boolean to decide whether to show the session modal after reaching the results page. The default behavior is to not show the session modal
@@ -87,6 +89,7 @@ In the example below, the \`primaryColor\` prop has been used to override this c
87
89
 
88
90
  > Advanced Option: Instead of passing a primaryColor prop, you can also override \`--primary-color-h\`, \`--primary-color-s\`, and \`--primary-color-l\` CSS variables within a \`.cio-quiz\` container element. If explicitly given a value in your CSS, then the values of these variables will be used as the HSL values for your quiz.
89
91
  `;
92
+ exports.callbacksDescription = `Pass an \`apiKey\`, a \`quizId\`, and \`callbacks\``;
90
93
  var RequestStates;
91
94
  (function (RequestStates) {
92
95
  RequestStates["Stale"] = "STALE";
@@ -13,12 +13,12 @@ const utils_1 = require("../../utils");
13
13
  const useQuizAddToFavorites_1 = tslib_1.__importDefault(require("./useQuizAddToFavorites"));
14
14
  const useQuizEvents = (quizOptions, cioClient, quizState) => {
15
15
  const { quizApiState, dispatchLocalState, dispatchApiState, hasQuizStoredState, quizStateKey, quizLocalState, } = quizState;
16
- const { resultsPageOptions } = quizOptions;
16
+ const { resultsPageOptions, callbacks } = quizOptions;
17
17
  const { onAddToCartClick, onQuizResultClick, onQuizResultsLoaded, onAddToFavoritesClick } = resultsPageOptions;
18
18
  // Quiz answer change
19
19
  const quizAnswerChanged = (0, useQuizAnswerChangeHandler_1.default)(quizApiState, dispatchLocalState);
20
20
  // Quiz Next button click callback
21
- const nextQuestion = (0, useQuizNextClick_1.default)(quizApiState, quizLocalState, dispatchLocalState);
21
+ const nextQuestion = (0, useQuizNextClick_1.default)(quizApiState, quizLocalState, dispatchLocalState, callbacks === null || callbacks === void 0 ? void 0 : callbacks.onQuizNextQuestion);
22
22
  // Quiz Back button click callback
23
23
  const previousQuestion = (0, useQuizBackClick_1.default)(quizApiState, dispatchLocalState);
24
24
  // Quiz result add to cart callback
@@ -2,7 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const react_1 = require("react");
4
4
  const actions_1 = require("../../components/CioQuiz/actions");
5
- const useQuizNextClick = (quizApiState, quizLocalState, dispatchLocalState) => {
5
+ const utils_1 = require("../../utils");
6
+ const useQuizNextClick = (quizApiState, quizLocalState, dispatchLocalState, onQuizNextQuestion) => {
6
7
  const quizNexClickHandler = (0, react_1.useCallback)(() => {
7
8
  var _a, _b;
8
9
  const currentQuestion = (_a = quizApiState.quizCurrentQuestion) === null || _a === void 0 ? void 0 : _a.next_question;
@@ -15,8 +16,16 @@ const useQuizNextClick = (quizApiState, quizLocalState, dispatchLocalState) => {
15
16
  payload: quizApiState.quizCurrentQuestion,
16
17
  });
17
18
  }
19
+ if (currentQuestion && (0, utils_1.isFunction)(onQuizNextQuestion)) {
20
+ onQuizNextQuestion(Object.assign(Object.assign({}, currentQuestion), { answer: currentAnswerInput }));
21
+ }
18
22
  }
19
- }, [dispatchLocalState, quizApiState.quizCurrentQuestion, quizLocalState.answerInputs]);
23
+ }, [
24
+ dispatchLocalState,
25
+ quizApiState.quizCurrentQuestion,
26
+ quizLocalState.answerInputs,
27
+ onQuizNextQuestion,
28
+ ]);
20
29
  return quizNexClickHandler;
21
30
  };
22
31
  exports.default = useQuizNextClick;
package/lib/cjs/utils.js CHANGED
@@ -47,6 +47,7 @@ exports.functionStrings = {
47
47
  onQuizResultClick: `(result, position) => console.dir(result, position)`,
48
48
  onAddToFavoritesClick: `(item) => console.dir(item)`,
49
49
  onQuizResultsLoaded: `(results) => console.dir(results)`,
50
+ onQuizNextQuestion: `(question) => console.dir(question)`,
50
51
  cioJsClient: `cioJsClient`,
51
52
  };
52
53
  const stringifyWithDefaults = (obj) => {
@@ -121,10 +122,13 @@ const resetQuizSessionStorageState = (quizStateKey) => () => {
121
122
  };
122
123
  exports.resetQuizSessionStorageState = resetQuizSessionStorageState;
123
124
  const logger = (action) => {
124
- console.group(`%cAction:%c ${action.type}`, 'color: red; font-weight: bold;', 'color: green; font-weight: lighter;');
125
- console.log('%c type:', 'color: #9E9E9E; font-weight: 700;', action.type);
126
- console.log('%c payload:', 'color: #00A7F7; font-weight: 700;', action.payload);
127
- console.groupEnd();
125
+ var _a;
126
+ if ((_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a.LOGGER) {
127
+ console.group(`%cAction:%c ${action.type}`, 'color: red; font-weight: bold;', 'color: green; font-weight: lighter;');
128
+ console.log('%c type:', 'color: #9E9E9E; font-weight: 700;', action.type);
129
+ console.log('%c payload:', 'color: #00A7F7; font-weight: 700;', action.payload);
130
+ console.groupEnd();
131
+ }
128
132
  };
129
133
  exports.logger = logger;
130
134
  // Function to emulate pausing between interactions
@@ -20,6 +20,8 @@ export const componentDescription = `- import \`CioQuiz\` to render in your JSX.
20
20
  - \`resultCardRatingScoreKey\` is an optional parameter that specifies the metadata field name for the ratings score
21
21
  - \`renderResultCardPriceDetails\` is an optional render function to render custom prices section in result card
22
22
  - \`numResultsToDisplay\` is an optional parameter that determines how many results should be displayed on results page
23
+ - \`callbacks\` lets you pass callback functions that will be called on certain actions
24
+ - \`onQuizNextQuestion\` is an optional callback function that will be called when user moves to the next question
23
25
  - \`sessionStateOptions\` lets you configure the session modal behavior
24
26
  - \`showSessionModal\` is a boolean used to decide whether to show the session modal. The default behavior is to show the session modal
25
27
  - \`showSessionModalOnResults\` is a boolean to decide whether to show the session modal after reaching the results page. The default behavior is to not show the session modal
@@ -84,6 +86,7 @@ In the example below, the \`primaryColor\` prop has been used to override this c
84
86
 
85
87
  > Advanced Option: Instead of passing a primaryColor prop, you can also override \`--primary-color-h\`, \`--primary-color-s\`, and \`--primary-color-l\` CSS variables within a \`.cio-quiz\` container element. If explicitly given a value in your CSS, then the values of these variables will be used as the HSL values for your quiz.
86
88
  `;
89
+ export const callbacksDescription = `Pass an \`apiKey\`, a \`quizId\`, and \`callbacks\``;
87
90
  export var RequestStates;
88
91
  (function (RequestStates) {
89
92
  RequestStates["Stale"] = "STALE";
@@ -10,12 +10,12 @@ import { resetQuizSessionStorageState } from '../../utils';
10
10
  import useQuizAddToFavorites from './useQuizAddToFavorites';
11
11
  const useQuizEvents = (quizOptions, cioClient, quizState) => {
12
12
  const { quizApiState, dispatchLocalState, dispatchApiState, hasQuizStoredState, quizStateKey, quizLocalState, } = quizState;
13
- const { resultsPageOptions } = quizOptions;
13
+ const { resultsPageOptions, callbacks } = quizOptions;
14
14
  const { onAddToCartClick, onQuizResultClick, onQuizResultsLoaded, onAddToFavoritesClick } = resultsPageOptions;
15
15
  // Quiz answer change
16
16
  const quizAnswerChanged = useQuizAnswerChangeHandler(quizApiState, dispatchLocalState);
17
17
  // Quiz Next button click callback
18
- const nextQuestion = useQuizNextClick(quizApiState, quizLocalState, dispatchLocalState);
18
+ const nextQuestion = useQuizNextClick(quizApiState, quizLocalState, dispatchLocalState, callbacks?.onQuizNextQuestion);
19
19
  // Quiz Back button click callback
20
20
  const previousQuestion = useQuizBackClick(quizApiState, dispatchLocalState);
21
21
  // Quiz result add to cart callback
@@ -1,6 +1,7 @@
1
1
  import { useCallback } from 'react';
2
2
  import { QuestionTypes } from '../../components/CioQuiz/actions';
3
- const useQuizNextClick = (quizApiState, quizLocalState, dispatchLocalState) => {
3
+ import { isFunction } from '../../utils';
4
+ const useQuizNextClick = (quizApiState, quizLocalState, dispatchLocalState, onQuizNextQuestion) => {
4
5
  const quizNexClickHandler = useCallback(() => {
5
6
  const currentQuestion = quizApiState.quizCurrentQuestion?.next_question;
6
7
  const currentQuestionId = currentQuestion?.id;
@@ -12,8 +13,16 @@ const useQuizNextClick = (quizApiState, quizLocalState, dispatchLocalState) => {
12
13
  payload: quizApiState.quizCurrentQuestion,
13
14
  });
14
15
  }
16
+ if (currentQuestion && isFunction(onQuizNextQuestion)) {
17
+ onQuizNextQuestion({ ...currentQuestion, answer: currentAnswerInput });
18
+ }
15
19
  }
16
- }, [dispatchLocalState, quizApiState.quizCurrentQuestion, quizLocalState.answerInputs]);
20
+ }, [
21
+ dispatchLocalState,
22
+ quizApiState.quizCurrentQuestion,
23
+ quizLocalState.answerInputs,
24
+ onQuizNextQuestion,
25
+ ]);
17
26
  return quizNexClickHandler;
18
27
  };
19
28
  export default useQuizNextClick;
package/lib/mjs/utils.js CHANGED
@@ -41,6 +41,7 @@ export const functionStrings = {
41
41
  onQuizResultClick: `(result, position) => console.dir(result, position)`,
42
42
  onAddToFavoritesClick: `(item) => console.dir(item)`,
43
43
  onQuizResultsLoaded: `(results) => console.dir(results)`,
44
+ onQuizNextQuestion: `(question) => console.dir(question)`,
44
45
  cioJsClient: `cioJsClient`,
45
46
  };
46
47
  export const stringifyWithDefaults = (obj) => {
@@ -105,10 +106,12 @@ export const resetQuizSessionStorageState = (quizStateKey) => () => {
105
106
  window?.sessionStorage?.removeItem(quizStateKey);
106
107
  };
107
108
  export const logger = (action) => {
108
- console.group(`%cAction:%c ${action.type}`, 'color: red; font-weight: bold;', 'color: green; font-weight: lighter;');
109
- console.log('%c type:', 'color: #9E9E9E; font-weight: 700;', action.type);
110
- console.log('%c payload:', 'color: #00A7F7; font-weight: 700;', action.payload);
111
- console.groupEnd();
109
+ if (process?.env?.LOGGER) {
110
+ console.group(`%cAction:%c ${action.type}`, 'color: red; font-weight: bold;', 'color: green; font-weight: lighter;');
111
+ console.log('%c type:', 'color: #9E9E9E; font-weight: 700;', action.type);
112
+ console.log('%c payload:', 'color: #00A7F7; font-weight: 700;', action.payload);
113
+ console.groupEnd();
114
+ }
112
115
  };
113
116
  // Function to emulate pausing between interactions
114
117
  export function sleep(ms) {
@@ -1,12 +1,13 @@
1
1
  export declare const apiKey = "key_wJSdZSiesX5hiVLt";
2
2
  export declare const quizId = "coffee-quiz";
3
3
  export declare const quizSessionStateKey = "constructorIOQuizState";
4
- export declare const componentDescription = "- import `CioQuiz` to render in your JSX.\n- This component handles state management, data fetching, and rendering logic.\n- To use this component, `quizId`, `resultsPageOptions`, and one of `apiKey` or `cioJsClient` are required.\n- `resultsPageOptions` lets you configure the results page\n - `onAddToCartClick` is a callback function that will be called when the \"Add to cart\" button is clicked\n - `onAddToFavoritesClick` is an optional callback function that will be called when the \"Add To Favorites\" heart icon is clicked\n - `onQuizResultClick` is an optional callback function that will be called when the result card is clicked. The default behavior is redirecting the user to the item's URL\n - `onQuizResultsLoaded` is an optional callback function that will be called when the quiz results are loaded\n - `resultCardRegularPriceKey` is a parameter that specifies the metadata field name for the regular price\n - `resultCardSalePriceKey` is an optional parameter that specifies the metadata field name for the sale price \n - `resultCardRatingCountKey` is an optional parameter that specifies the metadata field name for the ratings count \n - `resultCardRatingScoreKey` is an optional parameter that specifies the metadata field name for the ratings score \n - `renderResultCardPriceDetails` is an optional render function to render custom prices section in result card \n - `numResultsToDisplay` is an optional parameter that determines how many results should be displayed on results page\n- `sessionStateOptions` lets you configure the session modal behavior\n - `showSessionModal` is a boolean used to decide whether to show the session modal. The default behavior is to show the session modal\n - `showSessionModalOnResults` is a boolean to decide whether to show the session modal after reaching the results page. The default behavior is to not show the session modal\n - `sessionStateKey` is a custom string that will be used as a session storage key\n- Use different props to configure the behavior of this component.\n- The following stories show how different props affect the component's behavior\n\n> Note: `cioJsClient` refers to an instance of the [constructorio-client-javascript](https://www.npmjs.com/package/@constructor-io/constructorio-client-javascript)\n";
4
+ export declare const componentDescription = "- import `CioQuiz` to render in your JSX.\n- This component handles state management, data fetching, and rendering logic.\n- To use this component, `quizId`, `resultsPageOptions`, and one of `apiKey` or `cioJsClient` are required.\n- `resultsPageOptions` lets you configure the results page\n - `onAddToCartClick` is a callback function that will be called when the \"Add to cart\" button is clicked\n - `onAddToFavoritesClick` is an optional callback function that will be called when the \"Add To Favorites\" heart icon is clicked\n - `onQuizResultClick` is an optional callback function that will be called when the result card is clicked. The default behavior is redirecting the user to the item's URL\n - `onQuizResultsLoaded` is an optional callback function that will be called when the quiz results are loaded\n - `resultCardRegularPriceKey` is a parameter that specifies the metadata field name for the regular price\n - `resultCardSalePriceKey` is an optional parameter that specifies the metadata field name for the sale price \n - `resultCardRatingCountKey` is an optional parameter that specifies the metadata field name for the ratings count \n - `resultCardRatingScoreKey` is an optional parameter that specifies the metadata field name for the ratings score \n - `renderResultCardPriceDetails` is an optional render function to render custom prices section in result card \n - `numResultsToDisplay` is an optional parameter that determines how many results should be displayed on results page\n- `callbacks` lets you pass callback functions that will be called on certain actions\n - `onQuizNextQuestion` is an optional callback function that will be called when user moves to the next question\n- `sessionStateOptions` lets you configure the session modal behavior\n - `showSessionModal` is a boolean used to decide whether to show the session modal. The default behavior is to show the session modal\n - `showSessionModalOnResults` is a boolean to decide whether to show the session modal after reaching the results page. The default behavior is to not show the session modal\n - `sessionStateKey` is a custom string that will be used as a session storage key\n- Use different props to configure the behavior of this component.\n- The following stories show how different props affect the component's behavior\n\n> Note: `cioJsClient` refers to an instance of the [constructorio-client-javascript](https://www.npmjs.com/package/@constructor-io/constructorio-client-javascript)\n";
5
5
  export declare const hookDescription = "- import `useCioQuiz` and call this custom hook in a functional component.\n- This hook leaves rendering logic up to you, while handling:\n - state management\n - data fetching\n - keyboard navigation\n - mouse interactions\n - focus and submit event handling\n- Since the markup is controlled by you, the default styles might not be applied if you have a different DOM structure\n- To use this hook, an `apiKey` and `quizId` are required, and `resultsPageOptions` must be passed to the `useCioQuiz` hook to configure behavior. All other values are optional.\n- use the <a href=\"https://kentcdodds.com/blog/how-to-give-rendering-control-to-users-with-prop-getters\" target=\"__blank\">prop getters</a> and other variables returned by this hook (below) to leverage the functionality described above with jsx elements in your react component definitions\n\nCalling the `useCioQuiz` hook returns an object with the following keys:\n\n```jsx\nconst {\n // must be used for a hooks integrations\n state: QuizReturnState, // Quiz state\n events: [{...}], // array of quiz events\n getAddToCartButtonProps: () => ({...})), // prop getter for jsx add to cart button for quiz result,\n getAddToFavoritesButtonProps: () => ({...})), // prop getter for jsx add to favorites button for quiz result,\n getCoverQuestionProps: () => ({...})), // prop getter for jsx quiz cover question,\n getHydrateQuizButtonProps: () => ({...})), // prop getter for jsx hydrate quiz button,\n getNextQuestionButtonProps: () => ({...})), // prop getter for jsx next button to traverse the quiz,\n getPreviousQuestionButtonProps: () => ({...})), // prop getter for jsx back button to traverse the quiz, \n getOpenTextInputProps: () => ({...})), // prop getter for jsx open text input,\n getSelectInputProps: () => ({...})), // prop getter for jsx select input for select type questions,\n getQuizImageProps: () => ({...})), // prop getter for jsx quiz image,\n getQuizResultButtonProps: () => ({...})), // prop getter for jsx result card click as a button,\n getQuizResultLinkProps: () => ({...})), // prop getter for jsx result card click as a link. Should be spread into <a> tags,\n getResetQuizButtonProps: () => ({...})), // prop getter for jsx reset quiz button,\n cioClient, // instance of constructorio-client-javascript\n } = useCioQuiz(args);\n```\n\n> Note: when we say `cioClient`, we are referring to an instance of the [constructorio-client-javascript](https://www.npmjs.com/package/@constructor-io/constructorio-client-javascript)\n";
6
6
  export declare const basicDescription = "Pass an `apiKey` and a `quizId` to request questions and quiz results from Constructor's servers";
7
7
  export declare const cioJsClientDescription = "If you are already using an instance of the `ConstructorIOClient`, you can pass a `cioJsClient` instead of an `apiKey` to request results from Constructor's servers\n\n> Note: `cioJsClient` refers to an instance of the [constructorio-client-javascript](https://www.npmjs.com/package/@constructor-io/constructorio-client-javascript)";
8
8
  export declare const smallContainerDescription = "If you are using the provided styles, CioQuiz component will respect the height and width of its parent container and use responsive styles based on the parent container's dimensions";
9
9
  export declare const changePrimaryColorDescription = "\nIf you would like to use a different primary color, pass a `primaryColor` string in RGB format ('R, G, B').\n\nAccent colors for borders and different states (hover, focus, active) will be calculated automatically based on the primary color you provided.\n\nBy default, the primary color has a value of \"35, 71, 199\" (Constructor Blue).\n\nIn the example below, the `primaryColor` prop has been used to override this color to \"255, 82, 48\" (Orange).\n\n> Advanced Option: Instead of passing a primaryColor prop, you can also override `--primary-color-h`, `--primary-color-s`, and `--primary-color-l` CSS variables within a `.cio-quiz` container element. If explicitly given a value in your CSS, then the values of these variables will be used as the HSL values for your quiz.\n";
10
+ export declare const callbacksDescription = "Pass an `apiKey`, a `quizId`, and `callbacks`";
10
11
  export declare enum RequestStates {
11
12
  Stale = "STALE",
12
13
  Loading = "LOADING",
@@ -1,6 +1,6 @@
1
1
  import { ActionAnswerQuestion } from '../../components/CioQuiz/actions';
2
2
  import { QuizAPIReducerState } from '../../components/CioQuiz/quizApiReducer';
3
3
  import { QuizLocalReducerState } from '../../components/CioQuiz/quizLocalReducer';
4
- import { QuizEventsReturn } from '../../types';
5
- declare const useQuizNextClick: (quizApiState: QuizAPIReducerState, quizLocalState: QuizLocalReducerState, dispatchLocalState: React.Dispatch<ActionAnswerQuestion>) => QuizEventsReturn.NextQuestion;
4
+ import { QuizEventsReturn, OnQuizNextQuestion } from '../../types';
5
+ declare const useQuizNextClick: (quizApiState: QuizAPIReducerState, quizLocalState: QuizLocalReducerState, dispatchLocalState: React.Dispatch<ActionAnswerQuestion>, onQuizNextQuestion?: OnQuizNextQuestion) => QuizEventsReturn.NextQuestion;
6
6
  export default useQuizNextClick;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { QuizResultData, NextQuestionResponse, QuizResultsResponse, Nullable, QuestionOption } from '@constructor-io/constructorio-client-javascript/lib/types';
2
+ import { QuizResultData, NextQuestionResponse, QuizResultsResponse, Nullable, QuestionOption, Question } from '@constructor-io/constructorio-client-javascript/lib/types';
3
3
  import ConstructorIOClient from '@constructor-io/constructorio-client-javascript';
4
4
  import { RequestStates } from './constants';
5
5
  import { QuestionTypes } from './components/CioQuiz/actions';
@@ -30,6 +30,13 @@ export interface SessionStateOptions {
30
30
  showSessionModalOnResults?: boolean;
31
31
  sessionStateKey?: string;
32
32
  }
33
+ export type QuestionWithAnswer = Question & {
34
+ answer: AnswerInput;
35
+ };
36
+ export type OnQuizNextQuestion = (question: QuestionWithAnswer) => void;
37
+ export interface Callbacks {
38
+ onQuizNextQuestion?: OnQuizNextQuestion;
39
+ }
33
40
  export interface IQuizProps {
34
41
  apiKey?: string;
35
42
  cioJsClient?: ConstructorIOClient;
@@ -38,6 +45,7 @@ export interface IQuizProps {
38
45
  resultsPageOptions: ResultsPageOptions;
39
46
  sessionStateOptions?: SessionStateOptions;
40
47
  primaryColor?: string;
48
+ callbacks?: Callbacks;
41
49
  }
42
50
  export interface QuizReturnState {
43
51
  answers: {
@@ -54,11 +62,12 @@ export interface QuizReturnState {
54
62
  selectedOptionsWithAttributes?: string[];
55
63
  };
56
64
  }
65
+ export type AnswerInput = {
66
+ type: InputQuestionsTypes;
67
+ value: string | string[];
68
+ };
57
69
  export type AnswerInputState = {
58
- [key: string]: {
59
- type: InputQuestionsTypes;
60
- value: string | string[];
61
- };
70
+ [key: string]: AnswerInput;
62
71
  };
63
72
  export type InputQuestionsTypes = QuestionTypes.OpenText | QuestionTypes.Cover | QuestionTypes.SingleSelect | QuestionTypes.MultipleSelect;
64
73
  export type CurrentQuestion = NextQuestionResponse & {
@@ -17,6 +17,7 @@ export declare const functionStrings: {
17
17
  onQuizResultClick: string;
18
18
  onAddToFavoritesClick: string;
19
19
  onQuizResultsLoaded: string;
20
+ onQuizNextQuestion: string;
20
21
  cioJsClient: string;
21
22
  };
22
23
  export declare const stringifyWithDefaults: (obj: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructor-io/constructorio-ui-quizzes",
3
- "version": "1.7.1",
3
+ "version": "1.7.3",
4
4
  "description": "Constructor.io Quizzes UI library for web applications",
5
5
  "author": "constructor.io",
6
6
  "license": "MIT",