@memberjunction/ng-tabstrip 6.2.0-edge.0 → 6.2.0-edge.2

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.
@@ -43,11 +43,17 @@ export declare class MJTabComponent extends MJTabBase {
43
43
  * 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.
44
44
  * The preferred approach is to set the SelectedTabIndex property on the TabStrip component directly.
45
45
  */
46
+ SelectTab(): void;
47
+ /** @deprecated Use {@link SelectTab}. */
46
48
  selectTab(): void;
47
49
  /**
48
50
  * Event handler for when the close button is clicked on the tab. This will fire the BeforeTabClosed event on the TabStrip component, and if it is not cancelled, will then fire the AfterTabClosed event.
49
51
  */
52
+ CloseTab($event: MouseEvent): void;
53
+ /** @deprecated Use {@link CloseTab}. */
50
54
  closeTab($event: MouseEvent): void;
55
+ HandleContextMenu($event: MouseEvent): void;
56
+ /** @deprecated Use {@link HandleContextMenu}. */
51
57
  handleContextMenu($event: MouseEvent): void;
52
58
  static ɵfac: i0.ɵɵFactoryDeclaration<MJTabComponent, [{ host: true; }, null, null]>;
53
59
  static ɵcmp: i0.ɵɵComponentDeclaration<MJTabComponent, "mj-tab", never, { "TabSelected": { "alias": "TabSelected"; "required": false; }; "Visible": { "alias": "Visible"; "required": false; }; "Name": { "alias": "Name"; "required": false; }; "ID": { "alias": "ID"; "required": false; }; "Props": { "alias": "Props"; "required": false; }; "TabCloseable": { "alias": "TabCloseable"; "required": false; }; }, {}, never, ["*"], false, never>;
@@ -1 +1 @@
1
- {"version":3,"file":"tab.component.d.ts","sourceRoot":"","sources":["../../../src/lib/tab/tab.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgD,iBAAiB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;;AAEvE;;GAEG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AAc;CAgH1B"}
@@ -91,20 +91,32 @@ export class MJTabComponent extends MJTabBase {
91
91
  * 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.
92
92
  * The preferred approach is to set the SelectedTabIndex property on the TabStrip component directly.
93
93
  */
94
- selectTab() {
94
+ SelectTab() {
95
95
  this.tabstrip.SelectedTabIndex = this.index;
96
96
  }
97
+ /** @deprecated Use {@link SelectTab}. */
98
+ selectTab() {
99
+ return this.SelectTab();
100
+ }
97
101
  /**
98
102
  * Event handler for when the close button is clicked on the tab. This will fire the BeforeTabClosed event on the TabStrip component, and if it is not cancelled, will then fire the AfterTabClosed event.
99
103
  */
100
- closeTab($event) {
104
+ CloseTab($event) {
101
105
  $event.stopPropagation(); // prevent click from going to the tab
102
106
  this.tabstrip.CloseTab(this.index);
103
107
  }
104
- handleContextMenu($event) {
108
+ /** @deprecated Use {@link CloseTab}. */
109
+ closeTab($event) {
110
+ return this.CloseTab($event);
111
+ }
112
+ HandleContextMenu($event) {
105
113
  $event.preventDefault();
106
114
  this.tabstrip.handleTabContextMenu($event, this);
107
115
  }
116
+ /** @deprecated Use {@link HandleContextMenu}. */
117
+ handleContextMenu($event) {
118
+ return this.HandleContextMenu($event);
119
+ }
108
120
  static ɵfac = function MJTabComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJTabComponent)(i0.ɵɵdirectiveInject(i1.MJTabStripComponent, 1), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef)); };
109
121
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJTabComponent, selectors: [["mj-tab"]], hostAttrs: ["role", "presentation"], inputs: { TabSelected: "TabSelected", Visible: "Visible", Name: "Name", ID: "ID", Props: "Props", TabCloseable: "TabCloseable" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0, decls: 4, vars: 6, consts: [["role", "tab", 1, "single-tab", "mj-tabs__tab", 3, "click", "contextmenu", "ngClass"], [1, "mj-tabs__label"], ["type", "button", "tabindex", "-1", "aria-label", "Close tab", 1, "tab-close-button", "mj-tabs__close"], ["type", "button", "tabindex", "-1", "aria-label", "Close tab", 1, "tab-close-button", "mj-tabs__close", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-xmark"]], template: function MJTabComponent_Template(rf, ctx) { if (rf & 1) {
110
122
  i0.ɵɵprojectionDef();
@@ -1 +1 @@
1
- {"version":3,"file":"tab.component.js","sourceRoot":"","sources":["../../../src/lib/tab/tab.component.ts","../../../src/lib/tab/tab.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAwB,IAAI,EAAiC,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;;;;;;;;ICepC,iCAK6B;IAA3B,wLAAS,uBAAgB,KAAC;IAC1B,uBAAoD;IACtD,iBAAS;;ADnBb;;GAEG;AAUH,MAAM,OAAO,cAAe,SAAQ,SAAS;IAuEf;IACR;IACD;IAxEX,YAAY,GAAY,KAAK,CAAC;IACtC;;OAEG;IACH,IAAa,WAAW;QACtB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IACD,IAAI,WAAW,CAAC,KAAc;QAC5B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,uDAAuD;IACnF,CAAC;IAEO,QAAQ,GAAY,IAAI,CAAC;IACjC,IAAa,OAAO;QAClB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IACD,IAAW,OAAO,CAAC,KAAc;QAC/B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,oHAAoH;QACpH,iEAAiE;QAEjE,0DAA0D;QAC1D,IAAI,CAAC,IAAI,CAAC,QAAQ;YAChB,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,OAA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;IAED;;OAEG;IACI,QAAQ,CAAC,MAAkB;QAChC,MAAM,CAAC,eAAe,EAAE,CAAC,CAAC,sCAAsC;QAChE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAEM,iBAAiB,CAAC,MAAkB;QACzC,MAAM,CAAC,cAAc,EAAE,CAAC;QACxB,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC;wGAhGU,cAAc;6DAAd,cAAc;;YCX3B,8BAM4C;YAA1C,AADA,wFAAS,eAAW,IAAC,6FACN,6BAAyB,IAAC;YACzC,+BAA6B;YAAA,kBAA4D;YAAA,iBAAO;YAChG,mFAAoB;YAYtB,iBAAM;;YAlBJ,sFAAqF;;YAMrF,eAWC;YAXD,2CAWC;;;iFDRU,cAAc;cAT1B,SAAS;6BACI,KAAK,YACP,QAAQ,QAKZ,EAAE,IAAI,EAAE,cAAc,EAAE;;sBAyEjB,IAAI;;kBAlEhB,KAAK;;kBASL,KAAK;;kBAoBL,KAAK;;kBAQL,KAAK;;kBAWL,KAAK;;kBAUL,KAAK;;kFA/DK,cAAc","sourcesContent":["import { Component, Input, Output, EventEmitter, Host, ChangeDetectorRef, ElementRef } from '@angular/core';\nimport { MJTabBase } from '../tab.base';\nimport { MJTabStripComponent } from '../tab-strip/tab-strip.component';\n\n/**\n * Represents the tab in the header of a given tab strip\n */\n@Component({\n standalone: false,\n selector: 'mj-tab',\n templateUrl: './tab.component.html',\n styleUrl: './tab.component.css',\n // The ARIA tablist's children must be the role=\"tab\" elements; this host element is an extra\n // layer between them, so it opts out of the accessibility tree's structure.\n host: { role: 'presentation' },\n})\nexport class MJTabComponent extends MJTabBase {\n private _tabSelected: boolean = false;\n /**\n * 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.\n */\n @Input() get TabSelected() {\n return this._tabSelected;\n } \n set TabSelected(value: boolean) {\n this._tabSelected = value;\n this.cdr.detectChanges(); // Manually trigger change detection to update the view\n }\n\n private _visible: boolean = true;\n @Input() get Visible(): boolean {\n return this._visible;\n }\n public set Visible(value: boolean) {\n this._visible = value;\n // whenever the visible property changes we need to set the display style to none if it is not visible and make sure\n // we're not selected and set to tab index of 0 if we're selected\n\n // Step 1 - get the elementRef and set our display to none\n if (!this._visible)\n this.elementRef.nativeElement.style.display = value ? \"\" : \"none\";\n else\n this.elementRef.nativeElement.style.display = \"\";\n\n // Step 2 - if we're not visible, make sure we're not selected\n if (!this._visible)\n this.tabstrip.SelectedTabIndex = 0;\n }\n\n private _name: string = \"\"\n @Input() get Name(): string {\n return this._name;\n }\n public set Name(value: string) {\n this._name = value;\n }\n\n private _id: any = null;\n @Input() get ID(): any {\n return this._id;\n }\n public set ID(value: any) {\n this._id = value;\n }\n\n private _props: any = null;\n /**\n * A property bag that can be used to store any additional properties that you want to associate with this tab.\n */\n @Input() get Props(): any {\n return this._props;\n }\n public set Props(value: any) {\n this._props = value;\n }\n\n /**\n * Determines if the tab can be closed by a user, or not. Defaults to false.\n */\n @Input() TabCloseable: boolean = false;\n\n /**\n * Returns a reference to the tab strip that this tab belongs to.\n */\n public get TabStrip(): MJTabStripComponent {\n return this.tabstrip;\n }\n constructor(@Host() private tabstrip: MJTabStripComponent, \n private cdr: ChangeDetectorRef,\n public elementRef: ElementRef) {\n super();\n }\n\n /**\n * 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. \n * The preferred approach is to set the SelectedTabIndex property on the TabStrip component directly.\n */\n public selectTab() {\n this.tabstrip.SelectedTabIndex = this.index;\n }\n\n /**\n * Event handler for when the close button is clicked on the tab. This will fire the BeforeTabClosed event on the TabStrip component, and if it is not cancelled, will then fire the AfterTabClosed event.\n */\n public closeTab($event: MouseEvent) {\n $event.stopPropagation(); // prevent click from going to the tab\n this.tabstrip.CloseTab(this.index);\n }\n\n public handleContextMenu($event: MouseEvent) {\n $event.preventDefault();\n this.tabstrip.handleTabContextMenu($event, this);\n }\n}\n","<!-- role=\"tab\" sits on the element that actually takes focus, and `tabindex` is owned by the\n mjTabList directive on the parent (roving) — so it is deliberately not bound here. Chrome comes\n from the global .mj-tabs* stylesheet, shared with the draft/workspace strip. The legacy\n `single-tab` classes are kept alongside so existing selectors (incl. the test-utils example)\n keep resolving. -->\n<div\n class=\"single-tab mj-tabs__tab\"\n [ngClass]=\"{'single-tab-selected': TabSelected, 'mj-tabs__tab--active': TabSelected}\"\n role=\"tab\"\n [attr.aria-selected]=\"TabSelected\"\n (click)=\"selectTab()\"\n (contextmenu)=\"handleContextMenu($event)\">\n <span class=\"mj-tabs__label\"><ng-content><!--CONTENT PROJECTION GOES HERE--></ng-content></span>\n @if (TabCloseable) {\n <!-- tabindex=\"-1\": the TAB is the focus stop and Delete closes it, so a second stop per tab\n would double the strip's length in the page tab order. -->\n <button\n type=\"button\"\n class=\"tab-close-button mj-tabs__close\"\n tabindex=\"-1\"\n aria-label=\"Close tab\"\n (click)=\"closeTab($event)\">\n <i class=\"fa-solid fa-xmark\" aria-hidden=\"true\"></i>\n </button>\n }\n</div>\n"]}
1
+ {"version":3,"file":"tab.component.js","sourceRoot":"","sources":["../../../src/lib/tab/tab.component.ts","../../../src/lib/tab/tab.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAwB,IAAI,EAAiC,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;;;;;;;;ICepC,iCAK6B;IAA3B,wLAAS,uBAAgB,KAAC;IAC1B,uBAAoD;IACtD,iBAAS;;ADnBb;;GAEG;AAUH,MAAM,OAAO,cAAe,SAAQ,SAAS;IAuEf;IACR;IACD;IAxEX,YAAY,GAAY,KAAK,CAAC;IACtC;;OAEG;IACH,IAAa,WAAW;QACtB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IACD,IAAI,WAAW,CAA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;;YAlBJ,sFAAqF;;YAMrF,eAWC;YAXD,2CAWC;;;iFDRU,cAAc;cAT1B,SAAS;6BACI,KAAK,YACP,QAAQ,QAKZ,EAAE,IAAI,EAAE,cAAc,EAAE;;sBAyEjB,IAAI;;kBAlEhB,KAAK;;kBASL,KAAK;;kBAoBL,KAAK;;kBAQL,KAAK;;kBAWL,KAAK;;kBAUL,KAAK;;kFA/DK,cAAc","sourcesContent":["import { Component, Input, Output, EventEmitter, Host, ChangeDetectorRef, ElementRef } from '@angular/core';\nimport { MJTabBase } from '../tab.base';\nimport { MJTabStripComponent } from '../tab-strip/tab-strip.component';\n\n/**\n * Represents the tab in the header of a given tab strip\n */\n@Component({\n standalone: false,\n selector: 'mj-tab',\n templateUrl: './tab.component.html',\n styleUrl: './tab.component.css',\n // The ARIA tablist's children must be the role=\"tab\" elements; this host element is an extra\n // layer between them, so it opts out of the accessibility tree's structure.\n host: { role: 'presentation' },\n})\nexport class MJTabComponent extends MJTabBase {\n private _tabSelected: boolean = false;\n /**\n * 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.\n */\n @Input() get TabSelected() {\n return this._tabSelected;\n } \n set TabSelected(value: boolean) {\n this._tabSelected = value;\n this.cdr.detectChanges(); // Manually trigger change detection to update the view\n }\n\n private _visible: boolean = true;\n @Input() get Visible(): boolean {\n return this._visible;\n }\n public set Visible(value: boolean) {\n this._visible = value;\n // whenever the visible property changes we need to set the display style to none if it is not visible and make sure\n // we're not selected and set to tab index of 0 if we're selected\n\n // Step 1 - get the elementRef and set our display to none\n if (!this._visible)\n this.elementRef.nativeElement.style.display = value ? \"\" : \"none\";\n else\n this.elementRef.nativeElement.style.display = \"\";\n\n // Step 2 - if we're not visible, make sure we're not selected\n if (!this._visible)\n this.tabstrip.SelectedTabIndex = 0;\n }\n\n private _name: string = \"\"\n @Input() get Name(): string {\n return this._name;\n }\n public set Name(value: string) {\n this._name = value;\n }\n\n private _id: any = null;\n @Input() get ID(): any {\n return this._id;\n }\n public set ID(value: any) {\n this._id = value;\n }\n\n private _props: any = null;\n /**\n * A property bag that can be used to store any additional properties that you want to associate with this tab.\n */\n @Input() get Props(): any {\n return this._props;\n }\n public set Props(value: any) {\n this._props = value;\n }\n\n /**\n * Determines if the tab can be closed by a user, or not. Defaults to false.\n */\n @Input() TabCloseable: boolean = false;\n\n /**\n * Returns a reference to the tab strip that this tab belongs to.\n */\n public get TabStrip(): MJTabStripComponent {\n return this.tabstrip;\n }\n constructor(@Host() private tabstrip: MJTabStripComponent, \n private cdr: ChangeDetectorRef,\n public elementRef: ElementRef) {\n super();\n }\n\n /**\n * 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. \n * The preferred approach is to set the SelectedTabIndex property on the TabStrip component directly.\n */\n public SelectTab() {\n this.tabstrip.SelectedTabIndex = this.index;\n }\n\n /** @deprecated Use {@link SelectTab}. */\n public selectTab() {\n return this.SelectTab();\n }\n\n /**\n * Event handler for when the close button is clicked on the tab. This will fire the BeforeTabClosed event on the TabStrip component, and if it is not cancelled, will then fire the AfterTabClosed event.\n */\n public CloseTab($event: MouseEvent) {\n $event.stopPropagation(); // prevent click from going to the tab\n this.tabstrip.CloseTab(this.index);\n }\n\n /** @deprecated Use {@link CloseTab}. */\n public closeTab($event: MouseEvent) {\n return this.CloseTab($event);\n }\n\n public HandleContextMenu($event: MouseEvent) {\n $event.preventDefault();\n this.tabstrip.handleTabContextMenu($event, this);\n }\n\n /** @deprecated Use {@link HandleContextMenu}. */\n public handleContextMenu($event: MouseEvent) {\n return this.HandleContextMenu($event);\n }\n}\n","<!-- role=\"tab\" sits on the element that actually takes focus, and `tabindex` is owned by the\n mjTabList directive on the parent (roving) — so it is deliberately not bound here. Chrome comes\n from the global .mj-tabs* stylesheet, shared with the draft/workspace strip. The legacy\n `single-tab` classes are kept alongside so existing selectors (incl. the test-utils example)\n keep resolving. -->\n<div\n class=\"single-tab mj-tabs__tab\"\n [ngClass]=\"{'single-tab-selected': TabSelected, 'mj-tabs__tab--active': TabSelected}\"\n role=\"tab\"\n [attr.aria-selected]=\"TabSelected\"\n (click)=\"selectTab()\"\n (contextmenu)=\"handleContextMenu($event)\">\n <span class=\"mj-tabs__label\"><ng-content><!--CONTENT PROJECTION GOES HERE--></ng-content></span>\n @if (TabCloseable) {\n <!-- tabindex=\"-1\": the TAB is the focus stop and Delete closes it, so a second stop per tab\n would double the strip's length in the page tab order. -->\n <button\n type=\"button\"\n class=\"tab-close-button mj-tabs__close\"\n tabindex=\"-1\"\n aria-label=\"Close tab\"\n (click)=\"closeTab($event)\">\n <i class=\"fa-solid fa-xmark\" aria-hidden=\"true\"></i>\n </button>\n }\n</div>\n"]}
@@ -105,10 +105,24 @@ export declare class MJTabStripComponent implements AfterContentInit, AfterConte
105
105
  * Method will close the specified tab number. It is automatically called by a tab that has TabCloseable set to true, if the user clicks the close button, and can be called programatically as well.
106
106
  */
107
107
  CloseTab(tabIndex: number): Promise<void>;
108
+ HandleTabContextMenu($event: MouseEvent, tab: MJTabComponent): void;
109
+ /** @deprecated Use {@link HandleTabContextMenu}. */
108
110
  handleTabContextMenu($event: MouseEvent, tab: MJTabComponent): void;
109
- tabInnerContainer: ElementRef;
110
- showLeftButton: boolean;
111
- showRightButton: boolean;
111
+ TabInnerContainer: ElementRef;
112
+ /** @deprecated Use {@link TabInnerContainer}. */
113
+ get tabInnerContainer(): ElementRef;
114
+ /** @deprecated Use {@link TabInnerContainer}. */
115
+ set tabInnerContainer(value: ElementRef);
116
+ ShowLeftButton: boolean;
117
+ /** @deprecated Use {@link ShowLeftButton}. */
118
+ get showLeftButton(): boolean;
119
+ /** @deprecated Use {@link ShowLeftButton}. */
120
+ set showLeftButton(value: boolean);
121
+ ShowRightButton: boolean;
122
+ /** @deprecated Use {@link ShowRightButton}. */
123
+ get showRightButton(): boolean;
124
+ /** @deprecated Use {@link ShowRightButton}. */
125
+ set showRightButton(value: boolean);
112
126
  onResize(event: any): void;
113
127
  protected checkTabScrollButtons(): void;
114
128
  protected scrollTabHeader(scrollAmount: number): void;
@@ -116,7 +130,11 @@ export declare class MJTabStripComponent implements AfterContentInit, AfterConte
116
130
  * This property determines how many pixels to scroll when the scrollLeft or scrollRight methods are called.
117
131
  */
118
132
  ScrollAmount: number;
133
+ ScrollLeft(): void;
134
+ /** @deprecated Use {@link ScrollLeft}. */
119
135
  scrollLeft(): void;
136
+ ScrollRight(): void;
137
+ /** @deprecated Use {@link ScrollRight}. */
120
138
  scrollRight(): void;
121
139
  /**
122
140
  * Keyboard navigation from the shared `mjTabList` directive (arrows / Home / End / Enter).
@@ -126,6 +144,10 @@ export declare class MJTabStripComponent implements AfterContentInit, AfterConte
126
144
  * view — arrowing to a tab hidden behind the overflow edge would otherwise move focus somewhere
127
145
  * the user cannot see.
128
146
  */
147
+ OnTabActivateRequested(request: {
148
+ Index: number;
149
+ }): void;
150
+ /** @deprecated Use {@link OnTabActivateRequested}. */
129
151
  onTabActivateRequested(request: {
130
152
  Index: number;
131
153
  }): void;
@@ -134,6 +156,10 @@ export declare class MJTabStripComponent implements AfterContentInit, AfterConte
134
156
  * close button uses, so the cancelable `BeforeTabClosed` contract holds for keyboard users too.
135
157
  * Ignored for tabs that are not closeable.
136
158
  */
159
+ OnTabCloseRequested(request: {
160
+ Index: number;
161
+ }): void;
162
+ /** @deprecated Use {@link OnTabCloseRequested}. */
137
163
  onTabCloseRequested(request: {
138
164
  Index: number;
139
165
  }): void;
@@ -141,6 +167,8 @@ export declare class MJTabStripComponent implements AfterContentInit, AfterConte
141
167
  * This method will scroll the specified tab index into view if it is not currently visible in the tab strip.
142
168
  * @param tabIndex
143
169
  */
170
+ ScrollIntoView(tabIndex: number): void;
171
+ /** @deprecated Use {@link ScrollIntoView}. */
144
172
  scrollIntoView(tabIndex: number): void;
145
173
  static ɵfac: i0.ɵɵFactoryDeclaration<MJTabStripComponent, never>;
146
174
  static ɵcmp: i0.ɵɵComponentDeclaration<MJTabStripComponent, "mj-tabstrip", never, { "FillWidth": { "alias": "FillWidth"; "required": false; }; "FillHeight": { "alias": "FillHeight"; "required": false; }; "SelectedTabIndex": { "alias": "SelectedTabIndex"; "required": false; }; "ScrollAmount": { "alias": "ScrollAmount"; "required": false; }; }, { "ResizeContainer": "ResizeContainer"; "BeforeTabSelected": "BeforeTabSelected"; "TabSelected": "TabSelected"; "BeforeTabClosed": "BeforeTabClosed"; "TabClosed": "TabClosed"; "TabContextMenu": "TabContextMenu"; "TabScrolled": "TabScrolled"; }, ["tabs", "tabBodies"], ["mj-tab", "mj-tab-body"], false, never>;
@@ -1 +1 @@
1
- {"version":3,"file":"tab-strip.component.d.ts","sourceRoot":"","sources":["../../../src/lib/tab-strip/tab-strip.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,YAAY,EAA2B,SAAS,EAA2B,UAAU,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEjN,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;;AAGpE,qBAAa,QAAQ;IACZ,KAAK,EAAG,MAAM,CAAC;IACf,GAAG,EAAE,cAAc,GAAG,IAAI,CAAQ;IAClC,IAAI,EAAE,kBAAkB,GAAG,IAAI,CAAQ;CAC/C;AACD,qBAAa,kBAAmB,SAAQ,QAAQ;IACvC,MAAM,EAAE,OAAO,CAAS;CAChC;AACD,qBAAa,cAAe,SAAQ,QAAQ;IAC1C;;OAEG;IACI,WAAW,EAAG,MAAM,CAAA;IAC3B;;OAEG;IACI,IAAI,EAAG,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC;CACnC;AACD,qBAAa,mBAAoB,SAAQ,QAAQ;IACxC,UAAU,EAAG,UAAU,CAAC;CAChC;AAKD,qBAMa,mBAAoB,YAAW,gBAAgB,EAAE,mBAAmB,EAAE,aAAa;IAUlF,OAAO,CAAC,G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AK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAO/D,sDAAsD;IAC/C,sBAAsB,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAI/D;;;;OAIG;IACI,mBAAmB,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAO5D,mDAAmD;IAC5C,mBAAmB,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAK5D;;;OAGG;IACI,cAAc,CAAC,QAAQ,EAAE,MAAM;IAUtC,8CAA8C;IACvC,cAAc,CAAC,QAAQ,EAAE,MAAM;yCA9Z3B,mBAAmB;2CAAnB,mBAAmB;CAia/B"}
@@ -22,9 +22,9 @@ function MJTabStripComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
22
22
  i0.ɵɵelementEnd();
23
23
  } }
24
24
  export class TabEvent {
25
- index;
26
- tab = null;
27
- body = null;
25
+ index; // case-violation-ok-legacy-back-compat: object literals are assigned to this class, so an accessor stub changes what they must supply
26
+ tab = null; // case-violation-ok-legacy-back-compat: object literals are assigned to this class, so an accessor stub changes what they must supply
27
+ body = null; // case-violation-ok-legacy-back-compat: object literals are assigned to this class, so an accessor stub changes what they must supply
28
28
  }
29
29
  export class TabCancelableEvent extends TabEvent {
30
30
  cancel = false;
@@ -33,14 +33,14 @@ export class TabClosedEvent extends TabEvent {
33
33
  /**
34
34
  * This property provides the default calculation for what the new tab index will be and can be overriden by the container component to set a different value.
35
35
  */
36
- newTabIndex;
36
+ newTabIndex; // case-violation-ok-legacy-back-compat: object literals are assigned to this class, so an accessor stub changes what they must supply
37
37
  /**
38
38
  * Whenever the container is done processing, it MUST call this done method to signal that it is done.
39
39
  */
40
- done;
40
+ done; // case-violation-ok-legacy-back-compat: object literals are assigned to this class, so an accessor stub changes what they must supply
41
41
  }
42
42
  export class TabContextMenuEvent extends TabEvent {
43
- mouseEvent;
43
+ mouseEvent; // case-violation-ok-legacy-back-compat: object literals are assigned to this class, so an accessor stub changes what they must supply
44
44
  }
45
45
  /** Source of per-instance DOM id bases — see {@link MJTabStripComponent.IdBase}. */
46
46
  let tabStripIdSeq = 0;
@@ -163,14 +163,14 @@ export class MJTabStripComponent {
163
163
  * the ScrollIntoView method being called.
164
164
  */
165
165
  TabScrolled = new EventEmitter();
166
- tabs;
167
- tabBodies;
166
+ tabs; // case-violation-ok-legacy-back-compat: the PascalCase name is already taken in this scope
167
+ tabBodies; // case-violation-ok-legacy-back-compat: the PascalCase name is already taken in this scope
168
168
  _viewInitialized = false;
169
169
  ngAfterViewInit() {
170
170
  this._viewInitialized = true;
171
171
  // Dev-mode guard: the .mj-tabs* chrome lives in a global stylesheet a standalone host must
172
172
  // import; a missing import renders bare divs with no error. Warn instead of staying silent.
173
- warnIfTabChromeMissing(this.tabInnerContainer?.nativeElement?.closest('.mj-tabs') ?? undefined);
173
+ warnIfTabChromeMissing(this.TabInnerContainer?.nativeElement?.closest('.mj-tabs') ?? undefined);
174
174
  this.SelectedTabIndex = this.SelectedTabIndex; // force a refresh of the tab visibility
175
175
  this.syncTabIndexes();
176
176
  this.checkTabScrollButtons();
@@ -284,31 +284,59 @@ export class MJTabStripComponent {
284
284
  else
285
285
  throw new Error("Invalid tab index: " + tabIndex);
286
286
  }
287
- handleTabContextMenu($event, tab) {
287
+ HandleTabContextMenu($event, tab) {
288
288
  this.TabContextMenu.emit({ index: tab.index, tab: tab, body: this.tabBodies.toArray()[tab.index], mouseEvent: $event });
289
289
  }
290
+ /** @deprecated Use {@link HandleTabContextMenu}. */
291
+ handleTabContextMenu($event, tab) {
292
+ return this.HandleTabContextMenu($event, tab);
293
+ }
290
294
  /* INTERNAL IMPLEMENTATION */
291
- tabInnerContainer;
292
- showLeftButton = false;
293
- showRightButton = false;
295
+ TabInnerContainer;
296
+ /** @deprecated Use {@link TabInnerContainer}. */
297
+ get tabInnerContainer() {
298
+ return this.TabInnerContainer;
299
+ }
300
+ /** @deprecated Use {@link TabInnerContainer}. */
301
+ set tabInnerContainer(value) {
302
+ this.TabInnerContainer = value;
303
+ }
304
+ ShowLeftButton = false;
305
+ /** @deprecated Use {@link ShowLeftButton}. */
306
+ get showLeftButton() {
307
+ return this.ShowLeftButton;
308
+ }
309
+ /** @deprecated Use {@link ShowLeftButton}. */
310
+ set showLeftButton(value) {
311
+ this.ShowLeftButton = value;
312
+ }
313
+ ShowRightButton = false;
314
+ /** @deprecated Use {@link ShowRightButton}. */
315
+ get showRightButton() {
316
+ return this.ShowRightButton;
317
+ }
318
+ /** @deprecated Use {@link ShowRightButton}. */
319
+ set showRightButton(value) {
320
+ this.ShowRightButton = value;
321
+ }
294
322
  onResize(event) {
295
323
  this.checkTabScrollButtons();
296
324
  }
297
325
  checkTabScrollButtons() {
298
- if (this.tabInnerContainer && this.tabInnerContainer.nativeElement) {
326
+ if (this.TabInnerContainer && this.TabInnerContainer.nativeElement) {
299
327
  // The list itself is the scroller now (`.mj-tabs__list` is `overflow-x: auto`), so overflow
300
328
  // and position are read off its NATIVE scroll state — the old scheme of animating a `left`
301
329
  // offset against a relatively-positioned wrapper is gone with the wrapper's CSS.
302
- const container = this.tabInnerContainer.nativeElement;
330
+ const container = this.TabInnerContainer.nativeElement;
303
331
  const overflow = container.scrollWidth - container.clientWidth;
304
- this.showLeftButton = overflow > 0 && container.scrollLeft > 0;
305
- this.showRightButton = overflow > 0 && container.scrollLeft < overflow - 1;
332
+ this.ShowLeftButton = overflow > 0 && container.scrollLeft > 0;
333
+ this.ShowRightButton = overflow > 0 && container.scrollLeft < overflow - 1;
306
334
  }
307
335
  }
308
336
  scrollTabHeader(scrollAmount) {
309
337
  // Positive amount = reveal content to the LEFT (the old `left`-offset convention, preserved so
310
338
  // ScrollAmount and the button wiring keep their meaning); native scrollLeft counts the other way.
311
- const container = this.tabInnerContainer.nativeElement;
339
+ const container = this.TabInnerContainer.nativeElement;
312
340
  container.scrollBy({ left: -scrollAmount, behavior: 'smooth' });
313
341
  // Smooth scrolling settles asynchronously; re-evaluate the buttons when it has.
314
342
  setTimeout(() => this.checkTabScrollButtons(), 300);
@@ -318,12 +346,20 @@ export class MJTabStripComponent {
318
346
  * This property determines how many pixels to scroll when the scrollLeft or scrollRight methods are called.
319
347
  */
320
348
  ScrollAmount = 150;
321
- scrollLeft() {
349
+ ScrollLeft() {
322
350
  this.scrollTabHeader(150);
323
351
  }
324
- scrollRight() {
352
+ /** @deprecated Use {@link ScrollLeft}. */
353
+ scrollLeft() {
354
+ return this.ScrollLeft();
355
+ }
356
+ ScrollRight() {
325
357
  this.scrollTabHeader(-150);
326
358
  }
359
+ /** @deprecated Use {@link ScrollRight}. */
360
+ scrollRight() {
361
+ return this.ScrollRight();
362
+ }
327
363
  /**
328
364
  * Keyboard navigation from the shared `mjTabList` directive (arrows / Home / End / Enter).
329
365
  *
@@ -332,28 +368,36 @@ export class MJTabStripComponent {
332
368
  * view — arrowing to a tab hidden behind the overflow edge would otherwise move focus somewhere
333
369
  * the user cannot see.
334
370
  */
335
- onTabActivateRequested(request) {
371
+ OnTabActivateRequested(request) {
336
372
  if (request.Index >= 0 && request.Index < this.tabs.length) {
337
373
  this.SelectedTabIndex = request.Index;
338
- this.scrollIntoView(request.Index);
374
+ this.ScrollIntoView(request.Index);
339
375
  }
340
376
  }
377
+ /** @deprecated Use {@link OnTabActivateRequested}. */
378
+ onTabActivateRequested(request) {
379
+ return this.OnTabActivateRequested(request);
380
+ }
341
381
  /**
342
382
  * Delete / Backspace on a focused tab. Routed through the SAME `CloseTab` path a click on the
343
383
  * close button uses, so the cancelable `BeforeTabClosed` contract holds for keyboard users too.
344
384
  * Ignored for tabs that are not closeable.
345
385
  */
346
- onTabCloseRequested(request) {
386
+ OnTabCloseRequested(request) {
347
387
  const tab = this.tabs?.toArray()[request.Index];
348
388
  if (tab?.TabCloseable) {
349
389
  void this.CloseTab(request.Index);
350
390
  }
351
391
  }
392
+ /** @deprecated Use {@link OnTabCloseRequested}. */
393
+ onTabCloseRequested(request) {
394
+ return this.OnTabCloseRequested(request);
395
+ }
352
396
  /**
353
397
  * This method will scroll the specified tab index into view if it is not currently visible in the tab strip.
354
398
  * @param tabIndex
355
399
  */
356
- scrollIntoView(tabIndex) {
400
+ ScrollIntoView(tabIndex) {
357
401
  // We do NOT change tab selection — the caller does that separately if they want to. The list
358
402
  // is a native horizontal scroller now, so the browser's own logic does the geometry.
359
403
  if (tabIndex >= 0 && tabIndex < this.tabs.length) {
@@ -362,6 +406,10 @@ export class MJTabStripComponent {
362
406
  setTimeout(() => this.checkTabScrollButtons(), 300);
363
407
  }
364
408
  }
409
+ /** @deprecated Use {@link ScrollIntoView}. */
410
+ scrollIntoView(tabIndex) {
411
+ return this.ScrollIntoView(tabIndex);
412
+ }
365
413
  static ɵfac = function MJTabStripComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJTabStripComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
366
414
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJTabStripComponent, selectors: [["mj-tabstrip"]], contentQueries: function MJTabStripComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
367
415
  i0.ɵɵcontentQuery(dirIndex, MJTabComponent, 4)(dirIndex, MJTabBodyComponent, 4);
@@ -373,7 +421,7 @@ export class MJTabStripComponent {
373
421
  i0.ɵɵviewQuery(_c0, 5);
374
422
  } if (rf & 2) {
375
423
  let _t;
376
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tabInnerContainer = _t.first);
424
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.TabInnerContainer = _t.first);
377
425
  } }, hostBindings: function MJTabStripComponent_HostBindings(rf, ctx) { if (rf & 1) {
378
426
  i0.ɵɵlistener("resize", function MJTabStripComponent_resize_HostBindingHandler($event) { return ctx.onResize($event); }, i0.ɵɵresolveWindow);
379
427
  } }, inputs: { FillWidth: "FillWidth", FillHeight: "FillHeight", SelectedTabIndex: "SelectedTabIndex", ScrollAmount: "ScrollAmount" }, outputs: { ResizeContainer: "ResizeContainer", BeforeTabSelected: "BeforeTabSelected", TabSelected: "TabSelected", BeforeTabClosed: "BeforeTabClosed", TabClosed: "TabClosed", TabContextMenu: "TabContextMenu", TabScrolled: "TabScrolled" }, standalone: false, ngContentSelectors: _c2, decls: 9, vars: 2, consts: [["tabInnerContainer", ""], [1, "tabstrip-container"], [1, "tab-header-outer", "mj-tabs", "mj-tabs__bar"], ["type", "button", "tabindex", "-1", "aria-label", "Scroll tabs left", 1, "mj-tabs__scroll"], ["mjTabList", "", 1, "tab-header-inner", "mj-tabs__list", 3, "scroll", "TabActivateRequested", "TabCloseRequested"], ["type", "button", "tabindex", "-1", "aria-label", "Scroll tabs right", 1, "mj-tabs__scroll"], [1, "tab-bodies"], ["type", "button", "tabindex", "-1", "aria-label", "Scroll tabs left", 1, "mj-tabs__scroll", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-caret-left"], ["type", "button", "tabindex", "-1", "aria-label", "Scroll tabs right", 1, "mj-tabs__scroll", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-caret-right"]], template: function MJTabStripComponent_Template(rf, ctx) { if (rf & 1) {
@@ -425,7 +473,7 @@ export class MJTabStripComponent {
425
473
  }], tabBodies: [{
426
474
  type: ContentChildren,
427
475
  args: [MJTabBodyComponent]
428
- }], tabInnerContainer: [{
476
+ }], TabInnerContainer: [{
429
477
  type: ViewChild,
430
478
  args: ['tabInnerContainer']
431
479
  }], onResize: [{
@@ -1 +1 @@
1
- {"version":3,"file":"tab-strip.component.js","sourceRoot":"","sources":["../../../src/lib/tab-strip/tab-strip.component.ts","../../../src/lib/tab-strip/tab-strip.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,eAAe,EAAa,SAAS,EAAE,YAAY,EAAuF,MAAM,eAAe,CAAC;A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ADA,+FAAU,2BAAuB,IAAC,oHACV,kCAA8B,IAAC,8GAClC,+BAA2B,IAAC;YACjD,kBAAyC;YAC3C,iBAAM;YACN,wFAAuB;YAKzB,iBAAM;YAEN,8BAAwB;YACtB,qBAA8C;YAElD,AADE,iBAAM,EACF;;YAxBF,eAIC;YAJD,6CAIC;YAUD,eAIC;YAJD,8CAIC;;;iFDYQ,mBAAmB;cAN/B,SAAS;6BACI,KAAK,YACP,aAAa;;kBAgBtB,KAAK;;kBAEL,KAAK;;kBAYL,MAAM;;kBAKN,KAAK;;kBA6EL,MAAM;;kBAKN,MAAM;;kBAKN,MAAM;;kBAKN,MAAM;;kBAKN,MAAM;;kBAMN,MAAM;;kBAGN,eAAe;mBAAC,cAAc;;kBAC9B,eAAe;mBAAC,kBAAkB;;kBA0IlC,SAAS;mBAAC,mBAAmB;;kBAK7B,YAAY;mBAAC,eAAe,EAAE,CAAC,QAAQ,CAAC;;kBA8BxC,KAAK;;kFAvTK,mBAAmB","sourcesContent":["import { Component, Input, EventEmitter, Output, ContentChildren, QueryList, ViewChild, HostListener, ElementRef, AfterContentInit, AfterContentChecked, AfterViewInit, ChangeDetectorRef } from '@angular/core';\nimport { warnIfTabChromeMissing } from '@memberjunction/ng-ui-components';\nimport { MJTabComponent } from '../tab/tab.component';\nimport { MJTabBodyComponent } from '../tab-body/tab-body.component';\n\n \nexport class TabEvent {\n public index!: number;\n public tab: MJTabComponent | null = null;\n public body: MJTabBodyComponent | null = null;\n}\nexport class TabCancelableEvent extends TabEvent {\n public cancel: boolean = false;\n}\nexport class TabClosedEvent extends TabEvent {\n /**\n * This property provides the default calculation for what the new tab index will be and can be overriden by the container component to set a different value.\n */\n public newTabIndex!: number\n /**\n * Whenever the container is done processing, it MUST call this done method to signal that it is done. \n */\n public done!: (error?: any) => {};\n}\nexport class TabContextMenuEvent extends TabEvent {\n public mouseEvent!: MouseEvent;\n}\n\n/** Source of per-instance DOM id bases — see {@link MJTabStripComponent.IdBase}. */\nlet tabStripIdSeq = 0;\n\n@Component({\n standalone: false,\n selector: 'mj-tabstrip',\n templateUrl: './tab-strip.component.html',\n styleUrls: ['./tab-strip.component.css']\n})\nexport class MJTabStripComponent implements AfterContentInit, AfterContentChecked, AfterViewInit {\n protected _selectedTabIndex: number = 0; // default to negative 1 so any valid value of 0+ will invoke a state change internally later\n\n public static OutputDebugInfo: boolean = false;\n protected static OutputDebugMessage(message: string): void {\n if (MJTabStripComponent.OutputDebugInfo) {\n console.log(message);\n }\n }\n\n constructor(private cdr: ChangeDetectorRef) { }\n /** @deprecated No longer read — the strip sizes to content and the HOST owns region sizing. Kept only so existing bindings compile; remove on the next major. */\n @Input() FillWidth: boolean = true;\n /** @deprecated No longer read — the strip sizes to content and the HOST owns region sizing. Kept only so existing bindings compile; remove on the next major. */\n @Input() FillHeight: boolean = true;\n\n /**\n * Per-instance id base pairing each tab with its panel (`aria-controls` / `aria-labelledby`).\n * Index-suffixed by the tab/body components themselves once `syncTabIndexes` has run.\n */\n public readonly IdBase: string = `mj-tabstrip-${++tabStripIdSeq}`;\n\n /**\n * This event is raised whenever the TabStrip component determines it would be advisable to conduct any necessary\n * resizing action in the parent container. Implement an event handler to handle this, if desired, for your application.\n */\n @Output() ResizeContainer = new EventEmitter();\n\n /**\n * The index of the selected tab. You can get/set this value and it will change the displayed tab.\n */\n @Input() get SelectedTabIndex(): number {\n return this._selectedTabIndex;\n }\n set SelectedTabIndex(index: number) {\n // check to make sure that the new index is different from the current index and only do the work here if it is different\n MJTabStripComponent.OutputDebugMessage(`MJTabStripComponent.SelectedTabIndex(${index})`);\n if (index !== this._selectedTabIndex) {\n const props = { \n index: index!, \n tab: index !== null && this.tabs ? this.tabs.toArray()[index] : null,\n body: index !== null && this.tabBodies ? this.tabBodies.toArray()[index] : null,\n cancel: false\n };\n if (props.tab?.Visible) {\n this.BeforeTabSelected.emit(props);\n if (!props.cancel) {\n this._selectedTabIndex = index;\n \n this.innerRefreshTabVisibility(index); \n \n const afterProps = {\n index: index!,\n tab: props.tab,\n body: props.body\n }\n this.TabSelected.emit(afterProps); \n } \n }\n else\n throw new Error(`Tab index ${index} is not visible and cannot be selected.`);\n }\n else {\n // always do this even if we're not firing event since we're already on the right tab\n this.innerRefreshTabVisibility(index); \n }\n }\n\n /**\n * This method will attempt to set the current tab by name. If the tab is found, it will be selected and the method will return the tab object. If the tab is not found, the method will return undefined.\n * @param tabName \n * @returns \n */\n public SelectTabByName(tabName: string): MJTabComponent | undefined {\n const tab = this.GetTabByName(tabName);\n if (tab) {\n if (tab.Visible)\n this.SelectedTabIndex = tab.index;\n else\n throw new Error(`Tab ${tabName} is not visible and cannot be selected.`);\n }\n return tab;\n }\n\n public GetTabByName(tabName: string): MJTabComponent | undefined {\n return this.tabs.find(t => t.Name?.trim().toLowerCase() === tabName.trim().toLowerCase());\n }\n\n protected innerRefreshTabVisibility(index: number) {\n Promise.resolve().then(() => {\n MJTabStripComponent.OutputDebugMessage(`MJTabStripComponent.innerRefreshTabVisibility(${index})`);\n // do this within a Promise.resolve() to ensure that the change detection has a chance to catch up before we start changing things\n\n // 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\n this.tabs?.forEach((tab, i) => tab.TabSelected = i === index);\n this.tabBodies?.forEach((body, i) => body.TabVisible = i === index);\n\n // let angular now it needs to update its change detection\n this.cdr.detectChanges();\n \n // also ask for a resize now\n this.ResizeContainer.emit();\n });\n }\n\n /**\n * This event is fired before a tab is selected. If you set cancel to true, the tab will not be selected.\n */\n @Output() BeforeTabSelected = new EventEmitter<TabCancelableEvent>();\n\n /**\n * This event is fired when a tab is selected.\n */\n @Output() TabSelected = new EventEmitter<TabEvent>();\n\n /**\n * This event is fired before a tab is closed. If you set cancel to true, the tab will not be closed.\n */\n @Output() BeforeTabClosed = new EventEmitter<TabCancelableEvent>();\n\n /**\n * This event is fired after a tab is closed.\n */\n @Output() TabClosed = new EventEmitter<TabClosedEvent>(true);\n\n /**\n * This event is fired when a tab is right-clicked and the context menu event from the tab header fires.\n */\n @Output() TabContextMenu = new EventEmitter<TabContextMenuEvent>();\n\n /**\n * This event is fired whenever the tab control is scrolled left or right. This event can be invoked either due to a user clicking on the left/right buttons or by calling the scrollLeft/scrollRight methods, or by\n * the ScrollIntoView method being called.\n */\n @Output() TabScrolled = new EventEmitter();\n\n\n @ContentChildren(MJTabComponent) tabs!: QueryList<MJTabComponent>;\n @ContentChildren(MJTabBodyComponent) tabBodies!: QueryList<MJTabBodyComponent>;\n \n\n private _viewInitialized: boolean = false;\n ngAfterViewInit() {\n this._viewInitialized = true;\n // Dev-mode guard: the .mj-tabs* chrome lives in a global stylesheet a standalone host must\n // import; a missing import renders bare divs with no error. Warn instead of staying silent.\n warnIfTabChromeMissing(this.tabInnerContainer?.nativeElement?.closest('.mj-tabs') ?? undefined);\n this.SelectedTabIndex = this.SelectedTabIndex; // force a refresh of the tab visibility\n this.syncTabIndexes();\n this.checkTabScrollButtons();\n }\n ngAfterContentInit() {\n this.syncTabIndexes();\n }\n ngAfterContentChecked(): void {\n this.syncTabIndexes();\n this.checkTabScrollButtons();\n }\n\n /**\n * Call this method if you are ever dynamically adding or removing tabs from the component over time using @if or *ngIf or other similar methods. This will force the tab strip to \n * re-evaluate the tabs and tab bodies and update the display accordingly.\n */\n public RefreshTabs() {\n this.cdr.detectChanges();\n this.syncTabIndexes();\n this.innerRefreshTabVisibility(this.SelectedTabIndex);\n }\n\n protected syncTabIndexes() {\n if (!this._viewInitialized) return; // don't do anything until the view is initialized\n\n // Automatically assign indices to tabs and tab bodies\n this.tabs.forEach((tab, index) => tab.index = index);\n this.tabBodies.forEach((body, index) => body.index = index);\n\n // Pair each tab with its panel for assistive tech (`aria-controls` / `aria-labelledby`).\n // Written directly to the DOM rather than template-bound, because `index` is only known HERE —\n // after the first render — and a binding that changes mid-cycle trips NG0100 in dev mode.\n // Idempotent, and re-run whenever the tab set changes, so ids follow reorders/removals.\n this.tabs.forEach((tab, index) => {\n const el: HTMLElement | null = tab.elementRef?.nativeElement?.querySelector('[role=\"tab\"]');\n if (el) {\n el.id = `${this.IdBase}-tab-${index}`;\n el.setAttribute('aria-controls', `${this.IdBase}-panel-${index}`);\n }\n });\n this.tabBodies.forEach((body, index) => {\n const el: HTMLElement | null = body.elementRef?.nativeElement?.querySelector('[role=\"tabpanel\"]');\n if (el) {\n el.id = `${this.IdBase}-panel-${index}`;\n el.setAttribute('aria-labelledby', `${this.IdBase}-tab-${index}`);\n }\n });\n if (this.SelectedTabIndex === null && this.tabs.length > 0) {\n this.SelectedTabIndex = 0;\n }\n else if (this.tabs.length === 0)\n this.SelectedTabIndex = -1;\n }\n\n /**\n * Returns a read-only (copy) of the tabs in this tab strip.\n */\n public get Tabs(): MJTabComponent[] {\n return this.tabs.toArray();\n }\n\n /**\n * Returns a read-only (copy) of the tab bodies in this tab strip.\n */\n public get TabBodies(): MJTabBodyComponent[] {\n return this.tabBodies.toArray();\n }\n\n /**\n * Method will close the specified tab number. It is automatically called by a tab that has TabCloseable set to true, if the user clicks the close button, and can be called programatically as well.\n */\n public async CloseTab(tabIndex: number) {\n MJTabStripComponent.OutputDebugMessage(`MJTabStripComponent.CloseTab(${tabIndex})`);\n if (tabIndex >= 0 && tabIndex < this.tabs.length) {\n // figure out what the new tab index will be so we can share with our container component\n let newTabIndex;\n if (this.tabs.length === 1) {\n // deleting the only tab we have, shouldn't happen but if so, set to -1\n newTabIndex = -1;\n }\n else if (this.SelectedTabIndex >= this.tabs.length - 1) {\n // we are ABOUT to delete the last tab, so select what will be the new last tab\n newTabIndex = this.tabs.length - 2; // substract 2 becuase subtracting 1 would be the last tab, but we are about to delete it\n }\n else {\n // deleting a tab that is not the last one, so we don't need to do anything special, just set the index to what it was before\n newTabIndex = this.SelectedTabIndex; \n }\n\n const props: any = { \n index: tabIndex,\n tab: this.tabs.toArray()[tabIndex],\n body: this.tabBodies.toArray()[tabIndex],\n cancel: false,\n };\n this.BeforeTabClosed.emit(props);\n if (!props.cancel) {\n // Convert callback to a promise\n const waitForCompletion = new Promise((resolve, reject) => {\n props.done = (error?: any) => {\n if (error) {\n reject(error);\n } else {\n resolve(true);\n }\n };\n }); \n props.newTabIndex = newTabIndex;\n\n // fire off the event to the container component\n this.TabClosed.emit(props);\n // wait for callback to occur from the event handler\n await waitForCompletion; \n\n // finally, set the tab index to the props.newTabIndex value which allows the container to override our default calculation for new tab index\n this.SelectedTabIndex = props.newTabIndex;\n }\n }\n else\n throw new Error(\"Invalid tab index: \" + tabIndex);\n }\n\n\n public handleTabContextMenu($event: MouseEvent, tab: MJTabComponent) {\n this.TabContextMenu.emit({ index: tab.index, tab: tab, body: this.tabBodies.toArray()[tab.index], mouseEvent: $event });\n }\n\n\n /* INTERNAL IMPLEMENTATION */\n @ViewChild('tabInnerContainer') tabInnerContainer!: ElementRef;\n\n showLeftButton: boolean = false;\n showRightButton: boolean = false;\n\n @HostListener('window:resize', ['$event'])\n onResize(event: any) {\n this.checkTabScrollButtons();\n }\n\n protected checkTabScrollButtons() {\n if (this.tabInnerContainer && this.tabInnerContainer.nativeElement) {\n // The list itself is the scroller now (`.mj-tabs__list` is `overflow-x: auto`), so overflow\n // and position are read off its NATIVE scroll state — the old scheme of animating a `left`\n // offset against a relatively-positioned wrapper is gone with the wrapper's CSS.\n const container: HTMLElement = this.tabInnerContainer.nativeElement;\n const overflow = container.scrollWidth - container.clientWidth;\n this.showLeftButton = overflow > 0 && container.scrollLeft > 0;\n this.showRightButton = overflow > 0 && container.scrollLeft < overflow - 1;\n }\n }\n\n protected scrollTabHeader(scrollAmount: number) {\n // Positive amount = reveal content to the LEFT (the old `left`-offset convention, preserved so\n // ScrollAmount and the button wiring keep their meaning); native scrollLeft counts the other way.\n const container: HTMLElement = this.tabInnerContainer.nativeElement;\n container.scrollBy({ left: -scrollAmount, behavior: 'smooth' });\n // Smooth scrolling settles asynchronously; re-evaluate the buttons when it has.\n setTimeout(() => this.checkTabScrollButtons(), 300);\n this.TabScrolled.emit();\n }\n\n /**\n * This property determines how many pixels to scroll when the scrollLeft or scrollRight methods are called.\n */\n @Input() ScrollAmount: number = 150;\n public scrollLeft() {\n this.scrollTabHeader(150)\n }\n public scrollRight() {\n this.scrollTabHeader(-150)\n }\n\n /**\n * Keyboard navigation from the shared `mjTabList` directive (arrows / Home / End / Enter).\n *\n * The directive reports a POSITION among the rendered `[role=\"tab\"]` elements, which is already\n * this component's identity model, so the mapping is direct. Selecting also scrolls the tab into\n * view — arrowing to a tab hidden behind the overflow edge would otherwise move focus somewhere\n * the user cannot see.\n */\n public onTabActivateRequested(request: { Index: number }): void {\n if (request.Index >= 0 && request.Index < this.tabs.length) {\n this.SelectedTabIndex = request.Index;\n this.scrollIntoView(request.Index);\n }\n }\n\n /**\n * Delete / Backspace on a focused tab. Routed through the SAME `CloseTab` path a click on the\n * close button uses, so the cancelable `BeforeTabClosed` contract holds for keyboard users too.\n * Ignored for tabs that are not closeable.\n */\n public onTabCloseRequested(request: { Index: number }): void {\n const tab = this.tabs?.toArray()[request.Index];\n if (tab?.TabCloseable) {\n void this.CloseTab(request.Index);\n }\n }\n\n\n /**\n * This method will scroll the specified tab index into view if it is not currently visible in the tab strip.\n * @param tabIndex \n */\n public scrollIntoView(tabIndex: number) {\n // We do NOT change tab selection — the caller does that separately if they want to. The list\n // is a native horizontal scroller now, so the browser's own logic does the geometry.\n if (tabIndex >= 0 && tabIndex < this.tabs.length) {\n const tabElement: HTMLElement | undefined = this.tabs.toArray()[tabIndex]?.elementRef?.nativeElement;\n tabElement?.scrollIntoView({ block: 'nearest', inline: 'nearest', behavior: 'smooth' });\n setTimeout(() => this.checkTabScrollButtons(), 300);\n }\n }\n}\n","<div class=\"tabstrip-container\">\n <!-- Tab Headers. Chrome classes (.mj-tabs*) come from the GLOBAL stylesheet in\n @memberjunction/ng-ui-components (lib/tabs/tabs.scss), which is the single definition of what\n an MJ tab looks like — shared with the draft/workspace strip. Keyboard behaviour comes from\n the mjTabList directive in the same package: roving tabindex, arrow/Home/End navigation, and\n Delete to close. Neither is redefined here; that is the whole point. -->\n <div class=\"tab-header-outer mj-tabs mj-tabs__bar\">\n @if (showLeftButton) {\n <button type=\"button\" class=\"mj-tabs__scroll\" (click)=\"scrollLeft()\" tabindex=\"-1\" aria-label=\"Scroll tabs left\">\n <span class=\"fa-solid fa-caret-left\" aria-hidden=\"true\"></span>\n </button>\n }\n <div\n class=\"tab-header-inner mj-tabs__list\"\n #tabInnerContainer\n mjTabList\n (scroll)=\"checkTabScrollButtons()\"\n (TabActivateRequested)=\"onTabActivateRequested($event)\"\n (TabCloseRequested)=\"onTabCloseRequested($event)\">\n <ng-content select=\"mj-tab\"></ng-content> <!-- Where <mj-tab> components are projected -->\n </div>\n @if (showRightButton) {\n <button type=\"button\" class=\"mj-tabs__scroll\" (click)=\"scrollRight()\" tabindex=\"-1\" aria-label=\"Scroll tabs right\">\n <span class=\"fa-solid fa-caret-right\" aria-hidden=\"true\"></span>\n </button>\n }\n </div>\n <!-- Tab Content -->\n <div class=\"tab-bodies\">\n <ng-content select=\"mj-tab-body\"></ng-content> <!-- Where <mj-tab-body> components are projected -->\n </div>\n</div>\n"]}
1
+ {"version":3,"file":"tab-strip.component.js","sourceRoot":"","sources":["../../../src/lib/tab-strip/tab-strip.component.ts","../../../src/lib/tab-strip/tab-strip.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,eAAe,EAAa,SAAS,EAAE,YAAY,EAAuF,MAAM,eAAe,CAAC;AACjN,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;;;;;;;;ICK9D,iCAAiH;IAAnE,uLAAS,mBAAY,KAAC;IAClE,0BAA+D;IACjE,iBAAS;;;;IAYT,iCAAmH;IAArE,uLAAS,oBAAa,KAAC;IACnE,2BAAgE;IAClE,iBAAS;;ADlBf,MA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B,SAAS;6BACI,KAAK,YACP,aAAa;;kBAgBtB,KAAK;;kBAEL,KAAK;;kBAYL,MAAM;;kBAKN,KAAK;;kBA6EL,MAAM;;kBAKN,MAAM;;kBAKN,MAAM;;kBAKN,MAAM;;kBAKN,MAAM;;kBAMN,MAAM;;kBAGN,eAAe;mBAAC,cAAc;;kBAC9B,eAAe;mBAAC,kBAAkB;;kBA+IlC,SAAS;mBAAC,mBAAmB;;kBAgC7B,YAAY;mBAAC,eAAe,EAAE,CAAC,QAAQ,CAAC;;kBA8BxC,KAAK;;kFAvVK,mBAAmB","sourcesContent":["import { Component, Input, EventEmitter, Output, ContentChildren, QueryList, ViewChild, HostListener, ElementRef, AfterContentInit, AfterContentChecked, AfterViewInit, ChangeDetectorRef } from '@angular/core';\nimport { warnIfTabChromeMissing } from '@memberjunction/ng-ui-components';\nimport { MJTabComponent } from '../tab/tab.component';\nimport { MJTabBodyComponent } from '../tab-body/tab-body.component';\n\n \nexport class TabEvent {\n public index!: number; // case-violation-ok-legacy-back-compat: object literals are assigned to this class, so an accessor stub changes what they must supply\n public tab: MJTabComponent | null = null; // case-violation-ok-legacy-back-compat: object literals are assigned to this class, so an accessor stub changes what they must supply\n public body: MJTabBodyComponent | null = null; // case-violation-ok-legacy-back-compat: object literals are assigned to this class, so an accessor stub changes what they must supply\n}\nexport class TabCancelableEvent extends TabEvent {\n public cancel: boolean = false;\n}\nexport class TabClosedEvent extends TabEvent {\n /**\n * This property provides the default calculation for what the new tab index will be and can be overriden by the container component to set a different value.\n */\n public newTabIndex!: number // case-violation-ok-legacy-back-compat: object literals are assigned to this class, so an accessor stub changes what they must supply\n /**\n * Whenever the container is done processing, it MUST call this done method to signal that it is done. \n */\n public done!: (error?: any) => {}; // case-violation-ok-legacy-back-compat: object literals are assigned to this class, so an accessor stub changes what they must supply\n}\nexport class TabContextMenuEvent extends TabEvent {\n public mouseEvent!: MouseEvent; // case-violation-ok-legacy-back-compat: object literals are assigned to this class, so an accessor stub changes what they must supply\n}\n\n/** Source of per-instance DOM id bases — see {@link MJTabStripComponent.IdBase}. */\nlet tabStripIdSeq = 0;\n\n@Component({\n standalone: false,\n selector: 'mj-tabstrip',\n templateUrl: './tab-strip.component.html',\n styleUrls: ['./tab-strip.component.css']\n})\nexport class MJTabStripComponent implements AfterContentInit, AfterContentChecked, AfterViewInit {\n protected _selectedTabIndex: number = 0; // default to negative 1 so any valid value of 0+ will invoke a state change internally later\n\n public static OutputDebugInfo: boolean = false;\n protected static OutputDebugMessage(message: string): void {\n if (MJTabStripComponent.OutputDebugInfo) {\n console.log(message);\n }\n }\n\n constructor(private cdr: ChangeDetectorRef) { }\n /** @deprecated No longer read — the strip sizes to content and the HOST owns region sizing. Kept only so existing bindings compile; remove on the next major. */\n @Input() FillWidth: boolean = true;\n /** @deprecated No longer read — the strip sizes to content and the HOST owns region sizing. Kept only so existing bindings compile; remove on the next major. */\n @Input() FillHeight: boolean = true;\n\n /**\n * Per-instance id base pairing each tab with its panel (`aria-controls` / `aria-labelledby`).\n * Index-suffixed by the tab/body components themselves once `syncTabIndexes` has run.\n */\n public readonly IdBase: string = `mj-tabstrip-${++tabStripIdSeq}`;\n\n /**\n * This event is raised whenever the TabStrip component determines it would be advisable to conduct any necessary\n * resizing action in the parent container. Implement an event handler to handle this, if desired, for your application.\n */\n @Output() ResizeContainer = new EventEmitter();\n\n /**\n * The index of the selected tab. You can get/set this value and it will change the displayed tab.\n */\n @Input() get SelectedTabIndex(): number {\n return this._selectedTabIndex;\n }\n set SelectedTabIndex(index: number) {\n // check to make sure that the new index is different from the current index and only do the work here if it is different\n MJTabStripComponent.OutputDebugMessage(`MJTabStripComponent.SelectedTabIndex(${index})`);\n if (index !== this._selectedTabIndex) {\n const props = { \n index: index!, \n tab: index !== null && this.tabs ? this.tabs.toArray()[index] : null,\n body: index !== null && this.tabBodies ? this.tabBodies.toArray()[index] : null,\n cancel: false\n };\n if (props.tab?.Visible) {\n this.BeforeTabSelected.emit(props);\n if (!props.cancel) {\n this._selectedTabIndex = index;\n \n this.innerRefreshTabVisibility(index); \n \n const afterProps = {\n index: index!,\n tab: props.tab,\n body: props.body\n }\n this.TabSelected.emit(afterProps); \n } \n }\n else\n throw new Error(`Tab index ${index} is not visible and cannot be selected.`);\n }\n else {\n // always do this even if we're not firing event since we're already on the right tab\n this.innerRefreshTabVisibility(index); \n }\n }\n\n /**\n * This method will attempt to set the current tab by name. If the tab is found, it will be selected and the method will return the tab object. If the tab is not found, the method will return undefined.\n * @param tabName \n * @returns \n */\n public SelectTabByName(tabName: string): MJTabComponent | undefined {\n const tab = this.GetTabByName(tabName);\n if (tab) {\n if (tab.Visible)\n this.SelectedTabIndex = tab.index;\n else\n throw new Error(`Tab ${tabName} is not visible and cannot be selected.`);\n }\n return tab;\n }\n\n public GetTabByName(tabName: string): MJTabComponent | undefined {\n return this.tabs.find(t => t.Name?.trim().toLowerCase() === tabName.trim().toLowerCase());\n }\n\n protected innerRefreshTabVisibility(index: number) {\n Promise.resolve().then(() => {\n MJTabStripComponent.OutputDebugMessage(`MJTabStripComponent.innerRefreshTabVisibility(${index})`);\n // do this within a Promise.resolve() to ensure that the change detection has a chance to catch up before we start changing things\n\n // 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\n this.tabs?.forEach((tab, i) => tab.TabSelected = i === index);\n this.tabBodies?.forEach((body, i) => body.TabVisible = i === index);\n\n // let angular now it needs to update its change detection\n this.cdr.detectChanges();\n \n // also ask for a resize now\n this.ResizeContainer.emit();\n });\n }\n\n /**\n * This event is fired before a tab is selected. If you set cancel to true, the tab will not be selected.\n */\n @Output() BeforeTabSelected = new EventEmitter<TabCancelableEvent>();\n\n /**\n * This event is fired when a tab is selected.\n */\n @Output() TabSelected = new EventEmitter<TabEvent>();\n\n /**\n * This event is fired before a tab is closed. If you set cancel to true, the tab will not be closed.\n */\n @Output() BeforeTabClosed = new EventEmitter<TabCancelableEvent>();\n\n /**\n * This event is fired after a tab is closed.\n */\n @Output() TabClosed = new EventEmitter<TabClosedEvent>(true);\n\n /**\n * This event is fired when a tab is right-clicked and the context menu event from the tab header fires.\n */\n @Output() TabContextMenu = new EventEmitter<TabContextMenuEvent>();\n\n /**\n * This event is fired whenever the tab control is scrolled left or right. This event can be invoked either due to a user clicking on the left/right buttons or by calling the scrollLeft/scrollRight methods, or by\n * the ScrollIntoView method being called.\n */\n @Output() TabScrolled = new EventEmitter();\n\n\n @ContentChildren(MJTabComponent) tabs!: QueryList<MJTabComponent>; // case-violation-ok-legacy-back-compat: the PascalCase name is already taken in this scope\n @ContentChildren(MJTabBodyComponent) tabBodies!: QueryList<MJTabBodyComponent>; // case-violation-ok-legacy-back-compat: the PascalCase name is already taken in this scope\n \n\n private _viewInitialized: boolean = false;\n ngAfterViewInit() {\n this._viewInitialized = true;\n // Dev-mode guard: the .mj-tabs* chrome lives in a global stylesheet a standalone host must\n // import; a missing import renders bare divs with no error. Warn instead of staying silent.\n warnIfTabChromeMissing(this.TabInnerContainer?.nativeElement?.closest('.mj-tabs') ?? undefined);\n this.SelectedTabIndex = this.SelectedTabIndex; // force a refresh of the tab visibility\n this.syncTabIndexes();\n this.checkTabScrollButtons();\n }\n ngAfterContentInit() {\n this.syncTabIndexes();\n }\n ngAfterContentChecked(): void {\n this.syncTabIndexes();\n this.checkTabScrollButtons();\n }\n\n /**\n * Call this method if you are ever dynamically adding or removing tabs from the component over time using @if or *ngIf or other similar methods. This will force the tab strip to \n * re-evaluate the tabs and tab bodies and update the display accordingly.\n */\n public RefreshTabs() {\n this.cdr.detectChanges();\n this.syncTabIndexes();\n this.innerRefreshTabVisibility(this.SelectedTabIndex);\n }\n\n protected syncTabIndexes() {\n if (!this._viewInitialized) return; // don't do anything until the view is initialized\n\n // Automatically assign indices to tabs and tab bodies\n this.tabs.forEach((tab, index) => tab.index = index);\n this.tabBodies.forEach((body, index) => body.index = index);\n\n // Pair each tab with its panel for assistive tech (`aria-controls` / `aria-labelledby`).\n // Written directly to the DOM rather than template-bound, because `index` is only known HERE —\n // after the first render — and a binding that changes mid-cycle trips NG0100 in dev mode.\n // Idempotent, and re-run whenever the tab set changes, so ids follow reorders/removals.\n this.tabs.forEach((tab, index) => {\n const el: HTMLElement | null = tab.elementRef?.nativeElement?.querySelector('[role=\"tab\"]');\n if (el) {\n el.id = `${this.IdBase}-tab-${index}`;\n el.setAttribute('aria-controls', `${this.IdBase}-panel-${index}`);\n }\n });\n this.tabBodies.forEach((body, index) => {\n const el: HTMLElement | null = body.elementRef?.nativeElement?.querySelector('[role=\"tabpanel\"]');\n if (el) {\n el.id = `${this.IdBase}-panel-${index}`;\n el.setAttribute('aria-labelledby', `${this.IdBase}-tab-${index}`);\n }\n });\n if (this.SelectedTabIndex === null && this.tabs.length > 0) {\n this.SelectedTabIndex = 0;\n }\n else if (this.tabs.length === 0)\n this.SelectedTabIndex = -1;\n }\n\n /**\n * Returns a read-only (copy) of the tabs in this tab strip.\n */\n public get Tabs(): MJTabComponent[] {\n return this.tabs.toArray();\n }\n\n /**\n * Returns a read-only (copy) of the tab bodies in this tab strip.\n */\n public get TabBodies(): MJTabBodyComponent[] {\n return this.tabBodies.toArray();\n }\n\n /**\n * Method will close the specified tab number. It is automatically called by a tab that has TabCloseable set to true, if the user clicks the close button, and can be called programatically as well.\n */\n public async CloseTab(tabIndex: number) {\n MJTabStripComponent.OutputDebugMessage(`MJTabStripComponent.CloseTab(${tabIndex})`);\n if (tabIndex >= 0 && tabIndex < this.tabs.length) {\n // figure out what the new tab index will be so we can share with our container component\n let newTabIndex;\n if (this.tabs.length === 1) {\n // deleting the only tab we have, shouldn't happen but if so, set to -1\n newTabIndex = -1;\n }\n else if (this.SelectedTabIndex >= this.tabs.length - 1) {\n // we are ABOUT to delete the last tab, so select what will be the new last tab\n newTabIndex = this.tabs.length - 2; // substract 2 becuase subtracting 1 would be the last tab, but we are about to delete it\n }\n else {\n // deleting a tab that is not the last one, so we don't need to do anything special, just set the index to what it was before\n newTabIndex = this.SelectedTabIndex; \n }\n\n const props: any = { \n index: tabIndex,\n tab: this.tabs.toArray()[tabIndex],\n body: this.tabBodies.toArray()[tabIndex],\n cancel: false,\n };\n this.BeforeTabClosed.emit(props);\n if (!props.cancel) {\n // Convert callback to a promise\n const waitForCompletion = new Promise((resolve, reject) => {\n props.done = (error?: any) => {\n if (error) {\n reject(error);\n } else {\n resolve(true);\n }\n };\n }); \n props.newTabIndex = newTabIndex;\n\n // fire off the event to the container component\n this.TabClosed.emit(props);\n // wait for callback to occur from the event handler\n await waitForCompletion; \n\n // finally, set the tab index to the props.newTabIndex value which allows the container to override our default calculation for new tab index\n this.SelectedTabIndex = props.newTabIndex;\n }\n }\n else\n throw new Error(\"Invalid tab index: \" + tabIndex);\n }\n\n\n public HandleTabContextMenu($event: MouseEvent, tab: MJTabComponent) {\n this.TabContextMenu.emit({ index: tab.index, tab: tab, body: this.tabBodies.toArray()[tab.index], mouseEvent: $event });\n }\n\n /** @deprecated Use {@link HandleTabContextMenu}. */\n public handleTabContextMenu($event: MouseEvent, tab: MJTabComponent) {\n return this.HandleTabContextMenu($event, tab);\n }\n\n\n /* INTERNAL IMPLEMENTATION */\n @ViewChild('tabInnerContainer') TabInnerContainer!: ElementRef;\n\n /** @deprecated Use {@link TabInnerContainer}. */\n get tabInnerContainer(): ElementRef {\n return this.TabInnerContainer;\n }\n /** @deprecated Use {@link TabInnerContainer}. */\n set tabInnerContainer(value: ElementRef) {\n this.TabInnerContainer = value;\n }\n\n ShowLeftButton: boolean = false;\n\n /** @deprecated Use {@link ShowLeftButton}. */\n get showLeftButton(): boolean {\n return this.ShowLeftButton;\n }\n /** @deprecated Use {@link ShowLeftButton}. */\n set showLeftButton(value: boolean) {\n this.ShowLeftButton = value;\n }\n ShowRightButton: boolean = false;\n\n /** @deprecated Use {@link ShowRightButton}. */\n get showRightButton(): boolean {\n return this.ShowRightButton;\n }\n /** @deprecated Use {@link ShowRightButton}. */\n set showRightButton(value: boolean) {\n this.ShowRightButton = value;\n }\n\n @HostListener('window:resize', ['$event'])\n onResize(event: any) {\n this.checkTabScrollButtons();\n }\n\n protected checkTabScrollButtons() {\n if (this.TabInnerContainer && this.TabInnerContainer.nativeElement) {\n // The list itself is the scroller now (`.mj-tabs__list` is `overflow-x: auto`), so overflow\n // and position are read off its NATIVE scroll state — the old scheme of animating a `left`\n // offset against a relatively-positioned wrapper is gone with the wrapper's CSS.\n const container: HTMLElement = this.TabInnerContainer.nativeElement;\n const overflow = container.scrollWidth - container.clientWidth;\n this.ShowLeftButton = overflow > 0 && container.scrollLeft > 0;\n this.ShowRightButton = overflow > 0 && container.scrollLeft < overflow - 1;\n }\n }\n\n protected scrollTabHeader(scrollAmount: number) {\n // Positive amount = reveal content to the LEFT (the old `left`-offset convention, preserved so\n // ScrollAmount and the button wiring keep their meaning); native scrollLeft counts the other way.\n const container: HTMLElement = this.TabInnerContainer.nativeElement;\n container.scrollBy({ left: -scrollAmount, behavior: 'smooth' });\n // Smooth scrolling settles asynchronously; re-evaluate the buttons when it has.\n setTimeout(() => this.checkTabScrollButtons(), 300);\n this.TabScrolled.emit();\n }\n\n /**\n * This property determines how many pixels to scroll when the scrollLeft or scrollRight methods are called.\n */\n @Input() ScrollAmount: number = 150;\n public ScrollLeft() {\n this.scrollTabHeader(150)\n }\n\n /** @deprecated Use {@link ScrollLeft}. */\n public scrollLeft() {\n return this.ScrollLeft();\n }\n public ScrollRight() {\n this.scrollTabHeader(-150)\n }\n\n /** @deprecated Use {@link ScrollRight}. */\n public scrollRight() {\n return this.ScrollRight();\n }\n\n /**\n * Keyboard navigation from the shared `mjTabList` directive (arrows / Home / End / Enter).\n *\n * The directive reports a POSITION among the rendered `[role=\"tab\"]` elements, which is already\n * this component's identity model, so the mapping is direct. Selecting also scrolls the tab into\n * view — arrowing to a tab hidden behind the overflow edge would otherwise move focus somewhere\n * the user cannot see.\n */\n public OnTabActivateRequested(request: { Index: number }): void {\n if (request.Index >= 0 && request.Index < this.tabs.length) {\n this.SelectedTabIndex = request.Index;\n this.ScrollIntoView(request.Index);\n }\n }\n\n /** @deprecated Use {@link OnTabActivateRequested}. */\n public onTabActivateRequested(request: { Index: number }): void {\n return this.OnTabActivateRequested(request);\n }\n\n /**\n * Delete / Backspace on a focused tab. Routed through the SAME `CloseTab` path a click on the\n * close button uses, so the cancelable `BeforeTabClosed` contract holds for keyboard users too.\n * Ignored for tabs that are not closeable.\n */\n public OnTabCloseRequested(request: { Index: number }): void {\n const tab = this.tabs?.toArray()[request.Index];\n if (tab?.TabCloseable) {\n void this.CloseTab(request.Index);\n }\n }\n\n /** @deprecated Use {@link OnTabCloseRequested}. */\n public onTabCloseRequested(request: { Index: number }): void {\n return this.OnTabCloseRequested(request);\n }\n\n\n /**\n * This method will scroll the specified tab index into view if it is not currently visible in the tab strip.\n * @param tabIndex \n */\n public ScrollIntoView(tabIndex: number) {\n // We do NOT change tab selection — the caller does that separately if they want to. The list\n // is a native horizontal scroller now, so the browser's own logic does the geometry.\n if (tabIndex >= 0 && tabIndex < this.tabs.length) {\n const tabElement: HTMLElement | undefined = this.tabs.toArray()[tabIndex]?.elementRef?.nativeElement;\n tabElement?.scrollIntoView({ block: 'nearest', inline: 'nearest', behavior: 'smooth' });\n setTimeout(() => this.checkTabScrollButtons(), 300);\n }\n }\n\n /** @deprecated Use {@link ScrollIntoView}. */\n public scrollIntoView(tabIndex: number) {\n return this.ScrollIntoView(tabIndex);\n }\n}\n","<div class=\"tabstrip-container\">\n <!-- Tab Headers. Chrome classes (.mj-tabs*) come from the GLOBAL stylesheet in\n @memberjunction/ng-ui-components (lib/tabs/tabs.scss), which is the single definition of what\n an MJ tab looks like — shared with the draft/workspace strip. Keyboard behaviour comes from\n the mjTabList directive in the same package: roving tabindex, arrow/Home/End navigation, and\n Delete to close. Neither is redefined here; that is the whole point. -->\n <div class=\"tab-header-outer mj-tabs mj-tabs__bar\">\n @if (showLeftButton) {\n <button type=\"button\" class=\"mj-tabs__scroll\" (click)=\"scrollLeft()\" tabindex=\"-1\" aria-label=\"Scroll tabs left\">\n <span class=\"fa-solid fa-caret-left\" aria-hidden=\"true\"></span>\n </button>\n }\n <div\n class=\"tab-header-inner mj-tabs__list\"\n #tabInnerContainer\n mjTabList\n (scroll)=\"checkTabScrollButtons()\"\n (TabActivateRequested)=\"onTabActivateRequested($event)\"\n (TabCloseRequested)=\"onTabCloseRequested($event)\">\n <ng-content select=\"mj-tab\"></ng-content> <!-- Where <mj-tab> components are projected -->\n </div>\n @if (showRightButton) {\n <button type=\"button\" class=\"mj-tabs__scroll\" (click)=\"scrollRight()\" tabindex=\"-1\" aria-label=\"Scroll tabs right\">\n <span class=\"fa-solid fa-caret-right\" aria-hidden=\"true\"></span>\n </button>\n }\n </div>\n <!-- Tab Content -->\n <div class=\"tab-bodies\">\n <ng-content select=\"mj-tab-body\"></ng-content> <!-- Where <mj-tab-body> components are projected -->\n </div>\n</div>\n"]}
@@ -1,4 +1,4 @@
1
1
  export class MJTabBase {
2
- index;
2
+ index; // case-violation-ok-legacy-back-compat: object literals are assigned to this class, so an accessor stub changes what they must supply
3
3
  }
4
4
  //# sourceMappingURL=tab.base.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tab.base.js","sourceRoot":"","sources":["../../src/lib/tab.base.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAS;IAClB,KAAK,CAAS;CACjB","sourcesContent":["export class MJTabBase {\n index!: number\n}"]}
1
+ {"version":3,"file":"tab.base.js","sourceRoot":"","sources":["../../src/lib/tab.base.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAS;IAClB,KAAK,CAAS,CAAE,sIAAsI;CACzJ","sourcesContent":["export class MJTabBase {\n index!: number // case-violation-ok-legacy-back-compat: object literals are assigned to this class, so an accessor stub changes what they must supply\n}"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-tabstrip",
3
- "version": "6.2.0-edge.0",
3
+ "version": "6.2.0-edge.2",
4
4
  "description": "Projected-children tab strip (<mj-tabstrip>/<mj-tab>/<mj-tab-body>) sharing MJ's canonical tab chrome and mjTabList keyboard contract from @memberjunction/ng-ui-components. For data-driven tabs prefer mj-tab-nav or mj-workspace-tab-strip from ng-ui-components.",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",
@@ -13,7 +13,7 @@
13
13
  "devDependencies": {
14
14
  "@angular/compiler": "21.2.22",
15
15
  "@angular/compiler-cli": "21.2.22",
16
- "@memberjunction/ng-test-utils": "6.2.0-edge.0",
16
+ "@memberjunction/ng-test-utils": "6.2.0-edge.2",
17
17
  "vitest": "^4.0.18"
18
18
  },
19
19
  "peerDependencies": {
@@ -21,8 +21,8 @@
21
21
  "@angular/core": "^21.2.22"
22
22
  },
23
23
  "dependencies": {
24
- "@memberjunction/ng-container-directives": "6.2.0-edge.0",
25
- "@memberjunction/ng-ui-components": "6.2.0-edge.0",
24
+ "@memberjunction/ng-container-directives": "6.2.0-edge.2",
25
+ "@memberjunction/ng-ui-components": "6.2.0-edge.2",
26
26
  "tslib": "^2.8.1"
27
27
  },
28
28
  "sideEffects": false,