@alauda-fe/common 1.3.1 → 1.4.1
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/api/auth-api.service.d.ts +14 -0
- package/api/platform-ui.service.d.ts +1 -0
- package/api/public-api.d.ts +1 -0
- package/array-form-table/form/component.d.ts +6 -2
- package/assets/icons/icon-refresh-drag.svg +1 -0
- package/authorization/interceptor.service.d.ts +2 -1
- package/authorization/public-api.d.ts +1 -0
- package/authorization/session-manage.service.d.ts +2 -4
- package/authorization/state.service.d.ts +19 -18
- package/authorization/storage-token.d.ts +4 -10
- package/core/constants/patterns.d.ts +4 -0
- package/core/directives/feature-gate.directive.d.ts +2 -1
- package/core/module.d.ts +21 -21
- package/core/pipes/minimum-format.pipe.d.ts +1 -1
- package/core/pipes/time.pipe.d.ts +1 -1
- package/core/services/context.service.d.ts +3 -4
- package/core/services/feature-gate.service.d.ts +1 -0
- package/core/services/workspace-helper.service.d.ts +3 -1
- package/core/types/commons.d.ts +2 -0
- package/core/types/k8s/crd.d.ts +64 -0
- package/core/types/resource-definitions.d.ts +3 -3
- package/core/utils/cache-store.d.ts +15 -13
- package/core/utils/common.d.ts +1 -2
- package/core/utils/public-api.d.ts +1 -0
- package/core/utils/router.d.ts +3 -0
- package/editable/editable.component.d.ts +23 -0
- package/editable/editable.directive.d.ts +9 -0
- package/editable/editable.type.d.ts +5 -0
- package/editable/public-api.d.ts +2 -0
- package/effect-directive/event.directive.d.ts +36 -0
- package/esm2022/api/auth-api.service.mjs +34 -0
- package/esm2022/api/platform-ui.service.mjs +2 -1
- package/esm2022/api/public-api.mjs +2 -1
- package/esm2022/array-form-table/form/component.mjs +30 -15
- package/esm2022/authorization/guard.service.mjs +2 -2
- package/esm2022/authorization/interceptor.service.mjs +31 -24
- package/esm2022/authorization/public-api.mjs +2 -1
- package/esm2022/authorization/session-manage.service.mjs +11 -24
- package/esm2022/authorization/state.service.mjs +94 -100
- package/esm2022/authorization/storage-token.mjs +12 -88
- package/esm2022/core/constants/patterns.mjs +6 -4
- package/esm2022/core/directives/feature-gate.directive.mjs +7 -4
- package/esm2022/core/guards/feature.guard.mjs +3 -2
- package/esm2022/core/module.mjs +7 -12
- package/esm2022/core/pipes/minimum-format.pipe.mjs +4 -3
- package/esm2022/core/pipes/time.pipe.mjs +3 -3
- package/esm2022/core/services/context.service.mjs +9 -12
- package/esm2022/core/services/feature-gate.service.mjs +4 -3
- package/esm2022/core/services/workspace-helper.service.mjs +7 -1
- package/esm2022/core/types/commons.mjs +1 -1
- package/esm2022/core/types/k8s/crd.mjs +8 -1
- package/esm2022/core/types/resource-definitions.mjs +2 -2
- package/esm2022/core/utils/cache-store.mjs +51 -29
- package/esm2022/core/utils/common.mjs +8 -10
- package/esm2022/core/utils/public-api.mjs +2 -1
- package/esm2022/core/utils/router.mjs +20 -0
- package/esm2022/editable/editable.component.mjs +136 -0
- package/esm2022/editable/editable.directive.mjs +25 -0
- package/esm2022/editable/editable.type.mjs +6 -0
- package/esm2022/editable/public-api.mjs +3 -0
- package/esm2022/effect-directive/event.directive.mjs +79 -4
- package/esm2022/exec/terminal/component.mjs +12 -19
- package/esm2022/k8s-resource-list/footer/component.mjs +63 -25
- package/esm2022/k8s-resource-list/k8s-resource-list.module.mjs +18 -6
- package/esm2022/k8s-resource-list/utils.mjs +7 -3
- package/esm2022/multi-search/multi-search-tags/component.mjs +2 -2
- package/esm2022/multi-search/types.mjs +1 -1
- package/esm2022/page-scaffold/navigation/breadcrumb/breadcrumb.component.mjs +55 -53
- package/esm2022/page-scaffold/navigation/navconfig-loader/navconfig-loader.service.mjs +4 -4
- package/esm2022/page-scaffold/page-header/account-menu/component/component.mjs +3 -8
- package/esm2022/page-scaffold/page-header/common-layout/product-select/component.mjs +6 -10
- package/esm2022/pie-derivative-chart/pie-derivative-chart.module.mjs +6 -6
- package/esm2022/pie-derivative-chart/radial-bar/radial-bar-chart.component.mjs +51 -40
- package/esm2022/pie-derivative-chart/units.mjs +14 -0
- package/esm2022/pod-status/component.mjs +34 -55
- package/esm2022/public-api.mjs +2 -1
- package/esm2022/searchable-selector/component.mjs +2 -2
- package/esm2022/table/component.mjs +47 -30
- package/esm2022/table/module.mjs +1 -1
- package/esm2022/view-chart/view-chart.component.mjs +5 -8
- package/esm2022/widget/public-api.mjs +2 -1
- package/esm2022/widget/resource-label/component.mjs +131 -0
- package/esm2022/widget/zero-state/zero-state.component.mjs +36 -21
- package/exec/terminal/component.d.ts +1 -3
- package/k8s-resource-list/footer/component.d.ts +8 -1
- package/k8s-resource-list/k8s-resource-list.module.d.ts +1 -1
- package/multi-search/types.d.ts +1 -0
- package/package.json +1 -1
- package/page-scaffold/page-header/common-layout/product-select/component.d.ts +1 -3
- package/pie-derivative-chart/radial-bar/radial-bar-chart.component.d.ts +4 -0
- package/pie-derivative-chart/units.d.ts +2 -0
- package/pod-status/component.d.ts +1 -3
- package/public-api.d.ts +1 -0
- package/styles/global.scss +1 -0
- package/styles/tailwind-preset.scss +1 -1
- package/table/component.d.ts +4 -3
- package/widget/public-api.d.ts +1 -0
- package/widget/resource-label/component.d.ts +25 -0
- package/widget/zero-state/zero-state.component.d.ts +4 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { KubernetesResourceList, ResourceListParams, RoleTemplate, User, UserBinding, UserRole } from '../core/public-api';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class AuthApiService {
|
|
4
|
+
private http;
|
|
5
|
+
getUserBindingList(params: ResourceListParams): import("rxjs").Observable<KubernetesResourceList<UserBinding>>;
|
|
6
|
+
getUserRoleList(params: {
|
|
7
|
+
users: string;
|
|
8
|
+
project?: string;
|
|
9
|
+
}): import("rxjs").Observable<KubernetesResourceList<UserRole>>;
|
|
10
|
+
getRoleTemplateList(params: ResourceListParams): import("rxjs").Observable<KubernetesResourceList<RoleTemplate>>;
|
|
11
|
+
getUser(name: string): import("rxjs").Observable<User>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthApiService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthApiService>;
|
|
14
|
+
}
|
|
@@ -39,6 +39,7 @@ export declare class PlatformUIService {
|
|
|
39
39
|
getBackgroundImages(): import("rxjs").Observable<{
|
|
40
40
|
topImage: string;
|
|
41
41
|
bottomImage: string;
|
|
42
|
+
hasCustomized: boolean;
|
|
42
43
|
}>;
|
|
43
44
|
static ɵfac: i0.ɵɵFactoryDeclaration<PlatformUIService, never>;
|
|
44
45
|
static ɵprov: i0.ɵɵInjectableDeclaration<PlatformUIService>;
|
package/api/public-api.d.ts
CHANGED
|
@@ -65,9 +65,13 @@ export declare class ArrayFormTableComponent implements OnDestroy {
|
|
|
65
65
|
*/
|
|
66
66
|
zeroStateTemplate: TemplateRef<any>;
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* 行之间的分隔区域自定义模板
|
|
69
69
|
*/
|
|
70
70
|
separatorTemplate: TemplateRef<any>;
|
|
71
|
+
/**
|
|
72
|
+
* 行之间的分隔区域,默认关闭
|
|
73
|
+
*/
|
|
74
|
+
rowSeparator: boolean;
|
|
71
75
|
ngFormGroupDirective: FormGroupDirective;
|
|
72
76
|
rows: any[];
|
|
73
77
|
resourceName: string;
|
|
@@ -98,5 +102,5 @@ export declare class ArrayFormTableComponent implements OnDestroy {
|
|
|
98
102
|
ngOnDestroy(): void;
|
|
99
103
|
shouldShowRowError: (control: AbstractControl) => import("rxjs").Observable<boolean>;
|
|
100
104
|
static ɵfac: i0.ɵɵFactoryDeclaration<ArrayFormTableComponent, never>;
|
|
101
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ArrayFormTableComponent, "acl-array-form-table", never, { "rows": { "alias": "rows"; "required": false; }; "resourceName": { "alias": "resourceName"; "required": false; }; "resourceNameTranslated": { "alias": "resourceNameTranslated"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "addDisabled": { "alias": "addDisabled"; "required": false; }; "actionColumnDivider": { "alias": "actionColumnDivider"; "required": false; }; "showZeroState": { "alias": "showZeroState"; "required": false; }; "showRowError": { "alias": "showRowError"; "required": false; }; "rowBackgroundColorFn": { "alias": "rowBackgroundColorFn"; "required": false; }; "minRow": { "alias": "minRow"; "required": false; }; "minRowTooltip": { "alias": "minRowTooltip"; "required": false; }; "maxRow": { "alias": "maxRow"; "required": false; }; "maxRowTooltip": { "alias": "maxRowTooltip"; "required": false; }; }, { "add": "add"; "remove": "remove"; }, ["headerTemplate", "rowErrorTemplate", "rowControlTemplate", "footerTemplate", "zeroStateTemplate", "separatorTemplate", "ngFormGroupDirective", "rowTemplates"], never, true, never>;
|
|
105
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ArrayFormTableComponent, "acl-array-form-table", never, { "rowSeparator": { "alias": "rowSeparator"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "resourceName": { "alias": "resourceName"; "required": false; }; "resourceNameTranslated": { "alias": "resourceNameTranslated"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "addDisabled": { "alias": "addDisabled"; "required": false; }; "actionColumnDivider": { "alias": "actionColumnDivider"; "required": false; }; "showZeroState": { "alias": "showZeroState"; "required": false; }; "showRowError": { "alias": "showRowError"; "required": false; }; "rowBackgroundColorFn": { "alias": "rowBackgroundColorFn"; "required": false; }; "minRow": { "alias": "minRow"; "required": false; }; "minRowTooltip": { "alias": "minRowTooltip"; "required": false; }; "maxRow": { "alias": "maxRow"; "required": false; }; "maxRowTooltip": { "alias": "maxRowTooltip"; "required": false; }; }, { "add": "add"; "remove": "remove"; }, ["headerTemplate", "rowErrorTemplate", "rowControlTemplate", "footerTemplate", "zeroStateTemplate", "separatorTemplate", "ngFormGroupDirective", "rowTemplates"], never, true, never>;
|
|
102
106
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><rect width="20" height="20" rx="1"/><path d="M3.652 6.8h1.536c.106 0 .192.086.192.192v1.536a.192.192 0 0 1-.192.192H3.652a.192.192 0 0 1-.192-.192V6.992c0-.106.086-.192.192-.192Zm3.72 0h1.536c.106 0 .192.086.192.192v1.536a.192.192 0 0 1-.192.192H7.372a.192.192 0 0 1-.192-.192V6.992c0-.106.086-.192.192-.192Zm3.72 0h1.536c.106 0 .192.086.192.192v1.536a.192.192 0 0 1-.192.192h-1.536a.192.192 0 0 1-.192-.192V6.992c0-.106.086-.192.192-.192Zm3.72 0h1.536c.106 0 .192.086.192.192v1.536a.192.192 0 0 1-.192.192h-1.536a.192.192 0 0 1-.192-.192V6.992c0-.106.086-.192.192-.192Zm-11.16 4.48h1.536c.106 0 .192.086.192.192v1.536a.192.192 0 0 1-.192.192H3.652a.192.192 0 0 1-.192-.192v-1.536c0-.106.086-.192.192-.192Zm3.72 0h1.536c.106 0 .192.086.192.192v1.536a.192.192 0 0 1-.192.192H7.372a.192.192 0 0 1-.192-.192v-1.536c0-.106.086-.192.192-.192Zm3.72 0h1.536c.106 0 .192.086.192.192v1.536a.192.192 0 0 1-.192.192h-1.536a.192.192 0 0 1-.192-.192v-1.536c0-.106.086-.192.192-.192Zm3.72 0h1.536c.106 0 .192.086.192.192v1.536a.192.192 0 0 1-.192.192h-1.536a.192.192 0 0 1-.192-.192v-1.536c0-.106.086-.192.192-.192Z" fill="#646669"/></g></svg>
|
|
@@ -15,11 +15,12 @@ export declare class AuthorizationInterceptorService implements HttpInterceptor
|
|
|
15
15
|
private readonly dialog;
|
|
16
16
|
private readonly sessionManage;
|
|
17
17
|
private auth;
|
|
18
|
+
private sessionInvalidConfirm;
|
|
18
19
|
constructor(anonymousApis: Array<string | RegExp>, apiGateway: ApiGatewayService, injector: Injector, dialog: DialogService, sessionManage: SessionManageService);
|
|
19
20
|
intercept(req: HttpRequest<unknown>, next: HttpHandler): import("rxjs").Observable<import("@angular/common/http").HttpEvent<any>>;
|
|
20
21
|
isConsoleRelative(url: string): boolean;
|
|
21
|
-
private retryAuth;
|
|
22
22
|
private cloneReq;
|
|
23
|
+
private retryAuth;
|
|
23
24
|
private getAuth;
|
|
24
25
|
private needAuthorization;
|
|
25
26
|
private is401;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { PageVisibilityService } from '../api/page-visibility.service';
|
|
3
|
-
import { K8sApiService } from '../public-api';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
export declare const HEARTBEAT_POLLING = 15000;
|
|
5
5
|
export declare const SESSION_MANAGE_KEY = "session-manage-construct-time";
|
|
6
6
|
export declare class SessionManageService {
|
|
7
7
|
private readonly http;
|
|
8
8
|
private readonly pageVisibility;
|
|
9
|
-
private readonly k8sApi;
|
|
10
9
|
private readonly subscription;
|
|
11
10
|
private readonly visibility$;
|
|
12
|
-
private readonly policy$;
|
|
13
11
|
private readonly userAction$;
|
|
14
|
-
constructor(http: HttpClient, pageVisibility: PageVisibilityService,
|
|
12
|
+
constructor(http: HttpClient, pageVisibility: PageVisibilityService, disabled: boolean);
|
|
15
13
|
complete(): void;
|
|
16
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<SessionManageService, never>;
|
|
17
15
|
static ɵprov: i0.ɵɵInjectableDeclaration<SessionManageService>;
|
|
@@ -2,44 +2,45 @@ import { Observable } from 'rxjs';
|
|
|
2
2
|
import { AccountInfo } from '../page-scaffold/public-api';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export interface AuthorizationState {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
expireAt?: string;
|
|
6
|
+
issuedAt?: string;
|
|
7
7
|
state?: string;
|
|
8
8
|
authUrl?: string;
|
|
9
9
|
logoutUrl?: string;
|
|
10
|
+
info?: AccountInfo;
|
|
10
11
|
}
|
|
11
12
|
export interface TokenResponse {
|
|
12
|
-
token_storage:
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
token_storage: string;
|
|
14
|
+
token_type: string;
|
|
15
|
+
expire_at: string;
|
|
16
|
+
issued_at: string;
|
|
17
|
+
id_token?: string;
|
|
15
18
|
}
|
|
16
|
-
export type StorageType = 'local' | 'session';
|
|
17
19
|
export declare const STORAGE_TYPE_KEY = "token_storage";
|
|
18
|
-
export declare const ID_TOKEN_KEY = "id_token";
|
|
19
|
-
export declare const REFRESH_TOKEN_KEY = "refresh_token";
|
|
20
20
|
export declare const CODE_KEY = "code";
|
|
21
|
+
export declare const ID_TOKEN_KEY = "id_token";
|
|
21
22
|
export declare class AuthorizationStateService {
|
|
22
23
|
private readonly http;
|
|
23
|
-
private readonly refreshToken$$;
|
|
24
24
|
private readonly state$;
|
|
25
|
-
private checkTokenCache
|
|
25
|
+
private checkTokenCache$;
|
|
26
26
|
private refreshTokenCache$;
|
|
27
27
|
stateSnapshot: AuthorizationState;
|
|
28
28
|
payloadSnapshot: AccountInfo;
|
|
29
|
+
constructor();
|
|
29
30
|
logout(specificUrl?: boolean): void;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
checkToken(token: string): Observable<unknown>;
|
|
34
|
-
getToken(): Observable<string>;
|
|
31
|
+
private redirectToDex;
|
|
32
|
+
refreshToken(): Observable<TokenResponse>;
|
|
33
|
+
checkToken(): Observable<unknown>;
|
|
35
34
|
getTokenPayload<T>(): Observable<T>;
|
|
36
|
-
getAccountInfo(): Observable<
|
|
35
|
+
getAccountInfo(): Observable<any>;
|
|
36
|
+
getTokenByStorage(): string;
|
|
37
37
|
private getAuthConfiguration;
|
|
38
38
|
private getExistedToken;
|
|
39
39
|
private getTokenFromLocal;
|
|
40
|
-
private
|
|
41
|
-
private
|
|
40
|
+
private setCookieByCode;
|
|
41
|
+
private setCookieByToken;
|
|
42
42
|
private getParams;
|
|
43
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<AuthorizationStateService, never>;
|
|
44
44
|
static ɵprov: i0.ɵɵInjectableDeclaration<AuthorizationStateService>;
|
|
45
45
|
}
|
|
46
|
+
export declare function redirectSSOEntry(entry: string): string;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import { StorageType } from './state.service';
|
|
2
|
-
export interface StorageToken {
|
|
3
|
-
storageType: StorageType;
|
|
4
|
-
idToken: string;
|
|
5
|
-
refreshToken: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function readStorageType(): StorageType;
|
|
8
1
|
export declare function cleanStorageToken(): void;
|
|
9
|
-
export declare function writeStorageToken(token:
|
|
10
|
-
export declare function readStorageToken():
|
|
11
|
-
export declare function
|
|
2
|
+
export declare function writeStorageToken(token: string): void;
|
|
3
|
+
export declare function readStorageToken(): string;
|
|
4
|
+
export declare function refreshStorageAliveRecord(): void;
|
|
5
|
+
export declare function readStorageAliveRecord(): number;
|
|
@@ -69,6 +69,10 @@ export declare const POSITIVE_INT_PATTERN: {
|
|
|
69
69
|
pattern: RegExp;
|
|
70
70
|
tip: string;
|
|
71
71
|
};
|
|
72
|
+
export declare const POSITIVE_NUMBER_PATTERN: {
|
|
73
|
+
pattern: RegExp;
|
|
74
|
+
tip: string;
|
|
75
|
+
};
|
|
72
76
|
export declare const K8S_RESOURCE_NAME_BASE: {
|
|
73
77
|
pattern: RegExp;
|
|
74
78
|
tip: string;
|
|
@@ -17,6 +17,7 @@ export declare class FeatureGateDirective implements OnInit, OnDestroy {
|
|
|
17
17
|
private readonly crd;
|
|
18
18
|
featureName: string;
|
|
19
19
|
cluster: string;
|
|
20
|
+
negate: boolean;
|
|
20
21
|
set then(templateRef: TemplateRef<void>);
|
|
21
22
|
set else(templateRef: TemplateRef<void>);
|
|
22
23
|
private thenTemplateRef;
|
|
@@ -26,5 +27,5 @@ export declare class FeatureGateDirective implements OnInit, OnDestroy {
|
|
|
26
27
|
ngOnInit(): void;
|
|
27
28
|
ngOnDestroy(): void;
|
|
28
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<FeatureGateDirective, never>;
|
|
29
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<FeatureGateDirective, "[aclFeatureGate]", never, { "featureName": { "alias": "aclFeatureGate"; "required": false; }; "cluster": { "alias": "aclFeatureGateCluster"; "required": false; }; "then": { "alias": "aclFeatureGateThen"; "required": false; }; "else": { "alias": "aclFeatureGateElse"; "required": false; }; }, {}, never, never, true, never>;
|
|
30
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FeatureGateDirective, "[aclFeatureGate]", never, { "featureName": { "alias": "aclFeatureGate"; "required": false; }; "cluster": { "alias": "aclFeatureGateCluster"; "required": false; }; "negate": { "alias": "aclFeatureGateNegate"; "required": false; }; "then": { "alias": "aclFeatureGateThen"; "required": false; }; "else": { "alias": "aclFeatureGateElse"; "required": false; }; }, {}, never, never, true, never>;
|
|
30
31
|
}
|
package/core/module.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./pipes/
|
|
3
|
-
import * as i2 from "./pipes/
|
|
4
|
-
import * as i3 from "./pipes/
|
|
5
|
-
import * as i4 from "./pipes/
|
|
6
|
-
import * as i5 from "./pipes/
|
|
7
|
-
import * as i6 from "./
|
|
8
|
-
import * as i7 from "./directives/
|
|
9
|
-
import * as i8 from "./directives/
|
|
10
|
-
import * as i9 from "
|
|
11
|
-
import * as i10 from "@angular/
|
|
12
|
-
import * as i11 from "
|
|
13
|
-
import * as i12 from "
|
|
14
|
-
import * as i13 from "../
|
|
15
|
-
import * as i14 from "
|
|
16
|
-
import * as i15 from "./pipes/
|
|
17
|
-
import * as i16 from "./pipes/
|
|
18
|
-
import * as i17 from "./pipes/img-
|
|
19
|
-
import * as i18 from "./pipes/
|
|
20
|
-
import * as i19 from "./pipes/
|
|
21
|
-
import * as i20 from "./pipes/
|
|
2
|
+
import * as i1 from "./pipes/crontab-next.pipe";
|
|
3
|
+
import * as i2 from "./pipes/marked.pipe";
|
|
4
|
+
import * as i3 from "./pipes/page-env.pipe";
|
|
5
|
+
import * as i4 from "./pipes/timezone-display.pipe";
|
|
6
|
+
import * as i5 from "./pipes/cron-human-readable.pipe";
|
|
7
|
+
import * as i6 from "./directives/scroll-to-first-invalid.directive";
|
|
8
|
+
import * as i7 from "./directives/last-form-item.directive";
|
|
9
|
+
import * as i8 from "./directives/readonly-field.directive";
|
|
10
|
+
import * as i9 from "@angular/common";
|
|
11
|
+
import * as i10 from "@angular/forms";
|
|
12
|
+
import * as i11 from "./pipes/k8s-util.pipe.module";
|
|
13
|
+
import * as i12 from "../effect-directive/module";
|
|
14
|
+
import * as i13 from "../code/code.module";
|
|
15
|
+
import * as i14 from "./pipes/parse-json-translate.pipe";
|
|
16
|
+
import * as i15 from "./pipes/field-not-available.pipe";
|
|
17
|
+
import * as i16 from "./pipes/img-header.pipe";
|
|
18
|
+
import * as i17 from "./pipes/img-theme.pipe";
|
|
19
|
+
import * as i18 from "./pipes/safe.pipe";
|
|
20
|
+
import * as i19 from "./pipes/sanitize.pipe";
|
|
21
|
+
import * as i20 from "./pipes/time.pipe";
|
|
22
22
|
import * as i21 from "./directives/page-header-content.directive";
|
|
23
23
|
import * as i22 from "./directives/intercept-deactivate.directive";
|
|
24
24
|
import * as i23 from "./directives/disabled.directive";
|
|
@@ -29,6 +29,6 @@ import * as i27 from "./directives/feature-gate.directive";
|
|
|
29
29
|
import * as i28 from "./pipes/pure.pipe";
|
|
30
30
|
export declare class CoreModule {
|
|
31
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<CoreModule, never>;
|
|
32
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<CoreModule, [typeof i1.
|
|
32
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CoreModule, [typeof i1.CrontabNextPipe, typeof i2.MarkedPipe, typeof i3.LocaleTransformPipe, typeof i3.ThemeTransformPipe, typeof i4.TimezoneDisplayPipe, typeof i5.CronHumanReadablePipe, typeof i6.ScrollToFirstInvalidMarkerDirective, typeof i7.FormItemMarginEffectDirective, typeof i8.SpanComponent], [typeof i9.CommonModule, typeof i10.ReactiveFormsModule, typeof i11.K8sUtilPipeModule, typeof i12.EffectDirectiveModule, typeof i13.CodeModule, typeof i8.ReadonlyFieldDirective, typeof i14.ParseJsonTranslatePipe, typeof i15.FieldNotAvailablePipe, typeof i16.ImgHeaderPipe, typeof i17.ImgThemePipe, typeof i18.SafePipe, typeof i19.SanitizePipe, typeof i20.RelativeTimePipe, typeof i21.PageHeaderContentDirective, typeof i20.StandardTimePipe, typeof i6.ScrollToFirstInvalidDirective, typeof i22.InterceptDeactivateDirective, typeof i23.DisabledDirective, typeof i24.ClickOutsideDirective, typeof i25.ScrollBorderObserverDirective, typeof i26.ResizeDirective, typeof i27.FeatureGateDirective, typeof i28.PurePipe, typeof i20.StandardDatePipe], [typeof i1.CrontabNextPipe, typeof i2.MarkedPipe, typeof i3.LocaleTransformPipe, typeof i3.ThemeTransformPipe, typeof i4.TimezoneDisplayPipe, typeof i5.CronHumanReadablePipe, typeof i6.ScrollToFirstInvalidMarkerDirective, typeof i7.FormItemMarginEffectDirective, typeof i8.ReadonlyFieldDirective, typeof i14.ParseJsonTranslatePipe, typeof i15.FieldNotAvailablePipe, typeof i16.ImgHeaderPipe, typeof i17.ImgThemePipe, typeof i18.SafePipe, typeof i19.SanitizePipe, typeof i20.RelativeTimePipe, typeof i21.PageHeaderContentDirective, typeof i20.StandardTimePipe, typeof i6.ScrollToFirstInvalidDirective, typeof i22.InterceptDeactivateDirective, typeof i23.DisabledDirective, typeof i24.ClickOutsideDirective, typeof i25.ScrollBorderObserverDirective, typeof i26.ResizeDirective, typeof i27.FeatureGateDirective, typeof i28.PurePipe, typeof i20.StandardDatePipe, typeof i11.K8sUtilPipeModule, typeof i13.CodeModule, typeof i12.EffectDirectiveModule]>;
|
|
33
33
|
static ɵinj: i0.ɵɵInjectorDeclaration<CoreModule>;
|
|
34
34
|
}
|
|
@@ -4,7 +4,7 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
export declare class MinimumFormatPipe implements PipeTransform {
|
|
5
5
|
private readonly decimal;
|
|
6
6
|
constructor(decimal: DecimalPipe);
|
|
7
|
-
transform(value: number | string): string;
|
|
7
|
+
transform(value: number | string, decimalPlaces?: number): string;
|
|
8
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<MinimumFormatPipe, never>;
|
|
9
9
|
static ɵpipe: i0.ɵɵPipeDeclaration<MinimumFormatPipe, "aclMinimumFormat", true>;
|
|
10
10
|
}
|
|
@@ -37,5 +37,5 @@ export declare class StandardTimePipe extends DateTimePipe implements PipeTransf
|
|
|
37
37
|
export declare class StandardDatePipe extends DateTimePipe implements PipeTransform {
|
|
38
38
|
format: string;
|
|
39
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<StandardDatePipe, never>;
|
|
40
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<StandardDatePipe, "aclStandardDate",
|
|
40
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<StandardDatePipe, "aclStandardDate", true>;
|
|
41
41
|
}
|
|
@@ -21,13 +21,12 @@ import * as i0 from "@angular/core";
|
|
|
21
21
|
*/
|
|
22
22
|
export declare const CONTEXT_INIT_VALUE_TOKEN: InjectionToken<unknown>;
|
|
23
23
|
export declare class ContextService<T> {
|
|
24
|
-
private
|
|
24
|
+
private initValue;
|
|
25
25
|
private readonly value$$;
|
|
26
|
-
value$: Observable<T>;
|
|
27
|
-
constructor(initValue: T);
|
|
26
|
+
readonly value$: Observable<T>;
|
|
28
27
|
set(value?: T): void;
|
|
29
28
|
get(): T;
|
|
30
29
|
reset(): void;
|
|
31
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ContextService<any>,
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContextService<any>, never>;
|
|
32
31
|
static ɵprov: i0.ɵɵInjectableDeclaration<ContextService<any>>;
|
|
33
32
|
}
|
|
@@ -16,6 +16,7 @@ export declare class FeatureGateService {
|
|
|
16
16
|
* @param cluster - check gate for specified cluster
|
|
17
17
|
*/
|
|
18
18
|
isEnabled(gateName: string, cluster?: string): Observable<boolean>;
|
|
19
|
+
isNegateEnabled(gateName: string, cluster?: string): Observable<boolean>;
|
|
19
20
|
/**
|
|
20
21
|
* filter list with gate, send items without feature gate as begin push (can skip by passing `skipNoFeatureGatePush` argument with true)
|
|
21
22
|
* @param items - list need filter
|
|
@@ -3,10 +3,12 @@ import { WorkspaceParams } from '../types/public-api';
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class WorkspaceHelperService {
|
|
5
5
|
private readonly baseParams$$;
|
|
6
|
-
|
|
6
|
+
private _baseActivatedRoute;
|
|
7
7
|
readonly baseParams: import("rxjs").Observable<WorkspaceParams>;
|
|
8
8
|
get baseParamsSnapshot(): WorkspaceParams;
|
|
9
|
+
get baseActivatedRoute(): ActivatedRoute;
|
|
9
10
|
setBaseParams(params: WorkspaceParams): void;
|
|
11
|
+
setBaseActivatedRoute(route: ActivatedRoute): void;
|
|
10
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<WorkspaceHelperService, never>;
|
|
11
13
|
static ɵprov: i0.ɵɵInjectableDeclaration<WorkspaceHelperService>;
|
|
12
14
|
}
|
package/core/types/commons.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export interface Environments {
|
|
|
8
8
|
LABEL_BASE_DOMAIN?: string;
|
|
9
9
|
LOGO_URL?: string;
|
|
10
10
|
INNER_PROJECT_NS_PREFIX?: string;
|
|
11
|
+
CPAAS_SESSION_SWITCH?: 'on' | 'off';
|
|
12
|
+
CLOSE_BROWSER_END_SESSION?: string;
|
|
11
13
|
}
|
|
12
14
|
export interface ResourceListParams extends StringMap {
|
|
13
15
|
limit?: string;
|
package/core/types/k8s/crd.d.ts
CHANGED
|
@@ -639,4 +639,68 @@ export interface UserBindingSpec {
|
|
|
639
639
|
namespace?: string;
|
|
640
640
|
}>;
|
|
641
641
|
}
|
|
642
|
+
export interface RoleRule {
|
|
643
|
+
module: string;
|
|
644
|
+
functionResourceRef: string;
|
|
645
|
+
functionMetadataName?: string;
|
|
646
|
+
verbs: string[];
|
|
647
|
+
}
|
|
648
|
+
export interface RoleCustomRule {
|
|
649
|
+
apiGroup: string;
|
|
650
|
+
resources: string[];
|
|
651
|
+
verbs: string[];
|
|
652
|
+
}
|
|
653
|
+
export interface RoleTemplateSpec {
|
|
654
|
+
rules?: RoleRule[];
|
|
655
|
+
customRules?: RoleCustomRule[];
|
|
656
|
+
}
|
|
657
|
+
export interface RoleTemplate extends KubernetesResource {
|
|
658
|
+
spec?: RoleTemplateSpec;
|
|
659
|
+
}
|
|
660
|
+
export interface UserRoleNamespace {
|
|
661
|
+
namespace: string;
|
|
662
|
+
cluster: string;
|
|
663
|
+
}
|
|
664
|
+
export interface UserRole extends KubernetesResource {
|
|
665
|
+
name?: string;
|
|
666
|
+
roles?: string[];
|
|
667
|
+
namespaces?: Record<string, UserRoleNamespace[]>;
|
|
668
|
+
}
|
|
669
|
+
export interface User extends KubernetesResource {
|
|
670
|
+
spec?: UserSpec;
|
|
671
|
+
}
|
|
672
|
+
export interface UserSpec {
|
|
673
|
+
connector_name?: string;
|
|
674
|
+
connector_type?: string;
|
|
675
|
+
email?: string;
|
|
676
|
+
mail?: string;
|
|
677
|
+
groups?: string[];
|
|
678
|
+
is_admin?: boolean;
|
|
679
|
+
valid?: boolean;
|
|
680
|
+
username?: string;
|
|
681
|
+
old_password?: string;
|
|
682
|
+
password?: string;
|
|
683
|
+
last_login_time?: string;
|
|
684
|
+
login_failure_times?: number;
|
|
685
|
+
state?: UserState;
|
|
686
|
+
is_disabled?: boolean;
|
|
687
|
+
expired?: {
|
|
688
|
+
begin: string;
|
|
689
|
+
end: string;
|
|
690
|
+
};
|
|
691
|
+
mobile?: string;
|
|
692
|
+
webhookType?: WebhookType;
|
|
693
|
+
webhookUrl?: string;
|
|
694
|
+
ids?: Array<{
|
|
695
|
+
type: string;
|
|
696
|
+
id: string;
|
|
697
|
+
}>;
|
|
698
|
+
}
|
|
699
|
+
export declare enum UserState {
|
|
700
|
+
ACTIVE = "active",
|
|
701
|
+
LOCKED = "locked",
|
|
702
|
+
INVALID = "invalid",
|
|
703
|
+
DELETED = "deleted"
|
|
704
|
+
}
|
|
705
|
+
export type WebhookType = 'Webhook' | 'DingTalk' | 'WeChat';
|
|
642
706
|
export {};
|
|
@@ -336,7 +336,7 @@ export declare const COMMON_RESOURCE_DEFINITIONS: {
|
|
|
336
336
|
readonly apiVersion: string;
|
|
337
337
|
readonly apiGroup: string;
|
|
338
338
|
};
|
|
339
|
-
readonly
|
|
339
|
+
readonly USER_BINDING: {
|
|
340
340
|
readonly type: string;
|
|
341
341
|
readonly apiGroup: string;
|
|
342
342
|
readonly apiVersion: string;
|
|
@@ -447,7 +447,7 @@ export declare const RESOURCE_TYPES: {
|
|
|
447
447
|
readonly PRODUCT_DOCS_ENTRY: "PRODUCT_DOCS_ENTRY";
|
|
448
448
|
readonly SERVICEMESH_GROUP: "SERVICEMESH_GROUP";
|
|
449
449
|
readonly CLUSTER_MODULE: "CLUSTER_MODULE";
|
|
450
|
-
readonly
|
|
450
|
+
readonly USER_BINDING: "USER_BINDING";
|
|
451
451
|
readonly BATCH_ACTION: "BATCH_ACTION";
|
|
452
452
|
readonly EVENT: "EVENT";
|
|
453
453
|
readonly SERVICE_MONITOR: "SERVICE_MONITOR";
|
|
@@ -455,7 +455,7 @@ export declare const RESOURCE_TYPES: {
|
|
|
455
455
|
readonly ARGOCD_APPLICATION_SET: "ARGOCD_APPLICATION_SET";
|
|
456
456
|
readonly ARGOCD_APPLICATION: "ARGOCD_APPLICATION";
|
|
457
457
|
};
|
|
458
|
-
export declare const getYamlApiVersion: (definition: "ALAUDA_LOADBALANCER2" | "ALB2" | "HELM_REQUEST" | "HELM_REQUEST_V1" | "DEPLOYMENT" | "FRONTEND" | "RULE" | "POD" | "PODS_EXEC" | "PODS_ROOT_EXEC" | "CONFIG_MAP" | "ALERT_TEMPLATE" | "APPLICATION" | "APPLICATION_HISTORY" | "CLUSTER" | "CLUSTER_VIEW" | "DAEMON_SET" | "STATEFUL_SET" | "DOMAIN" | "FEATURE" | "ALAUDA_FEATURE_GATE" | "CLUSTER_ALAUDA_FEATURE_GATE" | "HORIZONTAL_POD_AUTOSCALER" | "LOG" | "PROJECT" | "PROMETHEUS_RULE" | "ALERT_HISTORY" | "SELF_SUBJECT_ACCESS_REVIEW" | "VIEW" | "SERVICE" | "LIMIT_RANGE" | "SECRET" | "PRODUCT" | "CRON_JOB" | "ADVANCED_CRON_JOB" | "JOB" | "INGRESS" | "PERSISTENT_VOLUME_CLAIM" | "NAMESPACE" | "NODE" | "NODE_METRICS" | "PV" | "CRD" | "CHART_REPO" | "CHART" | "NETWORK_POLICY" | "SERVICE_ACCOUNT" | "REPLICA_SET" | "POD_SECURITY_POLICY" | "NAMESPACE_OVERVIEW" | "CSP" | "RESOURCE_QUOTA" | "CLUSTER_NETWORK_POLICY" | "VIRTUAL_MACHINE" | "VIRTUAL_MACHINE_INSTANCE" | "VIRTUAL_MACHINE_POOL" | "PROJECT_QUOTA" | "TKE_CLUSTER" | "TKE_MACHINE" | "MACHINE" | "NODE_GROUP" | "CLUSTERSERVICEVERSION" | "TENANT" | "SUBSCRIPTION" | "PACKAGE_MANIFEST" | "BUCKET_CLASS" | "PRODUCT_CONFIG" | "STORAGE_CLASS" | "VOLUME_SNAPSHOT_CLASS" | "PRODUCT_BASE" | "MODULE_INFO" | "PRODUCT_ENTRY" | "PRODUCT_DOCS_ENTRY" | "SERVICEMESH_GROUP" | "CLUSTER_MODULE" | "
|
|
458
|
+
export declare const getYamlApiVersion: (definition: "ALAUDA_LOADBALANCER2" | "ALB2" | "HELM_REQUEST" | "HELM_REQUEST_V1" | "DEPLOYMENT" | "FRONTEND" | "RULE" | "POD" | "PODS_EXEC" | "PODS_ROOT_EXEC" | "CONFIG_MAP" | "ALERT_TEMPLATE" | "APPLICATION" | "APPLICATION_HISTORY" | "CLUSTER" | "CLUSTER_VIEW" | "DAEMON_SET" | "STATEFUL_SET" | "DOMAIN" | "FEATURE" | "ALAUDA_FEATURE_GATE" | "CLUSTER_ALAUDA_FEATURE_GATE" | "HORIZONTAL_POD_AUTOSCALER" | "LOG" | "PROJECT" | "PROMETHEUS_RULE" | "ALERT_HISTORY" | "SELF_SUBJECT_ACCESS_REVIEW" | "VIEW" | "SERVICE" | "LIMIT_RANGE" | "SECRET" | "PRODUCT" | "CRON_JOB" | "ADVANCED_CRON_JOB" | "JOB" | "INGRESS" | "PERSISTENT_VOLUME_CLAIM" | "NAMESPACE" | "NODE" | "NODE_METRICS" | "PV" | "CRD" | "CHART_REPO" | "CHART" | "NETWORK_POLICY" | "SERVICE_ACCOUNT" | "REPLICA_SET" | "POD_SECURITY_POLICY" | "NAMESPACE_OVERVIEW" | "CSP" | "RESOURCE_QUOTA" | "CLUSTER_NETWORK_POLICY" | "VIRTUAL_MACHINE" | "VIRTUAL_MACHINE_INSTANCE" | "VIRTUAL_MACHINE_POOL" | "PROJECT_QUOTA" | "TKE_CLUSTER" | "TKE_MACHINE" | "MACHINE" | "NODE_GROUP" | "CLUSTERSERVICEVERSION" | "TENANT" | "SUBSCRIPTION" | "PACKAGE_MANIFEST" | "BUCKET_CLASS" | "PRODUCT_CONFIG" | "STORAGE_CLASS" | "VOLUME_SNAPSHOT_CLASS" | "PRODUCT_BASE" | "MODULE_INFO" | "PRODUCT_ENTRY" | "PRODUCT_DOCS_ENTRY" | "SERVICEMESH_GROUP" | "CLUSTER_MODULE" | "USER_BINDING" | "BATCH_ACTION" | "EVENT" | "SERVICE_MONITOR" | "OAM_APPLICATION" | "ARGOCD_APPLICATION_SET" | "ARGOCD_APPLICATION" | {
|
|
459
459
|
apiGroup: string;
|
|
460
460
|
type: string;
|
|
461
461
|
} | {
|
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
import { MonoTypeOperatorFunction, Observable } from 'rxjs';
|
|
2
|
-
export declare class CacheStore<
|
|
2
|
+
export declare class CacheStore<P, V> {
|
|
3
3
|
private readonly fetcher;
|
|
4
|
-
private readonly idGenerator;
|
|
5
4
|
private readonly share;
|
|
5
|
+
private readonly validator;
|
|
6
6
|
private readonly store;
|
|
7
|
-
constructor({
|
|
7
|
+
constructor({ fetcher, share, validator }: CacheStoreOptions<V, P>);
|
|
8
8
|
fetchState(params: P): Observable<CacheLoadState<V>>;
|
|
9
9
|
fetch(params: P): Observable<V>;
|
|
10
10
|
refetch(params: P): void;
|
|
11
11
|
refetchAll(): void;
|
|
12
|
-
|
|
12
|
+
get(params: P): Cache<V>;
|
|
13
13
|
has(params: P): boolean;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
delete(params: P): void;
|
|
15
|
+
clear(): void;
|
|
16
|
+
forEach: (callbackfn: (value: Cache<V>, key: P, map: Map<P, Cache<V>>) => void, thisArg?: any) => void;
|
|
17
|
+
entries: () => IterableIterator<[P, Cache<V>]>;
|
|
18
|
+
values: () => IterableIterator<Cache<V>>;
|
|
19
|
+
keys: () => IterableIterator<P>;
|
|
18
20
|
}
|
|
19
|
-
export interface CacheStoreOptions<V, P
|
|
21
|
+
export interface CacheStoreOptions<V, P> {
|
|
20
22
|
fetcher: (params: P) => Observable<V>;
|
|
21
|
-
idGenerator?: (params: P) => K;
|
|
22
23
|
share?: <T>() => MonoTypeOperatorFunction<T>;
|
|
24
|
+
validator?: (value: V) => boolean;
|
|
23
25
|
}
|
|
24
26
|
export interface CacheLoadState<V> {
|
|
25
27
|
state: 'loading' | 'loaded' | 'loadFailed';
|
|
26
28
|
result?: V;
|
|
27
29
|
error?: unknown;
|
|
28
30
|
}
|
|
29
|
-
export interface Cache<
|
|
30
|
-
params: P;
|
|
31
|
-
refetch: () => void;
|
|
31
|
+
export interface Cache<V> {
|
|
32
32
|
loadState: Observable<CacheLoadState<V>>;
|
|
33
|
+
refetch: () => void;
|
|
34
|
+
finish: () => void;
|
|
33
35
|
}
|
package/core/utils/common.d.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* @module utils
|
|
4
4
|
*/
|
|
5
5
|
import { Sort } from '@alauda/ui';
|
|
6
|
-
import { ActivatedRouteSnapshot } from '@angular/router';
|
|
7
6
|
import { UnionToIntersection } from 'ts-essentials';
|
|
8
7
|
import { Terminal } from 'xterm';
|
|
9
8
|
import { Callback, Keys, KubernetesResource, Nullable, Readonlyable } from '../types/public-api';
|
|
@@ -57,4 +56,4 @@ export declare const parseImageAddress: (addr: string) => {
|
|
|
57
56
|
};
|
|
58
57
|
export declare const setWindowsXtermTools: (xterm: Terminal) => void;
|
|
59
58
|
export declare const clearWindowsXtermTools: () => void;
|
|
60
|
-
export declare
|
|
59
|
+
export declare const buildUrl: (baseUri: string, params?: Record<string, string | boolean>) => string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CustomBeforeAction } from '@alauda/ui';
|
|
2
|
+
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
3
|
+
import { ButtonPosition, EditableMode } from './editable.type';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class EditableComponent {
|
|
6
|
+
beforeSave: import("@angular/core").InputSignal<CustomBeforeAction<unknown>>;
|
|
7
|
+
position: import("@angular/core").InputSignal<ButtonPosition>;
|
|
8
|
+
save: EventEmitter<void>;
|
|
9
|
+
cancel: EventEmitter<void>;
|
|
10
|
+
modeChange: EventEmitter<EditableMode>;
|
|
11
|
+
viewer: TemplateRef<unknown>;
|
|
12
|
+
editor: TemplateRef<unknown>;
|
|
13
|
+
EditableMode: typeof EditableMode;
|
|
14
|
+
bem: import("@alauda/ui").Bem;
|
|
15
|
+
loading: boolean;
|
|
16
|
+
mode: import("@angular/core").WritableSignal<EditableMode>;
|
|
17
|
+
hostClass: import("@angular/core").Signal<string>;
|
|
18
|
+
constructor();
|
|
19
|
+
saveEdit(): void;
|
|
20
|
+
cancelEdit(): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditableComponent, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EditableComponent, "acl-editable", never, { "beforeSave": { "alias": "beforeSave"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; }, { "save": "save"; "cancel": "cancel"; "modeChange": "modeChange"; }, ["viewer", "editor"], never, true, never>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class EditableViewerDirective {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditableViewerDirective, never>;
|
|
4
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EditableViewerDirective, "*[aclEditableViewer]", never, {}, {}, never, never, true, never>;
|
|
5
|
+
}
|
|
6
|
+
export declare class EditableEditorDirective {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditableEditorDirective, never>;
|
|
8
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EditableEditorDirective, "*[aclEditableEditor]", never, {}, {}, never, never, true, never>;
|
|
9
|
+
}
|
|
@@ -1,11 +1,47 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
+
export declare enum PreventHandler {
|
|
3
|
+
Contextmenu = "contextmenu",
|
|
4
|
+
Paste = "paste",
|
|
5
|
+
Cut = "cut",
|
|
6
|
+
Copy = "copy"
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 阻止点击事件
|
|
10
|
+
*/
|
|
2
11
|
export declare class PreventDirective {
|
|
3
12
|
prevent: boolean;
|
|
4
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<PreventDirective, never>;
|
|
5
14
|
static ɵdir: i0.ɵɵDirectiveDeclaration<PreventDirective, "[prevent]", never, { "prevent": { "alias": "prevent"; "required": false; }; }, {}, never, never, true, never>;
|
|
6
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* 阻止冒泡事件
|
|
18
|
+
*/
|
|
7
19
|
export declare class StopDirective {
|
|
8
20
|
stop: boolean;
|
|
9
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<StopDirective, never>;
|
|
10
22
|
static ɵdir: i0.ɵɵDirectiveDeclaration<StopDirective, "[stop]", never, { "stop": { "alias": "stop"; "required": false; }; }, {}, never, never, true, never>;
|
|
11
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* 阻止剪切板(拷贝、粘贴、剪切、右键菜单)等事件
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
*
|
|
29
|
+
* 阻止全部:
|
|
30
|
+
* ```
|
|
31
|
+
* <input aui-input aclPreventEvent>
|
|
32
|
+
* ```
|
|
33
|
+
* 自定义:
|
|
34
|
+
* ```
|
|
35
|
+
* <input aui-input [aclPreventEvent]="{copy: true, paste: true}">
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export declare class PreventClipboardDirective {
|
|
39
|
+
preventClipboardEvent: boolean | '' | Partial<Record<PreventHandler, boolean>>;
|
|
40
|
+
private isPreventEvent;
|
|
41
|
+
onContextmenu(event: Event): void;
|
|
42
|
+
onCut(event: Event): void;
|
|
43
|
+
onPaste(event: Event): void;
|
|
44
|
+
onCopy(event: Event): void;
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PreventClipboardDirective, never>;
|
|
46
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PreventClipboardDirective, "input[aclPreventClipboardEvent]", never, { "preventClipboardEvent": { "alias": "aclPreventClipboardEvent"; "required": false; }; }, {}, never, never, true, never>;
|
|
47
|
+
}
|