@screeb/sdk-react 0.1.14 → 0.2.0
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/dist/cjs/index.cjs +3 -3
- package/dist/cjs/types.d.ts +2 -1
- package/dist/es/index.mjs +3 -3
- package/dist/es/types.d.ts +2 -1
- package/docs/README.md +4 -2
- package/package.json +2 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -299,11 +299,11 @@ var ScreebProvider = function (_a) {
|
|
|
299
299
|
case 1: return [2 /*return*/, _a.sent()];
|
|
300
300
|
}
|
|
301
301
|
}); }); }, []);
|
|
302
|
-
var surveyStart = React__namespace.useCallback(function (surveyId, allowMultipleResponses, hiddenFields, hooks, language) { return __awaiter(void 0, void 0, void 0, function () {
|
|
302
|
+
var surveyStart = React__namespace.useCallback(function (surveyId, distributionId, allowMultipleResponses, hiddenFields, hooks, language) { return __awaiter(void 0, void 0, void 0, function () {
|
|
303
303
|
return __generator(this, function (_a) {
|
|
304
304
|
switch (_a.label) {
|
|
305
305
|
case 0: return [4 /*yield*/, ensureScreeb("surveyStart", function () {
|
|
306
|
-
return Screeb__namespace.surveyStart(surveyId, allowMultipleResponses, hiddenFields, hooks, language);
|
|
306
|
+
return Screeb__namespace.surveyStart(surveyId, distributionId, allowMultipleResponses, hiddenFields, hooks, language);
|
|
307
307
|
})];
|
|
308
308
|
case 1: return [2 /*return*/, _a.sent()];
|
|
309
309
|
}
|
|
@@ -394,4 +394,4 @@ var useScreeb = function () {
|
|
|
394
394
|
|
|
395
395
|
exports.ScreebProvider = ScreebProvider;
|
|
396
396
|
exports.useScreeb = useScreeb;
|
|
397
|
-
CONSTANTS.version = '0.
|
|
397
|
+
CONSTANTS.version = '0.2.0'
|
package/dist/cjs/types.d.ts
CHANGED
|
@@ -292,6 +292,7 @@ export type SurveyCloseFunction = () => Promise<unknown>;
|
|
|
292
292
|
*
|
|
293
293
|
* surveyStart(
|
|
294
294
|
* '<UUID>',
|
|
295
|
+
* '<UUID>',
|
|
295
296
|
* false,
|
|
296
297
|
* {
|
|
297
298
|
* color: "green",
|
|
@@ -300,7 +301,7 @@ export type SurveyCloseFunction = () => Promise<unknown>;
|
|
|
300
301
|
* );
|
|
301
302
|
* ```
|
|
302
303
|
*/
|
|
303
|
-
export type SurveyStartFunction = (surveyId: string, allowMultipleResponses: boolean, hiddenFields: PropertyRecord, hooks?: Hooks, language?: string) => Promise<unknown>;
|
|
304
|
+
export type SurveyStartFunction = (surveyId: string, distributionId: string, allowMultipleResponses: boolean, hiddenFields: PropertyRecord, hooks?: Hooks, language?: string) => Promise<unknown>;
|
|
304
305
|
/**
|
|
305
306
|
* Interrupts a running message.
|
|
306
307
|
*
|
package/dist/es/index.mjs
CHANGED
|
@@ -277,11 +277,11 @@ var ScreebProvider = function (_a) {
|
|
|
277
277
|
case 1: return [2 /*return*/, _a.sent()];
|
|
278
278
|
}
|
|
279
279
|
}); }); }, []);
|
|
280
|
-
var surveyStart = React.useCallback(function (surveyId, allowMultipleResponses, hiddenFields, hooks, language) { return __awaiter(void 0, void 0, void 0, function () {
|
|
280
|
+
var surveyStart = React.useCallback(function (surveyId, distributionId, allowMultipleResponses, hiddenFields, hooks, language) { return __awaiter(void 0, void 0, void 0, function () {
|
|
281
281
|
return __generator(this, function (_a) {
|
|
282
282
|
switch (_a.label) {
|
|
283
283
|
case 0: return [4 /*yield*/, ensureScreeb("surveyStart", function () {
|
|
284
|
-
return Screeb.surveyStart(surveyId, allowMultipleResponses, hiddenFields, hooks, language);
|
|
284
|
+
return Screeb.surveyStart(surveyId, distributionId, allowMultipleResponses, hiddenFields, hooks, language);
|
|
285
285
|
})];
|
|
286
286
|
case 1: return [2 /*return*/, _a.sent()];
|
|
287
287
|
}
|
|
@@ -371,4 +371,4 @@ var useScreeb = function () {
|
|
|
371
371
|
};
|
|
372
372
|
|
|
373
373
|
export { ScreebProvider, useScreeb };
|
|
374
|
-
CONSTANTS.version = '0.
|
|
374
|
+
CONSTANTS.version = '0.2.0'
|
package/dist/es/types.d.ts
CHANGED
|
@@ -292,6 +292,7 @@ export type SurveyCloseFunction = () => Promise<unknown>;
|
|
|
292
292
|
*
|
|
293
293
|
* surveyStart(
|
|
294
294
|
* '<UUID>',
|
|
295
|
+
* '<UUID>',
|
|
295
296
|
* false,
|
|
296
297
|
* {
|
|
297
298
|
* color: "green",
|
|
@@ -300,7 +301,7 @@ export type SurveyCloseFunction = () => Promise<unknown>;
|
|
|
300
301
|
* );
|
|
301
302
|
* ```
|
|
302
303
|
*/
|
|
303
|
-
export type SurveyStartFunction = (surveyId: string, allowMultipleResponses: boolean, hiddenFields: PropertyRecord, hooks?: Hooks, language?: string) => Promise<unknown>;
|
|
304
|
+
export type SurveyStartFunction = (surveyId: string, distributionId: string, allowMultipleResponses: boolean, hiddenFields: PropertyRecord, hooks?: Hooks, language?: string) => Promise<unknown>;
|
|
304
305
|
/**
|
|
305
306
|
* Interrupts a running message.
|
|
306
307
|
*
|
package/docs/README.md
CHANGED
|
@@ -585,7 +585,7 @@ ___
|
|
|
585
585
|
|
|
586
586
|
### SurveyStartFunction
|
|
587
587
|
|
|
588
|
-
Ƭ **SurveyStartFunction**: (`surveyId`: `string`, `allowMultipleResponses`: `boolean`, `hiddenFields`: `PropertyRecord`, `hooks?`: `Hooks`, `language?`: `string`) => `Promise`\<`unknown`\>
|
|
588
|
+
Ƭ **SurveyStartFunction**: (`surveyId`: `string`, `distributionId`: `string`, `allowMultipleResponses`: `boolean`, `hiddenFields`: `PropertyRecord`, `hooks?`: `Hooks`, `language?`: `string`) => `Promise`\<`unknown`\>
|
|
589
589
|
|
|
590
590
|
Starts a survey by its ID.
|
|
591
591
|
|
|
@@ -595,6 +595,7 @@ Starts a survey by its ID.
|
|
|
595
595
|
const { surveyStart } = useScreeb();
|
|
596
596
|
|
|
597
597
|
surveyStart(
|
|
598
|
+
'<UUID>',
|
|
598
599
|
'<UUID>',
|
|
599
600
|
false,
|
|
600
601
|
{
|
|
@@ -606,13 +607,14 @@ surveyStart(
|
|
|
606
607
|
|
|
607
608
|
#### Type declaration
|
|
608
609
|
|
|
609
|
-
▸ (`surveyId`, `allowMultipleResponses`, `hiddenFields`, `hooks?`, `language?`): `Promise`\<`unknown`\>
|
|
610
|
+
▸ (`surveyId`, `distributionId`, `allowMultipleResponses`, `hiddenFields`, `hooks?`, `language?`): `Promise`\<`unknown`\>
|
|
610
611
|
|
|
611
612
|
##### Parameters
|
|
612
613
|
|
|
613
614
|
| Name | Type |
|
|
614
615
|
| :------ | :------ |
|
|
615
616
|
| `surveyId` | `string` |
|
|
617
|
+
| `distributionId` | `string` |
|
|
616
618
|
| `allowMultipleResponses` | `boolean` |
|
|
617
619
|
| `hiddenFields` | `PropertyRecord` |
|
|
618
620
|
| `hooks?` | `Hooks` |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@screeb/sdk-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Screeb's browser sdk, optimized for React.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"product discovery",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"test": "echo '@TODO'"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@screeb/sdk-browser": "^0.
|
|
44
|
+
"@screeb/sdk-browser": "^0.2.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@screeb/eslint-config": "^0.1.6",
|