@memberjunction/ng-tabstrip 1.0.9 → 1.0.11

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.
@@ -26,6 +26,8 @@ export declare class TabContextMenuEvent extends TabEvent {
26
26
  export declare class MJTabStripComponent implements AfterContentInit, AfterContentChecked, AfterViewInit {
27
27
  private cdr;
28
28
  protected _selectedTabIndex: number;
29
+ static OutputDebugInfo: boolean;
30
+ protected static OutputDebugMessage(message: string): void;
29
31
  constructor(cdr: ChangeDetectorRef);
30
32
  FillWidth: boolean;
31
33
  FillHeight: boolean;
@@ -48,6 +48,11 @@ export class TabClosedEvent extends TabEvent {
48
48
  export class TabContextMenuEvent extends TabEvent {
49
49
  }
50
50
  export class MJTabStripComponent {
51
+ static OutputDebugMessage(message) {
52
+ if (MJTabStripComponent.OutputDebugInfo) {
53
+ console.log(message);
54
+ }
55
+ }
51
56
  constructor(cdr) {
52
57
  this.cdr = cdr;
53
58
  this._selectedTabIndex = 0; // default to negative 1 so any valid value of 0+ will invoke a state change internally later
@@ -85,6 +90,7 @@ export class MJTabStripComponent {
85
90
  }
86
91
  set SelectedTabIndex(index) {
87
92
  // check to make sure that the new index is different from the current index and only do the work here if it is different
93
+ MJTabStripComponent.OutputDebugMessage(`MJTabStripComponent.SelectedTabIndex(${index})`);
88
94
  if (index !== this._selectedTabIndex) {
89
95
  const props = {
90
96
  index: index,
@@ -111,8 +117,9 @@ export class MJTabStripComponent {
111
117
  }
112
118
  innerRefreshTabVisibility(index) {
113
119
  Promise.resolve().then(() => {
114
- // do this within a Promise.resolve() to ensure that the change detection has a chance to catch up before we start changing things
115
120
  var _a, _b;
121
+ MJTabStripComponent.OutputDebugMessage(`MJTabStripComponent.innerRefreshTabVisibility(${index})`);
122
+ // do this within a Promise.resolve() to ensure that the change detection has a chance to catch up before we start changing things
116
123
  // 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
117
124
  (_a = this.tabs) === null || _a === void 0 ? void 0 : _a.forEach((tab, i) => tab.TabSelected = i === index);
118
125
  (_b = this.tabBodies) === null || _b === void 0 ? void 0 : _b.forEach((body, i) => body.TabVisible = i === index);
@@ -164,6 +171,7 @@ export class MJTabStripComponent {
164
171
  */
165
172
  CloseTab(tabIndex) {
166
173
  return __awaiter(this, void 0, void 0, function* () {
174
+ MJTabStripComponent.OutputDebugMessage(`MJTabStripComponent.CloseTab(${tabIndex})`);
167
175
  if (tabIndex >= 0 && tabIndex < this.tabs.length) {
168
176
  // figure out what the new tab index will be so we can share with our container component
169
177
  let newTabIndex;
@@ -244,6 +252,7 @@ export class MJTabStripComponent {
244
252
  this.scrollTabHeader(-150);
245
253
  }
246
254
  }
255
+ MJTabStripComponent.OutputDebugInfo = false;
247
256
  MJTabStripComponent.ɵfac = function MJTabStripComponent_Factory(t) { return new (t || MJTabStripComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
248
257
  MJTabStripComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJTabStripComponent, selectors: [["mj-tabstrip"]], contentQueries: function MJTabStripComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
249
258
  i0.ɵɵcontentQuery(dirIndex, MJTabComponent, 4);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-tabstrip",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "MemberJunction: Very simple tab strip component used in the MJ Explorer app and reusable anywhere else in an Angular project.",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",
@@ -23,8 +23,8 @@
23
23
  "@angular/core": "~17.2.2"
24
24
  },
25
25
  "dependencies": {
26
- "@memberjunction/ng-container-directives": "^1.0.9",
27
- "@memberjunction/ng-shared": "^1.0.9",
26
+ "@memberjunction/ng-container-directives": "^1.0.11",
27
+ "@memberjunction/ng-shared": "^1.0.11",
28
28
  "tslib": "^2.3.0"
29
29
  },
30
30
  "sideEffects": false