@pega/cosmos-react-test-utils 8.0.0-build.26.7 → 8.0.0-build.26.9

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 (39) hide show
  1. package/lib/mocks/animation.d.ts +1 -0
  2. package/lib/mocks/animation.d.ts.map +1 -0
  3. package/lib/mocks/animation.js +8 -0
  4. package/lib/mocks/animation.js.map +1 -0
  5. package/lib/mocks/createRange.js +12 -10
  6. package/lib/mocks/createRange.js.map +1 -1
  7. package/lib/mocks/elementFromPointMock.js +3 -1
  8. package/lib/mocks/elementFromPointMock.js.map +1 -1
  9. package/lib/mocks/getCurrentPositionMock.d.ts +0 -1
  10. package/lib/mocks/getCurrentPositionMock.d.ts.map +1 -1
  11. package/lib/mocks/getCurrentPositionMock.js +22 -20
  12. package/lib/mocks/getCurrentPositionMock.js.map +1 -1
  13. package/lib/mocks/index.d.ts +2 -0
  14. package/lib/mocks/index.d.ts.map +1 -1
  15. package/lib/mocks/index.js +2 -0
  16. package/lib/mocks/index.js.map +1 -1
  17. package/lib/mocks/innerTextMock.d.ts +1 -0
  18. package/lib/mocks/innerTextMock.d.ts.map +1 -0
  19. package/lib/mocks/innerTextMock.js +13 -0
  20. package/lib/mocks/innerTextMock.js.map +1 -0
  21. package/lib/mocks/intersectionObserverMock.js +11 -9
  22. package/lib/mocks/intersectionObserverMock.js.map +1 -1
  23. package/lib/mocks/matchMediaMock.js +12 -10
  24. package/lib/mocks/matchMediaMock.js.map +1 -1
  25. package/lib/mocks/mutationObserverMock.js +9 -7
  26. package/lib/mocks/mutationObserverMock.js.map +1 -1
  27. package/lib/mocks/randomUUID.js +3 -1
  28. package/lib/mocks/randomUUID.js.map +1 -1
  29. package/lib/mocks/resizeObserverMock.js +7 -5
  30. package/lib/mocks/resizeObserverMock.js.map +1 -1
  31. package/lib/mocks/scrollIntoView.js +3 -1
  32. package/lib/mocks/scrollIntoView.js.map +1 -1
  33. package/lib/mocks/svgGetBBox.js +18 -16
  34. package/lib/mocks/svgGetBBox.js.map +1 -1
  35. package/lib/mocks/svgGetScreenCTM.js +14 -12
  36. package/lib/mocks/svgGetScreenCTM.js.map +1 -1
  37. package/lib/mocks/svgGetSubStringLength.js +9 -7
  38. package/lib/mocks/svgGetSubStringLength.js.map +1 -1
  39. package/package.json +2 -2
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=animation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../src/mocks/animation.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ if (typeof window !== 'undefined') {
3
+ window.Element.prototype.animate = () => ({
4
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
5
+ addEventListener: (type, listener) => { }
6
+ });
7
+ }
8
+ //# sourceMappingURL=animation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animation.js","sourceRoot":"","sources":["../../src/mocks/animation.ts"],"names":[],"mappings":";AAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IAClC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,GAAG,GAAG,EAAE,CACtC,CAAC;QACC,6DAA6D;QAC7D,gBAAgB,EAAE,CAAC,IAAY,EAAE,QAA4C,EAAE,EAAE,GAAE,CAAC;KACrF,CAAc,CAAC;AACpB,CAAC","sourcesContent":["if (typeof window !== 'undefined') {\n window.Element.prototype.animate = () =>\n ({\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n addEventListener: (type: string, listener: EventListenerOrEventListenerObject) => {}\n }) as Animation;\n}\n"]}
@@ -1,14 +1,16 @@
1
1
  "use strict";
2
- document.createRange = () => {
3
- const range = new Range();
4
- range.getBoundingClientRect = jest.fn();
5
- range.getClientRects = () => {
6
- return {
7
- item: () => null,
8
- length: 0,
9
- [Symbol.iterator]: jest.fn()
2
+ if (typeof document !== 'undefined') {
3
+ document.createRange = () => {
4
+ const range = new Range();
5
+ range.getBoundingClientRect = jest.fn();
6
+ range.getClientRects = () => {
7
+ return {
8
+ item: () => null,
9
+ length: 0,
10
+ [Symbol.iterator]: jest.fn()
11
+ };
10
12
  };
13
+ return range;
11
14
  };
12
- return range;
13
- };
15
+ }
14
16
  //# sourceMappingURL=createRange.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createRange.js","sourceRoot":"","sources":["../../src/mocks/createRange.ts"],"names":[],"mappings":";AAAA,QAAQ,CAAC,WAAW,GAAG,GAAG,EAAE;IAC1B,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;IAE1B,KAAK,CAAC,qBAAqB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IAExC,KAAK,CAAC,cAAc,GAAG,GAAG,EAAE;QAC1B,OAAO;YACL,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI;YAChB,MAAM,EAAE,CAAC;YACT,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE;SAC7B,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["document.createRange = () => {\n const range = new Range();\n\n range.getBoundingClientRect = jest.fn();\n\n range.getClientRects = () => {\n return {\n item: () => null,\n length: 0,\n [Symbol.iterator]: jest.fn()\n };\n };\n\n return range;\n};\n"]}
1
+ {"version":3,"file":"createRange.js","sourceRoot":"","sources":["../../src/mocks/createRange.ts"],"names":[],"mappings":";AAAA,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;IACpC,QAAQ,CAAC,WAAW,GAAG,GAAG,EAAE;QAC1B,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;QAE1B,KAAK,CAAC,qBAAqB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAExC,KAAK,CAAC,cAAc,GAAG,GAAG,EAAE;YAC1B,OAAO;gBACL,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI;gBAChB,MAAM,EAAE,CAAC;gBACT,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE;aAC7B,CAAC;QACJ,CAAC,CAAC;QAEF,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;AACJ,CAAC","sourcesContent":["if (typeof document !== 'undefined') {\n document.createRange = () => {\n const range = new Range();\n\n range.getBoundingClientRect = jest.fn();\n\n range.getClientRects = () => {\n return {\n item: () => null,\n length: 0,\n [Symbol.iterator]: jest.fn()\n };\n };\n\n return range;\n };\n}\n"]}
@@ -1,3 +1,5 @@
1
1
  "use strict";
2
- document.elementFromPoint = jest.fn(() => null);
2
+ if (typeof document !== 'undefined') {
3
+ document.elementFromPoint = jest.fn(() => null);
4
+ }
3
5
  //# sourceMappingURL=elementFromPointMock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"elementFromPointMock.js","sourceRoot":"","sources":["../../src/mocks/elementFromPointMock.ts"],"names":[],"mappings":";AAAA,QAAQ,CAAC,gBAAgB,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC","sourcesContent":["document.elementFromPoint = jest.fn(() => null);\n"]}
1
+ {"version":3,"file":"elementFromPointMock.js","sourceRoot":"","sources":["../../src/mocks/elementFromPointMock.ts"],"names":[],"mappings":";AAAA,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;IACpC,QAAQ,CAAC,gBAAgB,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;AAClD,CAAC","sourcesContent":["if (typeof document !== 'undefined') {\n document.elementFromPoint = jest.fn(() => null);\n}\n"]}
@@ -1,2 +1 @@
1
- declare const getCurrentPositionMock: Geolocation['getCurrentPosition'];
2
1
  //# sourceMappingURL=getCurrentPositionMock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getCurrentPositionMock.d.ts","sourceRoot":"","sources":["../../src/mocks/getCurrentPositionMock.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,sBAAsB,EAAE,WAAW,CAAC,oBAAoB,CAa7D,CAAC"}
1
+ {"version":3,"file":"getCurrentPositionMock.d.ts","sourceRoot":"","sources":["../../src/mocks/getCurrentPositionMock.ts"],"names":[],"mappings":""}
@@ -1,24 +1,26 @@
1
1
  "use strict";
2
- const getCurrentPositionMock = successCallback => {
3
- successCallback({
4
- coords: {
5
- latitude: 0,
6
- longitude: 0,
7
- accuracy: 1,
8
- heading: null,
9
- altitude: null,
10
- altitudeAccuracy: null,
11
- speed: null
2
+ if (typeof navigator !== 'undefined') {
3
+ const getCurrentPositionMock = successCallback => {
4
+ successCallback({
5
+ coords: {
6
+ latitude: 0,
7
+ longitude: 0,
8
+ accuracy: 1,
9
+ heading: null,
10
+ altitude: null,
11
+ altitudeAccuracy: null,
12
+ speed: null
13
+ },
14
+ timestamp: Date.now()
15
+ });
16
+ };
17
+ Object.defineProperty(navigator, 'geolocation', {
18
+ value: {
19
+ getCurrentPosition: getCurrentPositionMock,
20
+ watchPosition: () => { },
21
+ clearWatch: () => { }
12
22
  },
13
- timestamp: Date.now()
23
+ configurable: true
14
24
  });
15
- };
16
- Object.defineProperty(globalThis.navigator, 'geolocation', {
17
- value: {
18
- getCurrentPosition: getCurrentPositionMock,
19
- watchPosition: () => { },
20
- clearWatch: () => { }
21
- },
22
- configurable: true
23
- });
25
+ }
24
26
  //# sourceMappingURL=getCurrentPositionMock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getCurrentPositionMock.js","sourceRoot":"","sources":["../../src/mocks/getCurrentPositionMock.ts"],"names":[],"mappings":";AAAA,MAAM,sBAAsB,GAAsC,eAAe,CAAC,EAAE;IAClF,eAAe,CAAC;QACd,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC;YACX,SAAS,EAAE,CAAC;YACZ,QAAQ,EAAE,CAAC;YACX,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,gBAAgB,EAAE,IAAI;YACtB,KAAK,EAAE,IAAI;SACZ;QACD,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;KACtB,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,SAAS,EAAE,aAAa,EAAE;IACzD,KAAK,EAAE;QACL,kBAAkB,EAAE,sBAAsB;QAC1C,aAAa,EAAE,GAAG,EAAE,GAAE,CAAC;QACvB,UAAU,EAAE,GAAG,EAAE,GAAE,CAAC;KACrB;IACD,YAAY,EAAE,IAAI;CACnB,CAAC,CAAC","sourcesContent":["const getCurrentPositionMock: Geolocation['getCurrentPosition'] = successCallback => {\n successCallback({\n coords: {\n latitude: 0,\n longitude: 0,\n accuracy: 1,\n heading: null,\n altitude: null,\n altitudeAccuracy: null,\n speed: null\n },\n timestamp: Date.now()\n });\n};\n\nObject.defineProperty(globalThis.navigator, 'geolocation', {\n value: {\n getCurrentPosition: getCurrentPositionMock,\n watchPosition: () => {},\n clearWatch: () => {}\n },\n configurable: true\n});\n"]}
1
+ {"version":3,"file":"getCurrentPositionMock.js","sourceRoot":"","sources":["../../src/mocks/getCurrentPositionMock.ts"],"names":[],"mappings":";AAAA,IAAI,OAAO,SAAS,KAAK,WAAW,EAAE,CAAC;IACrC,MAAM,sBAAsB,GAAsC,eAAe,CAAC,EAAE;QAClF,eAAe,CAAC;YACd,MAAM,EAAE;gBACN,QAAQ,EAAE,CAAC;gBACX,SAAS,EAAE,CAAC;gBACZ,QAAQ,EAAE,CAAC;gBACX,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI;gBACd,gBAAgB,EAAE,IAAI;gBACtB,KAAK,EAAE,IAAI;aACZ;YACD,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;SACtB,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,aAAa,EAAE;QAC9C,KAAK,EAAE;YACL,kBAAkB,EAAE,sBAAsB;YAC1C,aAAa,EAAE,GAAG,EAAE,GAAE,CAAC;YACvB,UAAU,EAAE,GAAG,EAAE,GAAE,CAAC;SACrB;QACD,YAAY,EAAE,IAAI;KACnB,CAAC,CAAC;AACL,CAAC","sourcesContent":["if (typeof navigator !== 'undefined') {\n const getCurrentPositionMock: Geolocation['getCurrentPosition'] = successCallback => {\n successCallback({\n coords: {\n latitude: 0,\n longitude: 0,\n accuracy: 1,\n heading: null,\n altitude: null,\n altitudeAccuracy: null,\n speed: null\n },\n timestamp: Date.now()\n });\n };\n\n Object.defineProperty(navigator, 'geolocation', {\n value: {\n getCurrentPosition: getCurrentPositionMock,\n watchPosition: () => {},\n clearWatch: () => {}\n },\n configurable: true\n });\n}\n"]}
@@ -1,9 +1,11 @@
1
+ import './animation';
1
2
  import './createObjectURL';
2
3
  import './createRange';
3
4
  import './createUIDMock';
4
5
  import './elementFromPointMock';
5
6
  import './getCurrentPositionMock';
6
7
  import './iconMock';
8
+ import './innerTextMock';
7
9
  import './intersectionObserverMock';
8
10
  import './mapsAPILoaderMock';
9
11
  import './matchMediaMock';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,eAAe,CAAC;AACvB,OAAO,iBAAiB,CAAC;AACzB,OAAO,wBAAwB,CAAC;AAChC,OAAO,0BAA0B,CAAC;AAClC,OAAO,YAAY,CAAC;AACpB,OAAO,4BAA4B,CAAC;AACpC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,eAAe,CAAC;AACvB,OAAO,cAAc,CAAC;AACtB,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,yBAAyB,CAAC;AACjC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AACrB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,eAAe,CAAC;AACvB,OAAO,iBAAiB,CAAC;AACzB,OAAO,wBAAwB,CAAC;AAChC,OAAO,0BAA0B,CAAC;AAClC,OAAO,YAAY,CAAC;AACpB,OAAO,iBAAiB,CAAC;AACzB,OAAO,4BAA4B,CAAC;AACpC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,eAAe,CAAC;AACvB,OAAO,cAAc,CAAC;AACtB,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,yBAAyB,CAAC;AACjC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,qBAAqB,CAAC"}
@@ -1,9 +1,11 @@
1
+ import './animation';
1
2
  import './createObjectURL';
2
3
  import './createRange';
3
4
  import './createUIDMock';
4
5
  import './elementFromPointMock';
5
6
  import './getCurrentPositionMock';
6
7
  import './iconMock';
8
+ import './innerTextMock';
7
9
  import './intersectionObserverMock';
8
10
  import './mapsAPILoaderMock';
9
11
  import './matchMediaMock';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,eAAe,CAAC;AACvB,OAAO,iBAAiB,CAAC;AACzB,OAAO,wBAAwB,CAAC;AAChC,OAAO,0BAA0B,CAAC;AAClC,OAAO,YAAY,CAAC;AACpB,OAAO,4BAA4B,CAAC;AACpC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,eAAe,CAAC;AACvB,OAAO,cAAc,CAAC;AACtB,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,yBAAyB,CAAC;AACjC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,qBAAqB,CAAC","sourcesContent":["import './createObjectURL';\nimport './createRange';\nimport './createUIDMock';\nimport './elementFromPointMock';\nimport './getCurrentPositionMock';\nimport './iconMock';\nimport './intersectionObserverMock';\nimport './mapsAPILoaderMock';\nimport './matchMediaMock';\nimport './popoverMock';\nimport './qrcodeMock';\nimport './randomUUID';\nimport './scrollIntoView';\nimport './svgGetBBox';\nimport './svgGetScreenCTM';\nimport './svgGetSubStringLength';\nimport './resizeObserverMock';\nimport './useBreakpointMock';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AACrB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,eAAe,CAAC;AACvB,OAAO,iBAAiB,CAAC;AACzB,OAAO,wBAAwB,CAAC;AAChC,OAAO,0BAA0B,CAAC;AAClC,OAAO,YAAY,CAAC;AACpB,OAAO,iBAAiB,CAAC;AACzB,OAAO,4BAA4B,CAAC;AACpC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,eAAe,CAAC;AACvB,OAAO,cAAc,CAAC;AACtB,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,yBAAyB,CAAC;AACjC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,qBAAqB,CAAC","sourcesContent":["import './animation';\nimport './createObjectURL';\nimport './createRange';\nimport './createUIDMock';\nimport './elementFromPointMock';\nimport './getCurrentPositionMock';\nimport './iconMock';\nimport './innerTextMock';\nimport './intersectionObserverMock';\nimport './mapsAPILoaderMock';\nimport './matchMediaMock';\nimport './popoverMock';\nimport './qrcodeMock';\nimport './randomUUID';\nimport './scrollIntoView';\nimport './svgGetBBox';\nimport './svgGetScreenCTM';\nimport './svgGetSubStringLength';\nimport './resizeObserverMock';\nimport './useBreakpointMock';\n"]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=innerTextMock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"innerTextMock.d.ts","sourceRoot":"","sources":["../../src/mocks/innerTextMock.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ if (typeof window !== 'undefined') {
3
+ // innerText is not supported by JSDOM, mock it to use textContent instead.
4
+ Object.defineProperty(window.HTMLElement.prototype, 'innerText', {
5
+ get() {
6
+ return this.textContent;
7
+ },
8
+ set(value) {
9
+ this.textContent = value;
10
+ }
11
+ });
12
+ }
13
+ //# sourceMappingURL=innerTextMock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"innerTextMock.js","sourceRoot":"","sources":["../../src/mocks/innerTextMock.ts"],"names":[],"mappings":";AAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IAClC,2EAA2E;IAC3E,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,EAAE,WAAW,EAAE;QAC/D,GAAG;YACD,OAAO,IAAI,CAAC,WAAW,CAAC;QAC1B,CAAC;QACD,GAAG,CAAC,KAAK;YACP,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAC3B,CAAC;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["if (typeof window !== 'undefined') {\n // innerText is not supported by JSDOM, mock it to use textContent instead.\n Object.defineProperty(window.HTMLElement.prototype, 'innerText', {\n get() {\n return this.textContent;\n },\n set(value) {\n this.textContent = value;\n }\n });\n}\n"]}
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
- window.IntersectionObserver = jest.fn(() => ({
3
- root: null,
4
- rootMargin: '0',
5
- thresholds: [],
6
- takeRecords: () => [],
7
- observe: () => { },
8
- unobserve: () => { },
9
- disconnect: () => { }
10
- }));
2
+ if (typeof window !== 'undefined') {
3
+ window.IntersectionObserver = jest.fn(() => ({
4
+ root: null,
5
+ rootMargin: '0',
6
+ thresholds: [],
7
+ takeRecords: () => [],
8
+ observe: () => { },
9
+ unobserve: () => { },
10
+ disconnect: () => { }
11
+ }));
12
+ }
11
13
  //# sourceMappingURL=intersectionObserverMock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"intersectionObserverMock.js","sourceRoot":"","sources":["../../src/mocks/intersectionObserverMock.ts"],"names":[],"mappings":";AAAA,MAAM,CAAC,oBAAoB,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;IAC3C,IAAI,EAAE,IAAI;IACV,UAAU,EAAE,GAAG;IACf,UAAU,EAAE,EAAE;IACd,WAAW,EAAE,GAAG,EAAE,CAAC,EAAE;IACrB,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC;IACjB,SAAS,EAAE,GAAG,EAAE,GAAE,CAAC;IACnB,UAAU,EAAE,GAAG,EAAE,GAAE,CAAC;CACrB,CAAC,CAAC,CAAC","sourcesContent":["window.IntersectionObserver = jest.fn(() => ({\n root: null,\n rootMargin: '0',\n thresholds: [],\n takeRecords: () => [],\n observe: () => {},\n unobserve: () => {},\n disconnect: () => {}\n}));\n"]}
1
+ {"version":3,"file":"intersectionObserverMock.js","sourceRoot":"","sources":["../../src/mocks/intersectionObserverMock.ts"],"names":[],"mappings":";AAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IAClC,MAAM,CAAC,oBAAoB,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;QAC3C,IAAI,EAAE,IAAI;QACV,UAAU,EAAE,GAAG;QACf,UAAU,EAAE,EAAE;QACd,WAAW,EAAE,GAAG,EAAE,CAAC,EAAE;QACrB,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC;QACjB,SAAS,EAAE,GAAG,EAAE,GAAE,CAAC;QACnB,UAAU,EAAE,GAAG,EAAE,GAAE,CAAC;KACrB,CAAC,CAAC,CAAC;AACN,CAAC","sourcesContent":["if (typeof window !== 'undefined') {\n window.IntersectionObserver = jest.fn(() => ({\n root: null,\n rootMargin: '0',\n thresholds: [],\n takeRecords: () => [],\n observe: () => {},\n unobserve: () => {},\n disconnect: () => {}\n }));\n}\n"]}
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
- window.matchMedia = jest.fn((query) => ({
3
- matches: false,
4
- media: query,
5
- onchange: null,
6
- addListener: () => { },
7
- removeListener: () => { },
8
- addEventListener: () => { },
9
- removeEventListener: () => { },
10
- dispatchEvent: () => false
11
- }));
2
+ if (typeof window !== 'undefined') {
3
+ window.matchMedia = jest.fn((query) => ({
4
+ matches: false,
5
+ media: query,
6
+ onchange: null,
7
+ addListener: () => { },
8
+ removeListener: () => { },
9
+ addEventListener: () => { },
10
+ removeEventListener: () => { },
11
+ dispatchEvent: () => false
12
+ }));
13
+ }
12
14
  //# sourceMappingURL=matchMediaMock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"matchMediaMock.js","sourceRoot":"","sources":["../../src/mocks/matchMediaMock.ts"],"names":[],"mappings":";AAAA,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,KAAa,EAAE,EAAE,CAAC,CAAC;IAC9C,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,KAAK;IACZ,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC;IACrB,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;IACxB,gBAAgB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC1B,mBAAmB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC7B,aAAa,EAAE,GAAG,EAAE,CAAC,KAAK;CAC3B,CAAC,CAAC,CAAC","sourcesContent":["window.matchMedia = jest.fn((query: string) => ({\n matches: false,\n media: query,\n onchange: null,\n addListener: () => {},\n removeListener: () => {},\n addEventListener: () => {},\n removeEventListener: () => {},\n dispatchEvent: () => false\n}));\n"]}
1
+ {"version":3,"file":"matchMediaMock.js","sourceRoot":"","sources":["../../src/mocks/matchMediaMock.ts"],"names":[],"mappings":";AAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IAClC,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,KAAa,EAAE,EAAE,CAAC,CAAC;QAC9C,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC;QACrB,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;QACxB,gBAAgB,EAAE,GAAG,EAAE,GAAE,CAAC;QAC1B,mBAAmB,EAAE,GAAG,EAAE,GAAE,CAAC;QAC7B,aAAa,EAAE,GAAG,EAAE,CAAC,KAAK;KAC3B,CAAC,CAAC,CAAC;AACN,CAAC","sourcesContent":["if (typeof window !== 'undefined') {\n window.matchMedia = jest.fn((query: string) => ({\n matches: false,\n media: query,\n onchange: null,\n addListener: () => {},\n removeListener: () => {},\n addEventListener: () => {},\n removeEventListener: () => {},\n dispatchEvent: () => false\n }));\n}\n"]}
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
- window.MutationObserver = jest.fn(() => {
3
- return {
4
- observe: jest.fn(),
5
- disconnect: jest.fn(),
6
- takeRecords: jest.fn()
7
- };
8
- });
2
+ if (typeof window !== 'undefined') {
3
+ window.MutationObserver = jest.fn(() => {
4
+ return {
5
+ observe: jest.fn(),
6
+ disconnect: jest.fn(),
7
+ takeRecords: jest.fn()
8
+ };
9
+ });
10
+ }
9
11
  //# sourceMappingURL=mutationObserverMock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mutationObserverMock.js","sourceRoot":"","sources":["../../src/mocks/mutationObserverMock.ts"],"names":[],"mappings":";AAAA,MAAM,CAAC,gBAAgB,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE;IACrC,OAAO;QACL,OAAO,EAAE,IAAI,CAAC,EAAE,EAAE;QAClB,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE;QACrB,WAAW,EAAE,IAAI,CAAC,EAAE,EAAE;KACvB,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["window.MutationObserver = jest.fn(() => {\n return {\n observe: jest.fn(),\n disconnect: jest.fn(),\n takeRecords: jest.fn()\n };\n});\n"]}
1
+ {"version":3,"file":"mutationObserverMock.js","sourceRoot":"","sources":["../../src/mocks/mutationObserverMock.ts"],"names":[],"mappings":";AAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IAClC,MAAM,CAAC,gBAAgB,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE;QACrC,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,EAAE,EAAE;YAClB,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE;YACrB,WAAW,EAAE,IAAI,CAAC,EAAE,EAAE;SACvB,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["if (typeof window !== 'undefined') {\n window.MutationObserver = jest.fn(() => {\n return {\n observe: jest.fn(),\n disconnect: jest.fn(),\n takeRecords: jest.fn()\n };\n });\n}\n"]}
@@ -1,3 +1,5 @@
1
1
  import { randomUUID } from 'node:crypto';
2
- window.crypto.randomUUID = () => randomUUID();
2
+ if (typeof window !== 'undefined') {
3
+ window.crypto.randomUUID = () => randomUUID();
4
+ }
3
5
  //# sourceMappingURL=randomUUID.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"randomUUID.js","sourceRoot":"","sources":["../../src/mocks/randomUUID.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,CAAC,MAAM,CAAC,UAAU,GAAG,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC","sourcesContent":["import { randomUUID } from 'node:crypto';\n\nwindow.crypto.randomUUID = () => randomUUID();\n"]}
1
+ {"version":3,"file":"randomUUID.js","sourceRoot":"","sources":["../../src/mocks/randomUUID.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IAClC,MAAM,CAAC,MAAM,CAAC,UAAU,GAAG,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC;AAChD,CAAC","sourcesContent":["import { randomUUID } from 'node:crypto';\n\nif (typeof window !== 'undefined') {\n window.crypto.randomUUID = () => randomUUID();\n}\n"]}
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
- window.ResizeObserver = jest.fn(() => ({
3
- observe: () => { },
4
- unobserve: () => { },
5
- disconnect: () => { }
6
- }));
2
+ if (typeof window !== 'undefined') {
3
+ window.ResizeObserver = jest.fn(() => ({
4
+ observe: () => { },
5
+ unobserve: () => { },
6
+ disconnect: () => { }
7
+ }));
8
+ }
7
9
  //# sourceMappingURL=resizeObserverMock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resizeObserverMock.js","sourceRoot":"","sources":["../../src/mocks/resizeObserverMock.ts"],"names":[],"mappings":";AAAA,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;IACrC,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC;IACjB,SAAS,EAAE,GAAG,EAAE,GAAE,CAAC;IACnB,UAAU,EAAE,GAAG,EAAE,GAAE,CAAC;CACrB,CAAC,CAAC,CAAC","sourcesContent":["window.ResizeObserver = jest.fn(() => ({\n observe: () => {},\n unobserve: () => {},\n disconnect: () => {}\n}));\n"]}
1
+ {"version":3,"file":"resizeObserverMock.js","sourceRoot":"","sources":["../../src/mocks/resizeObserverMock.ts"],"names":[],"mappings":";AAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IAClC,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;QACrC,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC;QACjB,SAAS,EAAE,GAAG,EAAE,GAAE,CAAC;QACnB,UAAU,EAAE,GAAG,EAAE,GAAE,CAAC;KACrB,CAAC,CAAC,CAAC;AACN,CAAC","sourcesContent":["if (typeof window !== 'undefined') {\n window.ResizeObserver = jest.fn(() => ({\n observe: () => {},\n unobserve: () => {},\n disconnect: () => {}\n }));\n}\n"]}
@@ -1,3 +1,5 @@
1
1
  "use strict";
2
- window.Element.prototype.scrollIntoView = () => { };
2
+ if (typeof window !== 'undefined') {
3
+ window.Element.prototype.scrollIntoView = () => { };
4
+ }
3
5
  //# sourceMappingURL=scrollIntoView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"scrollIntoView.js","sourceRoot":"","sources":["../../src/mocks/scrollIntoView.ts"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,cAAc,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC","sourcesContent":["window.Element.prototype.scrollIntoView = () => {};\n"]}
1
+ {"version":3,"file":"scrollIntoView.js","sourceRoot":"","sources":["../../src/mocks/scrollIntoView.ts"],"names":[],"mappings":";AAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IAClC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,cAAc,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;AACrD,CAAC","sourcesContent":["if (typeof window !== 'undefined') {\n window.Element.prototype.scrollIntoView = () => {};\n}\n"]}
@@ -1,18 +1,20 @@
1
1
  "use strict";
2
- // JSDom mock for `getBBox` method on SVG graphic nodes
3
- // https://developer.mozilla.org/en-US/docs/Web/API/SVGGraphicsElement/getBBox
4
- // Need to attach to SVGElement.protype because JSDOM does not implement SVGGraphicsElement.
5
- window.SVGElement.prototype.getBBox = () => ({
6
- x: 0,
7
- y: 0,
8
- width: 10,
9
- height: 10,
10
- top: 0,
11
- bottom: 10,
12
- left: 0,
13
- right: 10,
14
- toJSON() {
15
- return this;
16
- }
17
- });
2
+ if (typeof window !== 'undefined') {
3
+ // JSDom mock for `getBBox` method on SVG graphic nodes
4
+ // https://developer.mozilla.org/en-US/docs/Web/API/SVGGraphicsElement/getBBox
5
+ // Need to attach to SVGElement.protype because JSDOM does not implement SVGGraphicsElement.
6
+ window.SVGElement.prototype.getBBox = () => ({
7
+ x: 0,
8
+ y: 0,
9
+ width: 10,
10
+ height: 10,
11
+ top: 0,
12
+ bottom: 10,
13
+ left: 0,
14
+ right: 10,
15
+ toJSON() {
16
+ return this;
17
+ }
18
+ });
19
+ }
18
20
  //# sourceMappingURL=svgGetBBox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"svgGetBBox.js","sourceRoot":"","sources":["../../src/mocks/svgGetBBox.ts"],"names":[],"mappings":";AAAA,uDAAuD;AACvD,8EAA8E;AAE9E,4FAA4F;AAC3F,MAAM,CAAC,UAAU,CAAC,SAAgC,CAAC,OAAO,GAAG,GAAG,EAAE,CAAC,CAAC;IACnE,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE;IACV,GAAG,EAAE,CAAC;IACN,MAAM,EAAE,EAAE;IACV,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,EAAE;IACT,MAAM;QACJ,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAC,CAAC","sourcesContent":["// JSDom mock for `getBBox` method on SVG graphic nodes\n// https://developer.mozilla.org/en-US/docs/Web/API/SVGGraphicsElement/getBBox\n\n// Need to attach to SVGElement.protype because JSDOM does not implement SVGGraphicsElement.\n(window.SVGElement.prototype as SVGGraphicsElement).getBBox = () => ({\n x: 0,\n y: 0,\n width: 10,\n height: 10,\n top: 0,\n bottom: 10,\n left: 0,\n right: 10,\n toJSON() {\n return this;\n }\n});\n"]}
1
+ {"version":3,"file":"svgGetBBox.js","sourceRoot":"","sources":["../../src/mocks/svgGetBBox.ts"],"names":[],"mappings":";AAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IAClC,uDAAuD;IACvD,8EAA8E;IAE9E,4FAA4F;IAC3F,MAAM,CAAC,UAAU,CAAC,SAAgC,CAAC,OAAO,GAAG,GAAG,EAAE,CAAC,CAAC;QACnE,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,GAAG,EAAE,CAAC;QACN,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,EAAE;QACT,MAAM;YACJ,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["if (typeof window !== 'undefined') {\n // JSDom mock for `getBBox` method on SVG graphic nodes\n // https://developer.mozilla.org/en-US/docs/Web/API/SVGGraphicsElement/getBBox\n\n // Need to attach to SVGElement.protype because JSDOM does not implement SVGGraphicsElement.\n (window.SVGElement.prototype as SVGGraphicsElement).getBBox = () => ({\n x: 0,\n y: 0,\n width: 10,\n height: 10,\n top: 0,\n bottom: 10,\n left: 0,\n right: 10,\n toJSON() {\n return this;\n }\n });\n}\n"]}
@@ -1,14 +1,16 @@
1
1
  "use strict";
2
- // JSDom Polyfill for `getScreenCTM` method on SVG graphic nodes
3
- // https://developer.mozilla.org/en-US/docs/Web/API/SVGGraphicsElement
4
- // Similar issue: https://github.com/apexcharts/react-apexcharts/issues/52#issuecomment-844757362
5
- // Need to attach to SVGElement.protype because JSDOM does not implement SVGGraphicsElement.
6
- window.SVGElement.prototype.getScreenCTM = () => ({
7
- a: 0,
8
- b: 0,
9
- c: 0,
10
- d: 0,
11
- e: 0,
12
- f: 0
13
- });
2
+ if (typeof window !== 'undefined') {
3
+ // JSDom Polyfill for `getScreenCTM` method on SVG graphic nodes
4
+ // https://developer.mozilla.org/en-US/docs/Web/API/SVGGraphicsElement
5
+ // Similar issue: https://github.com/apexcharts/react-apexcharts/issues/52#issuecomment-844757362
6
+ // Need to attach to SVGElement.protype because JSDOM does not implement SVGGraphicsElement.
7
+ window.SVGElement.prototype.getScreenCTM = () => ({
8
+ a: 0,
9
+ b: 0,
10
+ c: 0,
11
+ d: 0,
12
+ e: 0,
13
+ f: 0
14
+ });
15
+ }
14
16
  //# sourceMappingURL=svgGetScreenCTM.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"svgGetScreenCTM.js","sourceRoot":"","sources":["../../src/mocks/svgGetScreenCTM.ts"],"names":[],"mappings":";AAAA,gEAAgE;AAChE,sEAAsE;AACtE,iGAAiG;AAEjG,4FAA4F;AAC3F,MAAM,CAAC,UAAU,CAAC,SAAgC,CAAC,YAAY,GAAG,GAAG,EAAE,CACtE,CAAC;IACC,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;CACL,CAAc,CAAC","sourcesContent":["// JSDom Polyfill for `getScreenCTM` method on SVG graphic nodes\n// https://developer.mozilla.org/en-US/docs/Web/API/SVGGraphicsElement\n// Similar issue: https://github.com/apexcharts/react-apexcharts/issues/52#issuecomment-844757362\n\n// Need to attach to SVGElement.protype because JSDOM does not implement SVGGraphicsElement.\n(window.SVGElement.prototype as SVGGraphicsElement).getScreenCTM = () =>\n ({\n a: 0,\n b: 0,\n c: 0,\n d: 0,\n e: 0,\n f: 0\n }) as DOMMatrix;\n"]}
1
+ {"version":3,"file":"svgGetScreenCTM.js","sourceRoot":"","sources":["../../src/mocks/svgGetScreenCTM.ts"],"names":[],"mappings":";AAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IAClC,gEAAgE;IAChE,sEAAsE;IACtE,iGAAiG;IAEjG,4FAA4F;IAC3F,MAAM,CAAC,UAAU,CAAC,SAAgC,CAAC,YAAY,GAAG,GAAG,EAAE,CACtE,CAAC;QACC,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;KACL,CAAc,CAAC;AACpB,CAAC","sourcesContent":["if (typeof window !== 'undefined') {\n // JSDom Polyfill for `getScreenCTM` method on SVG graphic nodes\n // https://developer.mozilla.org/en-US/docs/Web/API/SVGGraphicsElement\n // Similar issue: https://github.com/apexcharts/react-apexcharts/issues/52#issuecomment-844757362\n\n // Need to attach to SVGElement.protype because JSDOM does not implement SVGGraphicsElement.\n (window.SVGElement.prototype as SVGGraphicsElement).getScreenCTM = () =>\n ({\n a: 0,\n b: 0,\n c: 0,\n d: 0,\n e: 0,\n f: 0\n }) as DOMMatrix;\n}\n"]}
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
- // JSDom Polyfill for `getSubStringLength` method on SVG text nodes
3
- // https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement
4
- // https://webplatform.github.io/docs/svg/methods/getSubStringLength/
5
- // Need to attach to SVGElement.protype because JSDOM does not implement SVGTextContentElement.
6
- window.SVGElement.prototype.getSubStringLength =
7
- // Mock: Assumes each character takes 10px width on an average and returns the substring width
8
- (charnum, nchars) => nchars * 10;
2
+ if (typeof window !== 'undefined') {
3
+ // JSDom Polyfill for `getSubStringLength` method on SVG text nodes
4
+ // https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement
5
+ // https://webplatform.github.io/docs/svg/methods/getSubStringLength/
6
+ // Need to attach to SVGElement.protype because JSDOM does not implement SVGTextContentElement.
7
+ window.SVGElement.prototype.getSubStringLength =
8
+ // Mock: Assumes each character takes 10px width on an average and returns the substring width
9
+ (charnum, nchars) => nchars * 10;
10
+ }
9
11
  //# sourceMappingURL=svgGetSubStringLength.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"svgGetSubStringLength.js","sourceRoot":"","sources":["../../src/mocks/svgGetSubStringLength.ts"],"names":[],"mappings":";AAAA,mEAAmE;AACnE,yEAAyE;AACzE,qEAAqE;AAErE,+FAA+F;AAC9F,MAAM,CAAC,UAAU,CAAC,SAAmC,CAAC,kBAAkB;IACvE,8FAA8F;IAC9F,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC","sourcesContent":["// JSDom Polyfill for `getSubStringLength` method on SVG text nodes\n// https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement\n// https://webplatform.github.io/docs/svg/methods/getSubStringLength/\n\n// Need to attach to SVGElement.protype because JSDOM does not implement SVGTextContentElement.\n(window.SVGElement.prototype as SVGTextContentElement).getSubStringLength =\n // Mock: Assumes each character takes 10px width on an average and returns the substring width\n (charnum, nchars) => nchars * 10;\n"]}
1
+ {"version":3,"file":"svgGetSubStringLength.js","sourceRoot":"","sources":["../../src/mocks/svgGetSubStringLength.ts"],"names":[],"mappings":";AAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IAClC,mEAAmE;IACnE,yEAAyE;IACzE,qEAAqE;IAErE,+FAA+F;IAC9F,MAAM,CAAC,UAAU,CAAC,SAAmC,CAAC,kBAAkB;QACvE,8FAA8F;QAC9F,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC;AACrC,CAAC","sourcesContent":["if (typeof window !== 'undefined') {\n // JSDom Polyfill for `getSubStringLength` method on SVG text nodes\n // https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement\n // https://webplatform.github.io/docs/svg/methods/getSubStringLength/\n\n // Need to attach to SVGElement.protype because JSDOM does not implement SVGTextContentElement.\n (window.SVGElement.prototype as SVGTextContentElement).getSubStringLength =\n // Mock: Assumes each character takes 10px width on an average and returns the substring width\n (charnum, nchars) => nchars * 10;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/cosmos-react-test-utils",
3
- "version": "8.0.0-build.26.7",
3
+ "version": "8.0.0-build.26.9",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/pegasystems/cosmos-react.git",
@@ -22,7 +22,7 @@
22
22
  "build": "tsc -b tsconfig.build.json"
23
23
  },
24
24
  "dependencies": {
25
- "@pega/cosmos-react-core": "8.0.0-build.26.7",
25
+ "@pega/cosmos-react-core": "8.0.0-build.26.9",
26
26
  "@testing-library/dom": "^10.3.0",
27
27
  "@testing-library/react": "^16.0.0",
28
28
  "@testing-library/user-event": "^14.5.1",