@applicaster/zapp-react-native-utils 12.0.0-alpha.5035843303 → 12.0.0-alpha.5053228432

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 (56) hide show
  1. package/actionsExecutor/ActionExecutorContext.tsx +16 -8
  2. package/analyticsUtils/__tests__/analyticsManager.test.js +75 -73
  3. package/analyticsUtils/helpers/hooks.ts +1 -1
  4. package/appUtils/focusManager/treeDataStructure/Utils/index.js +12 -3
  5. package/appUtils/keyCodes/__tests__/__snapshots__/keyCodes.test.js.snap +1 -1
  6. package/appUtils/keyCodes/__tests__/keyCodes.test.js +80 -85
  7. package/appUtils/keyCodes/keys.web.js +1 -0
  8. package/appUtils/orientationHelper.ts +1 -1
  9. package/appUtils/playerManager/OverlayObserver/OverlaysObserver.ts +53 -0
  10. package/appUtils/playerManager/conts.ts +5 -1
  11. package/appUtils/playerManager/player.ts +45 -13
  12. package/appUtils/playerManager/playerFactory.ts +13 -1
  13. package/appUtils/playerManager/playerNative.ts +30 -0
  14. package/appUtils/playerManager/usePlayerState.tsx +13 -1
  15. package/appUtils/playerManager/usePlayerTitleSummaryOverlay.tsx +50 -0
  16. package/cellUtils/__tests__/cellUtils.test.ts +59 -0
  17. package/cellUtils/__tests__/fixtures.ts +13 -0
  18. package/cellUtils/index.ts +44 -2
  19. package/focusManager/index.ts +1 -1
  20. package/functionUtils/__tests__/__snapshots__/functionUtils.test.js.snap +2 -2
  21. package/functionUtils/__tests__/functionUtils.test.js +244 -248
  22. package/localizationUtils/__tests__/localizationUtils.test.ts +17 -13
  23. package/localizationUtils/index.ts +6 -3
  24. package/logger/index.ts +1 -1
  25. package/manifestUtils/defaultManifestConfigurations/player.js +8 -0
  26. package/modalState/index.ts +57 -0
  27. package/navigationUtils/index.ts +52 -7
  28. package/package.json +3 -2
  29. package/playerUtils/configurationGenerator.ts +8 -0
  30. package/pluginUtils/index.ts +11 -7
  31. package/reactHooks/cell-click/__tests__/index.test.js +6 -2
  32. package/reactHooks/cell-click/index.ts +2 -2
  33. package/reactHooks/device/index.ts +0 -1
  34. package/reactHooks/device/useIsTablet.tsx +28 -3
  35. package/reactHooks/device/useMemoizedIsTablet.ts +1 -1
  36. package/reactHooks/device/useOrientation.tsx +3 -1
  37. package/reactHooks/flatList/useLoadNextPageIfNeeded.ts +16 -9
  38. package/reactHooks/index.ts +2 -0
  39. package/reactHooks/layout/__tests__/index.test.js +22 -30
  40. package/reactHooks/layout/index.ts +2 -1
  41. package/reactHooks/layout/useDimensions/helpers/__tests__/getInitialDimensions.native.test.js +11 -16
  42. package/reactHooks/layout/useDimensions/helpers/__tests__/getInitialDimensions.test.js +12 -14
  43. package/reactHooks/navigation/__tests__/index.test.tsx +216 -75
  44. package/reactHooks/navigation/index.ts +201 -85
  45. package/reactHooks/screen/index.ts +2 -0
  46. package/reactHooks/screen/useScreenData.ts +1 -1
  47. package/reactHooks/screen/useTargetScreenData.ts +7 -0
  48. package/reactHooks/state/useRivers.ts +3 -1
  49. package/reactHooks/useListenEventBusEvent.ts +6 -12
  50. package/reactHooks/videoModal/hooks/useVideoModalScreenData.tsx +10 -9
  51. package/riverComponetsMeasurementProvider/index.tsx +2 -2
  52. package/screenState/index.ts +8 -0
  53. package/zappFrameworkUtils/loginPluginUtils.ts +12 -2
  54. package/reactHooks/device/useIsTablet.android.tsx +0 -14
  55. package/reactHooks/device/useIsTablet.ios.tsx +0 -7
  56. package/reactHooks/device/useIsTablet.web.tsx +0 -3
@@ -42,7 +42,7 @@ export class Player {
42
42
 
43
43
  protected startPosition?: number | null;
44
44
  readonly playerRole: PlayerRole = PlayerRole.Unspecified;
45
- private chaptersObserver?: OverlaysObserver | null;
45
+ private overlaysObserver?: OverlaysObserver | null;
46
46
  private entryObservable?: BehaviorSubject<ZappEntry> | null;
47
47
 
48
48
  protected listeners: {
@@ -77,7 +77,7 @@ export class Player {
77
77
  audioTracks: [],
78
78
  audioTrackId: null,
79
79
  textTrackId: null,
80
- },
80
+ }
81
81
  };
82
82
 
83
83
  this.playerId = props.playerId || "error, no player id";
@@ -95,11 +95,11 @@ export class Player {
95
95
  }
96
96
 
97
97
  getOverlayObservable = () => {
98
- if (!this.chaptersObserver) {
99
- this.chaptersObserver = new OverlaysObserver({ player: this });
98
+ if (!this.overlaysObserver) {
99
+ this.overlaysObserver = new OverlaysObserver({ player: this });
100
100
  }
101
101
 
102
- return this.chaptersObserver;
102
+ return this.overlaysObserver;
103
103
  };
104
104
 
105
105
  getEntryObservable = (): BehaviorSubject<ZappEntry | null> => {
@@ -278,6 +278,10 @@ export class Player {
278
278
  return this.playerState.isBuffering;
279
279
  };
280
280
 
281
+ isReadyToPlay = (): boolean => {
282
+ return this.playerState.isReadyToPlay;
283
+ };
284
+
281
285
  // Methods to call actions on the player
282
286
  seekTo = (_position: number) => {};
283
287
 
@@ -355,13 +359,6 @@ export class Player {
355
359
  });
356
360
  };
357
361
 
358
- onVideoError = (error: Error) => {
359
- this.invokeListenersUpdate({
360
- callbackName: SharedPlayerCallBacksKeys.OnVideoError,
361
- event: error,
362
- });
363
- };
364
-
365
362
  onError = (error: Error) => {
366
363
  this.invokeListenersUpdate({
367
364
  callbackName: SharedPlayerCallBacksKeys.OnError,
@@ -417,6 +414,30 @@ export class Player {
417
414
  });
418
415
  };
419
416
 
417
+ onVideoFullscreenPlayerWillDismiss = () => {
418
+ this.invokeListenersUpdate({
419
+ callbackName: SharedPlayerCallBacksKeys.onVideoFullscreenPlayerWillDismiss
420
+ });
421
+ };
422
+
423
+ onVideoFullscreenPlayerDidDismiss = () => {
424
+ this.invokeListenersUpdate({
425
+ callbackName: SharedPlayerCallBacksKeys.onVideoFullscreenPlayerDidDismiss
426
+ });
427
+ };
428
+
429
+ onVideoFullscreenPlayerWillPresent = () => {
430
+ this.invokeListenersUpdate({
431
+ callbackName: SharedPlayerCallBacksKeys.onVideoFullscreenPlayerWillPresent
432
+ });
433
+ };
434
+
435
+ onVideoFullscreenPlayerDidPresent = () => {
436
+ this.invokeListenersUpdate({
437
+ callbackName: SharedPlayerCallBacksKeys.onVideoFullscreenPlayerDidPresent
438
+ });
439
+ };
440
+
420
441
  public invokeListenersUpdate = ({
421
442
  callbackName,
422
443
  event = {},
@@ -627,7 +648,6 @@ export class Player {
627
648
  onPlayerSeekComplete: this.onSeekComplete,
628
649
  onVideoEnd: this.onVideoEnd,
629
650
  onError: this.onError,
630
- onVideoError: this.onVideoError,
631
651
  onLoad: this.onLoad,
632
652
  onPlayerPause: this.onPlayerPause,
633
653
  onPlayerResume: this.onPlayerResume,
@@ -638,6 +658,12 @@ export class Player {
638
658
  onBufferStart: this.onBufferStart,
639
659
  onBufferComplete: this.onBufferComplete,
640
660
 
661
+ onPlayerClose: this.onPlayerClose,
662
+ onVideoFullscreenPlayerWillPresent: this.onVideoFullscreenPlayerWillPresent,
663
+ onVideoFullscreenPlayerDidPresent: this.onVideoFullscreenPlayerDidPresent,
664
+ onVideoFullscreenPlayerWillDismiss: this.onVideoFullscreenPlayerWillDismiss,
665
+ onVideoFullscreenPlayerDidDismiss: this.onVideoFullscreenPlayerDidDismiss,
666
+
641
667
  // Ads Callbacks:
642
668
  onAdBegin: this.onAdBegin,
643
669
  onAdBreakBegin: this.onAdBreakBegin,
@@ -660,6 +686,10 @@ export class Player {
660
686
  _selected?: QuickBrickPlayer.TextTrack | QuickBrickPlayer.AudioTrack
661
687
  ) => {};
662
688
 
689
+ setPlaybackRate = (_rate) => {};
690
+ startSleepTimer = (_timestamp) => {};
691
+ cancelSleepTimer = () => {};
692
+
663
693
  getPluginConfiguration = () => null;
664
694
  appStateChange = (_appState, _previousAppState) => {};
665
695
 
@@ -693,4 +723,6 @@ export class Player {
693
723
  isFullScreenSupported(): boolean {
694
724
  return true;
695
725
  }
726
+
727
+ public supportsNativeControls = ():boolean => false
696
728
  }
@@ -1,17 +1,29 @@
1
1
  import { appStore } from "@applicaster/zapp-react-native-redux/AppStore";
2
2
  import { findPluginByIdentifier } from "@applicaster/zapp-react-native-utils/pluginUtils";
3
3
  import { Player } from "./player";
4
+ import { PlayerRole } from "./conts";
4
5
 
5
6
  type PlayerFactoryItem = {
6
7
  Component: any;
7
8
  controller: Player;
8
9
  };
9
10
 
11
+ type PlayerFactoryProps = {
12
+ player: any,
13
+ playerId: string,
14
+ autoplay: boolean,
15
+ entry: ZappEntry,
16
+ muted: boolean,
17
+ playerPluginId: string,
18
+ screenConfig: Record<string, any>,
19
+ playerRole: PlayerRole,
20
+ }
21
+
10
22
  interface PlayerConstructor {
11
23
  new (params: any): Player;
12
24
  }
13
25
 
14
- export const playerFactory = (config: any): PlayerFactoryItem | null => {
26
+ export const playerFactory = (config: PlayerFactoryProps): PlayerFactoryItem | null => {
15
27
  const IDENTIFIER = config?.playerPluginId;
16
28
 
17
29
  if (!IDENTIFIER) {
@@ -5,6 +5,7 @@ import { Player } from "./player";
5
5
  import { findNodeHandle, NativeModules } from "react-native";
6
6
  import { isApplePlatform } from "../../reactUtils";
7
7
  import { PlayerRole } from "./conts";
8
+ import { toBooleanWithDefaultFalse } from "../../booleanUtils";
8
9
 
9
10
  const RNPlayerManager = {
10
11
  QuickBrickPlayerPlugin: isApplePlatform()
@@ -41,6 +42,9 @@ const PlayerModuleFuncNames = {
41
42
  rewind: "rewind",
42
43
  play: "play",
43
44
  pause: "pause",
45
+ startSleepTimer: "startSleepTimer",
46
+ cancelSleepTimer: "cancelSleepTimer",
47
+ getSleepTimerEnd: "getSleepTimerEnd",
44
48
  };
45
49
 
46
50
  export class PlayerNative extends Player {
@@ -172,6 +176,25 @@ export class PlayerNative extends Player {
172
176
  }
173
177
  };
174
178
 
179
+ startSleepTimer = (sleepTimestamp: number) => {
180
+ if (
181
+ !this.invokeNativeFunction(
182
+ PlayerModuleFuncNames.startSleepTimer,
183
+ sleepTimestamp
184
+ )
185
+ ) {
186
+ this.currentPlayerComponent()?.["startSleepTimer"](sleepTimestamp);
187
+ }
188
+ };
189
+
190
+ cancelSleepTimer = () => {
191
+ if (!this.invokeNativeFunction(PlayerModuleFuncNames.cancelSleepTimer)) {
192
+ this.currentPlayerComponent()?.[
193
+ PlayerModuleFuncNames.cancelSleepTimer
194
+ ]?.();
195
+ }
196
+ };
197
+
175
198
  disableBufferAnimation = (): boolean => false;
176
199
 
177
200
  setLanguage = (
@@ -180,6 +203,10 @@ export class PlayerNative extends Player {
180
203
  this.currentPlayerComponent()?.["setLanguage"]?.(selected);
181
204
  };
182
205
 
206
+ setPlaybackRate = (rate: number) => {
207
+ this.currentPlayerComponent()?.["setPlaybackRate"]?.(rate);
208
+ };
209
+
183
210
  getPluginConfiguration = () => {
184
211
  return (this.currentPlayerComponent() as any)?.props?.pluginConfiguration;
185
212
  };
@@ -265,4 +292,7 @@ export class PlayerNative extends Player {
265
292
 
266
293
  return !(isFullScreenAudioPlayer && this.isAudioItem());
267
294
  };
295
+
296
+ supportsNativeControls = (): boolean =>
297
+ toBooleanWithDefaultFalse(this.getConfig()?.["supports_native_controls"]);
268
298
  }
@@ -9,6 +9,7 @@ type PlayerState = {
9
9
  isLive: boolean;
10
10
  isPaused: boolean;
11
11
  isBuffering: boolean;
12
+ isReadyToPlay: boolean;
12
13
  };
13
14
 
14
15
  export const usePlayerState = (
@@ -20,12 +21,14 @@ export const usePlayerState = (
20
21
  const [seekableDuration, setSeekableDuration] = React.useState<number>(null);
21
22
  const [isLive, setIsLive] = React.useState<boolean>(null);
22
23
  const [isBuffering, setIsBuffering] = React.useState<boolean>(false);
24
+ const [isReadyToPlay, setIsReadyToPlay] = React.useState<boolean>(false);
23
25
  const [isPaused, setIsPaused] = React.useState<boolean>(false);
24
26
 
25
27
  const player: Player = usePlayer(playerId);
26
28
 
27
29
  const onPlayerChangeState = React.useCallback(() => {
28
30
  setIsBuffering(player.isBuffering());
31
+ setIsReadyToPlay(player.isReadyToPlay);
29
32
  setCurrentTime(player.getContentPosition());
30
33
  setDuration(player.getDuration());
31
34
  setSeekableDuration(player.getSeekableDuration());
@@ -60,7 +63,16 @@ export const usePlayerState = (
60
63
  isLive,
61
64
  isPaused,
62
65
  isBuffering,
66
+ isReadyToPlay,
63
67
  }),
64
- [currentTime, duration, seekableDuration, isLive, isPaused, isBuffering]
68
+ [
69
+ currentTime,
70
+ duration,
71
+ seekableDuration,
72
+ isLive,
73
+ isPaused,
74
+ isBuffering,
75
+ isReadyToPlay,
76
+ ]
65
77
  );
66
78
  };
@@ -0,0 +1,50 @@
1
+ import { useEffect, useState } from "react";
2
+ import { OverlaysObserver } from "./OverlayObserver/OverlaysObserver";
3
+ import { useFeedLoader } from "../../reactHooks";
4
+ import { usePlayer } from "./usePlayer";
5
+
6
+ export const useTitleSummaryOverlay = (
7
+ feedUrl,
8
+ entry,
9
+ isLive = false,
10
+ interval: number
11
+ ) => {
12
+ const player = usePlayer();
13
+ const [title, setTitle] = useState<string | number>(entry?.title || "");
14
+ const [summary, setSummary] = useState<string | number>(entry?.summary || "");
15
+
16
+ // Hook to load feed data
17
+ const { data: feedData, reloadData } = useFeedLoader({ feedUrl });
18
+
19
+ useEffect(() => {
20
+ if (player && feedUrl && isLive) {
21
+ const observer = new OverlaysObserver({ player });
22
+
23
+ observer.setFeedDataHandlers(feedUrl, reloadData, interval, (entry) => {
24
+ setTitle(entry?.title || "");
25
+ setSummary(entry?.summary || "");
26
+ });
27
+
28
+ const subscription = observer
29
+ .getTitleSummaryObservable()
30
+ .subscribe(({ title, summary }) => {
31
+ setTitle(title);
32
+ setSummary(summary);
33
+ });
34
+
35
+ return () => {
36
+ subscription.unsubscribe();
37
+ observer.clearFeedDataInterval();
38
+ };
39
+ }
40
+ }, [player, feedUrl, reloadData, isLive]);
41
+
42
+ useEffect(() => {
43
+ if (isLive && feedData?.entry?.[0]) {
44
+ setTitle(feedData.entry[0].title || "");
45
+ setSummary(feedData.entry[0].summary || "");
46
+ }
47
+ }, [feedData]);
48
+
49
+ return { title, summary };
50
+ };
@@ -14,6 +14,7 @@ import {
14
14
  castAndFallbackColor,
15
15
  compact,
16
16
  getValue,
17
+ getColorFromData,
17
18
  } from "../";
18
19
 
19
20
  import {
@@ -23,6 +24,7 @@ import {
23
24
  EMPTY,
24
25
  FALLBACK,
25
26
  TRANSFORM,
27
+ defaultColor,
26
28
  } from "./fixtures";
27
29
 
28
30
  describe("getKeyForLabel", () => {
@@ -388,3 +390,60 @@ describe("getValue", () => {
388
390
  expect(getValue({ value })(value)).toBeNull();
389
391
  });
390
392
  });
393
+
394
+ describe("getColorFromData", () => {
395
+ it("should return value directly if valid color", () => {
396
+ const result = getColorFromData({
397
+ data: entry,
398
+ key: "background_color",
399
+ getValue: getValue(componentStyle),
400
+ defaultColor,
401
+ });
402
+
403
+ expect(result).toBe("#123456");
404
+ });
405
+
406
+ it("should return valid rgba color name", () => {
407
+ const result = getColorFromData({
408
+ data: entry,
409
+ key: "component_background_color",
410
+ getValue: getValue(componentStyle),
411
+ defaultColor,
412
+ });
413
+
414
+ expect(result).toBe("rgba(255, 255, 255, 0)");
415
+ });
416
+
417
+ it("should return path value if path value is set and is valid color", () => {
418
+ const result = getColorFromData({
419
+ data: entry,
420
+ key: VAL.colorKeyPath,
421
+ getValue: getValue(componentStyle),
422
+ defaultColor,
423
+ });
424
+
425
+ expect(result).toBe("#123456");
426
+ });
427
+
428
+ it("should return defaultColor if key value and path value are invalid", () => {
429
+ const result = getColorFromData({
430
+ data: entry,
431
+ key: VAL.invalidColorKey,
432
+ getValue: getValue(componentStyle),
433
+ defaultColor,
434
+ });
435
+
436
+ expect(result).toBe(defaultColor);
437
+ });
438
+
439
+ it("should return defaultColor if path does not exist", () => {
440
+ const result = getColorFromData({
441
+ data: entry,
442
+ key: VAL.invalidColorKeyPath,
443
+ getValue: getValue(componentStyle),
444
+ defaultColor,
445
+ });
446
+
447
+ expect(result).toBe(defaultColor);
448
+ });
449
+ });
@@ -1,5 +1,7 @@
1
1
  /* eslint-disable max-len */
2
2
 
3
+ export const defaultColor = "#ffffff";
4
+
3
5
  export const entry = {
4
6
  type: {
5
7
  value: "video",
@@ -26,7 +28,9 @@ export const entry = {
26
28
  type: "video/mp4",
27
29
  src: "https://wino-feed.s3.amazonaws.com/movieFeed/Ford+v+Ferrari.mp4",
28
30
  },
31
+ background_color: "#123456",
29
32
  extensions: {
33
+ background_color: "#123456",
30
34
  free: false,
31
35
  duration: 9000,
32
36
  section: "New Releases",
@@ -46,7 +50,11 @@ export const componentStyle = {
46
50
  horizontal_list_cell_width: "400",
47
51
  cell_plugin_configuration_id: "267bd05a-08bd-4675-bdd3-9b73899773f0",
48
52
  horizontal_list_scaled_switch: false,
53
+ background_color: "#123456",
49
54
  component_background_color: "rgba(255, 255, 255, 0)",
55
+ background_color_1: "extensions.background_color",
56
+ background_color_2: "invalidColorKey",
57
+ background_color_3: "extensions.invalidColorKeyPath",
50
58
  component_padding_left: "",
51
59
  horizontal_list_next_offset: 20,
52
60
  component_margin_bottom: "",
@@ -93,6 +101,11 @@ export const VAL = {
93
101
  upper: "STRING",
94
102
  width: 400,
95
103
  height: 225,
104
+ colorKey: "background_color",
105
+ colorKeyRgba: "component_background_color",
106
+ colorKeyPath: "background_color_1",
107
+ invalidColorKey: "background_color_2",
108
+ invalidColorKeyPath: "background_color_3",
96
109
  };
97
110
 
98
111
  export const TRANSFORM = {
@@ -1,5 +1,6 @@
1
1
  import * as R from "ramda";
2
2
  import dayjs from "dayjs";
3
+ import validateColor from "validate-color";
3
4
 
4
5
  import { toNumberWithDefault, toNumberWithDefaultZero } from "../numberUtils";
5
6
  import { transformColorCode as fixColorHexCode } from "../transform";
@@ -181,8 +182,8 @@ export const getHeight = (width, aspectRatio) => {
181
182
  * @returns {string} duration
182
183
  */
183
184
 
184
- export const getDurationInMinutes = (seconds: number): string => {
185
- if (seconds === (null || undefined)) return "00:00";
185
+ export const getDurationInMinutes = (seconds?: number): string => {
186
+ if (!seconds) return "00:00";
186
187
  const minutes = Math.floor(Number(seconds) / 60);
187
188
  const secondsReminder = Math.floor(Number(seconds)) % 60;
188
189
  const pad = (num: number): string => `${num < 10 ? "0" : ""}${num}`;
@@ -343,6 +344,19 @@ export const ifElseFocused = R.curry(
343
344
  state === "focused" ? focusedValue : defaultValue
344
345
  );
345
346
 
347
+ export const ifElseSelected = R.curry(
348
+ (state: string, selectedValue, defaultValue) => {
349
+ switch (state) {
350
+ case "selected":
351
+ return selectedValue;
352
+ case "focused_selected":
353
+ return selectedValue;
354
+ default:
355
+ return defaultValue;
356
+ }
357
+ }
358
+ );
359
+
346
360
  /**
347
361
  * Map textAlign values to their corresponding alignSelf values
348
362
  * This is so that we could use the same field for both properties
@@ -430,3 +444,31 @@ export const toResizeMode = (
430
444
  resizeMode: "contain",
431
445
  };
432
446
  };
447
+
448
+ type GetColorFromData = {
449
+ data: Record<string, any>;
450
+ key: string;
451
+ getValue: Function;
452
+ defaultColor: string;
453
+ };
454
+
455
+ export const getColorFromData = ({
456
+ data,
457
+ key,
458
+ getValue,
459
+ defaultColor,
460
+ }: GetColorFromData): string => {
461
+ const value = getValue(key);
462
+
463
+ if (validateColor(value)) {
464
+ return value;
465
+ }
466
+
467
+ const pathValue = R.path(value.split("."), data);
468
+
469
+ if (pathValue && validateColor(pathValue)) {
470
+ return pathValue;
471
+ }
472
+
473
+ return defaultColor;
474
+ };
@@ -86,7 +86,7 @@ export const isFocusable = (component: ZappEntry | ZappUIComponent | any) =>
86
86
 
87
87
  type Props = {
88
88
  component: ZappUIComponent;
89
- zappPipesData: ZappPipesData;
89
+ zappPipesData?: ZappPipesData;
90
90
  } & Record<string, any>;
91
91
 
92
92
  export const useIsFocusable = (props: Props): void => {
@@ -1,6 +1,6 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`subscriber can be invoked without args 1`] = `
3
+ exports[`functionUtils subscriber can be invoked without args 1`] = `
4
4
  Object {
5
5
  "handlers": Object {},
6
6
  "invokeHandler": [Function],
@@ -9,7 +9,7 @@ Object {
9
9
  }
10
10
  `;
11
11
 
12
- exports[`subscriber returns the original object with additional methods 1`] = `
12
+ exports[`functionUtils subscriber returns the original object with additional methods 1`] = `
13
13
  Object {
14
14
  "foo": "bar",
15
15
  "handlers": Object {},