@formily-design/formily-setters 1.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 (108) hide show
  1. package/.umirc.js +44 -0
  2. package/LICENSE.md +20 -0
  3. package/README.md +7 -0
  4. package/copy.ts +6 -0
  5. package/esm/components/DataSourceSetter/DataSettingPanel.d.ts +10 -0
  6. package/esm/components/DataSourceSetter/DataSettingPanel.js +66 -0
  7. package/esm/components/DataSourceSetter/Header.d.ts +7 -0
  8. package/esm/components/DataSourceSetter/Header.js +10 -0
  9. package/esm/components/DataSourceSetter/Title.d.ts +7 -0
  10. package/esm/components/DataSourceSetter/Title.js +50 -0
  11. package/esm/components/DataSourceSetter/TreePanel.d.ts +12 -0
  12. package/esm/components/DataSourceSetter/TreePanel.js +98 -0
  13. package/esm/components/DataSourceSetter/index.d.ts +18 -0
  14. package/esm/components/DataSourceSetter/index.js +34 -0
  15. package/esm/components/DataSourceSetter/shared.d.ts +9 -0
  16. package/esm/components/DataSourceSetter/shared.js +47 -0
  17. package/esm/components/DataSourceSetter/styles.less +80 -0
  18. package/esm/components/DataSourceSetter/types.d.ts +18 -0
  19. package/esm/components/DataSourceSetter/types.js +1 -0
  20. package/esm/components/ReactionsSetter/FieldPropertySetter.d.ts +10 -0
  21. package/esm/components/ReactionsSetter/FieldPropertySetter.js +83 -0
  22. package/esm/components/ReactionsSetter/PathSelector.d.ts +10 -0
  23. package/esm/components/ReactionsSetter/PathSelector.js +107 -0
  24. package/esm/components/ReactionsSetter/declarations.d.ts +5 -0
  25. package/esm/components/ReactionsSetter/declarations.js +51 -0
  26. package/esm/components/ReactionsSetter/helpers.d.ts +10 -0
  27. package/esm/components/ReactionsSetter/helpers.js +384 -0
  28. package/esm/components/ReactionsSetter/index.d.ts +8 -0
  29. package/esm/components/ReactionsSetter/index.js +282 -0
  30. package/esm/components/ReactionsSetter/properties.d.ts +11 -0
  31. package/esm/components/ReactionsSetter/properties.js +41 -0
  32. package/esm/components/ReactionsSetter/styles.less +103 -0
  33. package/esm/components/ReactionsSetter/types.d.ts +13 -0
  34. package/esm/components/ReactionsSetter/types.js +1 -0
  35. package/esm/components/RemoteDataSourceSetter/RemoteDataSourcePanel.d.ts +8 -0
  36. package/esm/components/RemoteDataSourceSetter/RemoteDataSourcePanel.js +103 -0
  37. package/esm/components/RemoteDataSourceSetter/index.d.ts +17 -0
  38. package/esm/components/RemoteDataSourceSetter/index.js +25 -0
  39. package/esm/components/RemoteDataSourceSetter/styles.less +33 -0
  40. package/esm/components/RemoteDataSourceSetter/types.d.ts +8 -0
  41. package/esm/components/RemoteDataSourceSetter/types.js +1 -0
  42. package/esm/components/ValidatorSetter/index.d.ts +6 -0
  43. package/esm/components/ValidatorSetter/index.js +140 -0
  44. package/esm/components/index.d.ts +4 -0
  45. package/esm/components/index.js +4 -0
  46. package/esm/index.d.ts +2 -0
  47. package/esm/index.js +2 -0
  48. package/esm/locales/en-US.d.ts +110 -0
  49. package/esm/locales/en-US.js +115 -0
  50. package/esm/locales/index.d.ts +1 -0
  51. package/esm/locales/index.js +5 -0
  52. package/esm/locales/ko-KR.d.ts +110 -0
  53. package/esm/locales/ko-KR.js +115 -0
  54. package/esm/locales/zh-CN.d.ts +110 -0
  55. package/esm/locales/zh-CN.js +115 -0
  56. package/lib/components/DataSourceSetter/DataSettingPanel.d.ts +10 -0
  57. package/lib/components/DataSourceSetter/DataSettingPanel.js +102 -0
  58. package/lib/components/DataSourceSetter/Header.d.ts +7 -0
  59. package/lib/components/DataSourceSetter/Header.js +16 -0
  60. package/lib/components/DataSourceSetter/Title.d.ts +7 -0
  61. package/lib/components/DataSourceSetter/Title.js +56 -0
  62. package/lib/components/DataSourceSetter/TreePanel.d.ts +12 -0
  63. package/lib/components/DataSourceSetter/TreePanel.js +134 -0
  64. package/lib/components/DataSourceSetter/index.d.ts +18 -0
  65. package/lib/components/DataSourceSetter/index.js +73 -0
  66. package/lib/components/DataSourceSetter/shared.d.ts +9 -0
  67. package/lib/components/DataSourceSetter/shared.js +53 -0
  68. package/lib/components/DataSourceSetter/styles.less +80 -0
  69. package/lib/components/DataSourceSetter/types.d.ts +18 -0
  70. package/lib/components/DataSourceSetter/types.js +2 -0
  71. package/lib/components/ReactionsSetter/FieldPropertySetter.d.ts +10 -0
  72. package/lib/components/ReactionsSetter/FieldPropertySetter.js +120 -0
  73. package/lib/components/ReactionsSetter/PathSelector.d.ts +10 -0
  74. package/lib/components/ReactionsSetter/PathSelector.js +114 -0
  75. package/lib/components/ReactionsSetter/declarations.d.ts +5 -0
  76. package/lib/components/ReactionsSetter/declarations.js +55 -0
  77. package/lib/components/ReactionsSetter/helpers.d.ts +10 -0
  78. package/lib/components/ReactionsSetter/helpers.js +387 -0
  79. package/lib/components/ReactionsSetter/index.d.ts +8 -0
  80. package/lib/components/ReactionsSetter/index.js +319 -0
  81. package/lib/components/ReactionsSetter/properties.d.ts +11 -0
  82. package/lib/components/ReactionsSetter/properties.js +44 -0
  83. package/lib/components/ReactionsSetter/styles.less +103 -0
  84. package/lib/components/ReactionsSetter/types.d.ts +13 -0
  85. package/lib/components/ReactionsSetter/types.js +2 -0
  86. package/lib/components/RemoteDataSourceSetter/RemoteDataSourcePanel.d.ts +8 -0
  87. package/lib/components/RemoteDataSourceSetter/RemoteDataSourcePanel.js +140 -0
  88. package/lib/components/RemoteDataSourceSetter/index.d.ts +17 -0
  89. package/lib/components/RemoteDataSourceSetter/index.js +64 -0
  90. package/lib/components/RemoteDataSourceSetter/styles.less +33 -0
  91. package/lib/components/RemoteDataSourceSetter/types.d.ts +8 -0
  92. package/lib/components/RemoteDataSourceSetter/types.js +2 -0
  93. package/lib/components/ValidatorSetter/index.d.ts +6 -0
  94. package/lib/components/ValidatorSetter/index.js +146 -0
  95. package/lib/components/index.d.ts +4 -0
  96. package/lib/components/index.js +20 -0
  97. package/lib/index.d.ts +2 -0
  98. package/lib/index.js +18 -0
  99. package/lib/locales/en-US.d.ts +110 -0
  100. package/lib/locales/en-US.js +117 -0
  101. package/lib/locales/index.d.ts +1 -0
  102. package/lib/locales/index.js +10 -0
  103. package/lib/locales/ko-KR.d.ts +110 -0
  104. package/lib/locales/ko-KR.js +117 -0
  105. package/lib/locales/zh-CN.d.ts +110 -0
  106. package/lib/locales/zh-CN.js +117 -0
  107. package/package.json +53 -0
  108. package/tsconfig.build.json +10 -0
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.RemoteDataSourceSetter = void 0;
40
+ const react_1 = __importStar(require("react"));
41
+ const antd_1 = require("antd");
42
+ const react_2 = require("@formily-design/react");
43
+ const RemoteDataSourcePanel_1 = require("./RemoteDataSourcePanel");
44
+ const classnames_1 = __importDefault(require("classnames"));
45
+ const react_3 = require("@formily/react");
46
+ exports.RemoteDataSourceSetter = (0, react_3.observer)((props) => {
47
+ const { onChange, value, className } = props;
48
+ const theme = (0, react_2.useTheme)();
49
+ const prefix = (0, react_2.usePrefix)('remote-data-source-setter');
50
+ const [modalVisible, setModalVisible] = (0, react_1.useState)(false);
51
+ const [currentRemoteData, setCurrentRemoteData] = (0, react_1.useState)(value);
52
+ const openModal = () => setModalVisible(true);
53
+ const closeModal = () => setModalVisible(false);
54
+ const handleOk = () => {
55
+ onChange(currentRemoteData);
56
+ closeModal();
57
+ };
58
+ return (react_1.default.createElement(react_1.Fragment, null,
59
+ react_1.default.createElement(antd_1.Button, { block: true, onClick: openModal },
60
+ react_1.default.createElement(react_2.TextWidget, { token: "SettingComponents.DataSourceSetter.editConfigure" })),
61
+ react_1.default.createElement(antd_1.Modal, { title: react_1.default.createElement(react_2.TextWidget, { token: "SettingComponents.DataSourceSetter.editConfigure" }), width: "65%", styles: { body: { padding: 10 } }, transitionName: "", maskTransitionName: "", open: modalVisible, onCancel: closeModal, onOk: handleOk, okText: react_1.default.createElement(react_2.TextWidget, { token: "SettingComponents.DataSourceSetter.confirm" }), cancelText: react_1.default.createElement(react_2.TextWidget, { token: "SettingComponents.DataSourceSetter.cancel" }) },
62
+ react_1.default.createElement("div", { className: `${(0, classnames_1.default)(prefix, className)} ${prefix + '-' + theme} ${prefix + '-layout'}` },
63
+ react_1.default.createElement(RemoteDataSourcePanel_1.RemoteDataSourcePanel, { value: currentRemoteData, onChange: setCurrentRemoteData })))));
64
+ });
@@ -0,0 +1,33 @@
1
+ .dn-data-source-setter {
2
+ ::-webkit-scrollbar {
3
+ width: 5px;
4
+ height: 5px;
5
+ }
6
+
7
+ ::-webkit-scrollbar-thumb {
8
+ background-color: rgba(0, 0, 0, 0.2);
9
+ border-radius: 0;
10
+ transition: all 0.25s ease-in-out;
11
+ }
12
+
13
+ ::-webkit-scrollbar-thumb:hover {
14
+ background-color: rgba(0, 0, 0, 0.3);
15
+ }
16
+
17
+ &-tabs {
18
+ margin-bottom: 8px;
19
+ }
20
+ }
21
+
22
+ .dn-remote-data-source-panel {
23
+ &-section {
24
+ padding: 16px;
25
+ min-height: 300px;
26
+ }
27
+
28
+ &-row {
29
+ display: flex;
30
+ align-items: center;
31
+ margin-bottom: 8px;
32
+ }
33
+ }
@@ -0,0 +1,8 @@
1
+ export interface IRemoteDataSource {
2
+ url: string;
3
+ method: string;
4
+ headers?: Record<string, string>;
5
+ params?: Record<string, string>;
6
+ beforeRequest?: string;
7
+ dataHandler?: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export interface IValidatorSetterProps {
3
+ value?: any;
4
+ onChange?: (value: any) => void;
5
+ }
6
+ export declare const ValidatorSetter: React.FC<IValidatorSetterProps>;
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ValidatorSetter = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const react_2 = require("@formily/react");
9
+ const core_1 = require("@formily-design/core");
10
+ const antd_v5_1 = require("@formily/antd-v5");
11
+ const react_settings_form_1 = require("@formily-design/react-settings-form");
12
+ const antd_1 = require("antd");
13
+ const ValidatorSchema = {
14
+ type: 'array',
15
+ items: {
16
+ type: 'object',
17
+ 'x-decorator': 'ArrayItems.Item',
18
+ 'x-decorator-props': {
19
+ style: {
20
+ alignItems: 'center',
21
+ borderRadius: 3,
22
+ paddingTop: 6,
23
+ paddingBottom: 6,
24
+ },
25
+ },
26
+ properties: {
27
+ sortable: {
28
+ type: 'void',
29
+ 'x-component': 'ArrayItems.SortHandle',
30
+ 'x-component-props': { style: { marginRight: 10 } },
31
+ },
32
+ drawer: {
33
+ type: 'void',
34
+ 'x-component': 'DrawerSetter',
35
+ properties: {
36
+ triggerType: {
37
+ type: 'string',
38
+ enum: ['onInput', 'onFocus', 'onBlur'],
39
+ 'x-decorator': 'FormItem',
40
+ 'x-component': 'Select',
41
+ },
42
+ validator: {
43
+ type: 'string',
44
+ 'x-decorator': 'FormItem',
45
+ 'x-component': 'ValueInput',
46
+ 'x-component-props': {
47
+ include: ['EXPRESSION'],
48
+ },
49
+ },
50
+ message: {
51
+ type: 'string',
52
+ 'x-decorator': 'FormItem',
53
+ 'x-component': 'Input.TextArea',
54
+ },
55
+ format: {
56
+ type: 'string',
57
+ 'x-decorator': 'FormItem',
58
+ 'x-component': 'Select',
59
+ 'x-component-props': {
60
+ allowClear: true,
61
+ },
62
+ },
63
+ pattern: {
64
+ type: 'string',
65
+ 'x-decorator': 'FormItem',
66
+ 'x-component': 'Input',
67
+ 'x-component-props': {
68
+ prefix: '/',
69
+ suffix: '/',
70
+ },
71
+ },
72
+ len: {
73
+ type: 'string',
74
+ 'x-decorator': 'FormItem',
75
+ 'x-component': 'NumberPicker',
76
+ },
77
+ max: {
78
+ type: 'string',
79
+ 'x-decorator': 'FormItem',
80
+ 'x-component': 'NumberPicker',
81
+ },
82
+ min: {
83
+ type: 'string',
84
+ 'x-decorator': 'FormItem',
85
+ 'x-component': 'NumberPicker',
86
+ },
87
+ exclusiveMaximum: {
88
+ type: 'string',
89
+ 'x-decorator': 'FormItem',
90
+ 'x-component': 'NumberPicker',
91
+ },
92
+ exclusiveMinimum: {
93
+ type: 'string',
94
+ 'x-decorator': 'FormItem',
95
+ 'x-component': 'NumberPicker',
96
+ },
97
+ whitespace: {
98
+ type: 'string',
99
+ 'x-decorator': 'FormItem',
100
+ 'x-component': 'Switch',
101
+ },
102
+ required: {
103
+ type: 'string',
104
+ 'x-decorator': 'FormItem',
105
+ 'x-component': 'Switch',
106
+ },
107
+ },
108
+ },
109
+ moveDown: {
110
+ type: 'void',
111
+ 'x-component': 'ArrayItems.MoveDown',
112
+ 'x-component-props': { style: { marginLeft: 10 } },
113
+ },
114
+ moveUp: {
115
+ type: 'void',
116
+ 'x-component': 'ArrayItems.MoveUp',
117
+ 'x-component-props': { style: { marginLeft: 5 } },
118
+ },
119
+ remove: {
120
+ type: 'void',
121
+ 'x-component': 'ArrayItems.Remove',
122
+ 'x-component-props': { style: { marginLeft: 5 } },
123
+ },
124
+ },
125
+ },
126
+ properties: {
127
+ addValidatorRules: {
128
+ type: 'void',
129
+ 'x-component': 'ArrayItems.Addition',
130
+ 'x-component-props': {
131
+ style: {
132
+ marginBottom: 10,
133
+ },
134
+ },
135
+ },
136
+ },
137
+ };
138
+ exports.ValidatorSetter = (0, react_2.observer)((props) => {
139
+ const field = (0, react_2.useField)();
140
+ return (react_1.default.createElement(react_settings_form_1.FoldItem, { label: field.title },
141
+ react_1.default.createElement(react_settings_form_1.FoldItem.Base, null,
142
+ react_1.default.createElement(antd_1.Select, { value: Array.isArray(props.value) ? undefined : props.value, onChange: props.onChange, allowClear: true, placeholder: core_1.GlobalRegistry.getDesignerMessage('SettingComponents.ValidatorSetter.pleaseSelect'), options: core_1.GlobalRegistry.getDesignerMessage('SettingComponents.ValidatorSetter.formats') })),
143
+ react_1.default.createElement(react_settings_form_1.FoldItem.Extra, null,
144
+ react_1.default.createElement(react_2.SchemaContext.Provider, { value: new react_2.Schema(ValidatorSchema) },
145
+ react_1.default.createElement(antd_v5_1.ArrayItems, null)))));
146
+ });
@@ -0,0 +1,4 @@
1
+ export * from './DataSourceSetter';
2
+ export * from './ReactionsSetter';
3
+ export * from './ValidatorSetter';
4
+ export * from './RemoteDataSourceSetter';
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./DataSourceSetter"), exports);
18
+ __exportStar(require("./ReactionsSetter"), exports);
19
+ __exportStar(require("./ValidatorSetter"), exports);
20
+ __exportStar(require("./RemoteDataSourceSetter"), exports);
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import './locales';
2
+ export * from './components';
package/lib/index.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ require("./locales");
18
+ __exportStar(require("./components"), exports);
@@ -0,0 +1,110 @@
1
+ declare const _default: {
2
+ 'en-US': {
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
+ staticData: string;
53
+ remoteData: string;
54
+ confirm: string;
55
+ cancel: string;
56
+ editConfigure: string;
57
+ };
58
+ RemoteDataSource: {
59
+ basic: string;
60
+ url: string;
61
+ method: string;
62
+ headers: string;
63
+ params: string;
64
+ handlers: string;
65
+ beforeRequest: string;
66
+ dataHandler: string;
67
+ addHeader: string;
68
+ addParam: string;
69
+ };
70
+ ReactionsSetter: {
71
+ configureReactions: string;
72
+ relationsFields: string;
73
+ variableName: string;
74
+ variableNameValidateMessage: string;
75
+ pleaseInput: string;
76
+ sourceField: string;
77
+ sourceProperty: string;
78
+ variableType: string;
79
+ operations: string;
80
+ addRelationField: string;
81
+ propertyReactions: string;
82
+ actionReactions: string;
83
+ visible: string;
84
+ hidden: string;
85
+ display: string;
86
+ pattern: string;
87
+ title: string;
88
+ description: string;
89
+ value: string;
90
+ initialValue: string;
91
+ dataSource: string;
92
+ required: string;
93
+ component: string;
94
+ componentProps: string;
95
+ decorator: string;
96
+ decoratorProps: string;
97
+ pleaseSelect: string;
98
+ expressionValueTypeIs: string;
99
+ };
100
+ ValidatorSetter: {
101
+ pleaseSelect: string;
102
+ formats: {
103
+ label: string;
104
+ value: string;
105
+ }[];
106
+ };
107
+ };
108
+ };
109
+ };
110
+ export default _default;
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const ValidatorFormats = [
4
+ { label: 'URL', value: 'url' },
5
+ { label: 'Email', value: 'email' },
6
+ { label: 'Number', value: 'number' },
7
+ { label: 'Integer', value: 'integer' },
8
+ { label: 'ID', value: 'idcard' },
9
+ { label: 'Phone Number', value: 'phone' },
10
+ { label: 'Currency', value: 'money' },
11
+ { label: 'Chinese', value: 'zh' },
12
+ { label: 'Date', value: 'date' },
13
+ { label: 'Zip', value: 'zip' },
14
+ ];
15
+ exports.default = {
16
+ 'en-US': {
17
+ settings: {
18
+ 'x-validator': {
19
+ title: 'Validator',
20
+ addValidatorRules: 'Add Validator Rules',
21
+ drawer: 'Edit Rules',
22
+ triggerType: {
23
+ title: 'Trigger Type',
24
+ placeholder: 'Please Select',
25
+ dataSource: ['onInput', 'onFocus', 'onBlur'],
26
+ },
27
+ format: {
28
+ title: 'Format',
29
+ placeholder: 'Please Select',
30
+ dataSource: ValidatorFormats,
31
+ },
32
+ validator: {
33
+ title: 'Custom Validator',
34
+ tooltip: 'Format: function (value){ return "Error Message"}',
35
+ },
36
+ pattern: 'RegExp',
37
+ len: 'Length Limit',
38
+ max: 'Length/Value Lt',
39
+ min: 'Length/Value Gt',
40
+ exclusiveMaximum: 'Length/Value Lte',
41
+ exclusiveMinimum: 'Length/Value Gte',
42
+ whitespace: 'No Whitespace',
43
+ required: 'Required',
44
+ message: {
45
+ title: 'Error Message',
46
+ tooltip: 'The error message is only effective for one built-in rule of the current rule set. If you need to customize the error message for different built-in rules, please split into multiple rules',
47
+ },
48
+ },
49
+ },
50
+ SettingComponents: {
51
+ DataSourceSetter: {
52
+ nodeProperty: 'Node Property',
53
+ pleaseSelectNode: 'please select node from the tree on the left',
54
+ addKeyValuePair: 'Add Key Value Pair',
55
+ configureDataSource: 'Configure',
56
+ dataSource: 'Options',
57
+ defaultTitle: 'Default Title',
58
+ dataSourceTree: 'Options Tree',
59
+ addNode: 'Add Node',
60
+ label: 'label',
61
+ value: 'value',
62
+ item: 'Item',
63
+ staticData: 'Static Data',
64
+ remoteData: 'Remote Data',
65
+ confirm: 'Confirm',
66
+ cancel: 'Cancel',
67
+ editConfigure: 'Edit Configure',
68
+ },
69
+ RemoteDataSource: {
70
+ basic: 'Basic',
71
+ url: 'Request URL',
72
+ method: 'Method',
73
+ headers: 'Headers',
74
+ params: 'Parameters',
75
+ handlers: 'Data Processing',
76
+ beforeRequest: 'Before Request',
77
+ dataHandler: 'Data Handler',
78
+ addHeader: 'Add Header',
79
+ addParam: 'Add Parameter',
80
+ },
81
+ ReactionsSetter: {
82
+ configureReactions: 'Configure',
83
+ relationsFields: 'Associated Fields',
84
+ variableName: 'Variable Name',
85
+ variableNameValidateMessage: 'This is not a standard variable name',
86
+ pleaseInput: 'Please Input',
87
+ sourceField: 'Source Field',
88
+ sourceProperty: 'Field Property',
89
+ variableType: 'Variable Type',
90
+ operations: 'Operations',
91
+ addRelationField: 'Add Associated Field',
92
+ propertyReactions: 'Property Reactions(Only Support Javascript Expression)',
93
+ actionReactions: 'Action Reactions(Optional, Support Javascript Statement)',
94
+ visible: 'Show/None',
95
+ hidden: 'Show/UI Hidden',
96
+ display: 'Display',
97
+ pattern: 'Pattern',
98
+ title: 'Title',
99
+ description: 'Description',
100
+ value: 'Value',
101
+ initialValue: 'InitialValue',
102
+ dataSource: 'Options',
103
+ required: 'Required',
104
+ component: 'Component',
105
+ componentProps: 'Component Props',
106
+ decorator: 'Decorator',
107
+ decoratorProps: 'Decorator Props',
108
+ pleaseSelect: 'Please Select',
109
+ expressionValueTypeIs: 'Expression value type is',
110
+ },
111
+ ValidatorSetter: {
112
+ pleaseSelect: 'Please Select',
113
+ formats: ValidatorFormats,
114
+ },
115
+ },
116
+ },
117
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const core_1 = require("@formily-design/core");
7
+ const zh_CN_1 = __importDefault(require("./zh-CN"));
8
+ const en_US_1 = __importDefault(require("./en-US"));
9
+ const ko_KR_1 = __importDefault(require("./ko-KR"));
10
+ core_1.GlobalRegistry.registerDesignerLocales(zh_CN_1.default, en_US_1.default, ko_KR_1.default);
@@ -0,0 +1,110 @@
1
+ declare const _default: {
2
+ 'ko-KR': {
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
+ staticData: string;
53
+ remoteData: string;
54
+ confirm: string;
55
+ cancel: string;
56
+ editConfigure: string;
57
+ };
58
+ RemoteDataSource: {
59
+ basic: string;
60
+ url: string;
61
+ method: string;
62
+ headers: string;
63
+ params: string;
64
+ handlers: string;
65
+ beforeRequest: string;
66
+ dataHandler: string;
67
+ addHeader: string;
68
+ addParam: string;
69
+ };
70
+ ReactionsSetter: {
71
+ configureReactions: string;
72
+ relationsFields: string;
73
+ variableName: string;
74
+ variableNameValidateMessage: string;
75
+ pleaseInput: string;
76
+ sourceField: string;
77
+ sourceProperty: string;
78
+ variableType: string;
79
+ operations: string;
80
+ addRelationField: string;
81
+ propertyReactions: string;
82
+ actionReactions: string;
83
+ visible: string;
84
+ hidden: string;
85
+ display: string;
86
+ pattern: string;
87
+ title: string;
88
+ description: string;
89
+ value: string;
90
+ initialValue: string;
91
+ dataSource: string;
92
+ required: string;
93
+ component: string;
94
+ componentProps: string;
95
+ decorator: string;
96
+ decoratorProps: string;
97
+ pleaseSelect: string;
98
+ expressionValueTypeIs: string;
99
+ };
100
+ ValidatorSetter: {
101
+ pleaseSelect: string;
102
+ formats: {
103
+ label: string;
104
+ value: string;
105
+ }[];
106
+ };
107
+ };
108
+ };
109
+ };
110
+ export default _default;