@screeb/sdk-react
Advanced tools
@@ -305,7 +305,7 @@ 'use strict'; | ||
| }); }); }, []); | ||
| var surveyStart = React__namespace.useCallback(function (surveyId, distributionId, allowMultipleResponses, hiddenFields, hooks, language) { return __awaiter(void 0, void 0, void 0, function () { | ||
| var surveyStart = React__namespace.useCallback(function (surveyId, distributionId, allowMultipleResponses, hiddenFields, hooks, language, selectors) { return __awaiter(void 0, void 0, void 0, function () { | ||
| return __generator(this, function (_a) { | ||
| switch (_a.label) { | ||
| case 0: return [4 /*yield*/, ensureScreeb("surveyStart", function () { | ||
| return Screeb__namespace.surveyStart(surveyId, distributionId, allowMultipleResponses, hiddenFields, hooks, language); | ||
| return Screeb__namespace.surveyStart(surveyId, distributionId, allowMultipleResponses, hiddenFields, hooks, language, selectors); | ||
| })]; | ||
@@ -439,2 +439,2 @@ case 1: return [2 /*return*/, _a.sent()]; | ||
| exports.useScreeb = useScreeb; | ||
| CONSTANTS.version = '0.5.0' | ||
| CONSTANTS.version = '0.6.0' |
@@ -297,10 +297,16 @@ import { HooksInit, HooksMessageStart, HooksSurveyStart, PropertyRecord, ScreebIdentityGetReturn, ScreebOptions } from "@screeb/sdk-browser"; | ||
| * false, | ||
| * { | ||
| * { // optional | ||
| * color: "green", | ||
| * article_id: 42 | ||
| * } | ||
| * }, | ||
| * { // optional | ||
| * version: "1.0.0", | ||
| * onSurveyShowed: (payload) => console.log("Survey showed", payload), | ||
| * }, | ||
| * "en", // optional | ||
| * "#screeb-survey-container" // optional | ||
| * ); | ||
| * ``` | ||
| */ | ||
| export type SurveyStartFunction = (surveyId: string, distributionId?: string, allowMultipleResponses?: boolean, hiddenFields?: PropertyRecord, hooks?: HooksSurveyStart, language?: string) => Promise<unknown>; | ||
| export type SurveyStartFunction = (surveyId: string, distributionId?: string, allowMultipleResponses?: boolean, hiddenFields?: PropertyRecord, hooks?: HooksSurveyStart, language?: string, selectors?: string | string[]) => Promise<unknown>; | ||
| /** | ||
@@ -307,0 +313,0 @@ * Interrupts a running message. |
@@ -283,7 +283,7 @@ import { jsx } from 'react/jsx-runtime'; | ||
| }); }); }, []); | ||
| var surveyStart = React.useCallback(function (surveyId, distributionId, allowMultipleResponses, hiddenFields, hooks, language) { return __awaiter(void 0, void 0, void 0, function () { | ||
| var surveyStart = React.useCallback(function (surveyId, distributionId, allowMultipleResponses, hiddenFields, hooks, language, selectors) { return __awaiter(void 0, void 0, void 0, function () { | ||
| return __generator(this, function (_a) { | ||
| switch (_a.label) { | ||
| case 0: return [4 /*yield*/, ensureScreeb("surveyStart", function () { | ||
| return Screeb.surveyStart(surveyId, distributionId, allowMultipleResponses, hiddenFields, hooks, language); | ||
| return Screeb.surveyStart(surveyId, distributionId, allowMultipleResponses, hiddenFields, hooks, language, selectors); | ||
| })]; | ||
@@ -416,2 +416,2 @@ case 1: return [2 /*return*/, _a.sent()]; | ||
| export { ScreebProvider, useScreeb }; | ||
| CONSTANTS.version = '0.5.0' | ||
| CONSTANTS.version = '0.6.0' |
@@ -297,10 +297,16 @@ import { HooksInit, HooksMessageStart, HooksSurveyStart, PropertyRecord, ScreebIdentityGetReturn, ScreebOptions } from "@screeb/sdk-browser"; | ||
| * false, | ||
| * { | ||
| * { // optional | ||
| * color: "green", | ||
| * article_id: 42 | ||
| * } | ||
| * }, | ||
| * { // optional | ||
| * version: "1.0.0", | ||
| * onSurveyShowed: (payload) => console.log("Survey showed", payload), | ||
| * }, | ||
| * "en", // optional | ||
| * "#screeb-survey-container" // optional | ||
| * ); | ||
| * ``` | ||
| */ | ||
| export type SurveyStartFunction = (surveyId: string, distributionId?: string, allowMultipleResponses?: boolean, hiddenFields?: PropertyRecord, hooks?: HooksSurveyStart, language?: string) => Promise<unknown>; | ||
| export type SurveyStartFunction = (surveyId: string, distributionId?: string, allowMultipleResponses?: boolean, hiddenFields?: PropertyRecord, hooks?: HooksSurveyStart, language?: string, selectors?: string | string[]) => Promise<unknown>; | ||
| /** | ||
@@ -307,0 +313,0 @@ * Interrupts a running message. |
+11
-4
@@ -641,3 +641,3 @@ @screeb/sdk-react | ||
| Ƭ **SurveyStartFunction**: (`surveyId`: `string`, `distributionId?`: `string`, `allowMultipleResponses?`: `boolean`, `hiddenFields?`: `PropertyRecord`, `hooks?`: `HooksSurveyStart`, `language?`: `string`) => `Promise`\<`unknown`\> | ||
| Ƭ **SurveyStartFunction**: (`surveyId`: `string`, `distributionId?`: `string`, `allowMultipleResponses?`: `boolean`, `hiddenFields?`: `PropertyRecord`, `hooks?`: `HooksSurveyStart`, `language?`: `string`, `selectors?`: `string` \| `string`[]) => `Promise`\<`unknown`\> | ||
@@ -655,6 +655,12 @@ Starts a survey by its ID. | ||
| false, | ||
| { | ||
| { // optional | ||
| color: "green", | ||
| article_id: 42 | ||
| } | ||
| }, | ||
| { // optional | ||
| version: "1.0.0", | ||
| onSurveyShowed: (payload) => console.log("Survey showed", payload), | ||
| }, | ||
| "en", // optional | ||
| "#screeb-survey-container" // optional | ||
| ); | ||
@@ -665,3 +671,3 @@ ``` | ||
| ▸ (`surveyId`, `distributionId?`, `allowMultipleResponses?`, `hiddenFields?`, `hooks?`, `language?`): `Promise`\<`unknown`\> | ||
| ▸ (`surveyId`, `distributionId?`, `allowMultipleResponses?`, `hiddenFields?`, `hooks?`, `language?`, `selectors?`): `Promise`\<`unknown`\> | ||
@@ -678,2 +684,3 @@ ##### Parameters | ||
| | `language?` | `string` | | ||
| | `selectors?` | `string` \| `string`[] | | ||
@@ -680,0 +687,0 @@ ##### Returns |
+2
-2
| { | ||
| "name": "@screeb/sdk-react", | ||
| "version": "0.5.0", | ||
| "version": "0.6.0", | ||
| "description": "Screeb's browser sdk, optimized for React.", | ||
@@ -44,3 +44,3 @@ "keywords": [ | ||
| "dependencies": { | ||
| "@screeb/sdk-browser": "^0.4.0" | ||
| "@screeb/sdk-browser": "^0.5.0" | ||
| }, | ||
@@ -47,0 +47,0 @@ "devDependencies": { |
90176
0.9%1766
0.68%+ Added
- Removed
Updated