dana-cli 0.0.0-stage → 0.0.26

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 (288) hide show
  1. package/.github/dependabot.yml +43 -0
  2. package/.github/labeler.yml +30 -0
  3. package/.github/workflows/bump.yml +51 -0
  4. package/.github/workflows/ci-cd.yml +110 -0
  5. package/.github/workflows/dependabot-automerge-call.yml +13 -0
  6. package/.nvmrc +1 -0
  7. package/.prettierignore +4 -0
  8. package/.prettierrc +4 -0
  9. package/CODEOWNERS +5 -0
  10. package/README.md +50 -2
  11. package/bin/bump.js +48 -0
  12. package/eslint.config.mjs +12 -0
  13. package/images/vodScreen1.png +0 -0
  14. package/package.json +53 -5
  15. package/sonar-project.properties +20 -0
  16. package/tools/cli/README.md +51 -0
  17. package/tools/cli/__mocks__/fs/promises.cjs +4 -0
  18. package/tools/cli/bin/dana.js +3 -0
  19. package/tools/cli/dana_completion.sh +156 -0
  20. package/tools/cli/eslint.config.mjs +14 -0
  21. package/tools/cli/package.json +67 -0
  22. package/tools/cli/rollup.config.mjs +26 -0
  23. package/tools/cli/src/commands/addComponent/addMenu/add-menu.ts +65 -0
  24. package/tools/cli/src/commands/addComponent/addMenu/addMenuDefinition.ts +21 -0
  25. package/tools/cli/src/commands/addComponent/addRail/add-rail.ts +59 -0
  26. package/tools/cli/src/commands/addComponent/addRail/addRailDefinition.ts +34 -0
  27. package/tools/cli/src/commands/addComponent/addScreen/add-screen.ts +42 -0
  28. package/tools/cli/src/commands/addComponent/addScreen/addScreenDefinition.ts +17 -0
  29. package/tools/cli/src/commands/addComponent/addScrollView/add-scrollView.ts +48 -0
  30. package/tools/cli/src/commands/addComponent/addScrollView/addScrollViewDefinition.ts +16 -0
  31. package/tools/cli/src/commands/addComponent/config/ComponentConfig.ts +169 -0
  32. package/tools/cli/src/commands/addComponent/config/componentTypes.ts +38 -0
  33. package/tools/cli/src/commands/addComponent/const/componentConst.ts +20 -0
  34. package/tools/cli/src/commands/addComponent/const/defaultConfig.ts +28 -0
  35. package/tools/cli/src/commands/addComponent/const/navigationConst.ts +36 -0
  36. package/tools/cli/src/commands/addComponent/createComponent.ts +45 -0
  37. package/tools/cli/src/commands/addComponent/helper/ComponentHelper.ts +98 -0
  38. package/tools/cli/src/commands/addDevice/add-device.ts +106 -0
  39. package/tools/cli/src/commands/addDevice/addDeviceDefinition.ts +13 -0
  40. package/tools/cli/src/commands/addDevice/deviceConfig/androidtvConfig.ts +142 -0
  41. package/tools/cli/src/commands/addDevice/deviceConfig/configTypes.ts +44 -0
  42. package/tools/cli/src/commands/addDevice/deviceConfig/deviceConfig.ts +38 -0
  43. package/tools/cli/src/commands/addDevice/deviceConfig/titanosConfig.ts +17 -0
  44. package/tools/cli/src/commands/addDevice/deviceConfig/tizenConfig.ts +64 -0
  45. package/tools/cli/src/commands/addDevice/deviceConfig/tvosConfig.ts +50 -0
  46. package/tools/cli/src/commands/addDevice/deviceConfig/vidaaConfig.ts +17 -0
  47. package/tools/cli/src/commands/addDevice/deviceConfig/webosConfig.ts +64 -0
  48. package/tools/cli/src/commands/addDevice/helper/addDeviceHelper.ts +121 -0
  49. package/tools/cli/src/commands/addDianaSkills/add-dianaSkills.ts +55 -0
  50. package/tools/cli/src/commands/addDianaSkills/addDianaSkillsDefinition.ts +13 -0
  51. package/tools/cli/src/commands/addDianaSkills/dianaDependencies.ts +15 -0
  52. package/tools/cli/src/commands/addModule/add-module.ts +46 -0
  53. package/tools/cli/src/commands/addModule/addModuleDefinition.ts +17 -0
  54. package/tools/cli/src/commands/addModule/moduleConst.ts +18 -0
  55. package/tools/cli/src/commands/authentication/AuthenticationManager.ts +255 -0
  56. package/tools/cli/src/commands/authentication/authDefinition.ts +51 -0
  57. package/tools/cli/src/commands/authentication/authHook.ts +50 -0
  58. package/tools/cli/src/commands/authentication/authentConst.ts +6 -0
  59. package/tools/cli/src/commands/authentication/commands/get-packages-token.ts +40 -0
  60. package/tools/cli/src/commands/authentication/commands/login.ts +63 -0
  61. package/tools/cli/src/commands/authentication/commands/logout.ts +26 -0
  62. package/tools/cli/src/commands/authentication/commands/status.ts +47 -0
  63. package/tools/cli/src/commands/authentication/helper/CodeArtifactHelper.ts +66 -0
  64. package/tools/cli/src/commands/authentication/helper/CommandHelper.ts +9 -0
  65. package/tools/cli/src/commands/authentication/helper/CredentialsHelper.ts +176 -0
  66. package/tools/cli/src/commands/authentication/helper/SPM.ts +95 -0
  67. package/tools/cli/src/commands/authentication/tokenHook.ts +30 -0
  68. package/tools/cli/src/commands/commandHelp/customHelp.ts +31 -0
  69. package/tools/cli/src/commands/completion/completion.ts +53 -0
  70. package/tools/cli/src/commands/completion/completionDefinition.ts +16 -0
  71. package/tools/cli/src/commands/createApp/const/createAppTasks.ts +133 -0
  72. package/tools/cli/src/commands/createApp/const/setupConst.ts +16 -0
  73. package/tools/cli/src/commands/createApp/const/templateConst.ts +10 -0
  74. package/tools/cli/src/commands/createApp/createApp.ts +60 -0
  75. package/tools/cli/src/commands/createApp/createAppDefinition.ts +26 -0
  76. package/tools/cli/src/commands/createApp/helpers/CreateAppHelper.ts +167 -0
  77. package/tools/cli/src/commands/createApp/helpers/SetupChecker.ts +98 -0
  78. package/tools/cli/src/commands/hooks/checkDanaProjectHook.ts +30 -0
  79. package/tools/cli/src/commands/zip/zip.ts +26 -0
  80. package/tools/cli/src/commands/zip/zipDefinition.ts +13 -0
  81. package/tools/cli/src/common/commonConst.ts +1 -0
  82. package/tools/cli/src/common/const/deviceConst.ts +110 -0
  83. package/tools/cli/src/common/const/exitCodeConst.ts +12 -0
  84. package/tools/cli/src/common/helpers/CreateArchiveHelper.ts +55 -0
  85. package/tools/cli/src/common/helpers/CreateFileHelper.ts +199 -0
  86. package/tools/cli/src/common/helpers/InputValidator.ts +58 -0
  87. package/tools/cli/src/common/helpers/InstallHelper.ts +202 -0
  88. package/tools/cli/src/common/helpers/UpdateFileHelper.ts +239 -0
  89. package/tools/cli/src/common/helpers/UserInputGetter.ts +145 -0
  90. package/tools/cli/src/common/helpers/handlebarsHelper.ts +31 -0
  91. package/tools/cli/src/common/helpers/stringHelper.ts +25 -0
  92. package/tools/cli/src/common/translation/en.json +87 -0
  93. package/tools/cli/src/common/translation/translation.ts +6 -0
  94. package/tools/cli/src/common/types/helperTypes.ts +79 -0
  95. package/tools/cli/src/index.ts +16 -0
  96. package/tools/cli/src/program.ts +59 -0
  97. package/tools/cli/tests/commands/addComponent/addMenu/add-menu.test.ts +96 -0
  98. package/tools/cli/tests/commands/addComponent/addRail/add-rail.test.ts +57 -0
  99. package/tools/cli/tests/commands/addComponent/addScreen/add-screen.test.ts +55 -0
  100. package/tools/cli/tests/commands/addComponent/addScrollView/add-scrollView.test.ts +89 -0
  101. package/tools/cli/tests/commands/addComponent/config/ComponentConfig.test.ts +261 -0
  102. package/tools/cli/tests/commands/addComponent/createComponent.test.ts +87 -0
  103. package/tools/cli/tests/commands/addComponent/helper/ComponentHelper.test.ts +110 -0
  104. package/tools/cli/tests/commands/addDevice/add-device.test.ts +117 -0
  105. package/tools/cli/tests/commands/addDevice/deviceConfig/androidtvConfig.test.ts +184 -0
  106. package/tools/cli/tests/commands/addDevice/deviceConfig/deviceConfig.test.ts +30 -0
  107. package/tools/cli/tests/commands/addDevice/deviceConfig/titanosConfig.test.ts +20 -0
  108. package/tools/cli/tests/commands/addDevice/deviceConfig/tizenConfig.test.ts +63 -0
  109. package/tools/cli/tests/commands/addDevice/deviceConfig/tvosConfig.test.ts +47 -0
  110. package/tools/cli/tests/commands/addDevice/deviceConfig/vidaaConfig.test.ts +20 -0
  111. package/tools/cli/tests/commands/addDevice/deviceConfig/webosConfig.test.ts +74 -0
  112. package/tools/cli/tests/commands/addDevice/helper/addDeviceHelper.test.ts +144 -0
  113. package/tools/cli/tests/commands/addDianaSkills/add-dianaSkills.test.ts +72 -0
  114. package/tools/cli/tests/commands/addModule/add-module.test.ts +108 -0
  115. package/tools/cli/tests/commands/authentication/AuthenticationManager.test.ts +756 -0
  116. package/tools/cli/tests/commands/authentication/commands/authDefinition.test.ts +53 -0
  117. package/tools/cli/tests/commands/authentication/commands/authHook.test.ts +94 -0
  118. package/tools/cli/tests/commands/authentication/commands/get-packages-token.test.ts +69 -0
  119. package/tools/cli/tests/commands/authentication/commands/login.test.ts +170 -0
  120. package/tools/cli/tests/commands/authentication/commands/logout.test.ts +77 -0
  121. package/tools/cli/tests/commands/authentication/commands/status.test.ts +73 -0
  122. package/tools/cli/tests/commands/authentication/helper/CredentialsHelper.test.ts +352 -0
  123. package/tools/cli/tests/commands/authentication/helper/SPM.test.ts +229 -0
  124. package/tools/cli/tests/commands/cliHelp/customHelp.test.ts +24 -0
  125. package/tools/cli/tests/commands/completion/completion.test.ts +76 -0
  126. package/tools/cli/tests/commands/createApp/const/createAppTasks.test.ts +70 -0
  127. package/tools/cli/tests/commands/createApp/createApp.test.ts +116 -0
  128. package/tools/cli/tests/commands/createApp/helpers/CreateAppHelper.test.ts +197 -0
  129. package/tools/cli/tests/commands/createApp/helpers/SetupChecker.test.ts +152 -0
  130. package/tools/cli/tests/commands/createApp/helpers/fixtures/myApp/scripts/app/ui/screens/SplashScreen.js +70 -0
  131. package/tools/cli/tests/commands/hooks/checkDanaProjectHook.test.ts +55 -0
  132. package/tools/cli/tests/commands/zip/zip.test.ts +51 -0
  133. package/tools/cli/tests/common/helpers/CreateArchiveHelper.test.ts +69 -0
  134. package/tools/cli/tests/common/helpers/CreateFileHelper.test.ts +359 -0
  135. package/tools/cli/tests/common/helpers/InputValidator.test.ts +93 -0
  136. package/tools/cli/tests/common/helpers/InstallHelper.test.ts +262 -0
  137. package/tools/cli/tests/common/helpers/UpdateFileHelper.test.ts +288 -0
  138. package/tools/cli/tests/common/helpers/UserInputGetter.test.ts +182 -0
  139. package/tools/cli/tests/common/helpers/handlebarsHelper.test.ts +87 -0
  140. package/tools/cli/tests/common/helpers/stringHelper.test.ts +35 -0
  141. package/tools/cli/tests/program.test.ts +215 -0
  142. package/tools/cli/tsconfig.json +19 -0
  143. package/tools/cli/tsconfig.test.json +4 -0
  144. package/tools/cli/vitest.config.ts +4 -0
  145. package/tools/templates/app-template/.dana/.gitkeep +0 -0
  146. package/tools/templates/app-template/Gruntfile.js +31 -0
  147. package/tools/templates/app-template/README.md +17 -0
  148. package/tools/templates/app-template/app.config.json +56 -0
  149. package/tools/templates/app-template/editorconfigTemplate.hbs +18 -0
  150. package/tools/templates/app-template/eslintrc.jsonTemplate.hbs +5 -0
  151. package/tools/templates/app-template/gitignoreTemplate.hbs +27 -0
  152. package/tools/templates/app-template/i18n/LocaleStringEnUS.json +7 -0
  153. package/tools/templates/app-template/i18n/README.md +32 -0
  154. package/tools/templates/app-template/images/dana.png +0 -0
  155. package/tools/templates/app-template/images/dana_logo.png +0 -0
  156. package/tools/templates/app-template/images/dana_logo_light.png +0 -0
  157. package/tools/templates/app-template/images/loading.png +0 -0
  158. package/tools/templates/app-template/nvmrcTemplate.hbs +1 -0
  159. package/tools/templates/app-template/package.json +33 -0
  160. package/tools/templates/app-template/profiles/app.config.browser-css.json +16 -0
  161. package/tools/templates/app-template/profiles/app.config.browser-lightning.json +16 -0
  162. package/tools/templates/app-template/scripts/app/README.md +6 -0
  163. package/tools/templates/app-template/scripts/app/TemplateAppRoutes.js.hbs +18 -0
  164. package/tools/templates/app-template/scripts/app/app.js.hbs +17 -0
  165. package/tools/templates/app-template/scripts/app/theme/AppTheme.js +57 -0
  166. package/tools/templates/app-template/scripts/app/ui/screens/AppScreen.js +106 -0
  167. package/tools/templates/app-template/scripts/app/ui/screens/SplashScreen.js +70 -0
  168. package/tools/templates/app-template/scripts/app/ui/views/LoaderView.js +31 -0
  169. package/tools/templates/app-template/styles/fonts/Roboto-Bold.ttf +0 -0
  170. package/tools/templates/app-template/styles/fonts/Roboto-Regular.ttf +0 -0
  171. package/tools/templates/app-template/tests/README.md +70 -0
  172. package/tools/templates/app-template/tests/automation/features/splash.feature +5 -0
  173. package/tools/templates/app-template/tests/automation/init.js +20 -0
  174. package/tools/templates/app-template/tests/automation/steps-definitions/dictionary.js +31 -0
  175. package/tools/templates/app-template/tests/automation/steps-definitions/helpers.js +9 -0
  176. package/tools/templates/app-template/tests/unit/README.md +7 -0
  177. package/tools/templates/app-template/tests/unit/app/TemplateAppRoutes.js.hbs +24 -0
  178. package/tools/templates/assets/fonts/fa-solid-900.ttf +0 -0
  179. package/tools/templates/components/ButtonItemView.js.hbs +69 -0
  180. package/tools/templates/components/ButtonView.js.hbs +65 -0
  181. package/tools/templates/components/ScrollItemView.js.hbs +53 -0
  182. package/tools/templates/components/ScrollView.js.hbs +43 -0
  183. package/tools/templates/components/TileView.js.hbs +55 -0
  184. package/tools/templates/components/screen.js.hbs +74 -0
  185. package/tools/templates/components/settings.js.hbs +74 -0
  186. package/tools/templates/components/vod.js.hbs +104 -0
  187. package/tools/templates/components/wtvMenuListView.js.hbs +38 -0
  188. package/tools/templates/components/wtvRailListView.js.hbs +44 -0
  189. package/tools/templates/index.ts +3 -0
  190. package/tools/templates/mocks/menuMock.json +29 -0
  191. package/tools/templates/mocks/railMock.json +101 -0
  192. package/tools/templates/mocks/scrollViewMock.json +165 -0
  193. package/tools/templates/modules/fip/images/12.png +0 -0
  194. package/tools/templates/modules/fip/images/audioD.png +0 -0
  195. package/tools/templates/modules/fip/package.json +5 -0
  196. package/tools/templates/modules/fip/scripts/FipModule.js +19 -0
  197. package/tools/templates/modules/fip/scripts/FipRoutes.js +19 -0
  198. package/tools/templates/modules/fip/scripts/services/mock/fipMock.json +12 -0
  199. package/tools/templates/modules/fip/scripts/ui/screens/FipScreen.js +169 -0
  200. package/tools/templates/modules/fip/scripts/ui/views/FipContentInfoView.js +77 -0
  201. package/tools/templates/modules/fip/scripts/ui/views/InfoDetailImageView.js +35 -0
  202. package/tools/templates/modules/fip/scripts/ui/views/InfoDetailTextView.js +39 -0
  203. package/tools/templates/modules/fip/scripts/ui/views/InfoListView.js +57 -0
  204. package/tools/templates/modules/fip/scripts/ui/views/PlayButtonView.js +63 -0
  205. package/tools/templates/modules/home/package.json +5 -0
  206. package/tools/templates/modules/home/scripts/HomeModule.js +19 -0
  207. package/tools/templates/modules/home/scripts/HomeRoutes.js +19 -0
  208. package/tools/templates/modules/home/scripts/services/mock/highlightMock.json +40 -0
  209. package/tools/templates/modules/home/scripts/services/mock/homeScrollViewMock.json +170 -0
  210. package/tools/templates/modules/home/scripts/ui/screens/HomeScreen.js +258 -0
  211. package/tools/templates/modules/home/scripts/ui/views/highlight/DotsListItemView.js +37 -0
  212. package/tools/templates/modules/home/scripts/ui/views/highlight/DotsListView.js +22 -0
  213. package/tools/templates/modules/home/scripts/ui/views/highlight/HighlightContentDescriptionView.js +99 -0
  214. package/tools/templates/modules/home/scripts/ui/views/highlight/HighlightPlayButtonView.js +63 -0
  215. package/tools/templates/modules/home/scripts/ui/views/highlight/HighlightRailItemView.js +186 -0
  216. package/tools/templates/modules/home/scripts/ui/views/scrollview/HomeMockTileView.js +67 -0
  217. package/tools/templates/modules/home/scripts/ui/views/scrollview/HomeRailScrollView.js +53 -0
  218. package/tools/templates/modules/home/scripts/ui/views/scrollview/HomeScrollView.js +22 -0
  219. package/tools/templates/modules/menu/images/profile.png +0 -0
  220. package/tools/templates/modules/menu/package.json +5 -0
  221. package/tools/templates/modules/menu/scripts/MenuModule.js +18 -0
  222. package/tools/templates/modules/menu/scripts/MenuRoutes.js +14 -0
  223. package/tools/templates/modules/menu/scripts/services/menuMock.json +24 -0
  224. package/tools/templates/modules/menu/scripts/ui/const/MenuIcons.js +16 -0
  225. package/tools/templates/modules/menu/scripts/ui/views/MenuButtonView.js +101 -0
  226. package/tools/templates/modules/menu/scripts/ui/views/MenuListView.js +60 -0
  227. package/tools/templates/modules/menu/scripts/ui/views/MenuView.js +87 -0
  228. package/tools/templates/modules/menu/scripts/ui/views/ProfileImageView.js +30 -0
  229. package/tools/templates/modules/player/package.json +5 -0
  230. package/tools/templates/modules/player/scripts/PlayerModule.js +19 -0
  231. package/tools/templates/modules/player/scripts/PlayerRoutes.js +19 -0
  232. package/tools/templates/modules/player/scripts/ui/const/PlayerIcons.js +19 -0
  233. package/tools/templates/modules/player/scripts/ui/screens/PlayerScreen.js +361 -0
  234. package/tools/templates/modules/player/scripts/ui/views/PlayerControlButtonView.js +69 -0
  235. package/tools/templates/modules/player/scripts/ui/views/PlayerControlsView.js +173 -0
  236. package/tools/templates/modules/player/scripts/ui/views/ProgressBarView.js +53 -0
  237. package/tools/templates/modules/search/package.json +5 -0
  238. package/tools/templates/modules/search/scripts/SearchModule.js +18 -0
  239. package/tools/templates/modules/search/scripts/SearchRoutes.js +16 -0
  240. package/tools/templates/modules/search/scripts/ui/const/EnglishKeyboardData.js +31 -0
  241. package/tools/templates/modules/search/scripts/ui/const/SearchIcons.js +14 -0
  242. package/tools/templates/modules/search/scripts/ui/const/SearchKeyboardLayout.js +19 -0
  243. package/tools/templates/modules/search/scripts/ui/primitives/SearchTextPrimitive.js +36 -0
  244. package/tools/templates/modules/search/scripts/ui/screens/SearchScreen.js +234 -0
  245. package/tools/templates/modules/search/scripts/ui/services/MockSearchService.js +39 -0
  246. package/tools/templates/modules/search/scripts/ui/services/SearchVirtualKeyboardService.js +33 -0
  247. package/tools/templates/modules/search/scripts/ui/services/mock/searchMock.json +172 -0
  248. package/tools/templates/modules/search/scripts/ui/views/SearchView.js +62 -0
  249. package/tools/templates/modules/search/scripts/ui/views/keyboard/SearchKeyboardRowItemView.js +92 -0
  250. package/tools/templates/modules/search/scripts/ui/views/keyboard/SearchKeyboardRowListView.js +33 -0
  251. package/tools/templates/modules/search/scripts/ui/views/keyboard/SearchKeyboardView.js +63 -0
  252. package/tools/templates/modules/search/scripts/ui/views/rail/SearchScrollRailView.js +53 -0
  253. package/tools/templates/modules/search/scripts/ui/views/rail/SearchScrollView.js +22 -0
  254. package/tools/templates/modules/search/scripts/ui/views/rail/SearchTileView.js +68 -0
  255. package/tools/templates/modules/search/styles/styles/fonts/fa-solid-900.ttf +0 -0
  256. package/tools/templates/modules/settings/package.json +5 -0
  257. package/tools/templates/modules/settings/scripts/SettingsModule.js +19 -0
  258. package/tools/templates/modules/settings/scripts/SettingsRoutes.js +19 -0
  259. package/tools/templates/modules/settings/scripts/ui/screens/SettingsScreen.js +200 -0
  260. package/tools/templates/modules/settings/scripts/ui/views/SettingsListItemView.js +85 -0
  261. package/tools/templates/modules/settings/scripts/ui/views/SettingsListView.js +56 -0
  262. package/tools/templates/modules/vod/package.json +5 -0
  263. package/tools/templates/modules/vod/scripts/VodModule.js +19 -0
  264. package/tools/templates/modules/vod/scripts/VodRoutes.js +19 -0
  265. package/tools/templates/modules/vod/scripts/services/mock/scrollViewMock.json +172 -0
  266. package/tools/templates/modules/vod/scripts/ui/screens/VodScreen.js +204 -0
  267. package/tools/templates/modules/vod/scripts/ui/views/MockTileView.js +69 -0
  268. package/tools/templates/modules/vod/scripts/ui/views/RailScrollItemView.js +53 -0
  269. package/tools/templates/modules/vod/scripts/ui/views/VodScrollView.js +22 -0
  270. package/tools/templates/package.json +14 -0
  271. package/tools/templates/profiles/app.config.androidtv.json +17 -0
  272. package/tools/templates/profiles/app.config.titanos.json +24 -0
  273. package/tools/templates/profiles/app.config.tizen.json +52 -0
  274. package/tools/templates/profiles/app.config.tvos.json +18 -0
  275. package/tools/templates/profiles/app.config.vidaa.json +24 -0
  276. package/tools/templates/profiles/app.config.webos.json +21 -0
  277. package/tools/templates/tutorial/modules/fip/package.json +4 -0
  278. package/tools/templates/tutorial/modules/fip/scripts/FipModule.js +18 -0
  279. package/tools/templates/tutorial/modules/fip/scripts/FipRoutes.js +19 -0
  280. package/tools/templates/tutorial/modules/fip/scripts/ui/screens/FipContentScreen.js +146 -0
  281. package/tools/templates/tutorial/modules/fip/scripts/ui/views/ElevatorView.js +66 -0
  282. package/tools/templates/tutorial/modules/fip/scripts/ui/views/FipContentInfoView.js +90 -0
  283. package/tools/templates/tutorial/modules/fip/scripts/ui/views/PlayButtonView.js +58 -0
  284. package/tools/templates/tutorial/vendors/customBE/package.json +5 -0
  285. package/tools/templates/tutorial/vendors/customBE/scripts/datas/contents.json +749 -0
  286. package/tools/templates/tutorial/vendors/customBE/scripts/services/CustomBEVodService.js +70 -0
  287. package/tsconfig.json +8 -0
  288. package/vitest.config.ts +19 -0
@@ -0,0 +1,101 @@
1
+ {
2
+ "data": [
3
+ {
4
+ "id": "bc86e8a7-3bb8-4a53-aca4-9ddcb13fc1a3",
5
+ "original_title": "Scooby-Doo on Zombie Island",
6
+ "imageUrl": "https://image.tmdb.org/t/p/original/7EdvFUGvT5Pn8rUFRKCrdUzNthf.jpg"
7
+ },
8
+ {
9
+ "id": "fb2991c1-a807-40c7-924d-d053b4a2c379",
10
+ "original_title": "Boy Erased",
11
+ "imageUrl": "https://image.tmdb.org/t/p/original/oZbhTdi0ZQY7iiSQ0L7h3ya6NDF.jpg",
12
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/3m4XJ9EBKRb9HtA0AbaecBFWjz7.jpg"
13
+ },
14
+ { "id": "ad13892c-033e-4c13-b691-b31937a4d6cb",
15
+ "original_title": "Da 5 Bloods",
16
+ "overview": "Four African-American Vietnam veterans return to Vietnam. They are in search of the remains of their fallen squad leader and the promise of buried treasure. These heroes battle forces of humanity and nature while confronted by the lasting ravages of the immorality of the Vietnam War.",
17
+ "imageUrl": "https://image.tmdb.org/t/p/original/yx4cp1ljJMDSFeEex0Zjv45b55E.jpg",
18
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/Aq5Zhj9iaTF6BEKNk05dlUxeHKa.jpg"
19
+ },
20
+ { "id": "aa0d7c64-87a8-4cd5-8e12-9d8432755130",
21
+ "original_title": "Sniper: Rogue Mission",
22
+ "imageUrl": "https://image.tmdb.org/t/p/original/jSL5TqroJsDAIgBdELBwby1uhf1.jpg",
23
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/eiBMu2noc6r1QZLfQlFhfVtbXeM.jpg"
24
+ },
25
+ { "id": "13c1c5c4-d37b-4b14-be23-a134dadcb852",
26
+ "original_title": "Suite Française",
27
+ "overview": "France, 1940. In the first days of occupation, beautiful Lucile Angellier is trapped in a stifled existence with her controlling mother-in-law as they both await news of her husband: a prisoner of war. Parisian refugees start to pour into their small town, soon followed by a regiment of German soldiers who take up residence in the villagers' own homes. Lucile initially tries to ignore Bruno von Falk, the handsome and refined German officer staying with them. But soon, a powerful love draws them together and leads them into the tragedy of war.",
28
+ "imageUrl": "https://image.tmdb.org/t/p/original/w5dV1p5yZfNMuBOgVleLi5VgOG6.jpg",
29
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/j82SfPOqas5rvHbAHAPq7OgaSir.jpg"
30
+ },
31
+ { "id": "e27b38c1-ad1b-4636-a738-ff8dcfdb109d",
32
+ "original_title": "Superman: Doomsday",
33
+ "imageUrl": "https://image.tmdb.org/t/p/original/itvuWm7DFWWzWgW0xgiaKzzWszP.jpg",
34
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/oTPSjQyETTFYDehdbiG8yi2oDmL.jpg"
35
+ },
36
+ { "id": "77b1af4b-e9c2-4925-bed8-1ad4d8c20b42",
37
+ "original_title": "The Farewell",
38
+ "imageUrl": "https://image.tmdb.org/t/p/original/7UrIarxfjxZC9YGj8H1ATKZMXVy.jpg",
39
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/5INPBiKVRsyp9kgHfsC0cTfvKFH.jpg"
40
+ },
41
+ { "id": "fd82d7eb-3028-4206-891b-8132130f37ba",
42
+ "original_title": "Greed",
43
+ "imageUrl": "https://image.tmdb.org/t/p/original/mZPmDFlVp1BSGQD4QCKHOwbXLfv.jpg",
44
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/cgmGPmyeShz9zM9GQM5EEgMutnd.jpg"
45
+ },
46
+ { "id": "23dafbcc-5cc6-43ba-977a-32100e1e6e53",
47
+ "original_title": "Hello, Dolly!",
48
+ "imageUrl": "https://image.tmdb.org/t/p/original/aPZOt9BR3gnk1RyX924ySq81S4P.jpg",
49
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/rvsPkUYhWZkAKMb2fnWHw5pNAjZ.jpg"
50
+ },
51
+ {
52
+ "id": "9fb75c7e-3dc4-4e7a-a048-29eb4b2ab734",
53
+ "original_title": "Wrong Place",
54
+ "imageUrl": "https://image.tmdb.org/t/p/original/mlEtOQAQVy6eW65sHz3UduvzRK.jpg",
55
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/zSre0UHWLSnDoNrM9F2Go9OXq5G.jpg"
56
+ },
57
+ { "id": "df2bf24f-587c-4d28-8514-d6077d2d3a42",
58
+ "original_title": "Halloween III: Season of the Witch",
59
+ "imageUrl": "https://image.tmdb.org/t/p/original/WABfdeaThFYXCySGIOvRNv2sSW.jpg",
60
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/eyOKqtgNeEEIp7zYMHnpISpsaS3.jpg"
61
+ },
62
+ {
63
+ "id": "a17da688-fa3e-4da5-8554-7995472ee1b5",
64
+ "original_title": "Wendell & Wild",
65
+ "imageUrl": "https://image.tmdb.org/t/p/original/s7XxXJ7ponaLAkxiySRxox2Ssc4.jpg",
66
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/apBUC70udhxoLzXo7DqclQ6gcXo.jpg"
67
+ },
68
+ {
69
+ "id": "a3491afa-4d32-491a-8a4a-ce09ace64b7f",
70
+ "original_title": "V/H/S",
71
+ "imageUrl": "https://image.tmdb.org/t/p/original/xVGfCaTwVdZt3lFqtOVhTDqmG58.jpg",
72
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/xAC9kXLxUHpdCkISgYcLzYrxIQR.jpg"
73
+ },
74
+ { "id": "214b1e0e-d364-4a64-a937-b5020bb244af",
75
+ "original_title": "The Rocky Horror Picture Show: Let's Do the Time Warp Again",
76
+ "imageUrl": "https://image.tmdb.org/t/p/original/56KEpnJWe5KvpiPu5XmK14L7Wyr.jpg",
77
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/6IZqrGf06xdaHCt3FmROZcJ7aeu.jpg"
78
+ },
79
+ { "id": "1dae003c-74ed-418e-b674-cf6373d2bfb2",
80
+ "original_title": "Pocahontas",
81
+ "imageUrl": "https://image.tmdb.org/t/p/original/kZ1ft0QZ4e3zDUPMBftEkwI9ftd.jpg",
82
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/9YAVIwBcBrLXeukg2dgMGfYB1uu.jpg"
83
+ },
84
+ { "id": "432084d3-773e-41ad-8a21-c30f13a54f41",
85
+ "original_title": "The Song of Bernadette",
86
+ "imageUrl": "https://image.tmdb.org/t/p/original/kRZItSgFaSDnHePwxX5PfZvu5M8.jpg",
87
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/5gxdMOVSzWNVNSjDPzQGwP6xAed.jpg"
88
+ },
89
+ { "id": "875c0a94-2735-4bf3-9e8c-76d426871ded",
90
+ "original_title": "White Heat",
91
+ "imageUrl": "https://image.tmdb.org/t/p/original/4ekAK25fz1FDzRUHuJs171uiVaI.jpg",
92
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/cap8458wFeRCJSKxL758dI82TRK.jpg"
93
+ }
94
+ ]
95
+ }
96
+
97
+
98
+
99
+
100
+
101
+
@@ -0,0 +1,165 @@
1
+ {
2
+ "data": [
3
+ {
4
+ "title": "For You",
5
+ "movies": [
6
+ {
7
+ "id": "bc86e8a7-3bb8-4a53-aca4-9ddcb13fc1a3",
8
+ "original_title": "Scooby-Doo on Zombie Island",
9
+ "imageUrl": "https://image.tmdb.org/t/p/original/7EdvFUGvT5Pn8rUFRKCrdUzNthf.jpg"
10
+ },
11
+ {
12
+ "id": "fb2991c1-a807-40c7-924d-d053b4a2c379",
13
+ "original_title": "Boy Erased",
14
+ "imageUrl": "https://image.tmdb.org/t/p/original/oZbhTdi0ZQY7iiSQ0L7h3ya6NDF.jpg",
15
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/3m4XJ9EBKRb9HtA0AbaecBFWjz7.jpg"
16
+ },
17
+ {
18
+ "id": "ad13892c-033e-4c13-b691-b31937a4d6cb",
19
+ "original_title": "Da 5 Bloods",
20
+ "overview": "Four African-American Vietnam veterans return to Vietnam. They are in search of the remains of their fallen squad leader and the promise of buried treasure. These heroes battle forces of humanity and nature while confronted by the lasting ravages of the immorality of the Vietnam War.",
21
+ "imageUrl": "https://image.tmdb.org/t/p/original/yx4cp1ljJMDSFeEex0Zjv45b55E.jpg",
22
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/Aq5Zhj9iaTF6BEKNk05dlUxeHKa.jpg"
23
+ },
24
+ {
25
+ "id": "aa0d7c64-87a8-4cd5-8e12-9d8432755130",
26
+ "original_title": "Sniper: Rogue Mission",
27
+ "imageUrl": "https://image.tmdb.org/t/p/original/jSL5TqroJsDAIgBdELBwby1uhf1.jpg",
28
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/eiBMu2noc6r1QZLfQlFhfVtbXeM.jpg"
29
+ },
30
+ {
31
+ "id": "13c1c5c4-d37b-4b14-be23-a134dadcb852",
32
+ "original_title": "Suite Française",
33
+ "overview": "France, 1940. In the first days of occupation, beautiful Lucile Angellier is trapped in a stifled existence with her controlling mother-in-law as they both await news of her husband: a prisoner of war. Parisian refugees start to pour into their small town, soon followed by a regiment of German soldiers who take up residence in the villagers' own homes. Lucile initially tries to ignore Bruno von Falk, the handsome and refined German officer staying with them. But soon, a powerful love draws them together and leads them into the tragedy of war.",
34
+ "imageUrl": "https://image.tmdb.org/t/p/original/w5dV1p5yZfNMuBOgVleLi5VgOG6.jpg",
35
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/j82SfPOqas5rvHbAHAPq7OgaSir.jpg"
36
+ }
37
+ ]
38
+ },
39
+ {
40
+ "title": "Action",
41
+ "movies": [
42
+ {
43
+ "id": "1dae003c-74ed-418e-b674-cf6373d2bfb2",
44
+ "original_title": "Pocahontas",
45
+ "imageUrl": "https://image.tmdb.org/t/p/original/kZ1ft0QZ4e3zDUPMBftEkwI9ftd.jpg",
46
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/9YAVIwBcBrLXeukg2dgMGfYB1uu.jpg"
47
+ },
48
+ {
49
+ "id": "432084d3-773e-41ad-8a21-c30f13a54f41",
50
+ "original_title": "The Song of Bernadette",
51
+ "imageUrl": "https://image.tmdb.org/t/p/original/kRZItSgFaSDnHePwxX5PfZvu5M8.jpg",
52
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/5gxdMOVSzWNVNSjDPzQGwP6xAed.jpg"
53
+ },
54
+ {
55
+ "id": "77b1af4b-e9c2-4925-bed8-1ad4d8c20b42",
56
+ "original_title": "The Farewell",
57
+ "imageUrl": "https://image.tmdb.org/t/p/original/7UrIarxfjxZC9YGj8H1ATKZMXVy.jpg",
58
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/5INPBiKVRsyp9kgHfsC0cTfvKFH.jpg"
59
+ },
60
+ {
61
+ "id": "fd82d7eb-3028-4206-891b-8132130f37ba",
62
+ "original_title": "Greed",
63
+ "imageUrl": "https://image.tmdb.org/t/p/original/mZPmDFlVp1BSGQD4QCKHOwbXLfv.jpg",
64
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/cgmGPmyeShz9zM9GQM5EEgMutnd.jpg"
65
+ },
66
+ {
67
+ "id": "23dafbcc-5cc6-43ba-977a-32100e1e6e53",
68
+ "original_title": "Hello, Dolly!",
69
+ "imageUrl": "https://image.tmdb.org/t/p/original/aPZOt9BR3gnk1RyX924ySq81S4P.jpg",
70
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/rvsPkUYhWZkAKMb2fnWHw5pNAjZ.jpg"
71
+ },
72
+ {
73
+ "id": "9fb75c7e-3dc4-4e7a-a048-29eb4b2ab734",
74
+ "original_title": "Wrong Place",
75
+ "imageUrl": "https://image.tmdb.org/t/p/original/mlEtOQAQVy6eW65sHz3UduvzRK.jpg",
76
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/zSre0UHWLSnDoNrM9F2Go9OXq5G.jpg"
77
+ }
78
+ ]
79
+ },
80
+ {
81
+ "title": "Drama",
82
+ "movies": [
83
+ {
84
+ "id": "a17da688-fa3e-4da5-8554-7995472ee1b5",
85
+ "original_title": "Wendell & Wild",
86
+ "imageUrl": "https://image.tmdb.org/t/p/original/s7XxXJ7ponaLAkxiySRxox2Ssc4.jpg",
87
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/apBUC70udhxoLzXo7DqclQ6gcXo.jpg"
88
+ },
89
+ {
90
+ "id": "a3491afa-4d32-491a-8a4a-ce09ace64b7f",
91
+ "original_title": "V/H/S",
92
+ "imageUrl": "https://image.tmdb.org/t/p/original/xVGfCaTwVdZt3lFqtOVhTDqmG58.jpg",
93
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/xAC9kXLxUHpdCkISgYcLzYrxIQR.jpg"
94
+ },
95
+ {
96
+ "id": "214b1e0e-d364-4a64-a937-b5020bb244af",
97
+ "original_title": "The Rocky Horror Picture Show: Let's Do the Time Warp Again",
98
+ "imageUrl": "https://image.tmdb.org/t/p/original/56KEpnJWe5KvpiPu5XmK14L7Wyr.jpg",
99
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/6IZqrGf06xdaHCt3FmROZcJ7aeu.jpg"
100
+ },
101
+ {
102
+ "id": "fd82d7eb-3028-4206-891b-8132130f37ba",
103
+ "original_title": "Greed",
104
+ "imageUrl": "https://image.tmdb.org/t/p/original/mZPmDFlVp1BSGQD4QCKHOwbXLfv.jpg",
105
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/cgmGPmyeShz9zM9GQM5EEgMutnd.jpg"
106
+ },
107
+ {
108
+ "id": "23dafbcc-5cc6-43ba-977a-32100e1e6e53",
109
+ "original_title": "Hello, Dolly!",
110
+ "imageUrl": "https://image.tmdb.org/t/p/original/aPZOt9BR3gnk1RyX924ySq81S4P.jpg",
111
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/rvsPkUYhWZkAKMb2fnWHw5pNAjZ.jpg"
112
+ },
113
+ {
114
+ "id": "9fb75c7e-3dc4-4e7a-a048-29eb4b2ab734",
115
+ "original_title": "Wrong Place",
116
+ "imageUrl": "https://image.tmdb.org/t/p/original/mlEtOQAQVy6eW65sHz3UduvzRK.jpg",
117
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/zSre0UHWLSnDoNrM9F2Go9OXq5G.jpg"
118
+ }
119
+ ]
120
+ },
121
+ {
122
+ "title": "Romance",
123
+
124
+ "movies": [
125
+ {
126
+ "id": "df2bf24f-587c-4d28-8514-d6077d2d3a42",
127
+ "original_title": "Halloween III: Season of the Witch",
128
+ "imageUrl": "https://image.tmdb.org/t/p/original/WABfdeaThFYXCySGIOvRNv2sSW.jpg",
129
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/eyOKqtgNeEEIp7zYMHnpISpsaS3.jpg"
130
+ },
131
+ {
132
+ "id": "e27b38c1-ad1b-4636-a738-ff8dcfdb109d",
133
+ "original_title": "Superman: Doomsday",
134
+ "imageUrl": "https://image.tmdb.org/t/p/original/itvuWm7DFWWzWgW0xgiaKzzWszP.jpg",
135
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/oTPSjQyETTFYDehdbiG8yi2oDmL.jpg"
136
+ },
137
+
138
+ {
139
+ "id": "875c0a94-2735-4bf3-9e8c-76d426871ded",
140
+ "original_title": "White Heat",
141
+ "imageUrl": "https://image.tmdb.org/t/p/original/4ekAK25fz1FDzRUHuJs171uiVaI.jpg",
142
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/cap8458wFeRCJSKxL758dI82TRK.jpg"
143
+ },
144
+ {
145
+ "id": "fd82d7eb-3028-4206-891b-8132130f37ba",
146
+ "original_title": "Greed",
147
+ "imageUrl": "https://image.tmdb.org/t/p/original/mZPmDFlVp1BSGQD4QCKHOwbXLfv.jpg",
148
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/cgmGPmyeShz9zM9GQM5EEgMutnd.jpg"
149
+ },
150
+ {
151
+ "id": "23dafbcc-5cc6-43ba-977a-32100e1e6e53",
152
+ "original_title": "Hello, Dolly!",
153
+ "imageUrl": "https://image.tmdb.org/t/p/original/aPZOt9BR3gnk1RyX924ySq81S4P.jpg",
154
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/rvsPkUYhWZkAKMb2fnWHw5pNAjZ.jpg"
155
+ },
156
+ {
157
+ "id": "9fb75c7e-3dc4-4e7a-a048-29eb4b2ab734",
158
+ "original_title": "Wrong Place",
159
+ "imageUrl": "https://image.tmdb.org/t/p/original/mlEtOQAQVy6eW65sHz3UduvzRK.jpg",
160
+ "fallbackUrl": "https://image.tmdb.org/t/p/original/zSre0UHWLSnDoNrM9F2Go9OXq5G.jpg"
161
+ }
162
+ ]
163
+ }
164
+ ]
165
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "fip",
3
+ "description": "Displays a full information page of a content.",
4
+ "version": "1.0.0"
5
+ }
@@ -0,0 +1,19 @@
1
+ import $AbstractModule from "@AbstractModule";
2
+ import $FipRoutes from "@FipRoutes";
3
+
4
+ /**
5
+ * Fip module
6
+ *
7
+ * @name FipModule
8
+ * @class
9
+ * @module FipModule
10
+ * @extends AbstractModule
11
+ * @lazy
12
+ *
13
+ * @property {Trait[]} exports A list of trait's exported by the module
14
+ */
15
+ export default $AbstractModule.declare("FipModule", {
16
+ properties: /** @lends FipModule.prototype*/ {
17
+ exports: [$FipRoutes]
18
+ }
19
+ });
@@ -0,0 +1,19 @@
1
+ import $Routes from "@Routes";
2
+ import $FipScreen from "@FipScreen";
3
+
4
+ /**
5
+ * Fip module routes
6
+ * @name FipRoutes
7
+ * @class
8
+ * @extends Routes
9
+ */
10
+ export default $Routes.declare("FipRoutes", {
11
+ /**
12
+ * @route FipModule
13
+ */
14
+ methods: /** @lends FipRoutes.prototype */{
15
+ fip: function (data) {
16
+ return $FipScreen.display(data);
17
+ }
18
+ }
19
+ });
@@ -0,0 +1,12 @@
1
+ {
2
+ "data": {
3
+ "title": "Seven",
4
+ "genre": "Psycho Thriller",
5
+ "displayDuration": "2H07",
6
+ "year": "1995",
7
+ "parentalRating": "12",
8
+ "audioDescription": "audioD",
9
+ "description": "Two detectives, a rookie and a veteran, hunt a serial killer who uses the seven deadly sins as his motives.Lt. William Somerset is on the brink of retirement. Forced to train his replacement, Somerset is teamed with Detective David Mills on an investigation that draws these cops deeper into the twisted world of a cunning and meticulous criminal.",
10
+ "moviePoster": "https://image.tmdb.org/t/p/original/eiBMu2noc6r1QZLfQlFhfVtbXeM.jpg"
11
+ }
12
+ }
@@ -0,0 +1,169 @@
1
+ import $AppScreen from "@AppScreen";
2
+
3
+ import $ContainImagePrimitive from "@ContainImagePrimitive";
4
+ import $RectanglePrimitive from "@RectanglePrimitive";
5
+ import $FipContentInfoView from "@FipContentInfoView";
6
+ import $PlayButtonView from "@PlayButtonView";
7
+ // TODO remove and get data from service
8
+ import fipMock from "fipMock.json!";
9
+ import $Theme from "@Theme";
10
+
11
+ /**
12
+ * FIP
13
+ *
14
+ * @name FipScreen
15
+ * @class
16
+ * @extends AppScreen
17
+
18
+ * @screen
19
+ */
20
+
21
+ export default $AppScreen.declare("FipScreen", {
22
+ statics: /** @lends FipScreen */ {
23
+ COLOR_TRANSPARENT: "#00000000"
24
+ },
25
+
26
+ children: /** @lends FipScreen.prototype */ {
27
+ moviePoster: {
28
+ class: $ContainImagePrimitive
29
+ },
30
+ leftGradient: {
31
+ class: $RectanglePrimitive
32
+ },
33
+ downGradient: {
34
+ class: $RectanglePrimitive
35
+ },
36
+ contentInfo: {
37
+ class: $FipContentInfoView
38
+ },
39
+ playButton: {
40
+ class: $PlayButtonView
41
+ }
42
+ },
43
+
44
+ methods: /** @lends FipScreen.prototype */ {
45
+ //////////////////////////////////////////////////////////////////////////////////////////
46
+ // EXTENSION POINTS
47
+ //////////////////////////////////////////////////////////////////////////////////////////
48
+
49
+ /**
50
+ * @override
51
+ */
52
+ beforeShow: function () {
53
+ this.moviePoster.url = "";
54
+ },
55
+
56
+ /**
57
+ * Prepare screen data: get the business data to feed the views
58
+ * View should always be fullfilled with business model(s).
59
+ *
60
+ * It must return an Object.
61
+ *
62
+ * @param {Object} [context] The context shared by the screens during display
63
+ * @returns {Promise<Object,Error>} returns a promise resolved with the data
64
+ * @override
65
+ */
66
+ prepareData: function (context) {
67
+ // TODO get data from service
68
+ return this._getFipContentFromMock().then(result => {
69
+ if (context.data) {
70
+ result.title = context.data.title;
71
+ result.moviePoster = context.data.moviePoster;
72
+ }
73
+ return Promise.resolve(result);
74
+ });
75
+ },
76
+
77
+ connectData: function (context) {
78
+ this.moviePoster.url = this.data.moviePoster;
79
+ this.contentInfo.setData({
80
+ infoDetailView: this.data.infoDetailView,
81
+ title: this.data.title,
82
+ description: this.data.description
83
+ });
84
+ },
85
+
86
+ /**
87
+ * @override
88
+ */
89
+ _getChildToFocus: function () {
90
+ return this.playButton;
91
+ },
92
+
93
+ /**
94
+ * @override
95
+ */
96
+ back: function () {
97
+ return this.routeToPrevious();
98
+ },
99
+
100
+ /**
101
+ * @override
102
+ */
103
+ ok: function () {
104
+ return this.route("player");
105
+ },
106
+
107
+ /**
108
+ *get the content of the fip page
109
+ * @returns {Promise} the promise of an object
110
+ */
111
+ _getFipContentFromMock: function () {
112
+ const data = fipMock.data;
113
+ const metadataText = ["genre", "displayDuration", "year"];
114
+ const metadataImage = ["parentalRating", "audioDescription"];
115
+ let infoDetailView = [];
116
+ let finalDetailedInfo = {};
117
+
118
+ for (const [key, value] of Object.entries(data)) {
119
+ if (metadataText.includes(key)) {
120
+ infoDetailView.push({
121
+ type: key,
122
+ value,
123
+ category: "textCategory"
124
+ });
125
+ } else if (metadataImage.includes(key)) {
126
+ infoDetailView.push({
127
+ type: key,
128
+ value,
129
+ category: "imageCategory"
130
+ });
131
+ } else {
132
+ finalDetailedInfo[key] = value;
133
+ }
134
+ finalDetailedInfo.infoDetailView = infoDetailView;
135
+ }
136
+ return Promise.resolve(finalDetailedInfo);
137
+ }
138
+ },
139
+
140
+ style: {
141
+ moviePoster: {
142
+ height: $Theme.FULL_SCREEN_HEIGHT,
143
+ width: $Theme.FULL_SCREEN_WIDTH
144
+ },
145
+ leftGradient: {
146
+ width: 800,
147
+ height: $Theme.FULL_SCREEN_HEIGHT,
148
+ gradientDirection: "to right",
149
+ gradientColorStart: $Theme.COLOR_BACKGROUND,
150
+ gradientColorEnd: ({parent}) => parent.statics.COLOR_TRANSPARENT
151
+ },
152
+ downGradient: {
153
+ y: ({height}) => $Theme.FULL_SCREEN_HEIGHT - height,
154
+ width: $Theme.FULL_SCREEN_WIDTH,
155
+ height: 500,
156
+ gradientDirection: "to top",
157
+ gradientColorStart: $Theme.COLOR_BACKGROUND,
158
+ gradientColorEnd: ({parent}) => parent.statics.COLOR_TRANSPARENT
159
+ },
160
+ contentInfo: {
161
+ x: $Theme.SCREEN_LEFT_MARGIN,
162
+ y: 630
163
+ },
164
+ playButton: {
165
+ x: $Theme.SCREEN_LEFT_MARGIN,
166
+ y: ({parent}) => parent.contentInfo.y + parent.contentInfo.height + 50
167
+ }
168
+ }
169
+ });
@@ -0,0 +1,77 @@
1
+ import $View from "@View";
2
+ import $TextPrimitive from "@TextPrimitive";
3
+ import $ScrollTextView from "@ScrollTextView";
4
+ import $InfoListView from "@InfoListView";
5
+ import $Theme from "@Theme";
6
+
7
+ /**
8
+ * Content info view for FIP
9
+ *
10
+ * @name FipContentInfoView
11
+ * @class
12
+ * @extends View
13
+ *
14
+ * @property {Boolean} hasScrollBar
15
+ */
16
+ export default $View.declare("FipContentInfoView", {
17
+ statics: {
18
+ WIDTH: 1000,
19
+ LIST_HEIGHT: 110,
20
+ FIP_TITLE_SIZE: 42,
21
+ DEFAULT_FONT_SIZE: 20
22
+ },
23
+
24
+ properties: {
25
+ hasScrollBar: ({description}) => description.nbOfPages > 1
26
+ },
27
+
28
+ children: {
29
+ title: {
30
+ class: $TextPrimitive,
31
+ text: ({parent}) => parent.data.title || ""
32
+ },
33
+ info: {
34
+ class: $InfoListView
35
+ },
36
+ description: {
37
+ class: $ScrollTextView,
38
+ text: ({parent}) => parent.data.description || "",
39
+ margin: 20
40
+ }
41
+ },
42
+
43
+ methods: {
44
+ setData: function (data) {
45
+ this.info.setData(data.infoDetailView);
46
+ this.title.text = data.title;
47
+ this.description.text = data.description;
48
+ }
49
+ },
50
+
51
+ style: {
52
+ height: 240,
53
+ title: {
54
+ // eslint-disable-next-line @dana/no-use-width-height-auto
55
+ isAuto_width: true,
56
+ height: ({parent}) => parent.statics.FIP_TITLE_SIZE + 10,
57
+ size: ({parent}) => parent.statics.FIP_TITLE_SIZE,
58
+ family: $Theme.RobotoBold,
59
+ color: $Theme.COLOR_TEXT
60
+ },
61
+ info: {
62
+ y: ({parent}) => parent.title.y + parent.title.height + 20,
63
+ width: ({parent}) => parent.width,
64
+ height: 50
65
+ },
66
+
67
+ description: {
68
+ y: ({parent}) => parent.info.y + parent.info.height,
69
+ color: $Theme.COLOR_TEXT,
70
+ ellipsis: true,
71
+ maxLines: 3,
72
+ size: 30,
73
+ width: $Theme.FULL_SCREEN_WIDTH / 1.5,
74
+ height: ({parent}) => parent.statics.LIST_HEIGHT
75
+ }
76
+ }
77
+ });
@@ -0,0 +1,35 @@
1
+ import $MRecyclingItem from "@MRecyclingItem";
2
+ import $View from "@View";
3
+ import $ContainImagePrimitive from "@ContainImagePrimitive";
4
+
5
+ /**
6
+ * Content info view for FIP
7
+ *
8
+ * @name InfoDetailImageView
9
+ * @class
10
+ * @extends View
11
+ *
12
+ */
13
+ export default $View.declare("InfoDetailImageView", {
14
+ traits: [$MRecyclingItem],
15
+
16
+ statics: /** @lends InfoDetailImageView */ {
17
+ IMAGE_WIDTH: 20
18
+ },
19
+
20
+ children: {
21
+ image: {
22
+ class: $ContainImagePrimitive,
23
+ url: ({theme, parent}) => theme.getImageUrl(parent.data.value)
24
+ }
25
+ },
26
+
27
+ style: {
28
+ height: ({statics}) => statics.IMAGE_WIDTH + 10,
29
+ width: ({statics}) => statics.IMAGE_WIDTH,
30
+ image: {
31
+ width: ({parent}) => parent.statics.IMAGE_WIDTH,
32
+ height: ({parent}) => parent.statics.IMAGE_WIDTH
33
+ }
34
+ }
35
+ });
@@ -0,0 +1,39 @@
1
+ import $MRecyclingItem from "@MRecyclingItem";
2
+ import $View from "@View";
3
+ import $Theme from "@Theme";
4
+ import $TextPrimitive from "@TextPrimitive";
5
+
6
+ /**
7
+ * Content info view for FIP
8
+ *
9
+ * @name InfoDetailTextView
10
+ * @class
11
+ * @extends View
12
+ *
13
+ */
14
+
15
+ export default $View.declare("InfoDetailTextView", {
16
+ traits: [$MRecyclingItem],
17
+
18
+ statics: /** @lends InfoDetailTextView */ {
19
+ DEFAULT_TEXT_FONT_SIZE: 20
20
+ },
21
+
22
+ children: {
23
+ infoText: {
24
+ class: $TextPrimitive,
25
+ text: ({parent}) => parent.data.value
26
+ }
27
+ },
28
+
29
+ style: {
30
+ height: ({statics}) => statics.DEFAULT_TEXT_FONT_SIZE + 10,
31
+ width: ({infoText}) => infoText.width,
32
+ infoText: {
33
+ // eslint-disable-next-line @dana/no-use-width-height-auto
34
+ isAuto_width: true,
35
+ height: ({parent}) => parent.statics.DEFAULT_TEXT_FONT_SIZE,
36
+ color: $Theme.COLOR_TEXT
37
+ }
38
+ }
39
+ });