@24i/bigscreen-sdk 1.0.4-alpha.2098 → 1.0.4-alpha.2109

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 (142) hide show
  1. package/package.json +5 -5
  2. package/packages/animations/README.md +13 -2
  3. package/packages/animations/src/AnimationUtils.ts +12 -6
  4. package/packages/animations/src/JSAnimations.ts +7 -5
  5. package/packages/create-package/dist/createPackage.js +66 -0
  6. package/packages/create-package/dist/createPackage.js.map +1 -0
  7. package/packages/create-package/dist/index.js +5 -0
  8. package/packages/create-package/dist/index.js.map +1 -0
  9. package/packages/create-package/dist/questionnaire/questions.js +35 -0
  10. package/packages/create-package/dist/questionnaire/questions.js.map +1 -0
  11. package/packages/create-package/dist/settings/Settings.js +10 -0
  12. package/packages/create-package/dist/settings/Settings.js.map +1 -0
  13. package/packages/create-package/dist/types.js +3 -0
  14. package/packages/create-package/dist/types.js.map +1 -0
  15. package/packages/developer-tools/src/EnvironmentSelection/EnvironmentList.tsx +7 -12
  16. package/packages/developer-tools/src/EnvironmentSelection/EnvironmentListItem.tsx +28 -15
  17. package/packages/developer-tools/src/EnvironmentSelection/sizes.1080.ts +3 -7
  18. package/packages/developer-tools/src/EnvironmentSelection/sizes.ts +3 -7
  19. package/packages/developer-tools/src/EnvironmentSelection/styles/EnvironmentSelection.scss +28 -4
  20. package/packages/developer-tools/src/EnvironmentSelection/styles/_sizes.1080.scss +2 -1
  21. package/packages/developer-tools/src/EnvironmentSelection/styles/_sizes.scss +3 -2
  22. package/packages/driver-base/src/loadObject.ts +1 -1
  23. package/packages/focus/src/Layout/Base.tsx +0 -1
  24. package/packages/focus/src/Layout/Horizontal.ts +3 -13
  25. package/packages/focus/src/Layout/Matrix.tsx +24 -3
  26. package/packages/focus/src/Layout/__test__/isRtl.spec.ts +23 -0
  27. package/packages/focus/src/Layout/isRtl.ts +12 -0
  28. package/packages/focus/src/Layout/types.ts +1 -0
  29. package/packages/jsx/src/forwardRef.ts +2 -2
  30. package/packages/keyboard/src/AndroidKeyboard/Keyboard.tsx +7 -0
  31. package/packages/keyboard/src/DefaultKeyboard/Keyboard.tsx +1 -0
  32. package/packages/keyboard/src/KeyboardBase.tsx +1 -0
  33. package/packages/keyboard/src/MobiKeyboard/Keyboard.tsx +11 -0
  34. package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.tsx +9 -0
  35. package/packages/keyboard/src/WhitelabelNumericKeyboard/NumericKeyboard.tsx +3 -0
  36. package/packages/mouse-navigation/src/ArrowNavigation/index.tsx +1 -1
  37. package/packages/rnv-build-engine/dist/src/constants/buildSchemes.js +14 -0
  38. package/packages/rnv-build-engine/dist/src/constants/index.js +7 -0
  39. package/packages/rnv-build-engine/dist/src/constants/platforms.js +14 -0
  40. package/packages/rnv-build-engine/dist/src/engine.js +94 -0
  41. package/packages/rnv-build-engine/dist/src/index.js +26 -0
  42. package/packages/rnv-build-engine/dist/src/resolvers/index.js +29 -0
  43. package/packages/rnv-build-engine/dist/src/resolvers/resolveBaseUrl.js +31 -0
  44. package/packages/rnv-build-engine/dist/src/resolvers/resolveBuildFileExtension.js +12 -0
  45. package/packages/rnv-build-engine/dist/src/resolvers/resolveBuildFileName.js +36 -0
  46. package/packages/rnv-build-engine/dist/src/resolvers/resolveBuildVersion.js +42 -0
  47. package/packages/rnv-build-engine/dist/src/resolvers/resolveBuildVersionOffset.js +34 -0
  48. package/packages/rnv-build-engine/dist/src/resolvers/resolveDeployLocations.js +79 -0
  49. package/packages/rnv-build-engine/dist/src/resolvers/resolveGenericRnvConfig.js +47 -0
  50. package/packages/rnv-build-engine/dist/src/resolvers/resolveHbbtvDeployConfig.js +13 -0
  51. package/packages/rnv-build-engine/dist/src/resolvers/resolveHbbtvDeployUrl.js +11 -0
  52. package/packages/rnv-build-engine/dist/src/resolvers/resolveHbbtvRemoteBuildDirRelativePath.js +24 -0
  53. package/packages/rnv-build-engine/dist/src/resolvers/resolveSupportedPlatforms.js +5 -0
  54. package/packages/rnv-build-engine/dist/src/resolvers/resolveUsedFlavours.js +23 -0
  55. package/packages/rnv-build-engine/dist/src/resolvers/resolveZippedPlatformBuildsRelativeFilePath.js +14 -0
  56. package/packages/rnv-build-engine/dist/src/scripts/buildAllWithScheme.js +25 -0
  57. package/packages/rnv-build-engine/dist/src/scripts/generateDeployUrls/formatTableDataSpaces.js +30 -0
  58. package/packages/rnv-build-engine/dist/src/scripts/generateDeployUrls/generateDeployUrls.js +90 -0
  59. package/packages/rnv-build-engine/dist/src/scripts/generateDeployUrls/index.js +4 -0
  60. package/packages/rnv-build-engine/dist/src/scripts/generateDeployUrls/makeTableDataByScheme.js +63 -0
  61. package/packages/rnv-build-engine/dist/src/scripts/gitReleaser/afterVersionBump.js +18 -0
  62. package/packages/rnv-build-engine/dist/src/scripts/gitReleaser/beforeVersionBump.js +12 -0
  63. package/packages/rnv-build-engine/dist/src/scripts/gitReleaser/checkReleaseNotes.js +16 -0
  64. package/packages/rnv-build-engine/dist/src/scripts/gitReleaser/pushRelease.js +31 -0
  65. package/packages/rnv-build-engine/dist/src/scripts/gitReleaser/pushReleaseCandidate.js +6 -0
  66. package/packages/rnv-build-engine/dist/src/scripts/gitReleaser/pushReleaseNotes.js +37 -0
  67. package/packages/rnv-build-engine/dist/src/scripts/release/deleteSourceMaps.js +11 -0
  68. package/packages/rnv-build-engine/dist/src/scripts/release/deployToAppCenter.js +83 -0
  69. package/packages/rnv-build-engine/dist/src/scripts/release/githubRelease.js +128 -0
  70. package/packages/rnv-build-engine/dist/src/scripts/release/notifySlack/generateWebhoook.js +65 -0
  71. package/packages/rnv-build-engine/dist/src/scripts/release/notifySlack/makePayload.js +85 -0
  72. package/packages/rnv-build-engine/dist/src/scripts/release/notifySlack/notifySlack.js +44 -0
  73. package/packages/rnv-build-engine/dist/src/scripts/release/notifySlack/slackBlockKitBuilder.js +39 -0
  74. package/packages/rnv-build-engine/dist/src/scripts/release/sentryRelease.js +85 -0
  75. package/packages/rnv-build-engine/dist/src/scripts/release/urlsMarkdown.js +62 -0
  76. package/packages/rnv-build-engine/dist/src/scripts/releaseAllWithScheme.js +79 -0
  77. package/packages/rnv-build-engine/dist/src/scripts/utils/cmdUtils.js +12 -0
  78. package/packages/rnv-build-engine/dist/src/scripts/utils/fsUtils.js +33 -0
  79. package/packages/rnv-build-engine/dist/src/scripts/utils/generateIcons.js +29 -0
  80. package/packages/rnv-build-engine/dist/src/scripts/utils/gitUtils.js +78 -0
  81. package/packages/rnv-build-engine/dist/src/scripts/utils/index.js +27 -0
  82. package/packages/rnv-build-engine/dist/src/scripts/utils/stringUtils.js +5 -0
  83. package/packages/rnv-build-engine/dist/src/sdks/index.js +42 -0
  84. package/packages/rnv-build-engine/dist/src/sdks/sdk-tizen/index.js +13 -0
  85. package/packages/rnv-build-engine/dist/src/sdks/sdk-tizen/sdkTizen.js +168 -0
  86. package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/index.js +14 -0
  87. package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/registerSdkPath.js +14 -0
  88. package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/sdk-installer/index.js +5 -0
  89. package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/sdk-installer/sdkInstaller.js +37 -0
  90. package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/sdk-installer/services/clean.js +11 -0
  91. package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/sdk-installer/services/download.js +76 -0
  92. package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/sdk-installer/services/index.js +11 -0
  93. package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/sdk-installer/services/install.js +23 -0
  94. package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/sdk-installer/services/unzip.js +12 -0
  95. package/packages/rnv-build-engine/dist/src/sdks/sdk-webos/index.js +13 -0
  96. package/packages/rnv-build-engine/dist/src/sdks/sdk-webos/sdkWebos.js +80 -0
  97. package/packages/rnv-build-engine/dist/src/sdks/sdk-webpack/index.js +13 -0
  98. package/packages/rnv-build-engine/dist/src/sdks/sdk-webpack/sdkWebpack.js +6 -0
  99. package/packages/rnv-build-engine/dist/src/sdks/sdk-xbox/index.js +13 -0
  100. package/packages/rnv-build-engine/dist/src/sdks/sdk-xbox/sdkXbox.js +221 -0
  101. package/packages/rnv-build-engine/dist/src/tasks/deploy/aswS3/aws.js +22 -0
  102. package/packages/rnv-build-engine/dist/src/tasks/deploy/aswS3/deployS3.js +71 -0
  103. package/packages/rnv-build-engine/dist/src/tasks/deploy/hbbtv/deployHbbtv.js +94 -0
  104. package/packages/rnv-build-engine/dist/src/tasks/engineTasks.js +24 -0
  105. package/packages/rnv-build-engine/dist/src/tasks/task.rnv.build.js +91 -0
  106. package/packages/rnv-build-engine/dist/src/tasks/task.rnv.configure.js +42 -0
  107. package/packages/rnv-build-engine/dist/src/tasks/task.rnv.configureSoft.js +30 -0
  108. package/packages/rnv-build-engine/dist/src/tasks/task.rnv.deploy.js +40 -0
  109. package/packages/rnv-build-engine/dist/src/tasks/task.rnv.hooks.run.js +70 -0
  110. package/packages/rnv-build-engine/dist/src/tasks/task.rnv.package.js +18 -0
  111. package/packages/rnv-build-engine/dist/src/tasks/task.rnv.platform.configure.js +37 -0
  112. package/packages/rnv-build-engine/dist/src/tasks/task.rnv.project.configure.js +116 -0
  113. package/packages/rnv-build-engine/dist/src/tasks/task.rnv.start.js +73 -0
  114. package/packages/rnv-build-engine/dist/src/types/c.js +2 -0
  115. package/packages/rnv-build-engine/dist/src/types/constants.js +2 -0
  116. package/packages/rnv-build-engine/dist/src/types/index.js +2 -0
  117. package/packages/rnv-build-engine/dist/src/utils/forEachSupportedPlatformFlavour.js +24 -0
  118. package/packages/rnv-build-engine/dist/src/utils/generatePngSpriteMap.js +78 -0
  119. package/packages/rnv-build-engine/dist/src/utils/generateSvgSpriteMap.js +113 -0
  120. package/packages/rnv-build-engine/dist/src/utils/mergeSvgAndPngIcons.js +65 -0
  121. package/packages/rnv-build-engine/dist/src/utils/replaceRelevantStringsInConfig/index.js +5 -0
  122. package/packages/rnv-build-engine/dist/src/utils/replaceRelevantStringsInConfig/replaceRelevantStringsInConfig.js +31 -0
  123. package/packages/rnv-build-engine/dist/src/utils/replaceRelevantStringsInConfig/replaceTemplateString.js +40 -0
  124. package/packages/rnv-build-engine/dist/src/utils/zipBuildsByPlatforms.js +61 -0
  125. package/packages/rnv-build-engine/dist/templates/platforms/_shared/template.js +87 -0
  126. package/packages/rnv-build-engine/dist/templates/platforms/_shared/utils/extendSass.js +29 -0
  127. package/packages/rnv-build-engine/dist/templates/platforms/_shared/utils/joinStrings.js +5 -0
  128. package/packages/rnv-build-engine/dist/templates/platforms/_shared/webpack.base.js +234 -0
  129. package/packages/rnv-build-engine/dist/templates/platforms/_shared/webpack.config.dev.js +6 -0
  130. package/packages/rnv-build-engine/dist/templates/platforms/_shared/webpack.config.prod.js +6 -0
  131. package/packages/rnv-build-engine/dist/templates/platforms/_shared/webpack.extend.js +8 -0
  132. package/packages/rnv-build-engine/dist/templates/platforms/_shared/webpackConfigAdapter.js +100 -0
  133. package/packages/rnv-build-engine/dist/templates/platforms/_shared/webpackPlatformProps.js +8 -0
  134. package/packages/rnv-build-engine/dist/templates/platforms/hbbtv/webpackPlatformProps.js +24 -0
  135. package/packages/rnv-build-engine/dist/templates/platforms/tizen/project/.project +24 -0
  136. package/packages/rnv-build-engine/dist/templates/platforms/tizen/project/.tproject +12 -0
  137. package/packages/rnv-build-engine/dist/templates/platforms/tizen/project/config.xml +17 -0
  138. package/packages/rnv-build-engine/dist/templates/platforms/webos/project/.project +35 -0
  139. package/packages/rnv-build-engine/dist/templates/platforms/webos/project/appinfo.json +19 -0
  140. package/packages/rnv-build-engine/dist/templates/platforms/webos/webpackPlatformProps.js +8 -0
  141. package/packages/types-bigscreen-jsx/index.d.ts +1 -1
  142. package/packages/utils/src/textUtils.ts +4 -4
@@ -0,0 +1,234 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.generateConfig = void 0;
7
+ const html_webpack_harddisk_plugin_1 = __importDefault(require("html-webpack-harddisk-plugin"));
8
+ const webpack_1 = __importDefault(require("webpack"));
9
+ const path_1 = __importDefault(require("path"));
10
+ const mini_css_extract_plugin_1 = __importDefault(require("mini-css-extract-plugin"));
11
+ const filemanager_webpack_plugin_1 = __importDefault(require("filemanager-webpack-plugin"));
12
+ const html_webpack_plugin_1 = __importDefault(require("html-webpack-plugin"));
13
+ const fork_ts_checker_webpack_plugin_1 = __importDefault(require("fork-ts-checker-webpack-plugin"));
14
+ const smartapps_bigscreen_rnv_build_engine_1 = require("@24i/smartapps-bigscreen-rnv-build-engine");
15
+ const extendSass_1 = require("./utils/extendSass");
16
+ const getAnimationType = (isAnimated = false) => (isAnimated ? 'animated' : 'basic');
17
+ const generateFlavourJSExtensions = ({ resolution: { height }, animated, extensions }) => {
18
+ const flavouredExtensions = [];
19
+ const animationType = getAnimationType(animated);
20
+ extensions.forEach((extension) => {
21
+ flavouredExtensions.push(`.${animationType}.${height}.${extension}`, `.${height}.${extension}`, `.${animationType}.${extension}`, `.${extension}`);
22
+ });
23
+ return flavouredExtensions;
24
+ };
25
+ const generateFlavourSCSSExtensions = ({ resolution: { height }, animated }) => {
26
+ const animationType = getAnimationType(animated);
27
+ return [
28
+ `.${animationType}.${height}.scss`,
29
+ `.${animationType}.${height}.css`,
30
+ `.${height}.scss`,
31
+ `.${height}.css`,
32
+ `.${animationType}.scss`,
33
+ `.${animationType}.css`,
34
+ '.scss',
35
+ '.css',
36
+ ];
37
+ };
38
+ const getResolutionString = ({ resolution: { height, width } }) => (height && width ? `${width}x${height}` : '');
39
+ const getAppContentPath = (baseUrl, isBuildHosted = false) => {
40
+ const isBuildHostedAndHasBaseUrl = isBuildHosted && !!baseUrl;
41
+ const relativePath = path_1.default.join(isBuildHostedAndHasBaseUrl ? 'public/' : '', 'content');
42
+ return isBuildHostedAndHasBaseUrl
43
+ ? `${baseUrl}/${relativePath}`
44
+ : `./${relativePath}`;
45
+ };
46
+ const makeRules = (config, projectDir, isDevServer) => ({
47
+ babel: {
48
+ test: /\.[tj]sx?$/,
49
+ exclude: (config.typescript?.exclude ?? []).map((exclusion) => (path_1.default.resolve(projectDir, exclusion))),
50
+ use: [
51
+ {
52
+ loader: 'ts-loader',
53
+ options: {
54
+ transpileOnly: true,
55
+ allowTsInNodeModules: true,
56
+ },
57
+ },
58
+ ],
59
+ },
60
+ css: {
61
+ test: /\.s?css$/,
62
+ use: [
63
+ isDevServer ? 'css-hot-loader' : null,
64
+ mini_css_extract_plugin_1.default.loader,
65
+ 'css-loader',
66
+ {
67
+ loader: 'sass-loader',
68
+ options: {
69
+ sourceMap: false,
70
+ additionalData: (0, extendSass_1.extendSass)(config),
71
+ },
72
+ },
73
+ ].filter(Boolean),
74
+ },
75
+ image: {
76
+ test: /\.(gif|jpe?g|png|svg)$/,
77
+ use: {
78
+ loader: 'file-loader',
79
+ options: {
80
+ outputPath: 'content/assets/',
81
+ publicPath: '../assets/',
82
+ },
83
+ },
84
+ },
85
+ fonts: {
86
+ test: /\.(woff|woff2|eot|ttf|otf)(\?[\s\S]+)?$/,
87
+ use: {
88
+ loader: 'file-loader',
89
+ options: {
90
+ outputPath: 'content/fonts',
91
+ publicPath: '../fonts/',
92
+ },
93
+ },
94
+ },
95
+ sourcemap: {
96
+ test: /\.[tj]sx$/,
97
+ use: ['source-map-loader'],
98
+ enforce: 'pre',
99
+ exclude: [/node_modules/, /build/, /__tests__/],
100
+ },
101
+ });
102
+ const makeAliases = (config, projectDir) => {
103
+ const aliases = {
104
+ '@24i/smartapps-bigscreen-device': config.environment === 'production'
105
+ ? '@24i/smartapps-bigscreen-device'
106
+ : '@24i/smartapps-bigscreen-device/resolver',
107
+ };
108
+ const { moduleAliases } = config;
109
+ if (moduleAliases) {
110
+ Object.keys(moduleAliases).forEach((key) => {
111
+ if (typeof moduleAliases[key] === 'string') {
112
+ aliases[key] = moduleAliases[key];
113
+ }
114
+ else if (moduleAliases[key].projectPath) {
115
+ aliases[key] = path_1.default.resolve(projectDir, moduleAliases[key].projectPath);
116
+ }
117
+ });
118
+ }
119
+ return aliases;
120
+ };
121
+ function generateConfig(config) {
122
+ const projectDir = path_1.default.resolve(config.currentDir, '../../');
123
+ const platformBuildsDir = path_1.default.resolve(config.currentDir, '../');
124
+ const appBuildDir = path_1.default.resolve(config.currentDir);
125
+ const appBuildEngineProjectDir = path_1.default.resolve(config.currentDir, config.buildFolder);
126
+ const appBuildEngineProjectPublicDir = path_1.default.resolve(appBuildEngineProjectDir, 'public');
127
+ const platformSchemeAppIdObj = {
128
+ platform: config.platform,
129
+ scheme: config.scheme,
130
+ flavour: config.appConfigId,
131
+ };
132
+ const { buildConfig } = smartapps_bigscreen_rnv_build_engine_1.Resolvers.getBaseConfig();
133
+ const buildVersion = smartapps_bigscreen_rnv_build_engine_1.Resolvers.resolveBuildVersion(platformSchemeAppIdObj);
134
+ const baseUrl = smartapps_bigscreen_rnv_build_engine_1.Resolvers.resolveBaseUrl(platformSchemeAppIdObj);
135
+ const devServerHost = config.devServerHost || '0.0.0.0';
136
+ const isDevServer = appBuildEngineProjectDir.endsWith('/server');
137
+ const { PLATFORM } = process.env;
138
+ const isBuildHosted = config.isBuildHosted || false;
139
+ const appContentPath = getAppContentPath(baseUrl, isBuildHosted);
140
+ const copiedDirWithPublicContentPath = path_1.default.join(appBuildDir, `../${path_1.default.parse(appBuildDir).name}-public`);
141
+ const plugins = {
142
+ forkTsChecker: new fork_ts_checker_webpack_plugin_1.default({
143
+ typescript: {
144
+ enabled: true,
145
+ memoryLimit: 4096,
146
+ },
147
+ }),
148
+ webpack: new webpack_1.default.DefinePlugin({
149
+ WEBPACK_INJECTION_APP_NAME: JSON.stringify(buildConfig.common.appName || ''),
150
+ WEBPACK_INJECTION_APP_CONFIG_ID: JSON.stringify(config.appConfigId || ''),
151
+ WEBPACK_INJECTION_APP_CREATED: JSON.stringify(new Date().toISOString()),
152
+ WEBPACK_INJECTION_APP_SCHEME: JSON.stringify(config.scheme || ''),
153
+ WEBPACK_INJECTION_APP_RESOLUTION: JSON.stringify(getResolutionString(config)),
154
+ WEBPACK_INJECTION_APP_VERSION: JSON.stringify(buildVersion || ''),
155
+ WEBPACK_INJECTION_APP_ENVIRONMENT: JSON.stringify(config.environment || ''),
156
+ WEBPACK_INJECTION_APP_PLATFORM: JSON.stringify(PLATFORM || ''),
157
+ WEBPACK_INJECTION_APP_CONTENT_PATH: JSON.stringify(appContentPath),
158
+ }),
159
+ html: new html_webpack_plugin_1.default({
160
+ alwaysWriteToDisk: true,
161
+ filename: path_1.default.resolve(appBuildEngineProjectPublicDir, './index.html'),
162
+ template: path_1.default.resolve(appBuildDir, './template.js'),
163
+ minify: false,
164
+ templateParameters: {
165
+ ...config,
166
+ debug: process.env.DEBUG,
167
+ debugIp: process.env.DEBUG_IP,
168
+ platform: PLATFORM,
169
+ environment: config.environment,
170
+ baseUrl,
171
+ },
172
+ xhtml: PLATFORM === smartapps_bigscreen_rnv_build_engine_1.Constants.Platforms.HBBTV,
173
+ }),
174
+ harddisk: new html_webpack_harddisk_plugin_1.default(),
175
+ css: new mini_css_extract_plugin_1.default({
176
+ filename: 'content/css/[name].css',
177
+ }),
178
+ fileManager: new filemanager_webpack_plugin_1.default({
179
+ events: {
180
+ onStart: [
181
+ {
182
+ delete: [
183
+ copiedDirWithPublicContentPath,
184
+ ],
185
+ },
186
+ ],
187
+ onEnd: [
188
+ isDevServer ? {
189
+ move: [
190
+ {
191
+ source: path_1.default.join(appBuildDir, 'project', 'public', 'content'),
192
+ destination: path_1.default.join(appBuildEngineProjectDir, 'content'),
193
+ },
194
+ ],
195
+ } : null,
196
+ isBuildHosted ? {
197
+ copy: [
198
+ {
199
+ source: appBuildEngineProjectPublicDir,
200
+ destination: path_1.default.join(copiedDirWithPublicContentPath, 'project', 'public'),
201
+ },
202
+ ],
203
+ delete: [
204
+ path_1.default.join(appBuildEngineProjectPublicDir, 'content'),
205
+ ],
206
+ } : null,
207
+ ].filter(Boolean),
208
+ },
209
+ }),
210
+ };
211
+ return {
212
+ Rules: makeRules(config, projectDir, isDevServer),
213
+ extensions: [
214
+ ...generateFlavourJSExtensions(config),
215
+ ...generateFlavourSCSSExtensions(config),
216
+ ],
217
+ aliases: makeAliases(config, projectDir),
218
+ entry: {
219
+ polyfill: path_1.default.resolve(projectDir, 'polyfill/index.ts'),
220
+ bundle: path_1.default.resolve(projectDir, `${config.entryFile}.js`),
221
+ },
222
+ devServer: { host: devServerHost },
223
+ output: {
224
+ filename: 'content/js/[name].js',
225
+ publicPath: isBuildHosted ? `${baseUrl}/public` : '',
226
+ path: appBuildEngineProjectPublicDir,
227
+ },
228
+ Plugins: plugins,
229
+ projectDir,
230
+ platformBuildsDir,
231
+ appBuildDir,
232
+ };
233
+ }
234
+ exports.generateConfig = generateConfig;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const webpackPlatformProps_1 = require("./webpackPlatformProps");
4
+ const webpackConfigAdapter_1 = require("./webpackConfigAdapter");
5
+ const webpackConfig = (0, webpackConfigAdapter_1.generateWebpackDevConfig)(webpackPlatformProps_1.webpackPlatformProps);
6
+ exports.default = webpackConfig;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const webpackPlatformProps_1 = require("./webpackPlatformProps");
4
+ const webpackConfigAdapter_1 = require("./webpackConfigAdapter");
5
+ const webpackConfig = (0, webpackConfigAdapter_1.generateWebpackProdConfig)(webpackPlatformProps_1.webpackPlatformProps);
6
+ exports.default = webpackConfig;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolution = void 0;
4
+ const resolution = {
5
+ width: 1280,
6
+ height: 720,
7
+ };
8
+ exports.resolution = resolution;
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.generateWebpackProdConfig = exports.generateWebpackDevConfig = void 0;
23
+ const webpack_base_1 = require("./webpack.base");
24
+ const Extend = __importStar(require("./webpack.extend"));
25
+ const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
26
+ const composeCommonConfig = (config) => {
27
+ const composedConfig = {
28
+ ...config,
29
+ ...Extend,
30
+ currentDir: __dirname,
31
+ };
32
+ const { metaTags } = composedConfig;
33
+ if (metaTags) {
34
+ composedConfig.metaTags = metaTags.replace('<meta name="viewport" content="width={{APP_WIDTH}}', `<meta name="viewport" content="width=${Extend.resolution.width}`);
35
+ }
36
+ return composedConfig;
37
+ };
38
+ const withDevInputConfig = (config) => ({
39
+ ...config,
40
+ environment: 'development',
41
+ devServerHost: '0.0.0.0',
42
+ enableHotReload: true,
43
+ });
44
+ const withProdInputConfig = (config) => ({
45
+ ...config,
46
+ environment: 'production',
47
+ });
48
+ const makeCommonOutput = (config, C) => ({
49
+ entry: C.entry,
50
+ devServer: C.devServer,
51
+ output: C.output,
52
+ module: {
53
+ rules: [
54
+ C.Rules.babel,
55
+ C.Rules.css,
56
+ C.Rules.image,
57
+ C.Rules.fonts,
58
+ C.Rules.sourcemap,
59
+ ].filter(Boolean),
60
+ },
61
+ plugins: [
62
+ C.Plugins.forkTsChecker,
63
+ C.Plugins.webpack,
64
+ C.Plugins.html,
65
+ C.Plugins.harddisk,
66
+ C.Plugins.css,
67
+ C.Plugins.fileManager,
68
+ ].filter(Boolean),
69
+ resolve: {
70
+ symlinks: true,
71
+ extensions: C.extensions,
72
+ alias: C.aliases,
73
+ },
74
+ ...config.extend || {},
75
+ });
76
+ const generateWebpackDevConfig = (webpackPlatformProps) => {
77
+ const config = composeCommonConfig(webpackPlatformProps);
78
+ const devInputConfig = withDevInputConfig(config);
79
+ const C = (0, webpack_base_1.generateConfig)(devInputConfig);
80
+ const commonOutput = makeCommonOutput(devInputConfig, C);
81
+ commonOutput.plugins.push(new BundleAnalyzerPlugin());
82
+ return {
83
+ ...commonOutput,
84
+ optimization: {
85
+ minimize: false,
86
+ },
87
+ };
88
+ };
89
+ exports.generateWebpackDevConfig = generateWebpackDevConfig;
90
+ const generateWebpackProdConfig = (webpackPlatformProps) => {
91
+ const config = composeCommonConfig(webpackPlatformProps);
92
+ const prodInputConfig = withProdInputConfig(config);
93
+ const C = (0, webpack_base_1.generateConfig)(prodInputConfig);
94
+ const commonOutput = makeCommonOutput(prodInputConfig, C);
95
+ commonOutput.plugins.push(new BundleAnalyzerPlugin());
96
+ return {
97
+ ...commonOutput,
98
+ };
99
+ };
100
+ exports.generateWebpackProdConfig = generateWebpackProdConfig;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.webpackPlatformProps = void 0;
4
+ exports.webpackPlatformProps = {
5
+ metaTags: `
6
+ <meta name="viewport" content="width={{APP_WIDTH}}, user-scalable=no" />
7
+ `,
8
+ };
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.webpackPlatformProps = void 0;
4
+ const objStyle = 'style="position: absolute; left: 0; top: 0; width: 0; height: 0;"';
5
+ exports.webpackPlatformProps = {
6
+ docType: `
7
+ <?xml version="1.0" encoding="UTF-8" ?>
8
+ <!DOCTYPE html PUBLIC "-//HbbTV//1.1.1//EN" "http://www.hbbtv.org/dtd/HbbTV-1.1.1.dtd">
9
+ `,
10
+ htmlTag: '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">',
11
+ metaTags: `
12
+ <meta http-equiv="content-type" content="application/vnd.hbbtv.xhtml+xml" charset="UTF-8" />
13
+ <meta http-equiv="cache-control" content="max-age=0" />
14
+ <meta http-equiv="cache-control" content="no-cache" />
15
+ <meta http-equiv="expires" content="0" />
16
+ <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
17
+ <meta http-equiv="pragma" content="no-cache" />
18
+ `,
19
+ bodyPrepend: [
20
+ `<object id="oipfCap" type="application/oipfCapabilities" ${objStyle}></object>`,
21
+ `<object id="oipfAppMan" type="application/oipfApplicationManager" ${objStyle}></object>`,
22
+ `<object id="oipfConfig" type="application/oipfConfiguration" ${objStyle}></object>`,
23
+ ],
24
+ };
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>{{configProps.appName}}</name>
4
+ <comment></comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ <buildCommand>
9
+ <name>json.validation.builder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
13
+ <buildCommand>
14
+ <name>org.tizen.web.project.builder.WebBuilder</name>
15
+ <arguments>
16
+ </arguments>
17
+ </buildCommand>
18
+ </buildSpec>
19
+ <natures>
20
+ <nature>json.validation.nature</nature>
21
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
22
+ <nature>org.tizen.web.project.builder.WebNature</nature>
23
+ </natures>
24
+ </projectDescription>
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
+ <tproject xmlns="http://www.tizen.org/tproject">
3
+ <platforms>
4
+ <platform>
5
+ <name>tv-samsung-4.0</name>
6
+ </platform>
7
+ </platforms>
8
+ <package>
9
+ <blacklist/>
10
+ <resFallback autoGen="true"/>
11
+ </package>
12
+ </tproject>
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="https://24i.com/apps/smartapps/bigscreen/{{configProps.id}}" version="{{APP_VERSION}}" viewmodes="maximized">
3
+ <tizen:application id="{{configProps.id}}" package="{{configProps.package}}" required_version="2.3"/>
4
+ <name>{{configProps.appName}}</name>
5
+ <content src="public/index.html"/>
6
+ <icon src="app_icon_512x512.png"/>
7
+ <access origin="*" subdomains="true"></access>
8
+ <feature name="http://tizen.org/feature/screen.size.normal.{{configProps.webpackConfig.resolution.width}}.{{configProps.webpackConfig.resolution.height}}"/>
9
+ <feature name="http://tizen.org/feature/network.internet"/>
10
+ <feature name="http://tizen.org/api/tizen" required="true"/>
11
+ <tizen:profile name="tv-samsung"/>
12
+ <tizen:privilege name="http://developer.samsung.com/privilege/network.public"/>
13
+ <tizen:privilege name="http://developer.samsung.com/privilege/productinfo"/>
14
+ <tizen:privilege name="http://tizen.org/privilege/internet"/>
15
+ <tizen:privilege name="http://tizen.org/privilege/tv.inputdevice"/>
16
+ <tizen:setting screen-orientation="landscape" context-menu="enable" background-support="disable" encryption="disable" install-location="auto" hwkey-event="enable"/>
17
+ </widget>
@@ -0,0 +1,35 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>{{configProps.title}}</name>
4
+ <comment></comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ <buildCommand>
9
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
13
+ <buildCommand>
14
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
15
+ <arguments>
16
+ </arguments>
17
+ </buildCommand>
18
+ <buildCommand>
19
+ <name>com.webos.ide.nature.WebOSBuilder</name>
20
+ <arguments>
21
+ </arguments>
22
+ </buildCommand>
23
+ <buildCommand>
24
+ <name>org.eclipse.wst.validation.validationbuilder</name>
25
+ <arguments>
26
+ </arguments>
27
+ </buildCommand>
28
+ </buildSpec>
29
+ <natures>
30
+ <nature>com.webos.ide.project.nature</nature>
31
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
32
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
33
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
34
+ </natures>
35
+ </projectDescription>
@@ -0,0 +1,19 @@
1
+ {
2
+ "icon": "app_icon_80x80.png",
3
+ "id": "{{configProps.id}}",
4
+ "largeIcon": "app_icon_130x130.png",
5
+ "main": "public/index.html",
6
+ "splashBackground": "splash_background_1920x1080.png",
7
+ "title": "{{configProps.title}}",
8
+ "type": "web",
9
+ "vendor": "{{configProps.author.name}}",
10
+ "version": "{{configProps.packageVersion}}",
11
+ "appDescription": "{{configProps.description}}",
12
+ "bgColor": "{{configProps.backgroundColor}}",
13
+ "bgImage": "{{configProps.appinfo.bgImage}}",
14
+ "disableBackHistoryAPI": true,
15
+ "handlesRelaunch": "{{configProps.appinfo.handlesRelaunch}}",
16
+ "iconColor": "{{configProps.appinfo.iconColor}}",
17
+ "resolution": "{{configProps.webpackConfig.resolution.width}}x{{configProps.webpackConfig.resolution.height}}",
18
+ "transparent": "{{configProps.appinfo.transparent}}"
19
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.webpackPlatformProps = void 0;
4
+ exports.webpackPlatformProps = {
5
+ metaTags: `
6
+ <meta name="viewport" content="width={{APP_WIDTH}}, initial-scale=1, shrink-to-fit=no" />
7
+ `,
8
+ };
@@ -98,7 +98,7 @@ declare namespace React {
98
98
  * - React stateless functional components that forward a `ref` will give you the `ElementRef` of the forwarded
99
99
  * to component.
100
100
  *
101
- * `C` must be the type _of_ a React component so you need to use typeof as in React.ElementRef<typeof MyComponent>.
101
+ * `C` must be the type _of_ a React component so you need to use typeof as in `React.ElementRef<typeof MyComponent>`.
102
102
  *
103
103
  * @todo In Flow, this works a little different with forwarded refs and the `AbstractComponent` that
104
104
  * `React.forwardRef()` returns.
@@ -1,12 +1,12 @@
1
1
  const ELLIPSIS = '...';
2
2
 
3
- export const trimWithLeadingEllipsis = (row: HTMLSpanElement) => {
3
+ export const trimWithLeadingEllipsis = (row: HTMLSpanElement, requestedNumberOfLines: number) => {
4
4
  if (row && row.textContent != null) {
5
5
  row.style.visibility = 'hidden';
6
6
  const lineHeightString = window.getComputedStyle(row, null).getPropertyValue('line-height');
7
7
  const lineHeight = parseInt(lineHeightString, 10);
8
8
  let numberOfLines = row.offsetHeight / lineHeight;
9
- if (numberOfLines > 2) {
9
+ if (numberOfLines > requestedNumberOfLines) {
10
10
  const originalTextContent = row.textContent;
11
11
  row.textContent = ELLIPSIS;
12
12
  let stringBuffer = '';
@@ -17,9 +17,9 @@ export const trimWithLeadingEllipsis = (row: HTMLSpanElement) => {
17
17
  row.textContent = `${ELLIPSIS}${stringBuffer}`;
18
18
  currentPosition -= 1;
19
19
  numberOfLines = Math.floor(row.offsetHeight / lineHeight);
20
- } while (numberOfLines <= 2 && currentPosition >= 0);
20
+ } while (numberOfLines <= requestedNumberOfLines && currentPosition >= 0);
21
21
  row.textContent = `${ELLIPSIS}${stringBuffer.substring(1)}`;
22
22
  }
23
- row.style.visibility = 'visible';
23
+ row.style.visibility = '';
24
24
  }
25
25
  };