@ui5/webcomponents-tools 0.0.0-dff5837d7 → 0.0.0-ec448881d

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 (75) hide show
  1. package/CHANGELOG.md +208 -0
  2. package/README.md +1 -1
  3. package/assets-meta.js +18 -1
  4. package/bin/dev.js +10 -5
  5. package/components-package/nps.js +53 -26
  6. package/components-package/postcss.themes.js +6 -3
  7. package/components-package/rollup-plugins/empty-module.js +15 -0
  8. package/components-package/rollup.js +93 -77
  9. package/components-package/wdio.js +54 -29
  10. package/components-package/wdio.sync.js +360 -0
  11. package/icons-collection/nps.js +47 -9
  12. package/lib/copy-and-watch/index.js +30 -5
  13. package/lib/copy-list/index.js +28 -0
  14. package/lib/create-icons/index.js +82 -54
  15. package/lib/create-illustrations/index.js +161 -0
  16. package/lib/create-new-component/index.js +16 -4
  17. package/lib/documentation/index.js +124 -99
  18. package/lib/documentation/templates/api-properties-section.js +3 -1
  19. package/lib/documentation/templates/template.js +2 -1
  20. package/lib/esm-abs-to-rel/index.js +58 -0
  21. package/lib/generate-json-imports/i18n.js +74 -32
  22. package/lib/generate-json-imports/themes.js +64 -17
  23. package/lib/hbs2lit/src/compiler.js +12 -3
  24. package/lib/hbs2lit/src/includesReplacer.js +5 -5
  25. package/lib/hbs2lit/src/litVisitor2.js +43 -7
  26. package/lib/hbs2lit/src/svgProcessor.js +3 -3
  27. package/lib/hbs2ui5/RenderTemplates/LitRenderer.js +5 -5
  28. package/lib/hbs2ui5/index.js +50 -18
  29. package/lib/i18n/defaults.js +49 -57
  30. package/lib/i18n/toJSON.js +13 -12
  31. package/lib/jsdoc/config.json +1 -1
  32. package/lib/jsdoc/plugin.js +33 -4
  33. package/lib/jsdoc/template/publish.js +24 -4
  34. package/lib/postcss-combine-duplicated-selectors/index.js +178 -0
  35. package/lib/postcss-css-to-esm/index.js +19 -16
  36. package/lib/postcss-css-to-json/index.js +20 -11
  37. package/lib/postcss-new-files/index.js +36 -0
  38. package/lib/postcss-p/postcss-p.mjs +11 -0
  39. package/lib/replace-global-core/index.js +25 -0
  40. package/lib/scoping/get-all-tags.js +44 -0
  41. package/lib/scoping/lint-src.js +31 -0
  42. package/lib/scoping/missing-dependencies.js +65 -0
  43. package/lib/scoping/report-tags-usage.js +28 -0
  44. package/lib/scoping/scope-test-pages.js +40 -0
  45. package/lib/serve/index.js +46 -0
  46. package/{components-package → lib/serve}/serve.json +0 -0
  47. package/package-lock.json +48 -0
  48. package/package.json +47 -53
  49. package/bin/init-ui5-package.js +0 -3
  50. package/lib/init-package/index.js +0 -112
  51. package/lib/init-package/resources/.eslintignore +0 -3
  52. package/lib/init-package/resources/bundle.es5.js +0 -25
  53. package/lib/init-package/resources/bundle.esm.js +0 -34
  54. package/lib/init-package/resources/config/.eslintrc.js +0 -1
  55. package/lib/init-package/resources/config/postcss.components/postcss.config.js +0 -1
  56. package/lib/init-package/resources/config/postcss.themes/postcss.config.js +0 -1
  57. package/lib/init-package/resources/config/rollup.config.js +0 -1
  58. package/lib/init-package/resources/config/wdio.conf.js +0 -1
  59. package/lib/init-package/resources/package-scripts.js +0 -11
  60. package/lib/init-package/resources/src/Assets.js +0 -5
  61. package/lib/init-package/resources/src/Demo.hbs +0 -1
  62. package/lib/init-package/resources/src/Demo.js +0 -56
  63. package/lib/init-package/resources/src/i18n/messagebundle.properties +0 -2
  64. package/lib/init-package/resources/src/i18n/messagebundle_de.properties +0 -1
  65. package/lib/init-package/resources/src/i18n/messagebundle_en.properties +0 -1
  66. package/lib/init-package/resources/src/i18n/messagebundle_es.properties +0 -1
  67. package/lib/init-package/resources/src/i18n/messagebundle_fr.properties +0 -1
  68. package/lib/init-package/resources/src/themes/Demo.css +0 -11
  69. package/lib/init-package/resources/src/themes/sap_belize/parameters-bundle.css +0 -3
  70. package/lib/init-package/resources/src/themes/sap_belize_hcb/parameters-bundle.css +0 -3
  71. package/lib/init-package/resources/src/themes/sap_belize_hcw/parameters-bundle.css +0 -3
  72. package/lib/init-package/resources/src/themes/sap_fiori_3/parameters-bundle.css +0 -3
  73. package/lib/init-package/resources/src/themes/sap_fiori_3_dark/parameters-bundle.css +0 -3
  74. package/lib/init-package/resources/test/pages/index.html +0 -51
  75. package/lib/init-package/resources/test/specs/Demo.spec.js +0 -12
@@ -0,0 +1,28 @@
1
+ const fs = require("fs");
2
+ const glob = require("glob");
3
+ const path = require("path");
4
+ const process = require("process");
5
+
6
+ // gather all tags from all files
7
+ const tags = new Set();
8
+ const files = glob.sync(path.join(process.argv[2], "src/**/*.js"));
9
+ files.forEach(file => {
10
+ const content = `${fs.readFileSync(file)}`;
11
+ const matches = content.match(/tag: "(.*?)",/);
12
+ if (matches) {
13
+ tags.add(matches[1]);
14
+ }
15
+ });
16
+
17
+ // report all usages of any tag within any file, which is not the tag definition and is not hasAttribute
18
+ files.forEach(file => {
19
+ const content = `${fs.readFileSync(file)}`;
20
+ const lines = content.split("\n");
21
+ lines.forEach(line => {
22
+ tags.forEach(tag => {
23
+ if (line.includes(`"${tag}"`) && !line.includes(`tag: "${tag}",`) && !line.includes(`hasAttribute("${tag}")`)) {
24
+ console.log(`${file}: ${line.trim()}`);
25
+ }
26
+ });
27
+ });
28
+ });
@@ -0,0 +1,40 @@
1
+ const fs = require("fs");
2
+ const path = require("path");
3
+ const glob = require("glob");
4
+ const getAllTags = require("./get-all-tags.js");
5
+
6
+ const root = process.argv[2];
7
+ const suffix = process.argv[3];
8
+
9
+ const tags = getAllTags(process.cwd());
10
+
11
+ // Replaces tags in HTML content, f.e. <ui5-button> with <ui5-button-ver> or </ui5-button> with </ui5-button-ver>
12
+ const replaceTagsHTML = content => {
13
+ tags.forEach(tag => {
14
+ content = content.replace(new RegExp(`(<\/?)(${tag})(\/?[> \t\n])`, "g"), `$1$2-${suffix}$3`);
15
+ });
16
+ return content;
17
+ };
18
+
19
+ // Replace tags in any content
20
+ const replaceTagsAny = content => {
21
+ tags.forEach(tag => {
22
+ content = content.replace(new RegExp(`(^|[^\-_A-Za-z0-9])(${tag})([^\-_A-Za-z0-9]|$)`, "g"), `$1$2-${suffix}$3`);
23
+ });
24
+ return content;
25
+ };
26
+
27
+ // Replace bundle names and HTML tag names in test pages
28
+ glob.sync(path.join(root, "/**/*.html")).forEach(file => {
29
+ let content = String(fs.readFileSync(file));
30
+ content = content.replace(/bundle\.(.*?)\.js/g, `bundle.scoped.$1.js`);
31
+ content = replaceTagsHTML(content);
32
+ fs.writeFileSync(file, content);
33
+ });
34
+
35
+ // Replace tag names everywhere
36
+ glob.sync(path.join(root, "/**/*.{html,css,js}")).forEach(file => {
37
+ let content = String(fs.readFileSync(file));
38
+ content = replaceTagsAny(content);
39
+ fs.writeFileSync(file, content);
40
+ });
@@ -0,0 +1,46 @@
1
+ const fs = require("fs");
2
+ const path = require("path");
3
+ const commandLineArgs = require("command-line-args");
4
+ const { exec } = require("child_process");
5
+ const colors = require("cli-color");
6
+ const isPortReachable = require("is-port-reachable");
7
+
8
+ const options = commandLineArgs([
9
+ { name: "port", type: Number },
10
+ { name: "portStep", type: Number },
11
+ { name: "packageName", type: String },
12
+ { name: "dir", type: String },
13
+ { name: "config", type: String },
14
+ ]);
15
+ const serveConfig = path.join(__dirname, `serve.json`);
16
+
17
+ const requestPort = async () => {
18
+ const serveProcess = (await gen.next()).value;
19
+ serveProcess.stdout.on('data', data => {
20
+ const matches = data.match(/Accepting connections at .*?:(\d+)/);
21
+ if (matches) {
22
+ console.log(colors.yellow(`Reserved port ${matches[1]} for the ${options.packageName} package.`));
23
+ fs.writeFileSync(".port", matches[1]);
24
+ }
25
+ });
26
+ };
27
+
28
+ async function* serverGenerator(callback, port = 8080, step = 1) {
29
+ while (true) {
30
+ const portInUse = await isPortReachable(port, { host: "127.0.0.1" });
31
+ if (!portInUse) {
32
+ const command = `serve --config "${serveConfig}" --no-port-switching --no-clipboard -l ${port} ${options.dir}`;
33
+ console.log(colors.yellow(`Executing: ${command}`));
34
+ const serveProcess = exec(command, (err) => {
35
+ console.log(colors.yellow(`Port ${port} already in use.`));
36
+ callback();
37
+ });
38
+ yield serveProcess;
39
+ }
40
+ port += step;
41
+ }
42
+ }
43
+
44
+ const gen = serverGenerator(requestPort, options.port, options.portStep);
45
+
46
+ requestPort();
File without changes
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@ui5/webcomponents-tools",
3
+ "version": "1.0.0-rc.8",
4
+ "lockfileVersion": 1,
5
+ "requires": true,
6
+ "dependencies": {
7
+ "balanced-match": {
8
+ "version": "1.0.0",
9
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
10
+ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
11
+ "dev": true
12
+ },
13
+ "brace-expansion": {
14
+ "version": "1.1.11",
15
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
16
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
17
+ "dev": true,
18
+ "requires": {
19
+ "balanced-match": "^1.0.0",
20
+ "concat-map": "0.0.1"
21
+ }
22
+ },
23
+ "concat-map": {
24
+ "version": "0.0.1",
25
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
26
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
27
+ "dev": true
28
+ },
29
+ "minimatch": {
30
+ "version": "3.0.4",
31
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
32
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
33
+ "dev": true,
34
+ "requires": {
35
+ "brace-expansion": "^1.1.7"
36
+ }
37
+ },
38
+ "recursive-readdir": {
39
+ "version": "2.2.2",
40
+ "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.2.tgz",
41
+ "integrity": "sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==",
42
+ "dev": true,
43
+ "requires": {
44
+ "minimatch": "3.0.4"
45
+ }
46
+ }
47
+ }
48
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/webcomponents-tools",
3
- "version": "0.0.0-dff5837d7",
3
+ "version": "0.0.0-ec448881d",
4
4
  "description": "UI5 Web Components: webcomponents.tools",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -13,8 +13,7 @@
13
13
  "scripts": {},
14
14
  "bin": {
15
15
  "wc-dev": "bin/dev.js",
16
- "wc-create-ui5-element": "bin/create-ui5-element.js",
17
- "wc-init-ui5-package": "bin/init-ui5-package.js"
16
+ "wc-create-ui5-element": "bin/create-ui5-element.js"
18
17
  },
19
18
  "repository": {
20
19
  "type": "git",
@@ -22,61 +21,56 @@
22
21
  "directory": "packages/tools"
23
22
  },
24
23
  "dependencies": {
25
- "@babel/cli": "^7.1.2",
26
- "@babel/core": "^7.1.2",
27
- "@babel/plugin-proposal-object-rest-spread": "^7.3.2",
28
- "@babel/preset-env": "^7.1.0",
29
- "@wdio/cli": "^6.1.3",
30
- "@wdio/dot-reporter": "^6.0.16",
31
- "@wdio/local-runner": "^6.1.3",
32
- "@wdio/mocha-framework": "^6.1.0",
33
- "@wdio/spec-reporter": "^6.0.16",
34
- "@wdio/sync": "^6.1.0",
35
- "@webcomponents/webcomponentsjs": "^2.4.0",
36
- "chai": "^4.2.0",
37
- "chokidar-cli": "^2.0.0",
38
- "clean-css": "^4.2.1",
24
+ "@rollup/plugin-json": "^4.1.0",
25
+ "@rollup/plugin-node-resolve": "^13.0.5",
26
+ "@rollup/plugin-replace": "^3.0.0",
27
+ "@wdio/cli": "^7.12.2",
28
+ "@wdio/devtools-service": "^7.19.5",
29
+ "@wdio/dot-reporter": "^7.10.1",
30
+ "@wdio/local-runner": "^7.12.2",
31
+ "@wdio/mocha-framework": "^7.12.2",
32
+ "@wdio/spec-reporter": "^7.10.1",
33
+ "chai": "^4.3.4",
34
+ "child_process": "^1.0.2",
35
+ "chokidar": "^3.5.1",
36
+ "chokidar-cli": "^3.0.0",
37
+ "cli-color": "^2.0.1",
39
38
  "command-line-args": "^5.1.1",
40
- "concurrently": "^5.0.0",
41
- "cross-env": "^5.2.0",
42
- "cssnano": "^4.1.10",
43
- "escodegen": "^1.11.0",
44
- "eslint": "^5.10.0",
45
- "eslint-config-airbnb-base": "^13.1.0",
46
- "eslint-plugin-import": "^2.14.0",
39
+ "concurrently": "^6.0.0",
40
+ "cross-env": "^7.0.3",
41
+ "cssnano": "^4.1.11",
42
+ "escodegen": "^2.0.0",
43
+ "eslint": "^7.22.0",
44
+ "eslint-config-airbnb-base": "^14.2.1",
45
+ "eslint-plugin-import": "^2.22.1",
47
46
  "esprima": "^4.0.1",
48
- "getopts": "^2.2.3",
49
- "glob": "^7.1.3",
50
- "handlebars": "^4.1.2",
51
- "jsdoc": "^3.6.3",
47
+ "getopts": "^2.3.0",
48
+ "glob": "^7.1.6",
49
+ "glob-parent": "^6.0.2",
50
+ "globby": "^13.1.1",
51
+ "handlebars": "^4.7.7",
52
+ "is-port-reachable": "^3.1.0",
53
+ "jsdoc": "^3.6.6",
52
54
  "json-beautify": "^1.1.1",
53
- "mkdirp": "^0.5.1",
54
- "npm-run-all": "^4.1.3",
55
- "nps": "^5.9.8",
56
- "postcss": "^7.0.18",
57
- "postcss-cli": "^6.1.3",
58
- "postcss-combine-duplicated-selectors": "^7.0.0",
59
- "postcss-import": "^12.0.1",
60
- "properties-reader": "^0.3.1",
61
- "puppeteer": "^1.11.0",
62
- "rimraf": "^2.6.2",
63
- "rollup": "^1.1.2",
64
- "rollup-plugin-babel": "^4.0.3",
65
- "rollup-plugin-filesize": "^6.0.1",
66
- "rollup-plugin-livereload": "^1.0.4",
67
- "rollup-plugin-node-resolve": "^4.0.0",
68
- "rollup-plugin-notify": "^1.1.0",
69
- "rollup-plugin-string": "^2.0.2",
70
- "rollup-plugin-terser": "^5.1.3",
71
- "rollup-plugin-url": "^2.2.0",
72
- "rollup-plugin-visualizer": "^0.9.2",
73
- "serve": "^10.1.1",
74
- "wdio-chromedriver-service": "^6.0.2"
55
+ "mkdirp": "^1.0.4",
56
+ "nps": "^5.10.0",
57
+ "postcss": "^8.4.5",
58
+ "postcss-cli": "^9.1.0",
59
+ "postcss-import": "^14.0.2",
60
+ "postcss-selector-parser": "^6.0.10",
61
+ "properties-reader": "^2.2.0",
62
+ "recursive-readdir": "^2.2.2",
63
+ "resolve": "^1.20.0",
64
+ "rimraf": "^3.0.2",
65
+ "rollup": "^2.41.4",
66
+ "rollup-plugin-livereload": "^2.0.0",
67
+ "rollup-plugin-terser": "^7.0.2",
68
+ "serve": "^12.0.0",
69
+ "slash": "3.0.0",
70
+ "wdio-chromedriver-service": "^7.0.0",
71
+ "zx": "^4.3.0"
75
72
  },
76
73
  "peerDependencies": {
77
74
  "chromedriver": "*"
78
- },
79
- "resolutions": {
80
- "rollup-plugin-livereload/livereload/chokidar": "^3.x"
81
75
  }
82
76
  }
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- require("../lib/init-package/index.js");
@@ -1,112 +0,0 @@
1
- const fs = require("fs");
2
- const path = require("path");
3
- const mkdirp = require("mkdirp");
4
- const commandLineArgs = require('command-line-args');
5
- const beautify = require("json-beautify");
6
-
7
- // String utils
8
- const kebabToCamelCase = string => toCamelCase(string.split("-"));
9
- const toCamelCase = parts => {
10
- return parts.map((string, index) => {
11
- return index === 0 ? string.toLowerCase() : string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();
12
- }).join("");
13
- };
14
- const capitalizeFirst = str => str.substr(0,1).toUpperCase() + str.substr(1);
15
-
16
- // content of package.json
17
- let packageContent;
18
-
19
- const DEFAULT_PORT = 8080;
20
- const DEFAULT_TAG = 'ui5-demo';
21
-
22
- // from where all the files will be copied
23
- const RESOURCES_DIR = path.join(`${__dirname}`, `resources/`);
24
-
25
- // Command line options
26
- const options = commandLineArgs([
27
- {name: 'port', alias: 'p', type: Number},
28
- {name: 'tag', type: String},
29
- ]);
30
-
31
- // Ensure there is package.json
32
- try {
33
- packageContent = JSON.parse(fs.readFileSync("package.json"));
34
- } catch (err) {
35
- console.log("No package.json found, please run: 'npm init' first");
36
- process.exit(1);
37
- }
38
-
39
- // Ensure correct tag
40
- const tag = options.tag || DEFAULT_TAG;
41
- if (!tag.match(/^ui5-/)) {
42
- console.log("tag name should start with ui5-");
43
- process.exit(1);
44
- }
45
- const className = capitalizeFirst(kebabToCamelCase(tag.substr(4)));
46
-
47
- // All variables that will be replaced in the content of the resources/
48
- const vars = {
49
- INIT_PACKAGE_VAR_NAME: packageContent.name,
50
- INIT_PACKAGE_VAR_PORT: options.port || DEFAULT_PORT,
51
- INIT_PACKAGE_VAR_TAG: tag,
52
- INIT_PACKAGE_VAR_CLASS_NAME: className,
53
- };
54
- console.log(vars);
55
-
56
- const replaceVarsInFileContent = content => {
57
- for (let key in vars) {
58
- const re = new RegExp(key, "g");
59
- content = content.replace(re, vars[key]);
60
- }
61
- return content;
62
- };
63
-
64
- const replaceVarsInFileName = fileName => {
65
- return fileName.replace(/Demo/, vars.INIT_PACKAGE_VAR_CLASS_NAME) ;
66
- };
67
-
68
- const copyFile = (sourcePath, destPath) => {
69
- let content = fs.readFileSync(sourcePath, {encoding: "UTF-8"});
70
- content = replaceVarsInFileContent(content);
71
- destPath = replaceVarsInFileName(destPath);
72
- fs.writeFileSync(destPath, content);
73
- console.log(destPath);
74
- };
75
-
76
- const copyResources = sourcePath => {
77
- const destPath = sourcePath.substr(RESOURCES_DIR.length);
78
- const isDir = fs.lstatSync(sourcePath).isDirectory();
79
- if (isDir) {
80
- if (destPath) {
81
- mkdirp.sync(destPath);
82
- console.log(destPath);
83
- }
84
- fs.readdirSync(sourcePath).forEach(file => {
85
- copyResources(path.join(sourcePath, file));
86
- });
87
- } else {
88
- copyFile(sourcePath, destPath);
89
- }
90
- };
91
-
92
- const updatePackageFile = () => {
93
- packageContent.scripts = {
94
- "clean": "wc-dev clean",
95
- "lint": "wc-dev lint",
96
- "start": "wc-dev start",
97
- "build": "wc-dev build",
98
- "test": "wc-dev test",
99
- "create-ui5-element": "wc-create-ui5-element",
100
- "prepublishOnly": "npm run build"
101
- };
102
-
103
- fs.writeFileSync("package.json", beautify(packageContent, null, 2, 100));
104
- };
105
-
106
- // Copy files
107
- copyResources(RESOURCES_DIR);
108
-
109
- // Update package.json
110
- updatePackageFile();
111
-
112
- console.log("Package successfully initialized.");
@@ -1,3 +0,0 @@
1
- # Note: Changes to this file also must be applied to the top level .eslintignore file.
2
- dist
3
- test
@@ -1,25 +0,0 @@
1
- // ES5 bundle targets IE11 only
2
- import "@ui5/webcomponents-base/dist/features/browsersupport/IE11.js";
3
-
4
- import "./bundle.esm.js";
5
-
6
- import { getAnimationMode } from "@ui5/webcomponents-base/dist/config/AnimationMode.js";
7
- import { getLanguage } from "@ui5/webcomponents-base/dist/config/Language.js";
8
- import { getCalendarType } from "@ui5/webcomponents-base/dist/config/CalendarType.js";
9
- import { getTheme, setTheme } from "@ui5/webcomponents-base/dist/config/Theme.js";
10
- import { getNoConflict, setNoConflict } from "@ui5/webcomponents-base/dist/config/NoConflict.js";
11
- import { getRTL } from "@ui5/webcomponents-base/dist/config/RTL.js";
12
- import { getFirstDayOfWeek } from "@ui5/webcomponents-base/dist/config/FormatSettings.js";
13
-
14
- const configuration = {
15
- getAnimationMode,
16
- getLanguage,
17
- getTheme,
18
- setTheme,
19
- getNoConflict,
20
- setNoConflict,
21
- getCalendarType,
22
- getRTL,
23
- getFirstDayOfWeek,
24
- };
25
- export default configuration;
@@ -1,34 +0,0 @@
1
- // ESM bundle targets Edge + browsers with native support
2
- import "@ui5/webcomponents-base/dist/features/browsersupport/Edge.js";
3
-
4
- // used in test pages
5
- import RenderScheduler from "@ui5/webcomponents-base/dist/RenderScheduler.js";
6
-
7
- import { getAnimationMode } from "@ui5/webcomponents-base/dist/config/AnimationMode.js";
8
- import { getLanguage } from "@ui5/webcomponents-base/dist/config/Language.js";
9
- import { getCalendarType } from "@ui5/webcomponents-base/dist/config/CalendarType.js";
10
- import { getTheme, setTheme } from "@ui5/webcomponents-base/dist/config/Theme.js";
11
- import { getNoConflict, setNoConflict } from "@ui5/webcomponents-base/dist/config/NoConflict.js";
12
- import { getRTL } from "@ui5/webcomponents-base/dist/config/RTL.js";
13
- import { getFirstDayOfWeek } from "@ui5/webcomponents-base/dist/config/FormatSettings.js";
14
-
15
- // Enable additional themes and i18n texts
16
- import "./dist/Assets.js";
17
-
18
- // Import your web components here from the dist/ directory
19
- import "./dist/INIT_PACKAGE_VAR_CLASS_NAME.js";
20
-
21
- window.RenderScheduler = RenderScheduler;
22
- window["sap-ui-webcomponents-bundle"] = {
23
- configuration: {
24
- getAnimationMode,
25
- getLanguage,
26
- getTheme,
27
- setTheme,
28
- getNoConflict,
29
- setNoConflict,
30
- getCalendarType,
31
- getRTL,
32
- getFirstDayOfWeek,
33
- },
34
- };
@@ -1 +0,0 @@
1
- module.exports = require("@ui5/webcomponents-tools/components-package/eslint.js");
@@ -1 +0,0 @@
1
- module.exports = require("@ui5/webcomponents-tools/components-package/postcss.components.js");
@@ -1 +0,0 @@
1
- module.exports = require("@ui5/webcomponents-tools/components-package/postcss.themes.js");
@@ -1 +0,0 @@
1
- module.exports = require("@ui5/webcomponents-tools/components-package/rollup.js");
@@ -1 +0,0 @@
1
- module.exports = require("@ui5/webcomponents-tools/components-package/wdio.js");
@@ -1,11 +0,0 @@
1
- const getScripts = require("@ui5/webcomponents-tools/components-package/nps.js");
2
-
3
- const options = {
4
- port: INIT_PACKAGE_VAR_PORT,
5
- };
6
-
7
- const scripts = getScripts(options);
8
-
9
- module.exports = {
10
- scripts,
11
- };
@@ -1,5 +0,0 @@
1
- import "@ui5/webcomponents-theme-base/dist/Assets.js"; // Theming
2
-
3
- // own INIT_PACKAGE_VAR_NAME package assets
4
- import "./generated/json-imports/Themes.js";
5
- import "./generated/json-imports/i18n.js";
@@ -1 +0,0 @@
1
- <div>This is: INIT_PACKAGE_VAR_TAG. {{pleaseWaitText}}</div>
@@ -1,56 +0,0 @@
1
- import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
2
- import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
3
- import { fetchI18nBundle, getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
4
-
5
- // Template
6
- import INIT_PACKAGE_VAR_CLASS_NAMETemplate from "./generated/templates/INIT_PACKAGE_VAR_CLASS_NAMETemplate.lit.js";
7
-
8
- // Styles
9
- import INIT_PACKAGE_VAR_CLASS_NAMECss from "./generated/themes/INIT_PACKAGE_VAR_CLASS_NAME.css.js";
10
-
11
- import { PLEASE_WAIT } from "./generated/i18n/i18n-defaults.js";
12
-
13
- const metadata = {
14
- tag: "INIT_PACKAGE_VAR_TAG",
15
- properties: {
16
- },
17
- slots: {
18
- },
19
- events: {
20
- },
21
- };
22
-
23
- class INIT_PACKAGE_VAR_CLASS_NAME extends UI5Element {
24
- constructor() {
25
- super();
26
- this.i18nBundle = getI18nBundle("INIT_PACKAGE_VAR_NAME");
27
- }
28
-
29
- get pleaseWaitText() {
30
- return this.i18nBundle.getText(PLEASE_WAIT);
31
- }
32
-
33
- static get metadata() {
34
- return metadata;
35
- }
36
-
37
- static get render() {
38
- return litRender;
39
- }
40
-
41
- static get template() {
42
- return INIT_PACKAGE_VAR_CLASS_NAMETemplate;
43
- }
44
-
45
- static get styles() {
46
- return INIT_PACKAGE_VAR_CLASS_NAMECss;
47
- }
48
-
49
- static async onDefine() {
50
- await fetchI18nBundle("INIT_PACKAGE_VAR_NAME");
51
- }
52
- }
53
-
54
- INIT_PACKAGE_VAR_CLASS_NAME.define();
55
-
56
- export default INIT_PACKAGE_VAR_CLASS_NAME;
@@ -1,2 +0,0 @@
1
- #please wait text for the demo component
2
- PLEASE_WAIT=wait
@@ -1 +0,0 @@
1
- PLEASE_WAIT=Bitte warten
@@ -1 +0,0 @@
1
- PLEASE_WAIT=Please wait
@@ -1 +0,0 @@
1
- PLEASE_WAIT=Espere
@@ -1 +0,0 @@
1
- PLEASE_WAIT=Patientez.
@@ -1,11 +0,0 @@
1
- :host {
2
- border: 2px solid var(--ui5-demo-border-color);
3
- background-color: var(--sapBackgroundColor);
4
- color: var(--sapTextColor);
5
- display: block;
6
- width: 16rem;
7
- height: 3rem;
8
- text-align: center;
9
- vertical-align: middle;
10
- line-height: 3rem;
11
- }
@@ -1,3 +0,0 @@
1
- :root {
2
- --ui5-demo-border-color: lightblue;
3
- }
@@ -1,3 +0,0 @@
1
- :root {
2
- --ui5-demo-border-color: black;
3
- }
@@ -1,3 +0,0 @@
1
- :root {
2
- --ui5-demo-border-color: black;
3
- }
@@ -1,3 +0,0 @@
1
- :root {
2
- --ui5-demo-border-color: green;
3
- }
@@ -1,3 +0,0 @@
1
- :root {
2
- --ui5-demo-border-color: blue;
3
- }