@tiny-codes/react-easy 1.0.0 → 1.0.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -6
- package/README.md +65 -2
- package/README.zh-CN.md +2 -2
- package/es/components/BreakLines/index.d.ts +51 -0
- package/es/components/BreakLines/index.js +40 -0
- package/es/components/BreakLines/index.js.map +1 -0
- package/es/components/ConfigProvider/context.d.ts +11 -4
- package/es/components/ConfigProvider/context.js +5 -3
- package/es/components/ConfigProvider/context.js.map +1 -1
- package/es/components/ConfigProvider/index.d.ts +11 -3
- package/es/components/ConfigProvider/index.js +23 -3
- package/es/components/ConfigProvider/index.js.map +1 -1
- package/es/components/ConfirmAction/index.js +5 -5
- package/es/components/ConfirmAction/index.js.map +1 -1
- package/es/components/ModalAction/index.d.ts +58 -8
- package/es/components/ModalAction/index.js +2 -2
- package/es/components/ModalAction/index.js.map +1 -1
- package/es/components/index.js +1 -0
- package/es/components/index.js.map +1 -1
- package/es/hooks/index.d.ts +3 -0
- package/es/hooks/index.js +1 -0
- package/es/hooks/index.js.map +1 -1
- package/es/hooks/useContextValidator.d.ts +2 -0
- package/{lib/hooks/useValidateContext.js → es/hooks/useContextValidator.js} +5 -5
- package/es/hooks/useContextValidator.js.map +1 -0
- package/es/hooks/useLocalizedText.d.ts +2 -2
- package/es/hooks/useT.d.ts +3 -0
- package/es/hooks/useT.js +12 -0
- package/es/hooks/useT.js.map +1 -0
- package/es/hooks/useValidator.d.ts +8 -0
- package/es/hooks/useValidator.js +13 -0
- package/es/hooks/useValidator.js.map +1 -0
- package/es/hooks/useValidatorBuilder.d.ts +133 -0
- package/es/hooks/useValidatorBuilder.js +139 -0
- package/es/hooks/useValidatorBuilder.js.map +1 -0
- package/es/hooks/useValidators.d.ts +150 -0
- package/es/hooks/useValidators.js +68 -0
- package/es/hooks/useValidators.js.map +1 -0
- package/es/locales/index.d.ts +74 -0
- package/es/locales/index.js +19 -0
- package/es/locales/index.js.map +1 -0
- package/es/locales/langs/en-US.d.ts +21 -0
- package/es/locales/langs/en-US.js +22 -0
- package/es/locales/langs/en-US.js.map +1 -0
- package/es/locales/langs/en.d.ts +2 -0
- package/es/locales/langs/en.js +3 -0
- package/es/locales/langs/en.js.map +1 -0
- package/es/locales/langs/zh-CN.d.ts +21 -0
- package/es/locales/langs/zh-CN.js +22 -0
- package/es/locales/langs/zh-CN.js.map +1 -0
- package/es/utils/index.d.ts +0 -0
- package/es/utils/index.js +2 -0
- package/es/utils/index.js.map +1 -0
- package/lib/components/BreakLines/index.d.ts +51 -0
- package/lib/components/BreakLines/index.js +40 -0
- package/lib/components/BreakLines/index.js.map +1 -0
- package/lib/components/ConfigProvider/context.d.ts +11 -4
- package/lib/components/ConfigProvider/context.js +5 -3
- package/lib/components/ConfigProvider/context.js.map +1 -1
- package/lib/components/ConfigProvider/index.d.ts +11 -3
- package/lib/components/ConfigProvider/index.js +23 -3
- package/lib/components/ConfigProvider/index.js.map +1 -1
- package/lib/components/ConfirmAction/index.js +5 -5
- package/lib/components/ConfirmAction/index.js.map +1 -1
- package/lib/components/ModalAction/index.d.ts +58 -8
- package/lib/components/ModalAction/index.js +2 -2
- package/lib/components/ModalAction/index.js.map +1 -1
- package/lib/components/index.js +1 -0
- package/lib/components/index.js.map +1 -1
- package/lib/hooks/index.d.ts +3 -0
- package/lib/hooks/index.js +1 -0
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useContextValidator.d.ts +2 -0
- package/{es/hooks/useValidateContext.js → lib/hooks/useContextValidator.js} +5 -5
- package/lib/hooks/useContextValidator.js.map +1 -0
- package/lib/hooks/useLocalizedText.d.ts +2 -2
- package/lib/hooks/useT.d.ts +3 -0
- package/lib/hooks/useT.js +12 -0
- package/lib/hooks/useT.js.map +1 -0
- package/lib/hooks/useValidator.d.ts +8 -0
- package/lib/hooks/useValidator.js +13 -0
- package/lib/hooks/useValidator.js.map +1 -0
- package/lib/hooks/useValidatorBuilder.d.ts +133 -0
- package/lib/hooks/useValidatorBuilder.js +139 -0
- package/lib/hooks/useValidatorBuilder.js.map +1 -0
- package/lib/hooks/useValidators.d.ts +150 -0
- package/lib/hooks/useValidators.js +68 -0
- package/lib/hooks/useValidators.js.map +1 -0
- package/lib/locales/index.d.ts +74 -0
- package/lib/locales/index.js +19 -0
- package/lib/locales/index.js.map +1 -0
- package/lib/locales/langs/en-US.d.ts +21 -0
- package/lib/locales/langs/en-US.js +22 -0
- package/lib/locales/langs/en-US.js.map +1 -0
- package/lib/locales/langs/en.d.ts +2 -0
- package/lib/locales/langs/en.js +3 -0
- package/lib/locales/langs/en.js.map +1 -0
- package/lib/locales/langs/zh-CN.d.ts +21 -0
- package/lib/locales/langs/zh-CN.js +22 -0
- package/lib/locales/langs/zh-CN.js.map +1 -0
- package/lib/utils/index.d.ts +0 -0
- package/lib/utils/index.js +2 -0
- package/lib/utils/index.js.map +1 -0
- package/package.json +4 -2
- package/es/hooks/useValidateContext.d.ts +0 -2
- package/es/hooks/useValidateContext.js.map +0 -1
- package/lib/hooks/useValidateContext.d.ts +0 -2
- package/lib/hooks/useValidateContext.js.map +0 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const enUS = {
|
|
2
|
+
'validation.rule.number.message': 'Please enter a number',
|
|
3
|
+
'validation.rule.floatNumber.message': 'Please enter a number',
|
|
4
|
+
'validation.rule.email.message': 'Please enter the correct email address',
|
|
5
|
+
'validation.rule.ip.message': 'Please enter the correct ip address',
|
|
6
|
+
'validation.rule.chineseMobile.message': 'Please enter the correct mobile number',
|
|
7
|
+
'validation.rule.password.message': '8-16 digit password, at least two of numbers, letters, and symbols',
|
|
8
|
+
'validation.rule.buildRule.includeMandatory': 'At least one field in the include option is true',
|
|
9
|
+
'validation.rule.buildRule.startsWithFormat': `, start with {{prefix}}`,
|
|
10
|
+
'validation.rule.buildRule.minLength': `, {{min}} characters or more`,
|
|
11
|
+
'validation.rule.buildRule.maxLength': `, within {{max}} characters`,
|
|
12
|
+
'validation.rule.buildRule.rangeLength': `, {{min}}~{{max}} characters`,
|
|
13
|
+
'validation.rule.buildRule.token.separator': ', ',
|
|
14
|
+
'validation.rule.buildRule.token.chinese': 'Chinese characters',
|
|
15
|
+
'validation.rule.buildRule.token.chinesePunctuation': 'Chinese punctuation',
|
|
16
|
+
'validation.rule.buildRule.token.letter': 'letter',
|
|
17
|
+
'validation.rule.buildRule.token.lowerLetter': 'lowercase letter',
|
|
18
|
+
'validation.rule.buildRule.token.upperLetter': 'uppercase letter',
|
|
19
|
+
'validation.rule.buildRule.token.number': 'number',
|
|
20
|
+
};
|
|
21
|
+
export default enUS;
|
|
22
|
+
//# sourceMappingURL=en-US.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en-US.js","sourceRoot":"","sources":["../../../src/locales/langs/en-US.ts"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG;IACX,gCAAgC,EAAE,uBAAuB;IACzD,qCAAqC,EAAE,uBAAuB;IAC9D,+BAA+B,EAAE,wCAAwC;IACzE,4BAA4B,EAAE,qCAAqC;IACnE,uCAAuC,EAAE,wCAAwC;IACjF,kCAAkC,EAAE,oEAAoE;IACxG,4CAA4C,EAAE,kDAAkD;IAChG,4CAA4C,EAAE,yBAAyB;IACvE,qCAAqC,EAAE,8BAA8B;IACrE,qCAAqC,EAAE,6BAA6B;IACpE,uCAAuC,EAAE,8BAA8B;IACvE,2CAA2C,EAAE,IAAI;IACjD,yCAAyC,EAAE,oBAAoB;IAC/D,oDAAoD,EAAE,qBAAqB;IAC3E,wCAAwC,EAAE,QAAQ;IAClD,6CAA6C,EAAE,kBAAkB;IACjE,6CAA6C,EAAE,kBAAkB;IACjE,wCAAwC,EAAE,QAAQ;CACnD,CAAC;AACF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.js","sourceRoot":"","sources":["../../../src/locales/langs/en.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const zhCN: {
|
|
2
|
+
'validation.rule.number.message': string;
|
|
3
|
+
'validation.rule.floatNumber.message': string;
|
|
4
|
+
'validation.rule.email.message': string;
|
|
5
|
+
'validation.rule.ip.message': string;
|
|
6
|
+
'validation.rule.chineseMobile.message': string;
|
|
7
|
+
'validation.rule.password.message': string;
|
|
8
|
+
'validation.rule.buildRule.includeMandatory': string;
|
|
9
|
+
'validation.rule.buildRule.startsWithFormat': string;
|
|
10
|
+
'validation.rule.buildRule.minLength': string;
|
|
11
|
+
'validation.rule.buildRule.maxLength': string;
|
|
12
|
+
'validation.rule.buildRule.rangeLength': string;
|
|
13
|
+
'validation.rule.buildRule.token.separator': string;
|
|
14
|
+
'validation.rule.buildRule.token.chinese': string;
|
|
15
|
+
'validation.rule.buildRule.token.chinesePunctuation': string;
|
|
16
|
+
'validation.rule.buildRule.token.letter': string;
|
|
17
|
+
'validation.rule.buildRule.token.lowerLetter': string;
|
|
18
|
+
'validation.rule.buildRule.token.upperLetter': string;
|
|
19
|
+
'validation.rule.buildRule.token.number': string;
|
|
20
|
+
};
|
|
21
|
+
export default zhCN;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const zhCN = {
|
|
2
|
+
'validation.rule.number.message': '请输入数字',
|
|
3
|
+
'validation.rule.floatNumber.message': '请输入数字',
|
|
4
|
+
'validation.rule.email.message': '请输入正确的邮箱地址',
|
|
5
|
+
'validation.rule.ip.message': '请输入正确的ip地址',
|
|
6
|
+
'validation.rule.chineseMobile.message': '请输入正确的手机号',
|
|
7
|
+
'validation.rule.password.message': '8-16位密码,数字、字母、符号至少包含两种',
|
|
8
|
+
'validation.rule.buildRule.includeMandatory': 'include选项中至少有一个字段为true',
|
|
9
|
+
'validation.rule.buildRule.startsWithFormat': `,以{{prefix}}开头`,
|
|
10
|
+
'validation.rule.buildRule.minLength': `,{{min}}字符以上`,
|
|
11
|
+
'validation.rule.buildRule.maxLength': `,{{max}}字符以内`,
|
|
12
|
+
'validation.rule.buildRule.rangeLength': `,{{min}}~{{max}}个字符`,
|
|
13
|
+
'validation.rule.buildRule.token.separator': '、',
|
|
14
|
+
'validation.rule.buildRule.token.chinese': '汉字',
|
|
15
|
+
'validation.rule.buildRule.token.chinesePunctuation': '中文标点',
|
|
16
|
+
'validation.rule.buildRule.token.letter': '字母',
|
|
17
|
+
'validation.rule.buildRule.token.lowerLetter': '小写字母',
|
|
18
|
+
'validation.rule.buildRule.token.upperLetter': '大写字母',
|
|
19
|
+
'validation.rule.buildRule.token.number': '数字',
|
|
20
|
+
};
|
|
21
|
+
export default zhCN;
|
|
22
|
+
//# sourceMappingURL=zh-CN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh-CN.js","sourceRoot":"","sources":["../../../src/locales/langs/zh-CN.ts"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG;IACX,gCAAgC,EAAE,OAAO;IACzC,qCAAqC,EAAE,OAAO;IAC9C,+BAA+B,EAAE,YAAY;IAC7C,4BAA4B,EAAE,YAAY;IAC1C,uCAAuC,EAAE,WAAW;IACpD,kCAAkC,EAAE,wBAAwB;IAC5D,4CAA4C,EAAE,wBAAwB;IACtE,4CAA4C,EAAE,gBAAgB;IAC9D,qCAAqC,EAAE,cAAc;IACrD,qCAAqC,EAAE,cAAc;IACrD,uCAAuC,EAAE,qBAAqB;IAC9D,2CAA2C,EAAE,GAAG;IAChD,yCAAyC,EAAE,IAAI;IAC/C,oDAAoD,EAAE,MAAM;IAC5D,wCAAwC,EAAE,IAAI;IAC9C,6CAA6C,EAAE,MAAM;IACrD,6CAA6C,EAAE,MAAM;IACrD,wCAAwC,EAAE,IAAI;CAC/C,CAAC;AACF,eAAe,IAAI,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiny-codes/react-easy",
|
|
3
|
-
"version": "1.0.0",
|
|
3
|
+
"version": "1.0.2-beta.0",
|
|
4
4
|
"description": "Helps you use React and AntDesign more easily",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -32,10 +32,12 @@
|
|
|
32
32
|
"build:es": "tsc -p tsconfig.es.json",
|
|
33
33
|
"build": "run-p build:lib build:es",
|
|
34
34
|
"build:lib": "tsc -p tsconfig.lib.json",
|
|
35
|
-
"build:test": "tsc -p tsconfig.test.json",
|
|
36
35
|
"test": "#jest",
|
|
37
36
|
"prepublishOnly": "npm run test && npm run build"
|
|
38
37
|
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"i18next": "^24.2.2"
|
|
40
|
+
},
|
|
39
41
|
"devDependencies": {
|
|
40
42
|
"@tiny-codes/code-style-all-in-one": "^1.0.0",
|
|
41
43
|
"@types/jest": "^29.5.14",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useValidateContext.js","sourceRoot":"","sources":["../../src/hooks/useValidateContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,gBAAgB,EAAE,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE7F,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC9B,MAAM,OAAO,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC7C,IAAI,CAAC,OAAO,IAAI,OAAO,KAAK,mBAAmB,EAAE,CAAC;QAChD,OAAO,CAAC,IAAI,CACV;;;;;kBAKY,CACb,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useValidateContext.js","sourceRoot":"","sources":["../../src/hooks/useValidateContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,gBAAgB,EAAE,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE7F,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC9B,MAAM,OAAO,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC7C,IAAI,CAAC,OAAO,IAAI,OAAO,KAAK,mBAAmB,EAAE,CAAC;QAChD,OAAO,CAAC,IAAI,CACV;;;;;kBAKY,CACb,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|