robbyson-frontend-library 1.0.180 → 1.0.181
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.
|
@@ -15,7 +15,6 @@ var RobbysonNavigate = /** @class */ (function () {
|
|
|
15
15
|
function RobbysonNavigate() {
|
|
16
16
|
}
|
|
17
17
|
RobbysonNavigate.to = function (url, state) {
|
|
18
|
-
var _a;
|
|
19
18
|
RobbysonNavigate._globalStore = GlobalStore.Get();
|
|
20
19
|
RobbysonNavigate._globalState =
|
|
21
20
|
RobbysonNavigate._globalStore.GetGlobalState();
|
|
@@ -23,16 +22,6 @@ var RobbysonNavigate = /** @class */ (function () {
|
|
|
23
22
|
var routeState = __assign(__assign({}, state), { pathname: history.location.pathname });
|
|
24
23
|
this.setLocationHistory(history.location.pathname);
|
|
25
24
|
// TODO: Usar a LIB PATH para concatenar a URL
|
|
26
|
-
var isStandaloneMode = RobbysonNavigate._globalState.Global.RootApp.isStandaloneMode;
|
|
27
|
-
if (isStandaloneMode) {
|
|
28
|
-
var standaloneQueryParams = (_a = this.getQueryParams()) === null || _a === void 0 ? void 0 : _a.standalone;
|
|
29
|
-
if (standaloneQueryParams) {
|
|
30
|
-
var urlHasQueryParams = url.includes("?") ? true : false;
|
|
31
|
-
url += urlHasQueryParams
|
|
32
|
-
? "&standalone=".concat(standaloneQueryParams)
|
|
33
|
-
: "?standalone=".concat(standaloneQueryParams);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
25
|
history.push("/operacao".concat(url), routeState);
|
|
37
26
|
};
|
|
38
27
|
RobbysonNavigate.openInNewTab = function (url) {
|
|
@@ -96,12 +85,12 @@ var RobbysonNavigate = /** @class */ (function () {
|
|
|
96
85
|
return RobbysonNavigate.getPathname().includes(path);
|
|
97
86
|
};
|
|
98
87
|
RobbysonNavigate.getQueryParams = function () {
|
|
99
|
-
var _a
|
|
88
|
+
var _a;
|
|
100
89
|
RobbysonNavigate._globalStore = GlobalStore.Get();
|
|
101
90
|
RobbysonNavigate._globalState =
|
|
102
91
|
RobbysonNavigate._globalStore.GetGlobalState();
|
|
103
92
|
var history = (_a = RobbysonNavigate._globalState.Global) === null || _a === void 0 ? void 0 : _a.RootApp.history;
|
|
104
|
-
return queryString.parse(
|
|
93
|
+
return queryString.parse(history === null || history === void 0 ? void 0 : history.location.search, {
|
|
105
94
|
sort: false,
|
|
106
95
|
});
|
|
107
96
|
};
|
package/package.json
CHANGED
|
@@ -9,10 +9,4 @@ export interface IThemeService {
|
|
|
9
9
|
getApplicationTheme(): ThemeBase | undefined;
|
|
10
10
|
getPng(png: string): string;
|
|
11
11
|
setContractorTheme(contractorId: number): Promise<void>;
|
|
12
|
-
isStandaloneMode(): boolean;
|
|
13
|
-
enableStandalone(): void;
|
|
14
|
-
disableStandalone(): void;
|
|
15
|
-
handleInitializeStandaloneMode(): void;
|
|
16
|
-
isOperationStandaloneMode(): boolean;
|
|
17
|
-
|
|
18
12
|
}
|
|
@@ -16,23 +16,6 @@ export class RobbysonNavigate {
|
|
|
16
16
|
const routeState = { ...state, pathname: history.location.pathname };
|
|
17
17
|
this.setLocationHistory(history.location.pathname);
|
|
18
18
|
// TODO: Usar a LIB PATH para concatenar a URL
|
|
19
|
-
|
|
20
|
-
const isStandaloneMode =
|
|
21
|
-
RobbysonNavigate._globalState.Global.RootApp.isStandaloneMode;
|
|
22
|
-
|
|
23
|
-
if (isStandaloneMode) {
|
|
24
|
-
const standaloneQueryParams = this.getQueryParams<{
|
|
25
|
-
standalone: string;
|
|
26
|
-
}>()?.standalone;
|
|
27
|
-
|
|
28
|
-
if (standaloneQueryParams) {
|
|
29
|
-
const urlHasQueryParams = url.includes("?") ? true : false;
|
|
30
|
-
url += urlHasQueryParams
|
|
31
|
-
? `&standalone=${standaloneQueryParams}`
|
|
32
|
-
: `?standalone=${standaloneQueryParams}`;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
19
|
history.push(`/operacao${url}`, routeState);
|
|
37
20
|
}
|
|
38
21
|
|
|
@@ -70,7 +53,6 @@ export class RobbysonNavigate {
|
|
|
70
53
|
|
|
71
54
|
const { history } = RobbysonNavigate._globalState.Global.RootApp;
|
|
72
55
|
const routeState = { ...state, pathname: history.location.pathname };
|
|
73
|
-
|
|
74
56
|
this.setLocationHistory(history.location.pathname);
|
|
75
57
|
|
|
76
58
|
history.replace(replace, routeState);
|
|
@@ -124,7 +106,7 @@ export class RobbysonNavigate {
|
|
|
124
106
|
|
|
125
107
|
const history = RobbysonNavigate._globalState.Global?.RootApp.history;
|
|
126
108
|
|
|
127
|
-
return queryString.parse(history?.location
|
|
109
|
+
return queryString.parse(history?.location.search, {
|
|
128
110
|
sort: false,
|
|
129
111
|
}) as T;
|
|
130
112
|
}
|