@ui5/webcomponents-tools 0.0.0-453158269 → 0.0.0-47cc17a26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2086 -0
- package/LICENSE.txt +201 -0
- package/README.md +7 -10
- package/assets-meta.js +12 -11
- package/bin/dev.js +3 -6
- package/bin/ui5nps.js +265 -0
- package/components-package/eslint.js +66 -2
- package/components-package/nps.js +148 -69
- package/components-package/postcss.components.js +1 -21
- package/components-package/postcss.themes.js +1 -26
- package/components-package/vite.config.js +9 -0
- package/components-package/wdio.js +69 -17
- package/icons-collection/nps.js +32 -18
- package/lib/amd-to-es6/index.js +107 -0
- package/lib/amd-to-es6/no-remaining-require.js +33 -0
- package/lib/cem/cem.js +12 -0
- package/lib/cem/custom-elements-manifest.config.mjs +530 -0
- package/lib/cem/event.mjs +168 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/cli.js +128 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/package.json +59 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/browser-entrypoint.js +23 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/create.js +117 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/arrow-function.js +26 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/class-jsdoc.js +157 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/classes.js +20 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/createArrowFunction.js +17 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/createAttribute.js +24 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/createClass.js +301 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/createClassField.js +26 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/createFunctionLike.js +73 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/createMixin.js +33 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/createVariable.js +22 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/handlers.js +338 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/custom-elements-define-calls.js +90 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/exports.js +156 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/function-like.js +24 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/mixins.js +29 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/reexported-wrapped-mixin-exports.js +84 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/variables.js +34 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/collect-phase/collect-imports.js +101 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/catalyst/catalyst.js +11 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/catalyst/controller.js +34 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/catalyst-major-2/catalyst.js +11 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/catalyst-major-2/controller.js +34 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/decorators/attr.js +53 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/decorators/custom-element-decorator.js +36 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/fast/fast.js +7 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/lit/lit.js +13 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/lit/member-denylist.js +21 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/lit/method-denylist.js +20 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/lit/property-decorator.js +94 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/lit/static-properties.js +121 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/lit/utils.js +66 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/stencil/stencil.js +129 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/index.js +80 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/link-phase/cleanup-classes.js +25 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/link-phase/field-denylist.js +22 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/link-phase/method-denylist.js +25 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/post-processing/apply-inheritance.js +78 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/post-processing/is-custom-element.js +34 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/post-processing/link-class-to-tagname.js +27 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/post-processing/remove-unexported-declarations.js +23 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/post-processing/resolve-initializers.js +52 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/utils/ast-helpers.js +186 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/utils/cli-helpers.js +164 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/utils/exports.js +44 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/utils/find-external-manifests.js +67 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/utils/imports.js +25 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/utils/index.js +71 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/utils/jsdoc.js +19 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/utils/manifest-helpers.js +194 -0
- package/lib/cem/patch/@custom-elements-manifest/analyzer/src/utils/mixins.js +112 -0
- package/lib/cem/schema-internal.json +1422 -0
- package/lib/cem/schema.json +1098 -0
- package/lib/cem/types-internal.d.ts +808 -0
- package/lib/cem/types.d.ts +736 -0
- package/lib/cem/utils.mjs +423 -0
- package/lib/cem/validate.js +76 -0
- package/lib/copy-and-watch/index.js +105 -97
- package/lib/copy-list/index.js +16 -10
- package/lib/create-icons/index.js +74 -25
- package/lib/create-illustrations/index.js +88 -45
- package/lib/create-new-component/Component.js +74 -0
- package/lib/create-new-component/ComponentTemplate.js +12 -0
- package/lib/create-new-component/index.js +62 -101
- package/lib/css-processors/css-processor-components.mjs +92 -0
- package/lib/css-processors/css-processor-themes.mjs +102 -0
- package/lib/css-processors/scope-variables.mjs +49 -0
- package/lib/css-processors/shared.mjs +46 -0
- package/lib/dev-server/custom-hot-update-plugin.js +39 -0
- package/lib/dev-server/dev-server.mjs +78 -0
- package/lib/dev-server/virtual-index-html-plugin.js +56 -0
- package/lib/generate-js-imports/illustrations.js +85 -0
- package/lib/generate-json-imports/i18n.js +62 -69
- package/lib/generate-json-imports/themes.js +34 -43
- package/lib/hbs2lit/src/compiler.js +16 -5
- package/lib/hbs2lit/src/litVisitor2.js +85 -22
- package/lib/hbs2lit/src/svgProcessor.js +12 -5
- package/lib/hbs2ui5/RenderTemplates/LitRenderer.js +39 -6
- package/lib/hbs2ui5/index.js +23 -6
- package/lib/i18n/defaults.js +30 -8
- package/lib/i18n/toJSON.js +15 -11
- package/lib/icons-hash/icons-hash.mjs +149 -0
- package/lib/postcss-combine-duplicated-selectors/index.js +12 -5
- package/lib/remove-dev-mode/remove-dev-mode.mjs +51 -0
- package/lib/rimraf/rimraf.js +31 -0
- package/lib/scoping/get-all-tags.js +11 -11
- package/lib/scoping/lint-src.js +8 -7
- package/lib/scoping/scope-test-pages.js +2 -1
- package/lib/test-runner/test-runner.js +71 -0
- package/package.json +45 -33
- package/tsconfig.json +18 -0
- package/components-package/rollup-plugins/empty-module.js +0 -15
- package/components-package/rollup.js +0 -150
- package/components-package/wdio.sync.js +0 -360
- package/lib/documentation/index.js +0 -168
- package/lib/documentation/templates/api-component-since.js +0 -3
- package/lib/documentation/templates/api-css-variables-section.js +0 -24
- package/lib/documentation/templates/api-events-section.js +0 -35
- package/lib/documentation/templates/api-methods-section.js +0 -26
- package/lib/documentation/templates/api-properties-section.js +0 -42
- package/lib/documentation/templates/api-slots-section.js +0 -28
- package/lib/documentation/templates/template.js +0 -39
- package/lib/esm-abs-to-rel/index.js +0 -58
- package/lib/jsdoc/config.json +0 -29
- package/lib/jsdoc/plugin.js +0 -2436
- package/lib/jsdoc/template/publish.js +0 -4112
- package/lib/postcss-css-to-esm/index.js +0 -45
- package/lib/postcss-css-to-json/index.js +0 -36
- package/lib/postcss-new-files/index.js +0 -36
- package/lib/postcss-p/postcss-p.mjs +0 -11
- package/lib/replace-global-core/index.js +0 -25
- package/lib/serve/index.js +0 -46
- package/lib/serve/serve.json +0 -3
- package/package-lock.json +0 -48
|
@@ -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,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,58 +0,0 @@
|
|
|
1
|
-
const esprima = require("esprima");
|
|
2
|
-
const escodegen = require("escodegen");
|
|
3
|
-
|
|
4
|
-
const fs = require("fs").promises;
|
|
5
|
-
const path = require("path");
|
|
6
|
-
const basePath = process.argv[2];
|
|
7
|
-
|
|
8
|
-
const convertImports = async (srcPath) => {
|
|
9
|
-
let changed = false;
|
|
10
|
-
// console.log("scanning imports of", srcPath);
|
|
11
|
-
let code = (await fs.readFile(srcPath)).toString();
|
|
12
|
-
const tree = esprima.parseModule(code);
|
|
13
|
-
const importer = srcPath.replace(basePath, "");
|
|
14
|
-
const importerDir = path.dirname(importer);
|
|
15
|
-
// console.log("-> ", importer);
|
|
16
|
-
tree.body.forEach(node => {
|
|
17
|
-
if (node.type === "ImportDeclaration") {
|
|
18
|
-
let importee = node.source.value;
|
|
19
|
-
if (importee.startsWith(".")) {
|
|
20
|
-
// add .js extension if missing
|
|
21
|
-
if (!importee.endsWith(".js")) {
|
|
22
|
-
node.source.value += ".js"
|
|
23
|
-
changed = true;
|
|
24
|
-
}
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
let importeeDir = path.dirname(importee);
|
|
28
|
-
let importeeFile = path.basename(importee);
|
|
29
|
-
let relativePath = path.relative(importerDir, importeeDir);
|
|
30
|
-
if (relativePath.length === 0) {
|
|
31
|
-
relativePath = "."
|
|
32
|
-
}
|
|
33
|
-
if (!relativePath.startsWith(".")) {
|
|
34
|
-
relativePath = "./" + relativePath;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
relativePath = relativePath.replace(/\\/g, "/"); // the browser expects unix paths
|
|
38
|
-
let relativeImport = `${relativePath}/${importeeFile}.js`;
|
|
39
|
-
// console.log(importee + " --> " + relativeImport);
|
|
40
|
-
node.source.value = relativeImport;
|
|
41
|
-
changed = true;
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
if (changed) {
|
|
46
|
-
return fs.writeFile(srcPath, escodegen.generate(tree));
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const generate = async () => {
|
|
51
|
-
const { globby } = await import("globby");
|
|
52
|
-
const fileNames = await globby(basePath + "**/*.js");
|
|
53
|
-
return Promise.all(fileNames.map(convertImports).filter(x => !!x));
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
generate().then(() => {
|
|
57
|
-
console.log("Success: Converted absolute imports to relative for files in:", basePath);
|
|
58
|
-
});
|
package/lib/jsdoc/config.json
DELETED
|
@@ -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
|
-
}
|