@smartsoft001-mobilems/angular 2.11.0 → 2.13.0
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.
|
@@ -13,6 +13,7 @@ import { TranslateService } from '@ngx-translate/core';
|
|
|
13
13
|
import { CrudService, CrudFacade } from '@smartsoft001/crud-shell-angular';
|
|
14
14
|
import * as _ from 'lodash';
|
|
15
15
|
import { Debounce } from 'lodash-decorators';
|
|
16
|
+
import { ConfigPageType } from '@smartsoft001-mobilems/models';
|
|
16
17
|
|
|
17
18
|
function setTranslationsAndLang(service) {
|
|
18
19
|
const map = {
|
|
@@ -1331,6 +1332,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImpor
|
|
|
1331
1332
|
args: ['window:scroll', []]
|
|
1332
1333
|
}] } });
|
|
1333
1334
|
|
|
1335
|
+
class FooterComponent {
|
|
1336
|
+
constructor() {
|
|
1337
|
+
this.configsFacade = inject(ConfigsFacade);
|
|
1338
|
+
this.config = computed(() => this.configsFacade.data, ...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
1339
|
+
this.currentYear = computed(() => new Date().getFullYear(), ...(ngDevMode ? [{ debugName: "currentYear" }] : []));
|
|
1340
|
+
this.staticPages = computed(() => {
|
|
1341
|
+
const config = this.config();
|
|
1342
|
+
if (!config?.theme?.footer?.menu)
|
|
1343
|
+
return [];
|
|
1344
|
+
return config.theme.footer.menu.filter((item) => item.type === ConfigPageType.static);
|
|
1345
|
+
}, ...(ngDevMode ? [{ debugName: "staticPages" }] : []));
|
|
1346
|
+
this.hasStaticPages = computed(() => this.staticPages().length > 0, ...(ngDevMode ? [{ debugName: "hasStaticPages" }] : []));
|
|
1347
|
+
this.menuItems = computed(() => {
|
|
1348
|
+
const config = this.config();
|
|
1349
|
+
return config?.theme?.footer?.menu ?? [];
|
|
1350
|
+
}, ...(ngDevMode ? [{ debugName: "menuItems" }] : []));
|
|
1351
|
+
this.hasMenuItems = computed(() => this.menuItems().length > 0, ...(ngDevMode ? [{ debugName: "hasMenuItems" }] : []));
|
|
1352
|
+
}
|
|
1353
|
+
getStaticPageById(id) {
|
|
1354
|
+
return this.staticPages().find((page) => page.page.id === id);
|
|
1355
|
+
}
|
|
1356
|
+
getStaticPageTitle(id) {
|
|
1357
|
+
return this.getStaticPageById(id)?.page.title;
|
|
1358
|
+
}
|
|
1359
|
+
updateConfig(_config) {
|
|
1360
|
+
const current = this.config();
|
|
1361
|
+
if (!current)
|
|
1362
|
+
return;
|
|
1363
|
+
}
|
|
1364
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: FooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1365
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.0", type: FooterComponent, isStandalone: true, selector: "smart-mobilems-footer", ngImport: i0, template: ``, isInline: true }); }
|
|
1366
|
+
}
|
|
1367
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: FooterComponent, decorators: [{
|
|
1368
|
+
type: Component,
|
|
1369
|
+
args: [{ selector: 'smart-mobilems-footer', standalone: true, imports: [], template: `` }]
|
|
1370
|
+
}] });
|
|
1371
|
+
|
|
1334
1372
|
const COMPONENTS = [AppComponent];
|
|
1335
1373
|
|
|
1336
1374
|
/**
|
|
@@ -1556,9 +1594,29 @@ var GameType;
|
|
|
1556
1594
|
class ImageBox {
|
|
1557
1595
|
}
|
|
1558
1596
|
|
|
1597
|
+
const authenticationGuard = () => {
|
|
1598
|
+
const router = inject(Router);
|
|
1599
|
+
const authStorageService = inject(AuthStorageService);
|
|
1600
|
+
if (authStorageService.hasUser()) {
|
|
1601
|
+
return true;
|
|
1602
|
+
}
|
|
1603
|
+
router.navigate(['/logowanie']);
|
|
1604
|
+
return false;
|
|
1605
|
+
};
|
|
1606
|
+
|
|
1607
|
+
const unauthorizedGuard = () => {
|
|
1608
|
+
const router = inject(Router);
|
|
1609
|
+
const authStorageService = inject(AuthStorageService);
|
|
1610
|
+
if (!authStorageService.hasUser()) {
|
|
1611
|
+
return true;
|
|
1612
|
+
}
|
|
1613
|
+
router.navigate(['/strona-glowna']);
|
|
1614
|
+
return false;
|
|
1615
|
+
};
|
|
1616
|
+
|
|
1559
1617
|
/**
|
|
1560
1618
|
* Generated bundle index. Do not edit.
|
|
1561
1619
|
*/
|
|
1562
1620
|
|
|
1563
|
-
export { AppComponent, AuthStorageService, COMPONENTS, ConfigsFacade, ConfigsService, ContrastService, CrudBaseService, DIRECTIVES, DictionaryService, FileUrlService, FiltersBaseComponent, FiltersContext, GameType, GlobalService, HoverDirective, ImageBox, ListMode, MetaService, PageComponent, SERVICES, ScrollTopComponent, ScrollableDirective, SeoService, SettingsService, SharedConfig, SharedModule, StyleService, TRANSLATE_DATA_PL, TranslationService, WcagService, environment, setTranslationsAndLang };
|
|
1621
|
+
export { AppComponent, AuthStorageService, COMPONENTS, ConfigsFacade, ConfigsService, ContrastService, CrudBaseService, DIRECTIVES, DictionaryService, FileUrlService, FiltersBaseComponent, FiltersContext, FooterComponent, GameType, GlobalService, HoverDirective, ImageBox, ListMode, MetaService, PageComponent, SERVICES, ScrollTopComponent, ScrollableDirective, SeoService, SettingsService, SharedConfig, SharedModule, StyleService, TRANSLATE_DATA_PL, TranslationService, WcagService, authenticationGuard, environment, setTranslationsAndLang, unauthorizedGuard };
|
|
1564
1622
|
//# sourceMappingURL=smartsoft001-mobilems-angular.mjs.map
|