@xh/hoist 73.0.0-SNAPSHOT.1740150867405 → 73.0.0-SNAPSHOT.1740415339732

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## v73.0.0-SNAPSHOT - unreleased
4
4
 
5
+ ### 🎁 New Features
6
+
7
+ * Modify TabContainerModel to be more extensible
8
+
5
9
  ## v72.1.0 - 2025-02-13
6
10
 
7
11
  ### 🎁 New Features
@@ -65,8 +65,8 @@ export class RecategorizeDialogModel extends HoistModel {
65
65
  }
66
66
  })
67
67
  .linkTo(this.savingTask);
68
- await this.parent.refreshAsync();
69
68
  this.close();
69
+ await this.parent.refreshAsync();
70
70
  } catch (e) {
71
71
  XH.handleException(e);
72
72
  }
@@ -68,7 +68,7 @@ export declare class TabContainerModel extends HoistModel implements Persistable
68
68
  refreshMode: RefreshMode;
69
69
  emptyText: ReactNode;
70
70
  refreshContextModel: RefreshContextModel;
71
- private lastActiveTabId;
71
+ protected lastActiveTabId: string;
72
72
  constructor({ tabs, defaultTabId, route, switcher, track, renderMode, refreshMode, persistWith, emptyText, xhImpl }: TabContainerConfig);
73
73
  /** Set/replace all tabs within the container. */
74
74
  setTabs(tabs: Array<TabModel | TabConfig>): void;
@@ -110,10 +110,10 @@ export declare class TabContainerModel extends HoistModel implements Persistable
110
110
  setPersistableState(state: PersistableState<{
111
111
  activeTabId: string;
112
112
  }>): void;
113
- private setActiveTabIdInternal;
114
- private syncWithRouter;
115
- private forwardRouterToTab;
116
- private calculateActiveTabId;
113
+ protected setActiveTabIdInternal(id: any): void;
114
+ protected syncWithRouter(): void;
115
+ protected forwardRouterToTab(id: any): void;
116
+ protected calculateActiveTabId(tabs: any): any;
117
117
  }
118
118
  export interface AddTabOptions {
119
119
  /** Index in tab collection where tab is to be added. */
@@ -108,7 +108,7 @@ export class TabContainerModel extends HoistModel implements Persistable<{active
108
108
  @managed
109
109
  refreshContextModel: RefreshContextModel;
110
110
 
111
- private lastActiveTabId: string;
111
+ protected lastActiveTabId: string;
112
112
 
113
113
  constructor({
114
114
  tabs = [],
@@ -342,7 +342,7 @@ export class TabContainerModel extends HoistModel implements Persistable<{active
342
342
  // Implementation
343
343
  //-------------------------
344
344
  @action
345
- private setActiveTabIdInternal(id) {
345
+ protected setActiveTabIdInternal(id) {
346
346
  const tab = this.findTab(id);
347
347
  throwIf(!tab, `Unknown Tab ${id} in TabContainer.`);
348
348
  throwIf(tab.disabled, `Cannot activate Tab ${id} because it is disabled!`);
@@ -351,7 +351,7 @@ export class TabContainerModel extends HoistModel implements Persistable<{active
351
351
  this.forwardRouterToTab(id);
352
352
  }
353
353
 
354
- private syncWithRouter() {
354
+ protected syncWithRouter() {
355
355
  const {tabs, route} = this,
356
356
  {router} = XH,
357
357
  state = router.getState();
@@ -364,14 +364,14 @@ export class TabContainerModel extends HoistModel implements Persistable<{active
364
364
  }
365
365
  }
366
366
 
367
- private forwardRouterToTab(id) {
367
+ protected forwardRouterToTab(id) {
368
368
  const {route} = this;
369
369
  if (route && id) {
370
370
  XH.router.forward(route, route + '.' + id);
371
371
  }
372
372
  }
373
373
 
374
- private calculateActiveTabId(tabs) {
374
+ protected calculateActiveTabId(tabs) {
375
375
  let ret;
376
376
 
377
377
  // try route
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "73.0.0-SNAPSHOT.1740150867405",
3
+ "version": "73.0.0-SNAPSHOT.1740415339732",
4
4
  "description": "Hoist add-on for building and deploying React Applications.",
5
5
  "repository": "github:xh/hoist-react",
6
6
  "homepage": "https://xh.io",