gd-bs 6.6.30 → 6.6.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.html CHANGED
@@ -60,17 +60,19 @@
60
60
  for (var i = 0; i < 10; i++) {
61
61
  items.push({
62
62
  data: i,
63
- text: "Item " + i,
64
- title: "This is " + i + " for the item.",
65
- value: i
63
+ content: "Item " + i,
64
+ badge: {
65
+ data: i,
66
+ content: i,
67
+ onClick: (el, item) => {
68
+ alert("Item " + item.data + " clicked...");
69
+ }
70
+ }
66
71
  });
67
72
  }
68
- window["cb_ddl"] = GD.Components.Dropdown({
73
+ window["dev"] = GD.Components.ListGroup({
69
74
  el: document.getElementById("dev"),
70
- items: items,
71
- isCheckbox: false,
72
- multi: true,
73
- label: "CB Dropdown"
75
+ items: items
74
76
  });
75
77
 
76
78
  // Components
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gd-bs",
3
- "version": "6.6.30",
3
+ "version": "6.6.31",
4
4
  "description": "Bootstrap JavaScript, TypeScript and Web Components library.",
5
5
  "main": "build/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -89,6 +89,16 @@ class _Navbar extends Base<INavbarProps> implements INavbar {
89
89
  private configureEvents() {
90
90
  let props = this.props.searchBox || {};
91
91
 
92
+ // See if the brand element and click event exist
93
+ let brand = this.el.querySelector(".navbar-brand") as HTMLAnchorElement;
94
+ if (brand && this.props.onClickBrand) {
95
+ // Set the click event
96
+ brand.addEventListener("click", ev => {
97
+ // Call the event
98
+ this.props.onClickBrand(brand, ev);
99
+ });
100
+ }
101
+
92
102
  // See if search events exist
93
103
  let searchbox = this.el.querySelector("form input") as HTMLInputElement;
94
104
  if (searchbox) {
@@ -150,6 +150,7 @@ export interface INavbarProps<T = HTMLElement> extends IBaseProps<INavbar> {
150
150
  items?: Array<INavbarItem>;
151
151
  itemsEnd?: Array<INavbarItem>;
152
152
  onClick?: (item?: INavbarItem, ev?: Event) => void;
153
+ onClickBrand?: (el?: HTMLElement, ev?: Event) => void;
153
154
  onItemRendered?: (el?: HTMLElement, item?: INavbarItem) => void;
154
155
  onRendered?: (el?: HTMLElement) => void;
155
156
  searchBox?: INavbarSearchBox;