tntd 3.0.11 → 3.0.12

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 (96) hide show
  1. package/es/form/form.js +1 -0
  2. package/es/form/form.js.map +1 -1
  3. package/es/query-form-v3/Field/Checkbox.js +23 -0
  4. package/es/query-form-v3/Field/Checkbox.js.map +1 -0
  5. package/es/query-form-v3/Field/Composition/FieldPopover.js +330 -0
  6. package/es/query-form-v3/Field/Composition/FieldPopover.js.map +1 -0
  7. package/es/query-form-v3/Field/Composition/FieldPopover.less +35 -0
  8. package/es/query-form-v3/Field/Composition/Select.js +107 -0
  9. package/es/query-form-v3/Field/Composition/Select.js.map +1 -0
  10. package/es/query-form-v3/Field/Composition/index.js +208 -0
  11. package/es/query-form-v3/Field/Composition/index.js.map +1 -0
  12. package/es/query-form-v3/Field/Composition/index.less +118 -0
  13. package/es/query-form-v3/Field/Composition/utils.js +132 -0
  14. package/es/query-form-v3/Field/Composition/utils.js.map +1 -0
  15. package/es/query-form-v3/Field/Select.js +59 -0
  16. package/es/query-form-v3/Field/Select.js.map +1 -0
  17. package/es/query-form-v3/Field/SelectInput.js +87 -0
  18. package/es/query-form-v3/Field/SelectInput.js.map +1 -0
  19. package/es/query-form-v3/Field/fieldsMap.js +28 -0
  20. package/es/query-form-v3/Field/fieldsMap.js.map +1 -0
  21. package/es/query-form-v3/Field/index.js +117 -0
  22. package/es/query-form-v3/Field/index.js.map +1 -0
  23. package/es/query-form-v3/createActions.js +47 -0
  24. package/es/query-form-v3/createActions.js.map +1 -0
  25. package/es/query-form-v3/index.js +175 -0
  26. package/es/query-form-v3/index.js.map +1 -0
  27. package/es/query-form-v3/index.less +91 -0
  28. package/es/query-form-v3/useForm.js +6 -0
  29. package/es/query-form-v3/useForm.js.map +1 -0
  30. package/es/table/resizableTable/index.js +8 -5
  31. package/es/table/resizableTable/index.js.map +1 -1
  32. package/es/table/table-hoc.js +8 -8
  33. package/es/table/table-hoc.js.map +1 -1
  34. package/lib/form/form.d.ts.map +1 -1
  35. package/lib/form/form.js +1 -0
  36. package/lib/form/form.js.map +1 -1
  37. package/lib/query-form-v3/Field/Checkbox.d.ts +8 -0
  38. package/lib/query-form-v3/Field/Checkbox.d.ts.map +1 -0
  39. package/lib/query-form-v3/Field/Checkbox.js +28 -0
  40. package/lib/query-form-v3/Field/Checkbox.js.map +1 -0
  41. package/lib/query-form-v3/Field/Composition/FieldPopover.d.ts +19 -0
  42. package/lib/query-form-v3/Field/Composition/FieldPopover.d.ts.map +1 -0
  43. package/lib/query-form-v3/Field/Composition/FieldPopover.js +370 -0
  44. package/lib/query-form-v3/Field/Composition/FieldPopover.js.map +1 -0
  45. package/lib/query-form-v3/Field/Composition/FieldPopover.less +35 -0
  46. package/lib/query-form-v3/Field/Composition/Select.d.ts +4 -0
  47. package/lib/query-form-v3/Field/Composition/Select.d.ts.map +1 -0
  48. package/lib/query-form-v3/Field/Composition/Select.js +131 -0
  49. package/lib/query-form-v3/Field/Composition/Select.js.map +1 -0
  50. package/lib/query-form-v3/Field/Composition/index.d.ts +10 -0
  51. package/lib/query-form-v3/Field/Composition/index.d.ts.map +1 -0
  52. package/lib/query-form-v3/Field/Composition/index.js +255 -0
  53. package/lib/query-form-v3/Field/Composition/index.js.map +1 -0
  54. package/lib/query-form-v3/Field/Composition/index.less +118 -0
  55. package/lib/query-form-v3/Field/Composition/utils.d.ts +22 -0
  56. package/lib/query-form-v3/Field/Composition/utils.d.ts.map +1 -0
  57. package/lib/query-form-v3/Field/Composition/utils.js +147 -0
  58. package/lib/query-form-v3/Field/Composition/utils.js.map +1 -0
  59. package/lib/query-form-v3/Field/Select.d.ts +4 -0
  60. package/lib/query-form-v3/Field/Select.d.ts.map +1 -0
  61. package/lib/query-form-v3/Field/Select.js +80 -0
  62. package/lib/query-form-v3/Field/Select.js.map +1 -0
  63. package/lib/query-form-v3/Field/SelectInput.d.ts +4 -0
  64. package/lib/query-form-v3/Field/SelectInput.d.ts.map +1 -0
  65. package/lib/query-form-v3/Field/SelectInput.js +100 -0
  66. package/lib/query-form-v3/Field/SelectInput.js.map +1 -0
  67. package/lib/query-form-v3/Field/fieldsMap.d.ts +27 -0
  68. package/lib/query-form-v3/Field/fieldsMap.d.ts.map +1 -0
  69. package/lib/query-form-v3/Field/fieldsMap.js +35 -0
  70. package/lib/query-form-v3/Field/fieldsMap.js.map +1 -0
  71. package/lib/query-form-v3/Field/index.d.ts +14 -0
  72. package/lib/query-form-v3/Field/index.d.ts.map +1 -0
  73. package/lib/query-form-v3/Field/index.js +147 -0
  74. package/lib/query-form-v3/Field/index.js.map +1 -0
  75. package/lib/query-form-v3/createActions.d.ts +14 -0
  76. package/lib/query-form-v3/createActions.d.ts.map +1 -0
  77. package/lib/query-form-v3/createActions.js +54 -0
  78. package/lib/query-form-v3/createActions.js.map +1 -0
  79. package/lib/query-form-v3/index.d.ts +27 -0
  80. package/lib/query-form-v3/index.d.ts.map +1 -0
  81. package/lib/query-form-v3/index.js +206 -0
  82. package/lib/query-form-v3/index.js.map +1 -0
  83. package/lib/query-form-v3/index.less +91 -0
  84. package/lib/query-form-v3/useForm.d.ts +13 -0
  85. package/lib/query-form-v3/useForm.d.ts.map +1 -0
  86. package/lib/query-form-v3/useForm.js +13 -0
  87. package/lib/query-form-v3/useForm.js.map +1 -0
  88. package/lib/table/resizableTable/index.d.ts +1 -1
  89. package/lib/table/resizableTable/index.d.ts.map +1 -1
  90. package/lib/table/resizableTable/index.js +8 -5
  91. package/lib/table/resizableTable/index.js.map +1 -1
  92. package/lib/table/table-hoc.d.ts +10 -3
  93. package/lib/table/table-hoc.d.ts.map +1 -1
  94. package/lib/table/table-hoc.js +8 -11
  95. package/lib/table/table-hoc.js.map +1 -1
  96. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"form.js","sourceRoot":"","sources":["../../src/form/form.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,+C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Option,\n} from 'antd/lib/form'\nimport React, { forwardRef } from 'react'\n\nimport { ConfigConsumer } from 'antd/lib/config-provider'\n\nimport { default as AntdForm } from 'antd/lib/form'\nimport type AntdFormItem from 'antd/lib/form/FormItem'\n\nimport { doUpperTitle } from '../utils'\nimport './form.less'\nimport classNames from 'classnames'\nexport * from 'antd/lib/form'\n\ninterface FormItemComponent\n extends React.ForwardRefExoticComponent<AntdFormItemProps & React.RefAttributes<AntdFormItem>> {}\ninterface FormComponent\n extends React.ForwardRefExoticComponent<AntdFormProps & React.RefAttributes<AntdForm>> {\n Item: FormItemComponent\n create: typeof AntdForm.create\n createFormField: typeof AntdForm.createFormField\n}\n\nexport const Form = forwardRef<AntdForm, AntdFormProps>(({ ...rest }, ref) => {\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n return <AntdForm {...rest} className={classNames(rest.className, 'tnt-form')} ref={ref} />\n }}\n </ConfigConsumer>\n )\n}) as FormComponent\n\nForm.Item = forwardRef<AntdFormItem, AntdFormItemProps>(({ label, ...rest }, ref) => {\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n return <AntdForm.Item {...rest} label={doUpperTitle(label)} ref={ref} />\n }}\n </ConfigConsumer>\n )\n})\n\n// 定义 create 函数的类型\ntype CreateFunction = <TOwnProps extends FormComponentProps<any>>(\n options?: FormCreateOption<TOwnProps>\n) => any\n\nconst Create: CreateFunction = (options: any) => (WrappedComponent: any) => {\n const validateSubmitMap: any = {}\n const CustomFormWrapper = (props: any, ref: any) => {\n const getFieldDecorator = props.form.getFieldDecorator\n props.form.getFieldDecorator = (name: any, options: any) => {\n let opt = options || {}\n if (opt.validateSubmit) {\n opt = {\n ...options,\n validateTrigger: 'noEvent',\n }\n validateSubmitMap[name] = true\n }\n return getFieldDecorator(name, opt)\n }\n return <WrappedComponent {...props} ref={ref} />\n }\n\n return AntdForm.create({\n ...options,\n onValuesChange: (props: any, changedValues: any, allValues: any) => {\n const keys = Object.keys(changedValues)\n if (keys.length === 1) {\n keys.forEach((name: any) => {\n if (validateSubmitMap[name]) {\n props.form.setFields({\n [name]: { errors: undefined },\n })\n }\n })\n }\n if (options && options.onValuesChange) {\n options.onValuesChange(props, changedValues, allValues)\n }\n },\n })(forwardRef(CustomFormWrapper))\n}\n\nForm.createFormField = AntdForm.createFormField\nForm.create = Create\n"]}
1
+ {"version":3,"file":"form.js","sourceRoot":"","sources":["../../src/form/form.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,+CAAyC;AAEzC,6DAAwD;AAExD,wDAAkD;AAGlD,oCAAuC;AACvC,uBAAoB;AACpB,4DAAmC;AACnC,+CAA4B;AAWf,QAAA,IAAI,GAAG,IAAA,kBAAU,EAA0B,CAAC,EAAW,EAAE,GAAG,EAAE,EAAE;QAAf,IAAI,cAAT,EAAW,CAAF;IAChE,OAAO,CACL,8BAAC,gCAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,OAAO,8BAAC,cAAQ,oBAAK,IAAI,IAAE,SAAS,EAAE,IAAA,oBAAU,EAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;IAC5F,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAkB,CAAA;AAEnB,YAAI,CAAC,IAAI,GAAG,IAAA,kBAAU,EAAkC,CAAC,EAAkB,EAAE,GAAG,EAAE,EAAE;QAA3B,EAAE,KAAK,OAAW,EAAN,IAAI,cAAhB,SAAkB,CAAF;IACvE,OAAO,CACL,8BAAC,gCAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,OAAO,8BAAC,cAAQ,CAAC,IAAI,oBAAK,IAAI,IAAE,KAAK,EAAE,IAAA,oBAAY,EAAC,KAAK,CAAC,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;IAC1E,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAC,CAAA;AA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,IAAI,OAAO,IAAI,OAAO,CAAC,cAAc,EAAE;gBACrC,OAAO,CAAC,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,SAAS,CAAC,CAAA;aACxD;QACH,CAAC,IACD,CAAC,IAAA,kBAAU,EAAC,iBAAiB,CAAC,CAAC,CAAA;AACnC,CAAC,CAAA;AAED,YAAI,CAAC,eAAe,GAAG,cAAQ,CAAC,eAAe,CAAA;AAC/C,YAAI,CAAC,MAAM,GAAG,MAAM,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2024-08-20 18:18:41\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2024-08-22 15:18:51\n * @FilePath: /tntd/packages/tntd/src/form/form.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport type {\n FormItemProps as AntdFormItemProps,\n FormProps as AntdFormProps,\n FormComponentProps,\n FormCreateOption,\n} from 'antd/lib/form'\nimport React, { forwardRef } from 'react'\n\nimport { ConfigConsumer } from 'antd/lib/config-provider'\n\nimport { default as AntdForm } from 'antd/lib/form'\nimport type AntdFormItem from 'antd/lib/form/FormItem'\n\nimport { doUpperTitle } from '../utils'\nimport './form.less'\nimport classNames from 'classnames'\nexport * from 'antd/lib/form'\n\ninterface FormItemComponent\n extends React.ForwardRefExoticComponent<AntdFormItemProps & React.RefAttributes<AntdFormItem>> {}\ninterface FormComponent\n extends React.ForwardRefExoticComponent<AntdFormProps & React.RefAttributes<AntdForm>> {\n Item: FormItemComponent\n create: typeof AntdForm.create\n createFormField: typeof AntdForm.createFormField\n}\n\nexport const Form = forwardRef<AntdForm, AntdFormProps>(({ ...rest }, ref) => {\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n return <AntdForm {...rest} className={classNames(rest.className, 'tnt-form')} ref={ref} />\n }}\n </ConfigConsumer>\n )\n}) as FormComponent\n\nForm.Item = forwardRef<AntdFormItem, AntdFormItemProps>(({ label, ...rest }, ref) => {\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n return <AntdForm.Item {...rest} label={doUpperTitle(label)} ref={ref} />\n }}\n </ConfigConsumer>\n )\n})\n\n// 定义 create 函数的类型\ntype CreateFunction = <TOwnProps extends FormComponentProps<any>>(\n options?: FormCreateOption<TOwnProps>\n) => any\n\nconst Create: CreateFunction = (options: any) => (WrappedComponent: any) => {\n const validateSubmitMap: any = {}\n const CustomFormWrapper = (props: any, ref: any) => {\n const getFieldDecorator = props.form.getFieldDecorator\n props.form.getFieldDecorator = (name: any, options: any) => {\n let opt = options || {}\n if (opt.validateSubmit) {\n opt = {\n ...options,\n validateTrigger: 'noEvent',\n }\n validateSubmitMap[name] = true\n }\n return getFieldDecorator(name, opt)\n }\n return <WrappedComponent {...props} ref={ref} />\n }\n\n return AntdForm.create({\n ...options,\n onValuesChange: (props: any, changedValues: any, allValues: any) => {\n const keys = Object.keys(changedValues)\n if (keys.length === 1) {\n keys.forEach((name: any) => {\n if (validateSubmitMap[name]) {\n props.form.setFields({\n [name]: {\n value: changedValues[name],\n errors: undefined,\n },\n })\n }\n })\n }\n if (options && options.onValuesChange) {\n options.onValuesChange(props, changedValues, allValues)\n }\n },\n })(forwardRef(CustomFormWrapper))\n}\n\nForm.createFormField = AntdForm.createFormField\nForm.create = Create\n"]}
@@ -0,0 +1,8 @@
1
+ declare function _default({ value, onChange, ...props }: {
2
+ [x: string]: any;
3
+ value: any;
4
+ onChange: any;
5
+ }): React.JSX.Element;
6
+ export default _default;
7
+ import React from "react";
8
+ //# sourceMappingURL=Checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/query-form-v3/Field/Checkbox.js"],"names":[],"mappings":"AAIe;;;;sBAQd"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _checkbox = _interopRequireDefault(require("../../checkbox"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
11
+ var t = {};
12
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
13
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
14
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
15
+ }
16
+ return t;
17
+ };
18
+ var _default = exports["default"] = function _default(_a) {
19
+ var value = _a.value,
20
+ _onChange = _a.onChange,
21
+ props = __rest(_a, ["value", "onChange"]);
22
+ return _react["default"].createElement(_checkbox["default"], Object.assign({}, props, {
23
+ checked: !!value,
24
+ onChange: function onChange(evt) {
25
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(evt.target.checked);
26
+ }
27
+ }));
28
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/query-form-v3/Field/Checkbox.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAyB;AAEzB,8DAAqC;AAErC,kBAAe,CAAC,EAA6B,EAAE,EAAE;QAAjC,EAAE,KAAK,EAAE,QAAQ,OAAY,EAAP,KAAK,cAA3B,qBAA6B,CAAF;IAAO,OAAA,CAChD,8BAAC,kBAAQ,oBACH,KAAK,IACT,OAAO,EAAE,CAAC,CAAC,KAAK,EAChB,QAAQ,EAAE,CAAC,GAAG,EAAE,EAAE;YAChB,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;QAChC,CAAC,IACD,CACH,CAAA;CAAA,CAAA","sourcesContent":["import React from 'react'\n\nimport Checkbox from '../../checkbox'\n\nexport default ({ value, onChange, ...props }) => (\n <Checkbox\n {...props}\n checked={!!value}\n onChange={(evt) => {\n onChange?.(evt.target.checked)\n }}\n />\n)\n"]}
@@ -0,0 +1,19 @@
1
+ declare var _default: React.ForwardRefExoticComponent<Pick<{
2
+ [x: string]: any;
3
+ visible: any;
4
+ setVisible: any;
5
+ searchText: any;
6
+ children: any;
7
+ value: any;
8
+ regex: any;
9
+ fieldItems: any;
10
+ propItem: any;
11
+ setFieldItem: any;
12
+ onChange: any;
13
+ form: any;
14
+ locale: any;
15
+ clsPrefix: any;
16
+ }, string | number> & React.RefAttributes<any>>;
17
+ export default _default;
18
+ import React from "react";
19
+ //# sourceMappingURL=FieldPopover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldPopover.d.ts","sourceRoot":"","sources":["../../../../src/query-form-v3/Field/Composition/FieldPopover.js"],"names":[],"mappings":""}
@@ -0,0 +1,370 @@
1
+ "use strict";
2
+
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var _get2 = _interopRequireDefault(require("lodash/get"));
9
+ var _cloneDeep2 = _interopRequireDefault(require("lodash/cloneDeep"));
10
+ var _react = _interopRequireWildcard(require("react"));
11
+ var _popover = _interopRequireDefault(require("../../../popover"));
12
+ var _Select = _interopRequireDefault(require("./Select"));
13
+ var _utils = require("./utils");
14
+ var _fieldsMap = _interopRequireDefault(require("../fieldsMap"));
15
+ require("./FieldPopover.less");
16
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
17
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
18
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
19
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
20
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
21
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
22
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
23
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
24
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
25
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
26
+ var t = {};
27
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
28
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
29
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
30
+ }
31
+ return t;
32
+ };
33
+ var isInput = function isInput(type) {
34
+ return ['input', 'string', 'search', 'number', 'inputNumber'].includes(type);
35
+ };
36
+ var FieldPopover = function FieldPopover(_a, ref) {
37
+ var visible = _a.visible,
38
+ setVisible = _a.setVisible,
39
+ searchText = _a.searchText,
40
+ children = _a.children,
41
+ value = _a.value,
42
+ regex = _a.regex,
43
+ fieldItems = _a.fieldItems,
44
+ propItem = _a.propItem,
45
+ setFieldItem = _a.setFieldItem,
46
+ onChange = _a.onChange,
47
+ form = _a.form,
48
+ locale = _a.locale,
49
+ clsPrefix = _a.clsPrefix,
50
+ props = __rest(_a, ["visible", "setVisible", "searchText", "children", "value", "regex", "fieldItems", "propItem", "setFieldItem", "onChange", "form", "locale", "clsPrefix"]);
51
+ var _useState = (0, _react.useState)(undefined),
52
+ _useState2 = _slicedToArray(_useState, 2),
53
+ searchTarget = _useState2[0],
54
+ setSearchTarget = _useState2[1];
55
+ var _useState3 = (0, _react.useState)(false),
56
+ _useState4 = _slicedToArray(_useState3, 2),
57
+ popoverContent = _useState4[0],
58
+ setPopoverContent = _useState4[1];
59
+ var onPropsClick = function onPropsClick(props) {
60
+ var _ref = props || {},
61
+ _ref$type = _ref.type,
62
+ type = _ref$type === void 0 ? 'input' : _ref$type,
63
+ component = _ref.component;
64
+ var copyValue = (0, _cloneDeep2["default"])(value);
65
+ if (!(copyValue === null || copyValue === void 0 ? void 0 : copyValue.find(function (v) {
66
+ return v.key === props.name;
67
+ }))) {
68
+ copyValue.push({
69
+ key: props.name,
70
+ value: type === 'array' ? [] : undefined,
71
+ closable: true,
72
+ label: (props.propsTitle || props.title || props.name) + ':'
73
+ });
74
+ }
75
+ setFieldItem(props);
76
+ if (isInput(type) && !component) {
77
+ var target = copyValue.find(function (v) {
78
+ return v.key === props.name;
79
+ });
80
+ onChange(target, true);
81
+ close();
82
+ return;
83
+ }
84
+ setVisible(true);
85
+ setPopoverContent(true);
86
+ onChange(copyValue);
87
+ };
88
+ (0, _react.useImperativeHandle)(ref, function () {
89
+ return {
90
+ onPropsClick: onPropsClick
91
+ };
92
+ });
93
+ var onSelectChange = function onSelectChange(v, isMultiple) {
94
+ var _a, _b, _c, _d, _e, _f;
95
+ var propObj = (v === null || v === void 0 ? void 0 : v.propItem) || propItem || {};
96
+ var fieldProps = propObj.props; // 直接搜索拿v.xx的值
97
+ var copyValue = (0, _cloneDeep2["default"])(value || []);
98
+ var index;
99
+ if (v === null || v === void 0 ? void 0 : v.propItem) {
100
+ // 模糊搜索
101
+ var _index = copyValue.findIndex(function (vv) {
102
+ var _a;
103
+ return vv.key === ((_a = v.propItem) === null || _a === void 0 ? void 0 : _a.name);
104
+ });
105
+ if (_index > -1) {
106
+ index = _index;
107
+ } else {
108
+ copyValue.push({
109
+ key: (_a = v.propItem) === null || _a === void 0 ? void 0 : _a.name,
110
+ value: isMultiple ? [] : ''
111
+ });
112
+ index = copyValue.length - 1;
113
+ }
114
+ setFieldItem(v.propItem);
115
+ } else {
116
+ // 选择值
117
+ index = copyValue.findIndex(function (v) {
118
+ return v.key === (propItem === null || propItem === void 0 ? void 0 : propItem.name);
119
+ });
120
+ }
121
+ if (isMultiple) {
122
+ if (!((_c = (_b = copyValue[index]) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.length)) {
123
+ copyValue[index].value = [v === null || v === void 0 ? void 0 : v.value];
124
+ } else {
125
+ if (((_d = copyValue[index].value) === null || _d === void 0 ? void 0 : _d.indexOf(v.value)) > -1) {
126
+ copyValue[index].value = copyValue[index].value.filter(function (val) {
127
+ return val !== v.value;
128
+ });
129
+ } else {
130
+ copyValue[index].value.push(v.value);
131
+ }
132
+ }
133
+ // 如果是模糊搜索-展开多选项
134
+ if (v === null || v === void 0 ? void 0 : v.propItem) {
135
+ setFieldItem(v === null || v === void 0 ? void 0 : v.propItem);
136
+ setVisible(true);
137
+ setPopoverContent(true);
138
+ }
139
+ } else {
140
+ copyValue[index].value = v === null || v === void 0 ? void 0 : v.value;
141
+ close();
142
+ }
143
+ var labelPrefix = "".concat(propObj.propsTitle || propObj.title || propObj.name, ": ");
144
+ if (propObj.setLabel) {
145
+ copyValue[index].label = labelPrefix + propObj.setLabel(copyValue[index].value);
146
+ } else {
147
+ copyValue[index].label = labelPrefix + (0, _utils.getLabelByValue)({
148
+ value: copyValue[index].value,
149
+ options: ((_e = propObj.props) === null || _e === void 0 ? void 0 : _e.options) || v.options,
150
+ fieldNames: ((_f = propObj.props) === null || _f === void 0 ? void 0 : _f.fieldNames) || {
151
+ label: 'label',
152
+ value: 'value'
153
+ }
154
+ });
155
+ }
156
+ copyValue[index].closable = true;
157
+ onChange(copyValue, false, true);
158
+ (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.onChange) && fieldProps.onChange(copyValue[index].value);
159
+ };
160
+ var onFieldChange = function onFieldChange() {
161
+ var _a, _b;
162
+ var _ref2 = propItem || {},
163
+ type = _ref2.type,
164
+ component = _ref2.component,
165
+ fieldProps = _ref2.props,
166
+ setLabel = _ref2.setLabel,
167
+ propsTitle = _ref2.propsTitle,
168
+ title = _ref2.title,
169
+ name = _ref2.name;
170
+ var _ref3 = fieldProps || {},
171
+ options = _ref3.options;
172
+ var copyValue = (0, _cloneDeep2["default"])(value);
173
+ var index = copyValue.findIndex(function (v) {
174
+ return v.key === (propItem === null || propItem === void 0 ? void 0 : propItem.name);
175
+ });
176
+ copyValue[index].value = arguments.length <= 0 ? undefined : arguments[0];
177
+ var labelPrefix = "".concat(propsTitle || title || name, ": ");
178
+ if (setLabel) {
179
+ // setLabel: 对于自定义组件,无法控制label的显示,可以通过setLabel方法控制
180
+ copyValue[index].label = labelPrefix + setLabel(arguments.length <= 0 ? undefined : arguments[0]);
181
+ } else if (type === 'date') {
182
+ copyValue[index].label = labelPrefix + (arguments.length <= 1 ? undefined : arguments[1]);
183
+ close();
184
+ } else if (type === 'dateRange') {
185
+ copyValue[index].label = labelPrefix + ((_a = arguments.length <= 1 ? undefined : arguments[1]) === null || _a === void 0 ? void 0 : _a.join('~'));
186
+ if ((_b = arguments.length <= 1 ? undefined : arguments[1]) === null || _b === void 0 ? void 0 : _b[1]) {
187
+ close();
188
+ }
189
+ } else if (type === 'selectInput') {
190
+ var key = (0, _get2["default"])(Object.keys(arguments.length <= 0 ? undefined : arguments[0]), '0');
191
+ var val = (0, _get2["default"])(arguments.length <= 0 ? undefined : arguments[0], key);
192
+ var label = (0, _utils.getLabelFromOptions)(key, options);
193
+ copyValue[index].label = "".concat(label, ": ").concat(val);
194
+ } else if (type === 'checkbox') {
195
+ copyValue[index].label = labelPrefix + ((arguments.length <= 0 ? undefined : arguments[0]) ? locale.yes : locale.no);
196
+ close();
197
+ } else if (!type && component) {
198
+ copyValue[index].label = labelPrefix + ((arguments.length <= 1 ? undefined : arguments[1]) || (arguments.length <= 0 ? undefined : arguments[0]));
199
+ close();
200
+ }
201
+ copyValue[index].closable = true;
202
+ // onChange(copyValue, false, true)
203
+ onChange(copyValue, false, (arguments.length <= 0 ? undefined : arguments[0]) !== undefined);
204
+ (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.onChange) && fieldProps.onChange(copyValue[index].value);
205
+ };
206
+ var close = function close() {
207
+ setVisible(false);
208
+ setTimeout(function () {
209
+ setFieldItem();
210
+ setPopoverContent(false);
211
+ }, 1);
212
+ };
213
+ var handleVisibleChange = function handleVisibleChange() {
214
+ if (!visible && !regex.test(searchText)) {
215
+ setVisible(true);
216
+ } else {
217
+ close();
218
+ }
219
+ };
220
+ (0, _react.useEffect)(function () {
221
+ var bool1 = false,
222
+ bool2 = false;
223
+ if (searchText && !propItem) {
224
+ fieldItems === null || fieldItems === void 0 ? void 0 : fieldItems.forEach(function (v) {
225
+ var _ref4 = v.props || {},
226
+ name = _ref4.name,
227
+ propsTitle = _ref4.propsTitle,
228
+ title = _ref4.title,
229
+ type = _ref4.type,
230
+ props = _ref4.props;
231
+ var _propsTitle = propsTitle || title || name;
232
+ if ((_propsTitle === null || _propsTitle === void 0 ? void 0 : _propsTitle.indexOf(searchText)) > -1) {
233
+ bool1 = true;
234
+ }
235
+ var sOptions = type !== 'select' ? [] : (props === null || props === void 0 ? void 0 : props.options) || [];
236
+ var fieldNames = props === null || props === void 0 ? void 0 : props.fieldNames;
237
+ var target = sOptions === null || sOptions === void 0 ? void 0 : sOptions.find(function (item) {
238
+ var labelKey = (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.label) || 'label';
239
+ var label = item instanceof Object ? item[labelKey] : item + '';
240
+ return (_react["default"].isValidElement(label) ? (0, _utils.formatLabel)(label) : label).indexOf(searchText) > -1;
241
+ });
242
+ if (target) {
243
+ bool2 = true;
244
+ }
245
+ });
246
+ setSearchTarget(!bool2 && !bool1 ? null : {
247
+ propsTitle: bool1,
248
+ propsValue: bool2
249
+ });
250
+ } else {
251
+ setSearchTarget(undefined);
252
+ }
253
+ }, [fieldItems, searchText, propItem]);
254
+ var renderFirstOptions = function renderFirstOptions() {
255
+ return _react["default"].createElement("div", null, (!searchText || (searchTarget === null || searchTarget === void 0 ? void 0 : searchTarget.propsTitle)) && _react["default"].createElement("label", null, locale.propTitle), _react["default"].createElement("ul", {
256
+ className: "ant-select-dropdown-menu"
257
+ }, fieldItems === null || fieldItems === void 0 ? void 0 : fieldItems.map(function (v) {
258
+ var _ref5 = v.props || {},
259
+ name = _ref5.name,
260
+ propsTitle = _ref5.propsTitle,
261
+ title = _ref5.title,
262
+ type = _ref5.type,
263
+ props = _ref5.props;
264
+ var _propsTitle = propsTitle || title || name;
265
+ if (searchText) {
266
+ if ((_propsTitle === null || _propsTitle === void 0 ? void 0 : _propsTitle.indexOf(searchText)) > -1) {
267
+ return _react["default"].createElement("li", {
268
+ className: "ant-select-dropdown-menu-item",
269
+ key: name,
270
+ value: name,
271
+ onMouseDown: function onMouseDown(e) {
272
+ return e.preventDefault();
273
+ },
274
+ onClick: function onClick() {
275
+ onPropsClick(v.props);
276
+ }
277
+ }, _react["default"].createElement("span", {
278
+ dangerouslySetInnerHTML: {
279
+ __html: (0, _utils.highlightSubstring)(_propsTitle, searchText)
280
+ }
281
+ }));
282
+ }
283
+ return null;
284
+ }
285
+ return _react["default"].createElement("li", {
286
+ className: "ant-select-dropdown-menu-item",
287
+ key: name,
288
+ value: name,
289
+ onMouseDown: function onMouseDown(e) {
290
+ return e.preventDefault();
291
+ },
292
+ onClick: function onClick() {
293
+ onPropsClick(v.props);
294
+ }
295
+ }, _propsTitle);
296
+ })), searchText && _react["default"].createElement("div", null, (searchTarget === null || searchTarget === void 0 ? void 0 : searchTarget.propsValue) && _react["default"].createElement("label", null, locale.propValue), fieldItems === null || fieldItems === void 0 ? void 0 : fieldItems.map(function (v) {
297
+ var _ref6 = v.props || {},
298
+ name = _ref6.name,
299
+ propsTitle = _ref6.propsTitle,
300
+ type = _ref6.type,
301
+ props = _ref6.props;
302
+ var target = value === null || value === void 0 ? void 0 : value.find(function (v) {
303
+ return v.key === name;
304
+ });
305
+ if (type === 'select') {
306
+ // && props?.options?.length > 0
307
+ return _react["default"].createElement(_Select["default"], Object.assign({
308
+ key: name
309
+ }, props, {
310
+ searchText: searchText,
311
+ propItem: v.props,
312
+ onChange: onSelectChange,
313
+ value: target === null || target === void 0 ? void 0 : target.value
314
+ }));
315
+ }
316
+ return;
317
+ })));
318
+ };
319
+ var renderSecondOptions = function renderSecondOptions() {
320
+ var _a;
321
+ var _ref7 = propItem || {},
322
+ name = _ref7.name,
323
+ propsTitle = _ref7.propsTitle,
324
+ title = _ref7.title,
325
+ type = _ref7.type,
326
+ className = _ref7.className,
327
+ component = _ref7.component,
328
+ fieldProps = _ref7.props;
329
+ var target = value === null || value === void 0 ? void 0 : value.find(function (v) {
330
+ return v.key === name;
331
+ });
332
+ var Field = component || _fieldsMap["default"][type] || function () {
333
+ return null;
334
+ };
335
+ return _react["default"].createElement("div", {
336
+ onClick: function onClick(e) {
337
+ return e.stopPropagation();
338
+ },
339
+ className: className
340
+ }, _react["default"].createElement("label", null, propsTitle || title || name), type === 'select' ? _react["default"].createElement(_Select["default"], Object.assign({}, fieldProps, {
341
+ searchText: searchText,
342
+ propItem: propItem,
343
+ onChange: onSelectChange,
344
+ value: target === null || target === void 0 ? void 0 : target.value
345
+ })) : _react["default"].createElement("div", {
346
+ className: "".concat(clsPrefix, "-field-popover-content"),
347
+ onClick: function onClick(e) {
348
+ return e.stopPropagation();
349
+ }
350
+ }, _react["default"].createElement(Field, Object.assign({
351
+ form: form,
352
+ value: target === null || target === void 0 ? void 0 : target.value
353
+ }, fieldProps, {
354
+ style: Object.assign(Object.assign({}, fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.style), {
355
+ width: ((_a = fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.style) === null || _a === void 0 ? void 0 : _a.width) || '250px'
356
+ }),
357
+ close: close,
358
+ onChange: onFieldChange
359
+ }))));
360
+ };
361
+ return _react["default"].createElement(_popover["default"], Object.assign({
362
+ trigger: "click",
363
+ visible: visible,
364
+ placement: "bottom",
365
+ overlayClassName: "".concat(clsPrefix, "-field-popover"),
366
+ content: !popoverContent ? renderFirstOptions() : renderSecondOptions(),
367
+ onVisibleChange: handleVisibleChange
368
+ }, props), children);
369
+ };
370
+ var _default = exports["default"] = (0, _react.forwardRef)(FieldPopover);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldPopover.js","sourceRoot":"","sources":["../../../../src/query-form-v3/Field/Composition/FieldPopover.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;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;YAC3C,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,CACnB,8BAAC,gBAAS,oBACJ,UAAU,IACd,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,cAAc,EACxB,KAAK,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,IACpB,CACH,CAAC,CAAC,CAAC,CACF,uCACE,SAAS,EAAE,GAAG,SAAS,wBAAwB,EAC/C,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE;gBAEnC,8BAAC,KAAK,kBACJ,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,IAChB,UAAU,IACd,KAAK,kCACA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,KACpB,KAAK,EAAE,CAAA,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,0CAAE,KAAK,KAAI,OAAO,KAE5C,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,aAAa,IACvB,CACE,CACP,CACG,CACP,CAAA;IACH,CAAC,CAAA;IAED,OAAO,CACL,8BAAC,iBAAO,kBACN,OAAO,EAAC,OAAO,EACf,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,QAAQ,EAClB,gBAAgB,EAAE,GAAG,SAAS,gBAAgB,EAC9C,OAAO,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,mBAAmB,EAAE,EACvE,eAAe,EAAE,mBAAmB,IAChC,KAAK,GAER,QAAQ,CACD,CACX,CAAA;AACH,CAAC,CAAA;AACD,kBAAe,IAAA,kBAAU,EAAC,YAAY,CAAC,CAAA","sourcesContent":["import React, { useEffect, useState, forwardRef, useImperativeHandle } from 'react'\nimport { cloneDeep } from 'lodash'\nimport Popover from '../../../popover'\nimport SelectOpt from './Select'\nimport { highlightSubstring, getLabelFromOptions, getLabelByValue, formatLabel } from './utils'\nimport { get } from 'lodash'\n\nimport fieldsMap, { getFieldWidth } from '../fieldsMap'\nimport './FieldPopover.less'\nconst isInput = (type) => ['input', 'string', 'search', 'number', 'inputNumber'].includes(type)\n\nconst FieldPopover = (\n {\n visible,\n setVisible,\n searchText,\n children,\n value,\n regex,\n fieldItems,\n propItem,\n setFieldItem,\n onChange,\n form,\n locale,\n clsPrefix,\n ...props\n },\n ref\n) => {\n const [searchTarget, setSearchTarget] = useState(undefined)\n const [popoverContent, setPopoverContent] = useState(false)\n\n const onPropsClick = (props) => {\n const { type = 'input', component } = props || {}\n const copyValue = cloneDeep(value)\n if (!copyValue?.find((v) => v.key === props.name)) {\n copyValue.push({\n key: props.name,\n value: type === 'array' ? [] : undefined,\n closable: true,\n label: (props.propsTitle || props.title || props.name) + ':',\n })\n }\n setFieldItem(props)\n if (isInput(type) && !component) {\n const target = copyValue.find((v) => v.key === props.name)\n onChange(target, true)\n close()\n return\n }\n setVisible(true)\n setPopoverContent(true)\n onChange(copyValue)\n }\n\n useImperativeHandle(ref, () => ({\n onPropsClick,\n }))\n\n const onSelectChange = (v, isMultiple) => {\n const propObj = v?.propItem || propItem || {}\n const { props: fieldProps } = propObj // 直接搜索拿v.xx的值\n const copyValue = cloneDeep(value || [])\n let index\n if (v?.propItem) {\n // 模糊搜索\n const _index = copyValue.findIndex((vv) => vv.key === v.propItem?.name)\n if (_index > -1) {\n index = _index\n } else {\n copyValue.push({\n key: v.propItem?.name,\n value: isMultiple ? [] : '',\n })\n index = copyValue.length - 1\n }\n setFieldItem(v.propItem)\n } else {\n // 选择值\n index = copyValue.findIndex((v) => v.key === propItem?.name)\n }\n\n if (isMultiple) {\n if (!copyValue[index]?.value?.length) {\n copyValue[index].value = [v?.value]\n } else {\n if (copyValue[index].value?.indexOf(v.value) > -1) {\n copyValue[index].value = copyValue[index].value.filter((val) => val !== v.value)\n } else {\n copyValue[index].value.push(v.value)\n }\n }\n // 如果是模糊搜索-展开多选项\n if (v?.propItem) {\n setFieldItem(v?.propItem)\n setVisible(true)\n setPopoverContent(true)\n }\n } else {\n copyValue[index].value = v?.value\n close()\n }\n\n const labelPrefix = `${propObj.propsTitle || propObj.title || propObj.name}: `\n if (propObj.setLabel) {\n copyValue[index].label = labelPrefix + propObj.setLabel(copyValue[index].value)\n } else {\n copyValue[index].label =\n labelPrefix +\n getLabelByValue({\n value: copyValue[index].value,\n options: propObj.props?.options || v.options,\n fieldNames: propObj.props?.fieldNames || {\n label: 'label',\n value: 'value',\n },\n })\n }\n copyValue[index].closable = true\n onChange(copyValue, false, true)\n fieldProps?.onChange && fieldProps.onChange(copyValue[index].value)\n }\n\n const onFieldChange = (...args) => {\n const { type, component, props: fieldProps, setLabel, propsTitle, title, name } = propItem || {}\n const { options } = fieldProps || {}\n const copyValue = cloneDeep(value)\n const index = copyValue.findIndex((v) => v.key === propItem?.name)\n copyValue[index].value = args[0]\n const labelPrefix = `${propsTitle || title || name}: `\n if (setLabel) {\n // setLabel: 对于自定义组件,无法控制label的显示,可以通过setLabel方法控制\n copyValue[index].label = labelPrefix + setLabel(args[0])\n } else if (type === 'date') {\n copyValue[index].label = labelPrefix + args[1]\n close()\n } else if (type === 'dateRange') {\n copyValue[index].label = labelPrefix + args[1]?.join('~')\n if (args[1]?.[1]) {\n close()\n }\n } else if (type === 'selectInput') {\n const key = get(Object.keys(args[0]), '0')\n const val = get(args[0], key)\n const label = getLabelFromOptions(key, options)\n copyValue[index].label = `${label}: ${val}`\n } else if (type === 'checkbox') {\n copyValue[index].label = labelPrefix + (args[0] ? locale.yes : locale.no)\n close()\n } else if (!type && component) {\n copyValue[index].label = labelPrefix + (args[1] || args[0])\n close()\n }\n copyValue[index].closable = true\n // onChange(copyValue, false, true)\n onChange(copyValue, false, args[0] !== undefined)\n fieldProps?.onChange && fieldProps.onChange(copyValue[index].value)\n }\n\n const close = () => {\n setVisible(false)\n setTimeout(() => {\n setFieldItem()\n setPopoverContent(false)\n }, 1)\n }\n const handleVisibleChange = () => {\n if (!visible && !regex.test(searchText)) {\n setVisible(true)\n } else {\n close()\n }\n }\n\n useEffect(() => {\n let bool1 = false,\n bool2 = false\n\n if (searchText && !propItem) {\n fieldItems?.forEach((v) => {\n const { name, propsTitle, title, type, props } = v.props || {}\n const _propsTitle = propsTitle || title || name\n if (_propsTitle?.indexOf(searchText) > -1) {\n bool1 = true\n }\n const sOptions = type !== 'select' ? [] : props?.options || []\n const fieldNames = props?.fieldNames\n const target = sOptions?.find((item) => {\n const labelKey = fieldNames?.label || 'label'\n const label = item instanceof Object ? item[labelKey] : item + ''\n return (React.isValidElement(label) ? formatLabel(label) : label).indexOf(searchText) > -1\n })\n if (target) {\n bool2 = true\n }\n })\n setSearchTarget(!bool2 && !bool1 ? null : { propsTitle: bool1, propsValue: bool2 })\n } else {\n setSearchTarget(undefined)\n }\n }, [fieldItems, searchText, propItem])\n\n const renderFirstOptions = () => {\n return (\n <div>\n {(!searchText || searchTarget?.propsTitle) && <label>{locale.propTitle}</label>}\n <ul className=\"ant-select-dropdown-menu\">\n {fieldItems?.map((v) => {\n const { name, propsTitle, title, type, props } = v.props || {}\n const _propsTitle = propsTitle || title || name\n if (searchText) {\n if (_propsTitle?.indexOf(searchText) > -1) {\n return (\n <li\n className=\"ant-select-dropdown-menu-item\"\n key={name}\n value={name}\n onMouseDown={(e) => e.preventDefault()}\n onClick={() => {\n onPropsClick(v.props)\n }}\n >\n <span\n dangerouslySetInnerHTML={{\n __html: highlightSubstring(_propsTitle, searchText),\n }}\n ></span>\n </li>\n )\n }\n return null\n }\n return (\n <li\n className=\"ant-select-dropdown-menu-item\"\n key={name}\n value={name}\n onMouseDown={(e) => e.preventDefault()}\n onClick={() => {\n onPropsClick(v.props)\n }}\n >\n {_propsTitle}\n </li>\n )\n })}\n </ul>\n {/* 可以对下拉框值筛选 */}\n {searchText && (\n <div>\n {searchTarget?.propsValue && <label>{locale.propValue}</label>}\n {fieldItems?.map((v) => {\n const { name, propsTitle, type, props } = v.props || {}\n const target = value?.find((v) => v.key === name)\n if (type === 'select') {\n // && props?.options?.length > 0\n return (\n <SelectOpt\n key={name}\n {...props}\n searchText={searchText}\n propItem={v.props}\n onChange={onSelectChange}\n value={target?.value}\n />\n )\n }\n return\n })}\n </div>\n )}\n </div>\n )\n }\n\n const renderSecondOptions = () => {\n const {\n name,\n propsTitle,\n title,\n type,\n className,\n component,\n props: fieldProps,\n } = propItem || {}\n const target = value?.find((v) => v.key === name)\n const Field = component || fieldsMap[type] || (() => null)\n return (\n <div onClick={(e) => e.stopPropagation()} className={className}>\n <label>{propsTitle || title || name}</label>\n {type === 'select' ? (\n <SelectOpt\n {...fieldProps}\n searchText={searchText}\n propItem={propItem}\n onChange={onSelectChange}\n value={target?.value}\n />\n ) : (\n <div\n className={`${clsPrefix}-field-popover-content`}\n onClick={(e) => e.stopPropagation()}\n >\n <Field\n form={form}\n value={target?.value}\n {...fieldProps}\n style={{\n ...fieldProps?.style,\n width: fieldProps?.style?.width || '250px',\n }}\n close={close}\n onChange={onFieldChange}\n />\n </div>\n )}\n </div>\n )\n }\n\n return (\n <Popover\n trigger=\"click\"\n visible={visible}\n placement=\"bottom\"\n overlayClassName={`${clsPrefix}-field-popover`}\n content={!popoverContent ? renderFirstOptions() : renderSecondOptions()}\n onVisibleChange={handleVisibleChange}\n {...props}\n >\n {children}\n </Popover>\n )\n}\nexport default forwardRef(FieldPopover)\n"]}
@@ -0,0 +1,35 @@
1
+ .tnt-queryform-field-popover {
2
+ min-width: 280px;
3
+ .ant-popover-inner-content {
4
+ padding: @padding-sm 0;
5
+ }
6
+ .ant-calendar-picker {
7
+ margin: @margin-xxs 0;
8
+ }
9
+ label {
10
+ color: tint(@text-color, 50%);
11
+ margin-bottom: @margin-xs;
12
+ display: block;
13
+ padding: 0 @padding-sm;
14
+ }
15
+ .ant-select-dropdown-menu {
16
+ &-item {
17
+ padding: @padding-xxs @padding-sm;
18
+ &:hover {
19
+ background-color: @bg-color-quaternary;
20
+ }
21
+ }
22
+ }
23
+ &-content {
24
+ padding: @padding-xxs @padding-sm;
25
+ }
26
+ .ant-select-selected-icon {
27
+ position: absolute;
28
+ right: @margin-base;
29
+ top: @margin-xs;
30
+ color: @blue-6;
31
+ }
32
+ .tnt-highlight {
33
+ color: @blue-6;
34
+ }
35
+ }
@@ -0,0 +1,4 @@
1
+ declare function _default(props: any): React.JSX.Element;
2
+ export default _default;
3
+ import React from "react";
4
+ //# sourceMappingURL=Select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/query-form-v3/Field/Composition/Select.js"],"names":[],"mappings":"AAMe,yDA4Gd"}