@ui5/webcomponents-tools 0.0.0-bef62af04 → 0.0.0-bf8366eb6

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 (109) hide show
  1. package/CHANGELOG.md +1314 -0
  2. package/README.md +6 -6
  3. package/assets-meta.js +17 -6
  4. package/bin/dev.js +1 -5
  5. package/components-package/eslint.js +36 -0
  6. package/components-package/nps.js +109 -70
  7. package/components-package/postcss.components.js +1 -21
  8. package/components-package/postcss.themes.js +1 -23
  9. package/components-package/vite.config.js +13 -0
  10. package/components-package/wdio.js +107 -37
  11. package/icons-collection/nps.js +51 -18
  12. package/lib/amd-to-es6/index.js +102 -0
  13. package/lib/amd-to-es6/no-remaining-require.js +33 -0
  14. package/lib/cem/custom-elements-manifest.config.mjs +501 -0
  15. package/lib/cem/event.mjs +131 -0
  16. package/lib/cem/schema-internal.json +1357 -0
  17. package/lib/cem/schema.json +1098 -0
  18. package/lib/cem/types-internal.d.ts +796 -0
  19. package/lib/cem/types.d.ts +736 -0
  20. package/lib/cem/utils.mjs +384 -0
  21. package/lib/cem/validate.js +70 -0
  22. package/lib/copy-and-watch/index.js +24 -1
  23. package/lib/copy-list/index.js +17 -17
  24. package/lib/create-icons/index.js +126 -58
  25. package/lib/create-illustrations/index.js +157 -45
  26. package/lib/create-new-component/index.js +61 -101
  27. package/lib/create-new-component/tsFileContentTemplate.js +71 -0
  28. package/lib/css-processors/css-processor-component-styles.mjs +48 -0
  29. package/lib/css-processors/css-processor-components.mjs +77 -0
  30. package/lib/css-processors/css-processor-themes.mjs +79 -0
  31. package/lib/css-processors/scope-variables.mjs +49 -0
  32. package/lib/css-processors/shared.mjs +76 -0
  33. package/lib/dev-server/custom-hot-update-plugin.js +39 -0
  34. package/lib/dev-server/dev-server.js +66 -0
  35. package/lib/dev-server/ssr-dom-shim-loader.js +26 -0
  36. package/lib/dev-server/virtual-index-html-plugin.js +52 -0
  37. package/lib/generate-js-imports/illustrations.js +86 -0
  38. package/lib/generate-json-imports/i18n.js +35 -55
  39. package/lib/generate-json-imports/themes.js +30 -45
  40. package/lib/hbs2lit/src/compiler.js +24 -4
  41. package/lib/hbs2lit/src/includesReplacer.js +5 -5
  42. package/lib/hbs2lit/src/litVisitor2.js +95 -24
  43. package/lib/hbs2lit/src/svgProcessor.js +12 -5
  44. package/lib/hbs2ui5/RenderTemplates/LitRenderer.js +32 -4
  45. package/lib/hbs2ui5/index.js +56 -23
  46. package/lib/i18n/defaults.js +65 -57
  47. package/lib/i18n/toJSON.js +12 -11
  48. package/lib/postcss-combine-duplicated-selectors/index.js +185 -0
  49. package/lib/remove-dev-mode/remove-dev-mode.mjs +37 -0
  50. package/lib/scoping/get-all-tags.js +2 -9
  51. package/lib/scoping/lint-src.js +8 -7
  52. package/lib/scoping/missing-dependencies.js +65 -0
  53. package/lib/scoping/report-tags-usage.js +28 -0
  54. package/lib/scoping/scope-test-pages.js +2 -1
  55. package/lib/test-runner/test-runner.js +71 -0
  56. package/package.json +38 -39
  57. package/bin/init-ui5-package.js +0 -3
  58. package/components-package/rollup.js +0 -216
  59. package/lib/documentation/index.js +0 -165
  60. package/lib/documentation/templates/api-component-since.js +0 -3
  61. package/lib/documentation/templates/api-css-variables-section.js +0 -24
  62. package/lib/documentation/templates/api-events-section.js +0 -35
  63. package/lib/documentation/templates/api-methods-section.js +0 -26
  64. package/lib/documentation/templates/api-properties-section.js +0 -40
  65. package/lib/documentation/templates/api-slots-section.js +0 -28
  66. package/lib/documentation/templates/template.js +0 -38
  67. package/lib/esm-abs-to-rel/index.js +0 -54
  68. package/lib/hash/config.js +0 -10
  69. package/lib/hash/generate.js +0 -19
  70. package/lib/hash/upToDate.js +0 -31
  71. package/lib/init-package/index.js +0 -136
  72. package/lib/init-package/resources/.eslintignore +0 -3
  73. package/lib/init-package/resources/bundle.es5.js +0 -25
  74. package/lib/init-package/resources/bundle.esm.js +0 -31
  75. package/lib/init-package/resources/config/.eslintrc.js +0 -1
  76. package/lib/init-package/resources/config/postcss.components/postcss.config.js +0 -1
  77. package/lib/init-package/resources/config/postcss.themes/postcss.config.js +0 -1
  78. package/lib/init-package/resources/config/rollup.config.js +0 -1
  79. package/lib/init-package/resources/config/wdio.conf.js +0 -1
  80. package/lib/init-package/resources/package-scripts.js +0 -11
  81. package/lib/init-package/resources/src/Assets.js +0 -5
  82. package/lib/init-package/resources/src/MyFirstComponent.hbs +0 -1
  83. package/lib/init-package/resources/src/MyFirstComponent.js +0 -56
  84. package/lib/init-package/resources/src/i18n/messagebundle.properties +0 -2
  85. package/lib/init-package/resources/src/i18n/messagebundle_de.properties +0 -1
  86. package/lib/init-package/resources/src/i18n/messagebundle_en.properties +0 -1
  87. package/lib/init-package/resources/src/i18n/messagebundle_es.properties +0 -1
  88. package/lib/init-package/resources/src/i18n/messagebundle_fr.properties +0 -1
  89. package/lib/init-package/resources/src/themes/MyFirstComponent.css +0 -11
  90. package/lib/init-package/resources/src/themes/sap_belize/parameters-bundle.css +0 -3
  91. package/lib/init-package/resources/src/themes/sap_belize_hcb/parameters-bundle.css +0 -3
  92. package/lib/init-package/resources/src/themes/sap_belize_hcw/parameters-bundle.css +0 -3
  93. package/lib/init-package/resources/src/themes/sap_fiori_3/parameters-bundle.css +0 -3
  94. package/lib/init-package/resources/src/themes/sap_fiori_3_dark/parameters-bundle.css +0 -3
  95. package/lib/init-package/resources/src/themes/sap_fiori_3_hcb/parameters-bundle.css +0 -3
  96. package/lib/init-package/resources/src/themes/sap_fiori_3_hcw/parameters-bundle.css +0 -3
  97. package/lib/init-package/resources/test/pages/index.html +0 -56
  98. package/lib/init-package/resources/test/specs/Demo.spec.js +0 -12
  99. package/lib/jsdoc/config.json +0 -29
  100. package/lib/jsdoc/plugin.js +0 -2427
  101. package/lib/jsdoc/template/publish.js +0 -4101
  102. package/lib/polyfill-placeholder/index.js +0 -5
  103. package/lib/postcss-css-to-esm/index.js +0 -45
  104. package/lib/postcss-css-to-json/index.js +0 -31
  105. package/lib/postcss-new-files/index.js +0 -36
  106. package/lib/replace-global-core/index.js +0 -20
  107. package/lib/serve/index.js +0 -46
  108. package/lib/serve/serve.json +0 -3
  109. package/package-lock.json +0 -48
@@ -1,35 +0,0 @@
1
- module.exports = {
2
- template: `
3
- {{#if events}}
4
- <h3 class="comment-api-title space-top">Events</h3>
5
- <p class="small-space-top" >This Web Component fires semantic events upon user interaction. You can bind to these events with the standard DOM APIs, such as <code>addEventListener</code>. </p>
6
-
7
- <div class="small-space-top api-table">
8
- <div class="head api-table-header-roll">
9
- <div class="cell api-table-header-cell">Name</div>
10
- <div class="cell api-table-header-cell">Description</div>
11
- </div>
12
-
13
- {{#each events}}
14
- <div class="row {{checkEven @index}}">
15
- <div class="cell api-table-content-cell api-table-content-cell-bold">{{this.name}}</div>
16
- <div class="cell api-table-content-cell api-table-content-cell-description">
17
- {{{this.description}}}
18
- {{#if this.since}}
19
- <div class="api-table-content-cell-bold api-table-content-cell-since">since v{{{this.since}}}</div>
20
- {{/if}}
21
- </div>
22
- </div>
23
-
24
- {{#each this.parameters}}
25
- <tr class="api-table-event-param">
26
- <div class="api-table-content-event-params-wrapper">
27
- <div class="cell api-table-param-name api-table-content-cell api-table-content-cell-bold">{{this.name}}</div>
28
- <div class="cell api-table-event-param-cell api-table-content-cell api-table-content-cell-description"><strong class="bold" >type:</strong> {{this.type}} <br/> <strong class="api-table-event-description bold">description:</strong> {{{this.description}}}</div>
29
- </div>
30
- </tr>
31
- {{/each}}
32
- {{/each}}
33
- </div>
34
- {{/if}}`
35
- };
@@ -1,26 +0,0 @@
1
- module.exports = {
2
- template: `
3
- {{#if methods}}
4
- <h3 class="comment-api-title space-top">Methods</h3>
5
- <p class="small-space-top" >This Web Component exposes public methods. You can invoke them directly on the Web Component instance.</p>
6
-
7
- <div class="small-space-top api-table">
8
- <div class="head api-table-header-roll">
9
- <div class="cell api-table-header-cell">Name</div>
10
- <div class="cell api-table-header-cell">Description</div>
11
- </div>
12
-
13
- {{#each methods}}
14
- <div class="row {{checkEven @index}}">
15
- <div class="cell api-table-content-cell api-table-content-cell-bold">{{this.name}}</div>
16
- <div class="cell api-table-content-cell api-table-content-cell-description">{{{this.description}}}</div>
17
- </div>
18
-
19
- {{#each this.parameters}}
20
- <div class="cell api-table-content-cell api-table-content-cell-bold api-table-param-name">{{this.name}}</div>
21
- <div class="cell api-table-event-param-cell api-table-content-cell api-table-content-cell-description"><strong class="bold" >type:</strong> {{this.type}} <br/> <strong class="api-table-event-description bold">description:</strong> {{{this.description}}}</div>
22
- {{/each}}
23
- {{/each}}
24
- </div>
25
- {{/if}}`
26
- };
@@ -1,40 +0,0 @@
1
- module.exports = {
2
- template: `
3
- {{#if properties}}
4
- <h3 class="comment-api-title" >Properties/Attributes</h3>
5
- <p class="small-space-top" >You can use both properties and attributes with the same effect. The name of each attribute is listed below the name of the property, if different.</p>
6
-
7
- <div class="small-space-top api-table">
8
- <div class="head api-table-header-roll">
9
- <div class="cell api-table-header-cell">Name</div>
10
- <div class="cell api-table-header-cell">Type</div>
11
- <div class="cell api-table-header-cell">Default Value</div>
12
- <div class="cell api-table-header-cell">Description</div>
13
- </div>
14
-
15
- {{#each properties}}
16
- <div class="row {{checkEven @index}}">
17
- <div class="cell api-table-content-cell api-table-content-cell-bold">
18
- {{this.name}}
19
- {{#if this.readonly}}
20
- (readonly)
21
- {{/if}}
22
- <br>
23
- {{#if (toKebabCase this.name)}}
24
- <code>{{toKebabCase this.name}}</code>
25
- {{/if}}
26
- </div>
27
- <div class="cell api-table-content-cell">{{this.type}}</div>
28
- <div class="cell api-table-content-cell">{{this.defaultValue}}</div>
29
- <div class="cell api-table-content-cell api-table-content-cell-description">
30
- {{{this.description}}}
31
- {{#if this.since}}
32
- <div class="api-table-content-cell-bold api-table-content-cell-since">since v{{{this.since}}}</div>
33
- {{/if}}
34
- </div>
35
- </div>
36
- {{/each}}
37
-
38
- </div>
39
- {{/if}}`
40
- };
@@ -1,28 +0,0 @@
1
- module.exports = {
2
- template: `
3
- {{#if slots}}
4
- <h3 class="comment-api-title space-top" >Slots</h3>
5
- <p class="small-space-top" >
6
- This Element provides slot(s). This means it can display its child nodes.<br>
7
- Unless targeting the default slot, use the <code>slot</code> attribute to define the destination slot for each child.<br>
8
- Text, along with HTML Elements with no <code>slot</code> attribute, goes the the <code>default</code> slot.
9
- </p>
10
-
11
- <div class="small-space-top api-table">
12
- <div class="head api-table-header-roll">
13
- <div class="cell api-table-header-cell">Slot</div>
14
- <div class="cell api-table-header-cell">Type</div>
15
- <div class="cell api-table-header-cell">Description</div>
16
- </div>
17
-
18
- {{#each slots}}
19
- <div class="row {{checkEven @index}}">
20
- <div class="cell api-table-content-cell api-table-content-cell-bold">{{this.name}}</div>
21
- <div class="cell api-table-content-cell">{{this.type}}</div>
22
- <div class="cell api-table-content-cell api-table-content-cell-description">{{{this.description}}}</div>
23
- </div>
24
- {{/each}}
25
-
26
- </div>
27
- {{/if}}`
28
- };
@@ -1,38 +0,0 @@
1
- module.exports = {
2
- template: `
3
- <div class="page-container">
4
- <div class="api-container">
5
- <section class="component-description">
6
- {{{description}}}
7
- <section class="component-api space-top">
8
- {{> properties this}}
9
- {{> slots this}}
10
- {{> events this}}
11
- {{> methods this}}
12
- {{> cssVariables this}}
13
- </section>
14
- </section>
15
- </div>
16
- </div>
17
- {{#each additionalDocs}}
18
- <div class="api-container appended-doc">
19
- <h1>{{this.basename}}</h1>
20
- <section class="component-description">
21
- {{{this.description}}}
22
- <section class="component-api space-top">
23
- {{> properties this}}
24
- {{> slots this}}
25
- {{> events this}}
26
- {{> cssVariables this}}
27
- </section>
28
- </section>
29
- </div>
30
- {{/each}}
31
- <footer class="footer-wrapper">
32
- <div class="footer-links">
33
- <a class="separator" href="https://www.sap.com/about/legal/privacy.html" target="_blank">Privacy Policy</a>
34
- <a href="https://www.sap.com/about/legal/impressum.html" target="_blank">Legal</a>
35
- </div>
36
- <img src="../../../../../../assets/images/sap-logo-svg.svg" alt="Sap Logo" />
37
- </footer>`
38
- };
@@ -1,54 +0,0 @@
1
- const esprima = require("esprima");
2
- const escodegen = require("escodegen");
3
-
4
- const fs = require("fs");
5
- const path = require("path");
6
- const glob = require("glob");
7
- const basePath = process.argv[2];
8
-
9
- const convertImports = (srcPath) => {
10
- let changed = false;
11
- // console.log("scanning imports of", srcPath);
12
- let code = fs.readFileSync(srcPath).toString();
13
- const tree = esprima.parseModule(code);
14
- const importer = srcPath.replace(basePath, "");
15
- const importerDir = path.dirname(importer);
16
- // console.log("-> ", importer);
17
- tree.body.forEach(node => {
18
- if (node.type === "ImportDeclaration") {
19
- let importee = node.source.value;
20
- if (importee.startsWith(".")) {
21
- // add .js extension if missing
22
- if (!importee.endsWith(".js")) {
23
- node.source.value += ".js"
24
- changed = true;
25
- }
26
- return;
27
- }
28
- let importeeDir = path.dirname(importee);
29
- let importeeFile = path.basename(importee);
30
- let relativePath = path.relative(importerDir, importeeDir);
31
- if (relativePath.length === 0) {
32
- relativePath = "."
33
- }
34
- if (!relativePath.startsWith(".")) {
35
- relativePath = "./" + relativePath;
36
- }
37
-
38
- relativePath = relativePath.replace(/\\/g, "/"); // the browser expects unix paths
39
- let relativeImport = `${relativePath}/${importeeFile}.js`;
40
- // console.log(importee + " --> " + relativeImport);
41
- node.source.value = relativeImport;
42
- changed = true;
43
- }
44
- });
45
-
46
- if (changed) {
47
- fs.writeFileSync(srcPath, escodegen.generate(tree));
48
- }
49
- }
50
-
51
- const fileNames = glob.sync(basePath + "**/*.js");
52
- // console.log(fileNames);
53
- fileNames.forEach(convertImports);
54
- console.log("Success: Converted absolute imports to relative for files in:", basePath)
@@ -1,10 +0,0 @@
1
- const config = {
2
- files: {
3
- exclude: ['serve.json']
4
- },
5
- folders: {
6
- exclude: ['resources']
7
- },
8
- };
9
-
10
- module.exports = config;
@@ -1,19 +0,0 @@
1
- const fs = require("fs");
2
- const path = require("path");
3
- const process = require("process");
4
- const { hashElement } = require("folder-hash");
5
- const config = require("./config.js");
6
-
7
- const inputDir = path.normalize(process.argv[2]);
8
- const outputFileName = path.normalize(process.argv[3]);
9
-
10
- const generateHash = async (inputDir, outputFileName) => {
11
- const result = await hashElement(inputDir, config);
12
- const hash = result.hash;
13
- fs.writeFileSync(outputFileName, hash);
14
- return hash;
15
- };
16
-
17
- generateHash(inputDir, outputFileName).then(hash => {
18
- console.log(`Generated hash: ${hash}`);
19
- });
@@ -1,31 +0,0 @@
1
- const fs = require("fs");
2
- const path = require("path");
3
- const process = require("process");
4
- const { hashElement } = require("folder-hash");
5
- const config = require("./config.js");
6
-
7
- const inputDir = path.normalize(process.argv[2]);
8
- const hashFileName = path.normalize(process.argv[3]);
9
-
10
- const isUpToDate = async (inputDir, hashFileName) => {
11
- // No dist/ directory or no hash file
12
- if (!fs.existsSync(inputDir) || !fs.existsSync(hashFileName)) {
13
- return false;
14
- }
15
-
16
- // Empty hash file
17
- const existingHash = `${fs.readFileSync(hashFileName)}`;
18
- if (!existingHash) {
19
- return false;
20
- }
21
-
22
- // Calculate the hash of the dist/ directory
23
- const result = await hashElement(inputDir, config);
24
- const newHash = result.hash;
25
-
26
- return newHash === existingHash;
27
- };
28
-
29
- isUpToDate(inputDir, hashFileName).then(upToDate => {
30
- process.exit(upToDate ? 0 : 1); // 0 means success (it is up to date), 1 means failure (must rebuild the dist/)
31
- });
@@ -1,136 +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 = 'my-first-component';
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.includes("-")) {
42
- console.log("tag name should contain at least one dash");
43
- process.exit(1);
44
- }
45
- if (tag.startsWith("ui5-")) {
46
- console.log("The ui5- prefix is reserved for the standard UI5 Web Components due to future possible name clashes.");
47
- process.exit(1);
48
- }
49
-
50
- const className = capitalizeFirst(kebabToCamelCase(tag));
51
-
52
- // All variables that will be replaced in the content of the resources/
53
- const vars = {
54
- INIT_PACKAGE_VAR_NAME: packageContent.name,
55
- INIT_PACKAGE_VAR_PORT: options.port || DEFAULT_PORT,
56
- INIT_PACKAGE_VAR_TAG: tag,
57
- INIT_PACKAGE_VAR_CLASS_NAME: className,
58
- };
59
- console.log(vars);
60
-
61
- const replaceVarsInFileContent = content => {
62
- for (let key in vars) {
63
- const re = new RegExp(key, "g");
64
- content = content.replace(re, vars[key]);
65
- }
66
- return content;
67
- };
68
-
69
- const replaceVarsInFileName = fileName => {
70
- return fileName.replace(/MyFirstComponent/, vars.INIT_PACKAGE_VAR_CLASS_NAME) ;
71
- };
72
-
73
- const copyFile = (sourcePath, destPath) => {
74
- let content = fs.readFileSync(sourcePath, {encoding: "UTF-8"});
75
- content = replaceVarsInFileContent(content);
76
- destPath = replaceVarsInFileName(destPath);
77
- fs.writeFileSync(destPath, content);
78
- console.log(destPath);
79
- };
80
-
81
- const copyResources = sourcePath => {
82
- const destPath = sourcePath.substr(RESOURCES_DIR.length);
83
- const isDir = fs.lstatSync(sourcePath).isDirectory();
84
- if (isDir) {
85
- if (destPath) {
86
- mkdirp.sync(destPath);
87
- console.log(destPath);
88
- }
89
- fs.readdirSync(sourcePath).forEach(file => {
90
- copyResources(path.join(sourcePath, file));
91
- });
92
- } else {
93
- copyFile(sourcePath, destPath);
94
- }
95
- };
96
-
97
- const updatePackageFile = () => {
98
- packageContent.scripts = {
99
- "clean": "wc-dev clean",
100
- "lint": "wc-dev lint",
101
- "start": "wc-dev start",
102
- "watch": "wc-dev watch",
103
- "serve": "wc-dev serve",
104
- "build": "wc-dev build",
105
- "test": "wc-dev test",
106
- "create-ui5-element": "wc-create-ui5-element",
107
- "prepublishOnly": "npm run build"
108
- };
109
-
110
- // make convinient exports (no dist in component path)
111
- // export the rest that is used directly or via require.resolve in scripts
112
- packageContent.exports = {
113
- "./.port": "./.port",
114
- "./src/*": "./src/*",
115
- "./dist/*": "./dist/*",
116
- "./package.json": "./package.json",
117
- "./bundle.esm.js": "./bundle.esm.js",
118
- "./bundle.es5.js": "./bundle.es5.js",
119
- "./bundle.common.js": "./bundle.common.js",
120
- "./*": "./dist/*"
121
- }
122
-
123
- packageContent.ui5 = {
124
- webComponentsPackage: true
125
- };
126
-
127
- fs.writeFileSync("package.json", beautify(packageContent, null, 2, 100));
128
- };
129
-
130
- // Copy files
131
- copyResources(RESOURCES_DIR);
132
-
133
- // Update package.json
134
- updatePackageFile();
135
-
136
- 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-ie11/dist/features/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,31 +0,0 @@
1
- // used in test pages
2
- import { renderFinished } from "@ui5/webcomponents-base/dist/Render.js";
3
-
4
- import { getAnimationMode } from "@ui5/webcomponents-base/dist/config/AnimationMode.js";
5
- import { getLanguage } from "@ui5/webcomponents-base/dist/config/Language.js";
6
- import { getCalendarType } from "@ui5/webcomponents-base/dist/config/CalendarType.js";
7
- import { getTheme, setTheme } from "@ui5/webcomponents-base/dist/config/Theme.js";
8
- import { getNoConflict, setNoConflict } from "@ui5/webcomponents-base/dist/config/NoConflict.js";
9
- import { getRTL } from "@ui5/webcomponents-base/dist/config/RTL.js";
10
- import { getFirstDayOfWeek } from "@ui5/webcomponents-base/dist/config/FormatSettings.js";
11
-
12
- // Enable additional themes and i18n texts
13
- import "./dist/Assets.js";
14
-
15
- // Import your web components here from the dist/ directory
16
- import "./dist/INIT_PACKAGE_VAR_CLASS_NAME.js";
17
-
18
- window["sap-ui-webcomponents-bundle"] = {
19
- renderFinished,
20
- configuration: {
21
- getAnimationMode,
22
- getLanguage,
23
- getTheme,
24
- setTheme,
25
- getNoConflict,
26
- setNoConflict,
27
- getCalendarType,
28
- getRTL,
29
- getFirstDayOfWeek,
30
- },
31
- };
@@ -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 sample 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(--my-component-border-color);
3
- background-color: var(--sapBackgroundColor);
4
- color: var(--sapTextColor);
5
- display: block;
6
- width: 24rem;
7
- height: 3rem;
8
- text-align: center;
9
- vertical-align: middle;
10
- line-height: 3rem;
11
- }
@@ -1,3 +0,0 @@
1
- :root {
2
- --my-component-border-color: lightblue;
3
- }
@@ -1,3 +0,0 @@
1
- :root {
2
- --my-component-border-color: black;
3
- }
@@ -1,3 +0,0 @@
1
- :root {
2
- --my-component-border-color: black;
3
- }
@@ -1,3 +0,0 @@
1
- :root {
2
- --my-component-border-color: green;
3
- }
@@ -1,3 +0,0 @@
1
- :root {
2
- --my-component-border-color: blue;
3
- }
@@ -1,3 +0,0 @@
1
- :root {
2
- --my-component-border-color: lightblue;
3
- }
@@ -1,3 +0,0 @@
1
- :root {
2
- --my-component-border-color: gray;
3
- }