dana-cli 0.0.0-stage → 0.0.25

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 +66 -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,24 @@
1
+ {
2
+ "base-titanos": {
3
+ "base": {
4
+ "vendors": ["@dana/vendor-components", "@dana/vendor-titanos"],
5
+ "name": "Dana"
6
+ },
7
+ "device": {
8
+ "appName": "Dana",
9
+ "type": "titanOS"
10
+ }
11
+ },
12
+ "template-titanos_css": {
13
+ "mixins": ["default", "base-titanos"],
14
+ "base": {
15
+ "vendors": ["@dana/renderer-css"]
16
+ }
17
+ },
18
+ "template-titanos_lightning": {
19
+ "mixins": ["default", "base-titanos"],
20
+ "base": {
21
+ "vendors": ["@dana/renderer-lightning-html5"]
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "tizen-lightning": {
3
+ "mixins": ["default, base-lightning"],
4
+ "base": {
5
+ "name": "Tizen",
6
+ "vendors": ["@dana/engine-html5", "@dana/vendor-tizen","@dana/vendor-shaka"]
7
+ },
8
+ "device": {
9
+ "type": "tizen",
10
+ "profileName": "tv-samsung",
11
+ "icon": "images/1080p/dana.png",
12
+ "application": {
13
+ "requiredVersion": "1.0",
14
+ "package": "itKGwKnOgg",
15
+ "id": "itKGwKnOgg.TizenApp"
16
+ },
17
+ "features": [
18
+ "http://tizen.org/feature/screen.size.normal.1080.1920"
19
+ ],
20
+ "privileges": [
21
+ "http://tizen.org/privilege/internet",
22
+ "http://tizen.org/privilege/tv.inputdevice",
23
+ "http://tizen.org/privilege/application.launch",
24
+ "http://tizen.org/privilege/download",
25
+ "http://developer.samsung.com/privilege/network.public",
26
+ "http://tizen.org/privilege/tv.audio",
27
+ "http://developer.samsung.com/privilege/drmplay",
28
+ "http://developer.samsung.com/privilege/productinfo"
29
+ ],
30
+ "settings": [
31
+ {
32
+ "pointing-device-support": "disable",
33
+ "background-support": "enable"
34
+ },
35
+ {
36
+ "screen-orientation": "landscape",
37
+ "context-menu": "enable",
38
+ "background-support": "disable",
39
+ "encryption": "disable",
40
+ "install-location": "auto",
41
+ "hwkey-event": "enable"
42
+ }
43
+ ],
44
+ "accessOrigins": [
45
+ {
46
+ "origin": "*",
47
+ "subdomains": "true"
48
+ }
49
+ ]
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "base-tvos": {
3
+ "base": {
4
+ "name": "base-tvos",
5
+ "vendors": ["@dana/renderer-tvos", "@dana/vendor-components"]
6
+ },
7
+ "device": {
8
+ "type": "tvos"
9
+ }
10
+ },
11
+ "template-tvos": {
12
+ "mixins": ["default", "base-tvos"],
13
+ "base": {
14
+ "name": "base-tvos",
15
+ "vendors": ["@dana/renderer-tvos", "@dana/vendor-components"]
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "base-vidaa": {
3
+ "base": {
4
+ "vendors": ["@dana/vendor-components"],
5
+ "name": "Dana"
6
+ },
7
+ "device": {
8
+ "appName": "Dana",
9
+ "type": "vidaa"
10
+ }
11
+ },
12
+ "template-vidaa_css": {
13
+ "mixins": ["default", "base-vidaa"],
14
+ "base": {
15
+ "vendors": ["@dana/renderer-css"]
16
+ }
17
+ },
18
+ "template-vidaa_lightning": {
19
+ "mixins": ["default", "base-vidaa"],
20
+ "base": {
21
+ "vendors": ["@dana/renderer-lightning-html5"]
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "webos": {
3
+ "mixins": ["default"],
4
+ "base": {
5
+ "name": "Webos",
6
+ "vendors": ["@dana/vendor-components", "@dana/vendor-shaka"]
7
+ },
8
+ "device": {
9
+ "type": "webos",
10
+ "appId": "com.dana.ui",
11
+ "appVendor": "Wiztivi",
12
+ "appTitle": "Dana UI",
13
+ "icon": "images/dana.png",
14
+ "largeIcon": "images/dana.png",
15
+ "disableBackHistoryAPI": true
16
+ },
17
+ "app": {
18
+ "enablePointer": true
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "fip",
3
+ "description": "Full Information Page of a content"
4
+ }
@@ -0,0 +1,18 @@
1
+ import $AbstractModule from "@AbstractModule";
2
+ import $FipRoutes from "@FipRoutes";
3
+
4
+ /**
5
+ * Program info page module
6
+ * @name FipModule
7
+ * @class
8
+ * @module FipModule
9
+ * @extends AbstractModule
10
+ * @lazy
11
+ *
12
+ * @property {Trait[]} exports A list of trait's exported by the module
13
+ */
14
+ export default $AbstractModule.declare("FipModule", {
15
+ properties: /** @lends FipModule.prototype*/ {
16
+ exports: [$FipRoutes]
17
+ }
18
+ });
@@ -0,0 +1,19 @@
1
+ import $Routes from "@Routes";
2
+ import $FipContentScreen from "@FipContentScreen";
3
+
4
+ /**
5
+ * Program info 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
+ fipContent: function (data) {
16
+ return $FipContentScreen.display(data);
17
+ }
18
+ }
19
+ });
@@ -0,0 +1,146 @@
1
+ import $AppScreen from "@AppScreen";
2
+
3
+ // Views
4
+ import $ImagePrimitive from "@ImagePrimitive";
5
+ import $RectanglePrimitive from "@RectanglePrimitive";
6
+ import $FipContentInfoView from "@FipContentInfoView";
7
+ import $PlayButtonView from "@PlayButtonView";
8
+
9
+ // Services
10
+ import $VodService from "@VodService";
11
+
12
+ // Theme
13
+ import $Theme from "@Theme";
14
+
15
+ /**
16
+ * Full information page Screen
17
+ *
18
+ * @name FipContentScreen
19
+ * @class
20
+ * @extends AppScreen
21
+ * @screen
22
+ *
23
+ * @property {$Theme} theme Instance of theme
24
+ * @property {$VodService} vodService Instance of VodService
25
+ */
26
+ export default $AppScreen.declare("FipContentScreen", {
27
+ properties: {
28
+ theme: {class: $Theme},
29
+ vodService: {class: $VodService}
30
+ },
31
+
32
+ children: /** @lends FipContentScreen.prototype */ {
33
+ image: {
34
+ class: $ImagePrimitive
35
+ },
36
+ leftGradient: {
37
+ class: $RectanglePrimitive
38
+ },
39
+ downGradient: {
40
+ class: $RectanglePrimitive
41
+ },
42
+ contentInfo: {
43
+ class: $FipContentInfoView
44
+ },
45
+ playButton: {
46
+ class: $PlayButtonView
47
+ }
48
+ },
49
+
50
+ methods: /** @lends FipContentScreen.prototype */ {
51
+ //////////////////////////////////////////////////////////////////////////////////////////
52
+ // EXTENSION POINTS
53
+ //////////////////////////////////////////////////////////////////////////////////////////
54
+
55
+ /**
56
+ * @override
57
+ */
58
+ beforeShow: function () {
59
+ this.image.url = "";
60
+ },
61
+
62
+ /**
63
+ * Prepare screen data: get the business data to feed the views
64
+ * View should always be full filled with business model(s).
65
+ *
66
+ * It must returns a Object.
67
+ *
68
+ * @param {Object} [context] The context shared by the screens during display
69
+ * @param {string} [context.contentId] The id of the content to display information
70
+ * @returns {Promise<Object,Error>} returns a promise resolved with the data
71
+ */
72
+ prepareData: function (context) {
73
+ return Promise.resolve(context);
74
+ },
75
+
76
+ /**
77
+ * Connect the data prepared by {@link prepareData} to the views.
78
+ * Use the data property, which is the return value of {@link prepareData}.
79
+ *
80
+ * @param {Object} [context] The context shared by the screens during display
81
+ */
82
+ connectData: function (context) {
83
+ this.contentInfo.data = this.data;
84
+ this.image.url = this.data.getImageUrl({width: $Theme.FIP_IMAGE_WIDTH, height: $Theme.FIP_IMAGE_HEIGHT, ratio: $Theme.IMAGE_RATIO});
85
+ },
86
+
87
+ /**
88
+ * @override
89
+ */
90
+ ok: function (key) {
91
+ if (this.focusedChild.id === this.playButton.id) {
92
+ console.info("**Launching Player**");
93
+ }
94
+ },
95
+
96
+ up: function (key) {
97
+ if (this.focusedChild.id === this.contentInfo.id) {
98
+ return this.contentInfo.up();
99
+ } else if (this.focusedChild.id === this.playButton.id && this.contentInfo.hasScrollBar) {
100
+ this.contentInfo.focus();
101
+ }
102
+ },
103
+
104
+ down: function (key) {
105
+ if (this.focusedChild.id === this.contentInfo.id) {
106
+ const scrolled = this.contentInfo.down();
107
+
108
+ if (scrolled === false) {
109
+ this.playButton.focus();
110
+ }
111
+ }
112
+ }
113
+ },
114
+
115
+ style: {
116
+ image: {
117
+ x: ({parent}) => parent.width - $Theme.FIP_IMAGE_HEIGHT * $Theme.IMAGE_RATIO,
118
+ height: $Theme.FIP_IMAGE_HEIGHT,
119
+ width: $Theme.FIP_IMAGE_HEIGHT * $Theme.IMAGE_RATIO
120
+ },
121
+ leftGradient: {
122
+ x: ({parent}) => parent.image.x,
123
+ width: $Theme.FIP_IMAGE_HEIGHT * $Theme.IMAGE_RATIO,
124
+ height: $Theme.FIP_IMAGE_HEIGHT,
125
+ gradientDirection: "to right",
126
+ gradientColorStart: $Theme.COLOR_WHITE,
127
+ gradientColorEnd: $Theme.TRANSPARENT
128
+ },
129
+ downGradient: {
130
+ x: ({parent}) => parent.width - $Theme.FIP_IMAGE_HEIGHT * $Theme.IMAGE_RATIO,
131
+ width: $Theme.FIP_IMAGE_HEIGHT * $Theme.IMAGE_RATIO,
132
+ height: $Theme.FIP_IMAGE_HEIGHT,
133
+ gradientDirection: "to top",
134
+ gradientColorStart: $Theme.COLOR_WHITE,
135
+ gradientColorEnd: $Theme.TRANSPARENT
136
+ },
137
+ contentInfo: {
138
+ x: $Theme.SCREEN_HORIZONTAL_MARGIN,
139
+ y: ({parent, height}) => parent.height - height - 120
140
+ },
141
+ playButton: {
142
+ x: $Theme.SCREEN_HORIZONTAL_MARGIN,
143
+ y: ({parent, height}) => parent.height - height - 50
144
+ }
145
+ }
146
+ });
@@ -0,0 +1,66 @@
1
+ // eslint-disable-next-line @dana/no-import-rendered-view
2
+ import $RenderedView from "@RenderedView";
3
+
4
+ // VIEWS & PRIMITIVES
5
+ import $RectanglePrimitive from "@RectanglePrimitive";
6
+ // CONSTANTS
7
+ import $Theme from "@Theme";
8
+
9
+ /**
10
+ * Elevator for scrollable text
11
+ *
12
+ * @name ElevatorView
13
+ * @class
14
+ * @extends RenderedView
15
+ *
16
+ * @property {Number} movableHeight - Height of the movable element
17
+ * @property {Number} fixedHeight - Height of the fixed element
18
+ * @property {Number} defaultPosition - Default y position for movable element
19
+ *
20
+ */
21
+ export default $RenderedView.declare("ElevatorView", {
22
+
23
+ statics: /** @lends ElevatorView */ {
24
+ MOVABLE_WIDTH: 12,
25
+ MOVABLE_DEFAULT_HEIGHT: 300,
26
+ FIXED_WIDTH: 6,
27
+ FIXED_DEFAULT_HEIGHT: 800,
28
+ DEFAULT_POSITION: 0
29
+ },
30
+
31
+ properties: /** @lends ElevatorView.prototype */ {
32
+ movableHeight: ({statics}) => statics.MOVABLE_DEFAULT_HEIGHT,
33
+ fixedHeight: ({statics}) => statics.FIXED_DEFAULT_HEIGHT,
34
+ defaultPosition: ({statics}) => statics.DEFAULT_POSITION
35
+
36
+ },
37
+
38
+ children: /** @lends ElevatorView.prototype */ {
39
+ fixedRectanglePrimitive: {class: $RectanglePrimitive},
40
+ movableRectanglePrimitive: {class: $RectanglePrimitive}
41
+ },
42
+
43
+ transitions: /** @lends ElevatorView.prototype */ {
44
+ y: {duration: 300}
45
+ },
46
+
47
+ style: /** @lends ElevatorView.prototype */ {
48
+ width: ({statics}) => statics.MOVABLE_WIDTH,
49
+ height: ({statics}) => statics.FIXED_DEFAULT_HEIGHT,
50
+ opacity: ({movableHeight, fixedHeight}) => fixedHeight === movableHeight ? 0 : 1,
51
+ movableRectanglePrimitive: {
52
+ y: ({parent}) => parent.defaultPosition,
53
+ height: ({parent}) => parent.movableHeight,
54
+ width: ({parent}) => parent.statics.MOVABLE_WIDTH,
55
+ fillColor: $Theme.COLOR_BLUE_LIGHT,
56
+ borderRadius: ({parent}) => parent.statics.MOVABLE_WIDTH / 2
57
+ },
58
+ fixedRectanglePrimitive: {
59
+ x: ({parent}) => (parent.statics.MOVABLE_WIDTH - parent.statics.FIXED_WIDTH) / 2,
60
+ height: ({parent}) => parent.fixedHeight,
61
+ width: ({parent}) => parent.statics.FIXED_WIDTH,
62
+ fillColor: $Theme.COLOR_WHITE,
63
+ borderRadius: ({parent}) => parent.statics.FIXED_WIDTH / 2
64
+ }
65
+ }
66
+ });
@@ -0,0 +1,90 @@
1
+ import $View from "@View";
2
+ import $TextPrimitive from "@TextPrimitive";
3
+ import $ScrollTextView from "@ScrollTextView";
4
+ import $ElevatorView from "@ElevatorView";
5
+ // MODELS
6
+ import $Content from "@Content";
7
+ // SINGLETONS
8
+ import $Theme from "@Theme";
9
+
10
+ /**
11
+ * Content info view for FIP
12
+ *
13
+ * @name FipContentInfoView
14
+ * @class
15
+ * @extends View
16
+ *
17
+ * @property {$AbstractContent} data Data model
18
+ * @property {Boolean} hasScrollBar
19
+ */
20
+ export default $View.declare("FipContentInfoView", {
21
+ statics: {
22
+ WIDTH: 1000,
23
+ LIST_HEIGHT: 110
24
+ },
25
+
26
+ properties: {
27
+ data: {class: $Content},
28
+ hasScrollBar: ({description}) => description.nbOfPages > 1
29
+ },
30
+
31
+ children: {
32
+ title: {
33
+ class: $TextPrimitive,
34
+ text: ({parent}) => parent.data.title || ""
35
+ },
36
+ genres: {
37
+ class: $TextPrimitive,
38
+ text: ({parent}) => parent.data.genres ? parent.data.genres.join(", ") : ""
39
+ },
40
+ description: {
41
+ class: $ScrollTextView,
42
+ text: ({parent}) => parent.data.description || "",
43
+ margin: 20
44
+ },
45
+ elevator: {
46
+ class: $ElevatorView,
47
+ fixedHeight: ({parent}) => parent.statics.LIST_HEIGHT,
48
+ movableHeight: ({parent}) => Math.ceil(parent.statics.LIST_HEIGHT / parent.description.nbOfPages),
49
+ defaultPosition: ({parent, movableHeight}) => parent.description.currentPage * movableHeight
50
+ }
51
+ },
52
+
53
+ style: {
54
+ width: $Theme.FULL_SCREEN_WIDTH,
55
+ title: {
56
+ size: $Theme.H1_FONT_SIZE,
57
+ height: $Theme.H1_FONT_SIZE + 10,
58
+ width: ({parent}) => parent.statics.WIDTH
59
+ },
60
+ genres: {
61
+ y: ({parent}) => parent.title.y + parent.title.height,
62
+ size: $Theme.DEFAULT_FONT_SIZE,
63
+ height: $Theme.DEFAULT_FONT_SIZE + 10,
64
+ width: ({parent}) => parent.statics.WIDTH
65
+ },
66
+ description: {
67
+ x: 15,
68
+ y: ({parent}) => parent.genres.y + parent.genres.height + 10,
69
+ width: $Theme.FULL_SCREEN_WIDTH / 4,
70
+ size: $Theme.DEFAULT_FONT_SIZE,
71
+ height: ({parent}) => parent.statics.LIST_HEIGHT,
72
+ ellipsis: true
73
+ },
74
+ elevator: {
75
+ y: ({parent}) => parent.description.y
76
+ },
77
+ height: ({description}) => description.y + description.height
78
+ },
79
+
80
+ methods: /** @lends FipContentInfoView.prototype */ {
81
+
82
+ up: function () {
83
+ return this.description.previous();
84
+ },
85
+
86
+ down: function () {
87
+ return this.description.next();
88
+ }
89
+ }
90
+ });
@@ -0,0 +1,58 @@
1
+ import $View from "@View";
2
+ import $TextPrimitive from "@TextPrimitive";
3
+ import $RectanglePrimitive from "@RectanglePrimitive";
4
+ import $Theme from "@Theme";
5
+
6
+ /**
7
+ * Play button
8
+ *
9
+ * @name PlayButtonView
10
+ * @class
11
+ * @extends View
12
+ */
13
+ export default $View.declare("PlayButtonView", {
14
+ statics: /** @lends PlayButtonView */ {
15
+ MARGIN: 20,
16
+ COLOR_BLACK_0_8: "#00000080"
17
+ },
18
+
19
+ children: {
20
+ rectangle: {
21
+ class: $RectanglePrimitive
22
+ },
23
+ text: {
24
+ class: $TextPrimitive,
25
+ text: "Play"
26
+ }
27
+ },
28
+
29
+ states: {
30
+ focused: {
31
+ "text.color": $Theme.COLOR_WHITE
32
+ }
33
+ },
34
+
35
+ style: {
36
+ width: ({text, statics}) => text.width + 2 * statics.MARGIN,
37
+ height: 60,
38
+ text: {
39
+ size: $Theme.H2_FONT_SIZE,
40
+ x: ({parent}) => parent.statics.MARGIN,
41
+ y: 5,
42
+ isAuto_width: true, // eslint-disable-line @dana/no-use-width-height-auto
43
+ color: $Theme.COLOR_BLACK,
44
+ height: 50
45
+ },
46
+ rectangle: {
47
+ fillColor: $Theme.COLOR_BLUE_LIGHT,
48
+ width: ({parent}) => parent.width,
49
+ height: 60,
50
+ gradientDirection: "to right",
51
+ borderRadius: 12,
52
+ shadowColor: ({parent}) => parent.statics.COLOR_BLACK_0_8,
53
+ shadowRadius: 15,
54
+ shadowXOffset: 6,
55
+ shadowYOffset: 10
56
+ }
57
+ }
58
+ });
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "customBE",
3
+ "version": "1.0.0",
4
+ "dependencies": {}
5
+ }