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.
- package/.github/dependabot.yml +43 -0
- package/.github/labeler.yml +30 -0
- package/.github/workflows/bump.yml +51 -0
- package/.github/workflows/ci-cd.yml +110 -0
- package/.github/workflows/dependabot-automerge-call.yml +13 -0
- package/.nvmrc +1 -0
- package/.prettierignore +4 -0
- package/.prettierrc +4 -0
- package/CODEOWNERS +5 -0
- package/README.md +50 -2
- package/bin/bump.js +48 -0
- package/eslint.config.mjs +12 -0
- package/images/vodScreen1.png +0 -0
- package/package.json +53 -5
- package/sonar-project.properties +20 -0
- package/tools/cli/README.md +51 -0
- package/tools/cli/__mocks__/fs/promises.cjs +4 -0
- package/tools/cli/bin/dana.js +3 -0
- package/tools/cli/dana_completion.sh +156 -0
- package/tools/cli/eslint.config.mjs +14 -0
- package/tools/cli/package.json +67 -0
- package/tools/cli/rollup.config.mjs +26 -0
- package/tools/cli/src/commands/addComponent/addMenu/add-menu.ts +65 -0
- package/tools/cli/src/commands/addComponent/addMenu/addMenuDefinition.ts +21 -0
- package/tools/cli/src/commands/addComponent/addRail/add-rail.ts +59 -0
- package/tools/cli/src/commands/addComponent/addRail/addRailDefinition.ts +34 -0
- package/tools/cli/src/commands/addComponent/addScreen/add-screen.ts +42 -0
- package/tools/cli/src/commands/addComponent/addScreen/addScreenDefinition.ts +17 -0
- package/tools/cli/src/commands/addComponent/addScrollView/add-scrollView.ts +48 -0
- package/tools/cli/src/commands/addComponent/addScrollView/addScrollViewDefinition.ts +16 -0
- package/tools/cli/src/commands/addComponent/config/ComponentConfig.ts +169 -0
- package/tools/cli/src/commands/addComponent/config/componentTypes.ts +38 -0
- package/tools/cli/src/commands/addComponent/const/componentConst.ts +20 -0
- package/tools/cli/src/commands/addComponent/const/defaultConfig.ts +28 -0
- package/tools/cli/src/commands/addComponent/const/navigationConst.ts +36 -0
- package/tools/cli/src/commands/addComponent/createComponent.ts +45 -0
- package/tools/cli/src/commands/addComponent/helper/ComponentHelper.ts +98 -0
- package/tools/cli/src/commands/addDevice/add-device.ts +106 -0
- package/tools/cli/src/commands/addDevice/addDeviceDefinition.ts +13 -0
- package/tools/cli/src/commands/addDevice/deviceConfig/androidtvConfig.ts +142 -0
- package/tools/cli/src/commands/addDevice/deviceConfig/configTypes.ts +44 -0
- package/tools/cli/src/commands/addDevice/deviceConfig/deviceConfig.ts +38 -0
- package/tools/cli/src/commands/addDevice/deviceConfig/titanosConfig.ts +17 -0
- package/tools/cli/src/commands/addDevice/deviceConfig/tizenConfig.ts +64 -0
- package/tools/cli/src/commands/addDevice/deviceConfig/tvosConfig.ts +50 -0
- package/tools/cli/src/commands/addDevice/deviceConfig/vidaaConfig.ts +17 -0
- package/tools/cli/src/commands/addDevice/deviceConfig/webosConfig.ts +64 -0
- package/tools/cli/src/commands/addDevice/helper/addDeviceHelper.ts +121 -0
- package/tools/cli/src/commands/addDianaSkills/add-dianaSkills.ts +55 -0
- package/tools/cli/src/commands/addDianaSkills/addDianaSkillsDefinition.ts +13 -0
- package/tools/cli/src/commands/addDianaSkills/dianaDependencies.ts +15 -0
- package/tools/cli/src/commands/addModule/add-module.ts +46 -0
- package/tools/cli/src/commands/addModule/addModuleDefinition.ts +17 -0
- package/tools/cli/src/commands/addModule/moduleConst.ts +18 -0
- package/tools/cli/src/commands/authentication/AuthenticationManager.ts +255 -0
- package/tools/cli/src/commands/authentication/authDefinition.ts +51 -0
- package/tools/cli/src/commands/authentication/authHook.ts +50 -0
- package/tools/cli/src/commands/authentication/authentConst.ts +6 -0
- package/tools/cli/src/commands/authentication/commands/get-packages-token.ts +40 -0
- package/tools/cli/src/commands/authentication/commands/login.ts +63 -0
- package/tools/cli/src/commands/authentication/commands/logout.ts +26 -0
- package/tools/cli/src/commands/authentication/commands/status.ts +47 -0
- package/tools/cli/src/commands/authentication/helper/CodeArtifactHelper.ts +66 -0
- package/tools/cli/src/commands/authentication/helper/CommandHelper.ts +9 -0
- package/tools/cli/src/commands/authentication/helper/CredentialsHelper.ts +176 -0
- package/tools/cli/src/commands/authentication/helper/SPM.ts +95 -0
- package/tools/cli/src/commands/authentication/tokenHook.ts +30 -0
- package/tools/cli/src/commands/commandHelp/customHelp.ts +31 -0
- package/tools/cli/src/commands/completion/completion.ts +53 -0
- package/tools/cli/src/commands/completion/completionDefinition.ts +16 -0
- package/tools/cli/src/commands/createApp/const/createAppTasks.ts +133 -0
- package/tools/cli/src/commands/createApp/const/setupConst.ts +16 -0
- package/tools/cli/src/commands/createApp/const/templateConst.ts +10 -0
- package/tools/cli/src/commands/createApp/createApp.ts +60 -0
- package/tools/cli/src/commands/createApp/createAppDefinition.ts +26 -0
- package/tools/cli/src/commands/createApp/helpers/CreateAppHelper.ts +167 -0
- package/tools/cli/src/commands/createApp/helpers/SetupChecker.ts +98 -0
- package/tools/cli/src/commands/hooks/checkDanaProjectHook.ts +30 -0
- package/tools/cli/src/commands/zip/zip.ts +26 -0
- package/tools/cli/src/commands/zip/zipDefinition.ts +13 -0
- package/tools/cli/src/common/commonConst.ts +1 -0
- package/tools/cli/src/common/const/deviceConst.ts +110 -0
- package/tools/cli/src/common/const/exitCodeConst.ts +12 -0
- package/tools/cli/src/common/helpers/CreateArchiveHelper.ts +55 -0
- package/tools/cli/src/common/helpers/CreateFileHelper.ts +199 -0
- package/tools/cli/src/common/helpers/InputValidator.ts +58 -0
- package/tools/cli/src/common/helpers/InstallHelper.ts +202 -0
- package/tools/cli/src/common/helpers/UpdateFileHelper.ts +239 -0
- package/tools/cli/src/common/helpers/UserInputGetter.ts +145 -0
- package/tools/cli/src/common/helpers/handlebarsHelper.ts +31 -0
- package/tools/cli/src/common/helpers/stringHelper.ts +25 -0
- package/tools/cli/src/common/translation/en.json +87 -0
- package/tools/cli/src/common/translation/translation.ts +6 -0
- package/tools/cli/src/common/types/helperTypes.ts +79 -0
- package/tools/cli/src/index.ts +16 -0
- package/tools/cli/src/program.ts +59 -0
- package/tools/cli/tests/commands/addComponent/addMenu/add-menu.test.ts +96 -0
- package/tools/cli/tests/commands/addComponent/addRail/add-rail.test.ts +57 -0
- package/tools/cli/tests/commands/addComponent/addScreen/add-screen.test.ts +55 -0
- package/tools/cli/tests/commands/addComponent/addScrollView/add-scrollView.test.ts +89 -0
- package/tools/cli/tests/commands/addComponent/config/ComponentConfig.test.ts +261 -0
- package/tools/cli/tests/commands/addComponent/createComponent.test.ts +87 -0
- package/tools/cli/tests/commands/addComponent/helper/ComponentHelper.test.ts +110 -0
- package/tools/cli/tests/commands/addDevice/add-device.test.ts +117 -0
- package/tools/cli/tests/commands/addDevice/deviceConfig/androidtvConfig.test.ts +184 -0
- package/tools/cli/tests/commands/addDevice/deviceConfig/deviceConfig.test.ts +30 -0
- package/tools/cli/tests/commands/addDevice/deviceConfig/titanosConfig.test.ts +20 -0
- package/tools/cli/tests/commands/addDevice/deviceConfig/tizenConfig.test.ts +63 -0
- package/tools/cli/tests/commands/addDevice/deviceConfig/tvosConfig.test.ts +47 -0
- package/tools/cli/tests/commands/addDevice/deviceConfig/vidaaConfig.test.ts +20 -0
- package/tools/cli/tests/commands/addDevice/deviceConfig/webosConfig.test.ts +74 -0
- package/tools/cli/tests/commands/addDevice/helper/addDeviceHelper.test.ts +144 -0
- package/tools/cli/tests/commands/addDianaSkills/add-dianaSkills.test.ts +72 -0
- package/tools/cli/tests/commands/addModule/add-module.test.ts +108 -0
- package/tools/cli/tests/commands/authentication/AuthenticationManager.test.ts +756 -0
- package/tools/cli/tests/commands/authentication/commands/authDefinition.test.ts +53 -0
- package/tools/cli/tests/commands/authentication/commands/authHook.test.ts +94 -0
- package/tools/cli/tests/commands/authentication/commands/get-packages-token.test.ts +69 -0
- package/tools/cli/tests/commands/authentication/commands/login.test.ts +170 -0
- package/tools/cli/tests/commands/authentication/commands/logout.test.ts +77 -0
- package/tools/cli/tests/commands/authentication/commands/status.test.ts +73 -0
- package/tools/cli/tests/commands/authentication/helper/CredentialsHelper.test.ts +352 -0
- package/tools/cli/tests/commands/authentication/helper/SPM.test.ts +229 -0
- package/tools/cli/tests/commands/cliHelp/customHelp.test.ts +24 -0
- package/tools/cli/tests/commands/completion/completion.test.ts +76 -0
- package/tools/cli/tests/commands/createApp/const/createAppTasks.test.ts +70 -0
- package/tools/cli/tests/commands/createApp/createApp.test.ts +116 -0
- package/tools/cli/tests/commands/createApp/helpers/CreateAppHelper.test.ts +197 -0
- package/tools/cli/tests/commands/createApp/helpers/SetupChecker.test.ts +152 -0
- package/tools/cli/tests/commands/createApp/helpers/fixtures/myApp/scripts/app/ui/screens/SplashScreen.js +70 -0
- package/tools/cli/tests/commands/hooks/checkDanaProjectHook.test.ts +55 -0
- package/tools/cli/tests/commands/zip/zip.test.ts +51 -0
- package/tools/cli/tests/common/helpers/CreateArchiveHelper.test.ts +69 -0
- package/tools/cli/tests/common/helpers/CreateFileHelper.test.ts +359 -0
- package/tools/cli/tests/common/helpers/InputValidator.test.ts +93 -0
- package/tools/cli/tests/common/helpers/InstallHelper.test.ts +262 -0
- package/tools/cli/tests/common/helpers/UpdateFileHelper.test.ts +288 -0
- package/tools/cli/tests/common/helpers/UserInputGetter.test.ts +182 -0
- package/tools/cli/tests/common/helpers/handlebarsHelper.test.ts +87 -0
- package/tools/cli/tests/common/helpers/stringHelper.test.ts +35 -0
- package/tools/cli/tests/program.test.ts +215 -0
- package/tools/cli/tsconfig.json +19 -0
- package/tools/cli/tsconfig.test.json +4 -0
- package/tools/cli/vitest.config.ts +4 -0
- package/tools/templates/app-template/.dana/.gitkeep +0 -0
- package/tools/templates/app-template/Gruntfile.js +31 -0
- package/tools/templates/app-template/README.md +17 -0
- package/tools/templates/app-template/app.config.json +56 -0
- package/tools/templates/app-template/editorconfigTemplate.hbs +18 -0
- package/tools/templates/app-template/eslintrc.jsonTemplate.hbs +5 -0
- package/tools/templates/app-template/gitignoreTemplate.hbs +27 -0
- package/tools/templates/app-template/i18n/LocaleStringEnUS.json +7 -0
- package/tools/templates/app-template/i18n/README.md +32 -0
- package/tools/templates/app-template/images/dana.png +0 -0
- package/tools/templates/app-template/images/dana_logo.png +0 -0
- package/tools/templates/app-template/images/dana_logo_light.png +0 -0
- package/tools/templates/app-template/images/loading.png +0 -0
- package/tools/templates/app-template/nvmrcTemplate.hbs +1 -0
- package/tools/templates/app-template/package.json +33 -0
- package/tools/templates/app-template/profiles/app.config.browser-css.json +16 -0
- package/tools/templates/app-template/profiles/app.config.browser-lightning.json +16 -0
- package/tools/templates/app-template/scripts/app/README.md +6 -0
- package/tools/templates/app-template/scripts/app/TemplateAppRoutes.js.hbs +18 -0
- package/tools/templates/app-template/scripts/app/app.js.hbs +17 -0
- package/tools/templates/app-template/scripts/app/theme/AppTheme.js +57 -0
- package/tools/templates/app-template/scripts/app/ui/screens/AppScreen.js +106 -0
- package/tools/templates/app-template/scripts/app/ui/screens/SplashScreen.js +70 -0
- package/tools/templates/app-template/scripts/app/ui/views/LoaderView.js +31 -0
- package/tools/templates/app-template/styles/fonts/Roboto-Bold.ttf +0 -0
- package/tools/templates/app-template/styles/fonts/Roboto-Regular.ttf +0 -0
- package/tools/templates/app-template/tests/README.md +70 -0
- package/tools/templates/app-template/tests/automation/features/splash.feature +5 -0
- package/tools/templates/app-template/tests/automation/init.js +20 -0
- package/tools/templates/app-template/tests/automation/steps-definitions/dictionary.js +31 -0
- package/tools/templates/app-template/tests/automation/steps-definitions/helpers.js +9 -0
- package/tools/templates/app-template/tests/unit/README.md +7 -0
- package/tools/templates/app-template/tests/unit/app/TemplateAppRoutes.js.hbs +24 -0
- package/tools/templates/assets/fonts/fa-solid-900.ttf +0 -0
- package/tools/templates/components/ButtonItemView.js.hbs +69 -0
- package/tools/templates/components/ButtonView.js.hbs +65 -0
- package/tools/templates/components/ScrollItemView.js.hbs +53 -0
- package/tools/templates/components/ScrollView.js.hbs +43 -0
- package/tools/templates/components/TileView.js.hbs +55 -0
- package/tools/templates/components/screen.js.hbs +74 -0
- package/tools/templates/components/settings.js.hbs +74 -0
- package/tools/templates/components/vod.js.hbs +104 -0
- package/tools/templates/components/wtvMenuListView.js.hbs +38 -0
- package/tools/templates/components/wtvRailListView.js.hbs +44 -0
- package/tools/templates/index.ts +3 -0
- package/tools/templates/mocks/menuMock.json +29 -0
- package/tools/templates/mocks/railMock.json +101 -0
- package/tools/templates/mocks/scrollViewMock.json +165 -0
- package/tools/templates/modules/fip/images/12.png +0 -0
- package/tools/templates/modules/fip/images/audioD.png +0 -0
- package/tools/templates/modules/fip/package.json +5 -0
- package/tools/templates/modules/fip/scripts/FipModule.js +19 -0
- package/tools/templates/modules/fip/scripts/FipRoutes.js +19 -0
- package/tools/templates/modules/fip/scripts/services/mock/fipMock.json +12 -0
- package/tools/templates/modules/fip/scripts/ui/screens/FipScreen.js +169 -0
- package/tools/templates/modules/fip/scripts/ui/views/FipContentInfoView.js +77 -0
- package/tools/templates/modules/fip/scripts/ui/views/InfoDetailImageView.js +35 -0
- package/tools/templates/modules/fip/scripts/ui/views/InfoDetailTextView.js +39 -0
- package/tools/templates/modules/fip/scripts/ui/views/InfoListView.js +57 -0
- package/tools/templates/modules/fip/scripts/ui/views/PlayButtonView.js +63 -0
- package/tools/templates/modules/home/package.json +5 -0
- package/tools/templates/modules/home/scripts/HomeModule.js +19 -0
- package/tools/templates/modules/home/scripts/HomeRoutes.js +19 -0
- package/tools/templates/modules/home/scripts/services/mock/highlightMock.json +40 -0
- package/tools/templates/modules/home/scripts/services/mock/homeScrollViewMock.json +170 -0
- package/tools/templates/modules/home/scripts/ui/screens/HomeScreen.js +258 -0
- package/tools/templates/modules/home/scripts/ui/views/highlight/DotsListItemView.js +37 -0
- package/tools/templates/modules/home/scripts/ui/views/highlight/DotsListView.js +22 -0
- package/tools/templates/modules/home/scripts/ui/views/highlight/HighlightContentDescriptionView.js +99 -0
- package/tools/templates/modules/home/scripts/ui/views/highlight/HighlightPlayButtonView.js +63 -0
- package/tools/templates/modules/home/scripts/ui/views/highlight/HighlightRailItemView.js +186 -0
- package/tools/templates/modules/home/scripts/ui/views/scrollview/HomeMockTileView.js +67 -0
- package/tools/templates/modules/home/scripts/ui/views/scrollview/HomeRailScrollView.js +53 -0
- package/tools/templates/modules/home/scripts/ui/views/scrollview/HomeScrollView.js +22 -0
- package/tools/templates/modules/menu/images/profile.png +0 -0
- package/tools/templates/modules/menu/package.json +5 -0
- package/tools/templates/modules/menu/scripts/MenuModule.js +18 -0
- package/tools/templates/modules/menu/scripts/MenuRoutes.js +14 -0
- package/tools/templates/modules/menu/scripts/services/menuMock.json +24 -0
- package/tools/templates/modules/menu/scripts/ui/const/MenuIcons.js +16 -0
- package/tools/templates/modules/menu/scripts/ui/views/MenuButtonView.js +101 -0
- package/tools/templates/modules/menu/scripts/ui/views/MenuListView.js +60 -0
- package/tools/templates/modules/menu/scripts/ui/views/MenuView.js +87 -0
- package/tools/templates/modules/menu/scripts/ui/views/ProfileImageView.js +30 -0
- package/tools/templates/modules/player/package.json +5 -0
- package/tools/templates/modules/player/scripts/PlayerModule.js +19 -0
- package/tools/templates/modules/player/scripts/PlayerRoutes.js +19 -0
- package/tools/templates/modules/player/scripts/ui/const/PlayerIcons.js +19 -0
- package/tools/templates/modules/player/scripts/ui/screens/PlayerScreen.js +361 -0
- package/tools/templates/modules/player/scripts/ui/views/PlayerControlButtonView.js +69 -0
- package/tools/templates/modules/player/scripts/ui/views/PlayerControlsView.js +173 -0
- package/tools/templates/modules/player/scripts/ui/views/ProgressBarView.js +53 -0
- package/tools/templates/modules/search/package.json +5 -0
- package/tools/templates/modules/search/scripts/SearchModule.js +18 -0
- package/tools/templates/modules/search/scripts/SearchRoutes.js +16 -0
- package/tools/templates/modules/search/scripts/ui/const/EnglishKeyboardData.js +31 -0
- package/tools/templates/modules/search/scripts/ui/const/SearchIcons.js +14 -0
- package/tools/templates/modules/search/scripts/ui/const/SearchKeyboardLayout.js +19 -0
- package/tools/templates/modules/search/scripts/ui/primitives/SearchTextPrimitive.js +36 -0
- package/tools/templates/modules/search/scripts/ui/screens/SearchScreen.js +234 -0
- package/tools/templates/modules/search/scripts/ui/services/MockSearchService.js +39 -0
- package/tools/templates/modules/search/scripts/ui/services/SearchVirtualKeyboardService.js +33 -0
- package/tools/templates/modules/search/scripts/ui/services/mock/searchMock.json +172 -0
- package/tools/templates/modules/search/scripts/ui/views/SearchView.js +62 -0
- package/tools/templates/modules/search/scripts/ui/views/keyboard/SearchKeyboardRowItemView.js +92 -0
- package/tools/templates/modules/search/scripts/ui/views/keyboard/SearchKeyboardRowListView.js +33 -0
- package/tools/templates/modules/search/scripts/ui/views/keyboard/SearchKeyboardView.js +63 -0
- package/tools/templates/modules/search/scripts/ui/views/rail/SearchScrollRailView.js +53 -0
- package/tools/templates/modules/search/scripts/ui/views/rail/SearchScrollView.js +22 -0
- package/tools/templates/modules/search/scripts/ui/views/rail/SearchTileView.js +68 -0
- package/tools/templates/modules/search/styles/styles/fonts/fa-solid-900.ttf +0 -0
- package/tools/templates/modules/settings/package.json +5 -0
- package/tools/templates/modules/settings/scripts/SettingsModule.js +19 -0
- package/tools/templates/modules/settings/scripts/SettingsRoutes.js +19 -0
- package/tools/templates/modules/settings/scripts/ui/screens/SettingsScreen.js +200 -0
- package/tools/templates/modules/settings/scripts/ui/views/SettingsListItemView.js +85 -0
- package/tools/templates/modules/settings/scripts/ui/views/SettingsListView.js +56 -0
- package/tools/templates/modules/vod/package.json +5 -0
- package/tools/templates/modules/vod/scripts/VodModule.js +19 -0
- package/tools/templates/modules/vod/scripts/VodRoutes.js +19 -0
- package/tools/templates/modules/vod/scripts/services/mock/scrollViewMock.json +172 -0
- package/tools/templates/modules/vod/scripts/ui/screens/VodScreen.js +204 -0
- package/tools/templates/modules/vod/scripts/ui/views/MockTileView.js +69 -0
- package/tools/templates/modules/vod/scripts/ui/views/RailScrollItemView.js +53 -0
- package/tools/templates/modules/vod/scripts/ui/views/VodScrollView.js +22 -0
- package/tools/templates/package.json +14 -0
- package/tools/templates/profiles/app.config.androidtv.json +17 -0
- package/tools/templates/profiles/app.config.titanos.json +24 -0
- package/tools/templates/profiles/app.config.tizen.json +52 -0
- package/tools/templates/profiles/app.config.tvos.json +18 -0
- package/tools/templates/profiles/app.config.vidaa.json +24 -0
- package/tools/templates/profiles/app.config.webos.json +21 -0
- package/tools/templates/tutorial/modules/fip/package.json +4 -0
- package/tools/templates/tutorial/modules/fip/scripts/FipModule.js +18 -0
- package/tools/templates/tutorial/modules/fip/scripts/FipRoutes.js +19 -0
- package/tools/templates/tutorial/modules/fip/scripts/ui/screens/FipContentScreen.js +146 -0
- package/tools/templates/tutorial/modules/fip/scripts/ui/views/ElevatorView.js +66 -0
- package/tools/templates/tutorial/modules/fip/scripts/ui/views/FipContentInfoView.js +90 -0
- package/tools/templates/tutorial/modules/fip/scripts/ui/views/PlayButtonView.js +58 -0
- package/tools/templates/tutorial/vendors/customBE/package.json +5 -0
- package/tools/templates/tutorial/vendors/customBE/scripts/datas/contents.json +749 -0
- package/tools/templates/tutorial/vendors/customBE/scripts/services/CustomBEVodService.js +70 -0
- package/tsconfig.json +8 -0
- package/vitest.config.ts +19 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import $ListView from "@ListView";
|
|
2
|
+
import $DotsListItemView from "@DotsListItemView";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Displays a list of dots
|
|
6
|
+
*
|
|
7
|
+
* @name DotsListView
|
|
8
|
+
* @class
|
|
9
|
+
* @extends ListView
|
|
10
|
+
*
|
|
11
|
+
* @property {DotsListItemView} itemViewClass - the itemViewClass
|
|
12
|
+
*/
|
|
13
|
+
export default $ListView.declare("DotsListView", {
|
|
14
|
+
properties: /** @lends DotsListView.prototype */ {
|
|
15
|
+
itemViewClass: () => $DotsListItemView
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
style: {
|
|
19
|
+
height: ({lastItemView}) => lastItemView ? lastItemView.height : 0,
|
|
20
|
+
width: ({lastItemView}) => lastItemView ? lastItemView.width + lastItemView.x : 0
|
|
21
|
+
}
|
|
22
|
+
});
|
package/tools/templates/modules/home/scripts/ui/views/highlight/HighlightContentDescriptionView.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import $View from "@View";
|
|
2
|
+
import $ImagePrimitive from "@ImagePrimitive";
|
|
3
|
+
import $RectanglePrimitive from "@RectanglePrimitive";
|
|
4
|
+
import $TextPrimitive from "@TextPrimitive";
|
|
5
|
+
import $HighlightPlayButtonView from "@HighlightPlayButtonView";
|
|
6
|
+
import $Theme from "@Theme";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Displays content description
|
|
10
|
+
*
|
|
11
|
+
* @name HighlightContentDescriptionView
|
|
12
|
+
* @class
|
|
13
|
+
* @extends View
|
|
14
|
+
*/
|
|
15
|
+
export default $View.declare("HighlightContentDescriptionView", {
|
|
16
|
+
statics: /** @lends HighlightContentDescriptionView */ {
|
|
17
|
+
WIDTH: 696,
|
|
18
|
+
CONTENT_TITLE_SIZE: 42,
|
|
19
|
+
DEFAULT_FONT_SIZE: 20,
|
|
20
|
+
SCREEN_HORIZONTAL_MARGIN: 50,
|
|
21
|
+
COLOR_TRANSPARENT: "#00000000",
|
|
22
|
+
HIGHLIGHT_HEIGHT: 668,
|
|
23
|
+
DOWNGRADIENT_HEIGHT: 200
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
children: /** @lends HighlightContentDescriptionView.prototype */ {
|
|
27
|
+
highlightImage: {
|
|
28
|
+
class: $ImagePrimitive
|
|
29
|
+
},
|
|
30
|
+
rightGradient: {
|
|
31
|
+
class: $RectanglePrimitive
|
|
32
|
+
},
|
|
33
|
+
downGradient: {
|
|
34
|
+
class: $RectanglePrimitive
|
|
35
|
+
},
|
|
36
|
+
title: {
|
|
37
|
+
class: $TextPrimitive,
|
|
38
|
+
text: "No title"
|
|
39
|
+
},
|
|
40
|
+
playButton: {
|
|
41
|
+
class: $HighlightPlayButtonView
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
methods: {
|
|
46
|
+
setData: function (data) {
|
|
47
|
+
this.highlightImage.url = data.imageUrl || "";
|
|
48
|
+
this.title.text = data.title || "no title";
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
//////////////////////////////////////////////////////////////////////////////////////////
|
|
52
|
+
// FOCUS
|
|
53
|
+
//////////////////////////////////////////////////////////////////////////////////////////
|
|
54
|
+
|
|
55
|
+
_getChildToFocus: function () {
|
|
56
|
+
return this.playButton;
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
style: /** @lends HighlightContentDescriptionView.prototype */ {
|
|
61
|
+
height: 668,
|
|
62
|
+
width: $Theme.FULL_SCREEN_WIDTH,
|
|
63
|
+
highlightImage: {
|
|
64
|
+
width: ({parent}) => parent.width,
|
|
65
|
+
height: 668,
|
|
66
|
+
opacity: 0.8
|
|
67
|
+
},
|
|
68
|
+
rightGradient: {
|
|
69
|
+
width: $Theme.FULL_SCREEN_WIDTH / 2,
|
|
70
|
+
height: ({parent})=> parent.height,
|
|
71
|
+
gradientDirection: "to right",
|
|
72
|
+
gradientColorStart: $Theme.COLOR_BACKGROUND,
|
|
73
|
+
gradientColorEnd: ({parent}) => parent.statics.COLOR_TRANSPARENT
|
|
74
|
+
},
|
|
75
|
+
downGradient: {
|
|
76
|
+
y: ({parent}) => parent.height - parent.statics.DOWNGRADIENT_HEIGHT,
|
|
77
|
+
width: $Theme.FULL_SCREEN_WIDTH,
|
|
78
|
+
height: ({parent}) => parent.statics.DOWNGRADIENT_HEIGHT,
|
|
79
|
+
gradientDirection: "to bottom",
|
|
80
|
+
gradientColorStart: ({parent}) => parent.statics.COLOR_TRANSPARENT,
|
|
81
|
+
gradientColorEnd: $Theme.COLOR_BACKGROUND
|
|
82
|
+
},
|
|
83
|
+
title: {
|
|
84
|
+
// eslint-disable-next-line @dana/no-use-width-height-auto
|
|
85
|
+
isAuto_width: true,
|
|
86
|
+
height: ({parent}) => parent.statics.CONTENT_TITLE_SIZE + 10,
|
|
87
|
+
size: ({parent}) => parent.statics.CONTENT_TITLE_SIZE,
|
|
88
|
+
x: ({parent}) => parent.statics.SCREEN_HORIZONTAL_MARGIN,
|
|
89
|
+
y: ({parent, height}) => (parent.height - height) / 2 + 100,
|
|
90
|
+
family: $Theme.RobotoBold,
|
|
91
|
+
color: $Theme.COLOR_TEXT
|
|
92
|
+
},
|
|
93
|
+
playButton: {
|
|
94
|
+
x: ({parent}) => parent.statics.SCREEN_HORIZONTAL_MARGIN,
|
|
95
|
+
y: ({parent}) => parent.title.y + 100,
|
|
96
|
+
size: 30
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
});
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import $View from "@View";
|
|
2
|
+
import $RectanglePrimitive from "@RectanglePrimitive";
|
|
3
|
+
import $TextPrimitive from "@TextPrimitive";
|
|
4
|
+
|
|
5
|
+
import $Theme from "@Theme";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Play Button
|
|
9
|
+
*
|
|
10
|
+
* @name HighlightPlayButtonView
|
|
11
|
+
* @class
|
|
12
|
+
* @extends View
|
|
13
|
+
*
|
|
14
|
+
* @property {boolean} isInteractive flag
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export default $View.declare("HighlightPlayButtonView", {
|
|
18
|
+
statics: /** @lends HighlightPlayButtonView */ {
|
|
19
|
+
MARGIN: 20
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
properties: /** @lends HighlightPlayButtonView.prototype */ {
|
|
23
|
+
isInteractive: true
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
children: /** @lends HighlightPlayButtonView.prototype */ {
|
|
27
|
+
button: {
|
|
28
|
+
class: $RectanglePrimitive
|
|
29
|
+
},
|
|
30
|
+
title: {
|
|
31
|
+
class: $TextPrimitive,
|
|
32
|
+
text: "Play"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
states: {
|
|
37
|
+
focused: {
|
|
38
|
+
"button.borderColor": $Theme.COLOR_TEXT
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
style: /** @lends HighlightPlayButtonView.prototype */ {
|
|
43
|
+
width: ({title, statics}) => title.width + 2 * statics.MARGIN,
|
|
44
|
+
height: 60,
|
|
45
|
+
title: {
|
|
46
|
+
color: $Theme.COLOR_TEXT,
|
|
47
|
+
size: 35,
|
|
48
|
+
x: ({parent}) => parent.statics.MARGIN,
|
|
49
|
+
y: 8,
|
|
50
|
+
isAuto_width: true, // eslint-disable-line @dana/no-use-width-height-auto
|
|
51
|
+
height: 50,
|
|
52
|
+
family: $Theme.RobotoBold
|
|
53
|
+
},
|
|
54
|
+
button: {
|
|
55
|
+
borderWidth: 5,
|
|
56
|
+
fillColor: $Theme.COLOR_ACCENT,
|
|
57
|
+
borderColor: $Theme.COLOR_ACCENT,
|
|
58
|
+
width: ({parent}) => parent.width,
|
|
59
|
+
height: 60,
|
|
60
|
+
borderRadius: 12
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
});
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import $ScrollItemView from "@ScrollItemView";
|
|
2
|
+
// CONST
|
|
3
|
+
import $DateUtils from "@DateUtils";
|
|
4
|
+
import $TimerManager from "@TimerManager";
|
|
5
|
+
import $Easing from "@Easing";
|
|
6
|
+
// VIEW
|
|
7
|
+
import $HighlightContentDescriptionView from "@HighlightContentDescriptionView";
|
|
8
|
+
import $DotsListView from "@DotsListView";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @name HighlightRailItemView
|
|
12
|
+
* @class
|
|
13
|
+
* @extends ScrollItemView
|
|
14
|
+
* @property {number} nbViewBefore - the number of highlightTile to keep before
|
|
15
|
+
* @property {number} nbViewAfter - the number of highlightTile to keep after
|
|
16
|
+
* @property {number} direction - the screen direction
|
|
17
|
+
* @property {TimerManager} timerManager - the TimerManager instance
|
|
18
|
+
* @property {Boolean} interactiveArrow - disable arrows
|
|
19
|
+
*/
|
|
20
|
+
export default $ScrollItemView.declare("HighlightRailItemView", {
|
|
21
|
+
|
|
22
|
+
statics: {
|
|
23
|
+
RATIO: 4 / 15,
|
|
24
|
+
HIGHLIGHT_HEIGHT: 668,
|
|
25
|
+
CAROUSEL_TIMEOUT_ID: "CAROUSEL_TIMEOUT_ID",
|
|
26
|
+
CAROUSEL_TIMEOUT_VALUE: 5 // in seconds
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
properties: {
|
|
30
|
+
nbViewBefore: 0,
|
|
31
|
+
nbViewAfter: 0,
|
|
32
|
+
direction: ({parent}) => parent.direction, // eslint-disable-line @dana/no-parent-on-top-level
|
|
33
|
+
timerManager: {class: $TimerManager},
|
|
34
|
+
interactiveArrow: false
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
children: {
|
|
38
|
+
contentDescriptionView: {
|
|
39
|
+
class: $HighlightContentDescriptionView
|
|
40
|
+
},
|
|
41
|
+
dotsView: {
|
|
42
|
+
class: $DotsListView
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
methods: /** @lends HighlightRailItemView.prototype */ {
|
|
47
|
+
|
|
48
|
+
//////////////////
|
|
49
|
+
// INPUTS
|
|
50
|
+
//////////////////
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @override
|
|
54
|
+
*/
|
|
55
|
+
left: function (key) {
|
|
56
|
+
this.resetCarousel();
|
|
57
|
+
this.__checkFirstListIndex();
|
|
58
|
+
this.previous();
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @override
|
|
63
|
+
*/
|
|
64
|
+
right: function (key) {
|
|
65
|
+
this.resetCarousel();
|
|
66
|
+
this.__checkLastListIndex();
|
|
67
|
+
this.next();
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
up: function (key) {
|
|
71
|
+
return false;
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @override
|
|
76
|
+
*/
|
|
77
|
+
down: function (key) {
|
|
78
|
+
return false;
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
_setData: function (data, options = {}) {
|
|
82
|
+
this.list.setData(data);
|
|
83
|
+
if (data && data.length > 1) {
|
|
84
|
+
this.dotsView.setData(data, {index: this.list.index});
|
|
85
|
+
} else {
|
|
86
|
+
this.dotsView.setData([]);
|
|
87
|
+
}
|
|
88
|
+
this._updateContent();
|
|
89
|
+
this.startCarousel();
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
_updateContent: function () {
|
|
93
|
+
const data = this.list.data[this.list.index];
|
|
94
|
+
|
|
95
|
+
this.contentDescriptionView.setData(data);
|
|
96
|
+
this.dotsView.selectItem(this.list.index);
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
next: function () {
|
|
100
|
+
this.list.index++;
|
|
101
|
+
this._updateContent();
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
previous: function () {
|
|
105
|
+
this.list.index--;
|
|
106
|
+
this._updateContent();
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* @override
|
|
111
|
+
*/
|
|
112
|
+
hide: function () {
|
|
113
|
+
this.stopCarousel();
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
stopCarousel: function () {
|
|
117
|
+
this.timerManager.clearInterval(this.statics.CAROUSEL_TIMEOUT_ID);
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
startCarousel: function () {
|
|
121
|
+
if (this.list.data.length > 1) {
|
|
122
|
+
this.timerManager.setInterval(() => {
|
|
123
|
+
this.__checkLastListIndex();
|
|
124
|
+
this.next();
|
|
125
|
+
}, this.statics.CAROUSEL_TIMEOUT_VALUE * $DateUtils.ONE_SECOND, this.statics.CAROUSEL_TIMEOUT_ID);
|
|
126
|
+
} else {
|
|
127
|
+
this.timerManager.clearInterval(this.statics.CAROUSEL_TIMEOUT_ID);
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
resetCarousel: function () {
|
|
132
|
+
this.stopCarousel();
|
|
133
|
+
this.startCarousel();
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
//////////////////
|
|
137
|
+
// FOCUS
|
|
138
|
+
//////////////////
|
|
139
|
+
|
|
140
|
+
_getChildToFocus: function () {
|
|
141
|
+
return this.contentDescriptionView;
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
//////////////////
|
|
145
|
+
// PRIVATE
|
|
146
|
+
//////////////////
|
|
147
|
+
__checkLastListIndex: function () {
|
|
148
|
+
if (this.list.index === this.list.data.length - 1) {
|
|
149
|
+
this.list.index = -1;
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
__checkFirstListIndex: function () {
|
|
154
|
+
if (this.list.index === 0) {
|
|
155
|
+
this.list.index = this.list.data.length;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
transitions: {
|
|
161
|
+
default: {
|
|
162
|
+
scale: {
|
|
163
|
+
duration: 250,
|
|
164
|
+
easing: $Easing.linear
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
focused: {
|
|
168
|
+
scale: {
|
|
169
|
+
duration: 250,
|
|
170
|
+
easing: $Easing.linear
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
|
|
175
|
+
style: {
|
|
176
|
+
contentDescriptionView: {
|
|
177
|
+
y: ({parent, height}) => (parent.height - height) / 2,
|
|
178
|
+
opacity: 1
|
|
179
|
+
},
|
|
180
|
+
dotsView: {
|
|
181
|
+
y: ({parent, height}) => parent.height - height - 20,
|
|
182
|
+
x: ({parent, width}) => (parent.width - width) / 2,
|
|
183
|
+
opacity: 1
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import $AbstractTileView from "@AbstractTileView";
|
|
2
|
+
import $RectanglePrimitive from "@RectanglePrimitive";
|
|
3
|
+
import $ContainImagePrimitive from "@ContainImagePrimitive";
|
|
4
|
+
import $Theme from "@Theme";
|
|
5
|
+
import $Easing from "@Easing";
|
|
6
|
+
|
|
7
|
+
/** * Basic Tile item *
|
|
8
|
+
* @name HomeMockTileView
|
|
9
|
+
* @View
|
|
10
|
+
* @extends AbstractTileView
|
|
11
|
+
*/
|
|
12
|
+
export default $AbstractTileView.declare("HomeMockTileView", {
|
|
13
|
+
statics: {
|
|
14
|
+
ITEM_WIDTH: 216,
|
|
15
|
+
ITEM_HEIGHT: 324,
|
|
16
|
+
SCALE_FOCUS: 1.1
|
|
17
|
+
},
|
|
18
|
+
children: {
|
|
19
|
+
imageView: {class: $ContainImagePrimitive},
|
|
20
|
+
focusRectangleView: {class: $RectanglePrimitive}
|
|
21
|
+
},
|
|
22
|
+
methods: {
|
|
23
|
+
/** * @override */
|
|
24
|
+
_setData: function () {
|
|
25
|
+
this.imageView.url = this.data ? this.data.imageUrl : "";
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
states: {
|
|
30
|
+
focused: {
|
|
31
|
+
scale: ({statics}) => statics.SCALE_FOCUS,
|
|
32
|
+
"focusRectangleView.borderColor": $Theme.COLOR_ACCENT,
|
|
33
|
+
"focusRectangleView.borderWidth": 6
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
transitions: {
|
|
37
|
+
default: {
|
|
38
|
+
scale: {
|
|
39
|
+
duration: 250,
|
|
40
|
+
easing: $Easing.linear
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
focused: {
|
|
44
|
+
scale: {
|
|
45
|
+
duration: 250,
|
|
46
|
+
easing: $Easing.linear
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
style: {
|
|
51
|
+
y: 0, width: ({statics}) => statics.ITEM_WIDTH,
|
|
52
|
+
height: ({statics}) => statics.ITEM_HEIGHT,
|
|
53
|
+
scale: 1,
|
|
54
|
+
imageView: {
|
|
55
|
+
width: ({parent}) => parent.width,
|
|
56
|
+
height: ({parent}) => parent.height,
|
|
57
|
+
borderRadius: 12
|
|
58
|
+
},
|
|
59
|
+
focusRectangleView: {
|
|
60
|
+
width: ({parent}) => parent.width,
|
|
61
|
+
height: ({parent}) => parent.height,
|
|
62
|
+
borderRadius: 12,
|
|
63
|
+
borderWidth: 0
|
|
64
|
+
},
|
|
65
|
+
opacity: ({data}) => data ? 1 : 0
|
|
66
|
+
}
|
|
67
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import $AbstractRailView from "@AbstractRailView";
|
|
2
|
+
|
|
3
|
+
import $HomeMockTileView from "@HomeMockTileView";
|
|
4
|
+
import $Theme from "@Theme";
|
|
5
|
+
|
|
6
|
+
// TRAITS
|
|
7
|
+
import $FixedNavigationType from "@FixedNavigationType";
|
|
8
|
+
// CONSTANTS
|
|
9
|
+
import $TextPrimitive from "@TextPrimitive";
|
|
10
|
+
|
|
11
|
+
/** TODO document the view *
|
|
12
|
+
* @name HomeRailScrollView
|
|
13
|
+
* @View
|
|
14
|
+
* @extends AbstractRailView
|
|
15
|
+
* @mixes MScrollItem
|
|
16
|
+
* @property {HomeMockTileView} itemViewClass - Item class to be used in the list
|
|
17
|
+
* @property {number} nbViewBefore - The number of views before current to keep before recycling
|
|
18
|
+
* @property {number} nbViewAfter - The number of views after current to keep after recycling
|
|
19
|
+
* @property {number} itemMargin - Margin between items
|
|
20
|
+
* @property {Trait} navigationType - the rail's navigation type
|
|
21
|
+
* @property {Trait} navigationType - the rail's navigation type
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
export default $AbstractRailView.declare("HomeRailScrollView", {
|
|
25
|
+
properties: /** @lends HomeRailScrollView.prototype */ {
|
|
26
|
+
itemViewClass: () => $HomeMockTileView,
|
|
27
|
+
navigationType: () => $FixedNavigationType,
|
|
28
|
+
itemMargin: 20,
|
|
29
|
+
nbViewBefore: 5, // TODO customize according your needs
|
|
30
|
+
nbViewAfter: 5 // TODO customize according your needs
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
children: {
|
|
34
|
+
title: {class: $TextPrimitive}
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
methods: /** @lends HomeRailScrollView.prototype */ {
|
|
38
|
+
setData: function (data) {
|
|
39
|
+
this.title.text = data[0].title || "";
|
|
40
|
+
this.data = data[0].movies;
|
|
41
|
+
this._setData(this.data);
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
style: {
|
|
45
|
+
title: {
|
|
46
|
+
height: 40,
|
|
47
|
+
width: 300,
|
|
48
|
+
y: -60,
|
|
49
|
+
family: $Theme.RobotoBold,
|
|
50
|
+
color: ({parent}) => parent.isFocused ? $Theme.COLOR_ACCENT : $Theme.COLOR_TEXT
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import $ScrollView from "@ScrollView";
|
|
2
|
+
import $HomeRailScrollView from "@HomeRailScrollView";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* @name HomeScrollView
|
|
8
|
+
* @class
|
|
9
|
+
* @extends ScrollView
|
|
10
|
+
* @property { HomeRailScrollView } itemViewClass - Item class to be used in the list
|
|
11
|
+
* @property {number} itemMargin - Margin between items
|
|
12
|
+
* @View
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
export default $ScrollView.declare("HomeScrollView", {
|
|
16
|
+
properties: /** @lends HomeScrollView.prototype */ {
|
|
17
|
+
itemViewClass: () => $HomeRailScrollView,
|
|
18
|
+
itemMargin: 503
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
methods: /** @lends HomeScrollView.prototype */ {}
|
|
22
|
+
});
|
|
Binary file
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import $AbstractModule from "@AbstractModule";
|
|
2
|
+
import $MenuRoutes from "@MenuRoutes";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Program info page module
|
|
6
|
+
* @name MenuModule
|
|
7
|
+
* @class
|
|
8
|
+
* @module MenuModule
|
|
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("MenuModule", {
|
|
15
|
+
properties: /** @lends MenuModule.prototype*/ {
|
|
16
|
+
exports: [$MenuRoutes]
|
|
17
|
+
}
|
|
18
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import $Routes from "@Routes";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Program info module routes
|
|
5
|
+
* @name MenuRoutes
|
|
6
|
+
* @class
|
|
7
|
+
* @extends Routes
|
|
8
|
+
*/
|
|
9
|
+
export default $Routes.declare("MenuRoutes", {
|
|
10
|
+
/**
|
|
11
|
+
* @route MenuModule
|
|
12
|
+
*/
|
|
13
|
+
methods: /** @lends MenuRoutes.prototype */{}
|
|
14
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"text": "Home",
|
|
5
|
+
"iconText": "HOME",
|
|
6
|
+
"route": "home"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"text": "VOD",
|
|
10
|
+
"iconText": "VOD",
|
|
11
|
+
"route": "vod"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"text": "",
|
|
15
|
+
"iconText": "SETTINGS",
|
|
16
|
+
"route": "settings"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"text": "",
|
|
20
|
+
"iconText": "SEARCH",
|
|
21
|
+
"route": "search"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import $Const from "@Const";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* List unicode characters defined in styles/fonts/fa-solid-900.ttf
|
|
5
|
+
* @name MenuIcons
|
|
6
|
+
* @class
|
|
7
|
+
* @extends Const
|
|
8
|
+
*/
|
|
9
|
+
export default $Const.declare("MenuIcons", {
|
|
10
|
+
statics: /** @lends MenuIcons */ {
|
|
11
|
+
HOME: "\uF015",
|
|
12
|
+
VOD: "\uF008",
|
|
13
|
+
SEARCH: "\uF002",
|
|
14
|
+
SETTINGS: "\u2699"
|
|
15
|
+
}
|
|
16
|
+
});
|