@ui5/create-webcomponents-package 0.0.0-b0b835975 → 0.0.0-b132dd7b9

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 (37) hide show
  1. package/CHANGELOG.md +1171 -0
  2. package/README.md +9 -15
  3. package/create-package.js +173 -208
  4. package/package.json +4 -1
  5. package/template/.eslintignore +3 -2
  6. package/template/.npsrc.json +3 -0
  7. package/template/cypress/component/MyFirstComponent.cy.tsx +13 -0
  8. package/template/cypress/fixtures/example.json +5 -0
  9. package/template/cypress/support/commands.ts +37 -0
  10. package/template/cypress/support/component-index.html +12 -0
  11. package/template/cypress/support/component.ts +36 -0
  12. package/template/cypress/tsconfig.template.json +19 -0
  13. package/template/cypress.config.ts +10 -0
  14. package/template/env +1 -0
  15. package/template/gitignore +2 -2
  16. package/template/{package-scripts.js → package-scripts.cjs} +0 -1
  17. package/template/package.json +35 -0
  18. package/template/src/Assets.ts +1 -1
  19. package/template/src/MyFirstComponent.ts +18 -25
  20. package/template/src/MyFirstComponentTemplate.tsx +9 -0
  21. package/template/{bundle.esm.js → src/bundle.esm.ts} +4 -5
  22. package/template/src/themes/MyFirstComponent.css +2 -1
  23. package/template/test/pages/css/index.css +65 -12
  24. package/template/test/pages/img/logo.png +0 -0
  25. package/template/test/pages/index.html +36 -40
  26. package/template/tsconfig.template.json +14 -0
  27. package/template/vite.config.js +14 -0
  28. package/template/config/postcss.components/postcss.config.js +0 -1
  29. package/template/config/postcss.themes/postcss.config.js +0 -1
  30. package/template/config/wdio.conf.js +0 -1
  31. package/template/src/Assets.js +0 -5
  32. package/template/src/MyFirstComponent.hbs +0 -1
  33. package/template/src/MyFirstComponent.js +0 -82
  34. package/template/src/themes/sap_fiori_3/parameters-bundle.css +0 -3
  35. package/template/test/specs/Demo.spec.js +0 -13
  36. package/template/tsconfig.json +0 -15
  37. /package/template/{.eslintrc.js → .eslintrc.cjs} +0 -0
@@ -0,0 +1,19 @@
1
+ {
2
+ "include": [
3
+ "./**/*"
4
+ ],
5
+ "compilerOptions": {
6
+ "module": "NodeNext",
7
+ "moduleResolution": "nodenext",
8
+ "jsx": "react-jsx",
9
+ "jsxImportSource": "@ui5/webcomponents-base",
10
+ "types": [
11
+ "cypress"
12
+ ]
13
+ },
14
+ "references": [
15
+ {
16
+ "path": "../"
17
+ }
18
+ ]
19
+ }
@@ -0,0 +1,10 @@
1
+ import { defineConfig } from "cypress";
2
+
3
+ export default defineConfig({
4
+ component: {
5
+ devServer: {
6
+ framework: "@ui5/cypress-ct-ui5-webc" as any,
7
+ bundler: "vite",
8
+ },
9
+ },
10
+ });
package/template/env ADDED
@@ -0,0 +1 @@
1
+ VITE_BUNDLE_PATH="../../dist/bundle.esm.js"
@@ -1,4 +1,4 @@
1
1
  node_modules
2
2
  dist
3
- jsdoc-dist
4
- src/generated
3
+ src/generated
4
+ .dev-server-port
@@ -2,7 +2,6 @@ const getScripts = require("@ui5/webcomponents-tools/components-package/nps.js")
2
2
 
3
3
  const options = {
4
4
  port: 8080,
5
- typescript: INIT_PACKAGE_VAR_TYPESCRIPT,
6
5
  };
7
6
 
8
7
  const scripts = getScripts(options);
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "{{INIT_PACKAGE_VAR_NAME}}",
3
+ "version": "0.0.1",
4
+ "ui5": {
5
+ "webComponentsPackage": true
6
+ },
7
+ "type": "module",
8
+ "scripts": {
9
+ "clean": "wc-dev clean",
10
+ "lint": "wc-dev lint",
11
+ "start": "wc-dev start",
12
+ "watch": "wc-dev watch",
13
+ "build": "wc-dev build",
14
+ {{INIT_PACKAGE_CYPRESS_TEST_COMMANDS}}
15
+ "create-ui5-element": "wc-create-ui5-element",
16
+ "prepublishOnly": "npm run build"
17
+ },
18
+ "exports": {
19
+ "./src/*": "./src/*",
20
+ "./dist/*": "./dist/*",
21
+ "./package.json": "./package.json",
22
+ "./bundle.js": "./bundle.js",
23
+ "./*": "./dist/*"
24
+ },
25
+ "dependencies": {
26
+ "@ui5/webcomponents-base": "{{INIT_PACKAGE_VERSION}}",
27
+ "@ui5/webcomponents-theming": "{{INIT_PACKAGE_VERSION}}"
28
+ },
29
+ "devDependencies": {
30
+ {{INIT_PACKAGE_CYPRESS_DEV_DEPS}}
31
+ "@ui5/webcomponents-tools": "{{INIT_PACKAGE_VERSION}}",
32
+ "chromedriver": "*",
33
+ "typescript": "^5.6.2"
34
+ }
35
+ }
@@ -1,5 +1,5 @@
1
1
  import "@ui5/webcomponents-theming/dist/Assets.js"; // Theming
2
2
 
3
- // own INIT_PACKAGE_VAR_NAME package assets
3
+ // own {{INIT_PACKAGE_VAR_NAME}} package assets
4
4
  import "./generated/json-imports/Themes.js";
5
5
  import "./generated/json-imports/i18n.js";
@@ -1,16 +1,15 @@
1
1
  import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
2
2
  import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
3
3
  import property from "@ui5/webcomponents-base/dist/decorators/property.js";
4
- import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
5
- import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
4
+ import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
5
+ import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
6
6
  import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
7
- import Integer from "@ui5/webcomponents-base/dist/types/Integer.js";
8
7
 
9
8
  // Template
10
- import INIT_PACKAGE_VAR_CLASS_NAMETemplate from "./generated/templates/INIT_PACKAGE_VAR_CLASS_NAMETemplate.lit.js";
9
+ import {{INIT_PACKAGE_VAR_CLASS_NAME}}Template from "./{{INIT_PACKAGE_VAR_CLASS_NAME}}Template.js";
11
10
 
12
11
  // Styles
13
- import INIT_PACKAGE_VAR_CLASS_NAMECss from "./generated/themes/INIT_PACKAGE_VAR_CLASS_NAME.css.js";
12
+ import {{INIT_PACKAGE_VAR_CLASS_NAME}}Css from "./generated/themes/{{INIT_PACKAGE_VAR_CLASS_NAME}}.css.js";
14
13
 
15
14
  import { COUNT } from "./generated/i18n/i18n-defaults.js";
16
15
 
@@ -19,45 +18,39 @@ import { COUNT } from "./generated/i18n/i18n-defaults.js";
19
18
  *
20
19
  * <h3 class="comment-api-title">Overview</h3>
21
20
  *
22
- * The <code>INIT_PACKAGE_VAR_TAG</code> component is a demo component that displays some text.
21
+ * The <code>{{INIT_PACKAGE_VAR_TAG}}</code> component is a demo component that displays some text.
23
22
  *
24
23
  * @constructor
25
- * @alias INIT_PACKAGE_VAR_NAMESPACE.INIT_PACKAGE_VAR_CLASS_NAME
26
- * @extends sap.ui.webc.base.UI5Element
27
- * @tagname INIT_PACKAGE_VAR_TAG
24
+ * @extends UI5Element
28
25
  * @public
29
26
  */
30
27
  @customElement({
31
- tag: "INIT_PACKAGE_VAR_TAG",
32
- renderer: litRender,
33
- styles: INIT_PACKAGE_VAR_CLASS_NAMECss,
34
- template: INIT_PACKAGE_VAR_CLASS_NAMETemplate,
28
+ tag: "{{INIT_PACKAGE_VAR_TAG}}",
29
+ renderer: jsxRenderer,
30
+ styles: {{INIT_PACKAGE_VAR_CLASS_NAME}}Css,
31
+ template: {{INIT_PACKAGE_VAR_CLASS_NAME}}Template,
35
32
  })
36
- class INIT_PACKAGE_VAR_CLASS_NAME extends UI5Element {
33
+ class {{INIT_PACKAGE_VAR_CLASS_NAME}} extends UI5Element {
34
+ @i18n("{{INIT_PACKAGE_VAR_NAME}}")
37
35
  static i18nBundle: I18nBundle;
38
36
 
39
- static async onDefine() {
40
- INIT_PACKAGE_VAR_CLASS_NAME.i18nBundle = await getI18nBundle("INIT_PACKAGE_VAR_NAME");
41
- }
42
-
43
37
  /**
44
38
  * Defines the component count.
45
- * @name INIT_PACKAGE_VAR_NAMESPACE.INIT_PACKAGE_VAR_CLASS_NAME.prototype.count
39
+ * @default 0
46
40
  * @public
47
- * @type { sap.ui.webc.base.types.Integer }
48
41
  */
49
- @property({ validator: Integer, defaultValue: 0 })
50
- count!: number;
42
+ @property({ type: Number })
43
+ count = 0;
51
44
 
52
45
  onClick() {
53
46
  this.count++;
54
47
  }
55
48
 
56
49
  get counterText() {
57
- return INIT_PACKAGE_VAR_CLASS_NAME.i18nBundle.getText(COUNT);
50
+ return {{INIT_PACKAGE_VAR_CLASS_NAME}}.i18nBundle.getText(COUNT);
58
51
  }
59
52
  }
60
53
 
61
- INIT_PACKAGE_VAR_CLASS_NAME.define();
54
+ {{INIT_PACKAGE_VAR_CLASS_NAME}}.define();
62
55
 
63
- export default INIT_PACKAGE_VAR_CLASS_NAME;
56
+ export default {{INIT_PACKAGE_VAR_CLASS_NAME}};
@@ -0,0 +1,9 @@
1
+ import type {{INIT_PACKAGE_VAR_CLASS_NAME}} from "./{{INIT_PACKAGE_VAR_CLASS_NAME}}.js";
2
+
3
+ export default function {{INIT_PACKAGE_VAR_CLASS_NAME}}Template(this: {{INIT_PACKAGE_VAR_CLASS_NAME}}) {
4
+ return (
5
+ <div class="root" onClick={this.onClick}>
6
+ {this.counterText} :: {this.count}
7
+ </div>
8
+ );
9
+ }
@@ -6,15 +6,15 @@ import { getLanguage } from "@ui5/webcomponents-base/dist/config/Language.js";
6
6
  import { getCalendarType } from "@ui5/webcomponents-base/dist/config/CalendarType.js";
7
7
  import { getTheme, setTheme } from "@ui5/webcomponents-base/dist/config/Theme.js";
8
8
  import { getNoConflict, setNoConflict } from "@ui5/webcomponents-base/dist/config/NoConflict.js";
9
- import { getRTL } from "@ui5/webcomponents-base/dist/config/RTL.js";
10
9
  import { getFirstDayOfWeek } from "@ui5/webcomponents-base/dist/config/FormatSettings.js";
11
10
 
12
11
  // Enable additional themes and i18n texts
13
- import "./dist/Assets.js";
12
+ import "./Assets.js";
14
13
 
15
- // Import your web components here from the dist/ directory
16
- import "./dist/INIT_PACKAGE_VAR_CLASS_NAME.js";
14
+ // Import your web components here from the src/ directory
15
+ import "./{{INIT_PACKAGE_VAR_CLASS_NAME}}.js";
17
16
 
17
+ // @ts-expect-error
18
18
  window["sap-ui-webcomponents-bundle"] = {
19
19
  renderFinished,
20
20
  configuration: {
@@ -25,7 +25,6 @@ window["sap-ui-webcomponents-bundle"] = {
25
25
  getNoConflict,
26
26
  setNoConflict,
27
27
  getCalendarType,
28
- getRTL,
29
28
  getFirstDayOfWeek,
30
29
  },
31
30
  };
@@ -1,4 +1,4 @@
1
- :host {
1
+ .root {
2
2
  display: inline-flex;
3
3
  align-items: center;
4
4
  justify-content: center;
@@ -13,4 +13,5 @@
13
13
  line-height: 3rem;
14
14
  font-size: 1.25rem;
15
15
  user-select: none;
16
+ cursor: pointer;
16
17
  }
@@ -3,6 +3,7 @@ body {
3
3
  background-color: var(--sapBackgroundColor);
4
4
  font-size: var(--sapFontSize);
5
5
  font-family: var(--sapFontFamily);
6
+ padding: 2rem;
6
7
  }
7
8
 
8
9
  h1 {
@@ -11,26 +12,78 @@ h1 {
11
12
  }
12
13
 
13
14
  h2 {
14
- font-size: var(--sapFontHeader3Size);
15
- margin-bottom: 0.5rem;
15
+ font-size: var(--sapFontHeader4Size);
16
+ }
17
+
18
+ a {
19
+ margin: 0.25rem;
20
+ padding: 0.5rem;
21
+ }
22
+
23
+ a.link {
24
+ color: var(--sapLinkColor);
16
25
  }
17
26
 
18
- .app, .app-settings, .app-docs, .app-first-component {
27
+ a.theme-link {
28
+ color: var(--sapButton_Emphasized_TextColor);
29
+ background-color: var(--sapButton_Emphasized_Background);
30
+ text-decoration: none;
31
+ border-radius: 0.25rem;
32
+ }
33
+
34
+ a.lang-link {
35
+ color: var(--sapButton_Attention_TextColor);
36
+ background-color: var(--sapButton_Attention_Background);
37
+ text-decoration: none;
38
+ border-radius: 0.25rem;
39
+ }
40
+
41
+ .app {
19
42
  display: flex;
20
- align-items: center;
21
- justify-content: center;
22
43
  flex-direction: column;
44
+ align-items: center;
23
45
  }
24
46
 
25
- .app-first-component {
26
- margin-bottom: 3rem;
47
+ .app-nav {
48
+ display: flex;
49
+ width: 100%;
50
+ flex-direction: row;
51
+ justify-content: flex-end;
27
52
  }
28
53
 
29
- .app-docs {
30
- margin-top: 3rem;
54
+ .app-logo {
55
+ height: 5rem;
56
+ width: 5rem;
31
57
  }
32
58
 
33
- a {
34
- margin: 0.25rem;
35
- color: var(--sapLinkColor);
59
+ .app-header {
60
+ display: flex;
61
+ flex-direction: row;
62
+ align-items: center;
63
+ }
64
+
65
+ .app-main {
66
+ display: flex;
67
+ flex-direction: row;
68
+ align-items: flex-start;
69
+ padding-top: 2rem;
70
+ }
71
+
72
+ .app-main-demo {
73
+ padding: 2rem;
74
+ border-radius: 0.5rem;
75
+ box-sizing: border-box;
76
+ background-color: var(--sapTile_Background);
77
+ }
78
+
79
+ .app-main-settings {
80
+ display: flex;
81
+ flex-direction: column;
82
+ padding: 0 2rem;
83
+ }
84
+
85
+ @media (max-width: 768px) {
86
+ .app-main {
87
+ flex-direction: column;
88
+ }
36
89
  }
Binary file
@@ -1,57 +1,53 @@
1
1
  <!DOCTYPE html>
2
- <html>
2
+ <html lang="en">
3
3
 
4
4
  <head>
5
5
  <meta charset="utf-8">
6
-
7
- <title>INIT_PACKAGE_VAR_TAG</title>
6
+ <title>UI5 Web Components</title>
8
7
  <meta name="viewport" content="width=device-width, initial-scale=1">
9
8
  <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
9
  <link rel="stylesheet" type="text/css" href="./css/index.css">
19
- <script src="../../bundle.esm.js" type="module"></script>
10
+ <script src="%VITE_BUNDLE_PATH%" type="module"></script>
20
11
  </head>
21
12
 
22
13
  <body>
23
14
  <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>&lt;INIT_PACKAGE_VAR_TAG>&lt;/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>
15
+ <nav class="app-nav">
16
+ <a class="link" href="https://sap.github.io/ui5-webcomponents/">Website</a>
17
+ <a class="link" href="https://sap.github.io/ui5-webcomponents/components/">Components</a>
18
+ <a class="link" href="https://sap.github.io/ui5-webcomponents/docs/development/package/">Development</a>
19
+ </nav>
20
+
21
+ <header class="app-header">
22
+ <a href="https://sap.github.io/ui5-webcomponents/" target="_blank"><img src="./img/logo.png" class="app-logo" alt="logo"/></a>
23
+ <h1>UI5 Web Components</h1>
24
+ </header>
25
+
26
+ <main class="app-main">
27
+ <div class="app-main-demo">
28
+ <h2>Congrats! It's your First Web Component 🎉</h2>
29
+ <div> <pre>&lt;{{INIT_PACKAGE_VAR_TAG}}>&lt;/{{INIT_PACKAGE_VAR_TAG}}> </pre></div>
30
+ <{{INIT_PACKAGE_VAR_TAG}} id="myFirstComponent"></{{INIT_PACKAGE_VAR_TAG}}>
40
31
  </div>
41
32
 
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>
33
+ <div class="app-main-settings">
34
+ <h3>Switch theme</h3>
35
+ <div style="display: grid; grid-template-columns: 1fr 1fr;">
36
+ <a class="link theme-link" href="?sap-ui-theme=sap_horizon">Horizon Morning</a>
37
+ <a class="link theme-link" href="?sap-ui-theme=sap_horizon_dark">Horizon Evening</a>
38
+ <a class="link theme-link" href="?sap-ui-theme=sap_horizon_hcb">High Contrast Black</a>
39
+ <a class="link theme-link" href="?sap-ui-theme=sap_horizon_hcw">High Contrast White</a>
40
+ </div>
41
+
42
+ <h3>Switch language</h3>
43
+ <div style="display: grid; grid-template-columns: 1fr 1fr;">
44
+ <a class="link lang-link" href="?sap-ui-language=en">English</a>
45
+ <a class="link lang-link" href="?sap-ui-language=de">German</a>
46
+ <a class="link lang-link" href="?sap-ui-language=es">Spanish</a>
47
+ <a class="link lang-link" href="?sap-ui-language=fr">French</a>
48
+ </div>
48
49
  </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>
50
+ </main>
55
51
  </div>
56
52
  </body>
57
53
  </html>
@@ -0,0 +1,14 @@
1
+ {
2
+ "extends": "@ui5/webcomponents-tools/tsconfig.json",
3
+ "include": [
4
+ "src/**/*",
5
+ "global.d.ts"
6
+ ],
7
+ "compilerOptions": {
8
+ {{INIT_PACKAGE_CYPRESS_ROOT_TSCONFIG}}
9
+ "outDir": "dist",
10
+ "experimentalDecorators": true,
11
+ "module": "NodeNext",
12
+ "moduleResolution": "NodeNext"
13
+ },
14
+ }
@@ -0,0 +1,14 @@
1
+ import viteConfig from "@ui5/webcomponents-tools/components-package/vite.config.js"; //eslint-disable-line
2
+
3
+ // Modifying the default Vite configuration provided by the @ui5/webcomponents-tools package.
4
+ // You can directly access and update the properties you need to change.
5
+ // Ensure that the property exists before modifying it to avoid unintended errors.
6
+ // For available configuration options, refer to: https://vite.dev/config/#configuring-vite
7
+ //
8
+ // Ensure the plugins array exists
9
+ // viteConfig.plugins = viteConfig.plugins || [];
10
+ //
11
+ // Push a new fake plugin
12
+ // viteConfig.plugins.push({ name: 'my-custom-plugin' });
13
+
14
+ export default viteConfig;
@@ -1 +0,0 @@
1
- module.exports = require("@ui5/webcomponents-tools/components-package/postcss.components.js"); // eslint-disable-line
@@ -1 +0,0 @@
1
- module.exports = require("@ui5/webcomponents-tools/components-package/postcss.themes.js"); // eslint-disable-line
@@ -1 +0,0 @@
1
- module.exports = require("@ui5/webcomponents-tools/components-package/wdio.js"); // eslint-disable-line
@@ -1,5 +0,0 @@
1
- import "@ui5/webcomponents-theming/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 @click="{{onClick}}">{{counterText}} :: {{count}}</div>
@@ -1,82 +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 { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
4
- import Integer from "@ui5/webcomponents-base/dist/types/Integer.js";
5
-
6
- // Template
7
- import INIT_PACKAGE_VAR_CLASS_NAMETemplate from "./generated/templates/INIT_PACKAGE_VAR_CLASS_NAMETemplate.lit.js";
8
-
9
- // Styles
10
- import INIT_PACKAGE_VAR_CLASS_NAMECss from "./generated/themes/INIT_PACKAGE_VAR_CLASS_NAME.css.js";
11
-
12
- import { COUNT } from "./generated/i18n/i18n-defaults.js";
13
-
14
- /**
15
- * @public
16
- */
17
- const metadata = {
18
- tag: "INIT_PACKAGE_VAR_TAG",
19
- properties: /** @lends INIT_PACKAGE_VAR_NAMESPACE.INIT_PACKAGE_VAR_CLASS_NAME.prototype */ {
20
- /**
21
- * Defines the count of the component.
22
- * @type { sap.ui.webc.base.types.Integer }
23
- * @defaultvalue 0
24
- * @public
25
- */
26
- count: {
27
- type: Integer,
28
- defaultValue: 0,
29
- },
30
- },
31
- slots: {
32
- },
33
- events: {
34
- },
35
- };
36
-
37
- /**
38
- * @class
39
- *
40
- * <h3 class="comment-api-title">Overview</h3>
41
- *
42
- * The <code>INIT_PACKAGE_VAR_TAG</code> component is a demo component that displays some text.
43
- *
44
- * @constructor
45
- * @alias INIT_PACKAGE_VAR_NAMESPACE.INIT_PACKAGE_VAR_CLASS_NAME
46
- * @extends sap.ui.webc.base.UI5Element
47
- * @tagname INIT_PACKAGE_VAR_TAG
48
- * @public
49
- */
50
- class INIT_PACKAGE_VAR_CLASS_NAME extends UI5Element {
51
- static get metadata() {
52
- return metadata;
53
- }
54
-
55
- static get render() {
56
- return litRender;
57
- }
58
-
59
- static get template() {
60
- return INIT_PACKAGE_VAR_CLASS_NAMETemplate;
61
- }
62
-
63
- static get styles() {
64
- return INIT_PACKAGE_VAR_CLASS_NAMECss;
65
- }
66
-
67
- static async onDefine() {
68
- INIT_PACKAGE_VAR_CLASS_NAME.i18nBundle = await getI18nBundle("INIT_PACKAGE_VAR_NAME");
69
- }
70
-
71
- onClick() {
72
- this.count++;
73
- }
74
-
75
- get counterText() {
76
- return INIT_PACKAGE_VAR_CLASS_NAME.i18nBundle.getText(COUNT);
77
- }
78
- }
79
-
80
- INIT_PACKAGE_VAR_CLASS_NAME.define();
81
-
82
- export default INIT_PACKAGE_VAR_CLASS_NAME;
@@ -1,3 +0,0 @@
1
- :root {
2
- --my-component-border-color: blue;
3
- }
@@ -1,13 +0,0 @@
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
- });
@@ -1,15 +0,0 @@
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
- }
File without changes