@telia-ace/widget-components-widget-header-flamingo 1.0.63 → 1.1.2

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/.eslintrc.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "extends": ["../../.eslintrc.json"],
3
+ "ignorePatterns": ["!**/*"],
4
+ "overrides": [
5
+ {
6
+ "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7
+ "rules": {}
8
+ },
9
+ {
10
+ "files": ["*.ts", "*.tsx"],
11
+ "rules": {}
12
+ },
13
+ {
14
+ "files": ["*.js", "*.jsx"],
15
+ "rules": {}
16
+ },
17
+ {
18
+ "files": ["*.json"],
19
+ "parser": "jsonc-eslint-parser",
20
+ "rules": {
21
+ "@nx/dependency-checks": [
22
+ "error",
23
+ {
24
+ "ignoredFiles": ["{projectRoot}/vite.config.{js,ts,mjs,mts}"]
25
+ }
26
+ ]
27
+ }
28
+ }
29
+ ]
30
+ }
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # widget-components-widget-header-flamingo
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Building
6
+
7
+ Run `nx build widget-components-widget-header-flamingo` to build the library.
8
+
9
+ ## Running unit tests
10
+
11
+ Run `nx test widget-components-widget-header-flamingo` to execute the unit tests via [Jest](https://jestjs.io).
package/package.json CHANGED
@@ -1,16 +1,11 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-components-widget-header-flamingo",
3
- "version": "1.0.63",
3
+ "version": "1.1.2",
4
4
  "dependencies": {
5
- "@telia-ace/widget-runtime-flamingo": "1.0.63",
5
+ "@telia-ace/widget-runtime-flamingo": "1.1.2",
6
6
  "@webprovisions/platform": "^1.1.3",
7
7
  "lit": "^2.8.0",
8
- "@telia-ace/widget-conversation-flamingo": "1.0.63",
9
- "@telia-ace/knowledge-widget-bot-provider-flamingo": "1.0.63",
10
- "@telia-ace/knowledge-data-client-flamingo": "1.0.63",
11
- "@telia-ace/widget-components-copyright-flamingo": "1.0.63",
12
- "@telia-ace/widget-components-list-flamingo": "1.0.63",
13
- "@telia-ace/widget-components-widget-header-flamingo": "1.0.63"
8
+ "@teliads/icons": "^8.4.0"
14
9
  },
15
10
  "main": "./index.js",
16
11
  "module": "./index.mjs",
package/project.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "components-widget-header",
3
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
+ "sourceRoot": "libs/components-widget-header/src",
5
+ "projectType": "library",
6
+ "targets": {
7
+ "build": {
8
+ "executor": "@nx/vite:build",
9
+ "outputs": ["{options.outputPath}"],
10
+ "options": {
11
+ "outputPath": "dist/libs/components-widget-header"
12
+ }
13
+ },
14
+ "publish": {
15
+ "executor": "nx:run-commands",
16
+ "options": {
17
+ "command": "npm publish",
18
+ "cwd": "dist/libs/components-widget-header"
19
+ }
20
+ },
21
+ "prerelease": {
22
+ "executor": "nx:run-commands",
23
+ "options": {
24
+ "command": "npm publish --tag=rc",
25
+ "cwd": "dist/libs/components-widget-header"
26
+ }
27
+ },
28
+ "test": {
29
+ "executor": "@nx/vite:test",
30
+ "outputs": ["{options.reportsDirectory}"],
31
+ "options": {
32
+ "passWithNoTests": true,
33
+ "reportsDirectory": "../../coverage/libs/components-widget-header"
34
+ }
35
+ },
36
+ "lint": {
37
+ "executor": "@nx/eslint:lint",
38
+ "outputs": ["{options.outputFile}"],
39
+ "options": {
40
+ "lintFilePatterns": [
41
+ "libs/components-widget-header/**/*.ts",
42
+ "libs/components-widget-header/package.json"
43
+ ]
44
+ }
45
+ }
46
+ },
47
+ "tags": []
48
+ }
@@ -1,2 +1,5 @@
1
1
  import WidgetHeaderComponent from './widget-header-component';
2
+
3
+ console.log('3'); // TODO: remove
4
+
2
5
  export default WidgetHeaderComponent;
@@ -0,0 +1,15 @@
1
+ import { createWebComponent } from '@telia-ace/widget-runtime-flamingo';
2
+ import { Container } from '@webprovisions/platform';
3
+
4
+ export const WidgetHeaderComponent = (container: Container) => {
5
+ return createWebComponent(
6
+ container,
7
+ 'widget-header',
8
+ import('./widget-header'),
9
+ (_component) => {
10
+ //
11
+ }
12
+ );
13
+ };
14
+
15
+ export default WidgetHeaderComponent;
@@ -0,0 +1,51 @@
1
+ import { LitElement, css, html, nothing } from 'lit';
2
+ import { customElement } from 'lit/decorators.js';
3
+ import { WidgetComponent } from '@telia-ace/widget-runtime-flamingo';
4
+ import { aiRobot } from '@teliads/icons';
5
+
6
+ const WidgetElement = WidgetComponent(LitElement);
7
+
8
+ @customElement('ace-widget-header')
9
+ export class WidgetHeaderComponent extends WidgetElement {
10
+ static override styles = [
11
+ WidgetElement.styles || [],
12
+ css`
13
+ .widget-header {
14
+ background-color: transparent;
15
+ color: #fff;
16
+ height: 85px;
17
+ display: flex;
18
+ gap: var(--spacing-md);
19
+ flex-direction: row;
20
+ align-items: center;
21
+ border-radius: var(--spacing-sm) var(--spacing-sm) 0px 0px;
22
+ padding: 0 var(--spacing-md);
23
+ }
24
+
25
+ h1 {
26
+ font-size: 1.2rem;
27
+ }
28
+
29
+ h1,
30
+ p {
31
+ margin: 0;
32
+ padding: 0;
33
+ }
34
+ `,
35
+ ];
36
+
37
+ override render() {
38
+ return html` <div class="widget-header">
39
+ <telia-icon svg=${aiRobot.svg} size="lg"></telia-icon>
40
+ <div>
41
+ <h1>${this.properties.header}</h1>
42
+
43
+ ${this.properties.tagline
44
+ ? html`<p>${this.properties.tagline}</p>`
45
+ : nothing}
46
+ </div>
47
+ </div>`;
48
+ }
49
+ }
50
+
51
+ export default WidgetHeaderComponent;
package/tsconfig.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "module": "commonjs",
5
+ "forceConsistentCasingInFileNames": true,
6
+ "strict": true,
7
+ "noImplicitOverride": true,
8
+ "noPropertyAccessFromIndexSignature": false,
9
+ "noImplicitReturns": false,
10
+ "noFallthroughCasesInSwitch": true,
11
+ "types": ["vitest"]
12
+ },
13
+ "files": [],
14
+ "include": [],
15
+ "references": [
16
+ {
17
+ "path": "./tsconfig.lib.json"
18
+ },
19
+ {
20
+ "path": "./tsconfig.spec.json"
21
+ }
22
+ ]
23
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "../../dist/out-tsc",
5
+ "declaration": true,
6
+ "types": ["node", "vite/client"]
7
+ },
8
+ "include": ["src/**/*.ts"],
9
+ "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
10
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "../../dist/out-tsc",
5
+ "types": ["vitest/globals", "vitest/importMeta", "vite/client", "node"]
6
+ },
7
+ "include": [
8
+ "vite.config.ts",
9
+ "src/**/*.test.ts",
10
+ "src/**/*.spec.ts",
11
+ "src/**/*.test.tsx",
12
+ "src/**/*.spec.tsx",
13
+ "src/**/*.test.js",
14
+ "src/**/*.spec.js",
15
+ "src/**/*.test.jsx",
16
+ "src/**/*.spec.jsx",
17
+ "src/**/*.d.ts"
18
+ ]
19
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,57 @@
1
+ /// <reference types="vitest" />
2
+ import { defineConfig } from 'vite';
3
+
4
+ import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
5
+ import dts from 'vite-plugin-dts';
6
+ import * as path from 'path';
7
+ // import packageJson from './package.json';
8
+
9
+ export default defineConfig({
10
+ cacheDir:
11
+ '../../node_modules/.vite/@telia-ace/widget-components-widget-header-flamingo',
12
+
13
+ plugins: [
14
+ dts({
15
+ entryRoot: 'src',
16
+ tsConfigFilePath: path.join(__dirname, 'tsconfig.lib.json'),
17
+ skipDiagnostics: true,
18
+ }),
19
+
20
+ nxViteTsPaths(),
21
+ ],
22
+
23
+ // Uncomment this if you are using workers.
24
+ // worker: {
25
+ // plugins: [ nxViteTsPaths() ],
26
+ // },
27
+
28
+ // Configuration for building your library.
29
+ // See: https://vitejs.dev/guide/build.html#library-mode
30
+ build: {
31
+ lib: {
32
+ // Could also be a dictionary or array of multiple entry points.
33
+ entry: 'src/index.ts',
34
+ name: '@telia-ace/widget-components-widget-header-flamingo',
35
+ fileName: 'index',
36
+ // Change this to the formats you want to support.
37
+ // Don't forget to update your package.json as well.
38
+ formats: ['es', 'cjs'],
39
+ },
40
+ rollupOptions: {
41
+ // External packages that should not be bundled into your library.
42
+ external: [
43
+ // ...Object.keys((packageJson as any).dependencies || {}),
44
+ // ...Object.keys((packageJson as any).peerDependencies || {}),
45
+ ],
46
+ },
47
+ },
48
+
49
+ test: {
50
+ globals: true,
51
+ cache: {
52
+ dir: '../../node_modules/.vitest',
53
+ },
54
+ environment: 'node',
55
+ include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
56
+ },
57
+ });