@xh/hoist 73.0.0-SNAPSHOT.1740152448188 → 73.0.0-SNAPSHOT.1740517958946
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
|
@@ -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
|
-
|
|
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
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "73.0.0-SNAPSHOT.1740517958946",
|
|
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",
|