tntd 3.0.37 → 3.0.38-beta.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/es/form/style/index.less +5 -5
- package/es/index.js +7 -0
- package/es/index.js.map +1 -1
- package/es/query-form/Field/Checkbox.js +1 -1
- package/es/query-form/Field/Checkbox.js.map +1 -1
- package/es/query-form/Field/Composition/FieldPopover.js +12 -88
- package/es/query-form/Field/Composition/FieldPopover.js.map +1 -1
- package/es/query-form/Field/Composition/Select.js +30 -115
- package/es/query-form/Field/Composition/Select.js.map +1 -1
- package/es/query-form/Field/Composition/ValueTag.js +13 -89
- package/es/query-form/Field/Composition/ValueTag.js.map +1 -1
- package/es/query-form/Field/Composition/index.js +17 -121
- package/es/query-form/Field/Composition/utils.js +1 -5
- package/es/query-form/Field/SelectInput.js +16 -6
- package/es/query-form/Field/SelectInput.js.map +1 -1
- package/es/query-form/Field/fieldsMap.js +2 -2
- package/es/query-form/Field/fieldsMap.js.map +1 -1
- package/es/query-form/Field/index.js +3 -1
- package/es/query-form/Field/index.js.map +1 -1
- package/es/query-form/index.js +195 -359
- package/es/query-form/index.js.map +1 -1
- package/es/query-form/index.less +26 -60
- package/es/query-list-scene/List.js +16 -3
- package/es/query-list-scene/List.js.map +1 -1
- package/es/query-list-scene/QueryForm.js +35 -13
- package/es/query-list-scene/QueryForm.js.map +1 -1
- package/es/query-list-scene/index.js +2 -1
- package/es/query-list-scene/index.js.map +1 -1
- package/es/scroll-bar/Bar.js +10 -87
- package/es/scroll-bar/Context.js +1 -5
- package/es/scroll-bar/ScrollBar.js +4 -39
- package/es/scroll-bar/Thumb.js +10 -87
- package/es/scroll-bar/index.js +1 -5
- package/es/scroll-bar/util.js +4 -31
- package/es/tntd-select/index.js.map +1 -1
- package/es/tntd-virtual-tree/index.js +0 -3
- package/es/tntd-virtual-tree/index.js.map +1 -1
- package/es/tntd-virtual-tree/index.less +1 -2
- package/lib/form/style/index.less +5 -5
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -0
- package/lib/index.js.map +1 -1
- package/lib/query-form/Field/Checkbox.js +1 -1
- package/lib/query-form/Field/Checkbox.js.map +1 -1
- package/lib/query-form/Field/Composition/FieldPopover.js +2 -1
- package/lib/query-form/Field/Composition/FieldPopover.js.map +1 -1
- package/lib/query-form/Field/Composition/Select.d.ts.map +1 -1
- package/lib/query-form/Field/Composition/Select.js +17 -6
- package/lib/query-form/Field/Composition/Select.js.map +1 -1
- package/lib/query-form/Field/Composition/ValueTag.d.ts.map +1 -1
- package/lib/query-form/Field/Composition/ValueTag.js +3 -2
- package/lib/query-form/Field/Composition/ValueTag.js.map +1 -1
- package/lib/query-form/Field/SelectInput.d.ts.map +1 -1
- package/lib/query-form/Field/SelectInput.js +16 -6
- package/lib/query-form/Field/SelectInput.js.map +1 -1
- package/lib/query-form/Field/fieldsMap.d.ts +6 -3
- package/lib/query-form/Field/fieldsMap.d.ts.map +1 -1
- package/lib/query-form/Field/fieldsMap.js +2 -2
- package/lib/query-form/Field/fieldsMap.js.map +1 -1
- package/lib/query-form/Field/index.d.ts.map +1 -1
- package/lib/query-form/Field/index.js +3 -1
- package/lib/query-form/Field/index.js.map +1 -1
- package/lib/query-form/index.d.ts +1 -36
- package/lib/query-form/index.d.ts.map +1 -1
- package/lib/query-form/index.js +235 -403
- package/lib/query-form/index.js.map +1 -1
- package/lib/query-form/index.less +26 -60
- package/lib/query-list-scene/List.d.ts.map +1 -1
- package/lib/query-list-scene/List.js +16 -3
- package/lib/query-list-scene/List.js.map +1 -1
- package/lib/query-list-scene/QueryForm.d.ts +5 -4
- package/lib/query-list-scene/QueryForm.d.ts.map +1 -1
- package/lib/query-list-scene/QueryForm.js +35 -13
- package/lib/query-list-scene/QueryForm.js.map +1 -1
- package/lib/query-list-scene/index.d.ts.map +1 -1
- package/lib/query-list-scene/index.js +2 -1
- package/lib/query-list-scene/index.js.map +1 -1
- package/lib/tntd-select/index.d.ts.map +1 -1
- package/lib/tntd-select/index.js.map +1 -1
- package/lib/tntd-virtual-tree/index.js +0 -3
- package/lib/tntd-virtual-tree/index.js.map +1 -1
- package/lib/tntd-virtual-tree/index.less +1 -2
- package/package.json +3 -2
- package/CHANGELOG.json +0 -1034
- package/CHANGELOG.md +0 -605
- package/es/checkbox/checkbox-group.js +0 -16
- package/es/checkbox/checkbox-group.js.map +0 -1
- package/es/radio/radio-group.js +0 -16
- package/es/radio/radio-group.js.map +0 -1
- package/es/steps/stepStyle/small.less +0 -5
- package/es/table/total-shower.js +0 -20
- package/es/table/total-shower.js.map +0 -1
- package/es/utils/simple-template.js +0 -19
- package/es/utils/simple-template.js.map +0 -1
- package/lib/checkbox/checkbox-group.d.ts +0 -8
- package/lib/checkbox/checkbox-group.d.ts.map +0 -1
- package/lib/checkbox/checkbox-group.js +0 -16
- package/lib/checkbox/checkbox-group.js.map +0 -1
- package/lib/radio/radio-group.d.ts +0 -8
- package/lib/radio/radio-group.d.ts.map +0 -1
- package/lib/radio/radio-group.js +0 -16
- package/lib/radio/radio-group.js.map +0 -1
- package/lib/steps/stepStyle/small.less +0 -5
- package/lib/table/total-shower.d.ts +0 -9
- package/lib/table/total-shower.d.ts.map +0 -1
- package/lib/table/total-shower.js +0 -20
- package/lib/table/total-shower.js.map +0 -1
- package/lib/utils/simple-template.d.ts +0 -9
- package/lib/utils/simple-template.d.ts.map +0 -1
- package/lib/utils/simple-template.js +0 -19
- package/lib/utils/simple-template.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/query-form/Field/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA4C;AAC5C,mCAA4B;AAC5B,yDAAsD;AAEtD,sDAA6B;AAE7B,MAAM,QAAQ,GAAG,cAAI,CAAC,IAAI,CAAA;AAE1B,MAAM,OAAO,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC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react'\nimport { get } from 'lodash'\nimport fieldsMap, { getFieldWidth } from './fieldsMap'\n\nimport Form from '../../form'\n\nconst FormItem = Form.Item\n\nconst isInput = (type) => ['input', 'string', 'search', 'aloneSearch'].includes(type)\n\nexport default class Field extends PureComponent {\n constructor(props) {\n super(props)\n\n this.state = {\n value: props.initialValue,\n }\n }\n\n render () {\n const {\n type = 'input',\n title,\n name,\n isFieldInDrawer = false,\n className = '',\n component,\n form,\n props: fieldProps,\n } = this.props\n const { value } = this.state\n const Field = component || fieldsMap[type]\n\n return (\n <FormItem label={title} className={className}>\n <Field\n form={form}\n value={value}\n name={name}\n {...(isInput(type)\n ? {\n onPressEnter: (evt) =>\n form.emit('search', { [name]: evt?.target?.value, current: 1 }),\n onSearch: (value) => form.emit('search', { [name]: value, current: 1 })\n }\n : {})}\n {...fieldProps}\n style={{\n ...fieldProps?.style,\n width: isFieldInDrawer ? '100%' : fieldProps?.style?.width || getFieldWidth(type),\n }}\n onChange={this.onChange}\n />\n </FormItem>\n )\n }\n\n updateValue = (name, value) => {\n if (name === this.props.name) {\n this.setState({ value })\n this.props.onChange(name, value)\n }\n }\n\n onChange = (...args) => {\n const { name, type = 'input', component, props: fieldProps } = this.props\n const { onChange } = fieldProps || {}\n\n onChange && onChange(...args)\n\n // Input onChange第一个参数为Event对象,取值特殊处理\n if (!component && isInput(type)) {\n args[0] = get(args[0], 'target.value')\n }\n\n this.setState({ value: args[0] })\n this.props.onChange(name, args[0])\n }\n\n onFormChange = (formData) => {\n this.setState({\n value: get(formData, this.props.name),\n })\n }\n\n componentDidMount () {\n const { form } = this.props\n\n form.on('setValue', this.updateValue)\n form.on('setValues', this.onFormChange)\n }\n\n componentWillUnmount () {\n const { form } = this.props\n\n form.off('setValue', this.updateValue)\n form.off('setValues', this.onFormChange)\n }\n}\n"]}
|
|
@@ -1,39 +1,4 @@
|
|
|
1
1
|
export default QueryForm;
|
|
2
|
-
declare
|
|
3
|
-
constructor(props: any);
|
|
4
|
-
state: {
|
|
5
|
-
showMore: boolean;
|
|
6
|
-
expanded: boolean;
|
|
7
|
-
drawerVisible: boolean;
|
|
8
|
-
drawerFieldsValueCount: number;
|
|
9
|
-
};
|
|
10
|
-
fieldsRef: React.RefObject<any>;
|
|
11
|
-
formBoxRef: React.RefObject<any>;
|
|
12
|
-
form: any;
|
|
13
|
-
render(): React.JSX.Element;
|
|
14
|
-
getText(key: any): any;
|
|
15
|
-
isFieldsWidthOverflow(): boolean;
|
|
16
|
-
updateFieldHeight(): void;
|
|
17
|
-
onWindowResize: import("lodash").DebouncedFunc<() => void>;
|
|
18
|
-
search: (params: any) => void;
|
|
19
|
-
onSearch: () => void;
|
|
20
|
-
onReset: () => void;
|
|
21
|
-
onToggleExpand: () => void;
|
|
22
|
-
onShowDrawer: () => void;
|
|
23
|
-
onFieldChange: (name: any, value: any, ...rest: any[]) => void;
|
|
24
|
-
updateDrawerFieldsValueCount: () => void;
|
|
25
|
-
addResizeListener: () => (() => void) | undefined;
|
|
26
|
-
componentDidMount(): void;
|
|
27
|
-
removeResizeListener: (() => void) | undefined;
|
|
28
|
-
componentWillUnmount(): void;
|
|
29
|
-
}
|
|
30
|
-
declare namespace QueryForm {
|
|
31
|
-
export { Field };
|
|
32
|
-
export { useForm };
|
|
33
|
-
export { createActions as createForm };
|
|
34
|
-
}
|
|
2
|
+
declare const QueryForm: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
35
3
|
import React from "react";
|
|
36
|
-
import Field from "./Field";
|
|
37
|
-
import useForm from "./useForm";
|
|
38
|
-
import createActions from "./createActions";
|
|
39
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/query-form/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/query-form/index.js"],"names":[],"mappings":";AAcA,mFAuNC"}
|