@screeb/sdk-browser 0.4.0 → 0.5.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.
@@ -414,27 +414,29 @@ var surveyClose = function () { return callScreebCommand("survey.close"); };
414
414
  * '<UUID>',
415
415
  * '<UUID>',
416
416
  * false,
417
- * {
417
+ * { // optional
418
418
  * color: "green",
419
419
  * article_id: 42
420
420
  * },
421
- * {
421
+ * { // optional
422
422
  * version: "1.0.0",
423
423
  * onSurveyShowed: (payload) => console.log("Survey showed", payload),
424
424
  * },
425
- * "en"
425
+ * "en", // optional
426
+ * "#screeb-survey-container" // optional
426
427
  * );
427
428
  * ```
428
429
  */
429
- var surveyStart = function (surveyId, distributionId, allowMultipleResponses, hiddenFields, hooks, language) {
430
+ var surveyStart = function (surveyId, distributionId, allowMultipleResponses, hiddenFields, hooks, language, selectors) {
430
431
  if (allowMultipleResponses === void 0) { allowMultipleResponses = true; }
431
432
  if (hiddenFields === void 0) { hiddenFields = {}; }
432
433
  return callScreebCommand("survey.start", surveyId, {
433
- distribution_id: distributionId,
434
434
  allow_multiple_responses: allowMultipleResponses,
435
- language: language,
435
+ distribution_id: distributionId,
436
436
  hidden_fields: hiddenFields,
437
437
  hooks: hooks,
438
+ language: language,
439
+ selectors: selectors,
438
440
  });
439
441
  };
440
442
  /**
@@ -561,4 +563,4 @@ exports.surveyClose = surveyClose;
561
563
  exports.surveyStart = surveyStart;
562
564
  exports.targetingCheck = targetingCheck;
563
565
  exports.targetingDebug = targetingDebug;
564
- CONSTANTS.version = '0.4.0'
566
+ CONSTANTS.version = '0.5.0'
@@ -304,19 +304,20 @@ export declare const surveyClose: () => void | Promise<unknown>;
304
304
  * '<UUID>',
305
305
  * '<UUID>',
306
306
  * false,
307
- * {
307
+ * { // optional
308
308
  * color: "green",
309
309
  * article_id: 42
310
310
  * },
311
- * {
311
+ * { // optional
312
312
  * version: "1.0.0",
313
313
  * onSurveyShowed: (payload) => console.log("Survey showed", payload),
314
314
  * },
315
- * "en"
315
+ * "en", // optional
316
+ * "#screeb-survey-container" // optional
316
317
  * );
317
318
  * ```
318
319
  */
319
- export declare const surveyStart: (surveyId: string, distributionId?: string, allowMultipleResponses?: boolean, hiddenFields?: PropertyRecord, hooks?: HooksSurveyStart, language?: string) => void | Promise<unknown>;
320
+ export declare const surveyStart: (surveyId: string, distributionId?: string, allowMultipleResponses?: boolean, hiddenFields?: PropertyRecord, hooks?: HooksSurveyStart, language?: string, selectors?: string | string[]) => void | Promise<unknown>;
320
321
  /**
321
322
  * Interrupts a running message.
322
323
  *
@@ -304,19 +304,20 @@ export declare const surveyClose: () => void | Promise<unknown>;
304
304
  * '<UUID>',
305
305
  * '<UUID>',
306
306
  * false,
307
- * {
307
+ * { // optional
308
308
  * color: "green",
309
309
  * article_id: 42
310
310
  * },
311
- * {
311
+ * { // optional
312
312
  * version: "1.0.0",
313
313
  * onSurveyShowed: (payload) => console.log("Survey showed", payload),
314
314
  * },
315
- * "en"
315
+ * "en", // optional
316
+ * "#screeb-survey-container" // optional
316
317
  * );
317
318
  * ```
318
319
  */
319
- export declare const surveyStart: (surveyId: string, distributionId?: string, allowMultipleResponses?: boolean, hiddenFields?: PropertyRecord, hooks?: HooksSurveyStart, language?: string) => void | Promise<unknown>;
320
+ export declare const surveyStart: (surveyId: string, distributionId?: string, allowMultipleResponses?: boolean, hiddenFields?: PropertyRecord, hooks?: HooksSurveyStart, language?: string, selectors?: string | string[]) => void | Promise<unknown>;
320
321
  /**
321
322
  * Interrupts a running message.
322
323
  *
package/dist/es/index.mjs CHANGED
@@ -412,27 +412,29 @@ var surveyClose = function () { return callScreebCommand("survey.close"); };
412
412
  * '<UUID>',
413
413
  * '<UUID>',
414
414
  * false,
415
- * {
415
+ * { // optional
416
416
  * color: "green",
417
417
  * article_id: 42
418
418
  * },
419
- * {
419
+ * { // optional
420
420
  * version: "1.0.0",
421
421
  * onSurveyShowed: (payload) => console.log("Survey showed", payload),
422
422
  * },
423
- * "en"
423
+ * "en", // optional
424
+ * "#screeb-survey-container" // optional
424
425
  * );
425
426
  * ```
426
427
  */
427
- var surveyStart = function (surveyId, distributionId, allowMultipleResponses, hiddenFields, hooks, language) {
428
+ var surveyStart = function (surveyId, distributionId, allowMultipleResponses, hiddenFields, hooks, language, selectors) {
428
429
  if (allowMultipleResponses === void 0) { allowMultipleResponses = true; }
429
430
  if (hiddenFields === void 0) { hiddenFields = {}; }
430
431
  return callScreebCommand("survey.start", surveyId, {
431
- distribution_id: distributionId,
432
432
  allow_multiple_responses: allowMultipleResponses,
433
- language: language,
433
+ distribution_id: distributionId,
434
434
  hidden_fields: hiddenFields,
435
435
  hooks: hooks,
436
+ language: language,
437
+ selectors: selectors,
436
438
  });
437
439
  };
438
440
  /**
@@ -540,4 +542,4 @@ var targetingCheck = function () { return callScreebCommand("targeting.check");
540
542
  var targetingDebug = function () { return callScreebCommand("targeting.debug"); };
541
543
 
542
544
  export { close, debug, eventTrack, identity, identityGet, identityGroupAssign, identityGroupUnassign, identityProperties, identityReset, init, isLoaded, load, messageClose, messageStart, sessionReplayStart, sessionReplayStop, surveyClose, surveyStart, targetingCheck, targetingDebug };
543
- CONSTANTS.version = '0.4.0'
545
+ CONSTANTS.version = '0.5.0'
package/docs/README.md CHANGED
@@ -1100,7 +1100,7 @@ ___
1100
1100
 
1101
1101
  ### surveyStart
1102
1102
 
1103
- ▸ **surveyStart**(`surveyId`, `distributionId?`, `allowMultipleResponses?`, `hiddenFields?`, `hooks?`, `language?`): `void` \| `Promise`\<`unknown`\>
1103
+ ▸ **surveyStart**(`surveyId`, `distributionId?`, `allowMultipleResponses?`, `hiddenFields?`, `hooks?`, `language?`, `selectors?`): `void` \| `Promise`\<`unknown`\>
1104
1104
 
1105
1105
  Starts a survey by its ID.
1106
1106
 
@@ -1114,6 +1114,7 @@ Starts a survey by its ID.
1114
1114
  | `hiddenFields` | [`PropertyRecord`](README.md#propertyrecord) | `{}` |
1115
1115
  | `hooks?` | [`HooksSurveyStart`](README.md#hookssurveystart) | `undefined` |
1116
1116
  | `language?` | `string` | `undefined` |
1117
+ | `selectors?` | `string` \| `string`[] | `undefined` |
1117
1118
 
1118
1119
  #### Returns
1119
1120
 
@@ -1128,15 +1129,16 @@ Screeb.surveyStart(
1128
1129
  '<UUID>',
1129
1130
  '<UUID>',
1130
1131
  false,
1131
- {
1132
+ { // optional
1132
1133
  color: "green",
1133
1134
  article_id: 42
1134
1135
  },
1135
- {
1136
+ { // optional
1136
1137
  version: "1.0.0",
1137
1138
  onSurveyShowed: (payload) => console.log("Survey showed", payload),
1138
1139
  },
1139
- "en"
1140
+ "en", // optional
1141
+ "#screeb-survey-container" // optional
1140
1142
  );
1141
1143
  ```
1142
1144
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@screeb/sdk-browser",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Screeb's browser sdk.",
5
5
  "keywords": [
6
6
  "product discovery",