globuswebcomponents 0.7.4 → 0.7.6

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.
@@ -1,7 +1,7 @@
1
1
  import { h, Fragment, getAssetPath } from "@stencil/core";
2
2
  export class GbSidebar {
3
3
  constructor() {
4
- this.state = undefined;
4
+ this.state = 'expanded';
5
5
  this.category = undefined;
6
6
  this.showSecondCategory = false;
7
7
  this.applicationName = '';
@@ -40,11 +40,13 @@ export class GbSidebar {
40
40
  if (this.state === 'expanded') {
41
41
  this.state = 'collapsed';
42
42
  }
43
+ this.sidebarState.emit('collapsed');
43
44
  }
44
45
  expandSideBar() {
45
46
  if (this.state === 'collapsed') {
46
47
  this.state = 'expanded';
47
48
  }
49
+ this.sidebarState.emit('expanded');
48
50
  }
49
51
  async sideBarItemClicked(index) {
50
52
  this.activeIndex = index;
@@ -68,7 +70,7 @@ export class GbSidebar {
68
70
  const logoSrc = getAssetPath(`assets/globus_bank_logo.svg`);
69
71
  const blueLogoSrc = getAssetPath(`assets/globus_bank_logo_blue.svg`);
70
72
  const whiteLogoSrc = getAssetPath(`assets/globus_bank_logo_white.svg`);
71
- return (h("div", { key: '2f9265c934c3f4dddc1fd2f119690d7dd3e04089', class: `sidebar_div ${this.state} ${this.category}` }, this.category === 'colored_background' && (h("div", { key: '56067a416cac36390f28da3554eab2ffb986b62c', class: "pattern" }, h("img", { key: 'e87935b2330fc0bacc2445883ffa3ee9753e125d', src: patternSrc, alt: "" }))), h("div", { key: 'd7c651a03f0de0a038da557f21a960d3c5041278', class: "nav" }, h("div", { key: 'cf575d0819ecab751c9956898d6fc7e9e2faee5b', class: `sidebar_header ${this.state}` }, h("div", { key: '730975241ede9529ccdd2cc1e18b6f79eb66c20c', class: `logo_and_name ${this.state}` }, this.state === 'expanded' && h(Fragment, null, this.category === 'plain_background' ? h("img", { src: blueLogoSrc }) : h("img", { src: whiteLogoSrc })), this.state === 'collapsed' && h("img", { key: 'df535344d2caabaabcf4a57c75a0e8e157b915ce', src: logoSrc, alt: "" })), h("div", { key: 'a18550cffb54f41657f163515826a83e2fa71fe6', class: `collapse_button ${this.state}` }, h("gb-collapse-button", { key: '6641429be1d6c32ddc562ccacf5ffa74332b7039', color: this.category === 'plain_background' ? 'gray' : 'white', action: this.state === 'collapsed' ? 'expand' : 'collapse', onClick: () => (this.state === 'collapsed' ? this.expandSideBar() : this.collapseSideBar()) }))), h("div", { key: 'bfdd5108ea6eab63bd56c799ec57b637968bd32b', class: "navigation" }, h("div", { key: '8496f8d3196c76d97d70ddd71907925b5413da17', class: "item" }, h("gb-side-bar-item", { key: '5d697d11ed1744997dbbd3310c172b630c76086f', state: this.activeIndex === 0 ? 'active' : 'default', icon: this.firstItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(0), label: this.firstItemLabel }), h("gb-side-bar-item", { key: '8dbd3089b632f7067ce5f84319327f245e9cbde7', state: this.activeIndex === 1 ? 'active' : 'default', icon: this.secondItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(1), label: this.secondItemLabel }), this.thirdItemLabel && (h("gb-side-bar-item", { key: '8f8b634c3ef3f748f1c39798f64371815a3d9158', state: this.activeIndex === 2 ? 'active' : 'default', icon: this.thirdItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(2), label: this.thirdItemLabel })), this.fourthItemLabel && (h("gb-side-bar-item", { key: 'e2ef5660d338cc06807969c342be6179e73e5bb8', state: this.activeIndex === 3 ? 'active' : 'default', icon: this.fourthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(3), label: this.fourthItemLabel })), this.fifthItemLabel && (h("gb-side-bar-item", { key: 'ff84480474accd7cbc7b24b949e3c4fb2e0d921a', state: this.activeIndex === 4 ? 'active' : 'default', icon: this.fifthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(4), label: this.fifthItemLabel })))), this.showSecondCategory && (h("div", { key: '75e3038156ad5b938a429f8cb094c8c9aa6d975c', class: "navigation" }, h("div", { key: '52c4518ff11010b7e31d477f73e60c6e38579881', class: "item" }, this.sixthItemLabel && (h("gb-side-bar-item", { key: '944b9c3f728a3c70996821c57f46107ab948f24c', state: this.activeIndex === 5 ? 'active' : 'default', icon: this.sixthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(5), label: this.sixthItemLabel })), this.seventhItemLabel && (h("gb-side-bar-item", { key: 'cb879b7cbc8f09d5bd1766bde88804130d87d7ed', state: this.activeIndex === 6 ? 'active' : 'default', icon: this.seventhItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(6), label: this.seventhItemLabel })), this.eighthItemLabel && (h("gb-side-bar-item", { key: '6b5fdd1fd1c2ce8ee6a164fcc4c76a8483c42b69', state: this.activeIndex === 7 ? 'active' : 'default', icon: this.eighthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(7), label: this.eighthItemLabel })), this.ninthItemLabel && (h("gb-side-bar-item", { key: '84bee58579a829222125f4b916f25ca410de4c6f', state: this.activeIndex === 8 ? 'active' : 'default', icon: this.ninthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(8), label: this.ninthItemLabel })), this.tenthItemLabel && (h("gb-side-bar-item", { key: '24b5bffc2bae13fb20d1fe1a522732cd2c6aa5b9', state: this.activeIndex === 9 ? 'active' : 'default', icon: this.tenthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(9), label: this.tenthItemLabel })))))), this.state === 'expanded' && (h("div", { key: 'caf65037e5b80e5442a2437a2e08440fe420cc3a', class: "application_name" }, h("div", { key: 'fcd55107715b24c5bb8c87508fa7185d68c4b2aa', class: `wrapper ${this.category}` }, this.category === 'plain_background' && (h("div", { key: 'feb2197f78a6fc7aed90ff8e57266283d4890080', class: "application_name_pattern" }, h("img", { key: 'b2e3507f0c1c8df0aac3aedc6eba767b3b89910b', src: patternSrc, alt: "" }))), h("div", { key: '303db193d12410f48c7b4675d9dc7d73e66d10a0', class: `application_icon ${this.category}`, innerHTML: this.leadingIconSvg }), h("span", { key: 'a1f96282e931c70e152f024169cba33c4b0af2c9', class: textClass }, h("slot", { key: '731c3ccbf41c6579a19e35992317fd9acf139411', name: "application_name" })))))));
73
+ return (h("div", { key: '98118ec177b829f3b725b04abb67adb30b6c0029', class: `sidebar_div ${this.state} ${this.category}` }, this.category === 'colored_background' && (h("div", { key: '7588ff880eda0e996ad9882c8eb5165e98a411c4', class: "pattern" }, h("img", { key: '29ace462727158571530ca8add8a4107eaa9262f', src: patternSrc, alt: "" }))), h("div", { key: '231ab489ed4390391b29d3f7ebc9931c3af7156a', class: "nav" }, h("div", { key: 'f813ec6d909fca607b86b0b322df51e702ab6a0f', class: `sidebar_header ${this.state}` }, h("div", { key: '50597e12d7ad1a2167bba4a85a164a9aecd6c021', class: `logo_and_name ${this.state}` }, this.state === 'expanded' && h(Fragment, null, this.category === 'plain_background' ? h("img", { src: blueLogoSrc }) : h("img", { src: whiteLogoSrc })), this.state === 'collapsed' && h("img", { key: 'fb0fd20df297b3457b01b3291f967d108419d20d', src: logoSrc, alt: "" })), h("div", { key: '252d021bad121117809b1e43ae54072756e66754', class: `collapse_button ${this.state}` }, h("gb-collapse-button", { key: 'b0a9b6a022483459a062661d98eea16714349c45', color: this.category === 'plain_background' ? 'gray' : 'white', action: this.state === 'collapsed' ? 'expand' : 'collapse', onClick: () => (this.state === 'collapsed' ? this.expandSideBar() : this.collapseSideBar()) }))), h("div", { key: '46bbfa8c0e36a3c52fa29d5691bbfd13164d18c3', class: "navigation" }, h("div", { key: 'd1e7595e16bb8cd71ad1737f89ae4039865bc4b5', class: "item" }, h("gb-side-bar-item", { key: '03cdce0fd2fbdb0223c8d1d0dac9ae8b8a7724b4', state: this.activeIndex === 0 ? 'active' : 'default', icon: this.firstItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(0), label: this.firstItemLabel }), h("gb-side-bar-item", { key: '6a6a7b580e5a050fe546b3f0da6e46bbdf4e8b84', state: this.activeIndex === 1 ? 'active' : 'default', icon: this.secondItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(1), label: this.secondItemLabel }), this.thirdItemLabel && (h("gb-side-bar-item", { key: '8e7108aa0ba29d572b18912b24d66f1a42fb7ad9', state: this.activeIndex === 2 ? 'active' : 'default', icon: this.thirdItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(2), label: this.thirdItemLabel })), this.fourthItemLabel && (h("gb-side-bar-item", { key: '4fddc87f64cd9b2c61a3863c427e6b92ac321e56', state: this.activeIndex === 3 ? 'active' : 'default', icon: this.fourthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(3), label: this.fourthItemLabel })), this.fifthItemLabel && (h("gb-side-bar-item", { key: '2929bab64a03ee33fcdfb802dab28bf223191ae5', state: this.activeIndex === 4 ? 'active' : 'default', icon: this.fifthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(4), label: this.fifthItemLabel })))), this.showSecondCategory && (h("div", { key: '07665c026fd805928339fe141fc403873408c59c', class: "navigation" }, h("div", { key: '70834cd7fafd42d1215f8f6adfec5661d910073a', class: "item" }, this.sixthItemLabel && (h("gb-side-bar-item", { key: 'b5b18a24b0ae438fb0e83726bc19ac3bf94db8fc', state: this.activeIndex === 5 ? 'active' : 'default', icon: this.sixthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(5), label: this.sixthItemLabel })), this.seventhItemLabel && (h("gb-side-bar-item", { key: 'c2d689200324af8cce99af0e12a622aa18b2925f', state: this.activeIndex === 6 ? 'active' : 'default', icon: this.seventhItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(6), label: this.seventhItemLabel })), this.eighthItemLabel && (h("gb-side-bar-item", { key: '41dcb87058034bede580bc6935d968d0c5a893eb', state: this.activeIndex === 7 ? 'active' : 'default', icon: this.eighthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(7), label: this.eighthItemLabel })), this.ninthItemLabel && (h("gb-side-bar-item", { key: '31cf5a87ee3e918e3a2f5dfea39c00f4413d2598', state: this.activeIndex === 8 ? 'active' : 'default', icon: this.ninthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(8), label: this.ninthItemLabel })), this.tenthItemLabel && (h("gb-side-bar-item", { key: '76044610ec56dc464fd2de206d4c3fc8dfe583cb', state: this.activeIndex === 9 ? 'active' : 'default', icon: this.tenthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(9), label: this.tenthItemLabel })))))), this.state === 'expanded' && (h("div", { key: '4c024ac92a6f639e7bb4539ae1d9f7242d3bc478', class: "application_name" }, h("div", { key: '346d0bda9aba59c6afd97c2941d12c6cdc8f4daf', class: `wrapper ${this.category}` }, this.category === 'plain_background' && (h("div", { key: 'dac6d8bac548e95afa6096fa6f00133f4b936790', class: "application_name_pattern" }, h("img", { key: '3448819c47f118a7bfeffe7540b78cb30f126558', src: patternSrc, alt: "" }))), h("div", { key: '8c510c8c5df2923d07ab4cd94daefc383cb066cd', class: `application_icon ${this.category}`, innerHTML: this.leadingIconSvg }), h("span", { key: '55fd5b4a54684e6b9f6fad99304e9d0554fe6af0', class: textClass }, h("slot", { key: 'a234fc2009b2392a8dc7926c080b51eff2daab2a', name: "application_name" })))))));
72
74
  }
73
75
  static get is() { return "gb-sidebar"; }
74
76
  static get encapsulation() { return "shadow"; }
@@ -99,7 +101,8 @@ export class GbSidebar {
99
101
  "text": ""
100
102
  },
101
103
  "attribute": "state",
102
- "reflect": false
104
+ "reflect": false,
105
+ "defaultValue": "'expanded'"
103
106
  },
104
107
  "category": {
105
108
  "type": "string",
@@ -597,6 +600,21 @@ export class GbSidebar {
597
600
  "resolved": "number",
598
601
  "references": {}
599
602
  }
603
+ }, {
604
+ "method": "sidebarState",
605
+ "name": "sidebarState",
606
+ "bubbles": true,
607
+ "cancelable": true,
608
+ "composed": true,
609
+ "docs": {
610
+ "tags": [],
611
+ "text": ""
612
+ },
613
+ "complexType": {
614
+ "original": "string",
615
+ "resolved": "string",
616
+ "references": {}
617
+ }
600
618
  }];
601
619
  }
602
620
  static get methods() {
@@ -1 +1 @@
1
- {"version":3,"file":"gb-sidebar.js","sourceRoot":"","sources":["../../../src/components/gb-sidebar/gb-sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAQxH,MAAM,OAAO,SAAS;;;;kCAGkB,KAAK;+BACT,EAAE;6BACJ,EAAE;8BACD,EAAE;6BACH,EAAE;8BACD,EAAE;6BACH,EAAE;6BACF,EAAE;+BACA,EAAE;8BACH,EAAE;6BACH,EAAE;6BACF,EAAE;4BACH,EAAE;qBACT,EAAE;8BACO,EAAE;+BACD,EAAE;8BACH,EAAE;+BACD,EAAE;8BACH,EAAE;8BACF,EAAE;gCACA,EAAE;+BACH,EAAE;8BACH,E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AA0B;wBACnC,4DAAK,GAAG,EAAE,UAAU,EAAE,GAAG,EAAC,EAAE,GAAG,CAC3B,CACP;oBACD,4DAAK,KAAK,EAAE,oBAAoB,IAAI,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,cAAc,GAAQ;oBACvF,6DAAM,KAAK,EAAE,SAAS;wBACpB,6DAAM,IAAI,EAAC,kBAAkB,GAAQ,CAChC,CACH,CACF,CACP,CACG,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop, Fragment, State, getAssetPath, Method, Event, EventEmitter } from \"@stencil/core\";\r\nimport { GeneralBackgroundCategories } from \"../../models/reusableModels\";\r\n\r\n@Component({\r\n tag: 'gb-sidebar',\r\n styleUrl: 'gb-sidebar.css',\r\n shadow: true,\r\n})\r\nexport class GbSidebar {\r\n @Prop({ mutable: true }) state: 'expanded' | 'collapsed';\r\n @Prop() category: GeneralBackgroundCategories;\r\n @Prop() showSecondCategory: boolean = false;\r\n @Prop() applicationName: string = '';\r\n @Prop() firstItemIcon: string = '';\r\n @Prop() secondItemIcon: string = '';\r\n @Prop() thirdItemIcon: string = '';\r\n @Prop() fourthItemIcon: string = '';\r\n @Prop() fifthItemIcon: string = '';\r\n @Prop() sixthItemIcon: string = '';\r\n @Prop() seventhItemIcon: string = '';\r\n @Prop() eighthItemIcon: string = '';\r\n @Prop() ninthItemIcon: string = '';\r\n @Prop() tenthItemIcon: string = '';\r\n @Prop() iconInstance: string = '';\r\n @Prop() label: string = '';\r\n @Prop() firstItemLabel: string = '';\r\n @Prop() secondItemLabel: string = '';\r\n @Prop() thirdItemLabel: string = '';\r\n @Prop() fourthItemLabel: string = '';\r\n @Prop() fifthItemLabel: string = '';\r\n @Prop() sixthItemLabel: string = '';\r\n @Prop() seventhItemLabel: string = '';\r\n @Prop() eighthItemLabel: string = '';\r\n @Prop() ninthItemLabel: string = '';\r\n @Prop() tenthItemLabel: string = '';\r\n @Element() el: HTMLElement;\r\n @Prop({ mutable: true }) activeIndex: number = 0;\r\n @State() leadingIconSvg: string = '';\r\n @Event() sidebarItemClicked: EventEmitter<number>;\r\n\r\n async loadIcon(iconName: string) {\r\n const iconPath = getAssetPath(`${iconName}`);\r\n const response = await fetch(iconPath);\r\n const svg = await response.text();\r\n this.leadingIconSvg = svg;\r\n }\r\n\r\n collapseSideBar() {\r\n if (this.state === 'expanded') {\r\n this.state = 'collapsed';\r\n }\r\n }\r\n\r\n expandSideBar() {\r\n if (this.state === 'collapsed') {\r\n this.state = 'expanded';\r\n }\r\n }\r\n\r\n @Method()\r\n async sideBarItemClicked(index: number) {\r\n this.activeIndex = index;\r\n localStorage.setItem('activeIndex', index.toString());\r\n this.sidebarItemClicked.emit(index);\r\n }\r\n\r\n componentDidLoad() {\r\n const applicationName = this.el.querySelector('[slot=\"application_name\"]');\r\n\r\n applicationName.classList.add('text-lg-bold');\r\n }\r\n\r\n componentWillLoad() {\r\n this.loadIcon(this.iconInstance);\r\n const storedIndex = localStorage.getItem('activeIndex');\r\n if (storedIndex !== null) {\r\n this.activeIndex = parseInt(storedIndex, 10); // Retrieve active index from localStorage\r\n }\r\n }\r\n\r\n render() {\r\n const textClass = this.category === 'plain_background' ? 'plain_background_color' : 'colored_background_color';\r\n const patternSrc = getAssetPath(`assets/pattern_wrapper.svg`);\r\n const logoSrc = getAssetPath(`assets/globus_bank_logo.svg`);\r\n const blueLogoSrc = getAssetPath(`assets/globus_bank_logo_blue.svg`);\r\n const whiteLogoSrc = getAssetPath(`assets/globus_bank_logo_white.svg`);\r\n\r\n return (\r\n <div class={`sidebar_div ${this.state} ${this.category}`}>\r\n {this.category === 'colored_background' && (\r\n <div class=\"pattern\">\r\n <img src={patternSrc} alt=\"\" />\r\n </div>\r\n )}\r\n <div class=\"nav\">\r\n <div class={`sidebar_header ${this.state}`}>\r\n <div class={`logo_and_name ${this.state}`}>\r\n {this.state === 'expanded' && <>{this.category === 'plain_background' ? <img src={blueLogoSrc} /> : <img src={whiteLogoSrc} />}</>}\r\n {this.state === 'collapsed' && <img src={logoSrc} alt=\"\" />}\r\n </div>\r\n <div class={`collapse_button ${this.state}`}>\r\n <gb-collapse-button\r\n color={this.category === 'plain_background' ? 'gray' : 'white'}\r\n action={this.state === 'collapsed' ? 'expand' : 'collapse'}\r\n onClick={() => (this.state === 'collapsed' ? this.expandSideBar() : this.collapseSideBar())}\r\n ></gb-collapse-button>\r\n </div>\r\n </div>\r\n <div class=\"navigation\">\r\n <div class=\"item\">\r\n <gb-side-bar-item\r\n state={this.activeIndex === 0 ? 'active' : 'default'}\r\n icon={this.firstItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(0)}\r\n label={this.firstItemLabel}\r\n ></gb-side-bar-item>\r\n <gb-side-bar-item\r\n state={this.activeIndex === 1 ? 'active' : 'default'}\r\n icon={this.secondItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(1)}\r\n label={this.secondItemLabel}\r\n ></gb-side-bar-item>\r\n {this.thirdItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 2 ? 'active' : 'default'}\r\n icon={this.thirdItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(2)}\r\n label={this.thirdItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.fourthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 3 ? 'active' : 'default'}\r\n icon={this.fourthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(3)}\r\n label={this.fourthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.fifthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 4 ? 'active' : 'default'}\r\n icon={this.fifthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(4)}\r\n label={this.fifthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n </div>\r\n </div>\r\n {this.showSecondCategory && (\r\n <div class=\"navigation\">\r\n <div class=\"item\">\r\n {this.sixthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 5 ? 'active' : 'default'}\r\n icon={this.sixthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(5)}\r\n label={this.sixthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.seventhItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 6 ? 'active' : 'default'}\r\n icon={this.seventhItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(6)}\r\n label={this.seventhItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.eighthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 7 ? 'active' : 'default'}\r\n icon={this.eighthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(7)}\r\n label={this.eighthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.ninthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 8 ? 'active' : 'default'}\r\n icon={this.ninthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(8)}\r\n label={this.ninthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.tenthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 9 ? 'active' : 'default'}\r\n icon={this.tenthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(9)}\r\n label={this.tenthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n {this.state === 'expanded' && (\r\n <div class=\"application_name\">\r\n <div class={`wrapper ${this.category}`}>\r\n {this.category === 'plain_background' && (\r\n <div class=\"application_name_pattern\">\r\n <img src={patternSrc} alt=\"\" />\r\n </div>\r\n )}\r\n <div class={`application_icon ${this.category}`} innerHTML={this.leadingIconSvg}></div>\r\n <span class={textClass}>\r\n <slot name=\"application_name\"></slot>\r\n </span>\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n );\r\n }\r\n}"]}
1
+ {"version":3,"file":"gb-sidebar.js","sourceRoot":"","sources":["../../../src/components/gb-sidebar/gb-sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop, Fragment, State, getAssetPath, Method, Event, EventEmitter } from \"@stencil/core\";\r\nimport { GeneralBackgroundCategories } from \"../../models/reusableModels\";\r\n\r\n@Component({\r\n tag: 'gb-sidebar',\r\n styleUrl: 'gb-sidebar.css',\r\n shadow: true,\r\n})\r\nexport class GbSidebar {\r\n @Prop({ mutable: true }) state: 'expanded' | 'collapsed' = 'expanded';\r\n @Prop() category: GeneralBackgroundCategories;\r\n @Prop() showSecondCategory: boolean = false;\r\n @Prop() applicationName: string = '';\r\n @Prop() firstItemIcon: string = '';\r\n @Prop() secondItemIcon: string = '';\r\n @Prop() thirdItemIcon: string = '';\r\n @Prop() fourthItemIcon: string = '';\r\n @Prop() fifthItemIcon: string = '';\r\n @Prop() sixthItemIcon: string = '';\r\n @Prop() seventhItemIcon: string = '';\r\n @Prop() eighthItemIcon: string = '';\r\n @Prop() ninthItemIcon: string = '';\r\n @Prop() tenthItemIcon: string = '';\r\n @Prop() iconInstance: string = '';\r\n @Prop() label: string = '';\r\n @Prop() firstItemLabel: string = '';\r\n @Prop() secondItemLabel: string = '';\r\n @Prop() thirdItemLabel: string = '';\r\n @Prop() fourthItemLabel: string = '';\r\n @Prop() fifthItemLabel: string = '';\r\n @Prop() sixthItemLabel: string = '';\r\n @Prop() seventhItemLabel: string = '';\r\n @Prop() eighthItemLabel: string = '';\r\n @Prop() ninthItemLabel: string = '';\r\n @Prop() tenthItemLabel: string = '';\r\n @Element() el: HTMLElement;\r\n @Prop({ mutable: true }) activeIndex: number = 0;\r\n @State() leadingIconSvg: string = '';\r\n @Event() sidebarItemClicked: EventEmitter<number>;\r\n @Event() sidebarState: EventEmitter<string>;\r\n\r\n async loadIcon(iconName: string) {\r\n const iconPath = getAssetPath(`${iconName}`);\r\n const response = await fetch(iconPath);\r\n const svg = await response.text();\r\n this.leadingIconSvg = svg;\r\n }\r\n\r\n collapseSideBar() {\r\n if (this.state === 'expanded') {\r\n this.state = 'collapsed';\r\n }\r\n this.sidebarState.emit('collapsed');\r\n }\r\n\r\n expandSideBar() {\r\n if (this.state === 'collapsed') {\r\n this.state = 'expanded';\r\n }\r\n this.sidebarState.emit('expanded');\r\n }\r\n\r\n @Method()\r\n async sideBarItemClicked(index: number) {\r\n this.activeIndex = index;\r\n localStorage.setItem('activeIndex', index.toString());\r\n this.sidebarItemClicked.emit(index);\r\n }\r\n\r\n componentDidLoad() {\r\n const applicationName = this.el.querySelector('[slot=\"application_name\"]');\r\n\r\n applicationName.classList.add('text-lg-bold');\r\n }\r\n\r\n componentWillLoad() {\r\n this.loadIcon(this.iconInstance);\r\n const storedIndex = localStorage.getItem('activeIndex');\r\n if (storedIndex !== null) {\r\n this.activeIndex = parseInt(storedIndex, 10); // Retrieve active index from localStorage\r\n }\r\n }\r\n\r\n render() {\r\n const textClass = this.category === 'plain_background' ? 'plain_background_color' : 'colored_background_color';\r\n const patternSrc = getAssetPath(`assets/pattern_wrapper.svg`);\r\n const logoSrc = getAssetPath(`assets/globus_bank_logo.svg`);\r\n const blueLogoSrc = getAssetPath(`assets/globus_bank_logo_blue.svg`);\r\n const whiteLogoSrc = getAssetPath(`assets/globus_bank_logo_white.svg`);\r\n\r\n return (\r\n <div class={`sidebar_div ${this.state} ${this.category}`}>\r\n {this.category === 'colored_background' && (\r\n <div class=\"pattern\">\r\n <img src={patternSrc} alt=\"\" />\r\n </div>\r\n )}\r\n <div class=\"nav\">\r\n <div class={`sidebar_header ${this.state}`}>\r\n <div class={`logo_and_name ${this.state}`}>\r\n {this.state === 'expanded' && <>{this.category === 'plain_background' ? <img src={blueLogoSrc} /> : <img src={whiteLogoSrc} />}</>}\r\n {this.state === 'collapsed' && <img src={logoSrc} alt=\"\" />}\r\n </div>\r\n <div class={`collapse_button ${this.state}`}>\r\n <gb-collapse-button\r\n color={this.category === 'plain_background' ? 'gray' : 'white'}\r\n action={this.state === 'collapsed' ? 'expand' : 'collapse'}\r\n onClick={() => (this.state === 'collapsed' ? this.expandSideBar() : this.collapseSideBar())}\r\n ></gb-collapse-button>\r\n </div>\r\n </div>\r\n <div class=\"navigation\">\r\n <div class=\"item\">\r\n <gb-side-bar-item\r\n state={this.activeIndex === 0 ? 'active' : 'default'}\r\n icon={this.firstItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(0)}\r\n label={this.firstItemLabel}\r\n ></gb-side-bar-item>\r\n <gb-side-bar-item\r\n state={this.activeIndex === 1 ? 'active' : 'default'}\r\n icon={this.secondItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(1)}\r\n label={this.secondItemLabel}\r\n ></gb-side-bar-item>\r\n {this.thirdItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 2 ? 'active' : 'default'}\r\n icon={this.thirdItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(2)}\r\n label={this.thirdItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.fourthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 3 ? 'active' : 'default'}\r\n icon={this.fourthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(3)}\r\n label={this.fourthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.fifthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 4 ? 'active' : 'default'}\r\n icon={this.fifthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(4)}\r\n label={this.fifthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n </div>\r\n </div>\r\n {this.showSecondCategory && (\r\n <div class=\"navigation\">\r\n <div class=\"item\">\r\n {this.sixthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 5 ? 'active' : 'default'}\r\n icon={this.sixthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(5)}\r\n label={this.sixthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.seventhItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 6 ? 'active' : 'default'}\r\n icon={this.seventhItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(6)}\r\n label={this.seventhItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.eighthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 7 ? 'active' : 'default'}\r\n icon={this.eighthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(7)}\r\n label={this.eighthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.ninthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 8 ? 'active' : 'default'}\r\n icon={this.ninthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(8)}\r\n label={this.ninthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.tenthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 9 ? 'active' : 'default'}\r\n icon={this.tenthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(9)}\r\n label={this.tenthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n {this.state === 'expanded' && (\r\n <div class=\"application_name\">\r\n <div class={`wrapper ${this.category}`}>\r\n {this.category === 'plain_background' && (\r\n <div class=\"application_name_pattern\">\r\n <img src={patternSrc} alt=\"\" />\r\n </div>\r\n )}\r\n <div class={`application_icon ${this.category}`} innerHTML={this.leadingIconSvg}></div>\r\n <span class={textClass}>\r\n <slot name=\"application_name\"></slot>\r\n </span>\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n );\r\n }\r\n}"]}
@@ -17,7 +17,8 @@ const GbSidebar$1 = /*@__PURE__*/ proxyCustomElement(class GbSidebar extends H {
17
17
  this.__registerHost();
18
18
  this.__attachShadow();
19
19
  this.sidebarItemClicked = createEvent(this, "sidebarItemClicked", 7);
20
- this.state = undefined;
20
+ this.sidebarState = createEvent(this, "sidebarState", 7);
21
+ this.state = 'expanded';
21
22
  this.category = undefined;
22
23
  this.showSecondCategory = false;
23
24
  this.applicationName = '';
@@ -56,11 +57,13 @@ const GbSidebar$1 = /*@__PURE__*/ proxyCustomElement(class GbSidebar extends H {
56
57
  if (this.state === 'expanded') {
57
58
  this.state = 'collapsed';
58
59
  }
60
+ this.sidebarState.emit('collapsed');
59
61
  }
60
62
  expandSideBar() {
61
63
  if (this.state === 'collapsed') {
62
64
  this.state = 'expanded';
63
65
  }
66
+ this.sidebarState.emit('expanded');
64
67
  }
65
68
  async sideBarItemClicked(index) {
66
69
  this.activeIndex = index;
@@ -84,7 +87,7 @@ const GbSidebar$1 = /*@__PURE__*/ proxyCustomElement(class GbSidebar extends H {
84
87
  const logoSrc = getAssetPath(`assets/globus_bank_logo.svg`);
85
88
  const blueLogoSrc = getAssetPath(`assets/globus_bank_logo_blue.svg`);
86
89
  const whiteLogoSrc = getAssetPath(`assets/globus_bank_logo_white.svg`);
87
- return (h("div", { key: '2f9265c934c3f4dddc1fd2f119690d7dd3e04089', class: `sidebar_div ${this.state} ${this.category}` }, this.category === 'colored_background' && (h("div", { key: '56067a416cac36390f28da3554eab2ffb986b62c', class: "pattern" }, h("img", { key: 'e87935b2330fc0bacc2445883ffa3ee9753e125d', src: patternSrc, alt: "" }))), h("div", { key: 'd7c651a03f0de0a038da557f21a960d3c5041278', class: "nav" }, h("div", { key: 'cf575d0819ecab751c9956898d6fc7e9e2faee5b', class: `sidebar_header ${this.state}` }, h("div", { key: '730975241ede9529ccdd2cc1e18b6f79eb66c20c', class: `logo_and_name ${this.state}` }, this.state === 'expanded' && h(Fragment, null, this.category === 'plain_background' ? h("img", { src: blueLogoSrc }) : h("img", { src: whiteLogoSrc })), this.state === 'collapsed' && h("img", { key: 'df535344d2caabaabcf4a57c75a0e8e157b915ce', src: logoSrc, alt: "" })), h("div", { key: 'a18550cffb54f41657f163515826a83e2fa71fe6', class: `collapse_button ${this.state}` }, h("gb-collapse-button", { key: '6641429be1d6c32ddc562ccacf5ffa74332b7039', color: this.category === 'plain_background' ? 'gray' : 'white', action: this.state === 'collapsed' ? 'expand' : 'collapse', onClick: () => (this.state === 'collapsed' ? this.expandSideBar() : this.collapseSideBar()) }))), h("div", { key: 'bfdd5108ea6eab63bd56c799ec57b637968bd32b', class: "navigation" }, h("div", { key: '8496f8d3196c76d97d70ddd71907925b5413da17', class: "item" }, h("gb-side-bar-item", { key: '5d697d11ed1744997dbbd3310c172b630c76086f', state: this.activeIndex === 0 ? 'active' : 'default', icon: this.firstItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(0), label: this.firstItemLabel }), h("gb-side-bar-item", { key: '8dbd3089b632f7067ce5f84319327f245e9cbde7', state: this.activeIndex === 1 ? 'active' : 'default', icon: this.secondItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(1), label: this.secondItemLabel }), this.thirdItemLabel && (h("gb-side-bar-item", { key: '8f8b634c3ef3f748f1c39798f64371815a3d9158', state: this.activeIndex === 2 ? 'active' : 'default', icon: this.thirdItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(2), label: this.thirdItemLabel })), this.fourthItemLabel && (h("gb-side-bar-item", { key: 'e2ef5660d338cc06807969c342be6179e73e5bb8', state: this.activeIndex === 3 ? 'active' : 'default', icon: this.fourthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(3), label: this.fourthItemLabel })), this.fifthItemLabel && (h("gb-side-bar-item", { key: 'ff84480474accd7cbc7b24b949e3c4fb2e0d921a', state: this.activeIndex === 4 ? 'active' : 'default', icon: this.fifthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(4), label: this.fifthItemLabel })))), this.showSecondCategory && (h("div", { key: '75e3038156ad5b938a429f8cb094c8c9aa6d975c', class: "navigation" }, h("div", { key: '52c4518ff11010b7e31d477f73e60c6e38579881', class: "item" }, this.sixthItemLabel && (h("gb-side-bar-item", { key: '944b9c3f728a3c70996821c57f46107ab948f24c', state: this.activeIndex === 5 ? 'active' : 'default', icon: this.sixthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(5), label: this.sixthItemLabel })), this.seventhItemLabel && (h("gb-side-bar-item", { key: 'cb879b7cbc8f09d5bd1766bde88804130d87d7ed', state: this.activeIndex === 6 ? 'active' : 'default', icon: this.seventhItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(6), label: this.seventhItemLabel })), this.eighthItemLabel && (h("gb-side-bar-item", { key: '6b5fdd1fd1c2ce8ee6a164fcc4c76a8483c42b69', state: this.activeIndex === 7 ? 'active' : 'default', icon: this.eighthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(7), label: this.eighthItemLabel })), this.ninthItemLabel && (h("gb-side-bar-item", { key: '84bee58579a829222125f4b916f25ca410de4c6f', state: this.activeIndex === 8 ? 'active' : 'default', icon: this.ninthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(8), label: this.ninthItemLabel })), this.tenthItemLabel && (h("gb-side-bar-item", { key: '24b5bffc2bae13fb20d1fe1a522732cd2c6aa5b9', state: this.activeIndex === 9 ? 'active' : 'default', icon: this.tenthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(9), label: this.tenthItemLabel })))))), this.state === 'expanded' && (h("div", { key: 'caf65037e5b80e5442a2437a2e08440fe420cc3a', class: "application_name" }, h("div", { key: 'fcd55107715b24c5bb8c87508fa7185d68c4b2aa', class: `wrapper ${this.category}` }, this.category === 'plain_background' && (h("div", { key: 'feb2197f78a6fc7aed90ff8e57266283d4890080', class: "application_name_pattern" }, h("img", { key: 'b2e3507f0c1c8df0aac3aedc6eba767b3b89910b', src: patternSrc, alt: "" }))), h("div", { key: '303db193d12410f48c7b4675d9dc7d73e66d10a0', class: `application_icon ${this.category}`, innerHTML: this.leadingIconSvg }), h("span", { key: 'a1f96282e931c70e152f024169cba33c4b0af2c9', class: textClass }, h("slot", { key: '731c3ccbf41c6579a19e35992317fd9acf139411', name: "application_name" })))))));
90
+ return (h("div", { key: '98118ec177b829f3b725b04abb67adb30b6c0029', class: `sidebar_div ${this.state} ${this.category}` }, this.category === 'colored_background' && (h("div", { key: '7588ff880eda0e996ad9882c8eb5165e98a411c4', class: "pattern" }, h("img", { key: '29ace462727158571530ca8add8a4107eaa9262f', src: patternSrc, alt: "" }))), h("div", { key: '231ab489ed4390391b29d3f7ebc9931c3af7156a', class: "nav" }, h("div", { key: 'f813ec6d909fca607b86b0b322df51e702ab6a0f', class: `sidebar_header ${this.state}` }, h("div", { key: '50597e12d7ad1a2167bba4a85a164a9aecd6c021', class: `logo_and_name ${this.state}` }, this.state === 'expanded' && h(Fragment, null, this.category === 'plain_background' ? h("img", { src: blueLogoSrc }) : h("img", { src: whiteLogoSrc })), this.state === 'collapsed' && h("img", { key: 'fb0fd20df297b3457b01b3291f967d108419d20d', src: logoSrc, alt: "" })), h("div", { key: '252d021bad121117809b1e43ae54072756e66754', class: `collapse_button ${this.state}` }, h("gb-collapse-button", { key: 'b0a9b6a022483459a062661d98eea16714349c45', color: this.category === 'plain_background' ? 'gray' : 'white', action: this.state === 'collapsed' ? 'expand' : 'collapse', onClick: () => (this.state === 'collapsed' ? this.expandSideBar() : this.collapseSideBar()) }))), h("div", { key: '46bbfa8c0e36a3c52fa29d5691bbfd13164d18c3', class: "navigation" }, h("div", { key: 'd1e7595e16bb8cd71ad1737f89ae4039865bc4b5', class: "item" }, h("gb-side-bar-item", { key: '03cdce0fd2fbdb0223c8d1d0dac9ae8b8a7724b4', state: this.activeIndex === 0 ? 'active' : 'default', icon: this.firstItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(0), label: this.firstItemLabel }), h("gb-side-bar-item", { key: '6a6a7b580e5a050fe546b3f0da6e46bbdf4e8b84', state: this.activeIndex === 1 ? 'active' : 'default', icon: this.secondItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(1), label: this.secondItemLabel }), this.thirdItemLabel && (h("gb-side-bar-item", { key: '8e7108aa0ba29d572b18912b24d66f1a42fb7ad9', state: this.activeIndex === 2 ? 'active' : 'default', icon: this.thirdItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(2), label: this.thirdItemLabel })), this.fourthItemLabel && (h("gb-side-bar-item", { key: '4fddc87f64cd9b2c61a3863c427e6b92ac321e56', state: this.activeIndex === 3 ? 'active' : 'default', icon: this.fourthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(3), label: this.fourthItemLabel })), this.fifthItemLabel && (h("gb-side-bar-item", { key: '2929bab64a03ee33fcdfb802dab28bf223191ae5', state: this.activeIndex === 4 ? 'active' : 'default', icon: this.fifthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(4), label: this.fifthItemLabel })))), this.showSecondCategory && (h("div", { key: '07665c026fd805928339fe141fc403873408c59c', class: "navigation" }, h("div", { key: '70834cd7fafd42d1215f8f6adfec5661d910073a', class: "item" }, this.sixthItemLabel && (h("gb-side-bar-item", { key: 'b5b18a24b0ae438fb0e83726bc19ac3bf94db8fc', state: this.activeIndex === 5 ? 'active' : 'default', icon: this.sixthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(5), label: this.sixthItemLabel })), this.seventhItemLabel && (h("gb-side-bar-item", { key: 'c2d689200324af8cce99af0e12a622aa18b2925f', state: this.activeIndex === 6 ? 'active' : 'default', icon: this.seventhItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(6), label: this.seventhItemLabel })), this.eighthItemLabel && (h("gb-side-bar-item", { key: '41dcb87058034bede580bc6935d968d0c5a893eb', state: this.activeIndex === 7 ? 'active' : 'default', icon: this.eighthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(7), label: this.eighthItemLabel })), this.ninthItemLabel && (h("gb-side-bar-item", { key: '31cf5a87ee3e918e3a2f5dfea39c00f4413d2598', state: this.activeIndex === 8 ? 'active' : 'default', icon: this.ninthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(8), label: this.ninthItemLabel })), this.tenthItemLabel && (h("gb-side-bar-item", { key: '76044610ec56dc464fd2de206d4c3fc8dfe583cb', state: this.activeIndex === 9 ? 'active' : 'default', icon: this.tenthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(9), label: this.tenthItemLabel })))))), this.state === 'expanded' && (h("div", { key: '4c024ac92a6f639e7bb4539ae1d9f7242d3bc478', class: "application_name" }, h("div", { key: '346d0bda9aba59c6afd97c2941d12c6cdc8f4daf', class: `wrapper ${this.category}` }, this.category === 'plain_background' && (h("div", { key: 'dac6d8bac548e95afa6096fa6f00133f4b936790', class: "application_name_pattern" }, h("img", { key: '3448819c47f118a7bfeffe7540b78cb30f126558', src: patternSrc, alt: "" }))), h("div", { key: '8c510c8c5df2923d07ab4cd94daefc383cb066cd', class: `application_icon ${this.category}`, innerHTML: this.leadingIconSvg }), h("span", { key: '55fd5b4a54684e6b9f6fad99304e9d0554fe6af0', class: textClass }, h("slot", { key: 'a234fc2009b2392a8dc7926c080b51eff2daab2a', name: "application_name" })))))));
88
91
  }
89
92
  get el() { return this; }
90
93
  static get style() { return GbSidebarStyle0; }
@@ -1 +1 @@
1
- {"file":"gb-sidebar.js","mappings":";;;;;;;;;;AAAA,MAAM,YAAY,GAAG,2mwEAA2mwE,CAAC;AACjowE,wBAAe,YAAY;;MCOdA,WAAS;;;;;;;;kCAGkB,KAAK;+BACT,EAAE;6BACJ,EAAE;8BACD,EAAE;6BACH,EAAE;8BACD,EAAE;6BACH,EAAE;6BACF,EAAE;+BACA,EAAE;8BACH,EAAE;6BACH,EAAE;6BACF,EAAE;4BACH,EAAE;qBACT,EAAE;8BACO,EAAE;+BACD,EAAE;8BACH,EAAE;+BACD,EAAE;8BACH,EAAE;8BACF,EAAE;gCACA,EAAE;+BACH,EAAE;8BACH,EAAE;8BACF,EAAE;2BAE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AC,EACzC,KAAK,EAAE,IAAI,CAAC,cAAc,GACR,CACrB,CACG,CACF,CACP,CACG,EACL,IAAI,CAAC,KAAK,KAAK,UAAU,KACxB,4DAAK,KAAK,EAAC,kBAAkB,IAC3B,4DAAK,KAAK,EAAE,WAAW,IAAI,CAAC,QAAQ,EAAE,IACnC,IAAI,CAAC,QAAQ,KAAK,kBAAkB,KACnC,4DAAK,KAAK,EAAC,0BAA0B,IACnC,4DAAK,GAAG,EAAE,UAAU,EAAE,GAAG,EAAC,EAAE,GAAG,CAC3B,CACP,EACD,4DAAK,KAAK,EAAE,oBAAoB,IAAI,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,cAAc,GAAQ,EACvF,6DAAM,KAAK,EAAE,SAAS,IACpB,6DAAM,IAAI,EAAC,kBAAkB,GAAQ,CAChC,CACH,CACF,CACP,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GbSidebar"],"sources":["src/components/gb-sidebar/gb-sidebar.css?tag=gb-sidebar&encapsulation=shadow","src/components/gb-sidebar/gb-sidebar.tsx"],"sourcesContent":["@import './../../global/global.css';\r\n\r\n.sidebar_div{\r\n transition: all 0.3s ease-in-out;\r\n position: relative;\r\n height: 100vh;\r\n}\r\n\r\n.pattern{\r\n position: absolute;\r\n top: 0;\r\n width: 100%;\r\n height: 100%;\r\n overflow: hidden;\r\n mix-blend-mode: multiply;\r\n}\r\n\r\n.pattern img{\r\n width: 100%;\r\n height: auto;\r\n}\r\n\r\n.sidebar_div.expanded{\r\n display: inline-flex;\r\n flex-direction: column;\r\n justify-content: space-between;\r\n width: 16.75rem;\r\n}\r\n\r\n.sidebar_div.collapsed{\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n width: 5rem;\r\n}\r\n\r\n.nav{\r\n display: flex;\r\n width: 100%;\r\n flex-direction: column;\r\n gap: var(--spacing-6);\r\n}\r\n\r\n.sidebar_header.expanded{\r\n display: flex;\r\n padding: var(--spacing-none) var(--spacing-4) var(--spacing-none) var(--spacing-6);\r\n justify-content: space-between;\r\n align-items: center;\r\n margin-top: 1rem;\r\n}\r\n\r\n.sidebar_header.collapsed{\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n margin-top: 1rem;\r\n gap: 1.5rem;\r\n}\r\n\r\n.logo_and_name.expanded{\r\n display: flex;\r\n justify-content: flex-start;\r\n align-items: center;\r\n}\r\n\r\n.logo_and_name.collapsed{\r\n display: flex;\r\n justify-content: center;\r\n}\r\n\r\n.collapse_button.collapsed{\r\n display: flex;\r\n justify-content: center;\r\n}\r\n\r\n.application_name{\r\n display: flex;\r\n padding: var(--spacing-6);\r\n}\r\n\r\n.wrapper{\r\n display: flex;\r\n padding: var(--spacing-4) var(--spacing-5) var(--spacing-5) var(--spacing-5);\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: flex-start;\r\n gap: var(--spacing-4);\r\n align-self: stretch;\r\n border-radius: var(--rounded-sm);\r\n position: relative;\r\n width: 13.75rem;\r\n height: auto;\r\n overflow: hidden;\r\n}\r\n\r\n.application_icon.plain_background path[stroke] {\r\n stroke: var(--color-icon-information-bold, #042F59);\r\n}\r\n\r\n.application_icon.plain_background path[fill] {\r\n fill: var(--color-icon-information-bold, #042F59);\r\n}\r\n\r\n.application_icon.colored_background path[stroke] {\r\n stroke: var(--color-icon-inverse, #FFFFFF);\r\n}\r\n\r\n.application_icon.colored_background path[fill] {\r\n fill: var(--color-icon-inverse, #FFFFFF);\r\n}\r\n\r\n.application_name_pattern{\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n mix-blend-mode: multiply;\r\n}\r\n\r\n.application_name_pattern img{\r\n width: 100%;\r\n}\r\n\r\n.wrapper{\r\n width: 100%;\r\n}\r\n\r\n.wrapper.colored_background{\r\n border: 1px solid rgba(255, 255, 255, 0.10);\r\n background: rgba(0, 0, 0, 0.10);\r\n}\r\n\r\n.wrapper.plain_background{\r\n background: var(--color-background-gray-subtlest, #F6F8FA);\r\n border: var(--Spacing-None, 1px) solid var(--color-border-subtler, #E3E8EF);\r\n}\r\n\r\n.plain_background_color{\r\n color: var(--color-text-information-bold, #042F59);\r\n}\r\n\r\n.colored_background_color{\r\n color: var(--color-text-inverse, #FFFFFF);\r\n}\r\n\r\n/* Sidebar Category Styles */\r\n.sidebar_div.plain_background{\r\n border-right: 0.7px solid var(--color-border-subtle, #CDD5DF);\r\n background: var(--color-surface, #FFFFFF);\r\n}\r\n\r\n.sidebar_div.colored_background{\r\n background-image: linear-gradient(180deg, #064E94 0%, #02182E 100%);\r\n background-size: cover;\r\n}\r\n\r\n.item{\r\n display: flex;\r\n flex-direction: column;\r\n width: 100%;\r\n gap: var(--spacing-1);\r\n}","import { Component, Element, h, Prop, Fragment, State, getAssetPath, Method, Event, EventEmitter } from \"@stencil/core\";\r\nimport { GeneralBackgroundCategories } from \"../../models/reusableModels\";\r\n\r\n@Component({\r\n tag: 'gb-sidebar',\r\n styleUrl: 'gb-sidebar.css',\r\n shadow: true,\r\n})\r\nexport class GbSidebar {\r\n @Prop({ mutable: true }) state: 'expanded' | 'collapsed';\r\n @Prop() category: GeneralBackgroundCategories;\r\n @Prop() showSecondCategory: boolean = false;\r\n @Prop() applicationName: string = '';\r\n @Prop() firstItemIcon: string = '';\r\n @Prop() secondItemIcon: string = '';\r\n @Prop() thirdItemIcon: string = '';\r\n @Prop() fourthItemIcon: string = '';\r\n @Prop() fifthItemIcon: string = '';\r\n @Prop() sixthItemIcon: string = '';\r\n @Prop() seventhItemIcon: string = '';\r\n @Prop() eighthItemIcon: string = '';\r\n @Prop() ninthItemIcon: string = '';\r\n @Prop() tenthItemIcon: string = '';\r\n @Prop() iconInstance: string = '';\r\n @Prop() label: string = '';\r\n @Prop() firstItemLabel: string = '';\r\n @Prop() secondItemLabel: string = '';\r\n @Prop() thirdItemLabel: string = '';\r\n @Prop() fourthItemLabel: string = '';\r\n @Prop() fifthItemLabel: string = '';\r\n @Prop() sixthItemLabel: string = '';\r\n @Prop() seventhItemLabel: string = '';\r\n @Prop() eighthItemLabel: string = '';\r\n @Prop() ninthItemLabel: string = '';\r\n @Prop() tenthItemLabel: string = '';\r\n @Element() el: HTMLElement;\r\n @Prop({ mutable: true }) activeIndex: number = 0;\r\n @State() leadingIconSvg: string = '';\r\n @Event() sidebarItemClicked: EventEmitter<number>;\r\n\r\n async loadIcon(iconName: string) {\r\n const iconPath = getAssetPath(`${iconName}`);\r\n const response = await fetch(iconPath);\r\n const svg = await response.text();\r\n this.leadingIconSvg = svg;\r\n }\r\n\r\n collapseSideBar() {\r\n if (this.state === 'expanded') {\r\n this.state = 'collapsed';\r\n }\r\n }\r\n\r\n expandSideBar() {\r\n if (this.state === 'collapsed') {\r\n this.state = 'expanded';\r\n }\r\n }\r\n\r\n @Method()\r\n async sideBarItemClicked(index: number) {\r\n this.activeIndex = index;\r\n localStorage.setItem('activeIndex', index.toString());\r\n this.sidebarItemClicked.emit(index);\r\n }\r\n\r\n componentDidLoad() {\r\n const applicationName = this.el.querySelector('[slot=\"application_name\"]');\r\n\r\n applicationName.classList.add('text-lg-bold');\r\n }\r\n\r\n componentWillLoad() {\r\n this.loadIcon(this.iconInstance);\r\n const storedIndex = localStorage.getItem('activeIndex');\r\n if (storedIndex !== null) {\r\n this.activeIndex = parseInt(storedIndex, 10); // Retrieve active index from localStorage\r\n }\r\n }\r\n\r\n render() {\r\n const textClass = this.category === 'plain_background' ? 'plain_background_color' : 'colored_background_color';\r\n const patternSrc = getAssetPath(`assets/pattern_wrapper.svg`);\r\n const logoSrc = getAssetPath(`assets/globus_bank_logo.svg`);\r\n const blueLogoSrc = getAssetPath(`assets/globus_bank_logo_blue.svg`);\r\n const whiteLogoSrc = getAssetPath(`assets/globus_bank_logo_white.svg`);\r\n\r\n return (\r\n <div class={`sidebar_div ${this.state} ${this.category}`}>\r\n {this.category === 'colored_background' && (\r\n <div class=\"pattern\">\r\n <img src={patternSrc} alt=\"\" />\r\n </div>\r\n )}\r\n <div class=\"nav\">\r\n <div class={`sidebar_header ${this.state}`}>\r\n <div class={`logo_and_name ${this.state}`}>\r\n {this.state === 'expanded' && <>{this.category === 'plain_background' ? <img src={blueLogoSrc} /> : <img src={whiteLogoSrc} />}</>}\r\n {this.state === 'collapsed' && <img src={logoSrc} alt=\"\" />}\r\n </div>\r\n <div class={`collapse_button ${this.state}`}>\r\n <gb-collapse-button\r\n color={this.category === 'plain_background' ? 'gray' : 'white'}\r\n action={this.state === 'collapsed' ? 'expand' : 'collapse'}\r\n onClick={() => (this.state === 'collapsed' ? this.expandSideBar() : this.collapseSideBar())}\r\n ></gb-collapse-button>\r\n </div>\r\n </div>\r\n <div class=\"navigation\">\r\n <div class=\"item\">\r\n <gb-side-bar-item\r\n state={this.activeIndex === 0 ? 'active' : 'default'}\r\n icon={this.firstItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(0)}\r\n label={this.firstItemLabel}\r\n ></gb-side-bar-item>\r\n <gb-side-bar-item\r\n state={this.activeIndex === 1 ? 'active' : 'default'}\r\n icon={this.secondItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(1)}\r\n label={this.secondItemLabel}\r\n ></gb-side-bar-item>\r\n {this.thirdItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 2 ? 'active' : 'default'}\r\n icon={this.thirdItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(2)}\r\n label={this.thirdItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.fourthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 3 ? 'active' : 'default'}\r\n icon={this.fourthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(3)}\r\n label={this.fourthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.fifthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 4 ? 'active' : 'default'}\r\n icon={this.fifthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(4)}\r\n label={this.fifthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n </div>\r\n </div>\r\n {this.showSecondCategory && (\r\n <div class=\"navigation\">\r\n <div class=\"item\">\r\n {this.sixthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 5 ? 'active' : 'default'}\r\n icon={this.sixthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(5)}\r\n label={this.sixthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.seventhItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 6 ? 'active' : 'default'}\r\n icon={this.seventhItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(6)}\r\n label={this.seventhItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.eighthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 7 ? 'active' : 'default'}\r\n icon={this.eighthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(7)}\r\n label={this.eighthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.ninthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 8 ? 'active' : 'default'}\r\n icon={this.ninthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(8)}\r\n label={this.ninthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.tenthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 9 ? 'active' : 'default'}\r\n icon={this.tenthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(9)}\r\n label={this.tenthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n {this.state === 'expanded' && (\r\n <div class=\"application_name\">\r\n <div class={`wrapper ${this.category}`}>\r\n {this.category === 'plain_background' && (\r\n <div class=\"application_name_pattern\">\r\n <img src={patternSrc} alt=\"\" />\r\n </div>\r\n )}\r\n <div class={`application_icon ${this.category}`} innerHTML={this.leadingIconSvg}></div>\r\n <span class={textClass}>\r\n <slot name=\"application_name\"></slot>\r\n </span>\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n );\r\n }\r\n}"],"version":3}
1
+ {"file":"gb-sidebar.js","mappings":";;;;;;;;;;AAAA,MAAM,YAAY,GAAG,2mwEAA2mwE,CAAC;AACjowE,wBAAe,YAAY;;MCOdA,WAAS;;;;;;;qBACuC,UAAU;;kCAE/B,KAAK;+BACT,EAAE;6BACJ,EAAE;8BACD,EAAE;6BACH,EAAE;8BACD,EAAE;6BACH,EAAE;6BACF,EAAE;+BACA,EAAE;8BACH,EAAE;6BACH,EAAE;6BACF,EAAE;4BACH,EAAE;qBACT,EAAE;8BACO,EAAE;+BACD,EAAE;8BACH,EAAE;+BACD,EAAE;8BACH,EAAE;8BACF,EAAE;gCACA,EAAE;+BACH,EAAE;8BACH,EAAE;8BACF,EAAE;2BAEY,CAAC;8BACd,EAAE;;IAIpC,MAAM,QAAQ,CAAC,QAAgB;QAC7B,MAAM,QAAQ,GAAG,YAAY,CAAC,GAAG,QAAQ,EAAE,CAAC,CAAC;QAC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,KAAK,EAAE,IAAI,CAAC,cAAc,GACR,CACrB,CACG,CACF,CACP,CACG,EACL,IAAI,CAAC,KAAK,KAAK,UAAU,KACxB,4DAAK,KAAK,EAAC,kBAAkB,IAC3B,4DAAK,KAAK,EAAE,WAAW,IAAI,CAAC,QAAQ,EAAE,IACnC,IAAI,CAAC,QAAQ,KAAK,kBAAkB,KACnC,4DAAK,KAAK,EAAC,0BAA0B,IACnC,4DAAK,GAAG,EAAE,UAAU,EAAE,GAAG,EAAC,EAAE,GAAG,CAC3B,CACP,EACD,4DAAK,KAAK,EAAE,oBAAoB,IAAI,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,cAAc,GAAQ,EACvF,6DAAM,KAAK,EAAE,SAAS,IACpB,6DAAM,IAAI,EAAC,kBAAkB,GAAQ,CAChC,CACH,CACF,CACP,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GbSidebar"],"sources":["src/components/gb-sidebar/gb-sidebar.css?tag=gb-sidebar&encapsulation=shadow","src/components/gb-sidebar/gb-sidebar.tsx"],"sourcesContent":["@import './../../global/global.css';\r\n\r\n.sidebar_div{\r\n transition: all 0.3s ease-in-out;\r\n position: relative;\r\n height: 100vh;\r\n}\r\n\r\n.pattern{\r\n position: absolute;\r\n top: 0;\r\n width: 100%;\r\n height: 100%;\r\n overflow: hidden;\r\n mix-blend-mode: multiply;\r\n}\r\n\r\n.pattern img{\r\n width: 100%;\r\n height: auto;\r\n}\r\n\r\n.sidebar_div.expanded{\r\n display: inline-flex;\r\n flex-direction: column;\r\n justify-content: space-between;\r\n width: 16.75rem;\r\n}\r\n\r\n.sidebar_div.collapsed{\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n width: 5rem;\r\n}\r\n\r\n.nav{\r\n display: flex;\r\n width: 100%;\r\n flex-direction: column;\r\n gap: var(--spacing-6);\r\n}\r\n\r\n.sidebar_header.expanded{\r\n display: flex;\r\n padding: var(--spacing-none) var(--spacing-4) var(--spacing-none) var(--spacing-6);\r\n justify-content: space-between;\r\n align-items: center;\r\n margin-top: 1rem;\r\n}\r\n\r\n.sidebar_header.collapsed{\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n margin-top: 1rem;\r\n gap: 1.5rem;\r\n}\r\n\r\n.logo_and_name.expanded{\r\n display: flex;\r\n justify-content: flex-start;\r\n align-items: center;\r\n}\r\n\r\n.logo_and_name.collapsed{\r\n display: flex;\r\n justify-content: center;\r\n}\r\n\r\n.collapse_button.collapsed{\r\n display: flex;\r\n justify-content: center;\r\n}\r\n\r\n.application_name{\r\n display: flex;\r\n padding: var(--spacing-6);\r\n}\r\n\r\n.wrapper{\r\n display: flex;\r\n padding: var(--spacing-4) var(--spacing-5) var(--spacing-5) var(--spacing-5);\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: flex-start;\r\n gap: var(--spacing-4);\r\n align-self: stretch;\r\n border-radius: var(--rounded-sm);\r\n position: relative;\r\n width: 13.75rem;\r\n height: auto;\r\n overflow: hidden;\r\n}\r\n\r\n.application_icon.plain_background path[stroke] {\r\n stroke: var(--color-icon-information-bold, #042F59);\r\n}\r\n\r\n.application_icon.plain_background path[fill] {\r\n fill: var(--color-icon-information-bold, #042F59);\r\n}\r\n\r\n.application_icon.colored_background path[stroke] {\r\n stroke: var(--color-icon-inverse, #FFFFFF);\r\n}\r\n\r\n.application_icon.colored_background path[fill] {\r\n fill: var(--color-icon-inverse, #FFFFFF);\r\n}\r\n\r\n.application_name_pattern{\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n mix-blend-mode: multiply;\r\n}\r\n\r\n.application_name_pattern img{\r\n width: 100%;\r\n}\r\n\r\n.wrapper{\r\n width: 100%;\r\n}\r\n\r\n.wrapper.colored_background{\r\n border: 1px solid rgba(255, 255, 255, 0.10);\r\n background: rgba(0, 0, 0, 0.10);\r\n}\r\n\r\n.wrapper.plain_background{\r\n background: var(--color-background-gray-subtlest, #F6F8FA);\r\n border: var(--Spacing-None, 1px) solid var(--color-border-subtler, #E3E8EF);\r\n}\r\n\r\n.plain_background_color{\r\n color: var(--color-text-information-bold, #042F59);\r\n}\r\n\r\n.colored_background_color{\r\n color: var(--color-text-inverse, #FFFFFF);\r\n}\r\n\r\n/* Sidebar Category Styles */\r\n.sidebar_div.plain_background{\r\n border-right: 0.7px solid var(--color-border-subtle, #CDD5DF);\r\n background: var(--color-surface, #FFFFFF);\r\n}\r\n\r\n.sidebar_div.colored_background{\r\n background-image: linear-gradient(180deg, #064E94 0%, #02182E 100%);\r\n background-size: cover;\r\n}\r\n\r\n.item{\r\n display: flex;\r\n flex-direction: column;\r\n width: 100%;\r\n gap: var(--spacing-1);\r\n}","import { Component, Element, h, Prop, Fragment, State, getAssetPath, Method, Event, EventEmitter } from \"@stencil/core\";\r\nimport { GeneralBackgroundCategories } from \"../../models/reusableModels\";\r\n\r\n@Component({\r\n tag: 'gb-sidebar',\r\n styleUrl: 'gb-sidebar.css',\r\n shadow: true,\r\n})\r\nexport class GbSidebar {\r\n @Prop({ mutable: true }) state: 'expanded' | 'collapsed' = 'expanded';\r\n @Prop() category: GeneralBackgroundCategories;\r\n @Prop() showSecondCategory: boolean = false;\r\n @Prop() applicationName: string = '';\r\n @Prop() firstItemIcon: string = '';\r\n @Prop() secondItemIcon: string = '';\r\n @Prop() thirdItemIcon: string = '';\r\n @Prop() fourthItemIcon: string = '';\r\n @Prop() fifthItemIcon: string = '';\r\n @Prop() sixthItemIcon: string = '';\r\n @Prop() seventhItemIcon: string = '';\r\n @Prop() eighthItemIcon: string = '';\r\n @Prop() ninthItemIcon: string = '';\r\n @Prop() tenthItemIcon: string = '';\r\n @Prop() iconInstance: string = '';\r\n @Prop() label: string = '';\r\n @Prop() firstItemLabel: string = '';\r\n @Prop() secondItemLabel: string = '';\r\n @Prop() thirdItemLabel: string = '';\r\n @Prop() fourthItemLabel: string = '';\r\n @Prop() fifthItemLabel: string = '';\r\n @Prop() sixthItemLabel: string = '';\r\n @Prop() seventhItemLabel: string = '';\r\n @Prop() eighthItemLabel: string = '';\r\n @Prop() ninthItemLabel: string = '';\r\n @Prop() tenthItemLabel: string = '';\r\n @Element() el: HTMLElement;\r\n @Prop({ mutable: true }) activeIndex: number = 0;\r\n @State() leadingIconSvg: string = '';\r\n @Event() sidebarItemClicked: EventEmitter<number>;\r\n @Event() sidebarState: EventEmitter<string>;\r\n\r\n async loadIcon(iconName: string) {\r\n const iconPath = getAssetPath(`${iconName}`);\r\n const response = await fetch(iconPath);\r\n const svg = await response.text();\r\n this.leadingIconSvg = svg;\r\n }\r\n\r\n collapseSideBar() {\r\n if (this.state === 'expanded') {\r\n this.state = 'collapsed';\r\n }\r\n this.sidebarState.emit('collapsed');\r\n }\r\n\r\n expandSideBar() {\r\n if (this.state === 'collapsed') {\r\n this.state = 'expanded';\r\n }\r\n this.sidebarState.emit('expanded');\r\n }\r\n\r\n @Method()\r\n async sideBarItemClicked(index: number) {\r\n this.activeIndex = index;\r\n localStorage.setItem('activeIndex', index.toString());\r\n this.sidebarItemClicked.emit(index);\r\n }\r\n\r\n componentDidLoad() {\r\n const applicationName = this.el.querySelector('[slot=\"application_name\"]');\r\n\r\n applicationName.classList.add('text-lg-bold');\r\n }\r\n\r\n componentWillLoad() {\r\n this.loadIcon(this.iconInstance);\r\n const storedIndex = localStorage.getItem('activeIndex');\r\n if (storedIndex !== null) {\r\n this.activeIndex = parseInt(storedIndex, 10); // Retrieve active index from localStorage\r\n }\r\n }\r\n\r\n render() {\r\n const textClass = this.category === 'plain_background' ? 'plain_background_color' : 'colored_background_color';\r\n const patternSrc = getAssetPath(`assets/pattern_wrapper.svg`);\r\n const logoSrc = getAssetPath(`assets/globus_bank_logo.svg`);\r\n const blueLogoSrc = getAssetPath(`assets/globus_bank_logo_blue.svg`);\r\n const whiteLogoSrc = getAssetPath(`assets/globus_bank_logo_white.svg`);\r\n\r\n return (\r\n <div class={`sidebar_div ${this.state} ${this.category}`}>\r\n {this.category === 'colored_background' && (\r\n <div class=\"pattern\">\r\n <img src={patternSrc} alt=\"\" />\r\n </div>\r\n )}\r\n <div class=\"nav\">\r\n <div class={`sidebar_header ${this.state}`}>\r\n <div class={`logo_and_name ${this.state}`}>\r\n {this.state === 'expanded' && <>{this.category === 'plain_background' ? <img src={blueLogoSrc} /> : <img src={whiteLogoSrc} />}</>}\r\n {this.state === 'collapsed' && <img src={logoSrc} alt=\"\" />}\r\n </div>\r\n <div class={`collapse_button ${this.state}`}>\r\n <gb-collapse-button\r\n color={this.category === 'plain_background' ? 'gray' : 'white'}\r\n action={this.state === 'collapsed' ? 'expand' : 'collapse'}\r\n onClick={() => (this.state === 'collapsed' ? this.expandSideBar() : this.collapseSideBar())}\r\n ></gb-collapse-button>\r\n </div>\r\n </div>\r\n <div class=\"navigation\">\r\n <div class=\"item\">\r\n <gb-side-bar-item\r\n state={this.activeIndex === 0 ? 'active' : 'default'}\r\n icon={this.firstItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(0)}\r\n label={this.firstItemLabel}\r\n ></gb-side-bar-item>\r\n <gb-side-bar-item\r\n state={this.activeIndex === 1 ? 'active' : 'default'}\r\n icon={this.secondItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(1)}\r\n label={this.secondItemLabel}\r\n ></gb-side-bar-item>\r\n {this.thirdItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 2 ? 'active' : 'default'}\r\n icon={this.thirdItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(2)}\r\n label={this.thirdItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.fourthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 3 ? 'active' : 'default'}\r\n icon={this.fourthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(3)}\r\n label={this.fourthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.fifthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 4 ? 'active' : 'default'}\r\n icon={this.fifthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(4)}\r\n label={this.fifthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n </div>\r\n </div>\r\n {this.showSecondCategory && (\r\n <div class=\"navigation\">\r\n <div class=\"item\">\r\n {this.sixthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 5 ? 'active' : 'default'}\r\n icon={this.sixthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(5)}\r\n label={this.sixthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.seventhItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 6 ? 'active' : 'default'}\r\n icon={this.seventhItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(6)}\r\n label={this.seventhItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.eighthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 7 ? 'active' : 'default'}\r\n icon={this.eighthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(7)}\r\n label={this.eighthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.ninthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 8 ? 'active' : 'default'}\r\n icon={this.ninthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(8)}\r\n label={this.ninthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n {this.tenthItemLabel && (\r\n <gb-side-bar-item\r\n state={this.activeIndex === 9 ? 'active' : 'default'}\r\n icon={this.tenthItemIcon}\r\n category={this.category}\r\n type={this.state === 'collapsed' ? 'icon_only' : 'full_with_label'}\r\n onClick={() => this.sideBarItemClicked(9)}\r\n label={this.tenthItemLabel}\r\n ></gb-side-bar-item>\r\n )}\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n {this.state === 'expanded' && (\r\n <div class=\"application_name\">\r\n <div class={`wrapper ${this.category}`}>\r\n {this.category === 'plain_background' && (\r\n <div class=\"application_name_pattern\">\r\n <img src={patternSrc} alt=\"\" />\r\n </div>\r\n )}\r\n <div class={`application_icon ${this.category}`} innerHTML={this.leadingIconSvg}></div>\r\n <span class={textClass}>\r\n <slot name=\"application_name\"></slot>\r\n </span>\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n );\r\n }\r\n}"],"version":3}
@@ -1374,7 +1374,8 @@ const GbSidebar = class {
1374
1374
  constructor(hostRef) {
1375
1375
  registerInstance(this, hostRef);
1376
1376
  this.sidebarItemClicked = createEvent(this, "sidebarItemClicked", 7);
1377
- this.state = undefined;
1377
+ this.sidebarState = createEvent(this, "sidebarState", 7);
1378
+ this.state = 'expanded';
1378
1379
  this.category = undefined;
1379
1380
  this.showSecondCategory = false;
1380
1381
  this.applicationName = '';
@@ -1413,11 +1414,13 @@ const GbSidebar = class {
1413
1414
  if (this.state === 'expanded') {
1414
1415
  this.state = 'collapsed';
1415
1416
  }
1417
+ this.sidebarState.emit('collapsed');
1416
1418
  }
1417
1419
  expandSideBar() {
1418
1420
  if (this.state === 'collapsed') {
1419
1421
  this.state = 'expanded';
1420
1422
  }
1423
+ this.sidebarState.emit('expanded');
1421
1424
  }
1422
1425
  async sideBarItemClicked(index) {
1423
1426
  this.activeIndex = index;
@@ -1441,7 +1444,7 @@ const GbSidebar = class {
1441
1444
  const logoSrc = getAssetPath(`assets/globus_bank_logo.svg`);
1442
1445
  const blueLogoSrc = getAssetPath(`assets/globus_bank_logo_blue.svg`);
1443
1446
  const whiteLogoSrc = getAssetPath(`assets/globus_bank_logo_white.svg`);
1444
- return (h("div", { key: '2f9265c934c3f4dddc1fd2f119690d7dd3e04089', class: `sidebar_div ${this.state} ${this.category}` }, this.category === 'colored_background' && (h("div", { key: '56067a416cac36390f28da3554eab2ffb986b62c', class: "pattern" }, h("img", { key: 'e87935b2330fc0bacc2445883ffa3ee9753e125d', src: patternSrc, alt: "" }))), h("div", { key: 'd7c651a03f0de0a038da557f21a960d3c5041278', class: "nav" }, h("div", { key: 'cf575d0819ecab751c9956898d6fc7e9e2faee5b', class: `sidebar_header ${this.state}` }, h("div", { key: '730975241ede9529ccdd2cc1e18b6f79eb66c20c', class: `logo_and_name ${this.state}` }, this.state === 'expanded' && h(Fragment, null, this.category === 'plain_background' ? h("img", { src: blueLogoSrc }) : h("img", { src: whiteLogoSrc })), this.state === 'collapsed' && h("img", { key: 'df535344d2caabaabcf4a57c75a0e8e157b915ce', src: logoSrc, alt: "" })), h("div", { key: 'a18550cffb54f41657f163515826a83e2fa71fe6', class: `collapse_button ${this.state}` }, h("gb-collapse-button", { key: '6641429be1d6c32ddc562ccacf5ffa74332b7039', color: this.category === 'plain_background' ? 'gray' : 'white', action: this.state === 'collapsed' ? 'expand' : 'collapse', onClick: () => (this.state === 'collapsed' ? this.expandSideBar() : this.collapseSideBar()) }))), h("div", { key: 'bfdd5108ea6eab63bd56c799ec57b637968bd32b', class: "navigation" }, h("div", { key: '8496f8d3196c76d97d70ddd71907925b5413da17', class: "item" }, h("gb-side-bar-item", { key: '5d697d11ed1744997dbbd3310c172b630c76086f', state: this.activeIndex === 0 ? 'active' : 'default', icon: this.firstItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(0), label: this.firstItemLabel }), h("gb-side-bar-item", { key: '8dbd3089b632f7067ce5f84319327f245e9cbde7', state: this.activeIndex === 1 ? 'active' : 'default', icon: this.secondItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(1), label: this.secondItemLabel }), this.thirdItemLabel && (h("gb-side-bar-item", { key: '8f8b634c3ef3f748f1c39798f64371815a3d9158', state: this.activeIndex === 2 ? 'active' : 'default', icon: this.thirdItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(2), label: this.thirdItemLabel })), this.fourthItemLabel && (h("gb-side-bar-item", { key: 'e2ef5660d338cc06807969c342be6179e73e5bb8', state: this.activeIndex === 3 ? 'active' : 'default', icon: this.fourthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(3), label: this.fourthItemLabel })), this.fifthItemLabel && (h("gb-side-bar-item", { key: 'ff84480474accd7cbc7b24b949e3c4fb2e0d921a', state: this.activeIndex === 4 ? 'active' : 'default', icon: this.fifthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(4), label: this.fifthItemLabel })))), this.showSecondCategory && (h("div", { key: '75e3038156ad5b938a429f8cb094c8c9aa6d975c', class: "navigation" }, h("div", { key: '52c4518ff11010b7e31d477f73e60c6e38579881', class: "item" }, this.sixthItemLabel && (h("gb-side-bar-item", { key: '944b9c3f728a3c70996821c57f46107ab948f24c', state: this.activeIndex === 5 ? 'active' : 'default', icon: this.sixthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(5), label: this.sixthItemLabel })), this.seventhItemLabel && (h("gb-side-bar-item", { key: 'cb879b7cbc8f09d5bd1766bde88804130d87d7ed', state: this.activeIndex === 6 ? 'active' : 'default', icon: this.seventhItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(6), label: this.seventhItemLabel })), this.eighthItemLabel && (h("gb-side-bar-item", { key: '6b5fdd1fd1c2ce8ee6a164fcc4c76a8483c42b69', state: this.activeIndex === 7 ? 'active' : 'default', icon: this.eighthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(7), label: this.eighthItemLabel })), this.ninthItemLabel && (h("gb-side-bar-item", { key: '84bee58579a829222125f4b916f25ca410de4c6f', state: this.activeIndex === 8 ? 'active' : 'default', icon: this.ninthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(8), label: this.ninthItemLabel })), this.tenthItemLabel && (h("gb-side-bar-item", { key: '24b5bffc2bae13fb20d1fe1a522732cd2c6aa5b9', state: this.activeIndex === 9 ? 'active' : 'default', icon: this.tenthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(9), label: this.tenthItemLabel })))))), this.state === 'expanded' && (h("div", { key: 'caf65037e5b80e5442a2437a2e08440fe420cc3a', class: "application_name" }, h("div", { key: 'fcd55107715b24c5bb8c87508fa7185d68c4b2aa', class: `wrapper ${this.category}` }, this.category === 'plain_background' && (h("div", { key: 'feb2197f78a6fc7aed90ff8e57266283d4890080', class: "application_name_pattern" }, h("img", { key: 'b2e3507f0c1c8df0aac3aedc6eba767b3b89910b', src: patternSrc, alt: "" }))), h("div", { key: '303db193d12410f48c7b4675d9dc7d73e66d10a0', class: `application_icon ${this.category}`, innerHTML: this.leadingIconSvg }), h("span", { key: 'a1f96282e931c70e152f024169cba33c4b0af2c9', class: textClass }, h("slot", { key: '731c3ccbf41c6579a19e35992317fd9acf139411', name: "application_name" })))))));
1447
+ return (h("div", { key: '98118ec177b829f3b725b04abb67adb30b6c0029', class: `sidebar_div ${this.state} ${this.category}` }, this.category === 'colored_background' && (h("div", { key: '7588ff880eda0e996ad9882c8eb5165e98a411c4', class: "pattern" }, h("img", { key: '29ace462727158571530ca8add8a4107eaa9262f', src: patternSrc, alt: "" }))), h("div", { key: '231ab489ed4390391b29d3f7ebc9931c3af7156a', class: "nav" }, h("div", { key: 'f813ec6d909fca607b86b0b322df51e702ab6a0f', class: `sidebar_header ${this.state}` }, h("div", { key: '50597e12d7ad1a2167bba4a85a164a9aecd6c021', class: `logo_and_name ${this.state}` }, this.state === 'expanded' && h(Fragment, null, this.category === 'plain_background' ? h("img", { src: blueLogoSrc }) : h("img", { src: whiteLogoSrc })), this.state === 'collapsed' && h("img", { key: 'fb0fd20df297b3457b01b3291f967d108419d20d', src: logoSrc, alt: "" })), h("div", { key: '252d021bad121117809b1e43ae54072756e66754', class: `collapse_button ${this.state}` }, h("gb-collapse-button", { key: 'b0a9b6a022483459a062661d98eea16714349c45', color: this.category === 'plain_background' ? 'gray' : 'white', action: this.state === 'collapsed' ? 'expand' : 'collapse', onClick: () => (this.state === 'collapsed' ? this.expandSideBar() : this.collapseSideBar()) }))), h("div", { key: '46bbfa8c0e36a3c52fa29d5691bbfd13164d18c3', class: "navigation" }, h("div", { key: 'd1e7595e16bb8cd71ad1737f89ae4039865bc4b5', class: "item" }, h("gb-side-bar-item", { key: '03cdce0fd2fbdb0223c8d1d0dac9ae8b8a7724b4', state: this.activeIndex === 0 ? 'active' : 'default', icon: this.firstItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(0), label: this.firstItemLabel }), h("gb-side-bar-item", { key: '6a6a7b580e5a050fe546b3f0da6e46bbdf4e8b84', state: this.activeIndex === 1 ? 'active' : 'default', icon: this.secondItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(1), label: this.secondItemLabel }), this.thirdItemLabel && (h("gb-side-bar-item", { key: '8e7108aa0ba29d572b18912b24d66f1a42fb7ad9', state: this.activeIndex === 2 ? 'active' : 'default', icon: this.thirdItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(2), label: this.thirdItemLabel })), this.fourthItemLabel && (h("gb-side-bar-item", { key: '4fddc87f64cd9b2c61a3863c427e6b92ac321e56', state: this.activeIndex === 3 ? 'active' : 'default', icon: this.fourthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(3), label: this.fourthItemLabel })), this.fifthItemLabel && (h("gb-side-bar-item", { key: '2929bab64a03ee33fcdfb802dab28bf223191ae5', state: this.activeIndex === 4 ? 'active' : 'default', icon: this.fifthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(4), label: this.fifthItemLabel })))), this.showSecondCategory && (h("div", { key: '07665c026fd805928339fe141fc403873408c59c', class: "navigation" }, h("div", { key: '70834cd7fafd42d1215f8f6adfec5661d910073a', class: "item" }, this.sixthItemLabel && (h("gb-side-bar-item", { key: 'b5b18a24b0ae438fb0e83726bc19ac3bf94db8fc', state: this.activeIndex === 5 ? 'active' : 'default', icon: this.sixthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(5), label: this.sixthItemLabel })), this.seventhItemLabel && (h("gb-side-bar-item", { key: 'c2d689200324af8cce99af0e12a622aa18b2925f', state: this.activeIndex === 6 ? 'active' : 'default', icon: this.seventhItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(6), label: this.seventhItemLabel })), this.eighthItemLabel && (h("gb-side-bar-item", { key: '41dcb87058034bede580bc6935d968d0c5a893eb', state: this.activeIndex === 7 ? 'active' : 'default', icon: this.eighthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(7), label: this.eighthItemLabel })), this.ninthItemLabel && (h("gb-side-bar-item", { key: '31cf5a87ee3e918e3a2f5dfea39c00f4413d2598', state: this.activeIndex === 8 ? 'active' : 'default', icon: this.ninthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(8), label: this.ninthItemLabel })), this.tenthItemLabel && (h("gb-side-bar-item", { key: '76044610ec56dc464fd2de206d4c3fc8dfe583cb', state: this.activeIndex === 9 ? 'active' : 'default', icon: this.tenthItemIcon, category: this.category, type: this.state === 'collapsed' ? 'icon_only' : 'full_with_label', onClick: () => this.sideBarItemClicked(9), label: this.tenthItemLabel })))))), this.state === 'expanded' && (h("div", { key: '4c024ac92a6f639e7bb4539ae1d9f7242d3bc478', class: "application_name" }, h("div", { key: '346d0bda9aba59c6afd97c2941d12c6cdc8f4daf', class: `wrapper ${this.category}` }, this.category === 'plain_background' && (h("div", { key: 'dac6d8bac548e95afa6096fa6f00133f4b936790', class: "application_name_pattern" }, h("img", { key: '3448819c47f118a7bfeffe7540b78cb30f126558', src: patternSrc, alt: "" }))), h("div", { key: '8c510c8c5df2923d07ab4cd94daefc383cb066cd', class: `application_icon ${this.category}`, innerHTML: this.leadingIconSvg }), h("span", { key: '55fd5b4a54684e6b9f6fad99304e9d0554fe6af0', class: textClass }, h("slot", { key: 'a234fc2009b2392a8dc7926c080b51eff2daab2a', name: "application_name" })))))));
1445
1448
  }
1446
1449
  get el() { return getElement(this); }
1447
1450
  };