@sneat/space-components 0.27.19 → 0.27.20

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.
@@ -18,6 +18,8 @@ export class SpaceMenuComponent extends SpaceBaseComponent {
18
18
  ...(ngDevMode ? [{ debugName: "$disabled" }] : /* istanbul ignore next */ []));
19
19
  this.$currentPage = signal('', /* @ts-ignore */
20
20
  ...(ngDevMode ? [{ debugName: "$currentPage" }] : /* istanbul ignore next */ []));
21
+ this.$showSSO = computed(() => this.$space()?.type === 'company', /* @ts-ignore */
22
+ ...(ngDevMode ? [{ debugName: "$showSSO" }] : /* istanbul ignore next */ []));
21
23
  this.activatedRoute = inject(ActivatedRoute);
22
24
  this.menuCtrl = inject(MenuController);
23
25
  router.events
@@ -57,13 +59,13 @@ export class SpaceMenuComponent extends SpaceBaseComponent {
57
59
  this.menuCtrl.close().catch(this.errorLogger.logError);
58
60
  }
59
61
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SpaceMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
60
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.3", type: SpaceMenuComponent, isStandalone: true, selector: "sneat-space-menu", providers: [
62
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: SpaceMenuComponent, isStandalone: true, selector: "sneat-space-menu", providers: [
61
63
  {
62
64
  provide: ClassName,
63
65
  useValue: 'SpaceMenuComponent',
64
66
  },
65
67
  SpaceComponentBaseParams,
66
- ], usesInheritance: true, ngImport: i0, template: "<ion-list>\n <ion-item class=\"sneat-pane-header\">\n <!--\t\t<ion-icon [name]=\"space.type === 'family' ? 'people-outline' : space.type === 'private' ? 'person-circle-outline' : 'people-outline' \" slot=\"end\" />-->\n <sneat-space-selector\n [closeMenuOnSelection]=\"true\"\n justify=\"space-between\"\n />\n <!--\t\t@if (!spaces) {-->\n <!--\t\t\t<ion-spinner name=\"lines\" slot=\"end\"></ion-spinner>-->\n <!--\t\t}-->\n </ion-item>\n <ion-item\n tappable\n [routerLink]=\"spacePageUrl('overview')\"\n [disabled]=\"$disabled()\"\n [class.currentPage]=\"$currentPage() === ''\"\n (click)=\"goOverview()\"\n >\n <ion-icon name=\"home-outline\" slot=\"start\" />\n <ion-label>Overview</ion-label>\n </ion-item>\n <ion-item\n tappable\n [routerLink]=\"spacePageUrl('members')\"\n routerDirection=\"root\"\n [disabled]=\"$disabled()\"\n [class.currentPage]=\"$currentPage() === 'members'\"\n (click)=\"closeMenu()\"\n >\n <ion-icon name=\"people-circle-outline\" slot=\"start\" />\n <ion-label>Members</ion-label>\n </ion-item>\n <ion-item\n tappable\n lines=\"none\"\n class=\"sneat-no-bottom-border\"\n [routerLink]=\"spacePageUrl('calendar')\"\n routerDirection=\"root\"\n [disabled]=\"$disabled()\"\n [class.currentPage]=\"$currentPage() === 'calendar'\"\n (click)=\"closeMenu()\"\n >\n <ion-icon name=\"calendar-outline\" slot=\"start\" />\n <ion-label>Calendar</ion-label>\n </ion-item>\n <ion-item-divider color=\"header\">\n <ion-label color=\"medium\">Extensions</ion-label>\n </ion-item-divider>\n <sneat-space-extension-links\n [$space]=\"$space()\"\n [$presentation]=\"'menu'\"\n [$currentPage]=\"$currentPage()\"\n [$disabled]=\"$disabled()\"\n (linkSelected)=\"closeMenu()\"\n />\n <sneat-auth-menu-item />\n</ion-list>\n", styles: [".currentPage ion-label{font-weight:700}\n"], dependencies: [{ kind: "component", type: AuthMenuItemComponent, selector: "sneat-auth-menu-item" }, { kind: "ngmodule", type: SpaceServiceModule }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonItemDivider, selector: "ion-item-divider", inputs: ["color", "mode", "sticky"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: SpaceExtensionLinksComponent, selector: "sneat-space-extension-links", inputs: ["$space", "$items", "$presentation", "$currentPage", "$disabled"], outputs: ["linkSelected"] }, { kind: "component", type: SpaceSelectorComponent, selector: "sneat-space-selector", inputs: ["closeMenuOnSelection", "justify", "navigateOnSelection"], outputs: ["spaceSelected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
68
+ ], usesInheritance: true, ngImport: i0, template: "<ion-list>\n <ion-item class=\"sneat-pane-header\">\n <!--\t\t<ion-icon [name]=\"space.type === 'family' ? 'people-outline' : space.type === 'private' ? 'person-circle-outline' : 'people-outline' \" slot=\"end\" />-->\n <sneat-space-selector\n [closeMenuOnSelection]=\"true\"\n justify=\"space-between\"\n />\n <!--\t\t@if (!spaces) {-->\n <!--\t\t\t<ion-spinner name=\"lines\" slot=\"end\"></ion-spinner>-->\n <!--\t\t}-->\n </ion-item>\n <ion-item\n tappable\n [routerLink]=\"spacePageUrl('overview')\"\n [disabled]=\"$disabled()\"\n [class.currentPage]=\"$currentPage() === ''\"\n (click)=\"goOverview()\"\n >\n <ion-icon name=\"home-outline\" slot=\"start\" />\n <ion-label>Overview</ion-label>\n </ion-item>\n <ion-item\n tappable\n [routerLink]=\"spacePageUrl('members')\"\n routerDirection=\"root\"\n [disabled]=\"$disabled()\"\n [class.currentPage]=\"$currentPage() === 'members'\"\n (click)=\"closeMenu()\"\n >\n <ion-icon name=\"people-circle-outline\" slot=\"start\" />\n <ion-label>Members</ion-label>\n </ion-item>\n @if ($showSSO()) {\n <ion-item\n tappable\n [routerLink]=\"spacePageUrl('settings/sso')\"\n routerDirection=\"root\"\n [disabled]=\"$disabled()\"\n [class.currentPage]=\"$currentPage() === 'settings'\"\n (click)=\"closeMenu()\"\n >\n <ion-icon name=\"key-outline\" slot=\"start\" />\n <ion-label>Enterprise SSO</ion-label>\n </ion-item>\n }\n <ion-item\n tappable\n lines=\"none\"\n class=\"sneat-no-bottom-border\"\n [routerLink]=\"spacePageUrl('calendar')\"\n routerDirection=\"root\"\n [disabled]=\"$disabled()\"\n [class.currentPage]=\"$currentPage() === 'calendar'\"\n (click)=\"closeMenu()\"\n >\n <ion-icon name=\"calendar-outline\" slot=\"start\" />\n <ion-label>Calendar</ion-label>\n </ion-item>\n <ion-item-divider color=\"header\">\n <ion-label color=\"medium\">Extensions</ion-label>\n </ion-item-divider>\n <sneat-space-extension-links\n [$space]=\"$space()\"\n [$presentation]=\"'menu'\"\n [$currentPage]=\"$currentPage()\"\n [$disabled]=\"$disabled()\"\n (linkSelected)=\"closeMenu()\"\n />\n <sneat-auth-menu-item />\n</ion-list>\n", styles: [".currentPage ion-label{font-weight:700}\n"], dependencies: [{ kind: "component", type: AuthMenuItemComponent, selector: "sneat-auth-menu-item" }, { kind: "ngmodule", type: SpaceServiceModule }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonItemDivider, selector: "ion-item-divider", inputs: ["color", "mode", "sticky"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: SpaceExtensionLinksComponent, selector: "sneat-space-extension-links", inputs: ["$space", "$items", "$presentation", "$currentPage", "$disabled"], outputs: ["linkSelected"] }, { kind: "component", type: SpaceSelectorComponent, selector: "sneat-space-selector", inputs: ["closeMenuOnSelection", "justify", "navigateOnSelection"], outputs: ["spaceSelected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
67
69
  }
68
70
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SpaceMenuComponent, decorators: [{
69
71
  type: Component,
@@ -84,6 +86,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
84
86
  useValue: 'SpaceMenuComponent',
85
87
  },
86
88
  SpaceComponentBaseParams,
87
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ion-list>\n <ion-item class=\"sneat-pane-header\">\n <!--\t\t<ion-icon [name]=\"space.type === 'family' ? 'people-outline' : space.type === 'private' ? 'person-circle-outline' : 'people-outline' \" slot=\"end\" />-->\n <sneat-space-selector\n [closeMenuOnSelection]=\"true\"\n justify=\"space-between\"\n />\n <!--\t\t@if (!spaces) {-->\n <!--\t\t\t<ion-spinner name=\"lines\" slot=\"end\"></ion-spinner>-->\n <!--\t\t}-->\n </ion-item>\n <ion-item\n tappable\n [routerLink]=\"spacePageUrl('overview')\"\n [disabled]=\"$disabled()\"\n [class.currentPage]=\"$currentPage() === ''\"\n (click)=\"goOverview()\"\n >\n <ion-icon name=\"home-outline\" slot=\"start\" />\n <ion-label>Overview</ion-label>\n </ion-item>\n <ion-item\n tappable\n [routerLink]=\"spacePageUrl('members')\"\n routerDirection=\"root\"\n [disabled]=\"$disabled()\"\n [class.currentPage]=\"$currentPage() === 'members'\"\n (click)=\"closeMenu()\"\n >\n <ion-icon name=\"people-circle-outline\" slot=\"start\" />\n <ion-label>Members</ion-label>\n </ion-item>\n <ion-item\n tappable\n lines=\"none\"\n class=\"sneat-no-bottom-border\"\n [routerLink]=\"spacePageUrl('calendar')\"\n routerDirection=\"root\"\n [disabled]=\"$disabled()\"\n [class.currentPage]=\"$currentPage() === 'calendar'\"\n (click)=\"closeMenu()\"\n >\n <ion-icon name=\"calendar-outline\" slot=\"start\" />\n <ion-label>Calendar</ion-label>\n </ion-item>\n <ion-item-divider color=\"header\">\n <ion-label color=\"medium\">Extensions</ion-label>\n </ion-item-divider>\n <sneat-space-extension-links\n [$space]=\"$space()\"\n [$presentation]=\"'menu'\"\n [$currentPage]=\"$currentPage()\"\n [$disabled]=\"$disabled()\"\n (linkSelected)=\"closeMenu()\"\n />\n <sneat-auth-menu-item />\n</ion-list>\n", styles: [".currentPage ion-label{font-weight:700}\n"] }]
89
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ion-list>\n <ion-item class=\"sneat-pane-header\">\n <!--\t\t<ion-icon [name]=\"space.type === 'family' ? 'people-outline' : space.type === 'private' ? 'person-circle-outline' : 'people-outline' \" slot=\"end\" />-->\n <sneat-space-selector\n [closeMenuOnSelection]=\"true\"\n justify=\"space-between\"\n />\n <!--\t\t@if (!spaces) {-->\n <!--\t\t\t<ion-spinner name=\"lines\" slot=\"end\"></ion-spinner>-->\n <!--\t\t}-->\n </ion-item>\n <ion-item\n tappable\n [routerLink]=\"spacePageUrl('overview')\"\n [disabled]=\"$disabled()\"\n [class.currentPage]=\"$currentPage() === ''\"\n (click)=\"goOverview()\"\n >\n <ion-icon name=\"home-outline\" slot=\"start\" />\n <ion-label>Overview</ion-label>\n </ion-item>\n <ion-item\n tappable\n [routerLink]=\"spacePageUrl('members')\"\n routerDirection=\"root\"\n [disabled]=\"$disabled()\"\n [class.currentPage]=\"$currentPage() === 'members'\"\n (click)=\"closeMenu()\"\n >\n <ion-icon name=\"people-circle-outline\" slot=\"start\" />\n <ion-label>Members</ion-label>\n </ion-item>\n @if ($showSSO()) {\n <ion-item\n tappable\n [routerLink]=\"spacePageUrl('settings/sso')\"\n routerDirection=\"root\"\n [disabled]=\"$disabled()\"\n [class.currentPage]=\"$currentPage() === 'settings'\"\n (click)=\"closeMenu()\"\n >\n <ion-icon name=\"key-outline\" slot=\"start\" />\n <ion-label>Enterprise SSO</ion-label>\n </ion-item>\n }\n <ion-item\n tappable\n lines=\"none\"\n class=\"sneat-no-bottom-border\"\n [routerLink]=\"spacePageUrl('calendar')\"\n routerDirection=\"root\"\n [disabled]=\"$disabled()\"\n [class.currentPage]=\"$currentPage() === 'calendar'\"\n (click)=\"closeMenu()\"\n >\n <ion-icon name=\"calendar-outline\" slot=\"start\" />\n <ion-label>Calendar</ion-label>\n </ion-item>\n <ion-item-divider color=\"header\">\n <ion-label color=\"medium\">Extensions</ion-label>\n </ion-item-divider>\n <sneat-space-extension-links\n [$space]=\"$space()\"\n [$presentation]=\"'menu'\"\n [$currentPage]=\"$currentPage()\"\n [$disabled]=\"$disabled()\"\n (linkSelected)=\"closeMenu()\"\n />\n <sneat-auth-menu-item />\n</ion-list>\n", styles: [".currentPage ion-label{font-weight:700}\n"] }]
88
90
  }], ctorParameters: () => [] });
89
91
  //# sourceMappingURL=space-menu.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"space-menu.component.js","sourceRoot":"","sources":["../../../../../../../libs/space/components/src/lib/space-menu/space-menu.component.ts","../../../../../../../libs/space/components/src/lib/space-menu/space-menu.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,cAAc,EACd,aAAa,EACb,MAAM,EACN,UAAU,GACX,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,OAAO,EACP,OAAO,EACP,cAAc,EACd,QAAQ,EACR,OAAO,EACP,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,g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kB;kBAzB9B,SAAS;+BACE,kBAAkB,WAGnB;wBACP,qBAAqB;wBACrB,kBAAkB;wBAClB,UAAU;wBACV,OAAO;wBACP,OAAO;wBACP,cAAc;wBACd,OAAO;wBACP,QAAQ;wBACR,4BAA4B;wBAC5B,sBAAsB;qBACvB,aACU;wBACT;4BACE,OAAO,EAAE,SAAS;4BAClB,QAAQ,EAAE,oBAAoB;yBAC/B;wBACD,wBAAwB;qBACzB,mBACgB,uBAAuB,CAAC,MAAM","sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n signal,\n} from '@angular/core';\nimport {\n ActivatedRoute,\n NavigationEnd,\n Router,\n RouterLink,\n} from '@angular/router';\nimport {\n IonIcon,\n IonItem,\n IonItemDivider,\n IonLabel,\n IonList,\n MenuController,\n} from '@ionic/angular';\nimport { AuthMenuItemComponent } from '@sneat/auth-ui';\nimport { SpaceServiceModule } from '@sneat/space-services';\nimport { filter } from 'rxjs';\nimport { SpaceBaseComponent } from '../space-base-component.directive';\nimport { SpaceComponentBaseParams } from '../space-component-base-params.service';\nimport { ClassName } from '@sneat/ui';\nimport { SpaceExtensionLinksComponent } from '../space-extension-links';\nimport { SpaceSelectorComponent } from '../space-selector';\n\n@Component({\n selector: 'sneat-space-menu',\n templateUrl: './space-menu.component.html',\n styles: '.currentPage ion-label {font-weight: bold}',\n imports: [\n AuthMenuItemComponent,\n SpaceServiceModule,\n RouterLink,\n IonList,\n IonItem,\n IonItemDivider,\n IonIcon,\n IonLabel,\n SpaceExtensionLinksComponent,\n SpaceSelectorComponent,\n ],\n providers: [\n {\n provide: ClassName,\n useValue: 'SpaceMenuComponent',\n },\n SpaceComponentBaseParams,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SpaceMenuComponent extends SpaceBaseComponent {\n protected readonly $disabled = computed(\n () => !this.$spaceID() || this.$spaceNotFound(),\n );\n\n protected readonly $currentPage = signal<string>('');\n\n private readonly activatedRoute = inject(ActivatedRoute);\n private readonly menuCtrl = inject(MenuController);\n\n constructor() {\n const router = inject(Router);\n\n super();\n router.events\n .pipe(\n this.takeUntilDestroyed(),\n filter((event) => event instanceof NavigationEnd),\n )\n .subscribe((event: NavigationEnd) => {\n let route = this.activatedRoute.firstChild;\n while (route?.firstChild) {\n route = route.firstChild;\n }\n const url = event.urlAfterRedirects.split('/');\n this.$currentPage.set(url.length > 4 ? url[4] : '');\n });\n }\n\n // TODO: Should we use goSpacePage('') instead?\n protected goOverview(): boolean {\n const space = this.$space();\n if (!space) {\n this.errorLogger.logError('no space context');\n return false;\n }\n this.spaceParams.spaceNavService.navigateToSpace(space).then((v) => {\n if (v) {\n this.closeMenu();\n }\n });\n return false;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected goSpacePage(event: Event, _p: string): boolean {\n // At the moment we use routerLink for navigation\n event.stopPropagation();\n // event.preventDefault();\n this.closeMenu();\n return false;\n }\n\n protected closeMenu(): void {\n this.menuCtrl.close().catch(this.errorLogger.logError);\n }\n\n}\n","<ion-list>\n <ion-item class=\"sneat-pane-header\">\n <!--\t\t<ion-icon [name]=\"space.type === 'family' ? 'people-outline' : space.type === 'private' ? 'person-circle-outline' : 'people-outline' \" slot=\"end\" />-->\n <sneat-space-selector\n [closeMenuOnSelection]=\"true\"\n justify=\"space-between\"\n />\n <!--\t\t@if (!spaces) {-->\n <!--\t\t\t<ion-spinner name=\"lines\" slot=\"end\"></ion-spinner>-->\n <!--\t\t}-->\n </ion-item>\n <ion-item\n tappable\n [routerLink]=\"spacePageUrl('overview')\"\n [disabled]=\"$disabled()\"\n [class.currentPage]=\"$currentPage() === ''\"\n (click)=\"goOverview()\"\n >\n <ion-icon name=\"home-outline\" slot=\"start\" />\n <ion-label>Overview</ion-label>\n </ion-item>\n <ion-item\n tappable\n [routerLink]=\"spacePageUrl('members')\"\n routerDirection=\"root\"\n [disabled]=\"$disabled()\"\n [class.currentPage]=\"$currentPage() === 'members'\"\n (click)=\"closeMenu()\"\n >\n <ion-icon name=\"people-circle-outline\" slot=\"start\" />\n <ion-label>Members</ion-label>\n </ion-item>\n <ion-item\n tappable\n lines=\"none\"\n class=\"sneat-no-bottom-border\"\n [routerLink]=\"spacePageUrl('calendar')\"\n routerDirection=\"root\"\n [disabled]=\"$disabled()\"\n [class.currentPage]=\"$currentPage() === 'calendar'\"\n (click)=\"closeMenu()\"\n >\n <ion-icon name=\"calendar-outline\" slot=\"start\" />\n <ion-label>Calendar</ion-label>\n </ion-item>\n <ion-item-divider color=\"header\">\n <ion-label color=\"medium\">Extensions</ion-label>\n </ion-item-divider>\n <sneat-space-extension-links\n [$space]=\"$space()\"\n [$presentation]=\"'menu'\"\n [$currentPage]=\"$currentPage()\"\n [$disabled]=\"$disabled()\"\n (linkSelected)=\"closeMenu()\"\n />\n <sneat-auth-menu-item />\n</ion-list>\n"]}
1
+ {"version":3,"file":"space-menu.component.js","sourceRoot":"","sources":["../../../../../../../libs/space/components/src/lib/space-menu/space-menu.component.ts","../../../../../../../libs/space/components/src/lib/space-menu/space-menu.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,cAAc,EACd,aAAa,EACb,MAAM,EACN,UAAU,GACX,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,OAAO,EACP,OAAO,EACP,cAAc,EACd,QAAQ,EACR,OAAO,EACP,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,SAAS,EAA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AAQ;wBACR,4BAA4B;wBAC5B,sBAAsB;qBACvB,aACU;wBACT;4BACE,OAAO,EAAE,SAAS;4BAClB,QAAQ,EAAE,oBAAoB;yBAC/B;wBACD,wBAAwB;qBACzB,mBACgB,uBAAuB,CAAC,MAAM","sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n signal,\n} from '@angular/core';\nimport {\n ActivatedRoute,\n NavigationEnd,\n Router,\n RouterLink,\n} from '@angular/router';\nimport {\n IonIcon,\n IonItem,\n IonItemDivider,\n IonLabel,\n IonList,\n MenuController,\n} from '@ionic/angular';\nimport { AuthMenuItemComponent } from '@sneat/auth-ui';\nimport { SpaceServiceModule } from '@sneat/space-services';\nimport { filter } from 'rxjs';\nimport { SpaceBaseComponent } from '../space-base-component.directive';\nimport { SpaceComponentBaseParams } from '../space-component-base-params.service';\nimport { ClassName } from '@sneat/ui';\nimport { SpaceExtensionLinksComponent } from '../space-extension-links';\nimport { SpaceSelectorComponent } from '../space-selector';\n\n@Component({\n selector: 'sneat-space-menu',\n templateUrl: './space-menu.component.html',\n styles: '.currentPage ion-label {font-weight: bold}',\n imports: [\n AuthMenuItemComponent,\n SpaceServiceModule,\n RouterLink,\n IonList,\n IonItem,\n IonItemDivider,\n IonIcon,\n IonLabel,\n SpaceExtensionLinksComponent,\n SpaceSelectorComponent,\n ],\n providers: [\n {\n provide: ClassName,\n useValue: 'SpaceMenuComponent',\n },\n SpaceComponentBaseParams,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SpaceMenuComponent extends SpaceBaseComponent {\n protected readonly $disabled = computed(\n () => !this.$spaceID() || this.$spaceNotFound(),\n );\n\n protected readonly $currentPage = signal<string>('');\n protected readonly $showSSO = computed(\n () => this.$space()?.type === 'company',\n );\n\n private readonly activatedRoute = inject(ActivatedRoute);\n private readonly menuCtrl = inject(MenuController);\n\n constructor() {\n const router = inject(Router);\n\n super();\n router.events\n .pipe(\n this.takeUntilDestroyed(),\n filter((event) => event instanceof NavigationEnd),\n )\n .subscribe((event: NavigationEnd) => {\n let route = this.activatedRoute.firstChild;\n while (route?.firstChild) {\n route = route.firstChild;\n }\n const url = event.urlAfterRedirects.split('/');\n this.$currentPage.set(url.length > 4 ? url[4] : '');\n });\n }\n\n // TODO: Should we use goSpacePage('') instead?\n protected goOverview(): boolean {\n const space = this.$space();\n if (!space) {\n this.errorLogger.logError('no space context');\n return false;\n }\n this.spaceParams.spaceNavService.navigateToSpace(space).then((v) => {\n if (v) {\n this.closeMenu();\n }\n });\n return false;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected goSpacePage(event: Event, _p: string): boolean {\n // At the moment we use routerLink for navigation\n event.stopPropagation();\n // event.preventDefault();\n this.closeMenu();\n return false;\n }\n\n protected closeMenu(): void {\n this.menuCtrl.close().catch(this.errorLogger.logError);\n }\n}\n","<ion-list>\n <ion-item class=\"sneat-pane-header\">\n <!--\t\t<ion-icon [name]=\"space.type === 'family' ? 'people-outline' : space.type === 'private' ? 'person-circle-outline' : 'people-outline' \" slot=\"end\" />-->\n <sneat-space-selector\n [closeMenuOnSelection]=\"true\"\n justify=\"space-between\"\n />\n <!--\t\t@if (!spaces) {-->\n <!--\t\t\t<ion-spinner name=\"lines\" slot=\"end\"></ion-spinner>-->\n <!--\t\t}-->\n </ion-item>\n <ion-item\n tappable\n [routerLink]=\"spacePageUrl('overview')\"\n [disabled]=\"$disabled()\"\n [class.currentPage]=\"$currentPage() === ''\"\n (click)=\"goOverview()\"\n >\n <ion-icon name=\"home-outline\" slot=\"start\" />\n <ion-label>Overview</ion-label>\n </ion-item>\n <ion-item\n tappable\n [routerLink]=\"spacePageUrl('members')\"\n routerDirection=\"root\"\n [disabled]=\"$disabled()\"\n [class.currentPage]=\"$currentPage() === 'members'\"\n (click)=\"closeMenu()\"\n >\n <ion-icon name=\"people-circle-outline\" slot=\"start\" />\n <ion-label>Members</ion-label>\n </ion-item>\n @if ($showSSO()) {\n <ion-item\n tappable\n [routerLink]=\"spacePageUrl('settings/sso')\"\n routerDirection=\"root\"\n [disabled]=\"$disabled()\"\n [class.currentPage]=\"$currentPage() === 'settings'\"\n (click)=\"closeMenu()\"\n >\n <ion-icon name=\"key-outline\" slot=\"start\" />\n <ion-label>Enterprise SSO</ion-label>\n </ion-item>\n }\n <ion-item\n tappable\n lines=\"none\"\n class=\"sneat-no-bottom-border\"\n [routerLink]=\"spacePageUrl('calendar')\"\n routerDirection=\"root\"\n [disabled]=\"$disabled()\"\n [class.currentPage]=\"$currentPage() === 'calendar'\"\n (click)=\"closeMenu()\"\n >\n <ion-icon name=\"calendar-outline\" slot=\"start\" />\n <ion-label>Calendar</ion-label>\n </ion-item>\n <ion-item-divider color=\"header\">\n <ion-label color=\"medium\">Extensions</ion-label>\n </ion-item-divider>\n <sneat-space-extension-links\n [$space]=\"$space()\"\n [$presentation]=\"'menu'\"\n [$currentPage]=\"$currentPage()\"\n [$disabled]=\"$disabled()\"\n (linkSelected)=\"closeMenu()\"\n />\n <sneat-auth-menu-item />\n</ion-list>\n"]}
@@ -3,6 +3,7 @@ import * as i0 from "@angular/core";
3
3
  export declare class SpaceMenuComponent extends SpaceBaseComponent {
4
4
  protected readonly $disabled: import("@angular/core").Signal<boolean>;
5
5
  protected readonly $currentPage: import("@angular/core").WritableSignal<string>;
6
+ protected readonly $showSSO: import("@angular/core").Signal<boolean>;
6
7
  private readonly activatedRoute;
7
8
  private readonly menuCtrl;
8
9
  constructor();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sneat/space-components",
3
- "version": "0.27.19",
3
+ "version": "0.27.20",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },