@ui5/create-webcomponents-package 0.0.0-0a35d6b3d
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 +674 -0
- package/README.md +60 -0
- package/create-package.js +271 -0
- package/package.json +27 -0
- package/template/.eslintignore +6 -0
- package/template/.eslintrc.js +5 -0
- package/template/bundle.esm.js +31 -0
- package/template/config/wdio.conf.js +1 -0
- package/template/gitignore +4 -0
- package/template/npmrc +2 -0
- package/template/package-scripts.js +12 -0
- package/template/src/Assets.js +5 -0
- package/template/src/Assets.ts +5 -0
- package/template/src/MyFirstComponent.hbs +1 -0
- package/template/src/MyFirstComponent.js +82 -0
- package/template/src/MyFirstComponent.ts +63 -0
- package/template/src/i18n/messagebundle.properties +3 -0
- package/template/src/i18n/messagebundle_de.properties +1 -0
- package/template/src/i18n/messagebundle_en.properties +1 -0
- package/template/src/i18n/messagebundle_es.properties +1 -0
- package/template/src/i18n/messagebundle_fr.properties +1 -0
- package/template/src/themes/MyFirstComponent.css +16 -0
- package/template/src/themes/sap_fiori_3/parameters-bundle.css +3 -0
- package/template/src/themes/sap_horizon/parameters-bundle.css +3 -0
- package/template/src/themes/sap_horizon_dark/parameters-bundle.css +3 -0
- package/template/src/themes/sap_horizon_hcb/parameters-bundle.css +3 -0
- package/template/src/themes/sap_horizon_hcw/parameters-bundle.css +3 -0
- package/template/test/pages/css/index.css +36 -0
- package/template/test/pages/img/logo.png +0 -0
- package/template/test/pages/index.html +57 -0
- package/template/test/specs/Demo.spec.js +13 -0
- package/template/tsconfig.json +15 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
body {
|
|
2
|
+
color: var(--sapTextColor);
|
|
3
|
+
background-color: var(--sapBackgroundColor);
|
|
4
|
+
font-size: var(--sapFontSize);
|
|
5
|
+
font-family: var(--sapFontFamily);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
h1 {
|
|
9
|
+
font-size: var(--sapFontHeader2Size);
|
|
10
|
+
margin-bottom: 0.5rem;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
h2 {
|
|
14
|
+
font-size: var(--sapFontHeader3Size);
|
|
15
|
+
margin-bottom: 0.5rem;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.app, .app-settings, .app-docs, .app-first-component {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.app-first-component {
|
|
26
|
+
margin-bottom: 3rem;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.app-docs {
|
|
30
|
+
margin-top: 3rem;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
a {
|
|
34
|
+
margin: 0.25rem;
|
|
35
|
+
color: var(--sapLinkColor);
|
|
36
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
|
|
7
|
+
<title>INIT_PACKAGE_VAR_TAG</title>
|
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
+
<meta charset="utf-8">
|
|
10
|
+
|
|
11
|
+
<script data-ui5-config type="application/json">
|
|
12
|
+
{
|
|
13
|
+
"theme": "sap_horizon_dark",
|
|
14
|
+
"language": "EN"
|
|
15
|
+
}
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<link rel="stylesheet" type="text/css" href="./css/index.css">
|
|
19
|
+
<script src="%VITE_BUNDLE_PATH%" type="module"></script>
|
|
20
|
+
</head>
|
|
21
|
+
|
|
22
|
+
<body>
|
|
23
|
+
<div class="app">
|
|
24
|
+
<a href="https://sap.github.io/ui5-webcomponents/playground/?path=/docs/docs-getting-started-first-steps--docs" target="_blank"><img src="./img/logo.png" alt="logo"/></a>
|
|
25
|
+
|
|
26
|
+
<div class="app-first-component">
|
|
27
|
+
<h1>Hooray! It's Your First Web Component!</h1>
|
|
28
|
+
<div> <pre><INIT_PACKAGE_VAR_TAG></INIT_PACKAGE_VAR_TAG> </pre></div>
|
|
29
|
+
<INIT_PACKAGE_VAR_TAG id="myFirstComponent"></INIT_PACKAGE_VAR_TAG>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<div class="app-settings">
|
|
33
|
+
|
|
34
|
+
<h2>Switch themes</h2>
|
|
35
|
+
<div style="display: flex; flex-direction: row;">
|
|
36
|
+
<a class="link" href="?sap-ui-theme=sap_horizon">Horizon</a>
|
|
37
|
+
<a class="link" href="?sap-ui-theme=sap_horizon_dark">Horizon Dark</a>
|
|
38
|
+
<a class="link" href="?sap-ui-theme=sap_horizon_hcb">Horizon High Contrast Black</a>
|
|
39
|
+
<a class="link" href="?sap-ui-theme=sap_horizon_hcw">Horizon High Contrast White</a>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<h2>Switch language</h2>
|
|
43
|
+
<div>
|
|
44
|
+
<a class="link" href="?sap-ui-language=en">English</a>
|
|
45
|
+
<a class="link" href="?sap-ui-language=de">German</a>
|
|
46
|
+
<a class="link" href="?sap-ui-language=es">Spanish</a>
|
|
47
|
+
<a class="link" href="?sap-ui-language=fr">French</a>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div class="app-docs">
|
|
52
|
+
<h2>Documentation</h2>
|
|
53
|
+
<a class="link" href="https://sap.github.io/ui5-webcomponents/playground/?path=/docs/docs-development-custom-ui5-web-components-packages--docs">Custom Component Development</a>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</body>
|
|
57
|
+
</html>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const assert = require("assert");
|
|
2
|
+
|
|
3
|
+
describe("INIT_PACKAGE_VAR_TAG rendering", async () => {
|
|
4
|
+
before(async () => {
|
|
5
|
+
await browser.url("test/pages/index.html");
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
it("tests if web component is correctly rendered", async () => {
|
|
9
|
+
const innerContent = await browser.$("#myFirstComponent").shadow$("div");
|
|
10
|
+
|
|
11
|
+
assert.ok(innerContent, "content rendered");
|
|
12
|
+
});
|
|
13
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"include": ["src/**/*", "global.d.ts"],
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"target": "ES2021",
|
|
5
|
+
// Generate d.ts files
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"outDir": "dist",
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"inlineSources": true,
|
|
11
|
+
"strict": true,
|
|
12
|
+
"moduleResolution": "node",
|
|
13
|
+
"experimentalDecorators": true,
|
|
14
|
+
},
|
|
15
|
+
}
|