@ui5/webcomponents-tools 0.0.0-c6d8872f3 → 0.0.0-c8721b8d2
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 +896 -1
- package/README.md +6 -6
- package/assets-meta.js +162 -0
- package/bin/dev.js +12 -1
- package/components-package/eslint.js +35 -0
- package/components-package/nps.js +118 -45
- package/components-package/postcss.components.js +1 -21
- package/components-package/postcss.themes.js +1 -23
- package/components-package/vite.config.js +13 -0
- package/components-package/wdio.js +405 -333
- package/components-package/wdio.sync.js +368 -0
- package/icons-collection/nps.js +71 -28
- package/lib/copy-and-watch/index.js +145 -0
- package/lib/copy-list/index.js +28 -0
- package/lib/create-icons/index.js +124 -54
- package/lib/create-illustrations/index.js +175 -0
- package/lib/create-new-component/index.js +72 -93
- package/lib/create-new-component/jsFileContentTemplate.js +73 -0
- package/lib/create-new-component/tsFileContentTemplate.js +80 -0
- package/lib/css-processors/css-processor-components.mjs +77 -0
- package/lib/css-processors/css-processor-themes.mjs +79 -0
- package/lib/css-processors/scope-variables.mjs +46 -0
- package/lib/css-processors/shared.mjs +76 -0
- package/lib/dev-server/custom-hot-update-plugin.js +39 -0
- package/lib/dev-server/dev-server.js +66 -0
- package/lib/dev-server/virtual-index-html-plugin.js +52 -0
- package/lib/esm-abs-to-rel/index.js +61 -0
- package/lib/generate-custom-elements-manifest/index.js +327 -0
- package/lib/generate-js-imports/illustrations.js +86 -0
- package/lib/generate-json-imports/i18n.js +103 -47
- package/lib/generate-json-imports/themes.js +76 -18
- package/lib/hbs2lit/index.js +2 -4
- package/lib/hbs2lit/src/compiler.js +30 -9
- package/lib/hbs2lit/src/includesReplacer.js +23 -17
- package/lib/hbs2lit/src/litVisitor2.js +125 -26
- package/lib/hbs2lit/src/svgProcessor.js +12 -5
- package/lib/hbs2ui5/RenderTemplates/LitRenderer.js +35 -7
- package/lib/hbs2ui5/index.js +69 -30
- package/lib/i18n/defaults.js +77 -50
- package/lib/i18n/toJSON.js +25 -13
- package/lib/jsdoc/config.json +1 -1
- package/lib/jsdoc/configTypescript.json +29 -0
- package/lib/jsdoc/plugin.js +65 -4
- package/lib/jsdoc/preprocess.js +146 -0
- package/lib/jsdoc/template/publish.js +32 -4
- package/lib/postcss-combine-duplicated-selectors/index.js +185 -0
- package/lib/replace-global-core/index.js +25 -0
- package/lib/scoping/get-all-tags.js +37 -0
- package/lib/scoping/lint-src.js +31 -0
- package/lib/scoping/missing-dependencies.js +65 -0
- package/lib/scoping/report-tags-usage.js +28 -0
- package/lib/scoping/scope-test-pages.js +41 -0
- package/lib/test-runner/test-runner.js +71 -0
- package/package.json +52 -55
- package/bin/init-ui5-package.js +0 -3
- package/components-package/rollup.js +0 -134
- package/components-package/serve.json +0 -3
- package/lib/documentation/index.js +0 -143
- 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 -40
- package/lib/documentation/templates/api-slots-section.js +0 -28
- package/lib/documentation/templates/template.js +0 -38
- package/lib/init-package/index.js +0 -119
- package/lib/init-package/resources/.eslintignore +0 -3
- package/lib/init-package/resources/bundle.es5.js +0 -25
- package/lib/init-package/resources/bundle.esm.js +0 -34
- package/lib/init-package/resources/config/.eslintrc.js +0 -1
- package/lib/init-package/resources/config/postcss.components/postcss.config.js +0 -1
- package/lib/init-package/resources/config/postcss.themes/postcss.config.js +0 -1
- package/lib/init-package/resources/config/rollup.config.js +0 -1
- package/lib/init-package/resources/config/wdio.conf.js +0 -1
- package/lib/init-package/resources/package-scripts.js +0 -11
- package/lib/init-package/resources/src/Assets.js +0 -6
- package/lib/init-package/resources/src/Demo.hbs +0 -1
- package/lib/init-package/resources/src/Demo.js +0 -56
- package/lib/init-package/resources/src/i18n/messagebundle.properties +0 -2
- package/lib/init-package/resources/src/i18n/messagebundle_de.properties +0 -1
- package/lib/init-package/resources/src/i18n/messagebundle_en.properties +0 -1
- package/lib/init-package/resources/src/i18n/messagebundle_es.properties +0 -1
- package/lib/init-package/resources/src/i18n/messagebundle_fr.properties +0 -1
- package/lib/init-package/resources/src/themes/Demo.css +0 -11
- package/lib/init-package/resources/src/themes/sap_belize/parameters-bundle.css +0 -3
- package/lib/init-package/resources/src/themes/sap_belize_hcb/parameters-bundle.css +0 -3
- package/lib/init-package/resources/src/themes/sap_belize_hcw/parameters-bundle.css +0 -3
- package/lib/init-package/resources/src/themes/sap_fiori_3/parameters-bundle.css +0 -3
- package/lib/init-package/resources/src/themes/sap_fiori_3_dark/parameters-bundle.css +0 -3
- package/lib/init-package/resources/test/pages/index.html +0 -51
- package/lib/init-package/resources/test/specs/Demo.spec.js +0 -12
- package/lib/postcss-css-to-esm/index.js +0 -33
- package/lib/postcss-css-to-json/index.js +0 -20
@@ -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,6 +0,0 @@
|
|
1
|
-
import "@ui5/webcomponents-localization/dist/Assets.js"; // CLDR
|
2
|
-
import "@ui5/webcomponents-theme-base/dist/Assets.js"; // Theming
|
3
|
-
|
4
|
-
// own INIT_PACKAGE_VAR_NAME package assets
|
5
|
-
import "./generated/json-imports/Themes.js";
|
6
|
-
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 +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,51 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
|
4
|
-
<head>
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
6
|
-
<meta charset="utf-8">
|
7
|
-
|
8
|
-
<title>INIT_PACKAGE_VAR_TAG</title>
|
9
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
10
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
11
|
-
<meta charset="utf-8">
|
12
|
-
|
13
|
-
<script data-ui5-config type="application/json">
|
14
|
-
{
|
15
|
-
"language": "EN"
|
16
|
-
}
|
17
|
-
</script>
|
18
|
-
|
19
|
-
<script src="../../webcomponentsjs/webcomponents-loader.js"></script>
|
20
|
-
<script src="../../resources/bundle.esm.js" type="module"></script>
|
21
|
-
<script nomodule src="../../resources/bundle.es5.js"></script>
|
22
|
-
|
23
|
-
<style>
|
24
|
-
code { color: blue; font-size: small; }
|
25
|
-
</style>
|
26
|
-
|
27
|
-
</head>
|
28
|
-
|
29
|
-
<body>
|
30
|
-
<a href="?sap-ui-theme=sap_fiori_3">Fiori 3</a> |
|
31
|
-
<a href="?sap-ui-theme=sap_fiori_3_dark">Fiori 3 Dark</a> |
|
32
|
-
<a href="?sap-ui-theme=sap_belize">Belize</a> |
|
33
|
-
<a href="?sap-ui-theme=sap_belize_hcb">Belize High Contrast Black</a>
|
34
|
-
<br>
|
35
|
-
<span>or in the browser console, for example:</span>
|
36
|
-
<code>window['sap-ui-webcomponents-bundle'].configuration.setTheme("sap_belize_hcb")</code>
|
37
|
-
|
38
|
-
<br><br>
|
39
|
-
|
40
|
-
<a href="?sap-ui-language=en">English</a> |
|
41
|
-
<a href="?sap-ui-language=de">German</a> |
|
42
|
-
<a href="?sap-ui-language=es">Spanish</a> |
|
43
|
-
<a href="?sap-ui-language=fr">French</a>
|
44
|
-
|
45
|
-
<br><br>
|
46
|
-
|
47
|
-
<h1>Test your web components here</h1>
|
48
|
-
<INIT_PACKAGE_VAR_TAG id="myFirstComponent"></INIT_PACKAGE_VAR_TAG>
|
49
|
-
</body>
|
50
|
-
|
51
|
-
</html>
|
@@ -1,12 +0,0 @@
|
|
1
|
-
const assert = require("assert");
|
2
|
-
|
3
|
-
describe("INIT_PACKAGE_VAR_TAG rendering", () => {
|
4
|
-
browser.url("http://localhost:INIT_PACKAGE_VAR_PORT/test-resources/pages/index.html");
|
5
|
-
|
6
|
-
it("tests if web component is correctly rendered", () => {
|
7
|
-
|
8
|
-
const innerContent = browser.$("#myFirstComponent").shadow$("div");
|
9
|
-
|
10
|
-
assert.ok(innerContent, "content rendered");
|
11
|
-
});
|
12
|
-
});
|
@@ -1,33 +0,0 @@
|
|
1
|
-
const postcss = require('postcss');
|
2
|
-
const fs = require('fs');
|
3
|
-
const path = require('path');
|
4
|
-
const mkdirp = require('mkdirp');
|
5
|
-
|
6
|
-
const getDefaultThemeCode = packageName => {
|
7
|
-
return `import "@ui5/webcomponents-theme-base/dist/DefaultTheme.js";
|
8
|
-
|
9
|
-
import { registerThemeProperties } from "@ui5/webcomponents-base/dist/asset-registries/Themes.js";
|
10
|
-
|
11
|
-
import fiori3 from "./sap_fiori_3/parameters-bundle.css.js";
|
12
|
-
|
13
|
-
registerThemeProperties("${packageName}", "sap_fiori_3", fiori3);
|
14
|
-
|
15
|
-
`;
|
16
|
-
};
|
17
|
-
|
18
|
-
module.exports = postcss.plugin('add css to esm transform plugin', function (opts) {
|
19
|
-
opts = opts || {};
|
20
|
-
|
21
|
-
return function (root) {
|
22
|
-
const css = JSON.stringify(root.toString());
|
23
|
-
const targetFile = root.source.input.from.replace(`/${opts.toReplace}/`, "/dist/generated/").replace(`\\${opts.toReplace}\\`, "\\dist\\generated\\");
|
24
|
-
|
25
|
-
mkdirp.sync(path.dirname(targetFile));
|
26
|
-
|
27
|
-
const filePath = `${targetFile}.js`;
|
28
|
-
|
29
|
-
const defaultTheme = opts.includeDefaultTheme ? getDefaultThemeCode(opts.packageName) : ``;
|
30
|
-
|
31
|
-
fs.writeFileSync(filePath, `${defaultTheme}export default ${css};`);
|
32
|
-
}
|
33
|
-
});
|
@@ -1,20 +0,0 @@
|
|
1
|
-
const postcss = require('postcss');
|
2
|
-
const fs = require('fs');
|
3
|
-
const path = require('path');
|
4
|
-
const mkdirp = require('mkdirp');
|
5
|
-
|
6
|
-
module.exports = postcss.plugin('add css to JSON transform plugin', function (opts) {
|
7
|
-
opts = opts || {};
|
8
|
-
|
9
|
-
return function (root) {
|
10
|
-
const css = root.toString();
|
11
|
-
const targetFile = root.source.input.from.replace(`/${opts.toReplace}/`, "/dist/generated/assets/").replace(`\\${opts.toReplace}\\`, "\\dist\\generated\\assets\\");
|
12
|
-
|
13
|
-
mkdirp.sync(path.dirname(targetFile));
|
14
|
-
|
15
|
-
const filePath = `${targetFile}.json`;
|
16
|
-
|
17
|
-
fs.writeFileSync(filePath, JSON.stringify({_: css}));
|
18
|
-
|
19
|
-
}
|
20
|
-
});
|