@vtx/components 4.0.0-beta.71 → 4.0.0-beta.72

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 (88) hide show
  1. package/README.md +19 -19
  2. package/es/utils/components/LabelIconTip/index.js +7 -7
  3. package/es/utils/conversionMomentValue/index.js +25 -25
  4. package/es/utils/filterSpecialCharacters.js +6 -6
  5. package/es/utils/genCopyable/index.js +6 -6
  6. package/es/utils/getFieldPropsOrFormItemProps/index.js +7 -7
  7. package/es/utils/hooks/useDebounceFn/index.js +4 -4
  8. package/es/utils/hooks/useDebounceValue/index.js +6 -6
  9. package/es/utils/hooks/useDeepCompareMemo/index.js +7 -7
  10. package/es/utils/hooks/useLatest/index.js +2 -2
  11. package/es/utils/hooks/useRefCallback/index.js +5 -5
  12. package/es/utils/isBrowser/index.js +7 -7
  13. package/es/utils/isUrl/index.js +4 -4
  14. package/es/utils/merge/index.js +4 -4
  15. package/es/utils/nanoid/index.js +4 -4
  16. package/es/utils/omitBoolean/index.js +4 -4
  17. package/es/utils/parseValueToMoment/index.js +4 -4
  18. package/es/utils/proFieldParsingText/index.js +10 -10
  19. package/es/utils/transformKeySubmitValue/index.js +57 -57
  20. package/es/utils/useEditableArray/index.js +46 -46
  21. package/es/utils/useEditableMap/index.js +22 -22
  22. package/es/utils/useMediaQuery/index.js +5 -5
  23. package/es/vtx-datagrid/Store/Provide.js +3 -10
  24. package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +4 -4
  25. package/es/vtx-datagrid/columnState.js +28 -1
  26. package/es/vtx-datagrid/index.js +26 -8
  27. package/es/vtx-datagrid/style/index.less +242 -242
  28. package/es/vtx-date-picker/style/index.less +39 -39
  29. package/es/vtx-export/index.js +8 -8
  30. package/es/vtx-icon/index.js1 +90 -90
  31. package/es/vtx-import/index.js +57 -29
  32. package/es/vtx-import/result.js +22 -24
  33. package/es/vtx-modal/index.js +2 -2
  34. package/es/vtx-page-layout/Basic.js +2 -2
  35. package/es/vtx-page-layout/TabLayout.js +6 -6
  36. package/es/vtx-page-layout/TableLayout.js +10 -10
  37. package/es/vtx-page-layout/TreeLayout.js +6 -6
  38. package/es/vtx-page-layout/container.js +2 -2
  39. package/es/vtx-provider/index.js +30 -30
  40. package/es/vtx-provider/intl.js +9 -9
  41. package/es/vtx-provider/locale/en_US.js +2 -0
  42. package/es/vtx-provider/locale/zh_CN.js +2 -0
  43. package/es/vtx-provider/useStyle/index.js +17 -17
  44. package/es/vtx-wang-editor/style/index.less +12 -12
  45. package/lib/utils/components/LabelIconTip/index.js +7 -7
  46. package/lib/utils/conversionMomentValue/index.js +25 -25
  47. package/lib/utils/filterSpecialCharacters.js +6 -6
  48. package/lib/utils/genCopyable/index.js +6 -6
  49. package/lib/utils/getFieldPropsOrFormItemProps/index.js +7 -7
  50. package/lib/utils/hooks/useDebounceFn/index.js +4 -4
  51. package/lib/utils/hooks/useDebounceValue/index.js +6 -6
  52. package/lib/utils/hooks/useDeepCompareMemo/index.js +7 -7
  53. package/lib/utils/hooks/useLatest/index.js +2 -2
  54. package/lib/utils/hooks/useRefCallback/index.js +5 -5
  55. package/lib/utils/isBrowser/index.js +7 -7
  56. package/lib/utils/isUrl/index.js +4 -4
  57. package/lib/utils/merge/index.js +4 -4
  58. package/lib/utils/nanoid/index.js +4 -4
  59. package/lib/utils/omitBoolean/index.js +4 -4
  60. package/lib/utils/parseValueToMoment/index.js +4 -4
  61. package/lib/utils/proFieldParsingText/index.js +10 -10
  62. package/lib/utils/transformKeySubmitValue/index.js +57 -57
  63. package/lib/utils/useEditableArray/index.js +46 -46
  64. package/lib/utils/useEditableMap/index.js +22 -22
  65. package/lib/utils/useMediaQuery/index.js +5 -5
  66. package/lib/vtx-datagrid/Store/Provide.js +2 -9
  67. package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +4 -4
  68. package/lib/vtx-datagrid/columnState.js +28 -1
  69. package/lib/vtx-datagrid/index.js +26 -8
  70. package/lib/vtx-datagrid/style/index.less +242 -242
  71. package/lib/vtx-date-picker/style/index.less +39 -39
  72. package/lib/vtx-export/index.js +8 -8
  73. package/lib/vtx-icon/index.js1 +90 -90
  74. package/lib/vtx-import/index.js +56 -28
  75. package/lib/vtx-import/result.js +23 -25
  76. package/lib/vtx-modal/index.js +2 -2
  77. package/lib/vtx-page-layout/Basic.js +2 -2
  78. package/lib/vtx-page-layout/TabLayout.js +6 -6
  79. package/lib/vtx-page-layout/TableLayout.js +10 -10
  80. package/lib/vtx-page-layout/TreeLayout.js +6 -6
  81. package/lib/vtx-page-layout/container.js +2 -2
  82. package/lib/vtx-provider/index.js +30 -30
  83. package/lib/vtx-provider/intl.js +9 -9
  84. package/lib/vtx-provider/locale/en_US.js +2 -0
  85. package/lib/vtx-provider/locale/zh_CN.js +2 -0
  86. package/lib/vtx-provider/useStyle/index.js +17 -17
  87. package/lib/vtx-wang-editor/style/index.less +12 -12
  88. package/package.json +238 -238
@@ -82,11 +82,11 @@ var omitUndefined = function omitUndefined(obj) {
82
82
  return newObj;
83
83
  };
84
84
 
85
- /**
86
- * 用于判断当前是否需要开启哈希(Hash)模式。
87
- * 首先也会判断当前是否处于测试环境中(通过 process.env.NODE_ENV === 'TEST' 判断),
88
- * 如果是,则返回 false。否则,直接返回 true 表示需要打开。
89
- * @returns
85
+ /**
86
+ * 用于判断当前是否需要开启哈希(Hash)模式。
87
+ * 首先也会判断当前是否处于测试环境中(通过 process.env.NODE_ENV === 'TEST' 判断),
88
+ * 如果是,则返回 false。否则,直接返回 true 表示需要打开。
89
+ * @returns
90
90
  */
91
91
  var isNeedOpenHash = exports.isNeedOpenHash = function isNeedOpenHash() {
92
92
  var _process$env$NODE_ENV, _process$env$NODE_ENV2;
@@ -121,10 +121,10 @@ var VtxConfigContext = exports.VtxConfigContext = /*#__PURE__*/_react.default.cr
121
121
  });
122
122
  var ConfigConsumer = exports.ConfigConsumer = VtxConfigContext.Consumer;
123
123
 
124
- /**
125
- * 组件解除挂载后清空一下 cache
126
- * @date 2022-11-28
127
- * @returns null
124
+ /**
125
+ * 组件解除挂载后清空一下 cache
126
+ * @date 2022-11-28
127
+ * @returns null
128
128
  */
129
129
  var CacheClean = function CacheClean() {
130
130
  var _useSWRConfig = (0, _swr.useSWRConfig)(),
@@ -137,10 +137,10 @@ var CacheClean = function CacheClean() {
137
137
  return null;
138
138
  };
139
139
 
140
- /**
141
- * 用于配置 Pro 的组件,分装之后会简单一些
142
- * @param props
143
- * @returns
140
+ /**
141
+ * 用于配置 Pro 的组件,分装之后会简单一些
142
+ * @param props
143
+ * @returns
144
144
  */
145
145
  var ConfigProviderContainer = function ConfigProviderContainer(props) {
146
146
  var _antdTheme$useToken;
@@ -159,17 +159,17 @@ var ConfigProviderContainer = function ConfigProviderContainer(props) {
159
159
  var tokenContext = (_antdTheme$useToken = _antd.theme.useToken) === null || _antdTheme$useToken === void 0 ? void 0 : _antdTheme$useToken.call(_antd.theme);
160
160
  var proProvide = (0, _react.useContext)(VtxConfigContext);
161
161
 
162
- /**
163
- * pro 的 类
164
- * @type {string}
165
- * @example .ant-pro
162
+ /**
163
+ * pro 的 类
164
+ * @type {string}
165
+ * @example .ant-pro
166
166
  */
167
167
 
168
168
  var vtxComponentsCls = prefixCls ? ".".concat(prefixCls) : ".vtx";
169
169
  var antCls = '.' + getPrefixCls();
170
170
  var salt = "".concat(vtxComponentsCls);
171
- /**
172
- * 合并一下token,不然导致嵌套 token 失效
171
+ /**
172
+ * 合并一下token,不然导致嵌套 token 失效
173
173
  */
174
174
  var proLayoutTokenMerge = (0, _react.useMemo)(function () {
175
175
  return (0, _layoutToken.getLayoutDesignToken)(propsToken || {}, tokenContext.token);
@@ -266,10 +266,10 @@ var ConfigProviderContainer = function ConfigProviderContainer(props) {
266
266
  });
267
267
  };
268
268
 
269
- /**
270
- * 用于配置 一些全局性的东西
271
- * @param props
272
- * @returns
269
+ /**
270
+ * 用于配置 一些全局性的东西
271
+ * @param props
272
+ * @returns
273
273
  */
274
274
  var VtxConfigProvider = exports.VtxConfigProvider = function VtxConfigProvider(props) {
275
275
  var _theme$components, _theme$components2;
@@ -334,13 +334,13 @@ var VtxConfigProvider = exports.VtxConfigProvider = function VtxConfigProvider(p
334
334
  }));
335
335
  };
336
336
 
337
- /**
338
- * It returns the intl object from the context if it exists, otherwise it returns the intl object for
339
- * 获取国际化的方法
340
- * @param locale
341
- * @param localeMap
342
- * the current locale
343
- * @returns The return value of the function is the intl object.
337
+ /**
338
+ * It returns the intl object from the context if it exists, otherwise it returns the intl object for
339
+ * 获取国际化的方法
340
+ * @param locale
341
+ * @param localeMap
342
+ * the current locale
343
+ * @returns The return value of the function is the intl object.
344
344
  */
345
345
  function useIntl() {
346
346
  var _useContext3 = (0, _react.useContext)(_antd.ConfigProvider.ConfigContext),
@@ -39,11 +39,11 @@ var _zh_CN = _interopRequireDefault(require("./locale/zh_CN"));
39
39
  var _zh_HK = _interopRequireDefault(require("./locale/zh_HK"));
40
40
  var _zh_TW = _interopRequireDefault(require("./locale/zh_TW"));
41
41
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
42
- /**
43
- * 创建一个国际化的操作函数
44
- *
45
- * @param locale
46
- * @param localeMap
42
+ /**
43
+ * 创建一个国际化的操作函数
44
+ *
45
+ * @param locale
46
+ * @param localeMap
47
47
  */
48
48
  var createIntl = exports.createIntl = function createIntl(locale, localeMap) {
49
49
  return {
@@ -131,10 +131,10 @@ var intlMap = exports.intlMap = {
131
131
  };
132
132
  var intlMapKeys = exports.intlMapKeys = Object.keys(intlMap);
133
133
 
134
- /**
135
- * 根据 antd 的 key 来找到的 locale 插件的 key
136
- *
137
- * @param localeKey
134
+ /**
135
+ * 根据 antd 的 key 来找到的 locale 插件的 key
136
+ *
137
+ * @param localeKey
138
138
  */
139
139
  var findIntlKeyByAntdLocaleKey = exports.findIntlKeyByAntdLocaleKey = function findIntlKeyByAntdLocaleKey(localeKey) {
140
140
  var localeName = (localeKey || 'zh-CN').toLocaleLowerCase();
@@ -131,6 +131,8 @@ var _default = exports.default = {
131
131
  operation: 'Import',
132
132
  error: 'Upload failed',
133
133
  success: 'Upload successful',
134
+ rowNumber: 'Line No.',
135
+ errorMessage: 'Error Description',
134
136
  selectFile: 'Click to select file',
135
137
  noFileSelected: "No file selected",
136
138
  downloadTemplate: 'Download template',
@@ -130,6 +130,8 @@ var _default = exports.default = {
130
130
  operation: '导入',
131
131
  error: '上传失败',
132
132
  success: '上传成功',
133
+ rowNumber: '行号',
134
+ errorMessage: '错误说明',
133
135
  selectFile: '选择文件',
134
136
  noFileSelected: "未选择任何文件",
135
137
  downloadTemplate: '下载模板',
@@ -16,23 +16,23 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
16
16
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
17
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
18
18
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
19
- /**
20
- * 把一个颜色设置一下透明度
21
- * @example (#fff, 0.5) => rgba(255, 255, 255, 0.5)
22
- * @param baseColor {string}
23
- * @param alpha {0-1}
24
- * @returns rgba {string}
19
+ /**
20
+ * 把一个颜色设置一下透明度
21
+ * @example (#fff, 0.5) => rgba(255, 255, 255, 0.5)
22
+ * @param baseColor {string}
23
+ * @param alpha {0-1}
24
+ * @returns rgba {string}
25
25
  */
26
26
  var setAlpha = exports.setAlpha = function setAlpha(baseColor, alpha) {
27
27
  return new _tinycolor.TinyColor(baseColor).setAlpha(alpha).toRgbString();
28
28
  };
29
29
 
30
- /**
31
- * 把一个颜色修改一些明度
32
- * @example (#000, 50) => #808080
33
- * @param baseColor {string}
34
- * @param brightness {0-100}
35
- * @returns hexColor {string}
30
+ /**
31
+ * 把一个颜色修改一些明度
32
+ * @example (#000, 50) => #808080
33
+ * @param baseColor {string}
34
+ * @param brightness {0-100}
35
+ * @returns hexColor {string}
36
36
  */
37
37
  var lighten = exports.lighten = function lighten(baseColor, brightness) {
38
38
  var instance = new _tinycolor.TinyColor(baseColor);
@@ -67,11 +67,11 @@ var operationUnit = exports.operationUnit = function operationUnit(token) {
67
67
  };
68
68
  };
69
69
 
70
- /**
71
- * 封装了一下 antd 的 useStyle
72
- * @param componentName {string} 组件的名字
73
- * @param styleFn {GenerateStyle} 生成样式的函数
74
- * @returns UseStyleResult
70
+ /**
71
+ * 封装了一下 antd 的 useStyle
72
+ * @param componentName {string} 组件的名字
73
+ * @param styleFn {GenerateStyle} 生成样式的函数
74
+ * @returns UseStyleResult
75
75
  */
76
76
  function useStyle(componentName, styleFn) {
77
77
  var _token$vtxComponentsC;
@@ -1,12 +1,12 @@
1
-
2
-
3
- .vtx-wang-editor {
4
- border: @border-width-base @border-style-base @border-color-base;
5
- &.w-e-full-screen-container {
6
- z-index: 999999;
7
- }
8
- &-content {
9
- height: 350px;
10
- border-top: @border-width-base @border-style-base @border-color-base;
11
- }
12
- }
1
+
2
+
3
+ .vtx-wang-editor {
4
+ border: @border-width-base @border-style-base @border-color-base;
5
+ &.w-e-full-screen-container {
6
+ z-index: 999999;
7
+ }
8
+ &-content {
9
+ height: 350px;
10
+ border-top: @border-width-base @border-style-base @border-color-base;
11
+ }
12
+ }