@memberjunction/ng-tabstrip 0.9.4 → 0.9.9

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.
@@ -22,7 +22,7 @@ MJTabStripModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonM
22
22
  ],
23
23
  imports: [
24
24
  CommonModule,
25
- ContainerDirectivesModule
25
+ ContainerDirectivesModule,
26
26
  ],
27
27
  exports: [
28
28
  MJTabStripComponent,
@@ -1,3 +1,4 @@
1
+ import { ChangeDetectorRef } from '@angular/core';
1
2
  import { MJTabBase } from '../tab.base';
2
3
  import { MJTabStripComponent } from '../tab-strip/tab-strip.component';
3
4
  import * as i0 from "@angular/core";
@@ -6,6 +7,7 @@ import * as i0 from "@angular/core";
6
7
  */
7
8
  export declare class MJTabComponent extends MJTabBase {
8
9
  private tabstrip;
10
+ private cdr;
9
11
  private _tabSelected;
10
12
  /**
11
13
  * Determines if the tab is currently selected or not. This is set by the TabStrip component automatically when the SelectedTabIndex is set, do not set this directly.
@@ -20,7 +22,7 @@ export declare class MJTabComponent extends MJTabBase {
20
22
  * Returns a reference to the tab strip that this tab belongs to.
21
23
  */
22
24
  get TabStrip(): MJTabStripComponent;
23
- constructor(tabstrip: MJTabStripComponent);
25
+ constructor(tabstrip: MJTabStripComponent, cdr: ChangeDetectorRef);
24
26
  /**
25
27
  * Event handler for when this tab is clicked to select it, generally not a great idea to call this directly, but it is possible to call directly to simulate a click.
26
28
  * The preferred approach is to set the SelectedTabIndex property on the TabStrip component directly.
@@ -31,6 +33,6 @@ export declare class MJTabComponent extends MJTabBase {
31
33
  */
32
34
  closeTab($event: MouseEvent): void;
33
35
  handleContextMenu($event: MouseEvent): void;
34
- static ɵfac: i0.ɵɵFactoryDeclaration<MJTabComponent, [{ host: true; }]>;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<MJTabComponent, [{ host: true; }, null]>;
35
37
  static ɵcmp: i0.ɵɵComponentDeclaration<MJTabComponent, "mj-tab", never, { "TabSelected": { "alias": "TabSelected"; "required": false; }; "TabCloseable": { "alias": "TabCloseable"; "required": false; }; }, {}, never, ["*"], false, never>;
36
38
  }
@@ -24,6 +24,7 @@ export class MJTabComponent extends MJTabBase {
24
24
  }
25
25
  set TabSelected(value) {
26
26
  this._tabSelected = value;
27
+ this.cdr.detectChanges(); // Manually trigger change detection to update the view
27
28
  }
28
29
  /**
29
30
  * Returns a reference to the tab strip that this tab belongs to.
@@ -31,9 +32,10 @@ export class MJTabComponent extends MJTabBase {
31
32
  get TabStrip() {
32
33
  return this.tabstrip;
33
34
  }
34
- constructor(tabstrip) {
35
+ constructor(tabstrip, cdr) {
35
36
  super();
36
37
  this.tabstrip = tabstrip;
38
+ this.cdr = cdr;
37
39
  this._tabSelected = false;
38
40
  /**
39
41
  * Determines if the tab can be closed by a user, or not. Defaults to false.
@@ -59,7 +61,7 @@ export class MJTabComponent extends MJTabBase {
59
61
  this.tabstrip.handleTabContextMenu($event, this);
60
62
  }
61
63
  }
62
- MJTabComponent.ɵfac = function MJTabComponent_Factory(t) { return new (t || MJTabComponent)(i0.ɵɵdirectiveInject(i1.MJTabStripComponent, 1)); };
64
+ MJTabComponent.ɵfac = function MJTabComponent_Factory(t) { return new (t || MJTabComponent)(i0.ɵɵdirectiveInject(i1.MJTabStripComponent, 1), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
63
65
  MJTabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJTabComponent, selectors: [["mj-tab"]], inputs: { TabSelected: "TabSelected", TabCloseable: "TabCloseable" }, features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c1, decls: 3, vars: 4, consts: [[1, "single-tab", 3, "ngClass", "click", "contextmenu"], ["class", "tab-close-button", 3, "click", 4, "ngIf"], [1, "tab-close-button", 3, "click"]], template: function MJTabComponent_Template(rf, ctx) { if (rf & 1) {
64
66
  i0.ɵɵprojectionDef();
65
67
  i0.ɵɵelementStart(0, "div", 0);
@@ -77,7 +79,7 @@ MJTabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJTabCompone
77
79
  args: [{ selector: 'mj-tab', template: "<div class=\"single-tab\" [ngClass]=\"{'single-tab-selected': TabSelected}\" (click)=\"selectTab()\" (contextmenu)=\"handleContextMenu($event)\">\r\n <ng-content><!--CONTENT PROJECTION GOES HERE--></ng-content>\r\n <span *ngIf=\"TabCloseable\" class=\"tab-close-button\" (click)=\"closeTab($event)\" >\u2716</span>\r\n</div>", styles: ["\r\n .single-tab {\r\n flex: 0 0 auto; /* Prevent tabs from shrinking */\r\n cursor: pointer;\r\n height: 26px;\r\n margin-right: 1px;\r\n padding-left: 10px;\r\n padding-right: 10px;\r\n padding-top: 5px;\r\n border-radius: 8px 8px 0 0;\r\n border-top: solid 1px #D5D8E5;;\r\n border-left: solid 1px #D5D8E5;;\r\n border-right: solid 1px #D5D8E5;;\r\n border-bottom: 0;\r\n background-color: #D5D8E5;\r\n font-size: 14px;\r\n }\r\n .single-tab:hover {\r\n color: #bb443c;\r\n }\r\n .single-tab-selected {\r\n background-color: #F5F6FA;\r\n font-weight: bold;\r\n }\r\n \r\n .tab-close-button {\r\n cursor: pointer;\r\n margin-left: 10px;\r\n padding: 2px;\r\n font-size: 12px;\r\n border-radius: 10px;\r\n color: black;\r\n }\r\n .tab-close-button:hover {\r\n background-color: lightgray;\r\n }\r\n "] }]
78
80
  }], () => [{ type: i1.MJTabStripComponent, decorators: [{
79
81
  type: Host
80
- }] }], { TabSelected: [{
82
+ }] }, { type: i0.ChangeDetectorRef }], { TabSelected: [{
81
83
  type: Input
82
84
  }], TabCloseable: [{
83
85
  type: Input
@@ -12,17 +12,17 @@ export class MJTabBodyComponent extends MJTabBase {
12
12
  }
13
13
  }
14
14
  MJTabBodyComponent.ɵfac = function MJTabBodyComponent_Factory(t) { return new (t || MJTabBodyComponent)(i0.ɵɵdirectiveInject(i1.MJTabStripComponent, 1)); };
15
- MJTabBodyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJTabBodyComponent, selectors: [["mj-tab-body"]], inputs: { TabVisible: "TabVisible" }, features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0, decls: 2, vars: 1, consts: [["mjFillContainer", "", 3, "hidden"]], template: function MJTabBodyComponent_Template(rf, ctx) { if (rf & 1) {
15
+ MJTabBodyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJTabBodyComponent, selectors: [["mj-tab-body"]], inputs: { TabVisible: "TabVisible" }, features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0, decls: 2, vars: 1, consts: [["mjFillContainer", "", 1, "tab-body", 3, "hidden"]], template: function MJTabBodyComponent_Template(rf, ctx) { if (rf & 1) {
16
16
  i0.ɵɵprojectionDef();
17
17
  i0.ɵɵelementStart(0, "div", 0);
18
18
  i0.ɵɵprojection(1);
19
19
  i0.ɵɵelementEnd();
20
20
  } if (rf & 2) {
21
21
  i0.ɵɵproperty("hidden", !ctx.TabVisible);
22
- } }, dependencies: [i2.FillContainer] });
22
+ } }, dependencies: [i2.FillContainer], styles: [".tab-body[_ngcontent-%COMP%] {\r\n border-top: 0;\r\n background-color: #F5F6FA; \r\n width: 100%;\r\n height: 200px;\r\n display: block;\r\n overflow: auto;\r\n }"] });
23
23
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJTabBodyComponent, [{
24
24
  type: Component,
25
- args: [{ selector: 'mj-tab-body', template: "<div [hidden]=\"!TabVisible\" mjFillContainer>\r\n <ng-content><!--CONTENT PROJECTION GOES HERE--></ng-content>\r\n</div>" }]
25
+ args: [{ selector: 'mj-tab-body', template: "<div class=\"tab-body\" [hidden]=\"!TabVisible\" mjFillContainer>\r\n <ng-content><!--CONTENT PROJECTION GOES HERE--></ng-content>\r\n</div>", styles: [" \r\n\r\n.tab-body {\r\n border-top: 0;\r\n background-color: #F5F6FA; \r\n width: 100%;\r\n height: 200px;\r\n display: block;\r\n overflow: auto;\r\n } "] }]
26
26
  }], () => [{ type: i1.MJTabStripComponent, decorators: [{
27
27
  type: Host
28
28
  }] }], { TabVisible: [{
@@ -1,4 +1,4 @@
1
- import { EventEmitter, QueryList, ElementRef, AfterContentInit, AfterContentChecked, AfterViewInit } from '@angular/core';
1
+ import { EventEmitter, QueryList, ElementRef, AfterContentInit, AfterContentChecked, AfterViewInit, ChangeDetectorRef } from '@angular/core';
2
2
  import { MJTabComponent } from '../tab/tab.component';
3
3
  import { MJTabBodyComponent } from '../tab-body/tab-body.component';
4
4
  import * as i0 from "@angular/core";
@@ -24,7 +24,9 @@ export declare class TabContextMenuEvent extends TabEvent {
24
24
  mouseEvent: MouseEvent;
25
25
  }
26
26
  export declare class MJTabStripComponent implements AfterContentInit, AfterContentChecked, AfterViewInit {
27
+ private cdr;
27
28
  protected _selectedTabIndex: number;
29
+ constructor(cdr: ChangeDetectorRef);
28
30
  /**
29
31
  * The index of the selected tab. You can get/set this value and it will change the displayed tab.
30
32
  */
@@ -10,22 +10,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import { Component, Input, EventEmitter, Output, ContentChildren, ViewChild, HostListener } from '@angular/core';
11
11
  import { MJTabComponent } from '../tab/tab.component';
12
12
  import { MJTabBodyComponent } from '../tab-body/tab-body.component';
13
+ import { SharedService } from '@memberjunction/ng-shared';
13
14
  import * as i0 from "@angular/core";
14
15
  import * as i1 from "@angular/common";
15
16
  import * as i2 from "@memberjunction/ng-container-directives";
16
17
  const _c0 = ["tabInnerContainer"];
17
- function MJTabStripComponent_button_2_Template(rf, ctx) { if (rf & 1) {
18
+ function MJTabStripComponent_div_2_Template(rf, ctx) { if (rf & 1) {
18
19
  const _r4 = i0.ɵɵgetCurrentView();
19
- i0.ɵɵelementStart(0, "button", 7);
20
- i0.ɵɵlistener("click", function MJTabStripComponent_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.scrollLeft()); });
21
- i0.ɵɵtext(1, "\u21E6");
20
+ i0.ɵɵelementStart(0, "div", 7);
21
+ i0.ɵɵlistener("click", function MJTabStripComponent_div_2_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.scrollLeft()); });
22
+ i0.ɵɵelement(1, "span", 8);
22
23
  i0.ɵɵelementEnd();
23
24
  } }
24
- function MJTabStripComponent_button_6_Template(rf, ctx) { if (rf & 1) {
25
+ function MJTabStripComponent_div_6_Template(rf, ctx) { if (rf & 1) {
25
26
  const _r6 = i0.ɵɵgetCurrentView();
26
- i0.ɵɵelementStart(0, "button", 8);
27
- i0.ɵɵlistener("click", function MJTabStripComponent_button_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r5.scrollRight()); });
28
- i0.ɵɵtext(1, "\u21E8");
27
+ i0.ɵɵelementStart(0, "div", 9);
28
+ i0.ɵɵlistener("click", function MJTabStripComponent_div_6_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r5.scrollRight()); });
29
+ i0.ɵɵelement(1, "span", 10);
29
30
  i0.ɵɵelementEnd();
30
31
  } }
31
32
  const _c1 = [[["mj-tab"]], [["mj-tab-body"]]];
@@ -47,7 +48,8 @@ export class TabClosedEvent extends TabEvent {
47
48
  export class TabContextMenuEvent extends TabEvent {
48
49
  }
49
50
  export class MJTabStripComponent {
50
- constructor() {
51
+ constructor(cdr) {
52
+ this.cdr = cdr;
51
53
  this._selectedTabIndex = -1; // default to negative 1 so any valid value of 0+ will invoke a state change internally later
52
54
  /**
53
55
  * This event is fired before a tab is selected. If you set cancel to true, the tab will not be selected.
@@ -110,9 +112,14 @@ export class MJTabStripComponent {
110
112
  // now, we have to tell each of our tabs they have been selected or not, and also to tell the bodies if they are visible or not
111
113
  (_a = this.tabs) === null || _a === void 0 ? void 0 : _a.forEach((tab, i) => tab.TabSelected = i === index);
112
114
  (_b = this.tabBodies) === null || _b === void 0 ? void 0 : _b.forEach((body, i) => body.TabVisible = i === index);
115
+ // let angular now it needs to update its change detection
116
+ this.cdr.detectChanges();
117
+ // also ask for a resize now
118
+ SharedService.Instance.InvokeManualResize();
113
119
  }
114
120
  ngAfterViewInit() {
115
121
  this._viewInitialized = true;
122
+ this.SelectedTabIndex = this.SelectedTabIndex; // force a refresh of the tab visibility
116
123
  this.syncTabIndexes();
117
124
  this.checkTabScrollButtons();
118
125
  }
@@ -232,7 +239,7 @@ export class MJTabStripComponent {
232
239
  this.scrollTabHeader(-150);
233
240
  }
234
241
  }
235
- MJTabStripComponent.ɵfac = function MJTabStripComponent_Factory(t) { return new (t || MJTabStripComponent)(); };
242
+ MJTabStripComponent.ɵfac = function MJTabStripComponent_Factory(t) { return new (t || MJTabStripComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
236
243
  MJTabStripComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJTabStripComponent, selectors: [["mj-tabstrip"]], contentQueries: function MJTabStripComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
237
244
  i0.ɵɵcontentQuery(dirIndex, MJTabComponent, 4);
238
245
  i0.ɵɵcontentQuery(dirIndex, MJTabBodyComponent, 4);
@@ -247,14 +254,14 @@ MJTabStripComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJTabSt
247
254
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tabInnerContainer = _t.first);
248
255
  } }, hostBindings: function MJTabStripComponent_HostBindings(rf, ctx) { if (rf & 1) {
249
256
  i0.ɵɵlistener("resize", function MJTabStripComponent_resize_HostBindingHandler($event) { return ctx.onResize($event); }, false, i0.ɵɵresolveWindow);
250
- } }, inputs: { SelectedTabIndex: "SelectedTabIndex" }, outputs: { BeforeTabSelected: "BeforeTabSelected", TabSelected: "TabSelected", BeforeTabClosed: "BeforeTabClosed", TabClosed: "TabClosed", TabContextMenu: "TabContextMenu" }, ngContentSelectors: _c2, decls: 9, vars: 2, consts: [["mjFillContainer", "", 1, "tabstrip-container"], [1, "tab-header-outer"], ["kendoButton", "", "class", "tab-scroll-button-left", 3, "click", 4, "ngIf"], [1, "tab-header-inner"], ["tabInnerContainer", ""], ["kendoButton", "", "class", "tab-scroll-button-right", 3, "click", 4, "ngIf"], ["mjFillContainer", "", 1, "tab-body"], ["kendoButton", "", 1, "tab-scroll-button-left", 3, "click"], ["kendoButton", "", 1, "tab-scroll-button-right", 3, "click"]], template: function MJTabStripComponent_Template(rf, ctx) { if (rf & 1) {
257
+ } }, inputs: { SelectedTabIndex: "SelectedTabIndex" }, outputs: { BeforeTabSelected: "BeforeTabSelected", TabSelected: "TabSelected", BeforeTabClosed: "BeforeTabClosed", TabClosed: "TabClosed", TabContextMenu: "TabContextMenu" }, ngContentSelectors: _c2, decls: 9, vars: 2, consts: [["mjFillContainer", "", 1, "tabstrip-container"], [1, "tab-header-outer"], ["class", "tab-scroll-button tab-scroll-button-left", 3, "click", 4, "ngIf"], [1, "tab-header-inner"], ["tabInnerContainer", ""], ["class", "tab-scroll-button tab-scroll-button-right", 3, "click", 4, "ngIf"], ["mjFillContainer", "", 1, "tab-bodies"], [1, "tab-scroll-button", "tab-scroll-button-left", 3, "click"], [1, "fa-solid", "fa-caret-left"], [1, "tab-scroll-button", "tab-scroll-button-right", 3, "click"], [1, "fa-solid", "fa-caret-right"]], template: function MJTabStripComponent_Template(rf, ctx) { if (rf & 1) {
251
258
  i0.ɵɵprojectionDef(_c1);
252
259
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
253
- i0.ɵɵtemplate(2, MJTabStripComponent_button_2_Template, 2, 0, "button", 2);
260
+ i0.ɵɵtemplate(2, MJTabStripComponent_div_2_Template, 2, 0, "div", 2);
254
261
  i0.ɵɵelementStart(3, "div", 3, 4);
255
262
  i0.ɵɵprojection(5);
256
263
  i0.ɵɵelementEnd();
257
- i0.ɵɵtemplate(6, MJTabStripComponent_button_6_Template, 2, 0, "button", 5);
264
+ i0.ɵɵtemplate(6, MJTabStripComponent_div_6_Template, 2, 0, "div", 5);
258
265
  i0.ɵɵelementEnd();
259
266
  i0.ɵɵelementStart(7, "div", 6);
260
267
  i0.ɵɵprojection(8, 1);
@@ -264,11 +271,11 @@ MJTabStripComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJTabSt
264
271
  i0.ɵɵproperty("ngIf", ctx.showLeftButton);
265
272
  i0.ɵɵadvance(4);
266
273
  i0.ɵɵproperty("ngIf", ctx.showRightButton);
267
- } }, dependencies: [i1.NgIf, i2.FillContainer], styles: [".tab-header-outer[_ngcontent-%COMP%] {\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n overflow: hidden; \n\r\n background-color: #D5D8E5;\r\n}\r\n\r\n.tab-header-inner[_ngcontent-%COMP%] {\r\n display: flex;\r\n flex-direction: row;\r\n white-space: nowrap; \n\r\n position: relative; \n\r\n z-index: 1; \n\r\n\r\n padding-left: 5px;\r\n padding-top: 5px;\r\n background-color: #D5D8E5;\r\n border-bottom: #F5F6FA;\r\n}\r\n\r\n.tab-scroll-button-left[_ngcontent-%COMP%], .tab-scroll-button-right[_ngcontent-%COMP%] {\r\n position: absolute;\r\n top: 50%;\r\n transform: translateY(-50%);\r\n z-index: 2; \n\r\n}\r\n\r\n.tab-scroll-button-left[_ngcontent-%COMP%] {\r\n left: 0;\r\n}\r\n\r\n.tab-scroll-button-right[_ngcontent-%COMP%] {\r\n right: 0;\r\n}\r\n\r\n \r\n\r\n.tab-body[_ngcontent-%COMP%] {\r\n border-top: 0;\r\n background-color: #F5F6FA; \r\n width: 100%;\r\n height: 200px;\r\n display: block;\r\n}"] });
274
+ } }, dependencies: [i1.NgIf, i2.FillContainer], styles: [".tabstrip-container[_ngcontent-%COMP%] {\r\n overflow: hidden;\r\n font-size: 14px; \n\r\n}\r\n\r\n.tab-header-outer[_ngcontent-%COMP%] {\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n overflow: hidden; \n\r\n background-color: #D5D8E5;\r\n}\r\n\r\n.tab-header-inner[_ngcontent-%COMP%] {\r\n display: flex;\r\n flex-direction: row;\r\n white-space: nowrap; \n\r\n position: relative; \n\r\n z-index: 1; \n\r\n\r\n padding-left: 5px;\r\n padding-top: 5px;\r\n background-color: #D5D8E5;\r\n border-bottom: #F5F6FA;\r\n}\r\n\r\n.tab-scroll-button-left[_ngcontent-%COMP%], .tab-scroll-button-right[_ngcontent-%COMP%] {\r\n position: absolute;\r\n top: 50%;\r\n transform: translateY(-50%);\r\n z-index: 2; \n\r\n}\r\n\r\n.tab-scroll-button-left[_ngcontent-%COMP%] {\r\n left: 0;\r\n}\r\n\r\n.tab-scroll-button-right[_ngcontent-%COMP%] {\r\n right: 0;\r\n}\r\n\r\n.tab-scroll-button[_ngcontent-%COMP%] {\r\n padding: 8px 10px 10px 8px;\r\n cursor: pointer;\r\n border-radius: 6px;\r\n background-color: lightblue;\r\n}\r\n.tab-scroll-button[_ngcontent-%COMP%]:hover {\r\n background-color: pink;\r\n}"] });
268
275
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJTabStripComponent, [{
269
276
  type: Component,
270
- args: [{ selector: 'mj-tabstrip', template: "<!-- mj-tabstrip.component.html -->\r\n<div class=\"tabstrip-container\" mjFillContainer>\r\n <!-- Tab Headers -->\r\n <div class=\"tab-header-outer\">\r\n <button kendoButton *ngIf=\"showLeftButton\" class=\"tab-scroll-button-left\" (click)=\"scrollLeft()\">\u21E6</button>\r\n <div class=\"tab-header-inner\" #tabInnerContainer>\r\n <ng-content select=\"mj-tab\"></ng-content> <!-- Where <mj-tab> components are projected -->\r\n </div>\r\n <button kendoButton *ngIf=\"showRightButton\" class=\"tab-scroll-button-right\" (click)=\"scrollRight()\">\u21E8</button>\r\n </div>\r\n <!-- Tab Content -->\r\n <div class=\"tab-body\" mjFillContainer>\r\n <ng-content select=\"mj-tab-body\"></ng-content> <!-- Where <mj-tab-body> components are projected -->\r\n </div>\r\n</div>", styles: [".tab-header-outer {\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n overflow: hidden; /* Hide the overflow */\r\n background-color: #D5D8E5;\r\n}\r\n\r\n.tab-header-inner {\r\n display: flex;\r\n flex-direction: row;\r\n white-space: nowrap; /* Prevent wrapping of tabs */\r\n position: relative; /* Needed for z-index to work */\r\n z-index: 1; /* Place tabs above the content */\r\n\r\n padding-left: 5px;\r\n padding-top: 5px;\r\n background-color: #D5D8E5;\r\n border-bottom: #F5F6FA;\r\n}\r\n\r\n.tab-scroll-button-left, .tab-scroll-button-right {\r\n position: absolute;\r\n top: 50%;\r\n transform: translateY(-50%);\r\n z-index: 2; /* Ensure buttons are above the content */\r\n}\r\n\r\n.tab-scroll-button-left {\r\n left: 0;\r\n}\r\n\r\n.tab-scroll-button-right {\r\n right: 0;\r\n}\r\n\r\n \r\n\r\n.tab-body {\r\n border-top: 0;\r\n background-color: #F5F6FA; \r\n width: 100%;\r\n height: 200px;\r\n display: block;\r\n} "] }]
271
- }], null, { SelectedTabIndex: [{
277
+ args: [{ selector: 'mj-tabstrip', template: "<!-- mj-tabstrip.component.html -->\r\n<div class=\"tabstrip-container\" mjFillContainer>\r\n <!-- Tab Headers -->\r\n <div class=\"tab-header-outer\">\r\n <div *ngIf=\"showLeftButton\" class=\"tab-scroll-button tab-scroll-button-left\" (click)=\"scrollLeft()\">\r\n <span class=\"fa-solid fa-caret-left\"></span>\r\n </div>\r\n <div class=\"tab-header-inner\" #tabInnerContainer>\r\n <ng-content select=\"mj-tab\"></ng-content> <!-- Where <mj-tab> components are projected -->\r\n </div>\r\n <div *ngIf=\"showRightButton\" class=\"tab-scroll-button tab-scroll-button-right\" (click)=\"scrollRight()\">\r\n <span class=\"fa-solid fa-caret-right\"></span>\r\n </div>\r\n </div>\r\n <!-- Tab Content -->\r\n <div class=\"tab-bodies\" mjFillContainer>\r\n <ng-content select=\"mj-tab-body\"></ng-content> <!-- Where <mj-tab-body> components are projected -->\r\n </div>\r\n</div>", styles: [".tabstrip-container {\r\n overflow: hidden;\r\n font-size: 14px; /*default font size*/\r\n}\r\n\r\n.tab-header-outer {\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n overflow: hidden; /* Hide the overflow */\r\n background-color: #D5D8E5;\r\n}\r\n\r\n.tab-header-inner {\r\n display: flex;\r\n flex-direction: row;\r\n white-space: nowrap; /* Prevent wrapping of tabs */\r\n position: relative; /* Needed for z-index to work */\r\n z-index: 1; /* Place tabs above the content */\r\n\r\n padding-left: 5px;\r\n padding-top: 5px;\r\n background-color: #D5D8E5;\r\n border-bottom: #F5F6FA;\r\n}\r\n\r\n.tab-scroll-button-left, .tab-scroll-button-right {\r\n position: absolute;\r\n top: 50%;\r\n transform: translateY(-50%);\r\n z-index: 2; /* Ensure buttons are above the content */\r\n}\r\n\r\n.tab-scroll-button-left {\r\n left: 0;\r\n}\r\n\r\n.tab-scroll-button-right {\r\n right: 0;\r\n}\r\n\r\n.tab-scroll-button {\r\n padding: 8px 10px 10px 8px;\r\n cursor: pointer;\r\n border-radius: 6px;\r\n background-color: lightblue;\r\n}\r\n.tab-scroll-button:hover {\r\n background-color: pink;\r\n}\r\n\r\n "] }]
278
+ }], () => [{ type: i0.ChangeDetectorRef }], { SelectedTabIndex: [{
272
279
  type: Input
273
280
  }], BeforeTabSelected: [{
274
281
  type: Output
@@ -293,4 +300,4 @@ MJTabStripComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJTabSt
293
300
  type: HostListener,
294
301
  args: ['window:resize', ['$event']]
295
302
  }] }); })();
296
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJTabStripComponent, { className: "MJTabStripComponent", filePath: "src\\lib\\tab-strip\\tab-strip.component.ts", lineNumber: 33 }); })();
303
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJTabStripComponent, { className: "MJTabStripComponent", filePath: "src\\lib\\tab-strip\\tab-strip.component.ts", lineNumber: 34 }); })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-tabstrip",
3
- "version": "0.9.4",
3
+ "version": "0.9.9",
4
4
  "description": "MemberJunction: Very simple tab strip component used in the MJ Explorer app and reusable anywhere else in an Angular project.",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",
@@ -24,6 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@memberjunction/ng-container-directives": "^0.9.148",
27
+ "@memberjunction/ng-shared": "^0.9.51",
27
28
  "tslib": "^2.3.0"
28
29
  },
29
30
  "sideEffects": false