@next-libs/cmdb-instances 7.29.13 → 7.30.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/dist/cjs/i18n/constants.js +6 -0
- package/dist/cjs/i18n/constants.js.map +1 -1
- package/dist/cjs/i18n/locales/en.js +7 -1
- package/dist/cjs/i18n/locales/en.js.map +1 -1
- package/dist/cjs/i18n/locales/zh.js +7 -1
- package/dist/cjs/i18n/locales/zh.js.map +1 -1
- package/dist/cjs/instance-detail/InstanceDetail.js +24 -10
- package/dist/cjs/instance-detail/InstanceDetail.js.map +1 -1
- package/dist/cjs/instance-detail/components/instance-relation-table-show/instance-relation-table-show.js +2 -2
- package/dist/cjs/instance-detail/components/instance-relation-table-show/instance-relation-table-show.js.map +1 -1
- package/dist/cjs/instance-list/InstanceList.js +82 -35
- package/dist/cjs/instance-list/InstanceList.js.map +1 -1
- package/dist/cjs/instance-list-table/AdvancedSearch.js +21 -1
- package/dist/cjs/instance-list-table/AdvancedSearch.js.map +1 -1
- package/dist/cjs/instance-list-table/DisplaySettings.js +44 -10
- package/dist/cjs/instance-list-table/DisplaySettings.js.map +1 -1
- package/dist/cjs/instance-list-table/DisplaySettingsModal.js +12 -2
- package/dist/cjs/instance-list-table/DisplaySettingsModal.js.map +1 -1
- package/dist/cjs/instance-list-table/InstanceListTable.js +112 -1
- package/dist/cjs/instance-list-table/InstanceListTable.js.map +1 -1
- package/dist/cjs/instance-list-table/MoreButtonsContainer.js +1 -0
- package/dist/cjs/instance-list-table/MoreButtonsContainer.js.map +1 -1
- package/dist/esm/i18n/constants.js +6 -0
- package/dist/esm/i18n/constants.js.map +1 -1
- package/dist/esm/i18n/locales/en.js +7 -1
- package/dist/esm/i18n/locales/en.js.map +1 -1
- package/dist/esm/i18n/locales/zh.js +7 -1
- package/dist/esm/i18n/locales/zh.js.map +1 -1
- package/dist/esm/instance-detail/InstanceDetail.js +21 -10
- package/dist/esm/instance-detail/InstanceDetail.js.map +1 -1
- package/dist/esm/instance-detail/components/instance-relation-table-show/instance-relation-table-show.js +2 -2
- package/dist/esm/instance-detail/components/instance-relation-table-show/instance-relation-table-show.js.map +1 -1
- package/dist/esm/instance-list/InstanceList.js +91 -38
- package/dist/esm/instance-list/InstanceList.js.map +1 -1
- package/dist/esm/instance-list-table/AdvancedSearch.js +20 -1
- package/dist/esm/instance-list-table/AdvancedSearch.js.map +1 -1
- package/dist/esm/instance-list-table/DisplaySettings.js +45 -11
- package/dist/esm/instance-list-table/DisplaySettings.js.map +1 -1
- package/dist/esm/instance-list-table/DisplaySettings.module.css +7 -0
- package/dist/esm/instance-list-table/DisplaySettingsModal.js +13 -3
- package/dist/esm/instance-list-table/DisplaySettingsModal.js.map +1 -1
- package/dist/esm/instance-list-table/InstanceListTable.js +110 -1
- package/dist/esm/instance-list-table/InstanceListTable.js.map +1 -1
- package/dist/esm/instance-list-table/MoreButtonsContainer.js +1 -0
- package/dist/esm/instance-list-table/MoreButtonsContainer.js.map +1 -1
- package/dist/types/i18n/constants.d.ts +7 -1
- package/dist/types/instance-detail/components/instance-relation-table-show/instance-relation-table-show.d.ts +4 -2
- package/dist/types/instance-list/InstanceList.d.ts +8 -3
- package/dist/types/instance-list-table/DisplaySettings.d.ts +8 -0
- package/dist/types/instance-list-table/InstanceListTable.d.ts +12 -5
- package/package.json +4 -4
|
@@ -19,6 +19,12 @@ interface DisplaySettingsState {
|
|
|
19
19
|
selectAllFields: boolean;
|
|
20
20
|
selectCategoryAllFieldsMap: Record<string, boolean>;
|
|
21
21
|
allFieldsLength: number;
|
|
22
|
+
type: AttributeType | string;
|
|
23
|
+
}
|
|
24
|
+
declare enum AttributeType {
|
|
25
|
+
Attribute = "attribute",
|
|
26
|
+
Relation = "relation",
|
|
27
|
+
TransHierRelation = "transHierRelation"
|
|
22
28
|
}
|
|
23
29
|
export declare class LegacyDisplaySettings extends React.Component<WithTranslationDisplaySettingsProps, DisplaySettingsState> {
|
|
24
30
|
debounceHandleSearch: () => void;
|
|
@@ -26,6 +32,7 @@ export declare class LegacyDisplaySettings extends React.Component<WithTranslati
|
|
|
26
32
|
id: string;
|
|
27
33
|
name: string;
|
|
28
34
|
category: string;
|
|
35
|
+
type: AttributeType;
|
|
29
36
|
}[];
|
|
30
37
|
constructor(props: WithTranslationDisplaySettingsProps);
|
|
31
38
|
componentDidUpdate(prevProps: WithTranslationDisplaySettingsProps): void;
|
|
@@ -36,6 +43,7 @@ export declare class LegacyDisplaySettings extends React.Component<WithTranslati
|
|
|
36
43
|
getCAategoryOrders: () => any[];
|
|
37
44
|
filterColTag: () => void;
|
|
38
45
|
handleSearchChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
46
|
+
handleFilterType: (type: AttributeType | string) => void;
|
|
39
47
|
render(): React.JSX.Element;
|
|
40
48
|
}
|
|
41
49
|
export declare const DisplaySettings: React.ComponentType<Omit<import("react-i18next").Subtract<WithTranslationDisplaySettingsProps, import("react-i18next").WithTranslationProps>, keyof WithTranslation<N, undefined>> & import("react-i18next").WithTranslationProps>;
|
|
@@ -5,6 +5,7 @@ import { SorterResult, TableCurrentDataSource } from "antd/lib/table/interface";
|
|
|
5
5
|
import { PropertyDisplayConfig, ReadPaginationChangeDetail, ReadSelectionChangeDetail, ReadSortingChangeDetail, UseBrickConf } from "@next-core/brick-types";
|
|
6
6
|
import { CmdbModels, InstanceApi_PostSearchV3ResponseBody } from "@next-sdk/cmdb-sdk";
|
|
7
7
|
import { RelationObjectSides } from "@next-libs/cmdb-utils";
|
|
8
|
+
import { TransHierRelationType } from "@next-libs/cmdb-utils";
|
|
8
9
|
export interface CustomColumn extends ColumnType<Record<string, unknown>> {
|
|
9
10
|
useBrick: UseBrickConf;
|
|
10
11
|
}
|
|
@@ -16,11 +17,16 @@ export interface InstanceListUseBrickData {
|
|
|
16
17
|
rowData: Record<string, unknown>;
|
|
17
18
|
index: number;
|
|
18
19
|
}
|
|
20
|
+
declare type ObjectType = Partial<CmdbModels.ModelCmdbObject> & {
|
|
21
|
+
view?: Partial<CmdbModels.ModelObjectView> & {
|
|
22
|
+
trans_hier_relation_list?: TransHierRelationType[];
|
|
23
|
+
};
|
|
24
|
+
};
|
|
19
25
|
export interface InstanceListTableProps extends WithTranslation {
|
|
20
26
|
detailUrlTemplates?: Record<string, string>;
|
|
21
27
|
fieldIds?: string[];
|
|
22
|
-
idObjectMap: Record<string,
|
|
23
|
-
modelData: Partial<
|
|
28
|
+
idObjectMap: Record<string, ObjectType>;
|
|
29
|
+
modelData: Partial<ObjectType>;
|
|
24
30
|
instanceListData: InstanceApi_PostSearchV3ResponseBody;
|
|
25
31
|
sort?: string;
|
|
26
32
|
asc?: boolean;
|
|
@@ -90,10 +96,11 @@ export declare class LegacyInstanceListTable extends React.Component<InstanceLis
|
|
|
90
96
|
getDisplayConfigColumn(config: UseBrickAndPropertyDisplayConfig, isPrimary?: boolean): (value: string[], record: Record<string, any>, index: number) => React.JSX.Element;
|
|
91
97
|
getUseBrickConfigRender(config: UseBrickAndPropertyDisplayConfig): (value: any, record: Record<string, any>, index: number) => React.JSX.Element;
|
|
92
98
|
getLinkContent(node: any): React.JSX.Element;
|
|
93
|
-
getSpecialUrlTemplates(object: Partial<
|
|
94
|
-
getAttributeColumnData(attribute: Partial<CmdbModels.ModelObjectAttr>, object: Partial<
|
|
99
|
+
getSpecialUrlTemplates(object: Partial<ObjectType>, record: any, node: any, url?: string, isRenderStructList?: boolean): React.JSX.Element;
|
|
100
|
+
getAttributeColumnData(attribute: Partial<CmdbModels.ModelObjectAttr>, object: Partial<ObjectType>, firstColumns?: boolean): ColumnType<Record<string, any>>;
|
|
95
101
|
handleRelationMoreIconClick(record: Record<string, any>): void;
|
|
96
|
-
getRelationColumnData(relation: Partial<CmdbModels.ModelObjectRelation>, object: Partial<
|
|
102
|
+
getRelationColumnData(relation: Partial<CmdbModels.ModelObjectRelation>, object: Partial<ObjectType>, sides: RelationObjectSides, firstColumns?: boolean): ColumnType<Record<string, any>>;
|
|
103
|
+
getTransHierRelationColumnData(relation: TransHierRelationType, object: Partial<ObjectType>, firstColumns?: boolean): ColumnType<Record<string, any>>;
|
|
97
104
|
setColumnSortOrder<T = any>(column: ColumnType<T>): ColumnType<T>;
|
|
98
105
|
onChange: (pagination: TablePaginationConfig, filters: Record<string, (React.Key | boolean)[]>, sorter: SorterResult<Record<string, any>> | SorterResult<Record<string, any>>[], extra: TableCurrentDataSource<Record<string, any>>) => void;
|
|
99
106
|
onSelectChange: (selectedRowKeys: (string | number)[], selectedRows: Record<string, any>[]) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-libs/cmdb-instances",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.30.1",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "https://github.com/easyops-cn/next-libs/tree/master/libs/cmdb-instances",
|
|
6
6
|
"license": "GPL-3.0",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@next-core/brick-types": "^2.97.0",
|
|
39
39
|
"@next-libs/basic-components": "^5.5.3",
|
|
40
|
-
"@next-libs/cmdb-utils": "^3.
|
|
40
|
+
"@next-libs/cmdb-utils": "^3.8.0",
|
|
41
41
|
"@next-libs/code-display-components": "^2.1.0",
|
|
42
|
-
"@next-libs/code-editor-components": "^4.12.
|
|
42
|
+
"@next-libs/code-editor-components": "^4.12.9",
|
|
43
43
|
"@next-libs/forms": "^3.6.3",
|
|
44
44
|
"@next-libs/storage": "^2.0.4",
|
|
45
45
|
"@next-sdk/cmdb-sdk": "^3.1.0",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"js-base64": "^3.7.7",
|
|
53
53
|
"marked": "^2.1.3"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "799b4a048e197256cd8d638028ef00ea9dec90a7"
|
|
56
56
|
}
|