@next-libs/cmdb-instances 6.26.8 → 6.27.2
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/CHANGELOG.md +33 -0
- package/dist/cjs/index.js +14 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/instance-list-table/AdvancedSearchCondition.js +207 -0
- package/dist/cjs/instance-list-table/AdvancedSearchCondition.js.map +1 -0
- package/dist/cjs/instance-list-table/DynamicSearch.js +284 -0
- package/dist/cjs/instance-list-table/DynamicSearch.js.map +1 -0
- package/dist/cjs/instance-list-table/index.js +13 -0
- package/dist/cjs/instance-list-table/index.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/instance-list-table/AdvancedSearchCondition.js +184 -0
- package/dist/esm/instance-list-table/AdvancedSearchCondition.js.map +1 -0
- package/dist/esm/instance-list-table/AdvancedSearchCondition.module.css +22 -0
- package/dist/esm/instance-list-table/DynamicSearch.js +269 -0
- package/dist/esm/instance-list-table/DynamicSearch.js.map +1 -0
- package/dist/esm/instance-list-table/DynamicSearch.module.css +40 -0
- package/dist/esm/instance-list-table/index.js +1 -0
- package/dist/esm/instance-list-table/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/instance-list-table/AdvancedSearchCondition.d.ts +12 -0
- package/dist/types/instance-list-table/AdvancedSearchCondition.spec.d.ts +1 -0
- package/dist/types/instance-list-table/DynamicSearch.d.ts +32 -0
- package/dist/types/instance-list-table/DynamicSearch.spec.d.ts +1 -0
- package/dist/types/instance-list-table/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React, { FormEvent } from "react";
|
|
2
|
+
import { FormComponentProps } from "@ant-design/compatible/lib/form";
|
|
3
|
+
import { Query } from "@next-libs/cmdb-utils";
|
|
4
|
+
export interface Field {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
values?: any[];
|
|
8
|
+
}
|
|
9
|
+
export interface DynamicSearchFormProps extends FormComponentProps {
|
|
10
|
+
fields: Record<string, any>[];
|
|
11
|
+
q?: Query[];
|
|
12
|
+
onSearch?(queries: Query[], queriesToShow?: Query[], fieldToShow?: Record<string, any[]>[]): void;
|
|
13
|
+
fieldToShow?: Record<string, any[]>[];
|
|
14
|
+
}
|
|
15
|
+
export interface DynamicSearchFormState {
|
|
16
|
+
fields: Field[];
|
|
17
|
+
}
|
|
18
|
+
export declare class DynamicSearchForm extends React.Component<DynamicSearchFormProps, DynamicSearchFormState> {
|
|
19
|
+
constructor(props: DynamicSearchFormProps);
|
|
20
|
+
componentDidUpdate(prevProps: Readonly<DynamicSearchFormProps>): void;
|
|
21
|
+
computeState(): {
|
|
22
|
+
fields: Field[];
|
|
23
|
+
};
|
|
24
|
+
setFormFieldValues(fields: Field[]): void;
|
|
25
|
+
onValueChange: (value: any, fieldIndex: number, valueIndex: number) => void;
|
|
26
|
+
getFields(): JSX.Element[];
|
|
27
|
+
handleValueChange: (e: any, fieldIndex: number) => void;
|
|
28
|
+
handleSearch: (e: FormEvent<any>) => void;
|
|
29
|
+
handleReset: () => void;
|
|
30
|
+
render(): React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
export declare const DynamicSearch: import("@ant-design/compatible/lib/form/interface").ConnectedComponentClass<typeof DynamicSearchForm, import("@ant-design/compatible/lib/_util/types").Omit<DynamicSearchFormProps, "form">>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-libs/cmdb-instances",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.27.2",
|
|
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",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"immutability-helper": "^3.1.1",
|
|
51
51
|
"marked": "^2.1.3"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "7c8de3e0230c2e673cb2a15ad4535ca9d2ccd50d"
|
|
54
54
|
}
|