@cuby-ui/core 0.0.400 → 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.
- package/esm2022/services/token.options.mjs +1 -1
- package/esm2022/widgets/framer-preview/framer-preview.component.mjs +1 -1
- package/esm2022/widgets/user-action-context-menu/activity-item/activity-item.component.mjs +8 -3
- package/esm2022/widgets/user-action-context-menu/company-item/company-item.component.mjs +40 -0
- package/esm2022/widgets/user-action-context-menu/company-item/index.mjs +2 -0
- package/esm2022/widgets/user-action-context-menu/i18n/en.json +5 -1
- package/esm2022/widgets/user-action-context-menu/i18n/ru.json +5 -1
- package/esm2022/widgets/user-action-context-menu/services/activity-base.service.mjs +4 -1
- package/esm2022/widgets/user-action-context-menu/services/activity.service.mjs +5 -1
- package/esm2022/widgets/user-action-context-menu/user-action-context-menu.component.mjs +10 -5
- package/esm2022/widgets/user-action-context-menu/user-action-context.option.mjs +1 -1
- package/fesm2022/cuby-ui-core-en-D0un3--2.mjs +25 -0
- package/fesm2022/cuby-ui-core-en-D0un3--2.mjs.map +1 -0
- package/fesm2022/{cuby-ui-core-ru-DMCQZqaQ.mjs → cuby-ui-core-ru-CMm--FpA.mjs} +11 -3
- package/fesm2022/cuby-ui-core-ru-CMm--FpA.mjs.map +1 -0
- package/fesm2022/cuby-ui-core.mjs +55 -8
- package/fesm2022/cuby-ui-core.mjs.map +1 -1
- package/package.json +4 -4
- package/services/token.options.d.ts +9 -0
- package/widgets/user-action-context-menu/activity-item/activity-item.component.d.ts +2 -0
- package/widgets/user-action-context-menu/company-item/company-item.component.d.ts +17 -0
- package/widgets/user-action-context-menu/company-item/index.d.ts +1 -0
- package/widgets/user-action-context-menu/services/activity-base.service.d.ts +1 -0
- package/widgets/user-action-context-menu/services/activity.service.d.ts +2 -0
- package/widgets/user-action-context-menu/user-action-context-menu.component.d.ts +4 -1
- package/widgets/user-action-context-menu/user-action-context.option.d.ts +5 -0
- package/fesm2022/cuby-ui-core-en-DL7GiVtz.mjs +0 -17
- package/fesm2022/cuby-ui-core-en-DL7GiVtz.mjs.map +0 -1
- package/fesm2022/cuby-ui-core-ru-DMCQZqaQ.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cuby-ui/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.402",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=18.0.0",
|
|
6
6
|
"@angular/core": ">=18.0.0",
|
|
7
7
|
"@angular/elements": ">=18.0.0",
|
|
8
8
|
"@angular/forms": ">=18.0.0",
|
|
9
|
-
"@cuby-ui/api": "^0.0.
|
|
10
|
-
"@cuby-ui/cdk": "^0.0.
|
|
11
|
-
"@cuby-ui/icons": "^0.0.
|
|
9
|
+
"@cuby-ui/api": "^0.0.402",
|
|
10
|
+
"@cuby-ui/cdk": "^0.0.402",
|
|
11
|
+
"@cuby-ui/icons": "^0.0.402",
|
|
12
12
|
"@editorjs/editorjs": "2.29.1",
|
|
13
13
|
"@editorjs/header": "^2.8.1",
|
|
14
14
|
"@editorjs/list": "^1.9.0",
|
|
@@ -9,6 +9,10 @@ export interface CuiTokenData {
|
|
|
9
9
|
readonly given_name: string;
|
|
10
10
|
readonly family_name: string;
|
|
11
11
|
readonly email: string;
|
|
12
|
+
readonly realm_access: CuiTokenRealmAccess;
|
|
13
|
+
}
|
|
14
|
+
export interface CuiTokenRealmAccess {
|
|
15
|
+
readonly roles: CuiTokenRole[];
|
|
12
16
|
}
|
|
13
17
|
export interface CuiExchangeTokenSession extends CuiTokenData {
|
|
14
18
|
readonly sid: string;
|
|
@@ -20,3 +24,8 @@ export interface CuiEmployeeSessionData {
|
|
|
20
24
|
readonly companyId: string;
|
|
21
25
|
readonly accessLevels: string[];
|
|
22
26
|
}
|
|
27
|
+
export declare const enum CuiTokenRole {
|
|
28
|
+
Admin = "ADMIN",
|
|
29
|
+
Owner = "OWNER",
|
|
30
|
+
User = "USER"
|
|
31
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CuiUserCompanyActivity } from '@cuby-ui/api';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class CuiActivityItemComponent {
|
|
4
|
+
private readonly transloco;
|
|
4
5
|
private readonly cuiWindow;
|
|
5
6
|
private readonly destroy;
|
|
6
7
|
private readonly cuiAuthService;
|
|
@@ -9,6 +10,7 @@ export declare class CuiActivityItemComponent {
|
|
|
9
10
|
protected readonly letterBackgroundColor: import("@angular/core").Signal<"var(--cui-light-blue-500)" | "var(--cui-orange-500)">;
|
|
10
11
|
readonly activity: import("@angular/core").InputSignal<CuiUserCompanyActivity>;
|
|
11
12
|
readonly companyId: import("@angular/core").InputSignal<string>;
|
|
13
|
+
protected readonly typeCompany: import("@angular/core").Signal<string>;
|
|
12
14
|
protected onGoToActivity(): void;
|
|
13
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<CuiActivityItemComponent, never>;
|
|
14
16
|
static ɵcmp: i0.ɵɵComponentDeclaration<CuiActivityItemComponent, "cui-activity-item", never, { "activity": { "alias": "activity"; "required": true; "isSignal": true; }; "companyId": { "alias": "companyId"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CuiUserCompany } from '@cuby-ui/api';
|
|
2
|
+
import { LinkConfig } from '../user-action-context.option';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CompanyItemComponent {
|
|
5
|
+
private readonly cuiWindow;
|
|
6
|
+
private readonly cuiAuthService;
|
|
7
|
+
private readonly cuiActivityService;
|
|
8
|
+
protected readonly isSelected: import("@angular/core").Signal<boolean>;
|
|
9
|
+
readonly company: import("@angular/core").InputSignal<CuiUserCompany>;
|
|
10
|
+
readonly urlTemplatesForRedirectToCompany: import("@angular/core").InputSignal<LinkConfig>;
|
|
11
|
+
readonly selected: import("@angular/core").InputSignal<boolean>;
|
|
12
|
+
getRoles(): string[];
|
|
13
|
+
checkIsAdmin(): boolean;
|
|
14
|
+
protected onGoToCompany(): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CompanyItemComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CompanyItemComponent, "cui-company-item", never, { "company": { "alias": "company"; "required": true; "isSignal": true; }; "urlTemplatesForRedirectToCompany": { "alias": "urlTemplatesForRedirectToCompany"; "required": true; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './company-item.component';
|
|
@@ -7,6 +7,7 @@ export declare class CuiActivityBaseService implements CuiActivityService {
|
|
|
7
7
|
readonly companies: import("@angular/core").Signal<CuiUserCompany[]>;
|
|
8
8
|
initActivityData(): void;
|
|
9
9
|
checkIsCurrentActivity(activityId: string): boolean;
|
|
10
|
+
checkIsCurrentCompany(companyId: string): boolean;
|
|
10
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<CuiActivityBaseService, never>;
|
|
11
12
|
static ɵprov: i0.ɵɵInjectableDeclaration<CuiActivityBaseService>;
|
|
12
13
|
}
|
|
@@ -5,7 +5,9 @@ export declare class CuiActivityImplService extends CuiActivityBaseService imple
|
|
|
5
5
|
private readonly cuiAuthService;
|
|
6
6
|
private readonly authData;
|
|
7
7
|
private readonly currentActivityId;
|
|
8
|
+
private readonly currentCompanyId;
|
|
8
9
|
checkIsCurrentActivity(activityId: string): boolean;
|
|
10
|
+
checkIsCurrentCompany(companyId: string): boolean;
|
|
9
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<CuiActivityImplService, never>;
|
|
10
12
|
static ɵprov: i0.ɵɵInjectableDeclaration<CuiActivityImplService>;
|
|
11
13
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LangDefinition } from '@jsverse/transloco';
|
|
2
2
|
import type { CuiTheme } from '../../services';
|
|
3
|
+
import { LinkConfig } from './user-action-context.option';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class CuiUserActionContextMenuComponent {
|
|
5
6
|
private readonly translocoService;
|
|
@@ -15,6 +16,8 @@ export declare class CuiUserActionContextMenuComponent {
|
|
|
15
16
|
protected readonly lang$: import("rxjs").Observable<string>;
|
|
16
17
|
protected readonly isOpen: import("@angular/core").WritableSignal<boolean>;
|
|
17
18
|
protected readonly companies: import("@angular/core").Signal<import("@cuby-ui/api").CuiUserCompany[]>;
|
|
19
|
+
readonly urlTemplatesForRedirectToCompany: import("@angular/core").InputSignal<LinkConfig>;
|
|
20
|
+
readonly urlTemplateForRedirectToAdminCompany: import("@angular/core").InputSignal<string>;
|
|
18
21
|
constructor();
|
|
19
22
|
protected onLogout(): void;
|
|
20
23
|
protected onToggleOpenState(open: boolean): void;
|
|
@@ -22,5 +25,5 @@ export declare class CuiUserActionContextMenuComponent {
|
|
|
22
25
|
protected onChangeTheme(theme: CuiTheme): void;
|
|
23
26
|
protected onChangeLang(lang: string | LangDefinition): void;
|
|
24
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<CuiUserActionContextMenuComponent, never>;
|
|
25
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CuiUserActionContextMenuComponent, "cui-user-action-context-menu", never, {}, {}, never, ["*"], true, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CuiUserActionContextMenuComponent, "cui-user-action-context-menu", never, { "urlTemplatesForRedirectToCompany": { "alias": "urlTemplatesForRedirectToCompany"; "required": true; "isSignal": true; }; "urlTemplateForRedirectToAdminCompany": { "alias": "urlTemplateForRedirectToAdminCompany"; "required": true; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
26
29
|
}
|
|
@@ -7,4 +7,9 @@ export interface CuiActivityData {
|
|
|
7
7
|
export interface CuiActivityService extends CuiActivityData {
|
|
8
8
|
initActivityData(): void;
|
|
9
9
|
checkIsCurrentActivity(activityId: string): boolean;
|
|
10
|
+
checkIsCurrentCompany(companyId: string): boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface LinkConfig {
|
|
13
|
+
userLink: string;
|
|
14
|
+
adminLink: string;
|
|
10
15
|
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
var CUBY_PLATFORM = "Cuby platform";
|
|
2
|
-
var SWITCH_THEME = "Switch theme";
|
|
3
|
-
var LOG_OUT = "Log out";
|
|
4
|
-
var LANGUAGE = "Language";
|
|
5
|
-
var YOU_DONT_HAVE_ACTIVITY_IN_THIS_COMPANY = "You have no activity in this company.";
|
|
6
|
-
var YOU_DONT_HAVE_COMPANY = "You have no available companies.";
|
|
7
|
-
var en = {
|
|
8
|
-
CUBY_PLATFORM: CUBY_PLATFORM,
|
|
9
|
-
SWITCH_THEME: SWITCH_THEME,
|
|
10
|
-
LOG_OUT: LOG_OUT,
|
|
11
|
-
LANGUAGE: LANGUAGE,
|
|
12
|
-
YOU_DONT_HAVE_ACTIVITY_IN_THIS_COMPANY: YOU_DONT_HAVE_ACTIVITY_IN_THIS_COMPANY,
|
|
13
|
-
YOU_DONT_HAVE_COMPANY: YOU_DONT_HAVE_COMPANY
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export { CUBY_PLATFORM, LANGUAGE, LOG_OUT, SWITCH_THEME, YOU_DONT_HAVE_ACTIVITY_IN_THIS_COMPANY, YOU_DONT_HAVE_COMPANY, en as default };
|
|
17
|
-
//# sourceMappingURL=cuby-ui-core-en-DL7GiVtz.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cuby-ui-core-en-DL7GiVtz.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cuby-ui-core-ru-DMCQZqaQ.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
|