@osovitny/anatoly 2.14.43 → 2.14.45
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/esm2020/lib/core/consts/settings.mjs +1 -2
- package/esm2020/lib/core/services/appcontext.service.mjs +12 -15
- package/fesm2015/osovitny-anatoly.mjs +10 -13
- package/fesm2015/osovitny-anatoly.mjs.map +1 -1
- package/fesm2020/osovitny-anatoly.mjs +10 -13
- package/fesm2020/osovitny-anatoly.mjs.map +1 -1
- package/lib/core/consts/settings.d.ts +0 -1
- package/lib/core/services/appcontext.service.d.ts +1 -2
- package/package.json +1 -1
|
@@ -43,7 +43,6 @@ import { ButtonsModule } from '@progress/kendo-angular-buttons';
|
|
|
43
43
|
Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
|
|
44
44
|
</file>
|
|
45
45
|
*/
|
|
46
|
-
const ContextInitState = JSON.parse((document.getElementById('contextInitState')).getAttribute('data-contextinitstate'));
|
|
47
46
|
const AppCoreSettings = JSON.parse((document.getElementById('appCoreSettings')).getAttribute('data-appcoresettings'));
|
|
48
47
|
|
|
49
48
|
/*
|
|
@@ -1424,13 +1423,17 @@ class AppContextService extends BaseApiService {
|
|
|
1424
1423
|
this.subscription = null;
|
|
1425
1424
|
}
|
|
1426
1425
|
//Public
|
|
1426
|
+
getLatestCurrent(success = null) {
|
|
1427
|
+
this.getCurrent(success, false);
|
|
1428
|
+
}
|
|
1427
1429
|
getCurrent(success = null, getCachedIfExist = true) {
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
if (
|
|
1431
|
-
success
|
|
1430
|
+
if (getCachedIfExist) {
|
|
1431
|
+
let context = this.getCurrentFromSession();
|
|
1432
|
+
if (context != null) {
|
|
1433
|
+
if (success)
|
|
1434
|
+
success(context);
|
|
1435
|
+
return;
|
|
1432
1436
|
}
|
|
1433
|
-
return;
|
|
1434
1437
|
}
|
|
1435
1438
|
if (success) {
|
|
1436
1439
|
this.successes.push(success);
|
|
@@ -1456,12 +1459,6 @@ class AppContextService extends BaseApiService {
|
|
|
1456
1459
|
this.clearCurrent();
|
|
1457
1460
|
this.updateCurrent();
|
|
1458
1461
|
}
|
|
1459
|
-
isUserSignedIn() {
|
|
1460
|
-
return ContextInitState.isUserSignedIn;
|
|
1461
|
-
}
|
|
1462
|
-
isUserAdmin() {
|
|
1463
|
-
return ContextInitState.isUserAdmin;
|
|
1464
|
-
}
|
|
1465
1462
|
//Properties
|
|
1466
1463
|
get current() {
|
|
1467
1464
|
this.updateCurrentIfExpired();
|
|
@@ -4427,5 +4424,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
|
|
|
4427
4424
|
* Generated bundle index. Do not edit.
|
|
4428
4425
|
*/
|
|
4429
4426
|
|
|
4430
|
-
export { AddressComponent, Alerts, AnatolyCoreModule, AnatolyDataModule, AnatolyHttpInterceptor, AnatolyUIModule, AppContextService, AppCoreSettings, BaseApiService, BaseComponent, BaseDialog, BaseEditComponent, BaseGoService, BaseGridEditService, BaseGridReadService, BaseHtmlEditorComponent, BuyAccessButtonComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CheckIconComponent, CompanyComponent, ContactUsDialog, ContactUsForm,
|
|
4427
|
+
export { AddressComponent, Alerts, AnatolyCoreModule, AnatolyDataModule, AnatolyHttpInterceptor, AnatolyUIModule, AppContextService, AppCoreSettings, BaseApiService, BaseComponent, BaseDialog, BaseEditComponent, BaseGoService, BaseGridEditService, BaseGridReadService, BaseHtmlEditorComponent, BuyAccessButtonComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CheckIconComponent, CompanyComponent, ContactUsDialog, ContactUsForm, Convert, CoreApiService, DOM, DefaultEditorOptions, DigitalMarketingService, EmailsApiService, FileSizePipe, FormValidationSummaryComponent, FormsHtmlEditorComponent, FroalaEditorModuleWithProviders, FroalaViewModuleWithProviders, GlobalErrorHandler, GoogleAnalyticsService, Guid, HtmlEditorComponent, IdleService, InjectorInstance, ItemValidationSummaryComponent, LoadingComponent, LoadingService, LocalStorageService, LocalizationInjectorInstance, LocalizationModule, LocalizationService, LocalizationSettingsModule, LocalizePipe, LoggingService, NativeElementDirective, NodataComponent, NotificationService, NotificationsApiService, PageSpinnerComponent, ReplaceTextPipe, SafeHtmlPipe, SessionStorageService, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, Subs, SubscribePlanButtonComponent, TimezoneDropdownlist, TranslateModuleAtRoot, UrlSlugComponent, Urls, Utils, ValidationSummaryComponent, customTranslateLoaderFactory, localizationInitializerFactory, throwIfAlreadyLoaded };
|
|
4431
4428
|
//# sourceMappingURL=osovitny-anatoly.mjs.map
|