@cuby-ui/core 0.0.410 → 0.0.413
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/esm2022/widgets/user-action-context-menu/activity-item/activity-item.component.mjs +5 -6
- package/esm2022/widgets/user-action-context-menu/company-item/company-item.component.mjs +15 -7
- package/esm2022/widgets/user-action-context-menu/services/activity.service.mjs +7 -2
- package/esm2022/widgets/user-action-context-menu/user-action-context-menu.component.mjs +4 -5
- package/fesm2022/cuby-ui-core.mjs +26 -13
- package/fesm2022/cuby-ui-core.mjs.map +1 -1
- package/package.json +4 -4
- package/widgets/user-action-context-menu/company-item/company-item.component.d.ts +6 -3
- package/widgets/user-action-context-menu/services/activity.service.d.ts +1 -0
- package/widgets/user-action-context-menu/user-action-context-menu.component.d.ts +1 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Component, ChangeDetectionStrategy, inject, Renderer2, input, model, effect, Directive, InjectionToken, Input, HostBinding, ChangeDetectorRef, ViewChild, EventEmitter, Output, NgModule, Injector, Injectable, SkipSelf, Optional, DestroyRef, NgZone, signal, TemplateRef, ContentChildren, ElementRef, HostListener, Self, INJECTOR, forwardRef, ViewContainerRef, booleanAttribute, computed, untracked, Pipe, viewChild, output, APP_INITIALIZER, makeEnvironmentProviders } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule, DOCUMENT, NgForOf, NgIf, NgComponentOutlet, NgTemplateOutlet, NgFor, NgClass, Location, UpperCasePipe,
|
|
4
|
+
import { CommonModule, DOCUMENT, NgForOf, NgIf, NgComponentOutlet, NgTemplateOutlet, NgFor, NgClass, Location, UpperCasePipe, AsyncPipe } from '@angular/common';
|
|
5
5
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
6
6
|
import { cuiIsIcon, CUI_ICONS } from '@cuby-ui/icons';
|
|
7
7
|
import * as i1$1 from '@cuby-ui/cdk';
|
|
@@ -10167,11 +10167,16 @@ class CuiActivityImplService extends CuiActivityBaseService {
|
|
|
10167
10167
|
this.authData = this.cuiAuthService.getAccessTokenData();
|
|
10168
10168
|
this.currentActivityId = this.authData.employee_session?.activityId;
|
|
10169
10169
|
this.currentCompanyId = this.authData.employee_session?.companyId;
|
|
10170
|
+
this.isCheckActivity = signal(false);
|
|
10170
10171
|
}
|
|
10171
10172
|
checkIsCurrentActivity(activityId) {
|
|
10173
|
+
this.isCheckActivity.set(true);
|
|
10172
10174
|
return this.currentActivityId === activityId;
|
|
10173
10175
|
}
|
|
10174
10176
|
checkIsCurrentCompany(companyId) {
|
|
10177
|
+
if (this.isCheckActivity()) {
|
|
10178
|
+
return false;
|
|
10179
|
+
}
|
|
10175
10180
|
return this.currentCompanyId === companyId;
|
|
10176
10181
|
}
|
|
10177
10182
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityImplService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -10201,7 +10206,7 @@ class CuiActivityItemComponent {
|
|
|
10201
10206
|
this.isSelected = computed(() => this.cuiActivityService.checkIsCurrentActivity(this.activity().activityId));
|
|
10202
10207
|
this.letterBackgroundColor = computed(() => {
|
|
10203
10208
|
const licenseType = this.activity().type;
|
|
10204
|
-
return licenseType ===
|
|
10209
|
+
return licenseType === "MANUFACTURE" /* CuiUserCompanyActivityType.Manufacture */ ? 'var(--cui-orange-500)' : 'var(--cui-light-blue-500)';
|
|
10205
10210
|
});
|
|
10206
10211
|
this.activity = input.required();
|
|
10207
10212
|
this.companyId = input.required();
|
|
@@ -10230,13 +10235,13 @@ class CuiActivityItemComponent {
|
|
|
10230
10235
|
});
|
|
10231
10236
|
}
|
|
10232
10237
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10233
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: CuiActivityItemComponent, isStandalone: true, selector: "cui-activity-item", inputs: { activity: { classPropertyName: "activity", publicName: "activity", isSignal: true, isRequired: true, transformFunction: null }, companyId: { classPropertyName: "companyId", publicName: "companyId", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class.selected": "isSelected()" } }, ngImport: i0, template: "<div\n class=\"wrapper\"\n (click)=\"onGoToActivity()\"\n [cuiTooltip]=\"activity().description\"\n>\n <button\n type=\"button\"\n class=\"activity-button\"\n >\n <cui-letter-box\n [letter]=\"activity().description[0]\"\n [shape]=\"'rounded'\"\n [backgroundColor]=\"letterBackgroundColor()\"\n size=\"md\"\n />\n <div class=\"text\">\n <span class=\"title\"> {{ activity().description
|
|
10238
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: CuiActivityItemComponent, isStandalone: true, selector: "cui-activity-item", inputs: { activity: { classPropertyName: "activity", publicName: "activity", isSignal: true, isRequired: true, transformFunction: null }, companyId: { classPropertyName: "companyId", publicName: "companyId", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class.selected": "isSelected()" } }, ngImport: i0, template: "<div\n class=\"wrapper\"\n (click)=\"onGoToActivity()\"\n [cuiTooltip]=\"activity().description\"\n>\n <button\n type=\"button\"\n class=\"activity-button\"\n >\n <cui-letter-box\n [letter]=\"activity().description[0]\"\n [shape]=\"'rounded'\"\n [backgroundColor]=\"letterBackgroundColor()\"\n size=\"md\"\n />\n <div class=\"text\">\n <span class=\"title\"> {{ activity().description }}</span>\n <span class=\"sub-title\">{{ typeCompany() }}</span>\n </div>\n </button>\n\n @if (isSelected()) {\n <div class=\"icon-wrapper\">\n <cui-svg\n [icon]=\"'cuiIconCheck'\"\n color=\"var(--cui-info)\"\n />\n </div>\n }\n</div>\n", styles: [":host(.selected){background:var(--cui-badge-blue-bg);border-radius:8px}.wrapper{display:flex;justify-content:space-between}.activity-button{display:flex;gap:8px;align-items:center;padding-left:4px;height:36px;color:var(--cui-base-900)}.icon-wrapper{display:flex;align-items:center;justify-content:center;padding:8px}.text,.title{display:flex;flex-direction:column;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;align-items:flex-start}.sub-title{font-weight:400;font-size:12px;line-height:14px;color:var(--cui-base-400)}\n"], dependencies: [{ kind: "component", type: CuiLetterBoxComponent, selector: "cui-letter-box", inputs: ["letter", "backgroundColor", "size", "shape"] }, { kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "directive", type: CuiTooltipDirective, selector: "[cuiTooltip]:not(ng-container):not(ng-template)", inputs: ["cuiTooltipContext", "cuiTooltipAppearance", "cuiTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10234
10239
|
}
|
|
10235
10240
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityItemComponent, decorators: [{
|
|
10236
10241
|
type: Component,
|
|
10237
|
-
args: [{ selector: 'cui-activity-item', standalone: true, imports: [CuiLetterBoxComponent, CuiSvgModule, CuiTooltipDirective
|
|
10242
|
+
args: [{ selector: 'cui-activity-item', standalone: true, imports: [CuiLetterBoxComponent, CuiSvgModule, CuiTooltipDirective], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
10238
10243
|
'[class.selected]': 'isSelected()'
|
|
10239
|
-
}, template: "<div\n class=\"wrapper\"\n (click)=\"onGoToActivity()\"\n [cuiTooltip]=\"activity().description\"\n>\n <button\n type=\"button\"\n class=\"activity-button\"\n >\n <cui-letter-box\n [letter]=\"activity().description[0]\"\n [shape]=\"'rounded'\"\n [backgroundColor]=\"letterBackgroundColor()\"\n size=\"md\"\n />\n <div class=\"text\">\n <span class=\"title\"> {{ activity().description
|
|
10244
|
+
}, template: "<div\n class=\"wrapper\"\n (click)=\"onGoToActivity()\"\n [cuiTooltip]=\"activity().description\"\n>\n <button\n type=\"button\"\n class=\"activity-button\"\n >\n <cui-letter-box\n [letter]=\"activity().description[0]\"\n [shape]=\"'rounded'\"\n [backgroundColor]=\"letterBackgroundColor()\"\n size=\"md\"\n />\n <div class=\"text\">\n <span class=\"title\"> {{ activity().description }}</span>\n <span class=\"sub-title\">{{ typeCompany() }}</span>\n </div>\n </button>\n\n @if (isSelected()) {\n <div class=\"icon-wrapper\">\n <cui-svg\n [icon]=\"'cuiIconCheck'\"\n color=\"var(--cui-info)\"\n />\n </div>\n }\n</div>\n", styles: [":host(.selected){background:var(--cui-badge-blue-bg);border-radius:8px}.wrapper{display:flex;justify-content:space-between}.activity-button{display:flex;gap:8px;align-items:center;padding-left:4px;height:36px;color:var(--cui-base-900)}.icon-wrapper{display:flex;align-items:center;justify-content:center;padding:8px}.text,.title{display:flex;flex-direction:column;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;align-items:flex-start}.sub-title{font-weight:400;font-size:12px;line-height:14px;color:var(--cui-base-400)}\n"] }]
|
|
10240
10245
|
}] });
|
|
10241
10246
|
|
|
10242
10247
|
class CompanyItemComponent {
|
|
@@ -10244,9 +10249,18 @@ class CompanyItemComponent {
|
|
|
10244
10249
|
this.cuiWindow = inject(CUI_WINDOW);
|
|
10245
10250
|
this.cuiAuthService = inject(CuiAuthService);
|
|
10246
10251
|
this.cuiActivityCompanyService = inject(CUI_ACTIVITY_SERVICE_TOKEN);
|
|
10252
|
+
this.COMPANY = 'company';
|
|
10247
10253
|
this.isSelected = computed(() => this.cuiActivityCompanyService.checkIsCurrentCompany(this.company().companyId));
|
|
10254
|
+
this.urlCompanyTemplate = computed(() => {
|
|
10255
|
+
const origin = window.location.origin;
|
|
10256
|
+
const userBasePath = '/cuby-platform/user/works';
|
|
10257
|
+
const adminBasePath = '/cuby-platform/admin/companies/edit';
|
|
10258
|
+
return {
|
|
10259
|
+
userLink: `${origin}${userBasePath}/${this.COMPANY}/{id}/company-structure`,
|
|
10260
|
+
adminLink: `${origin}${adminBasePath}/{id}`
|
|
10261
|
+
};
|
|
10262
|
+
});
|
|
10248
10263
|
this.company = input.required();
|
|
10249
|
-
this.urlTemplatesForRedirectToCompany = input.required();
|
|
10250
10264
|
this.selected = input(false);
|
|
10251
10265
|
}
|
|
10252
10266
|
getRoles() {
|
|
@@ -10261,19 +10275,19 @@ class CompanyItemComponent {
|
|
|
10261
10275
|
if (this.isSelected()) {
|
|
10262
10276
|
return;
|
|
10263
10277
|
}
|
|
10264
|
-
const { adminLink, userLink } = this.
|
|
10278
|
+
const { adminLink, userLink } = this.urlCompanyTemplate();
|
|
10265
10279
|
const linkTemplate = this.checkIsAdmin() ? adminLink : userLink;
|
|
10266
10280
|
const finalUrl = linkTemplate.replace('{id}', this.company().companyId);
|
|
10267
10281
|
this.cuiWindow.open(finalUrl);
|
|
10268
10282
|
}
|
|
10269
10283
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CompanyItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10270
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: CompanyItemComponent, isStandalone: true, selector: "cui-company-item", inputs: { company: { classPropertyName: "company", publicName: "company", isSignal: true, isRequired: true, transformFunction: null },
|
|
10284
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: CompanyItemComponent, isStandalone: true, selector: "cui-company-item", inputs: { company: { classPropertyName: "company", publicName: "company", isSignal: true, isRequired: true, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.selected": "isSelected()" } }, ngImport: i0, template: "<div\n class=\"title-company\"\n (click)=\"onGoToCompany()\"\n [cuiTooltip]=\"company().name\"\n>\n <button\n type=\"button\"\n class=\"company-button\"\n >\n <cui-letter-box\n [letter]=\"company().name[0]\"\n [backgroundColor]=\"'var(--cui-orange-500)'\"\n size=\"md\"\n />\n <div class=\"text\">\n <span class=\"title\">{{ company().name }}</span>\n <span class=\"sub-title\">{{\"COMPANY\" | transloco}}</span>\n </div>\n </button>\n\n @if (isSelected()) {\n <div class=\"icon-wrapper\">\n <cui-svg\n [icon]=\"'cuiIconCheck'\"\n color=\"var(--cui-info)\"\n />\n </div>\n }\n</div>\n", styles: [":host(.selected){background:var(--cui-badge-blue-bg);border-radius:8px}.title-company{display:flex;justify-content:space-between}.title-company:hover{width:100%;border-radius:8px;background-color:var(--cui-badge-light-blue-bg)}.company-button{display:flex;gap:8px;align-items:center;padding-left:4px;height:36px;color:var(--cui-base-900)}.icon-wrapper{display:flex;align-items:center;justify-content:center;padding:8px}.title{display:flex;flex-direction:column;font-weight:500;font-size:14px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--cui-base-900);align-items:flex-start}.sub-title{font-weight:400;font-size:12px;line-height:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--cui-base-400)}.text{display:flex;flex-direction:column;align-items:flex-start}\n"], dependencies: [{ kind: "component", type: CuiLetterBoxComponent, selector: "cui-letter-box", inputs: ["letter", "backgroundColor", "size", "shape"] }, { kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }, { kind: "directive", type: CuiTooltipDirective, selector: "[cuiTooltip]:not(ng-container):not(ng-template)", inputs: ["cuiTooltipContext", "cuiTooltipAppearance", "cuiTooltip"] }] }); }
|
|
10271
10285
|
}
|
|
10272
10286
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CompanyItemComponent, decorators: [{
|
|
10273
10287
|
type: Component,
|
|
10274
|
-
args: [{ selector: 'cui-company-item', standalone: true, imports: [CuiLetterBoxComponent, CuiSvgModule, TranslocoPipe, CuiTooltip
|
|
10288
|
+
args: [{ selector: 'cui-company-item', standalone: true, imports: [CuiLetterBoxComponent, CuiSvgModule, TranslocoPipe, CuiTooltip], host: {
|
|
10275
10289
|
'[class.selected]': 'isSelected()'
|
|
10276
|
-
}, template: "<div\n class=\"title-company\"\n (click)=\"onGoToCompany()\"\n [cuiTooltip]=\"company().name\"\n>\n <button\n type=\"button\"\n class=\"company-button\"\n >\n <cui-letter-box\n [letter]=\"company().name[0]\"\n [backgroundColor]=\"'var(--cui-orange-500)'\"\n size=\"md\"\n />\n <div class=\"text\">\n <span class=\"title\">{{ company().name
|
|
10290
|
+
}, template: "<div\n class=\"title-company\"\n (click)=\"onGoToCompany()\"\n [cuiTooltip]=\"company().name\"\n>\n <button\n type=\"button\"\n class=\"company-button\"\n >\n <cui-letter-box\n [letter]=\"company().name[0]\"\n [backgroundColor]=\"'var(--cui-orange-500)'\"\n size=\"md\"\n />\n <div class=\"text\">\n <span class=\"title\">{{ company().name }}</span>\n <span class=\"sub-title\">{{\"COMPANY\" | transloco}}</span>\n </div>\n </button>\n\n @if (isSelected()) {\n <div class=\"icon-wrapper\">\n <cui-svg\n [icon]=\"'cuiIconCheck'\"\n color=\"var(--cui-info)\"\n />\n </div>\n }\n</div>\n", styles: [":host(.selected){background:var(--cui-badge-blue-bg);border-radius:8px}.title-company{display:flex;justify-content:space-between}.title-company:hover{width:100%;border-radius:8px;background-color:var(--cui-badge-light-blue-bg)}.company-button{display:flex;gap:8px;align-items:center;padding-left:4px;height:36px;color:var(--cui-base-900)}.icon-wrapper{display:flex;align-items:center;justify-content:center;padding:8px}.title{display:flex;flex-direction:column;font-weight:500;font-size:14px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--cui-base-900);align-items:flex-start}.sub-title{font-weight:400;font-size:12px;line-height:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--cui-base-400)}.text{display:flex;flex-direction:column;align-items:flex-start}\n"] }]
|
|
10277
10291
|
}] });
|
|
10278
10292
|
|
|
10279
10293
|
class CuiUserActionContextMenuComponent {
|
|
@@ -10291,7 +10305,6 @@ class CuiUserActionContextMenuComponent {
|
|
|
10291
10305
|
this.lang$ = this.translocoService.langChanges$;
|
|
10292
10306
|
this.isOpen = signal(false);
|
|
10293
10307
|
this.companies = this.cuiActivityService.companies;
|
|
10294
|
-
this.urlTemplatesForRedirectToCompany = input.required();
|
|
10295
10308
|
this.cuiActivityService.initActivityData();
|
|
10296
10309
|
}
|
|
10297
10310
|
onLogout() {
|
|
@@ -10314,7 +10327,7 @@ class CuiUserActionContextMenuComponent {
|
|
|
10314
10327
|
this.translocoService.setActiveLang(lang.label);
|
|
10315
10328
|
}
|
|
10316
10329
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiUserActionContextMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10317
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: CuiUserActionContextMenuComponent, isStandalone: true, selector: "cui-user-action-context-menu", inputs: { urlTemplatesForRedirectToCompany: { classPropertyName: "urlTemplatesForRedirectToCompany", publicName: "urlTemplatesForRedirectToCompany", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@let currentTheme = theme$ | async;\n@let currentLang = lang$ | async;\n\n<ng-container *transloco=\"let t\">\n <button\n type=\"button\"\n [cuiDropdown]=\"content\"\n class=\"select\"\n (isOpened)=\"onToggleOpenState($event)\"\n >\n <ng-content />\n </button>\n\n <ng-template #content>\n @if (isOpen()) {\n <cui-dropdown-wrapper\n width=\"300px\"\n maxHeight=\"500px\"\n >\n <div\n #dropdownContainer\n class=\"wrapper\"\n >\n <div class=\"block-name\">\n <div>\n <cui-letter-box\n [letter]=\"fullName[0]\"\n [shape]=\"'rounded'\"\n size=\"md\"\n />\n </div>\n <div>\n <ul class=\"title-text\">\n {{\n fullName\n }}\n </ul>\n <ul class=\"subtitle-text\">\n {{\n email\n }}\n </ul>\n </div>\n </div>\n <div\n class=\"wrapper-platform block-platform\"\n (click)=\"onGoToPlatform()\"\n >\n <cui-svg\n icon=\"cuiIconLogo\"\n color=\"var(--cui-base-900)\"\n />\n <div>{{ t('CUBY_PLATFORM') }}</div>\n </div>\n <div class=\"list-company\">\n @for (company of companies(); track company.id) {\n <cui-company-item\n [company]=\"company\"\n [urlTemplatesForRedirectToCompany]=\"urlTemplatesForRedirectToCompany()\"\n />\n\n <div class=\"list-activity\">\n @for (activity of company.contexts; track activity) {\n <cui-activity-item\n class=\"activity-item\"\n [activity]=\"activity\"\n [companyId]=\"company.companyId\"\n />\n } @empty {\n <div class=\"sub-title-text\">{{ t('YOU_DONT_HAVE_ACTIVITY_IN_THIS_COMPANY') }}</div>\n }\n </div>\n } @empty {\n <div class=\"sub-title-text\">{{ t('YOU_DONT_HAVE_COMPANY') }}</div>\n }\n </div>\n <div class=\"block-button\">\n <button type=\"button\">\n <div class=\"content-button\">\n <cui-svg icon=\"cuiIconPaletteSm\" />\n <div class=\"text-and-sub-button\">\n {{ t('SWITCH_THEME') }}\n <div class=\"group-sub-button\">\n <div\n [class.container-sub-button__select]=\"currentTheme === 'dark'\"\n class=\"container-sub-button\"\n >\n <cui-svg\n icon=\"cuiIconMoon\"\n color=\"var(--cui-base-500)\"\n (click)=\"onChangeTheme('dark')\"\n />\n </div>\n <div\n [class.container-sub-button__select]=\"currentTheme === 'light'\"\n class=\"container-sub-button\"\n >\n <cui-svg\n icon=\"cuiIconSun\"\n color=\"var(--cui-base-500)\"\n (click)=\"onChangeTheme('light')\"\n />\n </div>\n </div>\n </div>\n </div>\n </button>\n <button type=\"button\">\n <div class=\"content-button\">\n <cui-svg icon=\"cuiIconGlobeSm\" />\n <div class=\"text-and-sub-button\">\n {{ t('LANGUAGE') }}\n <div class=\"group-sub-button\">\n @for (lang of langs; track lang) {\n <div\n [class.container-sub-button__select]=\"currentLang === lang\"\n class=\"container-sub-button\"\n (click)=\"onChangeLang(lang)\"\n >\n {{ lang }}\n </div>\n }\n </div>\n </div>\n </div>\n </button>\n <button\n type=\"button\"\n (click)=\"onLogout()\"\n >\n <div class=\"content-button\">\n <cui-svg icon=\"cuiIconLogOutSm\" />\n <div class=\"text-and-sub-button\">{{ t('LOG_OUT') }}</div>\n </div>\n </button>\n </div>\n </div>\n </cui-dropdown-wrapper>\n }\n </ng-template>\n</ng-container>\n", styles: [".wrapper{padding:8px}.wrapper-platform{padding:8px 16px;margin-top:4px}.block-name{display:flex;gap:12px;align-items:center;padding-bottom:8px;border-bottom:solid 1px var(--cui-base-200);color:var(--cui-base-900)}.title-text{font-weight:500;font-size:14px;line-height:20px;color:var(--cui-base-900)}.subtitle-text{font-weight:400;font-size:12px;line-height:14px;color:var(--cui-base-900)}.list-company{display:flex;flex-direction:column;padding:8px;max-height:250px;overflow-y:auto}.list-activity{display:flex;flex-direction:column;gap:4px;padding-top:4px;padding-bottom:4px;border-bottom:solid 1px var(--cui-base-200);margin-bottom:4px}.block-button{display:flex;flex-direction:column;gap:8px;padding-top:8px;width:100%}.content-button{display:flex;gap:8px;align-items:center;padding-right:8px;padding-left:8px;height:36px;color:var(--cui-base-900)}.text-and-sub-button{display:flex;align-items:center;justify-content:space-between;width:100%}.container-sub-button{display:flex;align-items:center;justify-content:center;text-transform:capitalize;border:solid 1px var(--cui-base-200);border-radius:4px;width:28px;height:28px}.group-sub-button{display:flex;gap:4px}.container-sub-button__select{border:solid 1px var(--cui-badge-blue-border);background-color:var(--cui-badge-blue-bg)}.block-platform{display:flex;gap:8px;color:var(--cui-base-900);cursor:pointer}.block-platform:hover{background-color:var(--cui-badge-light-blue-bg);border-radius:8px}.sub-title-text{display:flex;align-items:center;justify-content:center;font-weight:400;font-size:12px;line-height:14px;color:var(--cui-base-900);text-align:center}.activity-item{border-radius:8px;cursor:pointer}.activity-item:hover{background-color:var(--cui-badge-light-blue-bg)}\n"], dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "directive", type: CuiDropdownDirective, selector: "[cuiDropdown]", inputs: ["cuiDropdown", "orientation"], outputs: ["isOpened"], exportAs: ["cuiDropdown"] }, { kind: "component", type: CuiDropdownWrapperComponent, selector: "cui-dropdown-wrapper", inputs: ["title", "width", "maxHeight"] }, { kind: "component", type: CuiLetterBoxComponent, selector: "cui-letter-box", inputs: ["letter", "backgroundColor", "size", "shape"] }, { kind: "ngmodule", type: CuiButtonModule }, { kind: "ngmodule", type: CuiContextMenuModule }, { kind: "component", type: CuiActivityItemComponent, selector: "cui-activity-item", inputs: ["activity", "companyId"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: CompanyItemComponent, selector: "cui-company-item", inputs: ["company", "urlTemplatesForRedirectToCompany", "selected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10330
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: CuiUserActionContextMenuComponent, isStandalone: true, selector: "cui-user-action-context-menu", ngImport: i0, template: "@let currentTheme = theme$ | async;\n@let currentLang = lang$ | async;\n\n<ng-container *transloco=\"let t\">\n <button\n type=\"button\"\n [cuiDropdown]=\"content\"\n class=\"select\"\n (isOpened)=\"onToggleOpenState($event)\"\n >\n <ng-content />\n </button>\n\n <ng-template #content>\n @if (isOpen()) {\n <cui-dropdown-wrapper\n width=\"300px\"\n maxHeight=\"500px\"\n >\n <div\n #dropdownContainer\n class=\"wrapper\"\n >\n <div class=\"block-name\">\n <div>\n <cui-letter-box\n [letter]=\"fullName[0]\"\n [shape]=\"'rounded'\"\n size=\"md\"\n />\n </div>\n <div>\n <ul class=\"title-text\">\n {{\n fullName\n }}\n </ul>\n <ul class=\"subtitle-text\">\n {{\n email\n }}\n </ul>\n </div>\n </div>\n <div\n class=\"wrapper-platform block-platform\"\n (click)=\"onGoToPlatform()\"\n >\n <cui-svg\n icon=\"cuiIconLogo\"\n color=\"var(--cui-base-900)\"\n />\n <div>{{ t('CUBY_PLATFORM') }}</div>\n </div>\n <div class=\"list-company\">\n @for (company of companies(); track company.id) {\n <cui-company-item\n [company]=\"company\"\n />\n\n <div class=\"list-activity\">\n @for (activity of company.contexts; track activity) {\n <cui-activity-item\n class=\"activity-item\"\n [activity]=\"activity\"\n [companyId]=\"company.companyId\"\n />\n } @empty {\n <div class=\"sub-title-text\">{{ t('YOU_DONT_HAVE_ACTIVITY_IN_THIS_COMPANY') }}</div>\n }\n </div>\n } @empty {\n <div class=\"sub-title-text\">{{ t('YOU_DONT_HAVE_COMPANY') }}</div>\n }\n </div>\n <div class=\"block-button\">\n <button type=\"button\">\n <div class=\"content-button\">\n <cui-svg icon=\"cuiIconPaletteSm\" />\n <div class=\"text-and-sub-button\">\n {{ t('SWITCH_THEME') }}\n <div class=\"group-sub-button\">\n <div\n [class.container-sub-button__select]=\"currentTheme === 'dark'\"\n class=\"container-sub-button\"\n >\n <cui-svg\n icon=\"cuiIconMoon\"\n color=\"var(--cui-base-500)\"\n (click)=\"onChangeTheme('dark')\"\n />\n </div>\n <div\n [class.container-sub-button__select]=\"currentTheme === 'light'\"\n class=\"container-sub-button\"\n >\n <cui-svg\n icon=\"cuiIconSun\"\n color=\"var(--cui-base-500)\"\n (click)=\"onChangeTheme('light')\"\n />\n </div>\n </div>\n </div>\n </div>\n </button>\n <button type=\"button\">\n <div class=\"content-button\">\n <cui-svg icon=\"cuiIconGlobeSm\" />\n <div class=\"text-and-sub-button\">\n {{ t('LANGUAGE') }}\n <div class=\"group-sub-button\">\n @for (lang of langs; track lang) {\n <div\n [class.container-sub-button__select]=\"currentLang === lang\"\n class=\"container-sub-button\"\n (click)=\"onChangeLang(lang)\"\n >\n {{ lang }}\n </div>\n }\n </div>\n </div>\n </div>\n </button>\n <button\n type=\"button\"\n (click)=\"onLogout()\"\n >\n <div class=\"content-button\">\n <cui-svg icon=\"cuiIconLogOutSm\" />\n <div class=\"text-and-sub-button\">{{ t('LOG_OUT') }}</div>\n </div>\n </button>\n </div>\n </div>\n </cui-dropdown-wrapper>\n }\n </ng-template>\n</ng-container>\n", styles: [".wrapper{padding:8px}.wrapper-platform{padding:8px 16px;margin-top:4px}.block-name{display:flex;gap:12px;align-items:center;padding-bottom:8px;border-bottom:solid 1px var(--cui-base-200);color:var(--cui-base-900)}.title-text{font-weight:500;font-size:14px;line-height:20px;color:var(--cui-base-900)}.subtitle-text{font-weight:400;font-size:12px;line-height:14px;color:var(--cui-base-900)}.list-company{display:flex;flex-direction:column;padding:8px;max-height:250px;overflow-y:auto}.list-activity{display:flex;flex-direction:column;gap:4px;padding-top:4px;padding-bottom:4px;border-bottom:solid 1px var(--cui-base-200);margin-bottom:4px}.block-button{display:flex;flex-direction:column;gap:8px;padding-top:8px;width:100%}.content-button{display:flex;gap:8px;align-items:center;padding-right:8px;padding-left:8px;height:36px;color:var(--cui-base-900)}.text-and-sub-button{display:flex;align-items:center;justify-content:space-between;width:100%}.container-sub-button{display:flex;align-items:center;justify-content:center;text-transform:capitalize;border:solid 1px var(--cui-base-200);border-radius:4px;width:28px;height:28px}.group-sub-button{display:flex;gap:4px}.container-sub-button__select{border:solid 1px var(--cui-badge-blue-border);background-color:var(--cui-badge-blue-bg)}.block-platform{display:flex;gap:8px;color:var(--cui-base-900);cursor:pointer}.block-platform:hover{background-color:var(--cui-badge-light-blue-bg);border-radius:8px}.sub-title-text{display:flex;align-items:center;justify-content:center;font-weight:400;font-size:12px;line-height:14px;color:var(--cui-base-900);text-align:center}.activity-item{border-radius:8px;cursor:pointer}.activity-item:hover{background-color:var(--cui-badge-light-blue-bg)}\n"], dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "directive", type: CuiDropdownDirective, selector: "[cuiDropdown]", inputs: ["cuiDropdown", "orientation"], outputs: ["isOpened"], exportAs: ["cuiDropdown"] }, { kind: "component", type: CuiDropdownWrapperComponent, selector: "cui-dropdown-wrapper", inputs: ["title", "width", "maxHeight"] }, { kind: "component", type: CuiLetterBoxComponent, selector: "cui-letter-box", inputs: ["letter", "backgroundColor", "size", "shape"] }, { kind: "ngmodule", type: CuiButtonModule }, { kind: "ngmodule", type: CuiContextMenuModule }, { kind: "component", type: CuiActivityItemComponent, selector: "cui-activity-item", inputs: ["activity", "companyId"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: CompanyItemComponent, selector: "cui-company-item", inputs: ["company", "selected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10318
10331
|
}
|
|
10319
10332
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiUserActionContextMenuComponent, decorators: [{
|
|
10320
10333
|
type: Component,
|
|
@@ -10330,7 +10343,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
10330
10343
|
AsyncPipe,
|
|
10331
10344
|
CompanyItemComponent,
|
|
10332
10345
|
CuiActivityItemComponent
|
|
10333
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let currentTheme = theme$ | async;\n@let currentLang = lang$ | async;\n\n<ng-container *transloco=\"let t\">\n <button\n type=\"button\"\n [cuiDropdown]=\"content\"\n class=\"select\"\n (isOpened)=\"onToggleOpenState($event)\"\n >\n <ng-content />\n </button>\n\n <ng-template #content>\n @if (isOpen()) {\n <cui-dropdown-wrapper\n width=\"300px\"\n maxHeight=\"500px\"\n >\n <div\n #dropdownContainer\n class=\"wrapper\"\n >\n <div class=\"block-name\">\n <div>\n <cui-letter-box\n [letter]=\"fullName[0]\"\n [shape]=\"'rounded'\"\n size=\"md\"\n />\n </div>\n <div>\n <ul class=\"title-text\">\n {{\n fullName\n }}\n </ul>\n <ul class=\"subtitle-text\">\n {{\n email\n }}\n </ul>\n </div>\n </div>\n <div\n class=\"wrapper-platform block-platform\"\n (click)=\"onGoToPlatform()\"\n >\n <cui-svg\n icon=\"cuiIconLogo\"\n color=\"var(--cui-base-900)\"\n />\n <div>{{ t('CUBY_PLATFORM') }}</div>\n </div>\n <div class=\"list-company\">\n @for (company of companies(); track company.id) {\n <cui-company-item\n [company]=\"company\"\n
|
|
10346
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let currentTheme = theme$ | async;\n@let currentLang = lang$ | async;\n\n<ng-container *transloco=\"let t\">\n <button\n type=\"button\"\n [cuiDropdown]=\"content\"\n class=\"select\"\n (isOpened)=\"onToggleOpenState($event)\"\n >\n <ng-content />\n </button>\n\n <ng-template #content>\n @if (isOpen()) {\n <cui-dropdown-wrapper\n width=\"300px\"\n maxHeight=\"500px\"\n >\n <div\n #dropdownContainer\n class=\"wrapper\"\n >\n <div class=\"block-name\">\n <div>\n <cui-letter-box\n [letter]=\"fullName[0]\"\n [shape]=\"'rounded'\"\n size=\"md\"\n />\n </div>\n <div>\n <ul class=\"title-text\">\n {{\n fullName\n }}\n </ul>\n <ul class=\"subtitle-text\">\n {{\n email\n }}\n </ul>\n </div>\n </div>\n <div\n class=\"wrapper-platform block-platform\"\n (click)=\"onGoToPlatform()\"\n >\n <cui-svg\n icon=\"cuiIconLogo\"\n color=\"var(--cui-base-900)\"\n />\n <div>{{ t('CUBY_PLATFORM') }}</div>\n </div>\n <div class=\"list-company\">\n @for (company of companies(); track company.id) {\n <cui-company-item\n [company]=\"company\"\n />\n\n <div class=\"list-activity\">\n @for (activity of company.contexts; track activity) {\n <cui-activity-item\n class=\"activity-item\"\n [activity]=\"activity\"\n [companyId]=\"company.companyId\"\n />\n } @empty {\n <div class=\"sub-title-text\">{{ t('YOU_DONT_HAVE_ACTIVITY_IN_THIS_COMPANY') }}</div>\n }\n </div>\n } @empty {\n <div class=\"sub-title-text\">{{ t('YOU_DONT_HAVE_COMPANY') }}</div>\n }\n </div>\n <div class=\"block-button\">\n <button type=\"button\">\n <div class=\"content-button\">\n <cui-svg icon=\"cuiIconPaletteSm\" />\n <div class=\"text-and-sub-button\">\n {{ t('SWITCH_THEME') }}\n <div class=\"group-sub-button\">\n <div\n [class.container-sub-button__select]=\"currentTheme === 'dark'\"\n class=\"container-sub-button\"\n >\n <cui-svg\n icon=\"cuiIconMoon\"\n color=\"var(--cui-base-500)\"\n (click)=\"onChangeTheme('dark')\"\n />\n </div>\n <div\n [class.container-sub-button__select]=\"currentTheme === 'light'\"\n class=\"container-sub-button\"\n >\n <cui-svg\n icon=\"cuiIconSun\"\n color=\"var(--cui-base-500)\"\n (click)=\"onChangeTheme('light')\"\n />\n </div>\n </div>\n </div>\n </div>\n </button>\n <button type=\"button\">\n <div class=\"content-button\">\n <cui-svg icon=\"cuiIconGlobeSm\" />\n <div class=\"text-and-sub-button\">\n {{ t('LANGUAGE') }}\n <div class=\"group-sub-button\">\n @for (lang of langs; track lang) {\n <div\n [class.container-sub-button__select]=\"currentLang === lang\"\n class=\"container-sub-button\"\n (click)=\"onChangeLang(lang)\"\n >\n {{ lang }}\n </div>\n }\n </div>\n </div>\n </div>\n </button>\n <button\n type=\"button\"\n (click)=\"onLogout()\"\n >\n <div class=\"content-button\">\n <cui-svg icon=\"cuiIconLogOutSm\" />\n <div class=\"text-and-sub-button\">{{ t('LOG_OUT') }}</div>\n </div>\n </button>\n </div>\n </div>\n </cui-dropdown-wrapper>\n }\n </ng-template>\n</ng-container>\n", styles: [".wrapper{padding:8px}.wrapper-platform{padding:8px 16px;margin-top:4px}.block-name{display:flex;gap:12px;align-items:center;padding-bottom:8px;border-bottom:solid 1px var(--cui-base-200);color:var(--cui-base-900)}.title-text{font-weight:500;font-size:14px;line-height:20px;color:var(--cui-base-900)}.subtitle-text{font-weight:400;font-size:12px;line-height:14px;color:var(--cui-base-900)}.list-company{display:flex;flex-direction:column;padding:8px;max-height:250px;overflow-y:auto}.list-activity{display:flex;flex-direction:column;gap:4px;padding-top:4px;padding-bottom:4px;border-bottom:solid 1px var(--cui-base-200);margin-bottom:4px}.block-button{display:flex;flex-direction:column;gap:8px;padding-top:8px;width:100%}.content-button{display:flex;gap:8px;align-items:center;padding-right:8px;padding-left:8px;height:36px;color:var(--cui-base-900)}.text-and-sub-button{display:flex;align-items:center;justify-content:space-between;width:100%}.container-sub-button{display:flex;align-items:center;justify-content:center;text-transform:capitalize;border:solid 1px var(--cui-base-200);border-radius:4px;width:28px;height:28px}.group-sub-button{display:flex;gap:4px}.container-sub-button__select{border:solid 1px var(--cui-badge-blue-border);background-color:var(--cui-badge-blue-bg)}.block-platform{display:flex;gap:8px;color:var(--cui-base-900);cursor:pointer}.block-platform:hover{background-color:var(--cui-badge-light-blue-bg);border-radius:8px}.sub-title-text{display:flex;align-items:center;justify-content:center;font-weight:400;font-size:12px;line-height:14px;color:var(--cui-base-900);text-align:center}.activity-item{border-radius:8px;cursor:pointer}.activity-item:hover{background-color:var(--cui-badge-light-blue-bg)}\n"] }]
|
|
10334
10347
|
}], ctorParameters: () => [] });
|
|
10335
10348
|
|
|
10336
10349
|
class CuiFramerPreviewComponent {
|