raise-common-lib 0.0.32 → 0.0.34
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/bundles/raise-common-lib.umd.js +231 -190
- package/bundles/raise-common-lib.umd.js.map +1 -1
- package/bundles/raise-common-lib.umd.min.js +1 -1
- package/bundles/raise-common-lib.umd.min.js.map +1 -1
- package/esm2015/lib/layout/multi-tab/index.component.js +33 -15
- package/esm2015/lib/raise-common-lib.module.js +1 -3
- package/esm2015/lib/service/keep-alive.service.js +20 -9
- package/esm5/lib/layout/multi-tab/index.component.js +35 -14
- package/esm5/lib/raise-common-lib.module.js +1 -3
- package/esm5/lib/service/keep-alive.service.js +31 -11
- package/fesm2015/raise-common-lib.js +182 -152
- package/fesm2015/raise-common-lib.js.map +1 -1
- package/fesm5/raise-common-lib.js +232 -191
- package/fesm5/raise-common-lib.js.map +1 -1
- package/lib/layout/multi-tab/index.component.d.ts +9 -5
- package/lib/service/keep-alive.service.d.ts +2 -0
- package/package.json +1 -1
- package/raise-common-lib.metadata.json +1 -1
|
@@ -1760,184 +1760,6 @@
|
|
|
1760
1760
|
return CommonFunctionService;
|
|
1761
1761
|
}());
|
|
1762
1762
|
|
|
1763
|
-
/**
|
|
1764
|
-
* @fileoverview added by tsickle
|
|
1765
|
-
* Generated from: lib/service/keep-alive.service.ts
|
|
1766
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1767
|
-
*/
|
|
1768
|
-
/** @type {?} */
|
|
1769
|
-
var storedRoutes = new Map();
|
|
1770
|
-
/** @type {?} */
|
|
1771
|
-
var toBeDeleteUrl;
|
|
1772
|
-
/** @type {?} */
|
|
1773
|
-
var excludeRoutes = [];
|
|
1774
|
-
// 不需要缓存的url
|
|
1775
|
-
var KeepAliveService = /** @class */ (function () {
|
|
1776
|
-
function KeepAliveService() {
|
|
1777
|
-
}
|
|
1778
|
-
/**
|
|
1779
|
-
* @param {?} routes
|
|
1780
|
-
* @return {?}
|
|
1781
|
-
*/
|
|
1782
|
-
KeepAliveService.prototype.setExcludeRoutes = /**
|
|
1783
|
-
* @param {?} routes
|
|
1784
|
-
* @return {?}
|
|
1785
|
-
*/
|
|
1786
|
-
function (routes) {
|
|
1787
|
-
excludeRoutes = routes; // 设置不缓存的路由
|
|
1788
|
-
};
|
|
1789
|
-
/**
|
|
1790
|
-
* @param {?} route
|
|
1791
|
-
* @return {?}
|
|
1792
|
-
*/
|
|
1793
|
-
KeepAliveService.prototype.shouldDetach = /**
|
|
1794
|
-
* @param {?} route
|
|
1795
|
-
* @return {?}
|
|
1796
|
-
*/
|
|
1797
|
-
function (route) {
|
|
1798
|
-
/** @type {?} */
|
|
1799
|
-
var config = route.routeConfig;
|
|
1800
|
-
// console.log("shouldDetach", toBeDeleteUrl, this.getRoutePath(route));
|
|
1801
|
-
if (toBeDeleteUrl === this.getRoutePath(route)) {
|
|
1802
|
-
// 对于新开的又即将关闭的tab,不缓存
|
|
1803
|
-
if (route.children.length === 0) {
|
|
1804
|
-
toBeDeleteUrl = "";
|
|
1805
|
-
}
|
|
1806
|
-
return false;
|
|
1807
|
-
}
|
|
1808
|
-
if (config && excludeRoutes.includes(this.getRoutePath(route))) {
|
|
1809
|
-
return false;
|
|
1810
|
-
}
|
|
1811
|
-
//Don't store lazy loaded routes
|
|
1812
|
-
return config && !config.loadChildren;
|
|
1813
|
-
};
|
|
1814
|
-
/**
|
|
1815
|
-
* @param {?} route
|
|
1816
|
-
* @param {?} handle
|
|
1817
|
-
* @return {?}
|
|
1818
|
-
*/
|
|
1819
|
-
KeepAliveService.prototype.store = /**
|
|
1820
|
-
* @param {?} route
|
|
1821
|
-
* @param {?} handle
|
|
1822
|
-
* @return {?}
|
|
1823
|
-
*/
|
|
1824
|
-
function (route, handle) {
|
|
1825
|
-
// console.log("store", this.getRoutePath(route));
|
|
1826
|
-
// console.log("store", storedRoutes);
|
|
1827
|
-
/** @type {?} */
|
|
1828
|
-
var key = this.getRoutePath(route);
|
|
1829
|
-
storedRoutes.set(key, handle);
|
|
1830
|
-
};
|
|
1831
|
-
/**
|
|
1832
|
-
* @param {?} route
|
|
1833
|
-
* @return {?}
|
|
1834
|
-
*/
|
|
1835
|
-
KeepAliveService.prototype.shouldAttach = /**
|
|
1836
|
-
* @param {?} route
|
|
1837
|
-
* @return {?}
|
|
1838
|
-
*/
|
|
1839
|
-
function (route) {
|
|
1840
|
-
/** @type {?} */
|
|
1841
|
-
var key = this.getRoutePath(route);
|
|
1842
|
-
return !!route.routeConfig && storedRoutes.has(key);
|
|
1843
|
-
};
|
|
1844
|
-
/**
|
|
1845
|
-
* @param {?} route
|
|
1846
|
-
* @return {?}
|
|
1847
|
-
*/
|
|
1848
|
-
KeepAliveService.prototype.retrieve = /**
|
|
1849
|
-
* @param {?} route
|
|
1850
|
-
* @return {?}
|
|
1851
|
-
*/
|
|
1852
|
-
function (route) {
|
|
1853
|
-
/** @type {?} */
|
|
1854
|
-
var config = route.routeConfig;
|
|
1855
|
-
/** @type {?} */
|
|
1856
|
-
var key = this.getRoutePath(route);
|
|
1857
|
-
//We don't store lazy loaded routes, so don't even bother trying to retrieve them
|
|
1858
|
-
if (!config || config.loadChildren) {
|
|
1859
|
-
return false;
|
|
1860
|
-
}
|
|
1861
|
-
return storedRoutes.get(key) || null;
|
|
1862
|
-
};
|
|
1863
|
-
/**
|
|
1864
|
-
* @param {?} future
|
|
1865
|
-
* @param {?} curr
|
|
1866
|
-
* @return {?}
|
|
1867
|
-
*/
|
|
1868
|
-
KeepAliveService.prototype.shouldReuseRoute = /**
|
|
1869
|
-
* @param {?} future
|
|
1870
|
-
* @param {?} curr
|
|
1871
|
-
* @return {?}
|
|
1872
|
-
*/
|
|
1873
|
-
function (future, curr) {
|
|
1874
|
-
// console.log("shouldReuseRoute", future, curr);
|
|
1875
|
-
// return future.routeConfig === curr.routeConfig;
|
|
1876
|
-
if (future.routeConfig === curr.routeConfig) {
|
|
1877
|
-
if (future.children.length === 0 && curr.children.length === 0) {
|
|
1878
|
-
// 无子路由时, 通过params和queryParams判断是否复用路由
|
|
1879
|
-
return (JSON.stringify(future.params) === JSON.stringify(curr.params) &&
|
|
1880
|
-
JSON.stringify(future.queryParams) ===
|
|
1881
|
-
JSON.stringify(curr.queryParams));
|
|
1882
|
-
}
|
|
1883
|
-
return true;
|
|
1884
|
-
}
|
|
1885
|
-
return false;
|
|
1886
|
-
};
|
|
1887
|
-
/**
|
|
1888
|
-
* @param {?} route
|
|
1889
|
-
* @return {?}
|
|
1890
|
-
*/
|
|
1891
|
-
KeepAliveService.prototype.getRoutePath = /**
|
|
1892
|
-
* @param {?} route
|
|
1893
|
-
* @return {?}
|
|
1894
|
-
*/
|
|
1895
|
-
function (route) {
|
|
1896
|
-
if (route.routeConfig) {
|
|
1897
|
-
// const pathParams = JSON.stringify(route.params);
|
|
1898
|
-
/** @type {?} */
|
|
1899
|
-
var queryParams = new URLSearchParams(route.queryParams).toString();
|
|
1900
|
-
/** @type {?} */
|
|
1901
|
-
var url = route._urlSegment.segments.map((/**
|
|
1902
|
-
* @param {?} v
|
|
1903
|
-
* @return {?}
|
|
1904
|
-
*/
|
|
1905
|
-
function (v) { return v.path; })).join("/");
|
|
1906
|
-
return "/" + url + (queryParams ? "?" + queryParams : "");
|
|
1907
|
-
}
|
|
1908
|
-
return "";
|
|
1909
|
-
};
|
|
1910
|
-
/**
|
|
1911
|
-
* @param {?} path
|
|
1912
|
-
* @return {?}
|
|
1913
|
-
*/
|
|
1914
|
-
KeepAliveService.prototype.clearCache = /**
|
|
1915
|
-
* @param {?} path
|
|
1916
|
-
* @return {?}
|
|
1917
|
-
*/
|
|
1918
|
-
function (path) {
|
|
1919
|
-
// console.log("clearCache", storedRoutes, path);
|
|
1920
|
-
toBeDeleteUrl = path;
|
|
1921
|
-
storedRoutes.delete(path);
|
|
1922
|
-
};
|
|
1923
|
-
/**
|
|
1924
|
-
* @return {?}
|
|
1925
|
-
*/
|
|
1926
|
-
KeepAliveService.prototype.clearAllCache = /**
|
|
1927
|
-
* @return {?}
|
|
1928
|
-
*/
|
|
1929
|
-
function () {
|
|
1930
|
-
storedRoutes.clear();
|
|
1931
|
-
};
|
|
1932
|
-
KeepAliveService.decorators = [
|
|
1933
|
-
{ type: core.Injectable, args: [{
|
|
1934
|
-
providedIn: "root",
|
|
1935
|
-
},] }
|
|
1936
|
-
];
|
|
1937
|
-
/** @nocollapse */ KeepAliveService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function KeepAliveService_Factory() { return new KeepAliveService(); }, token: KeepAliveService, providedIn: "root" });
|
|
1938
|
-
return KeepAliveService;
|
|
1939
|
-
}());
|
|
1940
|
-
|
|
1941
1763
|
/**
|
|
1942
1764
|
* @fileoverview added by tsickle
|
|
1943
1765
|
* Generated from: lib/service/drawer.service.ts
|
|
@@ -2167,15 +1989,14 @@
|
|
|
2167
1989
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2168
1990
|
*/
|
|
2169
1991
|
var MultiTabComponent = /** @class */ (function () {
|
|
2170
|
-
function MultiTabComponent(router, cf, activatedRoute,
|
|
1992
|
+
function MultiTabComponent(router, cf, activatedRoute, ref, drawer, routeReuseStrategy) {
|
|
2171
1993
|
this.router = router;
|
|
2172
1994
|
this.cf = cf;
|
|
2173
1995
|
this.activatedRoute = activatedRoute;
|
|
2174
|
-
this.keepAlive = keepAlive;
|
|
2175
1996
|
this.ref = ref;
|
|
2176
1997
|
this.drawer = drawer;
|
|
1998
|
+
this.routeReuseStrategy = routeReuseStrategy;
|
|
2177
1999
|
this.singleReuseUrls = []; //只能单个缓存的url
|
|
2178
|
-
//只能单个缓存的url
|
|
2179
2000
|
this.TAB_WIDTH = 164;
|
|
2180
2001
|
this.GAP_NORMAL = 54;
|
|
2181
2002
|
this.GAP_SMALL = 30;
|
|
@@ -2183,6 +2004,7 @@
|
|
|
2183
2004
|
this.selectedTab = 0;
|
|
2184
2005
|
this.maxTabs = 10;
|
|
2185
2006
|
this.screenWidth = window.innerWidth; // 初始化屏幕宽度
|
|
2007
|
+
this.keepAlive = (/** @type {?} */ (this.routeReuseStrategy));
|
|
2186
2008
|
}
|
|
2187
2009
|
// 初始化屏幕宽度
|
|
2188
2010
|
/**
|
|
@@ -2218,7 +2040,7 @@
|
|
|
2218
2040
|
if (isExistIdx !== -1) {
|
|
2219
2041
|
this.selectedTab = isExistIdx;
|
|
2220
2042
|
}
|
|
2221
|
-
this.router.events
|
|
2043
|
+
this.subscription = this.router.events
|
|
2222
2044
|
.pipe(operators.filter((/**
|
|
2223
2045
|
* @param {?} event
|
|
2224
2046
|
* @return {?}
|
|
@@ -2263,6 +2085,17 @@
|
|
|
2263
2085
|
_this.setEllipsisTitle();
|
|
2264
2086
|
}), 50);
|
|
2265
2087
|
};
|
|
2088
|
+
/**
|
|
2089
|
+
* @return {?}
|
|
2090
|
+
*/
|
|
2091
|
+
MultiTabComponent.prototype.ngOnDestroy = /**
|
|
2092
|
+
* @return {?}
|
|
2093
|
+
*/
|
|
2094
|
+
function () {
|
|
2095
|
+
if (this.subscription) {
|
|
2096
|
+
this.subscription.unsubscribe();
|
|
2097
|
+
}
|
|
2098
|
+
};
|
|
2266
2099
|
/**
|
|
2267
2100
|
* @param {?=} title
|
|
2268
2101
|
* @return {?}
|
|
@@ -2317,17 +2150,17 @@
|
|
|
2317
2150
|
var leftWidth;
|
|
2318
2151
|
/** @type {?} */
|
|
2319
2152
|
var rightWidth;
|
|
2320
|
-
if (wrap && ulElement
|
|
2153
|
+
if (wrap && ulElement) {
|
|
2321
2154
|
// 获取元素的位置信息
|
|
2322
2155
|
/** @type {?} */
|
|
2323
2156
|
var wrapRect = wrap.getBoundingClientRect();
|
|
2324
2157
|
/** @type {?} */
|
|
2325
2158
|
var ulRect = ulElement.getBoundingClientRect();
|
|
2326
2159
|
/** @type {?} */
|
|
2327
|
-
var refreshTabRect = refreshTabDiv.getBoundingClientRect();
|
|
2160
|
+
var refreshTabRect = refreshTabDiv && refreshTabDiv.getBoundingClientRect();
|
|
2328
2161
|
allWidth = wrapRect.width;
|
|
2329
2162
|
leftWidth = ulRect.width;
|
|
2330
|
-
rightWidth = refreshTabRect.width;
|
|
2163
|
+
rightWidth = (refreshTabRect && refreshTabRect.width) || 100;
|
|
2331
2164
|
}
|
|
2332
2165
|
return {
|
|
2333
2166
|
allWidth: allWidth,
|
|
@@ -2497,9 +2330,9 @@
|
|
|
2497
2330
|
{ type: router.Router },
|
|
2498
2331
|
{ type: CommonFunctionService },
|
|
2499
2332
|
{ type: router.ActivatedRoute },
|
|
2500
|
-
{ type: KeepAliveService },
|
|
2501
2333
|
{ type: core.ChangeDetectorRef },
|
|
2502
|
-
{ type: DrawerService }
|
|
2334
|
+
{ type: DrawerService },
|
|
2335
|
+
{ type: router.RouteReuseStrategy }
|
|
2503
2336
|
]; };
|
|
2504
2337
|
MultiTabComponent.propDecorators = {
|
|
2505
2338
|
singleReuseUrls: [{ type: core.Input }],
|
|
@@ -2508,8 +2341,15 @@
|
|
|
2508
2341
|
return MultiTabComponent;
|
|
2509
2342
|
}());
|
|
2510
2343
|
if (false) {
|
|
2344
|
+
/** @type {?} */
|
|
2345
|
+
MultiTabComponent.prototype.keepAlive;
|
|
2511
2346
|
/** @type {?} */
|
|
2512
2347
|
MultiTabComponent.prototype.singleReuseUrls;
|
|
2348
|
+
/**
|
|
2349
|
+
* @type {?}
|
|
2350
|
+
* @private
|
|
2351
|
+
*/
|
|
2352
|
+
MultiTabComponent.prototype.subscription;
|
|
2513
2353
|
/** @type {?} */
|
|
2514
2354
|
MultiTabComponent.prototype.TAB_WIDTH;
|
|
2515
2355
|
/** @type {?} */
|
|
@@ -2536,8 +2376,6 @@
|
|
|
2536
2376
|
MultiTabComponent.prototype.cf;
|
|
2537
2377
|
/** @type {?} */
|
|
2538
2378
|
MultiTabComponent.prototype.activatedRoute;
|
|
2539
|
-
/** @type {?} */
|
|
2540
|
-
MultiTabComponent.prototype.keepAlive;
|
|
2541
2379
|
/**
|
|
2542
2380
|
* @type {?}
|
|
2543
2381
|
* @private
|
|
@@ -2548,6 +2386,11 @@
|
|
|
2548
2386
|
* @private
|
|
2549
2387
|
*/
|
|
2550
2388
|
MultiTabComponent.prototype.drawer;
|
|
2389
|
+
/**
|
|
2390
|
+
* @type {?}
|
|
2391
|
+
* @private
|
|
2392
|
+
*/
|
|
2393
|
+
MultiTabComponent.prototype.routeReuseStrategy;
|
|
2551
2394
|
}
|
|
2552
2395
|
|
|
2553
2396
|
/**
|
|
@@ -21396,6 +21239,205 @@
|
|
|
21396
21239
|
DialogService.prototype.dialog;
|
|
21397
21240
|
}
|
|
21398
21241
|
|
|
21242
|
+
/**
|
|
21243
|
+
* @fileoverview added by tsickle
|
|
21244
|
+
* Generated from: lib/service/keep-alive.service.ts
|
|
21245
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
21246
|
+
*/
|
|
21247
|
+
/** @type {?} */
|
|
21248
|
+
var storedRoutes = new Map();
|
|
21249
|
+
/** @type {?} */
|
|
21250
|
+
var toBeDeleteUrl;
|
|
21251
|
+
/** @type {?} */
|
|
21252
|
+
var excludeRoutes = [];
|
|
21253
|
+
// 不需要缓存的url
|
|
21254
|
+
var
|
|
21255
|
+
// 不需要缓存的url
|
|
21256
|
+
KeepAliveService = /** @class */ (function () {
|
|
21257
|
+
function KeepAliveService() {
|
|
21258
|
+
}
|
|
21259
|
+
// 用于存储 BaseComponent 的实例
|
|
21260
|
+
/**
|
|
21261
|
+
* @param {?} routes
|
|
21262
|
+
* @return {?}
|
|
21263
|
+
*/
|
|
21264
|
+
KeepAliveService.prototype.setExcludeRoutes =
|
|
21265
|
+
// 用于存储 BaseComponent 的实例
|
|
21266
|
+
/**
|
|
21267
|
+
* @param {?} routes
|
|
21268
|
+
* @return {?}
|
|
21269
|
+
*/
|
|
21270
|
+
function (routes) {
|
|
21271
|
+
excludeRoutes = routes; // 设置不缓存的路由
|
|
21272
|
+
};
|
|
21273
|
+
/**
|
|
21274
|
+
* @param {?} route
|
|
21275
|
+
* @return {?}
|
|
21276
|
+
*/
|
|
21277
|
+
KeepAliveService.prototype.shouldDetach = /**
|
|
21278
|
+
* @param {?} route
|
|
21279
|
+
* @return {?}
|
|
21280
|
+
*/
|
|
21281
|
+
function (route) {
|
|
21282
|
+
/** @type {?} */
|
|
21283
|
+
var config = route.routeConfig;
|
|
21284
|
+
// console.log("shouldDetach", toBeDeleteUrl, this.getRoutePath(route));
|
|
21285
|
+
if (toBeDeleteUrl === this.getRoutePath(route)) {
|
|
21286
|
+
// 对于新开的又即将关闭的tab,不缓存
|
|
21287
|
+
if (route.children.length === 0) {
|
|
21288
|
+
toBeDeleteUrl = "";
|
|
21289
|
+
}
|
|
21290
|
+
return false;
|
|
21291
|
+
}
|
|
21292
|
+
if (config && excludeRoutes.includes(this.getRoutePath(route))) {
|
|
21293
|
+
return false;
|
|
21294
|
+
}
|
|
21295
|
+
//Don't store lazy loaded routes
|
|
21296
|
+
return config && !config.loadChildren;
|
|
21297
|
+
};
|
|
21298
|
+
/**
|
|
21299
|
+
* @param {?} route
|
|
21300
|
+
* @param {?} handle
|
|
21301
|
+
* @return {?}
|
|
21302
|
+
*/
|
|
21303
|
+
KeepAliveService.prototype.store = /**
|
|
21304
|
+
* @param {?} route
|
|
21305
|
+
* @param {?} handle
|
|
21306
|
+
* @return {?}
|
|
21307
|
+
*/
|
|
21308
|
+
function (route, handle) {
|
|
21309
|
+
// console.log("store", this.getRoutePath(route));
|
|
21310
|
+
// console.log("store", storedRoutes);
|
|
21311
|
+
/** @type {?} */
|
|
21312
|
+
var key = this.getRoutePath(route);
|
|
21313
|
+
storedRoutes.set(key, handle);
|
|
21314
|
+
};
|
|
21315
|
+
/**
|
|
21316
|
+
* @param {?} route
|
|
21317
|
+
* @return {?}
|
|
21318
|
+
*/
|
|
21319
|
+
KeepAliveService.prototype.shouldAttach = /**
|
|
21320
|
+
* @param {?} route
|
|
21321
|
+
* @return {?}
|
|
21322
|
+
*/
|
|
21323
|
+
function (route) {
|
|
21324
|
+
/** @type {?} */
|
|
21325
|
+
var key = this.getRoutePath(route);
|
|
21326
|
+
return !!route.routeConfig && storedRoutes.has(key);
|
|
21327
|
+
};
|
|
21328
|
+
/**
|
|
21329
|
+
* @param {?} route
|
|
21330
|
+
* @return {?}
|
|
21331
|
+
*/
|
|
21332
|
+
KeepAliveService.prototype.retrieve = /**
|
|
21333
|
+
* @param {?} route
|
|
21334
|
+
* @return {?}
|
|
21335
|
+
*/
|
|
21336
|
+
function (route) {
|
|
21337
|
+
/** @type {?} */
|
|
21338
|
+
var config = route.routeConfig;
|
|
21339
|
+
/** @type {?} */
|
|
21340
|
+
var key = this.getRoutePath(route);
|
|
21341
|
+
//We don't store lazy loaded routes, so don't even bother trying to retrieve them
|
|
21342
|
+
if (!config || config.loadChildren) {
|
|
21343
|
+
return false;
|
|
21344
|
+
}
|
|
21345
|
+
return storedRoutes.get(key) || null;
|
|
21346
|
+
};
|
|
21347
|
+
/**
|
|
21348
|
+
* @param {?} future
|
|
21349
|
+
* @param {?} curr
|
|
21350
|
+
* @return {?}
|
|
21351
|
+
*/
|
|
21352
|
+
KeepAliveService.prototype.shouldReuseRoute = /**
|
|
21353
|
+
* @param {?} future
|
|
21354
|
+
* @param {?} curr
|
|
21355
|
+
* @return {?}
|
|
21356
|
+
*/
|
|
21357
|
+
function (future, curr) {
|
|
21358
|
+
// console.log("shouldReuseRoute", future, curr);
|
|
21359
|
+
// return future.routeConfig === curr.routeConfig;
|
|
21360
|
+
if (future.routeConfig === curr.routeConfig) {
|
|
21361
|
+
if (future.children.length === 0 && curr.children.length === 0) {
|
|
21362
|
+
// 无子路由时, 通过params和queryParams判断是否复用路由
|
|
21363
|
+
return (JSON.stringify(future.params) === JSON.stringify(curr.params) &&
|
|
21364
|
+
JSON.stringify(future.queryParams) ===
|
|
21365
|
+
JSON.stringify(curr.queryParams));
|
|
21366
|
+
}
|
|
21367
|
+
return true;
|
|
21368
|
+
}
|
|
21369
|
+
return false;
|
|
21370
|
+
};
|
|
21371
|
+
/**
|
|
21372
|
+
* @param {?} route
|
|
21373
|
+
* @return {?}
|
|
21374
|
+
*/
|
|
21375
|
+
KeepAliveService.prototype.getRoutePath = /**
|
|
21376
|
+
* @param {?} route
|
|
21377
|
+
* @return {?}
|
|
21378
|
+
*/
|
|
21379
|
+
function (route) {
|
|
21380
|
+
if (route.routeConfig) {
|
|
21381
|
+
// const pathParams = JSON.stringify(route.params);
|
|
21382
|
+
/** @type {?} */
|
|
21383
|
+
var queryParams = new URLSearchParams(route.queryParams).toString();
|
|
21384
|
+
/** @type {?} */
|
|
21385
|
+
var url = route._urlSegment.segments.map((/**
|
|
21386
|
+
* @param {?} v
|
|
21387
|
+
* @return {?}
|
|
21388
|
+
*/
|
|
21389
|
+
function (v) { return v.path; })).join("/");
|
|
21390
|
+
return "/" + url + (queryParams ? "?" + queryParams : "");
|
|
21391
|
+
}
|
|
21392
|
+
return "";
|
|
21393
|
+
};
|
|
21394
|
+
/**
|
|
21395
|
+
* @param {?} path
|
|
21396
|
+
* @return {?}
|
|
21397
|
+
*/
|
|
21398
|
+
KeepAliveService.prototype.clearCache = /**
|
|
21399
|
+
* @param {?} path
|
|
21400
|
+
* @return {?}
|
|
21401
|
+
*/
|
|
21402
|
+
function (path) {
|
|
21403
|
+
// console.log("clearCache", storedRoutes, path);
|
|
21404
|
+
toBeDeleteUrl = path;
|
|
21405
|
+
storedRoutes.delete(path);
|
|
21406
|
+
};
|
|
21407
|
+
/**
|
|
21408
|
+
* @return {?}
|
|
21409
|
+
*/
|
|
21410
|
+
KeepAliveService.prototype.clearAllCache = /**
|
|
21411
|
+
* @return {?}
|
|
21412
|
+
*/
|
|
21413
|
+
function () {
|
|
21414
|
+
sessionStorage.removeItem("TabCache");
|
|
21415
|
+
if (this.baseComponent) {
|
|
21416
|
+
this.baseComponent.ngOnDestroy();
|
|
21417
|
+
}
|
|
21418
|
+
storedRoutes.clear();
|
|
21419
|
+
};
|
|
21420
|
+
/**
|
|
21421
|
+
* @param {?} component
|
|
21422
|
+
* @return {?}
|
|
21423
|
+
*/
|
|
21424
|
+
KeepAliveService.prototype.setBaseComponent = /**
|
|
21425
|
+
* @param {?} component
|
|
21426
|
+
* @return {?}
|
|
21427
|
+
*/
|
|
21428
|
+
function (component) {
|
|
21429
|
+
this.baseComponent = component;
|
|
21430
|
+
};
|
|
21431
|
+
return KeepAliveService;
|
|
21432
|
+
}());
|
|
21433
|
+
if (false) {
|
|
21434
|
+
/**
|
|
21435
|
+
* @type {?}
|
|
21436
|
+
* @private
|
|
21437
|
+
*/
|
|
21438
|
+
KeepAliveService.prototype.baseComponent;
|
|
21439
|
+
}
|
|
21440
|
+
|
|
21399
21441
|
/**
|
|
21400
21442
|
* @fileoverview added by tsickle
|
|
21401
21443
|
* Generated from: lib/dialog/common-dialog/index.component.ts
|
|
@@ -21654,7 +21696,6 @@
|
|
|
21654
21696
|
CommonFunctionService,
|
|
21655
21697
|
IconLoaderService,
|
|
21656
21698
|
DialogService,
|
|
21657
|
-
KeepAliveService,
|
|
21658
21699
|
TranslationService,
|
|
21659
21700
|
],
|
|
21660
21701
|
exports: [
|