@thienvu18/designable-formily-setters 2.0.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.
Files changed (91) hide show
  1. package/LICENSE.md +20 -0
  2. package/README.md +7 -0
  3. package/esm/components/DataSourceSetter/DataSettingPanel.d.ts +10 -0
  4. package/esm/components/DataSourceSetter/DataSettingPanel.js +54 -0
  5. package/esm/components/DataSourceSetter/Header.d.ts +7 -0
  6. package/esm/components/DataSourceSetter/Header.js +8 -0
  7. package/esm/components/DataSourceSetter/Title.d.ts +7 -0
  8. package/esm/components/DataSourceSetter/Title.js +46 -0
  9. package/esm/components/DataSourceSetter/TreePanel.d.ts +12 -0
  10. package/esm/components/DataSourceSetter/TreePanel.js +94 -0
  11. package/esm/components/DataSourceSetter/index.d.ts +18 -0
  12. package/esm/components/DataSourceSetter/index.js +27 -0
  13. package/esm/components/DataSourceSetter/shared.d.ts +9 -0
  14. package/esm/components/DataSourceSetter/shared.js +45 -0
  15. package/esm/components/DataSourceSetter/styles.less +81 -0
  16. package/esm/components/DataSourceSetter/types.d.ts +18 -0
  17. package/esm/components/DataSourceSetter/types.js +1 -0
  18. package/esm/components/ReactionsSetter/FieldPropertySetter.d.ts +10 -0
  19. package/esm/components/ReactionsSetter/FieldPropertySetter.js +65 -0
  20. package/esm/components/ReactionsSetter/PathSelector.d.ts +10 -0
  21. package/esm/components/ReactionsSetter/PathSelector.js +103 -0
  22. package/esm/components/ReactionsSetter/declarations.d.ts +5 -0
  23. package/esm/components/ReactionsSetter/declarations.js +51 -0
  24. package/esm/components/ReactionsSetter/helpers.d.ts +10 -0
  25. package/esm/components/ReactionsSetter/helpers.js +384 -0
  26. package/esm/components/ReactionsSetter/index.d.ts +8 -0
  27. package/esm/components/ReactionsSetter/index.js +251 -0
  28. package/esm/components/ReactionsSetter/properties.d.ts +11 -0
  29. package/esm/components/ReactionsSetter/properties.js +41 -0
  30. package/esm/components/ReactionsSetter/styles.less +105 -0
  31. package/esm/components/ReactionsSetter/types.d.ts +13 -0
  32. package/esm/components/ReactionsSetter/types.js +1 -0
  33. package/esm/components/ValidatorSetter/index.d.ts +6 -0
  34. package/esm/components/ValidatorSetter/index.js +135 -0
  35. package/esm/components/index.d.ts +3 -0
  36. package/esm/components/index.js +3 -0
  37. package/esm/index.d.ts +2 -0
  38. package/esm/index.js +2 -0
  39. package/esm/locales/en-US.d.ts +93 -0
  40. package/esm/locales/en-US.js +98 -0
  41. package/esm/locales/index.d.ts +1 -0
  42. package/esm/locales/index.js +5 -0
  43. package/esm/locales/ko-KR.d.ts +93 -0
  44. package/esm/locales/ko-KR.js +98 -0
  45. package/esm/locales/zh-CN.d.ts +93 -0
  46. package/esm/locales/zh-CN.js +98 -0
  47. package/lib/components/DataSourceSetter/DataSettingPanel.d.ts +10 -0
  48. package/lib/components/DataSourceSetter/DataSettingPanel.js +57 -0
  49. package/lib/components/DataSourceSetter/Header.d.ts +7 -0
  50. package/lib/components/DataSourceSetter/Header.js +11 -0
  51. package/lib/components/DataSourceSetter/Title.d.ts +7 -0
  52. package/lib/components/DataSourceSetter/Title.js +49 -0
  53. package/lib/components/DataSourceSetter/TreePanel.d.ts +12 -0
  54. package/lib/components/DataSourceSetter/TreePanel.js +97 -0
  55. package/lib/components/DataSourceSetter/index.d.ts +18 -0
  56. package/lib/components/DataSourceSetter/index.js +33 -0
  57. package/lib/components/DataSourceSetter/shared.d.ts +9 -0
  58. package/lib/components/DataSourceSetter/shared.js +51 -0
  59. package/lib/components/DataSourceSetter/styles.less +81 -0
  60. package/lib/components/DataSourceSetter/types.d.ts +18 -0
  61. package/lib/components/DataSourceSetter/types.js +2 -0
  62. package/lib/components/ReactionsSetter/FieldPropertySetter.d.ts +10 -0
  63. package/lib/components/ReactionsSetter/FieldPropertySetter.js +69 -0
  64. package/lib/components/ReactionsSetter/PathSelector.d.ts +10 -0
  65. package/lib/components/ReactionsSetter/PathSelector.js +107 -0
  66. package/lib/components/ReactionsSetter/declarations.d.ts +5 -0
  67. package/lib/components/ReactionsSetter/declarations.js +55 -0
  68. package/lib/components/ReactionsSetter/helpers.d.ts +10 -0
  69. package/lib/components/ReactionsSetter/helpers.js +387 -0
  70. package/lib/components/ReactionsSetter/index.d.ts +8 -0
  71. package/lib/components/ReactionsSetter/index.js +255 -0
  72. package/lib/components/ReactionsSetter/properties.d.ts +11 -0
  73. package/lib/components/ReactionsSetter/properties.js +44 -0
  74. package/lib/components/ReactionsSetter/styles.less +105 -0
  75. package/lib/components/ReactionsSetter/types.d.ts +13 -0
  76. package/lib/components/ReactionsSetter/types.js +2 -0
  77. package/lib/components/ValidatorSetter/index.d.ts +6 -0
  78. package/lib/components/ValidatorSetter/index.js +138 -0
  79. package/lib/components/index.d.ts +3 -0
  80. package/lib/components/index.js +19 -0
  81. package/lib/index.d.ts +2 -0
  82. package/lib/index.js +18 -0
  83. package/lib/locales/en-US.d.ts +93 -0
  84. package/lib/locales/en-US.js +100 -0
  85. package/lib/locales/index.d.ts +1 -0
  86. package/lib/locales/index.js +10 -0
  87. package/lib/locales/ko-KR.d.ts +93 -0
  88. package/lib/locales/ko-KR.js +100 -0
  89. package/lib/locales/zh-CN.d.ts +93 -0
  90. package/lib/locales/zh-CN.js +100 -0
  91. package/package.json +64 -0
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const ValidatorFormats = [
4
+ { label: 'URL', value: 'url' },
5
+ { label: '이메일', value: 'email' },
6
+ { label: '숫자', value: 'number' },
7
+ { label: '상수', value: 'integer' },
8
+ { label: 'ID', value: 'idcard' },
9
+ { label: '휴대폰 번호', value: 'phone' },
10
+ { label: '통화', value: 'money' },
11
+ { label: '중국', value: 'zh' },
12
+ { label: '날짜', value: 'date' },
13
+ { label: 'Zip', value: 'zip' },
14
+ ];
15
+ exports.default = {
16
+ 'ko-KR': {
17
+ settings: {
18
+ 'x-validator': {
19
+ title: '유효성 검사 도구',
20
+ addValidatorRules: '유효성 검사 규칙 추가',
21
+ drawer: '규칙 수정',
22
+ triggerType: {
23
+ title: '트리거 타입',
24
+ placeholder: '선택하세요',
25
+ dataSource: ['onInput', 'onFocus', 'onBlur'],
26
+ },
27
+ format: {
28
+ title: '포맷',
29
+ placeholder: '선택하세요',
30
+ dataSource: ValidatorFormats,
31
+ },
32
+ validator: {
33
+ title: '사용자 정의 유효성 검사 도구',
34
+ tooltip: '형식: function (value){ return "Error Message"}',
35
+ },
36
+ pattern: 'RegExp',
37
+ len: '길이 제한',
38
+ max: '길이/값 Lt',
39
+ min: '길이/값 Gt',
40
+ exclusiveMaximum: '길이/값 Lte',
41
+ exclusiveMinimum: '길이/값 Gte',
42
+ whitespace: '공백 없음',
43
+ required: '필수 항목',
44
+ message: {
45
+ title: '오류 메시지',
46
+ tooltip: '오류 메시지는 현재의 규칙 셋의 하나의 빌트인 규칙에 대해서만 적용됩니다. 여러 빌트인 규칙에 대한 오류 메시지를 사용자 정의해야 하는 경우 여러 규칙으로 분할하세요.',
47
+ },
48
+ },
49
+ },
50
+ SettingComponents: {
51
+ DataSourceSetter: {
52
+ nodeProperty: '노드 속성',
53
+ pleaseSelectNode: '왼쪽에 있는 트리에서 노드를 선택하세요.',
54
+ addKeyValuePair: '키/값 쌍 추가',
55
+ configureDataSource: '구성',
56
+ dataSource: 'Options',
57
+ defaultTitle: '기본 제목',
58
+ dataSourceTree: 'Options 트리',
59
+ addNode: '노드 추가',
60
+ label: '레이블',
61
+ value: '값',
62
+ item: '아이템',
63
+ },
64
+ ReactionsSetter: {
65
+ configureReactions: '구성',
66
+ relationsFields: '관련 필드',
67
+ variableName: '변수 이름',
68
+ variableNameValidateMessage: '표준 변수 이름이 아닙니다.',
69
+ pleaseInput: '입력해주세요',
70
+ sourceField: 'Source Field',
71
+ sourceProperty: '필드 속성',
72
+ variableType: '변수 타입',
73
+ operations: '작업',
74
+ addRelationField: '관련 필드 추가',
75
+ propertyReactions: '구성 리엑션(자바스크립트 표현식만 지원함)',
76
+ actionReactions: '액션 리엑션(선택사항, 자바스크립트 구문을 지원함)',
77
+ visible: '보기/없음',
78
+ hidden: '보기/UI 숨기기',
79
+ display: '디스플레이',
80
+ pattern: '패턴',
81
+ title: '제목',
82
+ description: '설명',
83
+ value: '값',
84
+ initialValue: '초기값',
85
+ dataSource: 'Options',
86
+ required: '필수 항목',
87
+ component: '컴포넌트',
88
+ componentProps: '컴포넌트 속성',
89
+ decorator: '테코레이터',
90
+ decoratorProps: '테코레이터 속성',
91
+ pleaseSelect: '선택하세요',
92
+ expressionValueTypeIs: '표현식 값 타입은',
93
+ },
94
+ ValidatorSetter: {
95
+ pleaseSelect: '선택하세요',
96
+ formats: ValidatorFormats,
97
+ },
98
+ },
99
+ },
100
+ };
@@ -0,0 +1,93 @@
1
+ declare const _default: {
2
+ 'zh-CN': {
3
+ settings: {
4
+ 'x-validator': {
5
+ title: string;
6
+ addValidatorRules: string;
7
+ drawer: string;
8
+ triggerType: {
9
+ title: string;
10
+ placeholder: string;
11
+ dataSource: string[];
12
+ };
13
+ format: {
14
+ title: string;
15
+ placeholder: string;
16
+ dataSource: {
17
+ label: string;
18
+ value: string;
19
+ }[];
20
+ };
21
+ validator: {
22
+ title: string;
23
+ tooltip: string;
24
+ };
25
+ pattern: string;
26
+ len: string;
27
+ max: string;
28
+ min: string;
29
+ exclusiveMaximum: string;
30
+ exclusiveMinimum: string;
31
+ whitespace: string;
32
+ required: string;
33
+ message: {
34
+ title: string;
35
+ tooltip: string;
36
+ };
37
+ };
38
+ };
39
+ SettingComponents: {
40
+ DataSourceSetter: {
41
+ nodeProperty: string;
42
+ pleaseSelectNode: string;
43
+ addKeyValuePair: string;
44
+ configureDataSource: string;
45
+ dataSource: string;
46
+ defaultTitle: string;
47
+ dataSourceTree: string;
48
+ addNode: string;
49
+ label: string;
50
+ value: string;
51
+ item: string;
52
+ };
53
+ ReactionsSetter: {
54
+ configureReactions: string;
55
+ relationsFields: string;
56
+ variableName: string;
57
+ variableNameValidateMessage: string;
58
+ pleaseInput: string;
59
+ sourceField: string;
60
+ sourceProperty: string;
61
+ variableType: string;
62
+ operations: string;
63
+ addRelationField: string;
64
+ propertyReactions: string;
65
+ actionReactions: string;
66
+ visible: string;
67
+ hidden: string;
68
+ display: string;
69
+ pattern: string;
70
+ title: string;
71
+ description: string;
72
+ value: string;
73
+ initialValue: string;
74
+ dataSource: string;
75
+ required: string;
76
+ component: string;
77
+ componentProps: string;
78
+ decorator: string;
79
+ decoratorProps: string;
80
+ pleaseSelect: string;
81
+ expressionValueTypeIs: string;
82
+ };
83
+ ValidatorSetter: {
84
+ pleaseSelect: string;
85
+ formats: {
86
+ label: string;
87
+ value: string;
88
+ }[];
89
+ };
90
+ };
91
+ };
92
+ };
93
+ export default _default;
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const ValidatorFormats = [
4
+ { label: 'URL地址', value: 'url' },
5
+ { label: '邮箱格式', value: 'email' },
6
+ { label: '数字格式', value: 'number' },
7
+ { label: '整数格式', value: 'integer' },
8
+ { label: '身份证格式', value: 'idcard' },
9
+ { label: '手机号格式', value: 'phone' },
10
+ { label: '货币格式', value: 'money' },
11
+ { label: '中文格式', value: 'zh' },
12
+ { label: '日期格式', value: 'date' },
13
+ { label: '邮编格式', value: 'zip' },
14
+ ];
15
+ exports.default = {
16
+ 'zh-CN': {
17
+ settings: {
18
+ 'x-validator': {
19
+ title: '校验规则',
20
+ addValidatorRules: '添加校验规则',
21
+ drawer: '配置规则',
22
+ triggerType: {
23
+ title: '触发类型',
24
+ placeholder: '请选择',
25
+ dataSource: ['输入时', '聚焦时', '失焦时'],
26
+ },
27
+ format: {
28
+ title: '格式校验',
29
+ placeholder: '请选择',
30
+ dataSource: ValidatorFormats,
31
+ },
32
+ validator: {
33
+ title: '自定义校验器',
34
+ tooltip: '格式: function (value){ return "Error Message"}',
35
+ },
36
+ pattern: '正则表达式',
37
+ len: '长度限制',
38
+ max: '长度/数值小于',
39
+ min: '长度/数值大于',
40
+ exclusiveMaximum: '长度/数值小于等于',
41
+ exclusiveMinimum: '长度/数值大于等于',
42
+ whitespace: '不允许空白符',
43
+ required: '是否必填',
44
+ message: {
45
+ title: '错误消息',
46
+ tooltip: '错误消息只对当前规则集的一个内置规则生效,如果需要对不同内置规则定制错误消息,请拆分成多条规则',
47
+ },
48
+ },
49
+ },
50
+ SettingComponents: {
51
+ DataSourceSetter: {
52
+ nodeProperty: '节点属性',
53
+ pleaseSelectNode: '请先选择左侧树节点',
54
+ addKeyValuePair: '添加键值对',
55
+ configureDataSource: '配置可选项',
56
+ dataSource: '可选项',
57
+ defaultTitle: '默认标题',
58
+ dataSourceTree: '可选项节点树',
59
+ addNode: '新增节点',
60
+ label: '键名',
61
+ value: '键值',
62
+ item: '选项',
63
+ },
64
+ ReactionsSetter: {
65
+ configureReactions: '配置响应器',
66
+ relationsFields: '依赖字段',
67
+ variableName: '变量名',
68
+ variableNameValidateMessage: '不符合变量命名规则',
69
+ pleaseInput: '请输入',
70
+ sourceField: '来源字段',
71
+ sourceProperty: '字段属性',
72
+ variableType: '变量类型',
73
+ operations: '操作',
74
+ addRelationField: '添加依赖字段',
75
+ propertyReactions: '属性响应(仅支持JS表达式)',
76
+ actionReactions: '动作响应(高级,可选,支持JS语句)',
77
+ visible: '显示/隐藏',
78
+ hidden: 'UI隐藏',
79
+ display: '展示状态',
80
+ pattern: 'UI形态',
81
+ title: '标题',
82
+ description: '描述',
83
+ value: '字段值',
84
+ initialValue: '默认值',
85
+ dataSource: '可选项',
86
+ required: '是否必填',
87
+ component: '组件',
88
+ componentProps: '组件属性',
89
+ decorator: '容器',
90
+ decoratorProps: '容器属性',
91
+ pleaseSelect: '请选择',
92
+ expressionValueTypeIs: '表达式值类型为',
93
+ },
94
+ ValidatorSetter: {
95
+ pleaseSelect: '请选择',
96
+ formats: ValidatorFormats,
97
+ },
98
+ },
99
+ },
100
+ };
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "@thienvu18/designable-formily-setters",
3
+ "version": "2.0.0",
4
+ "license": "MIT",
5
+ "main": "lib/index.js",
6
+ "module": "esm/index.js",
7
+ "types": "esm/index.d.ts",
8
+ "files": [
9
+ "lib",
10
+ "esm",
11
+ "README.md",
12
+ "LICENSE.md"
13
+ ],
14
+ "engines": {
15
+ "node": ">=20 <25"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/thienvu18/designable.git"
20
+ },
21
+ "bugs": {
22
+ "url": "https://github.com/thienvu18/designable/issues"
23
+ },
24
+ "homepage": "https://github.com/thienvu18/designable#readme",
25
+ "scripts": {
26
+ "build": "rimraf -rf lib esm && npm run build:cjs && npm run build:esm && ts-node copy",
27
+ "build:cjs": "tsc --project tsconfig.build.json --outDir lib",
28
+ "build:esm": "tsc --project tsconfig.build.json --module es2020 --outDir esm"
29
+ },
30
+ "peerDependencies": {
31
+ "@formily/core": ">=2.3.7 <3",
32
+ "@formily/react": ">=2.3.7 <3",
33
+ "@formily/shared": ">=2.3.7 <3",
34
+ "@thienvu18/formily-antd-v6": ">=2 <3",
35
+ "antd": ">=6 <7",
36
+ "react": ">=19 <20",
37
+ "react-dom": ">=19 <20"
38
+ },
39
+ "dependencies": {
40
+ "@thienvu18/designable-core": "2.0.0",
41
+ "@thienvu18/designable-formily-transformer": "2.0.0",
42
+ "@thienvu18/designable-react": "2.0.0",
43
+ "@thienvu18/designable-react-settings-form": "2.0.0",
44
+ "classnames": "^2.3.2"
45
+ },
46
+ "devDependencies": {
47
+ "@formily/core": "^2.3.7",
48
+ "@formily/json-schema": "^2.3.7",
49
+ "@formily/path": "^2.3.7",
50
+ "@formily/react": "^2.3.7",
51
+ "@formily/reactive": "^2.3.7",
52
+ "@formily/reactive-react": "^2.3.7",
53
+ "@formily/shared": "^2.3.7",
54
+ "@thienvu18/formily-antd-v6": "^2.0.0",
55
+ "antd": "^6.6.3",
56
+ "react": "^19.2.8",
57
+ "react-dom": "^19.2.8",
58
+ "react-is": "^19.2.8",
59
+ "typescript": "5.2.2"
60
+ },
61
+ "publishConfig": {
62
+ "access": "public"
63
+ }
64
+ }