@teamix/pro 1.2.0 → 1.2.5

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 (94) hide show
  1. package/dist/212.js +1 -1
  2. package/dist/pro.css +1 -1
  3. package/dist/pro.js +1072 -507
  4. package/dist/pro.min.css +1 -1
  5. package/dist/pro.min.js +1 -1
  6. package/es/actions/dialog-component.js +2 -1
  7. package/es/actions/dialog-form.js +2 -1
  8. package/es/actions/dialog.js +2 -1
  9. package/es/actions/index.js +1 -1
  10. package/es/actions/utils.d.ts +1 -0
  11. package/es/actions/utils.js +27 -0
  12. package/es/card/card-container.d.ts +18 -0
  13. package/es/card/card-container.js +24 -0
  14. package/es/card/divider.d.ts +6 -0
  15. package/es/card/divider.js +16 -0
  16. package/es/card/index.d.ts +59 -32
  17. package/es/card/index.js +191 -107
  18. package/es/card/index.scss +124 -9
  19. package/es/card/utils.d.ts +9 -0
  20. package/es/card/utils.js +30 -0
  21. package/es/form/Components/ProField/index.js +2 -6
  22. package/es/form/ProForm/index.js +43 -17
  23. package/es/form/ProForm/index.scss +0 -1
  24. package/es/form/ProForm/useAutoSubmit.d.ts +1 -1
  25. package/es/form/ProForm/useAutoSubmit.js +3 -3
  26. package/es/form/ProForm/useInitialRequest.d.ts +1 -1
  27. package/es/form/ProForm/useInitialRequest.js +2 -2
  28. package/es/form/SchemaForm/initializeDataSource.js +1 -1
  29. package/es/form/SchemaForm/initializeFormButton.js +3 -2
  30. package/es/form/SchemaForm/initializeRequest.js +6 -3
  31. package/es/form/SchemaForm/initializeRules.js +1 -1
  32. package/es/form/SchemaForm/reactions.d.ts +5 -4
  33. package/es/form/SchemaForm/reactions.js +20 -11
  34. package/es/form/locales/validate.d.ts +159 -0
  35. package/es/form/locales/validate.js +158 -0
  36. package/es/form/typing.d.ts +4 -3
  37. package/es/index.d.ts +1 -1
  38. package/es/index.js +1 -1
  39. package/es/info/components/InfoGroup/index.js +5 -2
  40. package/es/info/components/InfoValueItem/index.js +5 -7
  41. package/es/info/components/baseInfo/index.js +4 -2
  42. package/es/info/index.js +25 -11
  43. package/es/info/typing.d.ts +6 -0
  44. package/es/nocode/configurators/Card.js +8 -4
  45. package/es/table/components/Layout/index.js +1 -1
  46. package/es/table/components/ToolBar/FilterColumnIcon.js +2 -24
  47. package/es/table/components/ToolBar/index.scss +0 -3
  48. package/es/table/index.js +15 -7
  49. package/es/table/typing.d.ts +4 -4
  50. package/lib/actions/dialog-component.js +3 -1
  51. package/lib/actions/dialog-form.js +3 -1
  52. package/lib/actions/dialog.js +3 -1
  53. package/lib/actions/index.js +1 -1
  54. package/lib/actions/utils.d.ts +1 -0
  55. package/lib/actions/utils.js +33 -0
  56. package/lib/card/card-container.d.ts +18 -0
  57. package/lib/card/card-container.js +37 -0
  58. package/lib/card/divider.d.ts +6 -0
  59. package/lib/card/divider.js +26 -0
  60. package/lib/card/index.d.ts +59 -32
  61. package/lib/card/index.js +211 -110
  62. package/lib/card/index.scss +124 -9
  63. package/lib/card/utils.d.ts +9 -0
  64. package/lib/card/utils.js +41 -0
  65. package/lib/form/Components/ProField/index.js +1 -5
  66. package/lib/form/ProForm/index.js +41 -14
  67. package/lib/form/ProForm/index.scss +0 -1
  68. package/lib/form/ProForm/useAutoSubmit.d.ts +1 -1
  69. package/lib/form/ProForm/useAutoSubmit.js +3 -3
  70. package/lib/form/ProForm/useInitialRequest.d.ts +1 -1
  71. package/lib/form/ProForm/useInitialRequest.js +2 -2
  72. package/lib/form/SchemaForm/initializeDataSource.js +1 -1
  73. package/lib/form/SchemaForm/initializeFormButton.js +5 -2
  74. package/lib/form/SchemaForm/initializeRequest.js +5 -2
  75. package/lib/form/SchemaForm/initializeRules.js +1 -1
  76. package/lib/form/SchemaForm/reactions.d.ts +5 -4
  77. package/lib/form/SchemaForm/reactions.js +23 -12
  78. package/lib/form/locales/validate.d.ts +159 -0
  79. package/lib/form/locales/validate.js +165 -0
  80. package/lib/form/typing.d.ts +4 -3
  81. package/lib/index.d.ts +1 -1
  82. package/lib/index.js +1 -1
  83. package/lib/info/components/InfoGroup/index.js +5 -2
  84. package/lib/info/components/InfoValueItem/index.js +5 -7
  85. package/lib/info/components/baseInfo/index.js +4 -2
  86. package/lib/info/index.js +24 -10
  87. package/lib/info/typing.d.ts +6 -0
  88. package/lib/nocode/configurators/Card.js +8 -4
  89. package/lib/table/components/Layout/index.js +1 -1
  90. package/lib/table/components/ToolBar/FilterColumnIcon.js +2 -24
  91. package/lib/table/components/ToolBar/index.scss +0 -3
  92. package/lib/table/index.js +16 -7
  93. package/lib/table/typing.d.ts +4 -4
  94. package/package.json +5 -4
@@ -27,9 +27,11 @@ var _useAutoSubmit = _interopRequireDefault(require("./useAutoSubmit"));
27
27
 
28
28
  var _useInitialRequest = _interopRequireDefault(require("./useInitialRequest"));
29
29
 
30
+ var _validate = _interopRequireDefault(require("../locales/validate"));
31
+
30
32
  require("./index.scss");
31
33
 
32
- var _excluded = ["form", "initialValues", "initialRequest", "schema", "scope", "components", "children", "layout", "labelAlign", "wrapperAlign", "labelCol", "wrapperCol", "breakpoints", "onChange", "onSubmit", "onSubmitFailed", "className"];
34
+ var _excluded = ["form", "initialValues", "initialRequest", "schema", "scope", "context", "components", "children", "layout", "labelAlign", "wrapperAlign", "labelCol", "wrapperCol", "breakpoints", "onChange", "onSubmit", "onSubmitFailed", "className"];
33
35
 
34
36
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
35
37
 
@@ -47,12 +49,14 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
47
49
 
48
50
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
49
51
 
52
+ (0, _core.registerValidateLocale)(_validate.default);
50
53
  var ProForm = /*#__PURE__*/(0, _react.memo)(function (_ref) {
51
54
  var outerForm = _ref.form,
52
55
  initialValues = _ref.initialValues,
53
56
  initialRequest = _ref.initialRequest,
54
57
  schema = _ref.schema,
55
58
  scope = _ref.scope,
59
+ context = _ref.context,
56
60
  components = _ref.components,
57
61
  children = _ref.children,
58
62
  layout = _ref.layout,
@@ -68,11 +72,18 @@ var ProForm = /*#__PURE__*/(0, _react.memo)(function (_ref) {
68
72
  otherProps = _objectWithoutProperties(_ref, _excluded);
69
73
 
70
74
  var form = (0, _react.useMemo)(function () {
71
- return outerForm || (0, _core.createForm)();
75
+ return outerForm || (0, _core.createForm)({
76
+ validateFirst: true
77
+ });
72
78
  }, []);
73
79
  var prefixCls = (0, _utils.usePrefixCls)('', {
74
80
  prefix: 'teamix-pro-form'
75
81
  });
82
+ var mergedScope = (0, _react.useMemo)(function () {
83
+ return _objectSpread(_objectSpread({}, scope), {}, {
84
+ context: context
85
+ });
86
+ }, [scope, context]);
76
87
  var onAutoSubmit = (0, _useAutoSubmit.default)(onSubmit);
77
88
  var getTeamixLayout = (0, _react.useMemo)(function () {
78
89
  return breakpoints ? {
@@ -110,17 +121,12 @@ var ProForm = /*#__PURE__*/(0, _react.memo)(function (_ref) {
110
121
  form.setInitialValues(values);
111
122
  });
112
123
  }
124
+ }, []); // 配置国际化
125
+
126
+ (0, _react.useEffect)(function () {
127
+ (0, _core.setValidateLanguage)((0, _utils.getLanguage)() || 'zh-cn');
113
128
  }, []);
114
- return outerForm === false ?
115
- /*#__PURE__*/
116
- // 特殊表单,无需渲染form实例,例如FormDialog等
117
- _react.default.createElement(_formily.FormLayout, _objectSpread(_objectSpread({
118
- className: (0, _classnames.default)(prefixCls, className)
119
- }, otherProps), getTeamixLayout), /*#__PURE__*/_react.default.createElement(_SchemaForm.default, {
120
- schema: schema,
121
- scope: scope,
122
- components: components
123
- }), children) : /*#__PURE__*/_react.default.createElement(_formily.Form, _objectSpread(_objectSpread(_objectSpread({
129
+ return /*#__PURE__*/_react.default.createElement(_formily.Form, _objectSpread(_objectSpread(_objectSpread({
124
130
  className: (0, _classnames.default)(prefixCls, className)
125
131
  }, otherProps), getTeamixLayout), {}, {
126
132
  form: form,
@@ -128,9 +134,30 @@ var ProForm = /*#__PURE__*/(0, _react.memo)(function (_ref) {
128
134
  onAutoSubmitFailed: onSubmitFailed
129
135
  }), /*#__PURE__*/_react.default.createElement(_SchemaForm.default, {
130
136
  schema: schema,
131
- scope: scope,
137
+ scope: mergedScope,
132
138
  components: components
133
- }), children);
139
+ }), children); // return outerForm === false ? ( // 特殊表单,无需渲染form实例,例如FormDialog等
140
+ // <FormLayout
141
+ // className={cls(prefixCls, className)}
142
+ // {...otherProps}
143
+ // {...getTeamixLayout}
144
+ // >
145
+ // <SchemaForm schema={schema} scope={scope} components={components} />
146
+ // {children}
147
+ // </FormLayout>
148
+ // ) : (
149
+ // <Form
150
+ // className={cls(prefixCls, className)}
151
+ // {...otherProps}
152
+ // {...getTeamixLayout}
153
+ // form={form}
154
+ // onAutoSubmit={onAutoSubmit}
155
+ // onAutoSubmitFailed={onSubmitFailed}
156
+ // >
157
+ // <SchemaForm schema={schema} scope={scope} components={components} />
158
+ // {children}
159
+ // </Form>
160
+ // );
134
161
  });
135
162
  ProForm.defaultProps = {
136
163
  colon: false,
@@ -244,7 +244,6 @@
244
244
  right: 0;
245
245
  width: 100% !important;
246
246
  height: 56px !important;
247
- padding-left: 24px;
248
247
  background: var(--color-fill1-1, #fff) !important;
249
248
  box-shadow: 0 -1px 5px 0 rgba(38, 38, 38, 0.14);
250
249
  z-index: 2;
@@ -1,6 +1,6 @@
1
1
  import { CommonRequestConfig } from '@teamix/utils';
2
2
  interface IUseAutoSubmit {
3
- (onSubmit?: ((values: any) => any) | CommonRequestConfig): any;
3
+ (onSubmit?: ((values: any) => any) | CommonRequestConfig, context?: any): any;
4
4
  }
5
5
  declare const useAutoSubmit: IUseAutoSubmit;
6
6
  export default useAutoSubmit;
@@ -15,7 +15,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
15
15
 
16
16
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
17
 
18
- var useAutoSubmit = function useAutoSubmit(onSubmit) {
18
+ var useAutoSubmit = function useAutoSubmit(onSubmit, context) {
19
19
  if ((0, _utils.isObj)(onSubmit)) {
20
20
  var history = (0, _reactRouterDom.useHistory)();
21
21
  var submitConfig = onSubmit;
@@ -24,9 +24,9 @@ var useAutoSubmit = function useAutoSubmit(onSubmit) {
24
24
  method: 'POST'
25
25
  }, submitConfig), {}, {
26
26
  params: _objectSpread(_objectSpread({}, values), submitConfig.params || {})
27
- }), {
27
+ }), _objectSpread({
28
28
  fields: values
29
- }, history);
29
+ }, context), history);
30
30
  };
31
31
  }
32
32
 
@@ -1,6 +1,6 @@
1
1
  import { CommonRequestConfig } from '@teamix/utils';
2
2
  interface IUseInitialRequest {
3
- (initialRequest: CommonRequestConfig): Promise<any>;
3
+ (initialRequest: CommonRequestConfig, context?: any): Promise<any>;
4
4
  }
5
5
  declare const useInitialRequest: IUseInitialRequest;
6
6
  export default useInitialRequest;
@@ -13,10 +13,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
13
13
 
14
14
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
15
 
16
- var useInitialRequest = function useInitialRequest(initialRequest) {
16
+ var useInitialRequest = function useInitialRequest(initialRequest, context) {
17
17
  return (0, _utils.doCommonRequest)(_objectSpread({
18
18
  method: 'GET'
19
- }, initialRequest));
19
+ }, initialRequest), context);
20
20
  };
21
21
 
22
22
  var _default = useInitialRequest;
@@ -21,7 +21,7 @@ var initializeDataSource = function initializeDataSource(dataSource) {
21
21
  var requestScopeName = (0, _utils2.getRandomName)('$request');
22
22
  var dataSourceScopeName = (0, _utils2.getRandomName)('$dataSource');
23
23
  return {
24
- reactions: ["{{".concat(dataSourceScopeName, "(").concat(requestScopeName, ",").concat(requestConfig.onComplete, ")}}")],
24
+ reactions: ["{{".concat(dataSourceScopeName, "(").concat(requestScopeName, ",").concat(requestConfig.onComplete, ",context)}}")],
25
25
  scope: (_scope = {}, _defineProperty(_scope, requestScopeName, (0, _reactions.$request)(requestConfig)), _defineProperty(_scope, dataSourceScopeName, _reactions.$dataSource), _scope)
26
26
  };
27
27
  }
@@ -4,6 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
+
8
+ var _utils = require("@teamix/utils");
9
+
7
10
  var _excluded = ["sticky", "container", "onAffix"];
8
11
 
9
12
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
@@ -17,8 +20,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
17
20
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
18
21
 
19
22
  var buttonTextMap = {
20
- Submit: '提交',
21
- Reset: '重置'
23
+ Submit: (0, _utils.getMessage)('submit'),
24
+ Reset: (0, _utils.getMessage)('reset')
22
25
  };
23
26
 
24
27
  var initializeButton = function initializeButton(item) {
@@ -13,10 +13,13 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
13
13
 
14
14
  var initializeRequest = function initializeRequest(requestConfig) {
15
15
  if (requestConfig) {
16
+ var _scope;
17
+
16
18
  var requestScopeName = (0, _utils.getRandomName)('$request');
19
+ var contextScopeName = (0, _utils.getRandomName)('$context');
17
20
  return {
18
- reactions: ["{{".concat(requestScopeName, "}}")],
19
- scope: _defineProperty({}, requestScopeName, (0, _reactions.$request)(requestConfig))
21
+ reactions: ["{{".concat(contextScopeName, "(").concat(requestScopeName, ",").concat(requestConfig.onComplete, ",context)}}")],
22
+ scope: (_scope = {}, _defineProperty(_scope, requestScopeName, (0, _reactions.$request)(requestConfig)), _defineProperty(_scope, contextScopeName, _reactions.$context), _scope)
20
23
  };
21
24
  }
22
25
 
@@ -41,7 +41,7 @@ var initializeRules = function initializeRules(rules) {
41
41
  var validatorScopeName = (0, _utils2.getRandomName)('$validator');
42
42
  return {
43
43
  rules: _objectSpread(_objectSpread({}, rule), {}, {
44
- validator: "{{".concat(validatorScopeName, "(").concat(requestScopeName, ",").concat(validator.onComplete, ")}}")
44
+ validator: "{{".concat(validatorScopeName, "(").concat(requestScopeName, ",").concat(validator.onComplete, ",context)}}")
45
45
  }),
46
46
  scope: (_scope = {}, _defineProperty(_scope, requestScopeName, (0, _reactions.$request)(validator)), _defineProperty(_scope, validatorScopeName, _reactions2.$validator), _scope)
47
47
  };
@@ -1,5 +1,6 @@
1
1
  import type { ProFormRequestConfig } from '../typing';
2
- declare const $request: (requestConfig: ProFormRequestConfig) => (field: any) => Promise<unknown>;
3
- declare const $validator: (services: any, onComplete?: any) => (value: any, rules: any, { field }: any) => any;
4
- declare const $dataSource: (services: any, onComplete?: any) => (field: any) => any;
5
- export { $request, $dataSource, $validator };
2
+ declare const $request: (requestConfig: ProFormRequestConfig) => (field: any, context: any) => Promise<unknown>;
3
+ declare const $context: (services: any, onComplete: any, context: any) => (field: any) => any;
4
+ declare const $validator: (services: any, onComplete: any, context: any) => (value: any, rules: any, { field }: any) => any;
5
+ declare const $dataSource: (services: any, onComplete: any, context: any) => (field: any) => any;
6
+ export { $request, $context, $dataSource, $validator };
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.$validator = exports.$request = exports.$dataSource = void 0;
6
+ exports.$validator = exports.$request = exports.$dataSource = exports.$context = void 0;
7
7
 
8
8
  var _utils = require("@teamix/utils");
9
9
 
@@ -15,34 +15,45 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
15
15
 
16
16
  // 配置请求
17
17
  var $request = function $request(requestConfig) {
18
- return function (field) {
18
+ return function (field, context) {
19
19
  var _field$data;
20
20
 
21
21
  var refresh = field === null || field === void 0 ? void 0 : (_field$data = field.data) === null || _field$data === void 0 ? void 0 : _field$data.refresh;
22
22
  var beforeRequest = requestConfig.beforeRequest,
23
23
  onSuccess = requestConfig.onSuccess;
24
24
  var refreshResult = (0, _utils.isPlainObj)(refresh) ? refresh : {};
25
- var beforeRequestResult = (0, _utils.isFn)(beforeRequest) ? beforeRequest(field) : {};
25
+ var beforeRequestResult = (0, _utils.isFn)(beforeRequest) ? beforeRequest(field, context) : {};
26
26
  return (0, _utils.doCommonRequest)(_objectSpread(_objectSpread({}, requestConfig), {}, {
27
27
  params: _objectSpread(_objectSpread(_objectSpread({}, requestConfig.params), beforeRequestResult), refreshResult),
28
28
  beforeRequest: function beforeRequest() {
29
29
  return beforeRequestResult;
30
30
  },
31
31
  onSuccess: (0, _utils.isFn)(onSuccess) ? function (res) {
32
- return onSuccess(res, field);
32
+ return onSuccess(res, field, context);
33
33
  } : onSuccess
34
- }), field);
34
+ }), context);
35
35
  };
36
- }; // 配置校验
36
+ }; // 配置上下文
37
37
 
38
38
 
39
39
  exports.$request = $request;
40
40
 
41
- var $validator = function $validator(services, onComplete) {
41
+ var $context = function $context(services, onComplete, context) {
42
+ return function (field) {
43
+ return services(field, context).then(function (res) {
44
+ return onComplete && onComplete(res, field, context);
45
+ });
46
+ };
47
+ }; // 配置校验
48
+
49
+
50
+ exports.$context = $context;
51
+
52
+ var $validator = function $validator(services, onComplete, context) {
42
53
  return function (value, rules, _ref) {
43
54
  var field = _ref.field;
44
- return services(field).then(function (res) {
45
- return onComplete && onComplete(res, field);
55
+ return services(field, context).then(function (res) {
56
+ return onComplete && onComplete(res, field, context);
46
57
  });
47
58
  };
48
59
  }; // 配置DataSource
@@ -50,13 +61,13 @@ var $validator = function $validator(services, onComplete) {
50
61
 
51
62
  exports.$validator = $validator;
52
63
 
53
- var $dataSource = function $dataSource(services, onComplete) {
64
+ var $dataSource = function $dataSource(services, onComplete, context) {
54
65
  return function (field) {
55
66
  field.setState({
56
67
  loading: true,
57
68
  readOnly: true
58
69
  });
59
- return services(field).then(function (res) {
70
+ return services(field, context).then(function (res) {
60
71
  var _res$map;
61
72
 
62
73
  var isValueInDataSource = res === null || res === void 0 ? void 0 : (_res$map = res.map(function (v) {
@@ -70,7 +81,7 @@ var $dataSource = function $dataSource(services, onComplete) {
70
81
  loading: false,
71
82
  readOnly: false
72
83
  }, clearValue));
73
- return onComplete && onComplete(res, field);
84
+ return onComplete && onComplete(res, field, context);
74
85
  }).catch(function () {
75
86
  field.setState({
76
87
  loading: false,
@@ -0,0 +1,159 @@
1
+ declare const _default: {
2
+ en: {
3
+ pattern: string;
4
+ required: string;
5
+ number: string;
6
+ integer: string;
7
+ url: string;
8
+ email: string;
9
+ ipv6: string;
10
+ ipv4: string;
11
+ idcard: string;
12
+ taodomain: string;
13
+ qq: string;
14
+ phone: string;
15
+ money: string;
16
+ zh: string;
17
+ date: string;
18
+ zip: string;
19
+ len: string;
20
+ min: string;
21
+ maximum: string;
22
+ exclusiveMaximum: string;
23
+ minimum: string;
24
+ exclusiveMinimum: string;
25
+ max: string;
26
+ whitespace: string;
27
+ };
28
+ 'en-us': {
29
+ pattern: string;
30
+ required: string;
31
+ number: string;
32
+ integer: string;
33
+ url: string;
34
+ email: string;
35
+ ipv6: string;
36
+ ipv4: string;
37
+ idcard: string;
38
+ taodomain: string;
39
+ qq: string;
40
+ phone: string;
41
+ money: string;
42
+ zh: string;
43
+ date: string;
44
+ zip: string;
45
+ len: string;
46
+ min: string;
47
+ maximum: string;
48
+ exclusiveMaximum: string;
49
+ minimum: string;
50
+ exclusiveMinimum: string;
51
+ max: string;
52
+ whitespace: string;
53
+ };
54
+ zh: {
55
+ pattern: string;
56
+ required: string;
57
+ number: string;
58
+ integer: string;
59
+ url: string;
60
+ email: string;
61
+ ipv6: string;
62
+ ipv4: string;
63
+ idcard: string;
64
+ taodomain: string;
65
+ qq: string;
66
+ phone: string;
67
+ money: string;
68
+ zh: string;
69
+ date: string;
70
+ zip: string;
71
+ len: string;
72
+ min: string;
73
+ max: string;
74
+ maximum: string;
75
+ exclusiveMaximum: string;
76
+ minimum: string;
77
+ exclusiveMinimum: string;
78
+ whitespace: string;
79
+ };
80
+ 'zh-cn': {
81
+ pattern: string;
82
+ required: string;
83
+ number: string;
84
+ integer: string;
85
+ url: string;
86
+ email: string;
87
+ ipv6: string;
88
+ ipv4: string;
89
+ idcard: string;
90
+ taodomain: string;
91
+ qq: string;
92
+ phone: string;
93
+ money: string;
94
+ zh: string;
95
+ date: string;
96
+ zip: string;
97
+ len: string;
98
+ min: string;
99
+ max: string;
100
+ maximum: string;
101
+ exclusiveMaximum: string;
102
+ minimum: string;
103
+ exclusiveMinimum: string;
104
+ whitespace: string;
105
+ };
106
+ 'zh-tw': {
107
+ pattern: string;
108
+ required: string;
109
+ number: string;
110
+ integer: string;
111
+ url: string;
112
+ email: string;
113
+ ipv6: string;
114
+ ipv4: string;
115
+ idcard: string;
116
+ taodomain: string;
117
+ qq: string;
118
+ phone: string;
119
+ money: string;
120
+ zh: string;
121
+ date: string;
122
+ zip: string;
123
+ len: string;
124
+ min: string;
125
+ max: string;
126
+ maximum: string;
127
+ exclusiveMaximum: string;
128
+ minimum: string;
129
+ exclusiveMinimum: string;
130
+ whitespace: string;
131
+ };
132
+ ja: {
133
+ url: string;
134
+ whitespace: string;
135
+ zh: string;
136
+ zip: string;
137
+ date: string;
138
+ email: string;
139
+ exclusiveMaximum: string;
140
+ exclusiveMinimum: string;
141
+ idcard: string;
142
+ integer: string;
143
+ ipv4: string;
144
+ ipv6: string;
145
+ len: string;
146
+ max: string;
147
+ maximum: string;
148
+ min: string;
149
+ minimum: string;
150
+ money: string;
151
+ number: string;
152
+ pattern: string;
153
+ phone: string;
154
+ qq: string;
155
+ required: string;
156
+ taodomain: string;
157
+ };
158
+ };
159
+ export default _default;
@@ -0,0 +1,165 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _default = {
8
+ en: {
9
+ pattern: 'This field does not match any pattern',
10
+ required: 'This field is required',
11
+ number: 'This field is not a number',
12
+ integer: 'This field is not an integer number',
13
+ url: 'This field is a invalid url',
14
+ email: 'This field is not a email format',
15
+ ipv6: 'This field is not a ipv6 format',
16
+ ipv4: 'This field is not a ipv4 format',
17
+ idcard: 'This field is not an idcard format',
18
+ taodomain: 'This field is not a taobao domain format',
19
+ qq: 'This field is not a qq number format',
20
+ phone: 'This field is not a phone number format',
21
+ money: 'This field is not a currency format',
22
+ zh: 'This field is not a chinese string',
23
+ date: 'This field is not a valid date format',
24
+ zip: 'This field is not a zip format',
25
+ len: 'The length or number of entries must be {{len}}',
26
+ min: 'The length or number of entries must be at least {{min}}',
27
+ maximum: 'The value cannot be greater than {{maximum}}',
28
+ exclusiveMaximum: 'The value must be less than {{exclusiveMaximum}}',
29
+ minimum: 'The value cannot be less than {{minimum}}',
30
+ exclusiveMinimum: 'The value must be greater than {{exclusiveMinimum}}',
31
+ max: 'The length or number of entries must be at most {{max}}',
32
+ whitespace: 'This field cannot be blank string.'
33
+ },
34
+ 'en-us': {
35
+ pattern: 'This field does not match any pattern',
36
+ required: 'This field is required',
37
+ number: 'This field is not a number',
38
+ integer: 'This field is not an integer number',
39
+ url: 'This field is a invalid url',
40
+ email: 'This field is not a email format',
41
+ ipv6: 'This field is not a ipv6 format',
42
+ ipv4: 'This field is not a ipv4 format',
43
+ idcard: 'This field is not an idcard format',
44
+ taodomain: 'This field is not a taobao domain format',
45
+ qq: 'This field is not a qq number format',
46
+ phone: 'This field is not a phone number format',
47
+ money: 'This field is not a currency format',
48
+ zh: 'This field is not a chinese string',
49
+ date: 'This field is not a valid date format',
50
+ zip: 'This field is not a zip format',
51
+ len: 'The length or number of entries must be {{len}}',
52
+ min: 'The length or number of entries must be at least {{min}}',
53
+ maximum: 'The value cannot be greater than {{maximum}}',
54
+ exclusiveMaximum: 'The value must be less than {{exclusiveMaximum}}',
55
+ minimum: 'The value cannot be less than {{minimum}}',
56
+ exclusiveMinimum: 'The value must be greater than {{exclusiveMinimum}}',
57
+ max: 'The length or number of entries must be at most {{max}}',
58
+ whitespace: 'This field cannot be blank string.'
59
+ },
60
+ zh: {
61
+ pattern: '该字段不是一个合法的字段',
62
+ required: '该字段是必填字段',
63
+ number: '该字段不是合法的数字',
64
+ integer: '该字段不是合法的整型数字',
65
+ url: '该字段不是合法的url',
66
+ email: '该字段不是合法的邮箱格式',
67
+ ipv6: '该字段不是合法的ipv6格式',
68
+ ipv4: '该字段不是合法的ipv4格式',
69
+ idcard: '该字段不是合法的身份证格式',
70
+ taodomain: '该字段不符合淘系域名规则',
71
+ qq: '该字段不符合QQ号格式',
72
+ phone: '该字段不是有效的手机号',
73
+ money: '该字段不是有效货币格式',
74
+ zh: '该字段不是合法的中文字符串',
75
+ date: '该字段不是合法的日期格式',
76
+ zip: '该字段不是合法的邮编格式',
77
+ len: '长度或条目数必须为{{len}}',
78
+ min: '长度或条目数不能小于{{min}}',
79
+ max: '长度或条目数不能大于{{max}}',
80
+ maximum: '数值不能大于{{maximum}}',
81
+ exclusiveMaximum: '数值必须小于{{exclusiveMaximum}}',
82
+ minimum: '数值不能小于{{minimum}}',
83
+ exclusiveMinimum: '数值必须大于{{exclusiveMinimum}}',
84
+ whitespace: '不能为纯空白字符串'
85
+ },
86
+ 'zh-cn': {
87
+ pattern: '该字段不是一个合法的字段',
88
+ required: '该字段是必填字段',
89
+ number: '该字段不是合法的数字',
90
+ integer: '该字段不是合法的整型数字',
91
+ url: '该字段不是合法的url',
92
+ email: '该字段不是合法的邮箱格式',
93
+ ipv6: '该字段不是合法的ipv6格式',
94
+ ipv4: '该字段不是合法的ipv4格式',
95
+ idcard: '该字段不是合法的身份证格式',
96
+ taodomain: '该字段不符合淘系域名规则',
97
+ qq: '该字段不符合QQ号格式',
98
+ phone: '该字段不是有效的手机号',
99
+ money: '该字段不是有效货币格式',
100
+ zh: '该字段不是合法的中文字符串',
101
+ date: '该字段不是合法的日期格式',
102
+ zip: '该字段不是合法的邮编格式',
103
+ len: '长度或条目数必须为{{len}}',
104
+ min: '长度或条目数不能小于{{min}}',
105
+ max: '长度或条目数不能大于{{max}}',
106
+ maximum: '数值不能大于{{maximum}}',
107
+ exclusiveMaximum: '数值必须小于{{exclusiveMaximum}}',
108
+ minimum: '数值不能小于{{minimum}}',
109
+ exclusiveMinimum: '数值必须大于{{exclusiveMinimum}}',
110
+ whitespace: '不能为纯空白字符串'
111
+ },
112
+ 'zh-tw': {
113
+ pattern: '該字段不是一個合法的字段',
114
+ required: '該字段是必填字段',
115
+ number: '該字段不是合法的數字',
116
+ integer: '該字段不是合法的整型數字',
117
+ url: '該字段不是合法的url',
118
+ email: '該字段不是合法的郵箱格式',
119
+ ipv6: '該字段不是合法的ipv6格式',
120
+ ipv4: '該字段不是合法的ipv4格式',
121
+ idcard: '該字段不是合法的身份證格式',
122
+ taodomain: '該字段不符合淘系域名規則',
123
+ qq: '該字段不符合QQ號格式',
124
+ phone: '該字段不是有效的手機號',
125
+ money: '該字段不是有效貨幣格式',
126
+ zh: '該字段不是合法的中文字符串',
127
+ date: '該字段不是合法的日期格式',
128
+ zip: '該字段不是合法的郵編格式',
129
+ len: '長度或條目數必須為{{len}}',
130
+ min: '長度或條目數不能小於{{min}}',
131
+ max: '長度或條目數不能大於{{max}}',
132
+ maximum: '數值不能大於{{maximum}}',
133
+ exclusiveMaximum: '數值必須小於{{exclusiveMaximum}}',
134
+ minimum: '數值不能小於{{minimum}}',
135
+ exclusiveMinimum: '數值必須大於{{exclusiveMinimum}}',
136
+ whitespace: '不能為純空白字符串'
137
+ },
138
+ ja: {
139
+ url: 'このフィールドは無効なURLです',
140
+ whitespace: 'このフィールドを空の文字列にすることはできません。',
141
+ zh: 'このフィールドは中国語の文字列ではありません',
142
+ zip: 'このフィールドはzip形式ではありません',
143
+ date: 'このフィールドは有効な日付形式ではありません',
144
+ email: 'このフィールドはメール形式ではありません',
145
+ exclusiveMaximum: '値は{{exclusiveMaximum}}未満である必要があります',
146
+ exclusiveMinimum: '値は{{exclusiveMinimum}}より大きい必要があります',
147
+ idcard: 'このフィールドはIDカード形式ではありません',
148
+ integer: 'このフィールドは整数ではありません',
149
+ ipv4: 'このフィールドはIPv4形式ではありません',
150
+ ipv6: 'このフィールドはIPv6形式ではありません',
151
+ len: 'エントリの長さまたは数は{{len}}でなければなりません',
152
+ max: 'エントリの長さまたは数は最大{{max}}でなければなりません',
153
+ maximum: '値は{{最大}}を超えることはできません',
154
+ min: 'エントリの長さまたは数は、少なくとも{{min}}である必要があります',
155
+ minimum: '値は{{minimum}}以上にする必要があります',
156
+ money: 'このフィールドは通貨形式ではありません',
157
+ number: 'このフィールドは数値ではありません',
158
+ pattern: 'このフィールドはどのパターンとも一致しません',
159
+ phone: 'このフィールドは電話番号の形式ではありません',
160
+ qq: 'このフィールドはqq数値形式ではありません',
161
+ required: 'この項目は必須です',
162
+ taodomain: 'このフィールドは淘宝網ドメイン形式ではありません'
163
+ }
164
+ };
165
+ exports.default = _default;