@cuby-ui/core 0.0.417 → 0.0.419
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/components/badge/badge.options.mjs +1 -1
- package/esm2022/widgets/user-action-context-menu/activity-item/activity-item.component.mjs +8 -10
- package/esm2022/widgets/user-action-context-menu/company-item/company-item.component.mjs +7 -7
- package/esm2022/widgets/user-action-context-menu/services/activity.service.mjs +6 -6
- package/esm2022/widgets/user-action-context-menu/user-action-context-menu.component.mjs +4 -8
- package/fesm2022/cuby-ui-core.mjs +12 -18
- package/fesm2022/cuby-ui-core.mjs.map +1 -1
- package/package.json +4 -4
- package/styles/theme.scss +1 -1
- package/styles/variables/colors.scss +1 -1
- package/widgets/user-action-context-menu/activity-item/activity-item.component.d.ts +2 -5
- package/widgets/user-action-context-menu/services/activity.service.d.ts +2 -2
- package/widgets/user-action-context-menu/user-action-context-menu.component.d.ts +1 -4
|
@@ -10165,15 +10165,15 @@ class CuiActivityImplService extends CuiActivityBaseService {
|
|
|
10165
10165
|
super(...arguments);
|
|
10166
10166
|
this.cuiAuthService = inject(CuiAuthService);
|
|
10167
10167
|
this.authData = this.cuiAuthService.getAccessTokenData();
|
|
10168
|
-
this.
|
|
10169
|
-
this.
|
|
10168
|
+
this.currentActivity = computed(() => this.currentCompany()?.contexts.find(() => this.authData.employee_session?.activityId));
|
|
10169
|
+
this.currentCompany = computed(() => this.companies().find(() => this.authData.employee_session?.companyId));
|
|
10170
10170
|
this.isCheckActivity = false;
|
|
10171
10171
|
}
|
|
10172
10172
|
checkIsCurrentActivity(activityId) {
|
|
10173
|
-
return this.isCheckActivity = this.
|
|
10173
|
+
return (this.isCheckActivity = this.currentActivity()?.activityId === activityId);
|
|
10174
10174
|
}
|
|
10175
10175
|
checkIsCurrentCompany(companyId) {
|
|
10176
|
-
return this.
|
|
10176
|
+
return this.currentCompany()?.id === companyId && !this.isCheckActivity;
|
|
10177
10177
|
}
|
|
10178
10178
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityImplService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
10179
10179
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityImplService, providedIn: 'any' }); }
|
|
@@ -10199,11 +10199,12 @@ class CuiActivityItemComponent {
|
|
|
10199
10199
|
this.destroy = inject(DestroyRef);
|
|
10200
10200
|
this.cuiAuthService = inject(CuiAuthService);
|
|
10201
10201
|
this.cuiActivityService = inject(CUI_ACTIVITY_SERVICE_TOKEN);
|
|
10202
|
-
this.activitySelected = output();
|
|
10203
10202
|
this.isSelected = computed(() => this.cuiActivityService.checkIsCurrentActivity(this.activity().activityId));
|
|
10204
10203
|
this.letterBackgroundColor = computed(() => {
|
|
10205
10204
|
const licenseType = this.activity().type;
|
|
10206
|
-
return licenseType === "MANUFACTURE" /* CuiUserCompanyActivityType.Manufacture */
|
|
10205
|
+
return licenseType === "MANUFACTURE" /* CuiUserCompanyActivityType.Manufacture */
|
|
10206
|
+
? 'var(--cui-orange-500)'
|
|
10207
|
+
: 'var(--cui-light-blue-500)';
|
|
10207
10208
|
});
|
|
10208
10209
|
this.activity = input.required();
|
|
10209
10210
|
this.companyId = input.required();
|
|
@@ -10211,9 +10212,6 @@ class CuiActivityItemComponent {
|
|
|
10211
10212
|
return this.transloco.translate(this.activity().type);
|
|
10212
10213
|
});
|
|
10213
10214
|
}
|
|
10214
|
-
ngOnInit() {
|
|
10215
|
-
this.activitySelected.emit(this.activity());
|
|
10216
|
-
}
|
|
10217
10215
|
onGoToActivity() {
|
|
10218
10216
|
if (this.isSelected()) {
|
|
10219
10217
|
return;
|
|
@@ -10235,7 +10233,7 @@ class CuiActivityItemComponent {
|
|
|
10235
10233
|
});
|
|
10236
10234
|
}
|
|
10237
10235
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
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 } },
|
|
10236
|
+
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 }); }
|
|
10239
10237
|
}
|
|
10240
10238
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiActivityItemComponent, decorators: [{
|
|
10241
10239
|
type: Component,
|
|
@@ -10281,13 +10279,13 @@ class CompanyItemComponent {
|
|
|
10281
10279
|
this.cuiWindow.open(finalUrl);
|
|
10282
10280
|
}
|
|
10283
10281
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CompanyItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
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\">{{
|
|
10282
|
+
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"] }] }); }
|
|
10285
10283
|
}
|
|
10286
10284
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CompanyItemComponent, decorators: [{
|
|
10287
10285
|
type: Component,
|
|
10288
10286
|
args: [{ selector: 'cui-company-item', standalone: true, imports: [CuiLetterBoxComponent, CuiSvgModule, TranslocoPipe, CuiTooltip], host: {
|
|
10289
10287
|
'[class.selected]': 'isSelected()'
|
|
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\">{{
|
|
10288
|
+
}, 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"] }]
|
|
10291
10289
|
}] });
|
|
10292
10290
|
|
|
10293
10291
|
class CuiUserActionContextMenuComponent {
|
|
@@ -10305,7 +10303,6 @@ class CuiUserActionContextMenuComponent {
|
|
|
10305
10303
|
this.lang$ = this.translocoService.langChanges$;
|
|
10306
10304
|
this.isOpen = signal(false);
|
|
10307
10305
|
this.companies = this.cuiActivityService.companies;
|
|
10308
|
-
this.activitySelected = output();
|
|
10309
10306
|
this.cuiActivityService.initActivityData();
|
|
10310
10307
|
}
|
|
10311
10308
|
onLogout() {
|
|
@@ -10327,11 +10324,8 @@ class CuiUserActionContextMenuComponent {
|
|
|
10327
10324
|
}
|
|
10328
10325
|
this.translocoService.setActiveLang(lang.label);
|
|
10329
10326
|
}
|
|
10330
|
-
onActivitySelected($event) {
|
|
10331
|
-
this.activitySelected.emit($event);
|
|
10332
|
-
}
|
|
10333
10327
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiUserActionContextMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10334
|
-
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 }); }
|
|
10328
|
+
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 }); }
|
|
10335
10329
|
}
|
|
10336
10330
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiUserActionContextMenuComponent, decorators: [{
|
|
10337
10331
|
type: Component,
|
|
@@ -10347,7 +10341,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
10347
10341
|
AsyncPipe,
|
|
10348
10342
|
CompanyItemComponent,
|
|
10349
10343
|
CuiActivityItemComponent
|
|
10350
|
-
], 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
|
|
10344
|
+
], 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"] }]
|
|
10351
10345
|
}], ctorParameters: () => [] });
|
|
10352
10346
|
|
|
10353
10347
|
class CuiFramerPreviewComponent {
|