@nocobase/client 0.9.0-alpha.1 → 0.9.0-alpha.2
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/es/antd-config-provider/index.d.ts +3 -1
- package/es/antd-config-provider/index.js +25 -6
- package/es/antd-config-provider/loadConstrueLocale.d.ts +1 -0
- package/es/antd-config-provider/loadConstrueLocale.js +293 -0
- package/es/i18n/i18n.js +7 -12
- package/es/index.d.ts +1 -1
- package/es/index.js +2 -2
- package/es/locale/en_US.d.ts +104 -28
- package/es/locale/en_US.js +104 -28
- package/es/locale/index.d.ts +201 -4
- package/es/locale/index.js +191 -58
- package/es/schema-component/antd/association-filter/AssociationFilter.Item.js +12 -3
- package/es/schema-component/antd/cron/Cron.d.ts +0 -1
- package/es/schema-component/antd/cron/Cron.js +16 -19
- package/es/schema-component/antd/cron/locale/index.d.ts +37 -0
- package/es/schema-component/antd/cron/locale/index.js +6 -0
- package/es/schema-component/antd/filter/useFilterActionProps.js +10 -6
- package/es/schema-component/antd/table-v2/TableBlockDesigner.js +24 -8
- package/es/system-settings/SystemSettingsShortcut.js +1 -1
- package/lib/antd-config-provider/index.d.ts +3 -1
- package/lib/antd-config-provider/index.js +40 -6
- package/lib/antd-config-provider/loadConstrueLocale.d.ts +1 -0
- package/lib/antd-config-provider/loadConstrueLocale.js +304 -0
- package/lib/i18n/i18n.js +7 -14
- package/lib/index.d.ts +1 -1
- package/lib/index.js +13 -13
- package/lib/locale/en_US.d.ts +104 -28
- package/lib/locale/en_US.js +104 -28
- package/lib/locale/index.d.ts +201 -4
- package/lib/locale/index.js +197 -67
- package/lib/schema-component/antd/association-filter/AssociationFilter.Item.js +12 -3
- package/lib/schema-component/antd/cron/Cron.d.ts +0 -1
- package/lib/schema-component/antd/cron/Cron.js +19 -24
- package/lib/schema-component/antd/cron/locale/index.d.ts +37 -0
- package/lib/schema-component/antd/cron/locale/index.js +18 -0
- package/lib/schema-component/antd/filter/useFilterActionProps.js +10 -6
- package/lib/schema-component/antd/table-v2/TableBlockDesigner.js +25 -8
- package/lib/system-settings/SystemSettingsShortcut.js +1 -1
- package/package.json +6 -5
package/es/locale/index.d.ts
CHANGED
|
@@ -1,8 +1,205 @@
|
|
|
1
1
|
export declare type LocaleOptions = {
|
|
2
2
|
label: string;
|
|
3
|
-
moment: string;
|
|
4
|
-
antd: any;
|
|
5
|
-
resources?: any;
|
|
6
3
|
};
|
|
7
|
-
|
|
4
|
+
export { default as cron } from '../schema-component/antd/cron/locale';
|
|
5
|
+
declare const _default: {
|
|
6
|
+
'ar-EG': {
|
|
7
|
+
label: string;
|
|
8
|
+
};
|
|
9
|
+
'az-AZ': {
|
|
10
|
+
label: string;
|
|
11
|
+
};
|
|
12
|
+
'bg-BG': {
|
|
13
|
+
label: string;
|
|
14
|
+
};
|
|
15
|
+
'bn-BD': {
|
|
16
|
+
label: string;
|
|
17
|
+
};
|
|
18
|
+
'by-BY': {
|
|
19
|
+
label: string;
|
|
20
|
+
};
|
|
21
|
+
'ca-ES': {
|
|
22
|
+
label: string;
|
|
23
|
+
};
|
|
24
|
+
'cs-CZ': {
|
|
25
|
+
label: string;
|
|
26
|
+
};
|
|
27
|
+
'da-DK': {
|
|
28
|
+
label: string;
|
|
29
|
+
};
|
|
30
|
+
'de-DE': {
|
|
31
|
+
label: string;
|
|
32
|
+
};
|
|
33
|
+
'el-GR': {
|
|
34
|
+
label: string;
|
|
35
|
+
};
|
|
36
|
+
'en-GB': {
|
|
37
|
+
label: string;
|
|
38
|
+
};
|
|
39
|
+
'en-US': {
|
|
40
|
+
label: string;
|
|
41
|
+
};
|
|
42
|
+
'es-ES': {
|
|
43
|
+
label: string;
|
|
44
|
+
};
|
|
45
|
+
'et-EE': {
|
|
46
|
+
label: string;
|
|
47
|
+
};
|
|
48
|
+
'fa-IR': {
|
|
49
|
+
label: string;
|
|
50
|
+
};
|
|
51
|
+
'fi-FI': {
|
|
52
|
+
label: string;
|
|
53
|
+
};
|
|
54
|
+
'fr-BE': {
|
|
55
|
+
label: string;
|
|
56
|
+
};
|
|
57
|
+
'fr-CA': {
|
|
58
|
+
label: string;
|
|
59
|
+
};
|
|
60
|
+
'fr-FR': {
|
|
61
|
+
label: string;
|
|
62
|
+
};
|
|
63
|
+
'ga-IE': {
|
|
64
|
+
label: string;
|
|
65
|
+
};
|
|
66
|
+
'gl-ES': {
|
|
67
|
+
label: string;
|
|
68
|
+
};
|
|
69
|
+
'he-IL': {
|
|
70
|
+
label: string;
|
|
71
|
+
};
|
|
72
|
+
'hi-IN': {
|
|
73
|
+
label: string;
|
|
74
|
+
};
|
|
75
|
+
'hr-HR': {
|
|
76
|
+
label: string;
|
|
77
|
+
};
|
|
78
|
+
'hu-HU': {
|
|
79
|
+
label: string;
|
|
80
|
+
};
|
|
81
|
+
'hy-AM': {
|
|
82
|
+
label: string;
|
|
83
|
+
};
|
|
84
|
+
'id-ID': {
|
|
85
|
+
label: string;
|
|
86
|
+
};
|
|
87
|
+
'is-IS': {
|
|
88
|
+
label: string;
|
|
89
|
+
};
|
|
90
|
+
'it-IT': {
|
|
91
|
+
label: string;
|
|
92
|
+
};
|
|
93
|
+
'ja-JP': {
|
|
94
|
+
label: string;
|
|
95
|
+
};
|
|
96
|
+
'ka-GE': {
|
|
97
|
+
label: string;
|
|
98
|
+
};
|
|
99
|
+
'kk-KZ': {
|
|
100
|
+
label: string;
|
|
101
|
+
};
|
|
102
|
+
'km-KH': {
|
|
103
|
+
label: string;
|
|
104
|
+
};
|
|
105
|
+
'kn-IN': {
|
|
106
|
+
label: string;
|
|
107
|
+
};
|
|
108
|
+
'ko-KR': {
|
|
109
|
+
label: string;
|
|
110
|
+
};
|
|
111
|
+
'ku-IQ': {
|
|
112
|
+
label: string;
|
|
113
|
+
};
|
|
114
|
+
'lt-LT': {
|
|
115
|
+
label: string;
|
|
116
|
+
};
|
|
117
|
+
'lv-LV': {
|
|
118
|
+
label: string;
|
|
119
|
+
};
|
|
120
|
+
'mk-MK': {
|
|
121
|
+
label: string;
|
|
122
|
+
};
|
|
123
|
+
'ml-IN': {
|
|
124
|
+
label: string;
|
|
125
|
+
};
|
|
126
|
+
'mn-MN': {
|
|
127
|
+
label: string;
|
|
128
|
+
};
|
|
129
|
+
'ms-MY': {
|
|
130
|
+
label: string;
|
|
131
|
+
};
|
|
132
|
+
'nb-NO': {
|
|
133
|
+
label: string;
|
|
134
|
+
};
|
|
135
|
+
'ne-NP': {
|
|
136
|
+
label: string;
|
|
137
|
+
};
|
|
138
|
+
'nl-BE': {
|
|
139
|
+
label: string;
|
|
140
|
+
};
|
|
141
|
+
'nl-NL': {
|
|
142
|
+
label: string;
|
|
143
|
+
};
|
|
144
|
+
'pl-PL': {
|
|
145
|
+
label: string;
|
|
146
|
+
};
|
|
147
|
+
'pt-BR': {
|
|
148
|
+
label: string;
|
|
149
|
+
};
|
|
150
|
+
'pt-PT': {
|
|
151
|
+
label: string;
|
|
152
|
+
};
|
|
153
|
+
'ro-RO': {
|
|
154
|
+
label: string;
|
|
155
|
+
};
|
|
156
|
+
'ru-RU': {
|
|
157
|
+
label: string;
|
|
158
|
+
};
|
|
159
|
+
'si-LK': {
|
|
160
|
+
label: string;
|
|
161
|
+
};
|
|
162
|
+
'sk-SK': {
|
|
163
|
+
label: string;
|
|
164
|
+
};
|
|
165
|
+
'sl-SI': {
|
|
166
|
+
label: string;
|
|
167
|
+
};
|
|
168
|
+
'sr-RS': {
|
|
169
|
+
label: string;
|
|
170
|
+
};
|
|
171
|
+
'sv-SE': {
|
|
172
|
+
label: string;
|
|
173
|
+
};
|
|
174
|
+
'ta-IN': {
|
|
175
|
+
label: string;
|
|
176
|
+
};
|
|
177
|
+
'th-TH': {
|
|
178
|
+
label: string;
|
|
179
|
+
};
|
|
180
|
+
'tk-TK': {
|
|
181
|
+
label: string;
|
|
182
|
+
};
|
|
183
|
+
'tr-TR': {
|
|
184
|
+
label: string;
|
|
185
|
+
};
|
|
186
|
+
'uk-UA': {
|
|
187
|
+
label: string;
|
|
188
|
+
};
|
|
189
|
+
'ur-PK': {
|
|
190
|
+
label: string;
|
|
191
|
+
};
|
|
192
|
+
'vi-VN': {
|
|
193
|
+
label: string;
|
|
194
|
+
};
|
|
195
|
+
'zh-CN': {
|
|
196
|
+
label: string;
|
|
197
|
+
};
|
|
198
|
+
'zh-HK': {
|
|
199
|
+
label: string;
|
|
200
|
+
};
|
|
201
|
+
'zh-TW': {
|
|
202
|
+
label: string;
|
|
203
|
+
};
|
|
204
|
+
};
|
|
8
205
|
export default _default;
|
package/es/locale/index.js
CHANGED
|
@@ -1,69 +1,202 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
-
|
|
5
|
-
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; }
|
|
6
|
-
|
|
7
|
-
import antdEnUS from 'antd/lib/locale/en_US';
|
|
8
|
-
import antdJaJP from 'antd/lib/locale/ja_JP';
|
|
9
|
-
import antdRuRU from 'antd/lib/locale/ru_RU';
|
|
10
|
-
import antdTrTR from 'antd/lib/locale/tr_TR';
|
|
11
|
-
import antdZhCN from 'antd/lib/locale/zh_CN';
|
|
12
|
-
import enUS from './en_US';
|
|
13
|
-
import jaJP from './ja_JP';
|
|
14
|
-
import ruRU from './ru_RU';
|
|
15
|
-
import trTR from './tr_TR';
|
|
16
|
-
import zhCN from './zh_CN';
|
|
1
|
+
export { default as cron } from '../schema-component/antd/cron/locale';
|
|
17
2
|
export default {
|
|
3
|
+
'ar-EG': {
|
|
4
|
+
label: 'العربية'
|
|
5
|
+
},
|
|
6
|
+
'az-AZ': {
|
|
7
|
+
label: 'Azərbaycan dili'
|
|
8
|
+
},
|
|
9
|
+
'bg-BG': {
|
|
10
|
+
label: 'Български'
|
|
11
|
+
},
|
|
12
|
+
'bn-BD': {
|
|
13
|
+
label: 'Bengali'
|
|
14
|
+
},
|
|
15
|
+
'by-BY': {
|
|
16
|
+
label: 'Беларускі'
|
|
17
|
+
},
|
|
18
|
+
'ca-ES': {
|
|
19
|
+
label: 'Сatalà/Espanya'
|
|
20
|
+
},
|
|
21
|
+
'cs-CZ': {
|
|
22
|
+
label: 'Česky'
|
|
23
|
+
},
|
|
24
|
+
'da-DK': {
|
|
25
|
+
label: 'Dansk'
|
|
26
|
+
},
|
|
27
|
+
'de-DE': {
|
|
28
|
+
label: 'Deutsch'
|
|
29
|
+
},
|
|
30
|
+
'el-GR': {
|
|
31
|
+
label: 'Ελληνικά'
|
|
32
|
+
},
|
|
33
|
+
'en-GB': {
|
|
34
|
+
label: 'English(GB)'
|
|
35
|
+
},
|
|
18
36
|
'en-US': {
|
|
19
|
-
label: 'English'
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
37
|
+
label: 'English'
|
|
38
|
+
},
|
|
39
|
+
'es-ES': {
|
|
40
|
+
label: 'Español'
|
|
41
|
+
},
|
|
42
|
+
'et-EE': {
|
|
43
|
+
label: 'Estonian (Eesti)'
|
|
44
|
+
},
|
|
45
|
+
'fa-IR': {
|
|
46
|
+
label: 'فارسی'
|
|
47
|
+
},
|
|
48
|
+
'fi-FI': {
|
|
49
|
+
label: 'Suomi'
|
|
50
|
+
},
|
|
51
|
+
'fr-BE': {
|
|
52
|
+
label: 'Français(BE)'
|
|
53
|
+
},
|
|
54
|
+
'fr-CA': {
|
|
55
|
+
label: 'Français(CA)'
|
|
56
|
+
},
|
|
57
|
+
'fr-FR': {
|
|
58
|
+
label: 'Français'
|
|
59
|
+
},
|
|
60
|
+
'ga-IE': {
|
|
61
|
+
label: 'Gaeilge'
|
|
62
|
+
},
|
|
63
|
+
'gl-ES': {
|
|
64
|
+
label: 'Galego'
|
|
65
|
+
},
|
|
66
|
+
'he-IL': {
|
|
67
|
+
label: 'עברית'
|
|
68
|
+
},
|
|
69
|
+
'hi-IN': {
|
|
70
|
+
label: 'हिन्दी'
|
|
71
|
+
},
|
|
72
|
+
'hr-HR': {
|
|
73
|
+
label: 'Hrvatski jezik'
|
|
74
|
+
},
|
|
75
|
+
'hu-HU': {
|
|
76
|
+
label: 'Magyar'
|
|
77
|
+
},
|
|
78
|
+
'hy-AM': {
|
|
79
|
+
label: 'Հայերեն'
|
|
80
|
+
},
|
|
81
|
+
'id-ID': {
|
|
82
|
+
label: 'Bahasa Indonesia'
|
|
83
|
+
},
|
|
84
|
+
'is-IS': {
|
|
85
|
+
label: 'Íslenska'
|
|
86
|
+
},
|
|
87
|
+
'it-IT': {
|
|
88
|
+
label: 'Italiano'
|
|
27
89
|
},
|
|
28
90
|
'ja-JP': {
|
|
29
|
-
label: '日本語'
|
|
30
|
-
// https://github.com/moment/moment/blob/develop/locale/ja.js
|
|
31
|
-
moment: 'ja',
|
|
32
|
-
// https://github.com/ant-design/ant-design/tree/master/components/locale/ja_JP
|
|
33
|
-
antd: antdJaJP,
|
|
34
|
-
resources: {
|
|
35
|
-
client: _objectSpread({}, jaJP)
|
|
36
|
-
}
|
|
91
|
+
label: '日本語'
|
|
37
92
|
},
|
|
38
|
-
'
|
|
39
|
-
label: '
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
93
|
+
'ka-GE': {
|
|
94
|
+
label: 'ქართული'
|
|
95
|
+
},
|
|
96
|
+
'kk-KZ': {
|
|
97
|
+
label: 'Қазақ тілі'
|
|
98
|
+
},
|
|
99
|
+
'km-KH': {
|
|
100
|
+
label: 'ភាសាខ្មែរ'
|
|
101
|
+
},
|
|
102
|
+
// 'kmr-IQ': { label: 'kmr_IQ' },
|
|
103
|
+
'kn-IN': {
|
|
104
|
+
label: 'ಕನ್ನಡ'
|
|
105
|
+
},
|
|
106
|
+
'ko-KR': {
|
|
107
|
+
label: '한국어'
|
|
108
|
+
},
|
|
109
|
+
'ku-IQ': {
|
|
110
|
+
label: 'کوردی'
|
|
111
|
+
},
|
|
112
|
+
'lt-LT': {
|
|
113
|
+
label: 'lietuvių'
|
|
114
|
+
},
|
|
115
|
+
'lv-LV': {
|
|
116
|
+
label: 'Latviešu valoda'
|
|
117
|
+
},
|
|
118
|
+
'mk-MK': {
|
|
119
|
+
label: 'македонски јазик'
|
|
120
|
+
},
|
|
121
|
+
'ml-IN': {
|
|
122
|
+
label: 'മലയാളം'
|
|
123
|
+
},
|
|
124
|
+
'mn-MN': {
|
|
125
|
+
label: 'Монгол хэл'
|
|
126
|
+
},
|
|
127
|
+
'ms-MY': {
|
|
128
|
+
label: 'بهاس ملايو'
|
|
129
|
+
},
|
|
130
|
+
'nb-NO': {
|
|
131
|
+
label: 'Norsk bokmål'
|
|
132
|
+
},
|
|
133
|
+
'ne-NP': {
|
|
134
|
+
label: 'नेपाली'
|
|
135
|
+
},
|
|
136
|
+
'nl-BE': {
|
|
137
|
+
label: 'Vlaams'
|
|
138
|
+
},
|
|
139
|
+
'nl-NL': {
|
|
140
|
+
label: 'Nederlands'
|
|
141
|
+
},
|
|
142
|
+
'pl-PL': {
|
|
143
|
+
label: 'Polski'
|
|
144
|
+
},
|
|
145
|
+
'pt-BR': {
|
|
146
|
+
label: 'Português brasileiro'
|
|
147
|
+
},
|
|
148
|
+
'pt-PT': {
|
|
149
|
+
label: 'Português'
|
|
150
|
+
},
|
|
151
|
+
'ro-RO': {
|
|
152
|
+
label: 'România'
|
|
48
153
|
},
|
|
49
154
|
'ru-RU': {
|
|
50
|
-
label: 'Русский'
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
155
|
+
label: 'Русский'
|
|
156
|
+
},
|
|
157
|
+
'si-LK': {
|
|
158
|
+
label: 'සිංහල'
|
|
159
|
+
},
|
|
160
|
+
'sk-SK': {
|
|
161
|
+
label: 'Slovenčina'
|
|
162
|
+
},
|
|
163
|
+
'sl-SI': {
|
|
164
|
+
label: 'Slovenščina'
|
|
165
|
+
},
|
|
166
|
+
'sr-RS': {
|
|
167
|
+
label: 'српски језик'
|
|
168
|
+
},
|
|
169
|
+
'sv-SE': {
|
|
170
|
+
label: 'Svenska'
|
|
171
|
+
},
|
|
172
|
+
'ta-IN': {
|
|
173
|
+
label: 'Tamil'
|
|
174
|
+
},
|
|
175
|
+
'th-TH': {
|
|
176
|
+
label: 'ภาษาไทย'
|
|
177
|
+
},
|
|
178
|
+
'tk-TK': {
|
|
179
|
+
label: 'Turkmen'
|
|
58
180
|
},
|
|
59
181
|
'tr-TR': {
|
|
60
|
-
label: 'Türkçe'
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
182
|
+
label: 'Türkçe'
|
|
183
|
+
},
|
|
184
|
+
'uk-UA': {
|
|
185
|
+
label: 'Українська'
|
|
186
|
+
},
|
|
187
|
+
'ur-PK': {
|
|
188
|
+
label: 'Oʻzbekcha'
|
|
189
|
+
},
|
|
190
|
+
'vi-VN': {
|
|
191
|
+
label: 'Tiếng Việt'
|
|
192
|
+
},
|
|
193
|
+
'zh-CN': {
|
|
194
|
+
label: '简体中文'
|
|
195
|
+
},
|
|
196
|
+
'zh-HK': {
|
|
197
|
+
label: '繁體中文(香港)'
|
|
198
|
+
},
|
|
199
|
+
'zh-TW': {
|
|
200
|
+
label: '繁體中文(台湾)'
|
|
68
201
|
}
|
|
69
202
|
};
|
|
@@ -2,6 +2,14 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
2
2
|
|
|
3
3
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
4
4
|
|
|
5
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
|
+
|
|
7
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
|
+
|
|
9
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
10
|
+
|
|
11
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
|
+
|
|
5
13
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
14
|
|
|
7
15
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -47,7 +55,8 @@ export var AssociationFilterItem = function AssociationFilterItem(props) {
|
|
|
47
55
|
var compile = useCompile();
|
|
48
56
|
|
|
49
57
|
var _useBlockRequestConte = useBlockRequestContext(),
|
|
50
|
-
service = _useBlockRequestConte.service
|
|
58
|
+
service = _useBlockRequestConte.service,
|
|
59
|
+
blockProps = _useBlockRequestConte.props;
|
|
51
60
|
|
|
52
61
|
var _useState = useState(false),
|
|
53
62
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -102,7 +111,7 @@ export var AssociationFilterItem = function AssociationFilterItem(props) {
|
|
|
102
111
|
};
|
|
103
112
|
|
|
104
113
|
var onSelect = function onSelect(selectedKeysValue) {
|
|
105
|
-
var _service$params, _service$params$, _service$params2;
|
|
114
|
+
var _service$params, _service$params$, _service$params2, _blockProps$params;
|
|
106
115
|
|
|
107
116
|
setSelectedKeys(selectedKeysValue);
|
|
108
117
|
var filters = ((_service$params = service.params) === null || _service$params === void 0 ? void 0 : (_service$params$ = _service$params[1]) === null || _service$params$ === void 0 ? void 0 : _service$params$.filters) || {};
|
|
@@ -116,7 +125,7 @@ export var AssociationFilterItem = function AssociationFilterItem(props) {
|
|
|
116
125
|
service.run(_objectSpread(_objectSpread({}, (_service$params2 = service.params) === null || _service$params2 === void 0 ? void 0 : _service$params2[0]), {}, {
|
|
117
126
|
pageSize: 200,
|
|
118
127
|
page: 1,
|
|
119
|
-
filter: mergeFilter(Object.values(filters))
|
|
128
|
+
filter: mergeFilter([].concat(_toConsumableArray(Object.values(filters)), [blockProps === null || blockProps === void 0 ? void 0 : (_blockProps$params = blockProps.params) === null || _blockProps$params === void 0 ? void 0 : _blockProps$params.filter]))
|
|
120
129
|
}), {
|
|
121
130
|
filters: filters
|
|
122
131
|
});
|
|
@@ -14,36 +14,33 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
14
14
|
|
|
15
15
|
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; }
|
|
16
16
|
|
|
17
|
-
import
|
|
17
|
+
import { css } from '@emotion/css';
|
|
18
18
|
import { connect, mapReadPretty } from '@formily/react';
|
|
19
|
-
import { Cron as ReactCron } from 'react-js-cron';
|
|
20
19
|
import cronstrue from 'cronstrue';
|
|
21
|
-
import '
|
|
22
|
-
import {
|
|
23
|
-
import
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
var ReadPrettyLocales = {
|
|
28
|
-
'en-US': 'en',
|
|
29
|
-
'zh-CN': 'zh_CN'
|
|
30
|
-
};
|
|
31
|
-
export var Cron = connect(function (props) {
|
|
20
|
+
import React from 'react';
|
|
21
|
+
import { Cron as ReactCron } from 'react-js-cron';
|
|
22
|
+
import { useAPIClient } from '../../../api-client';
|
|
23
|
+
|
|
24
|
+
var Input = function Input(props) {
|
|
32
25
|
var onChange = props.onChange,
|
|
33
26
|
rest = _objectWithoutProperties(props, _excluded);
|
|
34
27
|
|
|
35
|
-
var locale = ComponentLocales[localStorage.getItem('NOCOBASE_LOCALE') || 'en-US'];
|
|
36
28
|
return /*#__PURE__*/React.createElement("fieldset", {
|
|
37
|
-
className: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .react-js-cron{\n padding: .5em .5em 0 .5em;\n border: 1px dashed #ccc;\n
|
|
29
|
+
className: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .react-js-cron {\n padding: 0.5em 0.5em 0 0.5em;\n border: 1px dashed #ccc;\n .react-js-cron-field {\n flex-shrink: 0;\n margin-bottom: 0.5em;\n\n > span {\n flex-shrink: 0;\n margin: 0 0.5em 0 0;\n }\n\n > .react-js-cron-select {\n margin: 0 0.5em 0 0;\n }\n }\n }\n "])))
|
|
38
30
|
}, /*#__PURE__*/React.createElement(ReactCron, _objectSpread({
|
|
39
31
|
setValue: onChange,
|
|
40
|
-
locale:
|
|
32
|
+
locale: window['cronLocale']
|
|
41
33
|
}, rest)));
|
|
42
|
-
}
|
|
43
|
-
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
var ReadPretty = function ReadPretty(props) {
|
|
37
|
+
var api = useAPIClient();
|
|
38
|
+
var locale = api.auth.getLocale();
|
|
44
39
|
return props.value ? /*#__PURE__*/React.createElement("span", null, cronstrue.toString(props.value, {
|
|
45
40
|
locale: locale,
|
|
46
41
|
use24HourTimeFormat: true
|
|
47
42
|
})) : null;
|
|
48
|
-
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export var Cron = connect(Input, mapReadPretty(ReadPretty));
|
|
49
46
|
export default Cron;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
'zh-CN': {
|
|
3
|
+
everyText: string;
|
|
4
|
+
emptyMonths: string;
|
|
5
|
+
emptyMonthDays: string;
|
|
6
|
+
emptyMonthDaysShort: string;
|
|
7
|
+
emptyWeekDays: string;
|
|
8
|
+
emptyWeekDaysShort: string;
|
|
9
|
+
emptyHours: string;
|
|
10
|
+
emptyMinutes: string;
|
|
11
|
+
emptyMinutesForHourPeriod: string;
|
|
12
|
+
yearOption: string;
|
|
13
|
+
monthOption: string;
|
|
14
|
+
weekOption: string;
|
|
15
|
+
dayOption: string;
|
|
16
|
+
hourOption: string;
|
|
17
|
+
minuteOption: string;
|
|
18
|
+
rebootOption: string;
|
|
19
|
+
prefixPeriod: string;
|
|
20
|
+
prefixMonths: string;
|
|
21
|
+
prefixMonthDays: string;
|
|
22
|
+
prefixWeekDays: string;
|
|
23
|
+
prefixWeekDaysForMonthAndYearPeriod: string;
|
|
24
|
+
prefixHours: string;
|
|
25
|
+
prefixMinutes: string;
|
|
26
|
+
prefixMinutesForHourPeriod: string;
|
|
27
|
+
suffixMinutesForHourPeriod: string;
|
|
28
|
+
errorInvalidCron: string;
|
|
29
|
+
clearButtonText: string;
|
|
30
|
+
weekDays: string[];
|
|
31
|
+
months: string[];
|
|
32
|
+
altWeekDays: string[];
|
|
33
|
+
altMonths: string[];
|
|
34
|
+
};
|
|
35
|
+
'en-US': import("react-js-cron").DefaultLocale;
|
|
36
|
+
};
|
|
37
|
+
export default _default;
|
|
@@ -164,10 +164,10 @@ export var useFilterFieldProps = function useFilterFieldProps(_ref) {
|
|
|
164
164
|
|
|
165
165
|
var filter = removeNullCondition(values === null || values === void 0 ? void 0 : values.filter);
|
|
166
166
|
var filters = ((_service$params = service.params) === null || _service$params === void 0 ? void 0 : (_service$params$ = _service$params[1]) === null || _service$params$ === void 0 ? void 0 : _service$params$.filters) || {};
|
|
167
|
-
filters["
|
|
167
|
+
filters["filterAction"] = filter;
|
|
168
168
|
service.run(_objectSpread(_objectSpread({}, (_service$params2 = service.params) === null || _service$params2 === void 0 ? void 0 : _service$params2[0]), {}, {
|
|
169
169
|
page: 1,
|
|
170
|
-
filter: mergeFilter(Object.values(filters))
|
|
170
|
+
filter: mergeFilter([].concat(_toConsumableArray(Object.values(filters)), [defaultFilter]))
|
|
171
171
|
}), {
|
|
172
172
|
filters: filters
|
|
173
173
|
});
|
|
@@ -182,13 +182,17 @@ export var useFilterFieldProps = function useFilterFieldProps(_ref) {
|
|
|
182
182
|
}
|
|
183
183
|
},
|
|
184
184
|
onReset: function onReset() {
|
|
185
|
-
var _service$params3;
|
|
185
|
+
var _service$params3, _service$params3$, _service$params4;
|
|
186
186
|
|
|
187
187
|
var filter = params.filter;
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
var filters = ((_service$params3 = service.params) === null || _service$params3 === void 0 ? void 0 : (_service$params3$ = _service$params3[1]) === null || _service$params3$ === void 0 ? void 0 : _service$params3$.filters) || {};
|
|
189
|
+
delete filters["filterAction"];
|
|
190
|
+
service.run(_objectSpread(_objectSpread({}, (_service$params4 = service.params) === null || _service$params4 === void 0 ? void 0 : _service$params4[0]), {}, {
|
|
191
|
+
filter: mergeFilter([].concat(_toConsumableArray(Object.values(filters)), [filter])),
|
|
190
192
|
page: 1
|
|
191
|
-
})
|
|
193
|
+
}), {
|
|
194
|
+
filters: filters
|
|
195
|
+
});
|
|
192
196
|
field.title = t('Filter');
|
|
193
197
|
}
|
|
194
198
|
};
|