@alauda-fe/dynamic-plugin-shared 0.0.1-alpha.11 → 0.0.1-alpha.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/array-form-table/form/component.d.ts +1 -1
  2. package/assets/images/overview-banner.svg +1 -0
  3. package/components/deleting-tag/component.d.ts +7 -0
  4. package/components/field-set/item/component.d.ts +1 -1
  5. package/components/index.d.ts +6 -1
  6. package/components/list-display/component.d.ts +15 -0
  7. package/components/multi-search/action-input/component.d.ts +122 -0
  8. package/components/multi-search/form/component.d.ts +66 -0
  9. package/components/multi-search/index.d.ts +4 -0
  10. package/components/multi-search/multi-search-tags/component.d.ts +27 -0
  11. package/components/multi-search/types.d.ts +33 -0
  12. package/components/multi-search/utils.d.ts +24 -0
  13. package/components/mutable/directive.d.ts +83 -0
  14. package/components/mutable/element.d.ts +10 -0
  15. package/components/mutable/index.d.ts +8 -0
  16. package/components/mutable/mosaic/component.d.ts +32 -0
  17. package/components/mutable/mosaic/directive.d.ts +9 -0
  18. package/components/mutable/util.d.ts +18 -0
  19. package/components/namespace-selector/component.d.ts +4 -4
  20. package/components/namespace-selector/index.d.ts +0 -1
  21. package/components/overview-banner/component.d.ts +11 -0
  22. package/components/table/component.d.ts +88 -0
  23. package/components/table/constants.d.ts +3 -0
  24. package/components/table/helper.d.ts +2 -0
  25. package/components/table/helpers.directive.d.ts +21 -0
  26. package/components/table/index.d.ts +5 -0
  27. package/components/table/types.d.ts +71 -0
  28. package/components/table/util.service.d.ts +13 -0
  29. package/directives/scroll-border-observer.directive.d.ts +1 -1
  30. package/directives/scroll-to-first-invalid.directive.d.ts +1 -1
  31. package/esm2022/components/deleting-tag/component.mjs +16 -0
  32. package/esm2022/components/index.mjs +7 -2
  33. package/esm2022/components/list-display/component.mjs +46 -0
  34. package/esm2022/components/multi-search/action-input/component.mjs +675 -0
  35. package/esm2022/components/multi-search/form/component.mjs +322 -0
  36. package/esm2022/components/multi-search/index.mjs +5 -0
  37. package/esm2022/components/multi-search/multi-search-tags/component.mjs +67 -0
  38. package/esm2022/components/multi-search/types.mjs +2 -0
  39. package/esm2022/components/multi-search/utils.mjs +46 -0
  40. package/esm2022/components/mutable/directive.mjs +351 -0
  41. package/esm2022/components/mutable/element.mjs +23 -0
  42. package/esm2022/components/mutable/index.mjs +15 -0
  43. package/esm2022/components/mutable/mosaic/component.mjs +76 -0
  44. package/esm2022/components/mutable/mosaic/directive.mjs +24 -0
  45. package/esm2022/components/mutable/util.mjs +16 -0
  46. package/esm2022/components/namespace-selector/component.mjs +18 -14
  47. package/esm2022/components/namespace-selector/index.mjs +1 -2
  48. package/esm2022/components/overview-banner/component.mjs +17 -0
  49. package/esm2022/components/table/component.mjs +321 -0
  50. package/esm2022/components/table/constants.mjs +4 -0
  51. package/esm2022/components/table/helper.mjs +16 -0
  52. package/esm2022/components/table/helpers.directive.mjs +19 -0
  53. package/esm2022/components/table/index.mjs +6 -0
  54. package/esm2022/components/table/types.mjs +2 -0
  55. package/esm2022/components/table/util.service.mjs +81 -0
  56. package/esm2022/form/base-form-container.mjs +2 -2
  57. package/esm2022/k8s-resource-list/footer/component.mjs +3 -3
  58. package/esm2022/page-deactivate/deactivate.directive.mjs +2 -2
  59. package/esm2022/page-deactivate/deactivate.guard.mjs +2 -3
  60. package/esm2022/page-deactivate/deactivate.service.mjs +4 -14
  61. package/fesm2022/alauda-fe-dynamic-plugin-shared.mjs +2243 -325
  62. package/fesm2022/alauda-fe-dynamic-plugin-shared.mjs.map +1 -1
  63. package/form/base-nested-form-control.d.ts +1 -1
  64. package/k8s-resource-list/k8s-resource-paged-list.d.ts +2 -2
  65. package/package.json +1 -1
  66. package/page-deactivate/deactivate.guard.d.ts +0 -2
  67. package/page-deactivate/deactivate.service.d.ts +1 -1
  68. package/styles/lib.scss +1 -1
  69. package/components/namespace-selector/selector-popup/component.d.ts +0 -13
  70. package/components/namespace-selector/selector-popup/ref.d.ts +0 -10
  71. package/components/namespace-selector/selector-popup/service.d.ts +0 -20
  72. package/components/terminating-tag/component.d.ts +0 -7
  73. package/esm2022/components/namespace-selector/selector-popup/component.mjs +0 -24
  74. package/esm2022/components/namespace-selector/selector-popup/ref.mjs +0 -20
  75. package/esm2022/components/namespace-selector/selector-popup/service.mjs +0 -61
  76. package/esm2022/components/terminating-tag/component.mjs +0 -16
@@ -82,7 +82,7 @@ export declare class ArrayFormTableComponent implements OnDestroy {
82
82
  addDisabled: boolean | '';
83
83
  actionColumnDivider: boolean | '';
84
84
  showZeroState: boolean;
85
- get formDirective(): FormGroupDirective | NgForm;
85
+ get formDirective(): NgForm | FormGroupDirective;
86
86
  /**
87
87
  * 自定义是否展示错误内容
88
88
  * 例如 control 是 FormGroup,只有在内部子 control 错误时才需要展示错误内容
@@ -0,0 +1 @@
1
+ <svg width="1160" height="100" viewBox="0 0 1160 100" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><linearGradient x1="14.942%" y1="0%" x2="83.161%" y2="96.984%" id="b"><stop stop-color="#FFF" offset="0%"/><stop stop-color="#FFF" stop-opacity="0" offset="100%"/></linearGradient><linearGradient x1="14.942%" y1="0%" x2="83.161%" y2="96.984%" id="d"><stop stop-color="#FFF" stop-opacity="0" offset="0%"/><stop stop-color="#FFF" offset="100%"/></linearGradient><linearGradient x1="56.396%" y1="-7.466%" x2="56.396%" y2="96.489%" id="e"><stop stop-color="#FFF" offset="0%"/><stop stop-color="#FFF" stop-opacity=".22" offset="100%"/></linearGradient><path id="a" d="M0 0h1160v100H0z"/></defs><g fill="none" fill-rule="evenodd"><mask id="c" fill="#fff"><use xlink:href="#a"/></mask><circle fill="url(#b)" fill-rule="nonzero" opacity=".2" mask="url(#c)" cx="36" cy="114" r="64"/><circle fill="url(#d)" fill-rule="nonzero" opacity=".1" mask="url(#c)" cx="707" cy="-25" r="64"/><circle fill="url(#b)" fill-rule="nonzero" opacity=".15" mask="url(#c)" cx="297.5" cy="23.5" r="17.5"/><circle fill="url(#b)" fill-rule="nonzero" opacity=".15" mask="url(#c)" cx="1029" cy="15" r="9"/><g opacity=".6" mask="url(#c)"><g stroke="#FFF" opacity=".2"><path d="M368.815-57.48c1.262 54.104 30.914 96.954 90.684 119.126 144.942 53.767 412.112-34.434 596.741-197 83.623-73.631 135.971-149.889 154.754-216.285"/><path d="M365.213-66.865c1.262 54.104 30.914 96.955 90.683 119.127 144.942 53.767 412.113-34.434 596.742-197.001 83.623-73.63 135.971-149.888 154.753-216.284"/><path d="M361.61-76.25c1.263 54.105 30.914 96.956 90.684 119.128 144.942 53.766 412.112-34.434 596.742-197.001 83.623-73.63 135.97-149.888 154.753-216.284"/><path d="M358.008-85.634c1.262 54.105 30.914 96.956 90.684 119.128C593.634 87.26 860.804-.94 1045.434-163.507c83.622-73.63 135.97-149.888 154.753-216.284"/><path d="M354.406-95.018C355.668-40.913 385.32 1.938 445.09 24.11c144.942 53.767 412.112-34.433 596.741-197 83.623-73.631 135.971-149.888 154.754-216.284"/><path d="M350.804-104.402c1.262 54.105 30.913 96.955 90.683 119.127 144.942 53.767 412.113-34.434 596.742-197 83.623-73.631 135.971-149.889 154.753-216.285"/><path d="M347.201-113.786c1.263 54.104 30.914 96.955 90.684 119.127 144.942 53.767 412.112-34.434 596.742-197.001 83.623-73.63 135.97-149.888 154.753-216.284"/><path d="M372.417-48.097C373.68 6.008 403.331 48.86 463.101 71.03c144.942 53.767 412.112-34.433 596.742-197 83.622-73.631 135.97-149.888 154.753-216.284"/><path d="M376.02-38.713c1.262 54.105 30.913 96.956 90.683 119.128 144.942 53.766 412.112-34.434 596.742-197.001 83.623-73.63 135.97-149.888 154.753-216.284"/><path d="M379.622-29.328c1.262 54.104 30.914 96.955 90.683 119.127 144.942 53.766 412.113-34.434 596.742-197.001 83.623-73.63 135.971-149.888 154.753-216.284"/><path d="M383.224-19.944c1.262 54.104 30.914 96.955 90.684 119.127C618.85 152.95 886.02 64.749 1070.649-97.818c83.623-73.63 135.971-149.888 154.754-216.284"/><path d="M386.826-10.56c1.263 54.105 30.914 96.956 90.684 119.127 144.942 53.767 412.112-34.434 596.742-197 83.623-73.631 135.97-149.889 154.753-216.284"/><path d="M390.428-1.176c1.263 54.105 30.914 96.956 90.684 119.127 144.942 53.767 412.113-34.433 596.742-197 83.623-73.631 135.97-149.888 154.753-216.284"/></g></g><path d="M1089.5 15c28.995 0 52.5 23.505 52.5 52.5s-26.25 52.5-52.5 52.5-52.5-23.505-52.5-52.5 23.505-52.5 52.5-52.5Z" fill="url(#e)" fill-rule="nonzero" opacity=".12" mask="url(#c)"/></g></svg>
@@ -0,0 +1,7 @@
1
+ import { KubernetesResource } from '../../types';
2
+ import * as i0 from "@angular/core";
3
+ export declare class DeletingTagComponent {
4
+ resource: KubernetesResource;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<DeletingTagComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<DeletingTagComponent, "acl-deleting-tag", never, { "resource": { "alias": "resource"; "required": false; }; }, {}, never, never, true, never>;
7
+ }
@@ -3,7 +3,7 @@ export declare class FieldSetItemComponent {
3
3
  allowFullWidth: boolean;
4
4
  allowOverflow: boolean;
5
5
  allowWrap: boolean;
6
- get align(): "center" | "flex-start";
6
+ get align(): "flex-start" | "center";
7
7
  static ɵfac: i0.ɵɵFactoryDeclaration<FieldSetItemComponent, never>;
8
8
  static ɵcmp: i0.ɵɵComponentDeclaration<FieldSetItemComponent, "acl-field-set-item", never, { "allowFullWidth": { "alias": "allowFullWidth"; "required": false; }; "allowOverflow": { "alias": "allowOverflow"; "required": false; }; "allowWrap": { "alias": "allowWrap"; "required": false; }; }, {}, never, ["label", "*", "[aclFieldSetItemAction]"], true, never>;
9
9
  }
@@ -7,7 +7,7 @@ export * from './zero-state/zero-state.component';
7
7
  export * from './relative-time/component';
8
8
  export * from './foldable-block/component';
9
9
  export * from './foldable-item-in-table/component';
10
- export * from './terminating-tag/component';
10
+ export * from './deleting-tag/component';
11
11
  export * from './text-with-url/component';
12
12
  export * from './card-section/card-section.component';
13
13
  export * from './current-time/component';
@@ -30,6 +30,11 @@ export * from './disabled-container';
30
30
  export * from './upload-file/component';
31
31
  export * from './help-document';
32
32
  export * from './page-guard';
33
+ export * from './list-display/component';
34
+ export * from './overview-banner/component';
35
+ export * from './multi-search';
36
+ export * from './mutable';
37
+ export * from './table';
33
38
  export * from './namespace-selector';
34
39
  export * from './namespace-badge/component';
35
40
  export * from './test-tag/component';
@@ -0,0 +1,15 @@
1
+ import { TemplateRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ListDisplayComponent<T> {
4
+ data: T[];
5
+ threshold: number;
6
+ mode: 'total' | 'more';
7
+ direction: 'row' | 'column';
8
+ template: TemplateRef<any>;
9
+ childTemplate: TemplateRef<any>;
10
+ templateContext(item: T): T & {
11
+ $implicit: T;
12
+ };
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<ListDisplayComponent<any>, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<ListDisplayComponent<any>, "acl-list-display", never, { "data": { "alias": "data"; "required": false; }; "threshold": { "alias": "threshold"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "template": { "alias": "template"; "required": false; }; }, {}, ["childTemplate"], never, true, never>;
15
+ }
@@ -0,0 +1,122 @@
1
+ import { TooltipDirective, InputComponent } from '@alauda/ui';
2
+ import { EventEmitter, Injector, OnDestroy } from '@angular/core';
3
+ import { FormControl } from '@angular/forms';
4
+ import { BaseResourceFormComponent } from 'ng-resource-form-util';
5
+ import { BehaviorSubject, Observable } from 'rxjs';
6
+ import { MultiSearchComponent } from '../form/component';
7
+ import { SearchConditionConfig, SearchConditionModel, MultiSearchOption } from '../types';
8
+ import * as i0 from "@angular/core";
9
+ export declare class MultiSearchActionInputComponent extends BaseResourceFormComponent<SearchConditionModel> implements OnDestroy {
10
+ injector: Injector;
11
+ private readonly multiSearch;
12
+ placeholder: string;
13
+ conditionCreatable: boolean;
14
+ isEditing: boolean;
15
+ hidden: boolean;
16
+ hidden$: Observable<boolean>;
17
+ autoScroll: boolean;
18
+ conditionConfig: SearchConditionConfig[];
19
+ showFootAction: boolean;
20
+ conditionConfig$: Observable<SearchConditionConfig[]>;
21
+ existingConditions: SearchConditionModel[];
22
+ existingConditions$: Observable<SearchConditionModel[]>;
23
+ completed: EventEmitter<{
24
+ activeCondition: SearchConditionModel;
25
+ toContinue?: boolean;
26
+ manualFocus?: boolean;
27
+ }>;
28
+ editing: EventEmitter<void>;
29
+ delete: EventEmitter<void>;
30
+ search: EventEmitter<void>;
31
+ inputRef: InputComponent;
32
+ toolTipRef: TooltipDirective;
33
+ get hiddenState(): boolean;
34
+ _conditionsModel: string;
35
+ get conditionsModel(): string;
36
+ set conditionsModel(v: string);
37
+ conditionsModel$$: BehaviorSubject<string>;
38
+ hasFilteredConditions$: Observable<boolean>;
39
+ conditionsShouldShow$: Observable<string | boolean>;
40
+ normalConditionsResource$: Observable<SearchConditionConfig[]>;
41
+ normalConditions$: Observable<SearchConditionConfig[]>;
42
+ groupConditionsResource$: Observable<{
43
+ group: string;
44
+ member: SearchConditionConfig[];
45
+ }[]>;
46
+ groupConditions$: Observable<{
47
+ group: string;
48
+ member: SearchConditionConfig[];
49
+ }[]>;
50
+ hasFilteredValues: (activeCondition: SearchConditionModel, model: string, isMulti?: boolean) => boolean;
51
+ getNormalValues: (activeCondition: SearchConditionModel, model: string, isMulti?: boolean) => MultiSearchOption[];
52
+ getValuesGroup: (activeCondition: SearchConditionModel, model: string, isMulti: boolean) => {
53
+ group: string;
54
+ member: MultiSearchOption[];
55
+ }[];
56
+ valuesFilter(conditions: MultiSearchOption[], condition: MultiSearchOption, separator: string, isMulti?: boolean): boolean;
57
+ get isConditionSelecting(): boolean;
58
+ get isOperatorSelecting(): boolean;
59
+ get isValueSelecting(): string;
60
+ get isInitialized(): boolean;
61
+ get isOperationComplete(): MultiSearchOption;
62
+ get isSelectAll(): boolean;
63
+ get isIndeterminate(): boolean;
64
+ get inputElement(): HTMLInputElement;
65
+ get optionElements(): NodeListOf<HTMLDivElement>;
66
+ arrowCursor: number;
67
+ MAX_SAFE_INTEGER: number;
68
+ DEFAULT_OPERATOR: string;
69
+ DROPDOWN_ITEM_CLASS: string;
70
+ constructor(injector: Injector, multiSearch: MultiSearchComponent);
71
+ private resolveHideSync;
72
+ private resolveFormModelChangeSync;
73
+ private conditionSync;
74
+ private valuesSync;
75
+ createForm(): FormControl<SearchConditionModel>;
76
+ adaptResourceModel(resource: SearchConditionModel): SearchConditionModel;
77
+ private initModel;
78
+ selectActiveCondition(conditionConfig: SearchConditionConfig): void;
79
+ setConditionByModel(): void;
80
+ selectActiveOperator(operator: string): void;
81
+ selectValue(condition: MultiSearchOption, isMulti?: boolean): void;
82
+ private selectMultiValue;
83
+ selectAllClick: import("lodash").DebouncedFunc<() => void>;
84
+ private selectAllValues;
85
+ private deselectAllValues;
86
+ activeConditionClick(): void;
87
+ activeOperatorClick(): void;
88
+ activeValueClick(): void;
89
+ private setActiveOperator;
90
+ private setValues;
91
+ private clearActiveCondition;
92
+ private changeToEditing;
93
+ inputFocus(): void;
94
+ inputKeydown(e: KeyboardEvent): void;
95
+ confirmSelection(): void;
96
+ private changeToEditingIfNeed;
97
+ private resolveTabEvent;
98
+ private resolveArrowEvent;
99
+ private resolveDeleteEvent;
100
+ private resolveEnterEvent;
101
+ private deleteSelf;
102
+ private resetArrowCursor;
103
+ manualFocus(silence?: boolean): void;
104
+ manualBlur(): void;
105
+ private refreshDropdown;
106
+ private refreshCursor;
107
+ toolTipHide(): void;
108
+ toolTipShow(): void;
109
+ ifComplete(toContinue?: boolean, manualFocus?: boolean): boolean;
110
+ _complete(activeCondition: SearchConditionModel, toContinue?: boolean, manualFocus?: boolean): void;
111
+ private conditionFilterByExists;
112
+ private resolveGroup;
113
+ getConditionLabel(condition: SearchConditionModel): string;
114
+ private getSeparator;
115
+ getValueContent: (condition: SearchConditionModel) => string;
116
+ getValueLabel(value: MultiSearchOption): string;
117
+ private getMultiSearchVal;
118
+ isConditionSelected(current: string, conditionsModel: string): boolean;
119
+ isValueSelected: (current: string, conditionsModel: string, condition: SearchConditionModel) => boolean;
120
+ static ɵfac: i0.ɵɵFactoryDeclaration<MultiSearchActionInputComponent, never>;
121
+ static ɵcmp: i0.ɵɵComponentDeclaration<MultiSearchActionInputComponent, "acl-multi-search-action-input", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "conditionCreatable": { "alias": "conditionCreatable"; "required": false; }; "isEditing": { "alias": "isEditing"; "required": false; }; "hidden": { "alias": "hidden"; "required": false; }; "autoScroll": { "alias": "autoScroll"; "required": false; }; "conditionConfig": { "alias": "conditionConfig"; "required": false; }; "showFootAction": { "alias": "showFootAction"; "required": false; }; "existingConditions": { "alias": "existingConditions"; "required": false; }; }, { "completed": "completed"; "editing": "editing"; "delete": "delete"; "search": "search"; }, never, never, true, never>;
122
+ }
@@ -0,0 +1,66 @@
1
+ import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy } from '@angular/core';
2
+ import { BehaviorSubject, Observable, Subject } from 'rxjs';
3
+ import { MultiSearchActionInputComponent } from '../action-input/component';
4
+ import { MultiSearchTagsComponent } from '../multi-search-tags/component';
5
+ import { SearchConditionConfig, SearchCondition, SearchConditionModel } from '../types';
6
+ import * as i0 from "@angular/core";
7
+ export declare const DEFAULT_OPERATOR: string;
8
+ export declare class MultiSearchComponent implements OnDestroy {
9
+ protected readonly cdr: ChangeDetectorRef;
10
+ placeholder: string;
11
+ conditionCreatable: boolean;
12
+ conditions: SearchCondition[];
13
+ conditions$: Observable<SearchCondition[]>;
14
+ conditionConfig: SearchConditionConfig[];
15
+ conditionConfig$: Observable<SearchConditionConfig[]>;
16
+ autoScroll: boolean;
17
+ searchSuffix: boolean;
18
+ search: EventEmitter<SearchCondition[]>;
19
+ showFootAction: boolean;
20
+ conditionsChange: EventEmitter<SearchCondition[]>;
21
+ normalInputComponent: MultiSearchActionInputComponent;
22
+ tagsComponent: MultiSearchTagsComponent;
23
+ multiSearchRef: ElementRef;
24
+ addedCondition: SearchConditionModel;
25
+ focus$$: BehaviorSubject<boolean>;
26
+ destroy$$: Subject<void>;
27
+ actionScanner$$: Subject<(items: SearchConditionModel[]) => SearchConditionModel[]>;
28
+ existingConditions: SearchConditionModel[];
29
+ existingConditions$: Observable<SearchConditionModel[]>;
30
+ noEditingCondition: boolean;
31
+ noEditingCondition$: Observable<boolean>;
32
+ noDeletingCondition: boolean;
33
+ noDeletingCondition$: Observable<boolean>;
34
+ addedInputShouldHidden$: Observable<boolean>;
35
+ get inputComponent(): MultiSearchActionInputComponent;
36
+ CLEAR_ICON_CLASS: string;
37
+ SEARCH_ICON_CLASS: string;
38
+ constructor(cdr: ChangeDetectorRef);
39
+ private isSearchBtn;
40
+ private notActionElement;
41
+ private notTooltipContent;
42
+ private checkElement;
43
+ private manualComplete;
44
+ manualFocus(silence?: boolean): void;
45
+ setFocus(focus: boolean): void;
46
+ manualBlur(): void;
47
+ doSearch(): void;
48
+ clearConditions(): void;
49
+ removeCondition(condition: SearchConditionModel): void;
50
+ updateCondition(condition: SearchConditionModel, index: number): void;
51
+ addCondition(activeCondition: SearchConditionModel): void;
52
+ setConditionEditing(condition: SearchConditionModel): void;
53
+ setConditionDeleting(index?: number): void;
54
+ complete({ activeCondition, toContinue, manualFocus, index, }: {
55
+ activeCondition: SearchConditionModel;
56
+ toContinue?: boolean;
57
+ manualFocus?: boolean;
58
+ index?: number;
59
+ }): void;
60
+ private isGrammarCustomCondition;
61
+ private getConditionModel;
62
+ conditionInAction(condition: SearchConditionModel): boolean;
63
+ ngOnDestroy(): void;
64
+ static ɵfac: i0.ɵɵFactoryDeclaration<MultiSearchComponent, never>;
65
+ static ɵcmp: i0.ɵɵComponentDeclaration<MultiSearchComponent, "acl-multi-search", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "conditionCreatable": { "alias": "conditionCreatable"; "required": false; }; "conditions": { "alias": "conditions"; "required": false; }; "conditionConfig": { "alias": "conditionConfig"; "required": false; }; "autoScroll": { "alias": "autoScroll"; "required": false; }; "searchSuffix": { "alias": "searchSuffix"; "required": false; }; "showFootAction": { "alias": "showFootAction"; "required": false; }; }, { "search": "search"; "conditionsChange": "conditionsChange"; }, never, never, true, never>;
66
+ }
@@ -0,0 +1,4 @@
1
+ export * from './utils';
2
+ export * from './types';
3
+ export * from './form/component';
4
+ export * from './action-input/component';
@@ -0,0 +1,27 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { MultiSearchActionInputComponent } from '../action-input/component';
3
+ import { SearchConditionConfig, SearchConditionModel } from '../types';
4
+ import * as i0 from "@angular/core";
5
+ export declare class MultiSearchTagsComponent {
6
+ placeholder: string;
7
+ conditionCreatable: boolean;
8
+ conditionConfig: SearchConditionConfig[];
9
+ existingConditions: SearchConditionModel[];
10
+ showFootAction: boolean;
11
+ removeCondition: EventEmitter<SearchConditionModel>;
12
+ setConditionEditing: EventEmitter<SearchConditionModel>;
13
+ setConditionDeleting: EventEmitter<number>;
14
+ search: EventEmitter<void>;
15
+ completed: EventEmitter<{
16
+ activeCondition: SearchConditionModel;
17
+ toContinue: boolean;
18
+ manualFocus: boolean;
19
+ index?: number;
20
+ }>;
21
+ inputComponent: MultiSearchActionInputComponent;
22
+ conditionInAction(condition: SearchConditionModel): boolean;
23
+ getConditionLabel(condition: SearchConditionModel): string;
24
+ getValueContent(condition: SearchConditionModel): string;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<MultiSearchTagsComponent, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<MultiSearchTagsComponent, "acl-multi-search-tags", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "conditionCreatable": { "alias": "conditionCreatable"; "required": false; }; "conditionConfig": { "alias": "conditionConfig"; "required": false; }; "existingConditions": { "alias": "existingConditions"; "required": false; }; "showFootAction": { "alias": "showFootAction"; "required": false; }; }, { "removeCondition": "removeCondition"; "setConditionEditing": "setConditionEditing"; "setConditionDeleting": "setConditionDeleting"; "search": "search"; "completed": "completed"; }, never, ["*"], true, never>;
27
+ }
@@ -0,0 +1,33 @@
1
+ export interface SearchCondition {
2
+ condition: string;
3
+ operator?: string;
4
+ values?: string[];
5
+ }
6
+ export type SearchConditionModel = SearchConditionConfig & {
7
+ isEditing?: boolean;
8
+ isDeleting?: boolean;
9
+ actionModel?: SearchConditionModel;
10
+ operator?: string;
11
+ selectedValues?: MultiSearchOption[];
12
+ };
13
+ export type SearchConditionConfig = SearchTagConfig & {
14
+ isMulti?: boolean;
15
+ separator?: string;
16
+ operators?: string[];
17
+ allowSelectAll?: boolean;
18
+ condition: MultiSearchOption;
19
+ values?: MultiSearchOption[];
20
+ };
21
+ export interface SearchTagConfig {
22
+ tagClass?: string;
23
+ tagStyle?: {
24
+ [clazz: string]: any;
25
+ };
26
+ tagType?: 'primary' | 'success' | 'warning' | 'error' | 'info';
27
+ }
28
+ export interface MultiSearchOption {
29
+ label?: string;
30
+ tagLabel?: string;
31
+ value: string;
32
+ group?: string;
33
+ }
@@ -0,0 +1,24 @@
1
+ import { SearchCondition } from './types';
2
+ /**
3
+ * 将basic的conditions转换为advanced形式
4
+ * 如:
5
+ * [
6
+ * {
7
+ * condition: 'category1',
8
+ * operator: '=',
9
+ * values: ['con1', 'con2']
10
+ * },
11
+ * {
12
+ * condition: 'category2',
13
+ * operator: '!=',
14
+ * values: ['con11']
15
+ * },
16
+ * {
17
+ * condition: '!custom'
18
+ * }
19
+ * ]
20
+ * 将会转化为:
21
+ * '[category1 = (con1,con2)],[category2 != (con11)],[!custom]'
22
+ */
23
+ export declare function MultiSearchAdvanced(conditions: SearchCondition[]): string;
24
+ export declare function MultiSearchBasic(advancedConditions: string): SearchCondition[];
@@ -0,0 +1,83 @@
1
+ import { ElementRef, EventEmitter, QueryList } from '@angular/core';
2
+ import { ResizeCursor } from './util';
3
+ import * as i0 from "@angular/core";
4
+ export type DragRange = number | string;
5
+ export interface MutableOptions {
6
+ directions?: [boolean, boolean, boolean, boolean];
7
+ resizeThreshold?: number;
8
+ cursors?: {
9
+ move: string;
10
+ };
11
+ dragRange?: [DragRange, DragRange, DragRange, DragRange];
12
+ }
13
+ export declare const MUTABLE_BASIC_OPTIONS: MutableOptions;
14
+ export interface Point {
15
+ x: number;
16
+ y: number;
17
+ }
18
+ export declare class DragHandleDirective {
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<DragHandleDirective, never>;
20
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DragHandleDirective, "[aclDragHandle]", never, {}, {}, never, never, true, never>;
21
+ }
22
+ export declare class MutableDirective {
23
+ private readonly el;
24
+ private computedOptions;
25
+ /** Allow for stretch shrink, the default is open */
26
+ aclResizable: boolean;
27
+ /** Allow for drag and drop, the default is open */
28
+ aclDraggable: boolean;
29
+ /** Define drag boundary, as body */
30
+ aclDragBoundary: string | ElementRef<HTMLElement> | HTMLElement;
31
+ set aclMutableOptions(options: MutableOptions);
32
+ /** In the process of the resize triggering events */
33
+ readonly aclOnResize: EventEmitter<HTMLElement>;
34
+ /** Drag in the process of the triggering event */
35
+ readonly aclOnDrag: EventEmitter<HTMLElement>;
36
+ /** Emits when the user start drag. */
37
+ readonly aclDragStarted: EventEmitter<HTMLElement>;
38
+ readonly aclDragEnded: EventEmitter<HTMLElement>;
39
+ /** Emits when the user start resize */
40
+ readonly aclResizeStarted: EventEmitter<HTMLElement>;
41
+ readonly aclResizeEnded: EventEmitter<HTMLElement>;
42
+ handles: QueryList<ElementRef>;
43
+ isDragging: boolean;
44
+ isResizingX: boolean;
45
+ isResizingY: boolean;
46
+ mousePoint: {
47
+ x: number;
48
+ y: number;
49
+ };
50
+ parentBorder: {
51
+ left: number;
52
+ top: number;
53
+ };
54
+ elementBorder: {
55
+ left: number;
56
+ top: number;
57
+ right: number;
58
+ bottom: number;
59
+ };
60
+ element: HTMLElement;
61
+ private readonly _initCursor;
62
+ resizeCursor: ResizeCursor;
63
+ resizeInitXRight: number;
64
+ resizeInitYBottom: number;
65
+ onMouseDown(event: MouseEvent): void;
66
+ onMouseMove(event: MouseEvent): void;
67
+ onMouseUp(): void;
68
+ constructor(el: ElementRef<HTMLElement>);
69
+ /** Gets the boundary element, based on the `boundaryElement` value. */
70
+ private getBoundaryElement;
71
+ private ensureInParent;
72
+ dragElement(event: MouseEvent): void;
73
+ initDragging(event: MouseEvent): void;
74
+ setDragging(cursor: string, event: MouseEvent): void;
75
+ resizeElementX(event: MouseEvent): void;
76
+ resizeElementY(event: MouseEvent): void;
77
+ initResizing(event: MouseEvent): void;
78
+ setResizing(cursor: string, event: MouseEvent): void;
79
+ getMutableCursor(event: MouseEvent): string;
80
+ private isResizeOutOfBoundary;
81
+ static ɵfac: i0.ɵɵFactoryDeclaration<MutableDirective, never>;
82
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MutableDirective, "[aclMutable]", never, { "aclResizable": { "alias": "aclResizable"; "required": false; }; "aclDraggable": { "alias": "aclDraggable"; "required": false; }; "aclDragBoundary": { "alias": "aclDragBoundary"; "required": false; }; "aclMutableOptions": { "alias": "aclMutableOptions"; "required": false; }; }, { "aclOnResize": "aclOnResize"; "aclOnDrag": "aclOnDrag"; "aclDragStarted": "aclDragStarted"; "aclDragEnded": "aclDragEnded"; "aclResizeStarted": "aclResizeStarted"; "aclResizeEnded": "aclResizeEnded"; }, ["handles"], never, true, never>;
83
+ }
@@ -0,0 +1,10 @@
1
+ import { ElementRef } from '@angular/core';
2
+ /**
3
+ * To judge whether the parent element
4
+ */
5
+ export declare const isSelfOrParent: (element: HTMLElement, target: HTMLElement) => boolean;
6
+ /**
7
+ * Coerces an ElementRef or an Element into an element.
8
+ * Useful for APIs that can accept either a ref or the native element itself.
9
+ */
10
+ export declare function coerceElement<T>(elementOrRef: ElementRef<T> | T): T;
@@ -0,0 +1,8 @@
1
+ import { MosaicComponent } from './mosaic/component';
2
+ import { MosaicLeftDirective, MosaicRightDirective } from './mosaic/directive';
3
+ import { DragHandleDirective, MutableDirective } from './directive';
4
+ export * from './mosaic/component';
5
+ export * from './mosaic/directive';
6
+ export * from './directive';
7
+ export * from './util';
8
+ export declare const MUTABLE_MODULE: readonly [typeof MutableDirective, typeof MosaicRightDirective, typeof MosaicLeftDirective, typeof MosaicComponent, typeof DragHandleDirective];
@@ -0,0 +1,32 @@
1
+ import { Observable } from 'rxjs';
2
+ import { DragRange, MutableOptions } from '../directive';
3
+ import * as i0 from "@angular/core";
4
+ export declare class MosaicComponent {
5
+ left: DragRange;
6
+ left$: Observable<DragRange>;
7
+ right: DragRange;
8
+ right$: Observable<DragRange>;
9
+ splitLocation: number;
10
+ mutableOptions$: Observable<MutableOptions>;
11
+ leftInset: {
12
+ top: string;
13
+ right: string;
14
+ bottom: string;
15
+ left: string;
16
+ };
17
+ rightInset: {
18
+ top: string;
19
+ right: string;
20
+ bottom: string;
21
+ left: string;
22
+ };
23
+ splitInset: {
24
+ top: string;
25
+ right: string;
26
+ bottom: string;
27
+ left: string;
28
+ };
29
+ drag(element: HTMLElement, root: HTMLDivElement): void;
30
+ static ɵfac: i0.ɵɵFactoryDeclaration<MosaicComponent, never>;
31
+ static ɵcmp: i0.ɵɵComponentDeclaration<MosaicComponent, "acl-mosaic", never, { "left": { "alias": "left"; "required": false; }; "right": { "alias": "right"; "required": false; }; "splitLocation": { "alias": "splitLocation"; "required": false; }; }, {}, never, ["[aclMosaicLeft]", "[aclMosaicRight]"], true, never>;
32
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class MosaicLeftDirective {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<MosaicLeftDirective, never>;
4
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MosaicLeftDirective, "acl-mosaic[aclMosaicLeft]", never, {}, {}, never, never, false, never>;
5
+ }
6
+ export declare class MosaicRightDirective {
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<MosaicRightDirective, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MosaicRightDirective, "acl-mosaic[aclMosaicRight]", never, {}, {}, never, never, true, never>;
9
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * cursor style link https://developer.mozilla.org/zh-CN/docs/Web/CSS/cursor
3
+ */
4
+ export type CursorX = 'e' | 'w';
5
+ export type CursorY = 'n' | 's';
6
+ export type Cursor = CursorX | CursorY | `${CursorY}${CursorX}`;
7
+ export type ResizeCursor = `${Cursor}-resize`;
8
+ /** 如果cursor存在类似 n-resize、ne-resize,都代表是top 方向 */
9
+ export declare const isT: (cursor: ResizeCursor) => boolean;
10
+ /** 是否是right */
11
+ export declare const isR: (cursor: ResizeCursor) => boolean;
12
+ /** 是否是bottom */
13
+ export declare const isB: (cursor: ResizeCursor) => boolean;
14
+ /** 是否是left */
15
+ export declare const isL: (cursor: ResizeCursor) => boolean;
16
+ export declare const toPx: (num: number) => string;
17
+ export declare const toPercent: (num: number, base?: number) => string;
18
+ export declare const toNumber: (str: string) => number;
@@ -1,9 +1,7 @@
1
- import { K8sApiService } from '@alauda-fe/dynamic-plugin-sdk';
1
+ import { K8sApiService, ResourceSelectorPopupRef, ResourceSelectorPopupService } from '@alauda-fe/dynamic-plugin-sdk';
2
2
  import { ChangeDetectorRef, ElementRef, EventEmitter, TemplateRef } from '@angular/core';
3
3
  import { Observable } from 'rxjs';
4
4
  import { KubernetesResource, Namespace } from '../../types';
5
- import { ResourceSelectorPopupRef } from './selector-popup/ref';
6
- import { ResourceSelectorPopupService } from './selector-popup/service';
7
5
  import * as i0 from "@angular/core";
8
6
  export declare class NamespaceSelectorComponent {
9
7
  private readonly popupService;
@@ -11,6 +9,8 @@ export declare class NamespaceSelectorComponent {
11
9
  private readonly cdr;
12
10
  private readonly elementRef;
13
11
  popupTemplate: TemplateRef<any>;
12
+ cluster: string;
13
+ cluster$: Observable<string>;
14
14
  value: string;
15
15
  value$: Observable<string>;
16
16
  valueChange: EventEmitter<KubernetesResource>;
@@ -24,5 +24,5 @@ export declare class NamespaceSelectorComponent {
24
24
  closePopup(): void;
25
25
  onSelect(item: KubernetesResource): void;
26
26
  static ɵfac: i0.ɵɵFactoryDeclaration<NamespaceSelectorComponent, never>;
27
- static ɵcmp: i0.ɵɵComponentDeclaration<NamespaceSelectorComponent, "acl-namespace-selector", never, { "value": { "alias": "value"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<NamespaceSelectorComponent, "acl-namespace-selector", never, { "cluster": { "alias": "cluster"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
28
28
  }
@@ -1,4 +1,3 @@
1
1
  export * from './constants';
2
2
  export * from './component';
3
3
  export * from './types';
4
- export * from './selector-popup/service';
@@ -0,0 +1,11 @@
1
+ import * as i0 from "@angular/core";
2
+ export interface OverviewBannerOption {
3
+ icon: string;
4
+ title: string;
5
+ description: string;
6
+ }
7
+ export declare class OverviewBannerComponent {
8
+ option: OverviewBannerOption;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<OverviewBannerComponent, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<OverviewBannerComponent, "acl-overview-banner", never, { "option": { "alias": "option"; "required": false; }; }, {}, never, never, true, never>;
11
+ }