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.
@@ -1378,7 +1378,8 @@ const GbSidebar = class {
1378
1378
  constructor(hostRef) {
1379
1379
  index.registerInstance(this, hostRef);
1380
1380
  this.sidebarItemClicked = index.createEvent(this, "sidebarItemClicked", 7);
1381
- this.state = undefined;
1381
+ this.sidebarState = index.createEvent(this, "sidebarState", 7);
1382
+ this.state = 'expanded';
1382
1383
  this.category = undefined;
1383
1384
  this.showSecondCategory = false;
1384
1385
  this.applicationName = '';
@@ -1417,11 +1418,13 @@ const GbSidebar = class {
1417
1418
  if (this.state === 'expanded') {
1418
1419
  this.state = 'collapsed';
1419
1420
  }
1421
+ this.sidebarState.emit('collapsed');
1420
1422
  }
1421
1423
  expandSideBar() {
1422
1424
  if (this.state === 'collapsed') {
1423
1425
  this.state = 'expanded';
1424
1426
  }
1427
+ this.sidebarState.emit('expanded');
1425
1428
  }
1426
1429
  async sideBarItemClicked(index) {
1427
1430
  this.activeIndex = index;
@@ -1445,7 +1448,7 @@ const GbSidebar = class {
1445
1448
  const logoSrc = index.getAssetPath(`assets/globus_bank_logo.svg`);
1446
1449
  const blueLogoSrc = index.getAssetPath(`assets/globus_bank_logo_blue.svg`);
1447
1450
  const whiteLogoSrc = index.getAssetPath(`assets/globus_bank_logo_white.svg`);
1448
- return (index.h("div", { key: '2f9265c934c3f4dddc1fd2f119690d7dd3e04089', class: `sidebar_div ${this.state} ${this.category}` }, this.category === 'colored_background' && (index.h("div", { key: '56067a416cac36390f28da3554eab2ffb986b62c', class: "pattern" }, index.h("img", { key: 'e87935b2330fc0bacc2445883ffa3ee9753e125d', src: patternSrc, alt: "" }))), index.h("div", { key: 'd7c651a03f0de0a038da557f21a960d3c5041278', class: "nav" }, index.h("div", { key: 'cf575d0819ecab751c9956898d6fc7e9e2faee5b', class: `sidebar_header ${this.state}` }, index.h("div", { key: '730975241ede9529ccdd2cc1e18b6f79eb66c20c', class: `logo_and_name ${this.state}` }, this.state === 'expanded' && index.h(index.Fragment, null, this.category === 'plain_background' ? index.h("img", { src: blueLogoSrc }) : index.h("img", { src: whiteLogoSrc })), this.state === 'collapsed' && index.h("img", { key: 'df535344d2caabaabcf4a57c75a0e8e157b915ce', src: logoSrc, alt: "" })), index.h("div", { key: 'a18550cffb54f41657f163515826a83e2fa71fe6', class: `collapse_button ${this.state}` }, index.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()) }))), index.h("div", { key: 'bfdd5108ea6eab63bd56c799ec57b637968bd32b', class: "navigation" }, index.h("div", { key: '8496f8d3196c76d97d70ddd71907925b5413da17', class: "item" }, index.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 }), index.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 && (index.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 && (index.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 && (index.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 && (index.h("div", { key: '75e3038156ad5b938a429f8cb094c8c9aa6d975c', class: "navigation" }, index.h("div", { key: '52c4518ff11010b7e31d477f73e60c6e38579881', class: "item" }, this.sixthItemLabel && (index.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 && (index.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 && (index.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 && (index.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 && (index.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' && (index.h("div", { key: 'caf65037e5b80e5442a2437a2e08440fe420cc3a', class: "application_name" }, index.h("div", { key: 'fcd55107715b24c5bb8c87508fa7185d68c4b2aa', class: `wrapper ${this.category}` }, this.category === 'plain_background' && (index.h("div", { key: 'feb2197f78a6fc7aed90ff8e57266283d4890080', class: "application_name_pattern" }, index.h("img", { key: 'b2e3507f0c1c8df0aac3aedc6eba767b3b89910b', src: patternSrc, alt: "" }))), index.h("div", { key: '303db193d12410f48c7b4675d9dc7d73e66d10a0', class: `application_icon ${this.category}`, innerHTML: this.leadingIconSvg }), index.h("span", { key: 'a1f96282e931c70e152f024169cba33c4b0af2c9', class: textClass }, index.h("slot", { key: '731c3ccbf41c6579a19e35992317fd9acf139411', name: "application_name" })))))));
1451
+ return (index.h("div", { key: '98118ec177b829f3b725b04abb67adb30b6c0029', class: `sidebar_div ${this.state} ${this.category}` }, this.category === 'colored_background' && (index.h("div", { key: '7588ff880eda0e996ad9882c8eb5165e98a411c4', class: "pattern" }, index.h("img", { key: '29ace462727158571530ca8add8a4107eaa9262f', src: patternSrc, alt: "" }))), index.h("div", { key: '231ab489ed4390391b29d3f7ebc9931c3af7156a', class: "nav" }, index.h("div", { key: 'f813ec6d909fca607b86b0b322df51e702ab6a0f', class: `sidebar_header ${this.state}` }, index.h("div", { key: '50597e12d7ad1a2167bba4a85a164a9aecd6c021', class: `logo_and_name ${this.state}` }, this.state === 'expanded' && index.h(index.Fragment, null, this.category === 'plain_background' ? index.h("img", { src: blueLogoSrc }) : index.h("img", { src: whiteLogoSrc })), this.state === 'collapsed' && index.h("img", { key: 'fb0fd20df297b3457b01b3291f967d108419d20d', src: logoSrc, alt: "" })), index.h("div", { key: '252d021bad121117809b1e43ae54072756e66754', class: `collapse_button ${this.state}` }, index.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()) }))), index.h("div", { key: '46bbfa8c0e36a3c52fa29d5691bbfd13164d18c3', class: "navigation" }, index.h("div", { key: 'd1e7595e16bb8cd71ad1737f89ae4039865bc4b5', class: "item" }, index.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 }), index.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 && (index.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 && (index.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 && (index.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 && (index.h("div", { key: '07665c026fd805928339fe141fc403873408c59c', class: "navigation" }, index.h("div", { key: '70834cd7fafd42d1215f8f6adfec5661d910073a', class: "item" }, this.sixthItemLabel && (index.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 && (index.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 && (index.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 && (index.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 && (index.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' && (index.h("div", { key: '4c024ac92a6f639e7bb4539ae1d9f7242d3bc478', class: "application_name" }, index.h("div", { key: '346d0bda9aba59c6afd97c2941d12c6cdc8f4daf', class: `wrapper ${this.category}` }, this.category === 'plain_background' && (index.h("div", { key: 'dac6d8bac548e95afa6096fa6f00133f4b936790', class: "application_name_pattern" }, index.h("img", { key: '3448819c47f118a7bfeffe7540b78cb30f126558', src: patternSrc, alt: "" }))), index.h("div", { key: '8c510c8c5df2923d07ab4cd94daefc383cb066cd', class: `application_icon ${this.category}`, innerHTML: this.leadingIconSvg }), index.h("span", { key: '55fd5b4a54684e6b9f6fad99304e9d0554fe6af0', class: textClass }, index.h("slot", { key: 'a234fc2009b2392a8dc7926c080b51eff2daab2a', name: "application_name" })))))));
1449
1452
  }
1450
1453
  get el() { return index.getElement(this); }
1451
1454
  };