@cuby-ui/core 0.0.401 → 0.0.402

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.
Files changed (29) hide show
  1. package/esm2022/services/token.options.mjs +1 -1
  2. package/esm2022/widgets/framer-preview/framer-preview.component.mjs +1 -1
  3. package/esm2022/widgets/user-action-context-menu/activity-item/activity-item.component.mjs +8 -3
  4. package/esm2022/widgets/user-action-context-menu/company-item/company-item.component.mjs +40 -0
  5. package/esm2022/widgets/user-action-context-menu/company-item/index.mjs +2 -0
  6. package/esm2022/widgets/user-action-context-menu/i18n/en.json +5 -1
  7. package/esm2022/widgets/user-action-context-menu/i18n/ru.json +5 -1
  8. package/esm2022/widgets/user-action-context-menu/services/activity-base.service.mjs +4 -1
  9. package/esm2022/widgets/user-action-context-menu/services/activity.service.mjs +5 -1
  10. package/esm2022/widgets/user-action-context-menu/user-action-context-menu.component.mjs +10 -5
  11. package/esm2022/widgets/user-action-context-menu/user-action-context.option.mjs +1 -1
  12. package/fesm2022/cuby-ui-core-en-D0un3--2.mjs +25 -0
  13. package/fesm2022/cuby-ui-core-en-D0un3--2.mjs.map +1 -0
  14. package/fesm2022/{cuby-ui-core-ru-DMCQZqaQ.mjs → cuby-ui-core-ru-CMm--FpA.mjs} +11 -3
  15. package/fesm2022/cuby-ui-core-ru-CMm--FpA.mjs.map +1 -0
  16. package/fesm2022/cuby-ui-core.mjs +55 -8
  17. package/fesm2022/cuby-ui-core.mjs.map +1 -1
  18. package/package.json +4 -4
  19. package/services/token.options.d.ts +9 -0
  20. package/widgets/user-action-context-menu/activity-item/activity-item.component.d.ts +2 -0
  21. package/widgets/user-action-context-menu/company-item/company-item.component.d.ts +17 -0
  22. package/widgets/user-action-context-menu/company-item/index.d.ts +1 -0
  23. package/widgets/user-action-context-menu/services/activity-base.service.d.ts +1 -0
  24. package/widgets/user-action-context-menu/services/activity.service.d.ts +2 -0
  25. package/widgets/user-action-context-menu/user-action-context-menu.component.d.ts +4 -1
  26. package/widgets/user-action-context-menu/user-action-context.option.d.ts +5 -0
  27. package/fesm2022/cuby-ui-core-en-DL7GiVtz.mjs +0 -17
  28. package/fesm2022/cuby-ui-core-en-DL7GiVtz.mjs.map +0 -1
  29. package/fesm2022/cuby-ui-core-ru-DMCQZqaQ.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cuby-ui-core-ru-CMm--FpA.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -23,7 +23,7 @@ import EditorJS from '@editorjs/editorjs';
23
23
  import Header from '@editorjs/header';
24
24
  import List from '@editorjs/list';
25
25
  import * as i4 from '@jsverse/transloco';
26
- import { TranslocoDirective, TranslocoService, TranslocoModule } from '@jsverse/transloco';
26
+ import { TranslocoDirective, TranslocoService, TranslocoModule, TranslocoPipe } from '@jsverse/transloco';
27
27
  import { createCustomElement } from '@angular/elements';
28
28
  import { HttpErrorResponse } from '@angular/common/http';
29
29
  import { Router } from '@angular/router';
@@ -10147,6 +10147,9 @@ class CuiActivityBaseService {
10147
10147
  checkIsCurrentActivity(activityId) {
10148
10148
  return false;
10149
10149
  }
10150
+ checkIsCurrentCompany(companyId) {
10151
+ return false;
10152
+ }
10150
10153
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityBaseService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
10151
10154
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityBaseService, providedIn: 'any' }); }
10152
10155
  }
@@ -10163,10 +10166,14 @@ class CuiActivityImplService extends CuiActivityBaseService {
10163
10166
  this.cuiAuthService = inject(CuiAuthService);
10164
10167
  this.authData = this.cuiAuthService.getAccessTokenData();
10165
10168
  this.currentActivityId = this.authData.employee_session?.activityId;
10169
+ this.currentCompanyId = this.authData.employee_session?.companyId;
10166
10170
  }
10167
10171
  checkIsCurrentActivity(activityId) {
10168
10172
  return this.currentActivityId === activityId;
10169
10173
  }
10174
+ checkIsCurrentCompany(companyId) {
10175
+ return this.currentCompanyId === companyId;
10176
+ }
10170
10177
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityImplService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
10171
10178
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityImplService, providedIn: 'any' }); }
10172
10179
  }
@@ -10180,12 +10187,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
10180
10187
  const CUI_ACTIVITY_SERVICE_TOKEN = new InjectionToken('ACTIVITY_SERVICE_TOKEN');
10181
10188
 
10182
10189
  const CuiActivityContextMenuTranslations = {
10183
- en: import('./cuby-ui-core-en-DL7GiVtz.mjs'),
10184
- ru: import('./cuby-ui-core-ru-DMCQZqaQ.mjs')
10190
+ en: import('./cuby-ui-core-en-D0un3--2.mjs'),
10191
+ ru: import('./cuby-ui-core-ru-CMm--FpA.mjs')
10185
10192
  };
10186
10193
 
10187
10194
  class CuiActivityItemComponent {
10188
10195
  constructor() {
10196
+ this.transloco = inject(TranslocoService);
10189
10197
  this.cuiWindow = inject(CUI_WINDOW);
10190
10198
  this.destroy = inject(DestroyRef);
10191
10199
  this.cuiAuthService = inject(CuiAuthService);
@@ -10197,6 +10205,9 @@ class CuiActivityItemComponent {
10197
10205
  });
10198
10206
  this.activity = input.required();
10199
10207
  this.companyId = input.required();
10208
+ this.typeCompany = computed(() => {
10209
+ return this.transloco.translate(this.activity().type);
10210
+ });
10200
10211
  }
10201
10212
  onGoToActivity() {
10202
10213
  if (this.isSelected()) {
@@ -10219,13 +10230,45 @@ class CuiActivityItemComponent {
10219
10230
  });
10220
10231
  }
10221
10232
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
10222
- 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 class=\"wrapper\">\n <button\n type=\"button\"\n class=\"activity-button\"\n (click)=\"onGoToActivity()\"\n >\n <cui-letter-box\n [letter]=\"activity().description[0]\"\n [shape]=\"'rounded'\"\n [backgroundColor]=\"letterBackgroundColor()\"\n size=\"md\"\n />\n <span>{{ activity().description }}</span>\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}\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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
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>\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;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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
10223
10234
  }
10224
10235
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityItemComponent, decorators: [{
10225
10236
  type: Component,
10226
10237
  args: [{ selector: 'cui-activity-item', standalone: true, imports: [CuiLetterBoxComponent, CuiSvgModule], changeDetection: ChangeDetectionStrategy.OnPush, host: {
10227
10238
  '[class.selected]': 'isSelected()'
10228
- }, template: "<div class=\"wrapper\">\n <button\n type=\"button\"\n class=\"activity-button\"\n (click)=\"onGoToActivity()\"\n >\n <cui-letter-box\n [letter]=\"activity().description[0]\"\n [shape]=\"'rounded'\"\n [backgroundColor]=\"letterBackgroundColor()\"\n size=\"md\"\n />\n <span>{{ activity().description }}</span>\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}\n"] }]
10239
+ }, template: "<div\n class=\"wrapper\"\n (click)=\"onGoToActivity()\"\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;align-items:flex-start}.sub-title{font-weight:400;font-size:12px;line-height:14px;color:var(--cui-base-400)}\n"] }]
10240
+ }] });
10241
+
10242
+ class CompanyItemComponent {
10243
+ constructor() {
10244
+ this.cuiWindow = inject(CUI_WINDOW);
10245
+ this.cuiAuthService = inject(CuiAuthService);
10246
+ this.cuiActivityService = inject(CUI_ACTIVITY_SERVICE_TOKEN);
10247
+ this.isSelected = computed(() => this.cuiActivityService.checkIsCurrentActivity(this.company().companyId));
10248
+ this.company = input.required();
10249
+ this.urlTemplatesForRedirectToCompany = input.required();
10250
+ this.selected = input(false);
10251
+ }
10252
+ getRoles() {
10253
+ const token = this.cuiAuthService.getAccessTokenData();
10254
+ return token.realm_access.roles;
10255
+ }
10256
+ checkIsAdmin() {
10257
+ const roles = this.getRoles();
10258
+ return roles.includes("ADMIN" /* CuiTokenRole.Admin */);
10259
+ }
10260
+ onGoToCompany() {
10261
+ const { adminLink, userLink } = this.urlTemplatesForRedirectToCompany();
10262
+ const linkTemplate = this.checkIsAdmin() ? adminLink : userLink;
10263
+ const finalUrl = linkTemplate.replace('{id}', this.company().companyId);
10264
+ this.cuiWindow.open(finalUrl);
10265
+ }
10266
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CompanyItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
10267
+ 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 }, urlTemplatesForRedirectToCompany: { classPropertyName: "urlTemplatesForRedirectToCompany", publicName: "urlTemplatesForRedirectToCompany", isSignal: true, isRequired: true, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"title-company\"\n (click)=\"onGoToCompany()\"\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: [".company-button{display:flex;gap:8px;align-items:center;padding-left:4px;height:36px;color:var(--cui-base-900)}.company-button:hover{width:100%;border-radius:8px;background-color:var(--cui-badge-light-blue-bg)}.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;color:var(--cui-base-900);align-items:flex-start}.sub-title{font-weight:400;font-size:12px;line-height:14px;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" }] }); }
10268
+ }
10269
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CompanyItemComponent, decorators: [{
10270
+ type: Component,
10271
+ args: [{ selector: 'cui-company-item', standalone: true, imports: [CuiLetterBoxComponent, CuiSvgModule, TranslocoPipe], template: "<div\n class=\"title-company\"\n (click)=\"onGoToCompany()\"\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: [".company-button{display:flex;gap:8px;align-items:center;padding-left:4px;height:36px;color:var(--cui-base-900)}.company-button:hover{width:100%;border-radius:8px;background-color:var(--cui-badge-light-blue-bg)}.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;color:var(--cui-base-900);align-items:flex-start}.sub-title{font-weight:400;font-size:12px;line-height:14px;color:var(--cui-base-400)}.text{display:flex;flex-direction:column;align-items:flex-start}\n"] }]
10229
10272
  }] });
10230
10273
 
10231
10274
  class CuiUserActionContextMenuComponent {
@@ -10243,6 +10286,8 @@ class CuiUserActionContextMenuComponent {
10243
10286
  this.lang$ = this.translocoService.langChanges$;
10244
10287
  this.isOpen = signal(false);
10245
10288
  this.companies = this.cuiActivityService.companies;
10289
+ this.urlTemplatesForRedirectToCompany = input.required();
10290
+ this.urlTemplateForRedirectToAdminCompany = input.required();
10246
10291
  this.cuiActivityService.initActivityData();
10247
10292
  }
10248
10293
  onLogout() {
@@ -10265,7 +10310,7 @@ class CuiUserActionContextMenuComponent {
10265
10310
  this.translocoService.setActiveLang(lang.label);
10266
10311
  }
10267
10312
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiUserActionContextMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
10268
- 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 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 <ul class=\"title-company\">\n {{\n company.name\n }}\n </ul>\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}.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)}.title-company{font-weight:500;font-size:14px;line-height:20px;color:var(--cui-base-500)}.list-company{display:flex;flex-direction:column;gap:4px;max-height:250px;overflow-y:auto}.list-activity{display:flex;flex-direction:column;gap:4px;padding:8px;border-bottom:solid 1px var(--cui-base-200)}.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)}.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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
10313
+ 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 }, urlTemplateForRedirectToAdminCompany: { classPropertyName: "urlTemplateForRedirectToAdminCompany", publicName: "urlTemplateForRedirectToAdminCompany", 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;gap:4px;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)}.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 }); }
10269
10314
  }
10270
10315
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiUserActionContextMenuComponent, decorators: [{
10271
10316
  type: Component,
@@ -10278,8 +10323,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
10278
10323
  CuiButtonModule,
10279
10324
  CuiContextMenuModule,
10280
10325
  CuiActivityItemComponent,
10281
- AsyncPipe
10282
- ], 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 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 <ul class=\"title-company\">\n {{\n company.name\n }}\n </ul>\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}.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)}.title-company{font-weight:500;font-size:14px;line-height:20px;color:var(--cui-base-500)}.list-company{display:flex;flex-direction:column;gap:4px;max-height:250px;overflow-y:auto}.list-activity{display:flex;flex-direction:column;gap:4px;padding:8px;border-bottom:solid 1px var(--cui-base-200)}.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)}.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"] }]
10326
+ AsyncPipe,
10327
+ CompanyItemComponent,
10328
+ CuiActivityItemComponent
10329
+ ], 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 [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;gap:4px;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)}.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"] }]
10283
10330
  }], ctorParameters: () => [] });
10284
10331
 
10285
10332
  class CuiFramerPreviewComponent {