@amplitude/session-replay-browser 1.50.4 → 1.51.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.
Files changed (50) hide show
  1. package/README.md +15 -0
  2. package/lib/cjs/config/joined-config.d.ts.map +1 -1
  3. package/lib/cjs/config/joined-config.js +6 -25
  4. package/lib/cjs/config/joined-config.js.map +1 -1
  5. package/lib/cjs/config/types.d.ts +2 -25
  6. package/lib/cjs/config/types.d.ts.map +1 -1
  7. package/lib/cjs/config/types.js +0 -2
  8. package/lib/cjs/config/types.js.map +1 -1
  9. package/lib/cjs/helpers.d.ts +1 -16
  10. package/lib/cjs/helpers.d.ts.map +1 -1
  11. package/lib/cjs/helpers.js +8 -166
  12. package/lib/cjs/helpers.js.map +1 -1
  13. package/lib/cjs/session-replay.d.ts.map +1 -1
  14. package/lib/cjs/session-replay.js +6 -35
  15. package/lib/cjs/session-replay.js.map +1 -1
  16. package/lib/cjs/version.d.ts +1 -1
  17. package/lib/cjs/version.js +1 -1
  18. package/lib/cjs/version.js.map +1 -1
  19. package/lib/esm/config/joined-config.d.ts.map +1 -1
  20. package/lib/esm/config/joined-config.js +6 -25
  21. package/lib/esm/config/joined-config.js.map +1 -1
  22. package/lib/esm/config/types.d.ts +2 -25
  23. package/lib/esm/config/types.d.ts.map +1 -1
  24. package/lib/esm/config/types.js +1 -1
  25. package/lib/esm/config/types.js.map +1 -1
  26. package/lib/esm/helpers.d.ts +1 -16
  27. package/lib/esm/helpers.d.ts.map +1 -1
  28. package/lib/esm/helpers.js +7 -161
  29. package/lib/esm/helpers.js.map +1 -1
  30. package/lib/esm/session-replay.d.ts.map +1 -1
  31. package/lib/esm/session-replay.js +8 -37
  32. package/lib/esm/session-replay.js.map +1 -1
  33. package/lib/esm/version.d.ts +1 -1
  34. package/lib/esm/version.js +1 -1
  35. package/lib/esm/version.js.map +1 -1
  36. package/lib/scripts/index-min.js +1 -1
  37. package/lib/scripts/index-min.js.gz +0 -0
  38. package/lib/scripts/index-min.js.map +1 -1
  39. package/lib/scripts/session-replay-browser-min.js +1 -1
  40. package/lib/scripts/session-replay-browser-min.js.gz +0 -0
  41. package/lib/scripts/session-replay-browser-min.js.map +1 -1
  42. package/package.json +4 -3
  43. package/lib/cjs/utils/get-input-type.d.ts +0 -9
  44. package/lib/cjs/utils/get-input-type.d.ts.map +0 -1
  45. package/lib/cjs/utils/get-input-type.js +0 -25
  46. package/lib/cjs/utils/get-input-type.js.map +0 -1
  47. package/lib/esm/utils/get-input-type.d.ts +0 -9
  48. package/lib/esm/utils/get-input-type.d.ts.map +0 -1
  49. package/lib/esm/utils/get-input-type.js +0 -20
  50. package/lib/esm/utils/get-input-type.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amplitude/session-replay-browser",
3
- "version": "1.50.4",
3
+ "version": "1.51.0",
4
4
  "description": "",
5
5
  "author": "Amplitude Inc",
6
6
  "homepage": "https://github.com/amplitude/Amplitude-TypeScript",
@@ -25,9 +25,10 @@
25
25
  "@amplitude/rrweb-types": "2.0.0-alpha.40",
26
26
  "idb": "8.0.0",
27
27
  "tslib": "^2.4.1",
28
- "@amplitude/analytics-core": "2.58.1",
28
+ "@amplitude/analytics-core": "2.59.0",
29
29
  "@amplitude/analytics-types": "2.11.1",
30
- "@amplitude/targeting": "0.3.10"
30
+ "@amplitude/targeting": "0.3.10",
31
+ "@amplitude/session-replay-dom-privacy": "0.2.0"
31
32
  },
32
33
  "devDependencies": {
33
34
  "@aws-sdk/client-s3": "^3.229.0",
@@ -1,9 +0,0 @@
1
- export declare function toLowerCase<T extends string>(str: T): Lowercase<T>;
2
- /**
3
- * Get the type of an input element.
4
- * This takes care of the case where a password input is changed to a text input.
5
- * In this case, we continue to consider this of type password, in order to avoid leaking sensitive data
6
- * where passwords should be masked.
7
- */
8
- export declare function getInputType(element: HTMLElement): Lowercase<string> | null;
9
- //# sourceMappingURL=get-input-type.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-input-type.d.ts","sourceRoot":"","sources":["../../../src/utils/get-input-type.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAElE;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG,IAAI,CAU3E"}
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getInputType = exports.toLowerCase = void 0;
4
- function toLowerCase(str) {
5
- return str.toLowerCase();
6
- }
7
- exports.toLowerCase = toLowerCase;
8
- /**
9
- * Get the type of an input element.
10
- * This takes care of the case where a password input is changed to a text input.
11
- * In this case, we continue to consider this of type password, in order to avoid leaking sensitive data
12
- * where passwords should be masked.
13
- */
14
- function getInputType(element) {
15
- // when omitting the type of input element(e.g. <input />), the type is treated as text
16
- var type = element.type;
17
- return element.hasAttribute('data-rr-is-password')
18
- ? 'password'
19
- : type
20
- ? // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
21
- toLowerCase(type)
22
- : null;
23
- }
24
- exports.getInputType = getInputType;
25
- //# sourceMappingURL=get-input-type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-input-type.js","sourceRoot":"","sources":["../../../src/utils/get-input-type.ts"],"names":[],"mappings":";;;AAAA,SAAgB,WAAW,CAAmB,GAAM;IAClD,OAAO,GAAG,CAAC,WAAW,EAA6B,CAAC;AACtD,CAAC;AAFD,kCAEC;AAED;;;;;GAKG;AACH,SAAgB,YAAY,CAAC,OAAoB;IAC/C,uFAAuF;IACvF,IAAM,IAAI,GAAI,OAA4B,CAAC,IAAI,CAAC;IAEhD,OAAO,OAAO,CAAC,YAAY,CAAC,qBAAqB,CAAC;QAChD,CAAC,CAAC,UAAU;QACZ,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,4EAA4E;gBAC5E,WAAW,CAAC,IAAI,CAAC;YACnB,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAVD,oCAUC","sourcesContent":["export function toLowerCase<T extends string>(str: T): Lowercase<T> {\n return str.toLowerCase() as unknown as Lowercase<T>;\n}\n\n/**\n * Get the type of an input element.\n * This takes care of the case where a password input is changed to a text input.\n * In this case, we continue to consider this of type password, in order to avoid leaking sensitive data\n * where passwords should be masked.\n */\nexport function getInputType(element: HTMLElement): Lowercase<string> | null {\n // when omitting the type of input element(e.g. <input />), the type is treated as text\n const type = (element as HTMLInputElement).type;\n\n return element.hasAttribute('data-rr-is-password')\n ? 'password'\n : type\n ? // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n toLowerCase(type)\n : null;\n}\n"]}
@@ -1,9 +0,0 @@
1
- export declare function toLowerCase<T extends string>(str: T): Lowercase<T>;
2
- /**
3
- * Get the type of an input element.
4
- * This takes care of the case where a password input is changed to a text input.
5
- * In this case, we continue to consider this of type password, in order to avoid leaking sensitive data
6
- * where passwords should be masked.
7
- */
8
- export declare function getInputType(element: HTMLElement): Lowercase<string> | null;
9
- //# sourceMappingURL=get-input-type.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-input-type.d.ts","sourceRoot":"","sources":["../../../src/utils/get-input-type.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAElE;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG,IAAI,CAU3E"}
@@ -1,20 +0,0 @@
1
- export function toLowerCase(str) {
2
- return str.toLowerCase();
3
- }
4
- /**
5
- * Get the type of an input element.
6
- * This takes care of the case where a password input is changed to a text input.
7
- * In this case, we continue to consider this of type password, in order to avoid leaking sensitive data
8
- * where passwords should be masked.
9
- */
10
- export function getInputType(element) {
11
- // when omitting the type of input element(e.g. <input />), the type is treated as text
12
- var type = element.type;
13
- return element.hasAttribute('data-rr-is-password')
14
- ? 'password'
15
- : type
16
- ? // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
17
- toLowerCase(type)
18
- : null;
19
- }
20
- //# sourceMappingURL=get-input-type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-input-type.js","sourceRoot":"","sources":["../../../src/utils/get-input-type.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAmB,GAAM;IAClD,OAAO,GAAG,CAAC,WAAW,EAA6B,CAAC;AACtD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,OAAoB;IAC/C,uFAAuF;IACvF,IAAM,IAAI,GAAI,OAA4B,CAAC,IAAI,CAAC;IAEhD,OAAO,OAAO,CAAC,YAAY,CAAC,qBAAqB,CAAC;QAChD,CAAC,CAAC,UAAU;QACZ,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,4EAA4E;gBAC5E,WAAW,CAAC,IAAI,CAAC;YACnB,CAAC,CAAC,IAAI,CAAC;AACX,CAAC","sourcesContent":["export function toLowerCase<T extends string>(str: T): Lowercase<T> {\n return str.toLowerCase() as unknown as Lowercase<T>;\n}\n\n/**\n * Get the type of an input element.\n * This takes care of the case where a password input is changed to a text input.\n * In this case, we continue to consider this of type password, in order to avoid leaking sensitive data\n * where passwords should be masked.\n */\nexport function getInputType(element: HTMLElement): Lowercase<string> | null {\n // when omitting the type of input element(e.g. <input />), the type is treated as text\n const type = (element as HTMLInputElement).type;\n\n return element.hasAttribute('data-rr-is-password')\n ? 'password'\n : type\n ? // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n toLowerCase(type)\n : null;\n}\n"]}