robbyson-frontend-library 0.0.1-rc3 → 0.0.1-rc5
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.
|
@@ -177,6 +177,15 @@ var BaseRepository = /** @class */ (function () {
|
|
|
177
177
|
config.headers['x-system-id'] = BaseRepository._systemId;
|
|
178
178
|
return config;
|
|
179
179
|
};
|
|
180
|
+
BaseRepository.prototype.createAxiosCancelationContext = function () {
|
|
181
|
+
BaseRepository._source = axios.CancelToken.source();
|
|
182
|
+
};
|
|
183
|
+
BaseRepository.prototype.cancelAxiosRequest = function () {
|
|
184
|
+
if (BaseRepository._source) {
|
|
185
|
+
BaseRepository._source.cancel();
|
|
186
|
+
BaseRepository._source = null;
|
|
187
|
+
}
|
|
188
|
+
};
|
|
180
189
|
BaseRepository._sessionKey = "";
|
|
181
190
|
BaseRepository._systemId = 1;
|
|
182
191
|
BaseRepository._baseURL = "";
|
|
@@ -25,6 +25,25 @@ var RobbysonNavigate = /** @class */ (function () {
|
|
|
25
25
|
var history = RobbysonNavigate._globalState.Global.RootApp.history;
|
|
26
26
|
history.replace(replace, state);
|
|
27
27
|
};
|
|
28
|
+
RobbysonNavigate.getRouteId = function () {
|
|
29
|
+
RobbysonNavigate._globalStore = GlobalStore.Get();
|
|
30
|
+
RobbysonNavigate._globalState =
|
|
31
|
+
RobbysonNavigate._globalStore.GetGlobalState();
|
|
32
|
+
var history = RobbysonNavigate._globalState.Global.RootApp.history;
|
|
33
|
+
var routeParams = history.location.pathname.split("/");
|
|
34
|
+
var id = routeParams[routeParams.length - 1];
|
|
35
|
+
return id;
|
|
36
|
+
};
|
|
37
|
+
RobbysonNavigate.getPathname = function () {
|
|
38
|
+
RobbysonNavigate._globalStore = GlobalStore.Get();
|
|
39
|
+
RobbysonNavigate._globalState =
|
|
40
|
+
RobbysonNavigate._globalStore.GetGlobalState();
|
|
41
|
+
var history = RobbysonNavigate._globalState.Global.RootApp.history;
|
|
42
|
+
return history.location.pathname;
|
|
43
|
+
};
|
|
44
|
+
RobbysonNavigate.matchPath = function (path) {
|
|
45
|
+
return RobbysonNavigate.getPathname().includes(path);
|
|
46
|
+
};
|
|
28
47
|
RobbysonNavigate.getQueryParams = function () {
|
|
29
48
|
RobbysonNavigate._globalStore = GlobalStore.Get();
|
|
30
49
|
RobbysonNavigate._globalState =
|