@ui5/webcomponents-tools 0.0.0-35e2c9666 → 0.0.0-37338d49d

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 (87) hide show
  1. package/CHANGELOG.md +1619 -0
  2. package/README.md +6 -9
  3. package/assets-meta.js +15 -10
  4. package/bin/dev.js +1 -5
  5. package/components-package/cypress/support/commands.js +39 -0
  6. package/components-package/cypress/support/component-index.html +17 -0
  7. package/components-package/cypress/support/component.d.ts +23 -0
  8. package/components-package/cypress/support/component.js +34 -0
  9. package/components-package/cypress.config.js +19 -0
  10. package/components-package/eslint.js +101 -2
  11. package/components-package/nps.js +109 -72
  12. package/components-package/postcss.components.js +1 -21
  13. package/components-package/postcss.themes.js +1 -26
  14. package/components-package/vite.config.js +13 -0
  15. package/components-package/wdio.js +61 -15
  16. package/icons-collection/nps.js +13 -14
  17. package/lib/amd-to-es6/index.js +102 -0
  18. package/lib/amd-to-es6/no-remaining-require.js +33 -0
  19. package/lib/cem/custom-elements-manifest.config.mjs +544 -0
  20. package/lib/cem/event.mjs +168 -0
  21. package/lib/cem/schema-internal.json +1413 -0
  22. package/lib/cem/schema.json +1098 -0
  23. package/lib/cem/types-internal.d.ts +808 -0
  24. package/lib/cem/types.d.ts +736 -0
  25. package/lib/cem/utils.mjs +413 -0
  26. package/lib/cem/validate.js +70 -0
  27. package/lib/copy-and-watch/index.js +24 -1
  28. package/lib/copy-list/index.js +17 -17
  29. package/lib/create-icons/index.js +126 -72
  30. package/lib/create-illustrations/index.js +143 -111
  31. package/lib/create-new-component/Component.js +74 -0
  32. package/lib/create-new-component/ComponentTemplate.js +12 -0
  33. package/lib/create-new-component/index.js +60 -101
  34. package/lib/css-processors/css-processor-components.mjs +77 -0
  35. package/lib/css-processors/css-processor-themes.mjs +74 -0
  36. package/lib/css-processors/scope-variables.mjs +49 -0
  37. package/lib/css-processors/shared.mjs +56 -0
  38. package/lib/dev-server/custom-hot-update-plugin.js +39 -0
  39. package/lib/dev-server/dev-server.mjs +66 -0
  40. package/lib/dev-server/virtual-index-html-plugin.js +52 -0
  41. package/lib/generate-js-imports/illustrations.js +86 -0
  42. package/lib/generate-json-imports/i18n.js +58 -67
  43. package/lib/generate-json-imports/themes.js +36 -46
  44. package/lib/hbs2lit/src/compiler.js +24 -4
  45. package/lib/hbs2lit/src/includesReplacer.js +5 -5
  46. package/lib/hbs2lit/src/litVisitor2.js +85 -22
  47. package/lib/hbs2lit/src/svgProcessor.js +12 -5
  48. package/lib/hbs2ui5/RenderTemplates/LitRenderer.js +39 -6
  49. package/lib/hbs2ui5/index.js +57 -24
  50. package/lib/i18n/defaults.js +66 -57
  51. package/lib/i18n/toJSON.js +12 -11
  52. package/lib/postcss-combine-duplicated-selectors/index.js +185 -0
  53. package/lib/remove-dev-mode/remove-dev-mode.mjs +37 -0
  54. package/lib/scoping/get-all-tags.js +11 -11
  55. package/lib/scoping/lint-src.js +8 -7
  56. package/lib/scoping/scope-test-pages.js +2 -1
  57. package/lib/test-runner/test-runner.js +71 -0
  58. package/package.json +39 -32
  59. package/tsconfig.json +18 -0
  60. package/types/index.d.ts +1 -0
  61. package/components-package/rollup-plugins/empty-module.js +0 -15
  62. package/components-package/rollup.js +0 -239
  63. package/components-package/wdio.sync.js +0 -360
  64. package/lib/documentation/index.js +0 -165
  65. package/lib/documentation/templates/api-component-since.js +0 -3
  66. package/lib/documentation/templates/api-css-variables-section.js +0 -24
  67. package/lib/documentation/templates/api-events-section.js +0 -35
  68. package/lib/documentation/templates/api-methods-section.js +0 -26
  69. package/lib/documentation/templates/api-properties-section.js +0 -42
  70. package/lib/documentation/templates/api-slots-section.js +0 -28
  71. package/lib/documentation/templates/template.js +0 -39
  72. package/lib/esm-abs-to-rel/index.js +0 -54
  73. package/lib/hash/config.js +0 -10
  74. package/lib/hash/generate.js +0 -19
  75. package/lib/hash/upToDate.js +0 -31
  76. package/lib/jsdoc/config.json +0 -29
  77. package/lib/jsdoc/plugin.js +0 -2436
  78. package/lib/jsdoc/template/publish.js +0 -4112
  79. package/lib/polyfill-placeholder/index.js +0 -5
  80. package/lib/postcss-css-to-esm/index.js +0 -45
  81. package/lib/postcss-css-to-json/index.js +0 -36
  82. package/lib/postcss-new-files/index.js +0 -36
  83. package/lib/postcss-p/postcss-p.mjs +0 -11
  84. package/lib/replace-global-core/index.js +0 -20
  85. package/lib/serve/index.js +0 -46
  86. package/lib/serve/serve.json +0 -3
  87. package/package-lock.json +0 -48
@@ -1,39 +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
- {{> methods this}}
27
- {{> cssVariables this}}
28
- </section>
29
- </section>
30
- </div>
31
- {{/each}}
32
- <footer class="footer-wrapper">
33
- <div class="footer-links">
34
- <a class="separator" href="https://www.sap.com/about/legal/privacy.html" target="_blank">Privacy Policy</a>
35
- <a href="https://www.sap.com/about/legal/impressum.html" target="_blank">Legal</a>
36
- </div>
37
- <img src="../../../assets/images/sap-logo-svg.svg" alt="Sap Logo" />
38
- </footer>`
39
- };
@@ -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,29 +0,0 @@
1
- {
2
- "source": {
3
- "include": "src",
4
- "excludePattern": "(/|\\\\)library-all\\.js|(/|\\\\).*-preload\\.js|^jquery-.*\\.js|^sap-.*\\.js|.+Renderer\\.lit\\.js|.*library\\.js|thirdparty"
5
- },
6
- "opts" : {
7
- "recurse": true,
8
- "template" : "template",
9
- "destination": ""
10
- },
11
- "plugins": [
12
- "./plugin.js"
13
- ],
14
- "templates" : {
15
- "ui5" : {
16
- "variants": [
17
- "apijson"
18
- ],
19
- "version": "1.62",
20
- "apiJsonFolder": "",
21
- "apiJsonFile": "dist/api.json",
22
- "includeSettingsInConstructor": false
23
- }
24
- },
25
- "tags": {
26
- "allowUnknownTags": true,
27
- "dictionaries": ["jsdoc"]
28
- }
29
- }