@osovitny/anatoly 3.20.10 → 3.20.12

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.
@@ -93,7 +93,6 @@ const AppContextStorageKeys = {
93
93
 
94
94
  Authors:
95
95
  Vadim Osovitny vadim.osovitny@osovitny.com
96
- Anatoly Osovitny anatoly.osovitny@osovitny.com
97
96
 
98
97
  Created:
99
98
  26 Jun 2020
@@ -106,18 +105,16 @@ const AppContextStorageKeys = {
106
105
  </file>
107
106
  */
108
107
  //App
109
- const AppCoreSettings = JSON.parse(
110
108
  //VadimOS: old approach
111
- //((document.getElementById('appCoreSettings')) as HTMLInputElement).getAttribute('data-appcoresettings')
112
- sessionStorage.getItem(SessionStorageKeys.appCoreSettings));
113
- //WebApp
114
- let isDevMode = `${AppCoreSettings?.isDevMode}`;
115
- const AppVersion = `${AppCoreSettings?.version}`;
116
- const IsDevMode = (isDevMode && (isDevMode == 'True' || isDevMode == 'true'));
117
- const IsProdMode = !IsDevMode;
118
- const ClientApps = AppCoreSettings?.clientApps;
119
- //Api
120
- const ApiUrl = `${AppCoreSettings?.api.url}`;
109
+ /*
110
+ export const AppCoreSettings = JSON.parse(
111
+ ((document.getElementById('appCoreSettings')) as HTMLInputElement).getAttribute('data-appcoresettings')
112
+ );
113
+ */
114
+ function getAppCoreSettings() {
115
+ const json = sessionStorage.getItem(SessionStorageKeys.appCoreSettings);
116
+ return json ? JSON.parse(json) : null;
117
+ }
121
118
  function formatUrl(url) {
122
119
  let newUrl = url;
123
120
  if (url) {
@@ -130,6 +127,15 @@ function formatUrl(url) {
130
127
  }
131
128
  return newUrl;
132
129
  }
130
+ let AppCoreSettings = getAppCoreSettings();
131
+ //WebApp
132
+ let isDevMode = `${AppCoreSettings?.isDevMode}`;
133
+ const AppVersion = `${AppCoreSettings?.version}`;
134
+ const IsDevMode = (isDevMode && (isDevMode == 'True' || isDevMode == 'true'));
135
+ const IsProdMode = !IsDevMode;
136
+ const ClientApps = AppCoreSettings?.clientApps;
137
+ const AppName = g_AppName;
138
+ const ApiUrl = g_ApiUrl;
133
139
 
134
140
  /*
135
141
  <file>
@@ -848,7 +854,6 @@ function getCurrentApp() {
848
854
  oneUrl: appOne?.baseUrl + appOne?.root
849
855
  };
850
856
  }
851
- const AppName = document.getElementById('appName').getAttribute('data-appname');
852
857
  const AppSettings = getAppSettingsByName(AppName);
853
858
 
854
859
  /*