@triptease/tt-navbar 0.0.2 → 0.0.5

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.
@@ -0,0 +1,7 @@
1
+ <link rel="stylesheet" href="https://cdn.design-system.triptease.io/base.css">
2
+ <link rel="stylesheet" href="https://cdn.design-system.triptease.io/compositions.css">
3
+ <style>
4
+ div {
5
+ font-size: 25px;
6
+ }
7
+ </style>
@@ -1,8 +1,10 @@
1
1
  import { LitElement } from 'lit';
2
2
  export declare class TtNavbar extends LitElement {
3
3
  static styles: import("lit").CSSResult;
4
- header: string;
5
- counter: number;
6
- __increment(): void;
4
+ navigate: ((e: MouseEvent) => void) | undefined;
5
+ baseUrl?: string;
6
+ clientKey?: string;
7
+ private buildUrl;
8
+ private onAnchorClick;
7
9
  render(): import("lit-html").TemplateResult<1>;
8
10
  }
@@ -1,33 +1,113 @@
1
1
  import { __decorate } from "tslib";
2
- import { html, css, LitElement } from 'lit';
2
+ import { html, LitElement } from 'lit';
3
3
  import { property } from 'lit/decorators.js';
4
+ import { styles } from './styles.js';
4
5
  export class TtNavbar extends LitElement {
5
6
  constructor() {
6
7
  super(...arguments);
7
- this.header = 'Hey there';
8
- this.counter = 5;
9
- }
10
- __increment() {
11
- this.counter += 1;
8
+ this.buildUrl = (path) => {
9
+ if (!this.clientKey)
10
+ throw new Error('clientKey is required');
11
+ const formattedPath = path.replace('$CLIENT_KEY', this.clientKey);
12
+ if (!this.baseUrl)
13
+ return formattedPath;
14
+ return new URL(formattedPath, this.baseUrl).toString();
15
+ };
16
+ this.onAnchorClick = (e) => {
17
+ if (this.navigate) {
18
+ this.navigate(e);
19
+ }
20
+ };
12
21
  }
13
22
  render() {
14
23
  return html `
15
- <h2>${this.header} Nr. ${this.counter}!</h2>
16
- <button @click=${this.__increment}>increment</button>
24
+ <nav id=${this.id}>
25
+ <a href=${this.buildUrl('/')} @click=${this.onAnchorClick}>Dashboard</a>
26
+ <a href="https://app.campaign-manager.triptease.io">Campaigns</a>
27
+ <a href=${this.buildUrl('/channels')} @click=${this.onAnchorClick}
28
+ >Channels</a
29
+ >
30
+ <details>
31
+ <summary>Market Insights</summary>
32
+ <div>
33
+ <a
34
+ href=${this.buildUrl('/parity/$CLIENT_KEY')}
35
+ @click=${this.onAnchorClick}
36
+ >Parity</a
37
+ >
38
+ <a
39
+ href=${this.buildUrl('/guest-insights/$CLIENT_KEY')}
40
+ @click=${this.onAnchorClick}
41
+ >Guest insights</a
42
+ >
43
+ </div>
44
+ </details>
45
+ <details>
46
+ <summary>Settings</summary>
47
+ <div>
48
+ <a
49
+ href=${this.buildUrl('/$CLIENT_KEY/guest-behavioural-data')}
50
+ @click=${this.onAnchorClick}
51
+ >Email setup</a
52
+ >
53
+ <a
54
+ href=${this.buildUrl('/$CLIENT_KEY/crm-config')}
55
+ @click=${this.onAnchorClick}
56
+ >CRM connectivity</a
57
+ >
58
+ <a
59
+ href=${this.buildUrl('/settings/group')}
60
+ @click=${this.onAnchorClick}
61
+ >Group settings</a
62
+ >
63
+ <a
64
+ href=${this.buildUrl('/settings/$CLIENT_KEY/hotels/')}
65
+ @click=${this.onAnchorClick}
66
+ >Property settings</a
67
+ >
68
+ </div>
69
+ </details>
70
+ <hr />
71
+ <details>
72
+ <summary>Account</summary>
73
+ <div>
74
+ <a href=${this.buildUrl('/account')} @click=${this.onAnchorClick}
75
+ >User settings</a
76
+ >
77
+ <a
78
+ href=${this.buildUrl('/account/team/$CLIENT_KEY')}
79
+ @click=${this.onAnchorClick}
80
+ >Team and permissions</a
81
+ >
82
+ </div>
83
+ </details>
84
+ <details>
85
+ <summary>Billing</summary>
86
+ <div>
87
+ <a
88
+ href=${this.buildUrl('/account/billing-management/$CLIENT_KEY')}
89
+ @click=${this.onAnchorClick}
90
+ >Booking reconciliation</a
91
+ >
92
+ <a
93
+ href=${this.buildUrl('/subscriptions/$CLIENT_KEY')}
94
+ @click=${this.onAnchorClick}
95
+ >Subscriptions</a
96
+ >
97
+ </div>
98
+ </details>
99
+ </nav>
17
100
  `;
18
101
  }
19
102
  }
20
- TtNavbar.styles = css `
21
- :host {
22
- display: block;
23
- padding: 25px;
24
- color: var(--tt-navbar-text-color, #000);
25
- }
26
- `;
103
+ TtNavbar.styles = styles;
104
+ __decorate([
105
+ property({ type: Function })
106
+ ], TtNavbar.prototype, "navigate", void 0);
27
107
  __decorate([
28
108
  property({ type: String })
29
- ], TtNavbar.prototype, "header", void 0);
109
+ ], TtNavbar.prototype, "baseUrl", void 0);
30
110
  __decorate([
31
- property({ type: Number })
32
- ], TtNavbar.prototype, "counter", void 0);
111
+ property({ type: String })
112
+ ], TtNavbar.prototype, "clientKey", void 0);
33
113
  //# sourceMappingURL=TtNavbar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TtNavbar.js","sourceRoot":"","sources":["../../src/TtNavbar.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,MAAM,OAAO,QAAS,SAAQ,UAAU;IAAxC;;QAS8B,WAAM,GAAG,WAAW,CAAC;QAErB,YAAO,GAAG,CAAC,CAAC;IAY1C,CAAC;IAVC,WAAW;QACT,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC;IACpB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA;YACH,IAAI,CAAC,MAAM,QAAQ,IAAI,CAAC,OAAO;uBACpB,IAAI,CAAC,WAAW;KAClC,CAAC;IACJ,CAAC;;AArBM,eAAM,GAAG,GAAG,CAAA;;;;;;GAMlB,AANY,CAMX;AAE0B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCAAsB;AAErB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAa","sourcesContent":["import { html, css, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nexport class TtNavbar extends LitElement {\n static styles = css`\n :host {\n display: block;\n padding: 25px;\n color: var(--tt-navbar-text-color, #000);\n }\n `;\n\n @property({ type: String }) header = 'Hey there';\n\n @property({ type: Number }) counter = 5;\n\n __increment() {\n this.counter += 1;\n }\n\n render() {\n return html`\n <h2>${this.header} Nr. ${this.counter}!</h2>\n <button @click=${this.__increment}>increment</button>\n `;\n }\n}\n"]}
1
+ {"version":3,"file":"TtNavbar.js","sourceRoot":"","sources":["../../src/TtNavbar.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,OAAO,QAAS,SAAQ,UAAU;IAAxC;;QAYU,aAAQ,GAAG,CAAC,IAAY,EAAU,EAAE;YAC1C,IAAI,CAAC,IAAI,CAAC,SAAS;gBAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;YAE9D,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAClE,IAAI,CAAC,IAAI,CAAC,OAAO;gBAAE,OAAO,aAAa,CAAC;YAExC,OAAO,IAAI,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC;QACzD,CAAC,CAAC;QAEM,kBAAa,GAAG,CAAC,CAAa,EAAE,EAAE;YACxC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAClB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACnB,CAAC;QACH,CAAC,CAAC;IAkFJ,CAAC;IAhFC,MAAM;QACJ,OAAO,IAAI,CAAA;gBACC,IAAI,CAAC,EAAE;kBACL,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW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Navbar extends LitElement {\n static styles = styles;\n\n @property({ type: Function })\n navigate: ((e: MouseEvent) => void) | undefined;\n\n @property({ type: String })\n baseUrl?: string;\n\n @property({ type: String })\n clientKey?: string;\n\n private buildUrl = (path: string): string => {\n if (!this.clientKey) throw new Error('clientKey is required');\n\n const formattedPath = path.replace('$CLIENT_KEY', this.clientKey);\n if (!this.baseUrl) return formattedPath;\n\n return new URL(formattedPath, this.baseUrl).toString();\n };\n\n private onAnchorClick = (e: MouseEvent) => {\n if (this.navigate) {\n this.navigate(e);\n }\n };\n\n render() {\n return html`\n <nav id=${this.id}>\n <a href=${this.buildUrl('/')} @click=${this.onAnchorClick}>Dashboard</a>\n <a href=\"https://app.campaign-manager.triptease.io\">Campaigns</a>\n <a href=${this.buildUrl('/channels')} @click=${this.onAnchorClick}\n >Channels</a\n >\n <details>\n <summary>Market Insights</summary>\n <div>\n <a\n href=${this.buildUrl('/parity/$CLIENT_KEY')}\n @click=${this.onAnchorClick}\n >Parity</a\n >\n <a\n href=${this.buildUrl('/guest-insights/$CLIENT_KEY')}\n @click=${this.onAnchorClick}\n >Guest insights</a\n >\n </div>\n </details>\n <details>\n <summary>Settings</summary>\n <div>\n <a\n href=${this.buildUrl('/$CLIENT_KEY/guest-behavioural-data')}\n @click=${this.onAnchorClick}\n >Email setup</a\n >\n <a\n href=${this.buildUrl('/$CLIENT_KEY/crm-config')}\n @click=${this.onAnchorClick}\n >CRM connectivity</a\n >\n <a\n href=${this.buildUrl('/settings/group')}\n @click=${this.onAnchorClick}\n >Group settings</a\n >\n <a\n href=${this.buildUrl('/settings/$CLIENT_KEY/hotels/')}\n @click=${this.onAnchorClick}\n >Property settings</a\n >\n </div>\n </details>\n <hr />\n <details>\n <summary>Account</summary>\n <div>\n <a href=${this.buildUrl('/account')} @click=${this.onAnchorClick}\n >User settings</a\n >\n <a\n href=${this.buildUrl('/account/team/$CLIENT_KEY')}\n @click=${this.onAnchorClick}\n >Team and permissions</a\n >\n </div>\n </details>\n <details>\n <summary>Billing</summary>\n <div>\n <a\n href=${this.buildUrl('/account/billing-management/$CLIENT_KEY')}\n @click=${this.onAnchorClick}\n >Booking reconciliation</a\n >\n <a\n href=${this.buildUrl('/subscriptions/$CLIENT_KEY')}\n @click=${this.onAnchorClick}\n >Subscriptions</a\n >\n </div>\n </details>\n </nav>\n `;\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,21 @@
1
+ import { css } from 'lit';
2
+ export const styles = css `
3
+ nav {
4
+ max-width: 260px;
5
+ display: flex;
6
+ flex-direction: column;
7
+ }
8
+
9
+ nav details div {
10
+ display: flex;
11
+ flex-direction: column;
12
+ }
13
+
14
+ hr {
15
+ background: black;
16
+ width: 100%;
17
+ height: 1px;
18
+ border: none;
19
+ }
20
+ `;
21
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;CAkBxB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`\n nav {\n max-width: 260px;\n display: flex;\n flex-direction: column;\n }\n\n nav details div {\n display: flex;\n flex-direction: column;\n }\n\n hr {\n background: black;\n width: 100%;\n height: 1px;\n border: none;\n }\n`;\n"]}
@@ -1,33 +1,7 @@
1
- import { TemplateResult } from 'lit';
2
1
  import '../src/tt-navbar.js';
3
2
  declare const _default: {
4
3
  title: string;
5
4
  component: string;
6
- argTypes: {
7
- header: {
8
- control: string;
9
- };
10
- counter: {
11
- control: string;
12
- };
13
- textColor: {
14
- control: string;
15
- };
16
- };
17
5
  };
18
6
  export default _default;
19
- interface Story<T> {
20
- (args: T): TemplateResult;
21
- args?: Partial<T>;
22
- argTypes?: Record<string, unknown>;
23
- }
24
- interface ArgTypes {
25
- header?: string;
26
- counter?: number;
27
- textColor?: string;
28
- slot?: TemplateResult;
29
- }
30
- export declare const Regular: Story<ArgTypes>;
31
- export declare const CustomHeader: Story<ArgTypes>;
32
- export declare const CustomCounter: Story<ArgTypes>;
33
- export declare const SlottedContent: Story<ArgTypes>;
7
+ export declare const Regular: () => import("lit-html").TemplateResult<1>;
@@ -3,35 +3,13 @@ import '../src/tt-navbar.js';
3
3
  export default {
4
4
  title: 'TtNavbar',
5
5
  component: 'tt-navbar',
6
- argTypes: {
7
- header: { control: 'text' },
8
- counter: { control: 'number' },
9
- textColor: { control: 'color' },
10
- },
11
6
  };
12
- const Template = ({ header = 'Hello world', counter = 5, textColor, slot, }) => html `
13
- <tt-navbar
14
- style="--tt-navbar-text-color: ${textColor || 'black'}"
15
- .header=${header}
16
- .counter=${counter}
17
- >
18
- ${slot}
19
- </tt-navbar>
7
+ const Template = () => html `
8
+ <div>
9
+ <tt-navbar clientKey="zxd47KQGAP">
10
+ </tt-navbar>
11
+ </div>
12
+
20
13
  `;
21
14
  export const Regular = Template.bind({});
22
- export const CustomHeader = Template.bind({});
23
- CustomHeader.args = {
24
- header: 'My header',
25
- };
26
- export const CustomCounter = Template.bind({});
27
- CustomCounter.args = {
28
- counter: 123456,
29
- };
30
- export const SlottedContent = Template.bind({});
31
- SlottedContent.args = {
32
- slot: html `<p>Slotted content</p>`,
33
- };
34
- SlottedContent.argTypes = {
35
- slot: { table: { disable: true } },
36
- };
37
15
  //# sourceMappingURL=index.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../stories/index.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAC3C,OAAO,qBAAqB,CAAC;AAE7B,eAAe;IACb,KAAK,EAAE,UAAU;IACjB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE;QACR,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC3B,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC9B,SAAS,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;KAChC;CACF,CAAC;AAeF,MAAM,QAAQ,GAAoB,CAAC,EACjC,MAAM,GAAG,aAAa,EACtB,OAAO,GAAG,CAAC,EACX,SAAS,EACT,IAAI,GACK,EAAE,EAAE,CAAC,IAAI,CAAA;;qCAEiB,SAAS,IAAI,OAAO;cAC3C,MAAM;eACL,OAAO;;MAEhB,IAAI;;CAET,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAEzC,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC9C,YAAY,CAAC,IAAI,GAAG;IAClB,MAAM,EAAE,WAAW;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC/C,aAAa,CAAC,IAAI,GAAG;IACnB,OAAO,EAAE,MAAM;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChD,cAAc,CAAC,IAAI,GAAG;IACpB,IAAI,EAAE,IAAI,CAAA,wBAAwB;CACnC,CAAC;AACF,cAAc,CAAC,QAAQ,GAAG;IACxB,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CACnC,CAAC","sourcesContent":["import { html, TemplateResult } from 'lit';\nimport '../src/tt-navbar.js';\n\nexport default {\n title: 'TtNavbar',\n component: 'tt-navbar',\n argTypes: {\n header: { control: 'text' },\n counter: { control: 'number' },\n textColor: { control: 'color' },\n },\n};\n\ninterface Story<T> {\n (args: T): TemplateResult;\n args?: Partial<T>;\n argTypes?: Record<string, unknown>;\n}\n\ninterface ArgTypes {\n header?: string;\n counter?: number;\n textColor?: string;\n slot?: TemplateResult;\n}\n\nconst Template: Story<ArgTypes> = ({\n header = 'Hello world',\n counter = 5,\n textColor,\n slot,\n}: ArgTypes) => html`\n <tt-navbar\n style=\"--tt-navbar-text-color: ${textColor || 'black'}\"\n .header=${header}\n .counter=${counter}\n >\n ${slot}\n </tt-navbar>\n`;\n\nexport const Regular = Template.bind({});\n\nexport const CustomHeader = Template.bind({});\nCustomHeader.args = {\n header: 'My header',\n};\n\nexport const CustomCounter = Template.bind({});\nCustomCounter.args = {\n counter: 123456,\n};\n\nexport const SlottedContent = Template.bind({});\nSlottedContent.args = {\n slot: html`<p>Slotted content</p>`,\n};\nSlottedContent.argTypes = {\n slot: { table: { disable: true } },\n};\n"]}
1
+ {"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../stories/index.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,qBAAqB,CAAC;AAE7B,eAAe;IACb,KAAK,EAAE,UAAU;IACjB,SAAS,EAAE,WAAW;CACvB,CAAC;AAKF,MAAM,QAAQ,GAAG,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;;CAM1B,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { html } from 'lit';\nimport '../src/tt-navbar.js';\n\nexport default {\n title: 'TtNavbar',\n component: 'tt-navbar',\n};\n\n\n\n\nconst Template = () => html`\n <div>\n <tt-navbar clientKey=\"zxd47KQGAP\">\n </tt-navbar>\n </div>\n\n`;\n\nexport const Regular = Template.bind({});\n"]}
@@ -1,24 +1,66 @@
1
- import { html } from 'lit';
2
- import { fixture, expect } from '@open-wc/testing';
3
1
  import '../src/tt-navbar.js';
2
+ import { expect, fixture, waitUntil } from '@open-wc/testing';
3
+ // eslint-disable-next-line no-undef
4
+ const getLinkByHref = (links, href) => {
5
+ for (const link of links) {
6
+ if (link.getAttribute('href') === href) {
7
+ return link;
8
+ }
9
+ }
10
+ return undefined;
11
+ };
12
+ const CLIENT_KEY = 'zxd47KQGAP';
4
13
  describe('TtNavbar', () => {
5
- it('has a default header "Hey there" and counter 5', async () => {
6
- const el = await fixture(html `<tt-navbar></tt-navbar>`);
7
- expect(el.header).to.equal('Hey there');
8
- expect(el.counter).to.equal(5);
14
+ it("should throw an error if the clientKey is not provided", async () => {
15
+ try {
16
+ await fixture(`<tt-navbar></tt-navbar>`);
17
+ }
18
+ catch (e) {
19
+ expect(e).to.match(/clientKey is required/);
20
+ }
9
21
  });
10
- it('increases the counter on button click', async () => {
11
- const el = await fixture(html `<tt-navbar></tt-navbar>`);
12
- el.shadowRoot.querySelector('button').click();
13
- expect(el.counter).to.equal(6);
22
+ it('should render with the default links', async () => {
23
+ const navbar = await fixture(`<tt-navbar clientKey=${CLIENT_KEY}></tt-navbar>`);
24
+ const links = navbar.shadowRoot?.querySelectorAll('a');
25
+ expect(links?.length).to.equal(13);
26
+ if (links) {
27
+ expect(getLinkByHref(links, '/')).to.exist;
28
+ expect(getLinkByHref(links, 'https://app.campaign-manager.triptease.io')).to.exist;
29
+ expect(getLinkByHref(links, '/channels')).to.exist;
30
+ expect(getLinkByHref(links, `/parity/${CLIENT_KEY}`)).to.exist;
31
+ expect(getLinkByHref(links, `/guest-insights/${CLIENT_KEY}`)).to.exist;
32
+ expect(getLinkByHref(links, `/${CLIENT_KEY}/guest-behavioural-data`)).to.exist;
33
+ expect(getLinkByHref(links, `/${CLIENT_KEY}/crm-config`)).to.exist;
34
+ expect(getLinkByHref(links, `/settings/group`)).to.exist;
35
+ expect(getLinkByHref(links, `/settings/${CLIENT_KEY}/hotels/`)).to.exist;
36
+ expect(getLinkByHref(links, `/account`)).to.exist;
37
+ expect(getLinkByHref(links, `/account/team/${CLIENT_KEY}`)).to.exist;
38
+ expect(getLinkByHref(links, `/account/billing-management/${CLIENT_KEY}`)).to.exist;
39
+ expect(getLinkByHref(links, `/subscriptions/${CLIENT_KEY}`)).to.exist;
40
+ }
14
41
  });
15
- it('can override the header via attribute', async () => {
16
- const el = await fixture(html `<tt-navbar header="attribute header"></tt-navbar>`);
17
- expect(el.header).to.equal('attribute header');
42
+ it('should render platform URLs against the base URL when it is defined', async () => {
43
+ const baseUrl = 'https://app.triptease.io';
44
+ const navbar = await fixture(`<tt-navbar clientKey=${CLIENT_KEY} baseUrl="${baseUrl}"></tt-navbar>`);
45
+ const links = navbar.shadowRoot?.querySelectorAll('a');
46
+ if (links) {
47
+ expect(getLinkByHref(links, `${baseUrl}/`)).to.exist;
48
+ expect(getLinkByHref(links, 'https://app.campaign-manager.triptease.io')).to.exist; // This shouldn't change
49
+ expect(getLinkByHref(links, `${baseUrl}/channels`)).to.exist;
50
+ }
18
51
  });
19
- it('passes the a11y audit', async () => {
20
- const el = await fixture(html `<tt-navbar></tt-navbar>`);
21
- await expect(el).shadowDom.to.be.accessible();
52
+ it('should allow navigation events to be handled externally', async () => {
53
+ let navigateEventCount = 0;
54
+ const onNavigate = (e) => {
55
+ e.preventDefault();
56
+ navigateEventCount += 1;
57
+ };
58
+ const navbar = await fixture(`<tt-navbar clientKey=${CLIENT_KEY}></tt-navbar>`);
59
+ navbar.navigate = onNavigate;
60
+ await navbar.updateComplete;
61
+ const links = navbar.shadowRoot?.querySelectorAll('a');
62
+ links?.forEach(l => l.click());
63
+ await waitUntil(() => expect(navigateEventCount).to.equal(12), 'navigate event did not fire');
22
64
  });
23
65
  });
24
66
  //# sourceMappingURL=tt-navbar.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tt-navbar.test.js","sourceRoot":"","sources":["../../test/tt-navbar.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,qBAAqB,CAAC;AAE7B,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;I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tNavbar.js';\nimport '../src/tt-navbar.js';\n\ndescribe('TtNavbar', () => {\n it('has a default header \"Hey there\" and counter 5', async () => {\n const el = await fixture<TtNavbar>(html`<tt-navbar></tt-navbar>`);\n\n expect(el.header).to.equal('Hey there');\n expect(el.counter).to.equal(5);\n });\n\n it('increases the counter on button click', async () => {\n const el = await fixture<TtNavbar>(html`<tt-navbar></tt-navbar>`);\n el.shadowRoot!.querySelector('button')!.click();\n\n expect(el.counter).to.equal(6);\n });\n\n it('can override the header via attribute', async () => {\n const el = await fixture<TtNavbar>(html`<tt-navbar header=\"attribute header\"></tt-navbar>`);\n\n expect(el.header).to.equal('attribute header');\n });\n\n it('passes the a11y audit', async () => {\n const el = await fixture<TtNavbar>(html`<tt-navbar></tt-navbar>`);\n\n await expect(el).shadowDom.to.be.accessible();\n });\n});\n"]}
1
+ {"version":3,"file":"tt-navbar.test.js","sourceRoot":"","sources":["../../test/tt-navbar.test.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG9D,oCAAoC;AACpC,MAAM,aAAa,GAAG,CAAC,KAAsC,EAAG,IAAY,EAAC,EAAE;IAC7E,KAAI,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACxB,IAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;YACtC,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA;AAED,MAAM,UAAU,GAAG,YAAY,CAAC;AAEhC,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IAExB,EAAE,CAAC,wDAAwD,EAAE,KAAK,IAAI,EAAE;QACtE,IAAI,CAAC;YACH,MAAM,OAAO,CAAW,yBAAyB,CAAC,CAAC;QACrD,CAAC;QAAC,OAAM,CAAC,EAAE,CAAC;YACV,MAAM,CA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B,GAAG,CAAC,CAAC;QAE3B,MAAM,UAAU,GAAG,CAAC,CAAa,EAAE,EAAE;YACnC,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,kBAAkB,IAAI,CAAC,CAAC;QAC1B,CAAC,CAAA;QAED,MAAM,MAAM,GAAG,MAAM,OAAO,CAAW,wBAAwB,UAAU,eAAe,CAAC,CAAC;QAC1F,MAAM,CAAC,QAAQ,GAAG,UAAU,CAAC;QAC7B,MAAM,MAAM,CAAC,cAAc,CAAC;QAE5B,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC;QACvD,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;QAE/B,MAAM,SAAS,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,6BAA6B,CAAC,CAAC;IAChG,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import '../src/tt-navbar.js';\nimport { expect, fixture, waitUntil } from '@open-wc/testing';\nimport { TtNavbar } from '../src/index.js';\n\n// eslint-disable-next-line no-undef\nconst getLinkByHref = (links: NodeListOf<HTMLAnchorElement> , href: string)=> {\n for(const link of links) {\n if(link.getAttribute('href') === href) {\n return link;\n }\n }\n\n return undefined\n}\n\nconst CLIENT_KEY = 'zxd47KQGAP';\n\ndescribe('TtNavbar', () => {\n\n it(\"should throw an error if the clientKey is not provided\", async () => {\n try {\n await fixture<TtNavbar>(`<tt-navbar></tt-navbar>`);\n } catch(e) {\n expect(e).to.match(/clientKey is required/);\n }\n })\n it('should render with the default links', async () => {\n const navbar = await fixture<TtNavbar>(`<tt-navbar clientKey=${CLIENT_KEY}></tt-navbar>`);\n const links = navbar.shadowRoot?.querySelectorAll('a');\n\n expect(links?.length).to.equal(13);\n\n if(links) {\n expect(getLinkByHref(links, '/')).to.exist;\n expect(getLinkByHref(links, 'https://app.campaign-manager.triptease.io')).to.exist;\n expect(getLinkByHref(links, '/channels')).to.exist;\n expect(getLinkByHref(links, `/parity/${CLIENT_KEY}`)).to.exist;\n expect(getLinkByHref(links, `/guest-insights/${CLIENT_KEY}`)).to.exist;\n expect(getLinkByHref(links, `/${CLIENT_KEY}/guest-behavioural-data`)).to.exist;\n expect(getLinkByHref(links, `/${CLIENT_KEY}/crm-config`)).to.exist;\n expect(getLinkByHref(links, `/settings/group`)).to.exist;\n expect(getLinkByHref(links, `/settings/${CLIENT_KEY}/hotels/`)).to.exist;\n expect(getLinkByHref(links, `/account`)).to.exist;\n expect(getLinkByHref(links, `/account/team/${CLIENT_KEY}`)).to.exist;\n expect(getLinkByHref(links, `/account/billing-management/${CLIENT_KEY}`)).to.exist;\n expect(getLinkByHref(links, `/subscriptions/${CLIENT_KEY}`)).to.exist;\n }\n\n });\n\n it('should render platform URLs against the base URL when it is defined', async () => {\n const baseUrl = 'https://app.triptease.io';\n const navbar = await fixture<TtNavbar>(`<tt-navbar clientKey=${CLIENT_KEY} baseUrl=\"${baseUrl}\"></tt-navbar>`);\n const links = navbar.shadowRoot?.querySelectorAll('a');\n\n if(links) {\n expect(getLinkByHref(links, `${baseUrl}/`)).to.exist;\n expect(getLinkByHref(links, 'https://app.campaign-manager.triptease.io')).to.exist; // This shouldn't change\n expect(getLinkByHref(links, `${baseUrl}/channels`)).to.exist;\n }\n });\n\n it('should allow navigation events to be handled externally', async () => {\n let navigateEventCount = 0;\n\n const onNavigate = (e: MouseEvent) => {\n e.preventDefault();\n navigateEventCount += 1;\n }\n\n const navbar = await fixture<TtNavbar>(`<tt-navbar clientKey=${CLIENT_KEY}></tt-navbar>`);\n navbar.navigate = onNavigate;\n await navbar.updateComplete;\n\n const links = navbar.shadowRoot?.querySelectorAll('a');\n links?.forEach(l => l.click());\n\n await waitUntil(() => expect(navigateEventCount).to.equal(12), 'navigate event did not fire');\n });\n});\n"]}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @triptease/tt-navbar v0.0.2
2
+ * @triptease/tt-navbar v0.0.5
3
3
  */
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -590,36 +590,134 @@ function n4(t3) {
590
590
  })(t3, e5, o6);
591
591
  }
592
592
 
593
+ // src/styles.ts
594
+ var styles = i`
595
+ nav {
596
+ max-width: 260px;
597
+ display: flex;
598
+ flex-direction: column;
599
+ }
600
+
601
+ nav details div {
602
+ display: flex;
603
+ flex-direction: column;
604
+ }
605
+
606
+ hr {
607
+ background: black;
608
+ width: 100%;
609
+ height: 1px;
610
+ border: none;
611
+ }
612
+ `;
613
+
593
614
  // src/TtNavbar.ts
594
615
  var TtNavbar = class extends i4 {
595
616
  constructor() {
596
617
  super(...arguments);
597
- this.header = "Hey there";
598
- this.counter = 5;
599
- }
600
- __increment() {
601
- this.counter += 1;
618
+ this.buildUrl = (path) => {
619
+ if (!this.clientKey) throw new Error("clientKey is required");
620
+ const formattedPath = path.replace("$CLIENT_KEY", this.clientKey);
621
+ if (!this.baseUrl) return formattedPath;
622
+ return new URL(formattedPath, this.baseUrl).toString();
623
+ };
624
+ this.onAnchorClick = (e5) => {
625
+ if (this.navigate) {
626
+ this.navigate(e5);
627
+ }
628
+ };
602
629
  }
603
630
  render() {
604
631
  return x`
605
- <h2>${this.header} Nr. ${this.counter}!</h2>
606
- <button @click=${this.__increment}>increment</button>
632
+ <nav id=${this.id}>
633
+ <a href=${this.buildUrl("/")} @click=${this.onAnchorClick}>Dashboard</a>
634
+ <a href="https://app.campaign-manager.triptease.io">Campaigns</a>
635
+ <a href=${this.buildUrl("/channels")} @click=${this.onAnchorClick}
636
+ >Channels</a
637
+ >
638
+ <details>
639
+ <summary>Market Insights</summary>
640
+ <div>
641
+ <a
642
+ href=${this.buildUrl("/parity/$CLIENT_KEY")}
643
+ @click=${this.onAnchorClick}
644
+ >Parity</a
645
+ >
646
+ <a
647
+ href=${this.buildUrl("/guest-insights/$CLIENT_KEY")}
648
+ @click=${this.onAnchorClick}
649
+ >Guest insights</a
650
+ >
651
+ </div>
652
+ </details>
653
+ <details>
654
+ <summary>Settings</summary>
655
+ <div>
656
+ <a
657
+ href=${this.buildUrl("/$CLIENT_KEY/guest-behavioural-data")}
658
+ @click=${this.onAnchorClick}
659
+ >Email setup</a
660
+ >
661
+ <a
662
+ href=${this.buildUrl("/$CLIENT_KEY/crm-config")}
663
+ @click=${this.onAnchorClick}
664
+ >CRM connectivity</a
665
+ >
666
+ <a
667
+ href=${this.buildUrl("/settings/group")}
668
+ @click=${this.onAnchorClick}
669
+ >Group settings</a
670
+ >
671
+ <a
672
+ href=${this.buildUrl("/settings/$CLIENT_KEY/hotels/")}
673
+ @click=${this.onAnchorClick}
674
+ >Property settings</a
675
+ >
676
+ </div>
677
+ </details>
678
+ <hr />
679
+ <details>
680
+ <summary>Account</summary>
681
+ <div>
682
+ <a href=${this.buildUrl("/account")} @click=${this.onAnchorClick}
683
+ >User settings</a
684
+ >
685
+ <a
686
+ href=${this.buildUrl("/account/team/$CLIENT_KEY")}
687
+ @click=${this.onAnchorClick}
688
+ >Team and permissions</a
689
+ >
690
+ </div>
691
+ </details>
692
+ <details>
693
+ <summary>Billing</summary>
694
+ <div>
695
+ <a
696
+ href=${this.buildUrl("/account/billing-management/$CLIENT_KEY")}
697
+ @click=${this.onAnchorClick}
698
+ >Booking reconciliation</a
699
+ >
700
+ <a
701
+ href=${this.buildUrl("/subscriptions/$CLIENT_KEY")}
702
+ @click=${this.onAnchorClick}
703
+ >Subscriptions</a
704
+ >
705
+ </div>
706
+ </details>
707
+ </nav>
607
708
  `;
608
709
  }
609
710
  };
610
- TtNavbar.styles = i`
611
- :host {
612
- display: block;
613
- padding: 25px;
614
- color: var(--tt-navbar-text-color, #000);
615
- }
616
- `;
711
+ TtNavbar.styles = styles;
712
+ __decorateClass([
713
+ n4({ type: Function })
714
+ ], TtNavbar.prototype, "navigate", 2);
617
715
  __decorateClass([
618
716
  n4({ type: String })
619
- ], TtNavbar.prototype, "header", 2);
717
+ ], TtNavbar.prototype, "baseUrl", 2);
620
718
  __decorateClass([
621
- n4({ type: Number })
622
- ], TtNavbar.prototype, "counter", 2);
719
+ n4({ type: String })
720
+ ], TtNavbar.prototype, "clientKey", 2);
623
721
  export {
624
722
  TtNavbar
625
723
  };