@topconsultnpm/sdkui-react-beta 6.5.82 → 6.5.83
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/lib/helper/helpers.d.ts +1 -1
- package/lib/helper/helpers.js +8 -4
- package/package.json +1 -1
package/lib/helper/helpers.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare const TABLET_WIDTH = 1024;
|
|
|
5
5
|
declare const MOBILE_WIDTH = 640;
|
|
6
6
|
declare const calcResponsiveDirection: (currentWidth: number, desktopDir: "horizontal" | "vertical", tabletDir: "horizontal" | "vertical", mobileDir: "horizontal" | "vertical") => "horizontal" | "vertical";
|
|
7
7
|
declare const openApps: (appModule: AppModules, tmSession: ITopMediaSession, appRoutes?: any[]) => Promise<void>;
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const setSDK_GlobalsInfoAsync: (tms: ITopMediaSession | undefined) => Promise<ITopMediaSession>;
|
|
9
9
|
declare const calcResponsiveSizes: (currentWidth: number, desktopSize: string, tabletSize: string, mobileSize: string) => string;
|
|
10
10
|
declare const useWindowWidth: () => number;
|
|
11
11
|
declare const getColor: (color: ColorsType) => string;
|
package/lib/helper/helpers.js
CHANGED
|
@@ -34,7 +34,7 @@ const openApps = async (appModule, tmSession, appRoutes) => {
|
|
|
34
34
|
TMSpinner.hide();
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
export const
|
|
37
|
+
export const setSDK_GlobalsInfoAsync = async (tms) => {
|
|
38
38
|
const tmServer = new TopMediaServer(tms?.TopMediaServer?.BaseAddress);
|
|
39
39
|
const tmSessionNew = tmServer?.NewSession();
|
|
40
40
|
if (tmSessionNew) {
|
|
@@ -42,10 +42,14 @@ export const setSDK_GlobalsInfo = (tms) => {
|
|
|
42
42
|
}
|
|
43
43
|
SDK_Globals.tmSession = tmSessionNew;
|
|
44
44
|
if (SDK_Globals.license == undefined) {
|
|
45
|
-
|
|
46
|
-
SDK_Globals.license =
|
|
47
|
-
}
|
|
45
|
+
try {
|
|
46
|
+
SDK_Globals.license = await tmSessionNew.NewLicenseEngine().RetrieveAsync();
|
|
47
|
+
}
|
|
48
|
+
catch (e) {
|
|
49
|
+
TMExceptionBoxManager.show({ title: 'Errore caricamento licenza', exception: e });
|
|
50
|
+
}
|
|
48
51
|
}
|
|
52
|
+
return tmSessionNew;
|
|
49
53
|
};
|
|
50
54
|
const calcResponsiveSizes = (currentWidth, desktopSize, tabletSize, mobileSize) => {
|
|
51
55
|
if (currentWidth > TABLET_WIDTH)
|