assui 3.3.1 → 3.3.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.
@@ -1,5 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import type { DefaultOptionType, SelectProps } from 'antd/lib/select';
3
+ declare const Option: import("rc-select/lib/Option").OptionFC;
4
+ export { Option };
3
5
  export type ComplexValSelectValueType = string | number | any[] | Record<string, any> | null | undefined;
4
6
  export interface ComplexValSelectOptionType extends Omit<DefaultOptionType, 'value' | 'children' | 'options'> {
5
7
  value?: ComplexValSelectValueType;
@@ -15,6 +17,3 @@ export interface ComplexValSelectProps<T> extends Omit<SelectProps, 'value' | 'o
15
17
  }
16
18
  declare const ComplexValSelect: React.ForwardRefExoticComponent<ComplexValSelectProps<ComplexValSelectValueType> & React.RefAttributes<unknown>>;
17
19
  export default ComplexValSelect;
18
- declare const Option: import("rc-select/lib/Option").OptionFC;
19
- export { Option };
20
- export { stableStringify } from 'aa-utils';
@@ -40,8 +40,10 @@ import Select from "antd/es/select";
40
40
  import classNames from 'classnames';
41
41
  import ArrowDownOutlined from "a-icons/es/ArrowDownOutlined";
42
42
  import useControllableValue from "ahooks/es/useControllableValue";
43
- import { stableStringify } from 'aa-utils';
43
+ import stableStringify from "aa-utils/es/stableStringify";
44
44
  import { isNil } from 'lodash';
45
+ var Option = Select.Option;
46
+ export { Option };
45
47
  // 核心防御:防止非标准 JSON 字符串(如 tags 模式下手敲的纯文本或 undefined)导致页面崩溃
46
48
  var safeParse = function safeParse(str) {
47
49
  if (typeof str !== 'string') return str;
@@ -129,7 +131,4 @@ var ComplexValSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
129
131
  onSelect: handleSelect
130
132
  }, omit(props, ['value', 'defaultValue', 'onChange', 'options', 'onSelect', 'className'])));
131
133
  });
132
- export default ComplexValSelect;
133
- var Option = Select.Option;
134
- export { Option };
135
- export { stableStringify } from 'aa-utils';
134
+ export default ComplexValSelect;
@@ -1,5 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import type { DefaultOptionType, SelectProps } from 'antd/lib/select';
3
+ declare const Option: import("rc-select/lib/Option").OptionFC;
4
+ export { Option };
3
5
  export type ComplexValSelectValueType = string | number | any[] | Record<string, any> | null | undefined;
4
6
  export interface ComplexValSelectOptionType extends Omit<DefaultOptionType, 'value' | 'children' | 'options'> {
5
7
  value?: ComplexValSelectValueType;
@@ -15,6 +17,3 @@ export interface ComplexValSelectProps<T> extends Omit<SelectProps, 'value' | 'o
15
17
  }
16
18
  declare const ComplexValSelect: React.ForwardRefExoticComponent<ComplexValSelectProps<ComplexValSelectValueType> & React.RefAttributes<unknown>>;
17
19
  export default ComplexValSelect;
18
- declare const Option: import("rc-select/lib/Option").OptionFC;
19
- export { Option };
20
- export { stableStringify } from 'aa-utils';
@@ -71,7 +71,7 @@ var __importDefault = this && this.__importDefault || function (mod) {
71
71
  Object.defineProperty(exports, "__esModule", {
72
72
  value: true
73
73
  });
74
- exports.stableStringify = exports.Option = exports.isReferenceTypeOption = void 0;
74
+ exports.isReferenceTypeOption = exports.Option = void 0;
75
75
  var React = __importStar(require("react"));
76
76
  var omit_1 = __importDefault(require("lodash/omit"));
77
77
  var some_1 = __importDefault(require("lodash/some"));
@@ -82,8 +82,10 @@ var select_1 = __importDefault(require("antd/lib/select"));
82
82
  var classnames_1 = __importDefault(require("classnames"));
83
83
  var ArrowDownOutlined_1 = __importDefault(require("a-icons/lib/ArrowDownOutlined"));
84
84
  var useControllableValue_1 = __importDefault(require("ahooks/lib/useControllableValue"));
85
- var aa_utils_1 = require("aa-utils");
85
+ var stableStringify_1 = __importDefault(require("aa-utils/lib/stableStringify"));
86
86
  var lodash_1 = require("lodash");
87
+ var Option = select_1["default"].Option;
88
+ exports.Option = Option;
87
89
  // 核心防御:防止非标准 JSON 字符串(如 tags 模式下手敲的纯文本或 undefined)导致页面崩溃
88
90
  var safeParse = function safeParse(str) {
89
91
  if (typeof str !== 'string') return str;
@@ -102,7 +104,7 @@ var _formatOptions = function formatOptions(dataSource) {
102
104
  } : {};
103
105
  return __assign(__assign(__assign({}, item), {
104
106
  label: item.label,
105
- value: (0, isUndefined_1["default"])(item.value) ? undefined : (0, aa_utils_1.stableStringify)(item.value)
107
+ value: (0, isUndefined_1["default"])(item.value) ? undefined : (0, stableStringify_1["default"])(item.value)
106
108
  }), otherProps);
107
109
  });
108
110
  };
@@ -157,8 +159,8 @@ var ComplexValSelect = React.forwardRef(function (props, ref) {
157
159
  return isMultiple && (0, isArray_1["default"])(value) ? value.map(function (v) {
158
160
  // 在 tags 模式下,如果 v 已经是手敲的基础字符串,直接放行,避免产生多余的双引号
159
161
  if (mode === 'tags' && typeof v === 'string') return v;
160
- return (0, aa_utils_1.stableStringify)(v);
161
- }) : (0, aa_utils_1.stableStringify)(value);
162
+ return (0, stableStringify_1["default"])(v);
163
+ }) : (0, stableStringify_1["default"])(value);
162
164
  }
163
165
  return value;
164
166
  }, [value, isReferenceTypeVal, isMultiple, mode]);
@@ -172,13 +174,4 @@ var ComplexValSelect = React.forwardRef(function (props, ref) {
172
174
  onSelect: handleSelect
173
175
  }, (0, omit_1["default"])(props, ['value', 'defaultValue', 'onChange', 'options', 'onSelect', 'className'])));
174
176
  });
175
- exports["default"] = ComplexValSelect;
176
- var Option = select_1["default"].Option;
177
- exports.Option = Option;
178
- var aa_utils_2 = require("aa-utils");
179
- Object.defineProperty(exports, "stableStringify", {
180
- enumerable: true,
181
- get: function get() {
182
- return aa_utils_2.stableStringify;
183
- }
184
- });
177
+ exports["default"] = ComplexValSelect;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assui",
3
- "version": "3.3.1",
3
+ "version": "3.3.2",
4
4
  "description": "react ui library",
5
5
  "author": "jason <usochen@gmail.com>",
6
6
  "main": "./lib/index.js",
@@ -87,5 +87,5 @@
87
87
  "node": ">=10.0.0"
88
88
  },
89
89
  "license": "MIT",
90
- "gitHead": "43025f6771ae7e9d0b93a75891cfd5064555593c"
90
+ "gitHead": "6c3acd10c334b5f131583dd1624c3b38fc0fd620"
91
91
  }