@memberjunction/ng-tabstrip 6.1.0-edge.5 → 6.1.0-edge.7

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.
@@ -24,7 +24,7 @@ export class MJTabBodyComponent extends MJTabBase {
24
24
  i0.ɵɵelementEnd();
25
25
  } if (rf & 2) {
26
26
  i0.ɵɵproperty("hidden", !ctx.TabVisible);
27
- } }, styles: ["\n\n\n\n\n\n\n\n\n\n.tab-body[_ngcontent-%COMP%] {\n border-top: 0;\n width: 100%;\n display: block;\n}"] });
27
+ } }, styles: ["\n\n\n\n\n\n\n\n\n.tab-body[_ngcontent-%COMP%] {\n border-top: 0;\n width: 100%;\n display: block;\n}"] });
28
28
  }
29
29
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJTabBodyComponent, [{
30
30
  type: Component,
@@ -8,16 +8,16 @@ const _c0 = ["tabInnerContainer"];
8
8
  const _c1 = [[["mj-tab"]], [["mj-tab-body"]]];
9
9
  const _c2 = ["mj-tab", "mj-tab-body"];
10
10
  function MJTabStripComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
11
- const _r2 = i0.ɵɵgetCurrentView();
11
+ const _r1 = i0.ɵɵgetCurrentView();
12
12
  i0.ɵɵelementStart(0, "button", 7);
13
- i0.ɵɵlistener("click", function MJTabStripComponent_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.scrollLeft()); });
13
+ i0.ɵɵlistener("click", function MJTabStripComponent_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.scrollLeft()); });
14
14
  i0.ɵɵelement(1, "span", 8);
15
15
  i0.ɵɵelementEnd();
16
16
  } }
17
17
  function MJTabStripComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
18
- const _r4 = i0.ɵɵgetCurrentView();
18
+ const _r3 = i0.ɵɵgetCurrentView();
19
19
  i0.ɵɵelementStart(0, "button", 9);
20
- i0.ɵɵlistener("click", function MJTabStripComponent_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.scrollRight()); });
20
+ i0.ɵɵlistener("click", function MJTabStripComponent_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.scrollRight()); });
21
21
  i0.ɵɵelement(1, "span", 10);
22
22
  i0.ɵɵelementEnd();
23
23
  } }
@@ -377,12 +377,11 @@ export class MJTabStripComponent {
377
377
  } }, hostBindings: function MJTabStripComponent_HostBindings(rf, ctx) { if (rf & 1) {
378
378
  i0.ɵɵlistener("resize", function MJTabStripComponent_resize_HostBindingHandler($event) { return ctx.onResize($event); }, i0.ɵɵresolveWindow);
379
379
  } }, 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) {
380
- const _r1 = i0.ɵɵgetCurrentView();
381
380
  i0.ɵɵprojectionDef(_c1);
382
381
  i0.ɵɵelementStart(0, "div", 1)(1, "div", 2);
383
382
  i0.ɵɵconditionalCreate(2, MJTabStripComponent_Conditional_2_Template, 2, 0, "button", 3);
384
383
  i0.ɵɵelementStart(3, "div", 4, 0);
385
- i0.ɵɵlistener("scroll", function MJTabStripComponent_Template_div_scroll_3_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.checkTabScrollButtons()); })("TabActivateRequested", function MJTabStripComponent_Template_div_TabActivateRequested_3_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onTabActivateRequested($event)); })("TabCloseRequested", function MJTabStripComponent_Template_div_TabCloseRequested_3_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onTabCloseRequested($event)); });
384
+ i0.ɵɵlistener("scroll", function MJTabStripComponent_Template_div_scroll_3_listener() { return ctx.checkTabScrollButtons(); })("TabActivateRequested", function MJTabStripComponent_Template_div_TabActivateRequested_3_listener($event) { return ctx.onTabActivateRequested($event); })("TabCloseRequested", function MJTabStripComponent_Template_div_TabCloseRequested_3_listener($event) { return ctx.onTabCloseRequested($event); });
386
385
  i0.ɵɵprojection(5);
387
386
  i0.ɵɵelementEnd();
388
387
  i0.ɵɵconditionalCreate(6, MJTabStripComponent_Conditional_6_Template, 2, 0, "button", 5);
@@ -395,7 +394,7 @@ export class MJTabStripComponent {
395
394
  i0.ɵɵconditional(ctx.showLeftButton ? 2 : -1);
396
395
  i0.ɵɵadvance(4);
397
396
  i0.ɵɵconditional(ctx.showRightButton ? 6 : -1);
398
- } }, dependencies: [i1.MJTabListDirective], styles: ["\n\n\n\n\n\n\n\n\n\n\n\n.tabstrip-container[_ngcontent-%COMP%] {\n display: block;\n}"] });
397
+ } }, dependencies: [i1.MJTabListDirective], styles: ["\n\n\n\n\n\n\n\n\n\n\n.tabstrip-container[_ngcontent-%COMP%] {\n display: block;\n}"] });
399
398
  }
400
399
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJTabStripComponent, [{
401
400
  type: Component,
@@ -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;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,MAAM,OAAO,QAAQ;IACZ,KAAK,CAAU;IACf,GAAG,GAA0B,IAAI,CAAC;IAClC,IAAI,GAA8B,IAAI,CAAC;CAC/C;AACD,MAAM,OAAO,kBAAmB,SAAQ,QAAQ;IACvC,MAAM,GAAY,KAAK,CAAC;CAChC;AACD,MAAM,OAAO,cAAe,SAAQ,QAAQ;IAC1C;;OAEG;IACI,WAAW,CAAS;IAC3B;;OAEG;IACI,IAAI,CAAuB;CACnC;AACD,MAAM,OAAO,mBAAoB,SAAQ,QAAQ;IACxC,UAAU,CAAc;CACh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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,MAAM,OAAO,QAAQ;IACZ,KAAK,CAAU;IACf,GAAG,GAA0B,IAAI,CAAC;IAClC,IAAI,GAA8B,IAAI,CAAC;CAC/C;AACD,MAAM,OAAO,kBAAmB,SAAQ,QAAQ;IACvC,MAAM,GAAY,KAAK,CAAC;CAChC;AACD,MAAM,OAAO,cAAe,SAAQ,QAAQ;IAC1C;;OAEG;IACI,WAAW,CAAS;IAC3B;;OAEG;IACI,IAAI,CAAuB;CACnC;AACD,MAAM,OAAO,mBAAoB,SAAQ,QAAQ;IACxC,UAAU,CAAc;CAChC;AAED,oFAAoF;AACpF,IAAI,aAAa,GAAG,CAAC,CAAC;AAQtB,MAAM,OAAO,mBAAmB;IAUV;IATV,iBAAiB,GAAW,CAAC,CAAC,CAAC,6FAA6F;IAE/H,MAAM,CAAC,eAAe,GAAY,KAAK,CAAC;IACrC,MAAM,CAAC,kBAAkB,CAAC,OAAe;QACjD,IAAI,mBAAmB,CAAC,eAAe,EAAE,CAAC;YACxC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;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,CAAC,qBAAqB,EAAE,EAAE,GAAG,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;6GAvWU,mBAAmB;6DAAnB,mBAAmB;wCAyIb,cAAc,eACd,kBAAkB;;;;;;;;;;;YA1IxB,gGAAA,oBAAgB,wBAAG;;;YC/B9B,AANF,8BAAgC,aAMqB;YACjD,wFAAsB;YAKtB,iCAMoD;YAAlD,AADA,AADA,+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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-tabstrip",
3
- "version": "6.1.0-edge.5",
3
+ "version": "6.1.0-edge.7",
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",
@@ -11,18 +11,18 @@
11
11
  "author": "",
12
12
  "license": "BUSL-1.1",
13
13
  "devDependencies": {
14
- "@angular/compiler": "21.1.3",
15
- "@angular/compiler-cli": "21.1.3",
16
- "@memberjunction/ng-test-utils": "6.1.0-edge.5",
14
+ "@angular/compiler": "21.2.22",
15
+ "@angular/compiler-cli": "21.2.22",
16
+ "@memberjunction/ng-test-utils": "6.1.0-edge.7",
17
17
  "vitest": "^4.0.18"
18
18
  },
19
19
  "peerDependencies": {
20
- "@angular/common": "^21.1.3",
21
- "@angular/core": "^21.1.3"
20
+ "@angular/common": "^21.2.22",
21
+ "@angular/core": "^21.2.22"
22
22
  },
23
23
  "dependencies": {
24
- "@memberjunction/ng-container-directives": "6.1.0-edge.5",
25
- "@memberjunction/ng-ui-components": "6.1.0-edge.5",
24
+ "@memberjunction/ng-container-directives": "6.1.0-edge.7",
25
+ "@memberjunction/ng-ui-components": "6.1.0-edge.7",
26
26
  "tslib": "^2.8.1"
27
27
  },
28
28
  "sideEffects": false,