@cuby-ui/core 0.0.418 → 0.0.420

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.
@@ -10137,6 +10137,8 @@ class CuiActivityBaseService {
10137
10137
  this.userCompanyApiService = inject(UserCompanyApiService);
10138
10138
  this.companiesSignal = signal([]);
10139
10139
  this.companies = this.companiesSignal.asReadonly();
10140
+ this.currentActivity = computed(() => null);
10141
+ this.currentCompany = computed(() => null);
10140
10142
  }
10141
10143
  initActivityData() {
10142
10144
  this.userCompanyApiService
@@ -10165,15 +10167,21 @@ class CuiActivityImplService extends CuiActivityBaseService {
10165
10167
  super(...arguments);
10166
10168
  this.cuiAuthService = inject(CuiAuthService);
10167
10169
  this.authData = this.cuiAuthService.getAccessTokenData();
10168
- this.currentActivityId = this.authData.employee_session?.activityId;
10169
- this.currentCompanyId = this.authData.employee_session?.companyId;
10170
+ this.currentActivity = computed(() => {
10171
+ const targetId = this.authData.employee_session?.activityId;
10172
+ return this.currentCompany()?.contexts.find(activity => activity.activityId === targetId) ?? null;
10173
+ });
10174
+ this.currentCompany = computed(() => {
10175
+ const targetId = this.authData.employee_session?.companyId;
10176
+ return this.companies().find(company => company.id === targetId) ?? null;
10177
+ });
10170
10178
  this.isCheckActivity = false;
10171
10179
  }
10172
10180
  checkIsCurrentActivity(activityId) {
10173
- return this.isCheckActivity = this.currentActivityId === activityId;
10181
+ return (this.isCheckActivity = this.currentActivity()?.activityId === activityId);
10174
10182
  }
10175
10183
  checkIsCurrentCompany(companyId) {
10176
- return this.currentCompanyId === companyId && !this.isCheckActivity;
10184
+ return this.currentCompany()?.id === companyId && !this.isCheckActivity;
10177
10185
  }
10178
10186
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityImplService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
10179
10187
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityImplService, providedIn: 'any' }); }
@@ -10199,11 +10207,12 @@ class CuiActivityItemComponent {
10199
10207
  this.destroy = inject(DestroyRef);
10200
10208
  this.cuiAuthService = inject(CuiAuthService);
10201
10209
  this.cuiActivityService = inject(CUI_ACTIVITY_SERVICE_TOKEN);
10202
- this.activitySelected = output();
10203
10210
  this.isSelected = computed(() => this.cuiActivityService.checkIsCurrentActivity(this.activity().activityId));
10204
10211
  this.letterBackgroundColor = computed(() => {
10205
10212
  const licenseType = this.activity().type;
10206
- return licenseType === "MANUFACTURE" /* CuiUserCompanyActivityType.Manufacture */ ? 'var(--cui-orange-500)' : 'var(--cui-light-blue-500)';
10213
+ return licenseType === "MANUFACTURE" /* CuiUserCompanyActivityType.Manufacture */
10214
+ ? 'var(--cui-orange-500)'
10215
+ : 'var(--cui-light-blue-500)';
10207
10216
  });
10208
10217
  this.activity = input.required();
10209
10218
  this.companyId = input.required();
@@ -10211,11 +10220,6 @@ class CuiActivityItemComponent {
10211
10220
  return this.transloco.translate(this.activity().type);
10212
10221
  });
10213
10222
  }
10214
- ngOnInit() {
10215
- if (this.isSelected()) {
10216
- this.activitySelected.emit(this.activity());
10217
- }
10218
- }
10219
10223
  onGoToActivity() {
10220
10224
  if (this.isSelected()) {
10221
10225
  return;
@@ -10237,7 +10241,7 @@ class CuiActivityItemComponent {
10237
10241
  });
10238
10242
  }
10239
10243
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
10240
- 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 } }, outputs: { activitySelected: "activitySelected" }, 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 }); }
10244
+ 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 }); }
10241
10245
  }
10242
10246
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityItemComponent, decorators: [{
10243
10247
  type: Component,
@@ -10283,13 +10287,13 @@ class CompanyItemComponent {
10283
10287
  this.cuiWindow.open(finalUrl);
10284
10288
  }
10285
10289
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CompanyItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
10286
- 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"] }] }); }
10290
+ 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"] }] }); }
10287
10291
  }
10288
10292
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CompanyItemComponent, decorators: [{
10289
10293
  type: Component,
10290
10294
  args: [{ selector: 'cui-company-item', standalone: true, imports: [CuiLetterBoxComponent, CuiSvgModule, TranslocoPipe, CuiTooltip], host: {
10291
10295
  '[class.selected]': 'isSelected()'
10292
- }, 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"] }]
10296
+ }, 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"] }]
10293
10297
  }] });
10294
10298
 
10295
10299
  class CuiUserActionContextMenuComponent {
@@ -10307,7 +10311,6 @@ class CuiUserActionContextMenuComponent {
10307
10311
  this.lang$ = this.translocoService.langChanges$;
10308
10312
  this.isOpen = signal(false);
10309
10313
  this.companies = this.cuiActivityService.companies;
10310
- this.activitySelected = output();
10311
10314
  this.cuiActivityService.initActivityData();
10312
10315
  }
10313
10316
  onLogout() {
@@ -10329,11 +10332,8 @@ class CuiUserActionContextMenuComponent {
10329
10332
  }
10330
10333
  this.translocoService.setActiveLang(lang.label);
10331
10334
  }
10332
- onActivitySelected($event) {
10333
- this.activitySelected.emit($event);
10334
- }
10335
10335
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiUserActionContextMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
10336
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: CuiUserActionContextMenuComponent, isStandalone: true, selector: "cui-user-action-context-menu", outputs: { activitySelected: "activitySelected" }, 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 (activitySelected)=\"onActivitySelected($event)\"\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"], outputs: ["activitySelected"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: CompanyItemComponent, selector: "cui-company-item", inputs: ["company", "selected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
10336
+ 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 [company]=\"company\" />\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 }); }
10337
10337
  }
10338
10338
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiUserActionContextMenuComponent, decorators: [{
10339
10339
  type: Component,
@@ -10349,7 +10349,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
10349
10349
  AsyncPipe,
10350
10350
  CompanyItemComponent,
10351
10351
  CuiActivityItemComponent
10352
- ], 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 (activitySelected)=\"onActivitySelected($event)\"\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"] }]
10352
+ ], 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 [company]=\"company\" />\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"] }]
10353
10353
  }], ctorParameters: () => [] });
10354
10354
 
10355
10355
  class CuiFramerPreviewComponent {