@brightcove/components-embed-code-modal 1.1.2 → 1.1.3

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 (196) hide show
  1. package/.eslintignore +7 -0
  2. package/.eslintrc +23 -0
  3. package/.github/workflows/ci.yml +23 -0
  4. package/.husky/pre-commit +4 -0
  5. package/.nvmrc +1 -0
  6. package/.prettierignore +7 -0
  7. package/.prettierrc +5 -0
  8. package/.release-it.json +40 -0
  9. package/.whitesource +3 -0
  10. package/CHANGELOG.md +423 -0
  11. package/CODEOWNERS +37 -0
  12. package/PULL_REQUEST_TEMPLATE.md +17 -0
  13. package/__tests__/EmbedCode.test.tsx +51 -0
  14. package/__tests__/InteractivityProject.test.tsx +50 -0
  15. package/__tests__/PlayerPreview.test.tsx +23 -0
  16. package/__tests__/PrismLiveModal.test.tsx +85 -0
  17. package/__tests__/PrismPlayerControls.test.tsx +139 -0
  18. package/__tests__/PrismPlayerPreview.test.tsx +168 -0
  19. package/__tests__/TabsHeader.test.tsx +19 -0
  20. package/__tests__/TabsSection.test.tsx +46 -0
  21. package/__tests__/TitleWithTooltip.test.tsx +45 -0
  22. package/__tests__/VideoPlayer.test.tsx +105 -0
  23. package/__tests__/embedCodeGenerator.test.ts +111 -0
  24. package/__tests__/util.test.ts +89 -0
  25. package/babel.config.json +17 -0
  26. package/build/README.md +109 -0
  27. package/build/__tests__/PrismLiveModal.test.d.ts +2 -0
  28. package/build/__tests__/PrismLiveModal.test.d.ts.map +1 -0
  29. package/build/index.js +9 -0
  30. package/build/index.js.map +1 -0
  31. package/build/package.json +100 -0
  32. package/{src → build/src}/js/components/prism/PrismLiveModal.d.ts.map +1 -1
  33. package/{src → build/src}/js/components/prism/PrismPlayerControls.d.ts +2 -1
  34. package/{src → build/src}/js/components/prism/PrismPlayerControls.d.ts.map +1 -1
  35. package/{src → build/src}/js/components/prism/PrismPlayerPreview.d.ts +2 -1
  36. package/build/src/js/components/prism/PrismPlayerPreview.d.ts.map +1 -0
  37. package/build/src/js/hooks/useIsMobile.d.ts +3 -0
  38. package/build/src/js/hooks/useIsMobile.d.ts.map +1 -0
  39. package/{src → build/src}/js/i18n.d.ts +24 -0
  40. package/{src → build/src}/js/i18n.d.ts.map +1 -1
  41. package/etc/wildcard.brightcove.com.key +27 -0
  42. package/etc/wildcard.brightcove.com.pem +96 -0
  43. package/jest/jest.setup.js +90 -0
  44. package/jest/jest.stub.js +4 -0
  45. package/jest.config.js +24 -0
  46. package/package.json +17 -7
  47. package/scripts/create-dist-pkg-prod.js +19 -0
  48. package/src/index.ts +17 -0
  49. package/src/js/EmbedCodeModal.tsx +105 -0
  50. package/src/js/components/CustomSettingsDropdown.tsx +184 -0
  51. package/src/js/components/EmbedCopySection.tsx +130 -0
  52. package/src/js/components/ModalContainer.tsx +367 -0
  53. package/src/js/components/NoPlayerModal.tsx +42 -0
  54. package/src/js/components/PlayerPreview.tsx +116 -0
  55. package/src/js/components/TabsHeader.tsx +31 -0
  56. package/src/js/components/TabsSection.tsx +74 -0
  57. package/src/js/components/TitleWithTooltip.tsx +39 -0
  58. package/src/js/components/VideoLinks.tsx +83 -0
  59. package/src/js/components/VideoPlayer.tsx +324 -0
  60. package/src/js/components/index.ts +9 -0
  61. package/src/js/components/prism/PrismLiveModal.tsx +196 -0
  62. package/src/js/components/prism/PrismPlayerControls.tsx +356 -0
  63. package/src/js/components/prism/PrismPlayerPreview.tsx +200 -0
  64. package/src/js/components/prism/index.ts +3 -0
  65. package/src/js/constants/baseUrls.ts +4 -0
  66. package/src/js/constants/embed.ts +12 -0
  67. package/src/js/constants/player.ts +32 -0
  68. package/src/js/constants/pluginsRegistry.ts +30 -0
  69. package/src/js/hooks/useGetPlayers.ts +12 -0
  70. package/src/js/hooks/useIsMobile.ts +33 -0
  71. package/src/js/i18n.ts +43 -0
  72. package/src/js/services/players-api.ts +26 -0
  73. package/src/js/services/url-shortener.ts +10 -0
  74. package/src/js/types/EmbedCodeModalProps.ts +72 -0
  75. package/src/js/types/EmbedCodeProps.ts +13 -0
  76. package/src/js/types/brightcoveEmbedCode.d.ts +18 -0
  77. package/src/js/types/players.ts +64 -0
  78. package/src/js/types/react-i18next.d.ts +8 -0
  79. package/src/js/types/studioModule.ts +7 -0
  80. package/src/js/utils/addPluginsDataToPlayers.ts +59 -0
  81. package/src/js/utils/call.ts +31 -0
  82. package/src/js/utils/dimensions.ts +53 -0
  83. package/src/js/utils/embedCodeGenerator.ts +120 -0
  84. package/src/js/utils/featureSwitches.ts +16 -0
  85. package/src/js/utils/util.ts +153 -0
  86. package/src/module.tsx +280 -0
  87. package/src/styles/CustomSettingsDropdown.sass +42 -0
  88. package/src/styles/EmbedCode.sass +30 -0
  89. package/src/styles/EmbedCodeModal.sass +76 -0
  90. package/src/styles/base.sass +1 -0
  91. package/src/styles/prism/PrismLiveModal.sass +128 -0
  92. package/src/styles/theme.sass +11 -0
  93. package/src/styles/typings.td.ts +9 -0
  94. package/src/translations/en.json +69 -0
  95. package/src/translations/es.json +69 -0
  96. package/src/translations/fr.json +69 -0
  97. package/src/translations/ja.json +69 -0
  98. package/src/translations/ko.json +69 -0
  99. package/src/translations/zh.json +69 -0
  100. package/src/types/studio.ts +197 -0
  101. package/tsconfig.json +34 -0
  102. package/webpack.config.js +117 -0
  103. package/index.js +0 -9
  104. package/index.js.map +0 -1
  105. package/src/js/components/prism/PrismPlayerPreview.d.ts.map +0 -1
  106. /package/{__tests__ → build/__tests__}/EmbedCode.test.d.ts +0 -0
  107. /package/{__tests__ → build/__tests__}/EmbedCode.test.d.ts.map +0 -0
  108. /package/{__tests__ → build/__tests__}/InteractivityProject.test.d.ts +0 -0
  109. /package/{__tests__ → build/__tests__}/InteractivityProject.test.d.ts.map +0 -0
  110. /package/{__tests__ → build/__tests__}/PlayerPreview.test.d.ts +0 -0
  111. /package/{__tests__ → build/__tests__}/PlayerPreview.test.d.ts.map +0 -0
  112. /package/{__tests__ → build/__tests__}/PrismPlayerControls.test.d.ts +0 -0
  113. /package/{__tests__ → build/__tests__}/PrismPlayerControls.test.d.ts.map +0 -0
  114. /package/{__tests__ → build/__tests__}/PrismPlayerPreview.test.d.ts +0 -0
  115. /package/{__tests__ → build/__tests__}/PrismPlayerPreview.test.d.ts.map +0 -0
  116. /package/{__tests__ → build/__tests__}/TabsHeader.test.d.ts +0 -0
  117. /package/{__tests__ → build/__tests__}/TabsHeader.test.d.ts.map +0 -0
  118. /package/{__tests__ → build/__tests__}/TabsSection.test.d.ts +0 -0
  119. /package/{__tests__ → build/__tests__}/TabsSection.test.d.ts.map +0 -0
  120. /package/{__tests__ → build/__tests__}/TitleWithTooltip.test.d.ts +0 -0
  121. /package/{__tests__ → build/__tests__}/TitleWithTooltip.test.d.ts.map +0 -0
  122. /package/{__tests__ → build/__tests__}/VideoPlayer.test.d.ts +0 -0
  123. /package/{__tests__ → build/__tests__}/VideoPlayer.test.d.ts.map +0 -0
  124. /package/{__tests__ → build/__tests__}/embedCodeGenerator.test.d.ts +0 -0
  125. /package/{__tests__ → build/__tests__}/embedCodeGenerator.test.d.ts.map +0 -0
  126. /package/{__tests__ → build/__tests__}/util.test.d.ts +0 -0
  127. /package/{__tests__ → build/__tests__}/util.test.d.ts.map +0 -0
  128. /package/{src → build/src}/index.d.ts +0 -0
  129. /package/{src → build/src}/index.d.ts.map +0 -0
  130. /package/{src → build/src}/js/EmbedCodeModal.d.ts +0 -0
  131. /package/{src → build/src}/js/EmbedCodeModal.d.ts.map +0 -0
  132. /package/{src → build/src}/js/components/CustomSettingsDropdown.d.ts +0 -0
  133. /package/{src → build/src}/js/components/CustomSettingsDropdown.d.ts.map +0 -0
  134. /package/{src → build/src}/js/components/EmbedCopySection.d.ts +0 -0
  135. /package/{src → build/src}/js/components/EmbedCopySection.d.ts.map +0 -0
  136. /package/{src → build/src}/js/components/ModalContainer.d.ts +0 -0
  137. /package/{src → build/src}/js/components/ModalContainer.d.ts.map +0 -0
  138. /package/{src → build/src}/js/components/NoPlayerModal.d.ts +0 -0
  139. /package/{src → build/src}/js/components/NoPlayerModal.d.ts.map +0 -0
  140. /package/{src → build/src}/js/components/PlayerPreview.d.ts +0 -0
  141. /package/{src → build/src}/js/components/PlayerPreview.d.ts.map +0 -0
  142. /package/{src → build/src}/js/components/TabsHeader.d.ts +0 -0
  143. /package/{src → build/src}/js/components/TabsHeader.d.ts.map +0 -0
  144. /package/{src → build/src}/js/components/TabsSection.d.ts +0 -0
  145. /package/{src → build/src}/js/components/TabsSection.d.ts.map +0 -0
  146. /package/{src → build/src}/js/components/TitleWithTooltip.d.ts +0 -0
  147. /package/{src → build/src}/js/components/TitleWithTooltip.d.ts.map +0 -0
  148. /package/{src → build/src}/js/components/VideoLinks.d.ts +0 -0
  149. /package/{src → build/src}/js/components/VideoLinks.d.ts.map +0 -0
  150. /package/{src → build/src}/js/components/VideoPlayer.d.ts +0 -0
  151. /package/{src → build/src}/js/components/VideoPlayer.d.ts.map +0 -0
  152. /package/{src → build/src}/js/components/index.d.ts +0 -0
  153. /package/{src → build/src}/js/components/index.d.ts.map +0 -0
  154. /package/{src → build/src}/js/components/prism/PrismLiveModal.d.ts +0 -0
  155. /package/{src → build/src}/js/components/prism/index.d.ts +0 -0
  156. /package/{src → build/src}/js/components/prism/index.d.ts.map +0 -0
  157. /package/{src → build/src}/js/constants/baseUrls.d.ts +0 -0
  158. /package/{src → build/src}/js/constants/baseUrls.d.ts.map +0 -0
  159. /package/{src → build/src}/js/constants/embed.d.ts +0 -0
  160. /package/{src → build/src}/js/constants/embed.d.ts.map +0 -0
  161. /package/{src → build/src}/js/constants/player.d.ts +0 -0
  162. /package/{src → build/src}/js/constants/player.d.ts.map +0 -0
  163. /package/{src → build/src}/js/constants/pluginsRegistry.d.ts +0 -0
  164. /package/{src → build/src}/js/constants/pluginsRegistry.d.ts.map +0 -0
  165. /package/{src → build/src}/js/hooks/useGetPlayers.d.ts +0 -0
  166. /package/{src → build/src}/js/hooks/useGetPlayers.d.ts.map +0 -0
  167. /package/{src → build/src}/js/services/players-api.d.ts +0 -0
  168. /package/{src → build/src}/js/services/players-api.d.ts.map +0 -0
  169. /package/{src → build/src}/js/services/url-shortener.d.ts +0 -0
  170. /package/{src → build/src}/js/services/url-shortener.d.ts.map +0 -0
  171. /package/{src → build/src}/js/types/EmbedCodeModalProps.d.ts +0 -0
  172. /package/{src → build/src}/js/types/EmbedCodeModalProps.d.ts.map +0 -0
  173. /package/{src → build/src}/js/types/EmbedCodeProps.d.ts +0 -0
  174. /package/{src → build/src}/js/types/EmbedCodeProps.d.ts.map +0 -0
  175. /package/{src → build/src}/js/types/players.d.ts +0 -0
  176. /package/{src → build/src}/js/types/players.d.ts.map +0 -0
  177. /package/{src → build/src}/js/types/studioModule.d.ts +0 -0
  178. /package/{src → build/src}/js/types/studioModule.d.ts.map +0 -0
  179. /package/{src → build/src}/js/utils/addPluginsDataToPlayers.d.ts +0 -0
  180. /package/{src → build/src}/js/utils/addPluginsDataToPlayers.d.ts.map +0 -0
  181. /package/{src → build/src}/js/utils/call.d.ts +0 -0
  182. /package/{src → build/src}/js/utils/call.d.ts.map +0 -0
  183. /package/{src → build/src}/js/utils/dimensions.d.ts +0 -0
  184. /package/{src → build/src}/js/utils/dimensions.d.ts.map +0 -0
  185. /package/{src → build/src}/js/utils/embedCodeGenerator.d.ts +0 -0
  186. /package/{src → build/src}/js/utils/embedCodeGenerator.d.ts.map +0 -0
  187. /package/{src → build/src}/js/utils/featureSwitches.d.ts +0 -0
  188. /package/{src → build/src}/js/utils/featureSwitches.d.ts.map +0 -0
  189. /package/{src → build/src}/js/utils/util.d.ts +0 -0
  190. /package/{src → build/src}/js/utils/util.d.ts.map +0 -0
  191. /package/{src → build/src}/module.d.ts +0 -0
  192. /package/{src → build/src}/module.d.ts.map +0 -0
  193. /package/{src → build/src}/styles/typings.td.d.ts +0 -0
  194. /package/{src → build/src}/styles/typings.td.d.ts.map +0 -0
  195. /package/{src → build/src}/types/studio.d.ts +0 -0
  196. /package/{src → build/src}/types/studio.d.ts.map +0 -0
package/.eslintignore ADDED
@@ -0,0 +1,7 @@
1
+ # node_modules, root dot file and folders are always ignored
2
+ build/*
3
+ scripts/*
4
+ *.config.*
5
+ package.json
6
+ package-lock.json
7
+ .*
package/.eslintrc ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "extends": [
3
+ "@brightcove/eslint-config-applications",
4
+ "@brightcove/eslint-config-applications/react",
5
+ "plugin:@typescript-eslint/recommended",
6
+ "plugin:import/typescript",
7
+ "plugin:react-hooks/recommended",
8
+ "prettier"
9
+ ],
10
+ "rules": {
11
+ "react-hooks/rules-of-hooks": "warn",
12
+ "react-hooks/exhaustive-deps": "warn"
13
+ },
14
+ "parser": "@typescript-eslint/parser",
15
+ "parserOptions": {
16
+ "ecmaVersion": 2020
17
+ } ,
18
+ "settings": {
19
+ "react": {
20
+ "version": "detect"
21
+ }
22
+ }
23
+ }
@@ -0,0 +1,23 @@
1
+ name: CI/CD
2
+
3
+ on:
4
+ push:
5
+ branches: ['**']
6
+
7
+ permissions:
8
+ id-token: write
9
+ contents: write
10
+
11
+ jobs:
12
+ cd:
13
+ uses: brightcove/cd_workflows/.github/workflows/library-cd.yml@v1
14
+ with:
15
+ publish-dir: "."
16
+ skip: |
17
+ lint-test
18
+ typecheck
19
+ format:check
20
+ test:ci
21
+ dry-run: false
22
+ secrets:
23
+ npm-token: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+
4
+ npm run pre-commit
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ 22.16.0
@@ -0,0 +1,7 @@
1
+ build/*
2
+ scripts/*
3
+ node_modules/*
4
+ *.config.*
5
+ package.json
6
+ package-lock.json
7
+ CODEOWNERS
package/.prettierrc ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "singleQuote": true,
3
+ "jsxSingleQuote": true,
4
+ "trailingComma": "all"
5
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "hooks": {
3
+ "before:init": ["npm run lint", "npm install --legacy-peer-deps", "kacl prerelease"],
4
+ "after:bump": ["kacl release", "npm run build"],
5
+ "after:release": ["npm run notify", "echo Successfully released ${name} v${version} to ${repo.repository}."]
6
+ },
7
+ "git": {
8
+ "changelog": "git log --pretty=format:\"* %s (%h)\" ${latestTag}...HEAD",
9
+ "requireCleanWorkingDir": false,
10
+ "requireUpstream": false,
11
+ "requireCommits": true,
12
+ "addUntrackedFiles": false,
13
+ "commit": true,
14
+ "commitMessage": "Release v${version}",
15
+ "commitArgs": "",
16
+ "tag": true,
17
+ "tagName": "v${version}",
18
+ "tagAnnotation": "Release v${version}",
19
+ "tagArgs": "",
20
+ "push": true,
21
+ "pushArgs": "--follow-tags",
22
+ "pushRepo": "origin"
23
+ },
24
+ "github": {
25
+ "release": true,
26
+ "releaseName": "v${version}",
27
+ "releaseNotes": null,
28
+ "preRelease": false,
29
+ "draft": false,
30
+ "tokenRef": "GITHUB_TOKEN",
31
+ "assets": [],
32
+ "host": null,
33
+ "timeout": 0,
34
+ "proxy": null
35
+ },
36
+ "npm": {
37
+ "publish": true,
38
+ "publishPath": "./build"
39
+ }
40
+ }
package/.whitesource ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "settingsInheritedFrom": "whitesource-config/whitesource-config@master"
3
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,423 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
+ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [1.1.3] - 2026-09-25
11
+ ### Added
12
+ - Mobile layout for the live embed modal: bottom sheet, Copy Code / Done footer, compact URL / Preview row and a hidden code card
13
+
14
+ ### Changed
15
+ - Use prism-core's native modal props for sizing, scrolling and the header border, with the columns scrolling independently
16
+ - Switch between the stacked and two-column layouts at a single 1024px breakpoint
17
+ - Fill the width/height sizing inputs and use Prism's default desktop size for the Copy URL / Preview buttons
18
+
19
+ ### Fixed
20
+ - Copy the recommended embed on mobile (JavaScript for Campaign, Viewer ID and MAP tracking players)
21
+
22
+ ## [1.1.2] - 2026-08-13
23
+ ### Fixed
24
+ - Allow DVR and Low Latency to be selected simultaneously in the live embed modal
25
+
26
+ ## [1.1.1] - 2026-07-28
27
+ ### Fixed
28
+ - Point the root `types` at `./build/src/index.d.ts`, so consumers get declarations again. `publish-dir` moved from `build` to `.` in 1.0.8, which made the root `package.json` the published manifest; `main` was already root-relative but `types` still assumed `build/` was the package root, so 1.0.8 and 1.1.0 shipped a `types` path that does not exist and consumers hit `TS7016`
29
+ - `create-dist-pkg-prod` now sets `types` explicitly, keeping the generated `build/package.json` valid for a `build`-rooted layout as well
30
+
31
+ ## [1.1.0] - 2026-07-28
32
+ ### Added
33
+ - Prism Live embed modal: `Copy URL` is now a dropdown offering `Short URL` and `Full URL`, restoring the shortened playback URL that Blue Steel produced and matching the Media module
34
+
35
+ ### Changed
36
+ - Prism Live copy feedback matches the Media module: the button reads `Copy URL` → `Copying...` → `Copied` instead of raising a success toast
37
+ - Removed the unused `prism.getURL` translation key
38
+
39
+ ### Fixed
40
+ - Prism Live embed modal: a shortening response landing after the preview URL changed no longer drives the button state, and the copied state clears as soon as the preview URL changes
41
+
42
+ ## [1.0.7] - 2026-05-22
43
+ ### Fixed
44
+ - Normalize Custom aspect ratio to fluid before calling `brightcoveEmbedCode`, fixing crash in Prism Embed on Web modal
45
+
46
+ ## [1.0.6] - 2026-05-07
47
+ ### Fixed
48
+ - Translate `dvr.inputLabel` and `dvr.inputDescription` in `es`, `fr`, `ja`, `ko`, `zh-Hant` (previously shipped as verbatim English)
49
+
50
+ ## [1.0.5] - 2026-04-16
51
+ ### Changed
52
+ - Externalize all dependencies to reduce bundle from 22MB to ~102KB
53
+ - Move large deps to peerDependencies (prism-core, player-embed-code, react-player-loader, i18next, react-i18next, react-query)
54
+ - Remove unused externals (react-dnd, react-dnd-html5-backend)
55
+ - Update studio-api-services peerDep to ^7.0.0
56
+
57
+ ## [1.0.4] - 2026-02-04
58
+ ### Fixed
59
+ - Live Prism Embed Modal Fixes
60
+
61
+ ## [1.0.3] - 2026-01-28
62
+ ### Fixed
63
+ - Deploy issues
64
+
65
+ ## [1.0.2] - 2026-01-28
66
+ ### Fixed
67
+ - Deploy issues
68
+
69
+ ## [1.0.0] - 2026-01-28
70
+ ### Added
71
+ - [PUBLISHING-618](https://brightcove.atlassian.net/browse/PUBLISHING-618) Update Embed code modal to use the Prism theme for Live
72
+
73
+ ## [0.8.5] - 2025-08-06
74
+ ### Added
75
+ - [PUBLISHING-340](https://brightcove.atlassian.net/browse/PUBLISHING-340) Include Ad Configuration in studio-ui-kit_studio-components-embed-code-modal
76
+
77
+ ## [0.8.4] - 2025-08-05
78
+ ### Changed
79
+ - [PLAYCUST-3043](https://brightcove.atlassian.net/browse/PLAYCUST-3043) Update to node v22.9.0
80
+
81
+ ## [0.8.2] - 2024-10-31
82
+ ### Added
83
+ - [PLAYCUST-2953](https://brightcove.atlassian.net/browse/PLAYCUST-2953) Add translations
84
+
85
+ ## [0.8.1] - 2024-10-22
86
+ ### Fixed
87
+ - [PLAYCUST-3157](https://brightcove.atlassian.net/browse/PLAYCUST-3157) Fix dvr default state and render logic
88
+
89
+ ## [0.8.0] - 2024-10-21
90
+ ### Added
91
+ - [PLAYCUST-3157](https://brightcove.atlassian.net/browse/PLAYCUST-3157) Add support for low latency
92
+
93
+ ## [0.7.2] - 2024-10-03
94
+ ### Added
95
+ - [PLAYCUST-3082](https://brightcove.atlassian.net/browse/PLAYCUST-3082) Update Embed Code Modal Library in Live 2.0
96
+
97
+ ## [0.7.1] - 2024-09-24
98
+ ### Fixed
99
+ - [PLAYCUST-2882](https://brightcove.atlassian.net/browse/PLAYCUST-2882) Fix iframe embed code aspect ratio padding
100
+
101
+ ## [0.7.1] - 2024-09-24
102
+ ### Fixed
103
+ - [PLAYCUST-2937](https://brightcove.atlassian.net/browse/PLAYCUST-2937) playerListForSelection breaking the module when being an empty array
104
+
105
+ ## [0.7.0] - 2024-09-23
106
+ ### Added
107
+ - [PLAYCUST-2938](https://brightcove.atlassian.net/browse/PLAYCUST-2938) Add DVR livePlaybackToken option
108
+
109
+ ## [0.6.0] - 2024-08-14
110
+ ### Added
111
+ - [PLAYCUST-2595](https://brightcove.atlassian.net/browse/PLAYCUST-2595) Display custom settings for Project type
112
+
113
+ ### Fixed
114
+ - [PLAYCUST-2595](https://brightcove.atlassian.net/browse/PLAYCUST-2595) Horizontal scroll getting displayed when expanding custom settings section
115
+ - [PLAYCUST-2584](https://brightcove.atlassian.net/browse/PLAYCUST-2584) Use correct aspect ratio class
116
+
117
+ ## [0.5.1] - 2024-07-22
118
+ ### Fixed
119
+ - [PLAYCUST-2799](https://brightcove.atlassian.net/browse/PLAYCUST-2799) Disable iframe for MAPs enabled player
120
+
121
+ ## [0.5.0] - 2024-04-17
122
+ ### Changed
123
+ - [PLAYCUST-2449](https://brightcove.atlassian.net/browse/PLAYCUST-2449) Remove Player Preview and links when player is of type outstream
124
+
125
+ ### Fixed
126
+ - [PLAYCUST-2455](https://brightcove.atlassian.net/browse/PLAYCUST-2455) Fix viewer ID tracking validation
127
+
128
+ ## [0.4.4] - 2024-03-29
129
+ ### Added
130
+ - [PLAYCUST-2249](https://brightcove.atlassian.net/browse/PLAYCUST-2249) Support for interactivityProjectId
131
+
132
+ ## [0.4.3] - 2024-03-29
133
+ ### Added
134
+ - [PLAYCUST-2368](https://brightcove.atlassian.net/browse/PLAYCUST-2368) Disable iframe publish for Viewer ID Tracking
135
+ - [PLAYCUST-2249](https://brightcove.atlassian.net/browse/PLAYCUST-2249) Player select component
136
+
137
+ ## [0.4.2] - 2023-12-29
138
+ ### Fixed
139
+ - [PLAYCUST-2002](https://brightcove.atlassian.net/browse/PLAYCUST-2002) Demo site not working
140
+
141
+ ## [0.4.1] - 2023-11-24
142
+ ### Fixed
143
+ - [PLAYCUST-2050](https://brightcove.atlassian.net/browse/PLAYCUST-2050) Fix Javascript tab crash
144
+
145
+ ## [0.4.0] - 2023-11-02
146
+ ### Added
147
+ - [PLAYCUST-1941](https://brightcove.atlassian.net/browse/PLAYCUST-1941) Preselect favorite player in Video Embed
148
+ - [PLAYCUST-1946](https://brightcove.atlassian.net/browse/PLAYCUST-1946) Custom settings dropdown for TYPE VIDEO
149
+
150
+ ### Changed
151
+ - [PLAYCUST-1469](https://brightcove.atlassian.net/browse/PLAYCUST-1469) `preview` link from Player Type now redirects to preview-players.brightcove.net
152
+
153
+ ## [0.3.7] - 2023-09-18
154
+ ### Added
155
+ - [PLAYCUST-1947](https://brightcove.atlassian.net/browse/PLAYCUST-1947)`embedCodeProperties` prop for the Embed Code generation
156
+
157
+ ## [0.3.6] - 2023-07-19
158
+ ### Fixed
159
+ - [PLAYCUST-1720](https://brightcove.atlassian.net/browse/PLAYCUST-1720) Fix typography for iframe text from `iFrame` to `iframe`
160
+ - [PLAYCUST-1899](https://brightcove.atlassian.net/browse/PLAYCUST-1899) Create player with v2 interactivity plugin
161
+
162
+ ## [0.3.5] - 2023-04-19
163
+ ### Changed
164
+ - [PLAYCUST-1618](https://brightcove.atlassian.net/browse/PLAYCUST-1618) [BREAKING] Change prop name from `playerPayload` to `data`
165
+
166
+ ## [0.3.4] - 2023-03-23
167
+ ### Fixed
168
+ - Internal: Updated peerDependencies
169
+
170
+ ## [0.3.3] - 2023-03-23
171
+ ### Fixed
172
+ - [PLAYCUST-1648](https://brightcove.atlassian.net/browse/PLAYCUST-1648) Project Player Preview when player has been created
173
+
174
+ ## [0.3.2] - 2023-03-07
175
+ ### Fixed
176
+ - [PLAYCUST-1637](https://brightcove.atlassian.net/browse/PLAYCUST-1637) Fixed Project Player Preview
177
+ - [PLAYCUST-1624](https://brightcove.atlassian.net/browse/PLAYCUST-1624) Update no player modal text to reference players module
178
+
179
+ ## [0.3.1] - 2023-03-02
180
+ ### Fixed
181
+ - [PLAYCUST-1625](https://brightcove.atlassian.net/browse/PLAYCUST-1625) Check for Interactivity Plugin using Registry ID OR Name
182
+
183
+ ## [0.3.0] - 2023-03-01
184
+ ### Changed
185
+ - [PLAYCUST-1625](https://brightcove.atlassian.net/browse/PLAYCUST-1625) Check for Interactivity Plugin using Registry ID
186
+
187
+ ## [0.2.2] - 2023-02-21
188
+ ### Changed
189
+ - [LIVE-2447](https://brightcove.atlassian.net/browse/LIVE-2447) Default playerID to be the first in the list
190
+
191
+ ## [0.2.1] - 2023-02-15
192
+ ### Fixed
193
+ - [LIVE-2447](https://brightcove.atlassian.net/browse/LIVE-2447) Update peerDependencies and dependencies
194
+
195
+ ## [0.2.0] - 2023-02-08
196
+ ### Fixed
197
+ - [LIVE-2447](https://brightcove.atlassian.net/browse/LIVE-2447) Interactivity params for preview, player and embed code
198
+
199
+ ## [0.1.28] - 2023-02-01
200
+ ### Added
201
+ - [LIVE-2455](https://brightcove.atlassian.net/browse/LIVE-2455) Create Player if no Interactivity-enabled Player is found
202
+ - [LIVE-2533](https://brightcove.atlassian.net/browse/LIVE-2533) Embed Code Modal Translations
203
+
204
+ ## [0.1.27] - 2022-12-21
205
+ ### Added
206
+ - [LIVE-2448](https://brightcove.atlassian.net/browse/LIVE-2448) Interactivity attribute to react player loader when using the interactivity modal
207
+
208
+ ## [0.1.26] - 2022-11-18
209
+ ### Added
210
+ - Support for Interactivity player
211
+
212
+ ## [0.1.25] - 2022-10-06
213
+ ### Added
214
+ - Campaign Plugin and Plugins notice for Player embed
215
+
216
+ ### Changed
217
+ - VideoPayload type
218
+
219
+ ## [0.1.24] - 2022-09-29
220
+ ### Changed
221
+ - Export for payload types
222
+
223
+ ## [0.1.23] - 2022-09-28
224
+ ### Added
225
+ - Export for `PlayerPayload`
226
+
227
+ ### Fixed
228
+ - Typings in `package.json`
229
+
230
+ ## [0.1.22] - 2022-09-27
231
+ ### Fixed
232
+ - Type exports for build
233
+
234
+ ## [0.1.21] - 2022-09-01
235
+ ### Added
236
+ - Player type context
237
+
238
+ ### Changed
239
+ - **BREAKING CHANGE** `video` prop to `data`
240
+
241
+ ## [0.1.20] - 2022-08-11
242
+ ### Fixed
243
+ - Video title truncation small fix
244
+
245
+ ## [0.1.19] - 2022-08-09
246
+ ### Fixed
247
+ - PLAYCUST-1254 add support for safari clipboard
248
+ - PLAYCUST-1254 make sure peerDep for @brightcove/react-player-loader matches with media-four module
249
+ - remove unused variables
250
+ - Long video titles are now truncated
251
+
252
+ ## [0.1.18] - 2022-08-03
253
+ ### Changed
254
+ - upgrade `@brightcove/studio-components` to 7.0.0
255
+ - remove deprecated props
256
+
257
+ ## [0.1.17] - 2022-07-26
258
+ ### Changed
259
+ - Add `@brightcove/react-player-loader` as peerDependency so its handled by parent module
260
+
261
+ ## [0.1.16] - 2022-07-22
262
+ ### Changed
263
+ - Removed older design
264
+
265
+ ### Fixed
266
+ - Translation strings when copying url
267
+ - Support custom css on player configuration by using iframes
268
+ - Translation string when Campaign player is selected
269
+
270
+ ## [0.1.15] - 2022-07-13
271
+ ### Added
272
+ - Sort players dropdown
273
+
274
+ ### Fixed
275
+ - Trigger Toast notifications up to parent module
276
+
277
+ ## [0.1.14] - 2022-07-05
278
+ ### Fixed
279
+ - Hide iFrame embed code for Campaign-enabled players
280
+
281
+ ## [0.1.13] - 2022-06-29
282
+ ### Added
283
+ - Shorten url on preview button click
284
+
285
+ ### Fixed
286
+ - Show Config Message only for players with non-bc plugins
287
+
288
+ ## [0.1.12] - 2022-06-24
289
+ ### Fixed
290
+ - Remove extra preview button
291
+
292
+ ## [0.1.11] - 2022-06-20
293
+ ### Added
294
+ - Add Copy URL and Preview button
295
+
296
+ ## [0.1.10] - 2022-06-01
297
+ ### Changed
298
+ - update custom copy field
299
+
300
+ ## [0.1.9] - 2022-05-26
301
+ ### Changed
302
+ - `CopyField` to use latest `studio-components` version
303
+
304
+ ### Fixed
305
+ - Keep Javascript enabled for campaign players
306
+
307
+ ## [0.1.8] - 2022-05-26
308
+ ### Added
309
+ - Prevent iFrame from being copied when the selected player is campaign
310
+
311
+ ## [0.1.7] - 2022-05-23
312
+ ### Fixed
313
+ - `EmbedCodeModalTypes` export change to value instead of type
314
+
315
+ ## [0.1.6] - 2022-05-18
316
+ ### Added
317
+ - Notice when player selected has plugins
318
+ - Update iFrame/Javascript code snippet when selected player changes
319
+ - Player preview using ReactPlayerLoader
320
+ - Player preview link updates with player selected
321
+
322
+ ### Fixed
323
+ - Only fetch list of players when modal is open
324
+
325
+ ## [0.1.5] - 2022-05-10
326
+ ### Added
327
+ - Feature switch for new enhancements
328
+ - Component now receives a `type` prop
329
+ - Fetch list of players
330
+
331
+ ### Changed
332
+ - Design updates
333
+
334
+ ## [0.1.4] - 2022-04-28
335
+ ### Added
336
+ - KACL validation
337
+
338
+ ### Fixed
339
+ - Missing docs link in tooltip
340
+
341
+ ## [0.1.3] - 2022-04-12
342
+ ### Changed
343
+ - Toaster moved to be inside modal content
344
+
345
+ ## [0.1.2] - 2022-02-23
346
+ ### Changed
347
+ - Style tweaks for the modal
348
+
349
+ ## [0.1.1] - 2021-12-21
350
+ ### Added
351
+ - Trigger open when video object gets passed into props
352
+
353
+ ## 0.1.0 - 2021-11-26
354
+ ### Added
355
+ - Initial commit of embed code modal component
356
+
357
+ [Unreleased]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v1.1.2...HEAD
358
+ [1.1.2]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v1.1.1...v1.1.2
359
+ [1.1.1]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v1.1.0...v1.1.1
360
+ [1.1.0]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v1.0.7...v1.1.0
361
+ [1.0.7]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v1.0.6...v1.0.7
362
+ [1.0.6]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v1.0.5...v1.0.6
363
+ [1.0.5]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v1.0.4...v1.0.5
364
+ [1.0.4]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v1.0.3...v1.0.4
365
+ [1.0.3]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v1.0.2...v1.0.3
366
+ [1.0.2]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v1.0.0...v1.0.2
367
+ [1.0.0]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.8.5...v1.0.0
368
+ [0.8.5]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.8.4...v0.8.5
369
+ [0.8.4]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.8.2...v0.8.4
370
+ [0.8.2]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.8.1...v0.8.2
371
+ [0.8.1]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.8.0...v0.8.1
372
+ [0.8.0]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.7.2...v0.8.0
373
+ [0.7.2]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.7.1...v0.7.2
374
+ [0.7.1]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.7.1...v0.7.1
375
+ [0.7.1]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.7.0...v0.7.1
376
+ [0.7.0]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.6.0...v0.7.0
377
+ [0.6.0]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.5.1...v0.6.0
378
+ [0.5.1]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.5.0...v0.5.1
379
+ [0.5.0]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.4.4...v0.5.0
380
+ [0.4.4]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.4.3...v0.4.4
381
+ [0.4.3]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.4.2...v0.4.3
382
+ [0.4.2]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.4.1...v0.4.2
383
+ [0.4.1]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.4.0...v0.4.1
384
+ [0.4.0]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.3.7...v0.4.0
385
+ [0.3.7]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.3.6...v0.3.7
386
+ [0.3.6]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.3.5...v0.3.6
387
+ [0.3.5]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.3.4...v0.3.5
388
+ [0.3.4]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.3.3...v0.3.4
389
+ [0.3.3]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.3.2...v0.3.3
390
+ [0.3.2]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.3.1...v0.3.2
391
+ [0.3.1]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.3.0...v0.3.1
392
+ [0.3.0]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.2.2...v0.3.0
393
+ [0.2.2]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.2.1...v0.2.2
394
+ [0.2.1]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.2.0...v0.2.1
395
+ [0.2.0]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.28...v0.2.0
396
+ [0.1.28]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.27...v0.1.28
397
+ [0.1.27]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.26...v0.1.27
398
+ [0.1.26]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.25...v0.1.26
399
+ [0.1.25]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.24...v0.1.25
400
+ [0.1.24]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.23...v0.1.24
401
+ [0.1.23]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.22...v0.1.23
402
+ [0.1.22]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.21...v0.1.22
403
+ [0.1.21]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.20...v0.1.21
404
+ [0.1.20]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.19...v0.1.20
405
+ [0.1.19]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.18...v0.1.19
406
+ [0.1.18]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.17...v0.1.18
407
+ [0.1.17]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.16...v0.1.17
408
+ [0.1.16]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.15...v0.1.16
409
+ [0.1.15]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.14...v0.1.15
410
+ [0.1.14]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.13...v0.1.14
411
+ [0.1.13]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.12...v0.1.13
412
+ [0.1.12]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.11...v0.1.12
413
+ [0.1.11]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.10...v0.1.11
414
+ [0.1.10]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.9...v0.1.10
415
+ [0.1.9]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.8...v0.1.9
416
+ [0.1.8]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.7...v0.1.8
417
+ [0.1.7]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.6...v0.1.7
418
+ [0.1.6]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.5...v0.1.6
419
+ [0.1.5]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.4...v0.1.5
420
+ [0.1.4]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.3...v0.1.4
421
+ [0.1.3]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.2...v0.1.3
422
+ [0.1.2]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.1...v0.1.2
423
+ [0.1.1]: https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal/compare/v0.1.0...v0.1.1
package/CODEOWNERS ADDED
@@ -0,0 +1,37 @@
1
+ # This is a comment.
2
+ # Each line is a file pattern followed by one or more owners.
3
+
4
+ # These owners will be the default owners for everything in
5
+ # the repo. Unless a later match takes precedence,
6
+ # @global-owner1 and @global-owner2 will be requested for
7
+ # review when someone opens a pull request.
8
+ * @studio-ui-kit/player-customization-team
9
+
10
+ # Order is important; the last matching pattern takes the most
11
+ # precedence. When someone opens a pull request that only
12
+ # modifies JS files, only @js-owner and not the global
13
+ # owner(s) will be requested for a review.
14
+ # *.js @js-owner
15
+
16
+ # You can also use email addresses if you prefer. They'll be
17
+ # used to look up users just like we do for commit author
18
+ # emails.
19
+ # *.go docs@example.com
20
+
21
+ # In this example, @doctocat owns any files in the build/logs
22
+ # directory at the root of the repository and any of its
23
+ # subdirectories.
24
+ # /build/logs/ @doctocat
25
+
26
+ # The `docs/*` pattern will match files like
27
+ # `docs/getting-started.md` but not further nested files like
28
+ # `docs/build-app/troubleshooting.md`.
29
+ # docs/* docs@example.com
30
+
31
+ # In this example, @octocat owns any file in an apps directory
32
+ # anywhere in your repository.
33
+ # apps/ @octocat
34
+
35
+ # In this example, @doctocat owns any file in the `/docs`
36
+ # directory in the root of your repository.
37
+ # /docs/ @doctocat
@@ -0,0 +1,17 @@
1
+ ## Description
2
+
3
+ Give context for the issue/feature you worked on and a brief explanation on how you solved it.
4
+
5
+ ## Screenshots _[Optional]_
6
+
7
+ If applicable, attach images of the before and after of the changes
8
+
9
+ ## PR Checklist
10
+
11
+ - [ ] New components have `testName` or `data-test-name` props
12
+
13
+ _Checklist items are optional if you do not need to make any changes to them_
14
+
15
+ ## Link to issue
16
+
17
+ Link to Jira ticket
@@ -0,0 +1,51 @@
1
+ import React from 'react';
2
+ import { render } from '@testing-library/react';
3
+ import { ModalContainer } from '../src/js/components';
4
+ import { EmbedCodeModalTypes } from '../src';
5
+ import { QueryClientProvider, QueryClient } from 'react-query';
6
+
7
+ const DEFAULT_MODAL_COMP = {
8
+ videoId: '123',
9
+ videoName: 'test video',
10
+ accountId: '456',
11
+ duration: 10,
12
+ };
13
+
14
+ const wrappedComponent = (children: React.ReactElement) => (
15
+ <QueryClientProvider client={new QueryClient()}>
16
+ {children}
17
+ </QueryClientProvider>
18
+ );
19
+
20
+ const handleSetComponentKey = jest.fn;
21
+ const handleSetHasCreatedPlayer = jest.fn;
22
+
23
+ test('does not render player with wrong information but right type', () => {
24
+ const { container } = render(
25
+ wrappedComponent(
26
+ <ModalContainer
27
+ handleSetComponentKey={handleSetComponentKey}
28
+ data={DEFAULT_MODAL_COMP}
29
+ hasCreatedPlayer={false}
30
+ handleSetHasCreatedPlayer={handleSetHasCreatedPlayer}
31
+ embedCodeModalType={EmbedCodeModalTypes.PLAYER}
32
+ />,
33
+ ),
34
+ );
35
+ expect(container.innerHTML).toBe('');
36
+ });
37
+
38
+ test('does not render project with wrong information but right type', () => {
39
+ const { container } = render(
40
+ wrappedComponent(
41
+ <ModalContainer
42
+ handleSetComponentKey={handleSetComponentKey}
43
+ data={DEFAULT_MODAL_COMP}
44
+ hasCreatedPlayer={false}
45
+ handleSetHasCreatedPlayer={handleSetHasCreatedPlayer}
46
+ embedCodeModalType={EmbedCodeModalTypes.PROJECT}
47
+ />,
48
+ ),
49
+ );
50
+ expect(container.innerHTML).toBe('');
51
+ });